@proletariat/cli 0.3.109 → 0.3.111
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/commands/orchestrator/attach.d.ts +2 -0
- package/dist/commands/orchestrator/attach.js +80 -118
- package/dist/commands/orchestrator/attach.js.map +1 -1
- package/dist/commands/orchestrator/start.js +21 -0
- package/dist/commands/orchestrator/start.js.map +1 -1
- package/dist/commands/orchestrator/status.d.ts +3 -0
- package/dist/commands/orchestrator/status.js +104 -130
- package/dist/commands/orchestrator/status.js.map +1 -1
- package/dist/commands/orchestrator/stop.d.ts +2 -0
- package/dist/commands/orchestrator/stop.js +105 -107
- package/dist/commands/orchestrator/stop.js.map +1 -1
- package/dist/commands/session/attach.d.ts +2 -6
- package/dist/commands/session/attach.js +68 -97
- package/dist/commands/session/attach.js.map +1 -1
- package/dist/commands/session/list.d.ts +4 -1
- package/dist/commands/session/list.js +160 -326
- package/dist/commands/session/list.js.map +1 -1
- package/dist/commands/work/start.js +104 -49
- package/dist/commands/work/start.js.map +1 -1
- package/dist/lib/execution/session-utils.d.ts +4 -1
- package/dist/lib/execution/session-utils.js +3 -0
- package/dist/lib/execution/session-utils.js.map +1 -1
- package/dist/lib/machine-db-mirror.d.ts +64 -0
- package/dist/lib/machine-db-mirror.js +82 -0
- package/dist/lib/machine-db-mirror.js.map +1 -0
- package/dist/lib/machine-db.d.ts +11 -0
- package/dist/lib/machine-db.js +17 -0
- package/dist/lib/machine-db.js.map +1 -1
- package/dist/lib/orchestrate/actions.d.ts +8 -0
- package/dist/lib/orchestrate/actions.js +166 -94
- package/dist/lib/orchestrate/actions.js.map +1 -1
- package/dist/lib/orchestrate/prompt-chain.d.ts +181 -0
- package/dist/lib/orchestrate/prompt-chain.js +323 -0
- package/dist/lib/orchestrate/prompt-chain.js.map +1 -0
- package/dist/lib/prompt-command.d.ts +61 -1
- package/dist/lib/prompt-command.js +167 -1
- package/dist/lib/prompt-command.js.map +1 -1
- package/dist/lib/prompt-json.d.ts +129 -2
- package/dist/lib/prompt-json.js +157 -0
- package/dist/lib/prompt-json.js.map +1 -1
- package/dist/lib/runtime-command.d.ts +3 -1
- package/dist/lib/runtime-command.js +4 -2
- package/dist/lib/runtime-command.js.map +1 -1
- package/dist/lib/session/renderer.d.ts +121 -0
- package/dist/lib/session/renderer.js +547 -0
- package/dist/lib/session/renderer.js.map +1 -0
- package/dist/lib/update-check.d.ts +64 -7
- package/dist/lib/update-check.js +164 -20
- package/dist/lib/update-check.js.map +1 -1
- package/oclif.manifest.json +1173 -1062
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Machine DB Mirror — bridges workspace.db executions to machine.db.
|
|
3
|
+
*
|
|
4
|
+
* `prlt work run` and `prlt orchestrate machine` write directly to machine.db.
|
|
5
|
+
* `prlt work start` and `prlt orchestrator start` write to workspace.db for
|
|
6
|
+
* ticket-linked state, but also need to mirror those executions to machine.db
|
|
7
|
+
* so that:
|
|
8
|
+
*
|
|
9
|
+
* - `prlt session list` from outside an HQ sees them
|
|
10
|
+
* - `prlt orchestrator status` from `/tmp` sees orchestrators in every HQ
|
|
11
|
+
* - The machine-level supervision story (PRLT-1249) actually works
|
|
12
|
+
*
|
|
13
|
+
* Machine.db writes are always best-effort. workspace.db is still authoritative
|
|
14
|
+
* for ticketed work; if mirroring fails we silently swallow the error and keep
|
|
15
|
+
* the primary flow running.
|
|
16
|
+
*/
|
|
17
|
+
import { MachineDB, type MachineExecution, type MachineExecutionStatus } from './machine-db.js';
|
|
18
|
+
export interface MirrorCreateInput {
|
|
19
|
+
/** Ticket ID (e.g. TKT-123, PRLT-456). Use 'ORCH' / 'prlt' for orchestrators. */
|
|
20
|
+
ticketId: string;
|
|
21
|
+
/** Agent name. For orchestrators use `orchestrator-{name}`. */
|
|
22
|
+
agentName: string;
|
|
23
|
+
executor: string;
|
|
24
|
+
environment: string;
|
|
25
|
+
/** Working directory — repo path for work, HQ path for orchestrators. */
|
|
26
|
+
repoPath: string;
|
|
27
|
+
branch?: string;
|
|
28
|
+
persistent?: boolean;
|
|
29
|
+
/** Optional human-readable prompt. Falls back to "ticketId agentName". */
|
|
30
|
+
prompt?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional override for the machine.db path. When omitted, uses
|
|
33
|
+
* `~/.proletariat/machine.db`. Used by tests to avoid colliding with the
|
|
34
|
+
* user's real machine DB.
|
|
35
|
+
*/
|
|
36
|
+
machineDbPath?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface MirrorHandle {
|
|
39
|
+
machineDb: MachineDB;
|
|
40
|
+
execution: MachineExecution;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create a machine.db execution row mirroring a workspace.db execution.
|
|
44
|
+
*
|
|
45
|
+
* Returns a handle for later status/process-info updates, or `null` if the
|
|
46
|
+
* machine DB could not be opened or the row could not be inserted.
|
|
47
|
+
*
|
|
48
|
+
* Callers MUST pass the handle to {@link closeMirrorExecution} when done.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createMirrorExecution(input: MirrorCreateInput): MirrorHandle | null;
|
|
51
|
+
/**
|
|
52
|
+
* Update a mirrored execution with new status and/or process info. All errors
|
|
53
|
+
* are swallowed: machine.db is the secondary store and must never break the
|
|
54
|
+
* primary flow.
|
|
55
|
+
*/
|
|
56
|
+
export declare function updateMirrorExecution(handle: MirrorHandle | null, update: {
|
|
57
|
+
status?: MachineExecutionStatus;
|
|
58
|
+
sessionId?: string;
|
|
59
|
+
containerId?: string;
|
|
60
|
+
branch?: string;
|
|
61
|
+
errorMessage?: string;
|
|
62
|
+
}): void;
|
|
63
|
+
/** Close the underlying machine DB. Safe to call with a `null` handle. */
|
|
64
|
+
export declare function closeMirrorExecution(handle: MirrorHandle | null): void;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Machine DB Mirror — bridges workspace.db executions to machine.db.
|
|
3
|
+
*
|
|
4
|
+
* `prlt work run` and `prlt orchestrate machine` write directly to machine.db.
|
|
5
|
+
* `prlt work start` and `prlt orchestrator start` write to workspace.db for
|
|
6
|
+
* ticket-linked state, but also need to mirror those executions to machine.db
|
|
7
|
+
* so that:
|
|
8
|
+
*
|
|
9
|
+
* - `prlt session list` from outside an HQ sees them
|
|
10
|
+
* - `prlt orchestrator status` from `/tmp` sees orchestrators in every HQ
|
|
11
|
+
* - The machine-level supervision story (PRLT-1249) actually works
|
|
12
|
+
*
|
|
13
|
+
* Machine.db writes are always best-effort. workspace.db is still authoritative
|
|
14
|
+
* for ticketed work; if mirroring fails we silently swallow the error and keep
|
|
15
|
+
* the primary flow running.
|
|
16
|
+
*/
|
|
17
|
+
import { MachineDB } from './machine-db.js';
|
|
18
|
+
/**
|
|
19
|
+
* Create a machine.db execution row mirroring a workspace.db execution.
|
|
20
|
+
*
|
|
21
|
+
* Returns a handle for later status/process-info updates, or `null` if the
|
|
22
|
+
* machine DB could not be opened or the row could not be inserted.
|
|
23
|
+
*
|
|
24
|
+
* Callers MUST pass the handle to {@link closeMirrorExecution} when done.
|
|
25
|
+
*/
|
|
26
|
+
export function createMirrorExecution(input) {
|
|
27
|
+
try {
|
|
28
|
+
const machineDb = new MachineDB(input.machineDbPath);
|
|
29
|
+
const execution = machineDb.createExecution({
|
|
30
|
+
prompt: input.prompt ?? `${input.ticketId} ${input.agentName}`.trim(),
|
|
31
|
+
repoPath: input.repoPath,
|
|
32
|
+
agentName: input.agentName,
|
|
33
|
+
executor: input.executor,
|
|
34
|
+
environment: input.environment,
|
|
35
|
+
branch: input.branch,
|
|
36
|
+
ticketId: input.ticketId,
|
|
37
|
+
persistent: input.persistent ?? false,
|
|
38
|
+
});
|
|
39
|
+
return { machineDb, execution };
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Update a mirrored execution with new status and/or process info. All errors
|
|
47
|
+
* are swallowed: machine.db is the secondary store and must never break the
|
|
48
|
+
* primary flow.
|
|
49
|
+
*/
|
|
50
|
+
export function updateMirrorExecution(handle, update) {
|
|
51
|
+
if (!handle)
|
|
52
|
+
return;
|
|
53
|
+
try {
|
|
54
|
+
if (update.status) {
|
|
55
|
+
handle.machineDb.updateStatus(handle.execution.id, update.status, undefined, update.errorMessage);
|
|
56
|
+
}
|
|
57
|
+
if (update.sessionId !== undefined ||
|
|
58
|
+
update.containerId !== undefined ||
|
|
59
|
+
update.branch !== undefined) {
|
|
60
|
+
handle.machineDb.updateProcessInfo(handle.execution.id, {
|
|
61
|
+
sessionId: update.sessionId,
|
|
62
|
+
containerId: update.containerId,
|
|
63
|
+
branch: update.branch,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// Non-fatal — machine.db is secondary.
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Close the underlying machine DB. Safe to call with a `null` handle. */
|
|
72
|
+
export function closeMirrorExecution(handle) {
|
|
73
|
+
if (!handle)
|
|
74
|
+
return;
|
|
75
|
+
try {
|
|
76
|
+
handle.machineDb.close();
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
// ignore
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=machine-db-mirror.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine-db-mirror.js","sourceRoot":"","sources":["../../src/lib/machine-db-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,SAAS,EAAsD,MAAM,iBAAiB,CAAA;AA4B/F;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAwB;IAC5D,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QACpD,MAAM,SAAS,GAAG,SAAS,CAAC,eAAe,CAAC;Y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uC;IACzC,CAAC;AACH,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,oBAAoB,CAAC,MAA2B;IAC9D,IAAI,CAAC,MAAM;QAAE,OAAM;IACnB,IAAI,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;AACH,CAAC"}
|
package/dist/lib/machine-db.d.ts
CHANGED
|
@@ -100,6 +100,17 @@ export declare class MachineDB {
|
|
|
100
100
|
* Get all active (starting/running) executions.
|
|
101
101
|
*/
|
|
102
102
|
getActiveExecutions(): MachineExecution[];
|
|
103
|
+
/**
|
|
104
|
+
* Get all active executions where the agent name starts with the given
|
|
105
|
+
* prefix. Used by `prlt orchestrator status/attach/stop` to find all
|
|
106
|
+
* orchestrator executions (`orchestrator-{name}`) machine-wide.
|
|
107
|
+
*/
|
|
108
|
+
getActiveByAgentPrefix(prefix: string): MachineExecution[];
|
|
109
|
+
/**
|
|
110
|
+
* Find an execution by session ID (unique across the machine).
|
|
111
|
+
* Returns the most recently started match, or null.
|
|
112
|
+
*/
|
|
113
|
+
findBySessionId(sessionId: string): MachineExecution | null;
|
|
103
114
|
/**
|
|
104
115
|
* Delete an execution record.
|
|
105
116
|
*/
|
package/dist/lib/machine-db.js
CHANGED
|
@@ -227,6 +227,23 @@ export class MachineDB {
|
|
|
227
227
|
const rows = this.db.prepare("SELECT * FROM executions WHERE status IN ('starting', 'running') ORDER BY started_at DESC").all();
|
|
228
228
|
return rows.map(rowToExecution);
|
|
229
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* Get all active executions where the agent name starts with the given
|
|
232
|
+
* prefix. Used by `prlt orchestrator status/attach/stop` to find all
|
|
233
|
+
* orchestrator executions (`orchestrator-{name}`) machine-wide.
|
|
234
|
+
*/
|
|
235
|
+
getActiveByAgentPrefix(prefix) {
|
|
236
|
+
const rows = this.db.prepare("SELECT * FROM executions WHERE status IN ('starting', 'running') AND agent_name LIKE ? ORDER BY started_at DESC").all(`${prefix}%`);
|
|
237
|
+
return rows.map(rowToExecution);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Find an execution by session ID (unique across the machine).
|
|
241
|
+
* Returns the most recently started match, or null.
|
|
242
|
+
*/
|
|
243
|
+
findBySessionId(sessionId) {
|
|
244
|
+
const row = this.db.prepare('SELECT * FROM executions WHERE session_id = ? ORDER BY started_at DESC LIMIT 1').get(sessionId);
|
|
245
|
+
return row ? rowToExecution(row) : null;
|
|
246
|
+
}
|
|
230
247
|
/**
|
|
231
248
|
* Delete an execution record.
|
|
232
249
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-db.js","sourceRoot":"","sources":["../../src/lib/machine-db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAC7B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAuB,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAkEtE,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,SAAS,cAAc,CAAC,GAAiB;IACvC,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,QAAQ,EAAE,GAAG,CAAC,SAAS;QACvB,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,SAAS;QAC/B,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,WAAW,EAAE,GAAG,CAAC,YAAY,IAAI,SAAS;QAC1C,SAAS,EAAE,GAAG,CAAC,UAAU,IAAI,SAAS;QACtC,MAAM,EAAE,GAAG,CAA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GAAG,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IACnC,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,WAAmB;QAC3B,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CACzB,mDAAmD,CACpD,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAClB,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IACtC,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,WAAmB;QAClC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;;KAEf,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IACrB,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,cAAsB;QACvC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAA;QAE9E,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;;;;;;;;;;KAU5B,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,cAAc,GAAG,EAAE,GAAG,IAAI,CAA8B,CAAA;QAEpF,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;IACjC,CAAC;IAED,KAAK;QACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;IACjB,CAAC;CACF"}
|
|
@@ -8,7 +8,15 @@
|
|
|
8
8
|
* with manual invocations.
|
|
9
9
|
*/
|
|
10
10
|
import type { OrchestrateEventContext, OrchestrateActionResult } from './types.js';
|
|
11
|
+
import { type ChainExecutor } from './prompt-chain.js';
|
|
11
12
|
type ActionHandler = (ctx: OrchestrateEventContext, config?: Record<string, unknown>) => OrchestrateActionResult;
|
|
13
|
+
/**
|
|
14
|
+
* Test-only seam for swapping out the prlt CLI executor used by walkPromptChain.
|
|
15
|
+
* Pass `null` to restore the default spawnSync executor.
|
|
16
|
+
*
|
|
17
|
+
* This avoids monkey-patching child_process across the test suite.
|
|
18
|
+
*/
|
|
19
|
+
export declare function setChainExecutorForTesting(executor: ChainExecutor | null): void;
|
|
12
20
|
/**
|
|
13
21
|
* Timeout for actions that spawn agents via `prlt work start`.
|
|
14
22
|
* Container creation + clone + setup regularly exceeds 60s,
|
|
@@ -13,6 +13,21 @@ import * as fs from 'node:fs';
|
|
|
13
13
|
import { resolveWorkflowTarget } from '../work-lifecycle/settings.js';
|
|
14
14
|
import { executeCascade, detectZombieContainers, detectOrphanedWorktrees, detectStaleTmuxSessions, } from '../gc/cascade.js';
|
|
15
15
|
import { getEventBus } from '../events/event-bus.js';
|
|
16
|
+
import { walkPromptChain, resolveActionDefaults, defaultChainExecutor, } from './prompt-chain.js';
|
|
17
|
+
/**
|
|
18
|
+
* Module-level chain executor — overridable for tests via setChainExecutorForTesting().
|
|
19
|
+
* Production code uses defaultChainExecutor (spawnSync).
|
|
20
|
+
*/
|
|
21
|
+
let chainExecutor = defaultChainExecutor;
|
|
22
|
+
/**
|
|
23
|
+
* Test-only seam for swapping out the prlt CLI executor used by walkPromptChain.
|
|
24
|
+
* Pass `null` to restore the default spawnSync executor.
|
|
25
|
+
*
|
|
26
|
+
* This avoids monkey-patching child_process across the test suite.
|
|
27
|
+
*/
|
|
28
|
+
export function setChainExecutorForTesting(executor) {
|
|
29
|
+
chainExecutor = executor || defaultChainExecutor;
|
|
30
|
+
}
|
|
16
31
|
/**
|
|
17
32
|
* Timeout for actions that spawn agents via `prlt work start`.
|
|
18
33
|
* Container creation + clone + setup regularly exceeds 60s,
|
|
@@ -21,46 +36,63 @@ import { getEventBus } from '../events/event-bus.js';
|
|
|
21
36
|
export const AGENT_SPAWN_TIMEOUT_MS = 180_000;
|
|
22
37
|
/**
|
|
23
38
|
* Merge a PR via `prlt work ship`.
|
|
39
|
+
*
|
|
40
|
+
* Walks the JSON prompt chain so that any prompts emitted by `prlt work ship`
|
|
41
|
+
* (e.g. merge method, delete-branch confirmation) are answered with the
|
|
42
|
+
* configured defaults instead of hanging.
|
|
24
43
|
*/
|
|
25
44
|
const mergePr = (ctx, config) => {
|
|
26
45
|
const start = Date.now();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return { action: 'merge-pr', success: false, error: 'No ticket or PR number in context', durationMs: Date.now() - start };
|
|
30
|
-
}
|
|
31
|
-
const args = ['prlt', 'work', 'ship'];
|
|
32
|
-
if (ctx.ticket)
|
|
33
|
-
args.push(ctx.ticket);
|
|
34
|
-
if (ctx.pr)
|
|
35
|
-
args.push('--pr', String(ctx.pr));
|
|
36
|
-
execSync(args.join(' '), { timeout: 120_000, stdio: 'pipe' });
|
|
37
|
-
return { action: 'merge-pr', success: true, durationMs: Date.now() - start };
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
return { action: 'merge-pr', success: false, error: err instanceof Error ? err.message : String(err), durationMs: Date.now() - start };
|
|
46
|
+
if (!ctx.ticket && !ctx.pr) {
|
|
47
|
+
return { action: 'merge-pr', success: false, error: 'No ticket or PR number in context', durationMs: Date.now() - start };
|
|
41
48
|
}
|
|
49
|
+
const args = ['prlt', 'work', 'ship'];
|
|
50
|
+
if (ctx.ticket)
|
|
51
|
+
args.push(ctx.ticket);
|
|
52
|
+
if (ctx.pr)
|
|
53
|
+
args.push('--pr', String(ctx.pr));
|
|
54
|
+
const result = walkPromptChain({
|
|
55
|
+
baseCommand: args.join(' '),
|
|
56
|
+
defaults: resolveActionDefaults('merge-pr', config),
|
|
57
|
+
timeoutMs: 120_000,
|
|
58
|
+
executor: chainExecutor,
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
action: 'merge-pr',
|
|
62
|
+
success: result.success,
|
|
63
|
+
error: result.error,
|
|
64
|
+
durationMs: Date.now() - start,
|
|
65
|
+
};
|
|
42
66
|
};
|
|
43
67
|
/**
|
|
44
68
|
* Move a ticket to a target status.
|
|
45
69
|
*
|
|
46
70
|
* Resolves intent-like targets (e.g. 'done', 'review') through the workflow
|
|
47
|
-
* configuration so users with custom column names get the right mapping
|
|
71
|
+
* configuration so users with custom column names get the right mapping,
|
|
72
|
+
* then walks any JSON prompts emitted by `prlt ticket move`.
|
|
48
73
|
*/
|
|
49
74
|
const moveTicket = (ctx, config) => {
|
|
50
75
|
const start = Date.now();
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
76
|
+
if (!ctx.ticket) {
|
|
77
|
+
return { action: 'move-ticket', success: false, error: 'No ticket in context', durationMs: Date.now() - start };
|
|
78
|
+
}
|
|
79
|
+
// Pull the configured target (defaults are merged in resolveActionDefaults
|
|
80
|
+
// below, but we still need to resolve it through workflow settings here so
|
|
81
|
+
// intent-like targets like 'done' map to the user's actual column name).
|
|
82
|
+
const requestedTarget = config?.target || 'done';
|
|
83
|
+
const resolvedTarget = resolveTargetFromWorkspace(requestedTarget);
|
|
84
|
+
const result = walkPromptChain({
|
|
85
|
+
baseCommand: `prlt ticket move ${ctx.ticket} "${resolvedTarget}"`,
|
|
86
|
+
defaults: resolveActionDefaults('move-ticket', config),
|
|
87
|
+
timeoutMs: 30_000,
|
|
88
|
+
executor: chainExecutor,
|
|
89
|
+
});
|
|
90
|
+
return {
|
|
91
|
+
action: 'move-ticket',
|
|
92
|
+
success: result.success,
|
|
93
|
+
error: result.error,
|
|
94
|
+
durationMs: Date.now() - start,
|
|
95
|
+
};
|
|
64
96
|
};
|
|
65
97
|
/**
|
|
66
98
|
* Resolve a workflow target by opening the workspace DB and checking settings.
|
|
@@ -116,36 +148,55 @@ const rebaseConflictingPrs = (ctx) => {
|
|
|
116
148
|
}
|
|
117
149
|
};
|
|
118
150
|
/**
|
|
119
|
-
* Spawn an agent for a ticket.
|
|
151
|
+
* Spawn an agent for a ticket by walking the JSON prompt chain.
|
|
152
|
+
*
|
|
153
|
+
* `prlt work start` emits multiple JSON prompts (environment, display,
|
|
154
|
+
* permission-mode, PR creation, etc.) — hardcoding flags is brittle because
|
|
155
|
+
* adding any new prompt breaks the chain. Instead, we walk the chain and pick
|
|
156
|
+
* a configured default for every prompt name we encounter. Defaults can be
|
|
157
|
+
* overridden per hook via `args.defaults` config.
|
|
120
158
|
*/
|
|
121
|
-
const spawnAgent = (ctx) => {
|
|
159
|
+
const spawnAgent = (ctx, config) => {
|
|
122
160
|
const start = Date.now();
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
161
|
+
if (!ctx.ticket) {
|
|
162
|
+
return { action: 'spawn-agent', success: false, error: 'No ticket in context', durationMs: Date.now() - start };
|
|
163
|
+
}
|
|
164
|
+
const result = walkPromptChain({
|
|
165
|
+
baseCommand: `prlt work start ${ctx.ticket}`,
|
|
166
|
+
defaults: resolveActionDefaults('spawn-agent', config),
|
|
167
|
+
timeoutMs: AGENT_SPAWN_TIMEOUT_MS,
|
|
168
|
+
executor: chainExecutor,
|
|
169
|
+
});
|
|
170
|
+
return {
|
|
171
|
+
action: 'spawn-agent',
|
|
172
|
+
success: result.success,
|
|
173
|
+
error: result.error,
|
|
174
|
+
durationMs: Date.now() - start,
|
|
175
|
+
};
|
|
133
176
|
};
|
|
134
177
|
/**
|
|
135
178
|
* Respawn a failed/died agent.
|
|
179
|
+
*
|
|
180
|
+
* Same as spawn-agent but passes --force so prlt skips its
|
|
181
|
+
* "work already in progress" guard.
|
|
136
182
|
*/
|
|
137
183
|
const respawn = (ctx, config) => {
|
|
138
184
|
const start = Date.now();
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
185
|
+
if (!ctx.ticket) {
|
|
186
|
+
return { action: 'respawn', success: false, error: 'No ticket in context', durationMs: Date.now() - start };
|
|
187
|
+
}
|
|
188
|
+
const result = walkPromptChain({
|
|
189
|
+
baseCommand: `prlt work start ${ctx.ticket} --force`,
|
|
190
|
+
defaults: resolveActionDefaults('spawn-agent', config),
|
|
191
|
+
timeoutMs: AGENT_SPAWN_TIMEOUT_MS,
|
|
192
|
+
executor: chainExecutor,
|
|
193
|
+
});
|
|
194
|
+
return {
|
|
195
|
+
action: 'respawn',
|
|
196
|
+
success: result.success,
|
|
197
|
+
error: result.error,
|
|
198
|
+
durationMs: Date.now() - start,
|
|
199
|
+
};
|
|
149
200
|
};
|
|
150
201
|
/**
|
|
151
202
|
* Send a notification about an event.
|
|
@@ -202,38 +253,52 @@ const cleanupContainer = (ctx) => {
|
|
|
202
253
|
}
|
|
203
254
|
};
|
|
204
255
|
/**
|
|
205
|
-
* Spawn a fix agent after CI failure.
|
|
256
|
+
* Spawn a fix agent after CI failure. Uses --action revise so the agent
|
|
257
|
+
* launches into the revise role prompt; everything else (environment,
|
|
258
|
+
* display, permission mode, …) comes from prompt-chain defaults.
|
|
206
259
|
*/
|
|
207
|
-
const spawnFixAgent = (ctx) => {
|
|
260
|
+
const spawnFixAgent = (ctx, config) => {
|
|
208
261
|
const start = Date.now();
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
262
|
+
if (!ctx.ticket) {
|
|
263
|
+
return { action: 'spawn-fix-agent', success: false, error: 'No ticket in context', durationMs: Date.now() - start };
|
|
264
|
+
}
|
|
265
|
+
const result = walkPromptChain({
|
|
266
|
+
baseCommand: `prlt work start ${ctx.ticket} --action revise`,
|
|
267
|
+
defaults: resolveActionDefaults('spawn-fix-agent', config),
|
|
268
|
+
timeoutMs: AGENT_SPAWN_TIMEOUT_MS,
|
|
269
|
+
executor: chainExecutor,
|
|
270
|
+
});
|
|
271
|
+
return {
|
|
272
|
+
action: 'spawn-fix-agent',
|
|
273
|
+
success: result.success,
|
|
274
|
+
error: result.error,
|
|
275
|
+
durationMs: Date.now() - start,
|
|
276
|
+
};
|
|
219
277
|
};
|
|
220
278
|
/**
|
|
221
279
|
* Spawn a review agent for a PR.
|
|
222
|
-
*
|
|
223
|
-
*
|
|
280
|
+
*
|
|
281
|
+
* Review agents are non-destructive — they read the diff and post comments,
|
|
282
|
+
* so they default to host environment (faster, no container spin-up) and
|
|
283
|
+
* safe permission mode. --action review pins the read-only role prompt.
|
|
224
284
|
*/
|
|
225
|
-
const spawnReviewAgent = (ctx) => {
|
|
285
|
+
const spawnReviewAgent = (ctx, config) => {
|
|
226
286
|
const start = Date.now();
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
287
|
+
if (!ctx.ticket) {
|
|
288
|
+
return { action: 'spawn-review-agent', success: false, error: 'No ticket in context', durationMs: Date.now() - start };
|
|
289
|
+
}
|
|
290
|
+
const result = walkPromptChain({
|
|
291
|
+
baseCommand: `prlt work start ${ctx.ticket} --action review`,
|
|
292
|
+
defaults: resolveActionDefaults('spawn-review-agent', config),
|
|
293
|
+
timeoutMs: AGENT_SPAWN_TIMEOUT_MS,
|
|
294
|
+
executor: chainExecutor,
|
|
295
|
+
});
|
|
296
|
+
return {
|
|
297
|
+
action: 'spawn-review-agent',
|
|
298
|
+
success: result.success,
|
|
299
|
+
error: result.error,
|
|
300
|
+
durationMs: Date.now() - start,
|
|
301
|
+
};
|
|
237
302
|
};
|
|
238
303
|
/**
|
|
239
304
|
* Health check / poke an idle agent.
|
|
@@ -254,31 +319,38 @@ const healthCheck = (ctx) => {
|
|
|
254
319
|
/**
|
|
255
320
|
* Resolve a merge conflict on a PR by poking the running agent or respawning a stopped one.
|
|
256
321
|
* If the agent is running, it gets poked with a rebase instruction.
|
|
257
|
-
* If the agent is stopped, it gets respawned
|
|
322
|
+
* If the agent is stopped, it gets respawned via the JSON prompt chain
|
|
323
|
+
* with --action resolve.
|
|
258
324
|
* No action is taken on PRs with no associated ticket.
|
|
259
325
|
*/
|
|
260
|
-
const resolveConflict = (ctx) => {
|
|
326
|
+
const resolveConflict = (ctx, config) => {
|
|
261
327
|
const start = Date.now();
|
|
328
|
+
if (!ctx.ticket) {
|
|
329
|
+
return { action: 'resolve-conflict', success: true, durationMs: Date.now() - start, skipped: true };
|
|
330
|
+
}
|
|
331
|
+
// Try poking the running agent first. `prlt session poke` is a fire-and-
|
|
332
|
+
// forget command that doesn't have a JSON prompt chain — using execSync
|
|
333
|
+
// directly here is intentional.
|
|
262
334
|
try {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
// Try poking the running agent first
|
|
267
|
-
try {
|
|
268
|
-
const pokeMsg = 'Your PR has merge conflicts. Please rebase on main and resolve the conflicts.';
|
|
269
|
-
execSync(`prlt session poke ${ctx.ticket} "${pokeMsg}"`, { timeout: 30_000, stdio: 'pipe' });
|
|
270
|
-
return { action: 'resolve-conflict', success: true, durationMs: Date.now() - start };
|
|
271
|
-
}
|
|
272
|
-
catch {
|
|
273
|
-
// Poke failed — agent is likely not running, respawn it
|
|
274
|
-
}
|
|
275
|
-
// Respawn the agent with resolve action
|
|
276
|
-
execSync(`prlt work start ${ctx.ticket} --action resolve --yes --display background`, { timeout: AGENT_SPAWN_TIMEOUT_MS, stdio: 'pipe' });
|
|
335
|
+
const pokeMsg = 'Your PR has merge conflicts. Please rebase on main and resolve the conflicts.';
|
|
336
|
+
execSync(`prlt session poke ${ctx.ticket} "${pokeMsg}"`, { timeout: 30_000, stdio: 'pipe' });
|
|
277
337
|
return { action: 'resolve-conflict', success: true, durationMs: Date.now() - start };
|
|
278
338
|
}
|
|
279
|
-
catch
|
|
280
|
-
|
|
281
|
-
}
|
|
339
|
+
catch {
|
|
340
|
+
// Poke failed — agent is likely not running, respawn it via prompt chain
|
|
341
|
+
}
|
|
342
|
+
const result = walkPromptChain({
|
|
343
|
+
baseCommand: `prlt work start ${ctx.ticket} --action resolve`,
|
|
344
|
+
defaults: resolveActionDefaults('resolve-conflict', config),
|
|
345
|
+
timeoutMs: AGENT_SPAWN_TIMEOUT_MS,
|
|
346
|
+
executor: chainExecutor,
|
|
347
|
+
});
|
|
348
|
+
return {
|
|
349
|
+
action: 'resolve-conflict',
|
|
350
|
+
success: result.success,
|
|
351
|
+
error: result.error,
|
|
352
|
+
durationMs: Date.now() - start,
|
|
353
|
+
};
|
|
282
354
|
};
|
|
283
355
|
/**
|
|
284
356
|
* GC Sweep — periodic safety net for catching cleanup that events missed.
|