@unieai/rabi-api-session-controller 0.0.0-stage → 0.2.2-rc.5
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 +21 -0
- package/README.md +7 -2
- package/lib/client.js +4 -0
- package/lib/index.js +4300 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +5013 -0
- package/lib/typert.remote-client.d.ts +115 -0
- package/lib/typert.remote-client.js +2714 -0
- package/lib/types/agent.d.ts +164 -0
- package/lib/types/agent.js +484 -0
- package/lib/types/archived-session-gate.d.ts +33 -0
- package/lib/types/archived-session-gate.js +54 -0
- package/lib/types/assistant-stream.d.ts +26 -0
- package/lib/types/assistant-stream.js +82 -0
- package/lib/types/catalog.d.ts +24 -0
- package/lib/types/catalog.js +107 -0
- package/lib/types/client/contract/events.d.ts +102 -0
- package/lib/types/client/contract/events.js +111 -0
- package/lib/types/client/contract/session.d.ts +178 -0
- package/lib/types/client/contract/session.js +1 -0
- package/lib/types/client/contract/sessions.d.ts +162 -0
- package/lib/types/client/contract/sessions.js +1 -0
- package/lib/types/client/contract/snapshot.d.ts +84 -0
- package/lib/types/client/contract/snapshot.js +1 -0
- package/lib/types/client/index.d.ts +39 -0
- package/lib/types/client/index.js +60 -0
- package/lib/types/client/ordered-baseline.d.ts +12 -0
- package/lib/types/client/ordered-baseline.js +40 -0
- package/lib/types/client/scope.d.ts +46 -0
- package/lib/types/client/scope.js +46 -0
- package/lib/types/client/session-wire-event.d.ts +11 -0
- package/lib/types/client/session-wire-event.js +42 -0
- package/lib/types/client/sessions/assistant-stream.d.ts +56 -0
- package/lib/types/client/sessions/assistant-stream.js +182 -0
- package/lib/types/client/sessions/history-records.d.ts +22 -0
- package/lib/types/client/sessions/history-records.js +25 -0
- package/lib/types/client/sessions/lineage.d.ts +48 -0
- package/lib/types/client/sessions/lineage.js +55 -0
- package/lib/types/client/sessions/manager.d.ts +272 -0
- package/lib/types/client/sessions/manager.js +774 -0
- package/lib/types/client/sessions/notifier.d.ts +39 -0
- package/lib/types/client/sessions/notifier.js +97 -0
- package/lib/types/client/sessions/projection-store.d.ts +128 -0
- package/lib/types/client/sessions/projection-store.js +161 -0
- package/lib/types/client/sessions/remotes.d.ts +29 -0
- package/lib/types/client/sessions/remotes.js +7 -0
- package/lib/types/client/sessions/service.d.ts +263 -0
- package/lib/types/client/sessions/service.js +597 -0
- package/lib/types/client/sessions/session.d.ts +303 -0
- package/lib/types/client/sessions/session.js +991 -0
- package/lib/types/client/time-zone.d.ts +8 -0
- package/lib/types/client/time-zone.js +13 -0
- package/lib/types/client/transport.d.ts +77 -0
- package/lib/types/client/transport.js +130 -0
- package/lib/types/commands.d.ts +92 -0
- package/lib/types/commands.js +575 -0
- package/lib/types/continuation.d.ts +35 -0
- package/lib/types/continuation.js +47 -0
- package/lib/types/control.d.ts +20 -0
- package/lib/types/control.js +106 -0
- package/lib/types/file-references.d.ts +27 -0
- package/lib/types/file-references.js +68 -0
- package/lib/types/history/assistant-stream.d.ts +43 -0
- package/lib/types/history/assistant-stream.js +79 -0
- package/lib/types/history/controller.d.ts +104 -0
- package/lib/types/history/controller.js +293 -0
- package/lib/types/history/listener.d.ts +105 -0
- package/lib/types/history/listener.js +296 -0
- package/lib/types/history.d.ts +58 -0
- package/lib/types/history.js +152 -0
- package/lib/types/index.d.ts +262 -0
- package/lib/types/index.js +693 -0
- package/lib/types/list.d.ts +62 -0
- package/lib/types/list.js +343 -0
- package/lib/types/media-references.d.ts +18 -0
- package/lib/types/media-references.js +84 -0
- package/lib/types/remote-events.d.ts +8 -0
- package/lib/types/remote-events.js +1 -0
- package/lib/types/skill-catalog.d.ts +28 -0
- package/lib/types/skill-catalog.js +203 -0
- package/lib/types/state/controller.d.ts +45 -0
- package/lib/types/state/controller.js +288 -0
- package/lib/types/state/listener.d.ts +40 -0
- package/lib/types/state/listener.js +111 -0
- package/lib/types/types.d.ts +687 -0
- package/lib/types/types.js +5 -0
- package/lib/types/web/controller.d.ts +25 -0
- package/lib/types/web/controller.js +138 -0
- package/locale/de.json +6 -0
- package/locale/en.json +5 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +119 -4
- package/src/agent.ts +474 -0
- package/src/archived-session-gate.ts +59 -0
- package/src/assistant-stream.ts +102 -0
- package/src/catalog.ts +117 -0
- package/src/client/contract/events.ts +205 -0
- package/src/client/contract/session.ts +174 -0
- package/src/client/contract/sessions.ts +169 -0
- package/src/client/contract/snapshot.ts +94 -0
- package/src/client/index.ts +149 -0
- package/src/client/ordered-baseline.ts +43 -0
- package/src/client/scope.ts +76 -0
- package/src/client/session-wire-event.ts +46 -0
- package/src/client/sessions/assistant-stream.ts +229 -0
- package/src/client/sessions/history-records.ts +35 -0
- package/src/client/sessions/lineage.ts +96 -0
- package/src/client/sessions/manager.ts +857 -0
- package/src/client/sessions/notifier.ts +97 -0
- package/src/client/sessions/projection-store.ts +244 -0
- package/src/client/sessions/remotes.ts +44 -0
- package/src/client/sessions/service.ts +741 -0
- package/src/client/sessions/session.ts +1055 -0
- package/src/client/time-zone.ts +14 -0
- package/src/client/transport.ts +247 -0
- package/src/commands.ts +602 -0
- package/src/continuation.ts +58 -0
- package/src/control.ts +121 -0
- package/src/file-references.ts +42 -0
- package/src/history/assistant-stream.ts +102 -0
- package/src/history/controller.ts +256 -0
- package/src/history/listener.ts +302 -0
- package/src/history.ts +189 -0
- package/src/index.ts +651 -0
- package/src/list.ts +382 -0
- package/src/media-references.ts +84 -0
- package/src/remote-events.ts +14 -0
- package/src/skill-catalog.ts +108 -0
- package/src/state/controller.ts +221 -0
- package/src/state/listener.ts +116 -0
- package/src/types.ts +720 -0
- package/src/web/controller.ts +78 -0
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
/** Session commands whose activation policy is explicit at each Remote method. */
|
|
2
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
3
|
+
if (value !== null && value !== void 0) {
|
|
4
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
5
|
+
var dispose, inner;
|
|
6
|
+
if (async) {
|
|
7
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
8
|
+
dispose = value[Symbol.asyncDispose];
|
|
9
|
+
}
|
|
10
|
+
if (dispose === void 0) {
|
|
11
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
12
|
+
dispose = value[Symbol.dispose];
|
|
13
|
+
if (async) inner = dispose;
|
|
14
|
+
}
|
|
15
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
16
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
17
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
18
|
+
}
|
|
19
|
+
else if (async) {
|
|
20
|
+
env.stack.push({ async: true });
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
};
|
|
24
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
25
|
+
return function (env) {
|
|
26
|
+
function fail(e) {
|
|
27
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
28
|
+
env.hasError = true;
|
|
29
|
+
}
|
|
30
|
+
var r, s = 0;
|
|
31
|
+
function next() {
|
|
32
|
+
while (r = env.stack.pop()) {
|
|
33
|
+
try {
|
|
34
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
35
|
+
if (r.dispose) {
|
|
36
|
+
var result = r.dispose.call(r.value);
|
|
37
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
38
|
+
}
|
|
39
|
+
else s |= 1;
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
fail(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
46
|
+
if (env.hasError) throw env.error;
|
|
47
|
+
}
|
|
48
|
+
return next();
|
|
49
|
+
};
|
|
50
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
51
|
+
var e = new Error(message);
|
|
52
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
53
|
+
});
|
|
54
|
+
import { continuationProjectionDefinition } from "./continuation.js";
|
|
55
|
+
import { modelAvailable } from "./catalog.js";
|
|
56
|
+
import { randomUUID } from 'node:crypto';
|
|
57
|
+
import { brandString } from '@unieai/rabi-brand';
|
|
58
|
+
import { AttachmentError } from '@unieai/rabi-attachment';
|
|
59
|
+
import { ReasoningEffortId, createUserMessage, freezeMessage, } from '@unieai/rabi-llm';
|
|
60
|
+
import { buildForkSeed } from '@unieai/rabi-session/fork';
|
|
61
|
+
import { SessionLogOffset, SessionSeq } from '@unieai/rabi-session';
|
|
62
|
+
import { SessionQueryError } from '@unieai/rabi-session-query';
|
|
63
|
+
import { SessionTitleInvalidError } from '@unieai/rabi-session-title';
|
|
64
|
+
import { assertNever } from '@unieai/rabi-util-values';
|
|
65
|
+
import { RemoteError, remoteErrorOf } from '@unieai/rabi-typert-protocol';
|
|
66
|
+
import { ApiSessionCwdConflict, ApiSessionPresetConflict, ApiSessionSubagentOwnership, apiSessionSubagentOwnershipError, hasApiSessionSubagentOwner, } from "./agent.js";
|
|
67
|
+
/**
|
|
68
|
+
* Whether prompt content carries non-whitespace text or an attachment.
|
|
69
|
+
* @param content - submitted or edited prompt parts.
|
|
70
|
+
* @returns whether any part supplies ordinary prompt content.
|
|
71
|
+
*/
|
|
72
|
+
export function hasPromptContent(content) {
|
|
73
|
+
return content.some(part => part.type !== 'text' || part.text.trim().length > 0);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Resolve the omitted-`atSeq` default to the latest completed-turn prefix,
|
|
77
|
+
* including standalone events before the next turn begins.
|
|
78
|
+
*/
|
|
79
|
+
function latestCompletedPrefixBoundary(events) {
|
|
80
|
+
const lastTurnEnd = events.findLast(event => event.type === 'turn/end');
|
|
81
|
+
if (lastTurnEnd === undefined)
|
|
82
|
+
return undefined;
|
|
83
|
+
let boundary = lastTurnEnd.seq;
|
|
84
|
+
for (const next of events.slice(boundary + 1)) {
|
|
85
|
+
if (next.type === 'turn/start' || (next.type === 'user/message' && next.surfaceOp === 'append')
|
|
86
|
+
|| next.type === 'agent/inbox/spliced')
|
|
87
|
+
break;
|
|
88
|
+
boundary = next.seq;
|
|
89
|
+
}
|
|
90
|
+
return boundary;
|
|
91
|
+
}
|
|
92
|
+
/** Implements Session business commands delegated by the Session Controller Remote service. */
|
|
93
|
+
export class SessionCommandController {
|
|
94
|
+
ctx;
|
|
95
|
+
agents;
|
|
96
|
+
defaultCwd;
|
|
97
|
+
/** First-insertion facts cached per exact Session; the log remains the recovery source. */
|
|
98
|
+
promptReceipts = new WeakMap();
|
|
99
|
+
continuation;
|
|
100
|
+
/** Register complete-history empty-prompt eligibility. @returns when command admission is ready. */
|
|
101
|
+
async initialize() {
|
|
102
|
+
this.continuation = await this.ctx.sessionProjections.register(continuationProjectionDefinition);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @param ctx - Host context carrying Agent, model, attachment, title, and Workspace services.
|
|
106
|
+
* @param agents - sole owner of create, resume, and Agent composition.
|
|
107
|
+
* @param defaultCwd - project directory used when create names neither a Workspace nor a cwd.
|
|
108
|
+
*/
|
|
109
|
+
constructor(ctx, agents, defaultCwd) {
|
|
110
|
+
this.ctx = ctx;
|
|
111
|
+
this.agents = agents;
|
|
112
|
+
this.defaultCwd = defaultCwd;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Create one ordinary Session for a new conversation, reusing the named
|
|
116
|
+
* blank Session while it is an unarchived member of the requested Workspace.
|
|
117
|
+
* @param request - optional blank Session to reuse, location, and Agent preset.
|
|
118
|
+
* @returns the created or reused Session identity and its preset when configured.
|
|
119
|
+
*/
|
|
120
|
+
async create(request) {
|
|
121
|
+
if (request.workspaceId !== undefined && request.cwd !== undefined) {
|
|
122
|
+
throw new RemoteError('gateway/bad-request', 'session.create accepts workspaceId or cwd, not both', {});
|
|
123
|
+
}
|
|
124
|
+
let workspace;
|
|
125
|
+
if (request.workspaceId !== undefined) {
|
|
126
|
+
workspace = this.ctx.workspaceRegistry.get(request.workspaceId);
|
|
127
|
+
if (workspace === undefined) {
|
|
128
|
+
throw new RemoteError('workspace/not-found', `workspace "${request.workspaceId}" not found`, {
|
|
129
|
+
workspaceId: request.workspaceId,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const cwd = workspace?.path ?? request.cwd ?? this.defaultCwd;
|
|
134
|
+
let created;
|
|
135
|
+
try {
|
|
136
|
+
created = await this.agents.createSession({
|
|
137
|
+
...(request.sessionId === undefined ? {} : { sessionId: request.sessionId }),
|
|
138
|
+
cwd,
|
|
139
|
+
...(request.agentPreset === undefined ? {} : { agentPreset: request.agentPreset }),
|
|
140
|
+
reusable: sessionId => !this.ctx.workspaceRegistry.archivedSessionIds.includes(sessionId)
|
|
141
|
+
&& (workspace === undefined || workspace.sessionIds.includes(sessionId)),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
this.rejectCreation(error);
|
|
146
|
+
}
|
|
147
|
+
const sessionId = created.agent.id;
|
|
148
|
+
if (workspace !== undefined) {
|
|
149
|
+
try {
|
|
150
|
+
await workspace.attachSession(sessionId);
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
throw new RemoteError('session/workspace-attach-failed', `session "${sessionId}" was created but could not attach to workspace "${workspace.id}": ${String(error)}`, { sessionId, workspaceId: workspace.id });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return { sessionId, ...(created.agentPreset === undefined ? {} : { agentPreset: created.agentPreset }) };
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Validate and record one Session model selection; save the default in the background.
|
|
160
|
+
* @param request - Session identity and requested model selection.
|
|
161
|
+
* @returns the normalized selection recorded for the Session, without waiting for default persistence.
|
|
162
|
+
*/
|
|
163
|
+
async selectModel(request) {
|
|
164
|
+
const agent = await this.resolveAgent(request.sessionId);
|
|
165
|
+
return this.agents.serializeImageAdmission(agent, async () => {
|
|
166
|
+
try {
|
|
167
|
+
await this.requireModel(request);
|
|
168
|
+
const selected = {
|
|
169
|
+
provider: request.provider,
|
|
170
|
+
model: request.model,
|
|
171
|
+
...(request.reasoningEffort === undefined
|
|
172
|
+
? {}
|
|
173
|
+
: { reasoningEffort: ReasoningEffortId(request.reasoningEffort) }),
|
|
174
|
+
};
|
|
175
|
+
await this.ctx.llm.resolveCallConfig(selected);
|
|
176
|
+
agent.model.select(selected);
|
|
177
|
+
void this.ctx.agentDefaultModel.saveSelection(selected).catch((error) => {
|
|
178
|
+
this.ctx.logger.warn(`session-controller: model selection changed for the Session but the default was not saved: ${String(error)}`);
|
|
179
|
+
});
|
|
180
|
+
return { selected: { ...selected } };
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
if (remoteErrorOf(error) !== undefined)
|
|
184
|
+
throw error;
|
|
185
|
+
throw new RemoteError('session/model-unavailable', error instanceof Error ? error.message : String(error), { provider: request.provider, model: request.model });
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Normalize and append a user-owned Session title.
|
|
191
|
+
* @param request - Session identity and proposed title.
|
|
192
|
+
* @returns the accepted title and durable event sequence.
|
|
193
|
+
*/
|
|
194
|
+
async rename(request) {
|
|
195
|
+
const agent = await this.resolveAgent(request.sessionId);
|
|
196
|
+
const titles = this.ctx.get('sessionTitle');
|
|
197
|
+
if (titles === undefined) {
|
|
198
|
+
throw new RemoteError('gateway/internal', 'renaming is unavailable: this deployment mounts no session-title service', {});
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
const accepted = titles.rename(agent.session, request.title);
|
|
202
|
+
return { title: accepted.title, seq: accepted.eventSeq };
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
if (error instanceof SessionTitleInvalidError) {
|
|
206
|
+
throw new RemoteError('session/title-invalid', error.message, { sessionId: request.sessionId });
|
|
207
|
+
}
|
|
208
|
+
throw new RemoteError('gateway/internal', `failed to rename session "${request.sessionId}": ${String(error)}`, {});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Create a new ordinary Session from an exact event prefix. An explicit
|
|
213
|
+
* `atSeq` is the inclusive cut; an omitted value selects the latest
|
|
214
|
+
* completed-turn prefix. An open cut receives synthetic fork closers.
|
|
215
|
+
* @param request - source Session and optional exact event boundary.
|
|
216
|
+
* @returns the new Session identity.
|
|
217
|
+
*/
|
|
218
|
+
async fork(request) {
|
|
219
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
220
|
+
try {
|
|
221
|
+
let atSeq;
|
|
222
|
+
try {
|
|
223
|
+
atSeq = request.atSeq === undefined ? undefined : SessionSeq(request.atSeq);
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
throw new RemoteError('gateway/bad-request', 'atSeq must be a non-negative safe integer', {});
|
|
227
|
+
}
|
|
228
|
+
let observed;
|
|
229
|
+
try {
|
|
230
|
+
observed = await this.ctx.sessionQuery.observeSession(request.sessionId);
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
if (error instanceof SessionQueryError
|
|
234
|
+
&& error.code === 'SESSION_QUERY_SESSION_NOT_FOUND') {
|
|
235
|
+
throw new RemoteError('session/not-found', `session "${request.sessionId}" not found`, {
|
|
236
|
+
sessionId: request.sessionId,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
throw new RemoteError('gateway/internal', `fork source unavailable for session "${request.sessionId}": ${String(error)}`, {});
|
|
240
|
+
}
|
|
241
|
+
const source = __addDisposableResource(env_1, observed, false);
|
|
242
|
+
const boundary = atSeq ?? latestCompletedPrefixBoundary(source.events);
|
|
243
|
+
if (boundary === undefined || source.events[boundary]?.seq !== boundary) {
|
|
244
|
+
throw new RemoteError('session/fork-unavailable', request.atSeq === undefined
|
|
245
|
+
? `session "${request.sessionId}" has no completed turn to fork from`
|
|
246
|
+
: `event ${String(request.atSeq)} does not exist in session "${request.sessionId}" (last seq: ${String(source.events.at(-1)?.seq ?? 'none')})`, { sessionId: request.sessionId });
|
|
247
|
+
}
|
|
248
|
+
const seed = buildForkSeed(source.events, boundary);
|
|
249
|
+
let workspace;
|
|
250
|
+
try {
|
|
251
|
+
workspace = await this.forkWorkspace(source.header);
|
|
252
|
+
}
|
|
253
|
+
catch (error) {
|
|
254
|
+
throw new RemoteError('gateway/internal', `failed to resolve fork workspace for session "${request.sessionId}": ${String(error)}`, {});
|
|
255
|
+
}
|
|
256
|
+
const childId = brandString(`session-${randomUUID()}`);
|
|
257
|
+
const composition = await this.agents.composeAgent(this.agents.presetForObservation(source));
|
|
258
|
+
try {
|
|
259
|
+
const { provider, model } = this.ctx.agentDefaultModel.currentSelection();
|
|
260
|
+
await this.ctx.agents.create({
|
|
261
|
+
sessionId: childId,
|
|
262
|
+
seed,
|
|
263
|
+
inheritedEventCount: SessionLogOffset(boundary + 1),
|
|
264
|
+
meta: {
|
|
265
|
+
...(source.header.cwd === undefined ? {} : { cwd: source.header.cwd }),
|
|
266
|
+
isSeeded: true,
|
|
267
|
+
...(composition.agentPreset === undefined
|
|
268
|
+
? {}
|
|
269
|
+
: { agentPreset: composition.agentPreset }),
|
|
270
|
+
},
|
|
271
|
+
agentOptions: { provider, model },
|
|
272
|
+
setup: composition.setup,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
throw new RemoteError('gateway/internal', `failed to fork session "${request.sessionId}": ${String(error)}`, {});
|
|
277
|
+
}
|
|
278
|
+
if (workspace !== undefined) {
|
|
279
|
+
try {
|
|
280
|
+
await workspace.attachSession(childId);
|
|
281
|
+
}
|
|
282
|
+
catch (error) {
|
|
283
|
+
throw new RemoteError('session/workspace-attach-failed', `session "${childId}" was forked but could not attach to workspace "${workspace.id}": ${String(error)}`, { sessionId: childId, workspaceId: workspace.id });
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return { sessionId: childId };
|
|
287
|
+
}
|
|
288
|
+
catch (e_1) {
|
|
289
|
+
env_1.error = e_1;
|
|
290
|
+
env_1.hasError = true;
|
|
291
|
+
}
|
|
292
|
+
finally {
|
|
293
|
+
__disposeResources(env_1);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Admit one prompt after Agent and attachment validation; the Remote method
|
|
298
|
+
* has already validated the content and built the durable message source.
|
|
299
|
+
* @param request - Session identity, prompt content, and delivery mode.
|
|
300
|
+
* @param source - caller metadata recorded on the accepted ordinary or retry user message.
|
|
301
|
+
* @returns acknowledgement that the Agent accepted the prompt.
|
|
302
|
+
*/
|
|
303
|
+
async prompt(request, source) {
|
|
304
|
+
const agent = await this.resolveAgent(request.sessionId);
|
|
305
|
+
if (this.hasPromptRequest(agent.session, request.requestId))
|
|
306
|
+
return { accepted: true };
|
|
307
|
+
if (request.content.length === 0) {
|
|
308
|
+
try {
|
|
309
|
+
return await agent.runMaintenance(() => {
|
|
310
|
+
const inbox = agent.inbox;
|
|
311
|
+
if (request.mode !== 'queue' || this.continuation.stateOf(agent.session).ending === null
|
|
312
|
+
|| inbox.nextTurn.length > 0 || inbox.nextStep.some(message => message.source.kind === 'user')) {
|
|
313
|
+
throw new RemoteError('session/agent-busy', 'generation continuation is unavailable', { reason: 'NO_CONTINUABLE_FAILURE_OR_PENDING_INPUT' });
|
|
314
|
+
}
|
|
315
|
+
agent.followup(createUserMessage({ content: [], source }));
|
|
316
|
+
return Promise.resolve({ accepted: true });
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
catch (error) {
|
|
320
|
+
if (remoteErrorOf(error) !== undefined)
|
|
321
|
+
throw error;
|
|
322
|
+
throw new RemoteError('session/agent-busy', 'generation continuation was not accepted', { reason: String(error) });
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
const admission = resolvePromptFileReceipts(request.content, receiptId => this.ctx.fileUploads.resolve(agent, receiptId));
|
|
326
|
+
// Encoded images and image upload receipts both make an image prompt.
|
|
327
|
+
const hasImage = admission.content.some(part => part.type === 'image');
|
|
328
|
+
const admit = async () => {
|
|
329
|
+
try {
|
|
330
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
331
|
+
try {
|
|
332
|
+
if (this.hasPromptRequest(agent.session, request.requestId))
|
|
333
|
+
return { accepted: true };
|
|
334
|
+
if (hasImage) {
|
|
335
|
+
const current = agent.model.current();
|
|
336
|
+
if (current !== undefined) {
|
|
337
|
+
const model = await this.ctx.llm.resolveModelInfo(current.provider, current.model);
|
|
338
|
+
if (model.inputModalities !== undefined && !model.inputModalities.includes('image')) {
|
|
339
|
+
throw new RemoteError('session/attachment-invalid', `Model "${current.model}" does not support image input.`, { reason: 'MODEL_DOES_NOT_SUPPORT_IMAGES' });
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
const content = await this.ctx.attachments.admitPromptContent(admission.content);
|
|
344
|
+
if (this.hasPromptRequest(agent.session, request.requestId))
|
|
345
|
+
return { accepted: true };
|
|
346
|
+
const message = createUserMessage({ content, source });
|
|
347
|
+
if (this.ctx.agents.get(agent.id) !== agent) {
|
|
348
|
+
throw new RemoteError('session/not-found', `session "${agent.id}" was disposed during prompt admission`, { sessionId: agent.id });
|
|
349
|
+
}
|
|
350
|
+
const binding = __addDisposableResource(env_2, this.ctx.fileUploads.bindPrompt(agent, admission.receiptIds, request.requestId), false);
|
|
351
|
+
if (request.mode === 'steer')
|
|
352
|
+
agent.steer(message);
|
|
353
|
+
else
|
|
354
|
+
agent.followup(message);
|
|
355
|
+
binding.commit();
|
|
356
|
+
}
|
|
357
|
+
catch (e_2) {
|
|
358
|
+
env_2.error = e_2;
|
|
359
|
+
env_2.hasError = true;
|
|
360
|
+
}
|
|
361
|
+
finally {
|
|
362
|
+
__disposeResources(env_2);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
catch (error) {
|
|
366
|
+
if (this.hasPromptRequest(agent.session, request.requestId))
|
|
367
|
+
return { accepted: true };
|
|
368
|
+
if (remoteErrorOf(error) !== undefined)
|
|
369
|
+
throw error;
|
|
370
|
+
if (error instanceof AttachmentError) {
|
|
371
|
+
throw new RemoteError('session/attachment-invalid', error.message, { reason: error.code });
|
|
372
|
+
}
|
|
373
|
+
throw new RemoteError('session/agent-busy', 'prompt rejected', { reason: String(error) });
|
|
374
|
+
}
|
|
375
|
+
return { accepted: true };
|
|
376
|
+
};
|
|
377
|
+
return hasImage ? this.agents.serializeImageAdmission(agent, admit) : admit();
|
|
378
|
+
}
|
|
379
|
+
/** Recover first input acceptance, including claimed or removed messages, from unseen log entries. */
|
|
380
|
+
hasPromptRequest(session, requestId) {
|
|
381
|
+
let receipts = this.promptReceipts.get(session);
|
|
382
|
+
if (receipts === undefined) {
|
|
383
|
+
receipts = { offset: SessionLogOffset(0), messages: new Set(), requests: new Set() };
|
|
384
|
+
this.promptReceipts.set(session, receipts);
|
|
385
|
+
}
|
|
386
|
+
if (receipts.offset !== session.seq) {
|
|
387
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing prompt retry history read, retained for acceptance recovery.
|
|
388
|
+
for (const event of session.snapshotEvents(receipts.offset)) {
|
|
389
|
+
if (event.type !== 'agent/inbox/spliced' && event.type !== 'user/message')
|
|
390
|
+
continue;
|
|
391
|
+
const messages = event.type === 'agent/inbox/spliced' ? event.data.inserted : [event.data];
|
|
392
|
+
for (const message of messages) {
|
|
393
|
+
if (receipts.messages.has(message.id))
|
|
394
|
+
continue;
|
|
395
|
+
receipts.messages.add(message.id);
|
|
396
|
+
// A copied input is not a new request in the child, even if later reinserted there.
|
|
397
|
+
if (event.seq < session.inheritedEventCount)
|
|
398
|
+
continue;
|
|
399
|
+
const source = message.source;
|
|
400
|
+
if ((source.kind === 'user' || source.kind === 'retry') && 'rpcId' in source)
|
|
401
|
+
receipts.requests.add(source.rpcId);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
receipts.offset = session.seq;
|
|
405
|
+
}
|
|
406
|
+
return receipts.requests.has(requestId);
|
|
407
|
+
}
|
|
408
|
+
async requireModel(selection) {
|
|
409
|
+
if (!await modelAvailable(this.ctx, selection)) {
|
|
410
|
+
throw new RemoteError('session/model-unavailable', 'Select an available model before sending a message.', { provider: selection.provider, model: selection.model });
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Read one durable image using the supplied reference without consulting Session history.
|
|
415
|
+
* @param request - image reference and gateway permission scope; Session existence is not checked.
|
|
416
|
+
* @returns the durable attachment reference and base64-encoded bytes.
|
|
417
|
+
*/
|
|
418
|
+
async attachment(request) {
|
|
419
|
+
try {
|
|
420
|
+
const stored = await this.ctx.attachments.readImage(request.attachment);
|
|
421
|
+
return {
|
|
422
|
+
attachment: stored.ref,
|
|
423
|
+
data: Buffer.from(stored.data).toString('base64'),
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
catch (error) {
|
|
427
|
+
if (error instanceof AttachmentError) {
|
|
428
|
+
throw new RemoteError('session/attachment-invalid', error.message, { reason: error.code });
|
|
429
|
+
}
|
|
430
|
+
throw new RemoteError('gateway/internal', 'Unable to read image attachment.', {});
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Mutate one pending Inbox occurrence, restoring an ordinary cold Agent when needed.
|
|
435
|
+
* @param request - Session, queue item, and requested mutation.
|
|
436
|
+
* @returns acknowledgement that the queue mutation was applied.
|
|
437
|
+
*/
|
|
438
|
+
async updateQueue(request) {
|
|
439
|
+
if (request.action.kind === 'edit') {
|
|
440
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- Remote callers can submit untyped JSON.
|
|
441
|
+
if (request.action.content.some(block => block.type !== 'text')) {
|
|
442
|
+
throw new RemoteError('session/attachment-invalid', 'queue edits accept text content only', { reason: 'QUEUE_EDIT_NON_TEXT' });
|
|
443
|
+
}
|
|
444
|
+
if (!hasPromptContent(request.action.content)) {
|
|
445
|
+
throw new RemoteError('gateway/bad-request', 'queue edit content must include non-whitespace text', {});
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
let agent = this.ctx.agents.get(request.sessionId);
|
|
449
|
+
if (agent === undefined) {
|
|
450
|
+
const found = await this.agents.resolveAgent(request.sessionId);
|
|
451
|
+
if ('error' in found) {
|
|
452
|
+
if (found.error.code !== 'session/not-found')
|
|
453
|
+
throw found.error;
|
|
454
|
+
throw new RemoteError('session/queue-item-not-found', 'queued item is no longer pending', { itemId: request.itemId });
|
|
455
|
+
}
|
|
456
|
+
agent = found.agent;
|
|
457
|
+
}
|
|
458
|
+
if (hasApiSessionSubagentOwner(agent.session)) {
|
|
459
|
+
const identity = this.ctx.sessionProjections
|
|
460
|
+
.snapshot(agent.session, ['subagent'])
|
|
461
|
+
.values.subagent;
|
|
462
|
+
if (identity?.mode !== 'continuable'
|
|
463
|
+
|| !agent.session.isOwnSeq(identity.seq)) {
|
|
464
|
+
throw apiSessionSubagentOwnershipError(request.sessionId);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
const nextTurn = agent.inbox.nextTurn.find(message => message.id === request.itemId);
|
|
468
|
+
const nextStep = agent.inbox.nextStep.find(message => message.id === request.itemId);
|
|
469
|
+
const located = nextTurn === undefined
|
|
470
|
+
? nextStep === undefined ? undefined : { target: 'next-step', message: nextStep }
|
|
471
|
+
: { target: 'next-turn', message: nextTurn };
|
|
472
|
+
if (located === undefined) {
|
|
473
|
+
throw new RemoteError('session/queue-item-not-found', 'queued item is no longer pending', { itemId: request.itemId });
|
|
474
|
+
}
|
|
475
|
+
const { target, message } = located;
|
|
476
|
+
if (request.action.kind === 'steer' && (target !== 'next-turn' || agent.status !== 'running')) {
|
|
477
|
+
throw new RemoteError('session/steer-unavailable', 'current turn no longer accepts steering', { itemId: request.itemId });
|
|
478
|
+
}
|
|
479
|
+
switch (request.action.kind) {
|
|
480
|
+
case 'edit':
|
|
481
|
+
agent.inbox.replace(request.itemId, freezeMessage({
|
|
482
|
+
...message,
|
|
483
|
+
content: [...request.action.content],
|
|
484
|
+
}));
|
|
485
|
+
break;
|
|
486
|
+
case 'remove': {
|
|
487
|
+
agent.inbox.remove(request.itemId);
|
|
488
|
+
const source = message.source;
|
|
489
|
+
if (source.kind === 'user' && 'rpcId' in source) {
|
|
490
|
+
this.ctx.fileUploads.retirePrompt(agent, source.rpcId);
|
|
491
|
+
}
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
case 'steer':
|
|
495
|
+
agent.inbox.remove(request.itemId);
|
|
496
|
+
agent.steer(message);
|
|
497
|
+
break;
|
|
498
|
+
/* v8 ignore next 2 -- closed-union exhaustiveness guard */
|
|
499
|
+
default:
|
|
500
|
+
assertNever(request.action, 'queue action');
|
|
501
|
+
}
|
|
502
|
+
return { accepted: true };
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Cancel one live ordinary Agent while retaining pending inbox work.
|
|
506
|
+
* @param request - Session whose active Agent turn is cancelled.
|
|
507
|
+
* @returns acknowledgement that cancellation was requested.
|
|
508
|
+
*/
|
|
509
|
+
cancel(request) {
|
|
510
|
+
const agent = this.ctx.agents.get(request.sessionId);
|
|
511
|
+
if (agent === undefined) {
|
|
512
|
+
throw new RemoteError('session/not-found', `session "${request.sessionId}" not found (not attached)`, { sessionId: request.sessionId });
|
|
513
|
+
}
|
|
514
|
+
if (hasApiSessionSubagentOwner(agent.session)) {
|
|
515
|
+
throw apiSessionSubagentOwnershipError(request.sessionId);
|
|
516
|
+
}
|
|
517
|
+
agent.cancel({ kind: 'user' }, { keepInbox: true });
|
|
518
|
+
return { accepted: true };
|
|
519
|
+
}
|
|
520
|
+
async resolveAgent(sessionId) {
|
|
521
|
+
const found = await this.agents.resolveAgent(sessionId);
|
|
522
|
+
if ('error' in found)
|
|
523
|
+
throw found.error;
|
|
524
|
+
return found.agent;
|
|
525
|
+
}
|
|
526
|
+
rejectCreation(error) {
|
|
527
|
+
if (remoteErrorOf(error) !== undefined)
|
|
528
|
+
throw error;
|
|
529
|
+
if (error instanceof ApiSessionPresetConflict) {
|
|
530
|
+
throw new RemoteError('agent-preset/conflict', error.message, {
|
|
531
|
+
sessionId: error.sessionId,
|
|
532
|
+
requestedPreset: error.requestedPreset,
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
if (error instanceof ApiSessionCwdConflict) {
|
|
536
|
+
throw new RemoteError('session/conflict', error.message, {
|
|
537
|
+
sessionId: error.sessionId,
|
|
538
|
+
requestedCwd: error.requestedCwd,
|
|
539
|
+
...(error.existingCwd === undefined ? {} : { existingCwd: error.existingCwd }),
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
if (error instanceof ApiSessionSubagentOwnership) {
|
|
543
|
+
throw apiSessionSubagentOwnershipError(error.sessionId);
|
|
544
|
+
}
|
|
545
|
+
throw new RemoteError('gateway/internal', `failed to create session: ${String(error)}`, {});
|
|
546
|
+
}
|
|
547
|
+
async forkWorkspace(source) {
|
|
548
|
+
const workspaces = this.ctx.workspaceRegistry.list();
|
|
549
|
+
const direct = workspaces.find(workspace => workspace.sessionIds.includes(source.id));
|
|
550
|
+
if (direct !== undefined || source.origin !== 'subagent')
|
|
551
|
+
return direct;
|
|
552
|
+
const lineage = await this.ctx.sessionQuery.traceSession(source.id);
|
|
553
|
+
for (const ancestor of lineage.ancestors) {
|
|
554
|
+
const workspace = workspaces.find(candidate => candidate.sessionIds.includes(ancestor.header.id));
|
|
555
|
+
if (workspace !== undefined)
|
|
556
|
+
return workspace;
|
|
557
|
+
}
|
|
558
|
+
return undefined;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
/** Replace each file part with the file or image its staged receipt names. */
|
|
562
|
+
function resolvePromptFileReceipts(content, staged) {
|
|
563
|
+
const receiptIds = new Set();
|
|
564
|
+
const resolved = content.map((part) => {
|
|
565
|
+
if (part.type !== 'file')
|
|
566
|
+
return part;
|
|
567
|
+
const attachment = staged(part.receiptId);
|
|
568
|
+
if (attachment === undefined) {
|
|
569
|
+
throw new RemoteError('session/attachment-invalid', 'File was not uploaded for this session.', { reason: 'FILE_NOT_STAGED' });
|
|
570
|
+
}
|
|
571
|
+
receiptIds.add(part.receiptId);
|
|
572
|
+
return attachment;
|
|
573
|
+
});
|
|
574
|
+
return { content: resolved, receiptIds: [...receiptIds] };
|
|
575
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SessionSeq } from '@unieai/rabi-session/types';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const stateSchema: z.ZodObject<{
|
|
4
|
+
admitted: z.ZodBoolean;
|
|
5
|
+
failedAttempt: z.ZodBoolean;
|
|
6
|
+
ending: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<SessionSeq, number>>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
/** Recoverable manual-continuation facts over admitted user input and empty retry messages. */
|
|
9
|
+
export type ContinuationState = z.infer<typeof stateSchema>;
|
|
10
|
+
/** Eligibility requires admitted human work and a failed settlement in the last request step. */
|
|
11
|
+
export declare const continuationProjectionDefinition: {
|
|
12
|
+
key: "conversationContinuation";
|
|
13
|
+
stateVersion: number;
|
|
14
|
+
stateSchema: z.ZodObject<{
|
|
15
|
+
admitted: z.ZodBoolean;
|
|
16
|
+
failedAttempt: z.ZodBoolean;
|
|
17
|
+
ending: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<SessionSeq, number>>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
init: () => ContinuationState;
|
|
20
|
+
apply: (state: NoInfer<{
|
|
21
|
+
admitted: boolean;
|
|
22
|
+
failedAttempt: boolean;
|
|
23
|
+
ending: SessionSeq | null;
|
|
24
|
+
}>, event: import("@unieai/rabi-session").SessionEvent) => {
|
|
25
|
+
admitted: boolean;
|
|
26
|
+
failedAttempt: boolean;
|
|
27
|
+
ending: SessionSeq | null;
|
|
28
|
+
};
|
|
29
|
+
wire: {
|
|
30
|
+
viewSchema: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<SessionSeq, number>>>;
|
|
31
|
+
view: (state: ContinuationState) => SessionSeq | null;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=continuation.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { brandNumber } from '@unieai/rabi-brand';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
// Explicit manual requests use a fixed product policy, independent of automatic retry configuration.
|
|
4
|
+
const CONTINUABLE_FAILURES = new Set([
|
|
5
|
+
'RATE_LIMIT', 'SERVER', 'TIMEOUT', 'TRANSPORT', 'EMPTY_RESPONSE', 'STREAM_CLOSED',
|
|
6
|
+
]);
|
|
7
|
+
const endingSchema = z.number().int().nonnegative().transform((brandNumber)).nullable();
|
|
8
|
+
const stateSchema = z.object({
|
|
9
|
+
admitted: z.boolean(),
|
|
10
|
+
failedAttempt: z.boolean(),
|
|
11
|
+
ending: endingSchema,
|
|
12
|
+
});
|
|
13
|
+
const EMPTY = { admitted: false, failedAttempt: false, ending: null };
|
|
14
|
+
/** Eligibility requires admitted human work and a failed settlement in the last request step. */
|
|
15
|
+
export const continuationProjectionDefinition = {
|
|
16
|
+
key: 'conversationContinuation',
|
|
17
|
+
stateVersion: 4,
|
|
18
|
+
stateSchema,
|
|
19
|
+
init: () => EMPTY,
|
|
20
|
+
apply: (state, event) => {
|
|
21
|
+
switch (event.type) {
|
|
22
|
+
case 'turn/start':
|
|
23
|
+
return EMPTY;
|
|
24
|
+
case 'step/start':
|
|
25
|
+
case 'assistant/message':
|
|
26
|
+
return state.failedAttempt ? { ...state, failedAttempt: false } : state;
|
|
27
|
+
case 'user/message':
|
|
28
|
+
return !state.admitted && event.surfaceOp === 'append'
|
|
29
|
+
&& ((event.data.source.kind === 'user' && event.data.content.length > 0)
|
|
30
|
+
|| (event.data.source.kind === 'retry' && event.data.content.length === 0))
|
|
31
|
+
? { ...state, admitted: true } : state;
|
|
32
|
+
case 'assistant/attempt':
|
|
33
|
+
return state.failedAttempt ? state : { ...state, failedAttempt: true };
|
|
34
|
+
case 'turn/end': {
|
|
35
|
+
const ending = event.data.reason.kind === 'error' && CONTINUABLE_FAILURES.has(event.data.reason.error.code)
|
|
36
|
+
&& state.admitted && state.failedAttempt ? event.seq : null;
|
|
37
|
+
return ending === null ? EMPTY : { ...EMPTY, ending };
|
|
38
|
+
}
|
|
39
|
+
default:
|
|
40
|
+
return state;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
wire: {
|
|
44
|
+
viewSchema: endingSchema,
|
|
45
|
+
view: (state) => state.ending,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Live Session projection state with reconnect baselines. */
|
|
2
|
+
import type { Context } from '@unieai/cordis';
|
|
3
|
+
import type { SessionControlFrame } from './types.ts';
|
|
4
|
+
/** Owns the Host-wide Session control stream. */
|
|
5
|
+
export declare class SessionControlController {
|
|
6
|
+
private readonly ctx;
|
|
7
|
+
private readonly streams;
|
|
8
|
+
/** @param ctx - Host context carrying live Agent and projection services. */
|
|
9
|
+
constructor(ctx: Context);
|
|
10
|
+
/**
|
|
11
|
+
* Open one generation of Host-wide live control state.
|
|
12
|
+
* @param signal - Remote stream cancellation.
|
|
13
|
+
* @returns one complete baseline followed by live replacement frames.
|
|
14
|
+
*/
|
|
15
|
+
control(signal: AbortSignal): AsyncIterable<SessionControlFrame>;
|
|
16
|
+
private baseline;
|
|
17
|
+
private projectionBaseline;
|
|
18
|
+
private broadcast;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=control.d.ts.map
|