@nuvin/session 0.4.0-rc.1 → 0.4.0-rc.11
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/dist/chunk-4AOFJGGN.js +141 -0
- package/dist/{chunk-DTLHDYZC.js → chunk-4FXP5TSI.js} +249 -46
- package/dist/{chunk-X6DYNSV2.js → chunk-O3YF6Q77.js} +50 -1
- package/dist/client/control-center-socket.d.ts +14 -0
- package/dist/client/control-center-socket.d.ts.map +1 -0
- package/dist/client/daemon-client.d.ts.map +1 -1
- package/dist/client/data-client.d.ts +8 -1
- package/dist/client/data-client.d.ts.map +1 -1
- package/dist/client/http-data-client.d.ts.map +1 -1
- package/dist/client/index.js +270 -8
- package/dist/client/session-client.d.ts +8 -2
- package/dist/client/session-client.d.ts.map +1 -1
- package/dist/client/websocket.d.ts +1 -1
- package/dist/client/websocket.d.ts.map +1 -1
- package/dist/controller/agent-channel.d.ts +7 -2
- package/dist/controller/agent-channel.d.ts.map +1 -1
- package/dist/controller/index.js +469 -82
- package/dist/controller/session-controller.d.ts +37 -9
- package/dist/controller/session-controller.d.ts.map +1 -1
- package/dist/protocol/background-work.d.ts +3 -1
- package/dist/protocol/background-work.d.ts.map +1 -1
- package/dist/protocol/control-center.d.ts +141 -0
- package/dist/protocol/control-center.d.ts.map +1 -0
- package/dist/protocol/data-rpc.d.ts +13 -1
- package/dist/protocol/data-rpc.d.ts.map +1 -1
- package/dist/protocol/index.d.ts +2 -0
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js +14 -2
- package/dist/protocol/submission-recovery.d.ts +6 -0
- package/dist/protocol/submission-recovery.d.ts.map +1 -0
- package/dist/protocol/types.d.ts +159 -17
- package/dist/protocol/types.d.ts.map +1 -1
- package/dist/protocol/version.d.ts +1 -1
- package/dist/state/approvals.d.ts.map +1 -1
- package/dist/state/index.js +11 -3
- package/dist/state/messages.d.ts +30 -2
- package/dist/state/messages.d.ts.map +1 -1
- package/dist/state/session.d.ts +4 -1
- package/dist/state/session.d.ts.map +1 -1
- package/dist/state/tool-preview.d.ts.map +1 -1
- package/dist/state/tool-preview.js +1 -45
- package/dist/test-utils/index.js +2 -2
- package/package.json +2 -2
- package/dist/chunk-5PHEC5GZ.js +0 -85
|
@@ -190,9 +190,53 @@ function parseBackgroundWorkInspection(value) {
|
|
|
190
190
|
return invalidResult();
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
function parseBackgroundWorkCancellation(value) {
|
|
194
|
+
if (!isRecord(value) || !isBoundedString(value.workId, BACKGROUND_WORK_PROTOCOL_LIMITS.idChars) || value.outcome !== "cancelled" && value.outcome !== "already-terminal") {
|
|
195
|
+
return invalidResult();
|
|
196
|
+
}
|
|
197
|
+
return { workId: value.workId, outcome: value.outcome };
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// src/protocol/submission-recovery.ts
|
|
201
|
+
function record(value) {
|
|
202
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
203
|
+
}
|
|
204
|
+
function exact(value, fields) {
|
|
205
|
+
return Object.keys(value).length === fields.length && fields.every((field) => Object.hasOwn(value, field));
|
|
206
|
+
}
|
|
207
|
+
function text(value) {
|
|
208
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
209
|
+
}
|
|
210
|
+
function isSubmissionKey(value) {
|
|
211
|
+
return record(value) && exact(value, ["identity", "submissionId"]) && text(value.submissionId) && record(value.identity) && exact(value.identity, ["profile", "workspace", "sessionId"]) && text(value.identity.profile) && text(value.identity.workspace) && text(value.identity.sessionId);
|
|
212
|
+
}
|
|
213
|
+
function sameSubmissionKey(left, right) {
|
|
214
|
+
return left === null || right === null ? left === right : left.submissionId === right.submissionId && left.identity.profile === right.identity.profile && left.identity.workspace === right.identity.workspace && left.identity.sessionId === right.identity.sessionId;
|
|
215
|
+
}
|
|
216
|
+
function parseAbortRecoveryRequest(value) {
|
|
217
|
+
if (!record(value) || !exact(value, ["target"]) || value.target !== null && !isSubmissionKey(value.target))
|
|
218
|
+
throw new Error("Invalid abort recovery request");
|
|
219
|
+
return structuredClone(value);
|
|
220
|
+
}
|
|
221
|
+
function parseAbortRecoveryResult(value, request) {
|
|
222
|
+
if (!record(value)) throw new Error("Invalid abort recovery result");
|
|
223
|
+
let key;
|
|
224
|
+
if (value.status === "retracted" && exact(value, ["status", "key", "rawText"]) && isSubmissionKey(value.key) && typeof value.rawText === "string")
|
|
225
|
+
key = value.key;
|
|
226
|
+
else if (value.status === "not-retracted" && exact(value, ["status", "target", "reason"]) && (value.target === null || isSubmissionKey(value.target)) && typeof value.reason === "string" && ["no-active-human", "target-mismatch", "activity-started", "already-finished"].includes(
|
|
227
|
+
value.reason
|
|
228
|
+
))
|
|
229
|
+
key = value.target;
|
|
230
|
+
else if (value.status === "failed" && exact(value, ["status", "target", "code", "message"]) && (value.target === null || isSubmissionKey(value.target)) && typeof value.code === "string" && ["abort-failed", "persistence-failed", "persistence-unavailable"].includes(value.code) && typeof value.message === "string")
|
|
231
|
+
key = value.target;
|
|
232
|
+
else throw new Error("Invalid abort recovery result");
|
|
233
|
+
if (request !== void 0 && !sameSubmissionKey(key, request.target))
|
|
234
|
+
throw new Error("Mismatched abort recovery result");
|
|
235
|
+
return structuredClone(value);
|
|
236
|
+
}
|
|
193
237
|
|
|
194
238
|
// src/protocol/version.ts
|
|
195
|
-
var PROTOCOL_VERSION =
|
|
239
|
+
var PROTOCOL_VERSION = 71;
|
|
196
240
|
|
|
197
241
|
export {
|
|
198
242
|
BACKGROUND_WORK_PROTOCOL_LIMITS,
|
|
@@ -200,5 +244,10 @@ export {
|
|
|
200
244
|
BackgroundWorkResultValidationError,
|
|
201
245
|
parseBackgroundWorkPage,
|
|
202
246
|
parseBackgroundWorkInspection,
|
|
247
|
+
parseBackgroundWorkCancellation,
|
|
248
|
+
isSubmissionKey,
|
|
249
|
+
sameSubmissionKey,
|
|
250
|
+
parseAbortRecoveryRequest,
|
|
251
|
+
parseAbortRecoveryResult,
|
|
203
252
|
PROTOCOL_VERSION
|
|
204
253
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ControlCenterRequest, ControlCenterResult } from "../protocol/control-center.ts";
|
|
2
|
+
import type { GetEndpoint } from "./endpoint.ts";
|
|
3
|
+
import type { TransportSocket } from "./socket.ts";
|
|
4
|
+
export declare const CONTROL_CENTER_UNSUPPORTED = "Control Center is unavailable on this daemon. Update or restart the daemon and try again.";
|
|
5
|
+
/** A dedicated, authenticated management connection. It never sends attach. */
|
|
6
|
+
export declare function createControlCenterSocketClient(options: {
|
|
7
|
+
getEndpoint: GetEndpoint;
|
|
8
|
+
socketFactory: (url: string) => TransportSocket;
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
}): {
|
|
11
|
+
request(input: ControlCenterRequest): Promise<ControlCenterResult>;
|
|
12
|
+
close(): void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=control-center-socket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-center-socket.d.ts","sourceRoot":"","sources":["../../src/client/control-center-socket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAE/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,0BAA0B,8FACsD,CAAC;AAE9F,+EAA+E;AAC/E,wBAAgB,+BAA+B,CAAC,OAAO,EAAE;IACvD,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,eAAe,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;mBA2IwB,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;aAwB/D,IAAI;EAMhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-client.d.ts","sourceRoot":"","sources":["../../src/client/daemon-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"daemon-client.d.ts","sourceRoot":"","sources":["../../src/client/daemon-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC/B,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,YAAY,GACpB;IACE,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,kBAAkB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C,CAAC;AAEN,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,KAAK,CAAC;IAChD,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,eAAe,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,GACnF,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,KAAK,CAAC;AAEV,MAAM,MAAM,qBAAqB,GAAG;KACjC,CAAC,IAAI,MAAM,gBAAgB,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,wBAAwB,CAAC;IACpC,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,yBAAyB,EAAE,YAAY,GAAG,YAAY,CAAC,CAAC;AAEpG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,iBAAiB,IAAI,qBAAqB,CAAC;IAC3C,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,iBAAiB,CAAC;IACtF,KAAK,IAAI,IAAI,CAAC;CACf;AASD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,GACf,qBAAqB,CA2BvB;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,IAAI,GAAE,gBAAqB,GAC1B,YAAY,CA2Nd"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddProviderInput, AgentModelSetsView, AgentModelTierMappings, ConfigMutationResult, DaemonDirectoryRow, HistoryPage, ListHistoryParams, ListHistoryWorkspacesParams, ListHistoryWorkspacesResult, ListWorkspaceHistoryParams, PersistenceIdentity, ProfileSummary, ProviderConfigSummary, ProviderCredentialInput, SessionSnapshot, UpdateWorkspaceInput, WorkspaceConfigSummary, WorkspaceHistoryPage } from "../protocol/index.ts";
|
|
1
|
+
import type { AddProviderInput, AgentModelSetsView, AgentModelTierMappings, ConfigMutationResult, ControlCenterRequest, ControlCenterResult, DaemonDirectoryRow, HistoryPage, ListHistoryParams, ListHistoryWorkspacesParams, ListHistoryWorkspacesResult, ListWorkspaceHistoryParams, ModelReasoningCapabilityView, PersistenceIdentity, ProfileSummary, ProviderConfigSummary, ProviderCredentialInput, SessionSnapshot, UpdateWorkspaceInput, WorkspaceConfigSummary, WorkspaceHistoryPage } from "../protocol/index.ts";
|
|
2
2
|
import type { TransportCredential } from "./endpoint.ts";
|
|
3
3
|
/** Discovery payload: the daemon directory (account-scoped cloud, machine-scoped local). */
|
|
4
4
|
export type DaemonDirectory = {
|
|
@@ -23,6 +23,8 @@ export type DaemonEndpoint = {
|
|
|
23
23
|
export interface DaemonDirectoryClient {
|
|
24
24
|
listDaemons(): Promise<DaemonDirectory>;
|
|
25
25
|
acquireEndpoint(daemonId: string): Promise<DaemonEndpoint>;
|
|
26
|
+
/** Revoke + delete a daemon registration (account-level directory op). */
|
|
27
|
+
removeDaemon(daemonId: string): Promise<void>;
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
28
30
|
* Per-daemon reads + stateless management — the plane shared by ALL clients
|
|
@@ -33,6 +35,7 @@ export interface DaemonDirectoryClient {
|
|
|
33
35
|
* message; everything else is a plain `Error`.
|
|
34
36
|
*/
|
|
35
37
|
export interface DaemonDataClient {
|
|
38
|
+
controlCenter(daemonId: string, input: ControlCenterRequest): Promise<ControlCenterResult>;
|
|
36
39
|
fetchTranscript(daemonId: string, identity: PersistenceIdentity): Promise<SessionSnapshot>;
|
|
37
40
|
fetchHistory(daemonId: string, opts?: ListHistoryParams): Promise<HistoryPage>;
|
|
38
41
|
listHistoryWorkspaces(daemonId: string, opts?: ListHistoryWorkspacesParams & {
|
|
@@ -70,6 +73,10 @@ export interface DaemonDataClient {
|
|
|
70
73
|
profile?: string;
|
|
71
74
|
}): Promise<ConfigMutationResult<null>>;
|
|
72
75
|
updateWorkspace(daemonId: string, name: string, patch: UpdateWorkspaceInput): Promise<ConfigMutationResult<WorkspaceConfigSummary>>;
|
|
76
|
+
getModelReasoningCapability(daemonId: string, input: {
|
|
77
|
+
profile: string;
|
|
78
|
+
selector: string;
|
|
79
|
+
}): Promise<ModelReasoningCapabilityView>;
|
|
73
80
|
listAgentModelSets(daemonId: string, input: {
|
|
74
81
|
profile: string;
|
|
75
82
|
workspace?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-client.d.ts","sourceRoot":"","sources":["../../src/client/data-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG;IAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAE9E;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,WAAW,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IACxC,eAAe,CAAC,QAAQ,EAAE,MAAM,GA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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-data-client.d.ts","sourceRoot":"","sources":["../../src/client/http-data-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"http-data-client.d.ts","sourceRoot":"","sources":["../../src/client/http-data-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,YAAY,EASb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAmC,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGpF,MAAM,MAAM,qBAAqB,GAAG;IAClC,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACxC,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClD,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B,CAAC;AAEF,qBAAa,kBAAmB,SAAQ,KAAK;IAEzC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC;gBAA1B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,EACnC,OAAO,EAAE,MAAM;CAKlB;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIvD;AA6CD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B,GAAG,UAAU,CAmgBpF"}
|
package/dist/client/index.js
CHANGED
|
@@ -1,12 +1,166 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSessionViewState,
|
|
3
3
|
reduceSessionEvent
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4FXP5TSI.js";
|
|
5
5
|
import {
|
|
6
6
|
PROTOCOL_VERSION,
|
|
7
|
+
parseAbortRecoveryRequest,
|
|
8
|
+
parseAbortRecoveryResult,
|
|
9
|
+
parseBackgroundWorkCancellation,
|
|
7
10
|
parseBackgroundWorkInspection,
|
|
8
11
|
parseBackgroundWorkPage
|
|
9
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-O3YF6Q77.js";
|
|
13
|
+
|
|
14
|
+
// src/client/control-center-socket.ts
|
|
15
|
+
var CONTROL_CENTER_UNSUPPORTED = "Control Center is unavailable on this daemon. Update or restart the daemon and try again.";
|
|
16
|
+
function createControlCenterSocketClient(options) {
|
|
17
|
+
const timeoutMs = options.timeoutMs ?? 6e4;
|
|
18
|
+
let closed = false;
|
|
19
|
+
let sequence = 0;
|
|
20
|
+
let socket;
|
|
21
|
+
let connecting;
|
|
22
|
+
let rejectConnection;
|
|
23
|
+
let handshakeTimer;
|
|
24
|
+
const pending = /* @__PURE__ */ new Map();
|
|
25
|
+
const disconnect = (error) => {
|
|
26
|
+
clearTimeout(handshakeTimer);
|
|
27
|
+
rejectConnection?.(error);
|
|
28
|
+
rejectConnection = void 0;
|
|
29
|
+
connecting = void 0;
|
|
30
|
+
const current = socket;
|
|
31
|
+
socket = void 0;
|
|
32
|
+
for (const entry of pending.values()) {
|
|
33
|
+
clearTimeout(entry.timer);
|
|
34
|
+
entry.reject(error);
|
|
35
|
+
}
|
|
36
|
+
pending.clear();
|
|
37
|
+
current?.close();
|
|
38
|
+
};
|
|
39
|
+
const connect = () => {
|
|
40
|
+
if (closed) return Promise.reject(new Error("Control Center connection is closed."));
|
|
41
|
+
if (connecting) return connecting;
|
|
42
|
+
connecting = new Promise((resolve, reject) => {
|
|
43
|
+
rejectConnection = reject;
|
|
44
|
+
handshakeTimer = setTimeout(
|
|
45
|
+
() => disconnect(
|
|
46
|
+
new Error(
|
|
47
|
+
"Control Center connection timed out. Check the daemon connection and try again."
|
|
48
|
+
)
|
|
49
|
+
),
|
|
50
|
+
options.timeoutMs ?? 15e3
|
|
51
|
+
);
|
|
52
|
+
void options.getEndpoint().then((endpoint) => {
|
|
53
|
+
if (closed || rejectConnection !== reject) return;
|
|
54
|
+
const current = options.socketFactory(endpoint.url);
|
|
55
|
+
socket = current;
|
|
56
|
+
current.on("open", () => {
|
|
57
|
+
if (socket !== current) return;
|
|
58
|
+
try {
|
|
59
|
+
current.send(
|
|
60
|
+
JSON.stringify({
|
|
61
|
+
type: "hello",
|
|
62
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
63
|
+
...endpoint.credential
|
|
64
|
+
})
|
|
65
|
+
);
|
|
66
|
+
} catch {
|
|
67
|
+
disconnect(new Error("Control Center connection closed during authentication."));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
current.on("message", (data) => {
|
|
71
|
+
if (socket !== current) return;
|
|
72
|
+
let frame;
|
|
73
|
+
try {
|
|
74
|
+
const value = JSON.parse(
|
|
75
|
+
data instanceof ArrayBuffer ? new TextDecoder().decode(data) : String(data)
|
|
76
|
+
);
|
|
77
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return;
|
|
78
|
+
frame = value;
|
|
79
|
+
} catch {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (frame.type === "rejected") {
|
|
83
|
+
disconnect(
|
|
84
|
+
new Error(
|
|
85
|
+
frame.reason === "auth" ? "Control Center authentication failed. Reconnect to the daemon." : "Control Center requires matching client and daemon versions. Update or restart the daemon."
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
} else if (frame.type === "welcome") {
|
|
89
|
+
if (frame.protocolVersion !== PROTOCOL_VERSION) {
|
|
90
|
+
disconnect(
|
|
91
|
+
new Error(
|
|
92
|
+
"Control Center requires matching client and daemon versions. Update or restart the daemon."
|
|
93
|
+
)
|
|
94
|
+
);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
clearTimeout(handshakeTimer);
|
|
98
|
+
rejectConnection = void 0;
|
|
99
|
+
resolve(current);
|
|
100
|
+
} else if (frame.type === "ack" && typeof frame.id === "string") {
|
|
101
|
+
const entry = pending.get(frame.id);
|
|
102
|
+
if (!entry) return;
|
|
103
|
+
pending.delete(frame.id);
|
|
104
|
+
clearTimeout(entry.timer);
|
|
105
|
+
if (frame.ok === true && Object.hasOwn(frame, "result")) {
|
|
106
|
+
entry.resolve(frame.result);
|
|
107
|
+
} else {
|
|
108
|
+
const error = frame.error;
|
|
109
|
+
const unsupported = ["unknown-command", "not-attached"].includes(error?.code ?? "") || error?.code === "unsupported" && error.message === "Control Center is unavailable. Update or restart the daemon.";
|
|
110
|
+
entry.reject(
|
|
111
|
+
new Error(
|
|
112
|
+
unsupported ? CONTROL_CENTER_UNSUPPORTED : error?.message ?? "Control Center request failed."
|
|
113
|
+
)
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
current.on("close", () => {
|
|
119
|
+
if (socket === current) disconnect(new Error("Control Center connection closed."));
|
|
120
|
+
});
|
|
121
|
+
current.on("error", () => {
|
|
122
|
+
if (socket === current)
|
|
123
|
+
disconnect(new Error("Control Center connection closed after a network error."));
|
|
124
|
+
});
|
|
125
|
+
}).catch((error) => {
|
|
126
|
+
if (rejectConnection === reject)
|
|
127
|
+
disconnect(error instanceof Error ? error : new Error(String(error)));
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
return connecting;
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
async request(input) {
|
|
134
|
+
const current = await connect();
|
|
135
|
+
if (closed || socket !== current) throw new Error("Control Center connection is closed.");
|
|
136
|
+
return new Promise((resolve, reject) => {
|
|
137
|
+
const id = `control-center-${++sequence}`;
|
|
138
|
+
const timer = setTimeout(
|
|
139
|
+
() => {
|
|
140
|
+
pending.delete(id);
|
|
141
|
+
reject(
|
|
142
|
+
new Error(
|
|
143
|
+
"Control Center request timed out. Check the daemon connection before trying again."
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
},
|
|
147
|
+
input.operation === "runConsolidate" ? Math.max(timeoutMs, 6e4) : timeoutMs
|
|
148
|
+
);
|
|
149
|
+
pending.set(id, { resolve, reject, timer });
|
|
150
|
+
try {
|
|
151
|
+
current.send(JSON.stringify({ id, type: "control-center", input }));
|
|
152
|
+
} catch {
|
|
153
|
+
disconnect(new Error("Control Center connection closed while sending a request."));
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
close() {
|
|
158
|
+
if (closed) return;
|
|
159
|
+
closed = true;
|
|
160
|
+
disconnect(new Error("Control Center connection is closed."));
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
10
164
|
|
|
11
165
|
// src/client/endpoint.ts
|
|
12
166
|
var TerminalEndpointError = class extends Error {
|
|
@@ -185,6 +339,27 @@ function createHttpDataClient(options = {}) {
|
|
|
185
339
|
const body = await response.json();
|
|
186
340
|
return { url: body.wsUrl, credential: { grant: body.grant } };
|
|
187
341
|
},
|
|
342
|
+
async removeDaemon(daemonId) {
|
|
343
|
+
const token = options.getToken ? await options.getToken() : null;
|
|
344
|
+
const response = await fetchImpl(`${baseUrl}/api/daemons/${encodeURIComponent(daemonId)}`, {
|
|
345
|
+
method: "DELETE",
|
|
346
|
+
cache: "no-store",
|
|
347
|
+
headers: token !== null ? { Authorization: `Bearer ${token}` } : {}
|
|
348
|
+
});
|
|
349
|
+
if (response.status === 401) {
|
|
350
|
+
options.onUnauthorized?.();
|
|
351
|
+
throw new TerminalEndpointError("unauthorized", "Signed out \u2014 authentication required.");
|
|
352
|
+
}
|
|
353
|
+
if (response.status === 404) {
|
|
354
|
+
rows.delete(daemonId);
|
|
355
|
+
throw new TerminalEndpointError(
|
|
356
|
+
"daemon-revoked",
|
|
357
|
+
`Daemon "${daemonId}" is no longer registered.`
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
if (!response.ok) await throwFromResponse(response, `Failed to remove daemon "${daemonId}"`);
|
|
361
|
+
rows.delete(daemonId);
|
|
362
|
+
},
|
|
188
363
|
async fetchTranscript(daemonId, identity) {
|
|
189
364
|
const suffix = `/transcript/${encodeURIComponent(identity.sessionId)}${queryString({
|
|
190
365
|
workspace: identity.workspace,
|
|
@@ -206,7 +381,8 @@ function createHttpDataClient(options = {}) {
|
|
|
206
381
|
cwd: opts?.cwd,
|
|
207
382
|
limit: opts?.limit,
|
|
208
383
|
cursor: opts?.cursor,
|
|
209
|
-
includeExtraction: opts?.includeExtraction === true ? "true" : void 0
|
|
384
|
+
includeExtraction: opts?.includeExtraction === true ? "true" : void 0,
|
|
385
|
+
includeActive: opts?.includeActive === true ? "true" : void 0
|
|
210
386
|
})}`;
|
|
211
387
|
const response = await daemonFetch(daemonId, suffix);
|
|
212
388
|
if (!response.ok)
|
|
@@ -220,7 +396,8 @@ function createHttpDataClient(options = {}) {
|
|
|
220
396
|
profile: opts?.profile,
|
|
221
397
|
currentCwd: opts?.currentCwd,
|
|
222
398
|
query: opts?.query,
|
|
223
|
-
includeExtraction: opts?.includeExtraction === true ? "true" : void 0
|
|
399
|
+
includeExtraction: opts?.includeExtraction === true ? "true" : void 0,
|
|
400
|
+
includeActive: opts?.includeActive === true ? "true" : void 0
|
|
224
401
|
})}`;
|
|
225
402
|
const response = await daemonFetch(daemonId, suffix, { signal: opts?.signal });
|
|
226
403
|
if (!response.ok)
|
|
@@ -237,7 +414,8 @@ function createHttpDataClient(options = {}) {
|
|
|
237
414
|
query: opts?.query,
|
|
238
415
|
limit: opts?.limit,
|
|
239
416
|
cursor: opts?.cursor,
|
|
240
|
-
includeExtraction: opts?.includeExtraction === true ? "true" : void 0
|
|
417
|
+
includeExtraction: opts?.includeExtraction === true ? "true" : void 0,
|
|
418
|
+
includeActive: opts?.includeActive === true ? "true" : void 0
|
|
241
419
|
})}`;
|
|
242
420
|
const response = await daemonFetch(daemonId, suffix, { signal: opts?.signal });
|
|
243
421
|
if (!response.ok)
|
|
@@ -279,6 +457,22 @@ function createHttpDataClient(options = {}) {
|
|
|
279
457
|
}
|
|
280
458
|
if (!response.ok) await throwFromResponse(response, "Failed to delete the session");
|
|
281
459
|
},
|
|
460
|
+
async controlCenter(daemonId, input) {
|
|
461
|
+
const response = await daemonFetch(daemonId, "/control-center", {
|
|
462
|
+
method: "POST",
|
|
463
|
+
headers: { "Content-Type": "application/json" },
|
|
464
|
+
body: JSON.stringify(input)
|
|
465
|
+
});
|
|
466
|
+
if (response.status === 404) {
|
|
467
|
+
const body = await response.json().catch(() => null);
|
|
468
|
+
if (body?.code === "not-found" && typeof body.message === "string" && body.message !== "Not found.") {
|
|
469
|
+
throw new Error(body.message);
|
|
470
|
+
}
|
|
471
|
+
throw new Error(CONTROL_CENTER_UNSUPPORTED);
|
|
472
|
+
}
|
|
473
|
+
if (!response.ok) await throwFromResponse(response, "Failed to update Control Center");
|
|
474
|
+
return await response.json();
|
|
475
|
+
},
|
|
282
476
|
async listProfiles(daemonId) {
|
|
283
477
|
const response = await daemonFetch(daemonId, "/profiles");
|
|
284
478
|
if (!response.ok) {
|
|
@@ -368,6 +562,19 @@ function createHttpDataClient(options = {}) {
|
|
|
368
562
|
if (!response.ok) await throwFromResponse(response, "Failed to update workspace");
|
|
369
563
|
return await response.json();
|
|
370
564
|
},
|
|
565
|
+
async getModelReasoningCapability(daemonId, input) {
|
|
566
|
+
const suffix = `/model-reasoning-capability${queryString({
|
|
567
|
+
profile: input.profile,
|
|
568
|
+
selector: input.selector
|
|
569
|
+
})}`;
|
|
570
|
+
const response = await daemonFetch(daemonId, suffix);
|
|
571
|
+
if (!response.ok) {
|
|
572
|
+
await throwFromResponse(response, "Failed to load model reasoning capability", {
|
|
573
|
+
404: { reason: "daemon-revoked", message: "This daemon is no longer registered." }
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
return await response.json();
|
|
577
|
+
},
|
|
371
578
|
async listAgentModelSets(daemonId, input) {
|
|
372
579
|
const suffix = `/agent-model-sets${queryString({
|
|
373
580
|
profile: input.profile,
|
|
@@ -545,6 +752,13 @@ function toBackgroundWorkInspection(result) {
|
|
|
545
752
|
throw new SessionCommandError("invalid-result", "Invalid managed work inspection.");
|
|
546
753
|
}
|
|
547
754
|
}
|
|
755
|
+
function toBackgroundWorkCancellation(result) {
|
|
756
|
+
try {
|
|
757
|
+
return parseBackgroundWorkCancellation(result);
|
|
758
|
+
} catch {
|
|
759
|
+
throw new SessionCommandError("invalid-result", "Invalid managed work cancellation.");
|
|
760
|
+
}
|
|
761
|
+
}
|
|
548
762
|
function isRecord(value) {
|
|
549
763
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
550
764
|
}
|
|
@@ -653,6 +867,14 @@ function createSessionClient(transport) {
|
|
|
653
867
|
}
|
|
654
868
|
return;
|
|
655
869
|
}
|
|
870
|
+
if (frame.type === "submission-retracted") {
|
|
871
|
+
try {
|
|
872
|
+
if (parseAbortRecoveryResult(frame.result).status !== "retracted" || !Array.isArray(frame.removedMessageIds) || !frame.removedMessageIds.every((id) => typeof id === "string"))
|
|
873
|
+
return;
|
|
874
|
+
} catch {
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
656
878
|
state = reduceSessionEvent(state, frame);
|
|
657
879
|
seq = frame.seq;
|
|
658
880
|
for (const listener of eventListeners) {
|
|
@@ -702,6 +924,7 @@ function createSessionClient(transport) {
|
|
|
702
924
|
type: "submit",
|
|
703
925
|
input,
|
|
704
926
|
displayText: opts.displayText,
|
|
927
|
+
...opts.human === void 0 ? {} : { human: structuredClone(opts.human) },
|
|
705
928
|
...opts.attachmentLabels?.length ? { attachmentLabels: opts.attachmentLabels } : {},
|
|
706
929
|
...opts.turnId !== void 0 ? { turnId: opts.turnId } : {}
|
|
707
930
|
})).then(() => {
|
|
@@ -741,6 +964,19 @@ function createSessionClient(transport) {
|
|
|
741
964
|
})).then(() => {
|
|
742
965
|
});
|
|
743
966
|
},
|
|
967
|
+
async abortWithRecovery(request) {
|
|
968
|
+
const captured = parseAbortRecoveryRequest(request);
|
|
969
|
+
const result = await sendCommand((id) => ({
|
|
970
|
+
id,
|
|
971
|
+
type: "abort-with-recovery",
|
|
972
|
+
request: captured
|
|
973
|
+
}));
|
|
974
|
+
try {
|
|
975
|
+
return parseAbortRecoveryResult(result, captured);
|
|
976
|
+
} catch {
|
|
977
|
+
throw new SessionCommandError("invalid-result", "Invalid abort recovery result.");
|
|
978
|
+
}
|
|
979
|
+
},
|
|
744
980
|
abort() {
|
|
745
981
|
return sendCommand((id) => ({ id, type: "abort" })).then(() => {
|
|
746
982
|
});
|
|
@@ -749,8 +985,13 @@ function createSessionClient(transport) {
|
|
|
749
985
|
return sendCommand((id) => ({ id, type: "dequeue", queuedId })).then(() => {
|
|
750
986
|
});
|
|
751
987
|
},
|
|
752
|
-
runSlashCommand(raw) {
|
|
753
|
-
return sendCommand((id) => ({
|
|
988
|
+
runSlashCommand(raw, human) {
|
|
989
|
+
return sendCommand((id) => ({
|
|
990
|
+
id,
|
|
991
|
+
type: "slash-command",
|
|
992
|
+
raw,
|
|
993
|
+
...human === void 0 ? {} : { human: structuredClone(human) }
|
|
994
|
+
})).then(() => {
|
|
754
995
|
});
|
|
755
996
|
},
|
|
756
997
|
loadHistory(historyId) {
|
|
@@ -783,6 +1024,13 @@ function createSessionClient(transport) {
|
|
|
783
1024
|
...input.limit === void 0 ? {} : { limit: input.limit }
|
|
784
1025
|
})).then(toBackgroundWorkInspection);
|
|
785
1026
|
},
|
|
1027
|
+
cancelBackgroundWork(input) {
|
|
1028
|
+
return sendCommand((id) => ({
|
|
1029
|
+
id,
|
|
1030
|
+
type: "cancel-background-work",
|
|
1031
|
+
workId: input.workId
|
|
1032
|
+
})).then(toBackgroundWorkCancellation);
|
|
1033
|
+
},
|
|
786
1034
|
serverCommands() {
|
|
787
1035
|
return serverCommandList;
|
|
788
1036
|
},
|
|
@@ -1125,6 +1373,11 @@ function createWebSocketTransport(options) {
|
|
|
1125
1373
|
return;
|
|
1126
1374
|
}
|
|
1127
1375
|
if (phase === "awaiting-attach") {
|
|
1376
|
+
if (message.type === "ack" && message.id === `attach-${attachCounter}` && message.ok === false) {
|
|
1377
|
+
terminate();
|
|
1378
|
+
options.onDetached?.(`Attach failed: ${message.error?.message ?? "Session unavailable."}`);
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1128
1381
|
if (message.type === "replay") {
|
|
1129
1382
|
for (const event of message.events) {
|
|
1130
1383
|
lastSeq = event.seq;
|
|
@@ -1260,6 +1513,7 @@ function throwCollectedErrors(errors, message) {
|
|
|
1260
1513
|
}
|
|
1261
1514
|
function bindDaemonDataClient(client, daemonId) {
|
|
1262
1515
|
return {
|
|
1516
|
+
controlCenter: (input) => client.controlCenter(daemonId, input),
|
|
1263
1517
|
fetchTranscript: (identity) => client.fetchTranscript(daemonId, identity),
|
|
1264
1518
|
fetchHistory: (opts) => client.fetchHistory(daemonId, opts),
|
|
1265
1519
|
listHistoryWorkspaces: (opts) => client.listHistoryWorkspaces(daemonId, opts),
|
|
@@ -1275,6 +1529,7 @@ function bindDaemonDataClient(client, daemonId) {
|
|
|
1275
1529
|
setProviderAuth: (providerId, credential, opts) => client.setProviderAuth(daemonId, providerId, credential, opts),
|
|
1276
1530
|
clearProviderAuth: (providerId, opts) => client.clearProviderAuth(daemonId, providerId, opts),
|
|
1277
1531
|
updateWorkspace: (name, patch) => client.updateWorkspace(daemonId, name, patch),
|
|
1532
|
+
getModelReasoningCapability: (input) => client.getModelReasoningCapability(daemonId, input),
|
|
1278
1533
|
listAgentModelSets: (input) => client.listAgentModelSets(daemonId, input),
|
|
1279
1534
|
createAgentModelSet: (input) => client.createAgentModelSet(daemonId, input),
|
|
1280
1535
|
replaceAgentModelSet: (input) => client.replaceAgentModelSet(daemonId, input),
|
|
@@ -1405,9 +1660,11 @@ function createDaemonClient(target, deps = {}) {
|
|
|
1405
1660
|
};
|
|
1406
1661
|
}
|
|
1407
1662
|
};
|
|
1663
|
+
const management = target.kind === "relay" ? createControlCenterSocketClient({ getEndpoint: acquireEndpoint, socketFactory }) : void 0;
|
|
1664
|
+
const boundData = bindDaemonDataClient(dataClient, target.id);
|
|
1408
1665
|
return {
|
|
1409
1666
|
target,
|
|
1410
|
-
data:
|
|
1667
|
+
data: management ? { ...boundData, controlCenter: (input) => management.request(input) } : boundData,
|
|
1411
1668
|
directoryEndpoint() {
|
|
1412
1669
|
requireOpen();
|
|
1413
1670
|
return { name: target.name, ...endpointConfig(directorySocketFactory) };
|
|
@@ -1449,6 +1706,11 @@ function createDaemonClient(target, deps = {}) {
|
|
|
1449
1706
|
if (closed) return;
|
|
1450
1707
|
closed = true;
|
|
1451
1708
|
const errors = [];
|
|
1709
|
+
try {
|
|
1710
|
+
management?.close();
|
|
1711
|
+
} catch (error) {
|
|
1712
|
+
errors.push(error);
|
|
1713
|
+
}
|
|
1452
1714
|
for (const connection of [...connections]) {
|
|
1453
1715
|
try {
|
|
1454
1716
|
connection.close();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AgentInput, AskUserAnswers } from "@nuvin/agent-core/shared";
|
|
2
|
-
import type { AgentCatalogEntry, AgentDetail, AgentEditorData, AgentEditorDefinition, AgentModelSetSelectionResult, AgentMutationResult, BackgroundWorkInspection, BackgroundWorkPage, CommandDetail, ConfigPatch, ConsolidateProposalDetail, ConsolidateProposalSummary, ConsolidateRunOutcome, CustomProviderInput, DeleteAgentResult, GrantCapability, McpAction, McpActionResult, McpServerInfo, MemoryExtractSummary, PersistBashPermissionRequest, PersistBashPermissionResult, ServerEvent, SessionViewState, SetConfigResult, SkillCatalogEntry, SkillDetail, SlashCommandCompletion, SlashCommandDescriptor, WorkspaceMemoryDetail, WorkspaceMemorySummary } from "../protocol/types.ts";
|
|
2
|
+
import type { AbortRecoveryRequest, AbortRecoveryResult, AgentCatalogEntry, AgentDetail, AgentEditorData, AgentEditorDefinition, AgentModelSetSelectionResult, AgentMutationResult, BackgroundWorkCancellationResult, BackgroundWorkInspection, BackgroundWorkPage, CommandDetail, ConfigPatch, ConsolidateProposalDetail, ConsolidateProposalSummary, ConsolidateRunOutcome, CustomProviderInput, DeleteAgentResult, GrantCapability, McpAction, McpActionResult, McpServerInfo, MemoryExtractSummary, PersistBashPermissionRequest, PersistBashPermissionResult, ServerEvent, SessionViewState, SetConfigResult, SkillCatalogEntry, SkillDetail, SlashCommandCompletion, SlashCommandDescriptor, WorkspaceMemoryDetail, WorkspaceMemorySummary } from "../protocol/types.ts";
|
|
3
3
|
import type { ClientTransport } from "./transport.ts";
|
|
4
4
|
export type ClientSubmitOptions = {
|
|
5
|
+
human?: import("../protocol/types.ts").HumanSubmissionRequest;
|
|
5
6
|
displayText: string;
|
|
6
7
|
attachmentLabels?: string[];
|
|
7
8
|
turnId?: string;
|
|
@@ -22,9 +23,10 @@ export interface SessionClient {
|
|
|
22
23
|
persistBashPermission(toolCallId: string, request: PersistBashPermissionRequest, toolCallPath?: readonly string[]): Promise<PersistBashPermissionResult>;
|
|
23
24
|
answerQuestion(questionId: string, answers: AskUserAnswers, toolCallPath?: readonly string[]): Promise<void>;
|
|
24
25
|
abort(): Promise<void>;
|
|
26
|
+
abortWithRecovery(request: AbortRecoveryRequest): Promise<AbortRecoveryResult>;
|
|
25
27
|
/** Cancel a queued (not-yet-running) message by its `turn-status.queued` id. */
|
|
26
28
|
dequeueMessage(queuedId: string): Promise<void>;
|
|
27
|
-
runSlashCommand(raw: string): Promise<void>;
|
|
29
|
+
runSlashCommand(raw: string, human?: import("../protocol/types.ts").HumanSubmissionRequest): Promise<void>;
|
|
28
30
|
/**
|
|
29
31
|
* Resume a persisted transcript into this session (spec §4.4 load-history —
|
|
30
32
|
* the picker's Local resume path). The host loads the transcript and
|
|
@@ -50,6 +52,10 @@ export interface SessionClient {
|
|
|
50
52
|
offset?: number;
|
|
51
53
|
limit?: number;
|
|
52
54
|
}): Promise<BackgroundWorkInspection>;
|
|
55
|
+
/** Cancel one managed-work item owned by the attached session. */
|
|
56
|
+
cancelBackgroundWork(input: {
|
|
57
|
+
workId: string;
|
|
58
|
+
}): Promise<BackgroundWorkCancellationResult>;
|
|
53
59
|
/** Server-executed slash command descriptors from the attach snapshot. */
|
|
54
60
|
serverCommands(): SlashCommandDescriptor[];
|
|
55
61
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-client.d.ts","sourceRoot":"","sources":["../../src/client/session-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"session-client.d.ts","sourceRoot":"","sources":["../../src/client/session-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAWtF,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,4BAA4B,EAC5B,mBAAmB,EACnB,gCAAgC,EAChC,wBAAwB,EACxB,kBAAkB,EAElB,aAAa,EACb,WAAW,EACX,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,sBAAsB,EAEtB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,OAAO,sBAAsB,EAAE,sBAAsB,CAAC;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAQF;;;;GAIG;AAC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EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjF,wEAAwE;IACxE,wBAAwB,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;IAClE,kDAAkD;IAClD,yBAAyB,CACvB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,SAAS,GAAG,QAAQ,EAC9B,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,GACvC,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,qEAAqE;IACrE,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC/E,uEAAuE;IACvE,YAAY,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAChD;;;;OAIG;IACH,cAAc,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACjD;;;OAGG;IACH,yBAAyB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC5D;;;OAGG;IACH,YAAY,IAAI,SAAS,eAAe,EAAE,CAAC;IAC3C;;;OAGG;IACH,iBAAiB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,KAAK,IAAI,IAAI,CAAC;CACf;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAE1C,QAAQ,CAAC,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB;AAmTD,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,CAib7E"}
|
|
@@ -33,7 +33,7 @@ export type WebSocketTransportOptions = {
|
|
|
33
33
|
backoffFactor?: number;
|
|
34
34
|
/** Handshake refused (bad token / protocol mismatch). Terminal — retrying cannot fix it. */
|
|
35
35
|
onRejected?: (reason: "auth" | "version") => void;
|
|
36
|
-
/** The daemon detached this client (e.g. kill-session). Terminal. */
|
|
36
|
+
/** The daemon refused attachment or detached this client (e.g. kill-session). Terminal. */
|
|
37
37
|
onDetached?: (reason: string) => void;
|
|
38
38
|
};
|
|
39
39
|
export interface WebSocketClientTransport extends ClientTransport {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/client/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,WAAW,EAAiD,MAAM,eAAe,CAAC;AAChG,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,WAAW,GAAG,cAAc,GAAG,WAAW,CAAC;AAE5F,MAAM,MAAM,yBAAyB,GAAG;IACtC,iHAAiH;IACjH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0GAA0G;IAC1G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,mGAAmG;IACnG,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,eAAe,CAAC;IACjD,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAClD,
|
|
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