create-principles-disciple 1.152.3 → 1.152.4
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/_release/product-identity.json +1 -1
- package/console/dist/server/config/pd-config-store.js +9 -3
- package/console/dist/server/index.js +5 -1
- package/console/dist/server/models/AdaptiveActivationConsoleModel.js +3 -1
- package/console/dist/server/models/ApprovalsConsoleModel.d.ts +6 -0
- package/console/dist/server/models/ApprovalsConsoleModel.js +3 -0
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.d.ts +21 -1
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +28 -2
- package/console/dist/server/models/IntentDecisionModel.d.ts +6 -1
- package/console/dist/server/models/IntentDecisionModel.js +17 -9
- package/console/dist/server/routes/approvals.js +7 -0
- package/console/dist/server/routes/config.js +172 -0
- package/console/dist/server/routes/intent-decisions.js +19 -1
- package/console/dist/web/assets/app.css +65 -35
- package/console/dist/web/assets/app.js +32 -32
- package/core/dist/runtime/activation/activation-types.d.ts +6 -0
- package/core/dist/runtime/activation/activation-types.d.ts.map +1 -1
- package/core/dist/runtime/activation/activation-types.js.map +1 -1
- package/core/dist/runtime/activation/index.d.ts +2 -1
- package/core/dist/runtime/activation/index.d.ts.map +1 -1
- package/core/dist/runtime/activation/index.js +1 -1
- package/core/dist/runtime/activation/index.js.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.d.ts +8 -0
- package/core/dist/runtime/activation/ledger-identity.d.ts.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.js +20 -1
- package/core/dist/runtime/activation/ledger-identity.js.map +1 -1
- package/core/dist/runtime/activation/sqlite-approval-store.d.ts +18 -0
- package/core/dist/runtime/activation/sqlite-approval-store.d.ts.map +1 -1
- package/core/dist/runtime/activation/sqlite-approval-store.js +146 -20
- package/core/dist/runtime/activation/sqlite-approval-store.js.map +1 -1
- package/core/dist/runtime/adapter/artificer-l2-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/artificer-l2-adapter.js +11 -4
- package/core/dist/runtime/adapter/artificer-l2-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.js +11 -4
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-catalog.d.ts +42 -0
- package/core/dist/runtime/adapter/pi-ai-catalog.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-catalog.js +68 -0
- package/core/dist/runtime/adapter/pi-ai-catalog.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-connection-probe.d.ts +45 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.d.ts.map +1 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.js +321 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.js.map +1 -0
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts +18 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js +14 -7
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime/config/index.d.ts +2 -0
- package/core/dist/runtime/config/index.d.ts.map +1 -1
- package/core/dist/runtime/config/index.js +1 -0
- package/core/dist/runtime/config/index.js.map +1 -1
- package/core/dist/runtime/config/pd-config-redaction.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-redaction.js +4 -0
- package/core/dist/runtime/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime/config/pd-config-types.d.ts +5 -0
- package/core/dist/runtime/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime/config/pd-credentials.d.ts +105 -0
- package/core/dist/runtime/config/pd-credentials.d.ts.map +1 -0
- package/core/dist/runtime/config/pd-credentials.js +409 -0
- package/core/dist/runtime/config/pd-credentials.js.map +1 -0
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts +13 -2
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/diag-rootcause-output.js.map +1 -1
- package/core/dist/runtime/diagnostician-output.d.ts +1 -1
- package/core/dist/runtime/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-output.js +2 -2
- package/core/dist/runtime/diagnostician-output.js.map +1 -1
- package/core/dist/runtime/index.d.ts +5 -2
- package/core/dist/runtime/index.d.ts.map +1 -1
- package/core/dist/runtime/index.js +11 -1
- package/core/dist/runtime/index.js.map +1 -1
- package/core/dist/runtime/intent/index.d.ts +2 -0
- package/core/dist/runtime/intent/index.d.ts.map +1 -1
- package/core/dist/runtime/intent/index.js +2 -0
- package/core/dist/runtime/intent/index.js.map +1 -1
- package/core/dist/runtime/intent/intent-decision-record.d.ts +51 -3
- package/core/dist/runtime/intent/intent-decision-record.d.ts.map +1 -1
- package/core/dist/runtime/intent/intent-snapshot.d.ts +104 -0
- package/core/dist/runtime/intent/intent-snapshot.d.ts.map +1 -0
- package/core/dist/runtime/intent/intent-snapshot.js +164 -0
- package/core/dist/runtime/intent/intent-snapshot.js.map +1 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.d.ts +70 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.d.ts.map +1 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.js +148 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.js.map +1 -0
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts +41 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.js +189 -42
- package/core/dist/runtime/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.js +10 -0
- package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime/internalization/dreamer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/dreamer-prompt-builder.js +3 -0
- package/core/dist/runtime/internalization/dreamer-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/formation-context.d.ts +54 -0
- package/core/dist/runtime/internalization/formation-context.d.ts.map +1 -1
- package/core/dist/runtime/internalization/formation-context.js +135 -3
- package/core/dist/runtime/internalization/formation-context.js.map +1 -1
- package/core/dist/runtime/internalization/index.d.ts +2 -2
- package/core/dist/runtime/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime/internalization/index.js +1 -1
- package/core/dist/runtime/internalization/index.js.map +1 -1
- package/core/dist/runtime/internalization/intent-contract.d.ts +107 -0
- package/core/dist/runtime/internalization/intent-contract.d.ts.map +1 -1
- package/core/dist/runtime/internalization/intent-contract.js +315 -4
- package/core/dist/runtime/internalization/intent-contract.js.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts +8 -0
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts +22 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.js +22 -3
- package/core/dist/runtime/internalization/philosopher-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-runner.d.ts +15 -0
- package/core/dist/runtime/internalization/philosopher-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/philosopher-runner.js +73 -1
- package/core/dist/runtime/internalization/philosopher-runner.js.map +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.d.ts +32 -0
- package/core/dist/runtime/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.js +44 -0
- package/core/dist/runtime/internalization/pitask-metadata.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.d.ts +21 -0
- package/core/dist/runtime/internalization/scribe-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.js +125 -2
- package/core/dist/runtime/internalization/scribe-output.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts +26 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.js +33 -3
- package/core/dist/runtime/internalization/scribe-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.d.ts +32 -2
- package/core/dist/runtime/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.js +105 -7
- package/core/dist/runtime/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.d.ts +7 -0
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.js +7 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.js.map +1 -1
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.d.ts +2 -2
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.d.ts.map +1 -1
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.js +285 -35
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.js.map +1 -1
- package/core/dist/runtime/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime/store/sqlite-connection.js +38 -3
- package/core/dist/runtime/store/sqlite-connection.js.map +1 -1
- package/core/dist/telemetry-event.d.ts +2 -2
- package/core/dist/telemetry-event.d.ts.map +1 -1
- package/core/dist/telemetry-event.js +9 -0
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/package.json +1 -1
- package/dist/installers/codex-host-installer.d.ts.map +1 -1
- package/dist/installers/codex-host-installer.js +9 -12
- package/dist/installers/codex-host-installer.js.map +1 -1
- package/host-runtime/dist/adaptive-priority-provider.d.ts +1 -1
- package/host-runtime/dist/adaptive-priority-provider.js +4 -3
- package/host-runtime/dist/adaptive-selection.d.ts +1 -1
- package/host-runtime/dist/adaptive-selection.js +2 -1
- package/host-runtime/dist/signal-classifier.js +4 -4
- package/host-runtime/package.json +1 -1
- package/install-layout/dist/mcp-binding-contract.js +4 -15
- package/install-layout/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +6 -4
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +5 -5
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
- package/pd-cli/dist/commands/runtime.js +6 -6
- package/pd-cli/dist/commands/runtime.js.map +1 -1
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +5 -4
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +5 -5
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +521 -497
- package/release-manager/dist/installers/codex-host-installer.js +9 -12
- package/release-manager/package.json +1 -1
- package/dist/installers/mcp-binding-shape-mirror.d.ts +0 -27
- package/dist/installers/mcp-binding-shape-mirror.d.ts.map +0 -1
- package/dist/installers/mcp-binding-shape-mirror.js +0 -105
- package/dist/installers/mcp-binding-shape-mirror.js.map +0 -1
- package/release-manager/dist/installers/mcp-binding-shape-mirror.js +0 -105
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IntentSnapshot — the server-authored strategic basis captured at Stage A.
|
|
3
|
+
*
|
|
4
|
+
* SPEC-PD-STRATEGIC-INTENT-ANCHORING-001 v1.2 §6.2 / §6.3 and
|
|
5
|
+
* TECH-PD-STRATEGIC-INTENT-ANCHORING-001 v1.1 §3.3 / §3.4 / §3.5.
|
|
6
|
+
*
|
|
7
|
+
* Why this exists: `intentTension.intentDocHash` alone cannot reconstruct what
|
|
8
|
+
* the Owner actually said — the version store has no lookup by content hash and
|
|
9
|
+
* a direct edit of INTENT.md records no version at all. The snapshot therefore
|
|
10
|
+
* stores the bounded section TEXT of the document that was actually injected,
|
|
11
|
+
* with the server-computed hash and the capture time.
|
|
12
|
+
*
|
|
13
|
+
* Trust boundary (rc-1 / rc-5 / rc-8):
|
|
14
|
+
* - this module is pure: no I/O, no crypto, no clock — `capturedAt` is
|
|
15
|
+
* supplied by the caller;
|
|
16
|
+
* - the hash is NEVER computed from model output; it is the value the
|
|
17
|
+
* server-side reader produced from the raw file;
|
|
18
|
+
* - every persisted snapshot is re-validated element-wise before use.
|
|
19
|
+
*
|
|
20
|
+
* Placement: a sibling key of the Stage A artifact `contentJson`
|
|
21
|
+
* (`{ ...output, intentSnapshot }`). It must not live inside `intentTension`,
|
|
22
|
+
* whose schema is `additionalProperties: false`.
|
|
23
|
+
*/
|
|
24
|
+
import { assembleIntentDoc, parseIntentDocSections } from './intent-doc.js';
|
|
25
|
+
/** Version of the snapshot block shape (SPEC §6.3). */
|
|
26
|
+
export const INTENT_SNAPSHOT_SCHEMA_VERSION = 1;
|
|
27
|
+
/**
|
|
28
|
+
* Per-section character cap (TECH §3.3 constraint 2 — "建议 1200 字符").
|
|
29
|
+
* The cap bounds both the durable artifact and the rebuilt prompt, so a
|
|
30
|
+
* truncated section is recorded explicitly (`truncated: true`) instead of
|
|
31
|
+
* being silently shortened.
|
|
32
|
+
*/
|
|
33
|
+
export const INTENT_SNAPSHOT_SECTION_MAX_CHARS = 1200;
|
|
34
|
+
/** Canonical section keys, in document order. */
|
|
35
|
+
export const INTENT_SNAPSHOT_SECTION_KEYS = [
|
|
36
|
+
'why',
|
|
37
|
+
'desired_outcome',
|
|
38
|
+
'non_negotiables',
|
|
39
|
+
'stop_escalation',
|
|
40
|
+
'current_strategic_focus',
|
|
41
|
+
];
|
|
42
|
+
/** Snapshot key -> `IntentDocSections` field (the existing parse model). */
|
|
43
|
+
const KEY_TO_DOC_FIELD = {
|
|
44
|
+
why: 'why',
|
|
45
|
+
desired_outcome: 'desiredOutcome',
|
|
46
|
+
non_negotiables: 'nonNegotiables',
|
|
47
|
+
stop_escalation: 'stopEscalation',
|
|
48
|
+
current_strategic_focus: 'currentStrategicFocus',
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Build the snapshot from the raw document using the EXISTING parser.
|
|
52
|
+
*
|
|
53
|
+
* Sections are deterministic: `parseIntentDocSections(raw)` only, never model
|
|
54
|
+
* text. A section that was absent (or empty) is recorded as `missing: true`
|
|
55
|
+
* with an empty body — it is never back-filled from the model.
|
|
56
|
+
*/
|
|
57
|
+
export function buildIntentSnapshot(input) {
|
|
58
|
+
const maxChars = input.sectionMaxChars ?? INTENT_SNAPSHOT_SECTION_MAX_CHARS;
|
|
59
|
+
const parsed = parseIntentDocSections(input.raw);
|
|
60
|
+
const sections = INTENT_SNAPSHOT_SECTION_KEYS.map((key) => {
|
|
61
|
+
const body = parsed[KEY_TO_DOC_FIELD[key]];
|
|
62
|
+
if (typeof body !== 'string' || body.trim() === '') {
|
|
63
|
+
return { key, text: '', missing: true };
|
|
64
|
+
}
|
|
65
|
+
if (body.length > maxChars) {
|
|
66
|
+
return { key, text: body.slice(0, maxChars), truncated: true };
|
|
67
|
+
}
|
|
68
|
+
return { key, text: body };
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
schemaVersion: INTENT_SNAPSHOT_SCHEMA_VERSION,
|
|
72
|
+
contentHash: input.contentHash,
|
|
73
|
+
capturedAt: input.capturedAt,
|
|
74
|
+
lang: input.lang,
|
|
75
|
+
sections,
|
|
76
|
+
...(input.intentVersionId !== undefined ? { intentVersionId: input.intentVersionId } : {}),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Rebuild the document view used by the Stage A prompt.
|
|
81
|
+
*
|
|
82
|
+
* The prompt is always rebuilt from the snapshot (never from disk), so the
|
|
83
|
+
* first attempt and every retry receive the SAME strategic bytes
|
|
84
|
+
* (SPEC §6.6 / TECH §5.4 step 5).
|
|
85
|
+
*/
|
|
86
|
+
export function intentSnapshotSectionsToDoc(snapshot) {
|
|
87
|
+
const doc = {};
|
|
88
|
+
for (const section of snapshot.sections) {
|
|
89
|
+
if (section.missing === true)
|
|
90
|
+
continue;
|
|
91
|
+
doc[KEY_TO_DOC_FIELD[section.key]] = section.text;
|
|
92
|
+
}
|
|
93
|
+
return doc;
|
|
94
|
+
}
|
|
95
|
+
/** The prompt-ready `intentDoc.raw`, rebuilt deterministically from sections. */
|
|
96
|
+
export function renderIntentSnapshotDoc(snapshot) {
|
|
97
|
+
return assembleIntentDoc(intentSnapshotSectionsToDoc(snapshot));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Narrow the snapshot to the sections the model declared relevant.
|
|
101
|
+
*
|
|
102
|
+
* SPEC §6.3 asks for only the declared `relevantSections` to be stored. Those
|
|
103
|
+
* fields only exist AFTER the model answers, while the capture must happen
|
|
104
|
+
* BEFORE the call, so capture keeps all five bounded sections and the artifact
|
|
105
|
+
* applies the declared filter here.
|
|
106
|
+
*
|
|
107
|
+
* When the model declared none (no `intentTension`, or an empty
|
|
108
|
+
* `relatedIntentFields`), there is nothing to narrow by. Storing an empty
|
|
109
|
+
* array would degrade the artifact to a hash-only record — exactly what
|
|
110
|
+
* SPEC §6.2 rejects — so the bounded capture is kept as the traceable basis
|
|
111
|
+
* that the diagnosis actually received.
|
|
112
|
+
*/
|
|
113
|
+
export function filterIntentSnapshotSections(snapshot, relatedKeys) {
|
|
114
|
+
if (relatedKeys.length === 0)
|
|
115
|
+
return snapshot;
|
|
116
|
+
const declared = new Set(relatedKeys);
|
|
117
|
+
const sections = snapshot.sections.filter((section) => declared.has(section.key));
|
|
118
|
+
return { ...snapshot, sections };
|
|
119
|
+
}
|
|
120
|
+
/** True when the value is a well-formed `IntentSnapshot` (rc-1 / rc-4). */
|
|
121
|
+
export function isValidIntentSnapshot(value) {
|
|
122
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
123
|
+
return false;
|
|
124
|
+
const record = value;
|
|
125
|
+
if (record.schemaVersion !== INTENT_SNAPSHOT_SCHEMA_VERSION)
|
|
126
|
+
return false;
|
|
127
|
+
if (typeof record.contentHash !== 'string' || !record.contentHash.startsWith('sha256:'))
|
|
128
|
+
return false;
|
|
129
|
+
if (record.contentHash.length <= 'sha256:'.length)
|
|
130
|
+
return false;
|
|
131
|
+
if (typeof record.capturedAt !== 'string' || record.capturedAt.trim() === '')
|
|
132
|
+
return false;
|
|
133
|
+
if (record.lang !== 'zh-CN' && record.lang !== 'en')
|
|
134
|
+
return false;
|
|
135
|
+
if (Object.hasOwn(record, 'intentVersionId') && record.intentVersionId !== undefined) {
|
|
136
|
+
if (typeof record.intentVersionId !== 'string' || record.intentVersionId.trim() === '')
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
if (!Array.isArray(record.sections))
|
|
140
|
+
return false;
|
|
141
|
+
const seen = new Set();
|
|
142
|
+
for (const section of record.sections) {
|
|
143
|
+
if (typeof section !== 'object' || section === null || Array.isArray(section))
|
|
144
|
+
return false;
|
|
145
|
+
const entry = section;
|
|
146
|
+
if (typeof entry.key !== 'string')
|
|
147
|
+
return false;
|
|
148
|
+
if (!INTENT_SNAPSHOT_SECTION_KEYS.includes(entry.key))
|
|
149
|
+
return false;
|
|
150
|
+
if (seen.has(entry.key))
|
|
151
|
+
return false;
|
|
152
|
+
seen.add(entry.key);
|
|
153
|
+
if (typeof entry.text !== 'string')
|
|
154
|
+
return false;
|
|
155
|
+
if (Object.hasOwn(entry, 'truncated') && typeof entry.truncated !== 'boolean')
|
|
156
|
+
return false;
|
|
157
|
+
if (Object.hasOwn(entry, 'missing') && typeof entry.missing !== 'boolean')
|
|
158
|
+
return false;
|
|
159
|
+
if (entry.truncated === true && entry.missing === true)
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=intent-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-snapshot.js","sourceRoot":"","sources":["../../../src/runtime/intent/intent-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE5E,uDAAuD;AACvD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAU,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC;AAEtD,iDAAiD;AACjD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,KAAK;IACL,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,yBAAyB;CACjB,CAAC;AA0BX,4EAA4E;AAC5E,MAAM,gBAAgB,GAA8D;IAClF,GAAG,EAAE,KAAK;IACV,eAAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,gBAAgB;IACjC,uBAAuB,EAAE,uBAAuB;CACjD,CAAC;AAeF;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IACjE,MAAM,QAAQ,GAAG,KAAK,CAAC,eAAe,IAAI,iCAAiC,CAAC;IAC5E,MAAM,MAAM,GAAG,sBAAsB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjD,MAAM,QAAQ,GAA4B,4BAA4B,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACjF,MAAM,IA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,CAAC,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QACxF,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;IACvE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const STRATEGIC_CONFLICT_UNCONFIRMED = "strategic_conflict_unconfirmed";
|
|
2
|
+
/**
|
|
3
|
+
* The Owner action that acknowledges a confirmed conflict. Other actions
|
|
4
|
+
* (`observe` = keep pending, `dismiss` = drop the tension, `revise_intent` =
|
|
5
|
+
* change the anchor, `promote_to_*` = act on the candidate) do not resolve it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const STRATEGIC_CONFLICT_RESOLUTION_ACTION = "confirm_drift";
|
|
8
|
+
export interface StrategicResolutionRecord {
|
|
9
|
+
readonly ownerAction: string;
|
|
10
|
+
readonly intentDocHash: string | null;
|
|
11
|
+
readonly contractDigest: string | null;
|
|
12
|
+
readonly resultingCandidateId: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface StrategicConflictGateInput {
|
|
15
|
+
/** Parsed artifact contentJson (untrusted). `undefined` = unparseable. */
|
|
16
|
+
readonly artifactContent: unknown;
|
|
17
|
+
/** True when contentJson could not be parsed at all (corrupted artifact). */
|
|
18
|
+
readonly artifactContentUnreadable?: boolean;
|
|
19
|
+
/** Server-computed digest of the SAME artifact snapshot under approval. */
|
|
20
|
+
readonly artifactDigest: string;
|
|
21
|
+
/** Candidate ids attached to the artifact (server read). */
|
|
22
|
+
readonly candidateIds: readonly string[];
|
|
23
|
+
/** Resolution candidates for this artifact, server read. */
|
|
24
|
+
readonly resolutions: readonly StrategicResolutionRecord[];
|
|
25
|
+
}
|
|
26
|
+
export type StrategicConflictGateResult = {
|
|
27
|
+
readonly ok: true;
|
|
28
|
+
readonly conflictStatus: 'none' | 'potential' | 'confirmed';
|
|
29
|
+
} | {
|
|
30
|
+
readonly ok: false;
|
|
31
|
+
readonly code: typeof STRATEGIC_CONFLICT_UNCONFIRMED;
|
|
32
|
+
readonly reason: string;
|
|
33
|
+
readonly nextAction: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Rule 1 predicate: does this artifact CLAIM an IntentContract V2? The V2 lives
|
|
37
|
+
* at `artifact.intentContract` (schemaVersion 2), never at the artifact root —
|
|
38
|
+
* the contract is a sibling key of the scribe output, exactly as V1 is.
|
|
39
|
+
*
|
|
40
|
+
* REVIEW FIX (PR #2652 P0-4): a claim is ANY presence of a V2-exclusive key or
|
|
41
|
+
* of `schemaVersion` — including an ILLEGAL `schemaVersion` value and a V2 that
|
|
42
|
+
* forgot the field. The old predicate only matched `schemaVersion === 2`, so an
|
|
43
|
+
* incomplete V2 silently fell into the V1 compatibility path and was approvable.
|
|
44
|
+
*/
|
|
45
|
+
export declare function claimsIntentContractV2(artifactContent: unknown): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Does the approval gate have jurisdiction over this artifact at all?
|
|
48
|
+
* True when the content is unreadable (a corrupted artifact must never be
|
|
49
|
+
* approvable) or when the artifact carries an `intentContract` of any shape.
|
|
50
|
+
*/
|
|
51
|
+
export declare function hasStrategicContractClaim(artifactContent: unknown, unreadable?: boolean): boolean;
|
|
52
|
+
export declare function evaluateStrategicConflictGate(input: StrategicConflictGateInput): StrategicConflictGateResult;
|
|
53
|
+
/** Read-model projection: what the Owner must see before the approve action. */
|
|
54
|
+
export interface StrategicConflictView {
|
|
55
|
+
readonly isV2: boolean;
|
|
56
|
+
readonly relevance: string | null;
|
|
57
|
+
readonly conflictStatus: string | null;
|
|
58
|
+
/** The V2 conflict list (`against` + `ref`) the card must render. */
|
|
59
|
+
readonly conflicts: readonly {
|
|
60
|
+
readonly against: string;
|
|
61
|
+
readonly ref: string;
|
|
62
|
+
readonly status: string;
|
|
63
|
+
}[];
|
|
64
|
+
readonly resolved: boolean;
|
|
65
|
+
readonly blockCode: string | null;
|
|
66
|
+
readonly reason: string | null;
|
|
67
|
+
readonly nextAction: string | null;
|
|
68
|
+
}
|
|
69
|
+
export declare function describeStrategicConflict(input: StrategicConflictGateInput): StrategicConflictView;
|
|
70
|
+
//# sourceMappingURL=strategic-conflict-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strategic-conflict-gate.d.ts","sourceRoot":"","sources":["../../../src/runtime/intent/strategic-conflict-gate.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,8BAA8B,mCAAmC,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,kBAAkB,CAAC;AAEpE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9C;AAED,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAC7C,2EAA2E;IAC3E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,4DAA4D;IAC5D,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,SAAS,yBAAyB,EAAE,CAAC;CAC5D;AAED,MAAM,MAAM,2BAA2B,GACnC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,CAAA;CAAE,GAClF;IACE,QAAQ,CAAC,EAAE,EAAE,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+
* approval gate.
|
|
4
|
+
*
|
|
5
|
+
* ONE predicate shared by the write path (SqliteApprovalStore.approve) and the
|
|
6
|
+
* read model (approval block) so the UI can never promise an approval the
|
|
7
|
+
* server would refuse, and the server can never rely on the UI.
|
|
8
|
+
*
|
|
9
|
+
* Rules:
|
|
10
|
+
* 1. Legacy / V1 artifacts are unaffected (no schemaVersion: 2 → allowed).
|
|
11
|
+
* 2. A V2 that claims `schemaVersion: 2` but does not validate is a HARD block
|
|
12
|
+
* (tampered / incomplete V2 must never be approvable).
|
|
13
|
+
* 3. `conflictStatus !== 'confirmed'` → allowed.
|
|
14
|
+
* 4. `confirmed` requires an effective resolution record bound to ALL of:
|
|
15
|
+
* the artifact's candidate, the contract's intent hash AND the artifact
|
|
16
|
+
* digest. Any change to any of those invalidates the old record.
|
|
17
|
+
*
|
|
18
|
+
* `intentTension` is NOT consulted here; relevance/conflicts live in the V2
|
|
19
|
+
* assessment, which is the only authority this gate reads.
|
|
20
|
+
*/
|
|
21
|
+
import { extractIntentContractV2, } from '../internalization/intent-contract.js';
|
|
22
|
+
export const STRATEGIC_CONFLICT_UNCONFIRMED = 'strategic_conflict_unconfirmed';
|
|
23
|
+
/**
|
|
24
|
+
* The Owner action that acknowledges a confirmed conflict. Other actions
|
|
25
|
+
* (`observe` = keep pending, `dismiss` = drop the tension, `revise_intent` =
|
|
26
|
+
* change the anchor, `promote_to_*` = act on the candidate) do not resolve it.
|
|
27
|
+
*/
|
|
28
|
+
export const STRATEGIC_CONFLICT_RESOLUTION_ACTION = 'confirm_drift';
|
|
29
|
+
function isRecord(value) {
|
|
30
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* TECH §8.3: the refusal reason must NAME the conflict target (`against` +
|
|
34
|
+
* `ref`) so the Owner can act on it instead of reading an opaque code.
|
|
35
|
+
*/
|
|
36
|
+
function describeTargets(contract) {
|
|
37
|
+
const conflicts = contract?.strategicAssessment.conflicts ?? [];
|
|
38
|
+
if (conflicts.length === 0)
|
|
39
|
+
return '';
|
|
40
|
+
return conflicts.map((conflict) => `${conflict.against}:${conflict.ref}`).join(', ');
|
|
41
|
+
}
|
|
42
|
+
function blocked(reason, contract) {
|
|
43
|
+
const targets = describeTargets(contract);
|
|
44
|
+
return {
|
|
45
|
+
ok: false,
|
|
46
|
+
code: STRATEGIC_CONFLICT_UNCONFIRMED,
|
|
47
|
+
reason: targets === '' ? reason : `${reason} [${targets}]`,
|
|
48
|
+
nextAction: 'Resolve the confirmed strategic conflict for THIS contract first: record an Owner decision bound to the current candidate, the intent hash and the current contract digest, then approve again.',
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Rule 1 predicate: does this artifact CLAIM an IntentContract V2? The V2 lives
|
|
53
|
+
* at `artifact.intentContract` (schemaVersion 2), never at the artifact root —
|
|
54
|
+
* the contract is a sibling key of the scribe output, exactly as V1 is.
|
|
55
|
+
*
|
|
56
|
+
* REVIEW FIX (PR #2652 P0-4): a claim is ANY presence of a V2-exclusive key or
|
|
57
|
+
* of `schemaVersion` — including an ILLEGAL `schemaVersion` value and a V2 that
|
|
58
|
+
* forgot the field. The old predicate only matched `schemaVersion === 2`, so an
|
|
59
|
+
* incomplete V2 silently fell into the V1 compatibility path and was approvable.
|
|
60
|
+
*/
|
|
61
|
+
export function claimsIntentContractV2(artifactContent) {
|
|
62
|
+
if (!isRecord(artifactContent))
|
|
63
|
+
return false;
|
|
64
|
+
const contract = artifactContent.intentContract;
|
|
65
|
+
if (!isRecord(contract))
|
|
66
|
+
return false;
|
|
67
|
+
return Object.hasOwn(contract, 'schemaVersion')
|
|
68
|
+
|| Object.hasOwn(contract, 'strategicAssessment')
|
|
69
|
+
|| Object.hasOwn(contract, 'strategicIntent')
|
|
70
|
+
|| Object.hasOwn(contract, 'corePrincipleRefs');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Does the approval gate have jurisdiction over this artifact at all?
|
|
74
|
+
* True when the content is unreadable (a corrupted artifact must never be
|
|
75
|
+
* approvable) or when the artifact carries an `intentContract` of any shape.
|
|
76
|
+
*/
|
|
77
|
+
export function hasStrategicContractClaim(artifactContent, unreadable = false) {
|
|
78
|
+
if (unreadable)
|
|
79
|
+
return true;
|
|
80
|
+
return isRecord(artifactContent) && Object.hasOwn(artifactContent, 'intentContract');
|
|
81
|
+
}
|
|
82
|
+
function readStrategicClaim(input) {
|
|
83
|
+
if (input.artifactContentUnreadable === true)
|
|
84
|
+
return { kind: 'unreadable' };
|
|
85
|
+
const content = input.artifactContent;
|
|
86
|
+
if (!isRecord(content))
|
|
87
|
+
return { kind: 'none' };
|
|
88
|
+
if (!Object.hasOwn(content, 'intentContract'))
|
|
89
|
+
return { kind: 'none' };
|
|
90
|
+
const raw = content.intentContract;
|
|
91
|
+
// A present-but-non-object contract is corruption, never "absent".
|
|
92
|
+
if (!isRecord(raw))
|
|
93
|
+
return { kind: 'invalid-v2' };
|
|
94
|
+
if (!claimsIntentContractV2(content))
|
|
95
|
+
return { kind: 'none' };
|
|
96
|
+
const contract = extractIntentContractV2(content);
|
|
97
|
+
return contract === null ? { kind: 'invalid-v2' } : { kind: 'v2', contract };
|
|
98
|
+
}
|
|
99
|
+
export function evaluateStrategicConflictGate(input) {
|
|
100
|
+
// Rule 1: artifacts without an intent-contract claim are outside SIA.
|
|
101
|
+
const claim = readStrategicClaim(input);
|
|
102
|
+
if (claim.kind === 'none') {
|
|
103
|
+
return { ok: true, conflictStatus: 'none' };
|
|
104
|
+
}
|
|
105
|
+
// Rule 2: an incomplete / corrupted claim is never approvable.
|
|
106
|
+
if (claim.kind !== 'v2') {
|
|
107
|
+
return blocked(claim.kind === 'unreadable' ? 'unreadable_artifact_content' : 'malformed_strategic_contract', null);
|
|
108
|
+
}
|
|
109
|
+
const { contract } = claim;
|
|
110
|
+
const status = contract.strategicAssessment.conflictStatus;
|
|
111
|
+
// Rule 3.
|
|
112
|
+
if (status !== 'confirmed') {
|
|
113
|
+
return { ok: true, conflictStatus: status };
|
|
114
|
+
}
|
|
115
|
+
// Rule 4: binding requires the server-captured intent hash.
|
|
116
|
+
const intentDocHash = contract.strategicIntent?.contentHash;
|
|
117
|
+
if (intentDocHash === undefined || intentDocHash === '') {
|
|
118
|
+
return blocked('missing_intent_reference', contract);
|
|
119
|
+
}
|
|
120
|
+
const resolved = input.resolutions.some((record) => record.ownerAction === STRATEGIC_CONFLICT_RESOLUTION_ACTION
|
|
121
|
+
&& record.intentDocHash === intentDocHash
|
|
122
|
+
&& record.contractDigest === input.artifactDigest
|
|
123
|
+
&& record.resultingCandidateId !== null
|
|
124
|
+
&& input.candidateIds.includes(record.resultingCandidateId));
|
|
125
|
+
return resolved ? { ok: true, conflictStatus: 'confirmed' } : blocked('no_effective_resolution', contract);
|
|
126
|
+
}
|
|
127
|
+
export function describeStrategicConflict(input) {
|
|
128
|
+
const claim = readStrategicClaim(input);
|
|
129
|
+
const contract = claim.kind === 'v2' ? claim.contract : null;
|
|
130
|
+
const gate = evaluateStrategicConflictGate(input);
|
|
131
|
+
return {
|
|
132
|
+
// A malformed V2 is still a V2 artifact — the card must show it as a
|
|
133
|
+
// blocked strategic contract, never as a plain non-SIA approval.
|
|
134
|
+
isV2: claim.kind === 'v2' || claim.kind === 'invalid-v2',
|
|
135
|
+
relevance: contract?.strategicAssessment.relevance ?? null,
|
|
136
|
+
conflictStatus: contract?.strategicAssessment.conflictStatus ?? null,
|
|
137
|
+
conflicts: (contract?.strategicAssessment.conflicts ?? []).map((conflict) => ({
|
|
138
|
+
against: conflict.against,
|
|
139
|
+
ref: conflict.ref,
|
|
140
|
+
status: conflict.status,
|
|
141
|
+
})),
|
|
142
|
+
resolved: gate.ok,
|
|
143
|
+
blockCode: gate.ok ? null : gate.code,
|
|
144
|
+
reason: gate.ok ? null : gate.reason,
|
|
145
|
+
nextAction: gate.ok ? null : gate.nextAction,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=strategic-conflict-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strategic-conflict-gate.js","sourceRoot":"","sources":["../../../src/runtime/intent/strategic-conflict-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,uBAAuB,GAExB,MAAM,uCAAuC,CAAC;AAE/C,MAAM,CAAC,MAAM,8BAA8B,GAAG,gCAAgC,CAAC;AAE/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,eAAe,CAAC;AA+BpE,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,QAAiC;IACxD,MAAM,SAAS,GAAG,QAAQ,EAAE,mBAAmB,CAAC,SAAS,IAAI,EAAE,CAAC;IAChE,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACtC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvF,CAAC;AAED,SAAS,OAAO,CAAC,MAAc,EAAE,QAAiC;IAChE,MAAM,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1C,OAAO;QACL,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,8BAA8B;QACpC,MAAM,EAAE,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,OAAO,GAAG;QAC1D,UAAU,EACR,iMAAiM;KACpM,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UA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E,QAAQ,CAAC,GAAG;YACjB,MAAM,EAAE,QAAQ,CAAC,MAAM;SACxB,CAAC,CAAC;QACH,QAAQ,EAAE,IAAI,CAAC,EAAE;QACjB,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;QACrC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;QACpC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU;KAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -26,6 +26,7 @@ import type { ContextAssembler } from '../store/context/context-assembler.js';
|
|
|
26
26
|
import type { TaskRecord } from '../task-status.js';
|
|
27
27
|
import type { EffectivePdConfig } from '../config/pd-config-types.js';
|
|
28
28
|
import type { IntentDocReader } from '../intent/intent-doc-reader-port.js';
|
|
29
|
+
import { type IntentSnapshot } from '../intent/intent-snapshot.js';
|
|
29
30
|
import { type PDErrorCategory } from '../error-categories.js';
|
|
30
31
|
import { BasePeerRunner } from '../runner/base-peer-runner.js';
|
|
31
32
|
import type { PeerRunnerOptions, PeerRunnerDeps, PeerRunnerResult, PeerRunnerValidationResult } from '../runner/peer-runner-types.js';
|
|
@@ -34,6 +35,15 @@ interface DiagRootCauseContext {
|
|
|
34
35
|
readonly contextHash: string;
|
|
35
36
|
readonly contextRefs: string[];
|
|
36
37
|
readonly painPayload: DiagnosticianContextPayload;
|
|
38
|
+
/**
|
|
39
|
+
* SPEC-PD-STRATEGIC-INTENT-ANCHORING-001 v1.2 §6.3: the server-authored
|
|
40
|
+
* strategic basis for THIS task. Resolved from the persisted task input when
|
|
41
|
+
* present, otherwise captured once (and persisted before the model runs).
|
|
42
|
+
*
|
|
43
|
+
* Absent = flag off / no reader / no usable INTENT.md. The prompt then stays
|
|
44
|
+
* byte-identical to the pre-SIA prompt (EP-03: no silent fallback).
|
|
45
|
+
*/
|
|
46
|
+
readonly intentSnapshot?: IntentSnapshot;
|
|
37
47
|
}
|
|
38
48
|
export interface DiagRootCauseRunnerDeps extends PeerRunnerDeps {
|
|
39
49
|
readonly validator: DiagRootCauseValidator;
|
|
@@ -71,9 +81,39 @@ export declare class DiagRootCauseRunner extends BasePeerRunner<DiagRootCauseCon
|
|
|
71
81
|
constructor(deps: DiagRootCauseRunnerDeps, options: DiagRootCauseRunnerOptions);
|
|
72
82
|
get permanentErrorCategories(): ReadonlySet<PDErrorCategory>;
|
|
73
83
|
buildContext(taskId: string): Promise<DiagRootCauseContext>;
|
|
84
|
+
/**
|
|
85
|
+
* Resolve the strategic basis for this task (SPEC v1.2 §6.3/§6.6).
|
|
86
|
+
*
|
|
87
|
+
* Order is the contract:
|
|
88
|
+
* 1. persisted `pi_metadata.intentSnapshot` → use it, never touch INTENT.md
|
|
89
|
+
* 2. corrupted persisted snapshot → fail closed (never silently re-capture)
|
|
90
|
+
* 3. absent + flag on + reader → capture, persist via CAS, then continue
|
|
91
|
+
* 4. anything else → no snapshot (degraded, prompt byte-identical)
|
|
92
|
+
*/
|
|
93
|
+
private resolveIntentSnapshot;
|
|
94
|
+
/**
|
|
95
|
+
* Persist the captured snapshot as TASK INPUT before the model call.
|
|
96
|
+
*
|
|
97
|
+
* Uses the existing diagnostic-json CAS so a concurrent writer's fields
|
|
98
|
+
* (validator history, revision routing, …) are never clobbered. A lost race
|
|
99
|
+
* is not fatal: the winner's durable snapshot IS the input of record, so we
|
|
100
|
+
* adopt it instead of calling the model with an unpersisted value.
|
|
101
|
+
*/
|
|
102
|
+
private persistIntentSnapshot;
|
|
74
103
|
invokeRuntime(taskId: string, context: DiagRootCauseContext): Promise<RunHandle>;
|
|
75
104
|
validateOutput(output: unknown, taskId: string, context: DiagRootCauseContext): Promise<PeerRunnerValidationResult>;
|
|
76
|
-
succeedTask(taskId: string, runId: string, output: DiagRootCauseOutputV1, task: TaskRecord, contextHash: string,
|
|
105
|
+
succeedTask(taskId: string, runId: string, output: DiagRootCauseOutputV1, task: TaskRecord, contextHash: string, context: DiagRootCauseContext): Promise<PeerRunnerResult<DiagRootCauseOutputV1>>;
|
|
106
|
+
/**
|
|
107
|
+
* Compose the Stage A artifact body (SPEC v1.2 §6.3, TECH v1.1 §3.4).
|
|
108
|
+
*
|
|
109
|
+
* The model output is preserved; the server adds two authoritative facts:
|
|
110
|
+
* - `intentSnapshot`: the captured strategic basis (narrowed to the
|
|
111
|
+
* sections the model declared relevant, when it declared any);
|
|
112
|
+
* - `intentTension.intentDocHash`: ALWAYS the server-computed hash. A
|
|
113
|
+
* model-reported value is never trusted; a differing value is surfaced
|
|
114
|
+
* as `intent_hash_mismatch` instead of being silently rewritten.
|
|
115
|
+
*/
|
|
116
|
+
private composeArtifactContent;
|
|
77
117
|
/**
|
|
78
118
|
* Re-inject taskId if stripped by stripLineageFields (PRI-272 / ERR-008).
|
|
79
119
|
* Only fill when absent via Object.hasOwn — present-but-falsy values
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diag-rootcause-runner.d.ts","sourceRoot":"","sources":["../../../src/runtime/internalization/diag-rootcause-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAC/G,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
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