@arbiterforge/ca-pi 0.6.1 → 0.6.2
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/package.json
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to `ca-pi` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.6.2] - 2026-08-10
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Child dispatch protocol accepts the three optional message fields Pi 0.84.x
|
|
12
|
+
added: assistant `rawStopReason` (observed on the live RPC wire, where it
|
|
13
|
+
degraded every 0.84 child dispatch after the first provider turn), assistant
|
|
14
|
+
`deferred` (provider deferred-response handle), and toolResult `usage`. Each
|
|
15
|
+
validates strictly when present; unknown keys still fail closed (ADR-0014).
|
|
16
|
+
Proven by the live isolated-child contract against real Pi 0.84.1 and
|
|
17
|
+
0.80.10.
|
|
18
|
+
|
|
7
19
|
## [0.6.1] - 2026-08-10
|
|
8
20
|
|
|
9
21
|
### Fixed
|
|
@@ -7593,6 +7593,13 @@ function validDiagnostic(value) {
|
|
|
7593
7593
|
}
|
|
7594
7594
|
return value.details === void 0 || validOpaqueJson(value.details);
|
|
7595
7595
|
}
|
|
7596
|
+
function validDeferredHandle(value) {
|
|
7597
|
+
return isRecord(value) && exactKeys4(
|
|
7598
|
+
value,
|
|
7599
|
+
["provider", "modelId", "api", "id", "expiresAt", "pollAfterMs", "data"],
|
|
7600
|
+
["provider", "modelId", "api", "id"]
|
|
7601
|
+
) && ["provider", "modelId", "api", "id"].every((key) => boundedString2(value[key])) && (value.expiresAt === void 0 || typeof value.expiresAt === "number" && Number.isFinite(value.expiresAt)) && (value.pollAfterMs === void 0 || typeof value.pollAfterMs === "number" && Number.isFinite(value.pollAfterMs)) && (value.data === void 0 || validOpaqueJson(value.data));
|
|
7602
|
+
}
|
|
7596
7603
|
function validMessage(value) {
|
|
7597
7604
|
if (!isRecord(value) || typeof value.role !== "string") return false;
|
|
7598
7605
|
if (value.role === "user") {
|
|
@@ -7601,16 +7608,16 @@ function validMessage(value) {
|
|
|
7601
7608
|
if (value.role === "assistant") {
|
|
7602
7609
|
return exactKeys4(
|
|
7603
7610
|
value,
|
|
7604
|
-
["role", "content", "api", "provider", "model", "responseModel", "responseId", "diagnostics", "usage", "stopReason", "errorMessage", "timestamp"],
|
|
7611
|
+
["role", "content", "api", "provider", "model", "responseModel", "responseId", "diagnostics", "usage", "stopReason", "errorMessage", "rawStopReason", "deferred", "timestamp"],
|
|
7605
7612
|
["role", "content", "api", "provider", "model", "usage", "stopReason", "timestamp"]
|
|
7606
|
-
) && validContent(value.content, "assistant") && ["api", "provider", "model", "stopReason"].every((key) => typeof value[key] === "string") && (value.responseModel === void 0 || boundedString2(value.responseModel)) && (value.responseId === void 0 || boundedString2(value.responseId)) && (value.errorMessage === void 0 || boundedString2(value.errorMessage)) && (value.diagnostics === void 0 || Array.isArray(value.diagnostics) && value.diagnostics.length <= MAX_JSON_ARRAY && value.diagnostics.every(validDiagnostic)) && validUsage(value.usage) && typeof value.timestamp === "number" && Number.isFinite(value.timestamp);
|
|
7613
|
+
) && validContent(value.content, "assistant") && ["api", "provider", "model", "stopReason"].every((key) => typeof value[key] === "string") && (value.responseModel === void 0 || boundedString2(value.responseModel)) && (value.responseId === void 0 || boundedString2(value.responseId)) && (value.errorMessage === void 0 || boundedString2(value.errorMessage)) && (value.rawStopReason === void 0 || boundedString2(value.rawStopReason)) && (value.deferred === void 0 || validDeferredHandle(value.deferred)) && (value.diagnostics === void 0 || Array.isArray(value.diagnostics) && value.diagnostics.length <= MAX_JSON_ARRAY && value.diagnostics.every(validDiagnostic)) && validUsage(value.usage) && typeof value.timestamp === "number" && Number.isFinite(value.timestamp);
|
|
7607
7614
|
}
|
|
7608
7615
|
if (value.role === "toolResult") {
|
|
7609
7616
|
return exactKeys4(
|
|
7610
7617
|
value,
|
|
7611
|
-
["role", "toolCallId", "toolName", "content", "details", "isError", "timestamp"],
|
|
7618
|
+
["role", "toolCallId", "toolName", "content", "details", "isError", "usage", "timestamp"],
|
|
7612
7619
|
["role", "toolCallId", "toolName", "content", "isError", "timestamp"]
|
|
7613
|
-
) && typeof value.toolCallId === "string" && typeof value.toolName === "string" && validContent(value.content, "toolResult") && (value.details === void 0 || validOpaqueJson(value.details)) && typeof value.isError === "boolean" && typeof value.timestamp === "number" && Number.isFinite(value.timestamp);
|
|
7620
|
+
) && typeof value.toolCallId === "string" && typeof value.toolName === "string" && validContent(value.content, "toolResult") && (value.details === void 0 || validOpaqueJson(value.details)) && (value.usage === void 0 || validUsage(value.usage)) && typeof value.isError === "boolean" && typeof value.timestamp === "number" && Number.isFinite(value.timestamp);
|
|
7614
7621
|
}
|
|
7615
7622
|
return false;
|
|
7616
7623
|
}
|