wicked-crew 0.7.37 → 0.7.39
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/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +2 -2
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/chat-transcripts.d.ts +45 -2
- package/dist/api/chat-transcripts.d.ts.map +1 -1
- package/dist/api/chat-transcripts.js +89 -5
- package/dist/api/chat-transcripts.js.map +1 -1
- package/dist/api/routes.d.ts +51 -0
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +38 -1
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +12 -0
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +39 -0
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +87 -8
- package/dist/api/server.js.map +1 -1
- package/dist/api/testing.d.ts +26 -0
- package/dist/api/testing.d.ts.map +1 -1
- package/dist/api/testing.js +48 -2
- package/dist/api/testing.js.map +1 -1
- package/dist/api/worktree-sweep.d.ts +12 -0
- package/dist/api/worktree-sweep.d.ts.map +1 -0
- package/dist/api/worktree-sweep.js +41 -0
- package/dist/api/worktree-sweep.js.map +1 -0
- package/dist/cli/bearer.d.ts +8 -0
- package/dist/cli/bearer.d.ts.map +1 -0
- package/dist/cli/bearer.js +16 -0
- package/dist/cli/bearer.js.map +1 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +21 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/core/adapter.d.ts +2 -0
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +4 -0
- package/dist/core/adapter.js.map +1 -1
- package/dist/interactive/demo-events.d.ts +3 -0
- package/dist/interactive/demo-events.d.ts.map +1 -1
- package/dist/interactive/demo-events.js +14 -1
- package/dist/interactive/demo-events.js.map +1 -1
- package/dist/interactive/doc-grounding.d.ts +6 -0
- package/dist/interactive/doc-grounding.d.ts.map +1 -1
- package/dist/interactive/doc-grounding.js +4 -0
- package/dist/interactive/doc-grounding.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +4 -0
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +12 -2
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/proxy-routes.d.ts +14 -0
- package/dist/interactive/proxy-routes.d.ts.map +1 -1
- package/dist/interactive/proxy-routes.js +98 -3
- package/dist/interactive/proxy-routes.js.map +1 -1
- package/dist/interactive/repo-snapshot.d.ts.map +1 -1
- package/dist/interactive/repo-snapshot.js +3 -2
- package/dist/interactive/repo-snapshot.js.map +1 -1
- package/dist/qe/author-workflow.d.ts +2 -0
- package/dist/qe/author-workflow.d.ts.map +1 -1
- package/dist/qe/author-workflow.js +55 -12
- package/dist/qe/author-workflow.js.map +1 -1
- package/dist/studio/assets/{index-Dk98qXKv.js → index-BRDAN35i.js} +106 -104
- package/dist/studio/assets/index-Drfcsy8b.css +32 -0
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +70 -4
- package/package.json +3 -3
- package/dist/studio/assets/index-C0UZ2BxT.css +0 -32
package/dist/api/routes.js
CHANGED
|
@@ -383,6 +383,18 @@ export const LaunchSchema = z.object({
|
|
|
383
383
|
* Resolved via `gh pr view` at launch — not OPEN / a fork / gh failure ⇒ 409, nothing launched.
|
|
384
384
|
* Send it only when `GET /health.capabilities.revisesPr === true` (engine ≥ 0.7.27). */
|
|
385
385
|
revisesPr: z.number().int().positive().optional(),
|
|
386
|
+
/** crew#619 — the chat this run was promoted from; the daemon retains that chat's transcript
|
|
387
|
+
* on disk until this run reaches a terminal state so the Continue-in-Build prefill is
|
|
388
|
+
* always reproducible. Optional; omit when the launch is not promoted from a chat. */
|
|
389
|
+
chatId: z.string().min(1).max(128).regex(/^[A-Za-z0-9._-]+$/).optional(),
|
|
390
|
+
/** crew#632 — the surface that triggered this launch: `studio` (the web UI), `cli` (the
|
|
391
|
+
* wicked-crew CLI), or `api` (a programmatic caller). Persisted on the `run.launched` audit
|
|
392
|
+
* entry (`detail.channel`) and served on the run DTO; absent = origin unknown. */
|
|
393
|
+
channel: z.enum(['studio', 'cli', 'api']).optional(),
|
|
394
|
+
/** crew#632 — an opaque caller-supplied identifier for the user or system that triggered the
|
|
395
|
+
* launch (e.g. a CI job name or a studio tab id). Persisted on the `run.launched` audit entry
|
|
396
|
+
* (`detail.actor`) and served on the run DTO; absent = caller omitted it. */
|
|
397
|
+
actor: z.string().min(1).max(256).optional(),
|
|
386
398
|
}).strict().refine((b) => b.deliver !== 'pr' || b.workflow !== undefined, {
|
|
387
399
|
message: 'deliver: "pr" requires a workflow — a free-text run has no def to append the deliver phase to',
|
|
388
400
|
path: ['deliver'],
|
|
@@ -673,6 +685,13 @@ runtime = {}) {
|
|
|
673
685
|
const endedAt = runTimingIndex.endedAtFor(view.session.id);
|
|
674
686
|
if (endedAt !== undefined)
|
|
675
687
|
view.session.ended_at = endedAt;
|
|
688
|
+
// crew#632: launch surface and caller identity — served ABSENT when absent, never null.
|
|
689
|
+
const channel = runTimingIndex.channelFor(view.session.id);
|
|
690
|
+
if (channel !== undefined)
|
|
691
|
+
view.session.channel = channel;
|
|
692
|
+
const launchActor = runTimingIndex.launchActorFor(view.session.id);
|
|
693
|
+
if (launchActor !== undefined)
|
|
694
|
+
view.session.launch_actor = launchActor;
|
|
676
695
|
const state = resolveDelivery(view, conflictStrand);
|
|
677
696
|
view.session.delivery = state.delivery;
|
|
678
697
|
if (state.deliverUrl !== undefined)
|
|
@@ -700,7 +719,7 @@ runtime = {}) {
|
|
|
700
719
|
// probe honestly reports no gate.
|
|
701
720
|
const capabilities = typeof adapter.engineCapabilities === 'function'
|
|
702
721
|
? adapter.engineCapabilities()
|
|
703
|
-
: { deliverGate: false, revisesPr: false };
|
|
722
|
+
: { deliverGate: false, revisesPr: false, chatIdOnLaunch: false, seatChipOnCreate: false };
|
|
704
723
|
// wicked-core#411 / crew#497: the state-home blocker rides the health probe as a WARNING. The
|
|
705
724
|
// daemon still SERVES (status stays ok — studio must load and show the blocker) but refuses to
|
|
706
725
|
// launch while the state home holds an entry the worker Read fence cannot classify. Re-surveyed
|
|
@@ -1322,6 +1341,12 @@ runtime = {}) {
|
|
|
1322
1341
|
// the group index (and a restarted daemon's hydrate) reads it back from here.
|
|
1323
1342
|
...(b.campaignId !== undefined ? { campaignId: b.campaignId } : {}),
|
|
1324
1343
|
...(b.groupLabel !== undefined ? { groupLabel: b.groupLabel } : {}),
|
|
1344
|
+
// crew#619: the chat↔run link is durable so the retention maps can be rehydrated after a
|
|
1345
|
+
// daemon restart (rehydration reads `run.launched` entries and keeps non-terminal entries).
|
|
1346
|
+
...(b.chatId !== undefined ? { chatId: b.chatId } : {}),
|
|
1347
|
+
// crew#632: launch surface and caller identity — human-readable provenance on the audit trail.
|
|
1348
|
+
...(b.channel !== undefined ? { channel: b.channel } : {}),
|
|
1349
|
+
...(b.actor !== undefined ? { actor: b.actor } : {}),
|
|
1325
1350
|
});
|
|
1326
1351
|
if (b.retryOf !== undefined)
|
|
1327
1352
|
retryIndex.set(runId, b.retryOf);
|
|
@@ -1341,6 +1366,10 @@ runtime = {}) {
|
|
|
1341
1366
|
// decision #6 replaces spoofable actor strings on the event surface.
|
|
1342
1367
|
{ project_id: b.projectId, member: { kind: 'crew.run', ref: runId }, actor: actorOf(req).id }, membershipAttachedKey(b.projectId, 'crew.run', runId, Date.now()));
|
|
1343
1368
|
}
|
|
1369
|
+
// crew#619: retain the chat transcript for the run's lifetime so Continue-in-Build prefill
|
|
1370
|
+
// is always reproducible even if the chat is idle-reclaimed before the run finishes.
|
|
1371
|
+
if (b.chatId !== undefined)
|
|
1372
|
+
runtime.linkChatRun?.(b.chatId, runId);
|
|
1344
1373
|
return reply.code(201).send({ runId });
|
|
1345
1374
|
}
|
|
1346
1375
|
catch (err) {
|
|
@@ -2019,6 +2048,12 @@ runtime = {}) {
|
|
|
2019
2048
|
error: `chat ${chatId} was closed while it was being opened; open it again`,
|
|
2020
2049
|
});
|
|
2021
2050
|
}
|
|
2051
|
+
// Register roots for path rewriting (crew#618): absolute host paths in seat replies are
|
|
2052
|
+
// rewritten to repo-relative form before being stored in the transcript.
|
|
2053
|
+
if (chatTranscripts !== undefined && scope.repos.length > 0) {
|
|
2054
|
+
const roots = scope.repos.map((r) => ({ absRoot: resolve(r.rootPath), name: r.name }));
|
|
2055
|
+
chatTranscripts.registerRoots(chatId, roots);
|
|
2056
|
+
}
|
|
2022
2057
|
// The thread learns of every refused seat the way it learns of everything else — a frame
|
|
2023
2058
|
// on /ws — AFTER the scope is published, so a reader never sees a refusal for a chat it
|
|
2024
2059
|
// cannot yet look up.
|
|
@@ -4136,6 +4171,8 @@ runtime = {}) {
|
|
|
4136
4171
|
settings: projectSettings,
|
|
4137
4172
|
pool: interactiveBridges,
|
|
4138
4173
|
...(runtime.docGrounding !== undefined ? { grounding: runtime.docGrounding } : {}),
|
|
4174
|
+
// crew#631: supply the standing roster so doc/demo creates can refuse an unavailable seat.
|
|
4175
|
+
roster: () => rosterWithStanding(),
|
|
4139
4176
|
log: (m) => app.log.warn(m),
|
|
4140
4177
|
});
|
|
4141
4178
|
// ── Governed doc delete (crew#338) — the one door that changes BOTH stores ──
|