@khorsheed/dsh-room 0.1.0
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/CHANGELOG.md +9 -0
- package/README.i18n.yaml +6 -0
- package/README.md +48 -0
- package/README.zh.md +48 -0
- package/cordis.patch.yml +6 -0
- package/lib/client.js +11481 -0
- package/lib/index.js +3231 -0
- package/lib/invariant.js +26 -0
- package/lib/journal-CuRnWk66.js +435 -0
- package/lib/tool.js +350 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +2615 -0
- package/lib/typert.remote-client.d.ts +55 -0
- package/lib/typert.remote-client.js +1711 -0
- package/lib/types/adapter.d.ts +42 -0
- package/lib/types/adapter.js +41 -0
- package/lib/types/agent-setup.d.ts +141 -0
- package/lib/types/agent-setup.js +145 -0
- package/lib/types/client/InviteAgentAction.d.ts +13 -0
- package/lib/types/client/InviteAgentAction.js +45 -0
- package/lib/types/client/InviteDialog.d.ts +90 -0
- package/lib/types/client/InviteDialog.js +216 -0
- package/lib/types/client/MemberCard.d.ts +33 -0
- package/lib/types/client/MemberCard.js +32 -0
- package/lib/types/client/MembersView.d.ts +5 -0
- package/lib/types/client/MembersView.js +168 -0
- package/lib/types/client/RoomComposer.d.ts +21 -0
- package/lib/types/client/RoomComposer.js +211 -0
- package/lib/types/client/RoomDockCapsules.d.ts +64 -0
- package/lib/types/client/RoomDockCapsules.js +277 -0
- package/lib/types/client/RoomEventView.d.ts +11 -0
- package/lib/types/client/RoomEventView.js +17 -0
- package/lib/types/client/RoomModelPicker.d.ts +18 -0
- package/lib/types/client/RoomModelPicker.js +134 -0
- package/lib/types/client/RoomPlanView.d.ts +17 -0
- package/lib/types/client/RoomPlanView.js +88 -0
- package/lib/types/client/RoomQueueStrip.d.ts +26 -0
- package/lib/types/client/RoomQueueStrip.js +28 -0
- package/lib/types/client/RoomRecoveryView.d.ts +11 -0
- package/lib/types/client/RoomRecoveryView.js +38 -0
- package/lib/types/client/RoomRelayView.d.ts +12 -0
- package/lib/types/client/RoomRelayView.js +20 -0
- package/lib/types/client/RoomRunView.d.ts +15 -0
- package/lib/types/client/RoomRunView.js +50 -0
- package/lib/types/client/RoomSpeechView.d.ts +18 -0
- package/lib/types/client/RoomSpeechView.js +62 -0
- package/lib/types/client/RoomStatsLine.d.ts +61 -0
- package/lib/types/client/RoomStatsLine.js +138 -0
- package/lib/types/client/RoomTaskLineView.d.ts +13 -0
- package/lib/types/client/RoomTaskLineView.js +21 -0
- package/lib/types/client/RoomTodoStrip.d.ts +24 -0
- package/lib/types/client/RoomTodoStrip.js +64 -0
- package/lib/types/client/format.d.ts +31 -0
- package/lib/types/client/format.js +48 -0
- package/lib/types/client/icons.d.ts +27 -0
- package/lib/types/client/icons.js +11 -0
- package/lib/types/client/index.d.ts +39 -0
- package/lib/types/client/index.js +471 -0
- package/lib/types/client/locales.d.ts +422 -0
- package/lib/types/client/locales.js +413 -0
- package/lib/types/client/member-color.d.ts +13 -0
- package/lib/types/client/member-color.js +22 -0
- package/lib/types/client/name-pool.d.ts +17 -0
- package/lib/types/client/name-pool.js +25 -0
- package/lib/types/client/nodes.d.ts +136 -0
- package/lib/types/client/nodes.js +212 -0
- package/lib/types/client/preset-visibility.d.ts +91 -0
- package/lib/types/client/preset-visibility.js +113 -0
- package/lib/types/client/request-ids.d.ts +7 -0
- package/lib/types/client/request-ids.js +21 -0
- package/lib/types/client/room-store.d.ts +137 -0
- package/lib/types/client/room-store.js +244 -0
- package/lib/types/client/slots.d.ts +319 -0
- package/lib/types/client/slots.js +1 -0
- package/lib/types/deliveries.d.ts +5 -0
- package/lib/types/deliveries.js +20 -0
- package/lib/types/dispatch.d.ts +105 -0
- package/lib/types/dispatch.js +467 -0
- package/lib/types/index.d.ts +301 -0
- package/lib/types/index.js +1200 -0
- package/lib/types/invariant.d.ts +16 -0
- package/lib/types/invariant.js +24 -0
- package/lib/types/journal.d.ts +117 -0
- package/lib/types/journal.js +434 -0
- package/lib/types/plan-service.d.ts +34 -0
- package/lib/types/plan-service.js +266 -0
- package/lib/types/plan.d.ts +168 -0
- package/lib/types/plan.js +494 -0
- package/lib/types/tool.d.ts +56 -0
- package/lib/types/tool.js +389 -0
- package/lib/types/types.d.ts +813 -0
- package/lib/types/types.js +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +131 -0
|
@@ -0,0 +1,813 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire vocabulary shared by the room Host Remote and its browser callers,
|
|
3
|
+
* plus the `room/*` custom session-event vocabulary (merged onto the official
|
|
4
|
+
* SessionEventMap — the schedule package's `schedule/change` is the in-tree
|
|
5
|
+
* precedent). Types only: the generated Remote codecs import this module
|
|
6
|
+
* type-side, and the client bundle never inlines host runtime code.
|
|
7
|
+
* @module @khorsheed/dsh-room/types
|
|
8
|
+
*/
|
|
9
|
+
import type { RoomPlan } from './plan.ts';
|
|
10
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
11
|
+
/**
|
|
12
|
+
* A JSON-safe value (mirrors the host's JsonValue shape without importing the
|
|
13
|
+
* dsh-session MAIN entry — that entry's Context merge is host-side and must
|
|
14
|
+
* not leak into the client type program). Relay provenance crosses the Remote
|
|
15
|
+
* boundary, so it must be constrained JSON.
|
|
16
|
+
*/
|
|
17
|
+
export type RoomJsonValue = null | boolean | number | string | RoomJsonValue[] | {
|
|
18
|
+
[key: string]: RoomJsonValue;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Room identity marker payload. Appended once at room creation; replaying the
|
|
22
|
+
* session's event log recovers room identity, so no session-header change is
|
|
23
|
+
* needed. `version` gates future payload evolution.
|
|
24
|
+
*/
|
|
25
|
+
export interface RoomCreatedEvent {
|
|
26
|
+
readonly version: 1;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A member joined the roster. `name` is both the addressing name and the
|
|
30
|
+
* display name: unique within the room, free of whitespace and `@` (composer
|
|
31
|
+
* @-addressing must stay parseable), and decoupled from the provider so two
|
|
32
|
+
* instances of one provider can coexist (`ada (kimi-cli)`).
|
|
33
|
+
*/
|
|
34
|
+
export interface RoomMemberAddedEvent {
|
|
35
|
+
/** Stable identity; older journals derive it from their original join event. */
|
|
36
|
+
readonly id?: string;
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly kind: 'main-agent' | 'cli';
|
|
39
|
+
/** CLI provider id; present exactly on `kind: 'cli'` members. */
|
|
40
|
+
readonly provider?: string;
|
|
41
|
+
/** Role instructions, prepended to the member's first dispatch. */
|
|
42
|
+
readonly instructions?: string;
|
|
43
|
+
readonly invitedBy: 'human' | 'agent';
|
|
44
|
+
/**
|
|
45
|
+
* The member's own working directory (empty = inherits the room session's
|
|
46
|
+
* cwd). Roster-only for now: the local-agent facade's per-call cwd override
|
|
47
|
+
* (family need R2) has not landed, so the adapter does NOT pass it down yet.
|
|
48
|
+
*/
|
|
49
|
+
readonly cwd?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The delegation's model (invite-time only, local-agent harness providers):
|
|
52
|
+
* recorded on the roster and passed to the facade as the `start` call's
|
|
53
|
+
* `model` option on the member's first dispatch — providers bind it at
|
|
54
|
+
* spawn for both exec and live rounds. Blank/omitted = follow the harness
|
|
55
|
+
* default.
|
|
56
|
+
*/
|
|
57
|
+
readonly model?: string;
|
|
58
|
+
/** The CLI member's dsh child session, once delegation has started. */
|
|
59
|
+
readonly childSessionId?: SessionId;
|
|
60
|
+
}
|
|
61
|
+
/** A roster member's editable fields changed. */
|
|
62
|
+
export interface RoomMemberUpdatedEvent {
|
|
63
|
+
/**
|
|
64
|
+
* The member this update addresses, by its CURRENT name (a rename carries
|
|
65
|
+
* the new name in `rename`; keeping `name` as the addressing key keeps
|
|
66
|
+
* every pre-rename journal replayable).
|
|
67
|
+
*/
|
|
68
|
+
readonly name: string;
|
|
69
|
+
/** Rename: the member's new @-addressing name (validated at write: unique, no whitespace, no "@"). */
|
|
70
|
+
readonly rename?: string;
|
|
71
|
+
/** New role instructions; null CLEARS them (later dispatches inject none). */
|
|
72
|
+
readonly instructions?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* New member-level cwd (roster-recorded; the delegation facade's per-call
|
|
75
|
+
* override is the family's open R2). null CLEARS the override — the member
|
|
76
|
+
* inherits the room session's cwd again.
|
|
77
|
+
*/
|
|
78
|
+
readonly cwd?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* The member's intended model, edited through the members tab's edit dialog.
|
|
81
|
+
* Roster-recorded intent: consumed as the facade `start` call's `model`
|
|
82
|
+
* option while the member was never dispatched (the live member's immediate
|
|
83
|
+
* switch rides the localAgentGateway `setMemberModel` — the client calls
|
|
84
|
+
* both). null CLEARS it — the member follows the harness default again.
|
|
85
|
+
*/
|
|
86
|
+
readonly model?: string | null;
|
|
87
|
+
/**
|
|
88
|
+
* The CLI member's delegation handle, journaled when the member's first
|
|
89
|
+
* run starts (invite predates the handle; the dispatch engine appends this
|
|
90
|
+
* update so a reload reattaches the member to its child session).
|
|
91
|
+
*/
|
|
92
|
+
readonly childSessionId?: SessionId;
|
|
93
|
+
}
|
|
94
|
+
/** A member left the roster. */
|
|
95
|
+
export interface RoomMemberRemovedEvent {
|
|
96
|
+
readonly name: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A human @-message: the dispatch record. Pure bookkeeping — the task
|
|
100
|
+
* auto-open, the engine's instruction cursors, and replay. It drives NO chat
|
|
101
|
+
* node: the human's words land as a standard `user/message` event (appended
|
|
102
|
+
* alongside, see RoomService.postMessage) and render as the official user
|
|
103
|
+
* bubble. It never feeds any prompt either — a member's prompt is role
|
|
104
|
+
* instructions + roster + notifications + the dispatch text, never a running
|
|
105
|
+
* log.
|
|
106
|
+
*/
|
|
107
|
+
export interface RoomDispatchEvent {
|
|
108
|
+
/** Goal work/report correlation, absent for ordinary chat. */
|
|
109
|
+
readonly plan?: {
|
|
110
|
+
readonly goalId: string;
|
|
111
|
+
readonly taskId?: string;
|
|
112
|
+
readonly attemptId?: string;
|
|
113
|
+
};
|
|
114
|
+
/** Fingerprint of the original human request, independent of later roster/role changes. */
|
|
115
|
+
readonly requestSignature?: string;
|
|
116
|
+
/** Caller retry identity, persisted before accepting input. */
|
|
117
|
+
readonly id?: string;
|
|
118
|
+
readonly targetIds?: readonly string[];
|
|
119
|
+
readonly origin?: 'human' | 'coordinator' | 'report' | 'relay';
|
|
120
|
+
readonly replyTo?: string;
|
|
121
|
+
/** Completion report deduplication key (one source delivery). */
|
|
122
|
+
readonly reportFor?: string;
|
|
123
|
+
readonly targets: readonly string[];
|
|
124
|
+
readonly text: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A member's final reply, mirrored into the room journal for UI projection
|
|
128
|
+
* and replay. Never re-injected into any prompt: the member's own CLI
|
|
129
|
+
* session (resume chain) holds its working memory.
|
|
130
|
+
*/
|
|
131
|
+
export interface RoomSpeechEvent {
|
|
132
|
+
/** Partial output from a stopped or failed run; never a completed answer. */
|
|
133
|
+
readonly interrupted?: 'cancelled' | 'failed';
|
|
134
|
+
readonly member: string;
|
|
135
|
+
readonly text: string;
|
|
136
|
+
readonly childSessionId?: SessionId;
|
|
137
|
+
/** Native admission→settle milliseconds, excluding queue time. */
|
|
138
|
+
readonly durationMs?: number;
|
|
139
|
+
}
|
|
140
|
+
/** A member run's lifecycle edge. */
|
|
141
|
+
export interface RoomRunStateEvent {
|
|
142
|
+
/** Stable execution identity; legacy journals use startedAt. */
|
|
143
|
+
readonly runId?: string;
|
|
144
|
+
readonly member: string;
|
|
145
|
+
readonly state: 'running' | 'done' | 'cancelled' | 'failed';
|
|
146
|
+
readonly startedAt: number;
|
|
147
|
+
readonly elapsedMs?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Why the run failed (terminal `failed` edges only): the engine's caught
|
|
150
|
+
* fault message, surfaced by the client's dim failure row. Optional so old
|
|
151
|
+
* journal events replay fine.
|
|
152
|
+
*/
|
|
153
|
+
readonly error?: string;
|
|
154
|
+
}
|
|
155
|
+
/** A relay's lifecycle states (see the design note's notification channel). */
|
|
156
|
+
export type RoomRelayState = 'pending' | 'confirmed' | 'dismissed' | 'sent';
|
|
157
|
+
/**
|
|
158
|
+
* A member-to-member notification arrived at the room gate (journaled as
|
|
159
|
+
* pending): the family bridge's `receiveMemberMessage` call, or the fallback
|
|
160
|
+
* parse of a reply's trailing `@name <content>` own line. `provenance` is
|
|
161
|
+
* the origin record (the bridge passes the sender's delegation record; the
|
|
162
|
+
* fallback records the speech it was parsed from).
|
|
163
|
+
*/
|
|
164
|
+
export interface RoomRelayEvent {
|
|
165
|
+
readonly id: string;
|
|
166
|
+
readonly from: string;
|
|
167
|
+
readonly to: string;
|
|
168
|
+
readonly content: string;
|
|
169
|
+
readonly provenance?: Record<string, RoomJsonValue>;
|
|
170
|
+
}
|
|
171
|
+
/** A relay left the pending state (confirmed, dismissed, or delivered). */
|
|
172
|
+
export interface RoomRelayResolvedEvent {
|
|
173
|
+
readonly id: string;
|
|
174
|
+
readonly state: 'confirmed' | 'dismissed' | 'sent';
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Task-board task statuses. `failed` is terminal-from-the-engine (the run
|
|
178
|
+
* settle writes it) but stays human-actionable: the board keeps the row
|
|
179
|
+
* visible until the human dismisses it (closeTask → cancelled) or
|
|
180
|
+
* re-dispatches.
|
|
181
|
+
*/
|
|
182
|
+
export type RoomTaskStatus = 'pending' | 'in_progress' | 'done' | 'cancelled' | 'failed';
|
|
183
|
+
/**
|
|
184
|
+
* The room's goal was set (or cleared: an empty text). Log-only; the journal
|
|
185
|
+
* fold keeps the LATEST goal event's text as the current goal (empty/absent =
|
|
186
|
+
* unset). The goal rides the roster section of every member prompt, and the
|
|
187
|
+
* dock's goal capsule renders it with the task progress.
|
|
188
|
+
*/
|
|
189
|
+
export interface RoomGoalEvent {
|
|
190
|
+
readonly text: string;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* A task entered the board: an @-dispatch opens it `in_progress` (title is
|
|
194
|
+
* the dispatch text, truncated), a human addTask opens it `pending`.
|
|
195
|
+
* `blockedBy` names the MEMBER the task waits on — pure display ("等 ada"):
|
|
196
|
+
* the row renders grey until that member has no open task left. It never
|
|
197
|
+
* triggers any automatic dispatch.
|
|
198
|
+
*/
|
|
199
|
+
export interface RoomTaskAddedEvent {
|
|
200
|
+
/** Only this delivery may automatically settle this legacy chat task row. */
|
|
201
|
+
readonly deliveryId?: string;
|
|
202
|
+
readonly id: string;
|
|
203
|
+
readonly member: string;
|
|
204
|
+
readonly title: string;
|
|
205
|
+
readonly status: 'pending' | 'in_progress';
|
|
206
|
+
readonly blockedBy?: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* A task changed status (a run settle closes the auto-opened task to the
|
|
210
|
+
* run's own terminal state — done/cancelled/failed; the human manages the
|
|
211
|
+
* rest).
|
|
212
|
+
*/
|
|
213
|
+
export interface RoomTaskUpdatedEvent {
|
|
214
|
+
readonly id: string;
|
|
215
|
+
readonly status: 'in_progress' | 'done' | 'cancelled' | 'failed';
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* A task's editable fields changed (the `room_task` tool's `update` action):
|
|
219
|
+
* a title rename and/or a `blockedBy` re-target (`null` clears the wait).
|
|
220
|
+
* Status changes stay on `room/task-updated`; closed tasks take no edits.
|
|
221
|
+
*/
|
|
222
|
+
export interface RoomTaskEditedEvent {
|
|
223
|
+
readonly id: string;
|
|
224
|
+
readonly title?: string;
|
|
225
|
+
/** New blocking member; explicit null clears the wait. */
|
|
226
|
+
readonly blockedBy?: string | null;
|
|
227
|
+
}
|
|
228
|
+
declare module '@deepseek-ai/dsh-session/types' {
|
|
229
|
+
interface SessionEventMap {
|
|
230
|
+
/**
|
|
231
|
+
* Room identity marker: the session carrying this log-only event is a
|
|
232
|
+
* room. Log-only (no surface intent), so it never reaches the model.
|
|
233
|
+
*/
|
|
234
|
+
'room/created': RoomCreatedEvent;
|
|
235
|
+
/** Roster mutation: a member joined. */
|
|
236
|
+
'room/member-added': RoomMemberAddedEvent;
|
|
237
|
+
/** Roster mutation: a member's editable fields changed. */
|
|
238
|
+
'room/member-updated': RoomMemberUpdatedEvent;
|
|
239
|
+
/** Roster mutation: a member left. */
|
|
240
|
+
'room/member-removed': RoomMemberRemovedEvent;
|
|
241
|
+
/** Dispatch record: a human @-message (bookkeeping: task auto-open, dispatch cursors). */
|
|
242
|
+
'room/dispatch': RoomDispatchEvent;
|
|
243
|
+
/** Member speech mirror (UI projection; never re-injected into prompts). */
|
|
244
|
+
'room/speech': RoomSpeechEvent;
|
|
245
|
+
/** Member run lifecycle. */
|
|
246
|
+
'room/run-state': RoomRunStateEvent;
|
|
247
|
+
/** Notification gate: a member-to-member relay arrived (pending). */
|
|
248
|
+
'room/relay': RoomRelayEvent;
|
|
249
|
+
/** Notification gate: a relay was confirmed, dismissed, or delivered. */
|
|
250
|
+
'room/relay-resolved': RoomRelayResolvedEvent;
|
|
251
|
+
/** Task board: a task was added. */
|
|
252
|
+
'room/task-added': RoomTaskAddedEvent;
|
|
253
|
+
/** Task board: a task changed status. */
|
|
254
|
+
'room/task-updated': RoomTaskUpdatedEvent;
|
|
255
|
+
/** Task board: a task's title/blockedBy was edited (the room_task tool's update). */
|
|
256
|
+
'room/task-edited': RoomTaskEditedEvent;
|
|
257
|
+
/** Goal: the room's goal was set (or cleared). */
|
|
258
|
+
'room/goal': RoomGoalEvent;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/** One roster member, as folded by the journal replay. */
|
|
262
|
+
export interface RoomMember {
|
|
263
|
+
readonly id?: string;
|
|
264
|
+
readonly name: string;
|
|
265
|
+
readonly kind: 'main-agent' | 'cli';
|
|
266
|
+
readonly provider?: string;
|
|
267
|
+
readonly instructions?: string;
|
|
268
|
+
readonly invitedBy: 'human' | 'agent';
|
|
269
|
+
/** Member-level working directory (roster record; not yet passed to the facade). */
|
|
270
|
+
readonly cwd?: string;
|
|
271
|
+
/** The member's intended model (roster record; the facade start's `model` option on the first dispatch). */
|
|
272
|
+
readonly model?: string;
|
|
273
|
+
readonly childSessionId?: SessionId;
|
|
274
|
+
}
|
|
275
|
+
/** One notification relay, as folded by the journal replay. */
|
|
276
|
+
export interface RoomRelay {
|
|
277
|
+
readonly id: string;
|
|
278
|
+
readonly from: string;
|
|
279
|
+
readonly to: string;
|
|
280
|
+
readonly content: string;
|
|
281
|
+
readonly provenance?: Record<string, RoomJsonValue>;
|
|
282
|
+
readonly state: RoomRelayState;
|
|
283
|
+
}
|
|
284
|
+
/** One task-board task, as folded by the journal replay. */
|
|
285
|
+
export interface RoomTask {
|
|
286
|
+
/** Only this delivery may automatically settle this legacy chat task row. */
|
|
287
|
+
readonly deliveryId?: string;
|
|
288
|
+
readonly id: string;
|
|
289
|
+
readonly member: string;
|
|
290
|
+
readonly title: string;
|
|
291
|
+
readonly status: RoomTaskStatus;
|
|
292
|
+
/** The member this task waits on (display only; never dispatches anything). */
|
|
293
|
+
readonly blockedBy?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Epoch ms of the task's latest journal event (add or status update): the
|
|
296
|
+
* goal card's "latest advance" ordering and the row's relative time.
|
|
297
|
+
*/
|
|
298
|
+
readonly updatedAt: number;
|
|
299
|
+
}
|
|
300
|
+
/** A member's current run state, as folded by the journal replay. */
|
|
301
|
+
export interface RoomMemberRun {
|
|
302
|
+
/** Stable execution identity; legacy journals use startedAt. */
|
|
303
|
+
readonly runId?: string;
|
|
304
|
+
readonly member: string;
|
|
305
|
+
readonly state: 'running' | 'done' | 'cancelled' | 'failed';
|
|
306
|
+
readonly startedAt: number;
|
|
307
|
+
readonly elapsedMs?: number;
|
|
308
|
+
/** Why the run failed (failed edges only), when the edge carried one. */
|
|
309
|
+
readonly error?: string;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* The replayed room state: roster, notification relays, the task board, run
|
|
313
|
+
* states, and the current goal. There is deliberately NO blackboard/log
|
|
314
|
+
* projection here — members never consume the room's running log (see the
|
|
315
|
+
* design note).
|
|
316
|
+
*/
|
|
317
|
+
export interface RoomState {
|
|
318
|
+
readonly plan?: Omit<RoomPlan, 'requests'>;
|
|
319
|
+
readonly deliveries?: readonly RoomDelivery[];
|
|
320
|
+
readonly coordinator?: RoomCoordinatorEvent;
|
|
321
|
+
readonly members: readonly RoomMember[];
|
|
322
|
+
readonly relays: readonly RoomRelay[];
|
|
323
|
+
readonly tasks: readonly RoomTask[];
|
|
324
|
+
readonly runs: readonly RoomMemberRun[];
|
|
325
|
+
/** The current goal text (the latest `room/goal` event), undefined when unset. */
|
|
326
|
+
readonly goal?: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* The goal progress pair: done tasks over the COUNTABLE total — cancelled
|
|
330
|
+
* and failed tasks leave the denominator (a cancelled task was never part of
|
|
331
|
+
* the plan; a failed one never advanced it).
|
|
332
|
+
*/
|
|
333
|
+
export interface RoomTaskProgress {
|
|
334
|
+
readonly done: number;
|
|
335
|
+
readonly total: number;
|
|
336
|
+
}
|
|
337
|
+
/** Closed failure vocabulary of the room Remote surface. */
|
|
338
|
+
export type RoomFailure = {
|
|
339
|
+
readonly code: 'request-conflict';
|
|
340
|
+
} | {
|
|
341
|
+
readonly code: 'member-cwd-bound';
|
|
342
|
+
} | {
|
|
343
|
+
readonly code: 'not-coordinator';
|
|
344
|
+
} | {
|
|
345
|
+
readonly code: 'delivery-not-uncertain';
|
|
346
|
+
} | {
|
|
347
|
+
readonly code: 'plan-reconciliation-required';
|
|
348
|
+
} | {
|
|
349
|
+
readonly code: 'coordinator-busy';
|
|
350
|
+
} | {
|
|
351
|
+
readonly code: 'coordinator-not-ready';
|
|
352
|
+
readonly message: string;
|
|
353
|
+
} | {
|
|
354
|
+
readonly code: 'coordinator-conflict';
|
|
355
|
+
} | {
|
|
356
|
+
readonly code: 'active-coordinator';
|
|
357
|
+
} | {
|
|
358
|
+
readonly code: 'configuration-owned-by-core';
|
|
359
|
+
} | {
|
|
360
|
+
readonly code: 'session-not-found';
|
|
361
|
+
} | {
|
|
362
|
+
readonly code: 'not-a-room';
|
|
363
|
+
} | {
|
|
364
|
+
readonly code: 'invalid-name';
|
|
365
|
+
} | {
|
|
366
|
+
readonly code: 'duplicate-name';
|
|
367
|
+
} | {
|
|
368
|
+
readonly code: 'empty-provider';
|
|
369
|
+
} | {
|
|
370
|
+
readonly code: 'member-not-found';
|
|
371
|
+
} | {
|
|
372
|
+
readonly code: 'empty-text';
|
|
373
|
+
} | {
|
|
374
|
+
readonly code: 'nothing-to-update';
|
|
375
|
+
} | {
|
|
376
|
+
readonly code: 'local-agent-unavailable';
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* The provider is not any harness's delegation provider (the classic slip:
|
|
380
|
+
* the harness name `kimi` instead of the delegation provider `kimi-cli`).
|
|
381
|
+
* Carries the legal set so the caller (the room_invite tool's model caller,
|
|
382
|
+
* the dialog) can self-correct.
|
|
383
|
+
*/
|
|
384
|
+
| {
|
|
385
|
+
readonly code: 'unknown-provider';
|
|
386
|
+
readonly provider: string;
|
|
387
|
+
readonly available: readonly string[];
|
|
388
|
+
} | {
|
|
389
|
+
readonly code: 'unknown-targets';
|
|
390
|
+
readonly names: readonly string[];
|
|
391
|
+
}
|
|
392
|
+
/** postMessage without any leading @-mention (bare messages belong to the official submit path). */
|
|
393
|
+
| {
|
|
394
|
+
readonly code: 'no-targets';
|
|
395
|
+
} | {
|
|
396
|
+
readonly code: 'relay-not-found';
|
|
397
|
+
}
|
|
398
|
+
/** The relay exists but already left the pending state. */
|
|
399
|
+
| {
|
|
400
|
+
readonly code: 'relay-not-pending';
|
|
401
|
+
}
|
|
402
|
+
/** The main agent is the room itself: it cannot be renamed. */
|
|
403
|
+
| {
|
|
404
|
+
readonly code: 'main-member';
|
|
405
|
+
} | {
|
|
406
|
+
readonly code: 'task-not-found';
|
|
407
|
+
}
|
|
408
|
+
/** The task exists but is already closed (done/cancelled). */
|
|
409
|
+
| {
|
|
410
|
+
readonly code: 'task-closed';
|
|
411
|
+
}
|
|
412
|
+
/** A cold room's agent resume failed (persistence or preset composition). */
|
|
413
|
+
| {
|
|
414
|
+
readonly code: 'resume-failed';
|
|
415
|
+
readonly message: string;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* The family bridge's gate entry, verbatim-frozen contract
|
|
419
|
+
* (`proposals/closed/2026-08-19-local-agent-member-channel.md`): the bridge
|
|
420
|
+
* probes `ctx.get('room')` and duck-type-calls this method. Phase 1's gate is
|
|
421
|
+
* always human confirmation, so the receipt is always 'pending-confirm';
|
|
422
|
+
* 'sent'/'busy' belong to the phase-2 auto gate.
|
|
423
|
+
*/
|
|
424
|
+
export interface RoomMemberMessage {
|
|
425
|
+
readonly from: string;
|
|
426
|
+
readonly to: string;
|
|
427
|
+
readonly content: string;
|
|
428
|
+
readonly parentSessionId: SessionId;
|
|
429
|
+
readonly provenance?: Record<string, RoomJsonValue>;
|
|
430
|
+
}
|
|
431
|
+
/** The gate receipt handed back to the sending member through the bridge. */
|
|
432
|
+
export type RoomMemberMessageReceipt = 'sent' | 'pending-confirm' | 'busy';
|
|
433
|
+
/** isRoom probe: does this session carry the room marker? */
|
|
434
|
+
export interface RoomIsRoomRequest {
|
|
435
|
+
/** Session to probe. */
|
|
436
|
+
readonly sessionId: SessionId;
|
|
437
|
+
}
|
|
438
|
+
/** getState request. */
|
|
439
|
+
export interface RoomGetStateRequest {
|
|
440
|
+
/** Room session to replay. */
|
|
441
|
+
readonly sessionId: SessionId;
|
|
442
|
+
}
|
|
443
|
+
/** getState outcome: the replayed state or a rejection. */
|
|
444
|
+
export type RoomGetStateResult = {
|
|
445
|
+
readonly ok: true;
|
|
446
|
+
readonly value: RoomState;
|
|
447
|
+
} | {
|
|
448
|
+
readonly ok: false;
|
|
449
|
+
readonly error: RoomFailure;
|
|
450
|
+
};
|
|
451
|
+
/** invite request: add a CLI member to the roster. */
|
|
452
|
+
export interface RoomInviteRequest {
|
|
453
|
+
/** Room session. */
|
|
454
|
+
readonly sessionId: SessionId;
|
|
455
|
+
/** CLI provider id (non-blank). */
|
|
456
|
+
readonly provider: string;
|
|
457
|
+
/** Addressing/display name: unique in the room, no whitespace, no `@`. */
|
|
458
|
+
readonly name: string;
|
|
459
|
+
/** Role instructions, prepended to the member's first dispatch. */
|
|
460
|
+
readonly instructions?: string;
|
|
461
|
+
/**
|
|
462
|
+
* Member-level working directory (empty/omitted = inherits the room
|
|
463
|
+
* session's cwd). Recorded on the roster; not yet passed to the delegation
|
|
464
|
+
* facade (family need R2 pending).
|
|
465
|
+
*/
|
|
466
|
+
readonly cwd?: string;
|
|
467
|
+
/** Optional first task, dispatched to the member as soon as it joins. */
|
|
468
|
+
readonly firstTask?: string;
|
|
469
|
+
/**
|
|
470
|
+
* The delegation's model (blank/omitted = follow the harness default).
|
|
471
|
+
* Applies to local-agent harness providers only: it lands as the facade
|
|
472
|
+
* `start` call's `model` option, bound at spawn for exec and live alike.
|
|
473
|
+
*/
|
|
474
|
+
readonly model?: string;
|
|
475
|
+
}
|
|
476
|
+
/** invite receipt. */
|
|
477
|
+
export interface RoomInvitation {
|
|
478
|
+
/** The accepted member name. */
|
|
479
|
+
readonly name: string;
|
|
480
|
+
/** True when a first task was supplied and dispatched with the invitation. */
|
|
481
|
+
readonly pendingFirstTask: boolean;
|
|
482
|
+
}
|
|
483
|
+
/** invite outcome. */
|
|
484
|
+
export type RoomInviteResult = {
|
|
485
|
+
readonly ok: true;
|
|
486
|
+
readonly value: RoomInvitation;
|
|
487
|
+
} | {
|
|
488
|
+
readonly ok: false;
|
|
489
|
+
readonly error: RoomFailure;
|
|
490
|
+
};
|
|
491
|
+
/** updateMember request: edit a member's name, role instructions, cwd, or model. */
|
|
492
|
+
export interface RoomUpdateMemberRequest {
|
|
493
|
+
/** Room session. */
|
|
494
|
+
readonly sessionId: SessionId;
|
|
495
|
+
/** Member to update (its CURRENT name). */
|
|
496
|
+
readonly name: string;
|
|
497
|
+
/** Rename: the new @-addressing name (unique, no whitespace, no "@"). */
|
|
498
|
+
readonly rename?: string;
|
|
499
|
+
/** New role instructions; null (or a blank string) CLEARS them. */
|
|
500
|
+
readonly instructions?: string | null;
|
|
501
|
+
/** New member-level cwd; null (or a blank string) CLEARS the override back to inheriting the room cwd. */
|
|
502
|
+
readonly cwd?: string | null;
|
|
503
|
+
/**
|
|
504
|
+
* New intended model (roster-recorded; the first dispatch binds it as the
|
|
505
|
+
* facade start's `model` option); null (or a blank string) CLEARS it back
|
|
506
|
+
* to following the harness default.
|
|
507
|
+
*/
|
|
508
|
+
readonly model?: string | null;
|
|
509
|
+
}
|
|
510
|
+
/** updateMember outcome. */
|
|
511
|
+
export type RoomUpdateMemberResult = {
|
|
512
|
+
readonly ok: true;
|
|
513
|
+
readonly value: {
|
|
514
|
+
readonly name: string;
|
|
515
|
+
};
|
|
516
|
+
} | {
|
|
517
|
+
readonly ok: false;
|
|
518
|
+
readonly error: RoomFailure;
|
|
519
|
+
};
|
|
520
|
+
/** removeMember request. */
|
|
521
|
+
export interface RoomRemoveMemberRequest {
|
|
522
|
+
/** Room session. */
|
|
523
|
+
readonly sessionId: SessionId;
|
|
524
|
+
/** Member to remove. */
|
|
525
|
+
readonly name: string;
|
|
526
|
+
}
|
|
527
|
+
/** removeMember outcome. */
|
|
528
|
+
export type RoomRemoveMemberResult = {
|
|
529
|
+
readonly ok: true;
|
|
530
|
+
readonly value: {
|
|
531
|
+
readonly name: string;
|
|
532
|
+
};
|
|
533
|
+
} | {
|
|
534
|
+
readonly ok: false;
|
|
535
|
+
readonly error: RoomFailure;
|
|
536
|
+
};
|
|
537
|
+
/** postMessage request: a human @-message into the room. */
|
|
538
|
+
export interface RoomPostMessageRequest {
|
|
539
|
+
readonly requestId?: string;
|
|
540
|
+
/** Room session. */
|
|
541
|
+
readonly sessionId: SessionId;
|
|
542
|
+
/** Raw composer text: leading `@name` tokens address members. */
|
|
543
|
+
readonly text: string;
|
|
544
|
+
/**
|
|
545
|
+
* Menu-picked addressees (the room composer's mention menu records a pick
|
|
546
|
+
* as explicit addressing even when the `@name` sits mid-sentence). Unioned
|
|
547
|
+
* with the parsed leading tokens and validated against the roster the same
|
|
548
|
+
* way; the text itself is dispatched verbatim either way.
|
|
549
|
+
*/
|
|
550
|
+
readonly targets?: readonly string[];
|
|
551
|
+
}
|
|
552
|
+
/** What the postMessage parser made of the raw text. */
|
|
553
|
+
export interface RoomPostParsed {
|
|
554
|
+
/** Addressed members (never empty — a bare message is a `no-targets` rejection). */
|
|
555
|
+
readonly targets: readonly string[];
|
|
556
|
+
/** The message body with the leading @-tokens stripped. */
|
|
557
|
+
readonly text: string;
|
|
558
|
+
}
|
|
559
|
+
/** postMessage receipt. */
|
|
560
|
+
export interface RoomPostReceipt {
|
|
561
|
+
readonly parsed: RoomPostParsed;
|
|
562
|
+
/** Seq of the appended journal event. */
|
|
563
|
+
readonly seq: number;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* messageMember request (host-only — the `room_message` tool's path; NOT a
|
|
567
|
+
* Remote): dispatch one message to one member. Identical dispatch semantics
|
|
568
|
+
* to a human's `@member text` minus the user/message bubble (the caller is
|
|
569
|
+
* the main agent, not the human).
|
|
570
|
+
*/
|
|
571
|
+
export interface RoomMessageRequest {
|
|
572
|
+
/** Room session. */
|
|
573
|
+
readonly sessionId: SessionId;
|
|
574
|
+
/** The addressee's roster name. */
|
|
575
|
+
readonly member: string;
|
|
576
|
+
/** The message text. */
|
|
577
|
+
readonly text: string;
|
|
578
|
+
}
|
|
579
|
+
/** messageMember outcome. */
|
|
580
|
+
export type RoomMessageResult = {
|
|
581
|
+
readonly ok: true;
|
|
582
|
+
readonly value: {
|
|
583
|
+
readonly member: string;
|
|
584
|
+
};
|
|
585
|
+
} | {
|
|
586
|
+
readonly ok: false;
|
|
587
|
+
readonly error: RoomFailure;
|
|
588
|
+
};
|
|
589
|
+
/** postMessage outcome. */
|
|
590
|
+
export type RoomPostMessageResult = {
|
|
591
|
+
readonly ok: true;
|
|
592
|
+
readonly value: RoomPostReceipt;
|
|
593
|
+
} | {
|
|
594
|
+
readonly ok: false;
|
|
595
|
+
readonly error: RoomFailure;
|
|
596
|
+
};
|
|
597
|
+
/** cancel request: interrupt a member's in-flight run. */
|
|
598
|
+
export interface RoomCancelRequest {
|
|
599
|
+
/** Room session. */
|
|
600
|
+
readonly sessionId: SessionId;
|
|
601
|
+
/** Member whose run should be cancelled. */
|
|
602
|
+
readonly name: string;
|
|
603
|
+
}
|
|
604
|
+
/** cancel receipt. */
|
|
605
|
+
export interface RoomCancellation {
|
|
606
|
+
/** True when an in-flight run was found and cancelled. */
|
|
607
|
+
readonly cancelled: boolean;
|
|
608
|
+
}
|
|
609
|
+
/** cancel outcome. */
|
|
610
|
+
export type RoomCancelResult = {
|
|
611
|
+
readonly ok: true;
|
|
612
|
+
readonly value: RoomCancellation;
|
|
613
|
+
} | {
|
|
614
|
+
readonly ok: false;
|
|
615
|
+
readonly error: RoomFailure;
|
|
616
|
+
};
|
|
617
|
+
/** confirmRelay/dismissRelay request: resolve a pending notification relay. */
|
|
618
|
+
export interface RoomRelayResolveRequest {
|
|
619
|
+
/** Room session. */
|
|
620
|
+
readonly sessionId: SessionId;
|
|
621
|
+
/** The relay to resolve. */
|
|
622
|
+
readonly relayId: string;
|
|
623
|
+
}
|
|
624
|
+
/** confirmRelay/dismissRelay outcome. */
|
|
625
|
+
export type RoomRelayResolveResult = {
|
|
626
|
+
readonly ok: true;
|
|
627
|
+
readonly value: {
|
|
628
|
+
readonly relayId: string;
|
|
629
|
+
};
|
|
630
|
+
} | {
|
|
631
|
+
readonly ok: false;
|
|
632
|
+
readonly error: RoomFailure;
|
|
633
|
+
};
|
|
634
|
+
/** addTask request: a human-added task on a member's board lane. */
|
|
635
|
+
export interface RoomAddTaskRequest {
|
|
636
|
+
/** Room session. */
|
|
637
|
+
readonly sessionId: SessionId;
|
|
638
|
+
/** The member owning the task. */
|
|
639
|
+
readonly member: string;
|
|
640
|
+
/** Task title (non-blank). */
|
|
641
|
+
readonly title: string;
|
|
642
|
+
/**
|
|
643
|
+
* Optional member this task waits on ("等 ada" — display only, never an
|
|
644
|
+
* automatic dispatch). Must name a roster member when present.
|
|
645
|
+
*/
|
|
646
|
+
readonly blockedBy?: string;
|
|
647
|
+
}
|
|
648
|
+
/** addTask outcome. */
|
|
649
|
+
export type RoomAddTaskResult = {
|
|
650
|
+
readonly ok: true;
|
|
651
|
+
readonly value: {
|
|
652
|
+
readonly id: string;
|
|
653
|
+
};
|
|
654
|
+
} | {
|
|
655
|
+
readonly ok: false;
|
|
656
|
+
readonly error: RoomFailure;
|
|
657
|
+
};
|
|
658
|
+
/** closeTask request: close an open task. */
|
|
659
|
+
export interface RoomCloseTaskRequest {
|
|
660
|
+
/** Room session. */
|
|
661
|
+
readonly sessionId: SessionId;
|
|
662
|
+
/** The task to close. */
|
|
663
|
+
readonly taskId: string;
|
|
664
|
+
/** Closing status (default 'done'). */
|
|
665
|
+
readonly status?: 'done' | 'cancelled';
|
|
666
|
+
}
|
|
667
|
+
/** closeTask outcome. */
|
|
668
|
+
export type RoomCloseTaskResult = {
|
|
669
|
+
readonly ok: true;
|
|
670
|
+
readonly value: {
|
|
671
|
+
readonly id: string;
|
|
672
|
+
};
|
|
673
|
+
} | {
|
|
674
|
+
readonly ok: false;
|
|
675
|
+
readonly error: RoomFailure;
|
|
676
|
+
};
|
|
677
|
+
/**
|
|
678
|
+
* updateTask request: edit an open task's title and/or blockedBy (the
|
|
679
|
+
* `room_task` tool's update action — host method only, not on the Remote
|
|
680
|
+
* surface; the capsule UI edits nothing but the goal).
|
|
681
|
+
*/
|
|
682
|
+
export interface RoomUpdateTaskRequest {
|
|
683
|
+
/** Room session. */
|
|
684
|
+
readonly sessionId: SessionId;
|
|
685
|
+
/** The task to edit. */
|
|
686
|
+
readonly taskId: string;
|
|
687
|
+
/** New title (non-blank when present). */
|
|
688
|
+
readonly title?: string;
|
|
689
|
+
/** New blocking member (must be on the roster); explicit null clears the wait. */
|
|
690
|
+
readonly blockedBy?: string | null;
|
|
691
|
+
}
|
|
692
|
+
/** updateTask outcome. */
|
|
693
|
+
export type RoomUpdateTaskResult = {
|
|
694
|
+
readonly ok: true;
|
|
695
|
+
readonly value: {
|
|
696
|
+
readonly id: string;
|
|
697
|
+
};
|
|
698
|
+
} | {
|
|
699
|
+
readonly ok: false;
|
|
700
|
+
readonly error: RoomFailure;
|
|
701
|
+
};
|
|
702
|
+
/** setGoal request: set (or, with a blank text, clear) the room's goal. */
|
|
703
|
+
export interface RoomSetGoalRequest {
|
|
704
|
+
/** Room session. */
|
|
705
|
+
readonly sessionId: SessionId;
|
|
706
|
+
/** Goal text; blank clears the goal. */
|
|
707
|
+
readonly text: string;
|
|
708
|
+
}
|
|
709
|
+
/** setGoal outcome. */
|
|
710
|
+
export type RoomSetGoalResult = {
|
|
711
|
+
readonly ok: true;
|
|
712
|
+
readonly value: {
|
|
713
|
+
readonly goal?: string;
|
|
714
|
+
};
|
|
715
|
+
} | {
|
|
716
|
+
readonly ok: false;
|
|
717
|
+
readonly error: RoomFailure;
|
|
718
|
+
};
|
|
719
|
+
/** listProviders request (no parameters). */
|
|
720
|
+
export interface RoomListProvidersRequest {
|
|
721
|
+
}
|
|
722
|
+
/** One invitable CLI provider. */
|
|
723
|
+
export interface RoomProviderInfo {
|
|
724
|
+
/** The provider id invite/dispatch uses (the harness's delegationProvider). */
|
|
725
|
+
readonly provider: string;
|
|
726
|
+
readonly displayName: string;
|
|
727
|
+
/**
|
|
728
|
+
* The roster harness name — the lookup key for the localAgentGateway
|
|
729
|
+
* `harnessModel` read (the invite dialog's model picker). Absent only on
|
|
730
|
+
* a pre-model-broker family core; the dialog then serves a plain text input.
|
|
731
|
+
*/
|
|
732
|
+
readonly harness?: string;
|
|
733
|
+
/** Whether the harness's scoped home holds usable credentials. */
|
|
734
|
+
readonly authenticated: boolean;
|
|
735
|
+
}
|
|
736
|
+
/** listProviders result: the facade verdict plus the roster. */
|
|
737
|
+
export interface RoomProviderList {
|
|
738
|
+
/** False when the local-agent delegation facade is absent (CLI members undispatchable). */
|
|
739
|
+
readonly localAgentAvailable: boolean;
|
|
740
|
+
readonly providers: readonly RoomProviderInfo[];
|
|
741
|
+
}
|
|
742
|
+
/** Durable role change. Handoff is bounded context, never native history migration. */
|
|
743
|
+
export interface RoomCoordinatorEvent {
|
|
744
|
+
readonly version: 1;
|
|
745
|
+
readonly memberId: string;
|
|
746
|
+
readonly revision: number;
|
|
747
|
+
readonly previousMemberId: string;
|
|
748
|
+
readonly handoff: string;
|
|
749
|
+
}
|
|
750
|
+
export interface RoomSetCoordinatorRequest {
|
|
751
|
+
readonly sessionId: SessionId;
|
|
752
|
+
readonly memberId: string;
|
|
753
|
+
readonly expectedRevision: number;
|
|
754
|
+
}
|
|
755
|
+
export type RoomSetCoordinatorResult = {
|
|
756
|
+
readonly ok: true;
|
|
757
|
+
readonly value: RoomCoordinatorEvent;
|
|
758
|
+
} | {
|
|
759
|
+
readonly ok: false;
|
|
760
|
+
readonly error: RoomFailure;
|
|
761
|
+
};
|
|
762
|
+
/** A dispatch target's durable lifecycle. An uncertain crashed run is never replayed. */
|
|
763
|
+
export interface RoomDeliveryStateEvent {
|
|
764
|
+
readonly id: string;
|
|
765
|
+
readonly dispatchSeq: number;
|
|
766
|
+
readonly memberId: string;
|
|
767
|
+
readonly state: 'running' | 'done' | 'cancelled' | 'failed' | 'uncertain';
|
|
768
|
+
readonly text?: string;
|
|
769
|
+
readonly error?: string;
|
|
770
|
+
}
|
|
771
|
+
declare module '@deepseek-ai/dsh-session/types' {
|
|
772
|
+
interface SessionEventMap {
|
|
773
|
+
'room/plan-state': RoomPlan;
|
|
774
|
+
'room/coordinator': RoomCoordinatorEvent;
|
|
775
|
+
'room/delivery-state': RoomDeliveryStateEvent;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
export interface RoomDelivery {
|
|
779
|
+
readonly id: string;
|
|
780
|
+
readonly dispatchSeq: number;
|
|
781
|
+
readonly memberId: string;
|
|
782
|
+
readonly status: 'queued' | RoomDeliveryStateEvent['state'];
|
|
783
|
+
readonly origin: NonNullable<RoomDispatchEvent['origin']>;
|
|
784
|
+
readonly text: string;
|
|
785
|
+
readonly error?: string;
|
|
786
|
+
readonly plan?: RoomDispatchEvent['plan'];
|
|
787
|
+
}
|
|
788
|
+
export interface RoomReconcileDeliveryRequest {
|
|
789
|
+
readonly sessionId: SessionId;
|
|
790
|
+
readonly deliveryId: string;
|
|
791
|
+
readonly outcome: 'done' | 'cancelled';
|
|
792
|
+
readonly evidence: string;
|
|
793
|
+
}
|
|
794
|
+
export type RoomReconcileDeliveryResult = {
|
|
795
|
+
readonly ok: true;
|
|
796
|
+
} | {
|
|
797
|
+
readonly ok: false;
|
|
798
|
+
readonly error: RoomFailure;
|
|
799
|
+
};
|
|
800
|
+
export interface RoomPrepareMemberRequest {
|
|
801
|
+
readonly sessionId: SessionId;
|
|
802
|
+
readonly name: string;
|
|
803
|
+
}
|
|
804
|
+
export type RoomPrepareMemberResult = {
|
|
805
|
+
readonly ok: true;
|
|
806
|
+
readonly value: {
|
|
807
|
+
readonly childSessionId: string;
|
|
808
|
+
};
|
|
809
|
+
} | {
|
|
810
|
+
readonly ok: false;
|
|
811
|
+
readonly error: RoomFailure;
|
|
812
|
+
};
|
|
813
|
+
//# sourceMappingURL=types.d.ts.map
|