/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ import type { AgentRecord } from '../../../tools/agent/manager.js'; import type { ProcessActivity, ProcessAttention, ProcessNode, ProcessState, ProcessUsage } from '../types.js'; /** Chain node ids are namespaced to avoid colliding with agent/process ids. */ export declare function chainNodeId(chainId: string): string; /** Subtask node ids are namespaced to avoid colliding with agent/process ids. */ export declare function subtaskNodeId(subtaskId: string): string; /** Work-item node ids are namespaced to avoid colliding with agent/process ids. */ export declare function workItemNodeId(workItemId: string): string; /** * One activity side-table entry. Registry-owned; populated from the EXISTING * runtime-bus 'agents' channel emitters (no new event contract). */ export interface AgentActivityEntry { readonly state: Extract; readonly activity?: ProcessActivity | undefined; /** Epoch ms of the last observed bus event for this agent. */ readonly at: number; } /** Assembly context the agent adapter needs to derive state and edges. */ export interface AgentAdapterContext { readonly now: number; readonly stalledThresholdMs: number; /** Side-table entries keyed by agentId. Empty map when no runtimeBus was provided. */ readonly activity: ReadonlyMap; /** True when a runtimeBus feeds the side-table, gates the stalled derivation. */ readonly liveness: boolean; /** Agent ids that have a pending shared approval (metadata.agentId match). */ readonly pendingApprovalAgentIds: ReadonlySet; /** Session ids that have a pending shared approval (sessionRef cross-match). */ readonly pendingApprovalSessionIds: ReadonlySet; /** agentId → bound sessionId (from the session broker, when available). */ readonly sessionIdByAgentId: ReadonlyMap; /** Raw WrfcChain ids present in this snapshot. */ readonly chainIds: ReadonlySet; /** Raw WrfcSubtask ids present in this snapshot. */ readonly subtaskIds: ReadonlySet; /** Raw orchestration-engine WorkItem ids present in this snapshot. */ readonly workItemIds: ReadonlySet; /** orchestrationNodeId → owning agentId, for parentNodeId edge resolution. */ readonly agentIdByOrchestrationNodeId: ReadonlyMap; /** All agent ids present in this snapshot. */ readonly agentIds: ReadonlySet; readonly priceUsage?: ((model: string | undefined, usage: ProcessUsage) => number | null) | undefined; /** Provenance for the same resolution priceUsage prices with, stamped onto the node at pricing time. */ readonly priceProvenance?: ((model: string | undefined) => { readonly source: 'user' | 'provider' | 'catalog'; readonly asOf?: string | undefined; } | null) | undefined; /** * True when the registry was constructed with a `messageBus` dep, gates * `steerable`. Without it, steering has no delivery mechanism, so every * agent (even a live one) honestly reports steerable=false. */ readonly messageBusPresent: boolean; } /** AgentRecord.usage + toolCallCount → ProcessUsage. */ export declare function usageFromAgentRecord(record: AgentRecord): ProcessUsage | undefined; /** * Derive the attention marker from a node's already-derived coarse `state`. * * Pure projection, no new signal is consulted. `awaiting-approval` is the only * blocked-on-human state today, so it is the only one that yields an attention * marker; every other state yields `undefined`. Kept as a shared helper so any * adapter (or a roll-up) derives attention identically from state. The * `detail` (e.g. the tool awaiting approval) is passed by the caller when known. */ export declare function deriveNeedsAttention(state: ProcessState, detail?: string): ProcessAttention | undefined; /** AgentRecord → ProcessNode. */ export declare function adaptAgent(record: AgentRecord, ctx: AgentAdapterContext): ProcessNode; //# sourceMappingURL=agent.d.ts.map