@meistrari/agent-core 0.1.8 → 0.1.9

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/agent-core",
3
3
  "type": "module",
4
- "version": "0.1.8",
4
+ "version": "0.1.9",
5
5
  "packageManager": "bun@1.3.12",
6
6
  "description": "Shared contracts and runtime modules for Tela coding-agent sandboxes: agent protocol, supervisor wire protocol, resident supervisor, worker runtime client, and Claude/Codex harness adapters.",
7
7
  "license": "UNLICENSED",
@@ -323,7 +323,10 @@ function toolCallCompletion(item: CodexCompletedItem): { status: AgentToolCallSt
323
323
  return { status: item.status === 'failed' ? 'failed' : 'completed', output: imageGenerationResult(item) }
324
324
  if (item.type === 'commandExecution') {
325
325
  const status = item.exitCode === undefined || item.exitCode === null || item.exitCode === 0 ? 'completed' : 'failed'
326
- return { status, output: commandExecutionResult(item, status), error: 'error' in item && typeof item.error === 'string' ? { message: item.error } : undefined }
326
+ const error = 'error' in item && typeof item.error === 'string'
327
+ ? { message: item.error }
328
+ : status === 'failed' ? { message: `Command exited with code ${item.exitCode}.` } : undefined
329
+ return { status, output: commandExecutionResult(item, status), error }
327
330
  }
328
331
  if (item.type === 'dynamicToolCall')
329
332
  return { status: item.success === false ? 'failed' : 'completed', output: dynamicToolResult(item) }
@@ -401,7 +404,10 @@ function hookPromptText(item: CodexHookPromptItem): string | undefined {
401
404
  function commandExecutionResult(item: Extract<CodexCompletedItem, { type: 'commandExecution' }>, status: 'completed' | 'failed'): AgentToolResult | undefined {
402
405
  // Stdout is content, not a label: whitespace and an explicitly empty
403
406
  // successful output must survive normalization into the complete step.
404
- const text = item.aggregatedOutput
407
+ // Native build_command_execution_end_item encodes empty captured output as
408
+ // null, alongside a concrete exit code. That authoritative terminal receipt
409
+ // differs from an incomplete item whose output and exit code are both absent.
410
+ const text = item.aggregatedOutput ?? (Number.isInteger(item.exitCode) ? '' : undefined)
405
411
  if (typeof text !== 'string')
406
412
  return undefined
407
413
 
@@ -1,6 +1,6 @@
1
1
  // Generated by scripts/write-provenance.ts. Do not edit by hand.
2
2
  export const generatedProvenance = {
3
- version: "0.1.8",
4
- sha: "ff5b7ece6b3b115d420a21046bd47b465813132b",
5
- buildTime: "2026-09-10T20:15:33.140Z",
3
+ version: "0.1.9",
4
+ sha: "2b4aae8268cb99a570e9a2d40d6086189c1aa19a",
5
+ buildTime: "2026-09-11T20:10:58.896Z",
6
6
  } as const