create-principles-disciple 1.148.8 → 1.148.9
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/codex-adapter/package.json +1 -1
- package/console/dist/web/assets/app.js +1 -1
- package/core/dist/index.d.ts +2 -2
- package/core/dist/index.d.ts.map +1 -1
- package/core/dist/index.js +2 -2
- package/core/dist/index.js.map +1 -1
- package/core/dist/runtime/adapter/output-schema-registry.d.ts +4 -3
- package/core/dist/runtime/adapter/output-schema-registry.d.ts.map +1 -1
- package/core/dist/runtime/adapter/output-schema-registry.js +9 -5
- package/core/dist/runtime/adapter/output-schema-registry.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts +1 -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 +10 -3
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts +31 -0
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js +55 -0
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.js +48 -9
- package/core/dist/runtime/adapter/schema-prompt-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/split-pipeline-fixtures.d.ts +2 -2
- package/core/dist/runtime/adapter/split-pipeline-fixtures.d.ts.map +1 -1
- package/core/dist/runtime/adapter/split-pipeline-fixtures.js +11 -0
- package/core/dist/runtime/adapter/split-pipeline-fixtures.js.map +1 -1
- package/core/dist/runtime/adapter/test-double-runtime-adapter.d.ts +3 -3
- package/core/dist/runtime/adapter/test-double-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/test-double-runtime-adapter.js +9 -3
- package/core/dist/runtime/adapter/test-double-runtime-adapter.js.map +1 -1
- package/core/dist/runtime/admission-gate.d.ts +2 -2
- package/core/dist/runtime/candidate-intake-service.d.ts.map +1 -1
- package/core/dist/runtime/candidate-intake-service.js +176 -13
- package/core/dist/runtime/candidate-intake-service.js.map +1 -1
- package/core/dist/runtime/diagnostician/router-prompt-builder.d.ts +42 -7
- package/core/dist/runtime/diagnostician/router-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/router-prompt-builder.js +53 -10
- package/core/dist/runtime/diagnostician/router-prompt-builder.js.map +1 -1
- package/core/dist/runtime/diagnostician-association-shadow.d.ts +111 -4
- package/core/dist/runtime/diagnostician-association-shadow.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-association-shadow.js +206 -3
- package/core/dist/runtime/diagnostician-association-shadow.js.map +1 -1
- package/core/dist/runtime/diagnostician-output.d.ts +67 -84
- package/core/dist/runtime/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-output.js +90 -41
- package/core/dist/runtime/diagnostician-output.js.map +1 -1
- package/core/dist/runtime/index.d.ts +3 -3
- package/core/dist/runtime/index.d.ts.map +1 -1
- package/core/dist/runtime/index.js +3 -3
- package/core/dist/runtime/index.js.map +1 -1
- package/core/dist/runtime/internalization/artifact-summary.js +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.d.ts +49 -12
- package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.js +135 -30
- package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime/internalization/formation-context.d.ts +2 -2
- package/core/dist/runtime/internalization/formation-context.js +2 -2
- package/core/dist/runtime/internalization/internalization-route.d.ts +15 -2
- package/core/dist/runtime/internalization/internalization-route.d.ts.map +1 -1
- package/core/dist/runtime/internalization/internalization-route.js +5 -2
- package/core/dist/runtime/internalization/internalization-route.js.map +1 -1
- package/core/dist/runtime/internalization/router-context-evidence.d.ts +148 -6
- package/core/dist/runtime/internalization/router-context-evidence.d.ts.map +1 -1
- package/core/dist/runtime/internalization/router-context-evidence.js +156 -11
- package/core/dist/runtime/internalization/router-context-evidence.js.map +1 -1
- package/core/dist/runtime/internalization/router-context-reconstruction.d.ts +64 -0
- package/core/dist/runtime/internalization/router-context-reconstruction.d.ts.map +1 -0
- package/core/dist/runtime/internalization/router-context-reconstruction.js +124 -0
- package/core/dist/runtime/internalization/router-context-reconstruction.js.map +1 -0
- package/core/dist/runtime/pain-signal-bridge.d.ts +3 -3
- package/core/dist/runtime/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-bridge.js +35 -9
- package/core/dist/runtime/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.js +32 -4
- package/core/dist/runtime/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime/principle-tree/rule-candidate-binding.d.ts.map +1 -1
- package/core/dist/runtime/principle-tree/rule-candidate-binding.js +9 -5
- package/core/dist/runtime/principle-tree/rule-candidate-binding.js.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.d.ts +18 -4
- package/core/dist/runtime/runner/base-peer-runner.d.ts.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.js +32 -9
- package/core/dist/runtime/runner/base-peer-runner.js.map +1 -1
- package/core/dist/runtime/runner/context-hash.d.ts +9 -0
- package/core/dist/runtime/runner/context-hash.d.ts.map +1 -0
- package/core/dist/runtime/runner/context-hash.js +18 -0
- package/core/dist/runtime/runner/context-hash.js.map +1 -0
- package/core/dist/runtime/runner/default-validator.d.ts +3 -3
- package/core/dist/runtime/runner/default-validator.d.ts.map +1 -1
- package/core/dist/runtime/runner/default-validator.js +149 -85
- package/core/dist/runtime/runner/default-validator.js.map +1 -1
- package/core/dist/runtime/runner/diagnostician-validator.d.ts +11 -9
- package/core/dist/runtime/runner/diagnostician-validator.d.ts.map +1 -1
- package/core/dist/runtime/runner/peer-runner-types.d.ts +14 -2
- package/core/dist/runtime/runner/peer-runner-types.d.ts.map +1 -1
- package/core/dist/runtime/runner/runner-result.d.ts +2 -2
- package/core/dist/runtime/runtime-protocol.d.ts +8 -0
- package/core/dist/runtime/runtime-protocol.d.ts.map +1 -1
- package/core/dist/runtime/runtime-protocol.js +8 -0
- package/core/dist/runtime/runtime-protocol.js.map +1 -1
- package/core/dist/runtime/store/commit/diagnostician-committer.d.ts +4 -4
- package/core/dist/runtime/store/commit/diagnostician-committer.d.ts.map +1 -1
- package/core/dist/runtime/store/commit/diagnostician-committer.js +27 -8
- package/core/dist/runtime/store/commit/diagnostician-committer.js.map +1 -1
- package/core/dist/runtime/store/pain-diagnosis/pain-diagnosis-store.d.ts +2 -2
- package/core/dist/runtime/store/pain-diagnosis/pain-diagnosis-store.js +1 -1
- package/core/dist/runtime/store/run/memory-run-store.d.ts +1 -1
- package/core/dist/runtime/store/run/memory-run-store.d.ts.map +1 -1
- package/core/dist/runtime/store/run/memory-run-store.js.map +1 -1
- package/core/dist/runtime/store/run/run-store.d.ts +1 -1
- package/core/dist/runtime/store/run/run-store.d.ts.map +1 -1
- package/core/dist/runtime/store/run/sqlite-run-store.d.ts +1 -1
- package/core/dist/runtime/store/run/sqlite-run-store.d.ts.map +1 -1
- package/core/dist/runtime/store/run/sqlite-run-store.js +4 -0
- package/core/dist/runtime/store/run/sqlite-run-store.js.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.d.ts +1 -1
- package/core/dist/runtime/store/runtime-state-manager.js +1 -1
- package/core/dist/runtime/synthetic-baseline.d.ts +2 -2
- package/core/dist/runtime/synthetic-baseline.d.ts.map +1 -1
- package/core/dist/runtime/synthetic-baseline.js +2 -0
- package/core/dist/runtime/synthetic-baseline.js.map +1 -1
- package/core/dist/runtime/types/evidence-chain-contract.d.ts +1 -1
- package/core/dist/runtime/types/evidence-chain-contract.js +2 -2
- package/core/dist/runtime/types/evidence-chain-contract.js.map +1 -1
- package/core/dist/runtime/types/rule-candidate-binding.d.ts +10 -2
- package/core/dist/runtime/types/rule-candidate-binding.d.ts.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 +19 -0
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/package.json +1 -1
- package/host-runtime/dist/workspace-telemetry-emitter.js +13 -0
- package/host-runtime/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +14 -5
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +18 -7
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.js +2 -2
- package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -1
- package/pd-cli/dist/services/pain-flood-simulation-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/pain-flood-simulation-runner.js +4 -1
- package/pd-cli/dist/services/pain-flood-simulation-runner.js.map +1 -1
- package/pd-cli/dist/services/synthetic-baseline-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/synthetic-baseline-runner.js +5 -1
- package/pd-cli/dist/services/synthetic-baseline-runner.js.map +1 -1
- package/pd-mcp-server/dist/version.d.ts +1 -1
- package/pd-mcp-server/dist/version.js +1 -1
- package/pd-mcp-server/package.json +1 -1
- package/plugin/dist/bundle.js +472 -448
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime/diagnostician/router-prompt-builder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"router-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime/diagnostician/router-prompt-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAKzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA6GlE,gFAAgF;AAEhF;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,mBAAmB;IACb,OAAO,CAAsB;IAC7B,MAAM,CAAU;IAEjC,YAAY,IAAI,GAA+B,EAAE;QAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,0BAA0B,EAAE,CAAC;QAChE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,2BAA2B,CAAC;IAC3D,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,CAAC,IAAI,GAA+B,EAAE;QAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;QAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;QAEhC,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACxD,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,cAAc,CAAC,CAAC;QAEjE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiET,OAAO;;;;;;;EAOP,WAAW,GAAG,iBAAiB,EAAE,CAAC;IAClC,CAAC;IAED;;;;;;;;;;;OAWG;IACH,WAAW,CACT,OAA2B,EAC3B,IAAI,GAAuB,EAAE;QAE7B,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;QAEhC,MAAM,iBAAiB,GAAG,IAAI,CAAC,sBAAsB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;QAE1E,MAAM,WAAW,GAAsB;YACrC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,MAAM;YACtC,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,cAAc,EAAE,OAAO,CAAC,cAAc;SACvC,CAAC;QAEF,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAE5C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;IACnE,CAAC;CACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DiagnosticianRecommendationV2 } from './diagnostician-output.js';
|
|
1
2
|
export interface ShadowAssociationProposal {
|
|
2
3
|
mode: 'shadow';
|
|
3
4
|
recommendationRef: string;
|
|
@@ -7,13 +8,18 @@ export interface ShadowAssociationProposal {
|
|
|
7
8
|
principleId?: string;
|
|
8
9
|
authorizesGeneration: false;
|
|
9
10
|
}
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
export declare function proposeShadowAssociations(output: unknown, context: unknown, sources: {
|
|
11
|
+
/** Inputs shared by both resolver entry points. */
|
|
12
|
+
interface ShadowSources {
|
|
13
13
|
artifactId: string;
|
|
14
14
|
candidates: unknown;
|
|
15
15
|
resolvePrincipleCandidate: (candidateId: string) => unknown;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
/** Offline/read-only composition over a hand-assembled context (tests and
|
|
18
|
+
* replay tooling). Like `resolveSourceDeclaredRelations` below, it has NO
|
|
19
|
+
* production caller yet — the envelope reader is the persisted-shape
|
|
20
|
+
* counterpart, not a wired production entry point (PRI-1146 P2-02: production
|
|
21
|
+
* delivery remains follow-up while OD-01/02/03 are pending). */
|
|
22
|
+
export declare function proposeShadowAssociations(output: unknown, context: unknown, sources: ShadowSources): {
|
|
17
23
|
ok: true;
|
|
18
24
|
proposals: ShadowAssociationProposal[];
|
|
19
25
|
} | {
|
|
@@ -21,4 +27,105 @@ export declare function proposeShadowAssociations(output: unknown, context: unkn
|
|
|
21
27
|
reason: string;
|
|
22
28
|
nextAction: string;
|
|
23
29
|
};
|
|
30
|
+
/** One persisted candidate row of the artifact (loaded by the caller). */
|
|
31
|
+
export interface SourceRelationCandidateRow {
|
|
32
|
+
candidateId: string;
|
|
33
|
+
artifactId: string;
|
|
34
|
+
recommendationKind: string;
|
|
35
|
+
sourceRecommendation: DiagnosticianRecommendationV2;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Read-only resolution of one rule candidate's source-declared relation
|
|
39
|
+
* (SPEC v0.6 §6). `basis` appears only on `proposed` results and is always
|
|
40
|
+
* `source_declared_relation` — a system source declaration, not an Owner
|
|
41
|
+
* binding (OD-01 pending: shadow only).
|
|
42
|
+
*/
|
|
43
|
+
export type SourceDeclaredRelationResolution = {
|
|
44
|
+
mode: 'shadow';
|
|
45
|
+
candidateId: string;
|
|
46
|
+
recommendationRef: string;
|
|
47
|
+
status: 'proposed';
|
|
48
|
+
reason: 'canonical_identity_proposed';
|
|
49
|
+
basis: 'source_declared_relation';
|
|
50
|
+
principleId: string;
|
|
51
|
+
targetCandidateId?: string;
|
|
52
|
+
/** Structural validity only — semantics were NOT evaluated. */
|
|
53
|
+
semanticCorrectness: 'not_evaluated';
|
|
54
|
+
authorizesGeneration: false;
|
|
55
|
+
} | {
|
|
56
|
+
mode: 'shadow';
|
|
57
|
+
candidateId: string;
|
|
58
|
+
recommendationRef: string;
|
|
59
|
+
status: 'unresolved';
|
|
60
|
+
reason: string;
|
|
61
|
+
nextAction: string;
|
|
62
|
+
authorizesGeneration: false;
|
|
63
|
+
};
|
|
64
|
+
export interface ResolveSourceDeclaredRelationsInput {
|
|
65
|
+
/** The artifact envelope (artifact.contentJson) carrying trustedContextReceipt. */
|
|
66
|
+
envelope: unknown;
|
|
67
|
+
/** The same run's persisted output (run.outputPayload) — bare V2 output. */
|
|
68
|
+
runOutput: unknown;
|
|
69
|
+
/**
|
|
70
|
+
* Identity of the persisted run row `runOutput` was loaded from. The
|
|
71
|
+
* resolver verifies it matches the receipt lineage; a bare output payload
|
|
72
|
+
* carries no lineage of its own, so the load path must attest it.
|
|
73
|
+
*/
|
|
74
|
+
runLineage: {
|
|
75
|
+
taskId: string;
|
|
76
|
+
runId: string;
|
|
77
|
+
};
|
|
78
|
+
/** The artifact's candidate rows as persisted (sourceRecommendation parsed). */
|
|
79
|
+
candidates: readonly SourceRelationCandidateRow[];
|
|
80
|
+
/** Lineage anchors for receipt verification. */
|
|
81
|
+
taskId: string;
|
|
82
|
+
runId: string;
|
|
83
|
+
artifactId: string;
|
|
84
|
+
/** Shared ledger port: principle-kind candidate → canonical identity. */
|
|
85
|
+
resolvePrincipleCandidate: (candidateId: string) => unknown;
|
|
86
|
+
/** Shared ledger port: canonical principle current eligibility. */
|
|
87
|
+
resolveCanonicalEligibility: (principleId: string) => {
|
|
88
|
+
eligible: true;
|
|
89
|
+
} | {
|
|
90
|
+
eligible: false;
|
|
91
|
+
reason: 'missing' | 'ineligible' | 'ledger_unavailable' | 'ledger_corrupt';
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Resolve the source-declared relation for EVERY rule candidate of one
|
|
96
|
+
* diagnostician artifact, strictly read-only:
|
|
97
|
+
*
|
|
98
|
+
* 1. read + lineage-verify the trustedContextReceipt from the envelope
|
|
99
|
+
* (the current Ledger is never a substitute for the historical exposure);
|
|
100
|
+
* 2. validate the persisted output (V2) against the receipt's exposure;
|
|
101
|
+
* 3. per rule candidate: reconstruct the persisted recommendation
|
|
102
|
+
* deterministically (same artifact, unique recommendationRef match,
|
|
103
|
+
* byte-equal sourceRecommendation), then resolve the declared target:
|
|
104
|
+
* - recommendation_ref → the target principle candidate row of the same
|
|
105
|
+
* artifact → shared principle-candidate identity resolution (fail on
|
|
106
|
+
* ambiguity/missing/corrupt, never first-match);
|
|
107
|
+
* - canonical_principle → receipt exposure + current ledger eligibility;
|
|
108
|
+
* 4. anything unprovable stays a structured `unresolved` with nextAction.
|
|
109
|
+
*
|
|
110
|
+
* Semantic correctness is never claimed (`not_evaluated`).
|
|
111
|
+
*
|
|
112
|
+
* Delivery boundary (PRI-1146 P2-02): this resolver is NOT wired into any
|
|
113
|
+
* production path yet — no console, CLI or runner calls it, and nothing
|
|
114
|
+
* consumes its results outside tests. It reads the canonical persisted shape
|
|
115
|
+
* so a future Owner-facing read surface can adopt it unchanged; wiring it (and
|
|
116
|
+
* acting on any `proposed` result) is explicit follow-up work while
|
|
117
|
+
* OD-01/02/03 remain pending. It never writes ruleCandidateBindings, never
|
|
118
|
+
* triggers Scribe, never activates a Principle, and a `proposed` result is a
|
|
119
|
+
* system source declaration (`basis: 'source_declared_relation'`), never an
|
|
120
|
+
* Owner Identity Receipt.
|
|
121
|
+
*/
|
|
122
|
+
export declare function resolveSourceDeclaredRelations(input: ResolveSourceDeclaredRelationsInput): {
|
|
123
|
+
ok: true;
|
|
124
|
+
resolutions: SourceDeclaredRelationResolution[];
|
|
125
|
+
} | {
|
|
126
|
+
ok: false;
|
|
127
|
+
reason: string;
|
|
128
|
+
nextAction: string;
|
|
129
|
+
};
|
|
130
|
+
export {};
|
|
24
131
|
//# sourceMappingURL=diagnostician-association-shadow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostician-association-shadow.d.ts","sourceRoot":"","sources":["../../src/runtime/diagnostician-association-shadow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostician-association-shadow.d.ts","sourceRoot":"","sources":["../../src/runtime/diagnostician-association-shadow.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAyG,KAAK,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAmBtL,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,UAAU,GAAG,YAAY,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,KAAK,CAAC;CAC7B;AAED,mDAAmD;AACnD,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,yBAAyB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;CAC7D;AAED;;;;gEAIgE;AAChE,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,GACrB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,yBAAyB,EAAE,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CA0D1G;AAID,0EAA0E;AAC1E,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,6BAA6B,CAAC;CACrD;AAED;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,GACxC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC;IAC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CAAmC,GACzC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,gCAAgC,EAAE,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CA6InH"}
|
|
@@ -1,15 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only source-declared-relation resolution (SPEC-PD-RULE-ASSOCIATION-005
|
|
3
|
+
* v0.6 §6; PRI-1146).
|
|
4
|
+
*
|
|
5
|
+
* This module is the SHADOW half of rule→principle association: given the
|
|
6
|
+
* persisted V2 artifact (with its trustedContextReceipt), the persisted
|
|
7
|
+
* candidate rows of the same artifact, and the shared ledger identity ports,
|
|
8
|
+
* it reconstructs each rule recommendation's declared relation and resolves it
|
|
9
|
+
* to a canonical principleId — or a structured unresolved reason.
|
|
10
|
+
*
|
|
11
|
+
* Hard governance boundary (OD-01/02/03 pending):
|
|
12
|
+
* - every result carries `mode: 'shadow'` and `authorizesGeneration: false`;
|
|
13
|
+
* - a resolved result is a SYSTEM source declaration (`basis:
|
|
14
|
+
* 'source_declared_relation'`), NEVER an Owner Identity Receipt;
|
|
15
|
+
* - callers must not write ruleCandidateBindings, start Scribe, or treat a
|
|
16
|
+
* `proposed` result as approval/activation authority.
|
|
17
|
+
*
|
|
18
|
+
* The pure structural core is `validateDiagnosticianAssociations`
|
|
19
|
+
* (diagnostician-association-validation.ts); the ledger ports stay on
|
|
20
|
+
* PrincipleTreeLedgerAdapter — this module only composes them.
|
|
21
|
+
*/
|
|
1
22
|
import { Type } from '@sinclair/typebox';
|
|
2
23
|
import { Value } from '@sinclair/typebox/value';
|
|
3
|
-
import { DiagnosticianOutputV2Schema, DiagnosticianRecommendationV2Schema } from './diagnostician-output.js';
|
|
24
|
+
import { DiagnosticianOutputV2Schema, DiagnosticianRecommendationV2Schema, readDiagnosticianOutputFromEnvelope } from './diagnostician-output.js';
|
|
4
25
|
import { validateDiagnosticianAssociations } from './diagnostician-association-validation.js';
|
|
26
|
+
import { readRouterContextReceipt } from './internalization/router-context-evidence.js';
|
|
5
27
|
import { isCanonicalBindingPrincipleId } from './principle-tree/rule-candidate-binding.js';
|
|
6
28
|
const CandidateRowsSchema = Type.Array(Type.Object({
|
|
7
29
|
candidateId: Type.String({ minLength: 1 }), artifactId: Type.String({ minLength: 1 }),
|
|
8
30
|
sourceRecommendation: DiagnosticianRecommendationV2Schema,
|
|
9
31
|
}, { additionalProperties: false }));
|
|
10
32
|
const IdentitySchema = Type.Object({ status: Type.Literal('resolved'), candidateId: Type.String({ minLength: 1 }), principleId: Type.String() });
|
|
11
|
-
/**
|
|
12
|
-
|
|
33
|
+
/** Order-independent recommendationRef set comparison (P2-02). */
|
|
34
|
+
function sameRefSet(left, right) {
|
|
35
|
+
if (left.length !== right.length)
|
|
36
|
+
return false;
|
|
37
|
+
const a = [...left].sort();
|
|
38
|
+
const b = [...right].sort();
|
|
39
|
+
return a.every((value, index) => value === b[index]);
|
|
40
|
+
}
|
|
41
|
+
/** Offline/read-only composition over a hand-assembled context (tests and
|
|
42
|
+
* replay tooling). Like `resolveSourceDeclaredRelations` below, it has NO
|
|
43
|
+
* production caller yet — the envelope reader is the persisted-shape
|
|
44
|
+
* counterpart, not a wired production entry point (PRI-1146 P2-02: production
|
|
45
|
+
* delivery remains follow-up while OD-01/02/03 are pending). */
|
|
13
46
|
export function proposeShadowAssociations(output, context, sources) {
|
|
14
47
|
const { artifactId, candidates, resolvePrincipleCandidate } = sources;
|
|
15
48
|
const validation = validateDiagnosticianAssociations(output, context);
|
|
@@ -81,4 +114,174 @@ export function proposeShadowAssociations(output, context, sources) {
|
|
|
81
114
|
}
|
|
82
115
|
return { ok: true, proposals: proposed };
|
|
83
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Resolve the source-declared relation for EVERY rule candidate of one
|
|
119
|
+
* diagnostician artifact, strictly read-only:
|
|
120
|
+
*
|
|
121
|
+
* 1. read + lineage-verify the trustedContextReceipt from the envelope
|
|
122
|
+
* (the current Ledger is never a substitute for the historical exposure);
|
|
123
|
+
* 2. validate the persisted output (V2) against the receipt's exposure;
|
|
124
|
+
* 3. per rule candidate: reconstruct the persisted recommendation
|
|
125
|
+
* deterministically (same artifact, unique recommendationRef match,
|
|
126
|
+
* byte-equal sourceRecommendation), then resolve the declared target:
|
|
127
|
+
* - recommendation_ref → the target principle candidate row of the same
|
|
128
|
+
* artifact → shared principle-candidate identity resolution (fail on
|
|
129
|
+
* ambiguity/missing/corrupt, never first-match);
|
|
130
|
+
* - canonical_principle → receipt exposure + current ledger eligibility;
|
|
131
|
+
* 4. anything unprovable stays a structured `unresolved` with nextAction.
|
|
132
|
+
*
|
|
133
|
+
* Semantic correctness is never claimed (`not_evaluated`).
|
|
134
|
+
*
|
|
135
|
+
* Delivery boundary (PRI-1146 P2-02): this resolver is NOT wired into any
|
|
136
|
+
* production path yet — no console, CLI or runner calls it, and nothing
|
|
137
|
+
* consumes its results outside tests. It reads the canonical persisted shape
|
|
138
|
+
* so a future Owner-facing read surface can adopt it unchanged; wiring it (and
|
|
139
|
+
* acting on any `proposed` result) is explicit follow-up work while
|
|
140
|
+
* OD-01/02/03 remain pending. It never writes ruleCandidateBindings, never
|
|
141
|
+
* triggers Scribe, never activates a Principle, and a `proposed` result is a
|
|
142
|
+
* system source declaration (`basis: 'source_declared_relation'`), never an
|
|
143
|
+
* Owner Identity Receipt.
|
|
144
|
+
*/
|
|
145
|
+
export function resolveSourceDeclaredRelations(input) {
|
|
146
|
+
const { envelope, runOutput, candidates, taskId, runId, artifactId, runLineage } = input;
|
|
147
|
+
if (artifactId.trim() === '') {
|
|
148
|
+
return { ok: false, reason: 'candidate_material_invalid', nextAction: 'Load the candidate rows with their source artifact id.' };
|
|
149
|
+
}
|
|
150
|
+
if (runLineage.taskId !== taskId || runLineage.runId !== runId) {
|
|
151
|
+
return { ok: false, reason: 'run_lineage_mismatch', nextAction: 'Load the run output from the same persisted run as the artifact receipt; do not substitute another run.' };
|
|
152
|
+
}
|
|
153
|
+
const receiptRead = readRouterContextReceipt(envelope, { taskId, runId });
|
|
154
|
+
if (receiptRead.status !== 'available') {
|
|
155
|
+
return { ok: false, reason: receiptRead.reason, nextAction: receiptRead.nextAction };
|
|
156
|
+
}
|
|
157
|
+
const { receipt } = receiptRead;
|
|
158
|
+
// PRI-1146 P2-02: BOTH persisted sources must be independently valid and
|
|
159
|
+
// structurally identical. Never prefer one source over the other — two
|
|
160
|
+
// legal-but-different V2 outputs are NOT the same source.
|
|
161
|
+
const envelopeOutput = readDiagnosticianOutputFromEnvelope(envelope);
|
|
162
|
+
if (envelopeOutput === undefined) {
|
|
163
|
+
return { ok: false, reason: 'artifact_output_invalid', nextAction: 'The persisted artifact envelope does not contain a valid DiagnosticianOutputV2; re-run the diagnosis.' };
|
|
164
|
+
}
|
|
165
|
+
if (!Value.Check(DiagnosticianOutputV2Schema, runOutput)) {
|
|
166
|
+
return { ok: false, reason: 'run_output_invalid', nextAction: 'The persisted run output is missing or not a valid DiagnosticianOutputV2; reload the same run.' };
|
|
167
|
+
}
|
|
168
|
+
const artifactRefs = envelopeOutput.recommendations.map((item) => item.recommendationRef);
|
|
169
|
+
const runRefs = runOutput.recommendations.map((item) => item.recommendationRef);
|
|
170
|
+
if (!sameRefSet(artifactRefs, runRefs)) {
|
|
171
|
+
return { ok: false, reason: 'run_output_recommendation_ref_mismatch', nextAction: 'The artifact and run output declare different recommendations; treat the association as unresolved and re-run the diagnosis.' };
|
|
172
|
+
}
|
|
173
|
+
if (!Value.Equal(envelopeOutput, runOutput)) {
|
|
174
|
+
return { ok: false, reason: 'run_output_content_mismatch', nextAction: 'The artifact and run output hold different V2 content for the same run; treat the association as unresolved and re-run the diagnosis.' };
|
|
175
|
+
}
|
|
176
|
+
const output = envelopeOutput;
|
|
177
|
+
if (receipt.canonicalPrinciples.status !== 'available') {
|
|
178
|
+
return { ok: false, reason: 'context_invalid', nextAction: 'The trusted context exposure is not provable for this artifact; canonical associations stay unresolved.' };
|
|
179
|
+
}
|
|
180
|
+
const context = {
|
|
181
|
+
principleIds: receipt.canonicalPrinciples.principles.map((p) => p.principleId),
|
|
182
|
+
evidenceRefs: receipt.evidenceRefs,
|
|
183
|
+
};
|
|
184
|
+
const validation = validateDiagnosticianAssociations(output, context);
|
|
185
|
+
if (!validation.ok)
|
|
186
|
+
return validation;
|
|
187
|
+
const checksByRef = new Map(validation.checks.map((check) => [check.recommendationRef, check]));
|
|
188
|
+
const rowsByRef = new Map();
|
|
189
|
+
for (const row of candidates) {
|
|
190
|
+
if (row.artifactId !== artifactId || row.recommendationKind !== 'rule')
|
|
191
|
+
continue;
|
|
192
|
+
if (rowsByRef.has(row.sourceRecommendation.recommendationRef)) {
|
|
193
|
+
return { ok: false, reason: 'candidate_material_invalid', nextAction: `Duplicate candidate rows for recommendationRef ${row.sourceRecommendation.recommendationRef} under artifact ${artifactId}.` };
|
|
194
|
+
}
|
|
195
|
+
rowsByRef.set(row.sourceRecommendation.recommendationRef, row);
|
|
196
|
+
}
|
|
197
|
+
const unresolved = (args) => ({ mode: 'shadow', candidateId: args.candidateId, recommendationRef: args.recommendationRef, status: 'unresolved', reason: args.reason, nextAction: args.nextAction, authorizesGeneration: false });
|
|
198
|
+
const resolutions = [];
|
|
199
|
+
for (const [recommendationRef, row] of rowsByRef) {
|
|
200
|
+
const rule = output.recommendations.find((item) => item.recommendationRef === recommendationRef);
|
|
201
|
+
if (rule?.kind !== 'rule' || rule.principleAssociation.status !== 'linked') {
|
|
202
|
+
const check = checksByRef.get(recommendationRef);
|
|
203
|
+
resolutions.push(unresolved({
|
|
204
|
+
candidateId: row.candidateId, recommendationRef,
|
|
205
|
+
reason: rule?.kind === 'rule' ? (rule.principleAssociation.status === 'unresolved' ? rule.principleAssociation.reason : 'source_relation_invalid') : (check?.reason ?? 'source_relation_invalid'),
|
|
206
|
+
nextAction: 'Keep the candidate in the Owner exception queue; no Scribe call is authorized.',
|
|
207
|
+
}));
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
// Deterministic reconstruction: the persisted recommendation must be
|
|
211
|
+
// byte-equal to the artifact's rule recommendation.
|
|
212
|
+
if (!Value.Equal(row.sourceRecommendation, rule)) {
|
|
213
|
+
resolutions.push(unresolved({
|
|
214
|
+
candidateId: row.candidateId, recommendationRef, reason: 'source_relation_stale',
|
|
215
|
+
nextAction: 'The persisted candidate recommendation no longer matches the artifact; keep both for audit and re-run the diagnosis.',
|
|
216
|
+
}));
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
const { target } = rule.principleAssociation;
|
|
220
|
+
if (target.type === 'canonical_principle') {
|
|
221
|
+
const eligibility = input.resolveCanonicalEligibility(target.principleId);
|
|
222
|
+
if (!eligibility.eligible) {
|
|
223
|
+
const ledgerUnprovable = eligibility.reason === 'ledger_unavailable' || eligibility.reason === 'ledger_corrupt';
|
|
224
|
+
resolutions.push(unresolved({
|
|
225
|
+
candidateId: row.candidateId, recommendationRef,
|
|
226
|
+
reason: eligibility.reason === 'missing' ? 'target_missing'
|
|
227
|
+
: eligibility.reason === 'ineligible' ? 'target_ineligible'
|
|
228
|
+
: eligibility.reason,
|
|
229
|
+
nextAction: ledgerUnprovable
|
|
230
|
+
? 'The Principle Ledger could not be read; repair the ledger read path and retry the read-only resolution. Canonical associations stay unresolved.'
|
|
231
|
+
: 'Review the target principle in the Owner Console; it is missing or not in an eligible lifecycle state.',
|
|
232
|
+
}));
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
resolutions.push({
|
|
236
|
+
mode: 'shadow', candidateId: row.candidateId, recommendationRef,
|
|
237
|
+
status: 'proposed', reason: 'canonical_identity_proposed', basis: 'source_declared_relation',
|
|
238
|
+
principleId: target.principleId, semanticCorrectness: 'not_evaluated', authorizesGeneration: false,
|
|
239
|
+
});
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
// recommendation_ref target: unique principle-kind candidate of the SAME artifact.
|
|
243
|
+
const targetOutput = output.recommendations.find((item) => item.recommendationRef === target.recommendationRef);
|
|
244
|
+
const targetRowsAll = candidates.filter((candidateRow) => candidateRow.artifactId === artifactId && candidateRow.sourceRecommendation.recommendationRef === target.recommendationRef);
|
|
245
|
+
const [targetRow] = targetRowsAll;
|
|
246
|
+
if (targetRowsAll.length !== 1 || targetRow === undefined || targetOutput?.kind !== 'principle'
|
|
247
|
+
|| !Value.Equal(targetRow.sourceRecommendation, targetOutput)) {
|
|
248
|
+
resolutions.push(unresolved({
|
|
249
|
+
candidateId: row.candidateId, recommendationRef, reason: 'candidate_mapping_invalid',
|
|
250
|
+
nextAction: 'The declared recommendation_ref target does not map to exactly one principle candidate of the same artifact.',
|
|
251
|
+
}));
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
let identity;
|
|
255
|
+
try {
|
|
256
|
+
identity = input.resolvePrincipleCandidate(targetRow.candidateId);
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
resolutions.push(unresolved({
|
|
260
|
+
candidateId: row.candidateId, recommendationRef, reason: 'identity_source_unavailable',
|
|
261
|
+
nextAction: 'The ledger identity source threw; inspect the Principle Ledger and retry the read-only resolution.',
|
|
262
|
+
}));
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
if (Value.Check(IdentitySchema, identity) && identity.candidateId === targetRow.candidateId && isCanonicalBindingPrincipleId(identity.principleId)) {
|
|
266
|
+
resolutions.push({
|
|
267
|
+
mode: 'shadow', candidateId: row.candidateId, recommendationRef,
|
|
268
|
+
status: 'proposed', reason: 'canonical_identity_proposed', basis: 'source_declared_relation',
|
|
269
|
+
principleId: identity.principleId, targetCandidateId: targetRow.candidateId,
|
|
270
|
+
semanticCorrectness: 'not_evaluated', authorizesGeneration: false,
|
|
271
|
+
});
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
const failureSchema = Type.Object({ status: Type.Literal('unresolved'), reason: Type.Union([
|
|
275
|
+
Type.Literal('ledger_unavailable'), Type.Literal('ledger_corrupt'), Type.Literal('ambiguous'),
|
|
276
|
+
Type.Literal('conflicting_authorities'), Type.Literal('target_missing'), Type.Literal('target_ineligible'),
|
|
277
|
+
Type.Literal('missing'),
|
|
278
|
+
]) });
|
|
279
|
+
resolutions.push(unresolved({
|
|
280
|
+
candidateId: row.candidateId, recommendationRef,
|
|
281
|
+
reason: Value.Check(failureSchema, identity) ? identity.reason : 'related_candidate_unresolved',
|
|
282
|
+
nextAction: 'The target principle candidate has no canonical identity yet (reuse/create decision pending) or the ledger is unavailable.',
|
|
283
|
+
}));
|
|
284
|
+
}
|
|
285
|
+
return { ok: true, resolutions };
|
|
286
|
+
}
|
|
84
287
|
//# sourceMappingURL=diagnostician-association-shadow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostician-association-shadow.js","sourceRoot":"","sources":["../../src/runtime/diagnostician-association-shadow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,mCAAmC,EAAE,MAAM,2BAA2B,CAAC;AAC7G,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAC9F,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAE3F,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;IACjD,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACrF,oBAAoB,EAAE,mCAAmC;CAC1D,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACrC,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,C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Source: Diagnostician v2 Detailed Design, Section 11
|
|
5
5
|
* Source: PD Runtime Protocol SPEC v1, Section 18
|
|
6
|
+
* Source: SPEC-PD-RULE-ASSOCIATION-005 v0.6 (V2 Only / Clean Break, PRI-1146)
|
|
6
7
|
*
|
|
7
8
|
* This is the single structured output contract for diagnosis results.
|
|
8
|
-
* All runtime adapters producing diagnostician output must conform to this
|
|
9
|
+
* All runtime adapters producing diagnostician output must conform to this
|
|
10
|
+
* schema. `DiagnosticianOutputV1` was fully retired in PRI-1146: V2 is the
|
|
11
|
+
* only production contract, and no V1 compatibility path exists.
|
|
9
12
|
*/
|
|
10
13
|
import { type Static } from '@sinclair/typebox';
|
|
11
14
|
import type { DiagnosticianContextPayload } from './context-payload.js';
|
|
@@ -22,62 +25,15 @@ export declare const DiagnosticianEvidenceSchema: import("@sinclair/typebox").TO
|
|
|
22
25
|
export type DiagnosticianEvidence = Static<typeof DiagnosticianEvidenceSchema>;
|
|
23
26
|
export declare const RecommendationKindSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"principle">, import("@sinclair/typebox").TLiteral<"rule">, import("@sinclair/typebox").TLiteral<"implementation">, import("@sinclair/typebox").TLiteral<"prompt">, import("@sinclair/typebox").TLiteral<"defer">]>;
|
|
24
27
|
export type RecommendationKind = Static<typeof RecommendationKindSchema>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
valid: import("@sinclair/typebox").TBoolean;
|
|
35
|
-
diagnosisId: import("@sinclair/typebox").TString;
|
|
36
|
-
summary: import("@sinclair/typebox").TString;
|
|
37
|
-
rootCause: import("@sinclair/typebox").TString;
|
|
38
|
-
violatedPrinciples: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
39
|
-
principleId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
40
|
-
title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
41
|
-
rationale: import("@sinclair/typebox").TString;
|
|
42
|
-
}>>;
|
|
43
|
-
evidence: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
44
|
-
sourceRef: import("@sinclair/typebox").TString;
|
|
45
|
-
note: import("@sinclair/typebox").TString;
|
|
46
|
-
}>>;
|
|
47
|
-
recommendations: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
48
|
-
kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"principle">, import("@sinclair/typebox").TLiteral<"rule">, import("@sinclair/typebox").TLiteral<"implementation">, import("@sinclair/typebox").TLiteral<"prompt">, import("@sinclair/typebox").TLiteral<"defer">]>;
|
|
49
|
-
description: import("@sinclair/typebox").TString;
|
|
50
|
-
triggerPattern: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
51
|
-
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
|
-
abstractedPrinciple: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
53
|
-
}>>;
|
|
54
|
-
confidence: import("@sinclair/typebox").TNumber;
|
|
55
|
-
ambiguityNotes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
56
|
-
/**
|
|
57
|
-
* PRI-468: Optional intent tension passed through from Stage A.
|
|
58
|
-
*
|
|
59
|
-
* Present only when:
|
|
60
|
-
* 1. The `intent_engineering` flag is on, AND
|
|
61
|
-
* 2. Stage A emitted an intentTension, AND
|
|
62
|
-
* 3. Stage C additive passthrough copied it here.
|
|
63
|
-
*
|
|
64
|
-
* Stage C MUST NOT generate intentTension when Stage A omitted it
|
|
65
|
-
* (SPEC §18.2 — additive only, never generates).
|
|
66
|
-
*
|
|
67
|
-
* This field is additive — existing consumers that don't know about
|
|
68
|
-
* intentTension will ignore it (SPEC §18.3 — don't break downstream).
|
|
69
|
-
*/
|
|
70
|
-
intentTension: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
71
|
-
source: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"none">, import("@sinclair/typebox").TLiteral<"action_drift">, import("@sinclair/typebox").TLiteral<"intent_suspect">, import("@sinclair/typebox").TLiteral<"healthy_tension">]>;
|
|
72
|
-
evidenceStrength: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"weak">, import("@sinclair/typebox").TLiteral<"moderate">, import("@sinclair/typebox").TLiteral<"strong">]>;
|
|
73
|
-
relatedIntentFields: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"why">, import("@sinclair/typebox").TLiteral<"desired_outcome">, import("@sinclair/typebox").TLiteral<"non_negotiables">, import("@sinclair/typebox").TLiteral<"stop_escalation">, import("@sinclair/typebox").TLiteral<"current_strategic_focus">]>>;
|
|
74
|
-
evidence: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
75
|
-
explanation: import("@sinclair/typebox").TString;
|
|
76
|
-
suggestedOwnerAction: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"confirm_drift">, import("@sinclair/typebox").TLiteral<"revise_intent">, import("@sinclair/typebox").TLiteral<"observe">, import("@sinclair/typebox").TLiteral<"dismiss">, import("@sinclair/typebox").TLiteral<"promote_to_principle">, import("@sinclair/typebox").TLiteral<"promote_to_rulehost">]>;
|
|
77
|
-
intentDocHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
78
|
-
}>>;
|
|
79
|
-
}>;
|
|
80
|
-
export type DiagnosticianOutputV1 = Static<typeof DiagnosticianOutputV1Schema>;
|
|
28
|
+
/**
|
|
29
|
+
* Artifact-local, model-declared relation between a rule recommendation and a
|
|
30
|
+
* principle. `recommendation_ref` targets must point at the unique
|
|
31
|
+
* `kind: "principle"` recommendation inside the SAME artifact;
|
|
32
|
+
* `canonical_principle` targets must be a principleId the system actually
|
|
33
|
+
* exposed to the model in the trusted context of this run (verified
|
|
34
|
+
* downstream against the trustedContextReceipt — never against the model's
|
|
35
|
+
* own claim).
|
|
36
|
+
*/
|
|
81
37
|
export declare const PrincipleAssociationSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
82
38
|
status: import("@sinclair/typebox").TLiteral<"linked">;
|
|
83
39
|
relation: import("@sinclair/typebox").TLiteral<"implements">;
|
|
@@ -95,6 +51,13 @@ export declare const PrincipleAssociationSchema: import("@sinclair/typebox").TUn
|
|
|
95
51
|
reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no_supported_target">, import("@sinclair/typebox").TLiteral<"ambiguous_target">, import("@sinclair/typebox").TLiteral<"insufficient_evidence">, import("@sinclair/typebox").TLiteral<"principle_not_in_context">]>;
|
|
96
52
|
candidateRecommendationRefs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
97
53
|
}>]>;
|
|
54
|
+
export type PrincipleAssociation = Static<typeof PrincipleAssociationSchema>;
|
|
55
|
+
/**
|
|
56
|
+
* V2 recommendation: every entry carries an artifact-locally-unique
|
|
57
|
+
* `recommendationRef`. Only `kind: "rule"` may carry a `principleAssociation`
|
|
58
|
+
* (enforced structurally: the non-rule variant has `additionalProperties: false`
|
|
59
|
+
* without the field).
|
|
60
|
+
*/
|
|
98
61
|
export declare const DiagnosticianRecommendationV2Schema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
99
62
|
description: import("@sinclair/typebox").TString;
|
|
100
63
|
abstractedPrinciple: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -127,6 +90,7 @@ export declare const DiagnosticianRecommendationV2Schema: import("@sinclair/type
|
|
|
127
90
|
kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"principle">, import("@sinclair/typebox").TLiteral<"implementation">, import("@sinclair/typebox").TLiteral<"prompt">, import("@sinclair/typebox").TLiteral<"defer">]>;
|
|
128
91
|
recommendationRef: import("@sinclair/typebox").TString;
|
|
129
92
|
}>]>;
|
|
93
|
+
export type DiagnosticianRecommendationV2 = Static<typeof DiagnosticianRecommendationV2Schema>;
|
|
130
94
|
export declare const DiagnosticianOutputV2Schema: import("@sinclair/typebox").TObject<{
|
|
131
95
|
valid: import("@sinclair/typebox").TBoolean;
|
|
132
96
|
diagnosisId: import("@sinclair/typebox").TString;
|
|
@@ -141,32 +105,6 @@ export declare const DiagnosticianOutputV2Schema: import("@sinclair/typebox").TO
|
|
|
141
105
|
sourceRef: import("@sinclair/typebox").TString;
|
|
142
106
|
note: import("@sinclair/typebox").TString;
|
|
143
107
|
}>>;
|
|
144
|
-
confidence: import("@sinclair/typebox").TNumber;
|
|
145
|
-
ambiguityNotes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
146
|
-
/**
|
|
147
|
-
* PRI-468: Optional intent tension passed through from Stage A.
|
|
148
|
-
*
|
|
149
|
-
* Present only when:
|
|
150
|
-
* 1. The `intent_engineering` flag is on, AND
|
|
151
|
-
* 2. Stage A emitted an intentTension, AND
|
|
152
|
-
* 3. Stage C additive passthrough copied it here.
|
|
153
|
-
*
|
|
154
|
-
* Stage C MUST NOT generate intentTension when Stage A omitted it
|
|
155
|
-
* (SPEC §18.2 — additive only, never generates).
|
|
156
|
-
*
|
|
157
|
-
* This field is additive — existing consumers that don't know about
|
|
158
|
-
* intentTension will ignore it (SPEC §18.3 — don't break downstream).
|
|
159
|
-
*/
|
|
160
|
-
intentTension: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
161
|
-
source: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"none">, import("@sinclair/typebox").TLiteral<"action_drift">, import("@sinclair/typebox").TLiteral<"intent_suspect">, import("@sinclair/typebox").TLiteral<"healthy_tension">]>;
|
|
162
|
-
evidenceStrength: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"weak">, import("@sinclair/typebox").TLiteral<"moderate">, import("@sinclair/typebox").TLiteral<"strong">]>;
|
|
163
|
-
relatedIntentFields: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"why">, import("@sinclair/typebox").TLiteral<"desired_outcome">, import("@sinclair/typebox").TLiteral<"non_negotiables">, import("@sinclair/typebox").TLiteral<"stop_escalation">, import("@sinclair/typebox").TLiteral<"current_strategic_focus">]>>;
|
|
164
|
-
evidence: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
165
|
-
explanation: import("@sinclair/typebox").TString;
|
|
166
|
-
suggestedOwnerAction: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"confirm_drift">, import("@sinclair/typebox").TLiteral<"revise_intent">, import("@sinclair/typebox").TLiteral<"observe">, import("@sinclair/typebox").TLiteral<"dismiss">, import("@sinclair/typebox").TLiteral<"promote_to_principle">, import("@sinclair/typebox").TLiteral<"promote_to_rulehost">]>;
|
|
167
|
-
intentDocHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
168
|
-
}>>;
|
|
169
|
-
schemaVersion: import("@sinclair/typebox").TLiteral<"diagnostician-output-v2">;
|
|
170
108
|
recommendations: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
171
109
|
description: import("@sinclair/typebox").TString;
|
|
172
110
|
abstractedPrinciple: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -199,8 +137,53 @@ export declare const DiagnosticianOutputV2Schema: import("@sinclair/typebox").TO
|
|
|
199
137
|
kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"principle">, import("@sinclair/typebox").TLiteral<"implementation">, import("@sinclair/typebox").TLiteral<"prompt">, import("@sinclair/typebox").TLiteral<"defer">]>;
|
|
200
138
|
recommendationRef: import("@sinclair/typebox").TString;
|
|
201
139
|
}>]>>;
|
|
140
|
+
confidence: import("@sinclair/typebox").TNumber;
|
|
141
|
+
ambiguityNotes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
142
|
+
/**
|
|
143
|
+
* PRI-468: Optional intent tension passed through from Stage A.
|
|
144
|
+
*
|
|
145
|
+
* Present only when:
|
|
146
|
+
* 1. The `intent_engineering` flag is on, AND
|
|
147
|
+
* 2. Stage A emitted an intentTension, AND
|
|
148
|
+
* 3. Stage C additive passthrough copied it here.
|
|
149
|
+
*
|
|
150
|
+
* Stage C MUST NOT generate intentTension when Stage A omitted it
|
|
151
|
+
* (SPEC §18.2 — additive only, never generates).
|
|
152
|
+
*/
|
|
153
|
+
intentTension: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
154
|
+
source: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"none">, import("@sinclair/typebox").TLiteral<"action_drift">, import("@sinclair/typebox").TLiteral<"intent_suspect">, import("@sinclair/typebox").TLiteral<"healthy_tension">]>;
|
|
155
|
+
evidenceStrength: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"weak">, import("@sinclair/typebox").TLiteral<"moderate">, import("@sinclair/typebox").TLiteral<"strong">]>;
|
|
156
|
+
relatedIntentFields: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"why">, import("@sinclair/typebox").TLiteral<"desired_outcome">, import("@sinclair/typebox").TLiteral<"non_negotiables">, import("@sinclair/typebox").TLiteral<"stop_escalation">, import("@sinclair/typebox").TLiteral<"current_strategic_focus">]>>;
|
|
157
|
+
evidence: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
158
|
+
explanation: import("@sinclair/typebox").TString;
|
|
159
|
+
suggestedOwnerAction: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"confirm_drift">, import("@sinclair/typebox").TLiteral<"revise_intent">, import("@sinclair/typebox").TLiteral<"observe">, import("@sinclair/typebox").TLiteral<"dismiss">, import("@sinclair/typebox").TLiteral<"promote_to_principle">, import("@sinclair/typebox").TLiteral<"promote_to_rulehost">]>;
|
|
160
|
+
intentDocHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
161
|
+
}>>;
|
|
162
|
+
schemaVersion: import("@sinclair/typebox").TLiteral<"diagnostician-output-v2">;
|
|
202
163
|
}>;
|
|
203
164
|
export type DiagnosticianOutputV2 = Static<typeof DiagnosticianOutputV2Schema>;
|
|
165
|
+
/**
|
|
166
|
+
* Envelope keys the router adds around the committed output inside
|
|
167
|
+
* `artifacts.content_json` / `pi_artifacts.contentJson`. The run's own
|
|
168
|
+
* `outputPayload` is always the bare output; committed artifacts carry the
|
|
169
|
+
* envelope. The V2 root is closed (`additionalProperties: false`), so readers
|
|
170
|
+
* MUST go through `readDiagnosticianOutputFromEnvelope` instead of checking
|
|
171
|
+
* persisted artifact JSON against the schema directly.
|
|
172
|
+
*/
|
|
173
|
+
export declare const DIAGNOSTICIAN_ENVELOPE_KEYS: readonly ['trustedContextReceipt', 'associationValidation'];
|
|
174
|
+
/**
|
|
175
|
+
* Read a persisted diagnostician payload as a validated DiagnosticianOutputV2.
|
|
176
|
+
*
|
|
177
|
+
* Accepts either shape a consumer can legitimately encounter:
|
|
178
|
+
* 1. the bare V2 output (run `outputPayload`, and artifact rows written
|
|
179
|
+
* without the receipt envelope);
|
|
180
|
+
* 2. the router artifact envelope — the V2 output plus the receipt keys —
|
|
181
|
+
* by stripping `DIAGNOSTICIAN_ENVELOPE_KEYS` before validation.
|
|
182
|
+
*
|
|
183
|
+
* Returns `undefined` for anything else — including retired V1 payloads
|
|
184
|
+
* (PRI-1146 Clean Break: they are not readable, callers fail loud/structured).
|
|
185
|
+
*/
|
|
186
|
+
export declare function readDiagnosticianOutputFromEnvelope(value: unknown): DiagnosticianOutputV2 | undefined;
|
|
204
187
|
/**
|
|
205
188
|
* TypeBox schema for diagnostician invocation input.
|
|
206
189
|
* The `context` field uses Type.Unknown() because cross-file TypeBox schema
|