create-principles-disciple 1.136.0 → 1.137.0

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.
Files changed (77) hide show
  1. package/codex-adapter/dist/worker/workspace-worker.js +3 -0
  2. package/console/dist/server/routes/failed-tasks.js +31 -3
  3. package/console/dist/ui/api.d.ts +4 -3
  4. package/console/dist/ui/api.js +9 -2
  5. package/console/dist/ui/i18n/en.json +12 -1
  6. package/console/dist/ui/i18n/zh-CN.json +12 -1
  7. package/console/dist/ui/pages/failed-tasks/FailedTasksPage.js +80 -4
  8. package/console/dist/ui/pages/pain/PainPage.js +13 -3
  9. package/console/dist/ui/utils/validators.d.ts +25 -0
  10. package/console/dist/ui/utils/validators.js +87 -0
  11. package/console/dist/web/assets/app.css +29 -2
  12. package/console/dist/web/assets/app.js +259 -46
  13. package/core/dist/runtime-v2/index.d.ts +2 -1
  14. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  15. package/core/dist/runtime-v2/index.js +2 -0
  16. package/core/dist/runtime-v2/index.js.map +1 -1
  17. package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +75 -5
  18. package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
  19. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.d.ts +2 -0
  20. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.d.ts.map +1 -0
  21. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.js +279 -0
  22. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.js.map +1 -0
  23. package/core/dist/runtime-v2/internalization/__tests__/tool-semantic-registry.test.js +43 -0
  24. package/core/dist/runtime-v2/internalization/__tests__/tool-semantic-registry.test.js.map +1 -1
  25. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +36 -2
  26. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
  27. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +64 -7
  28. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
  29. package/core/dist/runtime-v2/internalization/artificer-runner.d.ts +10 -1
  30. package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
  31. package/core/dist/runtime-v2/internalization/artificer-runner.js +6 -0
  32. package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
  33. package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +31 -0
  34. package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
  35. package/core/dist/runtime-v2/internalization/evaluator-runner.js +93 -1
  36. package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
  37. package/core/dist/runtime-v2/internalization/index.d.ts +2 -1
  38. package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -1
  39. package/core/dist/runtime-v2/internalization/index.js +2 -0
  40. package/core/dist/runtime-v2/internalization/index.js.map +1 -1
  41. package/core/dist/runtime-v2/internalization/tool-semantic-registry.d.ts +7 -0
  42. package/core/dist/runtime-v2/internalization/tool-semantic-registry.d.ts.map +1 -1
  43. package/core/dist/runtime-v2/internalization/tool-semantic-registry.js +9 -0
  44. package/core/dist/runtime-v2/internalization/tool-semantic-registry.js.map +1 -1
  45. package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts.map +1 -1
  46. package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js +6 -0
  47. package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js.map +1 -1
  48. package/core/dist/telemetry-event.d.ts +2 -2
  49. package/core/dist/telemetry-event.d.ts.map +1 -1
  50. package/core/dist/telemetry-event.js +4 -0
  51. package/core/dist/telemetry-event.js.map +1 -1
  52. package/host-runtime/dist/evaluator-runtime-context.d.ts +10 -0
  53. package/host-runtime/dist/evaluator-runtime-context.js +3 -0
  54. package/host-runtime/dist/internalization-consumer-cycle.d.ts +6 -0
  55. package/host-runtime/dist/internalization-consumer-cycle.js +14 -2
  56. package/package.json +1 -1
  57. package/pd-cli/dist/commands/pain-record.d.ts +6 -0
  58. package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
  59. package/pd-cli/dist/commands/pain-record.js +78 -29
  60. package/pd-cli/dist/commands/pain-record.js.map +1 -1
  61. package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
  62. package/pd-cli/dist/commands/runtime-internalization-run-once.js +29 -2
  63. package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
  64. package/pd-cli/dist/index.js +4 -1
  65. package/pd-cli/dist/index.js.map +1 -1
  66. package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
  67. package/pd-cli/dist/services/rulehost-pipeline-runner.js +18 -3
  68. package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
  69. package/pd-cli/package.json +1 -1
  70. package/plugin/dist/bundle.js +450 -440
  71. package/plugin/dist/constants/tools.d.ts +13 -5
  72. package/plugin/dist/governance-audit.js +3 -3
  73. package/plugin/dist/rulehost-evidence.js +127 -127
  74. package/plugin/dist/service/internalization-auto-consumer-service.d.ts +13 -0
  75. package/release-manager/package.json +1 -1
  76. package/console/dist/ui/utils/format.d.ts +0 -3
  77. package/console/dist/ui/utils/format.js +0 -20
@@ -0,0 +1,279 @@
1
+ /**
2
+ * PRI-741 — host-name parity replay test.
3
+ *
4
+ * The G3 failure class: a rule generated against the author's own tool-name
5
+ * vocabulary (e.g. `edit_file`) passes replay while never firing in
6
+ * production, because the real host dispatches different names (e.g. `write`)
7
+ * for the same canonicalKind. The evaluator's host-alias variant case replays
8
+ * the same action under a REAL host tool name (from the host semantic
9
+ * projection — the same provenance as gateDeps) and demands the same
10
+ * decision.
11
+ *
12
+ * Verified through the public runner surface with the REAL production
13
+ * gateDeps (real vm sandbox + real registry resolution):
14
+ * 1. the host-alias variant is cloned from the FIRST NEGATIVE case with the
15
+ * host's real tool name of the same canonicalKind;
16
+ * 2. a canonicalKind-matching rule passes replay including the variant;
17
+ * 3. (control) a toolName-equality rule FAILS the variant — the exact G3
18
+ * silent-no-trigger defect is caught at replay, not after activation;
19
+ * 4. without hostSemanticContext the case is skipped OBSERVABLY (rc-9).
20
+ */
21
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
22
+ import * as fs from 'node:fs';
23
+ import * as path from 'node:path';
24
+ import * as os from 'node:os';
25
+ import { RuntimeStateManager } from '../../store/runtime-state-manager.js';
26
+ import { EvaluatorRunner } from '../evaluator-runner.js';
27
+ import { DefaultEvaluatorValidator } from '../evaluator-output.js';
28
+ import { StoreEventEmitter } from '../../store/event-emitter.js';
29
+ import { SqliteConnection } from '../../store/sqlite-connection.js';
30
+ import { SqlitePIArtifactStore } from '../../store/artifact/sqlite-pi-artifact-store.js';
31
+ import { createPITaskDiagnosticJson } from '../pitask-metadata.js';
32
+ import { createProductionGateDeps } from '../../activation/production-gate-deps.js';
33
+ import { buildToolSemanticRegistry } from '../tool-semantic-registry.js';
34
+ const HOST_MAPPINGS = [
35
+ { rawToolName: 'write', canonicalKind: 'write' },
36
+ { rawToolName: 'edit', canonicalKind: 'write' },
37
+ { rawToolName: 'exec', canonicalKind: 'execute' },
38
+ ];
39
+ const HOST_SEMANTIC_CONTEXT = {
40
+ hostKinds: ['openclaw'],
41
+ tools: [...HOST_MAPPINGS],
42
+ };
43
+ // The SAME registry the production host threads into gateDeps (consumer cycle
44
+ // ports / workspace declaration) — replay must resolve canonicalKind
45
+ // identically to production, so the gateDeps below carry it too.
46
+ const HOST_REGISTRY_BUILT = buildToolSemanticRegistry([...HOST_MAPPINGS]);
47
+ if (!HOST_REGISTRY_BUILT.ok)
48
+ throw new Error('test host registry failed to build');
49
+ const HOST_REGISTRY = HOST_REGISTRY_BUILT.registry;
50
+ let workspaceDir;
51
+ let stateManager;
52
+ let emitter;
53
+ let emitted;
54
+ const ARTIFICER_ID = 'artificer-host-alias';
55
+ const EVAL_ID = 'evaluator-host-alias';
56
+ const ARTIFICER_ART = 'pi-art-artificer-host-alias';
57
+ beforeEach(async () => {
58
+ workspaceDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pd-host-alias-'));
59
+ stateManager = new RuntimeStateManager({ workspaceDir });
60
+ await stateManager.initialize();
61
+ emitter = new StoreEventEmitter();
62
+ emitted = [];
63
+ emitter.onTelemetry((event) => {
64
+ emitted.push({ eventType: event.eventType, payload: event.payload });
65
+ });
66
+ });
67
+ afterEach(async () => {
68
+ await stateManager.close();
69
+ try {
70
+ fs.rmSync(workspaceDir, { recursive: true, force: true });
71
+ }
72
+ catch { /* temp */ }
73
+ });
74
+ function meta(o = {}) {
75
+ return createPITaskDiagnosticJson({
76
+ dependencyTaskIds: [], channel: 'prompt', timeoutMs: 300_000,
77
+ inputArtifactRefs: [], outputArtifactRefs: [], ...o,
78
+ });
79
+ }
80
+ async function mkTask(id, kind, deps) {
81
+ await stateManager.createTask({ taskId: id, taskKind: kind, status: 'pending', attemptCount: 0, maxAttempts: 3, diagnosticJson: meta({ correlationId: 'host-alias', dependencyTaskIds: deps }) });
82
+ }
83
+ async function succeed(id) {
84
+ await stateManager.acquireLease({ taskId: id, owner: 'host-alias', runtimeKind: 'test-double' });
85
+ await stateManager.markTaskSucceeded(id);
86
+ }
87
+ /**
88
+ * Artificer content whose golden trace uses the author vocabulary
89
+ * `edit_file` (baseline-resolvable to 'write' but NOT a real OpenClaw host
90
+ * name after PRI-741's declaration correction).
91
+ */
92
+ // v2 read-before-write rule semantics (mirrors the canonical dogfood rule):
93
+ // context-aware so the auto-generated v2 templates pass for BOTH rule
94
+ // variants below — the ONLY behavioral difference under test is matching by
95
+ // canonicalKind vs by the author's tool-name vocabulary.
96
+ const AUTHOR_READ_CONTEXT = {
97
+ version: 2,
98
+ history: {
99
+ status: 'available',
100
+ truncated: false,
101
+ calls: [
102
+ { sequenceId: 1, toolName: 'read', canonicalKind: 'read', normalizedPath: '/workspace/notes', paramsSummary: { path: '/workspace/notes' }, outcome: 'success' },
103
+ ],
104
+ },
105
+ facts: { priorReadOfTarget: 'yes', readCount: 1, writeCount: 0, uniqueWritePathCount: 0, sameActionBlockCount: null },
106
+ };
107
+ const AUTHOR_UNREAD_CONTEXT = {
108
+ version: 2,
109
+ history: {
110
+ status: 'available',
111
+ truncated: false,
112
+ calls: [],
113
+ },
114
+ facts: { priorReadOfTarget: 'no', readCount: 0, writeCount: 0, uniqueWritePathCount: 0, sameActionBlockCount: null },
115
+ };
116
+ function artificerContent(ruleBody) {
117
+ return JSON.stringify({
118
+ implementationCode: `function evaluate(input, helpers) { ${ruleBody} }`,
119
+ goldenTraceCases: [
120
+ { caseId: 'c-neg', kind: 'negative', toolName: 'edit_file', params: { path: '/system/secret' }, expectedDecision: 'block', ruleContext: AUTHOR_UNREAD_CONTEXT },
121
+ { caseId: 'c-pos', kind: 'positive', toolName: 'edit_file', params: { path: '/workspace/notes' }, expectedDecision: 'allow', ruleContext: AUTHOR_READ_CONTEXT },
122
+ ],
123
+ affectedTools: ['edit_file'],
124
+ });
125
+ }
126
+ const KIND_MATCHING_BODY = 'if (typeof input.action.normalizedPath === "string" && input.action.normalizedPath.indexOf("/etc/") === 0) { return { decision: "block", matched: true, reason: "risk path" }; } if (!input.context || input.context.history.status === "unavailable") { return { decision: "allow", matched: false, reason: "context unavailable" }; } if (input.action.canonicalKind === "write" && input.context.facts.priorReadOfTarget === "no") { return { decision: "block", matched: true, reason: "read before write required" }; } return { decision: "allow", matched: false, reason: "ok" };';
127
+ const NAME_MATCHING_BODY = 'if (typeof input.action.normalizedPath === "string" && input.action.normalizedPath.indexOf("/etc/") === 0) { return { decision: "block", matched: true, reason: "risk path" }; } if (!input.context || input.context.history.status === "unavailable") { return { decision: "allow", matched: false, reason: "context unavailable" }; } if (input.action.toolName === "edit_file" && input.context.facts.priorReadOfTarget === "no") { return { decision: "block", matched: true, reason: "read before write required" }; } return { decision: "allow", matched: false, reason: "ok" };';
128
+ function v1ApprovedOutput() {
129
+ return {
130
+ taskId: EVAL_ID,
131
+ sourceArtificerArtifactId: ARTIFICER_ART,
132
+ evaluation: { decision: 'approved', summary: 'host-alias', score: 0.9, strengths: [], concerns: [], requiredChanges: [] },
133
+ sourceTrace: { artificerArtifactId: ARTIFICER_ART },
134
+ risks: [],
135
+ generatedAt: new Date().toISOString(),
136
+ };
137
+ }
138
+ function scriptedAdapter(payload) {
139
+ return {
140
+ startRun: async () => ({ runId: 'run-host-alias', runtimeKind: 'test-double', startedAt: new Date().toISOString() }),
141
+ pollRun: async () => ({ status: 'succeeded', runId: 'run-host-alias' }),
142
+ fetchOutput: async () => ({ runId: 'run-host-alias', payload }),
143
+ cancelRun: async () => undefined,
144
+ };
145
+ }
146
+ async function seedLineage(artificer) {
147
+ await mkTask(ARTIFICER_ID, 'artificer', []);
148
+ await succeed(ARTIFICER_ID);
149
+ await mkTask(EVAL_ID, 'evaluator', [ARTIFICER_ID]);
150
+ const store = new SqlitePIArtifactStore(new SqliteConnection(workspaceDir));
151
+ await store.upsertArtifact({
152
+ artifactId: ARTIFICER_ART, artifactKind: 'principle', sourceTaskId: ARTIFICER_ID,
153
+ lineageArtifactIds: [], validationStatus: 'validated',
154
+ contentJson: artificer,
155
+ createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
156
+ });
157
+ return store;
158
+ }
159
+ function makeRunner(store, options = {}) {
160
+ return new EvaluatorRunner({
161
+ stateManager, runtimeAdapter: scriptedAdapter(v1ApprovedOutput()),
162
+ eventEmitter: emitter, artifactStore: store, validator: new DefaultEvaluatorValidator(),
163
+ }, {
164
+ owner: 'host-alias', runtimeKind: 'test-double', pollIntervalMs: 5, timeoutMs: 20_000,
165
+ // REAL production gate deps: real vm sandbox + registry-backed
166
+ // canonicalKind resolution, exactly like the consumer cycle.
167
+ gateDeps: createProductionGateDeps({ projectDir: workspaceDir, toolSemantics: HOST_REGISTRY }),
168
+ ...options,
169
+ });
170
+ }
171
+ async function replayedResult(ruleBody, options = {}) {
172
+ const store = await seedLineage(artificerContent(ruleBody));
173
+ const runner = makeRunner(store, options);
174
+ const result = await runner.run(EVAL_ID);
175
+ const artifacts = await store.listBySourceTaskId(EVAL_ID);
176
+ const principle = artifacts.find((a) => a.artifactKind === 'principle');
177
+ const parsed = principle ? JSON.parse(principle.contentJson) : undefined;
178
+ return {
179
+ status: result.status,
180
+ passed: parsed?.adversarialResult?.passed,
181
+ failedCases: parsed?.adversarialResult?.failedCases ?? [],
182
+ };
183
+ }
184
+ /** Typed access to the private generator for shape assertions (no dynamic code execution). */
185
+ function hostAliasMethod(runner) {
186
+ return runner.generateHostAliasCase.bind(runner);
187
+ }
188
+ describe('PRI-741 host-name parity replay', () => {
189
+ it('v2-host-alias variant is cloned from the first NEGATIVE case under the host real name', async () => {
190
+ const store = await seedLineage(artificerContent(KIND_MATCHING_BODY));
191
+ const runner = makeRunner(store, { hostSemanticContext: HOST_SEMANTIC_CONTEXT });
192
+ const rawCases = [
193
+ { caseId: 'c-neg', kind: 'negative', toolName: 'edit_file', params: { path: '/system/secret' }, expectedDecision: 'block' },
194
+ { caseId: 'c-pos', kind: 'positive', toolName: 'edit_file', params: { path: '/workspace/notes' }, expectedDecision: 'allow' },
195
+ ];
196
+ const variant = hostAliasMethod(runner)(rawCases, EVAL_ID, 'run-host-alias');
197
+ expect(variant).not.toBeNull();
198
+ expect(variant?.caseId).toBe('v2-host-alias');
199
+ // host REAL name, same canonicalKind as the author's edit_file vocabulary,
200
+ // and the closest name match (edit_file → edit, not write — PRI-741 review)
201
+ expect(variant?.toolName).toBe('edit');
202
+ expect(variant?.params).toEqual({ path: '/system/secret' });
203
+ expect(variant?.expectedDecision).toBe('block');
204
+ expect(variant?.rationale).toContain('PRI-741 host-name parity');
205
+ expect(emitted.some((e) => e.eventType === 'evaluator_host_alias_case_skipped')).toBe(false);
206
+ });
207
+ it('canonicalKind-matching rule passes replay including the host-alias variant (parity holds)', async () => {
208
+ const out = await replayedResult(KIND_MATCHING_BODY, { hostSemanticContext: HOST_SEMANTIC_CONTEXT });
209
+ expect(out.status).toBe('succeeded');
210
+ expect(out.passed, JSON.stringify(out)).toBe(true);
211
+ expect(out.failedCases).toEqual([]);
212
+ expect(emitted.some((e) => e.eventType === 'evaluator_host_alias_case_skipped')).toBe(false);
213
+ });
214
+ it('control: a rule matching the author tool NAME fails the variant — G3 caught at replay', async () => {
215
+ const out = await replayedResult(NAME_MATCHING_BODY, { hostSemanticContext: HOST_SEMANTIC_CONTEXT });
216
+ expect(out.passed).toBe(false);
217
+ expect(out.failedCases.some((fc) => fc.caseId === 'v2-host-alias')).toBe(true);
218
+ });
219
+ it('without hostSemanticContext the case is skipped observably (rc-9) and replay still runs', async () => {
220
+ const out = await replayedResult(KIND_MATCHING_BODY);
221
+ expect(out.status).toBe('succeeded');
222
+ expect(out.passed).toBe(true);
223
+ const skip = emitted.find((e) => e.eventType === 'evaluator_host_alias_case_skipped');
224
+ expect(skip).toBeDefined();
225
+ expect(JSON.stringify(skip?.payload)).toContain('no_host_semantic_context');
226
+ });
227
+ // ── PRI-741 review round: skip-branch coverage (codecov patch gate) ──
228
+ it('non-array / empty golden cases skip observably with no_validated_golden_case', async () => {
229
+ const store = await seedLineage(artificerContent(KIND_MATCHING_BODY));
230
+ const generate = hostAliasMethod(makeRunner(store, { hostSemanticContext: HOST_SEMANTIC_CONTEXT }));
231
+ for (const bad of ['nope', [], 42]) {
232
+ emitted.length = 0;
233
+ expect(generate(bad, EVAL_ID, 'run-host-alias')).toBeNull();
234
+ const skip = emitted.find((e) => e.eventType === 'evaluator_host_alias_case_skipped');
235
+ expect(skip, `input ${JSON.stringify(bad)}`).toBeDefined();
236
+ expect(JSON.stringify(skip?.payload)).toContain('no_validated_golden_case');
237
+ }
238
+ });
239
+ it('structurally invalid golden cases fail the builder and skip observably', async () => {
240
+ const store = await seedLineage(artificerContent(KIND_MATCHING_BODY));
241
+ const generate = hostAliasMethod(makeRunner(store, { hostSemanticContext: HOST_SEMANTIC_CONTEXT }));
242
+ // Valid-looking array, but the case violates the golden-trace schema
243
+ // (negative case expecting allow → builder rejects).
244
+ const invalid = [
245
+ { caseId: 'bad', kind: 'negative', toolName: 'edit_file', params: { path: '/x' }, expectedDecision: 'allow' },
246
+ ];
247
+ expect(generate(invalid, EVAL_ID, 'run-host-alias')).toBeNull();
248
+ const skip = emitted.find((e) => e.eventType === 'evaluator_host_alias_case_skipped');
249
+ expect(skip).toBeDefined();
250
+ expect(JSON.stringify(skip?.payload)).toContain('no_validated_golden_case');
251
+ });
252
+ it('an author name that is already host-real skips observably (parity already covered)', async () => {
253
+ const store = await seedLineage(artificerContent(KIND_MATCHING_BODY));
254
+ const generate = hostAliasMethod(makeRunner(store, { hostSemanticContext: HOST_SEMANTIC_CONTEXT }));
255
+ const hostRealCases = [
256
+ { caseId: 'c-neg', kind: 'negative', toolName: 'write', params: { path: '/system/secret' }, expectedDecision: 'block' },
257
+ { caseId: 'c-pos', kind: 'positive', toolName: 'write', params: { path: '/workspace/notes' }, expectedDecision: 'allow' },
258
+ ];
259
+ expect(generate(hostRealCases, EVAL_ID, 'run-host-alias')).toBeNull();
260
+ const skip = emitted.find((e) => e.eventType === 'evaluator_host_alias_case_skipped');
261
+ expect(skip).toBeDefined();
262
+ expect(JSON.stringify(skip?.payload)).toContain('author_name_already_host_real');
263
+ });
264
+ it('a base case whose kind no host tool covers skips observably (no_host_tool_with_kind)', async () => {
265
+ const store = await seedLineage(artificerContent(KIND_MATCHING_BODY));
266
+ const generate = hostAliasMethod(makeRunner(store, { hostSemanticContext: HOST_SEMANTIC_CONTEXT }));
267
+ // 'ask_user' canonicalizes to 'other'; the host projection declares no
268
+ // 'other' tool, so no host-real substitute exists for the author's kind.
269
+ const otherKindCases = [
270
+ { caseId: 'c-neg', kind: 'negative', toolName: 'ask_user', params: { path: '/system/secret' }, expectedDecision: 'block' },
271
+ { caseId: 'c-pos', kind: 'positive', toolName: 'edit_file', params: { path: '/workspace/notes' }, expectedDecision: 'allow' },
272
+ ];
273
+ expect(generate(otherKindCases, EVAL_ID, 'run-host-alias')).toBeNull();
274
+ const skip = emitted.find((e) => e.eventType === 'evaluator_host_alias_case_skipped');
275
+ expect(skip).toBeDefined();
276
+ expect(JSON.stringify(skip?.payload)).toContain('no_host_tool_with_kind:other');
277
+ });
278
+ });
279
+ //# sourceMappingURL=evaluator-host-alias-replay.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluator-host-alias-replay.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAKzE,MAAM,aAAa,GAAG;IACpB,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE;IAChD,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE;IAC/C,EAAE,WAAW,EAAE,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ACtF,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QAC3B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -130,4 +130,47 @@ describe('validateToolSemanticMappings — untrusted declaration validation', ()
130
130
  expect(built.errors.length).toBeGreaterThan(0);
131
131
  });
132
132
  });
133
+ describe('ToolSemanticRegistry.hostMappings — PRI-741 read-only host projection', () => {
134
+ it('projects exactly the host layer declarations (baseline names excluded)', () => {
135
+ const built = buildToolSemanticRegistry([
136
+ { rawToolName: 'write', canonicalKind: 'write' },
137
+ { rawToolName: 'exec', canonicalKind: 'execute' },
138
+ ]);
139
+ if (!built.ok)
140
+ throw new Error('registry failed to build');
141
+ const host = built.registry.hostMappings();
142
+ expect(host.map((m) => m.rawToolName).sort()).toEqual(['exec', 'write']);
143
+ // baseline-only names (write_file, grep) must NOT appear in the host
144
+ // projection — semantic resolvability is not dispatchability.
145
+ expect(host.some((m) => m.rawToolName === 'write_file')).toBe(false);
146
+ expect(built.registry.lookup('write_file')).toBe('write');
147
+ expect(built.registry.hasHostTool('write_file')).toBe(false);
148
+ });
149
+ it('returns an empty projection for a baseline-only registry', () => {
150
+ const registry = baselineRegistry();
151
+ expect(registry.hasHostLayer).toBe(false);
152
+ expect(registry.hostMappings()).toEqual([]);
153
+ });
154
+ it('the projection is a stable snapshot — mutating the input array afterwards does not drift', () => {
155
+ const declarations = [{ rawToolName: 'write', canonicalKind: 'write' }];
156
+ const built = buildToolSemanticRegistry(declarations);
157
+ if (!built.ok)
158
+ throw new Error('registry failed to build');
159
+ declarations.push({ rawToolName: 'late', canonicalKind: 'read' });
160
+ expect(built.registry.hostMappings().map((m) => m.rawToolName)).toEqual(['write']);
161
+ expect(built.registry.hasHostTool('late')).toBe(false);
162
+ });
163
+ it('the projection is deep-frozen — mutating a source mapping object does not drift kind semantics (CodeRabbit)', () => {
164
+ const declarations = [{ rawToolName: 'write', canonicalKind: 'write' }];
165
+ const built = buildToolSemanticRegistry(declarations);
166
+ if (!built.ok)
167
+ throw new Error('registry failed to build');
168
+ // Caller mutates the ORIGINAL mapping object after construction.
169
+ declarations[0].canonicalKind = 'read';
170
+ expect(built.registry.hostMappings()[0]?.canonicalKind).toBe('write');
171
+ expect(built.registry.resolve('write')).toBe('write');
172
+ // And the projected mapping objects are frozen themselves.
173
+ expect(Object.isFrozen(built.registry.hostMappings()[0])).toBe(true);
174
+ });
175
+ });
133
176
  //# sourceMappingURL=tool-semantic-registry.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-semantic-registry.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/tool-semantic-registry.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAE7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,wEAAwE;AACxE,0EAA0E;AAC1E,SAAS,gBAAgB;IACvB,MAAM,KAAK,GAAG,yBAAyB,EAAE,CAAC;IAC1C,IAAI,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChG,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC;AAED,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IAC1D,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACpE,MAAM,QAAQ,GAAG,gBAAgB,EAAE,CAAC;QACpC,oEAAoE;QACpE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAA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AE,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,yBAAyB,CAAC,SAAoC,CAAC,CAAC;QAC9E,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAI,KAAK,CAAC,EAAE;YAAE,OAAO;QACrB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"tool-semantic-registry.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/tool-semantic-registry.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAE7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,wEAAwE;AACxE,0EAA0E;AAC1E,SAAS,gBAAgB;IACvB,MAAM,KAAK,GAAG,yBAAyB,EAAE,CAAC;IAC1C,IAAI,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChG,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC;AAED,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IAC1D,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACpE,MAAM,QAAQ,GAAG,gBAAgB,EAAE,CAAC;QACpC,oEAAoE;QACpE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ,CAAC,O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,KAAK,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC3D,iEAAiE;QAChE,YAAY,CAAC,CAAC,CAA+B,CAAC,aAAa,GAAG,MAAM,CAAC;QACtE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,2DAA2D;QAC3D,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { BehaviorExamplePack } from './behavior-example-pack.js';
2
2
  import type { LastValidatorErrors } from './pitask-metadata.js';
3
3
  import type { IntentContractV1 } from './intent-contract.js';
4
+ import type { ToolSemanticMappingV1, ToolSemanticRegistry } from './tool-semantic-registry.js';
4
5
  import type { OutputLanguage } from '../language-directive.js';
5
6
  /**
6
7
  * Dreamer candidate 5-dim context (PRI-508).
@@ -23,6 +24,18 @@ export interface ArtificerDreamerContext {
23
24
  readonly riskLevel?: string;
24
25
  readonly strategicPerspective?: string;
25
26
  }
27
+ /**
28
+ * PRI-741: read-only projection of the host tool semantic context into the
29
+ * Artificer prompt. Built by entry points from the SAME ToolSemanticRegistry
30
+ * instance the production gate and the reliability validation use — this is a
31
+ * prompt DTO, not a new truth source: it carries no authority of its own.
32
+ */
33
+ export interface ArtificerHostSemanticContext {
34
+ /** Host kind label(s) the generated rule will run under (e.g. 'openclaw'). */
35
+ readonly hostKinds: readonly string[];
36
+ /** The real host dispatch surface (raw tool name → canonicalKind). */
37
+ readonly tools: readonly ToolSemanticMappingV1[];
38
+ }
26
39
  export interface ArtificerPromptBuilderInput {
27
40
  contextMode: 'v1' | 'v2';
28
41
  behaviorExamplePack?: BehaviorExamplePack;
@@ -76,6 +89,15 @@ export interface ArtificerPromptBuilderInput {
76
89
  * implementationCode, goldenTraceCases params, or lineage fields.
77
90
  */
78
91
  outputLanguage?: OutputLanguage;
92
+ /**
93
+ * PRI-741: optional host semantic projection (real host tool names + kinds,
94
+ * resolved from the ToolSemanticRegistry). When present the prompt carries a
95
+ * HOST SEMANTIC CONTEXT block constraining the generated rule to
96
+ * canonicalKind-first matching and host-dispatchable tool names. Undefined =
97
+ * prompt unchanged (backward compatible for workspaces without a host
98
+ * declaration).
99
+ */
100
+ hostSemanticContext?: ArtificerHostSemanticContext;
79
101
  }
80
102
  export interface ArtificerPromptInput {
81
103
  contextMode: 'v1' | 'v2';
@@ -102,6 +124,8 @@ export interface ArtificerPromptInput {
102
124
  * (backward compatible).
103
125
  */
104
126
  intentContract?: IntentContractV1;
127
+ /** PRI-741: present only when a host semantic projection was resolved. */
128
+ hostSemanticContext?: ArtificerHostSemanticContext;
105
129
  }
106
130
  export interface ArtificerPromptBuildResult {
107
131
  readonly message: string;
@@ -113,7 +137,7 @@ export interface ArtificerPromptBuildResult {
113
137
  */
114
138
  readonly systemPrompt: string;
115
139
  }
116
- 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 \"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 \"risks\": [\"<risk 1>\", \"<risk 2>\"],\n \"implementationCode\": \"function evaluate(input, helpers) { ... }\",\n \"goldenTraceCases\": [\n {\"caseId\":\"negative-1\",\"kind\":\"negative\",\"toolName\":\"write_file\",\"params\":{\"path\":\"/system/file\"},\"expectedDecision\":\"block\"},\n {\"caseId\":\"positive-1\",\"kind\":\"positive\",\"toolName\":\"write_file\",\"params\":{\"path\":\"/workspace/file\"},\"expectedDecision\":\"allow\"}\n ],\n \"affectedTools\": [\"write_file\"],\n \"generatedAt\": \"<ISO-8601 timestamp>\"\n}\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, and paramsSummary\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- 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\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 above (v1/v2 contract) regardless of which case ids appear in the feedback text.\n- In v1 mode the ONLY legal decisions are \"allow\" and \"block\"; the ONLY legal field set is the one in OUTPUT FORMAT above. Any field not listed there (e.g. requiresContextVersion, ruleContext) 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";
140
+ 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 \"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 \"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\"},\n {\"caseId\":\"positive-1\",\"kind\":\"positive\",\"toolName\":\"write\",\"params\":{\"path\":\"/workspace/file\"},\"expectedDecision\":\"allow\"}\n ],\n \"affectedTools\": [\"write\"],\n \"generatedAt\": \"<ISO-8601 timestamp>\"\n}\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- 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 above (v1/v2 contract) regardless of which case ids appear in the feedback text.\n- In v1 mode the ONLY legal decisions are \"allow\" and \"block\"; the ONLY legal field set is the one in OUTPUT FORMAT above. Any field not listed there (e.g. requiresContextVersion, ruleContext) 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";
117
141
  /**
118
142
  * PRI-634 PR-A: bumped v2 → v3. The prompt contract changed materially:
119
143
  * (1) explicit paramsSummary-is-an-object contract with whole-object string
@@ -127,7 +151,17 @@ export declare const ARTIFICER_PROTOCOL_INSTRUCTION = "You are an Artificer agen
127
151
  * feedback block (priorValidatorErrors) — the repair attempt now receives the
128
152
  * verbatim schema-rejection reasons from its previous attempt.
129
153
  */
130
- export declare const ARTIFICER_PROMPT_CONTRACT_VERSION = "artificer-output-v2.prompt.v4";
154
+ /**
155
+ * PRI-741: bumped v4 → v5. (1) canonicalKind-first matching contract —
156
+ * input.action.canonicalKind is the primary dispatch signal, the OUTPUT FORMAT
157
+ * example demonstrates canonicalKind matching and no longer teaches the
158
+ * phantom generic name `write_file`; (2) optional HOST SEMANTIC CONTEXT block
159
+ * (hostSemanticContext): the real host tool names + kinds projected from the
160
+ * ToolSemanticRegistry host layer, constraining affectedTools and
161
+ * goldenTraceCases toolNames to host-dispatchable names.
162
+ */
163
+ export declare const ARTIFICER_PROMPT_CONTRACT_VERSION = "artificer-output-v2.prompt.v5";
164
+ export declare function buildArtificerHostSemanticContext(registry: ToolSemanticRegistry, hostKinds?: readonly string[]): ArtificerHostSemanticContext;
131
165
  export declare class ArtificerPromptBuilder {
132
166
  buildPrompt(input: ArtificerPromptBuilderInput): ArtificerPromptBuildResult;
133
167
  }
@@ -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;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,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C,KAAK,EAAE,2BAA2B,GAAG,0BAA0B,CAgD1E;CACF"}
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;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,oBAAoB,CAAC,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,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,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,CA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