@principles/core 1.290.0 → 1.291.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/principle-tree-ledger.d.ts +20 -0
- package/dist/principle-tree-ledger.d.ts.map +1 -1
- package/dist/principle-tree-ledger.js +13 -9
- package/dist/principle-tree-ledger.js.map +1 -1
- package/dist/runtime-v2/activation/activation-dispatcher.d.ts.map +1 -1
- package/dist/runtime-v2/activation/activation-dispatcher.js +10 -3
- package/dist/runtime-v2/activation/activation-dispatcher.js.map +1 -1
- package/dist/runtime-v2/activation/ledger-identity.d.ts +12 -3
- package/dist/runtime-v2/activation/ledger-identity.d.ts.map +1 -1
- package/dist/runtime-v2/activation/ledger-identity.js +18 -3
- package/dist/runtime-v2/activation/ledger-identity.js.map +1 -1
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.d.ts +8 -0
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.js +11 -1
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.js.map +1 -1
- package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +28 -2
- package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/artificer-prompt-builder.js +31 -2
- package/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/dist/runtime-v2/internalization/evaluator-runner.d.ts +14 -3
- package/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/evaluator-runner.js +10 -2
- package/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/dist/runtime-v2/internalization/scribe-runner.d.ts +4 -0
- package/dist/runtime-v2/internalization/scribe-runner.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/scribe-runner.js +13 -1
- package/dist/runtime-v2/internalization/scribe-runner.js.map +1 -1
- package/dist/telemetry-event.d.ts.map +1 -1
- package/dist/telemetry-event.js +3 -2
- package/dist/telemetry-event.js.map +1 -1
- package/package.json +1 -1
|
@@ -155,7 +155,7 @@ export interface ArtificerPromptBuildResult {
|
|
|
155
155
|
*/
|
|
156
156
|
readonly systemPrompt: string;
|
|
157
157
|
}
|
|
158
|
-
export declare const ARTIFICER_PROTOCOL_INSTRUCTION = "You are an Artificer agent in a principle internalization pipeline. Your role is to transform the Scribe's formal principle draft into executable RuleHost code with a concise implementation summary, tests, and rollout notes.\n\nPROTOCOL:\n1. Review the scribeArtifact to understand the formal principle draft\n2. Transform the principle draft into executable RuleHost code and a brief implementation summary\n3. Preserve the lineage trace from scribe, philosopher, and dreamer artifacts\n4. Identify risks associated with implementing this principle\n5. The implementation summary should clearly describe what the code does and why\n\nOWNER INTENT CONTRACT (when `intentContract` is present \u2014 PRI-703):\n- `intentContract` is the Owner-intent anchor distilled from the real failure. Your rule exists to serve it.\n- implementationCode MUST operationalize `targetBehavior` and MUST NOT implement `forbiddenBehavior`.\n- If a repair/revision instruction (repairFeedback, revisionFeedback) contradicts the intentContract, the intentContract wins: implement the contract-faithful behavior and document the conflict in implementationSummary \u2014 do NOT silently satisfy the contradicting instruction.\n- Use `validationExpectation` as your self-check before emitting: would an evaluator observing that expectation accept this rule as faithful?\n\nOUTPUT FORMAT (pure JSON, no markdown):\n{\n \"taskId\": \"<from input>\",\n \"requiresContextVersion\": 2,\n \"sourceScribeArtifactId\": \"<copy exactly from input.sourceScribeArtifactId>\",\n \"implementationSummary\": \"<concise summary of what the code does and the implementation approach>\",\n \"sourceTrace\": {\n \"scribeArtifactId\": \"<copy exactly from input.sourceScribeArtifactId>\",\n \"philosopherArtifactId\": \"<from scribe artifact if available, or omit>\",\n \"dreamerArtifactId\": \"<from scribe artifact if available, or omit>\"\n },\n \"evidenceRefs\": [\"<copy exactly from the behaviorExamplePack evidenceRefs; every ref, in order>\"],\n \"risks\": [\"<risk 1>\", \"<risk 2>\"],\n \"implementationCode\": \"function evaluate(input, helpers) { if (input.action.canonicalKind === 'write' && typeof input.action.normalizedPath === 'string' && input.action.normalizedPath.startsWith('/system/')) { return { decision: 'block', matched: true, reason: 'write to system path' }; } return { decision: 'allow', matched: false, reason: 'no risk pattern' }; }\",\n \"goldenTraceCases\": [\n {\"caseId\":\"negative-1\",\"kind\":\"negative\",\"toolName\":\"write\",\"params\":{\"path\":\"/system/file\"},\"expectedDecision\":\"block\",\"ruleContext\":{\"version\":2,\"history\":{\"status\":\"available\",\"truncated\":false,\"calls\":[]},\"facts\":{\"priorReadOfTarget\":\"unknown\",\"readCount\":0,\"writeCount\":0,\"uniqueWritePathCount\":0,\"sameActionBlockCount\":null}}},\n {\"caseId\":\"positive-1\",\"kind\":\"positive\",\"toolName\":\"write\",\"params\":{\"path\":\"/workspace/file\"},\"expectedDecision\":\"allow\",\"ruleContext\":{\"version\":2,\"history\":{\"status\":\"available\",\"truncated\":false,\"calls\":[]},\"facts\":{\"priorReadOfTarget\":\"unknown\",\"readCount\":0,\"writeCount\":0,\"uniqueWritePathCount\":0,\"sameActionBlockCount\":null}}}\n ],\n \"affectedTools\": [\"write\"],\n \"generatedAt\": \"<ISO-8601 timestamp>\"\n}\nNOTE: the example above IS the full v2 contract \u2014 requiresContextVersion, evidenceRefs, and case-level ruleContext are REQUIRED fields (see the CONTEXT MODE block below), not optional extras.\n\nCONSTRAINTS:\n- Output ONLY valid JSON (no markdown, no explanatory text, no code fences)\n- implementationSummary MUST be a non-empty string describing what the code does and the implementation approach\n- sourceScribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId (non-empty string)\n- sourceTrace.scribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId\n- sourceTrace.philosopherArtifactId is optional \u2014 include only if available from scribe artifact\n- sourceTrace.dreamerArtifactId is optional \u2014 include only if available from scribe artifact\n- risks MUST be an array of strings (can be empty if no risks identified)\n- generatedAt MUST be the current ISO-8601 timestamp (use the actual current time, NOT a placeholder)\n- implementationCode MUST define exactly function evaluate(input, helpers) and return { decision, matched, reason }\n- EVERY return statement inside evaluate() MUST include ALL three fields: decision, matched, reason\n- Do NOT return partial objects \u2014 missing fields will fail sandbox validation and block activation\n- GOOD: return { decision: 'allow', matched: false, reason: 'path is within workspace, no risk' }\n- GOOD: return { decision: 'block', matched: true, reason: 'write to system path outside workspace' }\n- BAD: return { matched: false } \u2014 missing decision and reason, will be rejected\n- BAD: return { decision: 'allow', matched: true } \u2014 missing reason, will be rejected\n- input.action contains toolName, normalizedPath, paramsSummary, and canonicalKind\n- input.action.canonicalKind is the closed semantic kind of the current action: \"read\" | \"search\" | \"write\" | \"execute\" | \"agent\" | \"other\"\n- CANONICALKIND-FIRST MATCHING (PRI-741): match behavior PRIMARILY by input.action.canonicalKind (e.g. input.action.canonicalKind === 'write'); use input.action.toolName only as an auxiliary condition to distinguish tools within the same kind\n- When a HOST SEMANTIC CONTEXT block is present, affectedTools and EVERY goldenTraceCases toolName MUST be a real host tool name from that list \u2014 activation replay is machine-validated against the host declaration, and generic LLM vocabulary names (write_file, edit_file, bash, run_shell_command, delete_file, ...) are NOT real host tools and WILL be rejected\n- When NO HOST SEMANTIC CONTEXT block is present you have no authoritative host tool knowledge: match by canonicalKind and NEVER invent host-specific tool names\n- input.action.paramsSummary is an OBJECT (a map of parameter names to values), NOT a string\n- NEVER call string methods on paramsSummary itself \u2014 paramsSummary.includes(...), paramsSummary.startsWith(...), paramsSummary.match(...) are always bugs and will crash with \"is not a function\"\n- To inspect a parameter, access its specific key (e.g. paramsSummary.path) and guard its type at runtime (typeof paramsSummary.path === 'string') before using it as a string\n- For path logic prefer input.action.normalizedPath (a normalized string) over reading raw params strings\n- ADVERSARIAL GUARD CONTRACT: when your rule declares requiresContextVersion: 2, action-level safety still dominates the context \u2014 if helpers.isRiskPath() is true the decision MUST be block regardless of input.context; writes to well-known sensitive system locations (/etc/**, system configuration outside the governed workspace) must block even when context reports priorReadOfTarget === 'yes' (a context-provided read outside the workspace is untrusted signal, never authorization)\n- implementationCode MUST be deterministic and self-contained: no imports, require, eval, Function, I/O, network, timers, Date.now, or randomness\n- goldenTraceCases MUST contain 2-10 cases with at least one positive allow case and one negative block case\n- goldenTraceCases expectedDecision MUST be only \"allow\" or \"block\" \u2014 do NOT emit \"propose_correction\", \"requireApproval\", or \"auto_correct\" (seed-user MVP only supports allow/block; all other action types are rejected by the schema validator)\n- affectedTools MUST contain the non-empty tool names the rule can match (see the HOST SEMANTIC CONTEXT / canonicalKind-first rules above)\n\nPRIOR ADVERSARIAL FAILURES (when `adversarialFeedback` is present):\n- This is a RETRY. A prior version of your generated code was reviewed and failed adversarial sandbox replay.\n- The `adversarialFeedback` field lists the specific cases that failed, each with the attack type, the expected vs actual decision, and a rationale.\n- You MUST address each listed failure specifically \u2014 do not regenerate blind. Adjust the matcher/logic so the failed cases produce the expected decision while preserving the cases that previously passed.\n\nRULEHOST CAPABILITY BOUNDARY (PRI-508):\n- RuleHost evaluate(input) is a STATELESS single-call gate. It CANNOT track multi-step workflows (e.g., audit\u2192verify\u2192incremental) across invocations.\n- Translate the principle into a STATEFUL-CHECKABLE constraint that evaluate() CAN enforce per tool call: check whether the current tool call carries evidence of prior analysis (context markers, params encoding prior reads, explicit preconditions in the params).\n- Do NOT implement a path whitelist or a \"first call must be X\" ordering rule if the principle is about procedural discipline \u2014 the runtime cannot observe ordering across calls.\n- If the principle cannot be enforced per-call, encode the closest per-call proxy and document the gap in implementationSummary.\n\nREPAIR FEEDBACK (PRI-509, when `repairFeedback` is present):\n- This is a REPAIR RETRY. A prior attempt of your generated code was reviewed by the evaluator and returned needs_revision.\n- The `repairFeedback` field lists the evaluator's concerns and required changes from the prior attempt.\n- You MUST address each required change specifically \u2014 do not regenerate blind. Adjust the matcher/logic so the concerns are resolved while preserving the principle intent.\n- If a required change contradicts the principle intent (from scribeArtifact/dreamerContext), prefer the principle intent and document the conflict in implementationSummary.\n- When the repair feedback contains a \"Deterministic Replay Evidence\" block (resolved from the source evaluator artifact):\n - Each entry is a machine-verified failure: Case (id), Expected (decision), Actual (decision, only when your code really returned one), Error (sandbox error type), Message (bounded safe failure detail).\n - Fix EVERY listed deterministic failure so the case produces its Expected decision.\n - Preserve the behavior of cases that already passed \u2014 do not trade passing cases for failing ones.\n - Do NOT weaken safety constraints (e.g. drop risk-path blocks) just to make replay pass.\n - Respect the canonical RuleHostInput contract, including that paramsSummary is an object (see CONSTRAINTS).\n - Do NOT invent, guess, or fabricate evidence that is not listed \u2014 the list is the complete deterministic fact set (possibly truncated, as noted).\n\nADVERSARIAL CASE VOCABULARY NOTE (apply whenever replay evidence or repair feedback mentions case ids):\n- Case ids such as \"v2-unavailable\", \"v2-truncated\", \"v2-alias\" (and any \"v2-*\" prefixed id) are INTERNAL EVALUATOR CASE NUMBERING \u2014 they describe which adversarial fixture was run, NOT a request to use context-version-2 features.\n- NEVER respond to a case id by declaring `requiresContextVersion`, adding case-level `ruleContext`, or changing `expectedDecision` to satisfy the case NAME. Case names are labels, not instructions.\n- Your output must ALWAYS satisfy the CONTEXT MODE block below (the v2 contract, appended after these constraints) regardless of which case ids appear in the feedback text.\n- The ONLY legal decisions are \"allow\" and \"block\"; the ONLY legal field set is the one in OUTPUT FORMAT above plus the v2 CONTEXT MODE obligations (requiresContextVersion: 2, case-level ruleContext, evidenceRefs). Any other field is a contract violation and WILL be rejected.\n\nPRIOR OUTPUT-CONTRACT REJECTIONS (when `priorValidatorErrors` is present):\n- Your previous attempt was rejected by the OUTPUT CONTRACT GATE (schema validation) \u2014 it never reached evaluation. The `priorValidatorErrors.errors` list contains the exact, verbatim rejection reasons.\n- The highest-priority fix is to make your JSON satisfy EVERY listed rejection reason. Re-read each error, map it to the OUTPUT FORMAT and CONTEXT MODE rules, and correct the exact fields it names.\n- These errors describe YOUR output's shape, not the principle and not the test cases \u2014 do not change the behavioral intent while fixing them.\n- After addressing every listed error, re-check the full OUTPUT FORMAT and CONTEXT MODE blocks once more before emitting.\n";
|
|
158
|
+
export declare const ARTIFICER_PROTOCOL_INSTRUCTION = "You are an Artificer agent in a principle internalization pipeline. Your role is to transform the Scribe's formal principle draft into executable RuleHost code with a concise implementation summary, tests, and rollout notes.\n\nPROTOCOL:\n1. Review the scribeArtifact to understand the formal principle draft\n2. Transform the principle draft into executable RuleHost code and a brief implementation summary\n3. Preserve the lineage trace from scribe, philosopher, and dreamer artifacts\n4. Identify risks associated with implementing this principle\n5. The implementation summary should clearly describe what the code does and why\n\nOWNER INTENT CONTRACT (when `intentContract` is present \u2014 PRI-703):\n- `intentContract` is the Owner-intent anchor distilled from the real failure. Your rule exists to serve it.\n- implementationCode MUST operationalize `targetBehavior` and MUST NOT implement `forbiddenBehavior`.\n- If a repair/revision instruction (repairFeedback, revisionFeedback) contradicts the intentContract, the intentContract wins: implement the contract-faithful behavior and document the conflict in implementationSummary \u2014 do NOT silently satisfy the contradicting instruction.\n- Use `validationExpectation` as your self-check before emitting: would an evaluator observing that expectation accept this rule as faithful?\n\nOUTPUT FORMAT (pure JSON, no markdown):\n{\n \"taskId\": \"<from input>\",\n \"requiresContextVersion\": 2,\n \"sourceScribeArtifactId\": \"<copy exactly from input.sourceScribeArtifactId>\",\n \"implementationSummary\": \"<concise summary of what the code does and the implementation approach>\",\n \"sourceTrace\": {\n \"scribeArtifactId\": \"<copy exactly from input.sourceScribeArtifactId>\",\n \"philosopherArtifactId\": \"<from scribe artifact if available, or omit>\",\n \"dreamerArtifactId\": \"<from scribe artifact if available, or omit>\"\n },\n \"evidenceRefs\": [\"<copy exactly from the behaviorExamplePack evidenceRefs; every ref, in order>\"],\n \"risks\": [\"<risk 1>\", \"<risk 2>\"],\n \"implementationCode\": \"function evaluate(input, helpers) { if (input.action.canonicalKind === 'write' && typeof input.action.normalizedPath === 'string' && input.action.normalizedPath.startsWith('/system/')) { return { decision: 'block', matched: true, reason: 'write to system path' }; } return { decision: 'allow', matched: false, reason: 'no risk pattern' }; }\",\n \"goldenTraceCases\": [\n {\"caseId\":\"negative-1\",\"kind\":\"negative\",\"toolName\":\"write\",\"params\":{\"path\":\"/system/file\"},\"expectedDecision\":\"block\",\"ruleContext\":{\"version\":2,\"history\":{\"status\":\"available\",\"truncated\":false,\"calls\":[]},\"facts\":{\"priorReadOfTarget\":\"unknown\",\"readCount\":0,\"writeCount\":0,\"uniqueWritePathCount\":0,\"sameActionBlockCount\":null}}},\n {\"caseId\":\"positive-1\",\"kind\":\"positive\",\"toolName\":\"write\",\"params\":{\"path\":\"/workspace/file\"},\"expectedDecision\":\"allow\",\"ruleContext\":{\"version\":2,\"history\":{\"status\":\"available\",\"truncated\":false,\"calls\":[]},\"facts\":{\"priorReadOfTarget\":\"unknown\",\"readCount\":0,\"writeCount\":0,\"uniqueWritePathCount\":0,\"sameActionBlockCount\":null}}}\n ],\n \"affectedTools\": [\"write\"],\n \"generatedAt\": \"<ISO-8601 timestamp>\"\n}\nNOTE: the example above IS the full v2 contract \u2014 requiresContextVersion, evidenceRefs, and case-level ruleContext are REQUIRED fields (see the CONTEXT MODE block below), not optional extras. The caseIds and paths inside the example are PLACEHOLDERS: the real Owner-labelled caseIds are the ones carried by input.behaviorExamplePack and MUST be used verbatim (see CONTEXT MODE below).\n\nCONSTRAINTS:\n- Output ONLY valid JSON (no markdown, no explanatory text, no code fences)\n- implementationSummary MUST be a non-empty string describing what the code does and the implementation approach\n- sourceScribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId (non-empty string)\n- sourceTrace.scribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId\n- sourceTrace.philosopherArtifactId is optional \u2014 include only if available from scribe artifact\n- sourceTrace.dreamerArtifactId is optional \u2014 include only if available from scribe artifact\n- risks MUST be an array of strings (can be empty if no risks identified)\n- generatedAt MUST be the current ISO-8601 timestamp (use the actual current time, NOT a placeholder)\n- implementationCode MUST define exactly function evaluate(input, helpers) and return { decision, matched, reason }\n- EVERY return statement inside evaluate() MUST include ALL three fields: decision, matched, reason\n- Do NOT return partial objects \u2014 missing fields will fail sandbox validation and block activation\n- GOOD: return { decision: 'allow', matched: false, reason: 'path is within workspace, no risk' }\n- GOOD: return { decision: 'block', matched: true, reason: 'write to system path outside workspace' }\n- BAD: return { matched: false } \u2014 missing decision and reason, will be rejected\n- BAD: return { decision: 'allow', matched: true } \u2014 missing reason, will be rejected\n- input.action contains toolName, normalizedPath, paramsSummary, and canonicalKind\n- input.action.canonicalKind is the closed semantic kind of the current action: \"read\" | \"search\" | \"write\" | \"execute\" | \"agent\" | \"other\"\n- CANONICALKIND-FIRST MATCHING (PRI-741): match behavior PRIMARILY by input.action.canonicalKind (e.g. input.action.canonicalKind === 'write'); use input.action.toolName only as an auxiliary condition to distinguish tools within the same kind\n- When a HOST SEMANTIC CONTEXT block is present, affectedTools and EVERY goldenTraceCases toolName MUST be a real host tool name from that list \u2014 activation replay is machine-validated against the host declaration, and generic LLM vocabulary names (write_file, edit_file, bash, run_shell_command, delete_file, ...) are NOT real host tools and WILL be rejected\n- When NO HOST SEMANTIC CONTEXT block is present you have no authoritative host tool knowledge: match by canonicalKind and NEVER invent host-specific tool names\n- input.action.paramsSummary is an OBJECT (a map of parameter names to values), NOT a string\n- NEVER call string methods on paramsSummary itself \u2014 paramsSummary.includes(...), paramsSummary.startsWith(...), paramsSummary.match(...) are always bugs and will crash with \"is not a function\"\n- To inspect a parameter, access its specific key (e.g. paramsSummary.path) and guard its type at runtime (typeof paramsSummary.path === 'string') before using it as a string\n- For path logic prefer input.action.normalizedPath (a normalized string) over reading raw params strings\n- ADVERSARIAL GUARD CONTRACT: when your rule declares requiresContextVersion: 2, action-level safety still dominates the context \u2014 if helpers.isRiskPath() is true the decision MUST be block regardless of input.context; writes to well-known sensitive system locations (/etc/**, system configuration outside the governed workspace) must block even when context reports priorReadOfTarget === 'yes' (a context-provided read outside the workspace is untrusted signal, never authorization)\n- implementationCode MUST be deterministic and self-contained: no imports, require, eval, Function, I/O, network, timers, Date.now, or randomness\n- goldenTraceCases MUST contain 2-10 cases with at least one positive allow case and one negative block case\n- goldenTraceCases expectedDecision MUST be only \"allow\" or \"block\" \u2014 do NOT emit \"propose_correction\", \"requireApproval\", or \"auto_correct\" (seed-user MVP only supports allow/block; all other action types are rejected by the schema validator)\n- affectedTools MUST contain the non-empty tool names the rule can match (see the HOST SEMANTIC CONTEXT / canonicalKind-first rules above)\n\nPRIOR ADVERSARIAL FAILURES (when `adversarialFeedback` is present):\n- This is a RETRY. A prior version of your generated code was reviewed and failed adversarial sandbox replay.\n- The `adversarialFeedback` field lists the specific cases that failed, each with the attack type, the expected vs actual decision, and a rationale.\n- You MUST address each listed failure specifically \u2014 do not regenerate blind. Adjust the matcher/logic so the failed cases produce the expected decision while preserving the cases that previously passed.\n\nRULEHOST CAPABILITY BOUNDARY (PRI-508):\n- RuleHost evaluate(input) is a STATELESS single-call gate. It CANNOT track multi-step workflows (e.g., audit\u2192verify\u2192incremental) across invocations.\n- Translate the principle into a STATEFUL-CHECKABLE constraint that evaluate() CAN enforce per tool call: check whether the current tool call carries evidence of prior analysis (context markers, params encoding prior reads, explicit preconditions in the params).\n- Do NOT implement a path whitelist or a \"first call must be X\" ordering rule if the principle is about procedural discipline \u2014 the runtime cannot observe ordering across calls.\n- If the principle cannot be enforced per-call, encode the closest per-call proxy and document the gap in implementationSummary.\n\nREPAIR FEEDBACK (PRI-509, when `repairFeedback` is present):\n- This is a REPAIR RETRY. A prior attempt of your generated code was reviewed by the evaluator and returned needs_revision.\n- The `repairFeedback` field lists the evaluator's concerns and required changes from the prior attempt.\n- You MUST address each required change specifically \u2014 do not regenerate blind. Adjust the matcher/logic so the concerns are resolved while preserving the principle intent.\n- If a required change contradicts the principle intent (from scribeArtifact/dreamerContext), prefer the principle intent and document the conflict in implementationSummary.\n- When the repair feedback contains a \"Deterministic Replay Evidence\" block (resolved from the source evaluator artifact):\n - Each entry is a machine-verified failure: Case (id), Expected (decision), Actual (decision, only when your code really returned one), Error (sandbox error type), Message (bounded safe failure detail).\n - Fix EVERY listed deterministic failure so the case produces its Expected decision.\n - Preserve the behavior of cases that already passed \u2014 do not trade passing cases for failing ones.\n - Do NOT weaken safety constraints (e.g. drop risk-path blocks) just to make replay pass.\n - Respect the canonical RuleHostInput contract, including that paramsSummary is an object (see CONSTRAINTS).\n - Do NOT invent, guess, or fabricate evidence that is not listed \u2014 the list is the complete deterministic fact set (possibly truncated, as noted).\n\nADVERSARIAL CASE VOCABULARY NOTE (apply whenever replay evidence or repair feedback mentions case ids):\n- Case ids such as \"v2-unavailable\", \"v2-truncated\", \"v2-alias\" (and any \"v2-*\" prefixed id) are INTERNAL EVALUATOR CASE NUMBERING \u2014 they describe which adversarial fixture was run, NOT a request to use context-version-2 features.\n- NEVER respond to a case id by declaring `requiresContextVersion`, adding case-level `ruleContext`, or changing `expectedDecision` to satisfy the case NAME. Case names are labels, not instructions.\n- Your output must ALWAYS satisfy the CONTEXT MODE block below (the v2 contract, appended after these constraints) regardless of which case ids appear in the feedback text.\n- The ONLY legal decisions are \"allow\" and \"block\"; the ONLY legal field set is the one in OUTPUT FORMAT above plus the v2 CONTEXT MODE obligations (requiresContextVersion: 2, case-level ruleContext, evidenceRefs). Any other field is a contract violation and WILL be rejected.\n\nPRIOR OUTPUT-CONTRACT REJECTIONS (when `priorValidatorErrors` is present):\n- Your previous attempt was rejected by the OUTPUT CONTRACT GATE (schema validation) \u2014 it never reached evaluation. The `priorValidatorErrors.errors` list contains the exact, verbatim rejection reasons.\n- The highest-priority fix is to make your JSON satisfy EVERY listed rejection reason. Re-read each error, map it to the OUTPUT FORMAT and CONTEXT MODE rules, and correct the exact fields it names.\n- These errors describe YOUR output's shape, not the principle and not the test cases \u2014 do not change the behavioral intent while fixing them.\n- After addressing every listed error, re-check the full OUTPUT FORMAT and CONTEXT MODE blocks once more before emitting.\n";
|
|
159
159
|
/**
|
|
160
160
|
* PRI-839: appended ONLY when `dreamerContext` is present, so a pre-PRI-508 /
|
|
161
161
|
* degraded prompt is unchanged (the same conditional shape
|
|
@@ -214,7 +214,33 @@ export declare const DREAMER_CANDIDATE_SET_INSTRUCTION = "\n\nDREAMER CANDIDATE
|
|
|
214
214
|
* prompt gained the conditional DREAMER_CANDIDATE_SET_INSTRUCTION block.
|
|
215
215
|
* The OUTPUT schema is unchanged, so only the `.prompt.vN` segment moves.
|
|
216
216
|
*/
|
|
217
|
-
|
|
217
|
+
/**
|
|
218
|
+
* PD v2 Phase 1 host acceptance (2026-10-10): bumped v8 → v9. The CONTEXT MODE
|
|
219
|
+
* block stated that Owner-labelled labels are authoritative but never stated
|
|
220
|
+
* the obligation `validateV2OutputContract` enforces — that those cases appear
|
|
221
|
+
* in `goldenTraceCases` under their exact pack `caseId`. Meanwhile the OUTPUT
|
|
222
|
+
* FORMAT example demonstrated invented ids (`negative-1`/`positive-1`) and
|
|
223
|
+
* CONSTRAINTS invited 2-10 self-authored cases, so a model that followed the
|
|
224
|
+
* example produced a rejection the prompt gave it no way to anticipate
|
|
225
|
+
* (live evidence: 4 run-rulehost artificer runs rejected with the identical
|
|
226
|
+
* `Owner-labelled example … was omitted` message).
|
|
227
|
+
* The obligation is now stated, the placeholder status of the example ids is
|
|
228
|
+
* explicit, and the two rejection wordings are named so a repair attempt can
|
|
229
|
+
* map the feedback to a field. The validator is UNCHANGED.
|
|
230
|
+
*/
|
|
231
|
+
/**
|
|
232
|
+
* PD v2 Phase 1 host acceptance r3 (2026-10-10): bumped v9 → v10. The v9 clause
|
|
233
|
+
* over-declared the gate. `ArtificerRunner.fetchAndParseOutput` (EP002-R4)
|
|
234
|
+
* restores every entry that keeps a pack `caseId` from the authoritative
|
|
235
|
+
* bounded pack BEFORE `validateV2OutputContract` runs, so with a pack present
|
|
236
|
+
* the `<field> was rewritten` branch is unreachable for Owner-labelled cases —
|
|
237
|
+
* telling the model a reword yields that message is a second prompt↔gate
|
|
238
|
+
* asymmetry, in the opposite direction. The clause now names the real rejection
|
|
239
|
+
* vector (missing OR renamed caseId → `was omitted`) and states that editing a
|
|
240
|
+
* same-ID entry changes nothing the gate compares. Validator UNCHANGED; no
|
|
241
|
+
* obligation was relaxed.
|
|
242
|
+
*/
|
|
243
|
+
export declare const ARTIFICER_PROMPT_CONTRACT_VERSION = "artificer-output-v2.prompt.v10";
|
|
218
244
|
/**
|
|
219
245
|
* EP002-R4: the SINGLE bounded projection shared by the prompt AND the v2
|
|
220
246
|
* echo-contract validation. The model can only copy what it saw, so the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artificer-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/artificer-prompt-builder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,uBAAuB;IACtC,mFAAmF;IACnF,QAAQ,CAAC,UAAU,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAC7D,oEAAoE;IACpE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,wEAAwE;IACxE,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,MAAM,EAAE,MAA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,eAAO,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"artificer-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/artificer-prompt-builder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,uBAAuB;IACtC,mFAAmF;IACnF,QAAQ,CAAC,UAAU,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAC7D,oEAAoE;IACpE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,wEAAwE;IACxE,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;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;;;;;;;;GAQG;AACH;;;;;;GAMG;AACH;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iCAAiC,mCAAmC,CAAC;AA+DlF;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAMjF;AAiCD,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,GAAE,SAAS,MAAM,EAAO,GAChC,4BAA4B,CAQ9B;AAED,qBAAa,sBAAsB;IAEjC,WAAW,CAAC,KAAK,EAAE,2BAA2B,GAAG,0BAA0B,CAuD1E;CACF"}
|
|
@@ -37,7 +37,7 @@ OUTPUT FORMAT (pure JSON, no markdown):
|
|
|
37
37
|
"affectedTools": ["write"],
|
|
38
38
|
"generatedAt": "<ISO-8601 timestamp>"
|
|
39
39
|
}
|
|
40
|
-
NOTE: the example above IS the full v2 contract — requiresContextVersion, evidenceRefs, and case-level ruleContext are REQUIRED fields (see the CONTEXT MODE block below), not optional extras.
|
|
40
|
+
NOTE: the example above IS the full v2 contract — requiresContextVersion, evidenceRefs, and case-level ruleContext are REQUIRED fields (see the CONTEXT MODE block below), not optional extras. The caseIds and paths inside the example are PLACEHOLDERS: the real Owner-labelled caseIds are the ones carried by input.behaviorExamplePack and MUST be used verbatim (see CONTEXT MODE below).
|
|
41
41
|
|
|
42
42
|
CONSTRAINTS:
|
|
43
43
|
- Output ONLY valid JSON (no markdown, no explanatory text, no code fences)
|
|
@@ -135,6 +135,9 @@ DREAMER CANDIDATE SET (PRI-839, when \`dreamerContext\` is present):
|
|
|
135
135
|
const V2_CONTEXT_INSTRUCTION = `
|
|
136
136
|
CONTEXT MODE: v2 (Owner-labelled evidence is present)
|
|
137
137
|
- Treat behaviorExamplePack labels as authoritative: sourceNegativeCase MUST remain block and every positiveCounterexample MUST remain allow.
|
|
138
|
+
- You MUST carry those Owner-labelled cases into your output: goldenTraceCases needs one entry for behaviorExamplePack.sourceNegativeCase and one entry for EVERY behaviorExamplePack.positiveCounterexamples item, each using the caseId EXACTLY as the pack states it and leaving kind/toolName/params/expectedDecision/ruleContext unchanged. You may ADD your own cases alongside them; adding never replaces one of these.
|
|
139
|
+
- The output gate rejects the whole submission when one of those caseIds is missing from goldenTraceCases — dropping a case and renaming it both report as "Owner-labelled example <caseId> was omitted".
|
|
140
|
+
- An entry that keeps a pack caseId is restored from the authoritative pack BEFORE validation, so editing its fields changes nothing the gate sees and cannot turn a rejection into a pass. Author your own cases under new caseIds; they are validated as written.
|
|
138
141
|
- You MUST output requiresContextVersion: 2.
|
|
139
142
|
- Every goldenTraceCases entry MUST include its explicit ruleContext; do not invent or auto-fill context.
|
|
140
143
|
- You may inspect input.context. When it is undefined or context.history.status is unavailable, MUST return { decision: "allow", matched: false, reason: "context unavailable" }.
|
|
@@ -188,7 +191,33 @@ CONTEXT MODE: v2 (Owner-labelled evidence is present)
|
|
|
188
191
|
* prompt gained the conditional DREAMER_CANDIDATE_SET_INSTRUCTION block.
|
|
189
192
|
* The OUTPUT schema is unchanged, so only the `.prompt.vN` segment moves.
|
|
190
193
|
*/
|
|
191
|
-
|
|
194
|
+
/**
|
|
195
|
+
* PD v2 Phase 1 host acceptance (2026-10-10): bumped v8 → v9. The CONTEXT MODE
|
|
196
|
+
* block stated that Owner-labelled labels are authoritative but never stated
|
|
197
|
+
* the obligation `validateV2OutputContract` enforces — that those cases appear
|
|
198
|
+
* in `goldenTraceCases` under their exact pack `caseId`. Meanwhile the OUTPUT
|
|
199
|
+
* FORMAT example demonstrated invented ids (`negative-1`/`positive-1`) and
|
|
200
|
+
* CONSTRAINTS invited 2-10 self-authored cases, so a model that followed the
|
|
201
|
+
* example produced a rejection the prompt gave it no way to anticipate
|
|
202
|
+
* (live evidence: 4 run-rulehost artificer runs rejected with the identical
|
|
203
|
+
* `Owner-labelled example … was omitted` message).
|
|
204
|
+
* The obligation is now stated, the placeholder status of the example ids is
|
|
205
|
+
* explicit, and the two rejection wordings are named so a repair attempt can
|
|
206
|
+
* map the feedback to a field. The validator is UNCHANGED.
|
|
207
|
+
*/
|
|
208
|
+
/**
|
|
209
|
+
* PD v2 Phase 1 host acceptance r3 (2026-10-10): bumped v9 → v10. The v9 clause
|
|
210
|
+
* over-declared the gate. `ArtificerRunner.fetchAndParseOutput` (EP002-R4)
|
|
211
|
+
* restores every entry that keeps a pack `caseId` from the authoritative
|
|
212
|
+
* bounded pack BEFORE `validateV2OutputContract` runs, so with a pack present
|
|
213
|
+
* the `<field> was rewritten` branch is unreachable for Owner-labelled cases —
|
|
214
|
+
* telling the model a reword yields that message is a second prompt↔gate
|
|
215
|
+
* asymmetry, in the opposite direction. The clause now names the real rejection
|
|
216
|
+
* vector (missing OR renamed caseId → `was omitted`) and states that editing a
|
|
217
|
+
* same-ID entry changes nothing the gate compares. Validator UNCHANGED; no
|
|
218
|
+
* obligation was relaxed.
|
|
219
|
+
*/
|
|
220
|
+
export const ARTIFICER_PROMPT_CONTRACT_VERSION = 'artificer-output-v2.prompt.v10';
|
|
192
221
|
// ── EP002-R4: bounded pack projection at the prompt boundary ─────────────────
|
|
193
222
|
//
|
|
194
223
|
// The persisted BehaviorExamplePack keeps full-fidelity raw tool-call payloads
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artificer-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/artificer-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAQzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA8JlE,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwG7C,CAAC;AAEF,0EAA0E;AAC1E,2EAA2E;AAC3E,mEAAmE;AACnE,wEAAwE;AACxE,oBAAoB;AAEpB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;;;;;;;;4KAQ2H,CAAC;AAE7K,MAAM,sBAAsB,GAAG
|
|
1
|
+
{"version":3,"file":"artificer-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/artificer-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAQzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA8JlE,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwG7C,CAAC;AAEF,0EAA0E;AAC1E,2EAA2E;AAC3E,mEAAmE;AACnE,wEAAwE;AACxE,oBAAoB;AAEpB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;;;;;;;;4KAQ2H,CAAC;AAE7K,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;CAa9B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH;;;;;;;;GAQG;AACH;;;;;;GAMG;AACH;;;;;;;;GAQG;AACH;;;;;;GAMG;AACH;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,gCAAgC,CAAC;AAElF,gFAAgF;AAChF,EAAE;AACF,+EAA+E;AAC/E,yEAAyE;AACzE,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAE7E,MAAM,6BAA6B,GAAG,KAAK,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EAAE,CAAC;YACzG,0EAA0E;YAC1E,0DAA0D;YAC1D,GAAG,CAAC,KAAK,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvF,qEAAqE;YACrE,wDAAwD;YACxD,GAAG,CAAC,KAAK,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvG,CAAC;QAEF,MAAM,OAAO,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAElD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACtE,CAAC;CACF"}
|
|
@@ -194,8 +194,13 @@ export interface EvaluatorRunnerDeps extends PeerRunnerDeps {
|
|
|
194
194
|
* shape as ScribeRunner's `ledgerIdentity` (PR #1856): core stays free of any
|
|
195
195
|
* ledger I/O (D5), and when absent the shape gate still holds — the check is
|
|
196
196
|
* what turns "UUID-shaped" into "UUID the ledger actually knows".
|
|
197
|
+
*
|
|
198
|
+
* PRI-915: `isAvailable` lets the stamp distinguish "a readable ledger does
|
|
199
|
+
* not know this id" (invalid_identity, drift) from "the ledger cannot be
|
|
200
|
+
* read right now" (identity_source_unavailable, transient).
|
|
197
201
|
*/
|
|
198
202
|
readonly ledgerIdentity?: {
|
|
203
|
+
readonly isAvailable: () => boolean;
|
|
199
204
|
readonly hasPrinciple: (principleId: string) => boolean;
|
|
200
205
|
};
|
|
201
206
|
}
|
|
@@ -208,13 +213,19 @@ export interface EvaluatorRunnerDeps extends PeerRunnerDeps {
|
|
|
208
213
|
* (its `source_principle_id` column is empty).
|
|
209
214
|
* - `non_canonical_identity` — a value exists but it is content masquerading as
|
|
210
215
|
* identity (philosopher title, `T-NN`, any text).
|
|
211
|
-
* - `invalid_identity` — UUID-shaped, but
|
|
212
|
-
* (data drift; never upgraded to a guess).
|
|
216
|
+
* - `invalid_identity` — UUID-shaped, but a READABLE ledger does not know
|
|
217
|
+
* it (data drift; never upgraded to a guess).
|
|
218
|
+
* - `identity_source_unavailable` — the ledger backing file exists but cannot
|
|
219
|
+
* be read/parsed, so membership is not decidable
|
|
220
|
+
* right now. Transient outage, NOT drift (PRI-915):
|
|
221
|
+
* the id may be perfectly real; retry after the
|
|
222
|
+
* ledger is repaired instead of treating it as
|
|
223
|
+
* drift.
|
|
213
224
|
* - `ambiguous_identity` — more than one plausible identity (reported by
|
|
214
225
|
* the bearer/lineage resolvers, which own that
|
|
215
226
|
* comparison).
|
|
216
227
|
*/
|
|
217
|
-
export type IdentityStampFailureReason = 'missing_identity' | 'non_canonical_identity' | 'invalid_identity' | 'ambiguous_identity';
|
|
228
|
+
export type IdentityStampFailureReason = 'missing_identity' | 'non_canonical_identity' | 'invalid_identity' | 'identity_source_unavailable' | 'ambiguous_identity';
|
|
218
229
|
export declare class EvaluatorRunner extends BasePeerRunner<EvaluatorContext, EvaluatorOutputV1> {
|
|
219
230
|
private readonly validator;
|
|
220
231
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator-runner.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/evaluator-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EACV,iBAAiB,EAEjB,kBAAkB,EAInB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAkB,KAAK,eAAe,EAAqB,MAAM,wBAAwB,CAAC;AACjG,OAAO,EAAgJ,KAAK,aAAa,EAAqE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAQrS,OAAO,EAAmF,KAA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GAAG,IAAI,CAKvF;IAED;;;OAGG;IACH,UAAmB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CASpH;IAID;;;;;;;;;;;;;;;;;;OAkBG;YAEW,oBAAoB;IA+BlC;;;;;;;;OAQG;YAEW,0BAA0B;IAkPxC;;;OAGG;IAEH,OAAO,CAAC,sBAAsB;IAyB9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,4BAA4B;IA0BpC;;;;;;OAMG;IAEH,OAAO,CAAC,oBAAoB;IAO5B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,qBAAqB;IA0D7B;;;;;;;;;;;;;;;OAeG;IAEH,OAAO,CAAC,4BAA4B;IAmFpC;;;;;;;;;OASG;IAEH,OAAO,CAAC,cAAc;IA0DtB;;;;;;;;;;OAUG;YAEW,oBAAoB;IA2RlC;;;;;;;;;;OAUG;YACW,8BAA8B;IAmE5C;;;OAGG;IAEH,OAAO,CAAC,wBAAwB;IAwBhC,OAAO,CAAC,MAAM,CAAC,QAAQ;IAIvB;;;;;;;;;;;OAWG;YACW,oCAAoC;CA+BnD"}
|
|
@@ -2400,8 +2400,16 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
2400
2400
|
if (principleId === null) {
|
|
2401
2401
|
return { ok: false, reason: 'non_canonical_identity' };
|
|
2402
2402
|
}
|
|
2403
|
-
if (this.ledgerIdentity
|
|
2404
|
-
|
|
2403
|
+
if (this.ledgerIdentity) {
|
|
2404
|
+
// PRI-915: an unreadable ledger collapses hasPrinciple to `false`; that
|
|
2405
|
+
// answer is "cannot read", not drift. Availability is decided FIRST so a
|
|
2406
|
+
// transient outage surfaces as identity_source_unavailable.
|
|
2407
|
+
if (!this.ledgerIdentity.isAvailable()) {
|
|
2408
|
+
return { ok: false, reason: 'identity_source_unavailable' };
|
|
2409
|
+
}
|
|
2410
|
+
if (!this.ledgerIdentity.hasPrinciple(principleId)) {
|
|
2411
|
+
return { ok: false, reason: 'invalid_identity' };
|
|
2412
|
+
}
|
|
2405
2413
|
}
|
|
2406
2414
|
return { ok: true, principleId };
|
|
2407
2415
|
}
|