@dexto/server 1.5.8 → 1.6.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.
Files changed (58) hide show
  1. package/dist/events/a2a-sse-subscriber.d.ts +1 -1
  2. package/dist/hono/__tests__/test-fixtures.cjs +27 -6
  3. package/dist/hono/__tests__/test-fixtures.d.ts +2 -1
  4. package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
  5. package/dist/hono/__tests__/test-fixtures.js +31 -6
  6. package/dist/hono/index.cjs +17 -2
  7. package/dist/hono/index.d.ts +875 -59
  8. package/dist/hono/index.d.ts.map +1 -1
  9. package/dist/hono/index.js +17 -2
  10. package/dist/hono/routes/a2a-tasks.d.ts +6 -6
  11. package/dist/hono/routes/agents.cjs +38 -27
  12. package/dist/hono/routes/agents.d.ts +2 -1
  13. package/dist/hono/routes/agents.d.ts.map +1 -1
  14. package/dist/hono/routes/agents.js +37 -31
  15. package/dist/hono/routes/discovery.cjs +99 -22
  16. package/dist/hono/routes/discovery.d.ts +14 -12
  17. package/dist/hono/routes/discovery.d.ts.map +1 -1
  18. package/dist/hono/routes/discovery.js +89 -22
  19. package/dist/hono/routes/llm.d.ts +1 -1
  20. package/dist/hono/routes/mcp.cjs +96 -14
  21. package/dist/hono/routes/mcp.d.ts +138 -3
  22. package/dist/hono/routes/mcp.d.ts.map +1 -1
  23. package/dist/hono/routes/mcp.js +97 -15
  24. package/dist/hono/routes/memory.d.ts +4 -4
  25. package/dist/hono/routes/models.d.ts +1 -1
  26. package/dist/hono/routes/resources.d.ts +1 -1
  27. package/dist/hono/routes/schedules.cjs +455 -0
  28. package/dist/hono/routes/schedules.d.ts +472 -0
  29. package/dist/hono/routes/schedules.d.ts.map +1 -0
  30. package/dist/hono/routes/schedules.js +439 -0
  31. package/dist/hono/routes/search.d.ts +1 -1
  32. package/dist/hono/routes/sessions.cjs +10 -4
  33. package/dist/hono/routes/sessions.d.ts +135 -5
  34. package/dist/hono/routes/sessions.d.ts.map +1 -1
  35. package/dist/hono/routes/sessions.js +10 -4
  36. package/dist/hono/routes/tools.cjs +12 -19
  37. package/dist/hono/routes/tools.d.ts +5 -3
  38. package/dist/hono/routes/tools.d.ts.map +1 -1
  39. package/dist/hono/routes/tools.js +12 -19
  40. package/dist/hono/routes/workspaces.cjs +136 -0
  41. package/dist/hono/routes/workspaces.d.ts +77 -0
  42. package/dist/hono/routes/workspaces.d.ts.map +1 -0
  43. package/dist/hono/routes/workspaces.js +112 -0
  44. package/dist/hono/schemas/responses.cjs +82 -7
  45. package/dist/hono/schemas/responses.d.ts +366 -16
  46. package/dist/hono/schemas/responses.d.ts.map +1 -1
  47. package/dist/hono/schemas/responses.js +75 -6
  48. package/dist/hono/start-server.cjs +3 -3
  49. package/dist/hono/start-server.d.ts +15 -6
  50. package/dist/hono/start-server.d.ts.map +1 -1
  51. package/dist/hono/start-server.js +3 -3
  52. package/dist/index.cjs +9 -0
  53. package/dist/index.d.ts +1 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +4 -0
  56. package/dist/mcp/mcp-handler.d.ts +2 -2
  57. package/dist/mcp/mcp-handler.d.ts.map +1 -1
  58. package/package.json +8 -5
@@ -7,12 +7,20 @@ import { WebhookEventSubscriber } from '../events/webhook-subscriber.js';
7
7
  import { A2ASseEventSubscriber } from '../events/a2a-sse-subscriber.js';
8
8
  import { ApprovalCoordinator } from '../approval/approval-coordinator.js';
9
9
  export type GetAgentFn = (ctx: Context) => DextoAgent | Promise<DextoAgent>;
10
+ export type GetAgentConfigPathFn = (ctx: Context) => string | undefined | Promise<string | undefined>;
10
11
  export type CreateDextoAppOptions = {
11
12
  /**
12
13
  * Prefix for API routes. Defaults to '/api'.
13
14
  */
14
15
  apiPrefix?: string;
15
16
  getAgent: GetAgentFn;
17
+ /**
18
+ * Optional active agent config path resolver.
19
+ *
20
+ * Used by file-based endpoints (e.g. /api/agent/config) for reading/writing YAML.
21
+ * Host layers (CLI/server/platform) own config file paths; core does not.
22
+ */
23
+ getAgentConfigPath?: GetAgentConfigPathFn;
16
24
  getAgentCard: () => AgentCard;
17
25
  approvalCoordinator: ApprovalCoordinator;
18
26
  webhookSubscriber: WebhookEventSubscriber;
@@ -48,7 +56,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
48
56
  displayName: string;
49
57
  filePath: string;
50
58
  sizeBytes: number;
51
- source?: "manual" | "huggingface" | undefined;
59
+ source?: "huggingface" | "manual" | undefined;
52
60
  contextLength?: number | undefined;
53
61
  }[];
54
62
  };
@@ -141,13 +149,9 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
141
149
  $get: {
142
150
  input: {};
143
151
  output: {
144
- internalTools: {
145
- description: string;
146
- name: string;
147
- }[];
148
- customTools: {
152
+ blob: {
149
153
  type: string;
150
- category: "customTools" | "compaction" | "blob" | "database";
154
+ category: "blob" | "tools" | "compaction" | "database";
151
155
  metadata?: {
152
156
  [x: string]: import("hono/utils/types").JSONValue;
153
157
  description?: string | undefined;
@@ -156,31 +160,35 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
156
160
  }[];
157
161
  compaction: {
158
162
  type: string;
159
- category: "customTools" | "compaction" | "blob" | "database";
163
+ category: "blob" | "tools" | "compaction" | "database";
160
164
  metadata?: {
161
165
  [x: string]: import("hono/utils/types").JSONValue;
162
166
  description?: string | undefined;
163
167
  displayName?: string | undefined;
164
168
  } | undefined;
165
169
  }[];
166
- blob: {
170
+ database: {
167
171
  type: string;
168
- category: "customTools" | "compaction" | "blob" | "database";
172
+ category: "blob" | "tools" | "compaction" | "database";
169
173
  metadata?: {
170
174
  [x: string]: import("hono/utils/types").JSONValue;
171
175
  description?: string | undefined;
172
176
  displayName?: string | undefined;
173
177
  } | undefined;
174
178
  }[];
175
- database: {
179
+ toolFactories: {
176
180
  type: string;
177
- category: "customTools" | "compaction" | "blob" | "database";
181
+ category: "blob" | "tools" | "compaction" | "database";
178
182
  metadata?: {
179
183
  [x: string]: import("hono/utils/types").JSONValue;
180
184
  description?: string | undefined;
181
185
  displayName?: string | undefined;
182
186
  } | undefined;
183
187
  }[];
188
+ builtinTools: {
189
+ description: string;
190
+ name: string;
191
+ }[];
184
192
  };
185
193
  outputFormat: "json";
186
194
  status: 200;
@@ -195,7 +203,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
195
203
  description: string;
196
204
  id: string;
197
205
  name: string;
198
- source: "custom" | "mcp" | "internal";
206
+ source: "local" | "mcp";
199
207
  serverName?: string | undefined;
200
208
  inputSchema?: {
201
209
  [x: string]: import("hono/utils/types").JSONValue;
@@ -211,10 +219,12 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
211
219
  } | undefined;
212
220
  required?: string[] | undefined;
213
221
  } | undefined;
222
+ _meta?: {
223
+ [x: string]: import("hono/utils/types").JSONValue;
224
+ } | undefined;
214
225
  }[];
215
226
  totalCount: number;
216
- internalCount: number;
217
- customCount: number;
227
+ localCount: number;
218
228
  mcpCount: number;
219
229
  };
220
230
  outputFormat: "json";
@@ -772,42 +782,583 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
772
782
  } | {
773
783
  input: {
774
784
  param: {
775
- approvalId: string;
776
- };
777
- } & {
778
- header: {
779
- 'Idempotency-Key'?: string | undefined;
785
+ approvalId: string;
786
+ };
787
+ } & {
788
+ header: {
789
+ 'Idempotency-Key'?: string | undefined;
790
+ };
791
+ } & {
792
+ json: {
793
+ status: import("@dexto/core").ApprovalStatus.APPROVED | import("@dexto/core").ApprovalStatus.DENIED;
794
+ formData?: Record<string, unknown> | undefined;
795
+ rememberChoice?: boolean | undefined;
796
+ };
797
+ };
798
+ output: {};
799
+ outputFormat: string;
800
+ status: 503;
801
+ } | {
802
+ input: {
803
+ param: {
804
+ approvalId: string;
805
+ };
806
+ } & {
807
+ header: {
808
+ 'Idempotency-Key'?: string | undefined;
809
+ };
810
+ } & {
811
+ json: {
812
+ status: import("@dexto/core").ApprovalStatus.APPROVED | import("@dexto/core").ApprovalStatus.DENIED;
813
+ formData?: Record<string, unknown> | undefined;
814
+ rememberChoice?: boolean | undefined;
815
+ };
816
+ };
817
+ output: {
818
+ status: import("@dexto/core").ApprovalStatus.APPROVED | import("@dexto/core").ApprovalStatus.DENIED;
819
+ ok: boolean;
820
+ approvalId: string;
821
+ };
822
+ outputFormat: "json";
823
+ status: 200;
824
+ };
825
+ };
826
+ }, "/api"> & import("hono/types").MergeSchemaPath<{
827
+ "/schedules": {
828
+ $get: {
829
+ input: {};
830
+ output: {
831
+ schedules: {
832
+ id: string;
833
+ name: string;
834
+ createdAt: number;
835
+ cronExpression: string;
836
+ timezone: string;
837
+ enabled: boolean;
838
+ task: {
839
+ instruction: string;
840
+ metadata?: {
841
+ [x: string]: import("hono/utils/types").JSONValue;
842
+ } | undefined;
843
+ };
844
+ sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
845
+ updatedAt: number;
846
+ runCount: number;
847
+ successCount: number;
848
+ failureCount: number;
849
+ sessionId?: string | undefined;
850
+ workspacePath?: string | undefined;
851
+ lastRunAt?: number | undefined;
852
+ nextRunAt?: number | undefined;
853
+ lastError?: string | undefined;
854
+ }[];
855
+ };
856
+ outputFormat: "json";
857
+ status: 200;
858
+ } | {
859
+ input: {};
860
+ output: {
861
+ error: {
862
+ message: string;
863
+ code?: string | undefined;
864
+ details?: import("hono/utils/types").JSONValue;
865
+ };
866
+ ok: false;
867
+ };
868
+ outputFormat: "json";
869
+ status: 500;
870
+ } | {
871
+ input: {};
872
+ output: {
873
+ error: {
874
+ message: string;
875
+ code?: string | undefined;
876
+ details?: import("hono/utils/types").JSONValue;
877
+ };
878
+ ok: false;
879
+ };
880
+ outputFormat: "json";
881
+ status: 503;
882
+ };
883
+ };
884
+ } & {
885
+ "/schedules": {
886
+ $post: {
887
+ input: {
888
+ json: {
889
+ name: string;
890
+ instruction: string;
891
+ cronExpression: string;
892
+ timezone?: string | undefined;
893
+ enabled?: boolean | undefined;
894
+ workspacePath?: string | null | undefined;
895
+ };
896
+ };
897
+ output: {
898
+ error: {
899
+ message: string;
900
+ code?: string | undefined;
901
+ details?: import("hono/utils/types").JSONValue;
902
+ };
903
+ ok: false;
904
+ };
905
+ outputFormat: "json";
906
+ status: 500;
907
+ } | {
908
+ input: {
909
+ json: {
910
+ name: string;
911
+ instruction: string;
912
+ cronExpression: string;
913
+ timezone?: string | undefined;
914
+ enabled?: boolean | undefined;
915
+ workspacePath?: string | null | undefined;
916
+ };
917
+ };
918
+ output: {
919
+ error: {
920
+ message: string;
921
+ code?: string | undefined;
922
+ details?: import("hono/utils/types").JSONValue;
923
+ };
924
+ ok: false;
925
+ };
926
+ outputFormat: "json";
927
+ status: 503;
928
+ } | {
929
+ input: {
930
+ json: {
931
+ name: string;
932
+ instruction: string;
933
+ cronExpression: string;
934
+ timezone?: string | undefined;
935
+ enabled?: boolean | undefined;
936
+ workspacePath?: string | null | undefined;
937
+ };
938
+ };
939
+ output: {
940
+ schedule: {
941
+ id: string;
942
+ name: string;
943
+ createdAt: number;
944
+ cronExpression: string;
945
+ timezone: string;
946
+ enabled: boolean;
947
+ task: {
948
+ instruction: string;
949
+ metadata?: {
950
+ [x: string]: import("hono/utils/types").JSONValue;
951
+ } | undefined;
952
+ };
953
+ sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
954
+ updatedAt: number;
955
+ runCount: number;
956
+ successCount: number;
957
+ failureCount: number;
958
+ sessionId?: string | undefined;
959
+ workspacePath?: string | undefined;
960
+ lastRunAt?: number | undefined;
961
+ nextRunAt?: number | undefined;
962
+ lastError?: string | undefined;
963
+ };
964
+ };
965
+ outputFormat: "json";
966
+ status: 201;
967
+ } | {
968
+ input: {
969
+ json: {
970
+ name: string;
971
+ instruction: string;
972
+ cronExpression: string;
973
+ timezone?: string | undefined;
974
+ enabled?: boolean | undefined;
975
+ workspacePath?: string | null | undefined;
976
+ };
977
+ };
978
+ output: {
979
+ error: {
980
+ message: string;
981
+ code?: string | undefined;
982
+ details?: import("hono/utils/types").JSONValue;
983
+ };
984
+ ok: false;
985
+ };
986
+ outputFormat: "json";
987
+ status: 400;
988
+ } | {
989
+ input: {
990
+ json: {
991
+ name: string;
992
+ instruction: string;
993
+ cronExpression: string;
994
+ timezone?: string | undefined;
995
+ enabled?: boolean | undefined;
996
+ workspacePath?: string | null | undefined;
997
+ };
998
+ };
999
+ output: {
1000
+ error: {
1001
+ message: string;
1002
+ code?: string | undefined;
1003
+ details?: import("hono/utils/types").JSONValue;
1004
+ };
1005
+ ok: false;
1006
+ };
1007
+ outputFormat: "json";
1008
+ status: 429;
1009
+ };
1010
+ };
1011
+ } & {
1012
+ "/schedules/:scheduleId": {
1013
+ $patch: {
1014
+ input: {
1015
+ param: {
1016
+ scheduleId: string;
1017
+ };
1018
+ } & {
1019
+ json: {
1020
+ name?: string | undefined;
1021
+ instruction?: string | undefined;
1022
+ cronExpression?: string | undefined;
1023
+ timezone?: string | undefined;
1024
+ enabled?: boolean | undefined;
1025
+ workspacePath?: string | null | undefined;
1026
+ };
1027
+ };
1028
+ output: {
1029
+ error: {
1030
+ message: string;
1031
+ code?: string | undefined;
1032
+ details?: import("hono/utils/types").JSONValue;
1033
+ };
1034
+ ok: false;
1035
+ };
1036
+ outputFormat: "json";
1037
+ status: 500;
1038
+ } | {
1039
+ input: {
1040
+ param: {
1041
+ scheduleId: string;
1042
+ };
1043
+ } & {
1044
+ json: {
1045
+ name?: string | undefined;
1046
+ instruction?: string | undefined;
1047
+ cronExpression?: string | undefined;
1048
+ timezone?: string | undefined;
1049
+ enabled?: boolean | undefined;
1050
+ workspacePath?: string | null | undefined;
1051
+ };
1052
+ };
1053
+ output: {
1054
+ error: {
1055
+ message: string;
1056
+ code?: string | undefined;
1057
+ details?: import("hono/utils/types").JSONValue;
1058
+ };
1059
+ ok: false;
1060
+ };
1061
+ outputFormat: "json";
1062
+ status: 503;
1063
+ } | {
1064
+ input: {
1065
+ param: {
1066
+ scheduleId: string;
1067
+ };
1068
+ } & {
1069
+ json: {
1070
+ name?: string | undefined;
1071
+ instruction?: string | undefined;
1072
+ cronExpression?: string | undefined;
1073
+ timezone?: string | undefined;
1074
+ enabled?: boolean | undefined;
1075
+ workspacePath?: string | null | undefined;
1076
+ };
1077
+ };
1078
+ output: {
1079
+ error: {
1080
+ message: string;
1081
+ code?: string | undefined;
1082
+ details?: import("hono/utils/types").JSONValue;
1083
+ };
1084
+ ok: false;
1085
+ };
1086
+ outputFormat: "json";
1087
+ status: 400;
1088
+ } | {
1089
+ input: {
1090
+ param: {
1091
+ scheduleId: string;
1092
+ };
1093
+ } & {
1094
+ json: {
1095
+ name?: string | undefined;
1096
+ instruction?: string | undefined;
1097
+ cronExpression?: string | undefined;
1098
+ timezone?: string | undefined;
1099
+ enabled?: boolean | undefined;
1100
+ workspacePath?: string | null | undefined;
1101
+ };
1102
+ };
1103
+ output: {
1104
+ schedule: {
1105
+ id: string;
1106
+ name: string;
1107
+ createdAt: number;
1108
+ cronExpression: string;
1109
+ timezone: string;
1110
+ enabled: boolean;
1111
+ task: {
1112
+ instruction: string;
1113
+ metadata?: {
1114
+ [x: string]: import("hono/utils/types").JSONValue;
1115
+ } | undefined;
1116
+ };
1117
+ sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
1118
+ updatedAt: number;
1119
+ runCount: number;
1120
+ successCount: number;
1121
+ failureCount: number;
1122
+ sessionId?: string | undefined;
1123
+ workspacePath?: string | undefined;
1124
+ lastRunAt?: number | undefined;
1125
+ nextRunAt?: number | undefined;
1126
+ lastError?: string | undefined;
1127
+ };
1128
+ };
1129
+ outputFormat: "json";
1130
+ status: 200;
1131
+ } | {
1132
+ input: {
1133
+ param: {
1134
+ scheduleId: string;
1135
+ };
1136
+ } & {
1137
+ json: {
1138
+ name?: string | undefined;
1139
+ instruction?: string | undefined;
1140
+ cronExpression?: string | undefined;
1141
+ timezone?: string | undefined;
1142
+ enabled?: boolean | undefined;
1143
+ workspacePath?: string | null | undefined;
1144
+ };
1145
+ };
1146
+ output: {
1147
+ error: {
1148
+ message: string;
1149
+ code?: string | undefined;
1150
+ details?: import("hono/utils/types").JSONValue;
1151
+ };
1152
+ ok: false;
1153
+ };
1154
+ outputFormat: "json";
1155
+ status: 404;
1156
+ };
1157
+ };
1158
+ } & {
1159
+ "/schedules/:scheduleId": {
1160
+ $delete: {
1161
+ input: {
1162
+ param: {
1163
+ scheduleId: string;
1164
+ };
1165
+ };
1166
+ output: {
1167
+ error: {
1168
+ message: string;
1169
+ code?: string | undefined;
1170
+ details?: import("hono/utils/types").JSONValue;
1171
+ };
1172
+ ok: false;
1173
+ };
1174
+ outputFormat: "json";
1175
+ status: 500;
1176
+ } | {
1177
+ input: {
1178
+ param: {
1179
+ scheduleId: string;
1180
+ };
1181
+ };
1182
+ output: {
1183
+ error: {
1184
+ message: string;
1185
+ code?: string | undefined;
1186
+ details?: import("hono/utils/types").JSONValue;
1187
+ };
1188
+ ok: false;
1189
+ };
1190
+ outputFormat: "json";
1191
+ status: 503;
1192
+ } | {
1193
+ input: {
1194
+ param: {
1195
+ scheduleId: string;
1196
+ };
1197
+ };
1198
+ output: {
1199
+ error: {
1200
+ message: string;
1201
+ code?: string | undefined;
1202
+ details?: import("hono/utils/types").JSONValue;
1203
+ };
1204
+ ok: false;
1205
+ };
1206
+ outputFormat: "json";
1207
+ status: 404;
1208
+ } | {
1209
+ input: {
1210
+ param: {
1211
+ scheduleId: string;
1212
+ };
1213
+ };
1214
+ output: {
1215
+ deleted: boolean;
1216
+ };
1217
+ outputFormat: "json";
1218
+ status: 200;
1219
+ };
1220
+ };
1221
+ } & {
1222
+ "/schedules/:scheduleId/trigger": {
1223
+ $post: {
1224
+ input: {
1225
+ param: {
1226
+ scheduleId: string;
1227
+ };
1228
+ };
1229
+ output: {
1230
+ error: {
1231
+ message: string;
1232
+ code?: string | undefined;
1233
+ details?: import("hono/utils/types").JSONValue;
1234
+ };
1235
+ ok: false;
1236
+ };
1237
+ outputFormat: "json";
1238
+ status: 500;
1239
+ } | {
1240
+ input: {
1241
+ param: {
1242
+ scheduleId: string;
1243
+ };
1244
+ };
1245
+ output: {
1246
+ error: {
1247
+ message: string;
1248
+ code?: string | undefined;
1249
+ details?: import("hono/utils/types").JSONValue;
1250
+ };
1251
+ ok: false;
1252
+ };
1253
+ outputFormat: "json";
1254
+ status: 503;
1255
+ } | {
1256
+ input: {
1257
+ param: {
1258
+ scheduleId: string;
780
1259
  };
781
- } & {
782
- json: {
783
- status: import("@dexto/core").ApprovalStatus.APPROVED | import("@dexto/core").ApprovalStatus.DENIED;
784
- formData?: Record<string, unknown> | undefined;
785
- rememberChoice?: boolean | undefined;
1260
+ };
1261
+ output: {
1262
+ error: {
1263
+ message: string;
1264
+ code?: string | undefined;
1265
+ details?: import("hono/utils/types").JSONValue;
786
1266
  };
1267
+ ok: false;
787
1268
  };
788
- output: {};
789
- outputFormat: string;
790
- status: 503;
1269
+ outputFormat: "json";
1270
+ status: 404;
791
1271
  } | {
792
1272
  input: {
793
1273
  param: {
794
- approvalId: string;
795
- };
796
- } & {
797
- header: {
798
- 'Idempotency-Key'?: string | undefined;
1274
+ scheduleId: string;
799
1275
  };
800
- } & {
1276
+ };
1277
+ output: {
1278
+ scheduled: boolean;
1279
+ execution?: {
1280
+ status: "success" | "pending" | "failed" | "timeout";
1281
+ id: string;
1282
+ scheduleId: string;
1283
+ triggeredAt: number;
1284
+ completedAt?: number | undefined;
1285
+ duration?: number | undefined;
1286
+ error?: string | undefined;
1287
+ result?: string | undefined;
1288
+ } | undefined;
1289
+ };
1290
+ outputFormat: "json";
1291
+ status: 200;
1292
+ };
1293
+ };
1294
+ }, "/api"> & import("hono/types").MergeSchemaPath<{
1295
+ "/workspaces": {
1296
+ $get: {
1297
+ input: {};
1298
+ output: {
1299
+ workspaces: {
1300
+ path: string;
1301
+ id: string;
1302
+ createdAt: number;
1303
+ lastActiveAt: number;
1304
+ name?: string | null | undefined;
1305
+ }[];
1306
+ };
1307
+ outputFormat: "json";
1308
+ status: 200;
1309
+ };
1310
+ };
1311
+ } & {
1312
+ "/workspaces/active": {
1313
+ $get: {
1314
+ input: {};
1315
+ output: {
1316
+ workspace: {
1317
+ path: string;
1318
+ id: string;
1319
+ createdAt: number;
1320
+ lastActiveAt: number;
1321
+ name?: string | null | undefined;
1322
+ } | null;
1323
+ };
1324
+ outputFormat: "json";
1325
+ status: 200;
1326
+ };
1327
+ };
1328
+ } & {
1329
+ "/workspaces/active": {
1330
+ $post: {
1331
+ input: {
801
1332
  json: {
802
- status: import("@dexto/core").ApprovalStatus.APPROVED | import("@dexto/core").ApprovalStatus.DENIED;
803
- formData?: Record<string, unknown> | undefined;
804
- rememberChoice?: boolean | undefined;
1333
+ path: string;
1334
+ name?: string | undefined;
805
1335
  };
806
1336
  };
807
1337
  output: {
808
- status: import("@dexto/core").ApprovalStatus.APPROVED | import("@dexto/core").ApprovalStatus.DENIED;
809
- ok: boolean;
810
- approvalId: string;
1338
+ workspace: {
1339
+ path: string;
1340
+ id: string;
1341
+ createdAt: number;
1342
+ lastActiveAt: number;
1343
+ name?: string | null | undefined;
1344
+ };
1345
+ };
1346
+ outputFormat: "json";
1347
+ status: 200;
1348
+ };
1349
+ };
1350
+ } & {
1351
+ "/workspaces/active": {
1352
+ $delete: {
1353
+ input: {};
1354
+ output: {
1355
+ workspace: {
1356
+ path: string;
1357
+ id: string;
1358
+ createdAt: number;
1359
+ lastActiveAt: number;
1360
+ name?: string | null | undefined;
1361
+ } | null;
811
1362
  };
812
1363
  outputFormat: "json";
813
1364
  status: 200;
@@ -830,8 +1381,8 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
830
1381
  ok: true;
831
1382
  memory: {
832
1383
  content: string;
833
- createdAt: number;
834
1384
  id: string;
1385
+ createdAt: number;
835
1386
  updatedAt: number;
836
1387
  metadata?: {
837
1388
  [x: string]: import("hono/utils/types").JSONValue;
@@ -860,8 +1411,8 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
860
1411
  output: {
861
1412
  memories: {
862
1413
  content: string;
863
- createdAt: number;
864
1414
  id: string;
1415
+ createdAt: number;
865
1416
  updatedAt: number;
866
1417
  metadata?: {
867
1418
  [x: string]: import("hono/utils/types").JSONValue;
@@ -888,8 +1439,8 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
888
1439
  ok: true;
889
1440
  memory: {
890
1441
  content: string;
891
- createdAt: number;
892
1442
  id: string;
1443
+ createdAt: number;
893
1444
  updatedAt: number;
894
1445
  metadata?: {
895
1446
  [x: string]: import("hono/utils/types").JSONValue;
@@ -924,8 +1475,8 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
924
1475
  ok: true;
925
1476
  memory: {
926
1477
  content: string;
927
- createdAt: number;
928
1478
  id: string;
1479
+ createdAt: number;
929
1480
  updatedAt: number;
930
1481
  metadata?: {
931
1482
  [x: string]: import("hono/utils/types").JSONValue;
@@ -960,7 +1511,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
960
1511
  $get: {
961
1512
  input: {};
962
1513
  output: {
963
- ok: true;
964
1514
  resources: {
965
1515
  uri: string;
966
1516
  source: "mcp" | "internal";
@@ -974,6 +1524,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
974
1524
  size?: number | undefined;
975
1525
  lastModified?: string | undefined;
976
1526
  }[];
1527
+ ok: true;
977
1528
  };
978
1529
  outputFormat: "json";
979
1530
  status: 200;
@@ -1350,6 +1901,138 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1350
1901
  status: 200;
1351
1902
  };
1352
1903
  };
1904
+ } & {
1905
+ "/mcp/servers/:serverId/config": {
1906
+ $get: {
1907
+ input: {
1908
+ param: {
1909
+ serverId: string;
1910
+ };
1911
+ };
1912
+ output: {};
1913
+ outputFormat: string;
1914
+ status: 404;
1915
+ } | {
1916
+ input: {
1917
+ param: {
1918
+ serverId: string;
1919
+ };
1920
+ };
1921
+ output: {
1922
+ config: {
1923
+ timeout: number;
1924
+ type: "stdio";
1925
+ enabled: boolean;
1926
+ command: string;
1927
+ args: string[];
1928
+ env: {
1929
+ [x: string]: string;
1930
+ };
1931
+ connectionMode: "strict" | "lenient";
1932
+ } | {
1933
+ timeout: number;
1934
+ type: "sse";
1935
+ enabled: boolean;
1936
+ connectionMode: "strict" | "lenient";
1937
+ url: string;
1938
+ headers: {
1939
+ [x: string]: string;
1940
+ };
1941
+ } | {
1942
+ timeout: number;
1943
+ type: "http";
1944
+ enabled: boolean;
1945
+ connectionMode: "strict" | "lenient";
1946
+ url: string;
1947
+ headers: {
1948
+ [x: string]: string;
1949
+ };
1950
+ };
1951
+ name: string;
1952
+ };
1953
+ outputFormat: "json";
1954
+ status: 200;
1955
+ };
1956
+ };
1957
+ } & {
1958
+ "/mcp/servers/:serverId": {
1959
+ $put: {
1960
+ input: {
1961
+ param: {
1962
+ serverId: string;
1963
+ };
1964
+ } & {
1965
+ json: {
1966
+ config: {
1967
+ type: "stdio";
1968
+ command: string;
1969
+ timeout?: number | undefined;
1970
+ enabled?: boolean | undefined;
1971
+ args?: string[] | undefined;
1972
+ env?: Record<string, string> | undefined;
1973
+ connectionMode?: "strict" | "lenient" | undefined;
1974
+ } | {
1975
+ type: "sse";
1976
+ url: string;
1977
+ timeout?: number | undefined;
1978
+ enabled?: boolean | undefined;
1979
+ connectionMode?: "strict" | "lenient" | undefined;
1980
+ headers?: Record<string, string> | undefined;
1981
+ } | {
1982
+ type: "http";
1983
+ url: string;
1984
+ timeout?: number | undefined;
1985
+ enabled?: boolean | undefined;
1986
+ connectionMode?: "strict" | "lenient" | undefined;
1987
+ headers?: Record<string, string> | undefined;
1988
+ };
1989
+ persistToAgent?: boolean | undefined;
1990
+ };
1991
+ };
1992
+ output: {};
1993
+ outputFormat: string;
1994
+ status: 404;
1995
+ } | {
1996
+ input: {
1997
+ param: {
1998
+ serverId: string;
1999
+ };
2000
+ } & {
2001
+ json: {
2002
+ config: {
2003
+ type: "stdio";
2004
+ command: string;
2005
+ timeout?: number | undefined;
2006
+ enabled?: boolean | undefined;
2007
+ args?: string[] | undefined;
2008
+ env?: Record<string, string> | undefined;
2009
+ connectionMode?: "strict" | "lenient" | undefined;
2010
+ } | {
2011
+ type: "sse";
2012
+ url: string;
2013
+ timeout?: number | undefined;
2014
+ enabled?: boolean | undefined;
2015
+ connectionMode?: "strict" | "lenient" | undefined;
2016
+ headers?: Record<string, string> | undefined;
2017
+ } | {
2018
+ type: "http";
2019
+ url: string;
2020
+ timeout?: number | undefined;
2021
+ enabled?: boolean | undefined;
2022
+ connectionMode?: "strict" | "lenient" | undefined;
2023
+ headers?: Record<string, string> | undefined;
2024
+ };
2025
+ persistToAgent?: boolean | undefined;
2026
+ };
2027
+ };
2028
+ output: {
2029
+ status: string;
2030
+ name: string;
2031
+ };
2032
+ outputFormat: "json";
2033
+ status: 200;
2034
+ };
2035
+ };
1353
2036
  } & {
1354
2037
  "/mcp/servers/:serverId/tools": {
1355
2038
  $get: {
@@ -1386,6 +2069,9 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1386
2069
  } | undefined;
1387
2070
  required?: string[] | undefined;
1388
2071
  } | undefined;
2072
+ _meta?: {
2073
+ [x: string]: import("hono/utils/types").JSONValue;
2074
+ } | undefined;
1389
2075
  }[];
1390
2076
  };
1391
2077
  outputFormat: "json";
@@ -1492,7 +2178,6 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1492
2178
  };
1493
2179
  };
1494
2180
  output: {
1495
- success: boolean;
1496
2181
  resources: {
1497
2182
  uri: string;
1498
2183
  source: "mcp" | "internal";
@@ -1506,6 +2191,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1506
2191
  size?: number | undefined;
1507
2192
  lastModified?: string | undefined;
1508
2193
  }[];
2194
+ success: boolean;
1509
2195
  };
1510
2196
  outputFormat: "json";
1511
2197
  status: 200;
@@ -1631,9 +2317,9 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1631
2317
  results: {
1632
2318
  sessionId: string;
1633
2319
  metadata: {
2320
+ messageCount: number;
1634
2321
  createdAt: number;
1635
2322
  lastActivity: number;
1636
- messageCount: number;
1637
2323
  };
1638
2324
  matchCount: number;
1639
2325
  firstMatch: {
@@ -1708,10 +2394,36 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1708
2394
  output: {
1709
2395
  sessions: {
1710
2396
  id: string;
2397
+ messageCount: number;
1711
2398
  createdAt: number | null;
1712
2399
  lastActivity: number | null;
1713
- messageCount: number;
1714
2400
  title?: string | null | undefined;
2401
+ tokenUsage?: {
2402
+ inputTokens: number;
2403
+ outputTokens: number;
2404
+ reasoningTokens: number;
2405
+ totalTokens: number;
2406
+ cacheReadTokens: number;
2407
+ cacheWriteTokens: number;
2408
+ } | undefined;
2409
+ estimatedCost?: number | undefined;
2410
+ modelStats?: {
2411
+ tokenUsage: {
2412
+ inputTokens: number;
2413
+ outputTokens: number;
2414
+ reasoningTokens: number;
2415
+ totalTokens: number;
2416
+ cacheReadTokens: number;
2417
+ cacheWriteTokens: number;
2418
+ };
2419
+ model: string;
2420
+ provider: string;
2421
+ messageCount: number;
2422
+ estimatedCost: number;
2423
+ firstUsedAt: number;
2424
+ lastUsedAt: number;
2425
+ }[] | undefined;
2426
+ workspaceId?: string | null | undefined;
1715
2427
  }[];
1716
2428
  };
1717
2429
  outputFormat: "json";
@@ -1729,10 +2441,36 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1729
2441
  output: {
1730
2442
  session: {
1731
2443
  id: string;
2444
+ messageCount: number;
1732
2445
  createdAt: number | null;
1733
2446
  lastActivity: number | null;
1734
- messageCount: number;
1735
2447
  title?: string | null | undefined;
2448
+ tokenUsage?: {
2449
+ inputTokens: number;
2450
+ outputTokens: number;
2451
+ reasoningTokens: number;
2452
+ totalTokens: number;
2453
+ cacheReadTokens: number;
2454
+ cacheWriteTokens: number;
2455
+ } | undefined;
2456
+ estimatedCost?: number | undefined;
2457
+ modelStats?: {
2458
+ tokenUsage: {
2459
+ inputTokens: number;
2460
+ outputTokens: number;
2461
+ reasoningTokens: number;
2462
+ totalTokens: number;
2463
+ cacheReadTokens: number;
2464
+ cacheWriteTokens: number;
2465
+ };
2466
+ model: string;
2467
+ provider: string;
2468
+ messageCount: number;
2469
+ estimatedCost: number;
2470
+ firstUsedAt: number;
2471
+ lastUsedAt: number;
2472
+ }[] | undefined;
2473
+ workspaceId?: string | null | undefined;
1736
2474
  };
1737
2475
  };
1738
2476
  outputFormat: "json";
@@ -1750,11 +2488,37 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1750
2488
  output: {
1751
2489
  session: {
1752
2490
  id: string;
2491
+ messageCount: number;
1753
2492
  createdAt: number | null;
1754
2493
  lastActivity: number | null;
1755
- messageCount: number;
1756
2494
  history: number;
1757
2495
  title?: string | null | undefined;
2496
+ tokenUsage?: {
2497
+ inputTokens: number;
2498
+ outputTokens: number;
2499
+ reasoningTokens: number;
2500
+ totalTokens: number;
2501
+ cacheReadTokens: number;
2502
+ cacheWriteTokens: number;
2503
+ } | undefined;
2504
+ estimatedCost?: number | undefined;
2505
+ modelStats?: {
2506
+ tokenUsage: {
2507
+ inputTokens: number;
2508
+ outputTokens: number;
2509
+ reasoningTokens: number;
2510
+ totalTokens: number;
2511
+ cacheReadTokens: number;
2512
+ cacheWriteTokens: number;
2513
+ };
2514
+ model: string;
2515
+ provider: string;
2516
+ messageCount: number;
2517
+ estimatedCost: number;
2518
+ firstUsedAt: number;
2519
+ lastUsedAt: number;
2520
+ }[] | undefined;
2521
+ workspaceId?: string | null | undefined;
1758
2522
  };
1759
2523
  };
1760
2524
  outputFormat: "json";
@@ -1876,11 +2640,37 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1876
2640
  output: {
1877
2641
  session: {
1878
2642
  id: string;
2643
+ messageCount: number;
1879
2644
  createdAt: number | null;
1880
2645
  lastActivity: number | null;
1881
- messageCount: number;
1882
2646
  isBusy: boolean;
1883
2647
  title?: string | null | undefined;
2648
+ tokenUsage?: {
2649
+ inputTokens: number;
2650
+ outputTokens: number;
2651
+ reasoningTokens: number;
2652
+ totalTokens: number;
2653
+ cacheReadTokens: number;
2654
+ cacheWriteTokens: number;
2655
+ } | undefined;
2656
+ estimatedCost?: number | undefined;
2657
+ modelStats?: {
2658
+ tokenUsage: {
2659
+ inputTokens: number;
2660
+ outputTokens: number;
2661
+ reasoningTokens: number;
2662
+ totalTokens: number;
2663
+ cacheReadTokens: number;
2664
+ cacheWriteTokens: number;
2665
+ };
2666
+ model: string;
2667
+ provider: string;
2668
+ messageCount: number;
2669
+ estimatedCost: number;
2670
+ firstUsedAt: number;
2671
+ lastUsedAt: number;
2672
+ }[] | undefined;
2673
+ workspaceId?: string | null | undefined;
1884
2674
  };
1885
2675
  };
1886
2676
  outputFormat: "json";
@@ -1913,10 +2703,36 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
1913
2703
  output: {
1914
2704
  session: {
1915
2705
  id: string;
2706
+ messageCount: number;
1916
2707
  createdAt: number | null;
1917
2708
  lastActivity: number | null;
1918
- messageCount: number;
1919
2709
  title?: string | null | undefined;
2710
+ tokenUsage?: {
2711
+ inputTokens: number;
2712
+ outputTokens: number;
2713
+ reasoningTokens: number;
2714
+ totalTokens: number;
2715
+ cacheReadTokens: number;
2716
+ cacheWriteTokens: number;
2717
+ } | undefined;
2718
+ estimatedCost?: number | undefined;
2719
+ modelStats?: {
2720
+ tokenUsage: {
2721
+ inputTokens: number;
2722
+ outputTokens: number;
2723
+ reasoningTokens: number;
2724
+ totalTokens: number;
2725
+ cacheReadTokens: number;
2726
+ cacheWriteTokens: number;
2727
+ };
2728
+ model: string;
2729
+ provider: string;
2730
+ messageCount: number;
2731
+ estimatedCost: number;
2732
+ firstUsedAt: number;
2733
+ lastUsedAt: number;
2734
+ }[] | undefined;
2735
+ workspaceId?: string | null | undefined;
1920
2736
  };
1921
2737
  };
1922
2738
  outputFormat: "json";
@@ -2505,8 +3321,8 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2505
3321
  };
2506
3322
  };
2507
3323
  output: {
2508
- ok: false;
2509
3324
  error: string;
3325
+ ok: false;
2510
3326
  };
2511
3327
  outputFormat: "json";
2512
3328
  status: 404;
@@ -2785,19 +3601,19 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2785
3601
  };
2786
3602
  metadata?: Record<string, any> | undefined;
2787
3603
  configuration?: {
2788
- blocking?: boolean | undefined;
2789
3604
  acceptedOutputModes?: string[] | undefined;
2790
3605
  historyLength?: number | undefined;
2791
3606
  pushNotificationConfig?: {
2792
3607
  url: string;
2793
3608
  headers?: Record<string, string> | undefined;
2794
3609
  } | undefined;
3610
+ blocking?: boolean | undefined;
2795
3611
  } | undefined;
2796
3612
  };
2797
3613
  };
2798
3614
  output: {
2799
3615
  status: {
2800
- state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
3616
+ state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
2801
3617
  message?: {
2802
3618
  role: "user" | "agent";
2803
3619
  kind: "message";
@@ -2899,7 +3715,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2899
3715
  $get: {
2900
3716
  input: {
2901
3717
  query: {
2902
- status?: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | undefined;
3718
+ status?: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected" | undefined;
2903
3719
  contextId?: string | undefined;
2904
3720
  pageSize?: string | undefined;
2905
3721
  historyLength?: string | undefined;
@@ -2911,7 +3727,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
2911
3727
  output: {
2912
3728
  tasks: {
2913
3729
  status: {
2914
- state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
3730
+ state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
2915
3731
  message?: {
2916
3732
  role: "user" | "agent";
2917
3733
  kind: "message";
@@ -3031,7 +3847,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
3031
3847
  };
3032
3848
  output: {
3033
3849
  status: {
3034
- state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
3850
+ state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
3035
3851
  message?: {
3036
3852
  role: "user" | "agent";
3037
3853
  kind: "message";
@@ -3147,7 +3963,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
3147
3963
  };
3148
3964
  output: {
3149
3965
  status: {
3150
- state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
3966
+ state: "unknown" | "failed" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "rejected";
3151
3967
  message?: {
3152
3968
  role: "user" | "agent";
3153
3969
  kind: "message";