@principles/core 1.291.3 → 1.291.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-v2/internalization/adversarial-feedback.d.ts +3 -1
- package/dist/runtime-v2/internalization/adversarial-feedback.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/adversarial-feedback.js +10 -1
- package/dist/runtime-v2/internalization/adversarial-feedback.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* Design:
|
|
9
9
|
* - Pure function, no I/O, no timestamps/random (deterministic).
|
|
10
10
|
* - Each failed case becomes one line: caseId | attackType | expected vs
|
|
11
|
-
* actual | rationale
|
|
11
|
+
* actual | rationale, plus an indented `caseInput:` continuation line
|
|
12
|
+
* when the producer supplied the failed case's input (absent on legacy
|
|
13
|
+
* artifacts).
|
|
12
14
|
* - Empty input still yields a usable, non-empty string (the gate may
|
|
13
15
|
* reject on a runtime error with no per-case detail).
|
|
14
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial-feedback.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/adversarial-feedback.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adversarial-feedback.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/adversarial-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAInE;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,SAAS,qBAAqB,EAAE,GAAG,MAAM,CA4B/F"}
|
|
@@ -19,7 +19,16 @@ export function formatAdversarialFeedback(failedCases) {
|
|
|
19
19
|
const actual = fc.actualDecision !== undefined
|
|
20
20
|
? `got ${fc.actualDecision}`
|
|
21
21
|
: `error ${fc.errorType ?? 'unknown'}`;
|
|
22
|
-
|
|
22
|
+
const head = `- ${fc.caseId} [${fc.attackType}]: expected ${fc.expectedDecision}, ${actual} — ${rationale}`;
|
|
23
|
+
// Phase 1 final acceptance review (2026-10-11): this formatter is the
|
|
24
|
+
// ONLY feedback channel into loop-created repair rounds (the repairPayload
|
|
25
|
+
// channel does not apply to them), so a verdict-only line leaves the
|
|
26
|
+
// round-2 artificer without the input that failed. caseInput is already
|
|
27
|
+
// bounded by the producer's shared budget; absent on legacy artifacts.
|
|
28
|
+
if (typeof fc.caseInput === 'string' && fc.caseInput.trim() !== '') {
|
|
29
|
+
return `${head}\n caseInput: ${fc.caseInput}`;
|
|
30
|
+
}
|
|
31
|
+
return head;
|
|
23
32
|
});
|
|
24
33
|
return `${HEADER}\n${lines.join('\n')}`;
|
|
25
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial-feedback.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/adversarial-feedback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adversarial-feedback.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/adversarial-feedback.ts"],"names":[],"mappings":"AAkBA,MAAM,MAAM,GAAG,gFAAgF,CAAC;AAEhG;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAA6C;IACrF,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,GAAG,MAAM,wJAAwJ,CAAC;IAC3K,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QACnC,MAAM,SAAS,GAAG,OAAO,EAAE,CAAC,SAAS,KAAK,QAAQ,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE;YAC9E,CAAC,CAAC,EAAE,CAAC,SAAS;YACd,CAAC,CAAC,yBAAyB,CAAC;QAC9B,wEAAwE;QACxE,oEAAoE;QACpE,4DAA4D;QAC5D,MAAM,MAAM,GAAG,EAAE,CAAC,cAAc,KAAK,SAAS;YAC5C,CAAC,CAAC,OAAO,EAAE,CAAC,cAAc,EAAE;YAC5B,CAAC,CAAC,SAAS,EAAE,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,UAAU,eAAe,EAAE,CAAC,gBAAgB,KAAK,MAAM,MAAM,SAAS,EAAE,CAAC;QAC5G,sEAAsE;QACtE,2EAA2E;QAC3E,qEAAqE;QACrE,wEAAwE;QACxE,uEAAuE;QACvE,IAAI,OAAO,EAAE,CAAC,SAAS,KAAK,QAAQ,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACnE,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAC,SAAS,EAAE,CAAC;QACjD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/core",
|
|
3
|
-
"version": "1.291.
|
|
3
|
+
"version": "1.291.4",
|
|
4
4
|
"description": "Pure-logic core of Principles Disciple, an AI Agent Governance System - pain signal capture and principle proposal (no I/O)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|