23 lines
2.1 KiB
Plaintext
23 lines
2.1 KiB
Plaintext
import interface ReadingDocument;
|
|
import interface ReadingOwner;
|
|
import interface ReadingFeature;
|
|
import interface ReadingReader;
|
|
import interface AgentRequest;
|
|
import interface AgentThread;
|
|
external atom AgentRequestObject id "atom:org.quixos.agent:request";
|
|
external atom AgentThreadObject id "atom:org.quixos.agent:thread";
|
|
type JobData = record {key:string;kind:string;featureRevision:uint32;sourceRevision:string;start:uint32;end:uint32;status:string;output:string;error:string;createdAt:string;};
|
|
type AgentAdmission = record {accepted:bool;reason:optional<string>;thread:optional<atom-ref<AgentThreadObject>>;request:optional<atom-ref<AgentRequestObject>>;};
|
|
interface ReadingJob id "interface:reading:job" revision "interface:reading:job@1" {
|
|
queryable relation library id "reading:job:library" : exactly-one interface ReadingOwner {resolve id "reading:job:library:resolve" execution snapshot;}
|
|
queryable relation reader id "reading:job:reader" : optional-one interface ReadingReader {resolve id "reading:job:reader:resolve" execution snapshot;}
|
|
queryable value configuration id "reading:job:configuration" : string {get id "reading:job:configuration:get" execution snapshot;}
|
|
queryable value data id "reading:job:data" : JobData {get id "reading:job:data:get" execution snapshot;}
|
|
queryable relation document id "reading:job:document" : optional-one interface ReadingDocument {resolve id "reading:job:document:resolve" execution snapshot;}
|
|
queryable relation feature id "reading:job:feature" : optional-one interface ReadingFeature {resolve id "reading:job:feature:resolve" execution snapshot;}
|
|
queryable relation request id "reading:job:request" : optional-one atom AgentRequestObject {resolve id "reading:job:request:resolve" execution snapshot;}
|
|
queryable relation thread id "reading:job:thread" : optional-one atom AgentThreadObject {resolve id "reading:job:thread:resolve" execution snapshot;}
|
|
operation admitted id "reading:job:admitted" : AgentAdmission -> unit {call id "reading:job:admitted:call" execution transaction;}
|
|
operation complete id "reading:job:complete" : unit -> unit {call id "reading:job:complete:call" execution transaction;}
|
|
}
|