@dexto/server 1.6.7 → 1.6.9

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.
@@ -0,0 +1,161 @@
1
+ import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
2
+ import { DextoRuntimeError, ErrorScope, ErrorType } from "@dexto/core";
3
+ import { StandardErrorEnvelopeSchema } from "../schemas/responses.js";
4
+ const MAX_SYSTEM_PROMPT_CONTRIBUTOR_CONTENT_CHARS = 12e4;
5
+ const DEFAULT_SYSTEM_PROMPT_CONTRIBUTOR_PRIORITY = 45;
6
+ const ContributorInfoSchema = z.object({
7
+ id: z.string().describe("Contributor identifier"),
8
+ priority: z.number().describe("Contributor priority")
9
+ }).strict().describe("System prompt contributor metadata.");
10
+ const UpsertSystemPromptContributorSchema = z.object({
11
+ id: z.string().min(1).describe("Contributor identifier"),
12
+ priority: z.number().optional().describe("Optional priority override"),
13
+ enabled: z.boolean().optional().describe("Set false to remove the contributor instead of adding/updating it"),
14
+ content: z.string().optional().describe("Static contributor content (required when enabled).")
15
+ }).strict().describe("System prompt contributor update payload.");
16
+ const SystemPromptContributorErrorSchema = StandardErrorEnvelopeSchema.describe(
17
+ "System prompt contributor error response."
18
+ );
19
+ function sanitizeContributorId(value) {
20
+ return value.trim().replace(/[^A-Za-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80);
21
+ }
22
+ function resolveContributorPriority(value) {
23
+ if (typeof value === "number" && Number.isFinite(value)) {
24
+ return Math.trunc(value);
25
+ }
26
+ return DEFAULT_SYSTEM_PROMPT_CONTRIBUTOR_PRIORITY;
27
+ }
28
+ function createSystemPromptRouter(getAgent) {
29
+ const app = new OpenAPIHono();
30
+ const listContributorsRoute = createRoute({
31
+ method: "get",
32
+ path: "/system-prompt/contributors",
33
+ summary: "List System Prompt Contributors",
34
+ description: "Lists currently registered system prompt contributors.",
35
+ tags: ["config"],
36
+ responses: {
37
+ 200: {
38
+ description: "Current contributor list",
39
+ content: {
40
+ "application/json": {
41
+ schema: z.object({
42
+ contributors: z.array(ContributorInfoSchema).describe("Registered system prompt contributors.")
43
+ }).strict().describe("System prompt contributors list response.")
44
+ }
45
+ }
46
+ }
47
+ }
48
+ });
49
+ const upsertContributorRoute = createRoute({
50
+ method: "post",
51
+ path: "/system-prompt/contributors",
52
+ summary: "Upsert System Prompt Contributor",
53
+ description: "Adds or updates a static system prompt contributor. Set enabled=false (or empty content) to remove.",
54
+ tags: ["config"],
55
+ request: {
56
+ body: {
57
+ content: {
58
+ "application/json": {
59
+ schema: UpsertSystemPromptContributorSchema
60
+ }
61
+ }
62
+ }
63
+ },
64
+ responses: {
65
+ 200: {
66
+ description: "Contributor upsert result",
67
+ content: {
68
+ "application/json": {
69
+ schema: z.object({
70
+ id: z.string().describe("Contributor identifier"),
71
+ enabled: z.boolean().describe("Whether the contributor remains enabled"),
72
+ priority: z.number().optional().describe("Contributor priority"),
73
+ replaced: z.boolean().optional().describe("Whether an existing contributor was replaced"),
74
+ removed: z.boolean().optional().describe("Whether the contributor was removed"),
75
+ contentLength: z.number().optional().describe("Stored content length in characters"),
76
+ truncated: z.boolean().optional().describe("Whether the submitted content was truncated")
77
+ }).strict().describe("System prompt contributor upsert response.")
78
+ }
79
+ }
80
+ },
81
+ 400: {
82
+ description: "Invalid contributor update request",
83
+ content: {
84
+ "application/json": {
85
+ schema: SystemPromptContributorErrorSchema
86
+ }
87
+ }
88
+ }
89
+ }
90
+ });
91
+ return app.openapi(listContributorsRoute, async (ctx) => {
92
+ const agent = await getAgent(ctx);
93
+ const contributors = agent.systemPromptManager.getContributors().map((contributor) => ({
94
+ id: contributor.id,
95
+ priority: contributor.priority
96
+ }));
97
+ return ctx.json({ contributors });
98
+ }).openapi(upsertContributorRoute, async (ctx) => {
99
+ const agent = await getAgent(ctx);
100
+ const payload = ctx.req.valid("json");
101
+ const contributorId = sanitizeContributorId(payload.id);
102
+ if (contributorId.length === 0) {
103
+ throw new DextoRuntimeError(
104
+ "systemprompt_contributor_config_invalid",
105
+ ErrorScope.SYSTEM_PROMPT,
106
+ ErrorType.USER,
107
+ "A valid contributor id is required",
108
+ {
109
+ id: payload.id
110
+ }
111
+ );
112
+ }
113
+ const enabled = payload.enabled !== false;
114
+ const hasContent = payload.content !== void 0;
115
+ const rawContent = payload.content ?? "";
116
+ const content = rawContent.slice(0, MAX_SYSTEM_PROMPT_CONTRIBUTOR_CONTENT_CHARS);
117
+ const priority = resolveContributorPriority(payload.priority);
118
+ if (!enabled || hasContent && content.trim().length === 0) {
119
+ const removed = agent.systemPromptManager.removeContributor(contributorId);
120
+ return ctx.json(
121
+ {
122
+ id: contributorId,
123
+ enabled: false,
124
+ removed
125
+ },
126
+ 200
127
+ );
128
+ }
129
+ if (!hasContent || content.trim().length === 0) {
130
+ throw new DextoRuntimeError(
131
+ "systemprompt_contributor_config_invalid",
132
+ ErrorScope.SYSTEM_PROMPT,
133
+ ErrorType.USER,
134
+ "Contributor content is required when enabled",
135
+ {
136
+ id: payload.id
137
+ }
138
+ );
139
+ }
140
+ const replaced = agent.systemPromptManager.removeContributor(contributorId);
141
+ agent.systemPromptManager.addContributor({
142
+ id: contributorId,
143
+ priority,
144
+ getContent: async () => content
145
+ });
146
+ return ctx.json(
147
+ {
148
+ id: contributorId,
149
+ enabled: true,
150
+ priority,
151
+ replaced,
152
+ contentLength: hasContent ? content.length : void 0,
153
+ truncated: hasContent ? rawContent.length > content.length : void 0
154
+ },
155
+ 200
156
+ );
157
+ });
158
+ }
159
+ export {
160
+ createSystemPromptRouter
161
+ };
@@ -54,6 +54,7 @@ __export(responses_exports, {
54
54
  SessionSearchResultSchema: () => SessionSearchResultSchema,
55
55
  SessionTokenUsageSchema: () => SessionTokenUsageSchema,
56
56
  SseServerConfigSchema: () => import_core5.SseServerConfigSchema,
57
+ StandardErrorEnvelopeSchema: () => StandardErrorEnvelopeSchema,
57
58
  StatusResponseSchema: () => StatusResponseSchema,
58
59
  StdioServerConfigSchema: () => import_core5.StdioServerConfigSchema,
59
60
  TextPartSchema: () => TextPartSchema,
@@ -168,7 +169,8 @@ const SessionMetadataSchema = import_zod.z.object({
168
169
  ),
169
170
  estimatedCost: import_zod.z.number().nonnegative().optional().describe("Total estimated cost in USD across all models"),
170
171
  modelStats: import_zod.z.array(ModelStatisticsSchema).optional().describe("Per-model usage statistics (for multi-model sessions)"),
171
- workspaceId: import_zod.z.string().optional().nullable().describe("Associated workspace ID, if any")
172
+ workspaceId: import_zod.z.string().optional().nullable().describe("Associated workspace ID, if any"),
173
+ parentSessionId: import_zod.z.string().optional().nullable().describe("Parent session ID if this session was forked, otherwise null")
172
174
  }).strict().describe("Session metadata");
173
175
  const WorkspaceSchema = import_zod.z.object({
174
176
  id: import_zod.z.string().describe("Workspace identifier"),
@@ -335,6 +337,17 @@ const ErrorResponseSchema = import_zod.z.object({
335
337
  details: import_zod.z.unknown().optional().describe("Additional error details")
336
338
  }).strict().describe("Error details")
337
339
  }).strict().describe("Error API response");
340
+ const StandardErrorEnvelopeSchema = import_zod.z.object({
341
+ code: import_zod.z.string().describe("Error code"),
342
+ message: import_zod.z.string().describe("Error message"),
343
+ scope: import_zod.z.string().describe("Error scope"),
344
+ type: import_zod.z.string().describe("Error type"),
345
+ context: import_zod.z.unknown().optional().describe("Error context"),
346
+ recovery: import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.string())]).optional().describe("Recovery guidance"),
347
+ traceId: import_zod.z.string().describe("Trace identifier"),
348
+ endpoint: import_zod.z.string().describe("Request endpoint"),
349
+ method: import_zod.z.string().describe("HTTP method")
350
+ }).strict().describe("Standard API error envelope");
338
351
  const StatusResponseSchema = import_zod.z.object({
339
352
  status: import_zod.z.string().describe("Operation status"),
340
353
  message: import_zod.z.string().optional().describe("Optional status message")
@@ -381,6 +394,7 @@ const DeleteResponseSchema = import_zod.z.object({
381
394
  SessionSearchResultSchema,
382
395
  SessionTokenUsageSchema,
383
396
  SseServerConfigSchema,
397
+ StandardErrorEnvelopeSchema,
384
398
  StatusResponseSchema,
385
399
  StdioServerConfigSchema,
386
400
  TextPartSchema,
@@ -797,6 +797,7 @@ export declare const SessionMetadataSchema: z.ZodObject<{
797
797
  lastUsedAt: number;
798
798
  }>, "many">>;
799
799
  workspaceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
800
+ parentSessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
800
801
  }, "strict", z.ZodTypeAny, {
801
802
  id: string;
802
803
  messageCount: number;
@@ -829,6 +830,7 @@ export declare const SessionMetadataSchema: z.ZodObject<{
829
830
  lastUsedAt: number;
830
831
  }[] | undefined;
831
832
  workspaceId?: string | null | undefined;
833
+ parentSessionId?: string | null | undefined;
832
834
  }, {
833
835
  id: string;
834
836
  messageCount: number;
@@ -861,6 +863,7 @@ export declare const SessionMetadataSchema: z.ZodObject<{
861
863
  lastUsedAt: number;
862
864
  }[] | undefined;
863
865
  workspaceId?: string | null | undefined;
866
+ parentSessionId?: string | null | undefined;
864
867
  }>;
865
868
  export type SessionTokenUsage = z.output<typeof SessionTokenUsageSchema>;
866
869
  export type ModelStatistics = z.output<typeof ModelStatisticsSchema>;
@@ -3501,6 +3504,38 @@ export declare const ErrorResponseSchema: z.ZodObject<{
3501
3504
  ok: false;
3502
3505
  }>;
3503
3506
  export type ErrorResponse = z.output<typeof ErrorResponseSchema>;
3507
+ export declare const StandardErrorEnvelopeSchema: z.ZodObject<{
3508
+ code: z.ZodString;
3509
+ message: z.ZodString;
3510
+ scope: z.ZodString;
3511
+ type: z.ZodString;
3512
+ context: z.ZodOptional<z.ZodUnknown>;
3513
+ recovery: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3514
+ traceId: z.ZodString;
3515
+ endpoint: z.ZodString;
3516
+ method: z.ZodString;
3517
+ }, "strict", z.ZodTypeAny, {
3518
+ method: string;
3519
+ type: string;
3520
+ code: string;
3521
+ message: string;
3522
+ scope: string;
3523
+ traceId: string;
3524
+ endpoint: string;
3525
+ context?: unknown;
3526
+ recovery?: string | string[] | undefined;
3527
+ }, {
3528
+ method: string;
3529
+ type: string;
3530
+ code: string;
3531
+ message: string;
3532
+ scope: string;
3533
+ traceId: string;
3534
+ endpoint: string;
3535
+ context?: unknown;
3536
+ recovery?: string | string[] | undefined;
3537
+ }>;
3538
+ export type StandardErrorEnvelope = z.output<typeof StandardErrorEnvelopeSchema>;
3504
3539
  export declare const StatusResponseSchema: z.ZodObject<{
3505
3540
  status: z.ZodString;
3506
3541
  message: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/hono/schemas/responses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAM3E,eAAO,MAAM,cAAc;;;;;;;;;EAMO,CAAC;AAEnC,eAAO,MAAM,eAAe;;;;;;;;;;;;EAOO,CAAC;AAEpC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAQO,CAAC;AAEnC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B0C,CAAC;AAE5E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO2C,CAAC;AAE1E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeqB,CAAC;AAEjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAaU,CAAC;AAExC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;EAae,CAAC;AAE7C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;EAYO,CAAC;AAEjC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,YAAY,CAAC,CAAC;AAOnD,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;iEAO1B,CAAC;AAG7C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaG,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAGjE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBI,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAGjF,eAAO,MAAM,oBAAoB;;;;;;;;;EAMD,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGnE,eAAO,MAAM,oBAAoB;;;;;;;;;EAMS,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -106,7 +106,8 @@ const SessionMetadataSchema = z.object({
106
106
  ),
107
107
  estimatedCost: z.number().nonnegative().optional().describe("Total estimated cost in USD across all models"),
108
108
  modelStats: z.array(ModelStatisticsSchema).optional().describe("Per-model usage statistics (for multi-model sessions)"),
109
- workspaceId: z.string().optional().nullable().describe("Associated workspace ID, if any")
109
+ workspaceId: z.string().optional().nullable().describe("Associated workspace ID, if any"),
110
+ parentSessionId: z.string().optional().nullable().describe("Parent session ID if this session was forked, otherwise null")
110
111
  }).strict().describe("Session metadata");
111
112
  const WorkspaceSchema = z.object({
112
113
  id: z.string().describe("Workspace identifier"),
@@ -273,6 +274,17 @@ const ErrorResponseSchema = z.object({
273
274
  details: z.unknown().optional().describe("Additional error details")
274
275
  }).strict().describe("Error details")
275
276
  }).strict().describe("Error API response");
277
+ const StandardErrorEnvelopeSchema = z.object({
278
+ code: z.string().describe("Error code"),
279
+ message: z.string().describe("Error message"),
280
+ scope: z.string().describe("Error scope"),
281
+ type: z.string().describe("Error type"),
282
+ context: z.unknown().optional().describe("Error context"),
283
+ recovery: z.union([z.string(), z.array(z.string())]).optional().describe("Recovery guidance"),
284
+ traceId: z.string().describe("Trace identifier"),
285
+ endpoint: z.string().describe("Request endpoint"),
286
+ method: z.string().describe("HTTP method")
287
+ }).strict().describe("Standard API error envelope");
276
288
  const StatusResponseSchema = z.object({
277
289
  status: z.string().describe("Operation status"),
278
290
  message: z.string().optional().describe("Optional status message")
@@ -318,6 +330,7 @@ export {
318
330
  SessionSearchResultSchema,
319
331
  SessionTokenUsageSchema,
320
332
  SseServerConfigSchema,
333
+ StandardErrorEnvelopeSchema,
321
334
  StatusResponseSchema,
322
335
  StdioServerConfigSchema,
323
336
  TextPartSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/server",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,13 +30,13 @@
30
30
  "hono": "^4.11.10",
31
31
  "ws": "^8.18.1",
32
32
  "yaml": "^2.7.1",
33
- "@modelcontextprotocol/sdk": "^1.26.0",
34
- "@dexto/agent-config": "1.6.7",
35
- "@dexto/agent-management": "1.6.7",
36
- "@dexto/core": "1.6.7",
37
- "@dexto/image-local": "1.6.7",
38
- "@dexto/storage": "1.6.7",
39
- "@dexto/tools-scheduler": "1.6.7"
33
+ "@modelcontextprotocol/sdk": "^1.27.1",
34
+ "@dexto/agent-config": "1.6.9",
35
+ "@dexto/agent-management": "1.6.9",
36
+ "@dexto/core": "1.6.9",
37
+ "@dexto/image-local": "1.6.9",
38
+ "@dexto/storage": "1.6.9",
39
+ "@dexto/tools-scheduler": "1.6.9"
40
40
  },
41
41
  "files": [
42
42
  "dist",