@dexto/server 1.6.20 → 1.6.21

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.
Files changed (111) hide show
  1. package/dist/a2a/jsonrpc/methods.cjs +1 -1
  2. package/dist/a2a/jsonrpc/methods.d.ts +14 -4
  3. package/dist/a2a/jsonrpc/methods.d.ts.map +1 -1
  4. package/dist/a2a/jsonrpc/methods.js +1 -1
  5. package/dist/hono/index.cjs +39 -8
  6. package/dist/hono/index.d.ts +43 -4531
  7. package/dist/hono/index.d.ts.map +1 -1
  8. package/dist/hono/index.js +42 -9
  9. package/dist/hono/routes/a2a-jsonrpc.d.ts.map +1 -1
  10. package/dist/hono/routes/a2a-tasks.cjs +158 -32
  11. package/dist/hono/routes/a2a-tasks.d.ts +1 -502
  12. package/dist/hono/routes/a2a-tasks.d.ts.map +1 -1
  13. package/dist/hono/routes/a2a-tasks.js +162 -32
  14. package/dist/hono/routes/a2a.d.ts.map +1 -1
  15. package/dist/hono/routes/agents.cjs +410 -329
  16. package/dist/hono/routes/agents.d.ts +16043 -68
  17. package/dist/hono/routes/agents.d.ts.map +1 -1
  18. package/dist/hono/routes/agents.js +418 -330
  19. package/dist/hono/routes/approvals.cjs +102 -88
  20. package/dist/hono/routes/approvals.d.ts +2089 -142
  21. package/dist/hono/routes/approvals.d.ts.map +1 -1
  22. package/dist/hono/routes/approvals.js +108 -89
  23. package/dist/hono/routes/dexto-auth.cjs +40 -33
  24. package/dist/hono/routes/dexto-auth.d.ts +401 -2
  25. package/dist/hono/routes/dexto-auth.d.ts.map +1 -1
  26. package/dist/hono/routes/dexto-auth.js +40 -33
  27. package/dist/hono/routes/discovery.cjs +16 -14
  28. package/dist/hono/routes/discovery.d.ts +586 -1
  29. package/dist/hono/routes/discovery.d.ts.map +1 -1
  30. package/dist/hono/routes/discovery.js +16 -14
  31. package/dist/hono/routes/greeting.cjs +26 -22
  32. package/dist/hono/routes/greeting.d.ts +787 -3
  33. package/dist/hono/routes/greeting.d.ts.map +1 -1
  34. package/dist/hono/routes/greeting.js +26 -22
  35. package/dist/hono/routes/health.d.ts +1 -1
  36. package/dist/hono/routes/key.cjs +60 -52
  37. package/dist/hono/routes/key.d.ts +1597 -1
  38. package/dist/hono/routes/key.d.ts.map +1 -1
  39. package/dist/hono/routes/key.js +60 -52
  40. package/dist/hono/routes/llm.cjs +381 -348
  41. package/dist/hono/routes/llm.d.ts +12136 -86
  42. package/dist/hono/routes/llm.d.ts.map +1 -1
  43. package/dist/hono/routes/llm.js +385 -348
  44. package/dist/hono/routes/mcp.cjs +257 -226
  45. package/dist/hono/routes/mcp.d.ts +6605 -309
  46. package/dist/hono/routes/mcp.d.ts.map +1 -1
  47. package/dist/hono/routes/mcp.js +263 -225
  48. package/dist/hono/routes/memory.cjs +102 -89
  49. package/dist/hono/routes/memory.d.ts +5368 -4
  50. package/dist/hono/routes/memory.d.ts.map +1 -1
  51. package/dist/hono/routes/memory.js +108 -90
  52. package/dist/hono/routes/messages.cjs +147 -139
  53. package/dist/hono/routes/messages.d.ts +3900 -11
  54. package/dist/hono/routes/messages.d.ts.map +1 -1
  55. package/dist/hono/routes/messages.js +150 -139
  56. package/dist/hono/routes/models.cjs +106 -64
  57. package/dist/hono/routes/models.d.ts +2874 -1
  58. package/dist/hono/routes/models.d.ts.map +1 -1
  59. package/dist/hono/routes/models.js +108 -64
  60. package/dist/hono/routes/openrouter.cjs +79 -65
  61. package/dist/hono/routes/openrouter.d.ts +854 -1
  62. package/dist/hono/routes/openrouter.d.ts.map +1 -1
  63. package/dist/hono/routes/openrouter.js +79 -65
  64. package/dist/hono/routes/prompts.cjs +136 -109
  65. package/dist/hono/routes/prompts.d.ts +2818 -10
  66. package/dist/hono/routes/prompts.d.ts.map +1 -1
  67. package/dist/hono/routes/prompts.js +138 -109
  68. package/dist/hono/routes/queue.cjs +133 -120
  69. package/dist/hono/routes/queue.d.ts +5144 -9
  70. package/dist/hono/routes/queue.d.ts.map +1 -1
  71. package/dist/hono/routes/queue.js +136 -120
  72. package/dist/hono/routes/resources.cjs +65 -46
  73. package/dist/hono/routes/resources.d.ts +1982 -4
  74. package/dist/hono/routes/resources.d.ts.map +1 -1
  75. package/dist/hono/routes/resources.js +72 -47
  76. package/dist/hono/routes/schedules.cjs +233 -226
  77. package/dist/hono/routes/schedules.d.ts +4198 -22
  78. package/dist/hono/routes/schedules.d.ts.map +1 -1
  79. package/dist/hono/routes/schedules.js +233 -226
  80. package/dist/hono/routes/search.cjs +34 -30
  81. package/dist/hono/routes/search.d.ts +2835 -12
  82. package/dist/hono/routes/search.d.ts.map +1 -1
  83. package/dist/hono/routes/search.js +40 -31
  84. package/dist/hono/routes/sessions.cjs +403 -396
  85. package/dist/hono/routes/sessions.d.ts +16582 -27
  86. package/dist/hono/routes/sessions.d.ts.map +1 -1
  87. package/dist/hono/routes/sessions.js +407 -397
  88. package/dist/hono/routes/static.d.ts.map +1 -1
  89. package/dist/hono/routes/system-prompt.cjs +57 -61
  90. package/dist/hono/routes/system-prompt.d.ts +1228 -2
  91. package/dist/hono/routes/system-prompt.d.ts.map +1 -1
  92. package/dist/hono/routes/system-prompt.js +58 -62
  93. package/dist/hono/routes/tools.cjs +29 -34
  94. package/dist/hono/routes/tools.d.ts +1755 -6
  95. package/dist/hono/routes/tools.d.ts.map +1 -1
  96. package/dist/hono/routes/tools.js +33 -33
  97. package/dist/hono/routes/webhooks.cjs +115 -123
  98. package/dist/hono/routes/webhooks.d.ts +2501 -11
  99. package/dist/hono/routes/webhooks.d.ts.map +1 -1
  100. package/dist/hono/routes/webhooks.js +120 -124
  101. package/dist/hono/routes/workspaces.cjs +84 -79
  102. package/dist/hono/routes/workspaces.d.ts +2093 -2
  103. package/dist/hono/routes/workspaces.d.ts.map +1 -1
  104. package/dist/hono/routes/workspaces.js +89 -80
  105. package/dist/hono/schemas/responses.cjs +406 -259
  106. package/dist/hono/schemas/responses.d.ts +1246 -123
  107. package/dist/hono/schemas/responses.d.ts.map +1 -1
  108. package/dist/hono/schemas/responses.js +144 -10
  109. package/dist/hono/types.d.ts +11 -0
  110. package/dist/hono/types.d.ts.map +1 -1
  111. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAU9C,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA0H1D"}
1
+ {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAMhE,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAElE,QAAA,MAAM,kBAAkB;;;;;;;;;EAMsC,CAAC;AAE/D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBb,CAAC;AAEH,QAAA,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,cAAc,EACrB;IAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;CAAE,CAC/C,CAAC;AACF,KAAK,sBAAsB,GAAG,kBAAkB,CAAC,OAAO,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAE9E,MAAM,MAAM,sBAAsB,GAC5B,eAAe,GACf,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,CAAC"}
@@ -1,110 +1,119 @@
1
1
  import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
2
- import { WorkspaceSchema } from "../schemas/responses.js";
2
+ import {
3
+ BadRequestErrorResponse,
4
+ InternalErrorResponse,
5
+ WorkspaceSchema
6
+ } from "../schemas/responses.js";
3
7
  const SetWorkspaceSchema = z.object({
4
8
  path: z.string().min(1).describe("Absolute workspace root path"),
5
9
  name: z.string().optional().describe("Optional workspace display name")
6
10
  }).strict().describe("Request body for setting the active workspace");
7
- function createWorkspacesRouter(getAgent) {
8
- const app = new OpenAPIHono();
9
- const listRoute = createRoute({
10
- method: "get",
11
- path: "/workspaces",
12
- summary: "List Workspaces",
13
- description: "Retrieves all known workspaces",
14
- tags: ["workspaces"],
15
- responses: {
16
- 200: {
17
- description: "List of workspaces",
18
- content: {
19
- "application/json": {
20
- schema: z.object({
21
- workspaces: z.array(WorkspaceSchema).describe("Workspace list")
22
- }).strict()
23
- }
11
+ const listRoute = createRoute({
12
+ method: "get",
13
+ path: "/workspaces",
14
+ summary: "List Workspaces",
15
+ description: "Retrieves all known workspaces",
16
+ tags: ["workspaces"],
17
+ responses: {
18
+ 200: {
19
+ description: "List of workspaces",
20
+ content: {
21
+ "application/json": {
22
+ schema: z.object({
23
+ workspaces: z.array(WorkspaceSchema).describe("Workspace list")
24
+ }).strict()
24
25
  }
25
26
  }
26
- }
27
- });
28
- const getActiveRoute = createRoute({
29
- method: "get",
30
- path: "/workspaces/active",
31
- summary: "Get Active Workspace",
32
- description: "Returns the active workspace, if any",
33
- tags: ["workspaces"],
34
- responses: {
35
- 200: {
36
- description: "Active workspace",
37
- content: {
38
- "application/json": {
39
- schema: z.object({
40
- workspace: WorkspaceSchema.nullable().describe(
41
- "Active workspace or null if none is set"
42
- )
43
- }).strict()
44
- }
27
+ },
28
+ 500: InternalErrorResponse
29
+ }
30
+ });
31
+ const getActiveRoute = createRoute({
32
+ method: "get",
33
+ path: "/workspaces/active",
34
+ summary: "Get Active Workspace",
35
+ description: "Returns the active workspace, if any",
36
+ tags: ["workspaces"],
37
+ responses: {
38
+ 200: {
39
+ description: "Active workspace",
40
+ content: {
41
+ "application/json": {
42
+ schema: z.object({
43
+ workspace: WorkspaceSchema.nullable().describe(
44
+ "Active workspace or null if none is set"
45
+ )
46
+ }).strict()
45
47
  }
46
48
  }
47
- }
48
- });
49
- const setActiveRoute = createRoute({
50
- method: "post",
51
- path: "/workspaces/active",
52
- summary: "Set Active Workspace",
53
- description: "Sets the active workspace for this runtime",
54
- tags: ["workspaces"],
55
- request: { body: { content: { "application/json": { schema: SetWorkspaceSchema } } } },
56
- responses: {
57
- 200: {
58
- description: "Active workspace updated",
59
- content: {
60
- "application/json": {
61
- schema: z.object({
62
- workspace: WorkspaceSchema.describe("Updated active workspace")
63
- }).strict()
64
- }
49
+ },
50
+ 500: InternalErrorResponse
51
+ }
52
+ });
53
+ const setActiveRoute = createRoute({
54
+ method: "post",
55
+ path: "/workspaces/active",
56
+ summary: "Set Active Workspace",
57
+ description: "Sets the active workspace for this runtime",
58
+ tags: ["workspaces"],
59
+ request: { body: { content: { "application/json": { schema: SetWorkspaceSchema } } } },
60
+ responses: {
61
+ 200: {
62
+ description: "Active workspace updated",
63
+ content: {
64
+ "application/json": {
65
+ schema: z.object({
66
+ workspace: WorkspaceSchema.describe("Updated active workspace")
67
+ }).strict()
65
68
  }
66
69
  }
67
- }
68
- });
69
- const clearActiveRoute = createRoute({
70
- method: "delete",
71
- path: "/workspaces/active",
72
- summary: "Clear Active Workspace",
73
- description: "Clears the active workspace for this runtime",
74
- tags: ["workspaces"],
75
- responses: {
76
- 200: {
77
- description: "Active workspace cleared",
78
- content: {
79
- "application/json": {
80
- schema: z.object({
81
- workspace: WorkspaceSchema.nullable().describe(
82
- "Active workspace or null if none is set"
83
- )
84
- }).strict()
85
- }
70
+ },
71
+ 400: BadRequestErrorResponse,
72
+ 500: InternalErrorResponse
73
+ }
74
+ });
75
+ const clearActiveRoute = createRoute({
76
+ method: "delete",
77
+ path: "/workspaces/active",
78
+ summary: "Clear Active Workspace",
79
+ description: "Clears the active workspace for this runtime",
80
+ tags: ["workspaces"],
81
+ responses: {
82
+ 200: {
83
+ description: "Active workspace cleared",
84
+ content: {
85
+ "application/json": {
86
+ schema: z.object({
87
+ workspace: WorkspaceSchema.nullable().describe(
88
+ "Active workspace or null if none is set"
89
+ )
90
+ }).strict()
86
91
  }
87
92
  }
88
- }
89
- });
93
+ },
94
+ 500: InternalErrorResponse
95
+ }
96
+ });
97
+ function createWorkspacesRouter(getAgent) {
98
+ const app = new OpenAPIHono();
90
99
  return app.openapi(listRoute, async (ctx) => {
91
100
  const agent = await getAgent(ctx);
92
101
  const workspaces = await agent.listWorkspaces();
93
- return ctx.json({ workspaces });
102
+ return ctx.json({ workspaces }, 200);
94
103
  }).openapi(getActiveRoute, async (ctx) => {
95
104
  const agent = await getAgent(ctx);
96
105
  const workspace = await agent.getWorkspace();
97
- return ctx.json({ workspace: workspace ?? null });
106
+ return ctx.json({ workspace: workspace ?? null }, 200);
98
107
  }).openapi(setActiveRoute, async (ctx) => {
99
108
  const agent = await getAgent(ctx);
100
109
  const input = ctx.req.valid("json");
101
110
  const workspaceInput = input.name === void 0 ? { path: input.path } : { path: input.path, name: input.name };
102
111
  const workspace = await agent.setWorkspace(workspaceInput);
103
- return ctx.json({ workspace });
112
+ return ctx.json({ workspace }, 200);
104
113
  }).openapi(clearActiveRoute, async (ctx) => {
105
114
  const agent = await getAgent(ctx);
106
115
  await agent.clearWorkspace();
107
- return ctx.json({ workspace: null });
116
+ return ctx.json({ workspace: null }, 200);
108
117
  });
109
118
  }
110
119
  export {