@chatcode/chatcode-cli 3.0.4-rc.7 → 3.0.5-rc.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.
Files changed (143) hide show
  1. package/README.i18n.yaml +6 -6
  2. package/README.md +10 -4
  3. package/README.zh.md +10 -4
  4. package/lib/bin.js +23 -9
  5. package/lib/{command-errors-Ca64Lgba.js → command-errors-CsRCh0gk.js} +12 -12
  6. package/lib/{command-trees-CVc4Xu_z.js → command-trees-CD_43rxX.js} +2 -2
  7. package/lib/{component-identity-6aEut5Yt.js → component-identity-DGA2-TeB.js} +3 -3
  8. package/lib/{dump-config-ZzrfvtnX.js → dump-config-D8kXfdTs.js} +1 -1
  9. package/lib/dump-config-DuCc-QB7.js +2 -0
  10. package/lib/{dump-config-schema-BlO-eZ-J.js → dump-config-schema-CtZbroi6.js} +2 -2
  11. package/lib/{extension-events-C7MUpqVE.js → extension-events-D0BjYRqT.js} +21 -21
  12. package/lib/{host-access-CLbyAGT5.js → host-access-DLJjuR07.js} +1 -1
  13. package/lib/{keymap-82JwLLHe.js → keymap-C4cs2IBN.js} +2 -2
  14. package/lib/{plugin-BlQlWIR5.js → plugin-CGtTByud.js} +801 -456
  15. package/lib/{plugin-BZdazFXS.js → plugin-CYw-MBRn.js} +1 -1
  16. package/lib/{profile-boot-B0aEEQIR.js → profile-boot-CffsubnV.js} +7 -7
  17. package/lib/profile-boot.js +1 -1
  18. package/lib/{scenes-BNS0ZFyQ.js → scenes-CbAGK5Uy.js} +3 -3
  19. package/lib/{settings-sections-CXH24cu5.js → settings-sections-DYKDa04e.js} +3 -3
  20. package/lib/{statusBarSettings-BAMzn8fX.js → statusBarSettings-T1m8xad4.js} +3 -3
  21. package/lib/{themes-DXUIvP7m.js → themes-BY2ui1Dv.js} +12 -12
  22. package/lib/tui-compat-command-trees.js +1 -1
  23. package/lib/tui-compat-extensions.js +3 -3
  24. package/lib/tui-compat-plugin-host.js +5 -5
  25. package/lib/tui-compat-scenes.js +1 -1
  26. package/lib/tui-compat-settings-sections.js +1 -1
  27. package/lib/tui-compat-working-activity.js +1 -1
  28. package/lib/tui-compat-workspaces.js +1 -1
  29. package/lib/tui-compat.js +7 -7
  30. package/lib/types/bin.d.ts +9 -0
  31. package/lib/types/tui-compat.d.ts +1 -1
  32. package/lib/types/web-instance-process.d.ts +20 -0
  33. package/lib/{web-instance-DbP7IHPv.js → web-instance-D_Ppi2Zo.js} +176 -14
  34. package/lib/{web-instance-B0jec7cq.js → web-instance-amvCJWnq.js} +1 -1
  35. package/lib/{workspaces-CUJXNU5W.js → workspaces-D5VKbESy.js} +2 -2
  36. package/package.json +28 -29
  37. package/runtime/manifest.json +2 -2
  38. package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +7 -3
  39. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +11 -3
  40. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/contract/snapshot.d.ts +1 -0
  41. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.d.ts +2 -0
  42. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.js +4 -0
  43. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +10 -3
  44. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +32 -11
  45. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/index.js +62 -11
  46. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/darwin-lock.d.ts +7 -0
  47. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/index.d.ts +7 -2
  48. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/linux-lock.d.ts +1 -1
  49. package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
  50. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +62 -62
  51. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +10 -10
  52. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +49 -49
  53. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +204 -204
  54. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
  55. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +159 -157
  56. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/service.d.ts +4 -2
  57. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
  58. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +129 -123
  59. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/index.js +19 -14
  60. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/changes.d.ts +2 -2
  61. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/Deliverables.d.ts +1 -2
  62. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/locales.d.ts +2 -1
  63. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
  64. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +2 -4
  65. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
  66. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
  67. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
  68. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +37 -37
  69. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +9 -9
  70. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +12 -12
  71. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +119 -32
  72. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/catalog.d.ts +13 -0
  73. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +2 -0
  74. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/effort-preferences.d.ts +20 -0
  75. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/slots.d.ts +2 -1
  76. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +8 -8
  77. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
  78. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
  79. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +128 -128
  80. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +182 -182
  81. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +130 -130
  82. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +50 -50
  83. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +88 -88
  84. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +36 -36
  85. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +13 -13
  86. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/client.js +27 -27
  87. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/lib/client.js +42 -42
  88. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +44 -46
  89. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +25 -25
  90. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.excel.js +9 -9
  91. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +70 -70
  92. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +9 -9
  93. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +18 -18
  94. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +26 -26
  95. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +16 -16
  96. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
  97. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +20 -20
  98. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +37 -37
  99. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +27 -27
  100. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +95 -95
  101. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +197 -197
  102. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +49 -49
  103. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
  104. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +656 -152
  105. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +9 -2
  106. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +46 -0
  107. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +9 -10
  108. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/deletion.d.ts +57 -0
  109. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +2 -0
  110. package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +32 -32
  111. package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +24 -24
  112. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +899 -453
  113. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/adapter.d.ts +4 -20
  114. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/adapter.d.ts +8 -0
  115. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/serialize.d.ts +10 -0
  116. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/sse.d.ts +24 -0
  117. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/translate.d.ts +37 -0
  118. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/types.d.ts +159 -0
  119. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/file-store.d.ts +3 -0
  120. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/files-api.d.ts +4 -0
  121. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/index.d.ts +1 -0
  122. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol-adapter.d.ts +41 -0
  123. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol.d.ts +35 -0
  124. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/transport.d.ts +2 -1
  125. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/types.d.ts +2 -2
  126. package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +5 -4
  127. package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +4 -4
  128. package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/index.js +1 -1
  129. package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +2 -2
  130. package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +12 -10
  131. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/index.js +208 -39
  132. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.d.ts +47 -0
  133. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.js +129 -0
  134. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.d.ts +2 -0
  135. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.js +31 -8
  136. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.d.ts +7 -2
  137. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.js +35 -19
  138. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/types.d.ts +11 -10
  139. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +1 -0
  140. package/scripts/link-embedded-runtime.mjs +1 -1
  141. package/lib/dump-config-CDixiJNt.js +0 -2
  142. package/lib/{home-migration-BjDmRwBB.js → home-migration-lRjtl2fP.js} +1 -1
  143. package/lib/{startup-diagnostics-C_hRCp-q.js → startup-diagnostics-4mLHYTFc.js} +1 -1
@@ -1,4 +1,4 @@
1
- import { r as INSTALL_ANCHOR, t as CHATCODE_PROFILE_TEMPLATES } from "./profile-boot-B0aEEQIR.js";
1
+ import { r as INSTALL_ANCHOR, t as CHATCODE_PROFILE_TEMPLATES } from "./profile-boot-CffsubnV.js";
2
2
  import { existsSync } from "node:fs";
3
3
  import { DEFAULT_PROFILE_BUNDLES, initProfile, readProfileCompatibility, resolveProfileDir } from "@deepseek-ai/dsh-app-boot";
4
4
  import { join } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { i as synchronizeLegacyHomeEnvironment, r as resolveChatCodeCliHome } from "./chatcode-home-B93iESZd.js";
2
- import { n as startStartupPhase, r as traceStartupPlugins } from "./startup-diagnostics-C_hRCp-q.js";
3
- import { n as registerWebInstance } from "./web-instance-DbP7IHPv.js";
2
+ import { n as startStartupPhase, r as traceStartupPlugins } from "./startup-diagnostics-4mLHYTFc.js";
3
+ import { n as registerWebInstance } from "./web-instance-D_Ppi2Zo.js";
4
4
  import { createRequire } from "node:module";
5
5
  import { existsSync, mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
6
6
  import { fileURLToPath } from "node:url";
@@ -133,7 +133,7 @@ const CHATCODE_PROFILE_TEMPLATES = {
133
133
  cli: { bundles: [
134
134
  "@deepseek-ai/dsh-base",
135
135
  "@deepseek-harness-tui/dsh-tui",
136
- "dsh-llm-chatcode-config",
136
+ "@chatcode/cco-llm-chatcode-config",
137
137
  "dshmarket",
138
138
  "dsh-computer-use"
139
139
  ] }
@@ -150,7 +150,6 @@ const CHATCODE_PACKAGE_ALIASES = {
150
150
  "@chatcode/cco-builtin-browser": "dsh-builtin-browser",
151
151
  "@chatcode/cco-chat-import": "dsh-chat-import",
152
152
  "@chatcode/cco-computer-use": "dsh-computer-use",
153
- "@chatcode/cco-llm-chatcode-config": "dsh-llm-chatcode-config",
154
153
  "@chatcode/cco-market": "dshmarket"
155
154
  };
156
155
  const CHATCODE_TUI_BUNDLE_ALIAS = "@deepseek-harness-tui/dsh-tui";
@@ -387,8 +386,8 @@ function restoreTrustedTuiLayer(profile, installAnchor = INSTALL_ANCHOR, runtime
387
386
  const CHATCODE_PROFILE_PATCHES = {
388
387
  web: [
389
388
  ["dsh-better-sidebar", "cordis.patch.yml"],
390
- ["dsh-llm-chatcode-config", "cordis.patch.yml"],
391
- ["dsh-llm-chatcode-config", "cordis.web.patch.yml"],
389
+ ["@chatcode/cco-llm-chatcode-config", "cordis.patch.yml"],
390
+ ["@chatcode/cco-llm-chatcode-config", "cordis.web.patch.yml"],
392
391
  ["dsh-chat-import", "cordis.patch.yml"]
393
392
  ],
394
393
  cli: [
@@ -397,9 +396,10 @@ const CHATCODE_PROFILE_PATCHES = {
397
396
  ["@deepseek-ai/dsh-web-app", "presets/ptc.patch.yml"],
398
397
  ["@deepseek-ai/dsh-web-app", "presets/minimal.patch.yml"],
399
398
  ["@deepseek-ai/dsh-web-app", "presets/cordis.patch.yml"],
399
+ ["@chatcode/cco-llm-chatcode-config", "cordis.context-presets.patch.yml"],
400
400
  ["dsh-chat-import", "cordis.patch.yml"]
401
401
  ],
402
- headless: [["@chatcode/chatcode-cli-test", "headless-compat.cordis.patch.yml"], ["dsh-llm-chatcode-config", "cordis.patch.yml"]]
402
+ headless: [["@chatcode/chatcode-cli-test", "headless-compat.cordis.patch.yml"], ["@chatcode/cco-llm-chatcode-config", "cordis.patch.yml"]]
403
403
  };
404
404
  /** Resolve installed ChatCode product defaults without changing persisted profiles. */
405
405
  function chatCodeProfilePatchFiles(profile, installAnchor = INSTALL_ANCHOR) {
@@ -1,2 +1,2 @@
1
- import { _ as uniqueProfilePatchFiles, a as chatCodeProfilePatchFiles, c as homePatchPath, d as preferEmbeddedProfileLayers, f as preferEmbeddedRuntimeResolution, g as runProfile, h as restoreTrustedTuiLayer, i as PROFILE_ROOT_FILENAME, l as initializeProfileFromDefault, m as resolveChatCodePackageAliases, n as CHATCODE_TRUSTED_VERSION_EXEMPTIONS, o as chatCodeProfilePatchLayers, p as prepareProfile, r as INSTALL_ANCHOR, s as embeddedRuntimePackageDir, t as CHATCODE_PROFILE_TEMPLATES, u as installProfileInvocationAccessor } from "./profile-boot-B0aEEQIR.js";
1
+ import { _ as uniqueProfilePatchFiles, a as chatCodeProfilePatchFiles, c as homePatchPath, d as preferEmbeddedProfileLayers, f as preferEmbeddedRuntimeResolution, g as runProfile, h as restoreTrustedTuiLayer, i as PROFILE_ROOT_FILENAME, l as initializeProfileFromDefault, m as resolveChatCodePackageAliases, n as CHATCODE_TRUSTED_VERSION_EXEMPTIONS, o as chatCodeProfilePatchLayers, p as prepareProfile, r as INSTALL_ANCHOR, s as embeddedRuntimePackageDir, t as CHATCODE_PROFILE_TEMPLATES, u as installProfileInvocationAccessor } from "./profile-boot-CffsubnV.js";
2
2
  export { CHATCODE_PROFILE_TEMPLATES, CHATCODE_TRUSTED_VERSION_EXEMPTIONS, INSTALL_ANCHOR, PROFILE_ROOT_FILENAME, chatCodeProfilePatchFiles, chatCodeProfilePatchLayers, embeddedRuntimePackageDir, homePatchPath, initializeProfileFromDefault, installProfileInvocationAccessor, preferEmbeddedProfileLayers, preferEmbeddedRuntimeResolution, prepareProfile, resolveChatCodePackageAliases, restoreTrustedTuiLayer, runProfile, uniqueProfilePatchFiles };
@@ -1,7 +1,7 @@
1
- import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-CLbyAGT5.js";
2
- import { n as componentIdentityOf } from "./component-identity-6aEut5Yt.js";
1
+ import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-DLJjuR07.js";
2
+ import { n as componentIdentityOf } from "./component-identity-DGA2-TeB.js";
3
3
  import { Service } from "@deepseek-ai/cordis";
4
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/scenes.js
4
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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-CLbyAGT5.js";
1
+ import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-DLJjuR07.js";
2
2
  import { Service } from "@deepseek-ai/cordis";
3
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/credentialRefGuard.js
3
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/settings-sections.js
52
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/settingsCompat.js
2
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/tuiDisplayPrefs.js
46
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/statusBarSettings.js
206
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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-82JwLLHe.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-CLbyAGT5.js";
3
- import { n as componentIdentityOf } from "./component-identity-6aEut5Yt.js";
4
- import { S as DATA_DIR, f as cleanRenderText, p as cleanScalarText } from "./extension-events-C7MUpqVE.js";
1
+ import { c as parseCombo, i as comboMatchesStrict, r as canonicalCombo, s as fixedReservedCombos, u as reservedActionCombos } from "./keymap-C4cs2IBN.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-DLJjuR07.js";
3
+ import { n as componentIdentityOf } from "./component-identity-DGA2-TeB.js";
4
+ import { S as DATA_DIR, f as cleanRenderText, p as cleanScalarText } from "./extension-events-D0BjYRqT.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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/dialogs.js
9
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/status.js
282
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/shortcuts.js
506
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/renderers.js
707
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/toast.js
879
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/theme.js
1014
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/customTheme.js
1489
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/themes.js
1719
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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-CVc4Xu_z.js";
1
+ import { r as name, t as TuiCommandTreeRuntime } from "./command-trees-CD_43rxX.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-C7MUpqVE.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-DXUIvP7m.js";
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-D0BjYRqT.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-BY2ui1Dv.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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/extensions.js
6
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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-CLbyAGT5.js";
2
- import { c as requiresDecisionEvents, o as requireComponentIdentity, r as declaresCommand, s as requiresContract, t as bindComponentIdentity } from "./component-identity-6aEut5Yt.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-C7MUpqVE.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-Ca64Lgba.js";
1
+ import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, r as assertCallerContext, t as activationContext } from "./host-access-DLJjuR07.js";
2
+ import { c as requiresDecisionEvents, o as requireComponentIdentity, r as declaresCommand, s as requiresContract, t as bindComponentIdentity } from "./component-identity-DGA2-TeB.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-D0BjYRqT.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-CsRCh0gk.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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/plugin-host.js
7
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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
@@ -1,2 +1,2 @@
1
- import { r as name, t as TuiSceneRuntime } from "./scenes-BNS0ZFyQ.js";
1
+ import { r as name, t as TuiSceneRuntime } from "./scenes-CbAGK5Uy.js";
2
2
  export { TuiSceneRuntime, TuiSceneRuntime as default, name };
@@ -1,2 +1,2 @@
1
- import { i as name, t as TuiSettingsSectionsRuntime } from "./settings-sections-CXH24cu5.js";
1
+ import { i as name, t as TuiSettingsSectionsRuntime } from "./settings-sections-DYKDa04e.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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/working-activity.js
238
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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-CUJXNU5W.js";
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-D5VKbESy.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-BAMzn8fX.js";
2
- import { t as SHORTCUT_ACTIONS } from "./keymap-82JwLLHe.js";
1
+ import { c as normalizePageMargin, g as liveConfigValues, n as createStatusBarSchema, v as withLiveSettings } from "./statusBarSettings-T1m8xad4.js";
2
+ import { t as SHORTCUT_ACTIONS } from "./keymap-C4cs2IBN.js";
3
3
  import Schema from "@deepseek-ai/schemastery";
4
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/force-production-react.js
4
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/index.js
17
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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`/
@@ -101,13 +101,13 @@ 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-BlQlWIR5.js");
104
+ const { apply: ccTuiApply } = await import("./plugin-CGtTByud.js");
105
105
  return ccTuiApply(ctx, liveConfigValues(config));
106
106
  }
107
107
  //#endregion
108
108
  //#region lib/types/tui-compat.js
109
- /** Validate the TUI's declared live fields using the launcher's own schema runtime. */
110
- const Config = new Schema(Config$1.toJSON());
109
+ /** Validate live TUI fields with the launcher's schema runtime, preserving transform closures. */
110
+ const Config = new Schema(Config$1);
111
111
  /** Wait for the shared model default before the TUI creates its first session. */
112
112
  const inject = [...inject$1, "agentDefaultModel"];
113
113
  //#endregion
@@ -5,12 +5,21 @@
5
5
  */
6
6
  /** Process environment key used to hand the main package version to child/profile runtimes. */
7
7
  export declare const CHATCODE_CLI_PRODUCT_VERSION_ENV = "CHATCODE_CLI_PRODUCT_VERSION";
8
+ /** Process-layer startup identity; a new launcher replaces inherited values. */
9
+ export declare const CHATCODE_CLI_LAUNCH_ID_ENV = "CHATCODE_CLI_LAUNCH_ID";
10
+ /** ISO timestamp captured before profile loading or interactive login. */
11
+ export declare const CHATCODE_CLI_LAUNCH_TIME_ENV = "CHATCODE_CLI_LAUNCH_TIME";
8
12
  /**
9
13
  * Set the canonical process identity shared by all launcher aliases.
10
14
  */
11
15
  export declare function initializeProcessIdentity(): void;
12
16
  /** Publish the authoritative launcher version to every runtime that the profile may spawn. */
13
17
  export declare function initializeProductVersionEnvironment(version: string, environment?: NodeJS.ProcessEnv): void;
18
+ /**
19
+ * Replace inherited startup identity before the launcher captures its environment snapshot.
20
+ * @param environment - Process-layer environment receiving the fresh UUID and original ISO timestamp.
21
+ */
22
+ export declare function initializeLaunchIdentityEnvironment(environment?: NodeJS.ProcessEnv): void;
14
23
  /**
15
24
  * Run the public ChatCode CLI command-line interface.
16
25
  * @returns a promise that settles when the selected command mode finishes.
@@ -2,7 +2,7 @@
2
2
  export * from '@deepseek-harness-tui/dsh-tui';
3
3
  import { Config as tuiConfig } from '@deepseek-harness-tui/dsh-tui';
4
4
  import Schema from '@deepseek-ai/schemastery';
5
- /** Validate the TUI's declared live fields using the launcher's own schema runtime. */
5
+ /** Validate live TUI fields with the launcher's schema runtime, preserving transform closures. */
6
6
  export declare const Config: Schema<tuiConfig | NoInfer<Partial<tuiConfig>>, tuiConfig | NoInfer<Partial<tuiConfig>>, "plain">;
7
7
  /** Wait for the shared model default before the TUI creates its first session. */
8
8
  export declare const inject: string[];
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Denied or unavailable inspection is unknown. Supported platforms retain a creation
3
+ * identity; Unix creation time in milliseconds also permits checking legacy registrations.
4
+ */
5
+ export type WebProcessState = {
6
+ state: 'exited';
7
+ } | {
8
+ state: 'unknown';
9
+ } | {
10
+ state: 'running';
11
+ started?: string;
12
+ startedAt?: number;
13
+ };
14
+ /**
15
+ * Observe an owner without terminating it, including zombies, exited process objects, and reused PIDs.
16
+ * @param pid - validated positive process identifier from a private registration.
17
+ * @returns exit, running identity, or unknown when inspection is unavailable.
18
+ */
19
+ export declare function readWebProcess(pid: number): WebProcessState;
20
+ //# sourceMappingURL=web-instance-process.d.ts.map
@@ -1,6 +1,7 @@
1
- import { dirname, join } from "node:path";
1
+ import { readFileSync } from "node:fs";
2
2
  import { randomBytes, timingSafeEqual } from "node:crypto";
3
- import { mkdir, readFile, rm } from "node:fs/promises";
3
+ import { dirname, join } from "node:path";
4
+ import { mkdir, readFile, rm, stat } from "node:fs/promises";
4
5
  import { provideCmdline } from "@deepseek-ai/dsh-cmdline";
5
6
  import { request } from "node:http";
6
7
  import { connect } from "node:net";
@@ -8,6 +9,153 @@ import { Context } from "@deepseek-ai/cordis";
8
9
  import { brandString } from "@deepseek-ai/dsh-brand";
9
10
  import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
10
11
  import * as WebStartup from "@deepseek-ai/dsh-web-app/startup";
12
+ import { createLazyRequire } from "@deepseek-ai/dsh-lazy-require";
13
+ import { extendWin32ProcessBindings, isNullPtr } from "@deepseek-ai/dsh-win32-process";
14
+ //#region lib/types/web-instance-process.js
15
+ /** Read-only native Web owner inspection, including creation identity and quiescent process states. */
16
+ const WAIT_OBJECT_0 = 0;
17
+ const WAIT_TIMEOUT = 258;
18
+ const ERROR_INVALID_PARAMETER = 87;
19
+ const WINDOWS_EPOCH_TICKS = 116444736000000000n;
20
+ const requireKoffi = createLazyRequire("koffi", import.meta.url);
21
+ const PROC_PIDTBSDINFO = 3;
22
+ const PROC_BSDINFO_SIZE = 136;
23
+ const SZOMB = 5;
24
+ const SC_CLK_TCK = 2;
25
+ function bindDarwin() {
26
+ return requireKoffi().load("/usr/lib/libSystem.B.dylib").func("proc_pidinfo", "int", [
27
+ "int",
28
+ "int",
29
+ "uint64",
30
+ "void *",
31
+ "int"
32
+ ]);
33
+ }
34
+ let darwin;
35
+ let linuxSysconf;
36
+ /** Signal zero is only a fallback proof of absence, never a creation-identity check. */
37
+ function posixAbsence(pid) {
38
+ try {
39
+ process.kill(pid, 0);
40
+ } catch (error) {
41
+ if (error.code === "ESRCH") return { state: "exited" };
42
+ }
43
+ return { state: "unknown" };
44
+ }
45
+ function readDarwinProcess(pid) {
46
+ try {
47
+ const inspect = darwin ??= bindDarwin();
48
+ const info = Buffer.alloc(PROC_BSDINFO_SIZE);
49
+ if (inspect(pid, PROC_PIDTBSDINFO, 0, info, info.length) !== info.length) return posixAbsence(pid);
50
+ if (info.readUInt32LE(12) !== pid) return { state: "unknown" };
51
+ const status = info.readUInt32LE(4);
52
+ if (status === SZOMB) return { state: "exited" };
53
+ if (status < 1 || status > 4) return { state: "unknown" };
54
+ const seconds = info.readBigUInt64LE(120);
55
+ const microseconds = info.readBigUInt64LE(128);
56
+ const startedAt = Number(seconds) * 1e3 + Number(microseconds) / 1e3;
57
+ if (seconds === 0n || microseconds >= 1000000n || !Number.isSafeInteger(Number(seconds) * 1e3)) return { state: "unknown" };
58
+ return {
59
+ state: "running",
60
+ started: `darwin:${seconds}:${microseconds}`,
61
+ startedAt
62
+ };
63
+ } catch (error) {
64
+ return posixAbsence(pid);
65
+ }
66
+ }
67
+ /** Linux start ticks use sysconf's rate, not a hard-coded kernel frequency. */
68
+ function linuxStartedAt(ticks) {
69
+ try {
70
+ const bootSeconds = /^btime (\d+)$/mu.exec(readFileSync("/proc/stat", "utf8"))?.[1];
71
+ if (bootSeconds === void 0) return void 0;
72
+ linuxSysconf ??= requireKoffi().load(null).func("sysconf", "long", ["int"]);
73
+ const rate = linuxSysconf(SC_CLK_TCK);
74
+ const startedAt = Number(bootSeconds) * 1e3 + Number(ticks) / rate * 1e3;
75
+ return Number.isSafeInteger(rate) && rate > 0 && Number.isFinite(startedAt) && startedAt > 0 ? startedAt : void 0;
76
+ } catch (error) {
77
+ return;
78
+ }
79
+ }
80
+ function readLinuxProcess(pid) {
81
+ try {
82
+ const text = readFileSync(`/proc/${pid}/stat`, "utf8");
83
+ const end = text.lastIndexOf(")");
84
+ if (!text.startsWith(`${pid} (`) || end < 0) return { state: "unknown" };
85
+ const fields = text.slice(end + 2).trim().split(/\s+/u);
86
+ const ticks = fields[19];
87
+ if (ticks === void 0 || !/^\d{1,20}$/u.test(ticks)) return { state: "unknown" };
88
+ if (fields[0] === "Z" || fields[0] === "X" || fields[0] === "x") return { state: "exited" };
89
+ if (!/^[RSDTtKWPI]$/u.test(fields[0] ?? "")) return { state: "unknown" };
90
+ const boot = readFileSync("/proc/sys/kernel/random/boot_id", "utf8").trim();
91
+ if (!/^[a-f\d]{8}(?:-[a-f\d]{4}){3}-[a-f\d]{12}$/u.test(boot)) return { state: "unknown" };
92
+ const startedAt = linuxStartedAt(ticks);
93
+ return {
94
+ state: "running",
95
+ started: `linux:${boot}:${ticks}`,
96
+ ...startedAt === void 0 ? {} : { startedAt }
97
+ };
98
+ } catch (error) {
99
+ return posixAbsence(pid);
100
+ }
101
+ }
102
+ function bindWindows() {
103
+ return extendWin32ProcessBindings(({ kernel32, bind }) => ({
104
+ openProcess: bind(kernel32, "OpenProcess", "void *", [
105
+ "uint32",
106
+ "int",
107
+ "uint32"
108
+ ]),
109
+ getProcessTimes: bind(kernel32, "GetProcessTimes", "int", [
110
+ "void *",
111
+ "void *",
112
+ "void *",
113
+ "void *",
114
+ "void *"
115
+ ])
116
+ }));
117
+ }
118
+ let windows;
119
+ /**
120
+ * Observe an owner without terminating it, including zombies, exited process objects, and reused PIDs.
121
+ * @param pid - validated positive process identifier from a private registration.
122
+ * @returns exit, running identity, or unknown when inspection is unavailable.
123
+ */
124
+ function readWebProcess(pid) {
125
+ if (process.platform === "darwin") return readDarwinProcess(pid);
126
+ if (process.platform === "linux") return readLinuxProcess(pid);
127
+ if (process.platform !== "win32") try {
128
+ process.kill(pid, 0);
129
+ return { state: "running" };
130
+ } catch (error) {
131
+ return error.code === "ESRCH" ? { state: "exited" } : { state: "unknown" };
132
+ }
133
+ try {
134
+ const api = windows ??= bindWindows();
135
+ const handle = api.openProcess(1052672, 0, pid);
136
+ if (isNullPtr(handle)) return { state: api.getLastError() === ERROR_INVALID_PARAMETER ? "exited" : "unknown" };
137
+ try {
138
+ const wait = api.waitForSingleObject(handle, 0);
139
+ if (wait === WAIT_OBJECT_0) return { state: "exited" };
140
+ if (wait !== WAIT_TIMEOUT) return { state: "unknown" };
141
+ const created = Buffer.alloc(8);
142
+ if (api.getProcessTimes(handle, created, Buffer.alloc(8), Buffer.alloc(8), Buffer.alloc(8)) === 0) return { state: "unknown" };
143
+ const ticks = created.readBigUInt64LE();
144
+ const startedAt = Number(ticks - WINDOWS_EPOCH_TICKS) / 1e4;
145
+ if (!Number.isFinite(startedAt) || startedAt < 0) return { state: "unknown" };
146
+ return {
147
+ state: "running",
148
+ started: `win32:${ticks}`,
149
+ startedAt
150
+ };
151
+ } finally {
152
+ api.closeHandle(handle);
153
+ }
154
+ } catch (error) {
155
+ return { state: "unknown" };
156
+ }
157
+ }
158
+ //#endregion
11
159
  //#region lib/types/web-instance.js
12
160
  /** Private, verified Web instance discovery shared by terminal and standalone launches. */
13
161
  const CONTROL_PATH = "/.chatcode-cli/web-instance";
@@ -73,23 +221,31 @@ async function readInstance(path) {
73
221
  } catch (_invalidJson) {
74
222
  throw new Error("Web 实例登记无法解析;未启动或关闭任何进程。");
75
223
  }
76
- if (!isRecord(value) || value.version !== 1 || typeof value.id !== "string" || typeof value.pid !== "number" || !Number.isInteger(value.pid) || value.pid < 1 || value.pid > 2147483647 || typeof value.secret !== "string" || !/^[a-f0-9]{64}$/u.test(value.secret) || typeof value.origin !== "string" || localUrl(value.origin, false) === void 0) throw new Error("Web 实例登记无效;未启动或关闭任何进程。");
224
+ if (!isRecord(value) || value.version !== 1 || typeof value.id !== "string" || typeof value.pid !== "number" || !Number.isInteger(value.pid) || value.pid < 1 || value.pid > 2147483647 || typeof value.secret !== "string" || !/^[a-f0-9]{64}$/u.test(value.secret) || value.processStarted !== void 0 && (typeof value.processStarted !== "string" || !/^(?:win32:\d{1,20}|darwin:\d{1,20}:\d{1,6}|linux:[a-f\d]{8}(?:-[a-f\d]{4}){3}-[a-f\d]{12}:\d{1,20})$/u.test(value.processStarted)) || typeof value.origin !== "string" || localUrl(value.origin, false) === void 0) throw new Error("Web 实例登记无效;未启动或关闭任何进程。");
77
225
  return {
78
226
  version: 1,
79
227
  id: brandString(value.id),
80
228
  pid: value.pid,
81
229
  origin: value.origin,
82
- secret: value.secret
230
+ secret: value.secret,
231
+ ...value.processStarted === void 0 ? {} : { processStarted: value.processStarted }
83
232
  };
84
233
  }
85
- function processExists(pid) {
86
- try {
87
- process.kill(pid, 0);
88
- return true;
89
- } catch (error) {
90
- if (error.code === "ESRCH") return false;
91
- throw error;
234
+ /** Recover only a confirmed exit, reused PID, or registration removed by its owner. */
235
+ async function registrationStale(path, record) {
236
+ const owner = readWebProcess(record.pid);
237
+ if (owner.state === "exited") return true;
238
+ if (owner.state !== "running") return false;
239
+ if (record.processStarted !== void 0 && owner.started !== void 0) return record.processStarted !== owner.started;
240
+ if (record.processStarted === void 0 && owner.startedAt !== void 0) {
241
+ const metadata = await stat(path).catch((error) => {
242
+ if (error.code === "ENOENT") return void 0;
243
+ throw error;
244
+ });
245
+ if (metadata === void 0) return true;
246
+ return owner.startedAt > Math.max(metadata.mtimeMs, metadata.ctimeMs, metadata.birthtimeMs) + 2e3;
92
247
  }
248
+ return false;
93
249
  }
94
250
  /** Local HTTP avoids inherited proxies and never follows a redirect carrying the management secret. */
95
251
  async function control(record, method) {
@@ -142,6 +298,8 @@ async function registerWebInstance(ctx, registration, stop) {
142
298
  if (ctx.get("webServer") === void 0 || ctx.get("connection") === void 0) return;
143
299
  let disposed = false;
144
300
  let published = Promise.resolve();
301
+ const owner = readWebProcess(process.pid);
302
+ const processStarted = owner.state === "running" ? owner.started : void 0;
145
303
  const status = () => {
146
304
  const web = ctx.get("webServer");
147
305
  const connection = ctx.get("connection");
@@ -187,7 +345,8 @@ async function registerWebInstance(ctx, registration, stop) {
187
345
  id: current.id,
188
346
  pid: current.pid,
189
347
  origin: new URL(current.url).origin,
190
- secret: registration.secret
348
+ secret: registration.secret,
349
+ ...processStarted === void 0 ? {} : { processStarted }
191
350
  }), {
192
351
  mode: 384,
193
352
  dirMode: 448
@@ -245,8 +404,11 @@ async function runManagedWeb(options) {
245
404
  });
246
405
  await withFileLock(path, async () => {
247
406
  const record = await readInstance(path);
248
- const existing = record !== void 0 && processExists(record.pid) ? await control(record, "GET") : void 0;
249
- if (record !== void 0 && processExists(record.pid) && existing === void 0) throw new Error("登记的 Web 进程仍在运行,但服务尚未就绪;请稍后重试,不会重复启动。");
407
+ let existing;
408
+ if (record !== void 0 && !await registrationStale(path, record)) {
409
+ existing = await control(record, "GET");
410
+ if (existing === void 0 && !await registrationStale(path, record)) throw new Error("登记的 Web 进程仍在运行或暂时无法确认状态,但服务尚未就绪;请稍后重试,不会重复启动。");
411
+ }
250
412
  if (existing !== void 0 && record !== void 0) {
251
413
  if (port !== void 0 && Number(port) !== Number(new URL(existing.url).port)) throw new Error("已有 Web 实例使用不同端口;请先执行 cco web off,再指定新端口启动。");
252
414
  if (action === "off") {
@@ -1,2 +1,2 @@
1
- import { r as runManagedWeb, t as WebUsageError } from "./web-instance-DbP7IHPv.js";
1
+ import { r as runManagedWeb, t as WebUsageError } from "./web-instance-D_Ppi2Zo.js";
2
2
  export { WebUsageError, runManagedWeb };
@@ -1,8 +1,8 @@
1
- import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-CLbyAGT5.js";
1
+ import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-DLJjuR07.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.21_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/workspaces.js
5
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.22_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
  *