wicked-crew 0.7.12 → 0.7.14
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/dist/api/delivery-cache.d.ts +135 -0
- package/dist/api/delivery-cache.d.ts.map +1 -0
- package/dist/api/delivery-cache.js +245 -0
- package/dist/api/delivery-cache.js.map +1 -0
- package/dist/api/delivery-index.d.ts +42 -11
- package/dist/api/delivery-index.d.ts.map +1 -1
- package/dist/api/delivery-index.js +104 -52
- package/dist/api/delivery-index.js.map +1 -1
- package/dist/api/endpoint-manifest-live.d.ts.map +1 -1
- package/dist/api/endpoint-manifest-live.js +0 -1
- package/dist/api/endpoint-manifest-live.js.map +1 -1
- package/dist/api/endpoint-manifest.d.ts +26 -6
- package/dist/api/endpoint-manifest.d.ts.map +1 -1
- package/dist/api/endpoint-manifest.js +46 -10
- package/dist/api/endpoint-manifest.js.map +1 -1
- package/dist/api/gate-cache.d.ts +24 -0
- package/dist/api/gate-cache.d.ts.map +1 -1
- package/dist/api/gate-cache.js +35 -0
- package/dist/api/gate-cache.js.map +1 -1
- package/dist/api/routes.d.ts +14 -7
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +60 -13
- package/dist/api/routes.js.map +1 -1
- package/dist/api/seat-health.d.ts +0 -25
- package/dist/api/seat-health.d.ts.map +1 -1
- package/dist/api/seat-health.js +6 -81
- package/dist/api/seat-health.js.map +1 -1
- package/dist/api/server.d.ts +18 -15
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +87 -36
- package/dist/api/server.js.map +1 -1
- package/dist/api/stall-watchdog.d.ts +40 -3
- package/dist/api/stall-watchdog.d.ts.map +1 -1
- package/dist/api/stall-watchdog.js +94 -15
- package/dist/api/stall-watchdog.js.map +1 -1
- package/dist/campaigns/rollup.d.ts +3 -0
- package/dist/campaigns/rollup.d.ts.map +1 -1
- package/dist/campaigns/rollup.js +17 -2
- package/dist/campaigns/rollup.js.map +1 -1
- package/dist/campaigns/routes.d.ts +4 -4
- package/dist/core/deliver.d.ts.map +1 -1
- package/dist/core/deliver.js +31 -0
- package/dist/core/deliver.js.map +1 -1
- package/dist/core/types.d.ts +20 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +20 -1
- package/dist/core/types.js.map +1 -1
- package/endpoint-manifest.json +3 -2
- package/package.json +2 -2
|
@@ -50,6 +50,20 @@ export function deliveryStateOf(session, url, worktreeExists) {
|
|
|
50
50
|
}
|
|
51
51
|
return { delivery: 'none' };
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Thrown by the production probes when git COULD NOT ANSWER — infrastructure absence, not a
|
|
55
|
+
* verdict. The old behavior folded this into `false` ("not clean" / "not empty"), which was
|
|
56
|
+
* safe while every consumer re-probed within a TTL, but the delivery cache records derivations:
|
|
57
|
+
* caching a raced probe's `false` pinned a WRONG 'stranded' on a vacuous run (forever, where no
|
|
58
|
+
* sweep ticks). Distinguishing absence from verdict at the probe layer is what lets the cache
|
|
59
|
+
* refuse to record it.
|
|
60
|
+
*/
|
|
61
|
+
export class VacuityProbeUnavailable extends Error {
|
|
62
|
+
constructor(what, cause) {
|
|
63
|
+
super(`${what}: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
64
|
+
this.name = 'VacuityProbeUnavailable';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
53
67
|
/**
|
|
54
68
|
* The delivery derivation WITH the vacuity split (crew#311) — the async refinement over
|
|
55
69
|
* {@link deliveryStateOf} the run DTOs actually use.
|
|
@@ -67,11 +81,13 @@ export function deliveryStateOf(session, url, worktreeExists) {
|
|
|
67
81
|
* work anywhere, while "reaped tree + commits on the branch" is landed work and stays
|
|
68
82
|
* `'none'` (nothing left in a worktree to lift).
|
|
69
83
|
*
|
|
70
|
-
* Both shapes now read `'vacuous'`, and only on POSITIVE reads
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
84
|
+
* Both shapes now read `'vacuous'`, and only on POSITIVE reads. A missing repo RECORD still
|
|
85
|
+
* reads `false` from the branch probe (a permanent state — the label honestly falls back to
|
|
86
|
+
* `'none'`), but a git failure now PROPAGATES as {@link VacuityProbeUnavailable} instead of
|
|
87
|
+
* silently keeping the pre-existing label: the caller owns the degrade (see the failure
|
|
88
|
+
* contract on {@link VacuityProbes}). (One honest edge: an operator who hand-deleted a
|
|
89
|
+
* completed run's branch has made its work unreachable — it reads vacuous, which is what the
|
|
90
|
+
* run now amounts to.)
|
|
75
91
|
*/
|
|
76
92
|
export async function deliveryStateWithVacuity(session, url, probes) {
|
|
77
93
|
const state = deliveryStateOf(session, url, probes.worktreeExists);
|
|
@@ -93,44 +109,73 @@ export async function deliveryStateWithVacuity(session, url, probes) {
|
|
|
93
109
|
* terminal run's worktree only changes under operator hands, and `GET /runs` is polled — an
|
|
94
110
|
* unmemoized probe would be two git subprocesses per stranded run per poll. */
|
|
95
111
|
export const WORKTREE_CLEAN_TTL_MS = 30_000;
|
|
112
|
+
/** How long a FAILED probe ({@link VacuityProbeUnavailable}) is memoized before a real
|
|
113
|
+
* re-probe. Deliberately short: a failure is usually a raced teardown or a load spike, and
|
|
114
|
+
* the delivery cache's retry needs a genuine re-probe in ~a second — but a request-path
|
|
115
|
+
* consumer (the campaigns rollup) polling over a persistently broken repo must not spawn two
|
|
116
|
+
* 10s-timeout gits per poll tick either. */
|
|
117
|
+
export const PROBE_FAILURE_TTL_MS = 1_000;
|
|
118
|
+
/** The shared memo shape for both probes: verdicts live for `ttlMs`, failures for
|
|
119
|
+
* {@link PROBE_FAILURE_TTL_MS} (re-thrown, not re-spawned, within that window). */
|
|
120
|
+
function memoized(probe, ttlMs, now) {
|
|
121
|
+
const memo = new Map();
|
|
122
|
+
return async (key) => {
|
|
123
|
+
const hit = memo.get(key);
|
|
124
|
+
if (hit !== undefined && now() - hit.at < ('err' in hit ? PROBE_FAILURE_TTL_MS : ttlMs)) {
|
|
125
|
+
if ('err' in hit)
|
|
126
|
+
throw hit.err;
|
|
127
|
+
return hit.value;
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
const value = await probe(key);
|
|
131
|
+
memo.set(key, { at: now(), value });
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
const e = err instanceof VacuityProbeUnavailable
|
|
136
|
+
? err
|
|
137
|
+
: new VacuityProbeUnavailable('vacuity probe failed', err);
|
|
138
|
+
memo.set(key, { at: now(), err: e });
|
|
139
|
+
throw e;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
96
143
|
/**
|
|
97
144
|
* The production `worktreeIsClean` probe: the SAME two read-only instruments as the engine's
|
|
98
145
|
* `worktree_is_clean` — uncommitted paths (`git status --porcelain`, untracked included) and
|
|
99
146
|
* run-branch-only commits (`git log --oneline HEAD --not --exclude=wicked/* --branches`) —
|
|
100
147
|
* memoized per worktree path for {@link WORKTREE_CLEAN_TTL_MS}.
|
|
101
148
|
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
149
|
+
* A verdict comes only from git ANSWERING: exit 0 with empty/non-empty output. Any failure —
|
|
150
|
+
* git unspawnable, a timeout kill, a 128 "not a git repository", ENOENT from a worktree racing
|
|
151
|
+
* the terminal reap — throws {@link VacuityProbeUnavailable} (memoized for
|
|
152
|
+
* {@link PROBE_FAILURE_TTL_MS}) so no consumer can mistake absence for "not clean" and pin a
|
|
153
|
+
* wrong 'stranded' (PR #435 review). Callers degrade per the {@link VacuityProbes} contract.
|
|
105
154
|
*/
|
|
106
155
|
export function gitWorktreeIsClean(ttlMs = WORKTREE_CLEAN_TTL_MS, now = Date.now) {
|
|
107
|
-
const memo = new Map();
|
|
108
156
|
const probe = async (path) => {
|
|
109
157
|
const gitEmpty = async (args) => {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
158
|
+
try {
|
|
159
|
+
// Read-only git plumbing over the run's own worktree; argv array, never a shell string.
|
|
160
|
+
// GIT_OPTIONAL_LOCKS=0 (git ≥2.15): `git status` otherwise takes index.lock
|
|
161
|
+
// opportunistically to write back a refreshed index — a background probe must never
|
|
162
|
+
// hold a lock a concurrent deliver's `git add`/`git commit` can collide with.
|
|
163
|
+
const { stdout } = await execCapped('git', args, {
|
|
164
|
+
cwd: path,
|
|
165
|
+
timeout: 10_000,
|
|
166
|
+
windowsHide: true,
|
|
167
|
+
env: { ...process.env, GIT_OPTIONAL_LOCKS: '0' },
|
|
168
|
+
});
|
|
169
|
+
return stdout.trim() === '';
|
|
170
|
+
}
|
|
171
|
+
catch (err) {
|
|
172
|
+
throw new VacuityProbeUnavailable(`git ${args[0] ?? ''} could not answer over ${path}`, err);
|
|
173
|
+
}
|
|
117
174
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
(await gitEmpty(['log', '--oneline', 'HEAD', '--not', '--exclude=wicked/*', '--branches'])));
|
|
121
|
-
}
|
|
122
|
-
catch {
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
return async (path) => {
|
|
127
|
-
const hit = memo.get(path);
|
|
128
|
-
if (hit !== undefined && now() - hit.at < ttlMs)
|
|
129
|
-
return hit.clean;
|
|
130
|
-
const clean = await probe(path);
|
|
131
|
-
memo.set(path, { at: now(), clean });
|
|
132
|
-
return clean;
|
|
175
|
+
return ((await gitEmpty(['status', '--porcelain'])) &&
|
|
176
|
+
(await gitEmpty(['log', '--oneline', 'HEAD', '--not', '--exclude=wicked/*', '--branches'])));
|
|
133
177
|
};
|
|
178
|
+
return memoized(probe, ttlMs, now);
|
|
134
179
|
}
|
|
135
180
|
/**
|
|
136
181
|
* The production `runBranchIsEmpty` probe — the reaped-worktree half of vacuity (crew#311).
|
|
@@ -139,37 +184,51 @@ export function gitWorktreeIsClean(ttlMs = WORKTREE_CLEAN_TTL_MS, now = Date.now
|
|
|
139
184
|
* `refs/heads/wicked/<runId>` no longer exists in the run's repo, or it exists and
|
|
140
185
|
* `git log <branch> --not --exclude=wicked/* --branches` is empty (the branch carries no commit
|
|
141
186
|
* of its own — the exact second instrument of the engine's `worktree_is_clean`, aimed at the
|
|
142
|
-
* branch instead of a checkout).
|
|
143
|
-
*
|
|
187
|
+
* branch instead of a checkout). A repo the registry no longer RESOLVES reads FALSE — a
|
|
188
|
+
* permanent state, the label honestly falls back to `'none'` — while a git failure or a
|
|
189
|
+
* registry read failure throws {@link VacuityProbeUnavailable} (absence of an answer, PR #435
|
|
190
|
+
* review), memoized for {@link PROBE_FAILURE_TTL_MS}; callers degrade per the
|
|
191
|
+
* {@link VacuityProbes} contract.
|
|
144
192
|
*
|
|
145
193
|
* `resolveRepoRoot` is injected (routes wire it to the adapter's repo registry) and its answer
|
|
146
194
|
* rides the same TTL memo as the verdict, so a `GET /runs` poll costs at most one registry read
|
|
147
195
|
* + one git pair per run per window.
|
|
148
196
|
*/
|
|
149
197
|
export function gitRunBranchIsEmpty(resolveRepoRoot, ttlMs = WORKTREE_CLEAN_TTL_MS, now = Date.now) {
|
|
150
|
-
const
|
|
151
|
-
|
|
198
|
+
const probe = async (key) => {
|
|
199
|
+
const [repoRef, runId] = key.split('\0');
|
|
152
200
|
let root;
|
|
153
201
|
try {
|
|
154
202
|
root = await resolveRepoRoot(repoRef);
|
|
155
203
|
}
|
|
156
|
-
catch {
|
|
157
|
-
|
|
204
|
+
catch (err) {
|
|
205
|
+
// A registry READ failure is transient infrastructure — not the same fact as the
|
|
206
|
+
// registry answering "no such repo".
|
|
207
|
+
throw new VacuityProbeUnavailable(`repo registry could not answer for ${repoRef}`, err);
|
|
158
208
|
}
|
|
159
209
|
if (root === undefined)
|
|
160
|
-
return false;
|
|
210
|
+
return false; // repo record gone — permanent, honestly 'none'
|
|
161
211
|
const branch = `refs/heads/wicked/${runId}`;
|
|
162
212
|
const gitOut = (args) =>
|
|
163
213
|
// Read-only git plumbing over the registered repo root; argv array, never a shell string.
|
|
164
|
-
|
|
214
|
+
// GIT_OPTIONAL_LOCKS=0: same no-opportunistic-locks posture as the worktree probe — this
|
|
215
|
+
// root is the repo a deliver (or the operator) may be writing in right now.
|
|
216
|
+
execCapped('git', args, {
|
|
217
|
+
cwd: root,
|
|
218
|
+
timeout: 10_000,
|
|
219
|
+
windowsHide: true,
|
|
220
|
+
env: { ...process.env, GIT_OPTIONAL_LOCKS: '0' },
|
|
221
|
+
});
|
|
165
222
|
try {
|
|
166
223
|
await gitOut(['rev-parse', '--verify', '--quiet', branch]);
|
|
167
224
|
}
|
|
168
225
|
catch (err) {
|
|
169
226
|
// `--verify --quiet` on a missing ref is a CLEAN exit 1 — the one verifiable "branch
|
|
170
227
|
// gone". Anything else (git unspawnable, deleted root ⇒ ENOENT, a 128 "not a git
|
|
171
|
-
// repository", a timeout kill) is
|
|
172
|
-
|
|
228
|
+
// repository", a timeout kill) is git NOT ANSWERING.
|
|
229
|
+
if (err.code === 1)
|
|
230
|
+
return true;
|
|
231
|
+
throw new VacuityProbeUnavailable(`git rev-parse could not answer over ${root}`, err);
|
|
173
232
|
}
|
|
174
233
|
try {
|
|
175
234
|
const { stdout } = await gitOut([
|
|
@@ -182,19 +241,12 @@ export function gitRunBranchIsEmpty(resolveRepoRoot, ttlMs = WORKTREE_CLEAN_TTL_
|
|
|
182
241
|
]);
|
|
183
242
|
return stdout.trim() === '';
|
|
184
243
|
}
|
|
185
|
-
catch {
|
|
186
|
-
|
|
244
|
+
catch (err) {
|
|
245
|
+
throw new VacuityProbeUnavailable(`git log could not answer over ${root}`, err);
|
|
187
246
|
}
|
|
188
247
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
const hit = memo.get(key);
|
|
192
|
-
if (hit !== undefined && now() - hit.at < ttlMs)
|
|
193
|
-
return hit.empty;
|
|
194
|
-
const empty = await probe(repoRef, runId);
|
|
195
|
-
memo.set(key, { at: now(), empty });
|
|
196
|
-
return empty;
|
|
197
|
-
};
|
|
248
|
+
const run = memoized(probe, ttlMs, now);
|
|
249
|
+
return (repoRef, runId) => run(`${repoRef}\0${runId}`);
|
|
198
250
|
}
|
|
199
251
|
/**
|
|
200
252
|
* The PR URL in a deliver transcript — crew's own extraction, mirrored
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-index.js","sourceRoot":"","sources":["../../src/api/delivery-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AASlE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA8D,EAC9D,GAAuB,EACvB,cAAyC;IAEzC,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;IACzE,IACE,OAAO,CAAC,MAAM,KAAK,WAAW;QAC9B,OAAO,CAAC,QAAQ,IAAI,IAAI;QACxB,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ;QACnC,OAAO,CAAC,OAAO,KAAK,EAAE;QACtB,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAC/B,CAAC;QACD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAClC,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"delivery-index.js","sourceRoot":"","sources":["../../src/api/delivery-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AASlE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA8D,EAC9D,GAAuB,EACvB,cAAyC;IAE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AE,MAAM,wBAAwB,CAAC;AAEtF,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"endpoint-manifest-live.d.ts","sourceRoot":"","sources":["../../src/api/endpoint-manifest-live.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEtF,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAkC7E"}
|
|
@@ -48,7 +48,6 @@ export async function collectLiveEndpointManifest() {
|
|
|
48
48
|
auditPath: join(scratch, 'audit.log'),
|
|
49
49
|
projectEvents: { disabled: true },
|
|
50
50
|
interactiveWsRelay: { disabled: true },
|
|
51
|
-
seatHealthProbe: { enabled: false },
|
|
52
51
|
stallWatchdog: { enabled: false },
|
|
53
52
|
// Nonexistent on purpose — headless boot; see the module header.
|
|
54
53
|
studioRoot: join(scratch, 'no-studio-bundle'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-manifest-live.js","sourceRoot":"","sources":["../../src/api/endpoint-manifest-live.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAyB,MAAM,wBAAwB,CAAC;AAEtF,MAAM,CAAC,KAAK,UAAU,2BAA2B;IAC/C,4FAA4F;IAC5F,kFAAkF;IAClF,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,WA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,CAAC;AACH,CAAC"}
|
|
@@ -94,14 +94,34 @@ export interface EndpointManifest {
|
|
|
94
94
|
*/
|
|
95
95
|
export declare function installEndpointManifestHook(app: FastifyInstance): EndpointEntry[];
|
|
96
96
|
/**
|
|
97
|
-
* The published wire contract's version
|
|
97
|
+
* The published wire contract's version.
|
|
98
98
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
99
|
+
* # Prefer the WORKSPACE-LOCAL source of truth (crew#426)
|
|
100
|
+
*
|
|
101
|
+
* The workspace-local `packages/crew-api-types/package.json` — found by walking up from THIS
|
|
102
|
+
* module to the `packages/` dir that holds it — is read FIRST, and is the version this function
|
|
103
|
+
* stamps whenever it exists. That is deliberately the version of the checkout THIS module lives in:
|
|
104
|
+
* in a per-run worktree the module is `<worktree>/packages/crew/...`, so the walk finds the
|
|
105
|
+
* WORKTREE's own (possibly bumped) `crew-api-types/package.json`, not the parent checkout's.
|
|
106
|
+
*
|
|
107
|
+
* Without this, `apiTypesVersion()` resolved the version through `node_modules` (below), and a
|
|
108
|
+
* per-run worktree is provisioned with `git worktree add` ALONE — no `node_modules` of its own — so
|
|
109
|
+
* `require.resolve` walked UP to the PARENT clone's `node_modules/wicked-crew-api-types` symlink and
|
|
110
|
+
* stamped the MAIN checkout's un-bumped version. The generated manifest + api tests then disagreed
|
|
111
|
+
* with the worktree's bumped `package.json`, and (with the lockfile also stale) CI's `npm ci` broke.
|
|
112
|
+
* Reading the workspace file directly makes codegen correct-by-construction even when node_modules is
|
|
113
|
+
* absent. (The lockfile re-sync is the deliver preflight's job — see core/deliver.ts; this fix alone
|
|
114
|
+
* cannot repair the lockfile.)
|
|
115
|
+
*
|
|
116
|
+
* # Fallback: the actually-installed dependency
|
|
117
|
+
*
|
|
118
|
+
* NOT `require('wicked-crew-api-types/package.json')`: that package's exports map exposes only `.`
|
|
119
|
+
* (types-only, no runtime condition), so both the subpath and a bare resolve are refused. Walking
|
|
120
|
+
* the resolver's candidate directories and reading the file with fs sidesteps the exports map while
|
|
121
|
+
* still honoring the real resolution order (workspace link included). Retained for any layout where
|
|
122
|
+
* the workspace source is not reachable from this module (e.g. a flat published install).
|
|
103
123
|
*/
|
|
104
|
-
export declare function apiTypesVersion(): string;
|
|
124
|
+
export declare function apiTypesVersion(moduleUrl?: string | URL): string;
|
|
105
125
|
/** Entries → the committed artifact: stable order, contract version stamped. */
|
|
106
126
|
export declare function buildEndpointManifest(entries: EndpointEntry[]): EndpointManifest;
|
|
107
127
|
//# sourceMappingURL=endpoint-manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-manifest.d.ts","sourceRoot":"","sources":["../../src/api/endpoint-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;
|
|
1
|
+
{"version":3,"file":"endpoint-manifest.d.ts","sourceRoot":"","sources":["../../src/api/endpoint-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAC;AAE7D,iGAAiG;AACjG,MAAM,WAAW,mBAAmB;IAClC,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,OAAO,QAAQ,SAAS,CAAC;IACvB,UAAU,oBAAoB;QAC5B,mEAAmE;QACnE,QAAQ,CAAC,EAAE,mBAAmB,CAAC;KAChC;IACD,UAAU,eAAe;QACvB,8EAA8E;QAC9E,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAC;KACpC;CACF;AAED,yCAAyC;AACzC,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,4CAA4C;IAC5C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sFAAsF;IACtF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,CAAC,CAAC;IACX;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,eAAe,GAAG,aAAa,EAAE,CAgCjF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,eAAe,CAAC,SAAS,GAAE,MAAM,GAAG,GAAqB,GAAG,MAAM,CAyBjF;AAED,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAKhF"}
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
*/
|
|
45
45
|
import { existsSync, readFileSync } from 'node:fs';
|
|
46
46
|
import { createRequire } from 'node:module';
|
|
47
|
-
import { join } from 'node:path';
|
|
47
|
+
import { dirname, join } from 'node:path';
|
|
48
|
+
import { fileURLToPath } from 'node:url';
|
|
48
49
|
/**
|
|
49
50
|
* Register the accumulating `onRoute` hook. MUST run before any route is registered — fastify
|
|
50
51
|
* only replays `onRoute` for routes added after the hook exists. Returns the live array the hook
|
|
@@ -83,17 +84,52 @@ export function installEndpointManifestHook(app) {
|
|
|
83
84
|
return entries;
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
|
-
* The published wire contract's version
|
|
87
|
+
* The published wire contract's version.
|
|
87
88
|
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
89
|
+
* # Prefer the WORKSPACE-LOCAL source of truth (crew#426)
|
|
90
|
+
*
|
|
91
|
+
* The workspace-local `packages/crew-api-types/package.json` — found by walking up from THIS
|
|
92
|
+
* module to the `packages/` dir that holds it — is read FIRST, and is the version this function
|
|
93
|
+
* stamps whenever it exists. That is deliberately the version of the checkout THIS module lives in:
|
|
94
|
+
* in a per-run worktree the module is `<worktree>/packages/crew/...`, so the walk finds the
|
|
95
|
+
* WORKTREE's own (possibly bumped) `crew-api-types/package.json`, not the parent checkout's.
|
|
96
|
+
*
|
|
97
|
+
* Without this, `apiTypesVersion()` resolved the version through `node_modules` (below), and a
|
|
98
|
+
* per-run worktree is provisioned with `git worktree add` ALONE — no `node_modules` of its own — so
|
|
99
|
+
* `require.resolve` walked UP to the PARENT clone's `node_modules/wicked-crew-api-types` symlink and
|
|
100
|
+
* stamped the MAIN checkout's un-bumped version. The generated manifest + api tests then disagreed
|
|
101
|
+
* with the worktree's bumped `package.json`, and (with the lockfile also stale) CI's `npm ci` broke.
|
|
102
|
+
* Reading the workspace file directly makes codegen correct-by-construction even when node_modules is
|
|
103
|
+
* absent. (The lockfile re-sync is the deliver preflight's job — see core/deliver.ts; this fix alone
|
|
104
|
+
* cannot repair the lockfile.)
|
|
105
|
+
*
|
|
106
|
+
* # Fallback: the actually-installed dependency
|
|
107
|
+
*
|
|
108
|
+
* NOT `require('wicked-crew-api-types/package.json')`: that package's exports map exposes only `.`
|
|
109
|
+
* (types-only, no runtime condition), so both the subpath and a bare resolve are refused. Walking
|
|
110
|
+
* the resolver's candidate directories and reading the file with fs sidesteps the exports map while
|
|
111
|
+
* still honoring the real resolution order (workspace link included). Retained for any layout where
|
|
112
|
+
* the workspace source is not reachable from this module (e.g. a flat published install).
|
|
92
113
|
*/
|
|
93
|
-
export function apiTypesVersion() {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
114
|
+
export function apiTypesVersion(moduleUrl = import.meta.url) {
|
|
115
|
+
// Walk up from this module to the `packages/` dir that carries `crew-api-types` (works from both
|
|
116
|
+
// `packages/crew/src/api` under tsx and `packages/crew/dist/api` in the built daemon — same depth).
|
|
117
|
+
// `moduleUrl` defaults to this module and is a parameter only so the test can anchor the walk at a
|
|
118
|
+
// fixture tree; production callers pass nothing.
|
|
119
|
+
let dir = dirname(fileURLToPath(moduleUrl));
|
|
120
|
+
for (;;) {
|
|
121
|
+
const workspacePkg = join(dir, 'crew-api-types', 'package.json');
|
|
122
|
+
if (existsSync(workspacePkg)) {
|
|
123
|
+
return JSON.parse(readFileSync(workspacePkg, 'utf8')).version;
|
|
124
|
+
}
|
|
125
|
+
const parent = dirname(dir);
|
|
126
|
+
if (parent === dir)
|
|
127
|
+
break;
|
|
128
|
+
dir = parent;
|
|
129
|
+
}
|
|
130
|
+
const require = createRequire(moduleUrl);
|
|
131
|
+
for (const resolveDir of require.resolve.paths('wicked-crew-api-types') ?? []) {
|
|
132
|
+
const pkgPath = join(resolveDir, 'wicked-crew-api-types', 'package.json');
|
|
97
133
|
if (existsSync(pkgPath)) {
|
|
98
134
|
return JSON.parse(readFileSync(pkgPath, 'utf8')).version;
|
|
99
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-manifest.js","sourceRoot":"","sources":["../../src/api/endpoint-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint-manifest.js","sourceRoot":"","sources":["../../src/api/endpoint-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EA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,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,uBAAuB,EAAE,cAAc,CAAC,CAAC;QAC1E,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,OAAQ,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAyB,CAAC,OAAO,CAAC;QACpF,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CACb,kHAAkH,CACnH,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,qBAAqB,CAAC,OAAwB;IAC5D,MAAM,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CACjC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAC3E,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,EAAE,SAAS,EAAE,CAAC;AACvE,CAAC"}
|
package/dist/api/gate-cache.d.ts
CHANGED
|
@@ -9,7 +9,31 @@ export interface GateCacheEntry {
|
|
|
9
9
|
lifecycle: 'open';
|
|
10
10
|
/** When the daemon observed the gate. */
|
|
11
11
|
receivedAt: string;
|
|
12
|
+
/**
|
|
13
|
+
* Present ONLY when the gate prompt reads as a pure sandbox/tool refusal — the worker reported it
|
|
14
|
+
* could not act, with no sign of productive work (issue #419). A warning for the operator, never a
|
|
15
|
+
* gate decision; omitted entirely on a normal gate so the wire is byte-identical.
|
|
16
|
+
*/
|
|
17
|
+
refusal?: {
|
|
18
|
+
matched: boolean;
|
|
19
|
+
reason: string;
|
|
20
|
+
};
|
|
12
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Detect whether a gate prompt is a PURE sandbox/tool refusal — the worker reporting it could not
|
|
24
|
+
* act (read-only sandbox, rejected writes, "could not modify/regenerate"), with NO sign it did real
|
|
25
|
+
* work (issue #419). Returns `{ matched: true, reason }` only when a refusal signature fires AND no
|
|
26
|
+
* work-done phrase vetoes it; `undefined` otherwise. This is a WARNING signal surfaced on the gate
|
|
27
|
+
* wire so an operator does not approve a refusal as if it were work — it never gates a decision.
|
|
28
|
+
*
|
|
29
|
+
* The bias is deliberately toward NOT flagging: a genuine work transcript that merely mentions
|
|
30
|
+
* "sandbox"/"blocked", or a mixed turn that refused one tool but did real work elsewhere, must not
|
|
31
|
+
* be flagged. A missed refusal is a lesser harm than a false one.
|
|
32
|
+
*/
|
|
33
|
+
export declare function detectRefusal(text: string): {
|
|
34
|
+
matched: boolean;
|
|
35
|
+
reason: string;
|
|
36
|
+
} | undefined;
|
|
13
37
|
/**
|
|
14
38
|
* Gate-prompt cache over a durable log (DES-STUDIO-001 §3.3).
|
|
15
39
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-cache.d.ts","sourceRoot":"","sources":["../../src/api/gate-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"gate-cache.d.ts","sourceRoot":"","sources":["../../src/api/gate-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAoB5F;AAkDD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqC;IAE7D,8CAA8C;IAC9C,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAI9B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,GAAG,SAAS;IAQvE,8CAA8C;IAC9C,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAI9C;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI;IAIjD,8FAA8F;IAC9F,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI;CAQtC"}
|
package/dist/api/gate-cache.js
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detect whether a gate prompt is a PURE sandbox/tool refusal — the worker reporting it could not
|
|
3
|
+
* act (read-only sandbox, rejected writes, "could not modify/regenerate"), with NO sign it did real
|
|
4
|
+
* work (issue #419). Returns `{ matched: true, reason }` only when a refusal signature fires AND no
|
|
5
|
+
* work-done phrase vetoes it; `undefined` otherwise. This is a WARNING signal surfaced on the gate
|
|
6
|
+
* wire so an operator does not approve a refusal as if it were work — it never gates a decision.
|
|
7
|
+
*
|
|
8
|
+
* The bias is deliberately toward NOT flagging: a genuine work transcript that merely mentions
|
|
9
|
+
* "sandbox"/"blocked", or a mixed turn that refused one tool but did real work elsewhere, must not
|
|
10
|
+
* be flagged. A missed refusal is a lesser harm than a false one.
|
|
11
|
+
*/
|
|
12
|
+
export function detectRefusal(text) {
|
|
13
|
+
const SIGNATURES = [
|
|
14
|
+
{ re: /blocked by[^.\n]*read-only (?:sandbox|workspace)/i, reason: 'blocked by a read-only sandbox' },
|
|
15
|
+
{ re: /writes?\s+(?:are|were)\s+rejected/i, reason: 'sandbox rejected writes' },
|
|
16
|
+
{ re: /could not (?:modify|regenerate|write|create)\b/i, reason: 'could not modify or regenerate files' },
|
|
17
|
+
{ re: /\bno files?\s+(?:were|was)\s+(?:changed|modified|written|created)\b/i, reason: 'no files were changed' },
|
|
18
|
+
{ re: /\bi\s+(?:cannot|can[’'`]?t)\s+(?:edit|modify|delete|write|create)\b/i, reason: 'refused a write operation' },
|
|
19
|
+
{
|
|
20
|
+
re: /network access[^.\n]*(?:unavailable|forbidden|blocked)|environment (?:forbids|prohibits)/i,
|
|
21
|
+
reason: 'blocked network/environment access',
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
// Any of these means the turn did real work — veto the flag. Err toward NOT flagging.
|
|
25
|
+
const WORK_DONE = /\bi\s+(?:fixed|implemented|added|changed|edited|wrote|created|updated|refactored|regenerated)\b|\bran\s+tests?\b|\btests?\s+(?:pass|passed|green)\b|\ball tests\b|\bthe fix\b|\bcommitted\b|\bsuccessfully\b|\bchanged\s+\d+\s+(?:files?|packages?)|\b\d+\s+(?:files?|packages?)\s+changed\b|\b\d+\s+(?:insertions?|deletions?)\b|\bdiff --git\b|\b\d+\s+passed\b/i;
|
|
26
|
+
const hit = SIGNATURES.find((s) => s.re.test(text));
|
|
27
|
+
if (hit === undefined)
|
|
28
|
+
return undefined;
|
|
29
|
+
if (WORK_DONE.test(text))
|
|
30
|
+
return undefined;
|
|
31
|
+
return { matched: true, reason: hit.reason };
|
|
32
|
+
}
|
|
1
33
|
/**
|
|
2
34
|
* When a gate was observed, ISO-8601.
|
|
3
35
|
*
|
|
@@ -24,11 +56,14 @@ function fold(entries, event) {
|
|
|
24
56
|
switch (event.type) {
|
|
25
57
|
case 'awaitingHuman':
|
|
26
58
|
if (typeof event.ord === 'number' && typeof event.prompt === 'string') {
|
|
59
|
+
const refusal = detectRefusal(event.prompt);
|
|
27
60
|
entries.set(session, {
|
|
28
61
|
ord: event.ord,
|
|
29
62
|
prompt: event.prompt,
|
|
30
63
|
lifecycle: 'open',
|
|
31
64
|
receivedAt: observedAt(event),
|
|
65
|
+
// Spread only when matched, so a normal gate's entry is byte-identical (no `refusal` key).
|
|
66
|
+
...(refusal !== undefined ? { refusal } : {}),
|
|
32
67
|
});
|
|
33
68
|
}
|
|
34
69
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-cache.js","sourceRoot":"","sources":["../../src/api/gate-cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gate-cache.js","sourceRoot":"","sources":["../../src/api/gate-cache.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,UAAU,GAA0C;QACxD,EAAE,EAAE,EAAE,mDAAmD,EAAE,MAAM,EAAE,gCAAgC,EAAE;QACrG,EAAE,EAAE,EAAE,oCAAoC,EAAE,MAAM,EAAE,yBAAyB,EAAE;QAC/E,EAAE,EAAE,EAAE,iDAAiD,EAAE,MAAM,EAAE,sCAAsC,EAAE;QACzG,EAAE,EAAE,EAAE,sEAAsE,EAAE,MAAM,EAAE,uBAAuB,EAAE;QAC/G,EAAE,EAAE,EAAE,sEAAsE,EAAE,MAAM,EAAE,2BAA2B,E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