@weavecode/weave 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@weavecode/cli/dist/cli.js +4 -4
- package/node_modules/@weavecode/cli/dist/commands/chpass.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/daemon-auth.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/daemon.d.ts +7 -0
- package/node_modules/@weavecode/cli/dist/commands/daemon.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/dashboard.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/doctor.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/init.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/scan.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/status.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/uninstall.js +1 -1
- package/node_modules/@weavecode/cli/dist/i18n/dict/en.js +1 -9
- package/node_modules/@weavecode/cli/dist/i18n/dict/zh.d.ts +0 -1
- package/node_modules/@weavecode/cli/dist/i18n/dict/zh.js +2 -10
- package/node_modules/@weavecode/cli/dist/i18n/index.js +1 -1
- package/node_modules/@weavecode/cli/dist/i18n/t.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/claudemd-gen.d.ts +2 -3
- package/node_modules/@weavecode/cli/dist/init/claudemd-gen.js +4 -4
- package/node_modules/@weavecode/cli/dist/init/executor.js +3 -3
- package/node_modules/@weavecode/cli/dist/init/git-commit.js +2 -2
- package/node_modules/@weavecode/cli/dist/init/harnesses/claude.js +7 -7
- package/node_modules/@weavecode/cli/dist/init/harnesses/codex.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/harnesses/zcode.d.ts +29 -0
- package/node_modules/@weavecode/cli/dist/init/harnesses/zcode.js +1 -0
- package/node_modules/@weavecode/cli/dist/init/instruction-link.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/plugin-templates.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/prompt.js +4 -4
- package/node_modules/@weavecode/cli/dist/init/uninstall.js +6 -6
- package/node_modules/@weavecode/cli/dist/init/wiring.js +1 -1
- package/node_modules/@weavecode/cli/dist/parser.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/ansi.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/mock-input.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/preview.js +2 -2
- package/node_modules/@weavecode/cli/package.json +5 -5
- package/node_modules/@weavecode/core/dist/harness-checks.js +1 -1
- package/node_modules/@weavecode/core/dist/index.d.ts +1 -1
- package/node_modules/@weavecode/core/dist/index.js +1 -1
- package/node_modules/@weavecode/core/dist/platform.js +1 -1
- package/node_modules/@weavecode/core/dist/types.d.ts +0 -8
- package/node_modules/@weavecode/core/dist/types.js +1 -1
- package/node_modules/@weavecode/core/dist/utils/fs.js +1 -1
- package/node_modules/@weavecode/core/dist/utils/logger.js +1 -1
- package/node_modules/@weavecode/core/package.json +1 -1
- package/node_modules/@weavecode/harness/dist/claude/assets.d.ts +10 -0
- package/node_modules/@weavecode/harness/dist/claude/assets.js +4 -1
- package/node_modules/@weavecode/harness/dist/claude/capture.d.ts +4 -2
- package/node_modules/@weavecode/harness/dist/claude/capture.js +15 -9
- package/node_modules/@weavecode/harness/dist/claude/detect.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/event-source.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/index.d.ts +6 -1
- package/node_modules/@weavecode/harness/dist/claude/index.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/mcp-gen.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/messaging.js +2 -2
- package/node_modules/@weavecode/harness/dist/claude/model-aliases.d.ts +14 -0
- package/node_modules/@weavecode/harness/dist/claude/model-aliases.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/peers.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/plan.d.ts +2 -0
- package/node_modules/@weavecode/harness/dist/claude/plan.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/plugins.js +4 -4
- package/node_modules/@weavecode/harness/dist/claude/prompt-inbox.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/prompt.js +3 -3
- package/node_modules/@weavecode/harness/dist/claude/questions.js +2 -2
- package/node_modules/@weavecode/harness/dist/claude/settings-gen.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/side-question.d.ts +12 -0
- package/node_modules/@weavecode/harness/dist/claude/side-question.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/config.d.ts +200 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/config.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/generator.d.ts +12 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/generator.js +745 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.d.ts +10 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/surface.d.ts +20 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/surface.js +2 -0
- package/node_modules/@weavecode/harness/dist/claude/transcript.js +3 -3
- package/node_modules/@weavecode/harness/dist/codex/assets.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/detect.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/index.d.ts +1 -0
- package/node_modules/@weavecode/harness/dist/codex/index.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/mcp.d.ts +30 -0
- package/node_modules/@weavecode/harness/dist/codex/mcp.js +1 -0
- package/node_modules/@weavecode/harness/dist/codex/messaging.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/plugin-state.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/toml.js +9 -9
- package/node_modules/@weavecode/harness/dist/driver.d.ts +110 -2
- package/node_modules/@weavecode/harness/dist/driver.js +1 -1
- package/node_modules/@weavecode/harness/dist/init/generated.js +2 -2
- package/node_modules/@weavecode/harness/dist/init/pipeline.js +1 -1
- package/node_modules/@weavecode/harness/dist/registry-wiring.js +1 -1
- package/node_modules/@weavecode/harness/dist/shared/install-link.js +1 -1
- package/node_modules/@weavecode/harness/dist/zcode/assets.d.ts +8 -0
- package/node_modules/@weavecode/harness/dist/zcode/assets.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/capture.d.ts +36 -0
- package/node_modules/@weavecode/harness/dist/zcode/capture.js +3 -0
- package/node_modules/@weavecode/harness/dist/zcode/detect.d.ts +2 -0
- package/node_modules/@weavecode/harness/dist/zcode/detect.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/event-source.d.ts +8 -0
- package/node_modules/@weavecode/harness/dist/zcode/event-source.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/index.d.ts +13 -0
- package/node_modules/@weavecode/harness/dist/zcode/index.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/mcp.d.ts +6 -0
- package/node_modules/@weavecode/harness/dist/zcode/mcp.js +2 -0
- package/node_modules/@weavecode/harness/dist/zcode/messaging.d.ts +13 -0
- package/node_modules/@weavecode/harness/dist/zcode/messaging.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/resume.d.ts +7 -0
- package/node_modules/@weavecode/harness/dist/zcode/resume.js +1 -0
- package/node_modules/@weavecode/harness/package.json +2 -2
- package/node_modules/@weavecode/server/dist/daemon/dev-entry.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.d.ts +8 -1
- package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/hooks-routes.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/server.d.ts +7 -0
- package/node_modules/@weavecode/server/dist/daemon/server.js +8 -6
- package/node_modules/@weavecode/server/dist/daemon/session-probe.d.ts +13 -0
- package/node_modules/@weavecode/server/dist/daemon/session-probe.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.d.ts +7 -1
- package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/sse-hub.d.ts +40 -0
- package/node_modules/@weavecode/server/dist/daemon/sse-hub.js +1 -0
- package/node_modules/@weavecode/server/dist/daemon/start.js +1 -1
- package/node_modules/@weavecode/server/dist/db/db.js +20 -2
- package/node_modules/@weavecode/server/dist/hooks/bus.d.ts +5 -0
- package/node_modules/@weavecode/server/dist/hooks/inbox-worker.d.ts +8 -1
- package/node_modules/@weavecode/server/dist/hooks/inbox-worker.js +3 -3
- package/node_modules/@weavecode/server/dist/hooks/message-deliverer.d.ts +29 -0
- package/node_modules/@weavecode/server/dist/hooks/message-deliverer.js +2 -2
- package/node_modules/@weavecode/server/dist/hooks/mirror.d.ts +9 -4
- package/node_modules/@weavecode/server/dist/hooks/mirror.js +4 -4
- package/node_modules/@weavecode/server/dist/hooks/session-purge.d.ts +3 -0
- package/node_modules/@weavecode/server/dist/hooks/session-purge.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/side-questions.d.ts +41 -0
- package/node_modules/@weavecode/server/dist/hooks/side-questions.js +1 -0
- package/node_modules/@weavecode/server/dist/hooks/toolkit.js +5 -5
- package/node_modules/@weavecode/server/dist/install/apply-update.js +1 -1
- package/node_modules/@weavecode/server/dist/install/capabilities.d.ts +10 -0
- package/node_modules/@weavecode/server/dist/install/capabilities.js +1 -1
- package/node_modules/@weavecode/server/dist/install/codex-toml.d.ts +8 -26
- package/node_modules/@weavecode/server/dist/install/codex-toml.js +1 -1
- package/node_modules/@weavecode/server/dist/install/global-config.d.ts +2 -4
- package/node_modules/@weavecode/server/dist/install/global-config.js +1 -2
- package/node_modules/@weavecode/server/dist/install/installer.d.ts +3 -5
- package/node_modules/@weavecode/server/dist/install/installer.js +1 -3
- package/node_modules/@weavecode/server/dist/install/mcp-rows.d.ts +5 -5
- package/node_modules/@weavecode/server/dist/install/mcp-rows.js +1 -1
- package/node_modules/@weavecode/server/dist/registry.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/hook-events.d.ts +7 -0
- package/node_modules/@weavecode/server/dist/repositories/hook-events.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/sessions.d.ts +15 -4
- package/node_modules/@weavecode/server/dist/repositories/sessions.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/side-questions.d.ts +50 -0
- package/node_modules/@weavecode/server/dist/repositories/side-questions.js +6 -0
- package/node_modules/@weavecode/server/dist/statusline/config.d.ts +4 -198
- package/node_modules/@weavecode/server/dist/statusline/config.js +1 -1
- package/node_modules/@weavecode/server/dist/statusline/generator.d.ts +5 -0
- package/node_modules/@weavecode/server/dist/statusline/generator.js +1 -717
- package/node_modules/@weavecode/server/dist/statusline/manager.d.ts +5 -5
- package/node_modules/@weavecode/server/dist/statusline/manager.js +3 -4
- package/node_modules/@weavecode/server/dist/surfaces.d.ts +11 -1
- package/node_modules/@weavecode/server/dist/surfaces.js +1 -1
- package/node_modules/@weavecode/server/package.json +4 -4
- package/node_modules/@weavecode/server/web/dist/assets/index-CHWbLAje.js +594 -0
- package/node_modules/@weavecode/server/web/dist/assets/index-D0s5v8QS.css +11 -0
- package/node_modules/@weavecode/server/web/dist/index.html +2 -2
- package/node_modules/@weavecode/templates/package.json +2 -2
- package/package.json +6 -6
- package/node_modules/@weavecode/server/web/dist/assets/index-D5WFh77i.css +0 -11
- package/node_modules/@weavecode/server/web/dist/assets/index-DJibaGnJ.js +0 -585
|
@@ -1,200 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Statusline
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Stored per-project as `.weave/statusline.json`; a global default template
|
|
6
|
-
* lives at `~/.weave/statusline.json`. The generator embeds the effective
|
|
7
|
-
* config into `helpers/statusline.cjs` so the script is self-contained.
|
|
8
|
-
*
|
|
9
|
-
* Layout model (informed by ruflo's statusline + ccstatusline):
|
|
10
|
-
* - `lines` : an ordered list of rows; each row is the left-to-right segment
|
|
11
|
-
* order of that line (draggable in the panel, across rows too).
|
|
12
|
-
* Rows are separated by a dim divider; the logo prefixes row 0.
|
|
13
|
-
* - `refreshInterval`: how often (seconds, min 1) Claude Code re-runs the
|
|
14
|
-
* generated script during idle periods. Updates are driven by
|
|
15
|
-
* Claude Code's own mechanism — the script is a one-shot command
|
|
16
|
-
* re-invoked after each assistant response (~300ms debounce)
|
|
17
|
-
* plus this timer; default 10s.
|
|
18
|
-
*
|
|
19
|
-
* When `powerline.enabled`, segments render as solid background blocks that
|
|
20
|
-
* join edge-to-edge (ccstatusline-style), each optionally prefixed by an icon.
|
|
21
|
-
* `align` pads the line so the content sits left, centre, or right.
|
|
22
|
-
*
|
|
23
|
-
* Segment data comes straight from Claude Code's statusline stdin JSON
|
|
24
|
-
* (`context_window.used_percentage`, `rate_limits.five_hour.used_percentage`,
|
|
25
|
-
* `effort.level`, `cost.total_cost_usd`, …), so the generated script needs no
|
|
26
|
-
* external daemon — it re-reads stdin on every render, which is the
|
|
27
|
-
* auto-refresh mechanism.
|
|
2
|
+
* Statusline 词表与默认模板——形状是 claude 的 statusline 知识,实现落在
|
|
3
|
+
* `weave-harness/src/claude/statusline/config.ts`,此处只做转出。
|
|
28
4
|
*/
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
* A colour is one of the seven ANSI names (classic SGR 31-36/90), an indexed
|
|
32
|
-
* 256-colour value (`ansi256:196` → `38;5;196`), or a truecolor hex value
|
|
33
|
-
* (`#ff8800` / `#f80` → `38;2;…`).
|
|
34
|
-
*
|
|
35
|
-
* The template-literal union keeps the seven names autocompletable while still
|
|
36
|
-
* admitting the extended encodings. It is deliberately permissive — anything
|
|
37
|
-
* shaped like a hex string type-checks — so `normalizeColor` in the manager is
|
|
38
|
-
* what actually validates values at rest.
|
|
39
|
-
*/
|
|
40
|
-
export type StatuslineColor = StatuslineNamedColor | `ansi256:${number}` | `#${string}`;
|
|
41
|
-
/** The seven classic ANSI colour names, in palette order. */
|
|
42
|
-
export declare const NAMED_COLORS: readonly StatuslineNamedColor[];
|
|
43
|
-
/** All renderable segment kinds (maps to ccstatusline's data segments). */
|
|
44
|
-
export type SegmentKey = 'project' | 'git' | 'git_user' | 'changes' | 'model' | 'thinking' | 'context' | 'tokens' | 'cost' | 'rate' | 'time' | 'version' | 'output_style' | 'session' | 'exceeds200k' | 'fast_mode' | 'vim' | 'pr' | 'worktree' | 'agent';
|
|
45
|
-
export interface StatuslineSegment {
|
|
46
|
-
enabled: boolean;
|
|
47
|
-
color: StatuslineColor;
|
|
48
|
-
/** Render the segment in bold ANSI (`\x1b[1;…m`). */
|
|
49
|
-
bold: boolean;
|
|
50
|
-
/** Optional emoji/symbol prefix (e.g. `🤖`, `🌿`, `📁`). Empty when unused. */
|
|
51
|
-
icon: string;
|
|
52
|
-
/** Solid background block colour; `null` for no background (foreground only). */
|
|
53
|
-
backgroundColor: StatuslineColor | null;
|
|
54
|
-
/** Join this segment into the next block (no gap, inherited background). */
|
|
55
|
-
merge: boolean;
|
|
56
|
-
/** Context-bar display mode; ignored by other segments. */
|
|
57
|
-
style?: 'percent' | 'bar' | 'both';
|
|
58
|
-
/** Which rate-limit window `rate` reports; ignored by other segments. */
|
|
59
|
-
window?: 'five_hour' | 'seven_day' | 'spend';
|
|
60
|
-
/**
|
|
61
|
-
* Static text prefix, rendered as `<label><labelSeparator><value>` — e.g.
|
|
62
|
-
* `label: 'Cost'` yields `Cost: $0.45`. Empty/absent means no prefix, which
|
|
63
|
-
* is the behaviour every config had before labels existed.
|
|
64
|
-
*/
|
|
65
|
-
label?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Value template with `{token}` placeholders (see `SEGMENT_TOKENS` for the
|
|
68
|
-
* tokens each segment exposes). When set it replaces the built-in formatting
|
|
69
|
-
* for that segment; when absent the segment falls back to its legacy
|
|
70
|
-
* rendering, so existing configs are unaffected.
|
|
71
|
-
*
|
|
72
|
-
* e.g. `context.format = "[{bar}] {used}/{total} ({percent}%)"`
|
|
73
|
-
*/
|
|
74
|
-
format?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Which quantity the `tokens` segment reports: `session` (cumulative tokens
|
|
77
|
-
* for the whole session, read from the transcript) or `context` (tokens
|
|
78
|
-
* currently in the context window). Ignored by other segments.
|
|
79
|
-
*/
|
|
80
|
-
metric?: 'session' | 'context';
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Progress-bar appearance. Global rather than per-segment: a statusline reads
|
|
84
|
-
* as one design, and the reference layout uses a single bar style throughout.
|
|
85
|
-
*/
|
|
86
|
-
export interface StatuslineBar {
|
|
87
|
-
/** Number of cells, clamped to 1-40. */
|
|
88
|
-
cells: number;
|
|
89
|
-
/** Filled-cell glyph. */
|
|
90
|
-
fill: string;
|
|
91
|
-
/** Empty-cell glyph. */
|
|
92
|
-
empty: string;
|
|
93
|
-
}
|
|
94
|
-
export type StatuslineAlign = 'left' | 'center' | 'right';
|
|
95
|
-
/** `global` = follow the global default template; `custom` = project-local. */
|
|
96
|
-
export type StatuslineSource = 'global' | 'custom';
|
|
97
|
-
/**
|
|
98
|
-
* Powerline glyph configuration. All glyph fields are optional Nerd-Font
|
|
99
|
-
* characters; `undefined` falls back to the classic triangle set and an empty
|
|
100
|
-
* string disables that glyph (caps only — the join separator is never empty).
|
|
101
|
-
*/
|
|
102
|
-
export interface StatuslinePowerline {
|
|
103
|
-
enabled: boolean;
|
|
104
|
-
/** Block-join separator between adjacent blocks (default `` U+E0B0). */
|
|
105
|
-
separator?: string;
|
|
106
|
-
/** Row-start cap, painted in the first block's bg on a transparent
|
|
107
|
-
* background (default `` U+E0B2). Empty string disables. */
|
|
108
|
-
startCap?: string;
|
|
109
|
-
/** Row-end cap, painted in the last block's bg (default `` U+E0B0).
|
|
110
|
-
* Empty string disables. */
|
|
111
|
-
endCap?: string;
|
|
112
|
-
}
|
|
113
|
-
/** Classic triangle glyph set, used when the config leaves a field unset. */
|
|
114
|
-
export declare const POWERLINE_DEFAULT_GLYPHS: {
|
|
115
|
-
readonly separator: "";
|
|
116
|
-
readonly startCap: "";
|
|
117
|
-
readonly endCap: "";
|
|
118
|
-
};
|
|
119
|
-
export interface StatuslineConfig {
|
|
120
|
-
/** Rendered between segments when powerline blocks are off; powerline
|
|
121
|
-
* mode ignores it (the join glyph takes over). Default a single space. */
|
|
122
|
-
separator: string;
|
|
123
|
-
/** Alignment of each rendered row: left, centre or right. */
|
|
124
|
-
align: StatuslineAlign;
|
|
125
|
-
/**
|
|
126
|
-
* Text of the row-0 logo mark, rendered as `<logoText> v<version>`.
|
|
127
|
-
* weave's badge: the value is pinned to the shipped mark (only `logoColor`
|
|
128
|
-
* is user-configurable) and the panel offers no editor for it.
|
|
129
|
-
*/
|
|
130
|
-
logoText: string;
|
|
131
|
-
/** Colour of the logo mark. */
|
|
132
|
-
logoColor: StatuslineColor;
|
|
133
|
-
/** ccstatusline-style solid background blocks. */
|
|
134
|
-
powerline: StatuslinePowerline;
|
|
135
|
-
/**
|
|
136
|
-
* Ordered lines; each line is the left-to-right segment order of that row.
|
|
137
|
-
* The panel adds/removes lines and reorders segments within/across them.
|
|
138
|
-
* Rows are separated by a dim divider; the logo prefixes the first row.
|
|
139
|
-
*/
|
|
140
|
-
lines: SegmentKey[][];
|
|
141
|
-
/**
|
|
142
|
-
* How often Claude Code re-runs the statusline script (seconds, min 1).
|
|
143
|
-
* Event-driven updates (after each assistant response) happen regardless;
|
|
144
|
-
* this timer only bounds staleness during idle periods. Default 10s.
|
|
145
|
-
*/
|
|
146
|
-
refreshInterval: number;
|
|
147
|
-
/** Project config origin: follow the global template, or project-local. */
|
|
148
|
-
source: StatuslineSource;
|
|
149
|
-
/** Progress-bar appearance, shared by every segment that draws a bar. */
|
|
150
|
-
bar: StatuslineBar;
|
|
151
|
-
/** Rendered between rows; an empty string (the default) draws nothing. */
|
|
152
|
-
divider: string;
|
|
153
|
-
/** Rendered between a segment's `label` and its value. Default `': '`. */
|
|
154
|
-
labelSeparator: string;
|
|
155
|
-
segments: Record<SegmentKey, StatuslineSegment>;
|
|
156
|
-
}
|
|
157
|
-
/** Default order in which enabled segments render left-to-right. */
|
|
158
|
-
export declare const SEGMENT_ORDER: SegmentKey[];
|
|
159
|
-
/**
|
|
160
|
-
* Legacy two-row split (single header + metrics) used to migrate old configs
|
|
161
|
-
* that had `layout: 'multi'`.
|
|
162
|
-
*/
|
|
163
|
-
export declare const LEGACY_IDENTITY_LINE: SegmentKey[];
|
|
164
|
-
export declare const LEGACY_METRICS_LINE: SegmentKey[];
|
|
165
|
-
/**
|
|
166
|
-
* The shipped default: two powerline rows with text labels and a bracketed
|
|
167
|
-
* context bar.
|
|
168
|
-
*
|
|
169
|
-
* ```
|
|
170
|
-
* 🤖 Model: deepseek-flash[1M] 🧠 [░░░░░░░░░░░░] 39k/1.0M (4%) 🌿 main ✏️ (+1, -1)
|
|
171
|
-
* 🧩 Thinking: high 💸 Cost: $0.45 🔢 Total: 960.9k 📁 D:\…\weave-cli
|
|
172
|
-
* ```
|
|
173
|
-
*
|
|
174
|
-
* Needs a Nerd Font for the powerline joins; `PLAIN_STATUSLINE_CONFIG` is the
|
|
175
|
-
* same layout without them.
|
|
176
|
-
*/
|
|
177
|
-
export declare const DEFAULT_STATUSLINE_CONFIG: StatuslineConfig;
|
|
178
|
-
/**
|
|
179
|
-
* The same layout with powerline blocks turned off, for terminals without a
|
|
180
|
-
* Nerd Font — segments fall back to the plain separator and no private-use
|
|
181
|
-
* glyphs are emitted.
|
|
182
|
-
*/
|
|
183
|
-
export declare const PLAIN_STATUSLINE_CONFIG: StatuslineConfig;
|
|
184
|
-
/**
|
|
185
|
-
* Tokens each segment exposes to `StatuslineSegment.format`. Exported so the
|
|
186
|
-
* web panel and the CLI preview can offer the same vocabulary the generator
|
|
187
|
-
* understands — keep in lockstep with `segmentTokens` in `generator.ts`.
|
|
188
|
-
*/
|
|
189
|
-
export declare const SEGMENT_TOKENS: Record<SegmentKey, readonly string[]>;
|
|
190
|
-
/**
|
|
191
|
-
* Built-in value formatting per segment, used when `format` is unset. Each one
|
|
192
|
-
* reproduces the rendering the generator hard-coded before `format` existed, so
|
|
193
|
-
* an untouched config produces byte-identical output.
|
|
194
|
-
*
|
|
195
|
-
* `context` is special-cased in the generator: its legacy output depended on
|
|
196
|
-
* `style`, so `DEFAULT_CONTEXT_FORMAT` below covers all three modes instead.
|
|
197
|
-
*/
|
|
198
|
-
export declare const SEGMENT_DEFAULT_FORMAT: Record<SegmentKey, string>;
|
|
199
|
-
/** Legacy `context.style` → template, preserving each mode's old rendering. */
|
|
200
|
-
export declare const CONTEXT_STYLE_FORMAT: Record<'percent' | 'bar' | 'both', string>;
|
|
5
|
+
export { CONTEXT_STYLE_FORMAT, DEFAULT_STATUSLINE_CONFIG, LEGACY_IDENTITY_LINE, LEGACY_METRICS_LINE, NAMED_COLORS, PLAIN_STATUSLINE_CONFIG, POWERLINE_DEFAULT_GLYPHS, SEGMENT_DEFAULT_FORMAT, SEGMENT_ORDER, SEGMENT_TOKENS, } from '@weavecode/harness';
|
|
6
|
+
export type { SegmentKey, StatuslineAlign, StatuslineBar, StatuslineColor, StatuslineConfig, StatuslineNamedColor, StatuslinePowerline, StatuslineSegment, StatuslineSource, } from '@weavecode/harness';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{CONTEXT_STYLE_FORMAT,DEFAULT_STATUSLINE_CONFIG,LEGACY_IDENTITY_LINE,LEGACY_METRICS_LINE,NAMED_COLORS,PLAIN_STATUSLINE_CONFIG,POWERLINE_DEFAULT_GLYPHS,SEGMENT_DEFAULT_FORMAT,SEGMENT_ORDER,SEGMENT_TOKENS}from"@weavecode/harness";
|
|
@@ -8,6 +8,11 @@ import type { StatuslineConfig } from './config.js';
|
|
|
8
8
|
* `StatuslineCacheSweeper` 回收。
|
|
9
9
|
*/
|
|
10
10
|
export declare function statuslineCacheDir(): string;
|
|
11
|
+
/**
|
|
12
|
+
* 生成 `helpers/statusline.cjs` 源码——脚本本体归 claude 的 statusline 表示法,
|
|
13
|
+
* 实现在 `weave-harness/src/claude/statusline/`;这里的两个落点参数是 server
|
|
14
|
+
* 的事实(dataDir 布局与包版本),由调用侧取。
|
|
15
|
+
*/
|
|
11
16
|
export declare function generateStatuslineScript(config: StatuslineConfig, opts?: {
|
|
12
17
|
cacheDir?: string;
|
|
13
18
|
}): string;
|