@principles/pd-cli 1.147.6 → 1.147.8

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.
@@ -0,0 +1,12 @@
1
+ interface CodexIngestQuarantineOptions {
2
+ workspace?: string;
3
+ rollout?: string;
4
+ record?: string;
5
+ reason?: string;
6
+ operator?: string;
7
+ confirm?: boolean;
8
+ json?: boolean;
9
+ }
10
+ export declare function handleCodexIngestQuarantine(options: CodexIngestQuarantineOptions): Promise<void>;
11
+ export {};
12
+ //# sourceMappingURL=codex-ingest-quarantine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-ingest-quarantine.d.ts","sourceRoot":"","sources":["../../src/commands/codex-ingest-quarantine.ts"],"names":[],"mappings":"AAuBA,UAAU,4BAA4B;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAUD,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAqFtG"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * pd codex ingest quarantine — audited recovery for permanently invalid
3
+ * governance observations (Codex Governance Closure Slice D, PRI-625;
4
+ * SPEC rev 2 §15).
5
+ *
6
+ * Contract (§15 verbatim requirements):
7
+ * - dry run by DEFAULT; `--confirm` is required to actually quarantine;
8
+ * - the quarantine record captures digest, reason, operator, timestamp, and
9
+ * the neighbor gap;
10
+ * - the Codex transcript is NEVER edited or read (only the workspace
11
+ * trajectory.db opens — asserted by the store tests via a port spy);
12
+ * - promoted (Owner-decided) evidence is refused;
13
+ * - --json emits exactly one documented object; failed validation mutates
14
+ * nothing.
15
+ *
16
+ * CLI gate compliance: cli-1 (single JSON object), cli-2 (exit paths stop),
17
+ * cli-5 (failed validation performs no mutation), cli-6 (reason + nextAction
18
+ * on every refusal).
19
+ */
20
+ import * as os from 'os';
21
+ import { quarantineGovernanceObservation } from '@principles/host-runtime';
22
+ import { resolveWorkspaceDir } from '../resolve-workspace.js';
23
+ function defaultOperator() {
24
+ try {
25
+ return os.userInfo().username.slice(0, 40) || 'unknown';
26
+ }
27
+ catch {
28
+ return 'unknown';
29
+ }
30
+ }
31
+ export async function handleCodexIngestQuarantine(options) {
32
+ const generatedAt = new Date().toISOString();
33
+ const refuse = (reason, nextAction) => {
34
+ const report = { generatedAt, host: 'codex', op: 'quarantine', status: 'refused', confirmed: options.confirm === true, reason, nextAction };
35
+ if (options.json) {
36
+ console.log(JSON.stringify(report));
37
+ }
38
+ else {
39
+ console.log('Codex observation quarantine');
40
+ console.log(` status: ${report.status}`);
41
+ console.log(` reason: ${reason}`);
42
+ console.log(` next action: ${nextAction}`);
43
+ }
44
+ process.exitCode = 1;
45
+ };
46
+ const rollout = typeof options.rollout === 'string' ? options.rollout.trim() : '';
47
+ if (rollout.length === 0) {
48
+ refuse('rollout_required', 'Pass --rollout <id> (the rollout identity whose record is invalid).');
49
+ return;
50
+ }
51
+ const recordRaw = typeof options.record === 'string' ? options.record.trim() : '';
52
+ const recordId = /^\d+$/.test(recordRaw) ? Number.parseInt(recordRaw, 10) : Number.NaN;
53
+ if (!Number.isInteger(recordId) || recordId <= 0) {
54
+ refuse('record_required', 'Pass --record <id> with the numeric governance_observations.id to quarantine.');
55
+ return;
56
+ }
57
+ const reason = typeof options.reason === 'string' ? options.reason.trim() : '';
58
+ if (reason.length === 0 || reason.length > 200) {
59
+ refuse('reason_required', 'Pass --reason "<why>" (1-200 chars) describing why the record is permanently invalid.');
60
+ return;
61
+ }
62
+ const operator = (typeof options.operator === 'string' && options.operator.trim().length > 0 ? options.operator.trim() : defaultOperator()).slice(0, 80);
63
+ // resolveWorkspaceDir throws when no workspace can be determined — wrap so
64
+ // --json still emits exactly one structured refusal (cli-1/cli-6).
65
+ let workspaceDir;
66
+ try {
67
+ workspaceDir = resolveWorkspaceDir(options.workspace);
68
+ }
69
+ catch (error) {
70
+ const message = error instanceof Error ? error.message.slice(0, 160) : String(error);
71
+ refuse('workspace_unresolved: ' + message, 'Run from inside a PD workspace or pass -w/--workspace <path> with an initialized .pd directory.');
72
+ return;
73
+ }
74
+ const result = quarantineGovernanceObservation({
75
+ workspaceDir,
76
+ hostKind: 'codex',
77
+ rolloutIdentity: rollout,
78
+ recordId,
79
+ reason,
80
+ operator,
81
+ confirm: options.confirm === true,
82
+ });
83
+ if (!result.ok) {
84
+ refuse(result.reason, result.nextAction);
85
+ return;
86
+ }
87
+ const report = {
88
+ generatedAt,
89
+ host: 'codex',
90
+ op: 'quarantine',
91
+ status: 'ok',
92
+ dryRun: result.dryRun,
93
+ alreadyQuarantined: result.alreadyQuarantined,
94
+ confirmed: options.confirm === true,
95
+ record: result.record,
96
+ ...(result.dryRun ? { nextAction: 'Dry run only — nothing was mutated. Re-run with --confirm to quarantine this record.' } : {}),
97
+ transcriptTouched: false,
98
+ };
99
+ if (options.json) {
100
+ console.log(JSON.stringify(report));
101
+ }
102
+ else {
103
+ console.log('Codex observation quarantine');
104
+ console.log(` status: ${result.dryRun ? 'dry-run' : 'quarantined'}`);
105
+ if (result.alreadyQuarantined)
106
+ console.log(' note: record was already quarantined (idempotent)');
107
+ console.log(` record id: ${result.record.id} (${result.record.kind}, ${result.record.retentionClass})`);
108
+ console.log(` logical key: ${result.record.logicalKey}`);
109
+ console.log(` observed at: ${result.record.observedAt}`);
110
+ console.log(` digest: ${result.record.digest}`);
111
+ console.log(` gap: ${result.record.gap}`);
112
+ if (result.dryRun)
113
+ console.log(' next action: Dry run only — nothing was mutated. Re-run with --confirm to quarantine this record.');
114
+ }
115
+ }
116
+ //# sourceMappingURL=codex-ingest-quarantine.js.map
@@ -0,0 +1 @@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CodexIngestionConsentDecision, type CodexIngestionConsentState } from '@principles/host-runtime';
2
+ export interface CodexSetupOptions {
3
+ workspace?: string;
4
+ json?: boolean;
5
+ lang?: string;
6
+ accept?: boolean;
7
+ decline?: boolean;
8
+ showDisclosure?: boolean;
9
+ }
10
+ export interface CodexSetupReport {
11
+ generatedAt: string;
12
+ host: 'codex';
13
+ workspace: string;
14
+ status: 'ok' | 'degraded';
15
+ decision?: CodexIngestionConsentDecision;
16
+ consentStateBefore: CodexIngestionConsentState;
17
+ consentState: CodexIngestionConsentState;
18
+ disclosureVersion: string;
19
+ ingestionFlag: {
20
+ name: 'codex_conversation_ingestion';
21
+ enabled: boolean;
22
+ source: string;
23
+ };
24
+ hostCodexFlagEnabled: boolean;
25
+ warnings: string[];
26
+ reason?: string;
27
+ nextAction?: string;
28
+ }
29
+ type FlagWriteResult = {
30
+ ok: true;
31
+ enabled: boolean;
32
+ } | {
33
+ ok: false;
34
+ reason: string;
35
+ nextAction: string;
36
+ };
37
+ /**
38
+ * Enable/disable `features.codex_conversation_ingestion.enabled` in the
39
+ * workspace config.yaml with a line-targeted edit that preserves all other
40
+ * content (comments included). Atomic write; round-trip verified with the
41
+ * production loader, restored on any mismatch.
42
+ */
43
+ export declare function setCodexConversationIngestionFlag(workspaceDir: string, enabled: boolean): FlagWriteResult;
44
+ export declare function handleCodexSetup(options: CodexSetupOptions): Promise<void>;
45
+ export {};
46
+ //# sourceMappingURL=codex-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-setup.d.ts","sourceRoot":"","sources":["../../src/commands/codex-setup.ts"],"names":[],"mappings":"AAoCA,OAAO,EAQL,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAEhC,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,GAAG,UAAU,CAAC;IAC1B,QAAQ,CAAC,EAAE,6BAA6B,CAAC;IACzC,kBAAkB,EAAE,0BAA0B,CAAC;IAC/C,YAAY,EAAE,0BAA0B,CAAC;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE;QAAE,IAAI,EAAE,8BAA8B,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1F,oBAAoB,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID,KAAK,eAAe,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAuB1G;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe,CAyIzG;AA2BD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6MhF"}
@@ -0,0 +1,423 @@
1
+ /**
2
+ * pd codex setup — consent UX for Codex conversation ingestion (Codex
3
+ * Governance Closure Slice D, PRI-625; SPEC rev 2 §17; G2A frozen disclosure).
4
+ *
5
+ * The ONE authority for enabling `codex_conversation_ingestion`: presents the
6
+ * G2A-frozen disclosure text verbatim (Chinese SSoT; optional English
7
+ * rendering) and records the Owner's explicit decision BEFORE the flag is
8
+ * flipped. Declining leaves the flag off, leaves every existing
9
+ * prompt/RuleHost/tool governance surface untouched, and never opens a
10
+ * transcript (this command performs no Codex-home I/O at all). Upgrade paths
11
+ * never call this command, so upgrading can never enable ingestion.
12
+ *
13
+ * Modes:
14
+ * - default: print disclosure, then interactive prompt (TTY) for an explicit
15
+ * yes/no; EOF/abort mutates nothing and records nothing.
16
+ * - --accept / --decline: non-interactive explicit decision (the plugin's
17
+ * $pd-setup presents the disclosure itself, then calls one of these).
18
+ * - --show-disclosure: print the frozen text for the requested language and
19
+ * exit; no mutation, no record.
20
+ *
21
+ * Config writes are line-targeted edits of .pd/config.yaml (comments
22
+ * preserved), atomic, and round-trip verified: if the rewritten config does
23
+ * not validate with the flag at the intended value, the previous content is
24
+ * restored and the failure is loud — a half-consented state is impossible.
25
+ *
26
+ * CLI gate compliance:
27
+ * - cli-1: --json outputs exactly one parseable JSON object on stdout.
28
+ * - cli-2: exit paths stop execution.
29
+ * - cli-4: --accept and --decline are mutually exclusive.
30
+ * - cli-5: refused/failed runs mutate nothing (consent + flag both untouched).
31
+ * - cli-6: every refusal/degradation carries reason + nextAction.
32
+ */
33
+ import * as fs from 'node:fs';
34
+ import * as path from 'node:path';
35
+ import * as readline from 'node:readline/promises';
36
+ import { resolveWorkspaceDir } from '../resolve-workspace.js';
37
+ import { CODEX_INGESTION_DISCLOSURE_VERSION, getCodexIngestionDisclosureText, deriveCodexIngestionConsentState, getPdConfigPath, loadPdConfigForPlugin, readCodexIngestionConsent, recordCodexIngestionConsent, } from '@principles/host-runtime';
38
+ import { computeEffectivePdConfig, computeFeatureFlagsFromConfig, isFeatureEnabled } from '@principles/core/runtime-v2';
39
+ const FEATURES_LINE = /^features:\s*(?:#.*)?$/;
40
+ const INGESTION_KEY_LINE = /^ {2}codex_conversation_ingestion:\s*(?:#.*)?$/;
41
+ const INGESTION_ENABLED_LINE = /^ {4}enabled:\s*(?:true|false)\s*(?:#.*)?$/;
42
+ function stripYamlComment(line) {
43
+ const hash = line.indexOf('#');
44
+ return (hash === -1 ? line : line.slice(0, hash)).trim();
45
+ }
46
+ function isEmptyFeaturesMapping(line) {
47
+ // Matches `features: {}` (with optional YAML comment) without a regex
48
+ // literal over brace syntax.
49
+ return stripYamlComment(line).replace(/\s+/g, '') === 'features:' + String.fromCharCode(123, 125);
50
+ }
51
+ function trailingComment(line) {
52
+ // ' #' starts a plain-scalar YAML comment on these simple enabled lines.
53
+ const hash = line.indexOf(' #');
54
+ return hash === -1 ? '' : ' ' + line.slice(hash + 1);
55
+ }
56
+ /**
57
+ * Enable/disable `features.codex_conversation_ingestion.enabled` in the
58
+ * workspace config.yaml with a line-targeted edit that preserves all other
59
+ * content (comments included). Atomic write; round-trip verified with the
60
+ * production loader, restored on any mismatch.
61
+ */
62
+ export function setCodexConversationIngestionFlag(workspaceDir, enabled) {
63
+ const configPath = getPdConfigPath(workspaceDir);
64
+ let raw;
65
+ try {
66
+ raw = fs.readFileSync(configPath, 'utf8');
67
+ }
68
+ catch (error) {
69
+ const code = typeof error === 'object' && error !== null && Object.hasOwn(error, 'code')
70
+ ? String(error.code)
71
+ : String(error);
72
+ return {
73
+ ok: false,
74
+ reason: 'config_unreadable: ' + code,
75
+ nextAction: 'Run `pd runtime init --confirm` in this workspace to create .pd/config.yaml, then re-run `pd codex setup`.',
76
+ };
77
+ }
78
+ const lineEnding = raw.includes('\r\n') ? '\r\n' : '\n';
79
+ const lines = raw.replace(/\r\n/g, '\n').split('\n');
80
+ // Every feature override requires category+enabled (validatePdConfig), so
81
+ // inserted blocks carry the registry's current category for this flag.
82
+ const registryCategory = computeFeatureFlagsFromConfig(computeEffectivePdConfig(null)).flags.codex_conversation_ingestion?.category ?? 'quiet';
83
+ // A bare `features:` line and an inline empty mapping both count as the
84
+ // features section; anything else is a mapping with entries.
85
+ const featuresIndex = lines.findIndex((line) => FEATURES_LINE.test(line) || isEmptyFeaturesMapping(line));
86
+ const blockLines = [
87
+ ' codex_conversation_ingestion:',
88
+ ' category: ' + registryCategory,
89
+ ' enabled: ' + String(enabled),
90
+ ];
91
+ let mutated = false;
92
+ if (featuresIndex === -1) {
93
+ // Unreachable behind the workspace_config gate (validatePdConfig requires
94
+ // a features section); refuse loudly instead of inventing one (cli-5).
95
+ return {
96
+ ok: false,
97
+ reason: 'config_features_section_missing',
98
+ nextAction: 'Add a features section to ' + configPath + ' and re-run `pd codex setup`; config.yaml was left unchanged.',
99
+ };
100
+ }
101
+ const featuresLine = lines[featuresIndex];
102
+ if (featuresLine === undefined) {
103
+ return { ok: false, reason: 'config_features_line_undefined', nextAction: 'config.yaml was left unchanged; re-run `pd codex setup`.' };
104
+ }
105
+ if (isEmptyFeaturesMapping(featuresLine)) {
106
+ // The inline empty mapping IS the features key — keep the parent key and
107
+ // expand its children in place.
108
+ lines.splice(featuresIndex, 1, 'features:', ...blockLines);
109
+ mutated = true;
110
+ }
111
+ else {
112
+ // Find the ingestion key's block under features: (2-space indent) and the
113
+ // end of that block (next 2-space-indented key or next top-level key).
114
+ let keyIndex = -1;
115
+ let blockEnd = lines.length;
116
+ for (let i = featuresIndex + 1; i < lines.length; i += 1) {
117
+ const line = lines[i];
118
+ if (line === undefined || line.trim() === '')
119
+ continue;
120
+ if (INGESTION_KEY_LINE.test(line)) {
121
+ keyIndex = i;
122
+ continue;
123
+ }
124
+ if (keyIndex !== -1 && /^( {0,1}\S| {2}\S)/.test(line)) {
125
+ blockEnd = i;
126
+ break;
127
+ }
128
+ }
129
+ if (keyIndex === -1) {
130
+ lines.splice(featuresIndex + 1, 0, ...blockLines);
131
+ mutated = true;
132
+ }
133
+ else {
134
+ // enabled-line search: found → rewrite (or keep); NOT found → insert.
135
+ // `enabledFound` is tracked separately from `mutated` so an existing
136
+ // line that already carries the target value does NOT trigger a
137
+ // second insertion (duplicate-key bug, review round 3).
138
+ let enabledFound = false;
139
+ for (let i = keyIndex + 1; i < blockEnd; i += 1) {
140
+ const current = lines[i];
141
+ if (current === undefined || !INGESTION_ENABLED_LINE.test(current))
142
+ continue;
143
+ enabledFound = true;
144
+ const next = ' enabled: ' + String(enabled) + trailingComment(current);
145
+ if (current !== next) {
146
+ lines[i] = next;
147
+ mutated = true;
148
+ }
149
+ break;
150
+ }
151
+ if (!enabledFound) {
152
+ // Key exists but no enabled line inside its block — add it as the
153
+ // first entry of the block so the mapping is not folded into a sibling.
154
+ lines.splice(keyIndex + 1, 0, ' enabled: ' + String(enabled));
155
+ mutated = true;
156
+ }
157
+ }
158
+ }
159
+ if (!mutated) {
160
+ return { ok: true, enabled };
161
+ }
162
+ const nextContent = lines.join(lineEnding);
163
+ const tmpPath = configPath + '.tmp-setup-' + String(process.pid) + '-' + String(Date.now());
164
+ try {
165
+ fs.mkdirSync(path.dirname(configPath), { recursive: true });
166
+ fs.writeFileSync(tmpPath, nextContent, { encoding: 'utf8' });
167
+ fs.renameSync(tmpPath, configPath);
168
+ }
169
+ catch (error) {
170
+ const message = error instanceof Error ? error.message : String(error);
171
+ try {
172
+ fs.rmSync(tmpPath, { force: true });
173
+ }
174
+ catch {
175
+ // best-effort cleanup; the failure below is the loud signal
176
+ }
177
+ return {
178
+ ok: false,
179
+ reason: 'config_write_failed: ' + message.slice(0, 160),
180
+ nextAction: 'Check permissions on ' + path.dirname(configPath) + '; config.yaml was left unchanged.',
181
+ };
182
+ }
183
+ // Round-trip: the production loader must validate the rewrite AND report
184
+ // the flag at the intended value. Anything else → restore, fail loud.
185
+ const verification = loadPdConfigForPlugin(workspaceDir);
186
+ const verifiedEnabled = verification.ok
187
+ ? isFeatureEnabled(computeFeatureFlagsFromConfig(verification.effective), 'codex_conversation_ingestion')
188
+ : undefined;
189
+ if (!verification.ok || verifiedEnabled !== enabled) {
190
+ try {
191
+ fs.writeFileSync(configPath, raw, { encoding: 'utf8' });
192
+ }
193
+ catch {
194
+ // restoration failure must not mask the primary failure
195
+ }
196
+ return {
197
+ ok: false,
198
+ reason: verification.ok ? 'config_roundtrip_mismatch' : 'config_roundtrip_invalid: ' + (verification.errors[0]?.reason ?? 'unknown'),
199
+ nextAction: 'config.yaml was restored to its previous content. Fix the features block manually in ' + configPath + ' and re-run `pd codex setup`.',
200
+ };
201
+ }
202
+ return { ok: true, enabled };
203
+ }
204
+ // ── Interactive decision ─────────────────────────────────────────────────────
205
+ async function promptExplicitDecision(disclosure) {
206
+ process.stdout.write(disclosure);
207
+ process.stdout.write('\n按上述说明做出选择(y = 开启对话观察并写入治理闭环 / n = 拒绝,保持关闭)。\n' +
208
+ 'Make your choice per the disclosure above (y = enable / n = decline, keep off):\n> ');
209
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
210
+ try {
211
+ const answer = (await rl.question('')).trim().toLowerCase();
212
+ if (answer === 'y' || answer === 'yes')
213
+ return 'granted';
214
+ if (answer === 'n' || answer === 'no')
215
+ return 'declined';
216
+ return 'aborted';
217
+ }
218
+ finally {
219
+ rl.close();
220
+ }
221
+ }
222
+ // ── Command handler ──────────────────────────────────────────────────────────
223
+ function languageFrom(lang) {
224
+ return lang === 'en' ? 'en' : 'zh';
225
+ }
226
+ export async function handleCodexSetup(options) {
227
+ const generatedAt = new Date().toISOString();
228
+ if (options.showDisclosure) {
229
+ process.stdout.write(getCodexIngestionDisclosureText(languageFrom(options.lang)));
230
+ process.stdout.write('\n');
231
+ return;
232
+ }
233
+ const workspace = resolveWorkspaceDir(options.workspace);
234
+ const warnings = [];
235
+ const finish = (report) => {
236
+ if (options.json) {
237
+ // cli-1: exactly one parseable JSON object on stdout.
238
+ console.log(JSON.stringify(report));
239
+ }
240
+ else {
241
+ const lines = [
242
+ 'Codex conversation-ingestion setup (' + report.workspace + ')',
243
+ ' status: ' + report.status,
244
+ ' disclosureVersion: ' + report.disclosureVersion,
245
+ ' consent (before): ' + report.consentStateBefore,
246
+ ' consent (now): ' + report.consentState,
247
+ ' ingestion flag: ' + String(report.ingestionFlag.enabled) + ' (source: ' + report.ingestionFlag.source + ')',
248
+ ' host.codex flag: ' + String(report.hostCodexFlagEnabled),
249
+ ];
250
+ for (const warning of report.warnings)
251
+ lines.push(' warning: ' + warning);
252
+ if (report.reason !== undefined)
253
+ lines.push(' reason: ' + report.reason);
254
+ if (report.nextAction !== undefined)
255
+ lines.push(' next action: ' + report.nextAction);
256
+ console.log(lines.join('\n'));
257
+ }
258
+ if (report.status === 'degraded')
259
+ process.exitCode = 1;
260
+ };
261
+ const refuse = (reason, nextAction, consentStateBefore = 'not_present') => {
262
+ finish({
263
+ generatedAt, host: 'codex', workspace, status: 'degraded',
264
+ consentStateBefore, consentState: consentStateBefore, disclosureVersion: CODEX_INGESTION_DISCLOSURE_VERSION,
265
+ ingestionFlag: { name: 'codex_conversation_ingestion', enabled: false, source: 'unknown' },
266
+ hostCodexFlagEnabled: false, warnings, reason, nextAction,
267
+ });
268
+ };
269
+ // cli-4: explicit mutual exclusion.
270
+ if (options.accept && options.decline) {
271
+ refuse('accept_decline_mutex', 'Pass either --accept or --decline, not both.');
272
+ return;
273
+ }
274
+ // Workspace must exist as a PD workspace (config present) before anything
275
+ // can be consented or mutated (cli-5).
276
+ const configPath = getPdConfigPath(workspace);
277
+ if (!fs.existsSync(configPath)) {
278
+ refuse('workspace_config_not_found', 'No .pd/config.yaml at ' + workspace + '. Run `pd runtime init --confirm` first, then re-run `pd codex setup`.');
279
+ return;
280
+ }
281
+ const configLoad = loadPdConfigForPlugin(workspace);
282
+ if (!configLoad.ok) {
283
+ refuse('workspace_config_malformed: ' + (configLoad.errors[0]?.reason ?? 'unknown'), 'Fix .pd/config.yaml first (' + (configLoad.errors[0]?.nextAction ?? 'fix YAML syntax') + '); PD will not consent or mutate a config it cannot validate.');
284
+ return;
285
+ }
286
+ const flags = computeFeatureFlagsFromConfig(configLoad.effective);
287
+ const ingestionEnabledBefore = isFeatureEnabled(flags, 'codex_conversation_ingestion');
288
+ const hostCodexEnabled = isFeatureEnabled(flags, 'host.codex');
289
+ const flagSource = configLoad.source;
290
+ const consentRead = readCodexIngestionConsent(workspace);
291
+ if (!consentRead.ok) {
292
+ refuse(consentRead.reason, consentRead.nextAction);
293
+ return;
294
+ }
295
+ const consentStateBefore = deriveCodexIngestionConsentState(consentRead.record, ingestionEnabledBefore);
296
+ // Resolve the decision.
297
+ let decision;
298
+ if (options.accept)
299
+ decision = 'granted';
300
+ else if (options.decline)
301
+ decision = 'declined';
302
+ else if (options.json) {
303
+ refuse('decision_required', 'Machine mode must state the decision explicitly: re-run with --accept or --decline (use --show-disclosure to print the frozen text for presentation first).');
304
+ return;
305
+ }
306
+ else if (process.stdin.isTTY) {
307
+ decision = await promptExplicitDecision(getCodexIngestionDisclosureText(languageFrom(options.lang)) + '\n');
308
+ if (decision === 'aborted') {
309
+ refuse('decision_aborted', 'Nothing was changed or recorded. Re-run `pd codex setup` to see the disclosure again.');
310
+ return;
311
+ }
312
+ }
313
+ else {
314
+ refuse('decision_required', 'No TTY available for the interactive prompt. Present the disclosure (`pd codex setup --show-disclosure`), then re-run with --accept or --decline.');
315
+ return;
316
+ }
317
+ // Consent state machine (review round 2): the record must always explain
318
+ // the flag. `granted` is NEVER recorded before the runtime activation has
319
+ // actually succeeded.
320
+ //
321
+ // ACCEPT: record 'pending' → enable flag → 'granted' on success, 'failed'
322
+ // (with the activation reason) on failure.
323
+ // DECLINE: force the flag OFF first → 'revoked' after the flag is off;
324
+ // if the flag-off write fails → 'failed' (a revoked record beside a live
325
+ // flag would be unexplainable). If the flag was already off, decline is a
326
+ // pure record write.
327
+ const recordConsent = (decisionState, failureReason) => recordCodexIngestionConsent(workspace, {
328
+ decision: decisionState,
329
+ decidedVia: 'pd_codex_setup',
330
+ ...(failureReason !== undefined ? { failureReason } : {}),
331
+ });
332
+ if (decision === 'declined') {
333
+ let flagResult = { ok: true, enabled: ingestionEnabledBefore };
334
+ if (ingestionEnabledBefore) {
335
+ flagResult = setCodexConversationIngestionFlag(workspace, false);
336
+ }
337
+ if (!flagResult.ok) {
338
+ const failed = recordConsent('failed', 'decline could not disable the ingestion flag: ' + flagResult.reason);
339
+ finish({
340
+ generatedAt, host: 'codex', workspace, status: 'degraded',
341
+ decision: 'failed', consentStateBefore,
342
+ consentState: failed.ok ? 'failed' : consentStateBefore,
343
+ disclosureVersion: CODEX_INGESTION_DISCLOSURE_VERSION,
344
+ ingestionFlag: { name: 'codex_conversation_ingestion', enabled: true, source: flagSource },
345
+ hostCodexFlagEnabled: hostCodexEnabled, warnings,
346
+ reason: flagResult.reason, nextAction: flagResult.nextAction,
347
+ });
348
+ return;
349
+ }
350
+ const revoked = recordConsent('revoked');
351
+ if (!revoked.ok) {
352
+ refuse(revoked.reason, revoked.nextAction, consentStateBefore);
353
+ return;
354
+ }
355
+ finish({
356
+ generatedAt, host: 'codex', workspace, status: 'ok',
357
+ decision: 'revoked',
358
+ consentStateBefore,
359
+ consentState: deriveCodexIngestionConsentState(revoked.record, false),
360
+ disclosureVersion: revoked.record.disclosureVersion,
361
+ ingestionFlag: { name: 'codex_conversation_ingestion', enabled: false, source: flagSource },
362
+ hostCodexFlagEnabled: hostCodexEnabled,
363
+ warnings,
364
+ nextAction: 'Ingestion stays off; prompt injection, RuleHost, and tool governance are unchanged. No transcript was or will be read.',
365
+ });
366
+ return;
367
+ }
368
+ // ACCEPT flow.
369
+ const pending = recordConsent('pending');
370
+ if (!pending.ok) {
371
+ refuse(pending.reason, pending.nextAction, consentStateBefore);
372
+ return;
373
+ }
374
+ let flagResult = { ok: true, enabled: ingestionEnabledBefore };
375
+ if (!ingestionEnabledBefore) {
376
+ flagResult = setCodexConversationIngestionFlag(workspace, true);
377
+ }
378
+ if (!flagResult.ok) {
379
+ // Activation failed: consent must NOT be granted. Record the explained
380
+ // failure and report degraded — flag stays off, state stays interpretable.
381
+ const failed = recordConsent('failed', 'flag activation failed: ' + flagResult.reason);
382
+ finish({
383
+ generatedAt, host: 'codex', workspace, status: 'degraded',
384
+ decision: 'failed', consentStateBefore,
385
+ consentState: failed.ok ? 'failed' : 'pending',
386
+ disclosureVersion: CODEX_INGESTION_DISCLOSURE_VERSION,
387
+ ingestionFlag: { name: 'codex_conversation_ingestion', enabled: false, source: flagSource },
388
+ hostCodexFlagEnabled: hostCodexEnabled, warnings,
389
+ reason: flagResult.reason, nextAction: flagResult.nextAction,
390
+ });
391
+ return;
392
+ }
393
+ const granted = recordConsent('granted');
394
+ if (!granted.ok) {
395
+ // The flag IS enabled but the terminal write failed — this is exactly the
396
+ // 'pending + flag on' state: explainable, and health blocks on it.
397
+ finish({
398
+ generatedAt, host: 'codex', workspace, status: 'degraded',
399
+ decision: 'pending', consentStateBefore,
400
+ consentState: 'pending',
401
+ disclosureVersion: CODEX_INGESTION_DISCLOSURE_VERSION,
402
+ ingestionFlag: { name: 'codex_conversation_ingestion', enabled: true, source: flagSource },
403
+ hostCodexFlagEnabled: hostCodexEnabled, warnings,
404
+ reason: granted.reason, nextAction: granted.nextAction,
405
+ });
406
+ return;
407
+ }
408
+ const nextWarnings = [...warnings];
409
+ if (!hostCodexEnabled) {
410
+ nextWarnings.push('host.codex is disabled — ingestion stays inactive until features.host.codex.enabled=true; enable it explicitly if this workspace should run Codex governance at all.');
411
+ }
412
+ finish({
413
+ generatedAt, host: 'codex', workspace, status: 'ok',
414
+ decision: 'granted',
415
+ consentStateBefore,
416
+ consentState: deriveCodexIngestionConsentState(granted.record, true),
417
+ disclosureVersion: granted.record.disclosureVersion,
418
+ ingestionFlag: { name: 'codex_conversation_ingestion', enabled: true, source: flagSource },
419
+ hostCodexFlagEnabled: hostCodexEnabled,
420
+ warnings: nextWarnings,
421
+ });
422
+ }
423
+ //# sourceMappingURL=codex-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-setup.js","sourceRoot":"","sources":["../../src/commands/codex-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK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QACnD,aAAa,EAAE,EAAE,IAAI,EAAE,8BAA8B,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE;QAC1F,oBAAoB,EAAE,gBAAgB;QACtC,QAAQ,EAAE,YAAY;KACvB,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"health-codex.d.ts","sourceRoot":"","sources":["../../src/commands/health-codex.ts"],"names":[],"mappings":"AAsBA,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AA2GD,wBAAsB,iBAAiB,CAAC,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoHpF"}
1
+ {"version":3,"file":"health-codex.d.ts","sourceRoot":"","sources":["../../src/commands/health-codex.ts"],"names":[],"mappings":"AAqDA,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AA0OD,wBAAsB,iBAAiB,CAAC,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6RpF"}