@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.
- package/dist/events/a2a-sse-subscriber.d.ts +1 -1
- package/dist/hono/__tests__/test-fixtures.cjs +27 -6
- package/dist/hono/__tests__/test-fixtures.d.ts +2 -1
- package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
- package/dist/hono/__tests__/test-fixtures.js +31 -6
- package/dist/hono/index.cjs +17 -2
- package/dist/hono/index.d.ts +875 -59
- package/dist/hono/index.d.ts.map +1 -1
- package/dist/hono/index.js +17 -2
- package/dist/hono/routes/a2a-tasks.d.ts +6 -6
- package/dist/hono/routes/agents.cjs +38 -27
- package/dist/hono/routes/agents.d.ts +2 -1
- package/dist/hono/routes/agents.d.ts.map +1 -1
- package/dist/hono/routes/agents.js +37 -31
- package/dist/hono/routes/discovery.cjs +99 -22
- package/dist/hono/routes/discovery.d.ts +14 -12
- package/dist/hono/routes/discovery.d.ts.map +1 -1
- package/dist/hono/routes/discovery.js +89 -22
- package/dist/hono/routes/llm.d.ts +1 -1
- package/dist/hono/routes/mcp.cjs +96 -14
- package/dist/hono/routes/mcp.d.ts +138 -3
- package/dist/hono/routes/mcp.d.ts.map +1 -1
- package/dist/hono/routes/mcp.js +97 -15
- package/dist/hono/routes/memory.d.ts +4 -4
- package/dist/hono/routes/models.d.ts +1 -1
- package/dist/hono/routes/resources.d.ts +1 -1
- package/dist/hono/routes/schedules.cjs +455 -0
- package/dist/hono/routes/schedules.d.ts +472 -0
- package/dist/hono/routes/schedules.d.ts.map +1 -0
- package/dist/hono/routes/schedules.js +439 -0
- package/dist/hono/routes/search.d.ts +1 -1
- package/dist/hono/routes/sessions.cjs +10 -4
- package/dist/hono/routes/sessions.d.ts +135 -5
- package/dist/hono/routes/sessions.d.ts.map +1 -1
- package/dist/hono/routes/sessions.js +10 -4
- package/dist/hono/routes/tools.cjs +12 -19
- package/dist/hono/routes/tools.d.ts +5 -3
- package/dist/hono/routes/tools.d.ts.map +1 -1
- package/dist/hono/routes/tools.js +12 -19
- package/dist/hono/routes/workspaces.cjs +136 -0
- package/dist/hono/routes/workspaces.d.ts +77 -0
- package/dist/hono/routes/workspaces.d.ts.map +1 -0
- package/dist/hono/routes/workspaces.js +112 -0
- package/dist/hono/schemas/responses.cjs +82 -7
- package/dist/hono/schemas/responses.d.ts +366 -16
- package/dist/hono/schemas/responses.d.ts.map +1 -1
- package/dist/hono/schemas/responses.js +75 -6
- package/dist/hono/start-server.cjs +3 -3
- package/dist/hono/start-server.d.ts +15 -6
- package/dist/hono/start-server.d.ts.map +1 -1
- package/dist/hono/start-server.js +3 -3
- package/dist/index.cjs +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/mcp/mcp-handler.d.ts +2 -2
- package/dist/mcp/mcp-handler.d.ts.map +1 -1
- package/package.json +8 -5
|
@@ -24,11 +24,11 @@ __export(responses_exports, {
|
|
|
24
24
|
ContentPartSchema: () => ContentPartSchema,
|
|
25
25
|
DeleteResponseSchema: () => DeleteResponseSchema,
|
|
26
26
|
ErrorResponseSchema: () => ErrorResponseSchema,
|
|
27
|
+
ExecutionLogSchema: () => ExecutionLogSchema,
|
|
27
28
|
FilePartSchema: () => FilePartSchema,
|
|
28
29
|
HttpServerConfigSchema: () => import_core5.HttpServerConfigSchema,
|
|
29
30
|
ImagePartSchema: () => ImagePartSchema,
|
|
30
31
|
InternalMessageSchema: () => InternalMessageSchema,
|
|
31
|
-
InternalResourceConfigSchema: () => import_core7.InternalResourceConfigSchema,
|
|
32
32
|
LLMConfigBaseSchema: () => import_core3.LLMConfigBaseSchema,
|
|
33
33
|
LLMConfigResponseSchema: () => LLMConfigResponseSchema,
|
|
34
34
|
LLMConfigSchema: () => LLMConfigSchema,
|
|
@@ -36,27 +36,33 @@ __export(responses_exports, {
|
|
|
36
36
|
MemorySchema: () => import_core2.MemorySchema,
|
|
37
37
|
MessageSearchResponseSchema: () => MessageSearchResponseSchema,
|
|
38
38
|
ModelFlatSchema: () => ModelFlatSchema,
|
|
39
|
+
ModelStatisticsSchema: () => ModelStatisticsSchema,
|
|
39
40
|
OkResponseSchema: () => OkResponseSchema,
|
|
41
|
+
PermissionsConfigSchema: () => import_core6.PermissionsConfigSchema,
|
|
40
42
|
PromptArgumentSchema: () => PromptArgumentSchema,
|
|
41
43
|
PromptDefinitionSchema: () => PromptDefinitionSchema,
|
|
42
44
|
PromptInfoSchema: () => PromptInfoSchema,
|
|
43
45
|
PromptSchema: () => PromptSchema,
|
|
44
46
|
ProviderCatalogSchema: () => ProviderCatalogSchema,
|
|
47
|
+
ResourceConfigSchema: () => import_core7.ResourceConfigSchema,
|
|
45
48
|
ResourceSchema: () => ResourceSchema,
|
|
49
|
+
ScheduleSchema: () => ScheduleSchema,
|
|
50
|
+
ScheduleTaskSchema: () => ScheduleTaskSchema,
|
|
46
51
|
SearchResultSchema: () => SearchResultSchema,
|
|
47
52
|
SessionMetadataSchema: () => SessionMetadataSchema,
|
|
48
53
|
SessionSearchResponseSchema: () => SessionSearchResponseSchema,
|
|
49
54
|
SessionSearchResultSchema: () => SessionSearchResultSchema,
|
|
55
|
+
SessionTokenUsageSchema: () => SessionTokenUsageSchema,
|
|
50
56
|
SseServerConfigSchema: () => import_core5.SseServerConfigSchema,
|
|
51
57
|
StatusResponseSchema: () => StatusResponseSchema,
|
|
52
58
|
StdioServerConfigSchema: () => import_core5.StdioServerConfigSchema,
|
|
53
59
|
TextPartSchema: () => TextPartSchema,
|
|
54
60
|
TokenUsageSchema: () => TokenUsageSchema,
|
|
55
61
|
ToolCallSchema: () => ToolCallSchema,
|
|
56
|
-
ToolConfirmationConfigSchema: () => import_core6.ToolConfirmationConfigSchema,
|
|
57
62
|
ToolSchema: () => ToolSchema,
|
|
58
63
|
UIResourcePartSchema: () => UIResourcePartSchema,
|
|
59
|
-
WebhookSchema: () => WebhookSchema
|
|
64
|
+
WebhookSchema: () => WebhookSchema,
|
|
65
|
+
WorkspaceSchema: () => WorkspaceSchema
|
|
60
66
|
});
|
|
61
67
|
module.exports = __toCommonJS(responses_exports);
|
|
62
68
|
var import_zod = require("zod");
|
|
@@ -134,13 +140,76 @@ const LLMConfigResponseSchema = import_core.LLMConfigBaseSchema.omit({ apiKey: t
|
|
|
134
140
|
hasApiKey: import_zod.z.boolean().optional().describe("Whether an API key is configured")
|
|
135
141
|
}).describe("LLM configuration (apiKey omitted for security)");
|
|
136
142
|
const LLMConfigSchema = import_core.LLMConfigBaseSchema.describe("LLM configuration with API key");
|
|
143
|
+
const SessionTokenUsageSchema = import_zod.z.object({
|
|
144
|
+
inputTokens: import_zod.z.number().int().nonnegative().describe("Number of input tokens"),
|
|
145
|
+
outputTokens: import_zod.z.number().int().nonnegative().describe("Number of output tokens"),
|
|
146
|
+
reasoningTokens: import_zod.z.number().int().nonnegative().describe("Number of reasoning tokens"),
|
|
147
|
+
cacheReadTokens: import_zod.z.number().int().nonnegative().describe("Number of cache read tokens"),
|
|
148
|
+
cacheWriteTokens: import_zod.z.number().int().nonnegative().describe("Number of cache write tokens"),
|
|
149
|
+
totalTokens: import_zod.z.number().int().nonnegative().describe("Total tokens used")
|
|
150
|
+
}).strict().describe("Session-level token usage (all fields required for cumulative totals)");
|
|
151
|
+
const ModelStatisticsSchema = import_zod.z.object({
|
|
152
|
+
provider: import_zod.z.string().describe("LLM provider identifier"),
|
|
153
|
+
model: import_zod.z.string().describe("Model identifier"),
|
|
154
|
+
messageCount: import_zod.z.number().int().nonnegative().describe("Number of messages using this model"),
|
|
155
|
+
tokenUsage: SessionTokenUsageSchema.describe("Token usage for this model"),
|
|
156
|
+
estimatedCost: import_zod.z.number().nonnegative().describe("Estimated cost in USD for this model"),
|
|
157
|
+
firstUsedAt: import_zod.z.number().int().positive().describe("First use timestamp (Unix ms)"),
|
|
158
|
+
lastUsedAt: import_zod.z.number().int().positive().describe("Last use timestamp (Unix ms)")
|
|
159
|
+
}).strict().describe("Per-model statistics within a session");
|
|
137
160
|
const SessionMetadataSchema = import_zod.z.object({
|
|
138
161
|
id: import_zod.z.string().describe("Unique session identifier"),
|
|
139
162
|
createdAt: import_zod.z.number().int().positive().nullable().describe("Creation timestamp (Unix ms, null if unavailable)"),
|
|
140
163
|
lastActivity: import_zod.z.number().int().positive().nullable().describe("Last activity timestamp (Unix ms, null if unavailable)"),
|
|
141
164
|
messageCount: import_zod.z.number().int().nonnegative().describe("Total number of messages in session"),
|
|
142
|
-
title: import_zod.z.string().optional().nullable().describe("Optional session title")
|
|
165
|
+
title: import_zod.z.string().optional().nullable().describe("Optional session title"),
|
|
166
|
+
tokenUsage: SessionTokenUsageSchema.optional().describe(
|
|
167
|
+
"Aggregate token usage across all models"
|
|
168
|
+
),
|
|
169
|
+
estimatedCost: import_zod.z.number().nonnegative().optional().describe("Total estimated cost in USD across all models"),
|
|
170
|
+
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")
|
|
143
172
|
}).strict().describe("Session metadata");
|
|
173
|
+
const WorkspaceSchema = import_zod.z.object({
|
|
174
|
+
id: import_zod.z.string().describe("Workspace identifier"),
|
|
175
|
+
path: import_zod.z.string().describe("Workspace root path"),
|
|
176
|
+
name: import_zod.z.string().optional().nullable().describe("Optional workspace display name"),
|
|
177
|
+
createdAt: import_zod.z.number().int().positive().describe("Creation timestamp (Unix ms)"),
|
|
178
|
+
lastActiveAt: import_zod.z.number().int().positive().describe("Last active timestamp (Unix ms)")
|
|
179
|
+
}).strict().describe("Workspace metadata");
|
|
180
|
+
const ScheduleTaskSchema = import_zod.z.object({
|
|
181
|
+
instruction: import_zod.z.string().describe("Instruction to execute"),
|
|
182
|
+
metadata: import_zod.z.record(import_zod.z.unknown()).optional().describe("Optional task metadata")
|
|
183
|
+
}).strict().describe("Schedule task definition");
|
|
184
|
+
const ScheduleSchema = import_zod.z.object({
|
|
185
|
+
id: import_zod.z.string().describe("Schedule ID"),
|
|
186
|
+
name: import_zod.z.string().describe("Schedule name"),
|
|
187
|
+
cronExpression: import_zod.z.string().describe("Cron expression"),
|
|
188
|
+
timezone: import_zod.z.string().describe("Timezone for schedule"),
|
|
189
|
+
enabled: import_zod.z.boolean().describe("Whether the schedule is enabled"),
|
|
190
|
+
task: ScheduleTaskSchema.describe("Schedule task configuration"),
|
|
191
|
+
sessionMode: import_zod.z.enum(["ephemeral", "dedicated", "inherit", "fixed"]).describe("Session context mode"),
|
|
192
|
+
sessionId: import_zod.z.string().optional().describe("Session ID when using fixed/inherit mode"),
|
|
193
|
+
workspacePath: import_zod.z.string().optional().describe("Workspace path override"),
|
|
194
|
+
createdAt: import_zod.z.number().int().positive().describe("Creation timestamp (Unix ms)"),
|
|
195
|
+
updatedAt: import_zod.z.number().int().positive().describe("Last update timestamp (Unix ms)"),
|
|
196
|
+
lastRunAt: import_zod.z.number().int().positive().optional().describe("Last run timestamp (Unix ms)"),
|
|
197
|
+
nextRunAt: import_zod.z.number().int().positive().optional().describe("Next run timestamp (Unix ms)"),
|
|
198
|
+
runCount: import_zod.z.number().int().nonnegative().describe("Total executions"),
|
|
199
|
+
successCount: import_zod.z.number().int().nonnegative().describe("Successful executions"),
|
|
200
|
+
failureCount: import_zod.z.number().int().nonnegative().describe("Failed executions"),
|
|
201
|
+
lastError: import_zod.z.string().optional().describe("Last execution error, if any")
|
|
202
|
+
}).strict().describe("Automation schedule");
|
|
203
|
+
const ExecutionLogSchema = import_zod.z.object({
|
|
204
|
+
id: import_zod.z.string().describe("Execution log ID"),
|
|
205
|
+
scheduleId: import_zod.z.string().describe("Schedule ID"),
|
|
206
|
+
triggeredAt: import_zod.z.number().int().positive().describe("Trigger timestamp (Unix ms)"),
|
|
207
|
+
completedAt: import_zod.z.number().int().positive().optional().describe("Completion timestamp (Unix ms)"),
|
|
208
|
+
status: import_zod.z.enum(["pending", "success", "failed", "timeout"]).describe("Execution status"),
|
|
209
|
+
duration: import_zod.z.number().int().nonnegative().optional().describe("Execution duration in ms"),
|
|
210
|
+
error: import_zod.z.string().optional().describe("Execution error, if any"),
|
|
211
|
+
result: import_zod.z.string().optional().describe("Execution result, if any")
|
|
212
|
+
}).strict().describe("Schedule execution log");
|
|
144
213
|
const SearchResultSchema = import_zod.z.object({
|
|
145
214
|
sessionId: import_zod.z.string().describe("Session ID where the message was found"),
|
|
146
215
|
message: InternalMessageSchema.describe("The message that matched the search"),
|
|
@@ -282,11 +351,11 @@ const DeleteResponseSchema = import_zod.z.object({
|
|
|
282
351
|
ContentPartSchema,
|
|
283
352
|
DeleteResponseSchema,
|
|
284
353
|
ErrorResponseSchema,
|
|
354
|
+
ExecutionLogSchema,
|
|
285
355
|
FilePartSchema,
|
|
286
356
|
HttpServerConfigSchema,
|
|
287
357
|
ImagePartSchema,
|
|
288
358
|
InternalMessageSchema,
|
|
289
|
-
InternalResourceConfigSchema,
|
|
290
359
|
LLMConfigBaseSchema,
|
|
291
360
|
LLMConfigResponseSchema,
|
|
292
361
|
LLMConfigSchema,
|
|
@@ -294,25 +363,31 @@ const DeleteResponseSchema = import_zod.z.object({
|
|
|
294
363
|
MemorySchema,
|
|
295
364
|
MessageSearchResponseSchema,
|
|
296
365
|
ModelFlatSchema,
|
|
366
|
+
ModelStatisticsSchema,
|
|
297
367
|
OkResponseSchema,
|
|
368
|
+
PermissionsConfigSchema,
|
|
298
369
|
PromptArgumentSchema,
|
|
299
370
|
PromptDefinitionSchema,
|
|
300
371
|
PromptInfoSchema,
|
|
301
372
|
PromptSchema,
|
|
302
373
|
ProviderCatalogSchema,
|
|
374
|
+
ResourceConfigSchema,
|
|
303
375
|
ResourceSchema,
|
|
376
|
+
ScheduleSchema,
|
|
377
|
+
ScheduleTaskSchema,
|
|
304
378
|
SearchResultSchema,
|
|
305
379
|
SessionMetadataSchema,
|
|
306
380
|
SessionSearchResponseSchema,
|
|
307
381
|
SessionSearchResultSchema,
|
|
382
|
+
SessionTokenUsageSchema,
|
|
308
383
|
SseServerConfigSchema,
|
|
309
384
|
StatusResponseSchema,
|
|
310
385
|
StdioServerConfigSchema,
|
|
311
386
|
TextPartSchema,
|
|
312
387
|
TokenUsageSchema,
|
|
313
388
|
ToolCallSchema,
|
|
314
|
-
ToolConfirmationConfigSchema,
|
|
315
389
|
ToolSchema,
|
|
316
390
|
UIResourcePartSchema,
|
|
317
|
-
WebhookSchema
|
|
391
|
+
WebhookSchema,
|
|
392
|
+
WorkspaceSchema
|
|
318
393
|
});
|
|
@@ -593,28 +593,378 @@ export declare const LLMConfigSchema: z.ZodObject<{
|
|
|
593
593
|
export type LLMConfigResponse = z.output<typeof LLMConfigResponseSchema>;
|
|
594
594
|
export { AgentCardSchema, type AgentCard } from '@dexto/core';
|
|
595
595
|
export { McpServerConfigSchema, StdioServerConfigSchema, SseServerConfigSchema, HttpServerConfigSchema, type McpServerConfig, type ValidatedMcpServerConfig, } from '@dexto/core';
|
|
596
|
-
export {
|
|
597
|
-
export {
|
|
596
|
+
export { PermissionsConfigSchema } from '@dexto/core';
|
|
597
|
+
export { ResourceConfigSchema } from '@dexto/core';
|
|
598
|
+
export declare const SessionTokenUsageSchema: z.ZodObject<{
|
|
599
|
+
inputTokens: z.ZodNumber;
|
|
600
|
+
outputTokens: z.ZodNumber;
|
|
601
|
+
reasoningTokens: z.ZodNumber;
|
|
602
|
+
cacheReadTokens: z.ZodNumber;
|
|
603
|
+
cacheWriteTokens: z.ZodNumber;
|
|
604
|
+
totalTokens: z.ZodNumber;
|
|
605
|
+
}, "strict", z.ZodTypeAny, {
|
|
606
|
+
inputTokens: number;
|
|
607
|
+
outputTokens: number;
|
|
608
|
+
reasoningTokens: number;
|
|
609
|
+
totalTokens: number;
|
|
610
|
+
cacheReadTokens: number;
|
|
611
|
+
cacheWriteTokens: number;
|
|
612
|
+
}, {
|
|
613
|
+
inputTokens: number;
|
|
614
|
+
outputTokens: number;
|
|
615
|
+
reasoningTokens: number;
|
|
616
|
+
totalTokens: number;
|
|
617
|
+
cacheReadTokens: number;
|
|
618
|
+
cacheWriteTokens: number;
|
|
619
|
+
}>;
|
|
620
|
+
export declare const ModelStatisticsSchema: z.ZodObject<{
|
|
621
|
+
provider: z.ZodString;
|
|
622
|
+
model: z.ZodString;
|
|
623
|
+
messageCount: z.ZodNumber;
|
|
624
|
+
tokenUsage: z.ZodObject<{
|
|
625
|
+
inputTokens: z.ZodNumber;
|
|
626
|
+
outputTokens: z.ZodNumber;
|
|
627
|
+
reasoningTokens: z.ZodNumber;
|
|
628
|
+
cacheReadTokens: z.ZodNumber;
|
|
629
|
+
cacheWriteTokens: z.ZodNumber;
|
|
630
|
+
totalTokens: z.ZodNumber;
|
|
631
|
+
}, "strict", z.ZodTypeAny, {
|
|
632
|
+
inputTokens: number;
|
|
633
|
+
outputTokens: number;
|
|
634
|
+
reasoningTokens: number;
|
|
635
|
+
totalTokens: number;
|
|
636
|
+
cacheReadTokens: number;
|
|
637
|
+
cacheWriteTokens: number;
|
|
638
|
+
}, {
|
|
639
|
+
inputTokens: number;
|
|
640
|
+
outputTokens: number;
|
|
641
|
+
reasoningTokens: number;
|
|
642
|
+
totalTokens: number;
|
|
643
|
+
cacheReadTokens: number;
|
|
644
|
+
cacheWriteTokens: number;
|
|
645
|
+
}>;
|
|
646
|
+
estimatedCost: z.ZodNumber;
|
|
647
|
+
firstUsedAt: z.ZodNumber;
|
|
648
|
+
lastUsedAt: z.ZodNumber;
|
|
649
|
+
}, "strict", z.ZodTypeAny, {
|
|
650
|
+
tokenUsage: {
|
|
651
|
+
inputTokens: number;
|
|
652
|
+
outputTokens: number;
|
|
653
|
+
reasoningTokens: number;
|
|
654
|
+
totalTokens: number;
|
|
655
|
+
cacheReadTokens: number;
|
|
656
|
+
cacheWriteTokens: number;
|
|
657
|
+
};
|
|
658
|
+
model: string;
|
|
659
|
+
provider: string;
|
|
660
|
+
messageCount: number;
|
|
661
|
+
estimatedCost: number;
|
|
662
|
+
firstUsedAt: number;
|
|
663
|
+
lastUsedAt: number;
|
|
664
|
+
}, {
|
|
665
|
+
tokenUsage: {
|
|
666
|
+
inputTokens: number;
|
|
667
|
+
outputTokens: number;
|
|
668
|
+
reasoningTokens: number;
|
|
669
|
+
totalTokens: number;
|
|
670
|
+
cacheReadTokens: number;
|
|
671
|
+
cacheWriteTokens: number;
|
|
672
|
+
};
|
|
673
|
+
model: string;
|
|
674
|
+
provider: string;
|
|
675
|
+
messageCount: number;
|
|
676
|
+
estimatedCost: number;
|
|
677
|
+
firstUsedAt: number;
|
|
678
|
+
lastUsedAt: number;
|
|
679
|
+
}>;
|
|
598
680
|
export declare const SessionMetadataSchema: z.ZodObject<{
|
|
599
681
|
id: z.ZodString;
|
|
600
682
|
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
601
683
|
lastActivity: z.ZodNullable<z.ZodNumber>;
|
|
602
684
|
messageCount: z.ZodNumber;
|
|
603
685
|
title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
686
|
+
tokenUsage: z.ZodOptional<z.ZodObject<{
|
|
687
|
+
inputTokens: z.ZodNumber;
|
|
688
|
+
outputTokens: z.ZodNumber;
|
|
689
|
+
reasoningTokens: z.ZodNumber;
|
|
690
|
+
cacheReadTokens: z.ZodNumber;
|
|
691
|
+
cacheWriteTokens: z.ZodNumber;
|
|
692
|
+
totalTokens: z.ZodNumber;
|
|
693
|
+
}, "strict", z.ZodTypeAny, {
|
|
694
|
+
inputTokens: number;
|
|
695
|
+
outputTokens: number;
|
|
696
|
+
reasoningTokens: number;
|
|
697
|
+
totalTokens: number;
|
|
698
|
+
cacheReadTokens: number;
|
|
699
|
+
cacheWriteTokens: number;
|
|
700
|
+
}, {
|
|
701
|
+
inputTokens: number;
|
|
702
|
+
outputTokens: number;
|
|
703
|
+
reasoningTokens: number;
|
|
704
|
+
totalTokens: number;
|
|
705
|
+
cacheReadTokens: number;
|
|
706
|
+
cacheWriteTokens: number;
|
|
707
|
+
}>>;
|
|
708
|
+
estimatedCost: z.ZodOptional<z.ZodNumber>;
|
|
709
|
+
modelStats: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
710
|
+
provider: z.ZodString;
|
|
711
|
+
model: z.ZodString;
|
|
712
|
+
messageCount: z.ZodNumber;
|
|
713
|
+
tokenUsage: z.ZodObject<{
|
|
714
|
+
inputTokens: z.ZodNumber;
|
|
715
|
+
outputTokens: z.ZodNumber;
|
|
716
|
+
reasoningTokens: z.ZodNumber;
|
|
717
|
+
cacheReadTokens: z.ZodNumber;
|
|
718
|
+
cacheWriteTokens: z.ZodNumber;
|
|
719
|
+
totalTokens: z.ZodNumber;
|
|
720
|
+
}, "strict", z.ZodTypeAny, {
|
|
721
|
+
inputTokens: number;
|
|
722
|
+
outputTokens: number;
|
|
723
|
+
reasoningTokens: number;
|
|
724
|
+
totalTokens: number;
|
|
725
|
+
cacheReadTokens: number;
|
|
726
|
+
cacheWriteTokens: number;
|
|
727
|
+
}, {
|
|
728
|
+
inputTokens: number;
|
|
729
|
+
outputTokens: number;
|
|
730
|
+
reasoningTokens: number;
|
|
731
|
+
totalTokens: number;
|
|
732
|
+
cacheReadTokens: number;
|
|
733
|
+
cacheWriteTokens: number;
|
|
734
|
+
}>;
|
|
735
|
+
estimatedCost: z.ZodNumber;
|
|
736
|
+
firstUsedAt: z.ZodNumber;
|
|
737
|
+
lastUsedAt: z.ZodNumber;
|
|
738
|
+
}, "strict", z.ZodTypeAny, {
|
|
739
|
+
tokenUsage: {
|
|
740
|
+
inputTokens: number;
|
|
741
|
+
outputTokens: number;
|
|
742
|
+
reasoningTokens: number;
|
|
743
|
+
totalTokens: number;
|
|
744
|
+
cacheReadTokens: number;
|
|
745
|
+
cacheWriteTokens: number;
|
|
746
|
+
};
|
|
747
|
+
model: string;
|
|
748
|
+
provider: string;
|
|
749
|
+
messageCount: number;
|
|
750
|
+
estimatedCost: number;
|
|
751
|
+
firstUsedAt: number;
|
|
752
|
+
lastUsedAt: number;
|
|
753
|
+
}, {
|
|
754
|
+
tokenUsage: {
|
|
755
|
+
inputTokens: number;
|
|
756
|
+
outputTokens: number;
|
|
757
|
+
reasoningTokens: number;
|
|
758
|
+
totalTokens: number;
|
|
759
|
+
cacheReadTokens: number;
|
|
760
|
+
cacheWriteTokens: number;
|
|
761
|
+
};
|
|
762
|
+
model: string;
|
|
763
|
+
provider: string;
|
|
764
|
+
messageCount: number;
|
|
765
|
+
estimatedCost: number;
|
|
766
|
+
firstUsedAt: number;
|
|
767
|
+
lastUsedAt: number;
|
|
768
|
+
}>, "many">>;
|
|
769
|
+
workspaceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
604
770
|
}, "strict", z.ZodTypeAny, {
|
|
605
771
|
id: string;
|
|
772
|
+
messageCount: number;
|
|
606
773
|
createdAt: number | null;
|
|
607
774
|
lastActivity: number | null;
|
|
608
|
-
messageCount: number;
|
|
609
775
|
title?: string | null | undefined;
|
|
776
|
+
tokenUsage?: {
|
|
777
|
+
inputTokens: number;
|
|
778
|
+
outputTokens: number;
|
|
779
|
+
reasoningTokens: number;
|
|
780
|
+
totalTokens: number;
|
|
781
|
+
cacheReadTokens: number;
|
|
782
|
+
cacheWriteTokens: number;
|
|
783
|
+
} | undefined;
|
|
784
|
+
estimatedCost?: number | undefined;
|
|
785
|
+
modelStats?: {
|
|
786
|
+
tokenUsage: {
|
|
787
|
+
inputTokens: number;
|
|
788
|
+
outputTokens: number;
|
|
789
|
+
reasoningTokens: number;
|
|
790
|
+
totalTokens: number;
|
|
791
|
+
cacheReadTokens: number;
|
|
792
|
+
cacheWriteTokens: number;
|
|
793
|
+
};
|
|
794
|
+
model: string;
|
|
795
|
+
provider: string;
|
|
796
|
+
messageCount: number;
|
|
797
|
+
estimatedCost: number;
|
|
798
|
+
firstUsedAt: number;
|
|
799
|
+
lastUsedAt: number;
|
|
800
|
+
}[] | undefined;
|
|
801
|
+
workspaceId?: string | null | undefined;
|
|
610
802
|
}, {
|
|
611
803
|
id: string;
|
|
804
|
+
messageCount: number;
|
|
612
805
|
createdAt: number | null;
|
|
613
806
|
lastActivity: number | null;
|
|
614
|
-
messageCount: number;
|
|
615
807
|
title?: string | null | undefined;
|
|
808
|
+
tokenUsage?: {
|
|
809
|
+
inputTokens: number;
|
|
810
|
+
outputTokens: number;
|
|
811
|
+
reasoningTokens: number;
|
|
812
|
+
totalTokens: number;
|
|
813
|
+
cacheReadTokens: number;
|
|
814
|
+
cacheWriteTokens: number;
|
|
815
|
+
} | undefined;
|
|
816
|
+
estimatedCost?: number | undefined;
|
|
817
|
+
modelStats?: {
|
|
818
|
+
tokenUsage: {
|
|
819
|
+
inputTokens: number;
|
|
820
|
+
outputTokens: number;
|
|
821
|
+
reasoningTokens: number;
|
|
822
|
+
totalTokens: number;
|
|
823
|
+
cacheReadTokens: number;
|
|
824
|
+
cacheWriteTokens: number;
|
|
825
|
+
};
|
|
826
|
+
model: string;
|
|
827
|
+
provider: string;
|
|
828
|
+
messageCount: number;
|
|
829
|
+
estimatedCost: number;
|
|
830
|
+
firstUsedAt: number;
|
|
831
|
+
lastUsedAt: number;
|
|
832
|
+
}[] | undefined;
|
|
833
|
+
workspaceId?: string | null | undefined;
|
|
616
834
|
}>;
|
|
835
|
+
export type SessionTokenUsage = z.output<typeof SessionTokenUsageSchema>;
|
|
836
|
+
export type ModelStatistics = z.output<typeof ModelStatisticsSchema>;
|
|
617
837
|
export type SessionMetadata = z.output<typeof SessionMetadataSchema>;
|
|
838
|
+
export declare const WorkspaceSchema: z.ZodObject<{
|
|
839
|
+
id: z.ZodString;
|
|
840
|
+
path: z.ZodString;
|
|
841
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
842
|
+
createdAt: z.ZodNumber;
|
|
843
|
+
lastActiveAt: z.ZodNumber;
|
|
844
|
+
}, "strict", z.ZodTypeAny, {
|
|
845
|
+
path: string;
|
|
846
|
+
id: string;
|
|
847
|
+
createdAt: number;
|
|
848
|
+
lastActiveAt: number;
|
|
849
|
+
name?: string | null | undefined;
|
|
850
|
+
}, {
|
|
851
|
+
path: string;
|
|
852
|
+
id: string;
|
|
853
|
+
createdAt: number;
|
|
854
|
+
lastActiveAt: number;
|
|
855
|
+
name?: string | null | undefined;
|
|
856
|
+
}>;
|
|
857
|
+
export type Workspace = z.output<typeof WorkspaceSchema>;
|
|
858
|
+
export declare const ScheduleTaskSchema: z.ZodObject<{
|
|
859
|
+
instruction: z.ZodString;
|
|
860
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
861
|
+
}, "strict", z.ZodTypeAny, {
|
|
862
|
+
instruction: string;
|
|
863
|
+
metadata?: Record<string, unknown> | undefined;
|
|
864
|
+
}, {
|
|
865
|
+
instruction: string;
|
|
866
|
+
metadata?: Record<string, unknown> | undefined;
|
|
867
|
+
}>;
|
|
868
|
+
export declare const ScheduleSchema: z.ZodObject<{
|
|
869
|
+
id: z.ZodString;
|
|
870
|
+
name: z.ZodString;
|
|
871
|
+
cronExpression: z.ZodString;
|
|
872
|
+
timezone: z.ZodString;
|
|
873
|
+
enabled: z.ZodBoolean;
|
|
874
|
+
task: z.ZodObject<{
|
|
875
|
+
instruction: z.ZodString;
|
|
876
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
877
|
+
}, "strict", z.ZodTypeAny, {
|
|
878
|
+
instruction: string;
|
|
879
|
+
metadata?: Record<string, unknown> | undefined;
|
|
880
|
+
}, {
|
|
881
|
+
instruction: string;
|
|
882
|
+
metadata?: Record<string, unknown> | undefined;
|
|
883
|
+
}>;
|
|
884
|
+
sessionMode: z.ZodEnum<["ephemeral", "dedicated", "inherit", "fixed"]>;
|
|
885
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
886
|
+
workspacePath: z.ZodOptional<z.ZodString>;
|
|
887
|
+
createdAt: z.ZodNumber;
|
|
888
|
+
updatedAt: z.ZodNumber;
|
|
889
|
+
lastRunAt: z.ZodOptional<z.ZodNumber>;
|
|
890
|
+
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
891
|
+
runCount: z.ZodNumber;
|
|
892
|
+
successCount: z.ZodNumber;
|
|
893
|
+
failureCount: z.ZodNumber;
|
|
894
|
+
lastError: z.ZodOptional<z.ZodString>;
|
|
895
|
+
}, "strict", z.ZodTypeAny, {
|
|
896
|
+
id: string;
|
|
897
|
+
name: string;
|
|
898
|
+
createdAt: number;
|
|
899
|
+
cronExpression: string;
|
|
900
|
+
timezone: string;
|
|
901
|
+
enabled: boolean;
|
|
902
|
+
task: {
|
|
903
|
+
instruction: string;
|
|
904
|
+
metadata?: Record<string, unknown> | undefined;
|
|
905
|
+
};
|
|
906
|
+
sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
|
|
907
|
+
updatedAt: number;
|
|
908
|
+
runCount: number;
|
|
909
|
+
successCount: number;
|
|
910
|
+
failureCount: number;
|
|
911
|
+
sessionId?: string | undefined;
|
|
912
|
+
workspacePath?: string | undefined;
|
|
913
|
+
lastRunAt?: number | undefined;
|
|
914
|
+
nextRunAt?: number | undefined;
|
|
915
|
+
lastError?: string | undefined;
|
|
916
|
+
}, {
|
|
917
|
+
id: string;
|
|
918
|
+
name: string;
|
|
919
|
+
createdAt: number;
|
|
920
|
+
cronExpression: string;
|
|
921
|
+
timezone: string;
|
|
922
|
+
enabled: boolean;
|
|
923
|
+
task: {
|
|
924
|
+
instruction: string;
|
|
925
|
+
metadata?: Record<string, unknown> | undefined;
|
|
926
|
+
};
|
|
927
|
+
sessionMode: "fixed" | "ephemeral" | "dedicated" | "inherit";
|
|
928
|
+
updatedAt: number;
|
|
929
|
+
runCount: number;
|
|
930
|
+
successCount: number;
|
|
931
|
+
failureCount: number;
|
|
932
|
+
sessionId?: string | undefined;
|
|
933
|
+
workspacePath?: string | undefined;
|
|
934
|
+
lastRunAt?: number | undefined;
|
|
935
|
+
nextRunAt?: number | undefined;
|
|
936
|
+
lastError?: string | undefined;
|
|
937
|
+
}>;
|
|
938
|
+
export type Schedule = z.output<typeof ScheduleSchema>;
|
|
939
|
+
export declare const ExecutionLogSchema: z.ZodObject<{
|
|
940
|
+
id: z.ZodString;
|
|
941
|
+
scheduleId: z.ZodString;
|
|
942
|
+
triggeredAt: z.ZodNumber;
|
|
943
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
944
|
+
status: z.ZodEnum<["pending", "success", "failed", "timeout"]>;
|
|
945
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
946
|
+
error: z.ZodOptional<z.ZodString>;
|
|
947
|
+
result: z.ZodOptional<z.ZodString>;
|
|
948
|
+
}, "strict", z.ZodTypeAny, {
|
|
949
|
+
status: "success" | "pending" | "failed" | "timeout";
|
|
950
|
+
id: string;
|
|
951
|
+
scheduleId: string;
|
|
952
|
+
triggeredAt: number;
|
|
953
|
+
completedAt?: number | undefined;
|
|
954
|
+
duration?: number | undefined;
|
|
955
|
+
error?: string | undefined;
|
|
956
|
+
result?: string | undefined;
|
|
957
|
+
}, {
|
|
958
|
+
status: "success" | "pending" | "failed" | "timeout";
|
|
959
|
+
id: string;
|
|
960
|
+
scheduleId: string;
|
|
961
|
+
triggeredAt: number;
|
|
962
|
+
completedAt?: number | undefined;
|
|
963
|
+
duration?: number | undefined;
|
|
964
|
+
error?: string | undefined;
|
|
965
|
+
result?: string | undefined;
|
|
966
|
+
}>;
|
|
967
|
+
export type ExecutionLog = z.output<typeof ExecutionLogSchema>;
|
|
618
968
|
export declare const SearchResultSchema: z.ZodObject<{
|
|
619
969
|
sessionId: z.ZodString;
|
|
620
970
|
message: z.ZodObject<{
|
|
@@ -1358,20 +1708,20 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
1358
1708
|
lastActivity: z.ZodNumber;
|
|
1359
1709
|
messageCount: z.ZodNumber;
|
|
1360
1710
|
}, "strict", z.ZodTypeAny, {
|
|
1711
|
+
messageCount: number;
|
|
1361
1712
|
createdAt: number;
|
|
1362
1713
|
lastActivity: number;
|
|
1363
|
-
messageCount: number;
|
|
1364
1714
|
}, {
|
|
1715
|
+
messageCount: number;
|
|
1365
1716
|
createdAt: number;
|
|
1366
1717
|
lastActivity: number;
|
|
1367
|
-
messageCount: number;
|
|
1368
1718
|
}>;
|
|
1369
1719
|
}, "strict", z.ZodTypeAny, {
|
|
1370
1720
|
sessionId: string;
|
|
1371
1721
|
metadata: {
|
|
1722
|
+
messageCount: number;
|
|
1372
1723
|
createdAt: number;
|
|
1373
1724
|
lastActivity: number;
|
|
1374
|
-
messageCount: number;
|
|
1375
1725
|
};
|
|
1376
1726
|
matchCount: number;
|
|
1377
1727
|
firstMatch: {
|
|
@@ -1434,9 +1784,9 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
1434
1784
|
}, {
|
|
1435
1785
|
sessionId: string;
|
|
1436
1786
|
metadata: {
|
|
1787
|
+
messageCount: number;
|
|
1437
1788
|
createdAt: number;
|
|
1438
1789
|
lastActivity: number;
|
|
1439
|
-
messageCount: number;
|
|
1440
1790
|
};
|
|
1441
1791
|
matchCount: number;
|
|
1442
1792
|
firstMatch: {
|
|
@@ -2369,20 +2719,20 @@ export declare const SessionSearchResponseSchema: z.ZodObject<{
|
|
|
2369
2719
|
lastActivity: z.ZodNumber;
|
|
2370
2720
|
messageCount: z.ZodNumber;
|
|
2371
2721
|
}, "strict", z.ZodTypeAny, {
|
|
2722
|
+
messageCount: number;
|
|
2372
2723
|
createdAt: number;
|
|
2373
2724
|
lastActivity: number;
|
|
2374
|
-
messageCount: number;
|
|
2375
2725
|
}, {
|
|
2726
|
+
messageCount: number;
|
|
2376
2727
|
createdAt: number;
|
|
2377
2728
|
lastActivity: number;
|
|
2378
|
-
messageCount: number;
|
|
2379
2729
|
}>;
|
|
2380
2730
|
}, "strict", z.ZodTypeAny, {
|
|
2381
2731
|
sessionId: string;
|
|
2382
2732
|
metadata: {
|
|
2733
|
+
messageCount: number;
|
|
2383
2734
|
createdAt: number;
|
|
2384
2735
|
lastActivity: number;
|
|
2385
|
-
messageCount: number;
|
|
2386
2736
|
};
|
|
2387
2737
|
matchCount: number;
|
|
2388
2738
|
firstMatch: {
|
|
@@ -2445,9 +2795,9 @@ export declare const SessionSearchResponseSchema: z.ZodObject<{
|
|
|
2445
2795
|
}, {
|
|
2446
2796
|
sessionId: string;
|
|
2447
2797
|
metadata: {
|
|
2798
|
+
messageCount: number;
|
|
2448
2799
|
createdAt: number;
|
|
2449
2800
|
lastActivity: number;
|
|
2450
|
-
messageCount: number;
|
|
2451
2801
|
};
|
|
2452
2802
|
matchCount: number;
|
|
2453
2803
|
firstMatch: {
|
|
@@ -2516,9 +2866,9 @@ export declare const SessionSearchResponseSchema: z.ZodObject<{
|
|
|
2516
2866
|
results: {
|
|
2517
2867
|
sessionId: string;
|
|
2518
2868
|
metadata: {
|
|
2869
|
+
messageCount: number;
|
|
2519
2870
|
createdAt: number;
|
|
2520
2871
|
lastActivity: number;
|
|
2521
|
-
messageCount: number;
|
|
2522
2872
|
};
|
|
2523
2873
|
matchCount: number;
|
|
2524
2874
|
firstMatch: {
|
|
@@ -2586,9 +2936,9 @@ export declare const SessionSearchResponseSchema: z.ZodObject<{
|
|
|
2586
2936
|
results: {
|
|
2587
2937
|
sessionId: string;
|
|
2588
2938
|
metadata: {
|
|
2939
|
+
messageCount: number;
|
|
2589
2940
|
createdAt: number;
|
|
2590
2941
|
lastActivity: number;
|
|
2591
|
-
messageCount: number;
|
|
2592
2942
|
};
|
|
2593
2943
|
matchCount: number;
|
|
2594
2944
|
firstMatch: {
|
|
@@ -3106,19 +3456,19 @@ export declare const ErrorResponseSchema: z.ZodObject<{
|
|
|
3106
3456
|
details?: unknown;
|
|
3107
3457
|
}>;
|
|
3108
3458
|
}, "strict", z.ZodTypeAny, {
|
|
3109
|
-
ok: false;
|
|
3110
3459
|
error: {
|
|
3111
3460
|
message: string;
|
|
3112
3461
|
code?: string | undefined;
|
|
3113
3462
|
details?: unknown;
|
|
3114
3463
|
};
|
|
3115
|
-
}, {
|
|
3116
3464
|
ok: false;
|
|
3465
|
+
}, {
|
|
3117
3466
|
error: {
|
|
3118
3467
|
message: string;
|
|
3119
3468
|
code?: string | undefined;
|
|
3120
3469
|
details?: unknown;
|
|
3121
3470
|
};
|
|
3471
|
+
ok: false;
|
|
3122
3472
|
}>;
|
|
3123
3473
|
export type ErrorResponse = z.output<typeof ErrorResponseSchema>;
|
|
3124
3474
|
export declare const StatusResponseSchema: z.ZodObject<{
|