@tutti-os/agent-activity-core 0.0.228 → 0.0.230

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/index.d.ts CHANGED
@@ -1912,7 +1912,7 @@ declare function parseInlineActivityMessages(event: AgentActivityUpdatedEvent):
1912
1912
  interface AgentActivityOptimisticApplyResult {
1913
1913
  applied: boolean;
1914
1914
  needsReconcile: boolean;
1915
- reason?: "append_without_anchor" | "identity_mismatch" | "tool_output_offset_mismatch";
1915
+ reason?: "append_without_anchor" | "identity_mismatch" | "late_after_terminal" | "tool_output_offset_mismatch";
1916
1916
  }
1917
1917
  interface AgentActivityOptimisticMessageScope {
1918
1918
  workspaceId: string;
package/dist/index.js CHANGED
@@ -1021,6 +1021,13 @@ function createAgentActivityOptimisticMessageOverlay() {
1021
1021
  }
1022
1022
  const key = liveMessageKey(event);
1023
1023
  const existing = optimistic.get(key)?.message ?? canonical.get(key) ?? void 0;
1024
+ if (existing && isTerminalMessage(existing) && !deltaIsExplicitlyTerminal(data)) {
1025
+ return {
1026
+ applied: false,
1027
+ needsReconcile: true,
1028
+ reason: "late_after_terminal"
1029
+ };
1030
+ }
1024
1031
  if (data.content?.operation === "append_text" && !existing) {
1025
1032
  return {
1026
1033
  applied: false,