@akagilnc/pi-workflow-roles 0.1.3629 → 0.1.3631
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/acp-host/production-host.js +4 -5
- package/dist/gatekeeper-role.js +3 -1
- package/dist/notary-contracts.js +1 -0
- package/dist/public-cli/main.js +1 -0
- package/package.json +1 -1
- package/src/acp-host/role-envelope.ts +2 -4
- package/src/gatekeeper-role.ts +3 -1
- package/src/notary-contracts.ts +2 -0
|
@@ -3207,6 +3207,7 @@ function notaryDecisiveFacts(output) {
|
|
|
3207
3207
|
if (status === "pass" || status === "bounce") {
|
|
3208
3208
|
const findings = output.findings;
|
|
3209
3209
|
facts.findingsCount = Array.isArray(findings) ? findings.length : 0;
|
|
3210
|
+
facts.findings = Array.isArray(findings) ? findings : [];
|
|
3210
3211
|
}
|
|
3211
3212
|
if (status === "bounce") {
|
|
3212
3213
|
facts.disposition = "rewrite";
|
|
@@ -10659,7 +10660,7 @@ function failureReason(error) {
|
|
|
10659
10660
|
}
|
|
10660
10661
|
function asStringArray3(value) {
|
|
10661
10662
|
if (!Array.isArray(value)) return [];
|
|
10662
|
-
return value.
|
|
10663
|
+
return value.map((item) => typeof item === "string" ? item : JSON.stringify(item));
|
|
10663
10664
|
}
|
|
10664
10665
|
function isRecord14(value) {
|
|
10665
10666
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -24667,13 +24668,11 @@ async function prepareAcpRoleEnvelope(options) {
|
|
|
24667
24668
|
});
|
|
24668
24669
|
reply(socket, rpc.id, {
|
|
24669
24670
|
content: projected.content,
|
|
24670
|
-
structuredContent: projected.details,
|
|
24671
24671
|
isError: true
|
|
24672
24672
|
});
|
|
24673
24673
|
} catch {
|
|
24674
24674
|
reply(socket, rpc.id, {
|
|
24675
24675
|
content: declared.content,
|
|
24676
|
-
structuredContent: declared.details,
|
|
24677
24676
|
isError: true
|
|
24678
24677
|
});
|
|
24679
24678
|
}
|
|
@@ -24686,7 +24685,7 @@ async function prepareAcpRoleEnvelope(options) {
|
|
|
24686
24685
|
details: result.details,
|
|
24687
24686
|
isError: false
|
|
24688
24687
|
});
|
|
24689
|
-
reply(socket, rpc.id, { content: projected.content,
|
|
24688
|
+
reply(socket, rpc.id, { content: projected.content, ...projected.isError ? { isError: true } : {} });
|
|
24690
24689
|
} catch (error) {
|
|
24691
24690
|
let content;
|
|
24692
24691
|
let details;
|
|
@@ -24710,7 +24709,7 @@ async function prepareAcpRoleEnvelope(options) {
|
|
|
24710
24709
|
details,
|
|
24711
24710
|
isError: true
|
|
24712
24711
|
});
|
|
24713
|
-
reply(socket, rpc.id, { content: projected.content,
|
|
24712
|
+
reply(socket, rpc.id, { content: projected.content, ...projected.isError ? { isError: true } : {} });
|
|
24714
24713
|
}
|
|
24715
24714
|
} catch (error) {
|
|
24716
24715
|
reply(socket, rpc.id, void 0, error);
|
package/dist/gatekeeper-role.js
CHANGED
|
@@ -51,7 +51,9 @@ function failureReason(error) {
|
|
|
51
51
|
function asStringArray(value) {
|
|
52
52
|
if (!Array.isArray(value))
|
|
53
53
|
return [];
|
|
54
|
-
|
|
54
|
+
// Officer findings may be structured objects (category/law/evidence); the
|
|
55
|
+
// parent role must see them verbatim, not an empty list (#750 evidence).
|
|
56
|
+
return value.map((item) => (typeof item === "string" ? item : JSON.stringify(item)));
|
|
55
57
|
}
|
|
56
58
|
/** Serializable stand-in when the child tool call had no arguments object. */
|
|
57
59
|
export const MISSING_ARGUMENTS_SUBMISSION = Object.freeze({ missing: "arguments" });
|
package/dist/notary-contracts.js
CHANGED
|
@@ -80,6 +80,7 @@ function notaryDecisiveFacts(output) {
|
|
|
80
80
|
if (status === "pass" || status === "bounce") {
|
|
81
81
|
const findings = output.findings;
|
|
82
82
|
facts.findingsCount = Array.isArray(findings) ? findings.length : 0;
|
|
83
|
+
facts.findings = Array.isArray(findings) ? findings : [];
|
|
83
84
|
}
|
|
84
85
|
if (status === "bounce") {
|
|
85
86
|
facts.disposition = "rewrite";
|
package/dist/public-cli/main.js
CHANGED
|
@@ -14902,6 +14902,7 @@ function notaryDecisiveFacts(output) {
|
|
|
14902
14902
|
if (status === "pass" || status === "bounce") {
|
|
14903
14903
|
const findings = output.findings;
|
|
14904
14904
|
facts.findingsCount = Array.isArray(findings) ? findings.length : 0;
|
|
14905
|
+
facts.findings = Array.isArray(findings) ? findings : [];
|
|
14905
14906
|
}
|
|
14906
14907
|
if (status === "bounce") {
|
|
14907
14908
|
facts.disposition = "rewrite";
|
package/package.json
CHANGED
|
@@ -474,14 +474,12 @@ export async function prepareAcpRoleEnvelope(options: {
|
|
|
474
474
|
});
|
|
475
475
|
reply(socket, rpc.id, {
|
|
476
476
|
content: projected.content,
|
|
477
|
-
structuredContent: projected.details,
|
|
478
477
|
isError: true,
|
|
479
478
|
});
|
|
480
479
|
} catch {
|
|
481
480
|
// Slot already filled; durable projection may have partially failed.
|
|
482
481
|
reply(socket, rpc.id, {
|
|
483
482
|
content: declared.content,
|
|
484
|
-
structuredContent: declared.details,
|
|
485
483
|
isError: true,
|
|
486
484
|
});
|
|
487
485
|
}
|
|
@@ -497,7 +495,7 @@ export async function prepareAcpRoleEnvelope(options: {
|
|
|
497
495
|
// Candidate only: do not emit turn_end here. Seal waits for the typed ACP
|
|
498
496
|
// round boundary (closeRound after session/prompt), so delayed siblings stay
|
|
499
497
|
// in the same round instead of becoming silent post-seal anomalies.
|
|
500
|
-
reply(socket, rpc.id, { content: projected.content,
|
|
498
|
+
reply(socket, rpc.id, { content: projected.content, ...(projected.isError ? { isError: true } : {}) });
|
|
501
499
|
} catch (error) {
|
|
502
500
|
let content: ContentPart[];
|
|
503
501
|
let details: Record<string, unknown>;
|
|
@@ -529,7 +527,7 @@ export async function prepareAcpRoleEnvelope(options: {
|
|
|
529
527
|
details,
|
|
530
528
|
isError: true,
|
|
531
529
|
});
|
|
532
|
-
reply(socket, rpc.id, { content: projected.content,
|
|
530
|
+
reply(socket, rpc.id, { content: projected.content, ...(projected.isError ? { isError: true } : {}) });
|
|
533
531
|
}
|
|
534
532
|
} catch (error) { reply(socket, rpc.id, undefined, error); }
|
|
535
533
|
})();
|
package/src/gatekeeper-role.ts
CHANGED
|
@@ -146,7 +146,9 @@ function failureReason(error: unknown): string {
|
|
|
146
146
|
|
|
147
147
|
function asStringArray(value: unknown): readonly string[] {
|
|
148
148
|
if (!Array.isArray(value)) return [];
|
|
149
|
-
|
|
149
|
+
// Officer findings may be structured objects (category/law/evidence); the
|
|
150
|
+
// parent role must see them verbatim, not an empty list (#750 evidence).
|
|
151
|
+
return value.map((item) => (typeof item === "string" ? item : JSON.stringify(item)));
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
/** Serializable stand-in when the child tool call had no arguments object. */
|
package/src/notary-contracts.ts
CHANGED
|
@@ -128,6 +128,8 @@ export function notaryDecisiveFacts(output: NotaryOutput): Record<string, unknow
|
|
|
128
128
|
if (status === "pass" || status === "bounce") {
|
|
129
129
|
const findings = (output as { findings?: unknown }).findings;
|
|
130
130
|
facts.findingsCount = Array.isArray(findings) ? findings.length : 0;
|
|
131
|
+
// The parent role reads the findings themselves; the count alone dropped them (#750).
|
|
132
|
+
facts.findings = Array.isArray(findings) ? findings : [];
|
|
131
133
|
}
|
|
132
134
|
if (status === "bounce") {
|
|
133
135
|
facts.disposition = "rewrite";
|