@shuind/dsh-codex-harness 0.3.2 → 0.3.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/CHANGELOG.md +17 -0
- package/README.md +21 -41
- package/docs/preset-library.md +2 -2
- package/docs/tool-policy.md +1 -1
- package/lib/client.js +1826 -545
- package/lib/compact-command.js +7 -1
- package/lib/compaction.js +7 -1
- package/lib/hybrid-executor.js +23 -12
- package/lib/index.js +1229 -17
- package/lib/preferences.js +21 -2
- package/lib/tool-policy.js +11 -2
- package/lib/typert.js +42 -1
- package/lib/types/client/desktop.d.ts +20 -42
- package/lib/types/client/desktop.js +184 -127
- package/lib/types/client/index.d.ts +104 -39
- package/lib/types/client/index.js +97 -15
- package/lib/types/client/policy-drafts.d.ts +18 -0
- package/lib/types/client/policy-drafts.js +27 -0
- package/lib/types/client/policy-locale.d.ts +81 -32
- package/lib/types/client/policy-locale.js +197 -107
- package/lib/types/client/preset-manager.d.ts +25 -2
- package/lib/types/client/preset-manager.js +89 -5
- package/lib/types/client/preset-requests.d.ts +44 -1
- package/lib/types/client/preset-requests.js +150 -0
- package/lib/types/client/tool-policy.d.ts +6 -15
- package/lib/types/client/tool-policy.js +24 -39
- package/lib/types/contracts/preset-editor-schema.d.ts +35 -0
- package/lib/types/contracts/preset-editor-schema.js +39 -0
- package/lib/types/contracts/settings.d.ts +12 -0
- package/lib/types/contracts/settings.js +10 -1
- package/lib/types/contracts/ui-contracts.d.ts +48 -0
- package/lib/types/contracts/ui-contracts.js +58 -0
- package/lib/types/contracts/update.d.ts +73 -0
- package/lib/types/contracts/update.js +291 -0
- package/lib/types/entries/index.js +20 -2
- package/lib/types/entries/preferences.d.ts +2 -0
- package/lib/types/entries/preferences.js +9 -0
- package/lib/types/hybrid/hybrid-sdk.d.ts +1 -1
- package/lib/types/hybrid/hybrid-sdk.js +27 -13
- package/lib/types/presets/preset-editor.d.ts +13 -1
- package/lib/types/presets/preset-editor.js +24 -1
- package/lib/types/presets/pro-mode-store.d.ts +13 -0
- package/lib/types/presets/pro-mode-store.js +69 -0
- package/lib/types/responses/background-sse-codec.d.ts +23 -0
- package/lib/types/responses/background-sse-codec.js +230 -0
- package/lib/types/responses/background-stream.d.ts +28 -0
- package/lib/types/responses/background-stream.js +351 -0
- package/lib/types/responses/fetch-transport.js +24 -9
- package/lib/types/responses/wire-rewrite.d.ts +4 -0
- package/lib/types/responses/wire-rewrite.js +30 -4
- package/lib/types/tools/codex-subagent.d.ts +14 -0
- package/lib/types/tools/codex-subagent.js +269 -0
- package/lib/types/update/checker.d.ts +14 -0
- package/lib/types/update/checker.js +166 -0
- package/locale/en.json +1 -1
- package/locale/hybrid-executor/en.json +1 -1
- package/locale/hybrid-executor/zh.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +6 -2
- package/src/client/desktop.tsx +359 -160
- package/src/client/index.tsx +122 -22
- package/src/client/policy-drafts.ts +45 -0
- package/src/client/policy-locale.ts +198 -106
- package/src/client/preset-manager.tsx +125 -4
- package/src/client/preset-requests.ts +185 -1
- package/src/client/tool-policy.tsx +29 -63
- package/src/contracts/preset-editor-schema.ts +44 -0
- package/src/contracts/settings.ts +20 -1
- package/src/contracts/ui-contracts.ts +87 -0
- package/src/contracts/update.ts +307 -0
- package/src/entries/index.ts +25 -2
- package/src/entries/preferences.ts +9 -0
- package/src/hybrid/hybrid-sdk.ts +28 -12
- package/src/presets/preset-editor.ts +31 -3
- package/src/presets/pro-mode-store.ts +80 -0
- package/src/responses/background-sse-codec.ts +237 -0
- package/src/responses/background-stream.ts +371 -0
- package/src/responses/fetch-transport.ts +28 -9
- package/src/responses/wire-rewrite.ts +34 -3
- package/src/tools/codex-subagent.ts +290 -0
- package/src/update/checker.ts +193 -0
- package/tsdown.config.ts +4 -0
|
@@ -3,18 +3,68 @@ import type { PresetToolEntry } from '../contracts/tool-policy-contract.ts';
|
|
|
3
3
|
export declare const toolPolicyEn: {
|
|
4
4
|
readonly settingsTabLabel: "Codex Harness";
|
|
5
5
|
readonly settingsToolsPage: "Preset plans";
|
|
6
|
-
readonly settingsRuntimePage: "
|
|
6
|
+
readonly settingsRuntimePage: "Global settings";
|
|
7
|
+
readonly settingsHelpPage: "Guide";
|
|
8
|
+
readonly helpFaqHeading: "Quick answers";
|
|
9
|
+
readonly helpDeferDisabledTitle: "Why is Defer greyed out on some tools?";
|
|
10
|
+
readonly helpDeferDisabledDesc: "Already deferred; hide it if you’re sure you won’t use it.";
|
|
11
|
+
readonly helpDeferLifecycleTitle: "What is Defer for?";
|
|
12
|
+
readonly helpDeferLifecycleDesc: "Saves context—loaded on demand and reclaimed after context compaction.";
|
|
13
|
+
readonly helpNativeSearchTitle: "Prefer native search?";
|
|
14
|
+
readonly helpNativeSearchDesc: "On uses OpenAI built-in search (billed per search on API); off reuses subscription search.";
|
|
15
|
+
readonly helpConnectHeading: "Works with Codex Connect";
|
|
16
|
+
readonly helpRegistrationScopeTitle: "Global subscription search, images & subagent";
|
|
17
|
+
readonly helpRegistrationScopeDesc: "Turn on in Global settings to share Codex Connect search, image generation, and codex_subagent across all tool-capable models; override per preset.";
|
|
18
|
+
readonly helpProComboTitle: "API Pro + subscription subagents + subscription search";
|
|
19
|
+
readonly helpProComboDesc: "Use Pro plan API credits on GPT-5.6/6+ with the composer Pro toggle (only shown on API-key GPT-5.6/6+, current chat only); route subagents and web search to Codex subscription (saves API)—taste Pro freed from the web cage.";
|
|
20
|
+
readonly helpConnectContextTitle: "Context window & compaction sync";
|
|
21
|
+
readonly helpConnectContextDesc: "The composer context button syncs Codex Connect model limits; Prefer remote compaction stays in sync too.";
|
|
22
|
+
readonly helpConnectLinkLabel: "Companion plugin";
|
|
23
|
+
readonly helpUpdateHeading: "Version & updates";
|
|
24
|
+
readonly updateHeading: "Codex Harness update";
|
|
25
|
+
readonly updateBadge: "Update";
|
|
26
|
+
readonly updateAvailable: "Update available";
|
|
27
|
+
readonly updateUpToDate: "Up to date";
|
|
28
|
+
readonly updateChecking: "Checking…";
|
|
29
|
+
readonly updateUnavailable: "Check failed";
|
|
30
|
+
readonly updateCheckNow: "Check updates";
|
|
31
|
+
readonly updateOpenRelease: "View release";
|
|
32
|
+
readonly updateDismiss: "Dismiss update notice";
|
|
33
|
+
readonly updateHowTo: "Update from the DSH Plugin Market, or reinstall @shuind/dsh-codex-harness@latest.";
|
|
7
34
|
readonly settingsSubTools: "Tools";
|
|
8
35
|
readonly settingsPresetPrompts: "Prompts";
|
|
9
36
|
readonly settingsDefinition: "YAML";
|
|
10
|
-
readonly settingsPreferHostedSearch: "Prefer
|
|
37
|
+
readonly settingsPreferHostedSearch: "Prefer native search";
|
|
11
38
|
readonly settingsPreferRemoteCompaction: "Prefer remote compaction";
|
|
12
|
-
readonly settingsSharedFailed: "
|
|
13
|
-
readonly settingsRuntimeScope: "Shared in this environment";
|
|
14
|
-
readonly
|
|
39
|
+
readonly settingsSharedFailed: "Save failed. Settings may have changed—please try again.";
|
|
40
|
+
readonly settingsRuntimeScope: "Shared across all presets in this environment.";
|
|
41
|
+
readonly capabilitiesConnectHeading: "Subscription global registrations";
|
|
42
|
+
readonly capabilitiesConnectCollapsedTitle: "Codex Connect subscription features";
|
|
43
|
+
readonly capabilitiesConnectInstallHint: "Install Codex Connect to share subscription web search, image generation, and subagents across all models.";
|
|
44
|
+
readonly capabilitiesConnectNote: "Registered live via Codex Connect for all models. Adjust per preset in Preset plans.";
|
|
45
|
+
readonly capabilitySearchTitle: "Subscription web search";
|
|
46
|
+
readonly capabilitySearchNoteAll: "Reused by all models.";
|
|
47
|
+
readonly capabilitySearchNoteFallback: "GPT sessions prefer native search; other models reuse this.";
|
|
48
|
+
readonly capabilityImageTitle: "Subscription image generation";
|
|
49
|
+
readonly capabilityImageNote: "Registered globally for all tool-capable models.";
|
|
50
|
+
readonly capabilitySubagentTitle: "Subscription subagent";
|
|
51
|
+
readonly capabilitySubagentNote: "Registered globally so any tool-capable model can delegate tasks to a Codex subscription subagent.";
|
|
52
|
+
readonly capabilitySubagentModel: "Model";
|
|
53
|
+
readonly capabilitySubagentNoModels: "No enabled models";
|
|
54
|
+
readonly capabilitySubagentRestart: "Restart DSH required";
|
|
55
|
+
readonly capabilitySubagentEffort: "Effort";
|
|
56
|
+
readonly capabilitySubagentEffortDefault: "Default";
|
|
57
|
+
readonly capabilitySubagentPreset: "Preset";
|
|
58
|
+
readonly capabilitySubagentPresetHybrid: "Codex hybrid";
|
|
59
|
+
readonly capabilitySubagentPresetInherit: "Follow current chat";
|
|
60
|
+
readonly capabilityRegistered: "Registered";
|
|
61
|
+
readonly capabilityNotRegistered: "Not registered";
|
|
62
|
+
readonly capabilityUnavailable: "Codex Connect unavailable";
|
|
63
|
+
readonly capabilityLoading: "Loading registration status…";
|
|
64
|
+
readonly capabilityWriteFailed: "Failed to update registration.";
|
|
15
65
|
readonly settingsBundleSummary: "Configure Codex Harness in its dedicated Settings tab.";
|
|
16
66
|
readonly settingsBundlePath: "Settings → Plugins → Codex Harness";
|
|
17
|
-
readonly settingsDefinitionAbsent: "Choose a preset
|
|
67
|
+
readonly settingsDefinitionAbsent: "Choose a preset first.";
|
|
18
68
|
readonly globalGroupRequest: "Model requests";
|
|
19
69
|
readonly globalGroupDisplay: "Display";
|
|
20
70
|
readonly globalPending: "Unsaved";
|
|
@@ -44,25 +94,22 @@ export declare const toolPolicyEn: {
|
|
|
44
94
|
readonly toolPolicyAction: "Tool action";
|
|
45
95
|
readonly toolPolicyKeep: "Enable";
|
|
46
96
|
readonly toolPolicyDefer: "Defer";
|
|
47
|
-
readonly toolPolicyDeferHint: "
|
|
97
|
+
readonly toolPolicyDeferHint: "Load on demand via activate_tools";
|
|
48
98
|
readonly toolPolicyHide: "Hide";
|
|
49
99
|
readonly toolPolicyReplaceShort: "Replace";
|
|
50
|
-
readonly toolPolicyRestoreChoice: "Restore default
|
|
100
|
+
readonly toolPolicyRestoreChoice: "Restore default";
|
|
51
101
|
readonly toolPolicyUnsupported: "Saved replacement unavailable";
|
|
52
102
|
readonly toolPolicyConditional: "Conditional";
|
|
53
103
|
readonly toolPolicyTargetExists: "Replacement target already exists";
|
|
54
104
|
readonly toolPolicyPresetDisabled: "Disabled by original preset";
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly toolPolicyGptCompactionDesc: "Server-side native context compaction (GPT sessions only; falls back to local summary on failure)";
|
|
64
|
-
readonly toolPolicyGptCompactionBadge: "GPT native compaction";
|
|
65
|
-
readonly toolPolicyGptCompactionReadOnly: "Non-tool · Runtime preference";
|
|
105
|
+
readonly toolPolicyGptHostedSearch: "GPT native search";
|
|
106
|
+
readonly toolPolicyGptHostedSearchTitle: "GPT sessions prefer OpenAI native search (set in Global settings).";
|
|
107
|
+
readonly toolPolicyGptCodexSearch: "Codex Connect";
|
|
108
|
+
readonly toolPolicyGptCodexSearchTitle: "Registered globally by Codex Connect (manage in Global settings).";
|
|
109
|
+
readonly toolPolicyGptDualSearch: "GPT native / Codex Connect";
|
|
110
|
+
readonly toolPolicyGptDualSearchTitle: "GPT sessions prefer native search; other models reuse Codex Connect search.";
|
|
111
|
+
readonly toolPolicyGptImageTitle: "Registered globally by Codex Connect (manage in Global settings).";
|
|
112
|
+
readonly toolPolicyGptSubagentTitle: "Registered globally using Codex Connect subscription model (manage in Global settings).";
|
|
66
113
|
readonly toolPolicyCommandGroup: "Commands & runtime";
|
|
67
114
|
readonly toolPolicyFileGroup: "Files & search";
|
|
68
115
|
readonly toolPolicyPlanGroup: "Planning & interaction";
|
|
@@ -104,6 +151,7 @@ export declare const toolPolicyEn: {
|
|
|
104
151
|
readonly toolLabelSubagent: "Spawn isolated subagent for a subtask";
|
|
105
152
|
readonly toolLabelSubagentFork: "Fork subagent from current context";
|
|
106
153
|
readonly toolLabelSubagentCodex: "Delegate task to Codex subagent";
|
|
154
|
+
readonly toolLabelCodexSubagent: "Delegate task to Codex subscription subagent";
|
|
107
155
|
readonly toolLabelSubagentClaude: "Delegate task to Claude Code subagent";
|
|
108
156
|
readonly toolLabelSubagentOar: "Run experimental OAR subagent";
|
|
109
157
|
readonly toolLabelSubagentModels: "List available models for subagents";
|
|
@@ -122,8 +170,8 @@ export declare const toolPolicyEn: {
|
|
|
122
170
|
readonly toolLabelTeamGet: "Read latest shared Team task state";
|
|
123
171
|
readonly toolLabelTeamList: "List shared Team tasks and blockers";
|
|
124
172
|
readonly toolLabelTeamUpdate: "Update shared Team task with revision check";
|
|
125
|
-
readonly toolLabelWebSearch: "Search the web
|
|
126
|
-
readonly toolLabelWebFetch: "Fetch
|
|
173
|
+
readonly toolLabelWebSearch: "Search the web";
|
|
174
|
+
readonly toolLabelWebFetch: "Fetch text from HTTP(S) URL";
|
|
127
175
|
readonly toolLabelSkill: "Load full instructions for a skill";
|
|
128
176
|
readonly toolLabelActivateTools: "Activate deferred (deferLoading) tools";
|
|
129
177
|
readonly toolLabelSchedule: "Manage scheduled tasks";
|
|
@@ -150,37 +198,37 @@ export declare const toolPolicyEn: {
|
|
|
150
198
|
readonly toolLabelStagehandObserve: "Observe interactive page elements (Stagehand)";
|
|
151
199
|
readonly toolLabelStagehandShot: "Capture browser screenshot (Stagehand)";
|
|
152
200
|
readonly toolLabelStagehandTabs: "Manage browser tabs (Stagehand)";
|
|
153
|
-
readonly toolLabelViewImage: "View local or HTTP(S) image
|
|
154
|
-
readonly toolLabelCodexImageGen: "Generate or edit images
|
|
155
|
-
readonly toolLabelCodexQuota: "Query
|
|
201
|
+
readonly toolLabelViewImage: "View local or HTTP(S) image";
|
|
202
|
+
readonly toolLabelCodexImageGen: "Generate or edit images";
|
|
203
|
+
readonly toolLabelCodexQuota: "Query Codex account quota";
|
|
156
204
|
readonly toolLabelMcpDynamic: "MCP server tool";
|
|
157
205
|
readonly toolLabelOther: "Other tool";
|
|
158
206
|
readonly toolPolicyToolsLoading: "Loading tools…";
|
|
159
207
|
readonly toolPolicyToolsEmpty: "No registered tools.";
|
|
160
208
|
readonly toolPolicyNoMatches: "No matching tools.";
|
|
161
|
-
readonly toolPolicyToolsFailed: "
|
|
209
|
+
readonly toolPolicyToolsFailed: "Could not load tools; saved rules are kept.";
|
|
162
210
|
readonly toolPolicyToolsRefresh: "Refresh tools";
|
|
163
211
|
readonly toolPolicyCatalogLoading: "Loading presets…";
|
|
164
212
|
readonly toolPolicyCatalogEmpty: "No presets found.";
|
|
165
|
-
readonly toolPolicyCatalogFailed: "
|
|
213
|
+
readonly toolPolicyCatalogFailed: "Could not load presets; saved IDs remain selectable.";
|
|
166
214
|
readonly toolPolicyCatalogRetry: "Reload presets";
|
|
167
215
|
readonly toolPolicyEmpty: "Choose a preset";
|
|
168
|
-
readonly toolPolicySave: "Save
|
|
216
|
+
readonly toolPolicySave: "Save";
|
|
169
217
|
readonly toolPolicySaving: "Saving…";
|
|
170
218
|
readonly toolPolicyDiscard: "Discard draft";
|
|
171
|
-
readonly toolPolicySaved: "
|
|
219
|
+
readonly toolPolicySaved: "Saved.";
|
|
172
220
|
readonly toolPolicyInvalidPreset: "An empty preset ID cannot be saved.";
|
|
173
221
|
readonly toolPolicyDuplicatePreset: "Duplicate preset IDs cannot be saved.";
|
|
174
|
-
readonly toolPolicyRefused: "
|
|
222
|
+
readonly toolPolicyRefused: "Save conflict. Discard draft to reload.";
|
|
175
223
|
readonly toolPolicyFailed: "Save failed. Draft is kept.";
|
|
176
|
-
readonly toolPolicyReadOnly: "
|
|
224
|
+
readonly toolPolicyReadOnly: "Settings are read-only.";
|
|
177
225
|
readonly pmRefresh: "Refresh";
|
|
178
226
|
readonly peLoading: "Loading preset…";
|
|
179
227
|
readonly peReadError: "Preset definition unavailable.";
|
|
180
228
|
};
|
|
181
229
|
export declare const toolPolicyZh: Record<keyof typeof toolPolicyEn, string>;
|
|
182
|
-
export type ToolGroupId = '
|
|
183
|
-
export declare function groupOf(tool: PresetToolEntry
|
|
230
|
+
export type ToolGroupId = 'command' | 'file' | 'plan' | 'collab' | 'other';
|
|
231
|
+
export declare function groupOf(tool: PresetToolEntry): ToolGroupId;
|
|
184
232
|
export declare const humanLabels: {
|
|
185
233
|
readonly exec_command: "toolLabelExec";
|
|
186
234
|
readonly write_stdin: "toolLabelStdin";
|
|
@@ -217,6 +265,7 @@ export declare const humanLabels: {
|
|
|
217
265
|
readonly subagent: "toolLabelSubagent";
|
|
218
266
|
readonly subagent_fork: "toolLabelSubagentFork";
|
|
219
267
|
readonly subagent_codex: "toolLabelSubagentCodex";
|
|
268
|
+
readonly codex_subagent: "toolLabelCodexSubagent";
|
|
220
269
|
readonly subagent_claude_code: "toolLabelSubagentClaude";
|
|
221
270
|
readonly subagent_oar: "toolLabelSubagentOar";
|
|
222
271
|
readonly list_subagent_models: "toolLabelSubagentModels";
|