Export template source from de90d1a9947ae636f04e72ac2a2297c7be9ce010:quixos-instance/workspaces/studio
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"monorepoCommit": "de90d1a9947ae636f04e72ac2a2297c7be9ce010",
|
||||||
|
"sourcePath": "quixos-instance/workspaces/studio"
|
||||||
|
}
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
fragment {
|
||||||
|
import package AgentPresentation;
|
||||||
|
import "presentation/model.qx";
|
||||||
|
|
||||||
|
type AgentSubmission = record {text:string;data:optional<string>;profile:optional<string>;response:optional<string>;sourceKind:string;sourceLabel:string;publication:optional<string>;createdAt:string;contexts:list<interface-ref<AgentContextSubject>>;related:optional<atom-ref<AgentRequestObject>>;retryOf:optional<atom-ref<AgentRequestObject>>;root:optional<atom-ref<AgentRequestObject>>;causalDepth:uint32;};
|
||||||
|
type AgentAdmission = record {accepted:bool;reason:optional<string>;thread:optional<atom-ref<AgentThreadObject>>;request:optional<atom-ref<AgentRequestObject>>;};
|
||||||
|
type DirectoryData = record {sequence:uint64;pending:uint32;ordinaryPending:uint32;notificationPending:uint32;profiles:string;availability:string;};
|
||||||
|
type ThreadData = record {title:string;kind:string;archived:bool;sequence:uint64;pending:uint32;nextItem:uint64;updatedAt:string;};
|
||||||
|
type AgentData = record {name:string;description:string;enabled:bool;settings:string;};
|
||||||
|
type RequestData = record {text:string;data:optional<string>;configuration:string;configurationDigest:string;responseKind:string;sequence:uint64;createdAt:string;sourceKind:string;sourceLabel:string;publication:optional<string>;causalDepth:uint32;interactive:bool;};
|
||||||
|
type RequestState = record {status:string;attempt:string;generation:uint32;reason:string;result:optional<string>;rawOutput:optional<string>;usage:optional<string>;startedAt:optional<string>;endedAt:optional<string>;cancelRequested:bool;retryCount:uint32;notificationPending:bool;};
|
||||||
|
type ItemData = record {key:string;kind:string;text:string;phase:string;activity:optional<string>;presentation:optional<string>;sequence:uint64;version:uint64;createdAt:string;updatedAt:string;control:optional<record {attempt:string;generation:uint32;status:string;reason:string;}>;};
|
||||||
|
type QuestionData = record {key:string;title:string;options:string;status:string;answer:optional<string>;createdAt:string;expiresAt:string;attempt:string;generation:uint32;};
|
||||||
|
|
||||||
|
import interface AgentWorkspace;
|
||||||
|
import interface AgentDirectory;
|
||||||
|
import interface Agent;
|
||||||
|
import interface AgentThread;
|
||||||
|
import interface AgentRequest;
|
||||||
|
import interface AgentItem;
|
||||||
|
import interface AgentQuestion;
|
||||||
|
import interface AgentContextSubject;
|
||||||
|
import interface EventStream;
|
||||||
|
import package AgentRuntime;
|
||||||
|
atom AgentDirectoryObject id "atom:org.quixos.agent:directory";
|
||||||
|
atom AgentObject id "atom:org.quixos.agent:agent";
|
||||||
|
atom AgentThreadObject id "atom:org.quixos.agent:thread";
|
||||||
|
atom AgentRequestObject id "atom:org.quixos.agent:request";
|
||||||
|
atom AgentItemObject id "atom:org.quixos.agent:item";
|
||||||
|
atom AgentQuestionObject id "atom:org.quixos.agent:question";
|
||||||
|
atom AgentCompletionStreamObject id "atom:org.quixos.agent:completion-stream";
|
||||||
|
type AgentCompletion = record {request:atom-ref<AgentRequestObject>;thread:atom-ref<AgentThreadObject>;status:string;};
|
||||||
|
conform Canvas as AgentWorkspace id "agent:conformance:workspace" {
|
||||||
|
private edge Linkworkspaceagents id "agent:workspace:agents:edge" {atom Canvas projection agents id "agent:workspace:agents:projection" optional-one on-delete "detach" public-traversal;atom AgentDirectoryObject projection workspaces id "agent:directory:workspaces:projection" many on-delete "detach" public-traversal;}
|
||||||
|
bind agents.resolve to edge Linkworkspaceagents.agents.resolve;
|
||||||
|
bind install.call to package AgentRuntime.workspace_install with {agents to edge Linkworkspaceagents.agents;
|
||||||
|
create_directory to creation AgentDirectoryObject with {AgentDirectory from input;};
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
}
|
||||||
|
conform AgentDirectoryObject as AgentDirectory id "agent:conformance:directory" {
|
||||||
|
private state directorydata id "agent:storage:directory:data" on AgentDirectoryObject : DirectoryData policy register;
|
||||||
|
private edge Linkdirectorypending id "agent:directory:pending:edge" {atom AgentDirectoryObject projection pending id "agent:directory:pending:projection" many-unique on-delete "detach" public-traversal;atom AgentRequestObject projection pendingIn id "agent:request:pendingIn:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkdirectorynotifications id "agent:directory:notifications:edge" {atom AgentDirectoryObject projection notifications id "agent:directory:notifications:projection" many-unique on-delete "detach" public-traversal;atom AgentRequestObject projection notificationIn id "agent:request:notificationIn:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge LinkdirectorydefaultAgent id "agent:directory:defaultAgent:edge" {atom AgentDirectoryObject projection defaultAgent id "agent:directory:defaultAgent:projection" optional-one on-delete "detach" public-traversal;atom AgentObject projection defaultIn id "agent:agent:defaultIn:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge LinkdirectoryinitialThread id "agent:directory:initialThread:edge" {atom AgentDirectoryObject projection initialThread id "agent:directory:initialThread:projection" optional-one on-delete "detach" public-traversal;atom AgentThreadObject projection initialIn id "agent:thread:initialIn:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkdirectoryrepairs id "agent:directory:repairs:edge" {atom AgentDirectoryObject projection repairs id "agent:directory:repairs:projection" many-unique on-delete "detach" keyed "string";atom AgentRequestObject projection repairDirectory id "agent:request:repair-directory:projection" many on-delete "detach";}
|
||||||
|
initialize {data to state directorydata;};
|
||||||
|
bind data.get to state directorydata.read;
|
||||||
|
bind agents.resolve to edge Linkagentdirectory.agents.resolve;
|
||||||
|
bind threads.resolve to edge Linkthreaddirectory.threads.resolve;
|
||||||
|
bind pending.resolve to edge Linkdirectorypending.pending.resolve;
|
||||||
|
bind notifications.resolve to edge Linkdirectorynotifications.notifications.resolve;
|
||||||
|
bind defaultAgent.resolve to edge LinkdirectorydefaultAgent.defaultAgent.resolve;
|
||||||
|
bind initialThread.resolve to edge LinkdirectoryinitialThread.initialThread.resolve;
|
||||||
|
bind createAgent.call to package AgentRuntime.directory_createAgent with {create_agent to creation AgentObject with {Agent from input;};
|
||||||
|
create_stream to creation AgentCompletionStreamObject with {};};
|
||||||
|
bind createThread.call to package AgentRuntime.directory_createThread with {data to state directorydata;
|
||||||
|
create_thread to creation AgentThreadObject with {AgentThread from input;};
|
||||||
|
agent to interface Agent from input;};
|
||||||
|
bind admit.call to package AgentRuntime.directory_admit with {data to state directorydata;
|
||||||
|
root to interface AgentRequest from input;
|
||||||
|
pending to edge Linkdirectorypending.pending;
|
||||||
|
create_request to creation AgentRequestObject with {AgentRequest from input;};
|
||||||
|
create_item to creation AgentItemObject with {AgentItem from input;};
|
||||||
|
agent to interface Agent from input;
|
||||||
|
thread to interface AgentThread from input;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
bind reconcileRepair.call to package AgentRuntime.directory_reconcileRepair with {data to state directorydata;repairs to edge Linkdirectoryrepairs.repairs;pending to edge Linkdirectorypending.pending;defaultAgent to edge LinkdirectorydefaultAgent.defaultAgent;initialThread to edge LinkdirectoryinitialThread.initialThread;create_request to creation AgentRequestObject with {AgentRequest from input;};create_item to creation AgentItemObject with {AgentItem from input;};request to interface AgentRequest from input;thread to interface AgentThread from input;};
|
||||||
|
bind settle.call to package AgentRuntime.directory_settle with {data to state directorydata;
|
||||||
|
pending to edge Linkdirectorypending.pending;
|
||||||
|
notifications to edge Linkdirectorynotifications.notifications;
|
||||||
|
thread to interface AgentThread from input;};
|
||||||
|
bind advertise.call to package AgentRuntime.directory_advertise with {data to state directorydata;};
|
||||||
|
bind initialize.call to package AgentRuntime.directory_initialize with {defaultAgent to edge LinkdirectorydefaultAgent.defaultAgent;
|
||||||
|
initialThread to edge LinkdirectoryinitialThread.initialThread;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
bind notificationSent.call to package AgentRuntime.directory_notificationSent with {notifications to edge Linkdirectorynotifications.notifications;data to state directorydata;};
|
||||||
|
}
|
||||||
|
conform AgentObject as Agent id "agent:conformance:agent" {
|
||||||
|
private state agentdata id "agent:storage:agent:data" on AgentObject : AgentData policy register;
|
||||||
|
private state agentinstructions id "agent:storage:agent:instructions" on AgentObject : string policy crdt(string);
|
||||||
|
private edge Linkagentdirectory id "agent:agent:directory:edge" {atom AgentObject projection directory id "agent:agent:directory:projection" exactly-one on-delete "detach" public-traversal;atom AgentDirectoryObject projection agents id "agent:directory:agents:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkagentcompletions id "agent:agent:completions:edge" {atom AgentObject projection completions id "agent:agent:completions:projection" exactly-one on-delete "detach" public-traversal;interface EventStream<AgentCompletion> projection agentOwners id "agent:agent:completions:owners" many on-delete "detach";}
|
||||||
|
initialize {data to state agentdata;instructions to state agentinstructions;directory to edge Linkagentdirectory.directory;completions to edge Linkagentcompletions.completions;};
|
||||||
|
bind data.get to state agentdata.read;
|
||||||
|
bind instructions.get to state agentinstructions.read;
|
||||||
|
bind instructions.edit to state agentinstructions.edit;
|
||||||
|
bind directory.resolve to edge Linkagentdirectory.directory.resolve;
|
||||||
|
bind threads.resolve to edge Linkthreadagent.threads.resolve;
|
||||||
|
bind completions.resolve to edge Linkagentcompletions.completions.resolve;
|
||||||
|
bind update.call to package AgentRuntime.agent_update with {data to state agentdata;};
|
||||||
|
bind createThread.call to package AgentRuntime.agent_createThread with {agent to interface Agent from input;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
bind request.call to package AgentRuntime.agent_request with {agent to interface Agent from input;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
bind tryRequest.call to package AgentRuntime.agent_tryRequest with {agent to interface Agent from input;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
}
|
||||||
|
conform AgentThreadObject as AgentThread id "agent:conformance:thread" {
|
||||||
|
private state threaddata id "agent:storage:thread:data" on AgentThreadObject : ThreadData policy register;
|
||||||
|
private edge Linkthreaddirectory id "agent:thread:directory:edge" {atom AgentThreadObject projection directory id "agent:thread:directory:projection" exactly-one on-delete "detach" public-traversal;atom AgentDirectoryObject projection threads id "agent:directory:threads:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkthreadagent id "agent:thread:agent:edge" {atom AgentThreadObject projection agent id "agent:thread:agent:projection" exactly-one on-delete "detach" public-traversal;atom AgentObject projection threads id "agent:agent:threads:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkthreadactive id "agent:thread:active:edge" {atom AgentThreadObject projection active id "agent:thread:active:projection" optional-one on-delete "detach" public-traversal;atom AgentRequestObject projection activeIn id "agent:request:activeIn:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkthreadcontexts id "agent:thread:contexts:edge" {atom AgentThreadObject projection contexts id "agent:thread:contexts:projection" many-unique on-delete "detach" public-traversal;interface AgentContextSubject projection threadOwners id "agent:thread:contexts:owners" many on-delete "detach";}
|
||||||
|
initialize {data to state threaddata;directory to edge Linkthreaddirectory.directory;agent to edge Linkthreadagent.agent;contexts to edge Linkthreadcontexts.contexts;};
|
||||||
|
bind data.get to state threaddata.read;
|
||||||
|
bind agent.resolve to edge Linkthreadagent.agent.resolve;
|
||||||
|
bind directory.resolve to edge Linkthreaddirectory.directory.resolve;
|
||||||
|
bind active.resolve to edge Linkthreadactive.active.resolve;
|
||||||
|
bind requests.resolve to edge Linkrequestthread.requests.resolve;
|
||||||
|
bind items.resolve to edge Linkitemthread.items.resolve;
|
||||||
|
bind contexts.resolve to edge Linkthreadcontexts.contexts.resolve;
|
||||||
|
bind send.call to package AgentRuntime.thread_send with {thread to interface AgentThread from input;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
bind rename.call to package AgentRuntime.thread_rename with {data to state threaddata;};
|
||||||
|
bind archive.call to package AgentRuntime.thread_archive with {data to state threaddata;};
|
||||||
|
bind activate.call to package AgentRuntime.thread_activate with {active to edge Linkthreadactive.active;};
|
||||||
|
bind release.call to package AgentRuntime.thread_release with {active to edge Linkthreadactive.active;};
|
||||||
|
bind adjustPending.call to package AgentRuntime.thread_adjustPending with {data to state threaddata;};
|
||||||
|
bind allocateItem.call to package AgentRuntime.thread_allocateItem with {data to state threaddata;};
|
||||||
|
}
|
||||||
|
conform AgentRequestObject as AgentRequest id "agent:conformance:request" {
|
||||||
|
private state requestspawned id "agent:storage:request:spawned" on AgentRequestObject : uint32 policy register;
|
||||||
|
private state requestprogress id "agent:storage:request:progress" on AgentRequestObject : RequestState policy register;
|
||||||
|
private state requestadmission id "agent:storage:request:admission" on AgentRequestObject : RequestData policy register;
|
||||||
|
private edge Linkrequestthread id "agent:request:thread:edge" {atom AgentRequestObject projection thread id "agent:request:thread:projection" exactly-one on-delete "detach" public-traversal;atom AgentThreadObject projection requests id "agent:thread:requests:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkrequestdirectory id "agent:request:directory:edge" {atom AgentRequestObject projection directory id "agent:request:directory:projection" exactly-one on-delete "detach" public-traversal;atom AgentDirectoryObject projection allRequests id "agent:directory:allRequests:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkrequestrelated id "agent:request:related:edge" {atom AgentRequestObject projection related id "agent:request:related:projection" optional-one on-delete "detach" public-traversal;atom AgentRequestObject projection relatedFrom id "agent:request:relatedFrom:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge LinkrequestretryOf id "agent:request:retryOf:edge" {atom AgentRequestObject projection retryOf id "agent:request:retryOf:projection" optional-one on-delete "detach" public-traversal;atom AgentRequestObject projection retries id "agent:request:retries:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkrequestroot id "agent:request:root:edge" {atom AgentRequestObject projection root id "agent:request:root:projection" optional-one on-delete "detach" public-traversal;atom AgentRequestObject projection descendants id "agent:request:descendants:projection" many on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkrequestcontexts id "agent:request:contexts:edge" {atom AgentRequestObject projection contexts id "agent:request:contexts:projection" many-unique on-delete "detach" public-traversal;interface AgentContextSubject projection requestOwners id "agent:request:contexts:owners" many on-delete "detach";}
|
||||||
|
initialize {spawned to state requestspawned;admission to state requestadmission;progress to state requestprogress;contexts to edge Linkrequestcontexts.contexts;directory to edge Linkrequestdirectory.directory;thread to edge Linkrequestthread.thread;related to edge Linkrequestrelated.related;retryOf to edge LinkrequestretryOf.retryOf;root to edge Linkrequestroot.root;};
|
||||||
|
bind spawned.get to state requestspawned.read;
|
||||||
|
bind reserveChild.call to package AgentRuntime.request_reserveChild with {spawned to state requestspawned;};
|
||||||
|
bind admission.get to state requestadmission.read;
|
||||||
|
bind progress.get to state requestprogress.read;
|
||||||
|
bind thread.resolve to edge Linkrequestthread.thread.resolve;
|
||||||
|
bind directory.resolve to edge Linkrequestdirectory.directory.resolve;
|
||||||
|
bind items.resolve to edge Linkitemrequest.items.resolve;
|
||||||
|
bind questions.resolve to edge Linkquestionrequest.questions.resolve;
|
||||||
|
bind contexts.resolve to edge Linkrequestcontexts.contexts.resolve;
|
||||||
|
bind related.resolve to edge Linkrequestrelated.related.resolve;
|
||||||
|
bind retryOf.resolve to edge LinkrequestretryOf.retryOf.resolve;
|
||||||
|
bind root.resolve to edge Linkrequestroot.root.resolve;
|
||||||
|
private edge Linkrequestcorrection id "agent:request:correction:edge" {atom AgentRequestObject projection correction id "agent:request:correction:projection" optional-one on-delete "detach";atom AgentRequestObject projection correctionOf id "agent:request:correctionOf:projection" optional-one on-delete "detach";}
|
||||||
|
bind correct.call to package AgentRuntime.request_correct with {correction to edge Linkrequestcorrection.correction;request to interface AgentRequest from input;thread to interface AgentThread from input;};
|
||||||
|
bind claim.call to package AgentRuntime.request_claim with {progress to state requestprogress;
|
||||||
|
request to interface AgentRequest from input;
|
||||||
|
thread to interface AgentThread from input;};
|
||||||
|
bind transition.call to package AgentRuntime.request_transition with {progress to state requestprogress;};
|
||||||
|
bind finish.call to package AgentRuntime.request_finish with {progress to state requestprogress;
|
||||||
|
admission to state requestadmission;
|
||||||
|
request to interface AgentRequest from input;
|
||||||
|
directory to interface AgentDirectory from input;
|
||||||
|
thread to interface AgentThread from input;
|
||||||
|
agent to interface Agent from input;};
|
||||||
|
bind cancel.call to package AgentRuntime.request_cancel with {progress to state requestprogress;
|
||||||
|
request to interface AgentRequest from input;};
|
||||||
|
bind steer.call to package AgentRuntime.request_steer with {progress to state requestprogress;
|
||||||
|
request to interface AgentRequest from input;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
bind upsertItem.call to package AgentRuntime.request_upsertItem with {progress to state requestprogress;
|
||||||
|
request to interface AgentRequest from input;
|
||||||
|
thread to interface AgentThread from input;
|
||||||
|
item to interface AgentItem from input;
|
||||||
|
presentable to interface WebStudioPresentable from input;
|
||||||
|
create_mount to creation PresentationMountRecord with {};
|
||||||
|
create_item to creation AgentItemObject with {AgentItem from input;};};
|
||||||
|
bind ask.call to package AgentRuntime.request_ask with {progress to state requestprogress;
|
||||||
|
request to interface AgentRequest from input;
|
||||||
|
question to interface AgentQuestion from input;
|
||||||
|
create_question to creation AgentQuestionObject with {AgentQuestion from input;};};
|
||||||
|
bind publishCompletion.call to package AgentRuntime.request_publishCompletion with {progress to state requestprogress;
|
||||||
|
request to interface AgentRequest from input;
|
||||||
|
thread to interface AgentThread from input;
|
||||||
|
agent to interface Agent from input;
|
||||||
|
stream to interface EventStream<AgentCompletion> from input;
|
||||||
|
directory to interface AgentDirectory from input;};
|
||||||
|
}
|
||||||
|
conform AgentItemObject as AgentItem id "agent:conformance:item" {
|
||||||
|
private state itemdata id "agent:storage:item:data" on AgentItemObject : ItemData policy register;
|
||||||
|
private edge Linkitemrequest id "agent:item:request:edge" {atom AgentItemObject projection request id "agent:item:request:projection" exactly-one on-delete "detach" public-traversal;atom AgentRequestObject projection items id "agent:request:items:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkitemthread id "agent:item:thread:edge" {atom AgentItemObject projection thread id "agent:item:thread:projection" exactly-one on-delete "detach" public-traversal;atom AgentThreadObject projection items id "agent:thread:items:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
private edge Linkitemsubject id "agent:item:subject:edge" {atom AgentItemObject projection subject id "agent:item:subject:projection" optional-one on-delete "detach" public-traversal;interface WebStudioPresentable projection itemOwners id "agent:item:subject:owners" many on-delete "detach";}
|
||||||
|
private edge Linkitemmount id "agent:item:mount:edge" {atom AgentItemObject projection presentationMount id "agent:item:mount:projection" optional-one on-delete "detach" public-traversal;interface PresentationMount projection itemOwners id "agent:item:mount:owners" many on-delete "detach";}
|
||||||
|
bind presentationMount.resolve to edge Linkitemmount.presentationMount.resolve;
|
||||||
|
initialize {presentationMount to edge Linkitemmount.presentationMount;data to state itemdata;thread to edge Linkitemthread.thread;request to edge Linkitemrequest.request;subject to edge Linkitemsubject.subject;};
|
||||||
|
bind data.get to state itemdata.read;
|
||||||
|
bind request.resolve to edge Linkitemrequest.request.resolve;
|
||||||
|
bind thread.resolve to edge Linkitemthread.thread.resolve;
|
||||||
|
bind subject.resolve to edge Linkitemsubject.subject.resolve;
|
||||||
|
bind checkpoint.call to package AgentRuntime.item_checkpoint with {data to state itemdata;item to interface AgentItem from input;request to interface AgentRequest from input;};
|
||||||
|
}
|
||||||
|
conform AgentQuestionObject as AgentQuestion id "agent:conformance:question" {
|
||||||
|
private state questiondata id "agent:storage:question:data" on AgentQuestionObject : QuestionData policy register;
|
||||||
|
private edge Linkquestionrequest id "agent:question:request:edge" {atom AgentQuestionObject projection request id "agent:question:request:projection" exactly-one on-delete "detach" public-traversal;atom AgentRequestObject projection questions id "agent:request:questions:projection" many-unique on-delete "detach" public-traversal;}
|
||||||
|
initialize {data to state questiondata;request to edge Linkquestionrequest.request;};
|
||||||
|
bind data.get to state questiondata.read;
|
||||||
|
bind request.resolve to edge Linkquestionrequest.request.resolve;
|
||||||
|
bind answer.call to package AgentRuntime.question_answer with {data to state questiondata;
|
||||||
|
question to interface AgentQuestion from input;
|
||||||
|
request to interface AgentRequest from input;};
|
||||||
|
bind cancel.call to package AgentRuntime.question_cancel with {data to state questiondata;};
|
||||||
|
}
|
||||||
|
conform AgentCompletionStreamObject as EventStream<AgentCompletion> id "agent:completion-stream" {private state Entries id "agent:completion:entries" on AgentCompletionStreamObject : AgentCompletion policy journal {"maxEntries":128,"maxBytes":1048576,"maxPublicationBytes":262144,"maxProtectedSubscriptions":32};bind publish.call to journal Entries.publish;bind head.get to journal Entries.head;bind readPage.call to journal Entries.readPage;}
|
||||||
|
presentation ThreadView id "presentation:org.quixos.agent:thread" for AgentThread using AgentPresentation.Thread;
|
||||||
|
conform AgentThreadObject as StandaloneView<interface AgentThread> id "agent:thread:view" {bind render to AgentPresentation.Thread;}
|
||||||
|
conform AgentThreadObject as WebStudioPresentable id "agent:thread:presentable" {bind canPresent.call to package WebStudioCanvasRuntime.canPresent<atom AgentThreadObject> with {catalog to workspace reflection [presentations];};}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
fragment {
|
||||||
|
import package PresentationRuntime;
|
||||||
|
atom PresentationMountRecord id "atom:org.quixos.presentation-mount";
|
||||||
|
shared edge PresentationMembership id "org.quixos.presentation:membership" {
|
||||||
|
interface PresentationMount projection members id "org.quixos.presentation:members" many-unique keyed "string" public-traversal;
|
||||||
|
interface PresentationState projection presentationMount id "org.quixos.presentation:owner" optional-one public-traversal;
|
||||||
|
}
|
||||||
|
shared edge PresentationParent id "org.quixos.presentation:parent" {
|
||||||
|
interface PresentationState projection parent id "org.quixos.presentation:parent" optional-one public-traversal;
|
||||||
|
interface PresentationState projection children id "org.quixos.presentation:children" many-unique public-traversal;
|
||||||
|
}
|
||||||
|
shared edge PresentationRoot id "org.quixos.presentation:root" {
|
||||||
|
interface PresentationMount projection root id "org.quixos.presentation:root" optional-one public-traversal;
|
||||||
|
interface PresentationState projection rootOf id "org.quixos.presentation:root-of" optional-one;
|
||||||
|
}
|
||||||
|
conform PresentationMountRecord as PresentationMount id "org.quixos.presentation:mount" {
|
||||||
|
bind members.resolve to edge PresentationMembership.members.resolve;
|
||||||
|
bind root.resolve to edge PresentationRoot.root.resolve;
|
||||||
|
bind create.call to package PresentationRuntime.createPresentationMount with {presentationMount to creation PresentationMountRecord with {};};
|
||||||
|
bind copy.call to package PresentationRuntime.copyEmpty with {presentationMount to creation PresentationMountRecord with {};};
|
||||||
|
bind find.call to package PresentationRuntime.findEmpty with {};
|
||||||
|
bind attach.call to package PresentationRuntime.attachEmpty with {};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "backend": "execution" }
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"atom": "atom:org.quixos.web-studio:canvas",
|
||||||
|
"interface": "interface:org.quixos.web-studio.canvas@1",
|
||||||
|
"operation": "canvas:root:call"
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
quixos-lock version 1 {
|
||||||
|
quixos source { repository "https://gitea.internal.quixos.org/quixos/quixos.git"; commit "de90d1a9947ae636f04e72ac2a2297c7be9ce010"; }
|
||||||
|
package AgentPresentation source { repository "https://repos.quixos.org/quixos-studio/package-agent-presentation.git"; commit "6b433bb87f38bce848a73a904f4608ece8143e3a"; }
|
||||||
|
package PresentationRuntime source { repository "https://repos.quixos.org/quixos-studio/package-presentation-runtime.git"; commit "61d447d435777d2de057a0a25fd20a37113d1b7e"; }
|
||||||
|
interface AgentWorkspace source { repository "https://repos.quixos.org/quixos-studio/interface-agent-workspace.git"; commit "6b6fca52d9d9f22dbc8af6b9d59577809f5eeea5"; }
|
||||||
|
interface AgentDirectory source { repository "https://repos.quixos.org/quixos-studio/interface-agent-directory.git"; commit "a25908aa5da56a365e64dc170f0df8673cc34e24"; }
|
||||||
|
interface Agent source { repository "https://repos.quixos.org/quixos-studio/interface-agent.git"; commit "e5aeaa3a59e3c0cac99e43553b04227fb99a7462"; }
|
||||||
|
interface AgentThread source { repository "https://repos.quixos.org/quixos-studio/interface-agent-thread.git"; commit "9d689bbeecfc3321f97bfbaa9adf405eeee89e5c"; }
|
||||||
|
interface AgentRequest source { repository "https://repos.quixos.org/quixos-studio/interface-agent-request.git"; commit "d9bb364113d6590770f4733d3a9d42364e3b8806"; }
|
||||||
|
interface AgentItem source { repository "https://repos.quixos.org/quixos-studio/interface-agent-item.git"; commit "a80f9eebbefe6fdfe8b86db3103eed1a4b8e55f7"; }
|
||||||
|
interface AgentQuestion source { repository "https://repos.quixos.org/quixos-studio/interface-agent-question.git"; commit "c6fb1da16e29c599c1ba0dc510faa926615f0686"; }
|
||||||
|
interface AgentContextSubject source { repository "https://repos.quixos.org/quixos-studio/interface-agent-context-subject.git"; commit "0a1dd60f7457856bcfa6c8cf580e516d69d59ee7"; }
|
||||||
|
interface EventStream source { repository "https://repos.quixos.org/quixos-studio/interface-event-stream.git"; commit "5d9409557059ca2a3247af080a33516985916f66"; }
|
||||||
|
package AgentRuntime source { repository "https://repos.quixos.org/quixos-studio/package-agent-runtime.git"; commit "c13085fa041f888728fca00236b78f63f4957f43"; }
|
||||||
|
package AgentWorkspaceBootstrap source { repository "https://repos.quixos.org/quixos-studio/package-agent-workspace-bootstrap.git"; commit "42783681b8d81d92c41adfed3874f01b065405d6"; }
|
||||||
|
interface WebStudioFactory source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-factory.git"; commit "a4136d9bfd765db6b2de2188ef2caf341e0f7a61"; }
|
||||||
|
interface WebStudioCanvasFactory source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-canvas-factory.git"; commit "545e687a7d41822a883774e385aa1d7ee3aca475"; }
|
||||||
|
interface WebStudioPlaceable source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-placeable.git"; commit "a998ebd982f7b61946156a0fa7038bc1295c3afc"; }
|
||||||
|
interface WebStudioCanvas source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-canvas.git"; commit "fb076e2d0d48080f76b88b2ffa4edeb4c37a7342"; }
|
||||||
|
package WebStudioCanvasRuntime source { repository "https://repos.quixos.org/quixos-studio/package-web-studio-canvas-runtime.git"; commit "399405b540514b0b10ea28cdb99a75edaa78e773"; }
|
||||||
|
interface WebStudioPresentable source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-presentable.git"; commit "f7b38219572810912fad596c7e4a33903209f71b"; }
|
||||||
|
interface PresentationState source { repository "https://repos.quixos.org/quixos-studio/interface-presentation-state.git"; commit "94db4272bcca52fbb23325bfa305d7331ea08602"; }
|
||||||
|
interface PresentationMount source { repository "https://repos.quixos.org/quixos-studio/interface-presentation-mount.git"; commit "30566340643355d8509bf116c2c3d91f09173d98"; }
|
||||||
|
interface WebStudioDisplayTarget source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-display-target.git"; commit "1360b6175a77b8e69a5db83eaa63910d60699651"; }
|
||||||
|
interface WebStudioDisplayDirectory source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-display-directory.git"; commit "b6b70722e81f75ff2cd969118c5b8d0bba240a00"; }
|
||||||
|
package WebStudioDisplayRuntime source { repository "https://repos.quixos.org/quixos-studio/package-web-studio-display-runtime.git"; commit "c48e604a523cefe3d6cd2e231262988936b79bec"; }
|
||||||
|
interface WebStudioSearchable source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-searchable.git"; commit "b51116e6d320fc4dcd79f0d067124adf6a8e919f"; }
|
||||||
|
interface StandaloneView source { repository "https://repos.quixos.org/quixos-studio/interface-react-standalone-view.git"; commit "67b00f7ff8df87a477e12c5668c42684d8fa1708"; }
|
||||||
|
interface WebStudioCanvasPlacement source { repository "https://repos.quixos.org/quixos-studio/interface-web-studio-canvas-placement.git"; commit "8bee874e37700fc860f066f11946efc82a1f521d"; }
|
||||||
|
package WebStudioCanvasEditor source { repository "https://repos.quixos.org/quixos-studio/package-web-studio-canvas-editor.git"; commit "f22f01e37161e25291542ff6cf5428ad83efe8c6"; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"compilerRevision": "26f4492b068aec99ccdaebe58c29418ee48a5662",
|
||||||
|
"interfaces": {
|
||||||
|
"PresentationSubject": "./quixos-instance/interfaces/presentation-subject",
|
||||||
|
"PresentationState": "./quixos-instance/interfaces/presentation-state",
|
||||||
|
"PresentationMount": "./quixos-instance/interfaces/presentation-mount",
|
||||||
|
"WebStudioPresentable": "./quixos-instance/interfaces/web-studio-presentable",
|
||||||
|
"WebStudioDisplayTarget": "./quixos-instance/interfaces/web-studio-display-target",
|
||||||
|
"WebStudioDisplayDirectory": "./quixos-instance/interfaces/web-studio-display-directory",
|
||||||
|
"WebStudioSearchable": "./quixos-instance/interfaces/web-studio-searchable",
|
||||||
|
"WebStudioFactory": "./quixos-instance/interfaces/web-studio-factory",
|
||||||
|
"StandaloneView": "./quixos-instance/interfaces/react-standalone-view",
|
||||||
|
"WebStudioCanvas": "web-studio-canvas",
|
||||||
|
"WebStudioCanvasPlacement": "web-studio-canvas-placement",
|
||||||
|
"WebStudioPlaceable": "web-studio-placeable",
|
||||||
|
"WebStudioCanvasFactory": "./quixos-instance/interfaces/web-studio-canvas-factory",
|
||||||
|
"ApplicationEntry": "./quixos-instance/interfaces/application-entry",
|
||||||
|
"AgentContextSubject": "./quixos-instance/interfaces/agent-context-subject",
|
||||||
|
"EventStream": "./quixos-instance/interfaces/event-stream",
|
||||||
|
"AgentWorkspace": "./quixos-instance/interfaces/agent-workspace",
|
||||||
|
"AgentDirectory": "./quixos-instance/interfaces/agent-directory",
|
||||||
|
"Agent": "./quixos-instance/interfaces/agent",
|
||||||
|
"AgentThread": "./quixos-instance/interfaces/agent-thread",
|
||||||
|
"AgentRequest": "./quixos-instance/interfaces/agent-request",
|
||||||
|
"AgentItem": "./quixos-instance/interfaces/agent-item",
|
||||||
|
"AgentQuestion": "./quixos-instance/interfaces/agent-question",
|
||||||
|
"EventHandler": "./quixos-instance/interfaces/event-handler",
|
||||||
|
"EventSubscription": "./quixos-instance/interfaces/event-subscription",
|
||||||
|
"PresentationStateValues": "./quixos-instance/interfaces/presentation-state-values",
|
||||||
|
"PresentationStates": "./quixos-instance/interfaces/presentation-states",
|
||||||
|
"PresentationStateRecord": "./quixos-instance/interfaces/presentation-state-record",
|
||||||
|
"PresentationStateFactory": "./quixos-instance/interfaces/presentation-state-factory",
|
||||||
|
"Presentation": "./quixos-instance/interfaces/presentation"
|
||||||
|
},
|
||||||
|
"packages": {
|
||||||
|
"WebStudioCanvasRuntime": "web-studio-canvas-runtime",
|
||||||
|
"WebStudioCanvasEditor": "web-studio-canvas-editor",
|
||||||
|
"WebStudioDisplayRuntime": "./quixos-instance/packages/web-studio-display-runtime",
|
||||||
|
"AgentRuntime": "./quixos-instance/packages/agent-runtime",
|
||||||
|
"AgentWorkspaceBootstrap": "./quixos-instance/packages/agent-workspace-bootstrap",
|
||||||
|
"PresentationRuntime": "./quixos-instance/packages/presentation-runtime",
|
||||||
|
"AgentPresentation": "./quixos-instance/packages/agent-presentation"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
fragment {
|
||||||
|
import interface WebStudioFactory;
|
||||||
|
import interface WebStudioCanvasFactory;
|
||||||
|
import interface WebStudioPlaceable;
|
||||||
|
import interface WebStudioCanvas;
|
||||||
|
import package WebStudioCanvasRuntime;
|
||||||
|
conform<value Input, object Result implements WebStudioPlaceable>
|
||||||
|
WebStudioFactory<Input,Result> as WebStudioCanvasFactory<Input,Result>
|
||||||
|
id "org.quixos.web-studio:factory-create-and-place" {
|
||||||
|
bind create.call to package WebStudioCanvasRuntime.createPlaced<Input,Result> with {
|
||||||
|
factory to interface WebStudioFactory<Input,Result>;
|
||||||
|
canvas to interface WebStudioCanvas from input;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
+103
@@ -0,0 +1,103 @@
|
|||||||
|
workspace Studio id "workspace:studio" revision "workspace:studio@1" commit "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" {
|
||||||
|
import "agents.qx";
|
||||||
|
import package AgentWorkspaceBootstrap;
|
||||||
|
import "studio/factory-rules.qx";
|
||||||
|
import interface WebStudioPresentable;
|
||||||
|
import interface PresentationState;
|
||||||
|
import interface PresentationMount;
|
||||||
|
import interface WebStudioDisplayTarget;
|
||||||
|
import interface WebStudioDisplayDirectory;
|
||||||
|
import package WebStudioDisplayRuntime;
|
||||||
|
|
||||||
|
import interface WebStudioSearchable;
|
||||||
|
import interface StandaloneView;
|
||||||
|
import interface WebStudioCanvasPlacement;
|
||||||
|
import package WebStudioCanvasEditor;
|
||||||
|
presentation CanvasEditor id "presentation:studio:canvas-editor" for WebStudioCanvas using WebStudioCanvasEditor.Editor;
|
||||||
|
presentation CanvasCard id "presentation:studio:canvas" for WebStudioCanvas using WebStudioCanvasRuntime.CanvasCard;
|
||||||
|
atom Canvas id "atom:org.quixos.web-studio:canvas";
|
||||||
|
atom Placement id "atom:org.quixos.web-studio:canvas-placement";
|
||||||
|
conform Canvas as WebStudioCanvas id "studio:canvas" {
|
||||||
|
private state Name id "studio:canvas:name" on Canvas : string policy register;
|
||||||
|
initialize {name to state Name;};
|
||||||
|
bind name.get to state Name.read;
|
||||||
|
bind name.set to state Name.write;
|
||||||
|
bind create.call to package WebStudioCanvasRuntime.createCanvas with {canvas to creation Canvas with {WebStudioCanvas from input;};};
|
||||||
|
bind root.call to package AgentWorkspaceBootstrap.createRoot with {canvas to creation Canvas with {WebStudioCanvas from input;};agentWorkspace to interface AgentWorkspace from input;};
|
||||||
|
bind place.call to package WebStudioCanvasRuntime.place with {
|
||||||
|
subject to interface WebStudioPlaceable from input;
|
||||||
|
placement to creation Placement with {WebStudioCanvasPlacement from input;};
|
||||||
|
};
|
||||||
|
bind createAndPlace.call to package WebStudioCanvasRuntime.createAndPlace with {
|
||||||
|
subject to interface WebStudioPlaceable from input;
|
||||||
|
canvas to creation Canvas with {WebStudioCanvas from input;};
|
||||||
|
placement to creation Placement with {WebStudioCanvasPlacement from input;};
|
||||||
|
};
|
||||||
|
bind placements.resolve to edge PlacementCanvas.placements.resolve;
|
||||||
|
}
|
||||||
|
conform Canvas as WebStudioPlaceable id "studio:canvas:placeable" {
|
||||||
|
bind canPresent.call to package WebStudioCanvasRuntime.canPresent<atom Canvas> with {catalog to workspace reflection [presentations];};
|
||||||
|
bind placements.resolve to edge PlacementSubject.placements.resolve;
|
||||||
|
}
|
||||||
|
conform Placement as WebStudioCanvasPlacement id "studio:placement" {
|
||||||
|
private state Position id "studio:placement:position" on Placement : record {x:double;y:double;} policy register;
|
||||||
|
private state Size id "studio:placement:size" on Placement : record {width:double;height:double;} policy register;
|
||||||
|
private state Z id "studio:placement:z" on Placement : int32 policy register;
|
||||||
|
private state Presentation id "studio:placement:presentation" on Placement : string policy register;
|
||||||
|
private edge PlacementCanvas id "studio:placement:canvas" {
|
||||||
|
atom Placement projection canvas id "studio:placement:canvas:parent" exactly-one on-delete "detach" public-traversal;
|
||||||
|
interface WebStudioCanvas projection placements id "studio:canvas:placements" many-unique on-delete "cascade-other" public-traversal;
|
||||||
|
}
|
||||||
|
private edge PlacementSubject id "studio:placement:subject" {
|
||||||
|
atom Placement projection subject id "studio:placement:subject:target" exactly-one on-delete "detach" public-traversal;
|
||||||
|
interface WebStudioPlaceable projection placements id "studio:subject:placements" many-unique on-delete "cascade-other" public-traversal;
|
||||||
|
}
|
||||||
|
initialize {position to state Position;size to state Size;z to state Z;presentation to state Presentation;canvas to edge PlacementCanvas.canvas;subject to edge PlacementSubject.subject;};
|
||||||
|
bind position.get to state Position.read;
|
||||||
|
bind position.set to state Position.write;
|
||||||
|
bind size.get to state Size.read;
|
||||||
|
bind size.set to state Size.write;
|
||||||
|
bind z.get to state Z.read;
|
||||||
|
bind z.set to state Z.write;
|
||||||
|
bind presentation.get to state Presentation.read;
|
||||||
|
bind remove.call to lifecycle.delete;
|
||||||
|
bind canvas.resolve to edge PlacementCanvas.canvas.resolve;
|
||||||
|
bind subject.resolve to edge PlacementSubject.subject.resolve;
|
||||||
|
}
|
||||||
|
|
||||||
|
conform Canvas as StandaloneView<interface WebStudioCanvas> id "studio:canvas:view" { bind render to WebStudioCanvasEditor.Editor; }
|
||||||
|
|
||||||
|
conform Canvas as WebStudioSearchable id "studio:search:Canvas" {
|
||||||
|
bind title.get to interface WebStudioCanvas.name.get;
|
||||||
|
private state SearchText id "studio:canvas:search-text" on Canvas : string policy register default "canvas workspace";
|
||||||
|
bind searchText.get to state SearchText.read;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
atom DisplayTarget id "atom:org.quixos.web-studio:display-target";
|
||||||
|
conform DisplayTarget as WebStudioDisplayTarget id "studio:display-target" {
|
||||||
|
private state DisplayData id "studio:display:data" on DisplayTarget : record {label:string;generation:uint32;presentation:optional<string>;observed:optional<record {generation:uint32;sequence:uint32;status:string;error:string;}>;} policy register;
|
||||||
|
private state DisplayNonce id "studio:display:nonce" on DisplayTarget : string policy register;
|
||||||
|
private edge DisplaySubject id "studio:display:subject" {
|
||||||
|
atom DisplayTarget projection subject id "studio:display:subject:target" optional-one on-delete "detach" public-traversal;
|
||||||
|
interface WebStudioPresentable projection displays id "studio:presentable:displays" many-unique on-delete "detach" public-traversal;
|
||||||
|
}
|
||||||
|
initialize {initial to state DisplayData;nonce to state DisplayNonce;};
|
||||||
|
bind status.get to state DisplayData.read;
|
||||||
|
bind nonce.get to state DisplayNonce.read;
|
||||||
|
bind subject.resolve to edge DisplaySubject.subject.resolve;
|
||||||
|
private edge DisplayPresentationMount id "studio:display:presentation-mount" {atom DisplayTarget projection presentationMount id "studio:display:presentation-mount:target" optional-one on-delete "detach"; interface PresentationMount projection displays id "studio:display:presentation-mount:displays" many on-delete "detach";}
|
||||||
|
bind presentationMount.resolve to edge DisplayPresentationMount.presentationMount.resolve;
|
||||||
|
bind assign.call to package WebStudioDisplayRuntime.assign with {data to state DisplayData;selected to edge DisplaySubject.subject;subject to interface WebStudioPresentable from input;mount to edge DisplayPresentationMount.presentationMount;};
|
||||||
|
bind acknowledge.call to package WebStudioDisplayRuntime.acknowledge with {data to state DisplayData;};
|
||||||
|
}
|
||||||
|
conform Canvas as WebStudioDisplayDirectory id "studio:display-directory:Canvas" {
|
||||||
|
private edge CanvasDisplayDirectory id "studio:display:directory:Canvas" {
|
||||||
|
atom Canvas projection targets id "studio:directory:targets:Canvas" many-unique on-delete "cascade-other" public-traversal;
|
||||||
|
interface WebStudioDisplayTarget projection directory id "studio:display:directory:parent:Canvas" optional-one on-delete "detach" public-traversal;
|
||||||
|
}
|
||||||
|
bind targets.resolve to edge CanvasDisplayDirectory.targets.resolve;
|
||||||
|
bind enroll.call to package WebStudioDisplayRuntime.enroll with {enrolled to edge CanvasDisplayDirectory.targets;existing to interface WebStudioDisplayTarget from input;target to creation DisplayTarget with {WebStudioDisplayTarget from input;};};
|
||||||
|
}
|
||||||
|
conform Canvas as WebStudioPresentable id "studio:presentable:Canvas" {bind canPresent.call to interface WebStudioPlaceable.canPresent.call;}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user