@evalops/maestro 0.10.29 → 0.10.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"agent-runtime-ledger.js","sourceRoot":"","sources":["../../src/server/agent-runtime-ledger.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,2BAA2B,GACvC,yCAAyC,CAAC;AAC3C,MAAM,CAAC,MAAM,mCAAmC,GAC/C,iDAAiD,CAAC;AACnD,MAAM,CAAC,MAAM,mCAAmC,GAC/C,iDAAiD,CAAC;AAiLnD,SAAS,SAAS,CAAC,GAA2B,EAAE,GAAW;IAC1D,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,kBAAkB,CAAC,KAA2B;IACtD,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,eAAe,CAAC,EAAE,EAAE,CAAC;AAC7E,CAAC;AAED,SAAS,cAAc,CACtB,MAAiC;IAEjC,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,WAAW,CAAC;QACjB,KAAK,MAAM,CAAC;QACZ,KAAK,UAAU;YACd,OAAO,WAAW,CAAC;QACpB,KAAK,SAAS;YACb,OAAO,SAAS,CAAC;QAClB,KAAK,SAAS;YACb,OAAO,SAAS,CAAC;QAClB,KAAK,QAAQ;YACZ,OAAO,SAAS,CAAC;QAClB,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC;QACjB;YACC,OAAO,SAAS,CAAC;IACnB,CAAC;AACF,CAAC;AAED,SAAS,YAAY,CACpB,KAA2B;IAE3B,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,SAAS;YACb,OAAO,KAAK,CAAC;QACd,KAAK,SAAS;YACb,OAAO,KA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CAAC,MAAM;YAChD,MAAM;YACN,OAAO;SACP;QACD,OAAO;QACP,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;QAC9C,SAAS;KACT,CAAC;AACH,CAAC","sourcesContent":["import type {\n\tComposerRunTimelineItem,\n\tComposerRunTimelineResponse,\n\tComposerRunTimelineStatus,\n\tComposerRunTimelineVisibility,\n} from \"@evalops/contracts\";\nimport type { AgentTrajectoryReplayReport } from \"./agent-trajectory-replay.js\";\nimport type {\n\tAgentTrajectoryEvent,\n\tAgentTrajectoryReport,\n} from \"./agent-trajectory.js\";\n\nexport const AGENT_RUNTIME_LEDGER_SCHEMA =\n\t\"evalops.maestro.agent-runtime-ledger.v1\";\nexport const AGENT_RUNTIME_REPLAY_SUMMARY_SCHEMA =\n\t\"evalops.maestro.agent-runtime-replay-summary.v1\";\nexport const AGENT_RUNTIME_PROMOTION_PLAN_SCHEMA =\n\t\"evalops.maestro.agent-runtime-promotion-plan.v1\";\n\nexport type AgentRuntimeLedgerEntryKind =\n\t| \"run\"\n\t| \"message\"\n\t| \"model_call\"\n\t| \"tool_call\"\n\t| \"tool_result\"\n\t| \"wait\"\n\t| \"checkpoint\"\n\t| \"artifact\"\n\t| \"evidence\"\n\t| \"governance\"\n\t| \"context\"\n\t| \"child_run\"\n\t| \"runtime\";\n\nexport type AgentRuntimeLedgerState =\n\t| \"pending\"\n\t| \"running\"\n\t| \"waiting\"\n\t| \"blocked\"\n\t| \"succeeded\"\n\t| \"failed\"\n\t| \"cancelled\"\n\t| \"skipped\";\n\ntype AgentRuntimePromotionStepState = Exclude<\n\tAgentRuntimeLedgerState,\n\t\"blocked\"\n>;\n\nexport interface AgentRuntimeLedgerEntry {\n\tid: string;\n\tsequence: number;\n\ttimestamp: string;\n\tkind: AgentRuntimeLedgerEntryKind;\n\tphase: AgentTrajectoryEvent[\"phase\"];\n\tactor: AgentTrajectoryEvent[\"actor\"];\n\ttype: string;\n\tstate: AgentRuntimeLedgerState;\n\ttitle: string;\n\tvisibility: ComposerRunTimelineVisibility;\n\tsource: ComposerRunTimelineItem[\"source\"];\n\ttimelineItemId?: string;\n\ttrajectoryEventId: string;\n\ttoolName?: string;\n\tsummary?: string;\n\trelatedIds: string[];\n\tevidence: AgentTrajectoryEvent[\"evidence\"];\n\tplatformShape: {\n\t\tstepKind: string;\n\t\tworkItemKind: string;\n\t\twaitType?: string;\n\t};\n}\n\nexport interface AgentRuntimeLedgerReport {\n\tschemaVersion: typeof AGENT_RUNTIME_LEDGER_SCHEMA;\n\trun: {\n\t\tid: string;\n\t\tsessionId: string;\n\t\tsource: ComposerRunTimelineResponse[\"source\"];\n\t\tgeneratedAt: string;\n\t\tplatformBacked: boolean;\n\t\tsessionFile?: string;\n\t\tcwd?: string;\n\t\tmodel?: string;\n\t};\n\tcounts: {\n\t\tentries: number;\n\t\tpromotionOperations: number;\n\t\tbyKind: Record<string, number>;\n\t\tbyState: Record<string, number>;\n\t};\n\tentries: AgentRuntimeLedgerEntry[];\n\treplay: AgentRuntimeLedgerReplaySummary;\n\tpromotion: AgentRuntimePromotionPlan;\n}\n\nexport interface AgentRuntimeLedgerReplaySummary {\n\tschemaVersion: typeof AGENT_RUNTIME_REPLAY_SUMMARY_SCHEMA;\n\tdeterministic: boolean;\n\tevents: number;\n\tdeltas: number;\n\terrors: number;\n\twarnings: number;\n\tcursor: {\n\t\tstartSequence?: number;\n\t\tendSequence?: number;\n\t};\n}\n\nexport interface AgentRuntimePromotionPlan {\n\tschemaVersion: typeof AGENT_RUNTIME_PROMOTION_PLAN_SCHEMA;\n\trunId: string;\n\tsessionId: string;\n\tidempotencyKey: string;\n\toperations: AgentRuntimePromotionOperation[];\n\twarnings: string[];\n}\n\nexport type AgentRuntimePromotionOperation =\n\t| {\n\t\t\toperation: \"handle_trigger\";\n\t\t\tid: string;\n\t\t\tpayload: {\n\t\t\t\tsourceEventType: \"maestro.local_ledger_promote\";\n\t\t\t\tsourceEventId: string;\n\t\t\t\tidempotencyKey: string;\n\t\t\t\tsessionId: string;\n\t\t\t\tgeneratedAt: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\toperation: \"record_run_step\";\n\t\t\tid: string;\n\t\t\tledgerEntryId: string;\n\t\t\tpayload: {\n\t\t\t\tstepId: string;\n\t\t\t\tkind: string;\n\t\t\t\tstate: AgentRuntimePromotionStepState;\n\t\t\t\ttitle: string;\n\t\t\t\ttimestamp: string;\n\t\t\t\ttoolName?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\toperation: \"record_run_work_item\";\n\t\t\tid: string;\n\t\t\tledgerEntryId: string;\n\t\t\tpayload: {\n\t\t\t\tworkItemId: string;\n\t\t\t\tkind: string;\n\t\t\t\tstate: AgentRuntimeLedgerState;\n\t\t\t\ttitle: string;\n\t\t\t\ttimestamp: string;\n\t\t\t\twaitId?: string;\n\t\t\t\ttoolExecutionId?: string;\n\t\t\t\tevidenceRefs?: string[];\n\t\t\t\tcompletionGate?: string;\n\t\t\t\tpayload?: Record<string, unknown>;\n\t\t\t};\n\t }\n\t| {\n\t\t\toperation: \"wait_run\";\n\t\t\tid: string;\n\t\t\tledgerEntryId: string;\n\t\t\tpayload: {\n\t\t\t\twaitId: string;\n\t\t\t\twaitType: string;\n\t\t\t\ttitle: string;\n\t\t\t\ttimestamp: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\toperation: \"complete_run\" | \"fail_run\";\n\t\t\tid: string;\n\t\t\tpayload: {\n\t\t\t\tstate: \"succeeded\" | \"failed\";\n\t\t\t\ttimestamp: string;\n\t\t\t\treason?: string;\n\t\t\t};\n\t };\n\nexport interface BuildAgentRuntimeLedgerOptions {\n\tsession: {\n\t\tid: string;\n\t\tsessionFile?: string;\n\t\tcwd?: string;\n\t\tmodel?: string;\n\t};\n\ttimeline: ComposerRunTimelineResponse;\n\ttrajectory: AgentTrajectoryReport;\n\treplay: AgentTrajectoryReplayReport;\n}\n\nfunction increment(map: Record<string, number>, key: string): void {\n\tmap[key] = (map[key] ?? 0) + 1;\n}\n\nfunction timelineIdForEvent(event: AgentTrajectoryEvent): string | undefined {\n\treturn event.evidence.find((anchor) => anchor.kind === \"timeline_item\")?.id;\n}\n\nfunction stateForStatus(\n\tstatus: ComposerRunTimelineStatus,\n): AgentRuntimeLedgerState {\n\tswitch (status) {\n\t\tcase \"completed\":\n\t\tcase \"info\":\n\t\tcase \"approved\":\n\t\t\treturn \"succeeded\";\n\t\tcase \"running\":\n\t\t\treturn \"running\";\n\t\tcase \"pending\":\n\t\t\treturn \"waiting\";\n\t\tcase \"denied\":\n\t\t\treturn \"blocked\";\n\t\tcase \"failed\":\n\t\t\treturn \"failed\";\n\t\tdefault:\n\t\t\treturn \"pending\";\n\t}\n}\n\nfunction kindForEvent(\n\tevent: AgentTrajectoryEvent,\n): AgentRuntimeLedgerEntryKind {\n\tswitch (event.kind) {\n\t\tcase \"session\":\n\t\t\treturn \"run\";\n\t\tcase \"message\":\n\t\t\treturn event.actor === \"assistant\" ? \"model_call\" : \"message\";\n\t\tcase \"tool\":\n\t\t\treturn event.type === \"tool.completed\" || event.type === \"tool.failed\"\n\t\t\t\t? \"tool_result\"\n\t\t\t\t: \"tool_call\";\n\t\tcase \"wait\":\n\t\t\treturn \"wait\";\n\t\tcase \"artifact\":\n\t\t\treturn \"artifact\";\n\t\tcase \"evidence\":\n\t\t\treturn \"evidence\";\n\t\tcase \"governance\":\n\t\t\treturn \"governance\";\n\t\tcase \"context\":\n\t\t\treturn event.type.startsWith(\"compaction.\") ? \"checkpoint\" : \"context\";\n\t\tcase \"agent\":\n\t\t\treturn \"child_run\";\n\t\tcase \"runtime\":\n\t\t\treturn \"runtime\";\n\t\tdefault:\n\t\t\treturn \"runtime\";\n\t}\n}\n\nfunction stepKindForEntry(\n\tentryKind: AgentRuntimeLedgerEntryKind,\n\tevent: AgentTrajectoryEvent,\n): string {\n\tif (entryKind === \"model_call\") return \"AGENT_RUN_STEP_KIND_MODEL_CALL\";\n\tif (entryKind === \"tool_call\") return \"AGENT_RUN_STEP_KIND_TOOL_CALL_INTENT\";\n\tif (entryKind === \"tool_result\" && event.status === \"failed\") {\n\t\treturn \"AGENT_RUN_STEP_KIND_ERROR\";\n\t}\n\tif (entryKind === \"tool_result\") return \"AGENT_RUN_STEP_KIND_TOOL_RESULT\";\n\tif (entryKind === \"wait\" || entryKind === \"governance\") {\n\t\treturn \"AGENT_RUN_STEP_KIND_APPROVAL_WAIT\";\n\t}\n\treturn \"AGENT_RUN_STEP_KIND_SYSTEM\";\n}\n\nfunction workItemKindForEntry(kind: AgentRuntimeLedgerEntryKind): string {\n\tswitch (kind) {\n\t\tcase \"message\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_USER_INPUT\";\n\t\tcase \"model_call\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_MODEL_CALL\";\n\t\tcase \"tool_call\":\n\t\tcase \"tool_result\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_TOOL_CALL\";\n\t\tcase \"child_run\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_CHILD_RUN\";\n\t\tcase \"wait\":\n\t\tcase \"governance\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_WAIT\";\n\t\tcase \"checkpoint\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_RECOVERY\";\n\t\tcase \"artifact\":\n\t\tcase \"evidence\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_MEMORY\";\n\t\tdefault:\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_ROOT\";\n\t}\n}\n\nfunction waitTypeForEntry(\n\tkind: AgentRuntimeLedgerEntryKind,\n\ttimelineItem?: ComposerRunTimelineItem,\n): string | undefined {\n\tif (kind !== \"wait\") {\n\t\treturn undefined;\n\t}\n\tswitch (timelineItem?.pendingRequestKind) {\n\t\tcase \"approval\":\n\t\tcase \"tool_retry\":\n\t\t\treturn \"AGENT_RUN_WAIT_TYPE_APPROVAL\";\n\t\tcase \"client_tool\":\n\t\tcase \"mcp_elicitation\":\n\t\tcase \"user_input\":\n\t\t\treturn \"AGENT_RUN_WAIT_TYPE_INPUT\";\n\t}\n\tif (timelineItem?.approvalRequestId) return \"AGENT_RUN_WAIT_TYPE_APPROVAL\";\n\tif (timelineItem?.pendingRequestId) return \"AGENT_RUN_WAIT_TYPE_INPUT\";\n\treturn \"AGENT_RUN_WAIT_TYPE_APPROVAL\";\n}\n\nfunction buildLedgerEntries(\n\ttimeline: ComposerRunTimelineResponse,\n\ttrajectory: AgentTrajectoryReport,\n): AgentRuntimeLedgerEntry[] {\n\tconst timelineItemsById = new Map(\n\t\ttimeline.items.map((item) => [item.id, item] as const),\n\t);\n\treturn trajectory.events.map((event) => {\n\t\tconst kind = kindForEvent(event);\n\t\tconst state = stateForStatus(event.status);\n\t\tconst timelineItemId = timelineIdForEvent(event);\n\t\tconst timelineItem = timelineItemId\n\t\t\t? timelineItemsById.get(timelineItemId)\n\t\t\t: undefined;\n\t\tconst waitType = waitTypeForEntry(kind, timelineItem);\n\t\treturn {\n\t\t\tid: `ledger:${event.id}`,\n\t\t\tsequence: event.sequence,\n\t\t\ttimestamp: event.timestamp,\n\t\t\tkind,\n\t\t\tphase: event.phase,\n\t\t\tactor: event.actor,\n\t\t\ttype: event.type,\n\t\t\tstate,\n\t\t\ttitle: event.title,\n\t\t\tvisibility: event.visibility,\n\t\t\tsource: event.source,\n\t\t\ttrajectoryEventId: event.id,\n\t\t\t...(timelineItemId ? { timelineItemId } : {}),\n\t\t\t...(event.toolName ? { toolName: event.toolName } : {}),\n\t\t\t...(event.summary ? { summary: event.summary } : {}),\n\t\t\trelatedIds: event.relatedIds ?? [],\n\t\t\tevidence: event.evidence,\n\t\t\tplatformShape: {\n\t\t\t\tstepKind: stepKindForEntry(kind, event),\n\t\t\t\tworkItemKind: workItemKindForEntry(kind),\n\t\t\t\t...(waitType ? { waitType } : {}),\n\t\t\t},\n\t\t};\n\t});\n}\n\nfunction replaySummary(\n\treplay: AgentTrajectoryReplayReport,\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimeLedgerReplaySummary {\n\treturn {\n\t\tschemaVersion: AGENT_RUNTIME_REPLAY_SUMMARY_SCHEMA,\n\t\tdeterministic: replay.counts.deltas === 0 && replay.counts.errors === 0,\n\t\tevents: replay.counts.events,\n\t\tdeltas: replay.counts.deltas,\n\t\terrors: replay.counts.errors,\n\t\twarnings: replay.counts.warnings,\n\t\tcursor: {\n\t\t\t...(entries[0] ? { startSequence: entries[0].sequence } : {}),\n\t\t\t...(entries.at(-1) ? { endSequence: entries.at(-1)?.sequence } : {}),\n\t\t},\n\t};\n}\n\nconst PASSIVE_TERMINAL_ENTRY_KINDS = new Set<AgentRuntimeLedgerEntryKind>([\n\t\"run\",\n\t\"wait\",\n\t\"governance\",\n]);\n\nfunction isTerminalState(state: AgentRuntimeLedgerState): boolean {\n\treturn (\n\t\tstate === \"succeeded\" ||\n\t\tstate === \"skipped\" ||\n\t\tstate === \"failed\" ||\n\t\tstate === \"cancelled\"\n\t);\n}\n\nfunction isTerminalCandidate(entry: AgentRuntimeLedgerEntry): boolean {\n\treturn (\n\t\tisTerminalState(entry.state) &&\n\t\t!PASSIVE_TERMINAL_ENTRY_KINDS.has(entry.kind)\n\t);\n}\n\nfunction runStepStateForEntry(\n\tentry: AgentRuntimeLedgerEntry,\n): AgentRuntimePromotionStepState {\n\treturn entry.state === \"blocked\" ? \"failed\" : entry.state;\n}\n\nfunction firstEvidenceId(\n\tentry: AgentRuntimeLedgerEntry,\n\tkind: AgentTrajectoryEvent[\"evidence\"][number][\"kind\"],\n): string | undefined {\n\treturn entry.evidence.find((anchor) => anchor.kind === kind)?.id;\n}\n\nfunction evidenceRefForAnchor(\n\tanchor: AgentTrajectoryEvent[\"evidence\"][number],\n): string {\n\tswitch (anchor.kind) {\n\t\tcase \"timeline_item\":\n\t\t\treturn `timeline-item:${anchor.id}`;\n\t\tcase \"tool_call\":\n\t\t\treturn `tool-call:${anchor.id}`;\n\t\tcase \"tool_execution\":\n\t\t\treturn `tool-execution:${anchor.id}`;\n\t\tcase \"approval_request\":\n\t\t\treturn `approval-request:${anchor.id}`;\n\t\tcase \"pending_request\":\n\t\t\treturn `pending-request:${anchor.id}`;\n\t\tcase \"agent_run\":\n\t\t\treturn `agent-run:${anchor.id}`;\n\t\tcase \"parent_agent_run\":\n\t\t\treturn `parent-agent-run:${anchor.id}`;\n\t\tcase \"child_agent_run\":\n\t\t\treturn `child-agent-run:${anchor.id}`;\n\t\tdefault:\n\t\t\treturn `${anchor.kind}:${anchor.id}`;\n\t}\n}\n\nfunction uniqueStrings(values: Array<string | undefined>): string[] {\n\treturn values.filter((value, index): value is string => {\n\t\treturn (\n\t\t\ttypeof value === \"string\" &&\n\t\t\tvalue.length > 0 &&\n\t\t\tvalues.indexOf(value) === index\n\t\t);\n\t});\n}\n\nfunction evidenceRefsForEntry(entry: AgentRuntimeLedgerEntry): string[] {\n\treturn uniqueStrings([\n\t\t`trajectory-event:${entry.trajectoryEventId}`,\n\t\t...(entry.timelineItemId ? [`timeline-item:${entry.timelineItemId}`] : []),\n\t\t...entry.evidence.map(evidenceRefForAnchor),\n\t]);\n}\n\nfunction workItemPayloadForEntry(\n\tsessionId: string,\n\tentry: AgentRuntimeLedgerEntry,\n): Record<string, unknown> {\n\treturn {\n\t\tmaestroSessionId: sessionId,\n\t\tledgerEntryId: entry.id,\n\t\ttrajectoryEventId: entry.trajectoryEventId,\n\t\teventType: entry.type,\n\t\tphase: entry.phase,\n\t\tactor: entry.actor,\n\t\tsource: entry.source,\n\t\tstate: entry.state,\n\t\t...(entry.timelineItemId ? { timelineItemId: entry.timelineItemId } : {}),\n\t\t...(entry.toolName ? { toolName: entry.toolName } : {}),\n\t\t...(entry.summary ? { summary: entry.summary } : {}),\n\t\t...(entry.relatedIds.length > 0 ? { relatedIds: entry.relatedIds } : {}),\n\t};\n}\n\nfunction terminalEntry(\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimeLedgerEntry | undefined {\n\tconst last = entries.at(-1);\n\tif (!last || !isTerminalState(last.state)) return undefined;\n\tif (isTerminalCandidate(last)) return last;\n\tfor (let index = entries.length - 1; index >= 0; index -= 1) {\n\t\tconst entry = entries[index];\n\t\tif (entry && isTerminalCandidate(entry)) return entry;\n\t}\n\treturn undefined;\n}\n\nfunction terminalOperation(\n\trunId: string,\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimePromotionOperation | undefined {\n\tconst terminal = terminalEntry(entries);\n\tif (!terminal) return undefined;\n\tconst succeeded =\n\t\tterminal.state === \"succeeded\" || terminal.state === \"skipped\";\n\treturn {\n\t\toperation: succeeded ? \"complete_run\" : \"fail_run\",\n\t\tid: `promote:${runId}:terminal`,\n\t\tpayload: {\n\t\t\tstate: succeeded ? \"succeeded\" : \"failed\",\n\t\t\ttimestamp: terminal.timestamp,\n\t\t\t...(succeeded\n\t\t\t\t? {}\n\t\t\t\t: {\n\t\t\t\t\t\treason: `Terminal ledger entry ended in ${terminal.state} state.`,\n\t\t\t\t\t}),\n\t\t},\n\t};\n}\n\nfunction terminalOperationWarning(\n\tentries: AgentRuntimeLedgerEntry[],\n): string | undefined {\n\tconst last = entries.at(-1);\n\tif (!last) {\n\t\treturn \"Terminal operation omitted because no ledger entries were available.\";\n\t}\n\tif (terminalEntry(entries)) {\n\t\treturn undefined;\n\t}\n\tif (isTerminalState(last.state)) {\n\t\treturn \"Terminal operation omitted because no substantive terminal ledger entry was available.\";\n\t}\n\treturn `Terminal operation omitted because final ledger entry ended in ${last.state} state.`;\n}\n\nfunction buildPromotionPlan(\n\trunId: string,\n\tsessionId: string,\n\tgeneratedAt: string,\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimePromotionPlan {\n\tconst idempotencyKey = `maestro-local-ledger:${sessionId}:${runId}`;\n\tconst operations: AgentRuntimePromotionOperation[] = [\n\t\t{\n\t\t\toperation: \"handle_trigger\",\n\t\t\tid: `promote:${runId}:trigger`,\n\t\t\tpayload: {\n\t\t\t\tsourceEventType: \"maestro.local_ledger_promote\",\n\t\t\t\tsourceEventId: sessionId,\n\t\t\t\tidempotencyKey,\n\t\t\t\tsessionId,\n\t\t\t\tgeneratedAt,\n\t\t\t},\n\t\t},\n\t];\n\n\tfor (const entry of entries) {\n\t\tconst toolExecutionId = firstEvidenceId(entry, \"tool_execution\");\n\t\tconst evidenceRefs = evidenceRefsForEntry(entry);\n\t\tconst waitId = entry.platformShape.waitType ? entry.id : undefined;\n\t\toperations.push({\n\t\t\toperation: \"record_run_step\",\n\t\t\tid: `promote:${entry.id}:step`,\n\t\t\tledgerEntryId: entry.id,\n\t\t\tpayload: {\n\t\t\t\tstepId: entry.id,\n\t\t\t\tkind: entry.platformShape.stepKind,\n\t\t\t\tstate: runStepStateForEntry(entry),\n\t\t\t\ttitle: entry.title,\n\t\t\t\ttimestamp: entry.timestamp,\n\t\t\t\t...(entry.toolName ? { toolName: entry.toolName } : {}),\n\t\t\t},\n\t\t});\n\t\toperations.push({\n\t\t\toperation: \"record_run_work_item\",\n\t\t\tid: `promote:${entry.id}:work-item`,\n\t\t\tledgerEntryId: entry.id,\n\t\t\tpayload: {\n\t\t\t\tworkItemId: entry.id,\n\t\t\t\tkind: entry.platformShape.workItemKind,\n\t\t\t\tstate: entry.state,\n\t\t\t\ttitle: entry.title,\n\t\t\t\ttimestamp: entry.timestamp,\n\t\t\t\t...(waitId ? { waitId } : {}),\n\t\t\t\t...(toolExecutionId ? { toolExecutionId } : {}),\n\t\t\t\tevidenceRefs,\n\t\t\t\tcompletionGate: \"maestro_agent_runtime_ledger_recorded\",\n\t\t\t\tpayload: workItemPayloadForEntry(sessionId, entry),\n\t\t\t},\n\t\t});\n\t\tif (entry.platformShape.waitType) {\n\t\t\toperations.push({\n\t\t\t\toperation: \"wait_run\",\n\t\t\t\tid: `promote:${entry.id}:wait`,\n\t\t\t\tledgerEntryId: entry.id,\n\t\t\t\tpayload: {\n\t\t\t\t\twaitId: entry.id,\n\t\t\t\t\twaitType: entry.platformShape.waitType,\n\t\t\t\t\ttitle: entry.title,\n\t\t\t\t\ttimestamp: entry.timestamp,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tconst terminal = terminalOperation(runId, entries);\n\tif (terminal) operations.push(terminal);\n\tconst terminalWarning = terminalOperationWarning(entries);\n\tconst warnings = [\n\t\t\"Promotion plan is dry-run only; no Platform AgentRuntime writes were performed.\",\n\t\t...(terminalWarning ? [terminalWarning] : []),\n\t];\n\n\treturn {\n\t\tschemaVersion: AGENT_RUNTIME_PROMOTION_PLAN_SCHEMA,\n\t\trunId,\n\t\tsessionId,\n\t\tidempotencyKey,\n\t\toperations,\n\t\twarnings,\n\t};\n}\n\nexport function buildAgentRuntimeLedgerReport(\n\toptions: BuildAgentRuntimeLedgerOptions,\n): AgentRuntimeLedgerReport {\n\tconst entries = buildLedgerEntries(options.timeline, options.trajectory);\n\tconst byKind: Record<string, number> = {};\n\tconst byState: Record<string, number> = {};\n\tfor (const entry of entries) {\n\t\tincrement(byKind, entry.kind);\n\t\tincrement(byState, entry.state);\n\t}\n\tconst runId = options.trajectory.run.id;\n\tconst sessionId = options.trajectory.run.sessionId;\n\tconst promotion = buildPromotionPlan(\n\t\trunId,\n\t\tsessionId,\n\t\toptions.trajectory.run.generatedAt,\n\t\tentries,\n\t);\n\n\treturn {\n\t\tschemaVersion: AGENT_RUNTIME_LEDGER_SCHEMA,\n\t\trun: {\n\t\t\tid: runId,\n\t\t\tsessionId,\n\t\t\tsource: options.timeline.source,\n\t\t\tgeneratedAt: options.trajectory.run.generatedAt,\n\t\t\tplatformBacked: options.trajectory.run.platformBacked,\n\t\t\t...(options.session.sessionFile\n\t\t\t\t? { sessionFile: options.session.sessionFile }\n\t\t\t\t: {}),\n\t\t\t...(options.session.cwd ? { cwd: options.session.cwd } : {}),\n\t\t\t...(options.session.model ? { model: options.session.model } : {}),\n\t\t},\n\t\tcounts: {\n\t\t\tentries: entries.length,\n\t\t\tpromotionOperations: promotion.operations.length,\n\t\t\tbyKind,\n\t\t\tbyState,\n\t\t},\n\t\tentries,\n\t\treplay: replaySummary(options.replay, entries),\n\t\tpromotion,\n\t};\n}\n"]}
1
+ {"version":3,"file":"agent-runtime-ledger.js","sourceRoot":"","sources":["../../src/server/agent-runtime-ledger.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,2BAA2B,GACvC,yCAAyC,CAAC;AAC3C,MAAM,CAAC,MAAM,mCAAmC,GAC/C,iDAAiD,CAAC;AACnD,MAAM,CAAC,MAAM,mCAAmC,GAC/C,iDAAiD,CAAC;AAiMnD,SAAS,SAAS,CAAC,GAA2B,EAAE,GAAW;IAC1D,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,kBAAkB,CAAC,KAA2B;IACtD,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,eAAe,CAAC,EAAE,EAAE,CAAC;AAC7E,CAAC;AAED,SAAS,cAAc,CACtB,MAAiC;IAEjC,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,WAAW,CAAC;QACjB,KAAK,MAAM,CAAC;QACZ,KAAK,UAAU;YACd,OAAO,WAAW,CAAC;QACpB,KAAK,SAAS;YACb,OAAO,SAAS,CAAC;QAClB,KAAK,SAAS;YACb,OAAO,SAAS,CAAC;QAClB,KAAK,QAAQ;YACZ,OAAO,SAAS,CAAC;QAClB,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC;QACjB;YACC,OAAO,SAAS,CAAC;IACnB,CAAC;AACF,CAAC;AAED,SAAS,YAAY,CACpB,KAA2B;IAE3B,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,SAAS;YACb,OAAO,KAAK,CAAC;QACd,KAAK,SAAS;YACb,OAAO,KAAK,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC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CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClE;QACD,MAAM,EAAE;YACP,OAAO,EAAE,OAAO,CAAC,MAAM;YACvB,mBAAmB,EAAE,SAAS,CAAC,UAAU,CAAC,MAAM;YAChD,MAAM;YACN,OAAO;SACP;QACD,OAAO;QACP,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;QAC9C,SAAS;KACT,CAAC;AACH,CAAC","sourcesContent":["import type {\n\tComposerRunTimelineItem,\n\tComposerRunTimelineResponse,\n\tComposerRunTimelineStatus,\n\tComposerRunTimelineVisibility,\n} from \"@evalops/contracts\";\nimport type { AgentTrajectoryReplayReport } from \"./agent-trajectory-replay.js\";\nimport type {\n\tAgentTrajectoryEvent,\n\tAgentTrajectoryReport,\n} from \"./agent-trajectory.js\";\n\nexport const AGENT_RUNTIME_LEDGER_SCHEMA =\n\t\"evalops.maestro.agent-runtime-ledger.v1\";\nexport const AGENT_RUNTIME_REPLAY_SUMMARY_SCHEMA =\n\t\"evalops.maestro.agent-runtime-replay-summary.v1\";\nexport const AGENT_RUNTIME_PROMOTION_PLAN_SCHEMA =\n\t\"evalops.maestro.agent-runtime-promotion-plan.v1\";\n\nexport type AgentRuntimeLedgerEntryKind =\n\t| \"run\"\n\t| \"message\"\n\t| \"model_call\"\n\t| \"tool_call\"\n\t| \"tool_result\"\n\t| \"wait\"\n\t| \"checkpoint\"\n\t| \"artifact\"\n\t| \"evidence\"\n\t| \"governance\"\n\t| \"context\"\n\t| \"child_run\"\n\t| \"runtime\";\n\nexport type AgentRuntimeLedgerState =\n\t| \"pending\"\n\t| \"running\"\n\t| \"waiting\"\n\t| \"blocked\"\n\t| \"succeeded\"\n\t| \"failed\"\n\t| \"cancelled\"\n\t| \"skipped\";\n\ntype AgentRuntimePromotionStepState = Exclude<\n\tAgentRuntimeLedgerState,\n\t\"blocked\"\n>;\n\nexport interface AgentRuntimeLedgerCorrelation {\n\tpendingRequestId?: string;\n\tpendingRequestKind?: ComposerRunTimelineItem[\"pendingRequestKind\"];\n\tapprovalRequestId?: string;\n\ttoolExecutionId?: string;\n\tartifactId?: string;\n\tagentRunId?: string;\n\tparentAgentRunId?: string;\n\tchildAgentRunId?: string;\n}\n\nexport interface AgentRuntimeLedgerEntry {\n\tid: string;\n\tsequence: number;\n\ttimestamp: string;\n\tkind: AgentRuntimeLedgerEntryKind;\n\tphase: AgentTrajectoryEvent[\"phase\"];\n\tactor: AgentTrajectoryEvent[\"actor\"];\n\ttype: string;\n\tstate: AgentRuntimeLedgerState;\n\ttitle: string;\n\tvisibility: ComposerRunTimelineVisibility;\n\tsource: ComposerRunTimelineItem[\"source\"];\n\ttimelineItemId?: string;\n\ttrajectoryEventId: string;\n\ttoolName?: string;\n\tsummary?: string;\n\trelatedIds: string[];\n\tevidence: AgentTrajectoryEvent[\"evidence\"];\n\tcorrelation?: AgentRuntimeLedgerCorrelation;\n\tplatformShape: {\n\t\tstepKind: string;\n\t\tworkItemKind: string;\n\t\twaitType?: string;\n\t};\n}\n\nexport interface AgentRuntimeLedgerReport {\n\tschemaVersion: typeof AGENT_RUNTIME_LEDGER_SCHEMA;\n\trun: {\n\t\tid: string;\n\t\tsessionId: string;\n\t\tsource: ComposerRunTimelineResponse[\"source\"];\n\t\tgeneratedAt: string;\n\t\tplatformBacked: boolean;\n\t\tsessionFile?: string;\n\t\tcwd?: string;\n\t\tmodel?: string;\n\t};\n\tcounts: {\n\t\tentries: number;\n\t\tpromotionOperations: number;\n\t\tbyKind: Record<string, number>;\n\t\tbyState: Record<string, number>;\n\t};\n\tentries: AgentRuntimeLedgerEntry[];\n\treplay: AgentRuntimeLedgerReplaySummary;\n\tpromotion: AgentRuntimePromotionPlan;\n}\n\nexport interface AgentRuntimeLedgerReplaySummary {\n\tschemaVersion: typeof AGENT_RUNTIME_REPLAY_SUMMARY_SCHEMA;\n\tdeterministic: boolean;\n\tevents: number;\n\tdeltas: number;\n\terrors: number;\n\twarnings: number;\n\tcursor: {\n\t\tstartSequence?: number;\n\t\tendSequence?: number;\n\t};\n}\n\nexport interface AgentRuntimePromotionPlan {\n\tschemaVersion: typeof AGENT_RUNTIME_PROMOTION_PLAN_SCHEMA;\n\trunId: string;\n\tsessionId: string;\n\tidempotencyKey: string;\n\toperations: AgentRuntimePromotionOperation[];\n\twarnings: string[];\n}\n\nexport type AgentRuntimePromotionOperation =\n\t| {\n\t\t\toperation: \"handle_trigger\";\n\t\t\tid: string;\n\t\t\tpayload: {\n\t\t\t\tsourceEventType: \"maestro.local_ledger_promote\";\n\t\t\t\tsourceEventId: string;\n\t\t\t\tidempotencyKey: string;\n\t\t\t\tsessionId: string;\n\t\t\t\tgeneratedAt: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\toperation: \"record_run_step\";\n\t\t\tid: string;\n\t\t\tledgerEntryId: string;\n\t\t\tpayload: {\n\t\t\t\tstepId: string;\n\t\t\t\tkind: string;\n\t\t\t\tstate: AgentRuntimePromotionStepState;\n\t\t\t\ttitle: string;\n\t\t\t\ttimestamp: string;\n\t\t\t\ttoolName?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\toperation: \"record_run_work_item\";\n\t\t\tid: string;\n\t\t\tledgerEntryId: string;\n\t\t\tpayload: {\n\t\t\t\tworkItemId: string;\n\t\t\t\tkind: string;\n\t\t\t\tstate: AgentRuntimeLedgerState;\n\t\t\t\ttitle: string;\n\t\t\t\ttimestamp: string;\n\t\t\t\twaitId?: string;\n\t\t\t\tevidenceRefs?: string[];\n\t\t\t\tcompletionGate?: string;\n\t\t\t\tpayload?: Record<string, unknown>;\n\t\t\t} & AgentRuntimeLedgerCorrelation;\n\t }\n\t| {\n\t\t\toperation: \"wait_run\";\n\t\t\tid: string;\n\t\t\tledgerEntryId: string;\n\t\t\tpayload: {\n\t\t\t\twaitId: string;\n\t\t\t\twaitType: string;\n\t\t\t\ttitle: string;\n\t\t\t\ttimestamp: string;\n\t\t\t} & AgentRuntimeLedgerCorrelation;\n\t }\n\t| {\n\t\t\toperation: \"complete_run\" | \"fail_run\";\n\t\t\tid: string;\n\t\t\tpayload: {\n\t\t\t\tstate: \"succeeded\" | \"failed\";\n\t\t\t\ttimestamp: string;\n\t\t\t\treason?: string;\n\t\t\t\tledgerEntryId: string;\n\t\t\t\ttrajectoryEventId: string;\n\t\t\t\teventType: string;\n\t\t\t\ttitle: string;\n\t\t\t\tevidenceRefs: string[];\n\t\t\t};\n\t };\n\nexport interface BuildAgentRuntimeLedgerOptions {\n\tsession: {\n\t\tid: string;\n\t\tsessionFile?: string;\n\t\tcwd?: string;\n\t\tmodel?: string;\n\t};\n\ttimeline: ComposerRunTimelineResponse;\n\ttrajectory: AgentTrajectoryReport;\n\treplay: AgentTrajectoryReplayReport;\n}\n\nfunction increment(map: Record<string, number>, key: string): void {\n\tmap[key] = (map[key] ?? 0) + 1;\n}\n\nfunction timelineIdForEvent(event: AgentTrajectoryEvent): string | undefined {\n\treturn event.evidence.find((anchor) => anchor.kind === \"timeline_item\")?.id;\n}\n\nfunction stateForStatus(\n\tstatus: ComposerRunTimelineStatus,\n): AgentRuntimeLedgerState {\n\tswitch (status) {\n\t\tcase \"completed\":\n\t\tcase \"info\":\n\t\tcase \"approved\":\n\t\t\treturn \"succeeded\";\n\t\tcase \"running\":\n\t\t\treturn \"running\";\n\t\tcase \"pending\":\n\t\t\treturn \"waiting\";\n\t\tcase \"denied\":\n\t\t\treturn \"blocked\";\n\t\tcase \"failed\":\n\t\t\treturn \"failed\";\n\t\tdefault:\n\t\t\treturn \"pending\";\n\t}\n}\n\nfunction kindForEvent(\n\tevent: AgentTrajectoryEvent,\n): AgentRuntimeLedgerEntryKind {\n\tswitch (event.kind) {\n\t\tcase \"session\":\n\t\t\treturn \"run\";\n\t\tcase \"message\":\n\t\t\treturn event.actor === \"assistant\" ? \"model_call\" : \"message\";\n\t\tcase \"tool\":\n\t\t\treturn event.type === \"tool.completed\" || event.type === \"tool.failed\"\n\t\t\t\t? \"tool_result\"\n\t\t\t\t: \"tool_call\";\n\t\tcase \"wait\":\n\t\t\treturn \"wait\";\n\t\tcase \"artifact\":\n\t\t\treturn \"artifact\";\n\t\tcase \"evidence\":\n\t\t\treturn \"evidence\";\n\t\tcase \"governance\":\n\t\t\treturn \"governance\";\n\t\tcase \"context\":\n\t\t\treturn event.type.startsWith(\"compaction.\") ? \"checkpoint\" : \"context\";\n\t\tcase \"agent\":\n\t\t\treturn \"child_run\";\n\t\tcase \"runtime\":\n\t\t\treturn \"runtime\";\n\t\tdefault:\n\t\t\treturn \"runtime\";\n\t}\n}\n\nfunction stepKindForEntry(\n\tentryKind: AgentRuntimeLedgerEntryKind,\n\tevent: AgentTrajectoryEvent,\n): string {\n\tif (entryKind === \"model_call\") return \"AGENT_RUN_STEP_KIND_MODEL_CALL\";\n\tif (entryKind === \"tool_call\") return \"AGENT_RUN_STEP_KIND_TOOL_CALL_INTENT\";\n\tif (entryKind === \"tool_result\" && event.status === \"failed\") {\n\t\treturn \"AGENT_RUN_STEP_KIND_ERROR\";\n\t}\n\tif (entryKind === \"tool_result\") return \"AGENT_RUN_STEP_KIND_TOOL_RESULT\";\n\tif (entryKind === \"wait\" || entryKind === \"governance\") {\n\t\treturn \"AGENT_RUN_STEP_KIND_APPROVAL_WAIT\";\n\t}\n\treturn \"AGENT_RUN_STEP_KIND_SYSTEM\";\n}\n\nfunction workItemKindForEntry(kind: AgentRuntimeLedgerEntryKind): string {\n\tswitch (kind) {\n\t\tcase \"message\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_USER_INPUT\";\n\t\tcase \"model_call\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_MODEL_CALL\";\n\t\tcase \"tool_call\":\n\t\tcase \"tool_result\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_TOOL_CALL\";\n\t\tcase \"child_run\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_CHILD_RUN\";\n\t\tcase \"wait\":\n\t\tcase \"governance\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_WAIT\";\n\t\tcase \"checkpoint\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_RECOVERY\";\n\t\tcase \"artifact\":\n\t\tcase \"evidence\":\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_MEMORY\";\n\t\tdefault:\n\t\t\treturn \"AGENT_WORK_ITEM_KIND_ROOT\";\n\t}\n}\n\nfunction waitTypeForEntry(\n\tkind: AgentRuntimeLedgerEntryKind,\n\ttimelineItem?: ComposerRunTimelineItem,\n): string | undefined {\n\tif (kind !== \"wait\") {\n\t\treturn undefined;\n\t}\n\tswitch (timelineItem?.pendingRequestKind) {\n\t\tcase \"approval\":\n\t\tcase \"tool_retry\":\n\t\t\treturn \"AGENT_RUN_WAIT_TYPE_APPROVAL\";\n\t\tcase \"client_tool\":\n\t\tcase \"mcp_elicitation\":\n\t\tcase \"user_input\":\n\t\t\treturn \"AGENT_RUN_WAIT_TYPE_INPUT\";\n\t}\n\tif (timelineItem?.approvalRequestId) return \"AGENT_RUN_WAIT_TYPE_APPROVAL\";\n\tif (timelineItem?.pendingRequestId) return \"AGENT_RUN_WAIT_TYPE_INPUT\";\n\treturn \"AGENT_RUN_WAIT_TYPE_APPROVAL\";\n}\n\nfunction firstEvidenceIdForEvent(\n\tevent: AgentTrajectoryEvent,\n\tkind: AgentTrajectoryEvent[\"evidence\"][number][\"kind\"],\n): string | undefined {\n\treturn event.evidence.find((anchor) => anchor.kind === kind)?.id;\n}\n\nfunction hasCorrelation(correlation: AgentRuntimeLedgerCorrelation): boolean {\n\treturn Object.values(correlation).some(\n\t\t(value) => typeof value === \"string\" && value.length > 0,\n\t);\n}\n\nfunction correlationForEvent(\n\tevent: AgentTrajectoryEvent,\n\ttimelineItem?: ComposerRunTimelineItem,\n): AgentRuntimeLedgerCorrelation | undefined {\n\tconst pendingRequestId =\n\t\ttimelineItem?.pendingRequestId ??\n\t\tfirstEvidenceIdForEvent(event, \"pending_request\");\n\tconst approvalRequestId =\n\t\ttimelineItem?.approvalRequestId ??\n\t\tfirstEvidenceIdForEvent(event, \"approval_request\");\n\tconst toolExecutionId =\n\t\ttimelineItem?.toolExecutionId ??\n\t\tfirstEvidenceIdForEvent(event, \"tool_execution\");\n\tconst artifactId =\n\t\ttimelineItem?.artifactId ?? firstEvidenceIdForEvent(event, \"artifact\");\n\tconst agentRunId =\n\t\ttimelineItem?.agentRunId ?? firstEvidenceIdForEvent(event, \"agent_run\");\n\tconst parentAgentRunId =\n\t\ttimelineItem?.parentAgentRunId ??\n\t\tfirstEvidenceIdForEvent(event, \"parent_agent_run\");\n\tconst childAgentRunId =\n\t\ttimelineItem?.childAgentRunId ??\n\t\tfirstEvidenceIdForEvent(event, \"child_agent_run\");\n\tconst correlation: AgentRuntimeLedgerCorrelation = {\n\t\t...(pendingRequestId ? { pendingRequestId } : {}),\n\t\t...(timelineItem?.pendingRequestKind\n\t\t\t? { pendingRequestKind: timelineItem.pendingRequestKind }\n\t\t\t: {}),\n\t\t...(approvalRequestId ? { approvalRequestId } : {}),\n\t\t...(toolExecutionId ? { toolExecutionId } : {}),\n\t\t...(artifactId ? { artifactId } : {}),\n\t\t...(agentRunId ? { agentRunId } : {}),\n\t\t...(parentAgentRunId ? { parentAgentRunId } : {}),\n\t\t...(childAgentRunId ? { childAgentRunId } : {}),\n\t};\n\treturn hasCorrelation(correlation) ? correlation : undefined;\n}\n\nfunction buildLedgerEntries(\n\ttimeline: ComposerRunTimelineResponse,\n\ttrajectory: AgentTrajectoryReport,\n): AgentRuntimeLedgerEntry[] {\n\tconst timelineItemsById = new Map(\n\t\ttimeline.items.map((item) => [item.id, item] as const),\n\t);\n\treturn trajectory.events.map((event) => {\n\t\tconst kind = kindForEvent(event);\n\t\tconst state = stateForStatus(event.status);\n\t\tconst timelineItemId = timelineIdForEvent(event);\n\t\tconst timelineItem = timelineItemId\n\t\t\t? timelineItemsById.get(timelineItemId)\n\t\t\t: undefined;\n\t\tconst waitType = waitTypeForEntry(kind, timelineItem);\n\t\tconst correlation = correlationForEvent(event, timelineItem);\n\t\treturn {\n\t\t\tid: `ledger:${event.id}`,\n\t\t\tsequence: event.sequence,\n\t\t\ttimestamp: event.timestamp,\n\t\t\tkind,\n\t\t\tphase: event.phase,\n\t\t\tactor: event.actor,\n\t\t\ttype: event.type,\n\t\t\tstate,\n\t\t\ttitle: event.title,\n\t\t\tvisibility: event.visibility,\n\t\t\tsource: event.source,\n\t\t\ttrajectoryEventId: event.id,\n\t\t\t...(timelineItemId ? { timelineItemId } : {}),\n\t\t\t...(event.toolName ? { toolName: event.toolName } : {}),\n\t\t\t...(event.summary ? { summary: event.summary } : {}),\n\t\t\trelatedIds: event.relatedIds ?? [],\n\t\t\tevidence: event.evidence,\n\t\t\t...(correlation ? { correlation } : {}),\n\t\t\tplatformShape: {\n\t\t\t\tstepKind: stepKindForEntry(kind, event),\n\t\t\t\tworkItemKind: workItemKindForEntry(kind),\n\t\t\t\t...(waitType ? { waitType } : {}),\n\t\t\t},\n\t\t};\n\t});\n}\n\nfunction replaySummary(\n\treplay: AgentTrajectoryReplayReport,\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimeLedgerReplaySummary {\n\treturn {\n\t\tschemaVersion: AGENT_RUNTIME_REPLAY_SUMMARY_SCHEMA,\n\t\tdeterministic: replay.counts.deltas === 0 && replay.counts.errors === 0,\n\t\tevents: replay.counts.events,\n\t\tdeltas: replay.counts.deltas,\n\t\terrors: replay.counts.errors,\n\t\twarnings: replay.counts.warnings,\n\t\tcursor: {\n\t\t\t...(entries[0] ? { startSequence: entries[0].sequence } : {}),\n\t\t\t...(entries.at(-1) ? { endSequence: entries.at(-1)?.sequence } : {}),\n\t\t},\n\t};\n}\n\nconst PASSIVE_TERMINAL_ENTRY_KINDS = new Set<AgentRuntimeLedgerEntryKind>([\n\t\"run\",\n\t\"wait\",\n\t\"governance\",\n]);\n\nfunction isTerminalState(state: AgentRuntimeLedgerState): boolean {\n\treturn (\n\t\tstate === \"succeeded\" ||\n\t\tstate === \"skipped\" ||\n\t\tstate === \"failed\" ||\n\t\tstate === \"cancelled\"\n\t);\n}\n\nfunction isTerminalCandidate(entry: AgentRuntimeLedgerEntry): boolean {\n\treturn (\n\t\tisTerminalState(entry.state) &&\n\t\t!PASSIVE_TERMINAL_ENTRY_KINDS.has(entry.kind)\n\t);\n}\n\nfunction runStepStateForEntry(\n\tentry: AgentRuntimeLedgerEntry,\n): AgentRuntimePromotionStepState {\n\treturn entry.state === \"blocked\" ? \"failed\" : entry.state;\n}\n\nfunction firstEvidenceId(\n\tentry: AgentRuntimeLedgerEntry,\n\tkind: AgentTrajectoryEvent[\"evidence\"][number][\"kind\"],\n): string | undefined {\n\treturn entry.evidence.find((anchor) => anchor.kind === kind)?.id;\n}\n\nfunction evidenceRefForAnchor(\n\tanchor: AgentTrajectoryEvent[\"evidence\"][number],\n): string {\n\tswitch (anchor.kind) {\n\t\tcase \"timeline_item\":\n\t\t\treturn `timeline-item:${anchor.id}`;\n\t\tcase \"tool_call\":\n\t\t\treturn `tool-call:${anchor.id}`;\n\t\tcase \"tool_execution\":\n\t\t\treturn `tool-execution:${anchor.id}`;\n\t\tcase \"approval_request\":\n\t\t\treturn `approval-request:${anchor.id}`;\n\t\tcase \"pending_request\":\n\t\t\treturn `pending-request:${anchor.id}`;\n\t\tcase \"agent_run\":\n\t\t\treturn `agent-run:${anchor.id}`;\n\t\tcase \"parent_agent_run\":\n\t\t\treturn `parent-agent-run:${anchor.id}`;\n\t\tcase \"child_agent_run\":\n\t\t\treturn `child-agent-run:${anchor.id}`;\n\t\tdefault:\n\t\t\treturn `${anchor.kind}:${anchor.id}`;\n\t}\n}\n\nfunction uniqueStrings(values: Array<string | undefined>): string[] {\n\treturn values.filter((value, index): value is string => {\n\t\treturn (\n\t\t\ttypeof value === \"string\" &&\n\t\t\tvalue.length > 0 &&\n\t\t\tvalues.indexOf(value) === index\n\t\t);\n\t});\n}\n\nfunction evidenceRefsForEntry(entry: AgentRuntimeLedgerEntry): string[] {\n\treturn uniqueStrings([\n\t\t`trajectory-event:${entry.trajectoryEventId}`,\n\t\t...(entry.timelineItemId ? [`timeline-item:${entry.timelineItemId}`] : []),\n\t\t...entry.evidence.map(evidenceRefForAnchor),\n\t]);\n}\n\nfunction workItemPayloadForEntry(\n\tsessionId: string,\n\tentry: AgentRuntimeLedgerEntry,\n): Record<string, unknown> {\n\treturn {\n\t\tmaestroSessionId: sessionId,\n\t\tledgerEntryId: entry.id,\n\t\ttrajectoryEventId: entry.trajectoryEventId,\n\t\teventType: entry.type,\n\t\tphase: entry.phase,\n\t\tactor: entry.actor,\n\t\tsource: entry.source,\n\t\tstate: entry.state,\n\t\t...(entry.timelineItemId ? { timelineItemId: entry.timelineItemId } : {}),\n\t\t...(entry.toolName ? { toolName: entry.toolName } : {}),\n\t\t...(entry.summary ? { summary: entry.summary } : {}),\n\t\t...(entry.relatedIds.length > 0 ? { relatedIds: entry.relatedIds } : {}),\n\t\t...(entry.correlation ? { correlation: entry.correlation } : {}),\n\t};\n}\n\nfunction terminalEntry(\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimeLedgerEntry | undefined {\n\tconst last = entries.at(-1);\n\tif (!last || !isTerminalState(last.state)) return undefined;\n\tif (isTerminalCandidate(last)) return last;\n\tfor (let index = entries.length - 1; index >= 0; index -= 1) {\n\t\tconst entry = entries[index];\n\t\tif (entry && isTerminalCandidate(entry)) return entry;\n\t}\n\treturn undefined;\n}\n\nfunction terminalOperation(\n\trunId: string,\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimePromotionOperation | undefined {\n\tconst terminal = terminalEntry(entries);\n\tif (!terminal) return undefined;\n\tconst succeeded =\n\t\tterminal.state === \"succeeded\" || terminal.state === \"skipped\";\n\treturn {\n\t\toperation: succeeded ? \"complete_run\" : \"fail_run\",\n\t\tid: `promote:${runId}:terminal`,\n\t\tpayload: {\n\t\t\tstate: succeeded ? \"succeeded\" : \"failed\",\n\t\t\ttimestamp: terminal.timestamp,\n\t\t\tledgerEntryId: terminal.id,\n\t\t\ttrajectoryEventId: terminal.trajectoryEventId,\n\t\t\teventType: terminal.type,\n\t\t\ttitle: terminal.title,\n\t\t\tevidenceRefs: evidenceRefsForEntry(terminal),\n\t\t\t...(succeeded\n\t\t\t\t? {}\n\t\t\t\t: {\n\t\t\t\t\t\treason: `Terminal ledger entry ended in ${terminal.state} state.`,\n\t\t\t\t\t}),\n\t\t},\n\t};\n}\n\nfunction terminalOperationWarning(\n\tentries: AgentRuntimeLedgerEntry[],\n): string | undefined {\n\tconst last = entries.at(-1);\n\tif (!last) {\n\t\treturn \"Terminal operation omitted because no ledger entries were available.\";\n\t}\n\tif (terminalEntry(entries)) {\n\t\treturn undefined;\n\t}\n\tif (isTerminalState(last.state)) {\n\t\treturn \"Terminal operation omitted because no substantive terminal ledger entry was available.\";\n\t}\n\treturn `Terminal operation omitted because final ledger entry ended in ${last.state} state.`;\n}\n\nfunction buildPromotionPlan(\n\trunId: string,\n\tsessionId: string,\n\tgeneratedAt: string,\n\tentries: AgentRuntimeLedgerEntry[],\n): AgentRuntimePromotionPlan {\n\tconst idempotencyKey = `maestro-local-ledger:${sessionId}:${runId}`;\n\tconst operations: AgentRuntimePromotionOperation[] = [\n\t\t{\n\t\t\toperation: \"handle_trigger\",\n\t\t\tid: `promote:${runId}:trigger`,\n\t\t\tpayload: {\n\t\t\t\tsourceEventType: \"maestro.local_ledger_promote\",\n\t\t\t\tsourceEventId: sessionId,\n\t\t\t\tidempotencyKey,\n\t\t\t\tsessionId,\n\t\t\t\tgeneratedAt,\n\t\t\t},\n\t\t},\n\t];\n\n\tfor (const entry of entries) {\n\t\tconst correlation = entry.correlation ?? {};\n\t\tconst toolExecutionId =\n\t\t\tcorrelation.toolExecutionId ?? firstEvidenceId(entry, \"tool_execution\");\n\t\tconst evidenceRefs = evidenceRefsForEntry(entry);\n\t\tconst waitId = entry.platformShape.waitType ? entry.id : undefined;\n\t\toperations.push({\n\t\t\toperation: \"record_run_step\",\n\t\t\tid: `promote:${entry.id}:step`,\n\t\t\tledgerEntryId: entry.id,\n\t\t\tpayload: {\n\t\t\t\tstepId: entry.id,\n\t\t\t\tkind: entry.platformShape.stepKind,\n\t\t\t\tstate: runStepStateForEntry(entry),\n\t\t\t\ttitle: entry.title,\n\t\t\t\ttimestamp: entry.timestamp,\n\t\t\t\t...(entry.toolName ? { toolName: entry.toolName } : {}),\n\t\t\t},\n\t\t});\n\t\toperations.push({\n\t\t\toperation: \"record_run_work_item\",\n\t\t\tid: `promote:${entry.id}:work-item`,\n\t\t\tledgerEntryId: entry.id,\n\t\t\tpayload: {\n\t\t\t\tworkItemId: entry.id,\n\t\t\t\tkind: entry.platformShape.workItemKind,\n\t\t\t\tstate: entry.state,\n\t\t\t\ttitle: entry.title,\n\t\t\t\ttimestamp: entry.timestamp,\n\t\t\t\t...(waitId ? { waitId } : {}),\n\t\t\t\t...correlation,\n\t\t\t\t...(toolExecutionId ? { toolExecutionId } : {}),\n\t\t\t\tevidenceRefs,\n\t\t\t\tcompletionGate: \"maestro_agent_runtime_ledger_recorded\",\n\t\t\t\tpayload: workItemPayloadForEntry(sessionId, entry),\n\t\t\t},\n\t\t});\n\t\tif (entry.platformShape.waitType) {\n\t\t\toperations.push({\n\t\t\t\toperation: \"wait_run\",\n\t\t\t\tid: `promote:${entry.id}:wait`,\n\t\t\t\tledgerEntryId: entry.id,\n\t\t\t\tpayload: {\n\t\t\t\t\twaitId: entry.id,\n\t\t\t\t\twaitType: entry.platformShape.waitType,\n\t\t\t\t\ttitle: entry.title,\n\t\t\t\t\ttimestamp: entry.timestamp,\n\t\t\t\t\t...correlation,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tconst terminal = terminalOperation(runId, entries);\n\tif (terminal) operations.push(terminal);\n\tconst terminalWarning = terminalOperationWarning(entries);\n\tconst warnings = [\n\t\t\"Promotion plan is dry-run only; no Platform AgentRuntime writes were performed.\",\n\t\t...(terminalWarning ? [terminalWarning] : []),\n\t];\n\n\treturn {\n\t\tschemaVersion: AGENT_RUNTIME_PROMOTION_PLAN_SCHEMA,\n\t\trunId,\n\t\tsessionId,\n\t\tidempotencyKey,\n\t\toperations,\n\t\twarnings,\n\t};\n}\n\nexport function buildAgentRuntimeLedgerReport(\n\toptions: BuildAgentRuntimeLedgerOptions,\n): AgentRuntimeLedgerReport {\n\tconst entries = buildLedgerEntries(options.timeline, options.trajectory);\n\tconst byKind: Record<string, number> = {};\n\tconst byState: Record<string, number> = {};\n\tfor (const entry of entries) {\n\t\tincrement(byKind, entry.kind);\n\t\tincrement(byState, entry.state);\n\t}\n\tconst runId = options.trajectory.run.id;\n\tconst sessionId = options.trajectory.run.sessionId;\n\tconst promotion = buildPromotionPlan(\n\t\trunId,\n\t\tsessionId,\n\t\toptions.trajectory.run.generatedAt,\n\t\tentries,\n\t);\n\n\treturn {\n\t\tschemaVersion: AGENT_RUNTIME_LEDGER_SCHEMA,\n\t\trun: {\n\t\t\tid: runId,\n\t\t\tsessionId,\n\t\t\tsource: options.timeline.source,\n\t\t\tgeneratedAt: options.trajectory.run.generatedAt,\n\t\t\tplatformBacked: options.trajectory.run.platformBacked,\n\t\t\t...(options.session.sessionFile\n\t\t\t\t? { sessionFile: options.session.sessionFile }\n\t\t\t\t: {}),\n\t\t\t...(options.session.cwd ? { cwd: options.session.cwd } : {}),\n\t\t\t...(options.session.model ? { model: options.session.model } : {}),\n\t\t},\n\t\tcounts: {\n\t\t\tentries: entries.length,\n\t\t\tpromotionOperations: promotion.operations.length,\n\t\t\tbyKind,\n\t\t\tbyState,\n\t\t},\n\t\tentries,\n\t\treplay: replaySummary(options.replay, entries),\n\t\tpromotion,\n\t};\n}\n"]}
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "0.10.29",
3
- "notes": "Maestro by EvalOps - Deterministic coding agent with TUI/CLI and Web UI for AI-assisted development v0.10.29 is now available."
2
+ "version": "0.10.30",
3
+ "notes": "Maestro by EvalOps - Deterministic coding agent with TUI/CLI and Web UI for AI-assisted development v0.10.30 is now available."
4
4
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@evalops/maestro",
3
3
  "description": "Maestro by EvalOps - Deterministic coding agent with TUI/CLI and Web UI for AI-assisted development",
4
- "version": "0.10.29",
4
+ "version": "0.10.30",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "workspaces": [