@principles/pd-cli 2.9.1 → 2.11.0
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/candidate.d.ts.map +1 -1
- package/dist/commands/candidate.js +16 -5
- package/dist/commands/candidate.js.map +1 -1
- package/dist/commands/codex-setup.d.ts.map +1 -1
- package/dist/commands/codex-setup.js +17 -1
- package/dist/commands/codex-setup.js.map +1 -1
- package/dist/commands/codex-worker.d.ts.map +1 -1
- package/dist/commands/codex-worker.js +8 -4
- package/dist/commands/codex-worker.js.map +1 -1
- package/dist/commands/consent-sweep-revoked.d.ts +20 -0
- package/dist/commands/consent-sweep-revoked.d.ts.map +1 -0
- package/dist/commands/consent-sweep-revoked.js +85 -0
- package/dist/commands/consent-sweep-revoked.js.map +1 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +9 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/diagnose.d.ts.map +1 -1
- package/dist/commands/diagnose.js +12 -6
- package/dist/commands/diagnose.js.map +1 -1
- package/dist/commands/openclaw-worker.d.ts +11 -0
- package/dist/commands/openclaw-worker.d.ts.map +1 -0
- package/dist/commands/openclaw-worker.js +199 -0
- package/dist/commands/openclaw-worker.js.map +1 -0
- package/dist/commands/pain-explicit.d.ts.map +1 -1
- package/dist/commands/pain-explicit.js +1 -0
- package/dist/commands/pain-explicit.js.map +1 -1
- package/dist/commands/pain-recall.d.ts +2 -2
- package/dist/commands/pain-recall.d.ts.map +1 -1
- package/dist/commands/pain-recall.js +7 -1
- package/dist/commands/pain-recall.js.map +1 -1
- package/dist/commands/pain-record.d.ts.map +1 -1
- package/dist/commands/pain-record.js +4 -1
- package/dist/commands/pain-record.js.map +1 -1
- package/dist/commands/pain-retry.d.ts.map +1 -1
- package/dist/commands/pain-retry.js +30 -6
- package/dist/commands/pain-retry.js.map +1 -1
- package/dist/commands/runtime-internalization-enqueue-successors.d.ts.map +1 -1
- package/dist/commands/runtime-internalization-enqueue-successors.js +2 -1
- package/dist/commands/runtime-internalization-enqueue-successors.js.map +1 -1
- package/dist/commands/runtime-internalization-run-once.d.ts +1 -0
- package/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/dist/commands/runtime-internalization-run-once.js +32 -8
- package/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/dist/commands/runtime-internalization-wake-once.d.ts.map +1 -1
- package/dist/commands/runtime-internalization-wake-once.js +2 -1
- package/dist/commands/runtime-internalization-wake-once.js.map +1 -1
- package/dist/commands/service-handover.d.ts +12 -0
- package/dist/commands/service-handover.d.ts.map +1 -0
- package/dist/commands/service-handover.js +117 -0
- package/dist/commands/service-handover.js.map +1 -0
- package/dist/commands/service-lifecycle.d.ts +31 -0
- package/dist/commands/service-lifecycle.d.ts.map +1 -0
- package/dist/commands/service-lifecycle.js +207 -0
- package/dist/commands/service-lifecycle.js.map +1 -0
- package/dist/commands/service-run-once.d.ts +102 -0
- package/dist/commands/service-run-once.d.ts.map +1 -0
- package/dist/commands/service-run-once.js +558 -0
- package/dist/commands/service-run-once.js.map +1 -0
- package/dist/commands/workbuddy-setup.d.ts.map +1 -1
- package/dist/commands/workbuddy-setup.js +22 -2
- package/dist/commands/workbuddy-setup.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +180 -1
- package/dist/program.js.map +1 -1
- package/dist/services/admission-write-gate.d.ts +3 -1
- package/dist/services/admission-write-gate.d.ts.map +1 -1
- package/dist/services/admission-write-gate.js +1 -0
- package/dist/services/admission-write-gate.js.map +1 -1
- package/dist/services/pain-flood-simulation-runner.d.ts.map +1 -1
- package/dist/services/pain-flood-simulation-runner.js +4 -0
- package/dist/services/pain-flood-simulation-runner.js.map +1 -1
- package/dist/services/service-host/coordinator-common.d.ts +49 -0
- package/dist/services/service-host/coordinator-common.d.ts.map +1 -0
- package/dist/services/service-host/coordinator-common.js +158 -0
- package/dist/services/service-host/coordinator-common.js.map +1 -0
- package/dist/services/service-host/handover-claims.d.ts +14 -0
- package/dist/services/service-host/handover-claims.d.ts.map +1 -0
- package/dist/services/service-host/handover-claims.js +50 -0
- package/dist/services/service-host/handover-claims.js.map +1 -0
- package/dist/services/service-host/index.d.ts +31 -0
- package/dist/services/service-host/index.d.ts.map +1 -0
- package/dist/services/service-host/index.js +33 -0
- package/dist/services/service-host/index.js.map +1 -0
- package/dist/services/service-host/install-identity.d.ts +99 -0
- package/dist/services/service-host/install-identity.d.ts.map +1 -0
- package/dist/services/service-host/install-identity.js +176 -0
- package/dist/services/service-host/install-identity.js.map +1 -0
- package/dist/services/service-host/locking/service-run-lock.d.ts +255 -0
- package/dist/services/service-host/locking/service-run-lock.d.ts.map +1 -0
- package/dist/services/service-host/locking/service-run-lock.js +739 -0
- package/dist/services/service-host/locking/service-run-lock.js.map +1 -0
- package/dist/services/service-host/managed-run.d.ts +75 -0
- package/dist/services/service-host/managed-run.d.ts.map +1 -0
- package/dist/services/service-host/managed-run.js +550 -0
- package/dist/services/service-host/managed-run.js.map +1 -0
- package/dist/services/service-host/owner-projection.d.ts +47 -0
- package/dist/services/service-host/owner-projection.d.ts.map +1 -0
- package/dist/services/service-host/owner-projection.js +121 -0
- package/dist/services/service-host/owner-projection.js.map +1 -0
- package/dist/services/service-host/progress-evidence.d.ts +38 -0
- package/dist/services/service-host/progress-evidence.d.ts.map +1 -0
- package/dist/services/service-host/progress-evidence.js +155 -0
- package/dist/services/service-host/progress-evidence.js.map +1 -0
- package/dist/services/service-host/run-once.d.ts +96 -0
- package/dist/services/service-host/run-once.d.ts.map +1 -0
- package/dist/services/service-host/run-once.js +308 -0
- package/dist/services/service-host/run-once.js.map +1 -0
- package/dist/services/service-host/scheduler/contract.d.ts +184 -0
- package/dist/services/service-host/scheduler/contract.d.ts.map +1 -0
- package/dist/services/service-host/scheduler/contract.js +86 -0
- package/dist/services/service-host/scheduler/contract.js.map +1 -0
- package/dist/services/service-host/scheduler/index.d.ts +76 -0
- package/dist/services/service-host/scheduler/index.d.ts.map +1 -0
- package/dist/services/service-host/scheduler/index.js +128 -0
- package/dist/services/service-host/scheduler/index.js.map +1 -0
- package/dist/services/service-host/scheduler/linux.d.ts +27 -0
- package/dist/services/service-host/scheduler/linux.d.ts.map +1 -0
- package/dist/services/service-host/scheduler/linux.js +1010 -0
- package/dist/services/service-host/scheduler/linux.js.map +1 -0
- package/dist/services/service-host/scheduler/macos.d.ts +13 -0
- package/dist/services/service-host/scheduler/macos.d.ts.map +1 -0
- package/dist/services/service-host/scheduler/macos.js +819 -0
- package/dist/services/service-host/scheduler/macos.js.map +1 -0
- package/dist/services/service-host/scheduler/runtime-io.d.ts +13 -0
- package/dist/services/service-host/scheduler/runtime-io.d.ts.map +1 -0
- package/dist/services/service-host/scheduler/runtime-io.js +141 -0
- package/dist/services/service-host/scheduler/runtime-io.js.map +1 -0
- package/dist/services/service-host/scheduler/service-status.d.ts +99 -0
- package/dist/services/service-host/scheduler/service-status.d.ts.map +1 -0
- package/dist/services/service-host/scheduler/service-status.js +202 -0
- package/dist/services/service-host/scheduler/service-status.js.map +1 -0
- package/dist/services/service-host/scheduler/windows.d.ts +40 -0
- package/dist/services/service-host/scheduler/windows.d.ts.map +1 -0
- package/dist/services/service-host/scheduler/windows.js +688 -0
- package/dist/services/service-host/scheduler/windows.js.map +1 -0
- package/dist/services/service-host/shadow-progress-store.d.ts +43 -0
- package/dist/services/service-host/shadow-progress-store.d.ts.map +1 -0
- package/dist/services/service-host/shadow-progress-store.js +156 -0
- package/dist/services/service-host/shadow-progress-store.js.map +1 -0
- package/dist/services/service-host/shadow-run.d.ts +87 -0
- package/dist/services/service-host/shadow-run.d.ts.map +1 -0
- package/dist/services/service-host/shadow-run.js +549 -0
- package/dist/services/service-host/shadow-run.js.map +1 -0
- package/dist/services/service-host/status/service-run-status.d.ts +227 -0
- package/dist/services/service-host/status/service-run-status.d.ts.map +1 -0
- package/dist/services/service-host/status/service-run-status.js +187 -0
- package/dist/services/service-host/status/service-run-status.js.map +1 -0
- package/dist/services/service-host/worker-adapter-codex.d.ts +2 -0
- package/dist/services/service-host/worker-adapter-codex.d.ts.map +1 -0
- package/dist/services/service-host/worker-adapter-codex.js +76 -0
- package/dist/services/service-host/worker-adapter-codex.js.map +1 -0
- package/dist/services/service-host/worker-adapter-openclaw.d.ts +2 -0
- package/dist/services/service-host/worker-adapter-openclaw.d.ts.map +1 -0
- package/dist/services/service-host/worker-adapter-openclaw.js +49 -0
- package/dist/services/service-host/worker-adapter-openclaw.js.map +1 -0
- package/dist/services/service-host/worker-adapter-workbuddy.d.ts +2 -0
- package/dist/services/service-host/worker-adapter-workbuddy.d.ts.map +1 -0
- package/dist/services/service-host/worker-adapter-workbuddy.js +36 -0
- package/dist/services/service-host/worker-adapter-workbuddy.js.map +1 -0
- package/dist/services/service-host/worker-adapter.d.ts +187 -0
- package/dist/services/service-host/worker-adapter.d.ts.map +1 -0
- package/dist/services/service-host/worker-adapter.js +609 -0
- package/dist/services/service-host/worker-adapter.js.map +1 -0
- package/dist/services/service-host/worker-env.d.ts +84 -0
- package/dist/services/service-host/worker-env.d.ts.map +1 -0
- package/dist/services/service-host/worker-env.js +195 -0
- package/dist/services/service-host/worker-env.js.map +1 -0
- package/dist/services/service-host/worker-process.d.ts +75 -0
- package/dist/services/service-host/worker-process.d.ts.map +1 -0
- package/dist/services/service-host/worker-process.js +225 -0
- package/dist/services/service-host/worker-process.js.map +1 -0
- package/dist/services/service-host/workspace-discovery.d.ts +71 -0
- package/dist/services/service-host/workspace-discovery.d.ts.map +1 -0
- package/dist/services/service-host/workspace-discovery.js +288 -0
- package/dist/services/service-host/workspace-discovery.js.map +1 -0
- package/dist/services/service-host/workspace-dispatch.d.ts +61 -0
- package/dist/services/service-host/workspace-dispatch.d.ts.map +1 -0
- package/dist/services/service-host/workspace-dispatch.js +105 -0
- package/dist/services/service-host/workspace-dispatch.js.map +1 -0
- package/dist/services/service-host/workspace-handover.d.ts +190 -0
- package/dist/services/service-host/workspace-handover.d.ts.map +1 -0
- package/dist/services/service-host/workspace-handover.js +1393 -0
- package/dist/services/service-host/workspace-handover.js.map +1 -0
- package/dist/services/synthetic-baseline-runner.d.ts.map +1 -1
- package/dist/services/synthetic-baseline-runner.js +4 -0
- package/dist/services/synthetic-baseline-runner.js.map +1 -1
- package/package.json +10 -9
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pd service run-once` — the PD Service Host run-once coordinator CLI
|
|
3
|
+
* (SPEC-PD-SERVICE-HOST-001 §11 Phase 1 + Phase 2 + Phase 3).
|
|
4
|
+
*
|
|
5
|
+
* Three modes (cli-4):
|
|
6
|
+
* - bare / `--json` (Phase 3, PRI-1281): the MANAGED execution — the OS
|
|
7
|
+
* scheduler's entry. Auto-discovers workspaces and executes ONLY
|
|
8
|
+
* `effectiveOwner=service_host` ones (§8.4); zero such workspaces is a
|
|
9
|
+
* legal empty run.
|
|
10
|
+
* - `--dry-run` (Phase 1): the read-only discovery dry-run — NO worker,
|
|
11
|
+
* NO ownership change, no business writes.
|
|
12
|
+
* - `--shadow` (Phase 2, PRI-1280): an explicit, bounded REAL worker cycle
|
|
13
|
+
* for each `--workspace <dir>` selection through the unified Worker
|
|
14
|
+
* Adapter. Shadow calls the real worker — business tasks may advance —
|
|
15
|
+
* and requires explicit workspace selection; never scheduled.
|
|
16
|
+
*
|
|
17
|
+
* `--trigger manual|scheduler` records the SELF-DECLARED trigger source
|
|
18
|
+
* (task §4/§11 review): the scheduler registers `--trigger scheduler`, but
|
|
19
|
+
* the flag is written by the run-once process itself — it is a REPORTED
|
|
20
|
+
* trigger, not verified OS evidence. Any caller may claim 'scheduler';
|
|
21
|
+
* consumers (status document, Examiner, Console) must never treat the flag
|
|
22
|
+
* as proof of an OS-triggered run — the OS scheduler witnesses
|
|
23
|
+
* (registration/lastRun) are the verified side. Login vs periodic is
|
|
24
|
+
* deliberately NOT distinguished (no platform reports it reliably).
|
|
25
|
+
*
|
|
26
|
+
* cli-1: `--json` stdout carries exactly one machine-readable document;
|
|
27
|
+
* diagnostics go to stderr. cli-2/cli-5: refusals set the exit code without
|
|
28
|
+
* mutating anything. cli-6: every refusal carries reason + nextAction.
|
|
29
|
+
*/
|
|
30
|
+
import { runServiceRunOnce, runServiceShadowOnce, runServiceManagedOnce, } from '../services/service-host/index.js';
|
|
31
|
+
/** Node timers support 2^31-1 ms; above that setTimeout overflows to ~1ms. */
|
|
32
|
+
const MAX_TIMEOUT_MS = 2_147_483_647;
|
|
33
|
+
const MIN_TIMEOUT_MS = 1_000;
|
|
34
|
+
const DEFAULT_TIMEOUT_FALLBACK_MS = 45 * 60_000;
|
|
35
|
+
/**
|
|
36
|
+
* F8: validate the full --timeout-ms value BEFORE any real execution. The
|
|
37
|
+
* whole string must be a decimal integer inside the supported range —
|
|
38
|
+
* partial parses (`5m` → 5) and silent defaults (`five` → 45min) are
|
|
39
|
+
* refused with a structured reason instead of starting a mis-bounded
|
|
40
|
+
* worker.
|
|
41
|
+
*/
|
|
42
|
+
export function parseShadowTimeoutMs(raw) {
|
|
43
|
+
if (raw === undefined || raw.trim() === '')
|
|
44
|
+
return { ok: true, timeoutMs: DEFAULT_TIMEOUT_FALLBACK_MS };
|
|
45
|
+
const value = raw.trim();
|
|
46
|
+
if (!/^\d+$/.test(value)) {
|
|
47
|
+
return {
|
|
48
|
+
ok: false,
|
|
49
|
+
reason: `invalid_timeout_ms:${value.slice(0, 40)}`,
|
|
50
|
+
nextAction: '--timeout-ms must be a plain millisecond integer (e.g. 2700000). Values like "5m" are not accepted; omit the flag for the 45-minute default.',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const parsed = Number(value);
|
|
54
|
+
if (!Number.isSafeInteger(parsed) || parsed < MIN_TIMEOUT_MS || parsed > MAX_TIMEOUT_MS) {
|
|
55
|
+
return {
|
|
56
|
+
ok: false,
|
|
57
|
+
reason: `timeout_ms_out_of_range:${value.slice(0, 40)}`,
|
|
58
|
+
nextAction: `--timeout-ms must be between ${MIN_TIMEOUT_MS} and ${MAX_TIMEOUT_MS} milliseconds (a per-workspace bound of at least one second, at most the Node timer ceiling).`,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return { ok: true, timeoutMs: parsed };
|
|
62
|
+
}
|
|
63
|
+
/** Render the completed dry-run for humans (JSON mode prints the status verbatim). */
|
|
64
|
+
function printHumanCompleted(result) {
|
|
65
|
+
const { discovery, manifest, activeRelease, identity } = result;
|
|
66
|
+
console.log(`pd service run-once (dry-run) — install identity resolved`);
|
|
67
|
+
console.log(` pdHome: ${identity.pdHome}`);
|
|
68
|
+
console.log(` home: ${identity.homeDir} (${identity.homeSource})`);
|
|
69
|
+
console.log(` activeRelease: ${activeRelease.valid ? (activeRelease.releaseId ?? 'unknown identity') : (activeRelease.reason ?? 'unavailable')}`);
|
|
70
|
+
console.log(` manifest: ${manifest.verdict} (hosts: ${manifest.hosts.join(', ') || 'none'}, workspaces: ${manifest.workspacesCount})`);
|
|
71
|
+
const counts = Object.entries(discovery.counts)
|
|
72
|
+
.map(([verdict, count]) => `${verdict}=${count}`)
|
|
73
|
+
.join(' ');
|
|
74
|
+
console.log(` discovery: ${discovery.discoveredTotal} workspace(s) — ${counts}`);
|
|
75
|
+
for (const ws of discovery.workspaces) {
|
|
76
|
+
const reasonSuffix = ws.reason !== undefined ? ` — ${ws.reason}` : '';
|
|
77
|
+
console.log(` [${ws.verdict}] ${ws.canonicalDir}${reasonSuffix}`);
|
|
78
|
+
console.log(` owner: ${ws.owner.state} (effectiveOwner=${ws.owner.effectiveOwner}, generation=${ws.owner.generation}, source=${ws.owner.source}); hosts: ${ws.hosts.join(', ') || 'none'}`);
|
|
79
|
+
}
|
|
80
|
+
if (result.statusWrite.ok) {
|
|
81
|
+
console.log(` status: ${result.statusWrite.path}`);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
console.error(` status write FAILED: ${result.statusWrite.reason}`);
|
|
85
|
+
console.error(` next action: ${result.statusWrite.nextAction}`);
|
|
86
|
+
}
|
|
87
|
+
console.log(` next: ${result.status.nextAction}`);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Wire the terminal's OS signals into ONE AbortController (F11 + P1-01
|
|
91
|
+
* final-closure review): SIGINT, SIGTERM and — on POSIX — SIGHUP all drive
|
|
92
|
+
* the same cancellation path the in-flight worker child already honours
|
|
93
|
+
* (process-group SIGTERM → bounded grace → SIGKILL → bounded stdio drain).
|
|
94
|
+
* A dropped SSH/terminal session must terminate the detached worker group
|
|
95
|
+
* through the coordinator's normal cleanup instead of leaving an
|
|
96
|
+
* uncontrolled worker — and a released lock — behind. Windows keeps its
|
|
97
|
+
* existing semantics: SIGHUP is never registered there.
|
|
98
|
+
*
|
|
99
|
+
* Returns the teardown that removes every listener it installed; callers
|
|
100
|
+
* invoke it exactly once when the coordinated work settles.
|
|
101
|
+
*/
|
|
102
|
+
export function wireTerminalAbortSignals(controller) {
|
|
103
|
+
const onOsSignal = () => controller.abort();
|
|
104
|
+
process.on('SIGINT', onOsSignal);
|
|
105
|
+
process.on('SIGTERM', onOsSignal);
|
|
106
|
+
const posixHangup = process.platform !== 'win32';
|
|
107
|
+
if (posixHangup)
|
|
108
|
+
process.on('SIGHUP', onOsSignal);
|
|
109
|
+
return () => {
|
|
110
|
+
process.removeListener('SIGINT', onOsSignal);
|
|
111
|
+
process.removeListener('SIGTERM', onOsSignal);
|
|
112
|
+
if (posixHangup)
|
|
113
|
+
process.removeListener('SIGHUP', onOsSignal);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/** Render one refusal for humans. */
|
|
117
|
+
function printHumanRefusal(reason, nextAction) {
|
|
118
|
+
console.error(`pd service run-once refused: ${reason}`);
|
|
119
|
+
console.error(`Next action: ${nextAction}`);
|
|
120
|
+
}
|
|
121
|
+
/** Human rendering of one shadow execution (task §10: outcome + progress + health stay distinct). */
|
|
122
|
+
export function printHumanShadow(result) {
|
|
123
|
+
const { identity, activeRelease } = result;
|
|
124
|
+
console.log(`pd service run-once (shadow) — install identity resolved`);
|
|
125
|
+
console.log(` pdHome: ${identity.pdHome}`);
|
|
126
|
+
console.log(` activeRelease: ${activeRelease.valid ? (activeRelease.releaseId ?? 'unknown identity') : (activeRelease.reason ?? 'unavailable')}`);
|
|
127
|
+
for (const record of result.executions) {
|
|
128
|
+
if (record.admission === 'refused') {
|
|
129
|
+
console.log(` [refused] ${record.requestedDir} — ${record.refusalReason ?? 'refused'}`);
|
|
130
|
+
console.log(` next: ${record.refusalNextAction ?? ''}`);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
const { execution } = record;
|
|
134
|
+
if (execution === undefined) {
|
|
135
|
+
// P2-04: records with no Worker execution (workspace_timeout_budget_
|
|
136
|
+
// exhausted, adapter_threw, worker_spawn_failed) still owe the human
|
|
137
|
+
// output their recorded reason and nextAction, not a bare label.
|
|
138
|
+
console.log(` [${record.workspaceState}] ${record.requestedDir} (${record.hostKind ?? '?'}) — ${record.refusalReason ?? 'adapter failure'}`);
|
|
139
|
+
if (record.refusalNextAction !== undefined)
|
|
140
|
+
console.log(` next: ${record.refusalNextAction}`);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const progress = record.lastProgressAt !== null ? record.lastProgressAt : 'none yet';
|
|
144
|
+
const driver = execution.health.lastCycleDriver ?? 'unknown';
|
|
145
|
+
console.log(` [${record.workspaceState}] ${execution.workspaceDir} (${execution.hostKind} via ${execution.worker.cliEntrySource}) — ${execution.cycleOutcome}${execution.reason !== undefined ? ` (${execution.reason})` : ''}`);
|
|
146
|
+
console.log(` progress: last=${progress} (source=${record.lastProgressSource ?? 'none'}); tasks changed=${execution.businessProgress.changedTaskCount}; driver=${driver}; duration=${execution.durationMs}ms`);
|
|
147
|
+
if (execution.nextAction !== undefined)
|
|
148
|
+
console.log(` next: ${execution.nextAction}`);
|
|
149
|
+
}
|
|
150
|
+
if (result.statusWrite.ok) {
|
|
151
|
+
console.log(` status: ${result.statusWrite.path}`);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
console.error(` status write FAILED: ${result.statusWrite.reason}`);
|
|
155
|
+
console.error(` next action: ${result.statusWrite.nextAction}`);
|
|
156
|
+
}
|
|
157
|
+
console.log(` next: ${result.status.nextAction}`);
|
|
158
|
+
}
|
|
159
|
+
/** Human rendering of one managed execution (task §4 admission matrix). */
|
|
160
|
+
export function printHumanManaged(result) {
|
|
161
|
+
const { identity, activeRelease } = result;
|
|
162
|
+
console.log(`pd service run-once (managed, trigger=${result.status.triggerSource}) — install identity resolved`);
|
|
163
|
+
console.log(` pdHome: ${identity.pdHome}`);
|
|
164
|
+
console.log(` activeRelease: ${activeRelease.valid ? activeRelease.releaseId ?? 'unknown identity' : activeRelease.reason ?? 'unavailable'}`);
|
|
165
|
+
const section = result.status.managed;
|
|
166
|
+
if (section !== undefined && section.emptyReason !== undefined) {
|
|
167
|
+
console.log(` result: legal empty run (${section.emptyReason}) — no Worker started`);
|
|
168
|
+
}
|
|
169
|
+
for (const record of result.executions) {
|
|
170
|
+
if (record.admission === 'skipped') {
|
|
171
|
+
console.log(` [skipped] ${record.canonicalDir} — ${record.skipReason ?? 'skipped'}`);
|
|
172
|
+
if (record.skipNextAction !== undefined)
|
|
173
|
+
console.log(` next: ${record.skipNextAction}`);
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if (record.execution === undefined) {
|
|
177
|
+
console.log(` [${record.workspaceState}] ${record.canonicalDir} (${record.hostKind ?? '?'}) — ${record.skipReason ?? 'failed before cycle'}`);
|
|
178
|
+
if (record.skipNextAction !== undefined)
|
|
179
|
+
console.log(` next: ${record.skipNextAction}`);
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
const { execution } = record;
|
|
183
|
+
const progress = record.lastProgressAt !== null ? record.lastProgressAt : 'none yet';
|
|
184
|
+
console.log(` [${record.workspaceState}] ${execution.workspaceDir} (${execution.hostKind} via ${execution.worker.cliEntrySource}) — ${execution.cycleOutcome}${execution.reason !== undefined ? ` (${execution.reason})` : ''}`);
|
|
185
|
+
console.log(` progress: last=${progress} (source=${record.lastProgressSource ?? 'none'}); tasks changed=${execution.businessProgress.changedTaskCount}; duration=${execution.durationMs}ms`);
|
|
186
|
+
if (execution.nextAction !== undefined)
|
|
187
|
+
console.log(` next: ${execution.nextAction}`);
|
|
188
|
+
}
|
|
189
|
+
if (result.statusWrite.ok) {
|
|
190
|
+
console.log(` status: ${result.statusWrite.path}`);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
console.error(` status write FAILED: ${result.statusWrite.reason}`);
|
|
194
|
+
console.error(` next action: ${result.statusWrite.nextAction}`);
|
|
195
|
+
}
|
|
196
|
+
console.log(` next: ${result.status.nextAction}`);
|
|
197
|
+
}
|
|
198
|
+
export async function handleServiceRunOnce(args) {
|
|
199
|
+
// Invalid --host value: fail closed before any mode runs (cli-6).
|
|
200
|
+
if (args.invalidHost !== undefined) {
|
|
201
|
+
const reason = `invalid_host_kind:${args.invalidHost.slice(0, 40)}`;
|
|
202
|
+
const nextAction = 'Use --host codex or --host workbuddy (or omit --host to run every bound adapter).';
|
|
203
|
+
if (args.json) {
|
|
204
|
+
const output = { schemaVersion: 'pd.service-run-status.v1', outcome: 'refused', dryRun: false, runId: 'n/a', reason, nextAction };
|
|
205
|
+
console.log(JSON.stringify(output));
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
printHumanRefusal(reason, nextAction);
|
|
209
|
+
}
|
|
210
|
+
process.exitCode = 1;
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
// Invalid --trigger value: fail closed before any mode runs (cli-6).
|
|
214
|
+
if (args.invalidTrigger !== undefined) {
|
|
215
|
+
const reason = `invalid_trigger:${args.invalidTrigger.slice(0, 40)}`;
|
|
216
|
+
const nextAction = 'Use --trigger manual or --trigger scheduler. Login vs periodic is deliberately not distinguishable — PD never fabricates a finer trigger source than it can prove.';
|
|
217
|
+
if (args.json) {
|
|
218
|
+
const output = { schemaVersion: 'pd.service-run-status.v1', outcome: 'refused', dryRun: false, runId: 'n/a', reason, nextAction };
|
|
219
|
+
console.log(JSON.stringify(output));
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
printHumanRefusal(reason, nextAction);
|
|
223
|
+
}
|
|
224
|
+
process.exitCode = 1;
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
// Mode gate (cli-4): --dry-run and --shadow stay mutually exclusive; a
|
|
228
|
+
// bare run is the Phase 3 MANAGED execution (the scheduler entry).
|
|
229
|
+
if (args.dryRun && args.shadow) {
|
|
230
|
+
const reason = 'dry_run_shadow_mutually_exclusive';
|
|
231
|
+
const nextAction = 'Choose one mode: --dry-run (read-only discovery), --shadow --workspace <dir> (explicit bounded worker cycles), or a bare run (managed execution — service_host_owned workspaces only).';
|
|
232
|
+
if (args.json) {
|
|
233
|
+
const output = { schemaVersion: 'pd.service-run-status.v1', outcome: 'refused', dryRun: true, runId: 'n/a', reason, nextAction };
|
|
234
|
+
console.log(JSON.stringify(output));
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
printHumanRefusal(reason, nextAction);
|
|
238
|
+
}
|
|
239
|
+
process.exitCode = 1;
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
const triggerSource = args.trigger ?? 'manual';
|
|
243
|
+
if (args.shadow) {
|
|
244
|
+
// F8: full-value validation BEFORE the coordinator acquires the lock or
|
|
245
|
+
// spawns any real cycle.
|
|
246
|
+
const timeout = parseShadowTimeoutMs(args.timeoutMsRaw);
|
|
247
|
+
if (!timeout.ok) {
|
|
248
|
+
if (args.json) {
|
|
249
|
+
const output = { schemaVersion: 'pd.service-run-status.v1', outcome: 'refused', dryRun: false, runId: 'n/a', reason: timeout.reason, nextAction: timeout.nextAction };
|
|
250
|
+
console.log(JSON.stringify(output));
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
printHumanRefusal(timeout.reason, timeout.nextAction);
|
|
254
|
+
}
|
|
255
|
+
process.exitCode = 1;
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
// F11: cancellation reaches the coordinator and the in-flight worker
|
|
259
|
+
// child through ONE AbortSignal — injected by tests, or wired here to
|
|
260
|
+
// terminal SIGINT/SIGTERM/SIGHUP so an operator interrupt (or a dropped
|
|
261
|
+
// terminal) behaves identically.
|
|
262
|
+
let unwireOsSignals;
|
|
263
|
+
const { signal: injectedSignal } = args;
|
|
264
|
+
let signal = injectedSignal;
|
|
265
|
+
if (signal === undefined) {
|
|
266
|
+
const controller = new AbortController();
|
|
267
|
+
({ signal } = controller);
|
|
268
|
+
unwireOsSignals = wireTerminalAbortSignals(controller);
|
|
269
|
+
}
|
|
270
|
+
let result;
|
|
271
|
+
try {
|
|
272
|
+
result = await runServiceShadowOnce({
|
|
273
|
+
workspaces: args.workspaces,
|
|
274
|
+
...(args.host !== undefined ? { hostFilter: args.host } : {}),
|
|
275
|
+
timeoutMs: timeout.timeoutMs,
|
|
276
|
+
...(signal !== undefined ? { signal } : {}),
|
|
277
|
+
...(args.pdHome !== undefined ? { trustedHomeDir: args.pdHome } : {}),
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
finally {
|
|
281
|
+
unwireOsSignals?.();
|
|
282
|
+
}
|
|
283
|
+
if (result.outcome === 'refused') {
|
|
284
|
+
if (args.json) {
|
|
285
|
+
const output = {
|
|
286
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
287
|
+
outcome: 'refused',
|
|
288
|
+
dryRun: false,
|
|
289
|
+
runId: result.runId,
|
|
290
|
+
reason: result.reason,
|
|
291
|
+
nextAction: result.nextAction,
|
|
292
|
+
...(result.statusWrite !== undefined ? { statusWrite: result.statusWrite } : {}),
|
|
293
|
+
};
|
|
294
|
+
console.log(JSON.stringify(output));
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
printHumanRefusal(result.reason, result.nextAction);
|
|
298
|
+
if (result.statusWrite !== undefined && !result.statusWrite.ok) {
|
|
299
|
+
console.error(` status write FAILED: ${result.statusWrite.reason}`);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
process.exitCode = 1;
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (result.outcome === 'already_running') {
|
|
306
|
+
if (args.json) {
|
|
307
|
+
const output = {
|
|
308
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
309
|
+
outcome: 'already_running',
|
|
310
|
+
dryRun: false,
|
|
311
|
+
runId: result.runId,
|
|
312
|
+
reason: result.reason,
|
|
313
|
+
nextAction: result.nextAction,
|
|
314
|
+
};
|
|
315
|
+
console.log(JSON.stringify(output));
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
console.log(`pd service run-once (shadow): already running (lock held).`);
|
|
319
|
+
console.log(` holder: ${result.holderBodyHash}`);
|
|
320
|
+
console.log(` next: ${result.nextAction}`);
|
|
321
|
+
}
|
|
322
|
+
process.exitCode = 0;
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (args.json) {
|
|
326
|
+
const output = {
|
|
327
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
328
|
+
outcome: 'completed',
|
|
329
|
+
dryRun: false,
|
|
330
|
+
runId: result.runId,
|
|
331
|
+
installation: result.status.installation,
|
|
332
|
+
environmentIsolation: result.status.environmentIsolation,
|
|
333
|
+
manifest: result.manifest,
|
|
334
|
+
activeRelease: result.activeRelease,
|
|
335
|
+
discovery: {
|
|
336
|
+
discoveredTotal: result.discovery.discoveredTotal,
|
|
337
|
+
counts: result.discovery.counts,
|
|
338
|
+
hostRoots: result.status.discovery.hostRoots,
|
|
339
|
+
incomplete: result.status.discovery.incomplete,
|
|
340
|
+
},
|
|
341
|
+
workspaces: result.discovery.workspaces,
|
|
342
|
+
shadow: result.status.shadow,
|
|
343
|
+
executions: result.executions,
|
|
344
|
+
statusWrite: result.statusWrite,
|
|
345
|
+
nextAction: result.status.nextAction,
|
|
346
|
+
...(result.statusWrite.ok ? { statusPath: result.statusWrite.path } : {}),
|
|
347
|
+
};
|
|
348
|
+
console.log(JSON.stringify(output, null, 2));
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
printHumanShadow(result);
|
|
352
|
+
}
|
|
353
|
+
// Exit-code policy: 0 only when at least one cycle ran and every
|
|
354
|
+
// admitted execution ended completed/paused; refusals, failures,
|
|
355
|
+
// timeouts, degradations and a failed status write are non-zero.
|
|
356
|
+
const admitted = result.executions.filter((e) => e.admission === 'admitted');
|
|
357
|
+
const allHealthy = admitted.length > 0
|
|
358
|
+
&& admitted.every((e) => e.workspaceState === 'completed' || e.workspaceState === 'paused');
|
|
359
|
+
const statusFailed = !result.statusWrite.ok;
|
|
360
|
+
const anyRefused = result.executions.some((e) => e.admission === 'refused');
|
|
361
|
+
process.exitCode = allHealthy && !statusFailed && !anyRefused ? 0 : 1;
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
// ── Phase 3 managed execution (bare run — the OS scheduler entry) ──
|
|
365
|
+
if (!args.dryRun) {
|
|
366
|
+
const timeout = parseShadowTimeoutMs(args.timeoutMsRaw);
|
|
367
|
+
if (!timeout.ok) {
|
|
368
|
+
if (args.json) {
|
|
369
|
+
const output = { schemaVersion: 'pd.service-run-status.v1', outcome: 'refused', dryRun: false, runId: 'n/a', reason: timeout.reason, nextAction: timeout.nextAction };
|
|
370
|
+
console.log(JSON.stringify(output));
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
printHumanRefusal(timeout.reason, timeout.nextAction);
|
|
374
|
+
}
|
|
375
|
+
process.exitCode = 1;
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
let unwireOsSignals;
|
|
379
|
+
const { signal: injectedSignal } = args;
|
|
380
|
+
let signal = injectedSignal;
|
|
381
|
+
if (signal === undefined) {
|
|
382
|
+
const controller = new AbortController();
|
|
383
|
+
({ signal } = controller);
|
|
384
|
+
unwireOsSignals = wireTerminalAbortSignals(controller);
|
|
385
|
+
}
|
|
386
|
+
let result;
|
|
387
|
+
try {
|
|
388
|
+
result = await runServiceManagedOnce({
|
|
389
|
+
triggerSource,
|
|
390
|
+
timeoutMs: timeout.timeoutMs,
|
|
391
|
+
...(signal !== undefined ? { signal } : {}),
|
|
392
|
+
...(args.pdHome !== undefined ? { trustedHomeDir: args.pdHome } : {}),
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
finally {
|
|
396
|
+
unwireOsSignals?.();
|
|
397
|
+
}
|
|
398
|
+
if (result.outcome === 'refused') {
|
|
399
|
+
if (args.json) {
|
|
400
|
+
const output = {
|
|
401
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
402
|
+
outcome: 'refused',
|
|
403
|
+
dryRun: false,
|
|
404
|
+
runId: result.runId,
|
|
405
|
+
reason: result.reason,
|
|
406
|
+
nextAction: result.nextAction,
|
|
407
|
+
...(result.statusWrite !== undefined ? { statusWrite: result.statusWrite } : {}),
|
|
408
|
+
};
|
|
409
|
+
console.log(JSON.stringify(output));
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
printHumanRefusal(result.reason, result.nextAction);
|
|
413
|
+
if (result.statusWrite !== undefined && !result.statusWrite.ok) {
|
|
414
|
+
console.error(` status write FAILED: ${result.statusWrite.reason}`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
process.exitCode = 1;
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
if (result.outcome === 'already_running') {
|
|
421
|
+
if (args.json) {
|
|
422
|
+
const output = {
|
|
423
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
424
|
+
outcome: 'already_running',
|
|
425
|
+
dryRun: false,
|
|
426
|
+
runId: result.runId,
|
|
427
|
+
reason: result.reason,
|
|
428
|
+
nextAction: result.nextAction,
|
|
429
|
+
};
|
|
430
|
+
console.log(JSON.stringify(output));
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
console.log(`pd service run-once (managed): already running (lock held).`);
|
|
434
|
+
console.log(` holder: ${result.holderBodyHash}`);
|
|
435
|
+
console.log(` next: ${result.nextAction}`);
|
|
436
|
+
}
|
|
437
|
+
// Overlap convergence worked as designed (AC-08) — not an error.
|
|
438
|
+
process.exitCode = 0;
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
if (args.json) {
|
|
442
|
+
const output = {
|
|
443
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
444
|
+
outcome: 'completed',
|
|
445
|
+
dryRun: false,
|
|
446
|
+
runId: result.runId,
|
|
447
|
+
installation: result.status.installation,
|
|
448
|
+
environmentIsolation: result.status.environmentIsolation,
|
|
449
|
+
manifest: result.manifest,
|
|
450
|
+
activeRelease: result.activeRelease,
|
|
451
|
+
discovery: {
|
|
452
|
+
discoveredTotal: result.discovery.discoveredTotal,
|
|
453
|
+
counts: result.discovery.counts,
|
|
454
|
+
hostRoots: result.status.discovery.hostRoots,
|
|
455
|
+
incomplete: result.status.discovery.incomplete,
|
|
456
|
+
},
|
|
457
|
+
workspaces: result.discovery.workspaces,
|
|
458
|
+
managed: result.status.managed,
|
|
459
|
+
executions: result.executions,
|
|
460
|
+
statusWrite: result.statusWrite,
|
|
461
|
+
nextAction: result.status.nextAction,
|
|
462
|
+
...(result.statusWrite.ok ? { statusPath: result.statusWrite.path } : {}),
|
|
463
|
+
};
|
|
464
|
+
console.log(JSON.stringify(output, null, 2));
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
printHumanManaged(result);
|
|
468
|
+
}
|
|
469
|
+
// Exit-code policy: 0 only when the status write succeeded AND every
|
|
470
|
+
// EXECUTED workspace ended completed/paused. Skips (legacy-owned,
|
|
471
|
+
// transition states) are by-design non-executions, not failures; a run
|
|
472
|
+
// with zero service_host_owned workspaces is a legal empty success.
|
|
473
|
+
const executed = result.executions.filter((e) => e.admission === 'executed');
|
|
474
|
+
const allHealthy = executed.every((e) => e.workspaceState === 'completed' || e.workspaceState === 'paused');
|
|
475
|
+
const statusFailed = !result.statusWrite.ok;
|
|
476
|
+
process.exitCode = !statusFailed && allHealthy ? 0 : 1;
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
// ── Phase 1 dry-run (unchanged contract) ──
|
|
480
|
+
const result = runServiceRunOnce({
|
|
481
|
+
...(args.pdHome !== undefined ? { trustedHomeDir: args.pdHome } : {}),
|
|
482
|
+
});
|
|
483
|
+
if (result.outcome === 'refused') {
|
|
484
|
+
if (args.json) {
|
|
485
|
+
const output = {
|
|
486
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
487
|
+
outcome: 'refused',
|
|
488
|
+
dryRun: true,
|
|
489
|
+
runId: result.runId,
|
|
490
|
+
reason: result.reason,
|
|
491
|
+
nextAction: result.nextAction,
|
|
492
|
+
...(result.statusWrite !== undefined ? { statusWrite: result.statusWrite } : {}),
|
|
493
|
+
};
|
|
494
|
+
console.log(JSON.stringify(output));
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
printHumanRefusal(result.reason, result.nextAction);
|
|
498
|
+
if (result.statusWrite !== undefined && !result.statusWrite.ok) {
|
|
499
|
+
console.error(` status write FAILED: ${result.statusWrite.reason}`);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
process.exitCode = 1;
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
if (result.outcome === 'already_running') {
|
|
506
|
+
if (args.json) {
|
|
507
|
+
const output = {
|
|
508
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
509
|
+
outcome: 'already_running',
|
|
510
|
+
dryRun: true,
|
|
511
|
+
runId: result.runId,
|
|
512
|
+
reason: result.reason,
|
|
513
|
+
nextAction: result.nextAction,
|
|
514
|
+
};
|
|
515
|
+
console.log(JSON.stringify(output));
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
console.log(`pd service run-once: already running (lock held).`);
|
|
519
|
+
console.log(` holder: ${result.holderBodyHash}`);
|
|
520
|
+
console.log(` next: ${result.nextAction}`);
|
|
521
|
+
}
|
|
522
|
+
// Mutual exclusion worked as designed — a normal outcome (AC-08), not an error.
|
|
523
|
+
process.exitCode = 0;
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
if (args.json) {
|
|
527
|
+
const output = {
|
|
528
|
+
schemaVersion: 'pd.service-run-status.v1',
|
|
529
|
+
outcome: 'completed',
|
|
530
|
+
dryRun: true,
|
|
531
|
+
runId: result.runId,
|
|
532
|
+
installation: result.status.installation,
|
|
533
|
+
environmentIsolation: result.status.environmentIsolation,
|
|
534
|
+
manifest: result.manifest,
|
|
535
|
+
activeRelease: result.activeRelease,
|
|
536
|
+
discovery: {
|
|
537
|
+
discoveredTotal: result.discovery.discoveredTotal,
|
|
538
|
+
counts: result.discovery.counts,
|
|
539
|
+
hostRoots: result.status.discovery.hostRoots,
|
|
540
|
+
incomplete: result.status.discovery.incomplete,
|
|
541
|
+
},
|
|
542
|
+
workspaces: result.discovery.workspaces,
|
|
543
|
+
statusWrite: result.statusWrite,
|
|
544
|
+
nextAction: result.status.nextAction,
|
|
545
|
+
...(result.statusWrite.ok ? { statusPath: result.statusWrite.path } : {}),
|
|
546
|
+
};
|
|
547
|
+
console.log(JSON.stringify(output, null, 2));
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
printHumanCompleted(result);
|
|
551
|
+
}
|
|
552
|
+
// P2-3: a completed run whose operational status could NOT be persisted
|
|
553
|
+
// failed its real contract — the exit code must be non-zero, and the JSON
|
|
554
|
+
// above already carries both the real outcome and the write failure
|
|
555
|
+
// reason. No fake statusPath is emitted (the field is absent).
|
|
556
|
+
process.exitCode = result.statusWrite.ok ? 0 : 1;
|
|
557
|
+
}
|
|
558
|
+
//# sourceMappingURL=service-run-once.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-run-once.js","sourceRoot":"","sources":["../../src/commands/service-run-once.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBA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E;gBACT,eAAe,EAAE,MAAM,CAAC,SAAS,CAAC,eAAe;gBACjD,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,MAAM;gBAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS;gBAC5C,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU;aAC/C;YACD,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,UAAU;YACvC,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU;YACpC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1E,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACN,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IACD,wEAAwE;IACxE,0EAA0E;IAC1E,oEAAoE;IACpE,+DAA+D;IAC/D,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workbuddy-setup.d.ts","sourceRoot":"","sources":["../../src/commands/workbuddy-setup.ts"],"names":[],"mappings":"AA4BA,OAAO,
|
|
1
|
+
{"version":3,"file":"workbuddy-setup.d.ts","sourceRoot":"","sources":["../../src/commands/workbuddy-setup.ts"],"names":[],"mappings":"AA4BA,OAAO,EAOL,KAAK,iCAAiC,EACvC,MAAM,0BAA0B,CAAC;AAGlC,eAAO,MAAM,sCAAsC,kBAAkB,CAAC;AAItE,MAAM,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AAe,CA0HjJ;AAWD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsLxF"}
|
|
@@ -26,7 +26,7 @@ import * as fs from 'node:fs';
|
|
|
26
26
|
import * as path from 'node:path';
|
|
27
27
|
import { resolvePdHome } from '@principles/install-layout';
|
|
28
28
|
import { resolveWorkspaceDir } from '../resolve-workspace.js';
|
|
29
|
-
import { deriveConversationIngestionConsentState, getPdConfigPath, loadPdConfigForPlugin, readConversationIngestionConsent, recordConversationIngestionConsent, } from '@principles/host-runtime';
|
|
29
|
+
import { deriveConversationIngestionConsentState, getPdConfigPath, loadPdConfigForPlugin, readConversationIngestionConsent, recordConversationIngestionConsent, runSourceRevocationSweep, } from '@principles/host-runtime';
|
|
30
30
|
import { computeEffectivePdConfig, computeFeatureFlagsFromConfig, isFeatureEnabled } from '@principles/core/runtime';
|
|
31
31
|
export const WORKBUDDY_INGESTION_DISCLOSURE_VERSION = 'wb-2026-11-11';
|
|
32
32
|
const FLAG_ID = 'workbuddy_conversation_ingestion';
|
|
@@ -372,12 +372,32 @@ export async function handleWorkbuddySetup(options) {
|
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
374
|
const stateAfter = deriveConversationIngestionConsentState(recorded.record, targetFlag);
|
|
375
|
+
// PRI-1283 R3: revocation triggers the immediate excerpt sweep. The decline
|
|
376
|
+
// decision itself is already durable; a sweep that cannot complete is a
|
|
377
|
+
// loud, retryable warning ('pd consent sweep-revoked --apply').
|
|
378
|
+
const warnings = decision === 'granted' && !hostEnabled
|
|
379
|
+
? ['host.workbuddy is off: no transcript will be read until the host master switch is enabled.']
|
|
380
|
+
: [];
|
|
381
|
+
if (decision === 'revoked') {
|
|
382
|
+
try {
|
|
383
|
+
const sweep = await runSourceRevocationSweep({ workspaceDir: workspace, apply: true });
|
|
384
|
+
if (sweep.outcome === 'partial') {
|
|
385
|
+
warnings.push(`source-revocation sweep partial: ${sweep.hosts.map((h) => `${h.hostKind}:${h.failures.length} failures`).join('; ')} — rerun 'pd consent sweep-revoked --apply'`);
|
|
386
|
+
}
|
|
387
|
+
else if (sweep.outcome === 'failed') {
|
|
388
|
+
warnings.push(`source-revocation sweep failed: ${sweep.reason} — rerun 'pd consent sweep-revoked --apply'`);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
catch (error) {
|
|
392
|
+
warnings.push(`source-revocation sweep error: ${error instanceof Error ? error.message.slice(0, 160) : String(error).slice(0, 160)} — rerun 'pd consent sweep-revoked --apply'`);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
375
395
|
finish({
|
|
376
396
|
generatedAt, host: 'workbuddy', workspace, status: 'ok', decision,
|
|
377
397
|
consentStateBefore: stateBefore, consentState: stateAfter,
|
|
378
398
|
disclosureVersion: WORKBUDDY_INGESTION_DISCLOSURE_VERSION,
|
|
379
399
|
ingestionFlag: { name: FLAG_ID, enabled: targetFlag }, hostWorkbuddyFlagEnabled: hostEnabled,
|
|
380
|
-
warnings
|
|
400
|
+
warnings,
|
|
381
401
|
});
|
|
382
402
|
}
|
|
383
403
|
//# sourceMappingURL=workbuddy-setup.js.map
|