external atom AgentDirectoryObject id "atom:org.quixos.agent:directory"; external atom AgentObject id "atom:org.quixos.agent:agent"; external atom AgentThreadObject id "atom:org.quixos.agent:thread"; external atom AgentRequestObject id "atom:org.quixos.agent:request"; external atom AgentItemObject id "atom:org.quixos.agent:item"; external atom AgentQuestionObject id "atom:org.quixos.agent:question"; external atom AgentCompletionStreamObject id "atom:org.quixos.agent:completion-stream"; import interface AgentContextSubject; import interface WebStudioPresentable; type RequestData = record {text:string;data:optional;configuration:string;configurationDigest:string;responseKind:string;sequence:uint64;createdAt:string;sourceKind:string;sourceLabel:string;publication:optional;causalDepth:uint32;interactive:bool;}; type RequestState = record {status:string;attempt:string;generation:uint32;reason:string;result:optional;rawOutput:optional;usage:optional;startedAt:optional;endedAt:optional;cancelRequested:bool;retryCount:uint32;notificationPending:bool;}; type ItemData = record {key:string;kind:string;text:string;phase:string;activity:optional;presentation:optional;sequence:uint64;version:uint64;createdAt:string;updatedAt:string;control:optional;}; interface AgentRequest id "interface:org.quixos.agent:request" revision "interface:org.quixos.agent:request@1" { queryable value spawned id "agent:request:spawned" : uint32 {get id "agent:request:spawned:get" execution snapshot;} operation reserveChild id "agent:request:reserve-child" : unit -> bool {call id "agent:request:reserve-child:call" execution transaction;} queryable value admission id "agent:request:admission" : RequestData {get id "agent:request:admission:get" execution snapshot;} queryable value progress id "agent:request:state" : RequestState {get id "agent:request:state:get" execution snapshot;} queryable relation thread id "agent:request:thread" : exactly-one atom AgentThreadObject {resolve id "agent:request:thread:resolve" execution snapshot;} queryable relation directory id "agent:request:directory" : exactly-one atom AgentDirectoryObject {resolve id "agent:request:directory:resolve" execution snapshot;} queryable relation items id "agent:request:items" : many-unique atom AgentItemObject {resolve id "agent:request:items:resolve" execution snapshot;} queryable relation questions id "agent:request:questions" : many-unique atom AgentQuestionObject {resolve id "agent:request:questions:resolve" execution snapshot;} queryable relation contexts id "agent:request:contexts" : many-unique interface AgentContextSubject {resolve id "agent:request:contexts:resolve" execution snapshot;} queryable relation related id "agent:request:related" : optional-one atom AgentRequestObject {resolve id "agent:request:related:resolve" execution snapshot;} queryable relation retryOf id "agent:request:retry-of" : optional-one atom AgentRequestObject {resolve id "agent:request:retry-of:resolve" execution snapshot;} queryable relation root id "agent:request:root" : optional-one atom AgentRequestObject {resolve id "agent:request:root:resolve" execution snapshot;} operation correct id "agent:request:correct" : record {errors:list;maxCorrections:uint32;createdAt:string;} -> optional> {call id "agent:request:correct:call" execution transaction;} operation claim id "agent:request:claim" : record {attempt:string;expectedGeneration:uint32;startedAt:string;recover:bool;} -> record {claimed:bool;generation:uint32;} {call id "agent:request:claim:call" execution transaction;} operation transition id "agent:request:transition" : record {attempt:string;generation:uint32;status:string;reason:string;} -> bool {call id "agent:request:transition:call" execution transaction;} operation finish id "agent:request:finish" : record {attempt:string;generation:uint32;status:string;result:optional;rawOutput:optional;usage:optional;reason:string;endedAt:string;} -> bool {call id "agent:request:finish:call" execution transaction;} operation cancel id "agent:request:cancel" : unit -> bool {call id "agent:request:cancel:call" execution transaction;} operation steer id "agent:request:steer" : record {attempt:string;generation:uint32;key:string;text:string;profile:optional;createdAt:string;} -> atom-ref {call id "agent:request:steer:call" execution transaction;} operation upsertItem id "agent:request:upsert-item" : record {attempt:string;generation:uint32;data:ItemData;subject:optional>;} -> atom-ref {call id "agent:request:upsert-item:call" execution transaction;} operation ask id "agent:request:ask" : record {attempt:string;generation:uint32;key:string;title:string;options:string;createdAt:string;expiresAt:string;} -> atom-ref {call id "agent:request:ask:call" execution transaction;} operation publishCompletion id "agent:request:publish-completion" : unit -> bool {call id "agent:request:publish-completion:call" execution transaction;} }