@chatcode/chatcode-cli 3.0.6-rc.1 → 3.0.6-rc.3
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/lib/{command-errors-CnbcOM1a.js → command-errors-vCFKCJFq.js} +12 -12
- package/lib/{command-trees-CU7BxVJo.js → command-trees-N2_LR4f-.js} +2 -2
- package/lib/{component-identity-kZK1_hFy.js → component-identity-CaV_MmmE.js} +3 -3
- package/lib/{extension-events-hLxwPvpg.js → extension-events-B5qKP0-X.js} +20 -20
- package/lib/{host-access-kT-u85k_.js → host-access-BRXW3V8i.js} +1 -1
- package/lib/{keymap-DS1M8sDo.js → keymap-BYjklwli.js} +2 -2
- package/lib/{plugin-BccFcAte.js → plugin-VYAv2o0K.js} +497 -347
- package/lib/{scenes-DG6T8t-A.js → scenes-B-iDMpgW.js} +3 -3
- package/lib/{settings-sections-2SuE0biI.js → settings-sections-CYCrZKUk.js} +3 -3
- package/lib/{statusBarSettings-B2MEAwnI.js → statusBarSettings-Cu-b_o4Q.js} +3 -3
- package/lib/{themes-DUO7kGW-.js → themes-DC9GpV6q.js} +12 -12
- package/lib/tui-compat-command-trees.js +1 -1
- package/lib/tui-compat-extensions.js +3 -3
- package/lib/tui-compat-plugin-host.js +5 -5
- package/lib/tui-compat-scenes.js +1 -1
- package/lib/tui-compat-settings-sections.js +1 -1
- package/lib/tui-compat-working-activity.js +1 -1
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +6 -6
- package/lib/{workspaces-CLOkL_yE.js → workspaces-BchdRzlw.js} +2 -2
- package/package.json +25 -25
- package/runtime/manifest.json +1 -1
- package/runtime/node_modules/@chatcode/runtime-client/README.md +11 -8
- package/runtime/node_modules/@chatcode/runtime-client/index.d.ts +6 -12
- package/runtime/node_modules/@chatcode/runtime-client/package.json +1 -1
- package/runtime/node_modules/@chatcode/runtime-client/runtime-connector.mjs +16 -16
- package/runtime/node_modules/@chatcode/runtime-client/session-browser.mjs +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +14 -4
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +23 -10
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +23 -13
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +5 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +8 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +7 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +6 -6
- package/runtime/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/index.js +17 -1
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +6 -6
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.remote-client.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/types.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +15 -4
- package/runtime/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +16 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/index.js +12 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.js +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/types.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +22 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/child-agent.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +16 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +83 -20
- package/runtime/node_modules/@deepseek-ai/node-addon-system/lib/.tsbuildinfo +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-
|
|
2
|
-
import { n as componentIdentityOf } from "./component-identity-
|
|
1
|
+
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-BRXW3V8i.js";
|
|
2
|
+
import { n as componentIdentityOf } from "./component-identity-CaV_MmmE.js";
|
|
3
3
|
import { Service } from "@deepseek-ai/cordis";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/scenes.js
|
|
5
5
|
/** Provider-neutral full-screen scene registry for terminal front doors. */
|
|
6
6
|
const name = "dsh-tui-scenes";
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-
|
|
1
|
+
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-BRXW3V8i.js";
|
|
2
2
|
import { Service } from "@deepseek-ai/cordis";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/credentialRefGuard.js
|
|
4
4
|
/**
|
|
5
5
|
* Credential-ref reservation guard for the plugin settings-section seam.
|
|
6
6
|
*
|
|
@@ -49,7 +49,7 @@ function vetSectionSecretRefs(section) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
52
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/settings-sections.js
|
|
53
53
|
/**
|
|
54
54
|
* Plugin settings-section extension seam for terminal front doors.
|
|
55
55
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Schema from "@deepseek-ai/schemastery";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/settingsCompat.js
|
|
3
3
|
/** Mark display fields editable on hosts that support volatile Config references. */
|
|
4
4
|
function withLiveSettings(schema, fields) {
|
|
5
5
|
for (const key of fields) {
|
|
@@ -43,7 +43,7 @@ function settingsValue(settings, ns) {
|
|
|
43
43
|
return descriptor && "value" in descriptor ? descriptor.value : settings.get?.(ns);
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
46
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/tuiDisplayPrefs.js
|
|
47
47
|
/** Default footer shows account-wide tokens today and current context usage. */
|
|
48
48
|
const DEFAULT_STATUS_BAR = Object.freeze({
|
|
49
49
|
compact: true,
|
|
@@ -203,7 +203,7 @@ function applyPageMargin(setting) {
|
|
|
203
203
|
return next;
|
|
204
204
|
}
|
|
205
205
|
//#endregion
|
|
206
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
206
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/statusBarSettings.js
|
|
207
207
|
/** Shared status-footer settings declarations and validation. */
|
|
208
208
|
/**
|
|
209
209
|
* Build the complete footer schema for both composition and live settings.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as parseCombo, i as comboMatchesStrict, r as canonicalCombo, s as fixedReservedCombos, u as reservedActionCombos } from "./keymap-
|
|
2
|
-
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, r as assertCallerContext, s as requirePluginCaller, t as activationContext } from "./host-access-
|
|
3
|
-
import { n as componentIdentityOf } from "./component-identity-
|
|
4
|
-
import { S as DATA_DIR, f as cleanRenderText, p as cleanScalarText } from "./extension-events-
|
|
1
|
+
import { c as parseCombo, i as comboMatchesStrict, r as canonicalCombo, s as fixedReservedCombos, u as reservedActionCombos } from "./keymap-BYjklwli.js";
|
|
2
|
+
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, r as assertCallerContext, s as requirePluginCaller, t as activationContext } from "./host-access-BRXW3V8i.js";
|
|
3
|
+
import { n as componentIdentityOf } from "./component-identity-CaV_MmmE.js";
|
|
4
|
+
import { S as DATA_DIR, f as cleanRenderText, p as cleanScalarText } from "./extension-events-B5qKP0-X.js";
|
|
5
5
|
import { readFileSync, readdirSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { Context, Service } from "@deepseek-ai/cordis";
|
|
8
8
|
import { KNOWN_SESSION_EVENT_TYPES } from "@deepseek-ai/dsh-session";
|
|
9
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
9
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/dialogs.js
|
|
10
10
|
/**
|
|
11
11
|
* Managed plugin dialogs — the pi `ctx.ui.select/confirm/input` seam for
|
|
12
12
|
* ChatCode CLI TUI. Plugins hand the HOST a declarative request; the TUI renders the
|
|
@@ -279,7 +279,7 @@ function getHostDialogStore(runtime) {
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
//#endregion
|
|
282
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
282
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/status.js
|
|
283
283
|
/**
|
|
284
284
|
* Keyed status-line contributions — pi's `ctx.ui.setStatus(key, text)`.
|
|
285
285
|
* Each plugin owns a key; setting text shows it, setting undefined clears
|
|
@@ -503,7 +503,7 @@ function getHostStatusStore(runtime) {
|
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
//#endregion
|
|
506
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
506
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/shortcuts.js
|
|
507
507
|
/**
|
|
508
508
|
* Plugin keyboard shortcuts — pi's `pi.registerShortcut`. A plugin binds a
|
|
509
509
|
* combo (`ctrl+shift+p`, `alt+k`, …) to a handler; the chat screen matches
|
|
@@ -704,7 +704,7 @@ function getHostShortcuts(runtime) {
|
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
//#endregion
|
|
707
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
707
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/renderers.js
|
|
708
708
|
/**
|
|
709
709
|
* Custom session-entry renderers — pi's `pi.registerMessageRenderer`. A
|
|
710
710
|
* plugin that appends its own log-only session events (`session.append(
|
|
@@ -876,7 +876,7 @@ function getHostRenderers(runtime) {
|
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
878
|
//#endregion
|
|
879
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
879
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/toast.js
|
|
880
880
|
/**
|
|
881
881
|
* Plugin-facing transient notifications — a fire-and-forget toast shown on
|
|
882
882
|
* the host's existing notification surface (the same toasts the channel
|
|
@@ -1011,7 +1011,7 @@ function getHostToastStore(runtime) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
//#endregion
|
|
1014
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
1014
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/theme.js
|
|
1015
1015
|
/**
|
|
1016
1016
|
* dsh-tui color themes — ChatCode CLI terminal family.
|
|
1017
1017
|
*
|
|
@@ -1486,7 +1486,7 @@ function getActiveTheme() {
|
|
|
1486
1486
|
return getTheme(activeThemeName);
|
|
1487
1487
|
}
|
|
1488
1488
|
//#endregion
|
|
1489
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
1489
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/customTheme.js
|
|
1490
1490
|
/**
|
|
1491
1491
|
* User-defined color themes for dsh-tui.
|
|
1492
1492
|
*
|
|
@@ -1716,7 +1716,7 @@ function indexCustomThemeNames() {
|
|
|
1716
1716
|
nameIndexed = true;
|
|
1717
1717
|
}
|
|
1718
1718
|
//#endregion
|
|
1719
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
1719
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/themes.js
|
|
1720
1720
|
/**
|
|
1721
1721
|
* Cordis-backed runtime theme contributions.
|
|
1722
1722
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as name, t as TuiCommandTreeRuntime } from "./command-trees-
|
|
1
|
+
import { r as name, t as TuiCommandTreeRuntime } from "./command-trees-N2_LR4f-.js";
|
|
2
2
|
export { TuiCommandTreeRuntime, TuiCommandTreeRuntime as default, name };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as normalizeCancelDecision, c as installDecisionGuard, n as DECISION_TOTAL_TIMEOUT_MS, o as DECISION_EVENT_PERMISSIONS, t as DECISION_HANDLER_TIMEOUT_MS, x as readGrantStore } from "./extension-events-
|
|
2
|
-
import { A as TuiDialogRuntime, C as matchShortcut, D as getHostStatusStore, E as TuiStatusStore, O as DIALOG_DEFAULT_TIMEOUT_MS, T as TuiStatusRuntime, _ as TuiToastRuntime, j as TuiDialogStore, k as INPUT_CELLS, t as TuiThemeRuntime, w as parseShortcutCombo, x as TuiShortcutRuntime, y as TuiRendererRuntime } from "./themes-
|
|
1
|
+
import { a as normalizeCancelDecision, c as installDecisionGuard, n as DECISION_TOTAL_TIMEOUT_MS, o as DECISION_EVENT_PERMISSIONS, t as DECISION_HANDLER_TIMEOUT_MS, x as readGrantStore } from "./extension-events-B5qKP0-X.js";
|
|
2
|
+
import { A as TuiDialogRuntime, C as matchShortcut, D as getHostStatusStore, E as TuiStatusStore, O as DIALOG_DEFAULT_TIMEOUT_MS, T as TuiStatusRuntime, _ as TuiToastRuntime, j as TuiDialogStore, k as INPUT_CELLS, t as TuiThemeRuntime, w as parseShortcutCombo, x as TuiShortcutRuntime, y as TuiRendererRuntime } from "./themes-DC9GpV6q.js";
|
|
3
3
|
import { appendFileSync, mkdirSync } from "node:fs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
6
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/extensions.js
|
|
7
7
|
/**
|
|
8
8
|
* The dsh-tui-extensions row: mounts every plugin-facing UI seam service in
|
|
9
9
|
* one cordis plugin (one profile row, one patch-surface entry — see issue
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, r as assertCallerContext, t as activationContext } from "./host-access-
|
|
2
|
-
import { c as requiresDecisionEvents, o as requireComponentIdentity, r as declaresCommand, s as requiresContract, t as bindComponentIdentity } from "./component-identity-
|
|
3
|
-
import { B as createAdmissionCatalog, F as verifyRegistry, I as DECISION_EVENTS_COORDINATE, J as parseManifest, L as TUI_DECISION_EVENT_NAMES, M as loadSpecData, P as verifyContractProfiles, R as TUI_EXTENSION_API_VERSION, Y as projectManifest, c as installDecisionGuard, l as registerDecisionHandler, n as DECISION_TOTAL_TIMEOUT_MS, o as DECISION_EVENT_PERMISSIONS, s as decisionHandlerMetadataOf, t as DECISION_HANDLER_TIMEOUT_MS, u as withDecisionRegistration, x as readGrantStore, z as TUI_EXTENSION_PERMISSION_NAMES } from "./extension-events-
|
|
4
|
-
import { A as validatePlugin, C as TuiPluginStorageRuntime, D as buildHostDescriptor, E as HOST_SUPPORTED_CONTRACTS, O as negotiate, S as STORAGE_MAX_KEYS, T as TuiEffectLedgerRuntime, b as STORAGE_KEY_MAX_LENGTH, c as OBSERVE_CALLBACK_QUEUE_LIMIT, d as OBSERVE_ID_MAX_CHARS, f as OBSERVE_IMAGE_BASE64_MAX_CHARS, g as TuiMessageObserverRuntime, h as OBSERVE_SUMMARY_CELLS, i as withCommandErrorMapping, k as createContractIndex, l as OBSERVE_CALLBACK_TIMEOUT_MS, m as OBSERVE_SCOPE_MAX_CHARS, n as hasCommandErrorCode, o as stampCommandOwner, p as OBSERVE_IMAGE_MAX_BYTES, r as mapCommandError, s as unstampCommandOwner, t as COMMAND_ERROR_CODES, u as OBSERVE_CONTENT_MAX_CHARS, x as STORAGE_MAX_BYTES, y as PluginStorageError } from "./command-errors-
|
|
1
|
+
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, r as assertCallerContext, t as activationContext } from "./host-access-BRXW3V8i.js";
|
|
2
|
+
import { c as requiresDecisionEvents, o as requireComponentIdentity, r as declaresCommand, s as requiresContract, t as bindComponentIdentity } from "./component-identity-CaV_MmmE.js";
|
|
3
|
+
import { B as createAdmissionCatalog, F as verifyRegistry, I as DECISION_EVENTS_COORDINATE, J as parseManifest, L as TUI_DECISION_EVENT_NAMES, M as loadSpecData, P as verifyContractProfiles, R as TUI_EXTENSION_API_VERSION, Y as projectManifest, c as installDecisionGuard, l as registerDecisionHandler, n as DECISION_TOTAL_TIMEOUT_MS, o as DECISION_EVENT_PERMISSIONS, s as decisionHandlerMetadataOf, t as DECISION_HANDLER_TIMEOUT_MS, u as withDecisionRegistration, x as readGrantStore, z as TUI_EXTENSION_PERMISSION_NAMES } from "./extension-events-B5qKP0-X.js";
|
|
4
|
+
import { A as validatePlugin, C as TuiPluginStorageRuntime, D as buildHostDescriptor, E as HOST_SUPPORTED_CONTRACTS, O as negotiate, S as STORAGE_MAX_KEYS, T as TuiEffectLedgerRuntime, b as STORAGE_KEY_MAX_LENGTH, c as OBSERVE_CALLBACK_QUEUE_LIMIT, d as OBSERVE_ID_MAX_CHARS, f as OBSERVE_IMAGE_BASE64_MAX_CHARS, g as TuiMessageObserverRuntime, h as OBSERVE_SUMMARY_CELLS, i as withCommandErrorMapping, k as createContractIndex, l as OBSERVE_CALLBACK_TIMEOUT_MS, m as OBSERVE_SCOPE_MAX_CHARS, n as hasCommandErrorCode, o as stampCommandOwner, p as OBSERVE_IMAGE_MAX_BYTES, r as mapCommandError, s as unstampCommandOwner, t as COMMAND_ERROR_CODES, u as OBSERVE_CONTENT_MAX_CHARS, x as STORAGE_MAX_BYTES, y as PluginStorageError } from "./command-errors-vCFKCJFq.js";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { Context, Service } from "@deepseek-ai/cordis";
|
|
7
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
7
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/plugin-host.js
|
|
8
8
|
/**
|
|
9
9
|
* The dsh-tui-plugin-host row: the plugin-interop anchor every later
|
|
10
10
|
* contract surface hangs off (storage.local, messages.observe, effect
|
package/lib/tui-compat-scenes.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as name, t as TuiSceneRuntime } from "./scenes-
|
|
1
|
+
import { r as name, t as TuiSceneRuntime } from "./scenes-B-iDMpgW.js";
|
|
2
2
|
export { TuiSceneRuntime, TuiSceneRuntime as default, name };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as name, t as TuiSettingsSectionsRuntime } from "./settings-sections-
|
|
1
|
+
import { i as name, t as TuiSettingsSectionsRuntime } from "./settings-sections-CYCrZKUk.js";
|
|
2
2
|
export { TuiSettingsSectionsRuntime, TuiSettingsSectionsRuntime as default, name };
|
|
@@ -235,7 +235,7 @@ function apply$1(ctx, config = {}) {
|
|
|
235
235
|
}, "working-activity tick timer");
|
|
236
236
|
}
|
|
237
237
|
//#endregion
|
|
238
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
238
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/working-activity.js
|
|
239
239
|
/**
|
|
240
240
|
* Re-export of the `dsh-working-activity` plugin under this package's own
|
|
241
241
|
* name, so the bundle patch layer can mount the working-activity row as
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as localWorkspaceUri, n as WORKSPACE_PROVIDER_TIMEOUT_MS, o as name, r as createLocalWorkspaceRuntime, s as parseLocalWorkspaceReference, t as TuiWorkspaceRuntime } from "./workspaces-
|
|
1
|
+
import { a as localWorkspaceUri, n as WORKSPACE_PROVIDER_TIMEOUT_MS, o as name, r as createLocalWorkspaceRuntime, s as parseLocalWorkspaceReference, t as TuiWorkspaceRuntime } from "./workspaces-BchdRzlw.js";
|
|
2
2
|
export { TuiWorkspaceRuntime, TuiWorkspaceRuntime as default, WORKSPACE_PROVIDER_TIMEOUT_MS, createLocalWorkspaceRuntime, localWorkspaceUri, name, parseLocalWorkspaceReference };
|
package/lib/tui-compat.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as normalizePageMargin, g as liveConfigValues, n as createStatusBarSchema, v as withLiveSettings } from "./statusBarSettings-
|
|
2
|
-
import { t as SHORTCUT_ACTIONS } from "./keymap-
|
|
1
|
+
import { c as normalizePageMargin, g as liveConfigValues, n as createStatusBarSchema, v as withLiveSettings } from "./statusBarSettings-Cu-b_o4Q.js";
|
|
2
|
+
import { t as SHORTCUT_ACTIONS } from "./keymap-BYjklwli.js";
|
|
3
3
|
import Schema from "@deepseek-ai/schemastery";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/force-production-react.js
|
|
5
5
|
/**
|
|
6
6
|
* React-reconciler selects its dev/production build at require time from
|
|
7
7
|
* NODE_ENV; the dev build records one performance.measure() per render into
|
|
@@ -14,7 +14,7 @@ import Schema from "@deepseek-ai/schemastery";
|
|
|
14
14
|
*/
|
|
15
15
|
process.env.NODE_ENV ??= "production";
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
17
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/index.js
|
|
18
18
|
/**
|
|
19
19
|
* dsh-tui plugin entry. The TUI implementation lives in `./plugin.tsx` (its
|
|
20
20
|
* render path is JSX); this module owns the plugin surface (`name`/`inject`/
|
|
@@ -24,7 +24,7 @@ process.env.NODE_ENV ??= "production";
|
|
|
24
24
|
* @module @chatcode/cco-tui
|
|
25
25
|
*/
|
|
26
26
|
const name = "dsh-tui";
|
|
27
|
-
const inject$1 = ["agents"];
|
|
27
|
+
const inject$1 = ["agents", ...process.env.CHATCODE_DESKTOP_HISTORY_LEASE ? ["desktopHistoryReady"] : []];
|
|
28
28
|
const Config$1 = withLiveSettings(Schema.object({
|
|
29
29
|
sessionId: Schema.string().required(false),
|
|
30
30
|
provider: Schema.string().required(false),
|
|
@@ -101,7 +101,7 @@ const Config$1 = withLiveSettings(Schema.object({
|
|
|
101
101
|
* @returns a promise settling when the TUI teardown completes.
|
|
102
102
|
*/
|
|
103
103
|
async function apply(ctx, config) {
|
|
104
|
-
const { apply: ccTuiApply } = await import("./plugin-
|
|
104
|
+
const { apply: ccTuiApply } = await import("./plugin-VYAv2o0K.js");
|
|
105
105
|
return ccTuiApply(ctx, liveConfigValues(config));
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-
|
|
1
|
+
import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-BRXW3V8i.js";
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
3
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
4
4
|
import { Service } from "@deepseek-ai/cordis";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.
|
|
5
|
+
//#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.29_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/workspaces.js
|
|
6
6
|
/**
|
|
7
7
|
* Workspace-target extension seam for terminal front doors.
|
|
8
8
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatcode/chatcode-cli",
|
|
3
3
|
"description": "ChatCode CLI: TUI-first coding agent, Web launcher, profiles, and legacy DSH-compatible plugins",
|
|
4
|
-
"version": "3.0.6-rc.
|
|
4
|
+
"version": "3.0.6-rc.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"@chatcode/cco-builtin-browser": "0.1.21",
|
|
33
33
|
"@chatcode/cco-chat-import": "0.17.4",
|
|
34
34
|
"@chatcode/cco-computer-use": "0.3.2",
|
|
35
|
-
"@chatcode/cco-llm-chatcode-config": "0.1.4-rc.
|
|
35
|
+
"@chatcode/cco-llm-chatcode-config": "0.1.4-rc.12",
|
|
36
36
|
"@chatcode/cco-market": "1.45.2-rc.5",
|
|
37
|
-
"@chatcode/cco-tui": "0.10.0-rc.
|
|
37
|
+
"@chatcode/cco-tui": "0.10.0-rc.29",
|
|
38
38
|
"@deepseek-ai/libreoffice-kit": "^0.1.1",
|
|
39
|
-
"@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.
|
|
39
|
+
"@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.29",
|
|
40
40
|
"@earendil-works/pi-ai": "^0.85.1",
|
|
41
41
|
"@eslint-community/regexpp": "^4.12.2",
|
|
42
42
|
"@joplin/turndown-plugin-gfm": "^1.0.67",
|
|
@@ -95,45 +95,45 @@
|
|
|
95
95
|
"ajv": "^8.20.0",
|
|
96
96
|
"execa": "^10.0.0",
|
|
97
97
|
"ws": "8.21.0",
|
|
98
|
+
"@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
|
|
98
99
|
"@deepseek-ai/dsh-agent": "0.1.7-rc.2",
|
|
99
100
|
"@deepseek-ai/dsh-acp": "0.1.7-rc.2",
|
|
100
|
-
"@deepseek-ai/dsh-agent-loop": "0.1.7-rc.2",
|
|
101
|
-
"@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
|
|
102
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
|
|
103
101
|
"@deepseek-ai/dsh-credentials-local": "0.1.7-rc.2",
|
|
104
|
-
"@deepseek-ai/dsh-
|
|
105
|
-
"@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.1.7-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
|
|
106
103
|
"@deepseek-ai/dsh-experimental-agent-team": "0.1.7-rc.2",
|
|
107
|
-
"@deepseek-ai/dsh-
|
|
104
|
+
"@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.1.7-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-agent-loop": "0.1.7-rc.2",
|
|
108
106
|
"@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
|
|
109
|
-
"@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
|
|
110
|
-
"@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
|
|
111
107
|
"@deepseek-ai/dsh-fs-observation-policy": "0.1.7-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.1.7-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
|
|
112
111
|
"@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-bash-local": "0.1.7-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
|
|
113
115
|
"@deepseek-ai/dsh-llm": "0.1.7-rc.2",
|
|
114
116
|
"@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.1.7-rc.2",
|
|
115
118
|
"@deepseek-ai/dsh-llm-replay": "0.1.7-rc.2",
|
|
116
|
-
"@deepseek-ai/dsh-
|
|
117
|
-
"@deepseek-ai/dsh-
|
|
119
|
+
"@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
|
|
120
|
+
"@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
|
|
118
121
|
"@deepseek-ai/dsh-loader-smoke": "0.1.7-rc.2",
|
|
119
|
-
"@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
|
|
120
|
-
"@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.1.7-rc.2",
|
|
121
122
|
"@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
|
|
122
|
-
"@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
|
|
123
123
|
"@deepseek-ai/dsh-session": "0.1.7-rc.2",
|
|
124
|
-
"@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
|
|
125
|
-
"@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
|
|
126
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
|
|
127
|
-
"@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
|
|
128
124
|
"@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
|
|
125
|
+
"@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
|
|
126
|
+
"@deepseek-ai/dsh-llm-deepseek-account": "0.1.7-rc.2",
|
|
127
|
+
"@deepseek-ai/dsh-settings": "0.1.7-rc.2",
|
|
129
128
|
"@deepseek-ai/dsh-shell-env": "0.1.7-rc.2",
|
|
130
129
|
"@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-rc.2",
|
|
131
|
-
"@deepseek-ai/dsh-tools": "0.1.7-rc.2",
|
|
132
|
-
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
|
|
133
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
|
|
134
|
-
"@deepseek-ai/dsh-settings": "0.1.7-rc.2",
|
|
135
130
|
"@deepseek-ai/dsh-subagent": "0.1.7-rc.2",
|
|
131
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
|
|
132
|
+
"@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
|
|
133
|
+
"@deepseek-ai/dsh-llm-mock-server": "0.1.7-rc.2",
|
|
134
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
|
|
136
135
|
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
|
|
136
|
+
"@deepseek-ai/dsh-tools": "0.1.7-rc.2",
|
|
137
137
|
"@deepseek-ai/dsh-user-approval": "0.1.7-rc.2",
|
|
138
138
|
"@deepseek-ai/dsh-subprocess-local": "0.1.7-rc.2"
|
|
139
139
|
},
|
package/runtime/manifest.json
CHANGED
|
@@ -26,7 +26,7 @@ Use this package in an Electron main process or another Node.js backend to keep
|
|
|
26
26
|
Install the published package into the host backend. An external Node executable must satisfy the package’s engines field; Electron process.execPath normally names Electron and is not the external Node path. Supply the separately installed @chatcode/chatcode-cli package’s scripts/launch.mjs. Tauri and Qt applications need a Node.js communication adapter.
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
pnpm add --save-exact @chatcode/runtime-client@0.1.0-integration.
|
|
29
|
+
pnpm add --save-exact @chatcode/runtime-client@0.1.0-integration.3 --registry=https://registry.npmjs.org/
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
The application writes createIntegrationPatch(mode) to a file and passes its absolute path in patches. runtime-only retains workspace-write confinement and rejects actions that require approval. cherry-permissions adds the pre-execution permission plugin; the host owns policy checks, approval UI, structured user answers, and cancellation.
|
|
@@ -48,11 +48,9 @@ Session callbacks receive snapshots, durable events, and assistant-stream frames
|
|
|
48
48
|
|
|
49
49
|
ChatCode account authentication is separate from tool approvals and local HTTP cookie authentication. When the host already owns a validated ChatCode account, pass its token only in the subprocess env field as CHATCODE_CLI_OAUTH_TOKEN. The host owns token validation, renewal, logout, and account isolation; restart the Connector after changing the token. This SDK version does not expose account login, status, or logout APIs. Neither createIntegrationPatch mode disables account authentication.
|
|
50
50
|
|
|
51
|
-
For application
|
|
51
|
+
For application identification, pass `appCredentials: { appId, secret }` to `new RuntimeConnector(options)` in the desktop backend. Both fields are required when the option is set. Use 1 to 128 printable ASCII characters for the ID and 1 to 1024 for the secret, without spaces. If the backend reads the secret from an environment variable, omit that variable from the subprocess `env` option. A distributed SDK or installer cannot protect a shared long-lived secret. An installation can use a credential provisioned separately by the operator or by an authorization service.
|
|
52
52
|
|
|
53
|
-
The SDK sends `X-ChatCode-App-Id` and `X-ChatCode-App-Secret`
|
|
54
|
-
|
|
55
|
-
Invalid configuration throws `runtime/app-credentials` during construction. HTTP 401 or 403 during the exchange rejects startup with `runtime/app-auth`. A cookie without the application authentication acknowledgment rejects startup with `runtime/app-auth-unsupported`. Omitting the option uses the regular local-cookie exchange. With application credentials configured, the SDK requires a Runtime version that implements the application exchange.
|
|
53
|
+
The SDK sends `X-ChatCode-App-Id` and `X-ChatCode-App-Secret` in the local launch token exchange and copies `appCredentials.appId` into each new Session. The Session log, creation result, Session list and unified conversation report carry optional `appId`; resuming preserves the recorded value, including its absence on legacy Sessions. Malformed local credentials throw `runtime/app-credentials`. Application credential verification is deferred. The launch exchange accepts the normal local cookie without an application acknowledgment, while HTTP 401/403 still reject startup. Secrets are excluded from Session metadata.
|
|
56
54
|
|
|
57
55
|
The current Web profile also checks ChatCode/CVP launch admission before binding HTTP. Both integration modes preserve this check. Prepare the Runtime’s required service access and credentials, then verify that its launcher starts; report admission failures as Runtime startup errors rather than tool approval requests.
|
|
58
56
|
|
|
@@ -74,7 +72,7 @@ await execution.prompt({ requestId, mode: 'queue', content: [{ type: 'text', tex
|
|
|
74
72
|
|
|
75
73
|
The host supplies an already configured Connector, callbacks, and stable input IDs. `prompt` subscribes before submitting and never retries admission failures. `cancel` stops tracked active root and child turns; `close` awaits subscription cleanup without stopping the shared Runtime. `onSession` registers host-owned permission handlers before each subscription opens; its returned disposer runs on close. `ExecutionStream.resolveCall` waits for complete durable arguments with cancellation. Partial tool input remains display-only. Existing `followInteractions` and `replyInteraction` carry approvals and structured user responses; the host owns account checks, permission policy and UI. `beforeFrame` optionally vetoes a frame for host policy before publication. Listener exceptions are contained; `onFailure` reports transport/projection failures.
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
This SDK has no Cherry, Electron or TUI dependency. `ExecutionStream` remains available for clients that already own their subscriptions. Snapshots reconcile current content; this observer does not replace paginated history import into a host database.
|
|
78
76
|
|
|
79
77
|
Live child registration may precede its first descriptor. `followAddress` retries only the Runtime live-child `unavailable` diagnostic, bounded by `childReadyTimeoutMs` (default 1000 ms), and releases every failed opening before retrying. Corruption, unsupported formats and unauthorized addresses are terminal.
|
|
80
78
|
|
|
@@ -110,9 +108,9 @@ Call `releaseSession(sessionId)` only after completing or cancelling pending wor
|
|
|
110
108
|
|
|
111
109
|
Beginning a return revokes terminal checks, heartbeats, and model-preference reads. Asynchronous callbacks revalidate the same active, unexpired lease before returning a decision. A failed return retains the reservation and remains revoked; the original lease may retry return even after expiry. `owns()` reports this reservation, not execution permission. These checks do not retract decisions already delivered or roll back tools already executing.
|
|
112
110
|
|
|
113
|
-
###
|
|
111
|
+
### Model ownership
|
|
114
112
|
|
|
115
|
-
The
|
|
113
|
+
The host supplies the model catalog. The SDK exposes no `modelCatalog`, `selectModel`, or `RuntimeModelCatalog` API. Ordinary CLI and Web launches keep their model selectors.
|
|
116
114
|
|
|
117
115
|
### Desktop integration model
|
|
118
116
|
|
|
@@ -143,6 +141,7 @@ await runtime.prompt({
|
|
|
143
141
|
sessionId, requestId, mode: 'queue', content: [{ type: 'text', text: 'Hello' }],
|
|
144
142
|
modelConfig: {
|
|
145
143
|
provider: 'openai', model: 'gpt-4o', protocol: 'openai-completions',
|
|
144
|
+
baseUrl: 'https://api.example.com/v1',
|
|
146
145
|
apiKey,
|
|
147
146
|
options: { temperature: 0, contextWindow: 128_000, maxTokens: 4096, top_p: 0.9 },
|
|
148
147
|
},
|
|
@@ -151,6 +150,8 @@ await runtime.prompt({
|
|
|
151
150
|
|
|
152
151
|
The Runtime applies `contextWindow` to context budgeting, `maxTokens` and `temperature` to generation, and `reasoningEffort` to a reasoning level advertised by the route. Runtime passes the remaining keys in `options` to the registered protocol adapter. The pi-ai Chat Completions, Responses, Messages, and Google GenerateContent paths and the native DeepSeek adapter forward extra JSON generation fields. For example, use `reasoning_effort` for Chat Completions, `reasoning.effort` for Responses, or `output_config.effort` for Messages. Google puts these fields in `generationConfig` and maps `thinking_level` to `thinkingConfig.thinkingLevel`. Runtime owns routing, input, tools, streaming, transport, and authentication. The upstream model decides which extra fields it accepts. Configuration errors carry `session/invalid-model-config` and a field path. Reuse the same `requestId` and payload when retrying admission. Use `assertPromptModelConfig({ unifiedOptions: true })` before sending unified options to check Runtime support. Older clients may still send separate `protocolOptions` or use the top-level `provider` and `model` fields. When using separate objects, each key must occur in only one. Supply `modelConfig.apiKey` with each prompt that uses a desktop API key. The SDK checks Runtime support before sending. Runtime uses the key in memory for the submitted model and records only a credential-required marker. After restarting, retry a queued prompt with the same ID, content, configuration and key before resuming work. Supply ChatCode OAuth grants through `setLoginToken`.
|
|
153
152
|
|
|
153
|
+
`modelConfig.baseUrl` is an optional service URL beside `apiKey`, not a generation option. It accepts HTTP(S) without embedded credentials, query, or fragment and requires a caller-supplied `apiKey`; configured credentials and profile headers are not sent to the supplied destination. The URL follows the queued message, its retries, and request headers without changing global provider configuration. The registered provider/model still selects the protocol adapter. Omit it to use the original provider endpoint. `assertPromptModelConfig({ baseUrl: true })` checks `requestBaseUrl` support; the SDK checks automatically before sending a configured URL.
|
|
154
|
+
|
|
154
155
|
`AccountModelPreferences` stores only provider, model and revision under a private per-user account directory. The caller derives its owner fingerprint from the server-validated account API origin and normalized email. It never accepts an environment token as identity proof. Cherry publishes its accepted choice; the official CLI adopts it while idle and checks before new input. A busy CLI finishes its current task first. Unavailable routes retain the current model and show a warning. Logout and different accounts do not share choices. Desktop handoff reads the preference through its original host lease and retains that host's allowed model routes. This feature does not share credentials, Session homes or permissions, and does not change other Cherry Agents' stored models.
|
|
155
156
|
|
|
156
157
|
<a id="build-and-publish"></a>
|
|
@@ -175,6 +176,8 @@ node tests/permission-smoke.mjs ../../..
|
|
|
175
176
|
node tests/history-smoke.mjs ../../..
|
|
176
177
|
```
|
|
177
178
|
|
|
179
|
+
From the repository root, `node packages/sdk/runtime-client/tests/model-endpoint-smoke.mjs` checks two prompt-local endpoints, their API keys, original application identity after restart, and the removed SDK catalog methods using the installed configuration plugin.
|
|
180
|
+
|
|
178
181
|
The history fixture boots the real launcher against loopback model and CVP protocol fixtures, preserves launch checks, and checks native writer ownership and real file effects in both tool modes. It does not validate production accounts or platform admission. Add `--terminal` to exercise the actual interactive TUI in a private fixture. Add `--picker` to start an ordinary CLI and select the isolated desktop Session through `/resume`; `--inline` selects an inline parent terminal.
|
|
179
182
|
|
|
180
183
|
<a id="understand-the-implementation"></a>
|
|
@@ -12,6 +12,8 @@ type SessionExecutionPrompt = {
|
|
|
12
12
|
|
|
13
13
|
/** Model route and JSON options applied to one queued user prompt. */
|
|
14
14
|
export interface PromptModelConfig {
|
|
15
|
+
/** HTTP(S) service URL supplied for this prompt; requires a prompt API key. */
|
|
16
|
+
baseUrl?: string
|
|
15
17
|
provider: string
|
|
16
18
|
model: string
|
|
17
19
|
protocol?: string
|
|
@@ -37,7 +39,7 @@ export interface RuntimeOptions {
|
|
|
37
39
|
home: string
|
|
38
40
|
patches?: string[]
|
|
39
41
|
env?: Record<string, string | undefined>
|
|
40
|
-
/**
|
|
42
|
+
/** Application metadata forwarded to the Runtime; application credential verification is deferred. */
|
|
41
43
|
appCredentials?: RuntimeAppCredentials
|
|
42
44
|
processCwd?: string
|
|
43
45
|
startupTimeoutMs?: number
|
|
@@ -122,14 +124,8 @@ export function createDesktopHistoryClient(options?: { directory?: string }): {
|
|
|
122
124
|
has(id: string): boolean
|
|
123
125
|
prepare(id: string): Promise<() => Promise<number>>
|
|
124
126
|
}
|
|
125
|
-
/** Safe Runtime model metadata; credentials remain in Runtime plugins. */
|
|
126
127
|
export type WorkspaceAccess = 'read-only' | 'workspace-write' | 'danger-full-access'
|
|
127
128
|
export type SessionAddress = { kind: 'session'; sessionId: string } | { kind: 'subagent'; parentSessionId: string; childSessionId: string; mode: 'one-shot' | 'continuable' | 'unknown' }
|
|
128
|
-
export interface RuntimeModelCatalog {
|
|
129
|
-
default: { provider: string; model: string }
|
|
130
|
-
groups: Array<{ id: string; name: string; models: Array<{ id: string; name: string; inputModalities?: Array<'text' | 'image'> }> }>
|
|
131
|
-
failures: Array<{ id: string; name: string; message: string }>
|
|
132
|
-
}
|
|
133
129
|
/** Local preferences require a SHA-256 owner fingerprint from a validated account. */
|
|
134
130
|
export class AccountModelPreferences {
|
|
135
131
|
constructor(options?: { directory?: string })
|
|
@@ -158,9 +154,6 @@ export class RuntimeConnector {
|
|
|
158
154
|
onFailure?: (error: Error) => void,
|
|
159
155
|
signal?: AbortSignal,
|
|
160
156
|
): Promise<() => void>
|
|
161
|
-
modelCatalog(options?: { refresh?: boolean }): Promise<RuntimeModelCatalog>
|
|
162
|
-
/** Select an available route for the next request on the same Session. */
|
|
163
|
-
selectModel(request: { sessionId: string; provider: string; model: string }): Promise<{ selected: { provider: string; model: string } }>
|
|
164
157
|
/**
|
|
165
158
|
* Create a new Session, optionally with provider/model.
|
|
166
159
|
* @param request - Workspace, optional Session identity, and optional provider/model.
|
|
@@ -197,7 +190,7 @@ export class RuntimeConnector {
|
|
|
197
190
|
signal?: AbortSignal,
|
|
198
191
|
): Promise<() => void>
|
|
199
192
|
/** Reject unless the Runtime supports request-local prompt model configuration. */
|
|
200
|
-
assertPromptModelConfig(options?: { apiKey?: boolean; unifiedOptions?: boolean }): Promise<void>
|
|
193
|
+
assertPromptModelConfig(options?: { apiKey?: boolean; unifiedOptions?: boolean; baseUrl?: boolean }): Promise<void>
|
|
201
194
|
/**
|
|
202
195
|
* Admit new user content without waiting for the turn.
|
|
203
196
|
* @param request - Session, stable request identity, and content.
|
|
@@ -407,6 +400,7 @@ export interface RuntimeWorkspace {
|
|
|
407
400
|
}
|
|
408
401
|
/** Cold-safe summary; the host need not load transcript bodies or activate Sessions. */
|
|
409
402
|
export interface RuntimeSessionSummary {
|
|
403
|
+
appId?: string
|
|
410
404
|
sessionId: string
|
|
411
405
|
title: string | null
|
|
412
406
|
updatedAt: number
|
|
@@ -432,7 +426,7 @@ export type SessionCreateOptions = ({ workspaceId: string; cwd?: never } | { cwd
|
|
|
432
426
|
sessionId?: string
|
|
433
427
|
agentPreset?: string
|
|
434
428
|
}
|
|
435
|
-
export interface SessionIdentity { sessionId: string; agentPreset?: string }
|
|
429
|
+
export interface SessionIdentity { sessionId: string; agentPreset?: string; appId?: string }
|
|
436
430
|
/** Omit location to resolve the saved cwd through the cold-safe Session list. */
|
|
437
431
|
export interface SessionResumeOptions { sessionId: string; workspaceId?: string; cwd?: string; agentPreset?: string }
|
|
438
432
|
/** Raw Web Workspace frames retain ISO timestamps; list APIs normalize them to epoch milliseconds. */
|
|
@@ -26,7 +26,6 @@ function redact(text) { return text.replace(/([?&]token=)[^\s&]+/gu, '$1[redacte
|
|
|
26
26
|
|
|
27
27
|
const APP_ID_HEADER = 'x-chatcode-app-id'
|
|
28
28
|
const APP_SECRET_HEADER = 'x-chatcode-app-secret'
|
|
29
|
-
const APP_AUTHENTICATED_HEADER = 'x-chatcode-app-authenticated'
|
|
30
29
|
|
|
31
30
|
/** Owns one public-profile Runtime and one multiplexed WebSocket. */
|
|
32
31
|
export class RuntimeConnector {
|
|
@@ -154,9 +153,6 @@ export class RuntimeConnector {
|
|
|
154
153
|
throw failure('Runtime rejected application authentication', 'runtime/app-auth')
|
|
155
154
|
}
|
|
156
155
|
if (auth.status !== 303 || !auth.headers['set-cookie']?.length) throw failure('Host authentication failed', 'runtime/auth')
|
|
157
|
-
if (credentials && auth.headers[APP_AUTHENTICATED_HEADER] !== '1') {
|
|
158
|
-
throw failure('Runtime did not confirm application authentication', 'runtime/app-auth-unsupported')
|
|
159
|
-
}
|
|
160
156
|
this.#cookie = auth.headers['set-cookie'].map(value => value.split(';')[0]).join('; ')
|
|
161
157
|
this.#origin = launchURL.origin
|
|
162
158
|
if (this.#closed || child.exitCode !== null || child.signalCode !== null) throw new Error('Runtime stopped during startup')
|
|
@@ -221,15 +217,6 @@ export class RuntimeConnector {
|
|
|
221
217
|
return message.result.value
|
|
222
218
|
}
|
|
223
219
|
|
|
224
|
-
/**
|
|
225
|
-
* With sessionId, restore that Session instead of minting a new one.
|
|
226
|
-
* @param request - Absolute workspace and optional persisted Session identity.
|
|
227
|
-
* @returns The Runtime-owned Session identity.
|
|
228
|
-
*/
|
|
229
|
-
/** Read safe model names and routes from the live Runtime registry. */
|
|
230
|
-
modelCatalog(options = {}) { return this.#rpcArgs(options.refresh ? 'session/refreshModelCatalog' : 'session/modelCatalog', {}) }
|
|
231
|
-
/** Select an available route for the next request on the same Session. */
|
|
232
|
-
selectModel(request) { return this.#rpc('session/selectModel', request) }
|
|
233
220
|
permissionCatalog() { return this.#rpcArgs('permissionPresets/catalog', {}) }
|
|
234
221
|
getWorkspaceAccess(sessionId) { return this.#rpc('session/workspaceAccess', { sessionId }) }
|
|
235
222
|
setWorkspaceAccess(request) { return this.#rpc('session/setWorkspaceAccess', request) }
|
|
@@ -292,10 +279,20 @@ export class RuntimeConnector {
|
|
|
292
279
|
}
|
|
293
280
|
return this.#rpc('session/create', { ...location, resumeOnly: true })
|
|
294
281
|
}
|
|
295
|
-
|
|
282
|
+
/**
|
|
283
|
+
* Create a Session with the Connector's application identity or adopt an existing identity.
|
|
284
|
+
* @param request - Workspace and optional persisted Session identity.
|
|
285
|
+
* @returns The Runtime-owned Session identity and its original application ID.
|
|
286
|
+
*/
|
|
287
|
+
createSession(request) {
|
|
288
|
+
return this.#rpc('session/create', {
|
|
289
|
+
...request,
|
|
290
|
+
...(this.#appCredentials === undefined ? {} : { appId: this.#appCredentials.appId }),
|
|
291
|
+
})
|
|
292
|
+
}
|
|
296
293
|
/**
|
|
297
294
|
* Confirm this Runtime supports request-local prompt model configuration.
|
|
298
|
-
* @param options - require support for prompt API keys or unified model options.
|
|
295
|
+
* @param options - require support for prompt API keys, service URLs, or unified model options.
|
|
299
296
|
* @returns A promise that rejects when the requested capability is unavailable.
|
|
300
297
|
*/
|
|
301
298
|
async assertPromptModelConfig(options = {}) {
|
|
@@ -312,6 +309,9 @@ export class RuntimeConnector {
|
|
|
312
309
|
if (options.apiKey && capability.requestApiKey !== true) {
|
|
313
310
|
throw failure('Runtime does not support API keys supplied with prompts', 'runtime/model-config-unsupported')
|
|
314
311
|
}
|
|
312
|
+
if (options.baseUrl && capability.requestBaseUrl !== true) {
|
|
313
|
+
throw failure('Runtime does not support service URLs supplied with prompts', 'runtime/model-config-unsupported')
|
|
314
|
+
}
|
|
315
315
|
if (options.unifiedOptions && capability.unifiedOptions !== true) {
|
|
316
316
|
throw failure('Runtime does not support unified prompt model options', 'runtime/model-config-unsupported')
|
|
317
317
|
}
|
|
@@ -348,7 +348,7 @@ export class RuntimeConnector {
|
|
|
348
348
|
return existing.promise
|
|
349
349
|
}
|
|
350
350
|
const submit = () => this.#rpc('session/prompt', wire)
|
|
351
|
-
const promise = (configured ? this.assertPromptModelConfig({ apiKey: wire.modelConfig.apiKey !== undefined }).then(submit) : submit()).finally(() => this.#prompts.delete(key))
|
|
351
|
+
const promise = (configured ? this.assertPromptModelConfig({ apiKey: wire.modelConfig.apiKey !== undefined, baseUrl: wire.modelConfig.baseUrl !== undefined }).then(submit) : submit()).finally(() => this.#prompts.delete(key))
|
|
352
352
|
this.#prompts.set(key, { payload, wire, promise })
|
|
353
353
|
return promise
|
|
354
354
|
}
|
|
@@ -58,6 +58,7 @@ export function readSessionSummaries(value) {
|
|
|
58
58
|
running: row.running,
|
|
59
59
|
blank: row.blank,
|
|
60
60
|
...(row.cwd === undefined ? {} : { cwd: string(row.cwd) }),
|
|
61
|
+
...(row.appId === undefined ? {} : { appId: string(row.appId) }),
|
|
61
62
|
...(row.origin === undefined ? {} : { origin: row.origin }),
|
|
62
63
|
...(row.parentSessionId === undefined ? {} : { parentSessionId: string(row.parentSessionId) })
|
|
63
64
|
}
|