@askdkc/dsh-cli 0.12.3 → 0.13.1
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/cordis.patch.yml +12 -131
- package/lib/types/adapter/channel/session-projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/session-projection.js +0 -7
- package/lib/types/adapter/ports/channel-view.d.ts +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.d.ts +3 -8
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.js +5 -20
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +2 -9
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/external-commands.js +9 -33
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +6 -2
- package/lib/types/dsh-adapter/channel/model-actions.js +3 -3
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +0 -1
- package/lib/types/dsh-adapter/channel/permissions.d.ts +1 -6
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/permissions.js +2 -54
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +15 -70
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +2 -5
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +1 -4
- package/lib/types/dsh-adapter/channel/session-resume.js +2 -2
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +0 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +1 -2
- package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree.js +9 -62
- package/lib/types/dsh-adapter/channel/skill-catalog.js +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +2 -8
- package/lib/types/dsh-adapter/channel/transcript.d.ts +0 -16
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +0 -43
- package/lib/types/dsh-adapter/channel.js +2 -2
- package/lib/types/dsh-adapter/compat/index.d.ts +5 -25
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +5 -25
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +12 -23
- package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/liveSession.js +15 -68
- package/lib/types/dsh-adapter/compat/messages.d.ts +1 -3
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/messages.js +2 -10
- package/lib/types/dsh-adapter/compat/persistence.d.ts +2 -3
- package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/persistence.js +9 -14
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +10 -144
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +45 -275
- package/lib/types/dsh-adapter/compat/settings.d.ts +4 -10
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/settings.js +6 -23
- package/lib/types/dsh-adapter/compat/shell.d.ts +2 -3
- package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/shell.js +2 -7
- package/lib/types/dsh-adapter/contract.d.ts +4 -34
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +8 -83
- package/lib/types/dsh-adapter/packaged-presets.d.ts +0 -19
- package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/packaged-presets.js +1 -83
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +26 -183
- package/lib/types/dsh-adapter/preset-resolution.d.ts +1 -22
- package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -1
- package/lib/types/dsh-adapter/preset-resolution.js +0 -34
- package/lib/types/dsh-adapter/presets.d.ts +1 -4
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +3 -6
- package/lib/types/dsh-adapter/questions-answerer.d.ts +5 -43
- package/lib/types/dsh-adapter/questions-answerer.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions-answerer.js +7 -63
- package/lib/types/dsh-adapter/sessionTree.d.ts +0 -19
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessionTree.js +2 -112
- package/lib/types/dsh-adapter/sessions/header.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/header.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/header.js +2 -8
- package/lib/types/dsh-adapter/sessions/list.d.ts +7 -28
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +48 -103
- package/lib/types/dsh-adapter/sessions/store.d.ts +1 -2
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +7 -10
- package/lib/types/dsh-adapter/sharp.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sharp.js +0 -1
- package/lib/types/dsh-adapter/subagents.d.ts +1 -2
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +1 -12
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +1 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.js +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +5 -22
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +5 -23
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +5 -21
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +4 -38
- package/lib/types/dsh-adapter/trajectory/types.d.ts +1 -1
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/i18n.d.ts +2 -22
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +2 -10
- package/lib/types/presetPrefs.d.ts +1 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +2 -4
- package/lib/types/sessionHistory.d.ts +2 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +8 -0
- package/node_modules/@askdkc/dsh-auth/README.ja.md +28 -9
- package/node_modules/@askdkc/dsh-auth/README.md +19 -8
- package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +3 -3
- package/node_modules/@askdkc/dsh-auth/lib/THIRD_PARTY_NOTICES.txt +168 -0
- package/node_modules/@askdkc/dsh-auth/lib/abortable.d.ts +2 -0
- package/node_modules/@askdkc/dsh-auth/lib/abortable.js +9 -0
- package/node_modules/@askdkc/dsh-auth/lib/auth-contract.d.ts +66 -0
- package/node_modules/@askdkc/dsh-auth/lib/auth-contract.js +1 -0
- package/node_modules/@askdkc/dsh-auth/lib/command.js +15 -1
- package/node_modules/@askdkc/dsh-auth/lib/credentials.d.ts +8 -14
- package/node_modules/@askdkc/dsh-auth/lib/credentials.js +1 -1
- package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +8 -28
- package/node_modules/@askdkc/dsh-auth/lib/index.js +67 -65
- package/node_modules/@askdkc/dsh-auth/lib/interaction.d.ts +5 -5
- package/node_modules/@askdkc/dsh-auth/lib/opencode-adapter.d.ts +37 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-adapter.js +206 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-catalog.d.ts +72 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-catalog.js +252 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-codec.d.ts +6 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-codec.js +93 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-owned.generated.d.ts +113 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-owned.generated.js +2866 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-replay.d.ts +15 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-replay.js +141 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.d.ts +5 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.js +43465 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.js.map +7 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-transport.d.ts +5 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-transport.js +69 -0
- package/node_modules/@askdkc/dsh-auth/lib/pi-routes.d.ts +32 -0
- package/node_modules/@askdkc/dsh-auth/lib/pi-routes.js +45 -0
- package/node_modules/@askdkc/dsh-auth/lib/profiles.d.ts +2 -20
- package/node_modules/@askdkc/dsh-auth/lib/profiles.js +6 -41
- package/node_modules/@askdkc/dsh-auth/lib/routes.d.ts +20 -0
- package/node_modules/@askdkc/dsh-auth/lib/routes.js +13 -0
- package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +11 -2
- package/node_modules/@askdkc/dsh-auth/lib/service.js +26 -16
- package/node_modules/@askdkc/dsh-auth/package.json +26 -15
- package/package.json +100 -96
- package/lib/types/dsh-adapter/providerGuard.d.ts +0 -75
- package/lib/types/dsh-adapter/providerGuard.d.ts.map +0 -1
- package/lib/types/dsh-adapter/providerGuard.js +0 -104
- package/lib/types/migrationPrefs.d.ts +0 -60
- package/lib/types/migrationPrefs.d.ts.map +0 -1
- package/lib/types/migrationPrefs.js +0 -97
- package/node_modules/@askdkc/dsh-auth/lib/fresh-models.d.ts +0 -59
- package/node_modules/@askdkc/dsh-auth/lib/fresh-models.js +0 -246
- package/node_modules/@askdkc/dsh-auth/lib/opencode-snapshot.generated.d.ts +0 -321
- package/node_modules/@askdkc/dsh-auth/lib/opencode-snapshot.generated.js +0 -528
- package/presets/liangshen/.dsh-tui-managed.json +0 -5
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* a second copy from this package's optional dependency puts two libvips
|
|
7
7
|
* dylibs into one process; on macOS the Objective-C runtime reports the
|
|
8
8
|
* duplicate classes on stderr, and that text lands on the alternate screen
|
|
9
|
-
* (0.1.2-rc.1 ships sharp 0.35.4 while this package pins 0.35.3).
|
|
10
9
|
*
|
|
11
10
|
* Resolve `sharp` from the host tree first, fall back to our own optional
|
|
12
11
|
* copy, and cache the outcome so the process holds one instance. A missing
|
|
@@ -27,8 +27,7 @@ export declare class SubagentActivityStore {
|
|
|
27
27
|
appendOutput(agentId: string, text: string, kind?: SubagentOutputKind): void;
|
|
28
28
|
/** Mark the streaming tail line complete (run settlement). */
|
|
29
29
|
flushOutput(agentId: string): void;
|
|
30
|
-
/**
|
|
31
|
-
* session events (the durable settlement keeps flowing as session events). */
|
|
30
|
+
/** Current transient stream frames; settlement arrives as session events. */
|
|
32
31
|
onStreamFrame(agentId: string, frame: AssistantStreamFrame): void;
|
|
33
32
|
private restoreAttempt;
|
|
34
33
|
private settleAssistant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagents.d.ts","sourceRoot":"","sources":["../../../src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AC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAE5F,OAAO,CAAC,MAAM;IAuBd;;sEAEkE;IAClE,KAAK,IAAI,IAAI;IAOb,QAAQ,IAAI,aAAa,EAAE;IAC3B,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAC/C,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAC3C,OAAO,CAAC,MAAM;CACf"}
|
|
@@ -145,8 +145,7 @@ export class SubagentActivityStore {
|
|
|
145
145
|
this.notify();
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
/**
|
|
149
|
-
* session events (the durable settlement keeps flowing as session events). */
|
|
148
|
+
/** Current transient stream frames; settlement arrives as session events. */
|
|
150
149
|
onStreamFrame(agentId, frame) {
|
|
151
150
|
const state = this.states.get(agentId);
|
|
152
151
|
if (!state || (state.status !== 'running' && state.status !== 'starting'))
|
|
@@ -228,16 +227,6 @@ export class SubagentActivityStore {
|
|
|
228
227
|
const ev = event;
|
|
229
228
|
const data = ev.data ?? {};
|
|
230
229
|
switch (ev.type) {
|
|
231
|
-
case 'assistant/chunk': {
|
|
232
|
-
const chunk = data.chunk ?? {};
|
|
233
|
-
if (chunk.type === 'text-delta' && chunk.text)
|
|
234
|
-
this.appendOutput(agentId, chunk.text, 'text');
|
|
235
|
-
else if (chunk.type === 'reasoning-delta' && chunk.text)
|
|
236
|
-
this.appendOutput(agentId, chunk.text, 'thinking');
|
|
237
|
-
else if (chunk.type === 'usage' && chunk.usage)
|
|
238
|
-
this.setTokens(agentId, chunk.usage);
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
230
|
case 'assistant/message': {
|
|
242
231
|
if (Array.isArray(data.stream))
|
|
243
232
|
this.settleAssistant(agentId, data.message?.content, data.turn, data.step, ev.seq);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - **Own duration only.** A turn's cost is its own bracket, never the sum of
|
|
13
13
|
* its children — summing both would double-count every tool inside it.
|
|
14
14
|
* - **No fabricated spans.** A step that produced no stream output (no
|
|
15
|
-
*
|
|
15
|
+
* embedded settlement stream — the
|
|
16
16
|
* request failed, or the log predates chunk capture) contributes no TTFT and
|
|
17
17
|
* no decode sample rather than a zero that would drag the average down.
|
|
18
18
|
* - **Bursts expand.** A folded run is one ledger row but N calls; the counts
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - **Own duration only.** A turn's cost is its own bracket, never the sum of
|
|
13
13
|
* its children — summing both would double-count every tool inside it.
|
|
14
14
|
* - **No fabricated spans.** A step that produced no stream output (no
|
|
15
|
-
*
|
|
15
|
+
* embedded settlement stream — the
|
|
16
16
|
* request failed, or the log predates chunk capture) contributes no TTFT and
|
|
17
17
|
* no decode sample rather than a zero that would drag the average down.
|
|
18
18
|
* - **Bursts expand.** A folded run is one ledger row but N calls; the counts
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* `SessionEventMap` declares a dozen-odd core event types. Everything else in
|
|
7
7
|
* the `KNOWN_SESSION_EVENT_TYPES` vocabulary arrives through *module
|
|
8
8
|
* augmentation* from the plugin that owns it — `llm/retry` from the LLM
|
|
9
|
-
* layer, `hook/*` from the hook runner, `tool/
|
|
10
|
-
* `tool/ptc-dispatch*` (0.1.5) from the code/PTC runtime. Those declaration
|
|
9
|
+
* layer, `hook/*` from the hook runner, `tool/ptc-dispatch*` (0.1.5) from the code/PTC runtime. Those declaration
|
|
11
10
|
* packages are not all in this bundle's dependency
|
|
12
11
|
* graph, so `event.type === 'llm/retry'` does not even type-check here: the
|
|
13
12
|
* literal is not a member of the union TypeScript can see.
|
|
@@ -75,12 +74,10 @@ export declare function readRetry(data: unknown): RetryPayload | undefined;
|
|
|
75
74
|
/** The `retryId` of an `llm/retry-started`, used to close the retry bracket. */
|
|
76
75
|
export declare function readRetryStarted(data: unknown): string | undefined;
|
|
77
76
|
/**
|
|
78
|
-
* A `tool/
|
|
77
|
+
* A `tool/ptc-dispatch*` payload — the code runner's
|
|
79
78
|
* nested tool calls, and the only source of SUBTOOL rows.
|
|
80
79
|
*
|
|
81
|
-
* The dispatch bracket
|
|
82
|
-
* `tool/code-dispatch-start` ↔ `tool/code-dispatch`, 0.1.5 logs carry
|
|
83
|
-
* `tool/ptc-dispatch-start` ↔ `tool/ptc-dispatch`, paired by `subCallId` in
|
|
80
|
+
* The dispatch bracket is `tool/ptc-dispatch-start` ↔ `tool/ptc-dispatch`, paired by `subCallId` in
|
|
84
81
|
* both generations; `rootCallId`/`parentCallId` give the enclosing
|
|
85
82
|
* model-issued call. The payload shape is identical across the rename, so
|
|
86
83
|
* this one guard serves both. `subCallId` is treated as an OPAQUE pairing
|
|
@@ -99,23 +96,9 @@ export interface DispatchPayload {
|
|
|
99
96
|
readonly args?: string;
|
|
100
97
|
readonly isError?: boolean;
|
|
101
98
|
}
|
|
102
|
-
/** Narrow a `tool/
|
|
99
|
+
/** Narrow a `tool/ptc-dispatch*` payload. */
|
|
103
100
|
export declare function readDispatch(data: unknown): DispatchPayload | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* Expand the compact `stream` of a V3 `assistant/message` / `assistant/attempt`
|
|
106
|
-
* into timed chunks, or `undefined` when the event carries no usable stream.
|
|
107
|
-
*
|
|
108
|
-
* V3 logs replace per-token `assistant/chunk` events with one compact
|
|
109
|
-
* `AssistantStreamRecord[]` embedded in the settlement event. Upstream's
|
|
110
|
-
* `expandAssistantStream` is the validating read path for that record list —
|
|
111
|
-
* and it landed with the record type itself (0.1.5), so the binding is
|
|
112
|
-
* feature-detected through the namespace rather than named-imported: a
|
|
113
|
-
* pre-0.1.5 host lacks the export, and a named import would fail the whole
|
|
114
|
-
* module at link time instead of degrading this one read. The same
|
|
115
|
-
* never-throw contract as every guard here applies on both axes: a missing
|
|
116
|
-
* expander or a malformed record (the expander throws `TypeError`) yields
|
|
117
|
-
* `undefined`, and the fold simply contributes no stream timing.
|
|
118
|
-
*/
|
|
101
|
+
/** Expand a settlement's compact stream. Malformed records contribute no timing. */
|
|
119
102
|
export declare function readAssistantStream(data: unknown): readonly TimedStreamChunk[] | undefined;
|
|
120
103
|
/**
|
|
121
104
|
* A `request/header` payload, reduced to the route facts the trajectory
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/guards.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAyB,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AACvE,YAAY,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAEvE;;;;GAIG;AAGH;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,YAAY,EAAE,CAEpF;AAmBD;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,gFAAgF;AAChF,wBAAgB,SAAS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G,SAAS,CAKzF;AAED,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,CAO/D;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAatG"}
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* `SessionEventMap` declares a dozen-odd core event types. Everything else in
|
|
7
7
|
* the `KNOWN_SESSION_EVENT_TYPES` vocabulary arrives through *module
|
|
8
8
|
* augmentation* from the plugin that owns it — `llm/retry` from the LLM
|
|
9
|
-
* layer, `hook/*` from the hook runner, `tool/
|
|
10
|
-
* `tool/ptc-dispatch*` (0.1.5) from the code/PTC runtime. Those declaration
|
|
9
|
+
* layer, `hook/*` from the hook runner, `tool/ptc-dispatch*` (0.1.5) from the code/PTC runtime. Those declaration
|
|
11
10
|
* packages are not all in this bundle's dependency
|
|
12
11
|
* graph, so `event.type === 'llm/retry'` does not even type-check here: the
|
|
13
12
|
* literal is not a member of the union TypeScript can see.
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
* shape. Where a field was absent from every observed sample it is optional
|
|
28
27
|
* here, so a future harness that starts emitting it is picked up for free.
|
|
29
28
|
*/
|
|
30
|
-
import
|
|
29
|
+
import { expandAssistantStream } from '@deepseek-ai/dsh-llm';
|
|
31
30
|
/**
|
|
32
31
|
* A session event reduced to the envelope the projection relies on. Only
|
|
33
32
|
* `type`, `seq` and `time` are contractual across every event; `data` is
|
|
@@ -89,7 +88,7 @@ export function readRetry(data) {
|
|
|
89
88
|
export function readRetryStarted(data) {
|
|
90
89
|
return isRecord(data) ? str(data, 'retryId') : undefined;
|
|
91
90
|
}
|
|
92
|
-
/** Narrow a `tool/
|
|
91
|
+
/** Narrow a `tool/ptc-dispatch*` payload. */
|
|
93
92
|
export function readDispatch(data) {
|
|
94
93
|
if (!isRecord(data))
|
|
95
94
|
return undefined;
|
|
@@ -122,32 +121,15 @@ export function readDispatch(data) {
|
|
|
122
121
|
isError: typeof isError === 'boolean' ? isError : undefined,
|
|
123
122
|
};
|
|
124
123
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Expand the compact `stream` of a V3 `assistant/message` / `assistant/attempt`
|
|
127
|
-
* into timed chunks, or `undefined` when the event carries no usable stream.
|
|
128
|
-
*
|
|
129
|
-
* V3 logs replace per-token `assistant/chunk` events with one compact
|
|
130
|
-
* `AssistantStreamRecord[]` embedded in the settlement event. Upstream's
|
|
131
|
-
* `expandAssistantStream` is the validating read path for that record list —
|
|
132
|
-
* and it landed with the record type itself (0.1.5), so the binding is
|
|
133
|
-
* feature-detected through the namespace rather than named-imported: a
|
|
134
|
-
* pre-0.1.5 host lacks the export, and a named import would fail the whole
|
|
135
|
-
* module at link time instead of degrading this one read. The same
|
|
136
|
-
* never-throw contract as every guard here applies on both axes: a missing
|
|
137
|
-
* expander or a malformed record (the expander throws `TypeError`) yields
|
|
138
|
-
* `undefined`, and the fold simply contributes no stream timing.
|
|
139
|
-
*/
|
|
124
|
+
/** Expand a settlement's compact stream. Malformed records contribute no timing. */
|
|
140
125
|
export function readAssistantStream(data) {
|
|
141
126
|
if (!isRecord(data))
|
|
142
127
|
return undefined;
|
|
143
128
|
const stream = data.stream;
|
|
144
129
|
if (!Array.isArray(stream) || stream.length === 0)
|
|
145
130
|
return undefined;
|
|
146
|
-
const expand = dshLlm.expandAssistantStream;
|
|
147
|
-
if (typeof expand !== 'function')
|
|
148
|
-
return undefined;
|
|
149
131
|
try {
|
|
150
|
-
return
|
|
132
|
+
return expandAssistantStream(stream);
|
|
151
133
|
}
|
|
152
134
|
catch {
|
|
153
135
|
return undefined;
|
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
* `step/start` ↔ `step/end`, `llm/retry` ↔ `llm/retry-started`,
|
|
12
12
|
* `approval/asked` ↔ `approval/decided`, `compaction/start` ↔
|
|
13
13
|
* `compaction/end`, and the code runner's dispatch bracket —
|
|
14
|
-
* `tool/
|
|
15
|
-
* `tool/ptc-dispatch-start` ↔ `tool/ptc-dispatch` in 0.1.5 with an identical
|
|
16
|
-
* payload, so both names feed the same fold) so a
|
|
14
|
+
* `tool/ptc-dispatch-start` ↔ `tool/ptc-dispatch`) so a
|
|
17
15
|
* row can show its own wall-clock duration and outcome.
|
|
18
16
|
*
|
|
19
17
|
* ## Incrementality
|
|
@@ -35,21 +33,8 @@
|
|
|
35
33
|
* {@link previewText}). Full content is not held at all — `seq`/`endSeq`
|
|
36
34
|
* address the owning events for the inspector to re-read on demand.
|
|
37
35
|
*
|
|
38
|
-
* Stream timing
|
|
39
|
-
*
|
|
40
|
-
* `tool-call-chunks`) — a durable *encoding*, not an event vocabulary: the
|
|
41
|
-
* persistence reader expands those rows back into `assistant/chunk` events
|
|
42
|
-
* before they reach the logical Session log, and this fold reads their
|
|
43
|
-
* timestamps directly. 0.1.5 retires per-token events entirely: the compact
|
|
44
|
-
* `AssistantStreamRecord[]` travels embedded in the settling
|
|
45
|
-
* `assistant/message` (or in `assistant/attempt` for a failed/retried/
|
|
46
|
-
* cancelled attempt that committed no surface message), and the fold expands
|
|
47
|
-
* it through {@link readAssistantStream} into the same first/last-chunk
|
|
48
|
-
* timing slots. An attempt adds no ledger row — its failure already has one
|
|
49
|
-
* (`llm/retry`), a cancellation shows on the turn bracket, and the payload
|
|
50
|
-
* carries no reason to display — but its decode time is real wall-clock cost
|
|
51
|
-
* the step paid, so it feeds the timing slots exactly like a committed
|
|
52
|
-
* message.
|
|
36
|
+
* Stream timing comes from AssistantStreamRecord[] embedded in current
|
|
37
|
+
* assistant/message and assistant/attempt settlement records.
|
|
53
38
|
*/
|
|
54
39
|
import { type RawTrajEvent } from './guards.js';
|
|
55
40
|
import { type TrajNode } from './types.js';
|
|
@@ -58,12 +43,11 @@ export interface StepTiming {
|
|
|
58
43
|
/** `step/start` time. */
|
|
59
44
|
readonly startTime: number;
|
|
60
45
|
/**
|
|
61
|
-
* First streamed model output —
|
|
62
|
-
* head of the expanded V3 stream embedded in `assistant/message` /
|
|
46
|
+
* First streamed model output — the head of the settlement stream embedded in `assistant/message` /
|
|
63
47
|
* `assistant/attempt`.
|
|
64
48
|
*/
|
|
65
49
|
firstChunk?: number;
|
|
66
|
-
/** Last streamed model output, from the
|
|
50
|
+
/** Last streamed model output, from the settlement stream. */
|
|
67
51
|
lastChunk?: number;
|
|
68
52
|
/** `step/end` time, when the step closed. */
|
|
69
53
|
endTime?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/projection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAgBL,KAAK,YAAY,EAClB,MAAM,aAAa,CAAA;AACpB,OAAO,EAA4B,KAAK,QAAQ,EAAmB,MAAM,YAAY,CAAA;AAGrF,6EAA6E;AAC7E,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,W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AAA;IAChB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAA;IAChB,iEAAiE;IACjE,UAAU,EAAE,QAAQ,EAAE,CAAA;CACvB;AAymBD,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,SAAS,CAG3C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,GAAG,IAAI,EAC1B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,SAAS,CAwBX;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAE1E"}
|
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
* `step/start` ↔ `step/end`, `llm/retry` ↔ `llm/retry-started`,
|
|
12
12
|
* `approval/asked` ↔ `approval/decided`, `compaction/start` ↔
|
|
13
13
|
* `compaction/end`, and the code runner's dispatch bracket —
|
|
14
|
-
* `tool/
|
|
15
|
-
* `tool/ptc-dispatch-start` ↔ `tool/ptc-dispatch` in 0.1.5 with an identical
|
|
16
|
-
* payload, so both names feed the same fold) so a
|
|
14
|
+
* `tool/ptc-dispatch-start` ↔ `tool/ptc-dispatch`) so a
|
|
17
15
|
* row can show its own wall-clock duration and outcome.
|
|
18
16
|
*
|
|
19
17
|
* ## Incrementality
|
|
@@ -35,21 +33,8 @@
|
|
|
35
33
|
* {@link previewText}). Full content is not held at all — `seq`/`endSeq`
|
|
36
34
|
* address the owning events for the inspector to re-read on demand.
|
|
37
35
|
*
|
|
38
|
-
* Stream timing
|
|
39
|
-
*
|
|
40
|
-
* `tool-call-chunks`) — a durable *encoding*, not an event vocabulary: the
|
|
41
|
-
* persistence reader expands those rows back into `assistant/chunk` events
|
|
42
|
-
* before they reach the logical Session log, and this fold reads their
|
|
43
|
-
* timestamps directly. 0.1.5 retires per-token events entirely: the compact
|
|
44
|
-
* `AssistantStreamRecord[]` travels embedded in the settling
|
|
45
|
-
* `assistant/message` (or in `assistant/attempt` for a failed/retried/
|
|
46
|
-
* cancelled attempt that committed no surface message), and the fold expands
|
|
47
|
-
* it through {@link readAssistantStream} into the same first/last-chunk
|
|
48
|
-
* timing slots. An attempt adds no ledger row — its failure already has one
|
|
49
|
-
* (`llm/retry`), a cancellation shows on the turn bracket, and the payload
|
|
50
|
-
* carries no reason to display — but its decode time is real wall-clock cost
|
|
51
|
-
* the step paid, so it feeds the timing slots exactly like a committed
|
|
52
|
-
* message.
|
|
36
|
+
* Stream timing comes from AssistantStreamRecord[] embedded in current
|
|
37
|
+
* assistant/message and assistant/attempt settlement records.
|
|
53
38
|
*/
|
|
54
39
|
import { asRawEvents, isApprovalDenied, readApprovalAsked, readApprovalDecided, readAssistantStream, readCommandRun, readCompaction, readDispatch, readHook, readModeValue, readRequestHeader, readRetry, readRetryStarted, readSubagent, readTodos, } from './guards.js';
|
|
55
40
|
import { BURST_MIN } from './types.js';
|
|
@@ -150,7 +135,7 @@ function readTokens(usage) {
|
|
|
150
135
|
*
|
|
151
136
|
* Shared by `assistant/message` and `assistant/attempt`: both carry the exact
|
|
152
137
|
* timed stream their step produced, and both fold into the same
|
|
153
|
-
* first/last-chunk slots
|
|
138
|
+
* first/last-chunk timing slots.
|
|
154
139
|
* First-wins on `firstChunk` keeps TTFT anchored to the step's first
|
|
155
140
|
* observable output even when a retried attempt streamed before the committed
|
|
156
141
|
* one; `lastChunk` tracks the latest stream record, so an abandoned attempt's
|
|
@@ -289,21 +274,6 @@ function consume(state, nodes, timing, event) {
|
|
|
289
274
|
state.step = undefined;
|
|
290
275
|
return;
|
|
291
276
|
}
|
|
292
|
-
case 'assistant/chunk': {
|
|
293
|
-
// Pre-0.1.5 per-token events (expanded from storage packing by the
|
|
294
|
-
// persistence reader). Chunks never become rows; they contribute only
|
|
295
|
-
// the two timestamps that separate time-to-first-token from decode
|
|
296
|
-
// throughput. 0.1.5 logs carry no such event — their stream timing
|
|
297
|
-
// arrives embedded in `assistant/message` / `assistant/attempt`.
|
|
298
|
-
const turn = typeof data?.turn === 'number' ? data.turn : state.turn;
|
|
299
|
-
const step = typeof data?.step === 'number' ? data.step : (state.step ?? 0);
|
|
300
|
-
const slot = timing.get(`${turn}:${step}`);
|
|
301
|
-
if (slot === undefined)
|
|
302
|
-
return;
|
|
303
|
-
slot.firstChunk ??= event.time;
|
|
304
|
-
slot.lastChunk = event.time;
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
277
|
case 'user/message': {
|
|
308
278
|
const source = data?.source;
|
|
309
279
|
const sourceKind = typeof source === 'object' && source !== null
|
|
@@ -421,9 +391,6 @@ function consume(state, nodes, timing, event) {
|
|
|
421
391
|
state.tools.delete(callId);
|
|
422
392
|
return;
|
|
423
393
|
}
|
|
424
|
-
// The dispatch bracket kept its payload shape across its 0.1.5 rename,
|
|
425
|
-
// so both spellings pair through the same subtool bookkeeping.
|
|
426
|
-
case 'tool/code-dispatch-start':
|
|
427
394
|
case 'tool/ptc-dispatch-start': {
|
|
428
395
|
const payload = readDispatch(event.data);
|
|
429
396
|
if (payload === undefined)
|
|
@@ -443,7 +410,6 @@ function consume(state, nodes, timing, event) {
|
|
|
443
410
|
push(state, nodes, node);
|
|
444
411
|
return;
|
|
445
412
|
}
|
|
446
|
-
case 'tool/code-dispatch':
|
|
447
413
|
case 'tool/ptc-dispatch': {
|
|
448
414
|
const payload = readDispatch(event.data);
|
|
449
415
|
if (payload === undefined)
|
|
@@ -85,7 +85,7 @@ export interface TrajNode {
|
|
|
85
85
|
tokens?: TrajTokens;
|
|
86
86
|
/** Tool-call identity, used for `tool/call` ↔ `tool/result` pairing. */
|
|
87
87
|
readonly callId?: string;
|
|
88
|
-
/** Code-runner sub-call identity (`tool/
|
|
88
|
+
/** Code-runner sub-call identity (`tool/ptc-dispatch*`). */
|
|
89
89
|
readonly subCallId?: string;
|
|
90
90
|
/** Failure identity when `status === 'error'` (e.g. `RATE_LIMIT`). */
|
|
91
91
|
errorCode?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,iDAAiD;AACjD,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,MAAM,GACN,MAAM,GACN,WAAW,GACX,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,SAAS,GACT,MAAM,CAAA;AAEV,8EAA8E;AAC9E,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAA;AAEnD,+EAA+E;AAC/E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,SAAS,QAAQ,EAAE,CAAA;CACtC;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAIxD;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAIpD;AAED,oDAAoD;AACpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAEtD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,GA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ACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,kCAAkC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,4BAA4B;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAC5B;AAED,gDAAgD;AAChD,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEzD,qCAAqC;AACrC,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAAoC,CAAA;AAEpF;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAa9D"}
|
package/lib/types/i18n.d.ts
CHANGED
|
@@ -219,11 +219,11 @@ declare const dict: {
|
|
|
219
219
|
readonly zh: "仅提供持久 bash 与 str_replace_editor 的双工具编码 Agent。";
|
|
220
220
|
readonly en: "A two-tool coding agent exposing only persistent bash and str_replace_editor.";
|
|
221
221
|
};
|
|
222
|
-
readonly 'preset-name-
|
|
222
|
+
readonly 'preset-name-ptc': {
|
|
223
223
|
readonly zh: "PTC 模式";
|
|
224
224
|
readonly en: "PTC";
|
|
225
225
|
};
|
|
226
|
-
readonly 'preset-desc-
|
|
226
|
+
readonly 'preset-desc-ptc': {
|
|
227
227
|
readonly zh: "具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。";
|
|
228
228
|
readonly en: "Everything standard mode offers, with tools exposed through the Code Mode SDK so the model composes multi-step operations in one TypeScript program.";
|
|
229
229
|
};
|
|
@@ -2004,10 +2004,6 @@ declare const dict: {
|
|
|
2004
2004
|
readonly zh: "/{{name}} 不接受图片;草稿已保留";
|
|
2005
2005
|
readonly en: "/{{name}} does not accept images; the draft was preserved";
|
|
2006
2006
|
};
|
|
2007
|
-
readonly 'command-images-runtime-unsupported': {
|
|
2008
|
-
readonly zh: "/{{name}}:当前命令运行时不支持图片;草稿已保留";
|
|
2009
|
-
readonly en: "/{{name}}: this command runtime cannot accept images; the draft was preserved";
|
|
2010
|
-
};
|
|
2011
2007
|
readonly 'command-images-limit': {
|
|
2012
2008
|
readonly zh: "/{{name}}:图片数量或总大小超过当前 profile 限制;草稿已保留";
|
|
2013
2009
|
readonly en: "/{{name}}: the image batch exceeds this profile's limits; the draft was preserved";
|
|
@@ -2476,10 +2472,6 @@ declare const dict: {
|
|
|
2476
2472
|
readonly zh: "图片预览设置已保存,使用 /restart 重启 TUI 后生效";
|
|
2477
2473
|
readonly en: "Image preview preference saved — use /restart to apply";
|
|
2478
2474
|
};
|
|
2479
|
-
readonly 'settings-fullscreen-migrated': {
|
|
2480
|
-
readonly zh: "全屏已是出厂默认(已清除更新前的 inline 选择);偏好 inline 可在 /settings 改回";
|
|
2481
|
-
readonly en: "Fullscreen is now the factory default (pre-update inline choice cleared); prefer inline? Switch back in /settings";
|
|
2482
|
-
};
|
|
2483
2475
|
readonly 'help-for-commands': {
|
|
2484
2476
|
readonly zh: "/ 查看命令";
|
|
2485
2477
|
readonly en: "/ for commands";
|
|
@@ -3295,18 +3287,6 @@ declare const dict: {
|
|
|
3295
3287
|
readonly zh: "工具 · {{n}}";
|
|
3296
3288
|
readonly en: "Tools · {{n}}";
|
|
3297
3289
|
};
|
|
3298
|
-
readonly 'question-provider-occupied': {
|
|
3299
|
-
readonly zh: "⚠️ 问卷通道已被非宿主组件 {{id}} 占用,模型提问可能被代答(本界面未接入问卷)";
|
|
3300
|
-
readonly en: "⚠️ The questionnaire channel is held by a non-host component ({{id}}); model questions may be answered by it (this UI did not take the seat)";
|
|
3301
|
-
};
|
|
3302
|
-
readonly 'question-provider-occupied-unverified': {
|
|
3303
|
-
readonly zh: "⚠️ 问卷通道被一个自报为 {{id}} 的组件占用——身份未经宿主验证,模型提问可能被代答(本界面未接入问卷)";
|
|
3304
|
-
readonly en: "⚠️ The questionnaire channel is held by a component self-reporting as {{id}} — identity not host-verified; model questions may be answered by it (this UI did not take the seat)";
|
|
3305
|
-
};
|
|
3306
|
-
readonly 'question-provider-occupied-unknown': {
|
|
3307
|
-
readonly zh: "身份未知";
|
|
3308
|
-
readonly en: "identity unknown";
|
|
3309
|
-
};
|
|
3310
3290
|
readonly 'question-select-or-answer': {
|
|
3311
3291
|
readonly zh: "至少选择一个选项,或在最后一行输入回答";
|
|
3312
3292
|
readonly en: "Select at least one option, or type an answer on the last line";
|
package/lib/types/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAMH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAI9B,+DAA+D;AAC/D,eAAO,MAAM,KAAK,uBAAwB,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9D,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAMH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAI9B,+DAA+D;AAC/D,eAAO,MAAM,KAAK,uBAAwB,CAAA;AAE1C;;;;;GAKG;AACH,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I,GAAG,IAAI,GAAG,IAAI,CAAA;AAEjD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAC1B,GAAG,EAAE,MAAM,OAAO,YAAY,EAC9B,MAAM,GAAE,UAAe,GACtB,MAAM,CAER;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpF;AAED,4EAA4E;AAC5E,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAQ,CAAA;AAI1G;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAS5D;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAkB,GAAG,IAAI,GAAG,SAAS,CAMtE;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAU1E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAWvC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC"}
|
package/lib/types/i18n.js
CHANGED
|
@@ -108,8 +108,8 @@ const dict = {
|
|
|
108
108
|
'preset-desc-standard': { zh: '功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。', en: 'Full-featured coding agent: file editing, shell, file & web search, skills, plans, goals, subagents and workflows.' },
|
|
109
109
|
'preset-name-minimal': { zh: '极简模式', en: 'Minimal' },
|
|
110
110
|
'preset-desc-minimal': { zh: '仅提供持久 bash 与 str_replace_editor 的双工具编码 Agent。', en: 'A two-tool coding agent exposing only persistent bash and str_replace_editor.' },
|
|
111
|
-
'preset-name-
|
|
112
|
-
'preset-desc-
|
|
111
|
+
'preset-name-ptc': { zh: 'PTC 模式', en: 'PTC' },
|
|
112
|
+
'preset-desc-ptc': { zh: '具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。', en: 'Everything standard mode offers, with tools exposed through the Code Mode SDK so the model composes multi-step operations in one TypeScript program.' },
|
|
113
113
|
'preset-name-cordis': { zh: '创造模式', en: 'Creation' },
|
|
114
114
|
'preset-desc-cordis': { zh: '用于创建自定义 Agent preset:具备标准模式的全部能力,并提供运行时检查、插件实验和 preset 创作指导。', en: 'For authoring custom agent presets: everything standard mode offers plus runtime inspection, plugin experiments and preset-authoring guidance.' },
|
|
115
115
|
'preset-name-liangshen': { zh: '梁神模式', en: 'Liangshen mode' },
|
|
@@ -591,10 +591,6 @@ const dict = {
|
|
|
591
591
|
zh: '/{{name}} 不接受图片;草稿已保留',
|
|
592
592
|
en: '/{{name}} does not accept images; the draft was preserved',
|
|
593
593
|
},
|
|
594
|
-
'command-images-runtime-unsupported': {
|
|
595
|
-
zh: '/{{name}}:当前命令运行时不支持图片;草稿已保留',
|
|
596
|
-
en: '/{{name}}: this command runtime cannot accept images; the draft was preserved',
|
|
597
|
-
},
|
|
598
594
|
'command-images-limit': {
|
|
599
595
|
zh: '/{{name}}:图片数量或总大小超过当前 profile 限制;草稿已保留',
|
|
600
596
|
en: '/{{name}}: the image batch exceeds this profile\'s limits; the draft was preserved',
|
|
@@ -778,7 +774,6 @@ const dict = {
|
|
|
778
774
|
// ── dsh-adapter/plugin.ts(/settings 渲染设置)───────────────────────
|
|
779
775
|
'settings-fullscreen-restart': { zh: '全屏设置已保存,重启 dsh-tui 后生效', en: 'Fullscreen preference saved — restart dsh-tui to apply' },
|
|
780
776
|
'settings-terminal-images-restart': { zh: '图片预览设置已保存,使用 /restart 重启 TUI 后生效', en: 'Image preview preference saved — use /restart to apply' },
|
|
781
|
-
'settings-fullscreen-migrated': { zh: '全屏已是出厂默认(已清除更新前的 inline 选择);偏好 inline 可在 /settings 改回', en: 'Fullscreen is now the factory default (pre-update inline choice cleared); prefer inline? Switch back in /settings' },
|
|
782
777
|
// ── components/HelpMenu.tsx ─────────────────────────────────────────
|
|
783
778
|
'help-for-commands': { zh: '/ 查看命令', en: '/ for commands' },
|
|
784
779
|
'help-this-help': { zh: '? 查看本帮助', en: '? for this help' },
|
|
@@ -1023,9 +1018,6 @@ const dict = {
|
|
|
1023
1018
|
'context-panel-skills': { zh: '技能 · {{n}}', en: 'Skills · {{n}}' },
|
|
1024
1019
|
'context-panel-tools': { zh: '工具 · {{n}}', en: 'Tools · {{n}}' },
|
|
1025
1020
|
// ── components/questions/AskUserQuestionPanel.tsx ───────────────────
|
|
1026
|
-
'question-provider-occupied': { zh: '⚠️ 问卷通道已被非宿主组件 {{id}} 占用,模型提问可能被代答(本界面未接入问卷)', en: '⚠️ The questionnaire channel is held by a non-host component ({{id}}); model questions may be answered by it (this UI did not take the seat)' },
|
|
1027
|
-
'question-provider-occupied-unverified': { zh: '⚠️ 问卷通道被一个自报为 {{id}} 的组件占用——身份未经宿主验证,模型提问可能被代答(本界面未接入问卷)', en: '⚠️ The questionnaire channel is held by a component self-reporting as {{id}} — identity not host-verified; model questions may be answered by it (this UI did not take the seat)' },
|
|
1028
|
-
'question-provider-occupied-unknown': { zh: '身份未知', en: 'identity unknown' },
|
|
1029
1021
|
'question-select-or-answer': { zh: '至少选择一个选项,或在最后一行输入回答', en: 'Select at least one option, or type an answer on the last line' },
|
|
1030
1022
|
'question-answer-or-check': { zh: '输入回答或勾选选项后再提交', en: 'Type an answer or check options before submitting' },
|
|
1031
1023
|
'question-type-answer-first': { zh: '先输入回答内容再提交', en: 'Type your answer before submitting' },
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
* cordis.yml wins over this preference (deployment choice over runtime
|
|
8
8
|
* preference, matching activityFrames).
|
|
9
9
|
*/
|
|
10
|
-
/** Parse the
|
|
11
|
-
* legacy rc.2 ships `code`, while the 0.1.2 line ships `ptc`, so this file
|
|
12
|
-
* cannot safely canonicalize either name before the active roster has been queried. */
|
|
10
|
+
/** Parse the exact stored registry ID. */
|
|
13
11
|
export declare function parsePresetPref(text: string): string | undefined;
|
|
14
12
|
/**
|
|
15
13
|
* The persisted preset id, or undefined when unset or invalid.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presetPrefs.d.ts","sourceRoot":"","sources":["../../src/presetPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH
|
|
1
|
+
{"version":3,"file":"presetPrefs.d.ts","sourceRoot":"","sources":["../../src/presetPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,0CAA0C;AAC1C,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAShE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAM1E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQhF;AAED;gFACgF;AAChF,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,GAAG,GAAE,MAAkB,GACtB,OAAO,CAIT"}
|
package/lib/types/presetPrefs.js
CHANGED
|
@@ -11,11 +11,9 @@ import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
11
11
|
import { join } from 'node:path';
|
|
12
12
|
import { DATA_DIR } from './utils/paths.js';
|
|
13
13
|
const PREFS_DIR = DATA_DIR;
|
|
14
|
-
/**
|
|
14
|
+
/** Validate registry IDs without rewriting user-defined names. */
|
|
15
15
|
const PRESET_ID = /^[a-z0-9][a-z0-9-]*$/;
|
|
16
|
-
/** Parse the
|
|
17
|
-
* legacy rc.2 ships `code`, while the 0.1.2 line ships `ptc`, so this file
|
|
18
|
-
* cannot safely canonicalize either name before the active roster has been queried. */
|
|
16
|
+
/** Parse the exact stored registry ID. */
|
|
19
17
|
export function parsePresetPref(text) {
|
|
20
18
|
try {
|
|
21
19
|
const parsed = JSON.parse(text);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Render exit and fork guidance using the installed CLI for its own profile. */
|
|
2
|
+
export declare function resumeCommand(profile: string | undefined, sessionId: string, platform?: NodeJS.Platform): string;
|
|
1
3
|
/**
|
|
2
4
|
* Store the session to resume and report the launcher invocation.
|
|
3
5
|
* @param sessionId - Session id for `dsh-tui --resume` on the next launch.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionHistory.d.ts","sourceRoot":"","sources":["../../src/sessionHistory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sessionHistory.d.ts","sourceRoot":"","sources":["../../src/sessionHistory.ts"],"names":[],"mappings":"AAoBA,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,kBAAmB,GAAG,MAAM,CAMjH;AAuBD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAGzD;AAED,qEAAqE;AACrE,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAOrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAehF;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAyB/D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAUpD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAYrD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiBxE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAQ7D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAU9D"}
|
|
@@ -16,6 +16,14 @@ const RESUME_FILE = join(DIR, 'resume.txt');
|
|
|
16
16
|
const LAST_USED_FILE = join(DIR, 'last-used.json');
|
|
17
17
|
let lastUsedStamp;
|
|
18
18
|
let lastUsedCache;
|
|
19
|
+
/** Render exit and fork guidance using the installed CLI for its own profile. */
|
|
20
|
+
export function resumeCommand(profile, sessionId, platform = process.platform) {
|
|
21
|
+
const boot = profile === 'dsh-cli' ? 'dsh-cli'
|
|
22
|
+
: profile === undefined ? 'dsh --config cordis.yml' : `dsh --profile ${profile}`;
|
|
23
|
+
return platform === 'win32'
|
|
24
|
+
? `${boot} --resume ${sessionId}`
|
|
25
|
+
: `DSH_TUI_RESUME_SESSION=${sessionId} ${boot}`;
|
|
26
|
+
}
|
|
19
27
|
function lastUsedFileStamp() {
|
|
20
28
|
try {
|
|
21
29
|
const stats = statSync(LAST_USED_FILE);
|