@dexto/server 1.6.25 → 1.6.27
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/approval/approval-coordinator.cjs +11 -5
- package/dist/approval/approval-coordinator.d.ts +2 -1
- package/dist/approval/approval-coordinator.d.ts.map +1 -1
- package/dist/approval/approval-coordinator.js +11 -5
- package/dist/approval/manual-approval-handler.cjs +3 -0
- package/dist/approval/manual-approval-handler.d.ts.map +1 -1
- package/dist/approval/manual-approval-handler.js +3 -0
- package/dist/events/session-sse-subscriber.cjs +44 -42
- package/dist/events/session-sse-subscriber.d.ts.map +1 -1
- package/dist/events/session-sse-subscriber.js +44 -42
- package/dist/hono/__tests__/test-fixtures.cjs +1 -0
- package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
- package/dist/hono/__tests__/test-fixtures.js +1 -0
- package/dist/hono/routes/agents.d.ts +12 -12
- package/dist/hono/routes/approvals.cjs +2 -0
- package/dist/hono/routes/approvals.d.ts +8 -8
- package/dist/hono/routes/approvals.d.ts.map +1 -1
- package/dist/hono/routes/approvals.js +2 -0
- package/dist/hono/routes/mcp.d.ts +32 -32
- package/dist/hono/routes/messages.cjs +6 -2
- package/dist/hono/routes/messages.d.ts +18 -0
- package/dist/hono/routes/messages.d.ts.map +1 -1
- package/dist/hono/routes/messages.js +7 -3
- package/dist/hono/routes/queue.d.ts +3 -3
- package/package.json +7 -7
|
@@ -23,14 +23,17 @@ __export(approval_coordinator_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(approval_coordinator_exports);
|
|
24
24
|
var import_node_events = require("node:events");
|
|
25
25
|
class ApprovalCoordinator extends import_node_events.EventEmitter {
|
|
26
|
-
// Track approvalId ->
|
|
27
|
-
|
|
26
|
+
// Track approvalId -> request context mapping for multi-client routing and correlation.
|
|
27
|
+
approvalContexts = /* @__PURE__ */ new Map();
|
|
28
28
|
/**
|
|
29
29
|
* Emit an approval request.
|
|
30
30
|
* Called by ManualApprovalHandler when tool/command needs approval.
|
|
31
31
|
*/
|
|
32
32
|
emitRequest(request) {
|
|
33
|
-
this.
|
|
33
|
+
this.approvalContexts.set(request.approvalId, {
|
|
34
|
+
sessionId: request.sessionId,
|
|
35
|
+
hostRuntime: request.hostRuntime
|
|
36
|
+
});
|
|
34
37
|
this.emit("approval:request", request);
|
|
35
38
|
}
|
|
36
39
|
/**
|
|
@@ -39,14 +42,17 @@ class ApprovalCoordinator extends import_node_events.EventEmitter {
|
|
|
39
42
|
*/
|
|
40
43
|
emitResponse(response) {
|
|
41
44
|
this.emit("approval:response", response);
|
|
42
|
-
this.
|
|
45
|
+
this.approvalContexts.delete(response.approvalId);
|
|
43
46
|
}
|
|
44
47
|
/**
|
|
45
48
|
* Get the sessionId associated with an approval request.
|
|
46
49
|
* Used by API routes to attach sessionId to responses for SSE routing.
|
|
47
50
|
*/
|
|
48
51
|
getSessionId(approvalId) {
|
|
49
|
-
return this.
|
|
52
|
+
return this.approvalContexts.get(approvalId)?.sessionId;
|
|
53
|
+
}
|
|
54
|
+
getHostRuntime(approvalId) {
|
|
55
|
+
return this.approvalContexts.get(approvalId)?.hostRuntime;
|
|
50
56
|
}
|
|
51
57
|
/**
|
|
52
58
|
* Subscribe to approval requests.
|
|
@@ -12,7 +12,7 @@ import type { ApprovalRequest, ApprovalResponse } from '@dexto/core';
|
|
|
12
12
|
* - Approval routes: Emits responses from client submissions
|
|
13
13
|
*/
|
|
14
14
|
export declare class ApprovalCoordinator extends EventEmitter {
|
|
15
|
-
private
|
|
15
|
+
private approvalContexts;
|
|
16
16
|
/**
|
|
17
17
|
* Emit an approval request.
|
|
18
18
|
* Called by ManualApprovalHandler when tool/command needs approval.
|
|
@@ -28,6 +28,7 @@ export declare class ApprovalCoordinator extends EventEmitter {
|
|
|
28
28
|
* Used by API routes to attach sessionId to responses for SSE routing.
|
|
29
29
|
*/
|
|
30
30
|
getSessionId(approvalId: string): string | undefined;
|
|
31
|
+
getHostRuntime(approvalId: string): ApprovalRequest['hostRuntime'] | undefined;
|
|
31
32
|
/**
|
|
32
33
|
* Subscribe to approval requests.
|
|
33
34
|
* Used by streaming endpoints to forward requests to SSE clients.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval-coordinator.d.ts","sourceRoot":"","sources":["../../src/approval/approval-coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAErE;;;;;;;;;;GAUG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IAEjD,OAAO,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"approval-coordinator.d.ts","sourceRoot":"","sources":["../../src/approval/approval-coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAErE;;;;;;;;;;GAUG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IAEjD,OAAO,CAAC,gBAAgB,CAGpB;IAEJ;;;OAGG;IACI,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IASlD;;;OAGG;IACI,YAAY,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAMrD;;;OAGG;IACI,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIpD,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,CAAC,aAAa,CAAC,GAAG,SAAS;IAIrF;;;;;;OAMG;IACI,SAAS,CACZ,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,EAC3C,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnC,IAAI;IAYP;;;;;;OAMG;IACI,UAAU,CACb,OAAO,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,EAC7C,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnC,IAAI;CAWV"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
2
|
class ApprovalCoordinator extends EventEmitter {
|
|
3
|
-
// Track approvalId ->
|
|
4
|
-
|
|
3
|
+
// Track approvalId -> request context mapping for multi-client routing and correlation.
|
|
4
|
+
approvalContexts = /* @__PURE__ */ new Map();
|
|
5
5
|
/**
|
|
6
6
|
* Emit an approval request.
|
|
7
7
|
* Called by ManualApprovalHandler when tool/command needs approval.
|
|
8
8
|
*/
|
|
9
9
|
emitRequest(request) {
|
|
10
|
-
this.
|
|
10
|
+
this.approvalContexts.set(request.approvalId, {
|
|
11
|
+
sessionId: request.sessionId,
|
|
12
|
+
hostRuntime: request.hostRuntime
|
|
13
|
+
});
|
|
11
14
|
this.emit("approval:request", request);
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
@@ -16,14 +19,17 @@ class ApprovalCoordinator extends EventEmitter {
|
|
|
16
19
|
*/
|
|
17
20
|
emitResponse(response) {
|
|
18
21
|
this.emit("approval:response", response);
|
|
19
|
-
this.
|
|
22
|
+
this.approvalContexts.delete(response.approvalId);
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
25
|
* Get the sessionId associated with an approval request.
|
|
23
26
|
* Used by API routes to attach sessionId to responses for SSE routing.
|
|
24
27
|
*/
|
|
25
28
|
getSessionId(approvalId) {
|
|
26
|
-
return this.
|
|
29
|
+
return this.approvalContexts.get(approvalId)?.sessionId;
|
|
30
|
+
}
|
|
31
|
+
getHostRuntime(approvalId) {
|
|
32
|
+
return this.approvalContexts.get(approvalId)?.hostRuntime;
|
|
27
33
|
}
|
|
28
34
|
/**
|
|
29
35
|
* Subscribe to approval requests.
|
|
@@ -36,6 +36,7 @@ function createManualApprovalHandler(coordinator) {
|
|
|
36
36
|
approvalId: request.approvalId,
|
|
37
37
|
status: import_core.ApprovalStatus.CANCELLED,
|
|
38
38
|
sessionId: request.sessionId,
|
|
39
|
+
hostRuntime: request.hostRuntime,
|
|
39
40
|
reason: import_core.DenialReason.TIMEOUT,
|
|
40
41
|
message: `Approval request timed out after ${effectiveTimeout}ms`,
|
|
41
42
|
timeoutMs: effectiveTimeout
|
|
@@ -81,6 +82,7 @@ function createManualApprovalHandler(coordinator) {
|
|
|
81
82
|
approvalId,
|
|
82
83
|
status: import_core.ApprovalStatus.CANCELLED,
|
|
83
84
|
sessionId: pending.request.sessionId,
|
|
85
|
+
hostRuntime: pending.request.hostRuntime,
|
|
84
86
|
reason: import_core.DenialReason.SYSTEM_CANCELLED,
|
|
85
87
|
message: "Approval request was cancelled"
|
|
86
88
|
};
|
|
@@ -114,6 +116,7 @@ function createManualApprovalHandler(coordinator) {
|
|
|
114
116
|
approvalId,
|
|
115
117
|
status: import_core.ApprovalStatus.APPROVED,
|
|
116
118
|
sessionId: pending.request.sessionId,
|
|
119
|
+
hostRuntime: pending.request.hostRuntime,
|
|
117
120
|
message: "Auto-approved due to matching remembered pattern",
|
|
118
121
|
data: responseData
|
|
119
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-approval-handler.d.ts","sourceRoot":"","sources":["../../src/approval/manual-approval-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqC,MAAM,aAAa,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,mBAAmB,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"manual-approval-handler.d.ts","sourceRoot":"","sources":["../../src/approval/manual-approval-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqC,MAAM,aAAa,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,mBAAmB,GAAG,eAAe,CAqK7F"}
|
|
@@ -13,6 +13,7 @@ function createManualApprovalHandler(coordinator) {
|
|
|
13
13
|
approvalId: request.approvalId,
|
|
14
14
|
status: ApprovalStatus.CANCELLED,
|
|
15
15
|
sessionId: request.sessionId,
|
|
16
|
+
hostRuntime: request.hostRuntime,
|
|
16
17
|
reason: DenialReason.TIMEOUT,
|
|
17
18
|
message: `Approval request timed out after ${effectiveTimeout}ms`,
|
|
18
19
|
timeoutMs: effectiveTimeout
|
|
@@ -58,6 +59,7 @@ function createManualApprovalHandler(coordinator) {
|
|
|
58
59
|
approvalId,
|
|
59
60
|
status: ApprovalStatus.CANCELLED,
|
|
60
61
|
sessionId: pending.request.sessionId,
|
|
62
|
+
hostRuntime: pending.request.hostRuntime,
|
|
61
63
|
reason: DenialReason.SYSTEM_CANCELLED,
|
|
62
64
|
message: "Approval request was cancelled"
|
|
63
65
|
};
|
|
@@ -91,6 +93,7 @@ function createManualApprovalHandler(coordinator) {
|
|
|
91
93
|
approvalId,
|
|
92
94
|
status: ApprovalStatus.APPROVED,
|
|
93
95
|
sessionId: pending.request.sessionId,
|
|
96
|
+
hostRuntime: pending.request.hostRuntime,
|
|
94
97
|
message: "Auto-approved due to matching remembered pattern",
|
|
95
98
|
data: responseData
|
|
96
99
|
};
|
|
@@ -25,19 +25,39 @@ var import_events = require("events");
|
|
|
25
25
|
var import_node_util = require("node:util");
|
|
26
26
|
var import_web = require("node:stream/web");
|
|
27
27
|
var import_core = require("@dexto/core");
|
|
28
|
+
const SESSION_EVENT_NAMES = [
|
|
29
|
+
"llm:thinking",
|
|
30
|
+
"llm:chunk",
|
|
31
|
+
"llm:response",
|
|
32
|
+
"llm:tool-call",
|
|
33
|
+
"llm:tool-call-partial",
|
|
34
|
+
"llm:tool-result",
|
|
35
|
+
"llm:error",
|
|
36
|
+
"llm:unsupported-input",
|
|
37
|
+
"tool:running",
|
|
38
|
+
"context:compacting",
|
|
39
|
+
"context:compacted",
|
|
40
|
+
"context:pruned",
|
|
41
|
+
"message:queued",
|
|
42
|
+
"message:dequeued",
|
|
43
|
+
"session:title-updated",
|
|
44
|
+
"approval:request",
|
|
45
|
+
"approval:response",
|
|
46
|
+
"service:event",
|
|
47
|
+
"run:complete"
|
|
48
|
+
];
|
|
28
49
|
function serializeEventPayload(eventName, payload) {
|
|
29
|
-
if (eventName === "llm:error") {
|
|
30
|
-
const errorPayload = payload;
|
|
50
|
+
if (eventName === "llm:error" && "error" in payload) {
|
|
31
51
|
return {
|
|
32
|
-
...
|
|
33
|
-
error:
|
|
34
|
-
message:
|
|
35
|
-
name:
|
|
36
|
-
stack:
|
|
37
|
-
} :
|
|
52
|
+
...payload,
|
|
53
|
+
error: payload.error instanceof Error ? {
|
|
54
|
+
message: payload.error.message,
|
|
55
|
+
name: payload.error.name,
|
|
56
|
+
stack: payload.error.stack
|
|
57
|
+
} : payload.error
|
|
38
58
|
};
|
|
39
59
|
}
|
|
40
|
-
return payload;
|
|
60
|
+
return { ...payload };
|
|
41
61
|
}
|
|
42
62
|
class SessionSseEventSubscriber {
|
|
43
63
|
connections = /* @__PURE__ */ new Map();
|
|
@@ -48,40 +68,22 @@ class SessionSseEventSubscriber {
|
|
|
48
68
|
const { signal } = this.globalAbortController;
|
|
49
69
|
(0, import_events.setMaxListeners)(32, signal);
|
|
50
70
|
const subscribeSessionEvent = (eventName) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
((payload)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{ signal }
|
|
64
|
-
);
|
|
71
|
+
const listener = (...args) => {
|
|
72
|
+
const [payload] = args;
|
|
73
|
+
if (!payload || typeof payload !== "object" || !("sessionId" in payload) || typeof payload.sessionId !== "string") {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.broadcastToSession(
|
|
77
|
+
payload.sessionId,
|
|
78
|
+
String(eventName),
|
|
79
|
+
serializeEventPayload(eventName, payload)
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
eventBus.on(eventName, listener, { signal });
|
|
65
83
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
subscribeSessionEvent("llm:tool-call");
|
|
70
|
-
subscribeSessionEvent("llm:tool-call-partial");
|
|
71
|
-
subscribeSessionEvent("llm:tool-result");
|
|
72
|
-
subscribeSessionEvent("llm:error");
|
|
73
|
-
subscribeSessionEvent("llm:unsupported-input");
|
|
74
|
-
subscribeSessionEvent("tool:running");
|
|
75
|
-
subscribeSessionEvent("context:compacting");
|
|
76
|
-
subscribeSessionEvent("context:compacted");
|
|
77
|
-
subscribeSessionEvent("context:pruned");
|
|
78
|
-
subscribeSessionEvent("message:queued");
|
|
79
|
-
subscribeSessionEvent("message:dequeued");
|
|
80
|
-
subscribeSessionEvent("session:title-updated");
|
|
81
|
-
subscribeSessionEvent("approval:request");
|
|
82
|
-
subscribeSessionEvent("approval:response");
|
|
83
|
-
subscribeSessionEvent("service:event");
|
|
84
|
-
subscribeSessionEvent("run:complete");
|
|
84
|
+
for (const eventName of SESSION_EVENT_NAMES) {
|
|
85
|
+
subscribeSessionEvent(eventName);
|
|
86
|
+
}
|
|
85
87
|
import_core.logger.debug("SessionSseEventSubscriber subscribed to agent events");
|
|
86
88
|
}
|
|
87
89
|
createStream(sessionId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-sse-subscriber.d.ts","sourceRoot":"","sources":["../../src/events/session-sse-subscriber.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAwC,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"session-sse-subscriber.d.ts","sourceRoot":"","sources":["../../src/events/session-sse-subscriber.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAwC,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAA2C,MAAM,aAAa,CAAC;AAwD1F,qBAAa,yBAAyB;IAClC,OAAO,CAAC,WAAW,CAA2C;IAC9D,OAAO,CAAC,qBAAqB,CAA8B;IAE3D,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAsCxC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC;IAsC3D,OAAO,CAAC,kBAAkB;IAgC1B,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,cAAc;IAKtB,OAAO,IAAI,IAAI;CASlB"}
|
|
@@ -2,19 +2,39 @@ import { setMaxListeners } from "events";
|
|
|
2
2
|
import { TextEncoder } from "node:util";
|
|
3
3
|
import { ReadableStream } from "node:stream/web";
|
|
4
4
|
import { logger } from "@dexto/core";
|
|
5
|
+
const SESSION_EVENT_NAMES = [
|
|
6
|
+
"llm:thinking",
|
|
7
|
+
"llm:chunk",
|
|
8
|
+
"llm:response",
|
|
9
|
+
"llm:tool-call",
|
|
10
|
+
"llm:tool-call-partial",
|
|
11
|
+
"llm:tool-result",
|
|
12
|
+
"llm:error",
|
|
13
|
+
"llm:unsupported-input",
|
|
14
|
+
"tool:running",
|
|
15
|
+
"context:compacting",
|
|
16
|
+
"context:compacted",
|
|
17
|
+
"context:pruned",
|
|
18
|
+
"message:queued",
|
|
19
|
+
"message:dequeued",
|
|
20
|
+
"session:title-updated",
|
|
21
|
+
"approval:request",
|
|
22
|
+
"approval:response",
|
|
23
|
+
"service:event",
|
|
24
|
+
"run:complete"
|
|
25
|
+
];
|
|
5
26
|
function serializeEventPayload(eventName, payload) {
|
|
6
|
-
if (eventName === "llm:error") {
|
|
7
|
-
const errorPayload = payload;
|
|
27
|
+
if (eventName === "llm:error" && "error" in payload) {
|
|
8
28
|
return {
|
|
9
|
-
...
|
|
10
|
-
error:
|
|
11
|
-
message:
|
|
12
|
-
name:
|
|
13
|
-
stack:
|
|
14
|
-
} :
|
|
29
|
+
...payload,
|
|
30
|
+
error: payload.error instanceof Error ? {
|
|
31
|
+
message: payload.error.message,
|
|
32
|
+
name: payload.error.name,
|
|
33
|
+
stack: payload.error.stack
|
|
34
|
+
} : payload.error
|
|
15
35
|
};
|
|
16
36
|
}
|
|
17
|
-
return payload;
|
|
37
|
+
return { ...payload };
|
|
18
38
|
}
|
|
19
39
|
class SessionSseEventSubscriber {
|
|
20
40
|
connections = /* @__PURE__ */ new Map();
|
|
@@ -25,40 +45,22 @@ class SessionSseEventSubscriber {
|
|
|
25
45
|
const { signal } = this.globalAbortController;
|
|
26
46
|
setMaxListeners(32, signal);
|
|
27
47
|
const subscribeSessionEvent = (eventName) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
((payload)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
{ signal }
|
|
41
|
-
);
|
|
48
|
+
const listener = (...args) => {
|
|
49
|
+
const [payload] = args;
|
|
50
|
+
if (!payload || typeof payload !== "object" || !("sessionId" in payload) || typeof payload.sessionId !== "string") {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.broadcastToSession(
|
|
54
|
+
payload.sessionId,
|
|
55
|
+
String(eventName),
|
|
56
|
+
serializeEventPayload(eventName, payload)
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
eventBus.on(eventName, listener, { signal });
|
|
42
60
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
subscribeSessionEvent("llm:tool-call");
|
|
47
|
-
subscribeSessionEvent("llm:tool-call-partial");
|
|
48
|
-
subscribeSessionEvent("llm:tool-result");
|
|
49
|
-
subscribeSessionEvent("llm:error");
|
|
50
|
-
subscribeSessionEvent("llm:unsupported-input");
|
|
51
|
-
subscribeSessionEvent("tool:running");
|
|
52
|
-
subscribeSessionEvent("context:compacting");
|
|
53
|
-
subscribeSessionEvent("context:compacted");
|
|
54
|
-
subscribeSessionEvent("context:pruned");
|
|
55
|
-
subscribeSessionEvent("message:queued");
|
|
56
|
-
subscribeSessionEvent("message:dequeued");
|
|
57
|
-
subscribeSessionEvent("session:title-updated");
|
|
58
|
-
subscribeSessionEvent("approval:request");
|
|
59
|
-
subscribeSessionEvent("approval:response");
|
|
60
|
-
subscribeSessionEvent("service:event");
|
|
61
|
-
subscribeSessionEvent("run:complete");
|
|
61
|
+
for (const eventName of SESSION_EVENT_NAMES) {
|
|
62
|
+
subscribeSessionEvent(eventName);
|
|
63
|
+
}
|
|
62
64
|
logger.debug("SessionSseEventSubscriber subscribed to agent events");
|
|
63
65
|
}
|
|
64
66
|
createStream(sessionId) {
|
|
@@ -88,6 +88,7 @@ async function createTestAgent(config, options) {
|
|
|
88
88
|
(0, import_agent_config.toDextoAgentOptions)({
|
|
89
89
|
config: validatedConfig,
|
|
90
90
|
services,
|
|
91
|
+
image: import_image_local.default,
|
|
91
92
|
...options?.runtimeOverrides ? { runtimeOverrides: options.runtimeOverrides } : {}
|
|
92
93
|
})
|
|
93
94
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-fixtures.d.ts","sourceRoot":"","sources":["../../../src/hono/__tests__/test-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,WAAW,EACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpE,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AAKtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa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,KAAG,OAAO;4BAET,OAAO,KAAG,OAAO;4BACjB,OAAO,KAAG,OAAO;2BAClB,OAAO,KAAG,OAAO;4BAChB,OAAO,KAAG,OAAO;CAG5C,CAAC"}
|
|
@@ -11671,11 +11671,6 @@ declare const validateConfigRoute: {
|
|
|
11671
11671
|
}>, "many">;
|
|
11672
11672
|
}, "strict", z.ZodTypeAny, {
|
|
11673
11673
|
valid: boolean;
|
|
11674
|
-
warnings: {
|
|
11675
|
-
path: string;
|
|
11676
|
-
code: string;
|
|
11677
|
-
message: string;
|
|
11678
|
-
}[];
|
|
11679
11674
|
errors: z.objectOutputType<{
|
|
11680
11675
|
line: z.ZodOptional<z.ZodNumber>;
|
|
11681
11676
|
column: z.ZodOptional<z.ZodNumber>;
|
|
@@ -11683,13 +11678,13 @@ declare const validateConfigRoute: {
|
|
|
11683
11678
|
message: z.ZodString;
|
|
11684
11679
|
code: z.ZodString;
|
|
11685
11680
|
}, z.ZodTypeAny, "passthrough">[];
|
|
11686
|
-
}, {
|
|
11687
|
-
valid: boolean;
|
|
11688
11681
|
warnings: {
|
|
11689
11682
|
path: string;
|
|
11690
11683
|
code: string;
|
|
11691
11684
|
message: string;
|
|
11692
11685
|
}[];
|
|
11686
|
+
}, {
|
|
11687
|
+
valid: boolean;
|
|
11693
11688
|
errors: z.objectInputType<{
|
|
11694
11689
|
line: z.ZodOptional<z.ZodNumber>;
|
|
11695
11690
|
column: z.ZodOptional<z.ZodNumber>;
|
|
@@ -11697,6 +11692,11 @@ declare const validateConfigRoute: {
|
|
|
11697
11692
|
message: z.ZodString;
|
|
11698
11693
|
code: z.ZodString;
|
|
11699
11694
|
}, z.ZodTypeAny, "passthrough">[];
|
|
11695
|
+
warnings: {
|
|
11696
|
+
path: string;
|
|
11697
|
+
code: string;
|
|
11698
|
+
message: string;
|
|
11699
|
+
}[];
|
|
11700
11700
|
}>;
|
|
11701
11701
|
};
|
|
11702
11702
|
};
|
|
@@ -16013,11 +16013,6 @@ export declare function createAgentsRouter(getAgent: GetAgentFn, context: Agents
|
|
|
16013
16013
|
};
|
|
16014
16014
|
output: {
|
|
16015
16015
|
valid: boolean;
|
|
16016
|
-
warnings: {
|
|
16017
|
-
path: string;
|
|
16018
|
-
code: string;
|
|
16019
|
-
message: string;
|
|
16020
|
-
}[];
|
|
16021
16016
|
errors: {
|
|
16022
16017
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
16023
16018
|
code: string;
|
|
@@ -16026,6 +16021,11 @@ export declare function createAgentsRouter(getAgent: GetAgentFn, context: Agents
|
|
|
16026
16021
|
line?: number | undefined;
|
|
16027
16022
|
column?: number | undefined;
|
|
16028
16023
|
}[];
|
|
16024
|
+
warnings: {
|
|
16025
|
+
path: string;
|
|
16026
|
+
code: string;
|
|
16027
|
+
message: string;
|
|
16028
|
+
}[];
|
|
16029
16029
|
};
|
|
16030
16030
|
outputFormat: "json";
|
|
16031
16031
|
status: 200;
|
|
@@ -256,11 +256,13 @@ function createApprovalsRouter(getAgent, approvalCoordinator) {
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
const sessionId = approvalCoordinator.getSessionId(approvalId);
|
|
259
|
+
const hostRuntime = approvalCoordinator.getHostRuntime(approvalId);
|
|
259
260
|
const responsePayload = {
|
|
260
261
|
approvalId,
|
|
261
262
|
status,
|
|
262
263
|
sessionId,
|
|
263
264
|
// Attach sessionId for SSE routing to correct client streams
|
|
265
|
+
...hostRuntime !== void 0 ? { hostRuntime } : {},
|
|
264
266
|
...status === import_core.ApprovalStatus.DENIED ? {
|
|
265
267
|
reason: reason ?? import_core.DenialReason.USER_DENIED,
|
|
266
268
|
message: message ?? "User denied the request via API"
|
|
@@ -99,10 +99,10 @@ declare const ApprovalBodySchema: z.ZodEffects<z.ZodObject<{
|
|
|
99
99
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
100
100
|
} | null;
|
|
101
101
|
} | undefined;
|
|
102
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
102
103
|
rememberChoice?: boolean | undefined;
|
|
103
104
|
rememberPattern?: string | undefined;
|
|
104
105
|
rememberDirectory?: boolean | undefined;
|
|
105
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
status: "approved" | "denied" | "cancelled";
|
|
108
108
|
message?: string | undefined;
|
|
@@ -133,10 +133,10 @@ declare const ApprovalBodySchema: z.ZodEffects<z.ZodObject<{
|
|
|
133
133
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
134
134
|
} | null;
|
|
135
135
|
} | undefined;
|
|
136
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
136
137
|
rememberChoice?: boolean | undefined;
|
|
137
138
|
rememberPattern?: string | undefined;
|
|
138
139
|
rememberDirectory?: boolean | undefined;
|
|
139
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
140
140
|
}>, {
|
|
141
141
|
status: "approved" | "denied" | "cancelled";
|
|
142
142
|
message?: string | undefined;
|
|
@@ -167,10 +167,10 @@ declare const ApprovalBodySchema: z.ZodEffects<z.ZodObject<{
|
|
|
167
167
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
168
168
|
} | null;
|
|
169
169
|
} | undefined;
|
|
170
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
170
171
|
rememberChoice?: boolean | undefined;
|
|
171
172
|
rememberPattern?: string | undefined;
|
|
172
173
|
rememberDirectory?: boolean | undefined;
|
|
173
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
174
174
|
}, {
|
|
175
175
|
status: "approved" | "denied" | "cancelled";
|
|
176
176
|
message?: string | undefined;
|
|
@@ -201,10 +201,10 @@ declare const ApprovalBodySchema: z.ZodEffects<z.ZodObject<{
|
|
|
201
201
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
202
202
|
} | null;
|
|
203
203
|
} | undefined;
|
|
204
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
204
205
|
rememberChoice?: boolean | undefined;
|
|
205
206
|
rememberPattern?: string | undefined;
|
|
206
207
|
rememberDirectory?: boolean | undefined;
|
|
207
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
208
208
|
}>;
|
|
209
209
|
declare const GetPendingApprovalsQuerySchema: z.ZodObject<{
|
|
210
210
|
sessionId: z.ZodString;
|
|
@@ -1242,10 +1242,10 @@ declare const submitApprovalRoute: {
|
|
|
1242
1242
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1243
1243
|
} | null;
|
|
1244
1244
|
} | undefined;
|
|
1245
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1245
1246
|
rememberChoice?: boolean | undefined;
|
|
1246
1247
|
rememberPattern?: string | undefined;
|
|
1247
1248
|
rememberDirectory?: boolean | undefined;
|
|
1248
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1249
1249
|
}, {
|
|
1250
1250
|
status: "approved" | "denied" | "cancelled";
|
|
1251
1251
|
message?: string | undefined;
|
|
@@ -1276,10 +1276,10 @@ declare const submitApprovalRoute: {
|
|
|
1276
1276
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1277
1277
|
} | null;
|
|
1278
1278
|
} | undefined;
|
|
1279
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1279
1280
|
rememberChoice?: boolean | undefined;
|
|
1280
1281
|
rememberPattern?: string | undefined;
|
|
1281
1282
|
rememberDirectory?: boolean | undefined;
|
|
1282
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1283
1283
|
}>, {
|
|
1284
1284
|
status: "approved" | "denied" | "cancelled";
|
|
1285
1285
|
message?: string | undefined;
|
|
@@ -1310,10 +1310,10 @@ declare const submitApprovalRoute: {
|
|
|
1310
1310
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1311
1311
|
} | null;
|
|
1312
1312
|
} | undefined;
|
|
1313
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1313
1314
|
rememberChoice?: boolean | undefined;
|
|
1314
1315
|
rememberPattern?: string | undefined;
|
|
1315
1316
|
rememberDirectory?: boolean | undefined;
|
|
1316
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1317
1317
|
}, {
|
|
1318
1318
|
status: "approved" | "denied" | "cancelled";
|
|
1319
1319
|
message?: string | undefined;
|
|
@@ -1344,10 +1344,10 @@ declare const submitApprovalRoute: {
|
|
|
1344
1344
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1345
1345
|
} | null;
|
|
1346
1346
|
} | undefined;
|
|
1347
|
+
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1347
1348
|
rememberChoice?: boolean | undefined;
|
|
1348
1349
|
rememberPattern?: string | undefined;
|
|
1349
1350
|
rememberDirectory?: boolean | undefined;
|
|
1350
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1351
1351
|
}>;
|
|
1352
1352
|
};
|
|
1353
1353
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAOlF,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAElE,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoGyC,CAAC;AAwClE,QAAA,MAAM,8BAA8B;;;;;;EAI4B,CAAC;AAEjE,QAAA,MAAM,qBAAqB;;;;;;EAIgB,CAAC;AAE5C,QAAA,MAAM,qBAAqB;;;;;;EAOc,CAAC;AAE1C,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCvB,CAAC;AASH,wBAAgB,qBAAqB,CACjC,QAAQ,EAAE,UAAU,EACpB,mBAAmB,CAAC,EAAE,mBAAmB,GAC1C,WAAW,CAyHb;AAED,KAAK,8BAA8B,GAAG,kBAAkB,CACpD,OAAO,wBAAwB,EAC/B;IAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;CAAE,CAC5D,CAAC;AAEF,KAAK,yBAAyB,GAAG,kBAAkB,CAC/C,OAAO,mBAAmB,EAC1B;IACI,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;CACjD,CACJ,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,8BAA8B,GAAG,yBAAyB,CAAC"}
|
|
@@ -238,11 +238,13 @@ function createApprovalsRouter(getAgent, approvalCoordinator) {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
const sessionId = approvalCoordinator.getSessionId(approvalId);
|
|
241
|
+
const hostRuntime = approvalCoordinator.getHostRuntime(approvalId);
|
|
241
242
|
const responsePayload = {
|
|
242
243
|
approvalId,
|
|
243
244
|
status,
|
|
244
245
|
sessionId,
|
|
245
246
|
// Attach sessionId for SSE routing to correct client streams
|
|
247
|
+
...hostRuntime !== void 0 ? { hostRuntime } : {},
|
|
246
248
|
...status === ApprovalStatus.DENIED ? {
|
|
247
249
|
reason: reason ?? DenialReason.USER_DENIED,
|
|
248
250
|
message: message ?? "User denied the request via API"
|
|
@@ -37,9 +37,9 @@ declare const McpServerRequestSchema: z.ZodObject<{
|
|
|
37
37
|
}, "strict", z.ZodTypeAny, {
|
|
38
38
|
timeout: number;
|
|
39
39
|
type: "sse";
|
|
40
|
+
url: string;
|
|
40
41
|
enabled: boolean;
|
|
41
42
|
connectionMode: "strict" | "lenient";
|
|
42
|
-
url: string;
|
|
43
43
|
headers: Record<string, string>;
|
|
44
44
|
}, {
|
|
45
45
|
type: "sse";
|
|
@@ -58,9 +58,9 @@ declare const McpServerRequestSchema: z.ZodObject<{
|
|
|
58
58
|
}, "strict", z.ZodTypeAny, {
|
|
59
59
|
timeout: number;
|
|
60
60
|
type: "http";
|
|
61
|
+
url: string;
|
|
61
62
|
enabled: boolean;
|
|
62
63
|
connectionMode: "strict" | "lenient";
|
|
63
|
-
url: string;
|
|
64
64
|
headers: Record<string, string>;
|
|
65
65
|
}, {
|
|
66
66
|
type: "http";
|
|
@@ -80,16 +80,16 @@ declare const McpServerRequestSchema: z.ZodObject<{
|
|
|
80
80
|
} | {
|
|
81
81
|
timeout: number;
|
|
82
82
|
type: "sse";
|
|
83
|
+
url: string;
|
|
83
84
|
enabled: boolean;
|
|
84
85
|
connectionMode: "strict" | "lenient";
|
|
85
|
-
url: string;
|
|
86
86
|
headers: Record<string, string>;
|
|
87
87
|
} | {
|
|
88
88
|
timeout: number;
|
|
89
89
|
type: "http";
|
|
90
|
+
url: string;
|
|
90
91
|
enabled: boolean;
|
|
91
92
|
connectionMode: "strict" | "lenient";
|
|
92
|
-
url: string;
|
|
93
93
|
headers: Record<string, string>;
|
|
94
94
|
}, {
|
|
95
95
|
type: "stdio";
|
|
@@ -128,16 +128,16 @@ declare const McpServerRequestSchema: z.ZodObject<{
|
|
|
128
128
|
} | {
|
|
129
129
|
timeout: number;
|
|
130
130
|
type: "sse";
|
|
131
|
+
url: string;
|
|
131
132
|
enabled: boolean;
|
|
132
133
|
connectionMode: "strict" | "lenient";
|
|
133
|
-
url: string;
|
|
134
134
|
headers: Record<string, string>;
|
|
135
135
|
} | {
|
|
136
136
|
timeout: number;
|
|
137
137
|
type: "http";
|
|
138
|
+
url: string;
|
|
138
139
|
enabled: boolean;
|
|
139
140
|
connectionMode: "strict" | "lenient";
|
|
140
|
-
url: string;
|
|
141
141
|
headers: Record<string, string>;
|
|
142
142
|
}) & z.BRAND<"ValidatedMcpServerConfig">;
|
|
143
143
|
persistToAgent?: boolean | undefined;
|
|
@@ -203,9 +203,9 @@ declare const McpServerUpdateSchema: z.ZodObject<{
|
|
|
203
203
|
}, "strict", z.ZodTypeAny, {
|
|
204
204
|
timeout: number;
|
|
205
205
|
type: "sse";
|
|
206
|
+
url: string;
|
|
206
207
|
enabled: boolean;
|
|
207
208
|
connectionMode: "strict" | "lenient";
|
|
208
|
-
url: string;
|
|
209
209
|
headers: Record<string, string>;
|
|
210
210
|
}, {
|
|
211
211
|
type: "sse";
|
|
@@ -224,9 +224,9 @@ declare const McpServerUpdateSchema: z.ZodObject<{
|
|
|
224
224
|
}, "strict", z.ZodTypeAny, {
|
|
225
225
|
timeout: number;
|
|
226
226
|
type: "http";
|
|
227
|
+
url: string;
|
|
227
228
|
enabled: boolean;
|
|
228
229
|
connectionMode: "strict" | "lenient";
|
|
229
|
-
url: string;
|
|
230
230
|
headers: Record<string, string>;
|
|
231
231
|
}, {
|
|
232
232
|
type: "http";
|
|
@@ -246,16 +246,16 @@ declare const McpServerUpdateSchema: z.ZodObject<{
|
|
|
246
246
|
} | {
|
|
247
247
|
timeout: number;
|
|
248
248
|
type: "sse";
|
|
249
|
+
url: string;
|
|
249
250
|
enabled: boolean;
|
|
250
251
|
connectionMode: "strict" | "lenient";
|
|
251
|
-
url: string;
|
|
252
252
|
headers: Record<string, string>;
|
|
253
253
|
} | {
|
|
254
254
|
timeout: number;
|
|
255
255
|
type: "http";
|
|
256
|
+
url: string;
|
|
256
257
|
enabled: boolean;
|
|
257
258
|
connectionMode: "strict" | "lenient";
|
|
258
|
-
url: string;
|
|
259
259
|
headers: Record<string, string>;
|
|
260
260
|
}, {
|
|
261
261
|
type: "stdio";
|
|
@@ -293,16 +293,16 @@ declare const McpServerUpdateSchema: z.ZodObject<{
|
|
|
293
293
|
} | {
|
|
294
294
|
timeout: number;
|
|
295
295
|
type: "sse";
|
|
296
|
+
url: string;
|
|
296
297
|
enabled: boolean;
|
|
297
298
|
connectionMode: "strict" | "lenient";
|
|
298
|
-
url: string;
|
|
299
299
|
headers: Record<string, string>;
|
|
300
300
|
} | {
|
|
301
301
|
timeout: number;
|
|
302
302
|
type: "http";
|
|
303
|
+
url: string;
|
|
303
304
|
enabled: boolean;
|
|
304
305
|
connectionMode: "strict" | "lenient";
|
|
305
|
-
url: string;
|
|
306
306
|
headers: Record<string, string>;
|
|
307
307
|
}) & z.BRAND<"ValidatedMcpServerConfig">;
|
|
308
308
|
persistToAgent?: boolean | undefined;
|
|
@@ -431,9 +431,9 @@ declare const addServerRoute: {
|
|
|
431
431
|
}, "strict", z.ZodTypeAny, {
|
|
432
432
|
timeout: number;
|
|
433
433
|
type: "sse";
|
|
434
|
+
url: string;
|
|
434
435
|
enabled: boolean;
|
|
435
436
|
connectionMode: "strict" | "lenient";
|
|
436
|
-
url: string;
|
|
437
437
|
headers: Record<string, string>;
|
|
438
438
|
}, {
|
|
439
439
|
type: "sse";
|
|
@@ -452,9 +452,9 @@ declare const addServerRoute: {
|
|
|
452
452
|
}, "strict", z.ZodTypeAny, {
|
|
453
453
|
timeout: number;
|
|
454
454
|
type: "http";
|
|
455
|
+
url: string;
|
|
455
456
|
enabled: boolean;
|
|
456
457
|
connectionMode: "strict" | "lenient";
|
|
457
|
-
url: string;
|
|
458
458
|
headers: Record<string, string>;
|
|
459
459
|
}, {
|
|
460
460
|
type: "http";
|
|
@@ -474,16 +474,16 @@ declare const addServerRoute: {
|
|
|
474
474
|
} | {
|
|
475
475
|
timeout: number;
|
|
476
476
|
type: "sse";
|
|
477
|
+
url: string;
|
|
477
478
|
enabled: boolean;
|
|
478
479
|
connectionMode: "strict" | "lenient";
|
|
479
|
-
url: string;
|
|
480
480
|
headers: Record<string, string>;
|
|
481
481
|
} | {
|
|
482
482
|
timeout: number;
|
|
483
483
|
type: "http";
|
|
484
|
+
url: string;
|
|
484
485
|
enabled: boolean;
|
|
485
486
|
connectionMode: "strict" | "lenient";
|
|
486
|
-
url: string;
|
|
487
487
|
headers: Record<string, string>;
|
|
488
488
|
}, {
|
|
489
489
|
type: "stdio";
|
|
@@ -522,16 +522,16 @@ declare const addServerRoute: {
|
|
|
522
522
|
} | {
|
|
523
523
|
timeout: number;
|
|
524
524
|
type: "sse";
|
|
525
|
+
url: string;
|
|
525
526
|
enabled: boolean;
|
|
526
527
|
connectionMode: "strict" | "lenient";
|
|
527
|
-
url: string;
|
|
528
528
|
headers: Record<string, string>;
|
|
529
529
|
} | {
|
|
530
530
|
timeout: number;
|
|
531
531
|
type: "http";
|
|
532
|
+
url: string;
|
|
532
533
|
enabled: boolean;
|
|
533
534
|
connectionMode: "strict" | "lenient";
|
|
534
|
-
url: string;
|
|
535
535
|
headers: Record<string, string>;
|
|
536
536
|
}) & z.BRAND<"ValidatedMcpServerConfig">;
|
|
537
537
|
persistToAgent?: boolean | undefined;
|
|
@@ -1697,9 +1697,9 @@ declare const getServerConfigRoute: {
|
|
|
1697
1697
|
}, "strict", z.ZodTypeAny, {
|
|
1698
1698
|
timeout: number;
|
|
1699
1699
|
type: "sse";
|
|
1700
|
+
url: string;
|
|
1700
1701
|
enabled: boolean;
|
|
1701
1702
|
connectionMode: "strict" | "lenient";
|
|
1702
|
-
url: string;
|
|
1703
1703
|
headers: Record<string, string>;
|
|
1704
1704
|
}, {
|
|
1705
1705
|
type: "sse";
|
|
@@ -1718,9 +1718,9 @@ declare const getServerConfigRoute: {
|
|
|
1718
1718
|
}, "strict", z.ZodTypeAny, {
|
|
1719
1719
|
timeout: number;
|
|
1720
1720
|
type: "http";
|
|
1721
|
+
url: string;
|
|
1721
1722
|
enabled: boolean;
|
|
1722
1723
|
connectionMode: "strict" | "lenient";
|
|
1723
|
-
url: string;
|
|
1724
1724
|
headers: Record<string, string>;
|
|
1725
1725
|
}, {
|
|
1726
1726
|
type: "http";
|
|
@@ -1740,16 +1740,16 @@ declare const getServerConfigRoute: {
|
|
|
1740
1740
|
} | {
|
|
1741
1741
|
timeout: number;
|
|
1742
1742
|
type: "sse";
|
|
1743
|
+
url: string;
|
|
1743
1744
|
enabled: boolean;
|
|
1744
1745
|
connectionMode: "strict" | "lenient";
|
|
1745
|
-
url: string;
|
|
1746
1746
|
headers: Record<string, string>;
|
|
1747
1747
|
} | {
|
|
1748
1748
|
timeout: number;
|
|
1749
1749
|
type: "http";
|
|
1750
|
+
url: string;
|
|
1750
1751
|
enabled: boolean;
|
|
1751
1752
|
connectionMode: "strict" | "lenient";
|
|
1752
|
-
url: string;
|
|
1753
1753
|
headers: Record<string, string>;
|
|
1754
1754
|
}, {
|
|
1755
1755
|
type: "stdio";
|
|
@@ -1787,16 +1787,16 @@ declare const getServerConfigRoute: {
|
|
|
1787
1787
|
} | {
|
|
1788
1788
|
timeout: number;
|
|
1789
1789
|
type: "sse";
|
|
1790
|
+
url: string;
|
|
1790
1791
|
enabled: boolean;
|
|
1791
1792
|
connectionMode: "strict" | "lenient";
|
|
1792
|
-
url: string;
|
|
1793
1793
|
headers: Record<string, string>;
|
|
1794
1794
|
} | {
|
|
1795
1795
|
timeout: number;
|
|
1796
1796
|
type: "http";
|
|
1797
|
+
url: string;
|
|
1797
1798
|
enabled: boolean;
|
|
1798
1799
|
connectionMode: "strict" | "lenient";
|
|
1799
|
-
url: string;
|
|
1800
1800
|
headers: Record<string, string>;
|
|
1801
1801
|
}) & z.BRAND<"ValidatedMcpServerConfig">;
|
|
1802
1802
|
}, {
|
|
@@ -2220,9 +2220,9 @@ declare const updateServerRoute: {
|
|
|
2220
2220
|
}, "strict", z.ZodTypeAny, {
|
|
2221
2221
|
timeout: number;
|
|
2222
2222
|
type: "sse";
|
|
2223
|
+
url: string;
|
|
2223
2224
|
enabled: boolean;
|
|
2224
2225
|
connectionMode: "strict" | "lenient";
|
|
2225
|
-
url: string;
|
|
2226
2226
|
headers: Record<string, string>;
|
|
2227
2227
|
}, {
|
|
2228
2228
|
type: "sse";
|
|
@@ -2241,9 +2241,9 @@ declare const updateServerRoute: {
|
|
|
2241
2241
|
}, "strict", z.ZodTypeAny, {
|
|
2242
2242
|
timeout: number;
|
|
2243
2243
|
type: "http";
|
|
2244
|
+
url: string;
|
|
2244
2245
|
enabled: boolean;
|
|
2245
2246
|
connectionMode: "strict" | "lenient";
|
|
2246
|
-
url: string;
|
|
2247
2247
|
headers: Record<string, string>;
|
|
2248
2248
|
}, {
|
|
2249
2249
|
type: "http";
|
|
@@ -2263,16 +2263,16 @@ declare const updateServerRoute: {
|
|
|
2263
2263
|
} | {
|
|
2264
2264
|
timeout: number;
|
|
2265
2265
|
type: "sse";
|
|
2266
|
+
url: string;
|
|
2266
2267
|
enabled: boolean;
|
|
2267
2268
|
connectionMode: "strict" | "lenient";
|
|
2268
|
-
url: string;
|
|
2269
2269
|
headers: Record<string, string>;
|
|
2270
2270
|
} | {
|
|
2271
2271
|
timeout: number;
|
|
2272
2272
|
type: "http";
|
|
2273
|
+
url: string;
|
|
2273
2274
|
enabled: boolean;
|
|
2274
2275
|
connectionMode: "strict" | "lenient";
|
|
2275
|
-
url: string;
|
|
2276
2276
|
headers: Record<string, string>;
|
|
2277
2277
|
}, {
|
|
2278
2278
|
type: "stdio";
|
|
@@ -2310,16 +2310,16 @@ declare const updateServerRoute: {
|
|
|
2310
2310
|
} | {
|
|
2311
2311
|
timeout: number;
|
|
2312
2312
|
type: "sse";
|
|
2313
|
+
url: string;
|
|
2313
2314
|
enabled: boolean;
|
|
2314
2315
|
connectionMode: "strict" | "lenient";
|
|
2315
|
-
url: string;
|
|
2316
2316
|
headers: Record<string, string>;
|
|
2317
2317
|
} | {
|
|
2318
2318
|
timeout: number;
|
|
2319
2319
|
type: "http";
|
|
2320
|
+
url: string;
|
|
2320
2321
|
enabled: boolean;
|
|
2321
2322
|
connectionMode: "strict" | "lenient";
|
|
2322
|
-
url: string;
|
|
2323
2323
|
headers: Record<string, string>;
|
|
2324
2324
|
}) & z.BRAND<"ValidatedMcpServerConfig">;
|
|
2325
2325
|
persistToAgent?: boolean | undefined;
|
|
@@ -5186,11 +5186,11 @@ declare const execToolRoute: {
|
|
|
5186
5186
|
serverId: z.ZodString;
|
|
5187
5187
|
toolName: z.ZodString;
|
|
5188
5188
|
}, "strip", z.ZodTypeAny, {
|
|
5189
|
-
serverId: string;
|
|
5190
5189
|
toolName: string;
|
|
5191
|
-
}, {
|
|
5192
5190
|
serverId: string;
|
|
5191
|
+
}, {
|
|
5193
5192
|
toolName: string;
|
|
5193
|
+
serverId: string;
|
|
5194
5194
|
}>;
|
|
5195
5195
|
body: {
|
|
5196
5196
|
content: {
|
|
@@ -48,7 +48,10 @@ const MessageSyncResponseSchema = import_zod_openapi.z.object({
|
|
|
48
48
|
),
|
|
49
49
|
reasoning: import_zod_openapi.z.string().optional().describe("Extended thinking content from reasoning models"),
|
|
50
50
|
model: import_zod_openapi.z.string().optional().describe("Model used for this response"),
|
|
51
|
-
provider: import_zod_openapi.z.enum(import_core.LLM_PROVIDERS).optional().describe("LLM provider")
|
|
51
|
+
provider: import_zod_openapi.z.enum(import_core.LLM_PROVIDERS).optional().describe("LLM provider"),
|
|
52
|
+
hostRuntime: import_core.HostRuntimeContextSchema.optional().describe(
|
|
53
|
+
"Host-owned runtime IDs surfaced by core runtime flows"
|
|
54
|
+
)
|
|
52
55
|
}).strict().describe("Synchronous message response");
|
|
53
56
|
const ResetResponseSchema = import_zod_openapi.z.object({
|
|
54
57
|
status: import_zod_openapi.z.string().describe("Status message indicating reset was initiated"),
|
|
@@ -222,7 +225,8 @@ function createMessagesRouter(getAgent, _approvalCoordinator) {
|
|
|
222
225
|
pricingStatus: result.pricingStatus,
|
|
223
226
|
reasoning: result.reasoning,
|
|
224
227
|
model: result.model,
|
|
225
|
-
provider: result.provider
|
|
228
|
+
provider: result.provider,
|
|
229
|
+
hostRuntime: result.hostRuntime
|
|
226
230
|
},
|
|
227
231
|
200
|
|
228
232
|
);
|
|
@@ -977,9 +977,19 @@ declare const messageSyncRoute: {
|
|
|
977
977
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
978
978
|
model: z.ZodOptional<z.ZodString>;
|
|
979
979
|
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>>;
|
|
980
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
981
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
982
|
+
}, "strict", z.ZodTypeAny, {
|
|
983
|
+
ids?: Record<string, string> | undefined;
|
|
984
|
+
}, {
|
|
985
|
+
ids?: Record<string, string> | undefined;
|
|
986
|
+
}>>;
|
|
980
987
|
}, "strict", z.ZodTypeAny, {
|
|
981
988
|
sessionId: string;
|
|
982
989
|
response: string;
|
|
990
|
+
hostRuntime?: {
|
|
991
|
+
ids?: Record<string, string> | undefined;
|
|
992
|
+
} | undefined;
|
|
983
993
|
reasoning?: string | undefined;
|
|
984
994
|
tokenUsage?: {
|
|
985
995
|
inputTokens?: number | undefined;
|
|
@@ -998,6 +1008,9 @@ declare const messageSyncRoute: {
|
|
|
998
1008
|
}, {
|
|
999
1009
|
sessionId: string;
|
|
1000
1010
|
response: string;
|
|
1011
|
+
hostRuntime?: {
|
|
1012
|
+
ids?: Record<string, string> | undefined;
|
|
1013
|
+
} | undefined;
|
|
1001
1014
|
reasoning?: string | undefined;
|
|
1002
1015
|
tokenUsage?: {
|
|
1003
1016
|
inputTokens?: number | undefined;
|
|
@@ -3803,6 +3816,11 @@ export declare function createMessagesRouter(getAgent: GetAgentFn, _approvalCoor
|
|
|
3803
3816
|
output: {
|
|
3804
3817
|
sessionId: string;
|
|
3805
3818
|
response: string;
|
|
3819
|
+
hostRuntime?: {
|
|
3820
|
+
ids?: {
|
|
3821
|
+
[x: string]: string;
|
|
3822
|
+
} | undefined;
|
|
3823
|
+
} | undefined;
|
|
3806
3824
|
reasoning?: string | undefined;
|
|
3807
3825
|
tokenUsage?: {
|
|
3808
3826
|
inputTokens?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,KAAK,0BAA0B,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEjG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAY3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQyC,CAAC;AAEjE,QAAA,MAAM,eAAe;;;;;;EAOqC,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,KAAK,0BAA0B,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEjG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAY3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQyC,CAAC;AAEjE,QAAA,MAAM,eAAe;;;;;;EAOqC,CAAC;AA2D3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsKxF;AAED,KAAK,kBAAkB,GAAG,QAAQ,CAC9B,MAAM,EACN,UAAU,EACV;IAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAAE,EAC3C,0BAA0B,CAAC,OAAO,YAAY,CAAC,CAClD,CAAC;AAEF,KAAK,sBAAsB,GAAG,QAAQ,CAClC,MAAM,EACN,eAAe,EACf;IAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAAE,EAC3C,0BAA0B,CAAC,OAAO,gBAAgB,CAAC,CACtD,CAAC;AAEF,KAAK,gBAAgB,GAAG,QAAQ,CAC5B,MAAM,EACN,QAAQ,EACR;IAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;CAAE,EACzC,0BAA0B,CAAC,OAAO,UAAU,CAAC,CAChD,CAAC;AAEF,KAAK,wBAAwB,GAAG,QAAQ,CACpC,MAAM,EACN,iBAAiB,EACjB;IAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAAE,EAC3C,0BAA0B,CAAC,OAAO,kBAAkB,CAAC,CACxD,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC1B,kBAAkB,GAClB,sBAAsB,GACtB,gBAAgB,GAChB,wBAAwB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
|
|
2
2
|
import { streamSSE } from "hono/streaming";
|
|
3
|
-
import { LLM_PROVIDERS } from "@dexto/core";
|
|
3
|
+
import { HostRuntimeContextSchema, LLM_PROVIDERS } from "@dexto/core";
|
|
4
4
|
import {
|
|
5
5
|
ApiErrorResponseSchema,
|
|
6
6
|
BadRequestErrorResponse,
|
|
@@ -34,7 +34,10 @@ const MessageSyncResponseSchema = z.object({
|
|
|
34
34
|
),
|
|
35
35
|
reasoning: z.string().optional().describe("Extended thinking content from reasoning models"),
|
|
36
36
|
model: z.string().optional().describe("Model used for this response"),
|
|
37
|
-
provider: z.enum(LLM_PROVIDERS).optional().describe("LLM provider")
|
|
37
|
+
provider: z.enum(LLM_PROVIDERS).optional().describe("LLM provider"),
|
|
38
|
+
hostRuntime: HostRuntimeContextSchema.optional().describe(
|
|
39
|
+
"Host-owned runtime IDs surfaced by core runtime flows"
|
|
40
|
+
)
|
|
38
41
|
}).strict().describe("Synchronous message response");
|
|
39
42
|
const ResetResponseSchema = z.object({
|
|
40
43
|
status: z.string().describe("Status message indicating reset was initiated"),
|
|
@@ -208,7 +211,8 @@ function createMessagesRouter(getAgent, _approvalCoordinator) {
|
|
|
208
211
|
pricingStatus: result.pricingStatus,
|
|
209
212
|
reasoning: result.reasoning,
|
|
210
213
|
model: result.model,
|
|
211
|
-
provider: result.provider
|
|
214
|
+
provider: result.provider,
|
|
215
|
+
hostRuntime: result.hostRuntime
|
|
212
216
|
},
|
|
213
217
|
200
|
|
214
218
|
);
|
|
@@ -1696,12 +1696,12 @@ declare const queueMessageRoute: {
|
|
|
1696
1696
|
position: z.ZodNumber;
|
|
1697
1697
|
}, "strict", z.ZodTypeAny, {
|
|
1698
1698
|
id: string;
|
|
1699
|
-
queued: true;
|
|
1700
1699
|
position: number;
|
|
1700
|
+
queued: true;
|
|
1701
1701
|
}, {
|
|
1702
1702
|
id: string;
|
|
1703
|
-
queued: true;
|
|
1704
1703
|
position: number;
|
|
1704
|
+
queued: true;
|
|
1705
1705
|
}>;
|
|
1706
1706
|
};
|
|
1707
1707
|
};
|
|
@@ -5147,8 +5147,8 @@ export declare function createQueueRouter(getAgent: GetAgentFn): OpenAPIHono<imp
|
|
|
5147
5147
|
};
|
|
5148
5148
|
output: {
|
|
5149
5149
|
id: string;
|
|
5150
|
-
queued: true;
|
|
5151
5150
|
position: number;
|
|
5151
|
+
queued: true;
|
|
5152
5152
|
};
|
|
5153
5153
|
outputFormat: "json";
|
|
5154
5154
|
status: 201;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/server",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.27",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"ws": "^8.18.1",
|
|
32
32
|
"yaml": "^2.8.3",
|
|
33
33
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
34
|
-
"@dexto/agent-config": "1.6.
|
|
35
|
-
"@dexto/agent-management": "1.6.
|
|
36
|
-
"@dexto/core": "1.6.
|
|
37
|
-
"@dexto/image-local": "1.6.
|
|
38
|
-
"@dexto/storage": "1.6.
|
|
39
|
-
"@dexto/tools-scheduler": "1.6.
|
|
34
|
+
"@dexto/agent-config": "1.6.27",
|
|
35
|
+
"@dexto/agent-management": "1.6.27",
|
|
36
|
+
"@dexto/core": "1.6.27",
|
|
37
|
+
"@dexto/image-local": "1.6.27",
|
|
38
|
+
"@dexto/storage": "1.6.27",
|
|
39
|
+
"@dexto/tools-scheduler": "1.6.27"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"dist",
|