@shuind/dsh-codex-harness 0.2.21 → 0.3.0

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 (200) hide show
  1. package/CHANGELOG.md +185 -0
  2. package/README.md +38 -50
  3. package/RELEASE.md +61 -0
  4. package/assets/codex.svg +5 -0
  5. package/cordis.patch.yml +181 -6
  6. package/docs/preset-library.md +33 -23
  7. package/docs/tool-policy-benchmark.json +310 -0
  8. package/docs/tool-policy.md +148 -0
  9. package/lib/client.js +4774 -2416
  10. package/lib/compact-command.js +416 -0
  11. package/lib/compaction.js +141 -12
  12. package/lib/hybrid-executor.js +1196 -0
  13. package/lib/index.js +3658 -2334
  14. package/lib/preferences.js +117 -0
  15. package/lib/tool-policy.js +2422 -0
  16. package/lib/typert.js +86 -79
  17. package/lib/types/client/activity.d.ts +33 -9
  18. package/lib/types/client/activity.js +4 -3
  19. package/lib/types/client/desktop.d.ts +67 -0
  20. package/lib/types/client/desktop.js +229 -0
  21. package/lib/types/client/index.d.ts +207 -110
  22. package/lib/types/client/index.js +99 -492
  23. package/lib/types/client/policy-drafts.d.ts +25 -0
  24. package/lib/types/client/policy-drafts.js +47 -0
  25. package/lib/types/client/policy-locale.d.ts +260 -0
  26. package/lib/types/client/policy-locale.js +357 -0
  27. package/lib/types/client/preset-manager.d.ts +38 -10
  28. package/lib/types/client/preset-manager.js +235 -185
  29. package/lib/types/client/preset-requests.d.ts +12 -0
  30. package/lib/types/client/preset-requests.js +101 -0
  31. package/lib/types/client/tool-policy.d.ts +33 -0
  32. package/lib/types/client/tool-policy.js +336 -0
  33. package/lib/types/contracts/preset-editor-schema.d.ts +78 -0
  34. package/lib/types/contracts/preset-editor-schema.js +95 -0
  35. package/lib/types/{prompt.js → contracts/prompt.js} +13 -7
  36. package/lib/types/{settings.d.ts → contracts/settings.d.ts} +11 -4
  37. package/lib/types/{settings.js → contracts/settings.js} +22 -6
  38. package/lib/types/contracts/tool-policy-contract.d.ts +63 -0
  39. package/lib/types/contracts/tool-policy-contract.js +33 -0
  40. package/lib/types/contracts/ui-contracts.d.ts +92 -0
  41. package/lib/types/contracts/ui-contracts.js +83 -0
  42. package/lib/types/entries/client.d.ts +10 -0
  43. package/lib/types/entries/client.js +10 -0
  44. package/lib/types/{compact-command.d.ts → entries/compact-command.d.ts} +2 -0
  45. package/lib/types/entries/compact-command.js +176 -0
  46. package/lib/types/{compaction.d.ts → entries/compaction.d.ts} +15 -3
  47. package/lib/types/{compaction.js → entries/compaction.js} +47 -11
  48. package/lib/types/entries/hybrid-executor.d.ts +19 -0
  49. package/lib/types/entries/hybrid-executor.js +57 -0
  50. package/lib/types/entries/index.d.ts +66 -0
  51. package/lib/types/entries/index.js +192 -0
  52. package/lib/types/entries/preferences.d.ts +11 -0
  53. package/lib/types/entries/preferences.js +16 -0
  54. package/lib/types/entries/tool-policy.d.ts +97 -0
  55. package/lib/types/entries/tool-policy.js +158 -0
  56. package/lib/types/entries/typert.host.d.ts +23 -0
  57. package/lib/types/entries/typert.host.js +24 -0
  58. package/lib/types/hybrid/codex-hybrid-executor.d.ts +44 -0
  59. package/lib/types/hybrid/codex-hybrid-executor.js +257 -0
  60. package/lib/types/hybrid/hybrid-sdk.d.ts +13 -0
  61. package/lib/types/hybrid/hybrid-sdk.js +196 -0
  62. package/lib/types/hybrid/program-calls.d.ts +28 -0
  63. package/lib/types/hybrid/program-calls.js +193 -0
  64. package/lib/types/hybrid/subcall-scheduler.d.ts +90 -0
  65. package/lib/types/hybrid/subcall-scheduler.js +343 -0
  66. package/lib/types/policy/deferred-tools.d.ts +42 -0
  67. package/lib/types/policy/deferred-tools.js +264 -0
  68. package/lib/types/policy/overlay-installer.d.ts +12 -0
  69. package/lib/types/policy/overlay-installer.js +179 -0
  70. package/lib/types/policy/rule-resolver.d.ts +94 -0
  71. package/lib/types/policy/rule-resolver.js +114 -0
  72. package/lib/types/policy/tool-capabilities.d.ts +33 -0
  73. package/lib/types/policy/tool-capabilities.js +46 -0
  74. package/lib/types/{activity.d.ts → presets/activity.d.ts} +3 -5
  75. package/lib/types/{activity.js → presets/activity.js} +51 -27
  76. package/lib/types/presets/desktop-preset.d.ts +22 -0
  77. package/lib/types/presets/desktop-preset.js +43 -0
  78. package/lib/types/presets/preset-editor.d.ts +47 -0
  79. package/lib/types/presets/preset-editor.js +81 -0
  80. package/lib/types/presets/preset-prompt-catalog.d.ts +23 -0
  81. package/lib/types/presets/preset-prompt-catalog.js +215 -0
  82. package/lib/types/presets/preset-tool-catalog.d.ts +5 -0
  83. package/lib/types/presets/preset-tool-catalog.js +58 -0
  84. package/lib/types/presets/runtime-enhancements.d.ts +45 -0
  85. package/lib/types/presets/runtime-enhancements.js +349 -0
  86. package/lib/types/presets/small-window-compaction.d.ts +15 -0
  87. package/lib/types/presets/small-window-compaction.js +121 -0
  88. package/lib/types/responses/compact-checkpoint.d.ts +27 -0
  89. package/lib/types/responses/compact-checkpoint.js +257 -0
  90. package/lib/types/responses/fetch-transport.d.ts +16 -0
  91. package/lib/types/responses/fetch-transport.js +257 -0
  92. package/lib/types/responses/remote-compact.d.ts +13 -0
  93. package/lib/types/responses/remote-compact.js +319 -0
  94. package/lib/types/responses/sse-diagnostics.d.ts +9 -0
  95. package/lib/types/responses/sse-diagnostics.js +157 -0
  96. package/lib/types/responses/wire-rewrite.d.ts +35 -0
  97. package/lib/types/responses/wire-rewrite.js +237 -0
  98. package/lib/types/tools/exec-output.d.ts +58 -0
  99. package/lib/types/tools/exec-output.js +173 -0
  100. package/lib/types/tools/exec-plan-tools.d.ts +37 -0
  101. package/lib/types/tools/exec-plan-tools.js +265 -0
  102. package/lib/types/tools/exec-runner.d.ts +21 -0
  103. package/lib/types/tools/exec-runner.js +385 -0
  104. package/lib/types/tools/patch-tool.d.ts +16 -0
  105. package/lib/types/tools/patch-tool.js +258 -0
  106. package/lib/types/{patch.d.ts → tools/patch.d.ts} +1 -1
  107. package/lib/types/{patch.js → tools/patch.js} +96 -21
  108. package/locale/en.json +6 -0
  109. package/locale/hybrid-executor/en.json +6 -0
  110. package/locale/hybrid-executor/zh.json +6 -0
  111. package/locale/tool-policy/en.json +6 -0
  112. package/locale/tool-policy/zh.json +6 -0
  113. package/locale/zh.json +6 -0
  114. package/package.json +297 -299
  115. package/presets/{codex-collaboration → codex-hybrid}/agent.cordis.yml +45 -48
  116. package/presets/codex-hybrid/preset.yml +3 -0
  117. package/scripts/benchmark-tool-policy.mjs +186 -0
  118. package/scripts/build-preset.mjs +19 -0
  119. package/scripts/clean-build.mjs +11 -0
  120. package/src/client/activity.ts +83 -0
  121. package/src/client/desktop.tsx +276 -0
  122. package/src/client/index.tsx +391 -0
  123. package/src/client/policy-drafts.ts +56 -0
  124. package/src/client/policy-locale.ts +362 -0
  125. package/src/client/preset-manager.tsx +376 -0
  126. package/src/client/preset-requests.ts +113 -0
  127. package/src/client/tool-policy.tsx +402 -0
  128. package/src/contracts/preset-editor-schema.ts +110 -0
  129. package/src/contracts/prompt.ts +66 -0
  130. package/src/contracts/settings.ts +103 -0
  131. package/src/contracts/tool-policy-contract.ts +93 -0
  132. package/src/contracts/ui-contracts.ts +173 -0
  133. package/src/entries/client.tsx +14 -0
  134. package/src/entries/compact-command.ts +256 -0
  135. package/src/entries/compaction.ts +218 -0
  136. package/src/entries/hybrid-executor.ts +76 -0
  137. package/src/entries/index.ts +298 -0
  138. package/src/entries/preferences.ts +17 -0
  139. package/src/entries/tool-policy.ts +162 -0
  140. package/src/entries/typert.host.ts +29 -0
  141. package/src/hybrid/codex-hybrid-executor.ts +310 -0
  142. package/src/hybrid/hybrid-sdk.ts +217 -0
  143. package/src/hybrid/program-calls.ts +202 -0
  144. package/src/hybrid/subcall-scheduler.ts +446 -0
  145. package/src/policy/deferred-tools.ts +331 -0
  146. package/src/policy/overlay-installer.ts +191 -0
  147. package/src/policy/rule-resolver.ts +128 -0
  148. package/src/policy/tool-capabilities.ts +88 -0
  149. package/src/presets/activity.ts +146 -0
  150. package/src/presets/desktop-preset.ts +60 -0
  151. package/src/presets/preset-editor.ts +101 -0
  152. package/src/presets/preset-prompt-catalog.ts +221 -0
  153. package/src/presets/preset-tool-catalog.ts +58 -0
  154. package/src/presets/runtime-enhancements.ts +415 -0
  155. package/src/presets/small-window-compaction.ts +166 -0
  156. package/src/responses/compact-checkpoint.ts +264 -0
  157. package/src/responses/fetch-transport.ts +290 -0
  158. package/src/responses/remote-compact.ts +393 -0
  159. package/src/responses/sse-diagnostics.ts +156 -0
  160. package/src/responses/wire-rewrite.ts +261 -0
  161. package/src/tools/exec-output.ts +211 -0
  162. package/src/tools/exec-plan-tools.ts +307 -0
  163. package/src/tools/exec-runner.ts +445 -0
  164. package/src/tools/patch-tool.ts +331 -0
  165. package/src/tools/patch.ts +328 -0
  166. package/tsconfig.json +29 -0
  167. package/tsdown.config.ts +110 -0
  168. package/lib/installer.js +0 -237
  169. package/lib/invariant.js +0 -23
  170. package/lib/types/activity-types.d.ts +0 -6
  171. package/lib/types/activity-types.js +0 -3
  172. package/lib/types/client/preset-copy.d.ts +0 -42
  173. package/lib/types/client/preset-copy.js +0 -81
  174. package/lib/types/compact-command.js +0 -79
  175. package/lib/types/context.d.ts +0 -8
  176. package/lib/types/context.js +0 -14
  177. package/lib/types/exec.d.ts +0 -46
  178. package/lib/types/exec.js +0 -365
  179. package/lib/types/index.d.ts +0 -95
  180. package/lib/types/index.js +0 -738
  181. package/lib/types/installer.d.ts +0 -27
  182. package/lib/types/installer.js +0 -146
  183. package/lib/types/invariant.d.ts +0 -16
  184. package/lib/types/invariant.js +0 -22
  185. package/lib/types/preset-contract.d.ts +0 -69
  186. package/lib/types/preset-contract.js +0 -22
  187. package/lib/types/preset-editor-remote.d.ts +0 -30
  188. package/lib/types/preset-editor-remote.js +0 -37
  189. package/lib/types/preset-editor.d.ts +0 -69
  190. package/lib/types/preset-editor.js +0 -557
  191. package/lib/types/preset-templates.d.ts +0 -36
  192. package/lib/types/preset-templates.js +0 -12
  193. package/lib/types/prompt-sections.d.ts +0 -15
  194. package/lib/types/prompt-sections.js +0 -23
  195. package/lib/types/remote.d.ts +0 -40
  196. package/lib/types/remote.js +0 -683
  197. package/lib/types/typert.host.d.ts +0 -47
  198. package/lib/types/typert.host.js +0 -99
  199. package/presets/codex-collaboration/preset.yml +0 -3
  200. /package/lib/types/{prompt.d.ts → contracts/prompt.d.ts} +0 -0
@@ -1,14 +1,16 @@
1
- /** Browser controls for Codex requests and the editable operating prompt. */
1
+ /** Browser controls, /compact decorator, and live activity line for Codex Harness. */
2
2
  import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { Context } from '@deepseek-ai/cordis';
4
- import type { SettingsScope } from '@deepseek-ai/dsh-client-runtime/client';
5
- import type { CodexActivity } from '../activity-types.ts';
4
+ import type { CodexActivity, CodexConnectScope, CodexConnectSnapshot, ModelDirectorySnapshot, ModelDirectoryStore } from '../contracts/ui-contracts.ts';
6
5
  import { modelActivity } from './activity.ts';
6
+ import { ContextWindowControl } from './preset-manager.tsx';
7
7
  import type { PresetManagerActions } from './preset-manager.tsx';
8
- declare const LEGACY_OVERLAY_SLOT: "conversation.input.overlay";
9
- interface CodexSettings {
8
+ export { ContextWindowControl };
9
+ export type { CodexConnectScope, CodexConnectSnapshot, ModelDirectorySnapshot, ModelDirectoryStore };
10
+ export interface CodexSettings {
10
11
  fast: boolean;
11
12
  fastModeControlEnabled: boolean;
13
+ contextWindowControlEnabled: boolean;
12
14
  contextWindow?: number;
13
15
  persona?: string;
14
16
  harnessSourcePrompt?: string;
@@ -22,145 +24,240 @@ interface CodexSettings {
22
24
  remoteCompactionEnabled: boolean;
23
25
  activityIndicatorEnabled: boolean;
24
26
  }
25
- type CodexScope = SettingsScope<CodexSettings>;
27
+ /** Observable ConfigForms settings snapshot shared with the desktop adapter. */
28
+ export interface CodexSettingsSnapshot {
29
+ readonly status: string;
30
+ readonly value?: CodexSettings | undefined;
31
+ readonly base?: Partial<CodexSettings> | undefined;
32
+ readonly user?: Partial<CodexSettings> | undefined;
33
+ readonly revision?: number | string | undefined;
34
+ readonly writable: boolean;
35
+ }
36
+ export interface CodexScope extends HostObservable<CodexSettingsSnapshot> {
37
+ set(field: string, value: unknown): Promise<void>;
38
+ unset(field: string): Promise<void>;
39
+ }
26
40
  declare const en: {
27
41
  readonly fast: "Fast mode";
42
+ readonly fastModeControl: "Show fast mode control";
43
+ readonly contextWindowControl: "Show context window control";
28
44
  readonly fastOn: "Fast mode on (priority tier)";
29
45
  readonly fastOff: "Fast mode off";
30
46
  readonly fastStateOn: "On";
31
47
  readonly fastStateOff: "Off";
32
48
  readonly contextSize: "Context size";
33
- readonly contextSizeDescription: "Next request capacity in K tokens.";
34
- readonly contextRestore: "Restore model default";
35
- readonly promptCardTitle: "Codex Harness";
36
- readonly promptCardDescription: "Edit presets, Codex capabilities, and the operating prompt. Activity status is global.";
37
- readonly otherCapabilitiesLabel: "Global capabilities";
38
- readonly capabilityPrompt: "Codex operating prompt";
39
- readonly capabilityPromptHint: "Inject the editable instructions and persona-first prompt layout.";
49
+ readonly contextShortDefault: "Ctx";
50
+ readonly contextDefaultOption: "Default";
51
+ readonly contextCustomPlaceholder: "≥16k (e.g. 64)";
52
+ readonly contextApply: "Set";
40
53
  readonly compactRemote: "Remote compaction";
41
54
  readonly compactRemoteHint: "Use the provider remote compaction endpoint first.";
42
55
  readonly compactLocal: "Local compaction";
43
56
  readonly compactLocalHint: "Use the DSH text-summary compaction engine directly.";
44
- readonly capabilityTerminal: "Terminal tools";
45
- readonly capabilityTerminalHint: "Expose exec_command and write_stdin.";
46
- readonly capabilityPatch: "Patch tool";
47
- readonly capabilityPatchHint: "Expose apply_patch, using the native Responses grammar when supported.";
48
- readonly capabilityPlan: "Plan tool";
49
- readonly capabilityPlanHint: "Expose update_plan for implementation task tracking.";
50
- readonly capabilityWebSearch: "Hosted web search";
51
- readonly capabilityWebSearchHint: "Use the provider-native Responses web_search tool when available.";
52
- readonly capabilityCompaction: "Remote compaction";
53
- readonly capabilityCompactionHint: "Prefer the provider Responses compact endpoint before local compaction.";
54
57
  readonly capabilityActivity: "Activity indicator";
55
- readonly capabilityActivityHint: "Show request, reply, and compaction status beside the conversation.";
56
- readonly promptCustomizationLabel: "Prompt customization";
57
- readonly personaLabel: "Persona";
58
- readonly personaHint: "Deployment identity and role. Supports {{model}} and {{cwd}}.";
59
- readonly sourcePromptLabel: "DSH Core source instructions";
60
- readonly sourcePromptHint: "Guidance about the DSH checkout and working directory. Supports {{sourceRoot}}.";
61
- readonly webPromptLabel: "DSH Core Web instructions";
62
- readonly webPromptHint: "Guidance about this Web GUI, HMR, builds, and verification. Supports {{webUrl}}.";
63
- readonly promptRestoreAll: "Restore all prompt defaults";
64
- readonly promptLabel: "Codex operating prompt";
65
- readonly promptHint: "This is the Codex operating prompt. Persona and DSH Core instructions are edited separately above.";
66
- readonly promptUnsaved: "Unsaved";
67
58
  readonly promptDiscard: "Discard";
68
- readonly promptSave: "Save";
69
59
  readonly promptSaving: "Saving...";
70
- readonly promptSaveFailed: "Could not save the prompt.";
71
- readonly promptExpand: "Expand settings";
72
- readonly promptCollapse: "Collapse settings";
73
60
  readonly promptReadOnly: "This settings document is read-only.";
74
61
  readonly activityCompacting: "Compacting context...";
75
62
  readonly activityRequestingModel: "Requesting model...";
76
63
  readonly activityModelReply: "Model replying...";
77
- readonly peConnectionError: "Could not connect to the local service. Retry loading; if the connection still fails, reconnect the page.";
78
- readonly peReadError: "Could not read this preset. Retry loading or refresh the preset list.";
79
- readonly peRetryRead: "Retry loading";
80
- readonly peReconnect: "Reconnect page";
81
- readonly peSystemPrompt: "System prompt sections";
82
- readonly peSectionsHint: "These templates contribute to this preset’s system prompt before the tools. Runtime variables, workspace instructions and plugin-provided guidance are assembled when the conversation runs.";
83
- readonly peDynamicPrompt: "This field is an expression; it is preserved without executing it in the editor.";
84
- readonly peDshSourcePrompt: "Tells the agent where the DSH source checkout is and keeps it separate from the current workspace. It is used when inspecting or extending DSH itself.";
85
- readonly peDshWebPrompt: "Tells the agent which Web page it is talking through, what “this page” means, and when Web changes need a rebuild or refresh.";
86
- readonly peSuppressed: "Not used";
87
- readonly peCompletePersona: "This preset uses Persona as its entire system prompt, so this section is excluded.";
88
- readonly peLoading: "Reading preset…";
89
- readonly peTitle: "Preset editor";
90
- readonly peHierarchy: "Codex mode and other presets are peers. Choose one to edit, or make an editable copy of a built-in preset first.";
91
- readonly peSelect: "Preset";
92
- readonly peSelectPlaceholder: "Choose a preset…";
93
- readonly peEditable: "This is an editable user preset.";
94
- readonly peBuiltinEdit: "Built-in presets are read-only. Create a copy to edit it.";
95
- readonly peCreateCopy: "Create editable copy";
96
- readonly peCodexSection: "Codex mode capabilities";
97
- readonly peAddCodex: "Add Codex capabilities to this preset";
98
- readonly peAddCodexHint: "Adds the Codex prompt, tools, hosted search, and remote compaction to this preset.";
99
- readonly peActivityGlobal: "Activity status is a global display setting and is shared by all presets.";
100
- readonly peSaveCopy: "Save new preset";
101
- readonly peSaved: "Saved. Select this preset in a new conversation.";
102
- readonly pmGlobalSettings: "Global settings";
64
+ readonly settingsTabLabel: "Codex Harness";
65
+ readonly settingsToolsPage: "Preset plans";
66
+ readonly settingsRuntimePage: "Runtime preferences";
67
+ readonly settingsSubTools: "Tools";
68
+ readonly settingsPresetPrompts: "Prompts";
69
+ readonly settingsDefinition: "YAML";
70
+ readonly settingsPreferHostedSearch: "Prefer model-hosted search";
71
+ readonly settingsPreferRemoteCompaction: "Prefer remote compaction";
72
+ readonly settingsSharedFailed: "Not saved; this page’s draft is kept. Shared settings may have changed—discard this page’s draft to reload.";
73
+ readonly settingsRuntimeScope: "Shared in this environment";
74
+ readonly settingsSaveRuntime: "Save runtime preferences";
75
+ readonly settingsBundleSummary: "Configure Codex Harness in its dedicated Settings tab.";
76
+ readonly settingsBundlePath: "Settings → Plugins → Codex Harness";
77
+ readonly settingsDefinitionAbsent: "Choose a preset on Preset plans first.";
78
+ readonly globalGroupRequest: "Model requests";
79
+ readonly globalGroupDisplay: "Display";
80
+ readonly globalPending: "Unsaved";
81
+ readonly toolPolicyTitle: "Tool plan";
82
+ readonly toolPolicyPresetChoice: "Preset";
83
+ readonly toolPolicyInvalidEntry: "Empty preset ID";
84
+ readonly toolPolicyTiming: "Applies to new or reloaded sessions";
85
+ readonly presetPromptsLoading: "Loading prompts…";
86
+ readonly presetPromptsFailed: "Prompts unavailable.";
87
+ readonly presetPromptsEmpty: "No prompt sections.";
88
+ readonly presetPromptsReload: "Reload prompts";
89
+ readonly presetPromptRestore: "Restore original";
90
+ readonly presetPromptReadOnly: "Read-only";
91
+ readonly presetPromptOverride: "Override";
92
+ readonly presetSummaryTools: "Tools";
93
+ readonly presetSummaryPrompts: "Prompts";
94
+ readonly toolPolicyDraftSummary: "Pending changes";
95
+ readonly toolPolicyRuleChanged: "Preset changes";
96
+ readonly toolPolicyNoToolDelta: "No pending changes";
97
+ readonly toolPolicySearch: "Search tools";
98
+ readonly toolPolicyFilter: "Tool filter";
99
+ readonly toolPolicyAll: "All";
100
+ readonly toolPolicyModified: "Customized";
101
+ readonly toolPolicyDeferredFilter: "Deferred";
102
+ readonly toolPolicyReplaceable: "Replaceable";
103
+ readonly toolPolicyDefaultDeferred: "Default deferred";
104
+ readonly toolPolicyAction: "Tool action";
105
+ readonly toolPolicyKeep: "Enable";
106
+ readonly toolPolicyDefer: "Defer";
107
+ readonly toolPolicyDeferHint: "Defer loading until activated via activate_tools";
108
+ readonly toolPolicyHide: "Hide";
109
+ readonly toolPolicyReplaceShort: "Replace";
110
+ readonly toolPolicyRestoreChoice: "Restore default choice";
111
+ readonly toolPolicyUnsupported: "Saved replacement unavailable";
112
+ readonly toolPolicyConditional: "Conditional";
113
+ readonly toolPolicyTargetExists: "Replacement target already exists";
114
+ readonly toolPolicyPresetDisabled: "Disabled by original preset";
115
+ readonly toolPolicyCommandGroup: "Commands & runtime";
116
+ readonly toolPolicyFileGroup: "Files & search";
117
+ readonly toolPolicyPlanGroup: "Planning & interaction";
118
+ readonly toolPolicyCollabGroup: "Agents & workflows";
119
+ readonly toolPolicyOtherGroup: "Web & extensions";
120
+ readonly toolPolicyCustomized: "customized";
121
+ readonly toolLabelExec: "Run terminal command in Shell / PTY";
122
+ readonly toolLabelStdin: "Poll output or send stdin to interactive PTY";
123
+ readonly toolLabelPwsh: "Run PowerShell command";
124
+ readonly toolLabelBash: "Run Bash command";
125
+ readonly toolLabelRunCode: "Run SDK code in sandbox to batch tool calls";
126
+ readonly toolLabelJobList: "List running and finished background jobs";
127
+ readonly toolLabelJobOutput: "Read incremental output or result of a background job";
128
+ readonly toolLabelJobKill: "Stop a running background job";
129
+ readonly toolLabelTermOpen: "Open a persistent terminal session";
130
+ readonly toolLabelTermList: "List persistent terminal sessions";
131
+ readonly toolLabelTermRead: "Read output from a persistent terminal";
132
+ readonly toolLabelTermSend: "Send input to a persistent terminal";
133
+ readonly toolLabelTermSignal: "Send signal to a persistent terminal";
134
+ readonly toolLabelTermClose: "Close a persistent terminal session";
135
+ readonly toolLabelWorkdir: "Read or change working directory (cd)";
136
+ readonly toolLabelWorktree: "Create Git branch and worktree";
137
+ readonly toolLabelPatch: "Create, edit, delete, or move files via Codex patch";
138
+ readonly toolLabelRead: "Read UTF-8 text file with line numbers";
139
+ readonly toolLabelWrite: "Create or overwrite UTF-8 text file";
140
+ readonly toolLabelEdit: "Edit file by replacing literal text";
141
+ readonly toolLabelStrReplace: "View or edit files via str_replace commands";
142
+ readonly toolLabelGlob: "Find file paths by glob pattern";
143
+ readonly toolLabelGrep: "Search file contents with ripgrep regex";
144
+ readonly toolLabelImage: "Read PNG/JPEG/WebP/GIF image";
145
+ readonly toolLabelLsp: "Query LSP for definitions, references, and symbols";
146
+ readonly toolLabelPlan: "Update execution plan and step statuses";
147
+ readonly toolLabelTodo: "Write complete todo list";
148
+ readonly toolLabelExitPlan: "Submit Markdown plan to exit plan mode";
149
+ readonly toolLabelAskUser: "Ask structured questions to the user";
150
+ readonly toolLabelPresent: "Present deliverable files to the user";
151
+ readonly toolLabelProposeAction: "Propose action card for user approval";
152
+ readonly toolLabelApprove: "Approve action denied by Codex Auto-review";
153
+ readonly toolLabelSubagent: "Spawn isolated subagent for a subtask";
154
+ readonly toolLabelSubagentFork: "Fork subagent from current context";
155
+ readonly toolLabelSubagentCodex: "Delegate task to Codex subagent";
156
+ readonly toolLabelSubagentClaude: "Delegate task to Claude Code subagent";
157
+ readonly toolLabelSubagentOar: "Run experimental OAR subagent";
158
+ readonly toolLabelSubagentModels: "List available models for subagents";
159
+ readonly toolLabelSendMessage: "Send message to subagent or teammate";
160
+ readonly toolLabelListAgents: "List started subagents and statuses";
161
+ readonly toolLabelInterruptAgent: "Interrupt a running subagent";
162
+ readonly toolLabelWaitAgent: "Wait for subagent or teammate updates";
163
+ readonly toolLabelWorkflow: "Run multi-stage or parallel PTC workflow";
164
+ readonly toolLabelRalph: "Run iterative Ralph loop agent";
165
+ readonly toolLabelCreateGoal: "Create persistent session goal";
166
+ readonly toolLabelGetGoal: "Read current session goal";
167
+ readonly toolLabelUpdateGoal: "Update current session goal";
168
+ readonly toolLabelGoal: "Manage current session goal";
169
+ readonly toolLabelSpawnTeammate: "Spawn durable Team teammate";
170
+ readonly toolLabelTeamCreate: "Create task on shared Team board";
171
+ readonly toolLabelTeamGet: "Read latest shared Team task state";
172
+ readonly toolLabelTeamList: "List shared Team tasks and blockers";
173
+ readonly toolLabelTeamUpdate: "Update shared Team task with revision check";
174
+ readonly toolLabelWebSearch: "Search the web for current information";
175
+ readonly toolLabelWebFetch: "Fetch decoded text from HTTP(S) URL";
176
+ readonly toolLabelSkill: "Load full instructions for a skill";
177
+ readonly toolLabelActivateTools: "Activate deferred (deferLoading) tools";
178
+ readonly toolLabelSchedule: "Manage scheduled tasks";
179
+ readonly toolLabelScheduleCreate: "Create one-shot or cron schedule";
180
+ readonly toolLabelScheduleEdit: "Edit or toggle an existing schedule";
181
+ readonly toolLabelScheduleList: "List configured schedules";
182
+ readonly toolLabelScheduleView: "View schedule details and history";
183
+ readonly toolLabelPluginManager: "Manage plugins in current profile";
184
+ readonly toolLabelPluginMarket: "Browse plugin market indexes";
185
+ readonly toolLabelCordisList: "List Cordis Inspect Providers";
186
+ readonly toolLabelCordisQuery: "Run read-only Cordis Inspect query";
187
+ readonly toolLabelSessionSearch: "Search events across prior sessions";
188
+ readonly toolLabelSessionTrace: "Trace session lineage";
189
+ readonly toolLabelSessionEventRead: "Read full raw event from session";
190
+ readonly toolLabelSessionEventSearch: "Search events within a session";
191
+ readonly toolLabelSessionEventTrace: "Trace event replacements and citations";
192
+ readonly toolLabelMcpList: "List resources from MCP server";
193
+ readonly toolLabelMcpTemplates: "List URI templates from MCP server";
194
+ readonly toolLabelMcpRead: "Read MCP server resource by URI";
195
+ readonly toolLabelWorkspaceDeps: "Get bundled Python and library paths";
196
+ readonly toolLabelStagehandNav: "Navigate browser to URL (Stagehand)";
197
+ readonly toolLabelStagehandAct: "Perform page interaction (Stagehand)";
198
+ readonly toolLabelStagehandExtract: "Extract structured page data (Stagehand)";
199
+ readonly toolLabelStagehandObserve: "Observe interactive page elements (Stagehand)";
200
+ readonly toolLabelStagehandShot: "Capture browser screenshot (Stagehand)";
201
+ readonly toolLabelStagehandTabs: "Manage browser tabs (Stagehand)";
202
+ readonly toolLabelViewImage: "View local or HTTP(S) image (Codex Connect)";
203
+ readonly toolLabelCodexImageGen: "Generate or edit images via GPT Image (Codex Connect)";
204
+ readonly toolLabelCodexQuota: "Query shared Codex account quota (Codex Connect)";
205
+ readonly toolLabelMcpDynamic: "MCP server tool";
206
+ readonly toolLabelOther: "Other tool";
207
+ readonly toolPolicyToolsLoading: "Loading tools…";
208
+ readonly toolPolicyToolsEmpty: "No registered tools.";
209
+ readonly toolPolicyNoMatches: "No matching tools.";
210
+ readonly toolPolicyToolsFailed: "Tool list unavailable. Saved rules are kept.";
211
+ readonly toolPolicyToolsRefresh: "Refresh tools";
212
+ readonly toolPolicyCatalogLoading: "Loading presets…";
213
+ readonly toolPolicyCatalogEmpty: "No presets found.";
214
+ readonly toolPolicyCatalogFailed: "Preset list unavailable. Saved IDs remain selectable.";
215
+ readonly toolPolicyCatalogRetry: "Reload presets";
216
+ readonly toolPolicyEmpty: "Choose a preset";
217
+ readonly toolPolicySave: "Save preset";
218
+ readonly toolPolicySaving: "Saving…";
219
+ readonly toolPolicyDiscard: "Discard draft";
220
+ readonly toolPolicySaved: "Preset saved.";
221
+ readonly toolPolicyInvalidPreset: "An empty preset ID cannot be saved.";
222
+ readonly toolPolicyDuplicatePreset: "Duplicate preset IDs cannot be saved.";
223
+ readonly toolPolicyRefused: "Not saved. Draft started from older settings; discard draft to reload.";
224
+ readonly toolPolicyFailed: "Save failed. Draft is kept.";
225
+ readonly toolPolicyReadOnly: "These settings are read-only.";
103
226
  readonly pmRefresh: "Refresh";
104
- readonly pmBuiltIn: "Built-in";
105
- readonly pmCustom: "Custom";
106
- readonly pmDiscard: "Discard your unsaved changes?";
107
- readonly pmConflict: "This preset changed in another page or on disk. Reopen the latest version before saving.";
108
- readonly pmYamlError: "The configuration must be valid YAML. Your draft has not been saved.";
109
- readonly pmErrorDetails: "Technical details";
110
- readonly pmSaveError: "Could not complete this action. Your draft is still here.";
111
- readonly pmName: "Name";
112
- readonly pmDescription: "Description";
113
- readonly pmCancel: "Cancel";
114
- readonly pmSave: "Save changes";
227
+ readonly peLoading: "Loading preset…";
228
+ readonly peReadError: "Preset definition unavailable.";
115
229
  };
116
230
  type CodexKey = keyof typeof en;
117
231
  declare module '@deepseek-ai/dsh-client-ui-slots' {
118
232
  interface LocaleNamespaceMap {
119
233
  codex: CodexKey;
120
234
  }
121
- interface SlotMap {
122
- 'conversation.input.overlay': {
123
- kind: 'list';
124
- scope: 'session';
125
- };
126
- 'settings.plugin.item': {
127
- kind: 'keyed';
128
- scope: 'root';
129
- owner: {
130
- children?: never;
131
- };
132
- };
133
- }
134
235
  }
135
- interface InputSettingsControlInjected {
236
+ /** Show the fallback Fast toggle only when the session uses a non-Codex-Connect GPT model. */
237
+ export declare function isFallbackFastEligible(snapshot: ModelDirectorySnapshot | undefined, hasDirectory: boolean): boolean;
238
+ export interface InputSettingsControlInjected {
136
239
  hooks: {
137
240
  settings: HostObservable<ReturnType<CodexScope['getSnapshot']>>;
138
241
  };
139
242
  setSetting: (field: string, value: unknown) => Promise<void>;
140
243
  unsetSetting: (field: string) => Promise<void>;
141
244
  presetManager: PresetManagerActions;
245
+ modelDirectory?: ModelDirectoryStore | undefined;
246
+ getCodexConnectScope?: (() => CodexConnectScope | undefined) | undefined;
142
247
  }
143
- /** One editor per preset; only display preferences are global. */
144
- export declare function PromptSettingsCard(props: PropsRuntime<'settings.plugin.item'> & InjectFace<InputSettingsControlInjected> & PropsLocale<'codex'>): import("react").JSX.Element | null;
145
- type LegacyOverlayProps = PropsRuntime<typeof LEGACY_OVERLAY_SLOT> & InjectFace<InputSettingsControlInjected> & PropsLocale<'codex'>;
146
- type ActivityProps = Pick<LegacyOverlayProps, 'sessionId' | 'useSession' | 'useSessions' | 'useProjection' | 'useSettings' | 't'>;
248
+ type InputRightProps = Pick<PropsRuntime<'conversation.input.right'>, 'sessionId' | 'useSessions'> & InjectFace<InputSettingsControlInjected> & PropsLocale<'codex'>;
249
+ export declare function FastModeFallback(props: InputRightProps): import("react").JSX.Element | null;
250
+ export declare function ComposerControls(props: InputRightProps): import("react").JSX.Element;
251
+ type ActivityProps = PropsRuntime<'conversation.input.dock'> & InjectFace<InputSettingsControlInjected> & PropsLocale<'codex'>;
147
252
  type ActivityFallback = ReturnType<typeof modelActivity>;
148
- /** Prefer the session snapshot when an older projection host only exposes null. */
253
+ /** Prefer the session snapshot when a projection has not emitted an open phase yet. */
149
254
  export declare function resolveActivity(projectedActivity: CodexActivity | null | undefined, fallbackActivity: ActivityFallback): CodexActivity | null;
150
- export declare function ActivityLine({ sessionId: _sessionId, useSession, useSessions: _useSessions, useProjection, useSettings, t, position, }: ActivityProps & {
151
- position?: {
152
- left: number;
153
- top: number;
154
- };
155
- }): import("react").JSX.Element | null;
156
- /** Prefer the actual Core turn status over unrelated global status nodes. */
157
- export declare function selectTurnStatus(statuses: readonly HTMLElement[]): HTMLElement | null;
158
- export declare const inject: string[];
255
+ export declare function ActivityLine({ sessionId: _sessionId, useSession, useSessions: _useSessions, useProjection, useSettings, t, }: ActivityProps): import("react").JSX.Element | null;
159
256
  /** Mount request controls and the plugin settings card through shared slots. */
160
- export declare function apply(ctx: Context): void;
161
- declare const _default: {
162
- inject: string[];
163
- apply: typeof apply;
164
- };
165
- export default _default;
257
+ export interface ClientSettingsApi {
258
+ bind(ctx: Context): CodexScope;
259
+ getCodexConnectScope?: () => CodexConnectScope | undefined;
260
+ register(ctx: Context, settings: CodexScope, manager: PresetManagerActions): () => void;
261
+ }
262
+ export declare function applyWithSettingsApi(ctx: Context, api: ClientSettingsApi): void;
166
263
  //# sourceMappingURL=index.d.ts.map