@arbiterforge/ca-pi 0.6.0 → 0.6.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbiterforge/ca-pi",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "license": "AGPL-3.0-only",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4,6 +4,17 @@ All notable changes to `ca-pi` are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.6.1] - 2026-08-10
8
+
9
+ ### Fixed
10
+
11
+ - Child dispatch protocol accepts Pi ≥0.84.0's delta-only RPC `message_update`
12
+ events (pi#7290): the wire event dropped the full `message` record and the
13
+ `partial` field inside assistant events, which the strict validator rejected,
14
+ degrading every live child dispatch on Pi 0.84.x. Both window shapes now
15
+ validate with exact key sets — the fail-closed boundary (ADR-0014) is
16
+ unchanged, only the newly-documented shape is recognized.
17
+
7
18
  ## [0.6.0] - 2026-08-09
8
19
 
9
20
  ### Added
@@ -7652,24 +7652,24 @@ function validPartialAssistantMessage(value) {
7652
7652
  }
7653
7653
  function validAssistantEvent(value) {
7654
7654
  if (!isRecord(value) || typeof value.type !== "string") return false;
7655
- const partial = () => validPartialAssistantMessage(value.partial);
7655
+ const exactWithOptionalPartial = (base) => "partial" in value ? exactKeys4(value, [...base, "partial"]) && validPartialAssistantMessage(value.partial) : exactKeys4(value, base);
7656
7656
  const contentIndex = () => Number.isSafeInteger(value.contentIndex) && value.contentIndex >= 0;
7657
7657
  switch (value.type) {
7658
7658
  case "start":
7659
- return exactKeys4(value, ["type", "partial"]) && partial();
7659
+ return exactWithOptionalPartial(["type"]);
7660
7660
  case "text_start":
7661
7661
  case "thinking_start":
7662
7662
  case "toolcall_start":
7663
- return exactKeys4(value, ["type", "contentIndex", "partial"]) && contentIndex() && partial();
7663
+ return exactWithOptionalPartial(["type", "contentIndex"]) && contentIndex();
7664
7664
  case "text_delta":
7665
7665
  case "thinking_delta":
7666
7666
  case "toolcall_delta":
7667
- return exactKeys4(value, ["type", "contentIndex", "delta", "partial"]) && contentIndex() && boundedString2(value.delta) && partial();
7667
+ return exactWithOptionalPartial(["type", "contentIndex", "delta"]) && contentIndex() && boundedString2(value.delta);
7668
7668
  case "text_end":
7669
7669
  case "thinking_end":
7670
- return exactKeys4(value, ["type", "contentIndex", "content", "partial"]) && contentIndex() && boundedString2(value.content) && partial();
7670
+ return exactWithOptionalPartial(["type", "contentIndex", "content"]) && contentIndex() && boundedString2(value.content);
7671
7671
  case "toolcall_end":
7672
- return exactKeys4(value, ["type", "contentIndex", "toolCall", "partial"]) && contentIndex() && validContentBlock(value.toolCall, "assistant") && partial();
7672
+ return exactWithOptionalPartial(["type", "contentIndex", "toolCall"]) && contentIndex() && validContentBlock(value.toolCall, "assistant");
7673
7673
  case "done":
7674
7674
  return exactKeys4(value, ["type", "reason", "message"]) && ["stop", "length", "toolUse"].includes(value.reason) && validMessage(value.message) && value.message.role === "assistant";
7675
7675
  case "error":
@@ -7712,7 +7712,7 @@ function parseChildJsonLine(line) {
7712
7712
  if (!exactKeys4(record2, ["type", "message"]) || !validMessage(record2.message) && !validPartialAssistantMessage(record2.message)) invalidProtocol();
7713
7713
  break;
7714
7714
  case "message_update":
7715
- if (!exactKeys4(record2, ["type", "message", "assistantMessageEvent"]) || !validPartialAssistantMessage(record2.message) || !validAssistantEvent(record2.assistantMessageEvent)) invalidProtocol();
7715
+ if ("message" in record2 ? !exactKeys4(record2, ["type", "message", "assistantMessageEvent"]) || !validPartialAssistantMessage(record2.message) || !validAssistantEvent(record2.assistantMessageEvent) : !exactKeys4(record2, ["type", "assistantMessageEvent"]) || !validAssistantEvent(record2.assistantMessageEvent)) invalidProtocol();
7716
7716
  break;
7717
7717
  case "tool_execution_start":
7718
7718
  if (!exactKeys4(record2, ["type", "toolCallId", "toolName", "args"]) || typeof record2.toolCallId !== "string" || typeof record2.toolName !== "string" || !validOpaqueJson(record2.args)) invalidProtocol();