@shuind/dsh-codex-harness 0.2.32-dsh-v0.2.2-rc.1 → 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 (220) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +37 -59
  3. package/RELEASE.md +1 -1
  4. package/cordis.patch.yml +42 -11
  5. package/docs/preset-library.md +6 -12
  6. package/docs/tool-policy-benchmark.json +89 -89
  7. package/docs/tool-policy.md +11 -7
  8. package/lib/client.js +3780 -2950
  9. package/lib/compact-command.js +416 -0
  10. package/lib/compaction.js +129 -15
  11. package/lib/hybrid-executor.js +1196 -0
  12. package/lib/index.js +3554 -2841
  13. package/lib/preferences.js +17 -11
  14. package/lib/tool-policy.js +1930 -1743
  15. package/lib/typert.js +49 -89
  16. package/lib/types/client/activity.js +4 -3
  17. package/lib/types/client/desktop.d.ts +26 -2
  18. package/lib/types/client/desktop.js +143 -35
  19. package/lib/types/client/index.d.ts +136 -129
  20. package/lib/types/client/index.js +92 -466
  21. package/lib/types/client/policy-drafts.d.ts +1 -1
  22. package/lib/types/client/policy-locale.d.ts +260 -0
  23. package/lib/types/client/policy-locale.js +357 -0
  24. package/lib/types/client/preset-manager.d.ts +33 -15
  25. package/lib/types/client/preset-manager.js +220 -215
  26. package/lib/types/client/preset-requests.d.ts +2 -2
  27. package/lib/types/client/tool-policy.d.ts +6 -93
  28. package/lib/types/client/tool-policy.js +85 -143
  29. package/lib/types/contracts/preset-editor-schema.d.ts +78 -0
  30. package/lib/types/contracts/preset-editor-schema.js +95 -0
  31. package/lib/types/{prompt.js → contracts/prompt.js} +9 -5
  32. package/lib/types/{settings.d.ts → contracts/settings.d.ts} +8 -1
  33. package/lib/types/{settings.js → contracts/settings.js} +19 -3
  34. package/lib/types/{tool-policy-contract.d.ts → contracts/tool-policy-contract.d.ts} +9 -6
  35. package/lib/types/{tool-policy-contract.js → contracts/tool-policy-contract.js} +9 -2
  36. package/lib/types/contracts/ui-contracts.d.ts +92 -0
  37. package/lib/types/contracts/ui-contracts.js +83 -0
  38. package/lib/types/{client/entry.d.ts → entries/client.d.ts} +2 -2
  39. package/lib/types/{client/entry.js → entries/client.js} +2 -4
  40. package/lib/types/{compact-command.d.ts → entries/compact-command.d.ts} +2 -0
  41. package/lib/types/entries/compact-command.js +176 -0
  42. package/lib/types/{compaction.d.ts → entries/compaction.d.ts} +12 -0
  43. package/lib/types/{compaction.js → entries/compaction.js} +43 -11
  44. package/lib/types/entries/hybrid-executor.d.ts +19 -0
  45. package/lib/types/entries/hybrid-executor.js +57 -0
  46. package/lib/types/entries/index.d.ts +66 -0
  47. package/lib/types/entries/index.js +192 -0
  48. package/lib/types/{preferences.d.ts → entries/preferences.d.ts} +1 -1
  49. package/lib/types/{preferences.js → entries/preferences.js} +1 -1
  50. package/lib/types/entries/tool-policy.d.ts +97 -0
  51. package/lib/types/entries/tool-policy.js +158 -0
  52. package/lib/types/entries/typert.host.d.ts +23 -0
  53. package/lib/types/entries/typert.host.js +24 -0
  54. package/lib/types/hybrid/codex-hybrid-executor.d.ts +44 -0
  55. package/lib/types/hybrid/codex-hybrid-executor.js +257 -0
  56. package/lib/types/hybrid/hybrid-sdk.d.ts +13 -0
  57. package/lib/types/hybrid/hybrid-sdk.js +196 -0
  58. package/lib/types/hybrid/program-calls.d.ts +28 -0
  59. package/lib/types/hybrid/program-calls.js +193 -0
  60. package/lib/types/hybrid/subcall-scheduler.d.ts +90 -0
  61. package/lib/types/hybrid/subcall-scheduler.js +343 -0
  62. package/lib/types/policy/deferred-tools.d.ts +42 -0
  63. package/lib/types/policy/deferred-tools.js +264 -0
  64. package/lib/types/policy/overlay-installer.d.ts +12 -0
  65. package/lib/types/policy/overlay-installer.js +179 -0
  66. package/lib/types/policy/rule-resolver.d.ts +94 -0
  67. package/lib/types/policy/rule-resolver.js +114 -0
  68. package/lib/types/{tool-capabilities.d.ts → policy/tool-capabilities.d.ts} +3 -2
  69. package/lib/types/{tool-capabilities.js → policy/tool-capabilities.js} +6 -2
  70. package/lib/types/{activity.d.ts → presets/activity.d.ts} +2 -4
  71. package/lib/types/{activity.js → presets/activity.js} +2 -14
  72. package/lib/types/{desktop-preset.d.ts → presets/desktop-preset.d.ts} +3 -1
  73. package/lib/types/{desktop-preset.js → presets/desktop-preset.js} +6 -2
  74. package/lib/types/presets/preset-editor.d.ts +47 -0
  75. package/lib/types/presets/preset-editor.js +81 -0
  76. package/lib/types/{preset-prompt-catalog.d.ts → presets/preset-prompt-catalog.d.ts} +3 -1
  77. package/lib/types/{preset-prompt-catalog.js → presets/preset-prompt-catalog.js} +27 -4
  78. package/lib/types/{preset-tool-catalog.d.ts → presets/preset-tool-catalog.d.ts} +1 -1
  79. package/lib/types/{preset-tool-catalog.js → presets/preset-tool-catalog.js} +11 -4
  80. package/lib/types/presets/runtime-enhancements.d.ts +45 -0
  81. package/lib/types/presets/runtime-enhancements.js +349 -0
  82. package/lib/types/presets/small-window-compaction.d.ts +15 -0
  83. package/lib/types/presets/small-window-compaction.js +121 -0
  84. package/lib/types/responses/compact-checkpoint.d.ts +27 -0
  85. package/lib/types/responses/compact-checkpoint.js +257 -0
  86. package/lib/types/responses/fetch-transport.d.ts +16 -0
  87. package/lib/types/responses/fetch-transport.js +257 -0
  88. package/lib/types/responses/remote-compact.d.ts +13 -0
  89. package/lib/types/responses/remote-compact.js +319 -0
  90. package/lib/types/responses/sse-diagnostics.d.ts +9 -0
  91. package/lib/types/responses/sse-diagnostics.js +157 -0
  92. package/lib/types/responses/wire-rewrite.d.ts +35 -0
  93. package/lib/types/responses/wire-rewrite.js +237 -0
  94. package/lib/types/tools/exec-output.d.ts +58 -0
  95. package/lib/types/tools/exec-output.js +173 -0
  96. package/lib/types/tools/exec-plan-tools.d.ts +37 -0
  97. package/lib/types/tools/exec-plan-tools.js +265 -0
  98. package/lib/types/tools/exec-runner.d.ts +21 -0
  99. package/lib/types/tools/exec-runner.js +385 -0
  100. package/lib/types/tools/patch-tool.d.ts +16 -0
  101. package/lib/types/tools/patch-tool.js +258 -0
  102. package/lib/types/{patch.d.ts → tools/patch.d.ts} +1 -1
  103. package/lib/types/{patch.js → tools/patch.js} +96 -21
  104. package/locale/hybrid-executor/en.json +6 -0
  105. package/locale/hybrid-executor/zh.json +6 -0
  106. package/package.json +211 -289
  107. package/presets/{codex-collaboration → codex-hybrid}/agent.cordis.yml +45 -48
  108. package/presets/codex-hybrid/preset.yml +3 -0
  109. package/scripts/benchmark-tool-policy.mjs +3 -3
  110. package/scripts/build-preset.mjs +5 -5
  111. package/src/client/activity.ts +4 -3
  112. package/src/client/desktop.tsx +165 -51
  113. package/src/client/index.tsx +128 -709
  114. package/src/client/policy-drafts.ts +1 -1
  115. package/src/client/policy-locale.ts +362 -0
  116. package/src/client/preset-manager.tsx +331 -236
  117. package/src/client/preset-requests.ts +2 -2
  118. package/src/client/tool-policy.tsx +225 -203
  119. package/src/contracts/preset-editor-schema.ts +110 -0
  120. package/src/{prompt.ts → contracts/prompt.ts} +9 -5
  121. package/src/{settings.ts → contracts/settings.ts} +27 -3
  122. package/src/{tool-policy-contract.ts → contracts/tool-policy-contract.ts} +24 -7
  123. package/src/contracts/ui-contracts.ts +173 -0
  124. package/src/{client/entry.tsx → entries/client.tsx} +2 -4
  125. package/src/entries/compact-command.ts +256 -0
  126. package/src/{compaction.ts → entries/compaction.ts} +47 -19
  127. package/src/entries/hybrid-executor.ts +76 -0
  128. package/src/entries/index.ts +298 -0
  129. package/src/{preferences.ts → entries/preferences.ts} +1 -1
  130. package/src/entries/tool-policy.ts +162 -0
  131. package/src/entries/typert.host.ts +29 -0
  132. package/src/hybrid/codex-hybrid-executor.ts +310 -0
  133. package/src/hybrid/hybrid-sdk.ts +217 -0
  134. package/src/hybrid/program-calls.ts +202 -0
  135. package/src/hybrid/subcall-scheduler.ts +446 -0
  136. package/src/policy/deferred-tools.ts +331 -0
  137. package/src/policy/overlay-installer.ts +191 -0
  138. package/src/policy/rule-resolver.ts +128 -0
  139. package/src/{tool-capabilities.ts → policy/tool-capabilities.ts} +16 -4
  140. package/src/{activity.ts → presets/activity.ts} +4 -16
  141. package/src/{desktop-preset.ts → presets/desktop-preset.ts} +7 -2
  142. package/src/presets/preset-editor.ts +101 -0
  143. package/src/{preset-prompt-catalog.ts → presets/preset-prompt-catalog.ts} +35 -5
  144. package/src/{preset-tool-catalog.ts → presets/preset-tool-catalog.ts} +12 -5
  145. package/src/presets/runtime-enhancements.ts +415 -0
  146. package/src/presets/small-window-compaction.ts +166 -0
  147. package/src/responses/compact-checkpoint.ts +264 -0
  148. package/src/responses/fetch-transport.ts +290 -0
  149. package/src/responses/remote-compact.ts +393 -0
  150. package/src/responses/sse-diagnostics.ts +156 -0
  151. package/src/responses/wire-rewrite.ts +261 -0
  152. package/src/tools/exec-output.ts +211 -0
  153. package/src/tools/exec-plan-tools.ts +307 -0
  154. package/src/tools/exec-runner.ts +445 -0
  155. package/src/tools/patch-tool.ts +331 -0
  156. package/src/{patch.ts → tools/patch.ts} +90 -20
  157. package/tsdown.config.ts +8 -8
  158. package/lib/installer.js +0 -281
  159. package/lib/invariant.js +0 -23
  160. package/lib/types/activity-types.d.ts +0 -6
  161. package/lib/types/activity-types.js +0 -3
  162. package/lib/types/client/preset-copy.d.ts +0 -43
  163. package/lib/types/client/preset-copy.js +0 -83
  164. package/lib/types/client/session.d.ts +0 -6
  165. package/lib/types/client/session.js +0 -9
  166. package/lib/types/compact-command.js +0 -79
  167. package/lib/types/context.d.ts +0 -8
  168. package/lib/types/context.js +0 -14
  169. package/lib/types/exec.d.ts +0 -50
  170. package/lib/types/exec.js +0 -491
  171. package/lib/types/host-settings.d.ts +0 -4
  172. package/lib/types/host-settings.js +0 -13
  173. package/lib/types/index.d.ts +0 -113
  174. package/lib/types/index.js +0 -851
  175. package/lib/types/installer.d.ts +0 -27
  176. package/lib/types/installer.js +0 -155
  177. package/lib/types/invariant.d.ts +0 -16
  178. package/lib/types/invariant.js +0 -22
  179. package/lib/types/preset-contract.d.ts +0 -69
  180. package/lib/types/preset-contract.js +0 -22
  181. package/lib/types/preset-editor-remote.d.ts +0 -32
  182. package/lib/types/preset-editor-remote.js +0 -41
  183. package/lib/types/preset-editor.d.ts +0 -74
  184. package/lib/types/preset-editor.js +0 -587
  185. package/lib/types/preset-prompt-catalog-schema.d.ts +0 -16
  186. package/lib/types/preset-prompt-catalog-schema.js +0 -11
  187. package/lib/types/preset-prompt-contract.d.ts +0 -22
  188. package/lib/types/preset-prompt-contract.js +0 -3
  189. package/lib/types/preset-tool-catalog-schema.d.ts +0 -38
  190. package/lib/types/preset-tool-catalog-schema.js +0 -28
  191. package/lib/types/prompt-sections.d.ts +0 -15
  192. package/lib/types/prompt-sections.js +0 -29
  193. package/lib/types/remote.d.ts +0 -40
  194. package/lib/types/remote.js +0 -698
  195. package/lib/types/tool-policy.d.ts +0 -171
  196. package/lib/types/tool-policy.js +0 -367
  197. package/lib/types/typert.host.d.ts +0 -47
  198. package/lib/types/typert.host.js +0 -109
  199. package/presets/codex-collaboration/preset.yml +0 -3
  200. package/src/activity-types.ts +0 -7
  201. package/src/client/preset-copy.ts +0 -83
  202. package/src/client/session.ts +0 -11
  203. package/src/compact-command.ts +0 -112
  204. package/src/context.ts +0 -15
  205. package/src/exec.ts +0 -570
  206. package/src/host-settings.ts +0 -17
  207. package/src/index.ts +0 -1097
  208. package/src/installer.ts +0 -172
  209. package/src/invariant.ts +0 -34
  210. package/src/preset-contract.ts +0 -85
  211. package/src/preset-editor-remote.ts +0 -41
  212. package/src/preset-editor.ts +0 -502
  213. package/src/preset-prompt-catalog-schema.ts +0 -10
  214. package/src/preset-prompt-contract.ts +0 -21
  215. package/src/preset-tool-catalog-schema.ts +0 -28
  216. package/src/prompt-sections.ts +0 -33
  217. package/src/remote.ts +0 -748
  218. package/src/tool-policy.ts +0 -388
  219. package/src/typert.host.ts +0 -119
  220. /package/lib/types/{prompt.d.ts → contracts/prompt.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
- "generatedAt": "2026-11-10T02:08:09.064Z",
2
+ "generatedAt": "2026-11-17T04:35:30.142Z",
3
3
  "runtimeVersion": "0.2.2-rc.1",
4
- "node": "v24.21.0",
4
+ "node": "v24.19.0",
5
5
  "platform": "win32",
6
6
  "arch": "x64",
7
7
  "cpu": "AMD Ryzen 9 5900HX with Radeon Graphics ",
@@ -44,33 +44,33 @@
44
44
  "timings": {
45
45
  "resolveAndSchemas": {
46
46
  "samples": 1200,
47
- "medianUs": 127.50000000005457,
48
- "p95Us": 151.299999999992,
49
- "meanUs": 133.11749999999944
47
+ "medianUs": 130.6000000000722,
48
+ "p95Us": 161.3000000000966,
49
+ "meanUs": 136.49433333333042
50
50
  },
51
51
  "assemble": {
52
52
  "samples": 600,
53
- "medianUs": 304.1000000000622,
54
- "p95Us": 371.90000000009604,
55
- "meanUs": 311.1536666666661
53
+ "medianUs": 292.40000000027067,
54
+ "p95Us": 348.700000000008,
55
+ "meanUs": 299.1345000000008
56
56
  },
57
57
  "nativeNoIoDispatch": {
58
58
  "samples": 1200,
59
- "medianUs": 133.70000000031723,
60
- "p95Us": 281.6000000002532,
61
- "meanUs": 154.6314166666726
59
+ "medianUs": 129.90000000036162,
60
+ "p95Us": 184.49999999984357,
61
+ "meanUs": 140.313000000002
62
62
  },
63
63
  "rewrite16PatchHistoryCalls": {
64
64
  "samples": 1200,
65
- "medianUs": 17.600000000129512,
66
- "p95Us": 38.30000000016298,
67
- "meanUs": 21.958750000001526
65
+ "medianUs": 17.899999999826832,
66
+ "p95Us": 36.50000000016007,
67
+ "meanUs": 20.67441666666961
68
68
  },
69
69
  "agentCreatedListener": {
70
70
  "samples": 50,
71
- "medianUs": 81.99999999987995,
72
- "p95Us": 150.9000000000924,
73
- "meanUs": 95.86599999999635
71
+ "medianUs": 171.8999999998232,
72
+ "p95Us": 306.999999999789,
73
+ "meanUs": 194.28600000002007
74
74
  }
75
75
  }
76
76
  },
@@ -91,47 +91,47 @@
91
91
  "write_stdin"
92
92
  ],
93
93
  "schema": {
94
- "utf8Bytes": 12378,
95
- "o200kBaseTokens": 2632
94
+ "utf8Bytes": 12431,
95
+ "o200kBaseTokens": 2649
96
96
  },
97
97
  "promptSections": {
98
98
  "utf8Bytes": 1281,
99
99
  "o200kBaseTokens": 261
100
100
  },
101
101
  "illustrativeWire": {
102
- "utf8Bytes": 15841,
103
- "o200kBaseTokens": 3605
102
+ "utf8Bytes": 15894,
103
+ "o200kBaseTokens": 3622
104
104
  },
105
105
  "timings": {
106
106
  "resolveAndSchemas": {
107
107
  "samples": 1200,
108
- "medianUs": 257.20000000001164,
109
- "p95Us": 311.50000000002365,
110
- "meanUs": 265.87049999999954
108
+ "medianUs": 224.19999999999618,
109
+ "p95Us": 290.8999999999651,
110
+ "meanUs": 234.36800000000247
111
111
  },
112
112
  "assemble": {
113
113
  "samples": 600,
114
- "medianUs": 327.2999999999229,
115
- "p95Us": 394.9999999999818,
116
- "meanUs": 333.1066666666714
114
+ "medianUs": 314.7000000001299,
115
+ "p95Us": 388.30000000007203,
116
+ "meanUs": 322.90416666667164
117
117
  },
118
118
  "nativeNoIoDispatch": {
119
119
  "samples": 1200,
120
- "medianUs": 134.19999999996435,
121
- "p95Us": 284.70000000015716,
122
- "meanUs": 155.99399999999943
120
+ "medianUs": 130.40000000000873,
121
+ "p95Us": 186.40000000004875,
122
+ "meanUs": 141.40566666667334
123
123
  },
124
124
  "rewrite16PatchHistoryCalls": {
125
125
  "samples": 1200,
126
- "medianUs": 17.79999999962456,
127
- "p95Us": 37.60000000011132,
128
- "meanUs": 22.783083333333327
126
+ "medianUs": 17.90000000028158,
127
+ "p95Us": 36.90000000005966,
128
+ "meanUs": 21.09700000001112
129
129
  },
130
130
  "agentCreatedListener": {
131
131
  "samples": 50,
132
- "medianUs": 83.00000000008367,
133
- "p95Us": 154.29999999969368,
134
- "meanUs": 98.44200000004093
132
+ "medianUs": 170.20000000002256,
133
+ "p95Us": 298.4999999998763,
134
+ "meanUs": 194.15799999996125
135
135
  }
136
136
  }
137
137
  },
@@ -150,47 +150,47 @@
150
150
  "write_stdin"
151
151
  ],
152
152
  "schema": {
153
- "utf8Bytes": 8234,
154
- "o200kBaseTokens": 1733
153
+ "utf8Bytes": 8287,
154
+ "o200kBaseTokens": 1750
155
155
  },
156
156
  "promptSections": {
157
157
  "utf8Bytes": 1608,
158
158
  "o200kBaseTokens": 331
159
159
  },
160
160
  "illustrativeWire": {
161
- "utf8Bytes": 11661,
162
- "o200kBaseTokens": 2698
161
+ "utf8Bytes": 11714,
162
+ "o200kBaseTokens": 2715
163
163
  },
164
164
  "timings": {
165
165
  "resolveAndSchemas": {
166
166
  "samples": 1200,
167
- "medianUs": 223.7999999999829,
168
- "p95Us": 257.29999999998654,
169
- "meanUs": 230.7842499999995
167
+ "medianUs": 150.10000000006585,
168
+ "p95Us": 188.70000000003984,
169
+ "meanUs": 156.98575000000096
170
170
  },
171
171
  "assemble": {
172
172
  "samples": 600,
173
- "medianUs": 314.4999999999527,
174
- "p95Us": 371.79999999989377,
175
- "meanUs": 319.9149999999964
173
+ "medianUs": 302.7999999999338,
174
+ "p95Us": 375.2999999999247,
175
+ "meanUs": 309.8166666666611
176
176
  },
177
177
  "nativeNoIoDispatch": {
178
178
  "samples": 1200,
179
- "medianUs": 134.99999999976353,
180
- "p95Us": 280.99999999994907,
181
- "meanUs": 156.7416666666635
179
+ "medianUs": 131.1000000000604,
180
+ "p95Us": 193.99999999995998,
181
+ "meanUs": 143.01783333332614
182
182
  },
183
183
  "rewrite16PatchHistoryCalls": {
184
184
  "samples": 1200,
185
- "medianUs": 17.699999999877036,
186
- "p95Us": 38.299999999708234,
187
- "meanUs": 22.31266666666367
185
+ "medianUs": 17.899999999826832,
186
+ "p95Us": 35.600000000158616,
187
+ "meanUs": 20.390166666659677
188
188
  },
189
189
  "agentCreatedListener": {
190
190
  "samples": 50,
191
- "medianUs": 1238.6999999998807,
192
- "p95Us": 2199.3999999999687,
193
- "meanUs": 1360.0719999999637
191
+ "medianUs": 1655.999999999949,
192
+ "p95Us": 2804.5999999999367,
193
+ "meanUs": 1893.4619999999998
194
194
  }
195
195
  }
196
196
  },
@@ -204,47 +204,47 @@
204
204
  "write_stdin"
205
205
  ],
206
206
  "schema": {
207
- "utf8Bytes": 4330,
208
- "o200kBaseTokens": 911
207
+ "utf8Bytes": 4383,
208
+ "o200kBaseTokens": 928
209
209
  },
210
210
  "promptSections": {
211
211
  "utf8Bytes": 1095,
212
212
  "o200kBaseTokens": 228
213
213
  },
214
214
  "illustrativeWire": {
215
- "utf8Bytes": 7667,
216
- "o200kBaseTokens": 1856
215
+ "utf8Bytes": 7720,
216
+ "o200kBaseTokens": 1873
217
217
  },
218
218
  "timings": {
219
219
  "resolveAndSchemas": {
220
220
  "samples": 1200,
221
- "medianUs": 166.00000000016735,
222
- "p95Us": 194.40000000008695,
223
- "meanUs": 171.85483333333417
221
+ "medianUs": 90.30000000007021,
222
+ "p95Us": 115.0000000000091,
223
+ "meanUs": 95.22991666666775
224
224
  },
225
225
  "assemble": {
226
226
  "samples": 600,
227
- "medianUs": 235.09999999987485,
228
- "p95Us": 292.5999999997657,
229
- "meanUs": 241.23983333333774
227
+ "medianUs": 225.6999999999607,
228
+ "p95Us": 278.00000000002,
229
+ "meanUs": 230.8479999999969
230
230
  },
231
231
  "nativeNoIoDispatch": {
232
232
  "samples": 1200,
233
- "medianUs": 133.79999999961,
234
- "p95Us": 278.3999999996922,
235
- "meanUs": 156.07649999999845
233
+ "medianUs": 129.60000000020955,
234
+ "p95Us": 187.20000000030268,
235
+ "meanUs": 139.95641666666566
236
236
  },
237
237
  "rewrite16PatchHistoryCalls": {
238
238
  "samples": 1200,
239
- "medianUs": 17.599999999674765,
240
- "p95Us": 37.699999999858846,
241
- "meanUs": 21.69208333333131
239
+ "medianUs": 17.79999999962456,
240
+ "p95Us": 36.10000000026048,
241
+ "meanUs": 20.38699999999987
242
242
  },
243
243
  "agentCreatedListener": {
244
244
  "samples": 50,
245
- "medianUs": 1404.9999999997453,
246
- "p95Us": 2268.7000000000808,
247
- "meanUs": 1533.417999999992
245
+ "medianUs": 1856.0999999999694,
246
+ "p95Us": 3093.5999999996966,
247
+ "meanUs": 2075.076000000017
248
248
  }
249
249
  }
250
250
  },
@@ -276,33 +276,33 @@
276
276
  "timings": {
277
277
  "resolveAndSchemas": {
278
278
  "samples": 1200,
279
- "medianUs": 128.60000000000582,
280
- "p95Us": 151.4999999999418,
281
- "meanUs": 133.6942499999999
279
+ "medianUs": 131.1000000000604,
280
+ "p95Us": 165.300000000002,
281
+ "meanUs": 137.56549999999967
282
282
  },
283
283
  "assemble": {
284
284
  "samples": 600,
285
- "medianUs": 306.09999999978754,
286
- "p95Us": 384.39999999991414,
287
- "meanUs": 312.43433333333235
285
+ "medianUs": 294.1000000000713,
286
+ "p95Us": 367.60000000003856,
287
+ "meanUs": 301.1400000000026
288
288
  },
289
289
  "nativeNoIoDispatch": {
290
290
  "samples": 1200,
291
- "medianUs": 134.7000000000662,
292
- "p95Us": 277.9000000000451,
293
- "meanUs": 155.37116666666518
291
+ "medianUs": 130.79999999990832,
292
+ "p95Us": 186.20000000009895,
293
+ "meanUs": 141.48541666665827
294
294
  },
295
295
  "rewrite16PatchHistoryCalls": {
296
296
  "samples": 1200,
297
- "medianUs": 17.699999999877036,
298
- "p95Us": 38.50000000011278,
299
- "meanUs": 22.177416666666357
297
+ "medianUs": 17.899999999826832,
298
+ "p95Us": 36.3999999999578,
299
+ "meanUs": 20.6273333333354
300
300
  },
301
301
  "agentCreatedListener": {
302
302
  "samples": 50,
303
- "medianUs": 84.49999999993452,
304
- "p95Us": 170.30000000022483,
305
- "meanUs": 100.6619999999657
303
+ "medianUs": 177.70000000018626,
304
+ "p95Us": 326.0000000000218,
305
+ "meanUs": 220.47199999999066
306
306
  }
307
307
  }
308
308
  }
@@ -1,18 +1,20 @@
1
1
  # 跨预设工具覆盖
2
2
 
3
- 版本 `0.2.32-dsh-v0.2.2-rc.1`,目标运行时 DeepSeek Harness `0.2.2-rc.1`。工具覆盖是独立 Host 插件,行 id 为 `codex-tool-policy`,默认 `rules: []`,不会自动改变任何预设。
3
+ 版本 `0.3.0`,目标运行时 DeepSeek Harness `>=0.2.2-rc.1 <=0.2.2-rc.4`。工具覆盖是独立 Host 插件,行 id 为 `codex-tool-policy`,默认 `rules: []`,不会自动改变任何预设。
4
4
 
5
5
  ## 改什么,不改什么
6
6
 
7
- 为选中的预设创建 Agent 时,插件在该 Agent 的子作用域中限制继承工具,并按配置注册 Codex 执行与计划工具。原预设的 Persona、插件声明及文件修改工具不被替换;不编辑其它预设的 YAML。调用继续走宿主的工具执行器、审批、沙箱和日志机制,真实失败仍保留。
7
+ 为选中的预设创建 Agent 时,插件在该 Agent 的子作用域中限制继承工具,并按配置注册 Codex 执行、计划与可选补丁工具。原预设的 Persona 和插件声明保持不变,不编辑其它预设的 YAML。调用继续走宿主的工具执行器、审批、沙箱和日志机制,真实失败仍保留。
8
8
 
9
- 默认替换规则:
9
+ 默认及可选替换规则:
10
10
 
11
11
  | 原能力 | 替换后 |
12
12
  | --- | --- |
13
- | 存在且允许调用的原生 `bash` / `pwsh` | `exec_command` + `write_stdin` |
14
- | 存在且允许调用的原生 `todo_write` | `update_plan` |
15
- | `read` / `read_image` / `write` / `edit` / `apply_patch` / `glob` / `grep` | 保留原定义 |
13
+ | 存在且允许调用的原生 `bash` / `pwsh` | `exec_command` + `write_stdin`(默认启用) |
14
+ | 存在且允许调用的原生 `todo_write` | `update_plan`(默认启用) |
15
+ | 存在且允许调用的原生 `edit` / `write` | 可选共用 `apply_patch`(`codex-patch`,`replacePatch` 默认 `false`) |
16
+ | 任意无条件源工具 | `defer`(按需延迟加载:第 1 步隐藏并注入 `activate_tools`,激活后于下一步通过 DSH `tool-addition` + `deferLoading: true` 生效) |
17
+ | `read` / `read_image` / `apply_patch` / `glob` / `grep` | 保留原定义 |
16
18
 
17
19
  不存在的源能力不会凭空补上;同名目标工具冲突和无法安全保留激活条件的源工具明确拒绝,不用无条件包装掩盖问题。此适配针对当前版本原生执行与计划工具;第三方同名工具或按工具名实施的额外策略,需要单独审计。
18
20
 
@@ -60,7 +62,9 @@
60
62
  action: keep
61
63
  ```
62
64
 
63
- `tools` 中每个 `{ name, action }` 是明确的逐工具选择,优先于本规则的旧 allow / deny 和大类默认;它不能解除其它插件的限制。动作只有 `keep`、`hide`、`codex-exec`、`codex-plan`。执行适配仅接受 `bash/pwsh`,计划适配仅接受 `todo_write`;未知工具、重复名称和不匹配的适配会拒绝。
65
+ `tools` 中每个 `{ name, action }` 是明确的逐工具选择,优先于本规则的旧 allow / deny 和大类默认;它不能解除其它插件的限制。动作包括 `keep`、`hide`、`defer`、`codex-exec`、`codex-plan`、`codex-patch`。执行适配仅接受 `bash/pwsh`,计划适配仅接受 `todo_write`,补丁适配仅接受 `edit/write`(任一或两者均映射到同一个 `apply_patch` 注册);`defer` 接受任意非条件、非 `activate_tools` 的继承源工具,并在第 1 步通过 `when` 准入与 `activate_tools` 实现与 DSH `0.2.2` `tool-addition` / `deferLoading: true` 兼容的渐进激活;未知工具、重复名称和不匹配的适配会拒绝。`replacePatch` 默认为 `false`以保留原生文件工具,如需通过大类开关替换可显式设为 `true`。
66
+
67
+ 在实验性的 `codex-hybrid` 预设中,`hybrid-executor` 默认将 `create_goal`、`get_goal`、`ralph`、`subagent_fork`、`todo_write`、`update_goal`、`workflow` 设为 `defaultDeferred`;若未显式覆写,策略层与设置界面都会将其默认显示为 `defer`,且可随时按需改为 `keep` 或 `hide`。已激活的延迟工具会在压缩完成(`compaction/end`,包含本地摘要压缩与远程加密压缩)时结算压缩前轮次热度:若连续超过 `2` 轮(`DEFERRED_RECENT_TURN_WINDOW`)未再激活或实际执行,则在压缩完成后自动收起以节省下半场 Token(压缩进行期间保持原工具集以复用前缀缓存,静态目录 `codex:deferred-tools` 保持不变)。
64
68
 
65
69
  新界面创建规则时显式设置两个旧类别开关为 `false`,只记录被编辑工具的选择。旧规则没有迁移,未编辑部分仍保留旧默认语义;手写逐工具规则时也应像示例一样关闭旧类别默认。示例中的工具名必须确实在所选预设的目录中。
66
70