@myagentroam/agent 0.9.120 → 0.9.122

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.
@@ -14,6 +14,7 @@ export class AnthropicMessagesAdapter {
14
14
  const maxAttempts = modelRetryMaxAttempts(retryState);
15
15
  while (retryState.attempts < maxAttempts) {
16
16
  const attempt = retryState.attempts++;
17
+ // Buffer non-semantic events until a semantic event makes this attempt non-retryable.
17
18
  const prelude = [];
18
19
  let sawSemanticEvent = false;
19
20
  try {
@@ -84,6 +85,7 @@ export class AnthropicMessagesAdapter {
84
85
  })
85
86
  }, signal, 1);
86
87
  const blocks = new Map();
88
+ // Block completion precedes the stop reason, which determines commentary vs final answer.
87
89
  const pendingTextBlocks = new Set();
88
90
  let responseId = `anthropic-${randomUUID()}`;
89
91
  let terminal;
@@ -227,6 +227,7 @@ function targetMatchesRecord(target, record) {
227
227
  return ((target.callId === undefined || target.callId === messageCallId) &&
228
228
  (target.toolName === undefined || target.toolName === messageToolName));
229
229
  }
230
+ /** A checkpoint draft is valid only when its replacements match the source records and evidence. */
230
231
  function replacementMatchesRecords(replacement, records, recordsBySequence, workspace, platform) {
231
232
  const source = recordsBySequence.get(replacement.target.sequence);
232
233
  if (!source || !isRecord(source.payload))
@@ -263,6 +263,7 @@ export class CodeModeTool {
263
263
  void job.finally(() => pending.delete(job));
264
264
  }
265
265
  else if (frame.kind === 'done') {
266
+ // Child completion cannot undo Host tool effects from calls it did not await.
266
267
  if (pending.size)
267
268
  throw new MarAgentError('MAR_AGENT_CODE_INCOMPLETE', 'Code Mode returned with unawaited tool calls; completed operations are not rolled back.');
268
269
  complete = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.9.120",
3
+ "version": "0.9.122",
4
4
  "description": "Embeddable MAR coding agent SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",