@hivemagnus/ardent-studio 0.0.0-stage → 0.1.1
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.
- package/LICENSE +202 -0
- package/NOTICE +12 -0
- package/README.md +133 -2
- package/dist/agents/config-edit.d.ts +20 -0
- package/dist/agents/config-edit.js +75 -0
- package/dist/agents/directory.d.ts +27 -0
- package/dist/agents/directory.js +97 -0
- package/dist/agents/operations.d.ts +47 -0
- package/dist/agents/operations.js +93 -0
- package/dist/auth/links.d.ts +27 -0
- package/dist/auth/links.js +46 -0
- package/dist/auth/oathweave.d.ts +46 -0
- package/dist/auth/oathweave.js +123 -0
- package/dist/blobs/store.d.ts +45 -0
- package/dist/blobs/store.js +159 -0
- package/dist/clients/chattermost.d.ts +16 -0
- package/dist/clients/chattermost.js +36 -0
- package/dist/clients/hivemem.d.ts +85 -0
- package/dist/clients/hivemem.js +89 -0
- package/dist/clients/magnus.d.ts +417 -0
- package/dist/clients/magnus.js +343 -0
- package/dist/clients/service-token.d.ts +24 -0
- package/dist/clients/service-token.js +87 -0
- package/dist/clients/sse.d.ts +8 -0
- package/dist/clients/sse.js +42 -0
- package/dist/conductor/activity.d.ts +38 -0
- package/dist/conductor/activity.js +101 -0
- package/dist/conductor/addressing.d.ts +24 -0
- package/dist/conductor/addressing.js +42 -0
- package/dist/conductor/conductor.d.ts +225 -0
- package/dist/conductor/conductor.js +939 -0
- package/dist/conductor/follower.d.ts +48 -0
- package/dist/conductor/follower.js +154 -0
- package/dist/conductor/live.d.ts +23 -0
- package/dist/conductor/live.js +32 -0
- package/dist/conductor/prompting.d.ts +74 -0
- package/dist/conductor/prompting.js +177 -0
- package/dist/config.d.ts +52 -0
- package/dist/config.js +163 -0
- package/dist/db/database.d.ts +12 -0
- package/dist/db/database.js +62 -0
- package/dist/db/json.d.ts +8 -0
- package/dist/db/json.js +13 -0
- package/dist/db/migrations.d.ts +6 -0
- package/dist/db/migrations.js +571 -0
- package/dist/db/repos/agents.d.ts +86 -0
- package/dist/db/repos/agents.js +92 -0
- package/dist/db/repos/audit.d.ts +37 -0
- package/dist/db/repos/audit.js +20 -0
- package/dist/db/repos/events.d.ts +29 -0
- package/dist/db/repos/events.js +55 -0
- package/dist/db/repos/files.d.ts +41 -0
- package/dist/db/repos/files.js +72 -0
- package/dist/db/repos/idempotency.d.ts +27 -0
- package/dist/db/repos/idempotency.js +46 -0
- package/dist/db/repos/links.d.ts +47 -0
- package/dist/db/repos/links.js +99 -0
- package/dist/db/repos/projects.d.ts +44 -0
- package/dist/db/repos/projects.js +107 -0
- package/dist/db/repos/proposals.d.ts +46 -0
- package/dist/db/repos/proposals.js +65 -0
- package/dist/db/repos/review.d.ts +191 -0
- package/dist/db/repos/review.js +195 -0
- package/dist/db/repos/room.d.ts +163 -0
- package/dist/db/repos/room.js +151 -0
- package/dist/db/repos/sessions.d.ts +36 -0
- package/dist/db/repos/sessions.js +30 -0
- package/dist/db/repos/summaries.d.ts +22 -0
- package/dist/db/repos/summaries.js +105 -0
- package/dist/db/repos/tasks.d.ts +103 -0
- package/dist/db/repos/tasks.js +112 -0
- package/dist/db/repos/team.d.ts +49 -0
- package/dist/db/repos/team.js +95 -0
- package/dist/db/repos/templates.d.ts +55 -0
- package/dist/db/repos/templates.js +120 -0
- package/dist/db/store.d.ts +57 -0
- package/dist/db/store.js +108 -0
- package/dist/events/bus.d.ts +21 -0
- package/dist/events/bus.js +31 -0
- package/dist/events/types.d.ts +3 -0
- package/dist/events/types.js +1 -0
- package/dist/ids.d.ts +28 -0
- package/dist/ids.js +81 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +17 -0
- package/dist/knowledge/extract.d.ts +17 -0
- package/dist/knowledge/extract.js +82 -0
- package/dist/knowledge/sync.d.ts +40 -0
- package/dist/knowledge/sync.js +172 -0
- package/dist/logger.d.ts +5 -0
- package/dist/logger.js +11 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +42 -0
- package/dist/review/anchors.d.ts +16 -0
- package/dist/review/anchors.js +67 -0
- package/dist/review/context.d.ts +4 -0
- package/dist/review/context.js +29 -0
- package/dist/review/docx.d.ts +29 -0
- package/dist/review/docx.js +21 -0
- package/dist/review/export.d.ts +16 -0
- package/dist/review/export.js +84 -0
- package/dist/review/importer.d.ts +68 -0
- package/dist/review/importer.js +215 -0
- package/dist/review/index.d.ts +13 -0
- package/dist/review/index.js +7 -0
- package/dist/server/app.d.ts +5 -0
- package/dist/server/app.js +44 -0
- package/dist/server/deps.d.ts +43 -0
- package/dist/server/deps.js +17 -0
- package/dist/server/env.d.ts +6 -0
- package/dist/server/env.js +1 -0
- package/dist/server/errors.d.ts +12 -0
- package/dist/server/errors.js +25 -0
- package/dist/server/routes/agent-studio.d.ts +5 -0
- package/dist/server/routes/agent-studio.js +441 -0
- package/dist/server/routes/agents.d.ts +3 -0
- package/dist/server/routes/agents.js +4 -0
- package/dist/server/routes/files.d.ts +3 -0
- package/dist/server/routes/files.js +88 -0
- package/dist/server/routes/health.d.ts +3 -0
- package/dist/server/routes/health.js +31 -0
- package/dist/server/routes/links.d.ts +3 -0
- package/dist/server/routes/links.js +79 -0
- package/dist/server/routes/projects.d.ts +3 -0
- package/dist/server/routes/projects.js +119 -0
- package/dist/server/routes/review.d.ts +3 -0
- package/dist/server/routes/review.js +198 -0
- package/dist/server/routes/room.d.ts +9 -0
- package/dist/server/routes/room.js +224 -0
- package/dist/server/routes/stream.d.ts +4 -0
- package/dist/server/routes/stream.js +104 -0
- package/dist/server/routes/team.d.ts +3 -0
- package/dist/server/routes/team.js +183 -0
- package/dist/server/routes/templates.d.ts +11 -0
- package/dist/server/routes/templates.js +103 -0
- package/dist/server/routes/work.d.ts +3 -0
- package/dist/server/routes/work.js +139 -0
- package/dist/server/routing.d.ts +31 -0
- package/dist/server/routing.js +132 -0
- package/dist/service.d.ts +34 -0
- package/dist/service.js +93 -0
- package/dist/shared/browser.d.ts +5824 -0
- package/dist/shared/browser.js +1318 -0
- package/dist/team/proposals.d.ts +129 -0
- package/dist/team/proposals.js +349 -0
- package/dist/team/service.d.ts +12 -0
- package/dist/team/service.js +13 -0
- package/dist/team/validation.d.ts +37 -0
- package/dist/team/validation.js +157 -0
- package/dist/templates/secrets.d.ts +2 -0
- package/dist/templates/secrets.js +23 -0
- package/dist/templates/seeds.d.ts +34 -0
- package/dist/templates/seeds.js +277 -0
- package/dist/url.d.ts +2 -0
- package/dist/url.js +7 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +11 -0
- package/docs/openapi-browser.json +12658 -0
- package/package.json +95 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Conversation } from '../db/repos/room.js';
|
|
2
|
+
import type { TeamRole } from './prompting.js';
|
|
3
|
+
export type Recipient = {
|
|
4
|
+
kind: 'team';
|
|
5
|
+
} | {
|
|
6
|
+
kind: 'coordinator';
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'roles';
|
|
9
|
+
roles: string[];
|
|
10
|
+
};
|
|
11
|
+
/** Role keys @mentioned in a message, in order of first mention. Unknown keys are ignored. */
|
|
12
|
+
export declare function mentionedRoles(body: string, roles: readonly Pick<TeamRole, 'key'>[]): string[];
|
|
13
|
+
export type Addressing = {
|
|
14
|
+
roles: TeamRole[];
|
|
15
|
+
} | {
|
|
16
|
+
error: string;
|
|
17
|
+
details: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
export declare function addressees(input: {
|
|
20
|
+
conversation: Pick<Conversation, 'kind' | 'role_key'>;
|
|
21
|
+
to: Recipient;
|
|
22
|
+
body: string;
|
|
23
|
+
roles: readonly TeamRole[];
|
|
24
|
+
}): Addressing;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const MENTION = /(^|[\s(,;])@([a-z][a-z0-9_-]{0,47})(?![a-z0-9_-])/g;
|
|
2
|
+
/** Role keys @mentioned in a message, in order of first mention. Unknown keys are ignored. */
|
|
3
|
+
export function mentionedRoles(body, roles) {
|
|
4
|
+
const known = new Set(roles.map(role => role.key));
|
|
5
|
+
const found = [];
|
|
6
|
+
for (const match of body.matchAll(MENTION)) {
|
|
7
|
+
const key = match[2];
|
|
8
|
+
if (known.has(key) && !found.includes(key))
|
|
9
|
+
found.push(key);
|
|
10
|
+
}
|
|
11
|
+
return found;
|
|
12
|
+
}
|
|
13
|
+
export function addressees(input) {
|
|
14
|
+
const { conversation, roles } = input;
|
|
15
|
+
if (conversation.kind === 'discussion')
|
|
16
|
+
return { roles: [] };
|
|
17
|
+
let keys;
|
|
18
|
+
if (conversation.kind === 'direct') {
|
|
19
|
+
keys = conversation.role_key ? [conversation.role_key] : [];
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const mentions = mentionedRoles(input.body, roles);
|
|
23
|
+
if (input.to.kind === 'roles')
|
|
24
|
+
keys = [...new Set([...input.to.roles, ...mentions])];
|
|
25
|
+
else if (mentions.length)
|
|
26
|
+
keys = mentions;
|
|
27
|
+
else {
|
|
28
|
+
const coordinator = roles.find(role => role.coordinator);
|
|
29
|
+
if (!coordinator)
|
|
30
|
+
return { error: 'The team has no coordinator', details: {} };
|
|
31
|
+
keys = [coordinator.key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const unknown = keys.filter(key => !roles.some(role => role.key === key));
|
|
35
|
+
if (unknown.length)
|
|
36
|
+
return { error: 'The message names roles that are not in the published team', details: { roles: unknown } };
|
|
37
|
+
const chosen = keys.map(key => roles.find(role => role.key === key));
|
|
38
|
+
const unbound = chosen.filter(role => !role.agent_ref).map(role => role.key);
|
|
39
|
+
if (unbound.length)
|
|
40
|
+
return { error: 'These roles have no bound agent', details: { roles: unbound } };
|
|
41
|
+
return { roles: chosen };
|
|
42
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { type AgentDirectory } from '../agents/directory.js';
|
|
2
|
+
import { type ArdentContextItem, type ArdentTaskEvent, type ArdentTeamMission, type MagnusClient } from '../clients/magnus.js';
|
|
3
|
+
import type { BlobStore } from '../blobs/store.js';
|
|
4
|
+
import { type Project } from '../db/repos/projects.js';
|
|
5
|
+
import type { Conversation, Message } from '../db/repos/room.js';
|
|
6
|
+
import { type StudioTask, type TaskMode, type TaskState } from '../db/repos/tasks.js';
|
|
7
|
+
import type { TeamRevision } from '../db/repos/team.js';
|
|
8
|
+
import type { Store } from '../db/store.js';
|
|
9
|
+
import type { Logger } from '../logger.js';
|
|
10
|
+
import { TaskFollower, type DoneRecord, type FollowerOptions } from './follower.js';
|
|
11
|
+
import type { LiveText } from './live.js';
|
|
12
|
+
import { type TeamRole } from './prompting.js';
|
|
13
|
+
export type ConductorMagnus = Pick<MagnusClient, 'getInstallation' | 'openSession' | 'submitTask' | 'submitMission' | 'streamTask' | 'taskEvents' | 'task' | 'cancelTask' | 'pauseTask' | 'resumeTask'>;
|
|
14
|
+
export interface ConductorOptions {
|
|
15
|
+
store: Store;
|
|
16
|
+
blobs: BlobStore;
|
|
17
|
+
magnus: ConductorMagnus;
|
|
18
|
+
agents: Pick<AgentDirectory, 'profiles'>;
|
|
19
|
+
live: LiveText;
|
|
20
|
+
logger: Logger;
|
|
21
|
+
/** Presence probe interval. Default 30 s. */
|
|
22
|
+
presenceMs?: number;
|
|
23
|
+
/** How long an agent shows Delivering after a verified deliverable revision. Default 20 s. */
|
|
24
|
+
deliveringMs?: number;
|
|
25
|
+
/** First retry delay for a submission Magnus could not take. Doubles per attempt. Default 1 s. */
|
|
26
|
+
submitRetryMs?: number;
|
|
27
|
+
maxSubmitAttempts?: number;
|
|
28
|
+
capabilityCacheMs?: number;
|
|
29
|
+
follower?: FollowerOptions;
|
|
30
|
+
}
|
|
31
|
+
/** Hooks later features attach to journal events (the artifact importer). Called inside the event's transaction. */
|
|
32
|
+
export type JournalHook = (task: StudioTask, event: ArdentTaskEvent) => void;
|
|
33
|
+
/** Extra context for a task's turn (review comments for a revision task). */
|
|
34
|
+
export type ContextProvider = (task: StudioTask) => Array<{
|
|
35
|
+
title: string;
|
|
36
|
+
text: string;
|
|
37
|
+
mime?: string;
|
|
38
|
+
}>;
|
|
39
|
+
/** What a mode handler sends: a mission objective and context items, or one prompt for task-submit. */
|
|
40
|
+
export interface ModeRequest {
|
|
41
|
+
objective: string;
|
|
42
|
+
contextItems: ArdentContextItem[];
|
|
43
|
+
prompt: string;
|
|
44
|
+
mission: ArdentTeamMission;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A task mode that does not speak in the room (a team proposal). The handler names the agent and
|
|
48
|
+
* composes the request; the conductor submits and follows it like any task, then hands the final
|
|
49
|
+
* reply to the handler instead of writing a room message.
|
|
50
|
+
*/
|
|
51
|
+
export interface TaskModeHandler {
|
|
52
|
+
/** The agent to ask, or why the task cannot start. */
|
|
53
|
+
agent(task: StudioTask): {
|
|
54
|
+
agentRef: string;
|
|
55
|
+
} | {
|
|
56
|
+
error: string;
|
|
57
|
+
};
|
|
58
|
+
compose(task: StudioTask, input: {
|
|
59
|
+
project: Project;
|
|
60
|
+
dispatch: 'mission' | 'turn';
|
|
61
|
+
now: Date;
|
|
62
|
+
}): ModeRequest;
|
|
63
|
+
/** The task's final state and reply. Called inside the transaction that records it. */
|
|
64
|
+
finished(task: StudioTask, outcome: {
|
|
65
|
+
state: TaskState;
|
|
66
|
+
reply: string | null;
|
|
67
|
+
error: string | null;
|
|
68
|
+
}): void;
|
|
69
|
+
}
|
|
70
|
+
export declare class ConductorError extends Error {
|
|
71
|
+
readonly status: 404 | 409 | 502 | 503;
|
|
72
|
+
readonly code: string;
|
|
73
|
+
name: string;
|
|
74
|
+
constructor(message: string, status: 404 | 409 | 502 | 503, code: string);
|
|
75
|
+
}
|
|
76
|
+
/** A stable UUID for a Studio task, so a retried submission is the same Ardent task. */
|
|
77
|
+
export declare function ardentIdempotencyKey(taskId: string): string;
|
|
78
|
+
export declare class Conductor {
|
|
79
|
+
private readonly options;
|
|
80
|
+
private readonly followers;
|
|
81
|
+
private readonly submitting;
|
|
82
|
+
private readonly retryAt;
|
|
83
|
+
private readonly capabilities;
|
|
84
|
+
/** Last presence probe per agent. Absent until probed. */
|
|
85
|
+
private readonly presence;
|
|
86
|
+
/** Re-derive an agent's activity when its Delivering window ends, per project and binding. */
|
|
87
|
+
private readonly deliveringTimers;
|
|
88
|
+
private readonly hooks;
|
|
89
|
+
private readonly contextProviders;
|
|
90
|
+
private readonly modes;
|
|
91
|
+
private pumping;
|
|
92
|
+
private pumpAgain;
|
|
93
|
+
private retryTimer;
|
|
94
|
+
private presenceTimer;
|
|
95
|
+
private stopped;
|
|
96
|
+
private readonly store;
|
|
97
|
+
private readonly magnus;
|
|
98
|
+
constructor(options: ConductorOptions);
|
|
99
|
+
/** Register a journal hook (for example the artifact importer). */
|
|
100
|
+
onJournalEvent(hook: JournalHook): void;
|
|
101
|
+
/** Register extra turn context (for example the review comments of a revision task). */
|
|
102
|
+
addContextProvider(provider: ContextProvider): void;
|
|
103
|
+
/** Handle tasks of this mode with the handler instead of the room (for example team proposals). */
|
|
104
|
+
registerMode(mode: TaskMode, handler: TaskModeHandler): void;
|
|
105
|
+
/** Resume following every accepted task from its stored cursor, finish discussions a restart interrupted, and start dispatching. */
|
|
106
|
+
start(): void;
|
|
107
|
+
stop(): Promise<void>;
|
|
108
|
+
/** Tasks the conductor currently follows (for tests and diagnostics). */
|
|
109
|
+
followerOf(taskId: string): TaskFollower | undefined;
|
|
110
|
+
/** Submit every task that is ready. Safe to call often: runs are serialized. */
|
|
111
|
+
kick(): void;
|
|
112
|
+
/** Resolves when no dispatch run is in progress. */
|
|
113
|
+
settled(): Promise<void>;
|
|
114
|
+
private pump;
|
|
115
|
+
private resolve;
|
|
116
|
+
/**
|
|
117
|
+
* Studio level and whether the agent runs an Ardent with missions, both from the node's one
|
|
118
|
+
* installation record (every profile on a node runs its one Ardent package). Cached briefly.
|
|
119
|
+
* A failed or stale agent list never decides this, so a mission is not silently sent as a
|
|
120
|
+
* plain task without its tools.
|
|
121
|
+
*/
|
|
122
|
+
private capability;
|
|
123
|
+
/** A room turn: the role's agent under the task's team revision, with an Ardent session when the node supports one. */
|
|
124
|
+
private planTurn;
|
|
125
|
+
/** A handled mode: one request without a session, composed by its handler. */
|
|
126
|
+
private planHandled;
|
|
127
|
+
private submit;
|
|
128
|
+
private scheduleRetry;
|
|
129
|
+
private compose;
|
|
130
|
+
/** Text attachments are read synchronously only when small; others are named, not inlined. */
|
|
131
|
+
private attachmentText;
|
|
132
|
+
/** A task that could not start: record why, in the task and in the room. */
|
|
133
|
+
private failTask;
|
|
134
|
+
private cancelLocally;
|
|
135
|
+
private follow;
|
|
136
|
+
/** Live reply text: create the streaming message on the first visible text, then relay it. */
|
|
137
|
+
private relay;
|
|
138
|
+
/** Handle one journal event and advance the cursor in the same transaction. True when it ends the turn. */
|
|
139
|
+
private journal;
|
|
140
|
+
/** An agent asked for a hand-off. Studio starts it only along a delegates_to or hands_off_to edge of the task's team revision. */
|
|
141
|
+
private handoff;
|
|
142
|
+
private clarification;
|
|
143
|
+
private proposal;
|
|
144
|
+
/** The task finished in Ardent: write the final message and the task state. Idempotent on the Ardent task id. */
|
|
145
|
+
private finish;
|
|
146
|
+
/** Exposed for routes that receive a final task record directly (cancel). */
|
|
147
|
+
complete(taskId: string, record: DoneRecord): void;
|
|
148
|
+
/** A handled mode has no clarifications: Ardent input_required ends it as partial, and the handler reads the reply. */
|
|
149
|
+
private completeHandled;
|
|
150
|
+
private afterFinish;
|
|
151
|
+
/** The project's team conversation, created on first use. Call inside a transaction. */
|
|
152
|
+
ensureTeamConversation(projectId: string, createdBy: string): Conversation;
|
|
153
|
+
/**
|
|
154
|
+
* Queue one turn per addressee in an ordering group, so each addressee sees the replies before
|
|
155
|
+
* theirs. Call inside the transaction that stored the message.
|
|
156
|
+
*/
|
|
157
|
+
queueTurns(input: {
|
|
158
|
+
project: Project;
|
|
159
|
+
revision: TeamRevision;
|
|
160
|
+
conversation: Conversation;
|
|
161
|
+
message: Message;
|
|
162
|
+
roles: readonly TeamRole[];
|
|
163
|
+
createdBy: string;
|
|
164
|
+
mode?: 'turn';
|
|
165
|
+
source?: Record<string, unknown>;
|
|
166
|
+
}): StudioTask[];
|
|
167
|
+
/** Queue one task (an assignment, follow-up or answer). Call inside a transaction. */
|
|
168
|
+
queueTask(input: Parameters<Store['tasks']['create']>[0]): StudioTask;
|
|
169
|
+
/** Queue round `round` of a discussion: one turn per participant, in order. Call inside a transaction. */
|
|
170
|
+
queueDiscussionRound(conversation: Conversation, revision: TeamRevision, round: number, createdBy: string): StudioTask[];
|
|
171
|
+
/** Move a discussion on once the current round (or its summary) has finished. */
|
|
172
|
+
advanceDiscussion(conversationId: string): void;
|
|
173
|
+
private runningDiscussions;
|
|
174
|
+
/** Stop a conversation: unstarted turns are cancelled here, started ones are cancelled through Magnus. */
|
|
175
|
+
stopConversation(conversationId: string): Promise<void>;
|
|
176
|
+
/** Cancel a task. An unstarted one is cancelled here; a started one through Magnus, and its final record follows. */
|
|
177
|
+
cancel(task: StudioTask): Promise<StudioTask>;
|
|
178
|
+
/** Pause a task at its next step boundary (studio >= 2), or hold an unstarted one. */
|
|
179
|
+
pause(task: StudioTask): Promise<StudioTask>;
|
|
180
|
+
resume(task: StudioTask): Promise<StudioTask>;
|
|
181
|
+
private magnusCall;
|
|
182
|
+
/** Probe agent status every 30 s. The probe only records reachability; activity is then derived as for any change. */
|
|
183
|
+
probe(): Promise<void>;
|
|
184
|
+
/**
|
|
185
|
+
* Derive a binding's activity from the last probe and its real records (docs/CONDUCTOR.md#activity),
|
|
186
|
+
* and announce it when it changed. Call inside a transaction, after the records changed.
|
|
187
|
+
*/
|
|
188
|
+
refreshActivity(projectId: string, bindingId: string | null): void;
|
|
189
|
+
private writeActivity;
|
|
190
|
+
private agentAuthor;
|
|
191
|
+
private roleName;
|
|
192
|
+
/** A Studio note in the room. Call inside a transaction. */
|
|
193
|
+
systemMessage(conversationId: string, text: string, links: Record<string, unknown>, replyTo?: string | null): Message;
|
|
194
|
+
messageEvent(message: Message): Record<string, unknown>;
|
|
195
|
+
taskEvent(task: StudioTask): Record<string, unknown>;
|
|
196
|
+
}
|
|
197
|
+
/** A task as the browser sees it (no mission JSON). */
|
|
198
|
+
export declare function publicTask(task: StudioTask): {
|
|
199
|
+
id: string;
|
|
200
|
+
project_id: string;
|
|
201
|
+
title: string;
|
|
202
|
+
mode: "review" | "revision" | "turn" | "assignment" | "discussion_turn" | "team_proposal";
|
|
203
|
+
role_key: string | null;
|
|
204
|
+
binding_id: string | null;
|
|
205
|
+
assignment_revision: number | null;
|
|
206
|
+
conversation_id: string | null;
|
|
207
|
+
trigger_message_id: string | null;
|
|
208
|
+
instructions_md: string;
|
|
209
|
+
source: Record<string, unknown>;
|
|
210
|
+
state: "unknown" | "failed" | "partial" | "queued" | "running" | "cancelled" | "input_required" | "pausing" | "paused" | "completed";
|
|
211
|
+
dispatch: import("../db/repos/tasks.js").TaskDispatch | null;
|
|
212
|
+
ardent: {
|
|
213
|
+
agent_ref: string | null;
|
|
214
|
+
task_id: string | null;
|
|
215
|
+
session_id: string | null;
|
|
216
|
+
};
|
|
217
|
+
outcome: {} | null;
|
|
218
|
+
reassigned_from: string | null;
|
|
219
|
+
group_id: string | null;
|
|
220
|
+
group_position: number;
|
|
221
|
+
created_by: string;
|
|
222
|
+
created_at: string;
|
|
223
|
+
updated_at: string;
|
|
224
|
+
finished_at: string | null;
|
|
225
|
+
};
|