@dexto/server 1.8.11 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,8 +30,6 @@ const ApprovalBodySchema = import_zod_openapi.z.object({
|
|
|
30
30
|
"Optional form data provided by the user (for elicitation)"
|
|
31
31
|
),
|
|
32
32
|
rememberChoice: import_zod_openapi.z.boolean().optional().describe("Whether to remember this choice for future requests"),
|
|
33
|
-
rememberPattern: import_zod_openapi.z.string().optional().describe("Optional approval pattern to remember for future requests"),
|
|
34
|
-
rememberDirectory: import_zod_openapi.z.boolean().optional().describe("Whether to remember the approved directory for future requests"),
|
|
35
33
|
reason: import_zod_openapi.z.nativeEnum(import_core.DenialReason).optional().describe("Optional structured denial or cancellation reason"),
|
|
36
34
|
message: import_zod_openapi.z.string().optional().describe("Optional freeform denial or cancellation message")
|
|
37
35
|
}).strict().superRefine((value, refinementCtx) => {
|
|
@@ -66,18 +64,6 @@ const ApprovalBodySchema = import_zod_openapi.z.object({
|
|
|
66
64
|
"rememberChoice is only allowed when status is approved"
|
|
67
65
|
);
|
|
68
66
|
}
|
|
69
|
-
if (value.rememberPattern !== void 0) {
|
|
70
|
-
addFieldIssue(
|
|
71
|
-
"rememberPattern",
|
|
72
|
-
"rememberPattern is only allowed when status is approved"
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
if (value.rememberDirectory !== void 0) {
|
|
76
|
-
addFieldIssue(
|
|
77
|
-
"rememberDirectory",
|
|
78
|
-
"rememberDirectory is only allowed when status is approved"
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
67
|
if (value.reason === void 0) {
|
|
82
68
|
return;
|
|
83
69
|
}
|
|
@@ -220,15 +206,7 @@ function createApprovalsRouter(getAgent, approvalCoordinator) {
|
|
|
220
206
|
submitApprovalRouter.openapi(submitApprovalRoute, async (ctx) => {
|
|
221
207
|
const agent = await getAgent(ctx);
|
|
222
208
|
const { approvalId } = ctx.req.valid("param");
|
|
223
|
-
const {
|
|
224
|
-
status,
|
|
225
|
-
formData,
|
|
226
|
-
rememberChoice,
|
|
227
|
-
rememberPattern,
|
|
228
|
-
rememberDirectory,
|
|
229
|
-
reason,
|
|
230
|
-
message
|
|
231
|
-
} = ctx.req.valid("json");
|
|
209
|
+
const { status, formData, rememberChoice, reason, message } = ctx.req.valid("json");
|
|
232
210
|
agent.logger.info(`Received approval decision for ${approvalId}: ${status}`);
|
|
233
211
|
if (!approvalCoordinator) {
|
|
234
212
|
agent.logger.error("ApprovalCoordinator not available");
|
|
@@ -248,12 +226,6 @@ function createApprovalsRouter(getAgent, approvalCoordinator) {
|
|
|
248
226
|
if (rememberChoice !== void 0) {
|
|
249
227
|
data.rememberChoice = rememberChoice;
|
|
250
228
|
}
|
|
251
|
-
if (rememberPattern !== void 0) {
|
|
252
|
-
data.rememberPattern = rememberPattern;
|
|
253
|
-
}
|
|
254
|
-
if (rememberDirectory !== void 0) {
|
|
255
|
-
data.rememberDirectory = rememberDirectory;
|
|
256
|
-
}
|
|
257
229
|
}
|
|
258
230
|
const sessionId = approvalCoordinator.getSessionId(approvalId);
|
|
259
231
|
const hostRuntime = approvalCoordinator.getHostRuntime(approvalId);
|
|
@@ -61,8 +61,6 @@ declare const ApprovalBodySchema: z.ZodObject<{
|
|
|
61
61
|
} | null;
|
|
62
62
|
}, unknown>>>;
|
|
63
63
|
rememberChoice: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
-
rememberPattern: z.ZodOptional<z.ZodString>;
|
|
65
|
-
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
66
64
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
67
65
|
readonly USER_DENIED: "user_denied";
|
|
68
66
|
readonly SYSTEM_DENIED: "system_denied";
|
|
@@ -510,8 +508,6 @@ declare const submitApprovalRoute: {
|
|
|
510
508
|
} | null;
|
|
511
509
|
}, unknown>>>;
|
|
512
510
|
rememberChoice: z.ZodOptional<z.ZodBoolean>;
|
|
513
|
-
rememberPattern: z.ZodOptional<z.ZodString>;
|
|
514
|
-
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
515
511
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
516
512
|
readonly USER_DENIED: "user_denied";
|
|
517
513
|
readonly SYSTEM_DENIED: "system_denied";
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgFyC,CAAC;AAsClE,QAAA,MAAM,8BAA8B;;iBAI4B,CAAC;AAEjE,QAAA,MAAM,qBAAqB;;iBAIgB,CAAC;AAE5C,QAAA,MAAM,qBAAqB;;iBAOc,CAAC;AAE1C,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,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"}
|
|
@@ -12,8 +12,6 @@ const ApprovalBodySchema = z.object({
|
|
|
12
12
|
"Optional form data provided by the user (for elicitation)"
|
|
13
13
|
),
|
|
14
14
|
rememberChoice: z.boolean().optional().describe("Whether to remember this choice for future requests"),
|
|
15
|
-
rememberPattern: z.string().optional().describe("Optional approval pattern to remember for future requests"),
|
|
16
|
-
rememberDirectory: z.boolean().optional().describe("Whether to remember the approved directory for future requests"),
|
|
17
15
|
reason: z.nativeEnum(DenialReason).optional().describe("Optional structured denial or cancellation reason"),
|
|
18
16
|
message: z.string().optional().describe("Optional freeform denial or cancellation message")
|
|
19
17
|
}).strict().superRefine((value, refinementCtx) => {
|
|
@@ -48,18 +46,6 @@ const ApprovalBodySchema = z.object({
|
|
|
48
46
|
"rememberChoice is only allowed when status is approved"
|
|
49
47
|
);
|
|
50
48
|
}
|
|
51
|
-
if (value.rememberPattern !== void 0) {
|
|
52
|
-
addFieldIssue(
|
|
53
|
-
"rememberPattern",
|
|
54
|
-
"rememberPattern is only allowed when status is approved"
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
if (value.rememberDirectory !== void 0) {
|
|
58
|
-
addFieldIssue(
|
|
59
|
-
"rememberDirectory",
|
|
60
|
-
"rememberDirectory is only allowed when status is approved"
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
49
|
if (value.reason === void 0) {
|
|
64
50
|
return;
|
|
65
51
|
}
|
|
@@ -202,15 +188,7 @@ function createApprovalsRouter(getAgent, approvalCoordinator) {
|
|
|
202
188
|
submitApprovalRouter.openapi(submitApprovalRoute, async (ctx) => {
|
|
203
189
|
const agent = await getAgent(ctx);
|
|
204
190
|
const { approvalId } = ctx.req.valid("param");
|
|
205
|
-
const {
|
|
206
|
-
status,
|
|
207
|
-
formData,
|
|
208
|
-
rememberChoice,
|
|
209
|
-
rememberPattern,
|
|
210
|
-
rememberDirectory,
|
|
211
|
-
reason,
|
|
212
|
-
message
|
|
213
|
-
} = ctx.req.valid("json");
|
|
191
|
+
const { status, formData, rememberChoice, reason, message } = ctx.req.valid("json");
|
|
214
192
|
agent.logger.info(`Received approval decision for ${approvalId}: ${status}`);
|
|
215
193
|
if (!approvalCoordinator) {
|
|
216
194
|
agent.logger.error("ApprovalCoordinator not available");
|
|
@@ -230,12 +208,6 @@ function createApprovalsRouter(getAgent, approvalCoordinator) {
|
|
|
230
208
|
if (rememberChoice !== void 0) {
|
|
231
209
|
data.rememberChoice = rememberChoice;
|
|
232
210
|
}
|
|
233
|
-
if (rememberPattern !== void 0) {
|
|
234
|
-
data.rememberPattern = rememberPattern;
|
|
235
|
-
}
|
|
236
|
-
if (rememberDirectory !== void 0) {
|
|
237
|
-
data.rememberDirectory = rememberDirectory;
|
|
238
|
-
}
|
|
239
211
|
}
|
|
240
212
|
const sessionId = approvalCoordinator.getSessionId(approvalId);
|
|
241
213
|
const hostRuntime = approvalCoordinator.getHostRuntime(approvalId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"ws": "^8.18.1",
|
|
32
32
|
"yaml": "^2.8.3",
|
|
33
33
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
34
|
-
"@dexto/agent-config": "1.
|
|
35
|
-
"@dexto/agent-management": "1.
|
|
36
|
-
"@dexto/core": "1.
|
|
37
|
-
"@dexto/image-local": "1.
|
|
38
|
-
"@dexto/llm": "1.
|
|
39
|
-
"@dexto/storage": "1.
|
|
40
|
-
"@dexto/tools-scheduler": "1.
|
|
34
|
+
"@dexto/agent-config": "1.9.0",
|
|
35
|
+
"@dexto/agent-management": "1.9.0",
|
|
36
|
+
"@dexto/core": "1.9.0",
|
|
37
|
+
"@dexto/image-local": "1.9.0",
|
|
38
|
+
"@dexto/llm": "1.9.0",
|
|
39
|
+
"@dexto/storage": "1.9.0",
|
|
40
|
+
"@dexto/tools-scheduler": "1.9.0"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"dist",
|