create-principles-disciple 1.144.12 → 1.144.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_release/product-identity.json +1 -1
- package/codex-adapter/dist/pd-hook.js +23 -5
- package/codex-adapter/dist/worker/workspace-worker.d.ts +6 -0
- package/codex-adapter/dist/worker/workspace-worker.js +7 -0
- package/codex-adapter/package.json +1 -1
- package/console/package.json +2 -2
- package/core/dist/runtime-v2/adapter/output-schema-registry.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/output-schema-registry.js +4 -0
- package/core/dist/runtime-v2/adapter/output-schema-registry.js.map +1 -1
- package/core/dist/runtime-v2/bridge-result-shaper.d.ts +8 -0
- package/core/dist/runtime-v2/bridge-result-shaper.d.ts.map +1 -1
- package/core/dist/runtime-v2/bridge-result-shaper.js +61 -3
- package/core/dist/runtime-v2/bridge-result-shaper.js.map +1 -1
- package/core/dist/runtime-v2/candidate-intake-service.d.ts +52 -2
- package/core/dist/runtime-v2/candidate-intake-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake-service.js +201 -76
- package/core/dist/runtime-v2/candidate-intake-service.js.map +1 -1
- package/core/dist/runtime-v2/config/index.d.ts +2 -2
- package/core/dist/runtime-v2/config/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/index.js +1 -1
- package/core/dist/runtime-v2/config/index.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts +7 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js +11 -0
- package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js +24 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.js +2 -0
- package/core/dist/runtime-v2/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +39 -0
- package/core/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js +44 -0
- package/core/dist/runtime-v2/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +8 -1
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +14 -1
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js +93 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +29 -14
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +215 -46
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-output.d.ts +40 -0
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-output.js +97 -0
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-output.js.map +1 -0
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-runner.d.ts +111 -0
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-runner.js +232 -0
- package/core/dist/runtime-v2/principle-reuse/reuse-evaluation-runner.js.map +1 -0
- package/core/dist/telemetry-event.d.ts +2 -2
- package/core/dist/telemetry-event.d.ts.map +1 -1
- package/core/dist/telemetry-event.js +11 -0
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/package.json +1 -1
- package/host-runtime/dist/index.d.ts +2 -0
- package/host-runtime/dist/index.js +1 -0
- package/host-runtime/dist/production-rulehost-gate.d.ts +1 -0
- package/host-runtime/dist/production-rulehost-gate.js +1 -1
- package/host-runtime/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
- package/pd-cli/dist/commands/candidate.js +170 -20
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/commands/config-doctor.js +14 -0
- package/pd-cli/dist/commands/config-doctor.js.map +1 -1
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +67 -11
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +80 -11
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/services/config-doctor.d.ts +11 -0
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +6 -0
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.d.ts +14 -0
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.d.ts.map +1 -1
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.js +20 -4
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts +6 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +11 -2
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +548 -544
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +4 -4
- package/release-manager/package.json +3 -3
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReuseEvaluationRunner — the Semantic Reuse Evaluation Capability's execution
|
|
3
|
+
* path (PRI-917 SPEC v0.3.2 §7, Phase 3C-3).
|
|
4
|
+
*
|
|
5
|
+
* A PROPOSAL-ONLY runner. It compares a candidate against a bounded shortlist
|
|
6
|
+
* of existing Principles and returns a RECOMMENDATION. It has no path to any
|
|
7
|
+
* ledger writer: this module imports no ledger mutation API, and nothing here
|
|
8
|
+
* can create, modify, or record a Principle. The Owner decides (SPEC §5).
|
|
9
|
+
*
|
|
10
|
+
* Design constraints honoured here (SPEC §7):
|
|
11
|
+
* - ALL LLM execution goes through the injected PDRuntimeAdapter. This
|
|
12
|
+
* module creates no client, no inference abstraction, and no provider
|
|
13
|
+
* seam of its own; the repair loop drives the SAME adapter.
|
|
14
|
+
* - Structured output repair reuses `structured-output-repair` (the
|
|
15
|
+
* runtime-agnostic loop) with an adapter-backed `llmCaller`.
|
|
16
|
+
* - The output contract is the Phase 3C-1 schema, and the Phase 3C-1
|
|
17
|
+
* validator is the trust boundary (closed field set + cross-field rules).
|
|
18
|
+
*
|
|
19
|
+
* Failure is always fail-closed and observable: a timed-out run, unparsable
|
|
20
|
+
* output, or a payload that still violates the contract after repair throws a
|
|
21
|
+
* {@link ReuseEvaluationError}. It NEVER degrades into "no candidates, so
|
|
22
|
+
* create" — that is the caller's (review surface's) decision, not this
|
|
23
|
+
* runner's silent default (SPEC §9).
|
|
24
|
+
*/
|
|
25
|
+
import type { PDRuntimeAdapter } from '../runtime-protocol.js';
|
|
26
|
+
import { type ReuseEvaluationOutputV1 } from './reuse-evaluation-output.js';
|
|
27
|
+
/** The candidate's semantic claim — the same claim intake resolves (4b/4c). */
|
|
28
|
+
export interface ReuseEvaluationCandidateInput {
|
|
29
|
+
text: string;
|
|
30
|
+
triggerPattern: string;
|
|
31
|
+
action: string;
|
|
32
|
+
}
|
|
33
|
+
/** One existing Principle from the deterministic shortlist. */
|
|
34
|
+
export interface ReuseEvaluationShortlistEntry {
|
|
35
|
+
principleId: string;
|
|
36
|
+
text: string;
|
|
37
|
+
triggerPattern: string;
|
|
38
|
+
action: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ReuseEvaluationInput {
|
|
41
|
+
candidate: ReuseEvaluationCandidateInput;
|
|
42
|
+
/** Bounded Top-K from reuse-shortlist (caller guarantees ≤ 3). */
|
|
43
|
+
candidates: ReuseEvaluationShortlistEntry[];
|
|
44
|
+
}
|
|
45
|
+
export type ReuseEvaluationFailureReason = 'timeout' | 'run_failed' | 'output_unavailable' | 'output_invalid' | 'repair_failed';
|
|
46
|
+
/**
|
|
47
|
+
* Fail-closed error from the evaluation runner. Carries a structured reason
|
|
48
|
+
* and next action so the review surface can degrade OBSERVABLY (SPEC §9)
|
|
49
|
+
* instead of pretending the shortlist was semantically judged.
|
|
50
|
+
*/
|
|
51
|
+
export declare class ReuseEvaluationError extends Error {
|
|
52
|
+
readonly reason: ReuseEvaluationFailureReason;
|
|
53
|
+
readonly nextAction: string;
|
|
54
|
+
readonly detail?: string;
|
|
55
|
+
readonly repairAttempts: number;
|
|
56
|
+
constructor(args: {
|
|
57
|
+
reason: ReuseEvaluationFailureReason;
|
|
58
|
+
message: string;
|
|
59
|
+
nextAction: string;
|
|
60
|
+
detail?: string;
|
|
61
|
+
repairAttempts?: number;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export interface ReuseEvaluationRunnerDeps {
|
|
65
|
+
/** The one and only LLM execution path (never constructed here). */
|
|
66
|
+
readonly runtimeAdapter: PDRuntimeAdapter;
|
|
67
|
+
}
|
|
68
|
+
export interface ReuseEvaluationRunnerOptions {
|
|
69
|
+
/** Per-run budget. Bounded polling never exceeds it. Default 30s. */
|
|
70
|
+
readonly timeoutMs?: number;
|
|
71
|
+
/** Bounded repair attempts after a contract violation. Default 1. */
|
|
72
|
+
readonly maxRepairAttempts?: number;
|
|
73
|
+
/** agentSpec label for telemetry/lineage. Not an agent registration. */
|
|
74
|
+
readonly agentId?: string;
|
|
75
|
+
/** Poll interval while waiting for the run. Default 200ms. */
|
|
76
|
+
readonly pollIntervalMs?: number;
|
|
77
|
+
}
|
|
78
|
+
export declare class ReuseEvaluationRunner {
|
|
79
|
+
private readonly runtimeAdapter;
|
|
80
|
+
private readonly timeoutMs;
|
|
81
|
+
private readonly maxRepairAttempts;
|
|
82
|
+
private readonly agentId;
|
|
83
|
+
private readonly pollIntervalMs;
|
|
84
|
+
constructor(deps: ReuseEvaluationRunnerDeps, options?: ReuseEvaluationRunnerOptions);
|
|
85
|
+
/**
|
|
86
|
+
* Role declaration delivered on the system channel (base-layer prompt,
|
|
87
|
+
* following CorrectionObserver's PRI-633 pattern). The "you recommend, the
|
|
88
|
+
* Owner decides" boundary is stated here so the model never narrates itself
|
|
89
|
+
* as a decision authority (SPEC §5).
|
|
90
|
+
*/
|
|
91
|
+
static readonly SYSTEM_PROMPT: string;
|
|
92
|
+
/** Build the evaluation prompt (deterministic, bounded). */
|
|
93
|
+
static buildPrompt(input: ReuseEvaluationInput): string;
|
|
94
|
+
/**
|
|
95
|
+
* Run one semantic evaluation and return the validated RECOMMENDATION.
|
|
96
|
+
*
|
|
97
|
+
* @throws ReuseEvaluationError — timeout / run failure / unparsable output /
|
|
98
|
+
* contract violation surviving repair. Never a silent fallback.
|
|
99
|
+
*/
|
|
100
|
+
recommend(input: ReuseEvaluationInput): Promise<ReuseEvaluationOutputV1>;
|
|
101
|
+
/** Bounded repair using the SAME adapter (no second LLM path). */
|
|
102
|
+
private repairAndValidate;
|
|
103
|
+
/**
|
|
104
|
+
* One adapter round-trip: start → bounded poll → fetch. This is the ONLY
|
|
105
|
+
* place the runner touches the runtime, for both the initial call and each
|
|
106
|
+
* repair attempt.
|
|
107
|
+
*/
|
|
108
|
+
private invoke;
|
|
109
|
+
}
|
|
110
|
+
export declare function isValidReuseEvaluationOutput(value: unknown): boolean;
|
|
111
|
+
//# sourceMappingURL=reuse-evaluation-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-evaluation-runner.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/principle-reuse/reuse-evaluation-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,8BAA8B,CAAC;AAQtC,+EAA+E;AAC/E,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,+DAA+D;AAC/D,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,6BAA6B,CAAC;IACzC,kEAAkE;IAClE,UAAU,EAAE,6BAA6B,EAAE,CAAC;CAC7C;AAID,MAAM,MAAM,4BAA4B,GACpC,SAAS,GACT,YAAY,GACZ,oBAAoB,GACpB,gBAAgB,GAChB,eAAe,CAAC;AAEpB;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,SAAgB,MAAM,EAAE,4BAA4B,CAAC;IACrD,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChC,SAAgB,cAAc,EAAE,MAAM,CAAC;IAEvC,YAAY,IAAI,EAAE;QAChB,MAAM,EAAE,4BAA4B,CAAC;QACrC,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC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-output.js';
|
|
2
|
+
import { attemptStructuredOutputRepair, } from '../adapter/structured-output-repair.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fail-closed error from the evaluation runner. Carries a structured reason
|
|
5
|
+
* and next action so the review surface can degrade OBSERVABLY (SPEC §9)
|
|
6
|
+
* instead of pretending the shortlist was semantically judged.
|
|
7
|
+
*/
|
|
8
|
+
export class ReuseEvaluationError extends Error {
|
|
9
|
+
reason;
|
|
10
|
+
nextAction;
|
|
11
|
+
detail;
|
|
12
|
+
repairAttempts;
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super(args.message);
|
|
15
|
+
this.name = 'ReuseEvaluationError';
|
|
16
|
+
this.reason = args.reason;
|
|
17
|
+
this.nextAction = args.nextAction;
|
|
18
|
+
this.detail = args.detail;
|
|
19
|
+
this.repairAttempts = args.repairAttempts ?? 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
23
|
+
const DEFAULT_POLL_INTERVAL_MS = 200;
|
|
24
|
+
const MAX_POLLED_FIELD_CHARS = 2000;
|
|
25
|
+
/** Bounded poll backoff (module-level: no runner state involved). */
|
|
26
|
+
function sleep(ms) {
|
|
27
|
+
return new Promise((resolve) => {
|
|
28
|
+
setTimeout(resolve, ms);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export class ReuseEvaluationRunner {
|
|
32
|
+
runtimeAdapter;
|
|
33
|
+
timeoutMs;
|
|
34
|
+
maxRepairAttempts;
|
|
35
|
+
agentId;
|
|
36
|
+
pollIntervalMs;
|
|
37
|
+
constructor(deps, options = {}) {
|
|
38
|
+
this.runtimeAdapter = deps.runtimeAdapter;
|
|
39
|
+
this.timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
40
|
+
this.maxRepairAttempts = options.maxRepairAttempts ?? 1;
|
|
41
|
+
this.agentId = options.agentId ?? 'reuse-evaluation';
|
|
42
|
+
this.pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Role declaration delivered on the system channel (base-layer prompt,
|
|
46
|
+
* following CorrectionObserver's PRI-633 pattern). The "you recommend, the
|
|
47
|
+
* Owner decides" boundary is stated here so the model never narrates itself
|
|
48
|
+
* as a decision authority (SPEC §5).
|
|
49
|
+
*/
|
|
50
|
+
static SYSTEM_PROMPT = [
|
|
51
|
+
'You are a semantic reuse evaluator for a principles-disciple knowledge base.',
|
|
52
|
+
'You compare a NEW candidate claim against EXISTING principles and RECOMMEND whether an existing principle already covers the same experience.',
|
|
53
|
+
'You are a recommender, NOT a decision maker: the Owner decides. Never claim a decision was made, never instruct that a principle be written, and never emit fields outside the requested JSON shape.',
|
|
54
|
+
].join(' ');
|
|
55
|
+
/** Build the evaluation prompt (deterministic, bounded). */
|
|
56
|
+
static buildPrompt(input) {
|
|
57
|
+
const clip = (s) => (s.length > MAX_POLLED_FIELD_CHARS ? `${s.slice(0, MAX_POLLED_FIELD_CHARS)}…` : s);
|
|
58
|
+
const candidateBlock = [
|
|
59
|
+
` text: ${clip(input.candidate.text)}`,
|
|
60
|
+
` trigger: ${clip(input.candidate.triggerPattern)}`,
|
|
61
|
+
` action: ${clip(input.candidate.action)}`,
|
|
62
|
+
].join('\n');
|
|
63
|
+
const existingBlock = input.candidates.length === 0
|
|
64
|
+
? ' (none)'
|
|
65
|
+
: input.candidates
|
|
66
|
+
.map((c, i) => [
|
|
67
|
+
` [${i + 1}] principleId: ${c.principleId}`,
|
|
68
|
+
` text: ${clip(c.text)}`,
|
|
69
|
+
` trigger: ${clip(c.triggerPattern)}`,
|
|
70
|
+
` action: ${clip(c.action)}`,
|
|
71
|
+
].join('\n'))
|
|
72
|
+
.join('\n');
|
|
73
|
+
return [
|
|
74
|
+
'## TASK',
|
|
75
|
+
'Decide whether ONE existing principle already expresses the same experience as the candidate claim.',
|
|
76
|
+
'',
|
|
77
|
+
'## Candidate claim',
|
|
78
|
+
candidateBlock,
|
|
79
|
+
'',
|
|
80
|
+
`## Existing principles (${input.candidates.length})`,
|
|
81
|
+
existingBlock,
|
|
82
|
+
'',
|
|
83
|
+
'## Rules',
|
|
84
|
+
'- Judge SEMANTIC coverage, not word overlap: shared vocabulary alone is NOT the same experience.',
|
|
85
|
+
'- recommendation=reuse: an existing principle already covers this claim. Set selectedPrincipleId to that principle\'s id (required).',
|
|
86
|
+
'- recommendation=create: no existing principle covers this claim; a new one is warranted.',
|
|
87
|
+
'- recommendation=uncertain: the evidence is genuinely ambiguous. Do NOT set selectedPrincipleId.',
|
|
88
|
+
'- rationale: one or two sentences naming WHY the coverage holds or fails.',
|
|
89
|
+
'- confidence: 0..1 in your recommendation.',
|
|
90
|
+
'- Emit ONLY these fields: recommendation, selectedPrincipleId (only for reuse), rationale, confidence.',
|
|
91
|
+
'',
|
|
92
|
+
'Return strict JSON (no markdown):',
|
|
93
|
+
'{"recommendation": "reuse" | "create" | "uncertain", "selectedPrincipleId": string, "rationale": string, "confidence": number}',
|
|
94
|
+
].join('\n');
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Run one semantic evaluation and return the validated RECOMMENDATION.
|
|
98
|
+
*
|
|
99
|
+
* @throws ReuseEvaluationError — timeout / run failure / unparsable output /
|
|
100
|
+
* contract violation surviving repair. Never a silent fallback.
|
|
101
|
+
*/
|
|
102
|
+
async recommend(input) {
|
|
103
|
+
const payload = await this.invoke(ReuseEvaluationRunner.buildPrompt(input), 'evaluate');
|
|
104
|
+
const validated = validateReuseEvaluationOutput(payload);
|
|
105
|
+
if (validated.ok) {
|
|
106
|
+
return validated.output;
|
|
107
|
+
}
|
|
108
|
+
// Contract violation (unknown field, bad cross-field pairing, bad types):
|
|
109
|
+
// the schema itself is permissive about extra keys, so this is where the
|
|
110
|
+
// closed field set bites. One bounded repair round, then fail closed.
|
|
111
|
+
return this.repairAndValidate(payload, validated.reason);
|
|
112
|
+
}
|
|
113
|
+
/** Bounded repair using the SAME adapter (no second LLM path). */
|
|
114
|
+
async repairAndValidate(invalidOutput, reason) {
|
|
115
|
+
if (this.maxRepairAttempts <= 0) {
|
|
116
|
+
throw new ReuseEvaluationError({
|
|
117
|
+
reason: 'repair_failed',
|
|
118
|
+
message: `Reuse evaluation output violated its contract (${reason}) and repair is disabled`,
|
|
119
|
+
nextAction: 'Review the evaluation output contract; repair attempts are configured to 0',
|
|
120
|
+
detail: reason,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const schemaErrors = [{ path: '/', message: reason, value: invalidOutput }];
|
|
124
|
+
const repair = await attemptStructuredOutputRepair(invalidOutput, schemaErrors, {
|
|
125
|
+
// The repair LLM is the SAME adapter — this callback only marshals
|
|
126
|
+
// prompt in and raw JSON text out.
|
|
127
|
+
llmCaller: async (prompt) => {
|
|
128
|
+
const repaired = await this.invoke(prompt, 'repair');
|
|
129
|
+
return JSON.stringify(repaired);
|
|
130
|
+
},
|
|
131
|
+
schemaCheck: (value) => validateReuseEvaluationOutput(value).ok,
|
|
132
|
+
}, {
|
|
133
|
+
maxRepairAttempts: this.maxRepairAttempts,
|
|
134
|
+
schemaRef: 'reuse-evaluation-output-v1',
|
|
135
|
+
schemaJson: JSON.stringify(ReuseEvaluationOutputV1Schema),
|
|
136
|
+
requiredKeys: ['recommendation', 'rationale', 'confidence'],
|
|
137
|
+
});
|
|
138
|
+
if (repair.repaired && repair.output) {
|
|
139
|
+
// The repair loop's schemaCheck is our validator, but re-validate the
|
|
140
|
+
// returned value explicitly: a caller-visible contract must never rely
|
|
141
|
+
// on a callback's internal check alone.
|
|
142
|
+
const revalidated = validateReuseEvaluationOutput(repair.output);
|
|
143
|
+
if (revalidated.ok) {
|
|
144
|
+
return revalidated.output;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
throw new ReuseEvaluationError({
|
|
148
|
+
reason: 'repair_failed',
|
|
149
|
+
message: `Reuse evaluation output violated its contract (${reason}) and could not be repaired`,
|
|
150
|
+
nextAction: 'Re-run the review; if it persists, inspect the evaluation prompt/runtime output format',
|
|
151
|
+
detail: `${reason}; ${repair.repairSummary}`,
|
|
152
|
+
repairAttempts: repair.attemptsUsed,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* One adapter round-trip: start → bounded poll → fetch. This is the ONLY
|
|
157
|
+
* place the runner touches the runtime, for both the initial call and each
|
|
158
|
+
* repair attempt.
|
|
159
|
+
*/
|
|
160
|
+
async invoke(prompt, phase) {
|
|
161
|
+
const runHandle = await this.runtimeAdapter.startRun({
|
|
162
|
+
agentSpec: { agentId: this.agentId, schemaVersion: 'v1' },
|
|
163
|
+
taskRef: { taskId: `reuse_eval_${phase}_${Date.now()}` },
|
|
164
|
+
inputPayload: prompt,
|
|
165
|
+
contextItems: [],
|
|
166
|
+
outputSchemaRef: 'reuse-evaluation-output-v1',
|
|
167
|
+
timeoutMs: this.timeoutMs,
|
|
168
|
+
systemPrompt: ReuseEvaluationRunner.SYSTEM_PROMPT,
|
|
169
|
+
});
|
|
170
|
+
const deadline = Date.now() + this.timeoutMs;
|
|
171
|
+
let terminal = false;
|
|
172
|
+
while (Date.now() < deadline) {
|
|
173
|
+
const status = await this.runtimeAdapter.pollRun(runHandle.runId);
|
|
174
|
+
if (status.status === 'succeeded') {
|
|
175
|
+
terminal = true;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
if (status.status === 'failed' || status.status === 'timed_out' || status.status === 'cancelled') {
|
|
179
|
+
throw new ReuseEvaluationError({
|
|
180
|
+
reason: status.status === 'timed_out' ? 'timeout' : 'run_failed',
|
|
181
|
+
message: `Reuse evaluation ${phase} run finished as '${status.status}'`,
|
|
182
|
+
nextAction: 'Check the configured reuseEvaluation runtime profile and LLM channel health',
|
|
183
|
+
detail: status.reason,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
await sleep(this.pollIntervalMs);
|
|
187
|
+
}
|
|
188
|
+
if (!terminal) {
|
|
189
|
+
try {
|
|
190
|
+
await this.runtimeAdapter.cancelRun(runHandle.runId);
|
|
191
|
+
}
|
|
192
|
+
catch { /* best effort: the run is already past its budget */ }
|
|
193
|
+
throw new ReuseEvaluationError({
|
|
194
|
+
reason: 'timeout',
|
|
195
|
+
message: `Reuse evaluation ${phase} run exceeded ${this.timeoutMs}ms`,
|
|
196
|
+
nextAction: 'Raise reuseEvaluation.timeoutMs or check the configured runtime profile',
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
let output;
|
|
200
|
+
try {
|
|
201
|
+
output = await this.runtimeAdapter.fetchOutput(runHandle.runId);
|
|
202
|
+
}
|
|
203
|
+
catch (err) {
|
|
204
|
+
// The adapter validates against outputSchemaRef and can also perform its
|
|
205
|
+
// own internal repair (pi-ai does). If it still fails, the raw text is
|
|
206
|
+
// unavailable for a runner-level repair — surface it fail-closed.
|
|
207
|
+
throw new ReuseEvaluationError({
|
|
208
|
+
reason: 'output_invalid',
|
|
209
|
+
message: `Reuse evaluation ${phase} output could not be parsed or validated by the runtime`,
|
|
210
|
+
nextAction: 'Inspect the runtime output format; the adapter rejected it against reuse-evaluation-output-v1',
|
|
211
|
+
detail: err instanceof Error ? err.message : String(err),
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
if (!output || output.payload === undefined || output.payload === null) {
|
|
215
|
+
throw new ReuseEvaluationError({
|
|
216
|
+
reason: 'output_unavailable',
|
|
217
|
+
message: `Reuse evaluation ${phase} run produced no output payload`,
|
|
218
|
+
nextAction: 'Re-run the review; the runtime returned an empty payload',
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
return output.payload;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
// Re-exported for callers that want a plain boolean pre-check without
|
|
225
|
+
// constructing a runner (e.g. a surface deciding whether to show a warning).
|
|
226
|
+
export function isValidReuseEvaluationOutput(value) {
|
|
227
|
+
// PRI-917 review (P2): delegate to the FULL trust boundary (closed field
|
|
228
|
+
// set + cross-field rules). The bare TypeBox schema is an open field set,
|
|
229
|
+
// so a raw Value.Check would pass outputs the contract must reject (T7a).
|
|
230
|
+
return validateReuseEvaluationOutput(value).ok;
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=reuse-evaluation-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-evaluation-runner.js","sourceRoot":"","sources":["../../../src/runtime-v2/principle-reuse/reuse-evaluation-runner.ts"],"names":[],"mappings":"AAyBA,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,GAE9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,6BAA6B,GAE9B,MAAM,wCAAwC,CAAC;AAkChD;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7B,MAAM,CAA+B;IACrC,UAAU,CAAS;IACnB,MAAM,CAAU;IAChB,cAAc,CAAS;IAEvC,YAAY,IAMX;QACC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;IACjD,CAAC;CACF;AAoBD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAEpC,qEAAqE;AACrE,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,OAAO,qBAAqB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