harness-dispatch 0.7.7 → 0.7.8
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 +142 -1
- package/README.md +3 -1
- package/dist/dispatchers/generic-cli.d.ts +16 -1
- package/dist/dispatchers/generic-cli.d.ts.map +1 -1
- package/dist/dispatchers/generic-cli.js +166 -18
- package/dist/dispatchers/generic-cli.js.map +1 -1
- package/dist/http/parse.d.ts +16 -0
- package/dist/http/parse.d.ts.map +1 -1
- package/dist/http/parse.js +220 -15
- package/dist/http/parse.js.map +1 -1
- package/dist/http/server.d.ts.map +1 -1
- package/dist/http/server.js +8 -9
- package/dist/http/server.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +4 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-schemas.d.ts +26 -0
- package/dist/mcp/tool-schemas.d.ts.map +1 -1
- package/dist/mcp/tool-schemas.js +95 -8
- package/dist/mcp/tool-schemas.js.map +1 -1
- package/dist/mcp/tools.d.ts +23 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +10 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/router.d.ts +21 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +90 -22
- package/dist/router.js.map +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,146 @@ pre-1.0, so minor versions can carry behaviour changes.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.7.8] — 2026-08-23
|
|
10
|
+
|
|
11
|
+
**Upgrade from 0.7.7.** Two of 0.7.7's five fixes were wrong, and one of them
|
|
12
|
+
re-opened a bug 0.7.6 had fixed.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Publishing now requires an acceptance record for the exact version being
|
|
17
|
+
released (`acceptance/<version>.md`), checked by the publish workflow.
|
|
18
|
+
|
|
19
|
+
Every regression this project has shipped was found by an independent
|
|
20
|
+
acceptance pass — 0.7.0's wrong apply base, 0.7.2's dropped deletions,
|
|
21
|
+
0.7.3's path base, 0.7.6's two miscalibrated guards, 0.7.7's under-counted
|
|
22
|
+
escaping. Not one was missed. Every one was already on npm when the pass ran,
|
|
23
|
+
because publishing came first. The review was never the problem; the ordering
|
|
24
|
+
was, and it is mechanical now instead of remembered. A CONDITIONAL verdict
|
|
25
|
+
passes deliberately — see `acceptance/README.md` for why.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- The command-line length check counts what cmd.exe actually costs.
|
|
30
|
+
cross-spawn prefixes `^` to every meta character for a cmd.exe target and its
|
|
31
|
+
class INCLUDES THE SPACE, which the previous hand-written model did not. Prose
|
|
32
|
+
therefore failed from about 6,600 characters and JSON from about 4,500, while
|
|
33
|
+
the guard did not fire until about 7,820 — so the raw
|
|
34
|
+
"The command line is too long." went on reaching callers, and because the
|
|
35
|
+
guard stayed silent the route was charged a call, a failure and a breaker
|
|
36
|
+
event for it. The class is now taken from cross-spawn rather than guessed at.
|
|
37
|
+
- The same check applies the cmd.exe budget to any target that is not `.exe` or
|
|
38
|
+
`.com`, which is what cross-spawn actually keys on. An extensionless shim or a
|
|
39
|
+
`.ps1` was given the four-times-larger CreateProcess budget.
|
|
40
|
+
- A model naming the FORCED route itself is dropped again. 0.7.6 dropped it,
|
|
41
|
+
0.7.7 forwarded it, and Codex rejected `--model codex_cli` with a real failed
|
|
42
|
+
job and a breaker event. Over-specifying ("use codex_cli, with codex_cli") is
|
|
43
|
+
the one ambiguous case; a model that merely collides with some OTHER route's
|
|
44
|
+
id is still honoured, which is why one rule cannot cover both.
|
|
45
|
+
- `modelHintMatched` reports declared models only. It counted a route-NAME
|
|
46
|
+
match as a match, so the one signal the tool schema tells an agent to use for
|
|
47
|
+
self-correction — "true means the picked route actually declares this model" —
|
|
48
|
+
reported the opposite of the truth.
|
|
49
|
+
- The long-prompt check MEASURES the command line instead of estimating it.
|
|
50
|
+
Two releases running the escaping was hand-modelled and wrong in opposite
|
|
51
|
+
directions: 0.7.6 under-counted spaces, 0.7.7 then over-counted backslashes
|
|
52
|
+
and REFUSED an ~800-character band of prompts that ran fine on the Cursor
|
|
53
|
+
route the check exists for. It now replicates cross-spawn's own escaping and
|
|
54
|
+
measures the result, wrapper included, so the budget (8,180 of a measured
|
|
55
|
+
ceiling of 8,191) buys margin rather than paying for a wrong model. A test
|
|
56
|
+
pins it against cross-spawn's real output.
|
|
57
|
+
- A `node_modules/.bin/*.cmd` target is counted at its DOUBLE-escaped length,
|
|
58
|
+
which is what cross-spawn does to npm shims. Such a target failed from about
|
|
59
|
+
5,300 characters while the check said 6,400.
|
|
60
|
+
- `routing.modelHintDropped` tells you when a model you asked for was not sent
|
|
61
|
+
on. Until now the only signal was `modelHintMatched: false`, documented as
|
|
62
|
+
"forwarded blind — treat the result with more suspicion", which is the
|
|
63
|
+
opposite of what happened: it was not forwarded at all.
|
|
64
|
+
- The top-level `service` parameter drops a self-naming model too. It took a
|
|
65
|
+
third code path that never had the rule, so `service: "codex", hints.model:
|
|
66
|
+
"codex"` still sent `--model codex` to the harness — the failure the forced
|
|
67
|
+
path was fixed for — and reported neither field. All three paths now share
|
|
68
|
+
one function.
|
|
69
|
+
- A blank `hints.model` is rejected on BOTH surfaces instead of silently
|
|
70
|
+
unsetting the route's configured model. An empty string is not "no
|
|
71
|
+
preference": it won against the route default, the harness ran with no model
|
|
72
|
+
flag, and the response reported `model: ""` with nothing to say the request
|
|
73
|
+
had been discarded. Whitespace did the same and also reached the harness as a
|
|
74
|
+
real argument, so `--model " "` cost a provider call, a route failure and
|
|
75
|
+
breaker credit on an HTTP 200. The OpenAI protocol's own top-level `model`
|
|
76
|
+
drops a blank value rather than rejecting it — clients fill that field in
|
|
77
|
+
unconditionally — but it dropped only `""`, not whitespace, and it now drops
|
|
78
|
+
both.
|
|
79
|
+
- A wrong-typed hint is rejected on the HTTP surface instead of vanishing.
|
|
80
|
+
`hints: { model: 123 }` returned 200 with the hint silently gone, and
|
|
81
|
+
`hints: "workspace_edit"` discarded EVERY hint in one go — safety ones
|
|
82
|
+
included — because a non-object failed the branch guard without a word. This
|
|
83
|
+
is the other half of the unknown-KEY rule already there.
|
|
84
|
+
- A whitespace-only `prompt` is rejected on the MCP surface, which the HTTP
|
|
85
|
+
surface has always done. It passed the non-empty check and spent a real route
|
|
86
|
+
call producing nothing.
|
|
87
|
+
- The HTTP surface stops silently downgrading a request it does not understand.
|
|
88
|
+
`mode: "fanou"` ran ONE dispatch and returned 200, so a CI caller asking for
|
|
89
|
+
independent opinions got a single answer indistinguishable from a real one;
|
|
90
|
+
`stream: "true"` returned a non-streaming response the same way; a non-string
|
|
91
|
+
entry in `files` or `models` was dropped, so a delegate ran without context
|
|
92
|
+
the caller believed it had sent. All are refused by name now.
|
|
93
|
+
- `hints.timeoutMs` is checked for its VALUE, not just its type. `0` is not
|
|
94
|
+
nullish, so it won every fallback down to `setTimeout`, fired on the first
|
|
95
|
+
tick and killed the child — "Timed out after 0ms", recorded as a route
|
|
96
|
+
failure with breaker credit, behind an HTTP 200. Negative, fractional and
|
|
97
|
+
absurdly large values were accepted too; MCP has always refused all four.
|
|
98
|
+
- `routePolicy: "standard"` is accepted over HTTP. It is the router's own
|
|
99
|
+
default and the documented one, so copying it out of the docs into an HTTP
|
|
100
|
+
body was an error for naming the thing that already happens.
|
|
101
|
+
- A NUL byte is refused on both surfaces for every field that becomes a
|
|
102
|
+
command-line argument — `prompt`, `files`, `models` and `hints.model` — not
|
|
103
|
+
just `prompt`. The rest surfaced as a raw Node internal from deep inside
|
|
104
|
+
process spawning.
|
|
105
|
+
- Top-level routing hints over HTTP take effect instead of being discarded.
|
|
106
|
+
`{"routePolicy":"local_only"}` returned 200 and the dispatch left the machine
|
|
107
|
+
anyway; `taskType`, `timeoutMs` and `preferLargeContext` were dropped the same
|
|
108
|
+
way, while `safetyProfile` and `workspacePolicy` in the same position had
|
|
109
|
+
always worked — which is what taught callers the placement was fine. OpenAI
|
|
110
|
+
request bodies are flat, so this surface accepts flat hints; the MCP tool
|
|
111
|
+
still refuses the placement by name, and on both a hint you set now either
|
|
112
|
+
takes effect or you are told.
|
|
113
|
+
- `timeoutMs` is capped at what a timer can actually hold (2147483647). Above
|
|
114
|
+
that Node clamps to 1 millisecond, so the longest timeout you could ask for
|
|
115
|
+
became the shortest possible: the harness was killed immediately and the
|
|
116
|
+
ROUTE was blamed. Both surfaces accepted values in that range.
|
|
117
|
+
- `contextJobs` and `service` are refused over HTTP rather than accepted and
|
|
118
|
+
ignored. They are MCP tool parameters this surface does not implement — a
|
|
119
|
+
caller passing `contextJobs` got a delegate running without the prior work
|
|
120
|
+
they believed they had sent, and one passing `service` got whatever route the
|
|
121
|
+
router picked.
|
|
122
|
+
- `escalate` is refused on both surfaces. It has never been a per-call field;
|
|
123
|
+
escalation is per-route configuration.
|
|
124
|
+
- `routePolicy` is enforced in FANOUT mode over HTTP, not only in single mode.
|
|
125
|
+
`{"mode":"fanout","hints":{"routePolicy":"blocked"}}` — documented as
|
|
126
|
+
"dry-run: block everything" — returned 200 having run live agents in the
|
|
127
|
+
caller's working tree, and `local_only` let a metered route run and bill.
|
|
128
|
+
The fanout path built its dispatch options by naming three hint fields
|
|
129
|
+
inline and missed two, so `timeoutMs` never reached the child there either.
|
|
130
|
+
Every applicable hint now comes from one function, so a new one reaches
|
|
131
|
+
every caller instead of whichever call sites someone remembered.
|
|
132
|
+
- The config.yaml spelling of a hint is refused at the TOP level on both
|
|
133
|
+
surfaces — `safety_profile`, `route_policy`, `task_type` and the rest. The
|
|
134
|
+
nested spelling has been refused since 0.6.x because it silently disabled a
|
|
135
|
+
safety limit; one level up it stayed silent, and 0.7.8 made that placement
|
|
136
|
+
more reachable by starting to honour top-level hints.
|
|
137
|
+
- A `null` hint value is refused rather than treated as absent, consistently.
|
|
138
|
+
`{"timeoutMs":null}` returned 200 with the hint gone while
|
|
139
|
+
`{"hints":{"timeoutMs":null}}` was a 400 — the same key, two answers.
|
|
140
|
+
- An environment failure is detected by SHAPE, not by how often the phrase
|
|
141
|
+
appears. The detector overrides a successful exit — it charges the route a
|
|
142
|
+
failure and tells the caller "any answer it gave was produced without reading
|
|
143
|
+
or running anything" — so a delegate that merely WROTE about
|
|
144
|
+
`CreateProcessAsUserW` was given a fabricated diagnosis of a run that worked.
|
|
145
|
+
It now requires the harness's own diagnostic form (with errno) on two
|
|
146
|
+
separate lines, and scans each stream's tail separately so a wall of stderr
|
|
147
|
+
cannot bury a real failure on stdout.
|
|
148
|
+
|
|
9
149
|
## [0.7.7] — 2026-08-23
|
|
10
150
|
|
|
11
151
|
**Upgrade from 0.7.6.** Two of 0.7.6's three guards were miscalibrated — one
|
|
@@ -601,7 +741,8 @@ the MCP surface to three tools: `dispatch`, `job_status`, `usage`.
|
|
|
601
741
|
Known issues in this release, fixed in 0.5.0: `configure` writes resolved API keys into
|
|
602
742
|
its output, and `configure --yes --force` can delete user-added harnesses.
|
|
603
743
|
|
|
604
|
-
[Unreleased]: https://github.com/fstubner/harness-dispatch/compare/v0.7.
|
|
744
|
+
[Unreleased]: https://github.com/fstubner/harness-dispatch/compare/v0.7.8...HEAD
|
|
745
|
+
[0.7.8]: https://github.com/fstubner/harness-dispatch/compare/v0.7.7...v0.7.8
|
|
605
746
|
[0.7.7]: https://github.com/fstubner/harness-dispatch/compare/v0.7.6...v0.7.7
|
|
606
747
|
[0.7.6]: https://github.com/fstubner/harness-dispatch/compare/v0.7.5...v0.7.6
|
|
607
748
|
[0.7.5]: https://github.com/fstubner/harness-dispatch/compare/v0.7.4...v0.7.5
|
package/README.md
CHANGED
|
@@ -663,7 +663,9 @@ decide which of your local CLIs to run.
|
|
|
663
663
|
## Chaining delegated work
|
|
664
664
|
|
|
665
665
|
Pass the jobIds of earlier dispatches as `contextJobs` and their prompts and
|
|
666
|
-
outputs are rendered into the new prompt directly
|
|
666
|
+
outputs are rendered into the new prompt directly — arguments to the `dispatch`
|
|
667
|
+
MCP tool, not an HTTP body (the OpenAI-compatible endpoint does not implement
|
|
668
|
+
`contextJobs`, and refuses it rather than accepting it and ignoring it):
|
|
667
669
|
|
|
668
670
|
```json
|
|
669
671
|
{ "prompt": "Now write the migration.", "contextJobs": ["job-1786977300001-0f0aaaaa"] }
|
|
@@ -41,7 +41,19 @@ export declare function detectRateLimit(text: string): {
|
|
|
41
41
|
* reporting that it could not START a process at all, which no prompt can
|
|
42
42
|
* work around.
|
|
43
43
|
*/
|
|
44
|
-
export declare function detectHarnessEnvironmentFailure(
|
|
44
|
+
export declare function detectHarnessEnvironmentFailure(...streams: string[]): string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* How long the command line will actually be once escaped.
|
|
47
|
+
*
|
|
48
|
+
* Counting raw characters under-reads on Windows, where every `"` in an
|
|
49
|
+
* argument is escaped to `\"` and every argument containing whitespace is
|
|
50
|
+
* wrapped in quotes. A 31,000-character prompt that is ~10% quote characters —
|
|
51
|
+
* ordinary for JSON or source code — measured under the budget and then threw
|
|
52
|
+
* `spawn ENAMETOOLONG` anyway. Deliberately an over-estimate: refusing a
|
|
53
|
+
* borderline prompt with an explanation beats spawning one that dies with an
|
|
54
|
+
* errno.
|
|
55
|
+
*/
|
|
56
|
+
declare function commandLineLength(command: string, args: string[]): number;
|
|
45
57
|
export declare class GenericCliDispatcher extends BaseDispatcher {
|
|
46
58
|
#private;
|
|
47
59
|
readonly id: string;
|
|
@@ -64,4 +76,7 @@ export declare class GenericCliDispatcher extends BaseDispatcher {
|
|
|
64
76
|
checkQuota(): Promise<QuotaInfo>;
|
|
65
77
|
stream(prompt: string, files: string[], workingDir: string, opts?: DispatchOpts): AsyncIterable<DispatcherEvent>;
|
|
66
78
|
}
|
|
79
|
+
/** Exported for the drift test against cross-spawn. Not part of the API. */
|
|
80
|
+
export declare const __commandLineLengthForTest: typeof commandLineLength;
|
|
81
|
+
export {};
|
|
67
82
|
//# sourceMappingURL=generic-cli.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-cli.d.ts","sourceRoot":"","sources":["../../src/dispatchers/generic-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAIV,eAAe,EACf,SAAS,EAET,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AA2B9D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAoBjG;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,+BAA+B,CAAC,
|
|
1
|
+
{"version":3,"file":"generic-cli.d.ts","sourceRoot":"","sources":["../../src/dispatchers/generic-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAIV,eAAe,EACf,SAAS,EAET,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AA2B9D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAoBjG;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CA+CxF;AA+ID;;;;;;;;;;GAUG;AACH,iBAAS,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAiBlE;AAmMD,qBAAa,oBAAqB,SAAQ,cAAc;;IACtD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgC;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqB;IACrD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgC;IAC7D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAoC;IACrE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAsB;IAE3D;;;;;;OAMG;gBACS,GAAG,CAAC,EAAE,aAAa,EAAE,oBAAoB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAY3E,WAAW,IAAI,OAAO;IAIhB,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC;IAItC,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,YAAiB,GACtB,aAAa,CAAC,eAAe,CAAC;CAkVlC;AAED,4EAA4E;AAC5E,eAAO,MAAM,0BAA0B,0BAAoB,CAAC"}
|
|
@@ -83,8 +83,44 @@ export function detectRateLimit(text) {
|
|
|
83
83
|
* reporting that it could not START a process at all, which no prompt can
|
|
84
84
|
* work around.
|
|
85
85
|
*/
|
|
86
|
-
export function detectHarnessEnvironmentFailure(
|
|
87
|
-
|
|
86
|
+
export function detectHarnessEnvironmentFailure(...streams) {
|
|
87
|
+
// TWO DIAGNOSTIC LINES, in each stream's TAIL.
|
|
88
|
+
//
|
|
89
|
+
// This overrides a SUCCESSFUL exit code, so a false positive is expensive:
|
|
90
|
+
// it charges the route a failure, counts toward the breaker, and tells the
|
|
91
|
+
// caller "any answer it gave was produced without reading or running
|
|
92
|
+
// anything" — a fabricated diagnosis about a run that worked.
|
|
93
|
+
//
|
|
94
|
+
// Counting bare mentions does not separate the two cases. The first version
|
|
95
|
+
// fired on one mention anywhere; raising it to two still fired on a
|
|
96
|
+
// delegate's prose ABOUT this function, which is a realistic thing to
|
|
97
|
+
// receive — this project delegates work on this very file. Both versions
|
|
98
|
+
// were reproduced with a CLI exiting 0 while printing sentences.
|
|
99
|
+
//
|
|
100
|
+
// What separates them better than volume is SHAPE. The harness emits its
|
|
101
|
+
// own diagnostic with the errno attached ("CreateProcessAsUserW failed: 5
|
|
102
|
+
// (Access is denied)"), which prose usually shortens to the bare phrase, so
|
|
103
|
+
// requiring the errno form on two separate LINES needs a real diagnostic,
|
|
104
|
+
// repeated — and a sandbox that cannot spawn fails EVERY attempt, so it
|
|
105
|
+
// repeats by definition (the run this was built from logged six).
|
|
106
|
+
//
|
|
107
|
+
// Narrower, not closed, and worth being exact about both ways:
|
|
108
|
+
// - Prose QUOTING the full diagnostic on two lines still fires. A report
|
|
109
|
+
// on this file can do that, including a diff of this function's own
|
|
110
|
+
// tests. Nothing in the text distinguishes those cases; only the source
|
|
111
|
+
// of the stream would, and we do not have it here.
|
|
112
|
+
// - Only `failed: <digits>` matches. `failed (5)`, `failed with error 5`,
|
|
113
|
+
// or the errno on the next line are all missed. That is deliberate
|
|
114
|
+
// rather than an oversight: the form above is the one observed live, and
|
|
115
|
+
// inventing variants would widen a false-positive surface that has
|
|
116
|
+
// already misfired twice to cover output nobody has seen.
|
|
117
|
+
//
|
|
118
|
+
// Each stream is tailed SEPARATELY, like the rate-limit scanner: six real
|
|
119
|
+
// occurrences on stdout followed by a wall of stderr noise would otherwise
|
|
120
|
+
// fall off the end of a single joined tail.
|
|
121
|
+
const lines = streams.flatMap((s) => rateLimitScanTail(s).split(/\r?\n/));
|
|
122
|
+
const diagnostics = lines.filter((line) => /CreateProcessAsUserW failed:\s*\d+/i.test(line));
|
|
123
|
+
if (diagnostics.length >= 2) {
|
|
88
124
|
return ("the harness could not spawn any child process — its sandbox refused " +
|
|
89
125
|
"(CreateProcessAsUserW failed). Any answer it gave was produced without " +
|
|
90
126
|
"reading or running anything. On Windows this is usually a path the " +
|
|
@@ -114,15 +150,119 @@ const POSIX_ARG_MAX = 128 * 1024 - 2048;
|
|
|
114
150
|
* route (a `cursor-agent.CMD` PowerShell wrapper, not an npm shim, handed
|
|
115
151
|
* straight to cross-spawn) still failed at ~9k characters with the bare
|
|
116
152
|
* "The command line is too long." this check exists to replace. Measured on a
|
|
117
|
-
* stock install.
|
|
153
|
+
* stock install; the true ceiling was then bisected at exactly 8,191.
|
|
154
|
+
*
|
|
155
|
+
* Only eleven characters of margin, because commandLineLength no longer
|
|
156
|
+
* estimates — it builds cross-spawn's own escaped forms and measures them, so
|
|
157
|
+
* the slack that used to cover a wrong model is not needed and was costing
|
|
158
|
+
* ~10% of the usable prompt.
|
|
159
|
+
*
|
|
160
|
+
* One case that margin would NOT cover: cross-spawn keys its escaping on the
|
|
161
|
+
* SHEBANG-RESOLVED file, and unshifts the resolved interpreter path as an
|
|
162
|
+
* extra argument. This keys on the raw command, so a shebang script would go
|
|
163
|
+
* ~60 characters uncounted. It cannot happen through the dispatchers here —
|
|
164
|
+
* resolveCliCommand hands over a fully `which`-resolved path, and reaching
|
|
165
|
+
* cross-spawn's shebang branch on Windows needs an extensionless PATHEXT hit
|
|
166
|
+
* — but a future caller passing an unresolved command is the way in.
|
|
167
|
+
*/
|
|
168
|
+
const WINDOWS_CMD_SHIM_MAX = 8_180;
|
|
169
|
+
/**
|
|
170
|
+
* The limit that applies to THIS command, not to the platform in general.
|
|
171
|
+
*
|
|
172
|
+
* Keyed on what cross-spawn will actually DO, not on the extension string.
|
|
173
|
+
* cross-spawn routes through cmd.exe for anything that is not `.com` or `.exe`
|
|
174
|
+
* (lib/parse.js), so an extensionless target, a `.ps1`, or a hand-rolled shim
|
|
175
|
+
* gets the same 8,191-character ceiling as a `.cmd` — the first version of
|
|
176
|
+
* this listed `.cmd`/`.bat` explicitly and handed everything else the
|
|
177
|
+
* four-times-larger CreateProcess budget.
|
|
118
178
|
*/
|
|
119
|
-
const WINDOWS_CMD_SHIM_MAX = 8_000;
|
|
120
|
-
/** The limit that applies to THIS command, not to the platform in general. */
|
|
121
179
|
function commandLineBudget(command) {
|
|
122
180
|
if (process.platform !== "win32")
|
|
123
181
|
return POSIX_ARG_MAX;
|
|
124
|
-
const ext =
|
|
125
|
-
return ext === ".
|
|
182
|
+
const ext = path.extname(command).toLowerCase();
|
|
183
|
+
return ext === ".exe" || ext === ".com" ? WINDOWS_CMDLINE_MAX : WINDOWS_CMD_SHIM_MAX;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* cross-spawn's own meta-character class, copied verbatim from
|
|
187
|
+
* `cross-spawn/lib/util/escape.js`.
|
|
188
|
+
*
|
|
189
|
+
* Every one of these gets a `^` prefix when the target goes through cmd.exe —
|
|
190
|
+
* INCLUDING THE SPACE, which is the character that made hand-modelling this
|
|
191
|
+
* wrong. My first version counted `"` and `\` only, so ordinary prose (~15%
|
|
192
|
+
* spaces) and JSON measured well under budget and still died with cmd.exe's
|
|
193
|
+
* own "The command line is too long." — from ~6,600 characters for prose and
|
|
194
|
+
* ~4,500 for code, against a guard that did not fire until ~7,820.
|
|
195
|
+
*
|
|
196
|
+
* Copied rather than imported because it lives in cross-spawn's internals,
|
|
197
|
+
* which are not part of its public API. The coupling is real either way; a
|
|
198
|
+
* copy at least fails visibly if cross-spawn changes, and the tests below pin
|
|
199
|
+
* the shapes that actually matter.
|
|
200
|
+
*/
|
|
201
|
+
const CMD_META_CHARS = /([()\][%!^"`<>&|;, *?])/g;
|
|
202
|
+
/**
|
|
203
|
+
* cross-spawn double-escapes meta chars for an npm-style cmd shim
|
|
204
|
+
* (`node_modules/.bin/x.cmd`) — `isCmdShimRegExp` in its `lib/parse.js`.
|
|
205
|
+
*
|
|
206
|
+
* Counting them once meant such a target died at ~5,300 characters while the
|
|
207
|
+
* estimate said 6,400 against a budget of 8,000, so the guard stayed silent
|
|
208
|
+
* and the bare "The command line is too long." reached the caller anyway.
|
|
209
|
+
*/
|
|
210
|
+
const CMD_SHIM_DOUBLE_ESCAPE_RE = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
211
|
+
/**
|
|
212
|
+
* `<comspec> /d /s /c "` … `"` — what cross-spawn actually spawns, and it
|
|
213
|
+
* counts against the same ceiling.
|
|
214
|
+
*
|
|
215
|
+
* comspec, not the literal "cmd.exe": cross-spawn uses
|
|
216
|
+
* `process.env.comspec || "cmd.exe"`, which on a normal Windows install is the
|
|
217
|
+
* full `C:\WINDOWS\system32\cmd.exe` — twenty characters longer than the
|
|
218
|
+
* constant this started as. The drift test below caught that on its first run.
|
|
219
|
+
*/
|
|
220
|
+
function cmdWrapperOverhead() {
|
|
221
|
+
return `${process.env["comspec"] || "cmd.exe"} /d /s /c ""`.length;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* cross-spawn's `escapeCommand`, replicated: meta chars only, no quoting.
|
|
225
|
+
*/
|
|
226
|
+
function escapeCmdCommand(command) {
|
|
227
|
+
return command.replace(CMD_META_CHARS, "^$1");
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* cross-spawn's `escapeArgument`, replicated from `lib/util/escape.js`.
|
|
231
|
+
*
|
|
232
|
+
* REPLICATED, NOT ESTIMATED. The previous version added one character per
|
|
233
|
+
* backslash, but backslashes are only doubled in a run immediately before a
|
|
234
|
+
* quote or the end of the argument — so prompts full of Windows paths (~9%
|
|
235
|
+
* backslashes) were over-counted and REFUSED although they ran: an
|
|
236
|
+
* 804-character band, about 10% of the usable prompt, on the very route the
|
|
237
|
+
* check was written for. Before that the same function under-counted spaces.
|
|
238
|
+
* Both are the cost of hand-modelling something that already exists.
|
|
239
|
+
*/
|
|
240
|
+
function escapeCmdArgument(arg, doubleEscapeMetaChars) {
|
|
241
|
+
let out = quoteWindowsArgument(arg);
|
|
242
|
+
out = out.replace(CMD_META_CHARS, "^$1");
|
|
243
|
+
if (doubleEscapeMetaChars)
|
|
244
|
+
out = out.replace(CMD_META_CHARS, "^$1");
|
|
245
|
+
return out;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* The quoting half, which applies to EVERY Windows spawn — cmd.exe target or
|
|
249
|
+
* not. Only the `^` meta escaping above is cmd-specific.
|
|
250
|
+
*
|
|
251
|
+
* Split out because the first version of the non-cmd branch counted
|
|
252
|
+
* `arg.length + 3` and so ignored quote escaping entirely, which under-read a
|
|
253
|
+
* quote-heavy prompt heading for a native `.exe`. Caught by the test written
|
|
254
|
+
* for exactly that case one release earlier — the two branches need the same
|
|
255
|
+
* quoting and differ only in what comes after it.
|
|
256
|
+
*/
|
|
257
|
+
function quoteWindowsArgument(arg) {
|
|
258
|
+
let out = String(arg);
|
|
259
|
+
// A run of backslashes followed by a double quote: double the run, escape
|
|
260
|
+
// the quote.
|
|
261
|
+
out = out.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
262
|
+
// A run of backslashes at the end (about to be followed by the closing
|
|
263
|
+
// quote): double it.
|
|
264
|
+
out = out.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
265
|
+
return `"${out}"`;
|
|
126
266
|
}
|
|
127
267
|
/**
|
|
128
268
|
* How long the command line will actually be once escaped.
|
|
@@ -136,16 +276,22 @@ function commandLineBudget(command) {
|
|
|
136
276
|
* errno.
|
|
137
277
|
*/
|
|
138
278
|
function commandLineLength(command, args) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
279
|
+
if (process.platform !== "win32") {
|
|
280
|
+
return args.reduce((n, a) => n + a.length + 1, command.length);
|
|
281
|
+
}
|
|
282
|
+
if (commandLineBudget(command) !== WINDOWS_CMD_SHIM_MAX) {
|
|
283
|
+
// Straight to CreateProcess: the same quoting, without cmd.exe's escaping.
|
|
284
|
+
return args.reduce((n, a) => n + quoteWindowsArgument(a).length + 1, command.length);
|
|
285
|
+
}
|
|
286
|
+
// cmd.exe target. Build the escaped forms and MEASURE them, rather than
|
|
287
|
+
// estimating from character counts — two releases running, the estimate was
|
|
288
|
+
// wrong in one direction and then the other.
|
|
289
|
+
const double = CMD_SHIM_DOUBLE_ESCAPE_RE.test(command);
|
|
290
|
+
const parts = [escapeCmdCommand(command), ...args.map((a) => escapeCmdArgument(a, double))];
|
|
291
|
+
// `cmd.exe /d /s /c "<line>"` — the wrapper cross-spawn actually spawns, and
|
|
292
|
+
// it counts against the same 8,191 ceiling. Uncounted before, which put the
|
|
293
|
+
// estimate a constant ~29 characters under the truth.
|
|
294
|
+
return cmdWrapperOverhead() + parts.join(" ").length;
|
|
149
295
|
}
|
|
150
296
|
/** Walk a nested object by dotted path, e.g. "message.content". */
|
|
151
297
|
function getPath(value, path) {
|
|
@@ -608,7 +754,7 @@ export class GenericCliDispatcher extends BaseDispatcher {
|
|
|
608
754
|
// reports this on whichever one it likes while its real payload goes to
|
|
609
755
|
// the other, and a lenient exit-0 route would otherwise return the
|
|
610
756
|
// delegate's uninformed answer as a success.
|
|
611
|
-
const envFailure = detectHarnessEnvironmentFailure(
|
|
757
|
+
const envFailure = detectHarnessEnvironmentFailure(stdout, stderr);
|
|
612
758
|
// A structured error overrides exit code entirely — a CLI that reports
|
|
613
759
|
// failure in its own response body (is_error, a turn.failed event) is
|
|
614
760
|
// reporting failure regardless of what the process exit code says.
|
|
@@ -681,4 +827,6 @@ export class GenericCliDispatcher extends BaseDispatcher {
|
|
|
681
827
|
yield { type: "completion", result };
|
|
682
828
|
}
|
|
683
829
|
}
|
|
830
|
+
/** Exported for the drift test against cross-spawn. Not part of the API. */
|
|
831
|
+
export const __commandLineLengthForTest = commandLineLength;
|
|
684
832
|
//# sourceMappingURL=generic-cli.js.map
|
|
@@ -1 +1 @@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U,GAAG,UAAU,CAAC;QAC/C,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvC,CAAC;CACF;AAED,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"}
|
package/dist/http/parse.d.ts
CHANGED
|
@@ -34,6 +34,13 @@ export interface ChatRequest {
|
|
|
34
34
|
hints?: unknown;
|
|
35
35
|
safetyProfile?: unknown;
|
|
36
36
|
workspacePolicy?: unknown;
|
|
37
|
+
taskType?: unknown;
|
|
38
|
+
routePolicy?: unknown;
|
|
39
|
+
preferLargeContext?: unknown;
|
|
40
|
+
timeoutMs?: unknown;
|
|
41
|
+
contextJobs?: unknown;
|
|
42
|
+
service?: unknown;
|
|
43
|
+
escalate?: unknown;
|
|
37
44
|
}
|
|
38
45
|
export declare const MAX_REQUEST_BODY_BYTES: number;
|
|
39
46
|
/**
|
|
@@ -50,6 +57,15 @@ export declare class BadRequestError extends Error {
|
|
|
50
57
|
/** Mirrors MAX_CONTEXT_FILES in mcp/tools.ts — the two surfaces must agree. */
|
|
51
58
|
export declare const MAX_CONTEXT_FILES_HTTP = 64;
|
|
52
59
|
export declare function readJson(req: IncomingMessage, maxBytes?: number): Promise<unknown>;
|
|
60
|
+
/**
|
|
61
|
+
* Every one of these ends up in an argv array — `files` as `--add-dir`
|
|
62
|
+
* grants, `models` as route ids, `hints.model` as `--model`. A NUL fails deep
|
|
63
|
+
* inside cross-spawn with "The argument 'args[N]' must be a string without
|
|
64
|
+
* null bytes", which is the raw Node internal a boundary rejection replaces.
|
|
65
|
+
* The prompt was guarded and these three were not, on BOTH surfaces — so
|
|
66
|
+
* parity held while both were wrong, which no parity row can catch.
|
|
67
|
+
*/
|
|
68
|
+
export declare function noNul(value: string, field: string): void;
|
|
53
69
|
export declare function parseChatRequest(raw: unknown): {
|
|
54
70
|
prompt: string;
|
|
55
71
|
files: string[];
|
package/dist/http/parse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/http/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/http/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAI/D,gFAAgF;AAChF,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAElD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAGhB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE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