wicked-crew 0.7.35 → 0.7.37
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 +25 -1
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +59 -10
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/delivery-cache.d.ts +23 -6
- package/dist/api/delivery-cache.d.ts.map +1 -1
- package/dist/api/delivery-cache.js +27 -17
- package/dist/api/delivery-cache.js.map +1 -1
- package/dist/api/delivery-index.d.ts +45 -3
- package/dist/api/delivery-index.d.ts.map +1 -1
- package/dist/api/delivery-index.js +79 -4
- package/dist/api/delivery-index.js.map +1 -1
- package/dist/api/retry-index.d.ts +14 -0
- package/dist/api/retry-index.d.ts.map +1 -1
- package/dist/api/retry-index.js +29 -0
- package/dist/api/retry-index.js.map +1 -1
- package/dist/api/roster-standing.d.ts +4 -4
- package/dist/api/roster-standing.d.ts.map +1 -1
- package/dist/api/roster-standing.js +24 -12
- package/dist/api/roster-standing.js.map +1 -1
- package/dist/api/routes.d.ts +138 -10
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +261 -39
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +22 -0
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +34 -0
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/seat-health.d.ts +2 -46
- package/dist/api/seat-health.d.ts.map +1 -1
- package/dist/api/seat-health.js +28 -111
- package/dist/api/seat-health.js.map +1 -1
- package/dist/api/seat-standing.d.ts +9 -8
- package/dist/api/seat-standing.d.ts.map +1 -1
- package/dist/api/seat-standing.js +22 -32
- package/dist/api/seat-standing.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +96 -9
- package/dist/api/server.js.map +1 -1
- package/dist/api/skills.d.ts +2 -2
- package/dist/api/stall-frame-index.d.ts +68 -0
- package/dist/api/stall-frame-index.d.ts.map +1 -0
- package/dist/api/stall-frame-index.js +106 -0
- package/dist/api/stall-frame-index.js.map +1 -0
- package/dist/api/stall-watchdog.d.ts +22 -2
- package/dist/api/stall-watchdog.d.ts.map +1 -1
- package/dist/api/stall-watchdog.js +41 -11
- package/dist/api/stall-watchdog.js.map +1 -1
- package/dist/campaigns/plan.d.ts +12 -2
- package/dist/campaigns/plan.d.ts.map +1 -1
- package/dist/campaigns/plan.js +3 -0
- package/dist/campaigns/plan.js.map +1 -1
- package/dist/campaigns/rollup.d.ts +5 -0
- package/dist/campaigns/rollup.d.ts.map +1 -1
- package/dist/campaigns/rollup.js +3 -2
- package/dist/campaigns/rollup.js.map +1 -1
- package/dist/campaigns/routes.d.ts +5 -2
- package/dist/campaigns/routes.d.ts.map +1 -1
- package/dist/campaigns/routes.js +13 -3
- package/dist/campaigns/routes.js.map +1 -1
- package/dist/cli/index.js +73 -16
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/port.d.ts +19 -0
- package/dist/cli/port.d.ts.map +1 -0
- package/dist/cli/port.js +39 -0
- package/dist/cli/port.js.map +1 -0
- package/dist/core/adapter.d.ts +56 -11
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +119 -31
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/bridge-reaper.d.ts +57 -1
- package/dist/core/bridge-reaper.d.ts.map +1 -1
- package/dist/core/bridge-reaper.js +143 -21
- package/dist/core/bridge-reaper.js.map +1 -1
- package/dist/core/cursor.d.ts +7 -0
- package/dist/core/cursor.d.ts.map +1 -1
- package/dist/core/cursor.js +7 -1
- package/dist/core/cursor.js.map +1 -1
- package/dist/core/deliver-text.d.ts +35 -2
- package/dist/core/deliver-text.d.ts.map +1 -1
- package/dist/core/deliver-text.js +127 -17
- package/dist/core/deliver-text.js.map +1 -1
- package/dist/core/deliver-triage.d.ts.map +1 -1
- package/dist/core/deliver-triage.js +5 -2
- package/dist/core/deliver-triage.js.map +1 -1
- package/dist/core/deliver.d.ts +76 -2
- package/dist/core/deliver.d.ts.map +1 -1
- package/dist/core/deliver.js +209 -16
- package/dist/core/deliver.js.map +1 -1
- package/dist/core/engine-roster.d.ts +4 -3
- package/dist/core/engine-roster.d.ts.map +1 -1
- package/dist/core/engine-roster.js +10 -14
- package/dist/core/engine-roster.js.map +1 -1
- package/dist/core/types.d.ts +20 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/interactive/bridge-pool.d.ts +48 -5
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +100 -8
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/projects/graph.d.ts +4 -0
- package/dist/projects/graph.d.ts.map +1 -1
- package/dist/projects/graph.js +4 -2
- package/dist/projects/graph.js.map +1 -1
- package/dist/projects/routes.d.ts +2 -2
- package/dist/qe/acceptance.d.ts.map +1 -1
- package/dist/qe/acceptance.js +7 -1
- package/dist/qe/acceptance.js.map +1 -1
- package/dist/skills/base-skill.d.ts +10 -0
- package/dist/skills/base-skill.d.ts.map +1 -1
- package/dist/skills/base-skill.js +16 -4
- package/dist/skills/base-skill.js.map +1 -1
- package/dist/studio/assets/{index-CJp35PKj.js → index-Dk98qXKv.js} +103 -102
- package/dist/studio/index.html +1 -1
- package/dist/studio/testid-inventory.json +29 -5
- package/endpoint-manifest.json +12 -0
- package/package.json +3 -3
|
@@ -39,6 +39,19 @@
|
|
|
39
39
|
* boot, one periodic while the daemon lives) reap those under a conservative triple
|
|
40
40
|
* gate: ppid == 1, a token-boundary command match, and a cwd inside a run worktree.
|
|
41
41
|
*
|
|
42
|
+
* A fourth joined with F-W1-103 (FIX-IT-ALL wave 1): the INTERACTIVE document bridge the pool
|
|
43
|
+
* spawns per docs root (`npx wicked-interactive serve --root …`, `interactive/bridge-pool.ts`,
|
|
44
|
+
* detached and unref'd) was outside every sweep — it is not a `*-acp` binary, and its server is
|
|
45
|
+
* this daemon's GRANDCHILD (an `npm exec` wrapper is the child) — so it outlived every daemon that
|
|
46
|
+
* started it: two such pairs were found ~20 h after their daemon had exited, on ports nothing
|
|
47
|
+
* would ever look up again. Now (1) the shutdown sweep reaps the wrapper AND its server child
|
|
48
|
+
* (npm does not forward a signal to it), and (2) both orphan sweeps reap a ppid-1 interactive tree
|
|
49
|
+
* whose docs root carries crew's own sidecar (`.wi-serve.crew.json`) naming one of its pids with
|
|
50
|
+
* an owning daemon that is gone. Adopting a bridge stamps the adopter as its owner, so a bridge in
|
|
51
|
+
* use by a LIVE daemon — spawner or adopter — is never matched; a bridge nobody recorded (an
|
|
52
|
+
* operator's own `serve`) is never matched either. Crew-spawned bridges therefore live exactly as
|
|
53
|
+
* long as a crew daemon owns them: adopt-or-kill, never leak.
|
|
54
|
+
*
|
|
42
55
|
* # Why a process-table sweep rather than tracked pids alone
|
|
43
56
|
*
|
|
44
57
|
* The spawn happens inside the engine (the native actor thread), which reports no pid
|
|
@@ -49,6 +62,7 @@
|
|
|
49
62
|
* fails OPEN (returns nothing) when the platform tooling is unavailable: a shutdown
|
|
50
63
|
* that cannot enumerate children must still shut down.
|
|
51
64
|
*/
|
|
65
|
+
import { type CrewSidecar } from '../interactive/bridge-pool.js';
|
|
52
66
|
/**
|
|
53
67
|
* The bridge binaries the engine spawns by bare name on PATH. Mirrors the set audited
|
|
54
68
|
* by `bridge-names.test.ts` (declared dependencies of this package + the shims a real
|
|
@@ -68,8 +82,30 @@ export declare const BRIDGE_BINS: readonly string[];
|
|
|
68
82
|
* engine run worktree — an operator's own `claude`/`codex` never runs from one of those.
|
|
69
83
|
*/
|
|
70
84
|
export declare const WORKER_CLI_BINS: readonly string[];
|
|
85
|
+
/**
|
|
86
|
+
* The interactive document bridge the pool spawns per docs root (F-W1-103): `npx --yes
|
|
87
|
+
* wicked-interactive@<spec> serve --root <root>`, detached. It runs as an `npm exec` WRAPPER whose
|
|
88
|
+
* child is the `node …/wicked-interactive serve --root <root>` that holds the port — the wrapper is
|
|
89
|
+
* this daemon's child, the server its grandchild, and SIGTERM to the wrapper alone leaves the
|
|
90
|
+
* server running (npm does not forward it). Every matcher below treats the pair as one tree.
|
|
91
|
+
*/
|
|
92
|
+
export declare const INTERACTIVE_BIN = "wicked-interactive";
|
|
71
93
|
/** How long a SIGTERM'd bridge gets to exit before the SIGKILL escalation. */
|
|
72
94
|
export declare const BRIDGE_KILL_GRACE_MS = 2000;
|
|
95
|
+
/** Is `command` an interactive bridge `serve` — the npm wrapper or the server itself? */
|
|
96
|
+
export declare function isInteractiveServe(command: string): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* The `--root <path>` of an interactive `serve` command line, or null when absent or not absolute.
|
|
99
|
+
* A quoted value is unquoted; an unquoted one runs to the next `--flag` or the end of the line, so a
|
|
100
|
+
* root with a space in it survives and the blanks `ps` pads a line with are dropped.
|
|
101
|
+
*/
|
|
102
|
+
export declare function rootArgOf(command: string): string | null;
|
|
103
|
+
/**
|
|
104
|
+
* A `pid ppid command` process listing → the pids of the DIRECT children of `parentPid` whose
|
|
105
|
+
* command line names a bridge binary or an interactive `serve`, plus the `serve` children of those
|
|
106
|
+
* interactive wrappers (this daemon's grandchildren, F-W1-103). Pure, so the parsing is testable
|
|
107
|
+
* without a real process table.
|
|
108
|
+
*/
|
|
73
109
|
export declare function parseBridgeChildren(listing: string, parentPid: number): number[];
|
|
74
110
|
/**
|
|
75
111
|
* Pids of every live bridge process that is a direct child of `parentPid`. Fails open:
|
|
@@ -87,10 +123,25 @@ export declare function discoverBridgeChildren(parentPid?: number): number[];
|
|
|
87
123
|
* shutdown-only reaping leaves pre-existing orphans alive forever).
|
|
88
124
|
*/
|
|
89
125
|
export declare function parseOrphanedRunProcesses(listing: string): number[];
|
|
126
|
+
/** An interactive bridge tree reparented to init: the docs root its command line names and the
|
|
127
|
+
* pids to reap — the ppid-1 process first (the npm wrapper, or the server itself once its wrapper
|
|
128
|
+
* is gone), then any `serve` child of it. */
|
|
129
|
+
export interface OrphanedInteractiveBridge {
|
|
130
|
+
root: string;
|
|
131
|
+
pids: number[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Every interactive bridge tree whose parent is init (F-W1-103): a ppid-1 `wicked-interactive …
|
|
135
|
+
* serve --root <root>` plus its own `serve` children. Pure — the OWNERSHIP gate (crew's sidecar in
|
|
136
|
+
* `root` naming one of these pids, with an owner daemon that is gone) is applied by the sweeps,
|
|
137
|
+
* so a shell-parented or nohup'd operator bridge is parsed here but never reaped there.
|
|
138
|
+
*/
|
|
139
|
+
export declare function parseOrphanedInteractiveBridges(listing: string): OrphanedInteractiveBridge[];
|
|
90
140
|
/**
|
|
91
141
|
* Boot-time sweep: SIGTERM orphaned bridges from a prior daemon generation AND orphaned
|
|
92
142
|
* worker CLIs from any bridge that died too hard to reap them — ppid 1 AND cwd inside a
|
|
93
|
-
* run worktree, so user-started processes are never matched
|
|
143
|
+
* run worktree, so user-started processes are never matched — AND crew-spawned interactive
|
|
144
|
+
* bridge trees whose owning daemon is gone (ppid 1 AND crew's sidecar names them, F-W1-103).
|
|
94
145
|
*/
|
|
95
146
|
export declare function reapOrphansAtBoot(io?: BridgeReaperIo): number[];
|
|
96
147
|
/** How often the live daemon re-scans for orphaned run processes. */
|
|
@@ -123,6 +174,11 @@ export interface BridgeReaperIo {
|
|
|
123
174
|
cwdInWorktree?: (pid: number) => boolean;
|
|
124
175
|
/** Orphan-sweep process listing (`pid ppid command` lines); defaults to the real table. */
|
|
125
176
|
list?: () => string | null;
|
|
177
|
+
/** Interactive-orphan gate: crew's sidecar for a docs root (F-W1-103); injectable so tests avoid real files. */
|
|
178
|
+
sidecar?: (root: string) => CrewSidecar | null;
|
|
179
|
+
/** Interactive-orphan gate: is the daemon the sidecar names as owner still THAT daemon — pid AND
|
|
180
|
+
* start time ({@link ownerAlive}), so a recycled pid reads as "owner gone"? Injectable for tests. */
|
|
181
|
+
ownerAlive?: (sidecar: CrewSidecar) => boolean;
|
|
126
182
|
sleep?: (ms: number) => Promise<void>;
|
|
127
183
|
graceMs?: number;
|
|
128
184
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-reaper.d.ts","sourceRoot":"","sources":["../../src/core/bridge-reaper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bridge-reaper.d.ts","sourceRoot":"","sources":["../../src/core/bridge-reaper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAIH,OAAO,EAA+B,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAG9F;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAKxC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAAkD,CAAC;AAKhG;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAyCzC,yFAAyF;AACzF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKxD;AAoBD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBhF;AA+BD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,GAAE,MAAoB,GAAG,MAAM,EAAE,CAGhF;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAOnE;AAED;;8CAE8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,C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C,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,sDAAsD;AACtD,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,oDAAoD;IACpD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;;;;GAKG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAiB;gBAExB,EAAE,GAAE,cAAmB;IAInC,6FAA6F;IAC7F,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIvC,8EAA8E;IAC9E,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,gFAAgF;IAChF,IAAI,IAAI,MAAM,EAAE;IAIhB;;;;OAIG;IACH,OAAO,CAAC,MAAM;IAUd,uEAAuE;IACvE,OAAO,CAAC,OAAO;IAMf;;;;;OAKG;IACG,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IAuBrC;;;;;OAKG;IACH,SAAS,IAAI,IAAI;CAIlB;AAED,uEAAuE;AACvE,eAAO,MAAM,YAAY,cAAqB,CAAC"}
|
|
@@ -39,6 +39,19 @@
|
|
|
39
39
|
* boot, one periodic while the daemon lives) reap those under a conservative triple
|
|
40
40
|
* gate: ppid == 1, a token-boundary command match, and a cwd inside a run worktree.
|
|
41
41
|
*
|
|
42
|
+
* A fourth joined with F-W1-103 (FIX-IT-ALL wave 1): the INTERACTIVE document bridge the pool
|
|
43
|
+
* spawns per docs root (`npx wicked-interactive serve --root …`, `interactive/bridge-pool.ts`,
|
|
44
|
+
* detached and unref'd) was outside every sweep — it is not a `*-acp` binary, and its server is
|
|
45
|
+
* this daemon's GRANDCHILD (an `npm exec` wrapper is the child) — so it outlived every daemon that
|
|
46
|
+
* started it: two such pairs were found ~20 h after their daemon had exited, on ports nothing
|
|
47
|
+
* would ever look up again. Now (1) the shutdown sweep reaps the wrapper AND its server child
|
|
48
|
+
* (npm does not forward a signal to it), and (2) both orphan sweeps reap a ppid-1 interactive tree
|
|
49
|
+
* whose docs root carries crew's own sidecar (`.wi-serve.crew.json`) naming one of its pids with
|
|
50
|
+
* an owning daemon that is gone. Adopting a bridge stamps the adopter as its owner, so a bridge in
|
|
51
|
+
* use by a LIVE daemon — spawner or adopter — is never matched; a bridge nobody recorded (an
|
|
52
|
+
* operator's own `serve`) is never matched either. Crew-spawned bridges therefore live exactly as
|
|
53
|
+
* long as a crew daemon owns them: adopt-or-kill, never leak.
|
|
54
|
+
*
|
|
42
55
|
* # Why a process-table sweep rather than tracked pids alone
|
|
43
56
|
*
|
|
44
57
|
* The spawn happens inside the engine (the native actor thread), which reports no pid
|
|
@@ -50,6 +63,8 @@
|
|
|
50
63
|
* that cannot enumerate children must still shut down.
|
|
51
64
|
*/
|
|
52
65
|
import { spawnSync } from 'node:child_process';
|
|
66
|
+
import { isAbsolute } from 'node:path';
|
|
67
|
+
import { ownerAlive, readCrewSidecar } from '../interactive/bridge-pool.js';
|
|
53
68
|
import { childEnvWithBootEstateDb } from './governance-store.js';
|
|
54
69
|
/**
|
|
55
70
|
* The bridge binaries the engine spawns by bare name on PATH. Mirrors the set audited
|
|
@@ -78,15 +93,18 @@ export const WORKER_CLI_BINS = ['agy', 'claude', 'codex', 'pi', 'wicked-pi'];
|
|
|
78
93
|
// `wicked-pi` is the launcher pi-acp starts as pi (F-079; `PI_ACP_PI_COMMAND`) — a grandchild that
|
|
79
94
|
// sits BETWEEN the bridge and pi. Through the npm shim it runs as `node …/wicked-pi.mjs …`, so
|
|
80
95
|
// the token matcher below also accepts a `.mjs` launcher extension.
|
|
96
|
+
/**
|
|
97
|
+
* The interactive document bridge the pool spawns per docs root (F-W1-103): `npx --yes
|
|
98
|
+
* wicked-interactive@<spec> serve --root <root>`, detached. It runs as an `npm exec` WRAPPER whose
|
|
99
|
+
* child is the `node …/wicked-interactive serve --root <root>` that holds the port — the wrapper is
|
|
100
|
+
* this daemon's child, the server its grandchild, and SIGTERM to the wrapper alone leaves the
|
|
101
|
+
* server running (npm does not forward it). Every matcher below treats the pair as one tree.
|
|
102
|
+
*/
|
|
103
|
+
export const INTERACTIVE_BIN = 'wicked-interactive';
|
|
81
104
|
/** How long a SIGTERM'd bridge gets to exit before the SIGKILL escalation. */
|
|
82
105
|
export const BRIDGE_KILL_GRACE_MS = 2000;
|
|
83
106
|
/** How often the grace window re-checks survivor liveness. */
|
|
84
107
|
const POLL_INTERVAL_MS = 100;
|
|
85
|
-
/**
|
|
86
|
-
* One line of a `pid ppid command` process listing → the pids of DIRECT children of
|
|
87
|
-
* `parentPid` whose command line names a bridge binary. Pure, so the parsing is
|
|
88
|
-
* testable without a real process table.
|
|
89
|
-
*/
|
|
90
108
|
/**
|
|
91
109
|
* Matches `bin` as a whole command token, never a substring: start/whitespace/path-sep/
|
|
92
110
|
* quote before; an optional launcher extension (.cmd/.exe/.bat on Windows; .mjs for the
|
|
@@ -104,15 +122,54 @@ const BRIDGE_TOKEN_RES = BRIDGE_BINS.map((bin) => bridgeTokenRe(bin));
|
|
|
104
122
|
* match. The direct-child shutdown sweep stays bridges-only: worker CLIs are grandchildren
|
|
105
123
|
* by construction, and a `claude` that IS our direct child is the operator's own business. */
|
|
106
124
|
const ORPHAN_TOKEN_RES = [...BRIDGE_BINS, ...WORKER_CLI_BINS].map((bin) => bridgeTokenRe(bin));
|
|
107
|
-
|
|
108
|
-
|
|
125
|
+
/**
|
|
126
|
+
* `wicked-interactive` as a whole token — the npx spec spelling (`wicked-interactive@^0.9.3`), the
|
|
127
|
+
* npm shim (`…/.bin/wicked-interactive`), a Windows launcher (`wicked-interactive.cmd`) and the
|
|
128
|
+
* package path (`…/wicked-interactive/dist/cli.js`) all count, `wicked-interactive-export` never
|
|
129
|
+
* does — followed IMMEDIATELY by the `serve` subcommand (interactive's options come after the
|
|
130
|
+
* subcommand: `serve --root <dir> [--port N]`). `render --mode serve` is not a bridge, and neither
|
|
131
|
+
* is anything with another token between the bin and `serve` — review NIT on crew #606: the
|
|
132
|
+
* shutdown path has no sidecar gate, so the subcommand must be the anchor.
|
|
133
|
+
*/
|
|
134
|
+
const INTERACTIVE_SERVE_RE = new RegExp(`(?:^|[\\s/\\\\"'])${INTERACTIVE_BIN}(?:@[^\\s"'/\\\\]*)?(?:\\.(?:cmd|exe|bat|mjs|js))?(?:[/\\\\][^\\s"']*)?["']?\\s+serve(?:\\s|$)`, 'i');
|
|
135
|
+
/** Is `command` an interactive bridge `serve` — the npm wrapper or the server itself? */
|
|
136
|
+
export function isInteractiveServe(command) {
|
|
137
|
+
return INTERACTIVE_SERVE_RE.test(command);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The `--root <path>` of an interactive `serve` command line, or null when absent or not absolute.
|
|
141
|
+
* A quoted value is unquoted; an unquoted one runs to the next `--flag` or the end of the line, so a
|
|
142
|
+
* root with a space in it survives and the blanks `ps` pads a line with are dropped.
|
|
143
|
+
*/
|
|
144
|
+
export function rootArgOf(command) {
|
|
145
|
+
const m = /(?:^|\s)--root(?:=|\s+)(?:"([^"]*)"|'([^']*)'|(.+?))(?=\s+--[a-z]|\s*$)/i.exec(command);
|
|
146
|
+
if (m === null)
|
|
147
|
+
return null;
|
|
148
|
+
const raw = (m[1] ?? m[2] ?? m[3] ?? '').trim();
|
|
149
|
+
return raw !== '' && isAbsolute(raw) ? raw : null;
|
|
150
|
+
}
|
|
151
|
+
/** The parseable rows of a `pid ppid command` listing; garbage lines a real `ps` never quite spares us are skipped. */
|
|
152
|
+
function parseListing(listing) {
|
|
153
|
+
const rows = [];
|
|
109
154
|
for (const line of listing.split('\n')) {
|
|
110
155
|
const m = /^\s*(\d+)\s+(\d+)\s+(.*)$/.exec(line);
|
|
111
156
|
if (m === null)
|
|
112
157
|
continue;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
158
|
+
rows.push({ pid: Number(m[1]), ppid: Number(m[2]), command: m[3] });
|
|
159
|
+
}
|
|
160
|
+
return rows;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* A `pid ppid command` process listing → the pids of the DIRECT children of `parentPid` whose
|
|
164
|
+
* command line names a bridge binary or an interactive `serve`, plus the `serve` children of those
|
|
165
|
+
* interactive wrappers (this daemon's grandchildren, F-W1-103). Pure, so the parsing is testable
|
|
166
|
+
* without a real process table.
|
|
167
|
+
*/
|
|
168
|
+
export function parseBridgeChildren(listing, parentPid) {
|
|
169
|
+
const rows = parseListing(listing);
|
|
170
|
+
const pids = [];
|
|
171
|
+
const wrappers = [];
|
|
172
|
+
for (const { pid, ppid, command } of rows) {
|
|
116
173
|
if (ppid !== parentPid || pid === parentPid)
|
|
117
174
|
continue;
|
|
118
175
|
// Token-boundary match: `pi-acp` must not match inside `api-acp` (Copilot review
|
|
@@ -120,6 +177,16 @@ export function parseBridgeChildren(listing, parentPid) {
|
|
|
120
177
|
// whitespace, or a path separator before it; end-of-token after.
|
|
121
178
|
if (BRIDGE_TOKEN_RES.some((re) => re.test(command)))
|
|
122
179
|
pids.push(pid);
|
|
180
|
+
else if (isInteractiveServe(command)) {
|
|
181
|
+
pids.push(pid);
|
|
182
|
+
wrappers.push(pid);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// The interactive server is the npm wrapper's child — this daemon's GRANDCHILD — and a SIGTERM
|
|
186
|
+
// to the wrapper alone orphans it (F-W1-103). The pair is one tree; reap both.
|
|
187
|
+
for (const { pid, ppid, command } of rows) {
|
|
188
|
+
if (wrappers.includes(ppid) && pid !== parentPid && !pids.includes(pid) && isInteractiveServe(command))
|
|
189
|
+
pids.push(pid);
|
|
123
190
|
}
|
|
124
191
|
return pids;
|
|
125
192
|
}
|
|
@@ -168,13 +235,7 @@ export function discoverBridgeChildren(parentPid = process.pid) {
|
|
|
168
235
|
*/
|
|
169
236
|
export function parseOrphanedRunProcesses(listing) {
|
|
170
237
|
const pids = [];
|
|
171
|
-
for (const
|
|
172
|
-
const m = /^\s*(\d+)\s+(\d+)\s+(.*)$/.exec(line);
|
|
173
|
-
if (m === null)
|
|
174
|
-
continue;
|
|
175
|
-
const pid = Number(m[1]);
|
|
176
|
-
const ppid = Number(m[2]);
|
|
177
|
-
const command = m[3];
|
|
238
|
+
for (const { pid, ppid, command } of parseListing(listing)) {
|
|
178
239
|
if (ppid !== 1 || pid === process.pid)
|
|
179
240
|
continue;
|
|
180
241
|
if (ORPHAN_TOKEN_RES.some((re) => re.test(command)))
|
|
@@ -182,6 +243,57 @@ export function parseOrphanedRunProcesses(listing) {
|
|
|
182
243
|
}
|
|
183
244
|
return pids;
|
|
184
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Every interactive bridge tree whose parent is init (F-W1-103): a ppid-1 `wicked-interactive …
|
|
248
|
+
* serve --root <root>` plus its own `serve` children. Pure — the OWNERSHIP gate (crew's sidecar in
|
|
249
|
+
* `root` naming one of these pids, with an owner daemon that is gone) is applied by the sweeps,
|
|
250
|
+
* so a shell-parented or nohup'd operator bridge is parsed here but never reaped there.
|
|
251
|
+
*/
|
|
252
|
+
export function parseOrphanedInteractiveBridges(listing) {
|
|
253
|
+
const rows = parseListing(listing);
|
|
254
|
+
const trees = [];
|
|
255
|
+
for (const { pid, ppid, command } of rows) {
|
|
256
|
+
if (ppid !== 1 || pid === process.pid || !isInteractiveServe(command))
|
|
257
|
+
continue;
|
|
258
|
+
const root = rootArgOf(command);
|
|
259
|
+
if (root === null)
|
|
260
|
+
continue;
|
|
261
|
+
const pids = [pid];
|
|
262
|
+
for (const child of rows) {
|
|
263
|
+
if (child.ppid === pid && child.pid !== process.pid && isInteractiveServe(child.command))
|
|
264
|
+
pids.push(child.pid);
|
|
265
|
+
}
|
|
266
|
+
trees.push({ root, pids });
|
|
267
|
+
}
|
|
268
|
+
return trees;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* The ownership gate for an orphaned interactive tree, mirroring the pool's own adopt-or-recycle
|
|
272
|
+
* rules (`interactive/bridge-pool.ts`, codex on crew#506): crew's `.wi-serve.crew.json` in the root
|
|
273
|
+
* the command line names must record one of the tree's pids — the proof crew spawned it; an
|
|
274
|
+
* operator's `wicked-interactive serve` has no sidecar and is never matched — and the daemon it
|
|
275
|
+
* records as owner must be GONE: not in the process table, or a DIFFERENT incarnation of that pid
|
|
276
|
+
* (`ownerStartedAt` no longer matches — a recycled pid must not keep a bridge alive for weeks). A
|
|
277
|
+
* live owner (the spawner, or a daemon that adopted the bridge and stamped itself) is using it; a
|
|
278
|
+
* sidecar without an owner is of unproven ownership and left alone.
|
|
279
|
+
*/
|
|
280
|
+
function orphanedInteractiveTargets(listing, io) {
|
|
281
|
+
const sidecarOf = io.sidecar ?? readCrewSidecar;
|
|
282
|
+
const isOwnerAlive = io.ownerAlive ?? ownerAlive;
|
|
283
|
+
const targets = [];
|
|
284
|
+
for (const { root, pids } of parseOrphanedInteractiveBridges(listing)) {
|
|
285
|
+
const sidecar = sidecarOf(root);
|
|
286
|
+
if (sidecar === null || !pids.includes(sidecar.pid))
|
|
287
|
+
continue;
|
|
288
|
+
const owner = sidecar.ownerPid;
|
|
289
|
+
if (owner === undefined || !Number.isInteger(owner) || owner <= 0)
|
|
290
|
+
continue; // unproven ownership: not ours to kill
|
|
291
|
+
if (isOwnerAlive(sidecar))
|
|
292
|
+
continue; // the same daemon incarnation still owns it
|
|
293
|
+
targets.push(...pids);
|
|
294
|
+
}
|
|
295
|
+
return targets;
|
|
296
|
+
}
|
|
185
297
|
/**
|
|
186
298
|
* True when `pid`'s working directory sits inside an engine run worktree — the cwd
|
|
187
299
|
* contract of every engine-spawned bridge. A user's own nohup'd `*-acp` process also
|
|
@@ -210,13 +322,17 @@ function pidRunsInRunWorktree(pid) {
|
|
|
210
322
|
/**
|
|
211
323
|
* Boot-time sweep: SIGTERM orphaned bridges from a prior daemon generation AND orphaned
|
|
212
324
|
* worker CLIs from any bridge that died too hard to reap them — ppid 1 AND cwd inside a
|
|
213
|
-
* run worktree, so user-started processes are never matched
|
|
325
|
+
* run worktree, so user-started processes are never matched — AND crew-spawned interactive
|
|
326
|
+
* bridge trees whose owning daemon is gone (ppid 1 AND crew's sidecar names them, F-W1-103).
|
|
214
327
|
*/
|
|
215
328
|
export function reapOrphansAtBoot(io = {}) {
|
|
216
329
|
const listing = (io.list ?? listProcesses)();
|
|
217
330
|
if (listing === null)
|
|
218
331
|
return [];
|
|
219
|
-
const orphans =
|
|
332
|
+
const orphans = [
|
|
333
|
+
...parseOrphanedRunProcesses(listing).filter((pid) => (io.cwdInWorktree ?? pidRunsInRunWorktree)(pid)),
|
|
334
|
+
...orphanedInteractiveTargets(listing, io),
|
|
335
|
+
];
|
|
220
336
|
const reaped = [];
|
|
221
337
|
for (const pid of orphans) {
|
|
222
338
|
try {
|
|
@@ -236,7 +352,10 @@ export function reapOrphansAtBoot(io = {}) {
|
|
|
236
352
|
// that orphan keeps the engine-minted shared worker config home busy — the next
|
|
237
353
|
// `session/new` contends on it until something reaps the orphan or the daemon restarts.
|
|
238
354
|
// So the daemon keeps sweeping, on an unref'd timer, with the SAME conservative triple
|
|
239
|
-
// gate as the boot sweep (ppid 1 + token match + cwd inside a run worktree)
|
|
355
|
+
// gate as the boot sweep (ppid 1 + token match + cwd inside a run worktree) — and, for
|
|
356
|
+
// interactive bridge trees, the same sidecar gate (ppid 1 + crew's sidecar names the pid +
|
|
357
|
+
// its owning daemon is gone), so a sibling daemon that dies hard cannot leak its bridges past
|
|
358
|
+
// the next tick either (F-W1-103).
|
|
240
359
|
/** How often the live daemon re-scans for orphaned run processes. */
|
|
241
360
|
export const ORPHAN_SWEEP_DEFAULT_MS = 30_000;
|
|
242
361
|
/** The sweep interval: `WICKED_CREW_ORPHAN_SWEEP_SECS` (0 disables), else 30s. */
|
|
@@ -257,7 +376,10 @@ export function sweepOrphanedRunProcesses(pendingKill, io = {}) {
|
|
|
257
376
|
const listing = (io.list ?? listProcesses)();
|
|
258
377
|
if (listing === null)
|
|
259
378
|
return { terminated: [], killed: [] };
|
|
260
|
-
const alive = new Set(
|
|
379
|
+
const alive = new Set([
|
|
380
|
+
...parseOrphanedRunProcesses(listing).filter((pid) => (io.cwdInWorktree ?? pidRunsInRunWorktree)(pid)),
|
|
381
|
+
...orphanedInteractiveTargets(listing, io),
|
|
382
|
+
]);
|
|
261
383
|
const kill = io.kill ?? process.kill;
|
|
262
384
|
const terminated = [];
|
|
263
385
|
const killed = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-reaper.js","sourceRoot":"","sources":["../../src/core/bridge-reaper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C,SAAS;IACT,kBAAkB;IAClB,WAAW;IACX,QAAQ;CACT,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAChG,mGAAmG;AACnG,+FAA+F;AAC/F,oEAAoE;AAEpE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,8DAA8D;AAC9D,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;GAIG;AACH;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,GAAW;IAChC,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM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SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;QACtE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC7D,MAAM;YACN,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SAChE,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,SAAS;QACP,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC9D,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC"}
|
package/dist/core/cursor.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ export interface CursorUnit {
|
|
|
3
3
|
ord: number;
|
|
4
4
|
/** The cursor's assigned seat — absent when the engine hasn't assigned one yet. */
|
|
5
5
|
cli?: string;
|
|
6
|
+
/** What runs the unit (crew #580 / #581, DES-L3 addendum): `tool` = the engine's own command
|
|
7
|
+
* (`tool_cmd` on the unit DTO — the deliver script, a wicked-estate index), `agent` = a CLI
|
|
8
|
+
* seat. The stall watchdog never fails a tool unit over to a seat — there is none to fail to. */
|
|
9
|
+
executor: 'tool' | 'agent';
|
|
10
|
+
/** The cursor's declared phase role when the def carries one (`evaluator` / `creator` / …);
|
|
11
|
+
* absent on free-text units. Read by the watchdog's role-aware failover (DES-L3 PR-3E). */
|
|
12
|
+
role?: string;
|
|
6
13
|
}
|
|
7
14
|
/**
|
|
8
15
|
* Resolves a run's cursor unit, or `undefined` when the view carries no units (older engines,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/core/cursor.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,GAAG,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/core/cursor.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;sGAEkG;IAClG,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;gGAC4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAU3E"}
|
package/dist/core/cursor.js
CHANGED
|
@@ -6,6 +6,12 @@ export function resolveCursorUnit(view) {
|
|
|
6
6
|
const cursor = [...view.units].sort((a, b) => a.ord - b.ord)[view.session.unit_ix];
|
|
7
7
|
if (cursor === undefined)
|
|
8
8
|
return undefined;
|
|
9
|
-
|
|
9
|
+
const role = cursor.role;
|
|
10
|
+
return {
|
|
11
|
+
ord: cursor.ord,
|
|
12
|
+
...(cursor.assigned_cli != null ? { cli: cursor.assigned_cli } : {}),
|
|
13
|
+
executor: cursor.tool_cmd != null ? 'tool' : 'agent',
|
|
14
|
+
...(typeof role === 'string' ? { role } : {}),
|
|
15
|
+
};
|
|
10
16
|
}
|
|
11
17
|
//# sourceMappingURL=cursor.js.map
|
package/dist/core/cursor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/core/cursor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/core/cursor.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAiB;IACjD,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnF,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,MAAM,IAAI,GAAI,MAA6B,CAAC,IAAI,CAAC;IACjD,OAAO;QACL,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,GAAG,CAAC,MAAM,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpE,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;QACpD,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -41,14 +41,20 @@ export interface DeliverPhaseFact {
|
|
|
41
41
|
/** The recorded gate outcome / unit status, or `—` at launch time. */
|
|
42
42
|
outcome: string;
|
|
43
43
|
}
|
|
44
|
-
/** One repo check
|
|
44
|
+
/** One repo check a phase's floor ran (`typecheck` / `lint` / `test`), as the engine recorded it. */
|
|
45
45
|
export interface DeliverCheckFact {
|
|
46
|
+
/** The phase whose floor ran it (`verify`, `deliver`, …) — DES-L9. */
|
|
47
|
+
phase: string;
|
|
46
48
|
name: string;
|
|
47
49
|
command: string;
|
|
48
50
|
exitCode: number | null;
|
|
49
51
|
durationMs: number | null;
|
|
50
52
|
timedOut: boolean;
|
|
51
53
|
spawnError: string | null;
|
|
54
|
+
/** The engine's verdict on a non-zero exit (api-types 0.38.0 `RepoCheckRun.classification`) —
|
|
55
|
+
* `floor_env_mismatch` / `pre_existing_in_sandbox` / … — so a reader never sees "tests fail"
|
|
56
|
+
* over a run the engine itself excused (review-benchmark-prs D3). `null` when none. */
|
|
57
|
+
classification: string | null;
|
|
52
58
|
}
|
|
53
59
|
/** An evaluator-role phase's recorded verdict. */
|
|
54
60
|
export interface DeliverVerdictFact {
|
|
@@ -78,6 +84,11 @@ export interface DeliverTextFacts {
|
|
|
78
84
|
*/
|
|
79
85
|
checksNote: string | null;
|
|
80
86
|
verdicts: DeliverVerdictFact[];
|
|
87
|
+
/** DES-L9: the open pull request this run REVISES (its commits land there; no new PR). */
|
|
88
|
+
revisesPr?: {
|
|
89
|
+
number: number;
|
|
90
|
+
url: string;
|
|
91
|
+
} | null;
|
|
81
92
|
}
|
|
82
93
|
export interface DeliverText {
|
|
83
94
|
/** ≤ {@link DELIVER_TITLE_MAX} characters, one line, never cut mid-word. */
|
|
@@ -91,6 +102,12 @@ export interface IssueRefs {
|
|
|
91
102
|
/** Every other issue mention — emitted as `Refs: …`. */
|
|
92
103
|
refs: string[];
|
|
93
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* The conventional-commit prefix for a headline: derived from the workflow (`bug` → `fix`,
|
|
107
|
+
* `feature` → `feat`, `migration` → `refactor`, anything else → `chore`), applied only when the
|
|
108
|
+
* headline does not already start with one (DES-L9; review-benchmark-prs D1).
|
|
109
|
+
*/
|
|
110
|
+
export declare function conventionalPrefix(workflowId: string | null | undefined): string;
|
|
94
111
|
/**
|
|
95
112
|
* The PR title / commit subject: the intent's first line, whole when it fits, otherwise cut at the
|
|
96
113
|
* last word boundary that leaves room for a single `…` — so the result is ≤ 72 characters and never
|
|
@@ -99,7 +116,15 @@ export interface IssueRefs {
|
|
|
99
116
|
* long caller-supplied session id (the CLI passes `--session` through) is never cut mid-id either
|
|
100
117
|
* (Copilot on #525): the body names the run id in full.
|
|
101
118
|
*/
|
|
102
|
-
export declare function deliverTitle(intent: string, runId: string): string;
|
|
119
|
+
export declare function deliverTitle(intent: string, runId: string, workflowId?: string | null): string;
|
|
120
|
+
/**
|
|
121
|
+
* `line` whole when it fits, else cut at a word boundary with a single `…` — ≤ 72 characters —
|
|
122
|
+
* choosing the LAST boundary at nesting depth 0: never inside a quoted or bracketed phrase (crew#550
|
|
123
|
+
* P-1: `… truncated at '(Failed):' and 'sign a seat…`). A straight apostrophe opens a quote only
|
|
124
|
+
* after a space or at the start (so `daemon's` is a word, not a quote). When no depth-0 boundary
|
|
125
|
+
* exists inside the room, any word boundary is taken; a single 72+ character token is cut hard.
|
|
126
|
+
*/
|
|
127
|
+
export declare function boundedTitle(line: string): string;
|
|
103
128
|
/**
|
|
104
129
|
* The issues the intent names, split into the ones it says it fixes and the rest.
|
|
105
130
|
*
|
|
@@ -166,6 +191,10 @@ export declare function baseWorkflowId(workflowId: string, runId: string): strin
|
|
|
166
191
|
*/
|
|
167
192
|
export declare function factsFromRun(view: SessionView, runUrl: string | null, resolved?: {
|
|
168
193
|
workflowId?: string | null;
|
|
194
|
+
revisesPr?: {
|
|
195
|
+
number: number;
|
|
196
|
+
url: string;
|
|
197
|
+
} | null;
|
|
169
198
|
}): DeliverTextFacts;
|
|
170
199
|
/** What is known at LAUNCH, from the workflow definition — the script's embedded fallback. */
|
|
171
200
|
export declare function factsFromWorkflow(input: {
|
|
@@ -175,6 +204,10 @@ export declare function factsFromWorkflow(input: {
|
|
|
175
204
|
repoRef: string | null;
|
|
176
205
|
phases: PhaseDef[];
|
|
177
206
|
runUrl: string | null;
|
|
207
|
+
revisesPr?: {
|
|
208
|
+
number: number;
|
|
209
|
+
url: string;
|
|
210
|
+
} | null;
|
|
178
211
|
}): DeliverTextFacts;
|
|
179
212
|
/**
|
|
180
213
|
* `s` as ONE URL path segment, RFC 3986 strict: everything but unreserved characters is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliver-text.d.ts","sourceRoot":"","sources":["../../src/core/deliver-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAY,MAAM,YAAY,CAAC;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,mGAAmG;IACnG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,
|
|
1
|
+
{"version":3,"file":"deliver-text.d.ts","sourceRoot":"","sources":["../../src/core/deliver-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAY,MAAM,YAAY,CAAC;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX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