@dexto/server 1.5.1 → 1.5.3
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/manual-approval-handler.cjs +25 -0
- package/dist/approval/manual-approval-handler.d.ts.map +1 -1
- package/dist/approval/manual-approval-handler.js +25 -0
- package/dist/hono/index.d.ts +1 -1
- package/dist/hono/routes/llm.d.ts +1 -1
- package/dist/hono/schemas/responses.d.ts +4 -4
- package/package.json +4 -4
|
@@ -98,6 +98,31 @@ function createManualApprovalHandler(coordinator) {
|
|
|
98
98
|
},
|
|
99
99
|
getPendingRequests: () => {
|
|
100
100
|
return Array.from(pendingApprovals.values()).map((p) => p.request);
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* Auto-approve pending requests that match a predicate.
|
|
104
|
+
* Used when a pattern is remembered to auto-approve other parallel requests
|
|
105
|
+
* that would now match the same pattern.
|
|
106
|
+
*/
|
|
107
|
+
autoApprovePending: (predicate, responseData) => {
|
|
108
|
+
let count = 0;
|
|
109
|
+
for (const [approvalId, pending] of pendingApprovals) {
|
|
110
|
+
if (predicate(pending.request)) {
|
|
111
|
+
pending.cleanup();
|
|
112
|
+
pendingApprovals.delete(approvalId);
|
|
113
|
+
const autoApproveResponse = {
|
|
114
|
+
approvalId,
|
|
115
|
+
status: import_core.ApprovalStatus.APPROVED,
|
|
116
|
+
sessionId: pending.request.sessionId,
|
|
117
|
+
message: "Auto-approved due to matching remembered pattern",
|
|
118
|
+
data: responseData
|
|
119
|
+
};
|
|
120
|
+
coordinator.emitResponse(autoApproveResponse);
|
|
121
|
+
pending.resolve(autoApproveResponse);
|
|
122
|
+
count++;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return count;
|
|
101
126
|
}
|
|
102
127
|
});
|
|
103
128
|
return handler;
|
|
@@ -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,CAkK7F"}
|
|
@@ -75,6 +75,31 @@ function createManualApprovalHandler(coordinator) {
|
|
|
75
75
|
},
|
|
76
76
|
getPendingRequests: () => {
|
|
77
77
|
return Array.from(pendingApprovals.values()).map((p) => p.request);
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Auto-approve pending requests that match a predicate.
|
|
81
|
+
* Used when a pattern is remembered to auto-approve other parallel requests
|
|
82
|
+
* that would now match the same pattern.
|
|
83
|
+
*/
|
|
84
|
+
autoApprovePending: (predicate, responseData) => {
|
|
85
|
+
let count = 0;
|
|
86
|
+
for (const [approvalId, pending] of pendingApprovals) {
|
|
87
|
+
if (predicate(pending.request)) {
|
|
88
|
+
pending.cleanup();
|
|
89
|
+
pendingApprovals.delete(approvalId);
|
|
90
|
+
const autoApproveResponse = {
|
|
91
|
+
approvalId,
|
|
92
|
+
status: ApprovalStatus.APPROVED,
|
|
93
|
+
sessionId: pending.request.sessionId,
|
|
94
|
+
message: "Auto-approved due to matching remembered pattern",
|
|
95
|
+
data: responseData
|
|
96
|
+
};
|
|
97
|
+
coordinator.emitResponse(autoApproveResponse);
|
|
98
|
+
pending.resolve(autoApproveResponse);
|
|
99
|
+
count++;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return count;
|
|
78
103
|
}
|
|
79
104
|
});
|
|
80
105
|
return handler;
|
package/dist/hono/index.d.ts
CHANGED
|
@@ -2327,7 +2327,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2327
2327
|
config: {
|
|
2328
2328
|
model: string;
|
|
2329
2329
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
2330
|
-
maxIterations
|
|
2330
|
+
maxIterations?: number | undefined;
|
|
2331
2331
|
baseURL?: string | undefined;
|
|
2332
2332
|
maxInputTokens?: number | undefined;
|
|
2333
2333
|
maxOutputTokens?: number | undefined;
|
|
@@ -397,7 +397,7 @@ export declare function createLlmRouter(getAgent: GetAgentFn): OpenAPIHono<impor
|
|
|
397
397
|
config: {
|
|
398
398
|
model: string;
|
|
399
399
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
400
|
-
maxIterations
|
|
400
|
+
maxIterations?: number | undefined;
|
|
401
401
|
baseURL?: string | undefined;
|
|
402
402
|
maxInputTokens?: number | undefined;
|
|
403
403
|
maxOutputTokens?: number | undefined;
|
|
@@ -524,7 +524,7 @@ export declare const LLMConfigResponseSchema: z.ZodObject<Omit<{
|
|
|
524
524
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama"]>;
|
|
525
525
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
526
526
|
apiKey: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
527
|
-
maxIterations: z.
|
|
527
|
+
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
528
528
|
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
529
529
|
maxInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
530
530
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -536,7 +536,7 @@ export declare const LLMConfigResponseSchema: z.ZodObject<Omit<{
|
|
|
536
536
|
}, "strict", z.ZodTypeAny, {
|
|
537
537
|
model: string;
|
|
538
538
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
539
|
-
maxIterations
|
|
539
|
+
maxIterations?: number | undefined;
|
|
540
540
|
baseURL?: string | undefined;
|
|
541
541
|
maxInputTokens?: number | undefined;
|
|
542
542
|
maxOutputTokens?: number | undefined;
|
|
@@ -560,7 +560,7 @@ export declare const LLMConfigSchema: z.ZodObject<{
|
|
|
560
560
|
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama"]>;
|
|
561
561
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
562
562
|
apiKey: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
563
|
-
maxIterations: z.
|
|
563
|
+
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
564
564
|
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
565
565
|
maxInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
566
566
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -570,8 +570,8 @@ export declare const LLMConfigSchema: z.ZodObject<{
|
|
|
570
570
|
}, "strict", z.ZodTypeAny, {
|
|
571
571
|
model: string;
|
|
572
572
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
573
|
-
maxIterations: number;
|
|
574
573
|
apiKey?: string | undefined;
|
|
574
|
+
maxIterations?: number | undefined;
|
|
575
575
|
baseURL?: string | undefined;
|
|
576
576
|
maxInputTokens?: number | undefined;
|
|
577
577
|
maxOutputTokens?: number | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"ws": "^8.18.1",
|
|
32
32
|
"yaml": "^2.7.1",
|
|
33
33
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
34
|
-
"@dexto/agent-management": "1.5.
|
|
35
|
-
"@dexto/core": "1.5.
|
|
36
|
-
"@dexto/image-local": "1.5.
|
|
34
|
+
"@dexto/agent-management": "1.5.3",
|
|
35
|
+
"@dexto/core": "1.5.3",
|
|
36
|
+
"@dexto/image-local": "1.5.3"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"dist",
|