Skip to content

Latest commit

 

History

History
489 lines (416 loc) · 20.1 KB

File metadata and controls

489 lines (416 loc) · 20.1 KB
schema_version 1
project Kun
single_runtime kun
themes
light
dark
system
palette
light dark
bg_app bg_sidebar bg_canvas surface_card surface_elevated surface_subtle surface_hover border border_muted border_strong text text_muted text_faint text_placeholder accent accent_soft bubble_user bubble_user_fg success success_soft danger danger_soft diff_added diff_added_soft diff_removed diff_removed_soft skill skill_soft warning_soft selection scrollbar_thumb scrollbar_thumb_hover
#f5f7fa
#f4f7fb
#fbfcfe
rgba(255,255,255,0.90)
rgba(255,255,255,0.98)
#eef2f7
rgba(15,23,42,0.055)
rgba(15,23,42,0.12)
rgba(15,23,42,0.08)
rgba(15,23,42,0.18)
#222222
#5f6878
#8a93a4
#949dad
#0088ff
rgba(0,136,255,0.14)
rgba(0,0,0,0.06)
#222222
#128a4a
rgba(17,185,129,0.14)
#c92a2a
rgba(239,68,68,0.12)
#128a4a
rgba(18,138,74,0.10)
#c92a2a
rgba(201,42,42,0.10)
#7c3aed
rgba(124,58,237,0.12)
rgba(245,158,11,0.14)
rgba(0,136,255,0.18)
rgba(95,104,120,0.22)
rgba(95,104,120,0.32)
bg_app bg_sidebar bg_canvas surface_card surface_elevated surface_subtle surface_hover border border_muted border_strong text text_muted text_faint text_placeholder accent accent_soft bubble_user bubble_user_fg success success_soft danger danger_soft diff_added diff_added_soft diff_removed diff_removed_soft skill skill_soft warning_soft selection scrollbar_thumb scrollbar_thumb_hover
#101010
#141414
#181818
rgba(24,24,24,0.92)
#202020
#202020
rgba(255,255,255,0.10)
rgba(255,255,255,0.10)
rgba(255,255,255,0.10)
rgba(255,255,255,0.16)
#ffffff
#c7c7c7
#858585
#7a7a7a
#339cff
rgba(51,156,255,0.18)
rgba(255,255,255,0.08)
#ffffff
#40c977
rgba(64,201,119,0.18)
#fa423e
rgba(250,66,62,0.18)
#40c977
rgba(64,201,119,0.16)
#fa423e
rgba(250,66,62,0.16)
#ad7bf9
rgba(173,123,249,0.16)
rgba(245,158,11,0.18)
rgba(51,156,255,0.24)
rgba(170,170,170,0.28)
rgba(200,200,200,0.38)
typography
family size_scale_px size_rhythm weight_scale leading tracking ui_zoom_factor usage
sans display mono
SF Pro Text, 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif
SF Pro Display, 'PingFang SC', 'Noto Sans SC', sans-serif
SF Mono, 'JetBrains Mono', 'IBM Plex Mono', monospace
9
10
10.5
11
11.5
12
12.5
13
13.5
14
14.5
15
16
18
24
30
caption label_small chip chip_md body_sm body body_lg body_xl title_sm title title_lg display hero
11
11.5
10
12
12.5
13
14
14.5
15
16
18
24
30
400
500
600
700
tight snug normal
5
6
7
normal wide
0
0.04
small medium large
0.82
0.88
1.0
hero title_lg title title_sm body_xl body_lg body body_sm label_small caption chip
Welcome card, marketing-style headings
Topbar session title, settings section H2
Card titles, dialog title
Strong inline label
Settings subtitle, session header sub
Primary form input text, list row primary
Default body, button text, table cell
Secondary metadata, list row secondary
Tab label, table header
Helper text, hint line
Status chip, tag
spacing
base_unit_px scale card_padding block_gap layout
4
0
1
1.5
2
2.5
3
3.5
4
5
6
8
10
12
tight normal loose
px-3 py-2
px-4 py-3
px-5 py-4
1
1.5
2
2.5
3
left_sidebar_default_px left_sidebar_min_px left_sidebar_max_px right_inspector_default_px right_inspector_min_px right_inspector_max_px sidebar_hard_min_px
268
236
420
360
280
760
180
radius
scale_px alias usage
4
6
8
10
12
14
16
18
22
28
9999
sm md lg xl 2xl 2.5xl 3xl composer pill
6
8
12
14
16
18
22
28
9999
chip pill_button avatar card_default dialog topbar_dropdown composer inline_code icon_only_button
pill
pill
pill
lg
3xl
2.5xl
composer
sm
md
elevation
light dark
chip card_soft card_strong panel shell composer dropdown topbar
inset 0 1px 0 rgba(255,255,255,0.78)
0 10px 28px rgba(15,23,42,0.06)
0 14px 36px rgba(15,23,42,0.09)
0 16px 44px rgba(15,23,42,0.06)
0 12px 30px rgba(15,23,42,0.08)
0 18px 46px rgba(15,23,42,0.10), 0 5px 16px rgba(15,23,42,0.06)
0 18px 52px rgba(15,23,42,0.18)
0 16px 42px rgba(15,23,42,0.05), inset 0 1px 0 rgba(255,255,255,0.64)
chip card_soft card_strong panel shell composer dropdown topbar
inset 0 1px 0 rgba(255,255,255,0.045)
0 16px 42px rgba(0,0,0,0.22)
0 22px 56px rgba(0,0,0,0.30)
0 22px 58px rgba(0,0,0,0.35)
0 38px 96px rgba(0,0,0,0.55)
0 28px 78px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06)
0 22px 58px rgba(0,0,0,0.38)
0 18px 44px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.07)
motion
timing_ms easing special transform when_to_use
micro standard deep
140
150
300
ease
pulse shiny_text
1800
2400
card_lift button_press
translateY(-1px)
scale(0.985)
micro standard deep
chip hover, menu item hover, focus ring swap
card hover, composer border on focus, topbar glass
modal open, route transition
z_index
background background_overlay base sticky dropdown modal toast
-2
-1
0
10
50
100
200
window
app_region no_drag_class macos_top_inset_px app_icon secondary_logos
drag
ds-no-drag
42
src/asset/img/kun.png
kun_mac.png
kun_tray.png
kun_tray_mac.svg
icons
library default_size_px common_sizes_px color
lucide-react
16
14
16
18
20
24
currentColor
components
card button_primary button_secondary button_pill input chip user_bubble code_inline code_block status_dot kbd modal
base strong
border border-ds-border bg-ds-card rounded-xl shadow-sm
border-ds-border-strong bg-ds-elevated shadow-[ds-shadow-card-strong] backdrop-blur-xl
base shadow
inline-flex items-center gap-1.5 rounded-full bg-accent px-4 py-2 text-[13px] font-semibold text-white transition hover:brightness-110
0 10px 24px rgba(0,136,255,0.22)
base
inline-flex items-center gap-1.5 rounded-xl border border-ds-border bg-ds-card px-3 py-2 text-[13px] font-medium text-ds-ink shadow-sm transition hover:bg-ds-hover disabled:opacity-50
base
inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1.5 shadow-[inset_0_1px_0_rgba(255,255,255,0.45)] transition
base
w-full rounded-xl border border-ds-border bg-ds-card px-3 py-2 text-[14px] text-ds-ink shadow-sm focus:border-accent/40 focus:outline-none focus:ring-1 focus:ring-accent/30
base muted
inline-flex items-center gap-1 rounded-full bg-accent/10 px-1.5 py-0.5 text-[10px] font-semibold text-accent
inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1.5 text-[12.5px] font-medium text-ds-muted bg-ds-subtle shadow-sm
base
rounded-xl bg-ds-userbubble px-3 py-2 text-[13px] font-medium text-ds-userbubbleFg shadow-sm
base
rounded-md bg-ds-inline-code-bg px-1.5 py-0.5 font-mono text-[12px] text-ds-ink
base
rounded-xl border border-ds-border-muted bg-ds-pre-bg p-3 font-mono text-[12px] leading-5 text-ds-ink
base
h-2 w-2 rounded-full bg-accent animate-pulse
base
rounded bg-ds-kbd-bg px-1.5 py-0.5 font-mono text-[11px] text-ds-muted shadow-[inset_0_1px_0_rgba(255,255,255,0.45)]
container panel
fixed inset-0 z-100 flex items-center justify-center bg-black/40 backdrop-blur-sm
w-full max-w-md rounded-3xl border border-ds-border bg-ds-elevated p-6 shadow-[ds-shadow-panel]
backgrounds
app_gradient_light app_gradient_dark sidebar_gradient_light sidebar_gradient_dark topbar_gradient_light topbar_gradient_dark body_glaze_light body_glaze_dark composer_glow
linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%)
linear-gradient(180deg, #101010 0%, #181818 100%)
linear-gradient(180deg, rgba(248,251,254,0.98) 0%, rgba(242,247,252,0.98) 100%)
linear-gradient(180deg, #181818 0%, #141414 45%, #101010 100%)
linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.58) 58%, rgba(255,255,255,0.30) 100%)
linear-gradient(180deg, rgba(32,32,32,0.86) 0%, rgba(24,24,24,0.70) 58%, rgba(18,18,18,0.42) 100%)
linear-gradient(180deg, rgba(255,255,255,0.50), transparent 22%), linear-gradient(120deg, rgba(255,255,255,0.22), transparent 34%, rgba(255,255,255,0.12) 74%, transparent)
linear-gradient(180deg, rgba(255,255,255,0.04), transparent 24%), linear-gradient(120deg, rgba(255,255,255,0.03), transparent 35%, rgba(255,255,255,0.02) 72%, transparent)
radial-gradient(circle at top left, rgba(0,136,255,0.07), transparent 28%), radial-gradient(circle at right 14% bottom 18%, rgba(0,136,255,0.04), transparent 24%), linear-gradient(180deg, rgba(255,255,255,0.08), transparent 28%)
i18n
locales default tone error_format
zh
en
zh
helpful, direct, never robotic; first-person plural when describing product ('we ship'), second-person for the user. No emoji in production copy.
human sentence ending in punctuation; never raw stack traces
brand
product_name tagline hero_kw pillars voice
Kun
把 Kun 的本地智能体能力带进桌面窗口
Code
Design
Write
Connect phone
本地优先 (Local-first): settings, sessions, logs all on disk; model calls use your own DeepSeek API key.
可观察 (Observable): every tool call, file change, reasoning step surfaces in the UI.
可控制 (Controllable): approval policy + sandbox mode + interrupt + revert.
Direct, no marketing fluff. Show what the agent did, not how great it is.
a11y
focus_ring focus_visible_only hit_target_min_px contrast_target selection_color respects_prefers_reduced_motion keyboard_shortcuts
1px ring-1 ring-accent/30 with 40% accent border
true
32
WCAG_AA
var(--ds-selection)
false
Enter Shift_Enter Ctrl_Enter Esc
send message
newline in composer
send message
close panel / dismiss popover
dont
Use a second live agent runtime — Kun is the only one.
Add AgentSwitcher / ConnectionStatusBar / RuntimeDiagnosticsDialog.
Add CodeWhale/Reasonix adapters, process managers, RPC bridges, updaters, importers.
Add a design/drawing starter card in the core workbench.
Add /usage or /runtime slash command that opens a runtime control panel.
Save settings under agents.codewhale or agents.reasonix; only agents.kun.
Use emoji in production copy or as functional UI affordance.
Apply a tint or hue that isn't in the palette above.
Use a font outside the three declared families.
Use a border radius smaller than 4px on a clickable surface.

Kun — DESIGN.md

The machine-readable design-token frontmatter remains in this stable entry file. The editorial guide is split into focused chapters; the original section anchors below remain as navigation stubs.

Focused chapters

Stable section navigation

0. How to read this file

Full content: docs/design/foundations-and-runtime.md

1. Project at a glance

Full content: docs/design/foundations-and-runtime.md

2. Design principles

Full content: docs/design/foundations-and-runtime.md

3. How the project should look and feel

Full content: docs/design/foundations-and-runtime.md

3.1 The "feel" in one paragraph

Full content: docs/design/foundations-and-runtime.md

3.2 Canvas, surface, elevation

Full content: docs/design/foundations-and-runtime.md

3.3 Color, when to use it

Full content: docs/design/foundations-and-runtime.md

3.4 Typography

Full content: docs/design/foundations-and-runtime.md

3.5 Spacing & rhythm

Full content: docs/design/foundations-and-runtime.md

3.6 Radius, shape, and "softness"

Full content: docs/design/foundations-and-runtime.md

3.7 Elevation & shadow

Full content: docs/design/foundations-and-runtime.md

3.8 Motion

Full content: docs/design/foundations-and-runtime.md

3.9 Layout grammar

Full content: docs/design/foundations-and-runtime.md

3.10 Voice and copy

Full content: docs/design/foundations-and-runtime.md

3.11 Theme switching

Full content: docs/design/foundations-and-runtime.md

3.12 What "on-brand" looks like — quick test

Full content: docs/design/foundations-and-runtime.md

4. Top-level architecture

Full content: docs/design/foundations-and-runtime.md

5. Core runtime: Kun

Full content: docs/design/foundations-and-runtime.md

5.1 Module layout

Full content: docs/design/foundations-and-runtime.md

5.2 Hexagonal shape

Full content: docs/design/foundations-and-runtime.md

5.3 Cache-first agent loop

Full content: docs/design/foundations-and-runtime.md

5.4 HTTP/SSE surface

Full content: docs/design/foundations-and-runtime.md

5.5 Thread record & relation

Full content: docs/design/foundations-and-runtime.md

5.6 Approval & sandbox

Full content: docs/design/foundations-and-runtime.md

5.7 Persistence

Full content: docs/design/foundations-and-runtime.md

6. Desktop shell (Electron)

Full content: docs/design/desktop-renderer-and-operations.md

6.1 Process roles

Full content: docs/design/desktop-renderer-and-operations.md

6.2 Module layout

Full content: docs/design/desktop-renderer-and-operations.md

6.3 The kunGui API surface

Full content: docs/design/desktop-renderer-and-operations.md

6.4 The runtime adapter

Full content: docs/design/desktop-renderer-and-operations.md

7. Renderer (React 19 + Zustand 5)

Full content: docs/design/desktop-renderer-and-operations.md

7.1 Top-level shape

Full content: docs/design/desktop-renderer-and-operations.md

7.2 State

Full content: docs/design/desktop-renderer-and-operations.md

7.3 The AgentProvider interface

Full content: docs/design/desktop-renderer-and-operations.md

7.4 Workbench internals

Full content: docs/design/desktop-renderer-and-operations.md

7.5 Workbench routes, one store

Full content: docs/design/desktop-renderer-and-operations.md

8. Data persistence (renderer + main)

Full content: docs/design/desktop-renderer-and-operations.md

9. Key subsystems

Full content: docs/design/desktop-renderer-and-operations.md

9.1 Tool execution & approval

Full content: docs/design/desktop-renderer-and-operations.md

9.2 Plan mode

Full content: docs/design/desktop-renderer-and-operations.md

9.3 Context compaction

Full content: docs/design/desktop-renderer-and-operations.md

9.4 Write-mode completion & RAG

Full content: docs/design/desktop-renderer-and-operations.md

9.5 Connect phone automation

Full content: docs/design/desktop-renderer-and-operations.md

9.6 Updater

Full content: docs/design/desktop-renderer-and-operations.md

9.7 Logging

Full content: docs/design/desktop-renderer-and-operations.md

10. Security model

Full content: docs/design/desktop-renderer-and-operations.md

11. Constraints (do not violate)

Full content: docs/design/desktop-renderer-and-operations.md

12. Extension guide

Full content: docs/design/desktop-renderer-and-operations.md

13. Verification

Full content: docs/design/desktop-renderer-and-operations.md

14. Key files index

Full content: docs/design/desktop-renderer-and-operations.md

15. References

Full content: docs/design/desktop-renderer-and-operations.md