create-principles-disciple 1.134.4 → 1.134.6
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/core/dist/runtime-v2/__tests__/evaluator-repair-loop.test.js +85 -0
- package/core/dist/runtime-v2/__tests__/evaluator-repair-loop.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/system-prompt-merge.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/system-prompt-merge.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/system-prompt-merge.test.js +24 -0
- package/core/dist/runtime-v2/__tests__/system-prompt-merge.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js +26 -0
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.js +33 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-systemprompt-fold.test.d.ts +13 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-systemprompt-fold.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-systemprompt-fold.test.js +86 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-systemprompt-fold.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +30 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts +6 -0
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js +11 -3
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts +6 -0
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js +22 -7
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js +11 -2
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +8 -5
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +14 -3
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js +41 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.d.ts +6 -2
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.js +1 -2
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts +3 -1
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js +35 -16
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.d.ts +6 -2
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.js +1 -2
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +7 -9
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +2 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +2 -2
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js +11 -11
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +28 -26
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js +6 -3
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.js +21 -18
- package/core/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-chinese-feedback-contract.test.js +20 -15
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-chinese-feedback-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.js +7 -5
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/evolution-alignment-contract.test.js +9 -9
- package/core/dist/runtime-v2/internalization/__tests__/evolution-alignment-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/owner-override-resume.test.js +82 -0
- package/core/dist/runtime-v2/internalization/__tests__/owner-override-resume.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/peer-prompt-language.test.d.ts +4 -0
- package/core/dist/runtime-v2/internalization/__tests__/peer-prompt-language.test.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/peer-prompt-language.test.js +67 -56
- package/core/dist/runtime-v2/internalization/__tests__/peer-prompt-language.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.js +13 -12
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/prompt-serializer.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/prompt-serializer.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/prompt-serializer.test.js +91 -0
- package/core/dist/runtime-v2/internalization/__tests__/prompt-serializer.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.js +2 -2
- package/core/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js +3 -3
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-language.test.js +24 -23
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-language.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +6 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +1 -2
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts +14 -5
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.js +9 -6
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +6 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js +3 -2
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +8 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +27 -11
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js +29 -0
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts +14 -5
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.js +9 -6
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts +10 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.js +12 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -1
- package/core/dist/runtime-v2/internalization/prompt-serializer.d.ts +27 -1
- package/core/dist/runtime-v2/internalization/prompt-serializer.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/prompt-serializer.js +45 -11
- package/core/dist/runtime-v2/internalization/prompt-serializer.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts +6 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js +3 -2
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +6 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js +1 -2
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.js +2 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime-v2/observer/__tests__/correction-observer.test.js +3 -2
- package/core/dist/runtime-v2/observer/__tests__/correction-observer.test.js.map +1 -1
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.test.js +3 -2
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.test.js.map +1 -1
- package/core/dist/runtime-v2/observer/correction-observer.d.ts +7 -0
- package/core/dist/runtime-v2/observer/correction-observer.d.ts.map +1 -1
- package/core/dist/runtime-v2/observer/correction-observer.js +8 -2
- package/core/dist/runtime-v2/observer/correction-observer.js.map +1 -1
- package/core/dist/runtime-v2/observer/empathy-observer.d.ts +6 -0
- package/core/dist/runtime-v2/observer/empathy-observer.d.ts.map +1 -1
- package/core/dist/runtime-v2/observer/empathy-observer.js +7 -1
- package/core/dist/runtime-v2/observer/empathy-observer.js.map +1 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.d.ts +1 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.js +3 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.js.map +1 -1
- package/core/dist/runtime-v2/runtime-protocol.d.ts +9 -0
- package/core/dist/runtime-v2/runtime-protocol.d.ts.map +1 -1
- package/core/dist/runtime-v2/runtime-protocol.js +9 -0
- package/core/dist/runtime-v2/runtime-protocol.js.map +1 -1
- package/core/dist/runtime-v2/signal-collector/index.d.ts +1 -1
- package/core/dist/runtime-v2/signal-collector/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/signal-collector/index.js +1 -1
- package/core/dist/runtime-v2/signal-collector/index.js.map +1 -1
- package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts +6 -0
- package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts.map +1 -1
- package/core/dist/runtime-v2/signal-collector/llm-stage.js +7 -1
- package/core/dist/runtime-v2/signal-collector/llm-stage.js.map +1 -1
- package/core/dist/runtime-v2/system-prompt-merge.d.ts +19 -0
- package/core/dist/runtime-v2/system-prompt-merge.d.ts.map +1 -0
- package/core/dist/runtime-v2/system-prompt-merge.js +24 -0
- package/core/dist/runtime-v2/system-prompt-merge.js.map +1 -0
- package/core/package.json +1 -1
- package/host-runtime/dist/internalization-consumer-cycle.js +4 -0
- package/host-runtime/dist/internalization-consumer-governance.js +14 -3
- package/host-runtime/package.json +1 -1
- package/package.json +2 -2
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +3 -0
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +22 -7
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +2 -0
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
- package/pd-cli/dist/services/__tests__/evaluator-runner-deps.test.js +27 -0
- package/pd-cli/dist/services/__tests__/evaluator-runner-deps.test.js.map +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.js +12 -4
- package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +2 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +479 -479
- package/plugin/dist/governance-audit.js +129 -129
- package/plugin/dist/rulehost-evidence.js +138 -138
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/release-manager/package.json +2 -2
|
@@ -8,13 +8,17 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ## Contract
|
|
10
10
|
*
|
|
11
|
-
* buildPrompt() takes DreamerPromptBuilderInput and returns a
|
|
12
|
-
* to be passed as `inputPayload` in
|
|
11
|
+
* buildPrompt() takes DreamerPromptBuilderInput and returns a build result
|
|
12
|
+
* whose `message` is the JSON string to be passed as `inputPayload` in
|
|
13
|
+
* StartRunInput, and whose `systemPrompt` is the base-layer system prompt
|
|
14
|
+
* (role + protocol) to pass via `StartRunInput.systemPrompt` (PRI-633).
|
|
13
15
|
*
|
|
14
16
|
* ## Constraints
|
|
15
17
|
*
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
18
|
+
* - Message payload is ONLY task data (JSON) — no markdown, no file ops, no tool calls
|
|
19
|
+
* - Role/protocol instructions travel as the base systemPrompt layer, NOT in
|
|
20
|
+
* the user payload (PRI-633); the profile's configured systemPrompt remains
|
|
21
|
+
* the append layer owned by the agent profile (DPB-07, as revised by PRI-633)
|
|
18
22
|
* - buildPrompt() is a pure function — no DB calls, no side effects
|
|
19
23
|
*/
|
|
20
24
|
import type { CoreAxiomBlockOptions } from '../core-principles/core-axiom-block.js';
|
|
@@ -34,11 +38,16 @@ export interface DreamerPromptInput {
|
|
|
34
38
|
contextHash: string;
|
|
35
39
|
contextRefs: readonly string[];
|
|
36
40
|
predecessorOutput: unknown;
|
|
37
|
-
dreamerInstruction: string;
|
|
38
41
|
}
|
|
39
42
|
export interface DreamerPromptBuildResult {
|
|
40
43
|
readonly message: string;
|
|
41
44
|
readonly promptInput: DreamerPromptInput;
|
|
45
|
+
/**
|
|
46
|
+
* PRI-633: base-layer system prompt (role + protocol). Previously embedded
|
|
47
|
+
* in the payload as `dreamerInstruction`; now delivered via the system
|
|
48
|
+
* channel by the runtime adapter.
|
|
49
|
+
*/
|
|
50
|
+
readonly systemPrompt: string;
|
|
42
51
|
}
|
|
43
52
|
/**
|
|
44
53
|
* Build the Dreamer protocol instruction with optional core axiom grounding.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dreamer-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dreamer-prompt-builder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dreamer-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dreamer-prompt-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACzC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,GAAE,qBAA0B,GAC/B,MAAM,CAkCR;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;IACxC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAiB;IAEjD,YAAY,IAAI,GAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,CAAA;KAAO,EAGlF;IAED,WAAW,CAAC,KAAK,EAAE,yBAAyB,GAAG,wBAAwB,CAmBtE;CACF"}
|
|
@@ -8,13 +8,17 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ## Contract
|
|
10
10
|
*
|
|
11
|
-
* buildPrompt() takes DreamerPromptBuilderInput and returns a
|
|
12
|
-
* to be passed as `inputPayload` in
|
|
11
|
+
* buildPrompt() takes DreamerPromptBuilderInput and returns a build result
|
|
12
|
+
* whose `message` is the JSON string to be passed as `inputPayload` in
|
|
13
|
+
* StartRunInput, and whose `systemPrompt` is the base-layer system prompt
|
|
14
|
+
* (role + protocol) to pass via `StartRunInput.systemPrompt` (PRI-633).
|
|
13
15
|
*
|
|
14
16
|
* ## Constraints
|
|
15
17
|
*
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
18
|
+
* - Message payload is ONLY task data (JSON) — no markdown, no file ops, no tool calls
|
|
19
|
+
* - Role/protocol instructions travel as the base systemPrompt layer, NOT in
|
|
20
|
+
* the user payload (PRI-633); the profile's configured systemPrompt remains
|
|
21
|
+
* the append layer owned by the agent profile (DPB-07, as revised by PRI-633)
|
|
18
22
|
* - buildPrompt() is a pure function — no DB calls, no side effects
|
|
19
23
|
*/
|
|
20
24
|
import { buildCoreAxiomBlock } from '../core-principles/core-axiom-block.js';
|
|
@@ -85,10 +89,9 @@ export class DreamerPromptBuilder {
|
|
|
85
89
|
contextHash: input.contextHash,
|
|
86
90
|
contextRefs: input.contextRefs,
|
|
87
91
|
predecessorOutput: input.predecessorOutput,
|
|
88
|
-
dreamerInstruction,
|
|
89
92
|
};
|
|
90
93
|
const message = JSON.stringify(promptInput);
|
|
91
|
-
return { message, promptInput };
|
|
94
|
+
return { message, promptInput, systemPrompt: dreamerInstruction };
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
//# sourceMappingURL=dreamer-prompt-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dreamer-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dreamer-prompt-builder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dreamer-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dreamer-prompt-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAG7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA+BlE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,+BAA+B,CAC7C,IAAI,GAA0B,EAAE;IAEhC,MAAM,eAAe,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAClD,4EAA4E;IAC5E,wEAAwE;IACxE,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IAEjF,OAAO;;;;;;;;EAQP,eAAe;;;;;;;;;;;;;;;;;;;EAmBf,iBAAiB,EAAE,CAAC;AACtB,CAAC;AAED,MAAM,OAAO,oBAAoB;IACd,aAAa,CAAU;IACvB,cAAc,CAAkB;IAEjD,YAAY,IAAI,GAAiE,EAAE;QACjF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,IAAI,KAAK,CAAC;QACjD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;IAC5C,CAAC;IAED,WAAW,CAAC,KAAgC;QAC1C,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC;QAChE,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC;QAEnE,MAAM,kBAAkB,GAAG,+BAA+B,CAAC;YACzD,aAAa;YACb,cAAc;SACf,CAAC,CAAC;QAEH,MAAM,WAAW,GAAu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reamerRunner extends BasePeerRunner {
|
|
|
125
125
|
predecessorOutput = resolved.fields;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
const { message } = builder.buildPrompt({
|
|
128
|
+
const { message, systemPrompt } = builder.buildPrompt({
|
|
129
129
|
taskId,
|
|
130
130
|
contextHash: context.contextHash,
|
|
131
131
|
contextRefs: context.contextRefs,
|
|
@@ -140,6 +140,7 @@ export class DreamerRunner extends BasePeerRunner {
|
|
|
140
140
|
contextItems: [],
|
|
141
141
|
outputSchemaRef: 'dreamer-output-v1',
|
|
142
142
|
timeoutMs: this.resolvedOptions.timeoutMs,
|
|
143
|
+
systemPrompt,
|
|
143
144
|
});
|
|
144
145
|
}
|
|
145
146
|
async validateOutput(output, taskId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dreamer-runner.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dreamer-runner.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,cAAc,EAAwB,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AA+D/D,MAAM,CAAC,MAAM,8BAA8B,GAA0E;IACnH,cAAc,EAAE,KAAK;IACrB,SAAS,EAAE,OAAO;IAClB,kBAAkB,EAAE,CAAC;IACrB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,IAAI;CACX,CAAC;AAEX,MAAM,UAAU,2BAA2B,CAAC,OAA6B;IACvE,OAAO;QACL,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,8BAA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@@ -90,12 +90,17 @@ export interface EvaluatorPromptInput {
|
|
|
90
90
|
hostToolCatalog?: HostToolCatalogFacts;
|
|
91
91
|
/** Present only when the scribe artifact carries a validated intent contract (PRI-703 Phase 1). */
|
|
92
92
|
intentContract?: IntentContractV1;
|
|
93
|
-
evaluatorInstruction: string;
|
|
94
93
|
promptContractVersion: string;
|
|
95
94
|
}
|
|
96
95
|
export interface EvaluatorPromptBuildResult {
|
|
97
96
|
readonly message: string;
|
|
98
97
|
readonly promptInput: EvaluatorPromptInput;
|
|
98
|
+
/**
|
|
99
|
+
* PRI-633: base-layer system prompt (role + protocol). Previously embedded
|
|
100
|
+
* in the payload as `evaluatorInstruction`; now delivered via the system
|
|
101
|
+
* channel by the runtime adapter.
|
|
102
|
+
*/
|
|
103
|
+
readonly systemPrompt: string;
|
|
99
104
|
}
|
|
100
105
|
export declare const EVALUATOR_PROTOCOL_INSTRUCTION = "You are an Evaluator agent in a principle internalization pipeline. Your role is to critically review the Artificer's implementation plan and produce a structured evaluation with a decision, score, and actionable feedback.\n\nCOMPRESSION FIDELITY COVERAGE CRITERIA (design \u00A76.5.2 \u2014 Stage 1 and Stage 2 use the SAME criteria):\nWhen evaluating whether the dreamer's decision dimensions are covered in the scribe's principle text, apply these rules:\n1. Coverage = a semantically equivalent expression exists. Rewording (using different phrasing to express the same verifiable content) is allowed; the text does NOT need to contain the exact field name or verbatim string. HOWEVER, abstraction is NOT rewording \u2014 rules 1 and 2 MUST be read together.\n2. betterDecision coverage MUST satisfy BOTH existence AND specificity: verifiable, concrete actions must be retained. Replacing concrete, verifiable actions (e.g. \"audit file tree\", \"grep all imports\", \"check export dependency graph\") with unverifiable abstractions (e.g. \"understand architecture\", \"grasp the overall structure\", \"thoroughly assess\") does NOT count as covered \u2014 even if the abstraction points to the same intent. The sole criterion: can an Owner or a piece of rule code determine whether the described action has been performed? If not, specificity is lost.\n3. riskLevel: expressed as a risk-level word (high/medium/low or Chinese equivalents) OR an equivalent risk description (e.g. \"cross-package changes will cause compilation failure if a caller is missed\") \u2014 both count as covered.\n4. badDecision: appearing in antiPatterns counts as covered. NOT appearing is NOT a defect.\n5. strategicPerspective: does NOT participate in fidelity judgement. Do NOT draw conclusions about it, and never include it in missingDimensions.\n6. When a dimension is NOT covered, you MUST name the required dimension (betterDecision / rationale / riskLevel only). Do NOT give only a qualitative description.\n7. If a dimension's value was not injected (not in the available fields), do NOT judge it \u2014 it is outside scope.\n\nThese criteria apply identically to Stage 1 and Stage 2.\n\nCONVERGENCE CONTRACT (PRI-630 \u2014 applies whenever input.previousEvaluation is present):\n1. input.previousEvaluation.requirements lists the PRIOR round's review contract with stable ids (req-1..req-N). You MUST first verify each prior requirement against the CURRENT artifact state (not your memory of it), then emit BOTH evaluation.priorRequirementStatuses ({ id, status } with status \"resolved\" | \"still_open\" | \"regressed\") AND evaluation.requirementLedger ({ id, statement, status } \u2014 an ECHO of every input requirement with its id, its statement AS GIVEN IN THE INPUT, and the status you assigned; never renumber or restate the ids).\n2. requiredChanges in THIS round MUST be built from requirements you marked still_open or regressed, plus \u2014 only if genuinely necessary \u2014 newly discovered blockers. A newly discovered blocker MUST include: the concrete evidence found in the current artifact, the blocking reason, and why it was not detectable in the previous round. If you cannot state that evidence, the item MUST go to concerns instead of requiredChanges.\n3. Do NOT re-introduce a requirement that the artifact already satisfies. Before listing any required change, check the current artifact content (goldenTraceCases, implementationCode, summaries) for an item that already covers it. Demanding something that is already present is a review defect.\n4. If every prior requirement is resolved, no new evidenced blocker exists, and no Part A dimension fails, you MUST set decision to \"approved\" \u2014 do not invent new open-ended polish requirements.\n\nTOOL CATALOG AUTHORITY (PRI-630 \u2014 applies whenever input.hostToolCatalog is present):\nTool legality is judged ONLY against input.hostToolCatalog (readOnlyTools / writeTools). If a tool name appears in the catalog, it is a legitimate host tool \u2014 you MUST NOT flag it as a blocker for being a \"non-standard name\", regardless of your prior knowledge. The catalog is NOT exhaustive: a tool name absent from the catalog is not evidence of illegality either \u2014 tool-name spelling is never a blocker; only the tool BEHAVIOR described in the rule may be. When input.hostToolCatalog is ABSENT, you have NO authoritative tool knowledge: tool-name observations may appear in concerns at most, and MUST NOT become requiredChanges or affect the decision.\n\nPROTOCOL:\n1. Review the artificerArtifact to understand the proposed implementation plan\n2. Evaluate the plan against quality criteria: completeness, feasibility, test coverage, risk mitigation\n3. Produce a decision: approved (plan is sound), needs_revision (plan has issues but is salvageable), or rejected (plan is fundamentally flawed)\n4. Provide a score from 0.0 to 1.0 reflecting overall quality\n5. List specific strengths, concerns, and required changes\n6. Preserve the lineage trace from artificer, scribe, philosopher, and dreamer artifacts\n7. Identify risks associated with this evaluation\n\nCODE REVIEW (Part A \u2014 Passive Review): When the artificerArtifact contains an \"implementationCode\" field (V2 output), you MUST additionally review the generated code across three dimensions and emit a \"codeReview\" object:\n- intentConsistency: { aligned: boolean, explanation: string } \u2014 Does the code logic match the constraint intent described in the scribe principle text? Read the principle text (scribeArtifact.principleDraft or painReasonSummary), then read the code, then judge whether the code precisely implements the described constraint. When intentContract is present, judge primarily against it: the rule is intent-aligned iff it serves ownerIntent/targetBehavior and does not implement forbiddenBehavior.\n\nOWNER INTENT CONTRACT (when `intentContract` is present \u2014 PRI-703):\n- The intentContract is the distilled Owner intent for this principle \u2014 treat it as the DEFINITION of correctness, ahead of your own reading of the principle prose.\n- intentConsistency must cite the specific contract field(s) the rule satisfies or violates.\n- SCOPING RULE: an adversarial case or required change that demands behavior NOT derivable from ownerIntent/targetBehavior/forbiddenBehavior is OUTSIDE this principle's contract. Record it as a concern with the phrase \"test-scope\" and DO NOT count it as a rule defect in requiredChanges \u2014 it indicates the test case introduces a new behavioral requirement, which belongs to a future principle revision or contract extension, not to rewriting this rule.\n- scopePrecision: { verdict: \"precise\" | \"too_broad\" | \"too_narrow\", explanation: string } \u2014 Are the match conditions over-broad (false positive risk, e.g. using includes() substring matching) or over-narrow (false negative risk, e.g. hardcoded paths)?\n- traceCoverage: { sufficient: boolean, gaps: string[], explanation: string } \u2014 Do the goldenTraceCases cover the key scenarios described in the principle (both positive and negative)?\n\nIf ANY of the three dimensions fails (aligned=false, OR verdict!=precise, OR sufficient=false), set evaluation.decision to \"needs_revision\" and describe the gap in concerns/requiredChanges.\n\nADVERSARIAL CASES (Part B \u2014 only when Part A passes): If and only if all three passive-review dimensions pass (aligned=true AND verdict=precise AND sufficient=true), ALSO generate 3-5 \"adversarialCases\" \u2014 test inputs designed to expose gaps between the principle text and the code's actual behavior. Each case: { caseId, attackType: \"boundary\"|\"omission\"|\"inversion\", toolName, params, expectedDecision: \"allow\"|\"block\"|\"propose_correction\", rationale }. If Part A does NOT fully pass, do NOT generate adversarialCases (short-circuit: skip adversarial generation on passive-review failure to save tokens).\n\nCRITICAL: Your ENTIRE response must be ONLY the JSON object below. Do NOT include any text before or after the JSON. Do NOT wrap the JSON in markdown code fences. Do NOT add explanatory prose. Output the raw JSON object and nothing else.\n\nCOMPLETE EXAMPLE OUTPUT FOR A V2 ARTIFICER INPUT (follow this exact structure):\n{\"taskId\":\"task-123\",\"sourceArtificerArtifactId\":\"pi-art-artificer-001\",\"evaluation\":{\"decision\":\"approved\",\"summary\":\"The rule matches the principle and survives adversarial review.\",\"score\":0.85,\"strengths\":[\"Exact path-segment check\"],\"concerns\":[],\"requiredChanges\":[]},\"sourceTrace\":{\"artificerArtifactId\":\"pi-art-artificer-001\"},\"risks\":[],\"codeReview\":{\"intentConsistency\":{\"aligned\":true,\"explanation\":\"The rule enforces the stated confirmation boundary.\"},\"scopePrecision\":{\"verdict\":\"precise\",\"explanation\":\"It avoids substring and sibling-prefix matches.\"},\"traceCoverage\":{\"sufficient\":true,\"gaps\":[],\"explanation\":\"Positive, negative, and boundary cases are covered.\"}},\"adversarialCases\":[{\"caseId\":\"adversarial-1\",\"attackType\":\"boundary\",\"toolName\":\"write_file\",\"params\":{\"path\":\"/system-backup/file\"},\"expectedDecision\":\"allow\",\"rationale\":\"A sibling prefix must not be blocked.\"},{\"caseId\":\"adversarial-2\",\"attackType\":\"omission\",\"toolName\":\"write_file\",\"params\":{\"path\":\"/system/file\"},\"expectedDecision\":\"block\",\"rationale\":\"The protected path must be blocked.\"},{\"caseId\":\"adversarial-3\",\"attackType\":\"inversion\",\"toolName\":\"read_file\",\"params\":{\"path\":\"/system/file\"},\"expectedDecision\":\"allow\",\"rationale\":\"A non-writing tool must remain allowed.\"}],\"generatedAt\":\"<current ISO-8601 timestamp>\"}\n\nCONSTRAINTS:\n- Output ONLY valid JSON \u2014 no markdown, no explanatory text, no code fences, no prose before or after\n- evaluation.decision MUST be one of: approved, needs_revision, rejected\n- evaluation.summary MUST be a non-empty string\n- evaluation.score MUST be a number between 0.0 and 1.0 (NOT a string, NOT a percentage)\n- evaluation.strengths MUST be an array of strings (can be empty)\n- evaluation.concerns MUST be an array of strings (can be empty)\n- evaluation.requiredChanges MUST be an array of strings; when decision is \"needs_revision\" it MUST contain at least one item (a revision demand without an actionable change is an invalid verdict)\n- evaluation.priorRequirementStatuses is REQUIRED when input.previousEvaluation is present: an array of { id, status } covering EVERY prior requirement id, where status is one of resolved, still_open, regressed; omit the field entirely on the first round (no prior evaluation)\n- evaluation.requirementLedger is REQUIRED under the same condition: an array of { id, statement, status } echoing EVERY input requirement (same ids and statements as given; status one of resolved, still_open, regressed); omit entirely on the first round\n- sourceArtificerArtifactId MUST be copied exactly from input.sourceArtificerArtifactId (non-empty string)\n- sourceTrace.artificerArtifactId MUST be copied exactly from input.sourceArtificerArtifactId\n- sourceTrace.scribeArtifactId is optional \u2014 include only if available from artificer artifact\n- sourceTrace.philosopherArtifactId is optional \u2014 include only if available from artificer artifact\n- sourceTrace.dreamerArtifactId is optional \u2014 include only if available from artificer 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- codeReview (when present) MUST contain intentConsistency, scopePrecision, and traceCoverage\n- adversarialCases (when present) MUST be an array of 3-5 objects; omit entirely when passive review fails\n";
|
|
101
106
|
export declare const EVALUATOR_PROMPT_CONTRACT_VERSION = "evaluator-output-v1.prompt.v4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/evaluator-prompt-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C;;;;OAIG;IACH,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACnD,mEAAmE;IACnE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,sCAAsC;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,KAAK,CAAC;CAClE;AAMD,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,SAAS,EACxF,eAAe,EAAE,SAAS,MAAM,EAAE,GACjC,sBAAsB,EAAE,CA4B1B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,mGAAmG;IACnG,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,
|
|
1
|
+
{"version":3,"file":"evaluator-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/evaluator-prompt-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,MAAM,CAAC;IA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,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,mGAAmG;IACnG,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,8BAA8B,mlXAsE1C,CAAC;AAEF,eAAO,MAAM,iCAAiC,kCAAkC,CAAC;AAEjF,qBAAa,sBAAsB;IAEjC,WAAW,CAAC,KAAK,EAAE,2BAA2B,GAAG,0BAA0B,CAuB1E;CACF"}
|
|
@@ -123,11 +123,12 @@ export class EvaluatorPromptBuilder {
|
|
|
123
123
|
// PRI-703 Phase 1: only include intentContract when present (pre-contract
|
|
124
124
|
// scribe artifacts), so prompts stay backward-compatible.
|
|
125
125
|
...(input.intentContract !== undefined ? { intentContract: input.intentContract } : {}),
|
|
126
|
-
evaluatorInstruction: EVALUATOR_PROTOCOL_INSTRUCTION + languageDirective,
|
|
127
126
|
promptContractVersion: EVALUATOR_PROMPT_CONTRACT_VERSION,
|
|
128
127
|
};
|
|
129
128
|
const message = serializePromptInput(promptInput);
|
|
130
|
-
|
|
129
|
+
// PRI-633: the instruction (with PRI-714's language directive) is the
|
|
130
|
+
// base-layer systemPrompt — it left the payload.
|
|
131
|
+
return { message, promptInput, systemPrompt: EVALUATOR_PROTOCOL_INSTRUCTION + languageDirective };
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
//# sourceMappingURL=evaluator-prompt-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/evaluator-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA6ElE,SAAS,kBAAkB,CAAC,CAAS;IACnC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,cAAwF,EACxF,eAAkC;IAElC,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5C,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;YAClB,SAAS;YACT,MAAM,EAAE,KAAc;SACvB,CAAC,CAAC,CAAC;IACN,CAAC;IACD,MAAM,OAAO,GAAG,cAAc;SAC3B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,YAAY,IAAI,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC;SACpE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,MAAoC,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;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,qBAAqB,EAAE,iCAAiC;SACzD,CAAC;QAEF,MAAM,OAAO,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAElD,sEAAsE;QACtE,iDAAiD;QACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,8BAA8B,GAAG,iBAAiB,EAAE,CAAC;IACpG,CAAC;CACF"}
|
|
@@ -299,6 +299,14 @@ export declare class EvaluatorRunner extends BasePeerRunner<EvaluatorContext, Ev
|
|
|
299
299
|
*
|
|
300
300
|
* Loop state freshness (EP-05, ERR-015/018/019): each evaluator round reads
|
|
301
301
|
* the CURRENT dependency artificer's repairPayload — never a cached value.
|
|
302
|
+
*
|
|
303
|
+
* PRI-718: the dep-derived value alone is NOT the durable truth — the dep
|
|
304
|
+
* chain can be stale (e.g. an older repair's recovered transition re-pointed
|
|
305
|
+
* the evaluator at a superseded artifact). The iteration budget must reflect
|
|
306
|
+
* every durable repair round for THIS evaluator, so the result is the max of
|
|
307
|
+
* the dep-derived value and the highest existing deterministic repair id
|
|
308
|
+
* (probe is bounded: the budget gate stops at 2; the cap only guards against
|
|
309
|
+
* pathological id growth).
|
|
302
310
|
*/
|
|
303
311
|
private resolvePriorRepairIteration;
|
|
304
312
|
/**
|
|
@@ -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,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EACV,iBAAiB,EAEjB,kBAAkB,EAInB,MAAM,uBAAu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IACH,UAAmB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAoBhH;IAED,UAAmB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,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;IAwNxC;;;OAGG;IAEH,OAAO,CAAC,sBAAsB;IAyB9B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,MAAM,CAAC,8BAA8B;IA8B7C;;;;;;OAMG;IAEH,OAAO,CAAC,oBAAoB;IAO5B;;;;;;;;;;;;;;;OAeG;IAEH,OAAO,CAAC,4BAA4B;IAmFpC;;;;;;;;;OASG;IAEH,OAAO,CAAC,cAAc;IA0DtB;;;;;;;;;;OAUG;YAEW,oBAAoB;IAkNlC;;;;;;;;;;OAUG;YACW,8BAA8B;IAmE5C;;;OAGG;IAEH,OAAO,CAAC,wBAAwB;IAwBhC,OAAO,CAAC,MAAM,CAAC,QAAQ;IAIvB;;;;;;;;;;;OAWG;YACW,oCAAoC;CA+BnD"}
|
|
@@ -3,7 +3,7 @@ import { isEvaluatorOutputV2 } from './evaluator-output.js';
|
|
|
3
3
|
// Artificer artifact, not from optional LLM output shape.
|
|
4
4
|
import { assessArtificerCodeBearing } from './artificer-code-bearing.js';
|
|
5
5
|
import { PDRuntimeError, isPDErrorCategory } from '../error-categories.js';
|
|
6
|
-
import { hydratePITaskRecord, createPITaskDiagnosticJson, mergePITaskMetadata } from './pitask-metadata.js';
|
|
6
|
+
import { hydratePITaskRecord, createPITaskDiagnosticJson, mergePITaskMetadata, artificerRepairTaskId } from './pitask-metadata.js';
|
|
7
7
|
import { HUMAN_REVIEW_REASON, planOwnerVerdictOverrideResume, markOwnerResolutionApplied, computeArtifactContentHash, } from './owner-review.js';
|
|
8
8
|
import { EvaluatorPromptBuilder, deriveRequirementLedger } from './evaluator-prompt-builder.js';
|
|
9
9
|
import { reconcileLineageEcho } from './peer-runner-contracts.js';
|
|
@@ -322,8 +322,8 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
322
322
|
// ── Two-stage progressive evaluation ──
|
|
323
323
|
// Stage 1: summary-level evaluation (same prompt as single-stage, but
|
|
324
324
|
// uses EVALUATOR_STAGE1_MANIFEST for focused context).
|
|
325
|
-
const { message: stage1Message } = await this.buildEvaluatorPrompt(taskId, context, EVALUATOR_STAGE1_MANIFEST);
|
|
326
|
-
const stage1Output = await this.runSingleEvaluation(taskId, stage1Message);
|
|
325
|
+
const { message: stage1Message, systemPrompt: stage1SystemPrompt } = await this.buildEvaluatorPrompt(taskId, context, EVALUATOR_STAGE1_MANIFEST);
|
|
326
|
+
const stage1Output = await this.runSingleEvaluation(taskId, stage1Message, stage1SystemPrompt);
|
|
327
327
|
// 9.4c (design §6.5.4): Stage 1 output contract violation check.
|
|
328
328
|
// Detect malformed Stage 1 output shapes that Phase 0 testing identified:
|
|
329
329
|
// non-object, missing required evaluator fields, or the output being a
|
|
@@ -358,7 +358,7 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
358
358
|
// Stage 2 triggered: independent re-evaluation with tier2 context.
|
|
359
359
|
// rc-7 / ERR-015 / ERR-018 / ERR-019: Stage 2 does NOT receive Stage 1
|
|
360
360
|
// output, concerns, or the FlaggedDecision. It is a fully independent call.
|
|
361
|
-
const { message: stage2Message, stage2Evidence } = await this.buildEvaluatorPrompt(taskId, context, EVALUATOR_STAGE2_MANIFEST);
|
|
361
|
+
const { message: stage2Message, systemPrompt: stage2SystemPrompt, stage2Evidence } = await this.buildEvaluatorPrompt(taskId, context, EVALUATOR_STAGE2_MANIFEST);
|
|
362
362
|
if (stage2Evidence.state === 'required_unavailable') {
|
|
363
363
|
// Review round (information floor): Stage 2 is the deep-evidence stage;
|
|
364
364
|
// its REQUIRED evidence is unavailable, so there is NO safe fallback
|
|
@@ -376,7 +376,7 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
376
376
|
});
|
|
377
377
|
throw new PDRuntimeError('input_invalid', `evaluator stage2: required tier2 evidence unavailable (${stage2Evidence.unresolvedRequired.join(', ')}) — refusing to issue a deep-evidence verdict without it.`);
|
|
378
378
|
}
|
|
379
|
-
const stage2Output = await this.runSingleEvaluation(taskId, stage2Message);
|
|
379
|
+
const stage2Output = await this.runSingleEvaluation(taskId, stage2Message, stage2SystemPrompt);
|
|
380
380
|
this.progressiveFinalOutput = stage2Output;
|
|
381
381
|
this.progressiveRunActive = true;
|
|
382
382
|
return { runId: `${EvaluatorRunner.PROGRESSIVE_RUN_ID_PREFIX}stage2`, runtimeKind: this.getRuntimeKind(), startedAt: new Date().toISOString() };
|
|
@@ -597,7 +597,7 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
const builder = new EvaluatorPromptBuilder();
|
|
600
|
-
const { message } = builder.buildPrompt({
|
|
600
|
+
const { message, systemPrompt } = builder.buildPrompt({
|
|
601
601
|
taskId,
|
|
602
602
|
contextHash: context.contextHash,
|
|
603
603
|
artificerArtifact: parsedArtificerArtifact,
|
|
@@ -614,11 +614,11 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
614
614
|
// undefined → prompt unchanged (backward compatible).
|
|
615
615
|
intentContract: extractIntentContract(parsedScribeArtifact) ?? undefined,
|
|
616
616
|
});
|
|
617
|
-
return { message, stage2Evidence: resolutionOutcome };
|
|
617
|
+
return { message, systemPrompt, stage2Evidence: resolutionOutcome };
|
|
618
618
|
}
|
|
619
619
|
/** Original single-stage invokeRuntime (flag-off path). */
|
|
620
620
|
async invokeRuntimeSingleStage(taskId, context) {
|
|
621
|
-
const { message } = await this.buildEvaluatorPrompt(taskId, context, EVALUATOR_STAGE1_MANIFEST);
|
|
621
|
+
const { message, systemPrompt } = await this.buildEvaluatorPrompt(taskId, context, EVALUATOR_STAGE1_MANIFEST);
|
|
622
622
|
return this.runtimeAdapter.startRun({
|
|
623
623
|
agentSpec: { agentId: this.resolvedOptions.agentId, schemaVersion: 'v1' },
|
|
624
624
|
taskRef: { taskId },
|
|
@@ -626,6 +626,7 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
626
626
|
contextItems: [],
|
|
627
627
|
outputSchemaRef: 'evaluator-output-v1',
|
|
628
628
|
timeoutMs: this.resolvedOptions.timeoutMs,
|
|
629
|
+
systemPrompt,
|
|
629
630
|
});
|
|
630
631
|
}
|
|
631
632
|
async validateOutput(output, taskId, context) {
|
|
@@ -1207,6 +1208,14 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
1207
1208
|
*
|
|
1208
1209
|
* Loop state freshness (EP-05, ERR-015/018/019): each evaluator round reads
|
|
1209
1210
|
* the CURRENT dependency artificer's repairPayload — never a cached value.
|
|
1211
|
+
*
|
|
1212
|
+
* PRI-718: the dep-derived value alone is NOT the durable truth — the dep
|
|
1213
|
+
* chain can be stale (e.g. an older repair's recovered transition re-pointed
|
|
1214
|
+
* the evaluator at a superseded artifact). The iteration budget must reflect
|
|
1215
|
+
* every durable repair round for THIS evaluator, so the result is the max of
|
|
1216
|
+
* the dep-derived value and the highest existing deterministic repair id
|
|
1217
|
+
* (probe is bounded: the budget gate stops at 2; the cap only guards against
|
|
1218
|
+
* pathological id growth).
|
|
1210
1219
|
*/
|
|
1211
1220
|
async resolvePriorRepairIteration(taskId) {
|
|
1212
1221
|
const task = await this.stateManager.getTask(taskId);
|
|
@@ -1214,6 +1223,7 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
1214
1223
|
return 0;
|
|
1215
1224
|
const piTask = hydratePITaskRecord(task);
|
|
1216
1225
|
const deps = piTask?.dependencyTaskIds ?? [];
|
|
1226
|
+
let depPrior = 0;
|
|
1217
1227
|
for (const depId of deps) {
|
|
1218
1228
|
const depTask = await this.stateManager.getTask(depId);
|
|
1219
1229
|
if (!depTask)
|
|
@@ -1223,12 +1233,18 @@ export class EvaluatorRunner extends BasePeerRunner {
|
|
|
1223
1233
|
const piDepTask = hydratePITaskRecord(depTask);
|
|
1224
1234
|
// rc-5: use Object.hasOwn to check repairPayload presence.
|
|
1225
1235
|
if (piDepTask?.repairPayload && typeof piDepTask.repairPayload.repairIteration === 'number') {
|
|
1226
|
-
|
|
1236
|
+
depPrior = piDepTask.repairPayload.repairIteration;
|
|
1227
1237
|
}
|
|
1228
1238
|
// First artificer (no repairPayload) → prior iteration = 0.
|
|
1229
|
-
|
|
1239
|
+
break;
|
|
1240
|
+
}
|
|
1241
|
+
let durableMax = 0;
|
|
1242
|
+
for (let iteration = 1; iteration <= 5; iteration++) {
|
|
1243
|
+
const existing = await this.stateManager.getTask(artificerRepairTaskId(taskId, iteration));
|
|
1244
|
+
if (existing)
|
|
1245
|
+
durableMax = iteration;
|
|
1230
1246
|
}
|
|
1231
|
-
return
|
|
1247
|
+
return Math.max(depPrior, durableMax);
|
|
1232
1248
|
}
|
|
1233
1249
|
/**
|
|
1234
1250
|
* 把 runner verdict 持久化进任务 diagnosticJson(commit 门控的输入)。
|