veryfront 0.1.631 → 0.1.633
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/esm/deno.d.ts +1 -0
- package/esm/deno.js +2 -1
- package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-encoder.js +0 -2
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts.map +1 -1
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.js +16 -3
- package/esm/src/cache/backends/api.d.ts.map +1 -1
- package/esm/src/cache/backends/api.js +8 -10
- package/esm/src/cache/backends/batch-results.d.ts +21 -0
- package/esm/src/cache/backends/batch-results.d.ts.map +1 -0
- package/esm/src/cache/backends/batch-results.js +26 -0
- package/esm/src/cache/backends/memory.d.ts.map +1 -1
- package/esm/src/cache/backends/memory.js +7 -10
- package/esm/src/cache/backends/redis.d.ts.map +1 -1
- package/esm/src/cache/backends/redis.js +6 -11
- package/esm/src/chat/ag-ui.d.ts +0 -257
- package/esm/src/chat/ag-ui.d.ts.map +1 -1
- package/esm/src/chat/ag-ui.js +1 -21
- package/esm/src/chat/compat.d.ts +776 -0
- package/esm/src/chat/compat.d.ts.map +1 -0
- package/esm/src/chat/compat.js +113 -0
- package/esm/src/chat/conversation.d.ts +0 -151
- package/esm/src/chat/conversation.d.ts.map +1 -1
- package/esm/src/chat/conversation.js +1 -26
- package/esm/src/chat/message-prep.d.ts +0 -10
- package/esm/src/chat/message-prep.d.ts.map +1 -1
- package/esm/src/chat/message-prep.js +0 -10
- package/esm/src/chat/types.d.ts +0 -339
- package/esm/src/chat/types.d.ts.map +1 -1
- package/esm/src/chat/types.js +1 -29
- package/esm/src/errors/error-registry.d.ts +4 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/error-registry.js +16 -0
- package/esm/src/platform/adapters/runtime/deno/adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/deno/adapter.js +3 -14
- package/esm/src/platform/compat/http/deno-server.d.ts.map +1 -1
- package/esm/src/platform/compat/http/deno-server.js +3 -14
- package/esm/src/platform/compat/http/native-response.d.ts +29 -0
- package/esm/src/platform/compat/http/native-response.d.ts.map +1 -0
- package/esm/src/platform/compat/http/native-response.js +43 -0
- package/esm/src/proxy/handler.d.ts.map +1 -1
- package/esm/src/proxy/handler.js +21 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +1 -1
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +0 -9
- package/esm/src/runs/index.d.ts +1 -1
- package/esm/src/runs/index.d.ts.map +1 -1
- package/esm/src/runs/schemas.d.ts +221 -0
- package/esm/src/runs/schemas.d.ts.map +1 -1
- package/esm/src/runs/schemas.js +29 -0
- package/esm/src/server/handlers/dev/dashboard/api.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/dashboard/api.js +1 -10
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +75 -5
- package/esm/src/server/handlers/dev/http-helpers.d.ts +17 -0
- package/esm/src/server/handlers/dev/http-helpers.d.ts.map +1 -0
- package/esm/src/server/handlers/dev/http-helpers.js +20 -0
- package/esm/src/server/handlers/dev/projects/api.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/projects/api.js +1 -7
- package/esm/src/server/runtime-handler/index.js +2 -2
- package/esm/src/server/runtime-handler/local-project-discovery.d.ts +0 -10
- package/esm/src/server/runtime-handler/local-project-discovery.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/local-project-discovery.js +0 -10
- package/esm/src/server/runtime-handler/projects-handler.js +3 -3
- package/esm/src/server/services/rsc/endpoints/endpoint-router.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/endpoint-router.js +5 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
- package/esm/src/transforms/esm/http-cache-types.d.ts +24 -0
- package/esm/src/transforms/esm/http-cache-types.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-types.js +30 -1
- package/esm/src/transforms/esm/http-cache-wrapper.d.ts +1 -1
- package/esm/src/transforms/esm/http-cache-wrapper.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-wrapper.js +14 -13
- package/esm/src/utils/circuit-breaker.d.ts +9 -1
- package/esm/src/utils/circuit-breaker.d.ts.map +1 -1
- package/esm/src/utils/circuit-breaker.js +18 -2
- package/esm/src/utils/semaphore.d.ts +9 -1
- package/esm/src/utils/semaphore.d.ts.map +1 -1
- package/esm/src/utils/semaphore.js +18 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +5 -1
package/esm/src/chat/types.d.ts
CHANGED
|
@@ -165,11 +165,6 @@ export type ChatToolMessage = {
|
|
|
165
165
|
};
|
|
166
166
|
/** Message shape for provider model. */
|
|
167
167
|
export type ProviderModelMessage = ChatSystemMessage | ChatUserMessage | ChatAssistantMessage | ChatToolMessage;
|
|
168
|
-
/**
|
|
169
|
-
* @deprecated Use ProviderModelMessage for provider-facing model payloads.
|
|
170
|
-
*/
|
|
171
|
-
/** Message shape for chat model. */
|
|
172
|
-
export type ChatModelMessage = ProviderModelMessage;
|
|
173
168
|
/** Public API contract for durable root run descriptor. */
|
|
174
169
|
export interface DurableRootRunDescriptor {
|
|
175
170
|
runId: string;
|
|
@@ -215,15 +210,6 @@ export declare const getChatRequestContextSchema: () => import("../internal-agen
|
|
|
215
210
|
branchId: import("../internal-agents/schema.js").Schema<string | null>;
|
|
216
211
|
environmentContext: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
217
212
|
}>>;
|
|
218
|
-
/** Schema for chat request context.
|
|
219
|
-
* @deprecated Use getChatRequestContextSchema()
|
|
220
|
-
*/
|
|
221
|
-
export declare const chatRequestContextSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
222
|
-
conversationId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
223
|
-
projectId: import("../internal-agents/schema.js").Schema<string | null>;
|
|
224
|
-
branchId: import("../internal-agents/schema.js").Schema<string | null>;
|
|
225
|
-
environmentContext: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
226
|
-
}>>;
|
|
227
213
|
/** Context for chat request. */
|
|
228
214
|
export type ChatRequestContext = InferSchema<ReturnType<typeof getChatRequestContextSchema>>;
|
|
229
215
|
/** Zod schema for get message metadata. */
|
|
@@ -264,58 +250,10 @@ export declare const getMessageMetadataSchema: () => import("../internal-agents/
|
|
|
264
250
|
cachedInputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
265
251
|
}> | undefined>;
|
|
266
252
|
}>>;
|
|
267
|
-
/** Schema for message metadata.
|
|
268
|
-
* @deprecated Use getMessageMetadataSchema()
|
|
269
|
-
*/
|
|
270
|
-
export declare const messageMetadataSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
271
|
-
createdAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
272
|
-
isStopped: import("../internal-agents/schema.js").Schema<boolean | undefined>;
|
|
273
|
-
isCompleted: import("../internal-agents/schema.js").Schema<boolean | undefined>;
|
|
274
|
-
completedAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
275
|
-
agentId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
276
|
-
agentName: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
277
|
-
conversationId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
278
|
-
modelId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
279
|
-
runId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
280
|
-
streamingMessageId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
281
|
-
childRunAudit: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
282
|
-
status: import("../internal-agents/schema.js").Schema<string>;
|
|
283
|
-
description: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
284
|
-
steps: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
285
|
-
durationMs: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
286
|
-
toolCalls: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
287
|
-
toolName: import("../internal-agents/schema.js").Schema<string>;
|
|
288
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
289
|
-
input: import("../internal-agents/schema.js").Schema<unknown>;
|
|
290
|
-
}>[] | undefined>;
|
|
291
|
-
toolResults: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
292
|
-
toolName: import("../internal-agents/schema.js").Schema<string>;
|
|
293
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
294
|
-
input: import("../internal-agents/schema.js").Schema<unknown>;
|
|
295
|
-
output: import("../internal-agents/schema.js").Schema<unknown>;
|
|
296
|
-
}>[] | undefined>;
|
|
297
|
-
terminalErrorCode: import("../internal-agents/schema.js").Schema<string | null | undefined>;
|
|
298
|
-
terminalErrorMessage: import("../internal-agents/schema.js").Schema<string | null | undefined>;
|
|
299
|
-
}> | undefined>;
|
|
300
|
-
usage: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
301
|
-
inputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
302
|
-
outputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
303
|
-
reasoningTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
304
|
-
cachedInputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
305
|
-
}> | undefined>;
|
|
306
|
-
}>>;
|
|
307
253
|
/** Zod schema for get chat UI message role. */
|
|
308
254
|
export declare const getChatUiMessageRoleSchema: () => import("../internal-agents/schema.js").Schema<string>;
|
|
309
|
-
/** Schema for chat ui message role.
|
|
310
|
-
* @deprecated Use getChatUiMessageRoleSchema()
|
|
311
|
-
*/
|
|
312
|
-
export declare const chatUiMessageRoleSchema: import("../internal-agents/schema.js").Schema<string>;
|
|
313
255
|
/** Zod schema for get chat tool part state. */
|
|
314
256
|
export declare const getChatToolPartStateSchema: () => import("../internal-agents/schema.js").Schema<string>;
|
|
315
|
-
/** Schema for chat tool part state.
|
|
316
|
-
* @deprecated Use getChatToolPartStateSchema()
|
|
317
|
-
*/
|
|
318
|
-
export declare const chatToolPartStateSchema: import("../internal-agents/schema.js").Schema<string>;
|
|
319
257
|
/** Zod schema for get chat UI message part. */
|
|
320
258
|
export declare const getChatUiMessagePartSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
321
259
|
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
@@ -379,71 +317,6 @@ export declare const getChatUiMessagePartSchema: () => import("../internal-agent
|
|
|
379
317
|
type: import("../internal-agents/schema.js").Schema<`data-${string}`>;
|
|
380
318
|
data: import("../internal-agents/schema.js").Schema<unknown>;
|
|
381
319
|
}>>;
|
|
382
|
-
/** Schema for chat ui message part.
|
|
383
|
-
* @deprecated Use getChatUiMessagePartSchema()
|
|
384
|
-
*/
|
|
385
|
-
export declare const chatUiMessagePartSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
386
|
-
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
387
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
388
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
389
|
-
type: import("../internal-agents/schema.js").Schema<"reasoning">;
|
|
390
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
391
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
392
|
-
type: import("../internal-agents/schema.js").Schema<"step-start">;
|
|
393
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
394
|
-
type: import("../internal-agents/schema.js").Schema<"source-url">;
|
|
395
|
-
sourceId: import("../internal-agents/schema.js").Schema<string>;
|
|
396
|
-
url: import("../internal-agents/schema.js").Schema<string>;
|
|
397
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
398
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
399
|
-
type: import("../internal-agents/schema.js").Schema<"source-document">;
|
|
400
|
-
sourceId: import("../internal-agents/schema.js").Schema<string>;
|
|
401
|
-
title: import("../internal-agents/schema.js").Schema<string>;
|
|
402
|
-
mediaType: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
403
|
-
filename: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
404
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
405
|
-
type: import("../internal-agents/schema.js").Schema<"file">;
|
|
406
|
-
mediaType: import("../internal-agents/schema.js").Schema<string>;
|
|
407
|
-
url: import("../internal-agents/schema.js").Schema<string>;
|
|
408
|
-
filename: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
409
|
-
uploadId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
410
|
-
uploadPath: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
411
|
-
}> | ({
|
|
412
|
-
toolCallId: string;
|
|
413
|
-
state: string;
|
|
414
|
-
} & {
|
|
415
|
-
input?: unknown;
|
|
416
|
-
title?: string | undefined;
|
|
417
|
-
providerExecuted?: boolean | undefined;
|
|
418
|
-
callProviderMetadata?: Record<string, unknown> | undefined;
|
|
419
|
-
output?: unknown;
|
|
420
|
-
errorText?: string | undefined;
|
|
421
|
-
approval?: import("../extensions/schema/schema-validator.js").InferShape<{
|
|
422
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
423
|
-
}> | undefined;
|
|
424
|
-
} & {
|
|
425
|
-
type: "dynamic-tool";
|
|
426
|
-
toolName: string;
|
|
427
|
-
}) | ({
|
|
428
|
-
toolCallId: string;
|
|
429
|
-
state: string;
|
|
430
|
-
} & {
|
|
431
|
-
input?: unknown;
|
|
432
|
-
title?: string | undefined;
|
|
433
|
-
providerExecuted?: boolean | undefined;
|
|
434
|
-
callProviderMetadata?: Record<string, unknown> | undefined;
|
|
435
|
-
output?: unknown;
|
|
436
|
-
errorText?: string | undefined;
|
|
437
|
-
approval?: import("../extensions/schema/schema-validator.js").InferShape<{
|
|
438
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
439
|
-
}> | undefined;
|
|
440
|
-
} & {
|
|
441
|
-
type: `tool-${string}` | "tool_call";
|
|
442
|
-
toolName: string | undefined;
|
|
443
|
-
}) | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
444
|
-
type: import("../internal-agents/schema.js").Schema<`data-${string}`>;
|
|
445
|
-
data: import("../internal-agents/schema.js").Schema<unknown>;
|
|
446
|
-
}>>;
|
|
447
320
|
/** Zod schema for get chat UI message. */
|
|
448
321
|
export declare const getChatUiMessageSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
449
322
|
id: import("../internal-agents/schema.js").Schema<string>;
|
|
@@ -548,112 +421,6 @@ export declare const getChatUiMessageSchema: () => import("../internal-agents/sc
|
|
|
548
421
|
}> | undefined>;
|
|
549
422
|
}> | undefined>;
|
|
550
423
|
}>>;
|
|
551
|
-
/** Schema for chat ui message.
|
|
552
|
-
* @deprecated Use getChatUiMessageSchema()
|
|
553
|
-
*/
|
|
554
|
-
export declare const chatUiMessageSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
555
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
556
|
-
role: import("../internal-agents/schema.js").Schema<string>;
|
|
557
|
-
parts: import("../internal-agents/schema.js").Schema<(import("../extensions/schema/schema-validator.js").InferShape<{
|
|
558
|
-
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
559
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
560
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
561
|
-
type: import("../internal-agents/schema.js").Schema<"reasoning">;
|
|
562
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
563
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
564
|
-
type: import("../internal-agents/schema.js").Schema<"step-start">;
|
|
565
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
566
|
-
type: import("../internal-agents/schema.js").Schema<"source-url">;
|
|
567
|
-
sourceId: import("../internal-agents/schema.js").Schema<string>;
|
|
568
|
-
url: import("../internal-agents/schema.js").Schema<string>;
|
|
569
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
570
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
571
|
-
type: import("../internal-agents/schema.js").Schema<"source-document">;
|
|
572
|
-
sourceId: import("../internal-agents/schema.js").Schema<string>;
|
|
573
|
-
title: import("../internal-agents/schema.js").Schema<string>;
|
|
574
|
-
mediaType: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
575
|
-
filename: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
576
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
577
|
-
type: import("../internal-agents/schema.js").Schema<"file">;
|
|
578
|
-
mediaType: import("../internal-agents/schema.js").Schema<string>;
|
|
579
|
-
url: import("../internal-agents/schema.js").Schema<string>;
|
|
580
|
-
filename: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
581
|
-
uploadId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
582
|
-
uploadPath: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
583
|
-
}> | ({
|
|
584
|
-
toolCallId: string;
|
|
585
|
-
state: string;
|
|
586
|
-
} & {
|
|
587
|
-
input?: unknown;
|
|
588
|
-
title?: string | undefined;
|
|
589
|
-
providerExecuted?: boolean | undefined;
|
|
590
|
-
callProviderMetadata?: Record<string, unknown> | undefined;
|
|
591
|
-
output?: unknown;
|
|
592
|
-
errorText?: string | undefined;
|
|
593
|
-
approval?: import("../extensions/schema/schema-validator.js").InferShape<{
|
|
594
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
595
|
-
}> | undefined;
|
|
596
|
-
} & {
|
|
597
|
-
type: "dynamic-tool";
|
|
598
|
-
toolName: string;
|
|
599
|
-
}) | ({
|
|
600
|
-
toolCallId: string;
|
|
601
|
-
state: string;
|
|
602
|
-
} & {
|
|
603
|
-
input?: unknown;
|
|
604
|
-
title?: string | undefined;
|
|
605
|
-
providerExecuted?: boolean | undefined;
|
|
606
|
-
callProviderMetadata?: Record<string, unknown> | undefined;
|
|
607
|
-
output?: unknown;
|
|
608
|
-
errorText?: string | undefined;
|
|
609
|
-
approval?: import("../extensions/schema/schema-validator.js").InferShape<{
|
|
610
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
611
|
-
}> | undefined;
|
|
612
|
-
} & {
|
|
613
|
-
type: `tool-${string}` | "tool_call";
|
|
614
|
-
toolName: string | undefined;
|
|
615
|
-
}) | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
616
|
-
type: import("../internal-agents/schema.js").Schema<`data-${string}`>;
|
|
617
|
-
data: import("../internal-agents/schema.js").Schema<unknown>;
|
|
618
|
-
}>)[]>;
|
|
619
|
-
metadata: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
620
|
-
createdAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
621
|
-
isStopped: import("../internal-agents/schema.js").Schema<boolean | undefined>;
|
|
622
|
-
isCompleted: import("../internal-agents/schema.js").Schema<boolean | undefined>;
|
|
623
|
-
completedAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
624
|
-
agentId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
625
|
-
agentName: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
626
|
-
conversationId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
627
|
-
modelId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
628
|
-
runId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
629
|
-
streamingMessageId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
630
|
-
childRunAudit: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
631
|
-
status: import("../internal-agents/schema.js").Schema<string>;
|
|
632
|
-
description: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
633
|
-
steps: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
634
|
-
durationMs: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
635
|
-
toolCalls: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
636
|
-
toolName: import("../internal-agents/schema.js").Schema<string>;
|
|
637
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
638
|
-
input: import("../internal-agents/schema.js").Schema<unknown>;
|
|
639
|
-
}>[] | undefined>;
|
|
640
|
-
toolResults: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
641
|
-
toolName: import("../internal-agents/schema.js").Schema<string>;
|
|
642
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
643
|
-
input: import("../internal-agents/schema.js").Schema<unknown>;
|
|
644
|
-
output: import("../internal-agents/schema.js").Schema<unknown>;
|
|
645
|
-
}>[] | undefined>;
|
|
646
|
-
terminalErrorCode: import("../internal-agents/schema.js").Schema<string | null | undefined>;
|
|
647
|
-
terminalErrorMessage: import("../internal-agents/schema.js").Schema<string | null | undefined>;
|
|
648
|
-
}> | undefined>;
|
|
649
|
-
usage: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
650
|
-
inputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
651
|
-
outputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
652
|
-
reasoningTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
653
|
-
cachedInputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
654
|
-
}> | undefined>;
|
|
655
|
-
}> | undefined>;
|
|
656
|
-
}>>;
|
|
657
424
|
/** Zod schema for get chat UI messages. */
|
|
658
425
|
export declare const getChatUiMessagesSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
659
426
|
id: import("../internal-agents/schema.js").Schema<string>;
|
|
@@ -758,112 +525,6 @@ export declare const getChatUiMessagesSchema: () => import("../internal-agents/s
|
|
|
758
525
|
}> | undefined>;
|
|
759
526
|
}> | undefined>;
|
|
760
527
|
}>[]>;
|
|
761
|
-
/** Schema for chat ui messages.
|
|
762
|
-
* @deprecated Use getChatUiMessagesSchema()
|
|
763
|
-
*/
|
|
764
|
-
export declare const chatUiMessagesSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
765
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
766
|
-
role: import("../internal-agents/schema.js").Schema<string>;
|
|
767
|
-
parts: import("../internal-agents/schema.js").Schema<(import("../extensions/schema/schema-validator.js").InferShape<{
|
|
768
|
-
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
769
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
770
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
771
|
-
type: import("../internal-agents/schema.js").Schema<"reasoning">;
|
|
772
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
773
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
774
|
-
type: import("../internal-agents/schema.js").Schema<"step-start">;
|
|
775
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
776
|
-
type: import("../internal-agents/schema.js").Schema<"source-url">;
|
|
777
|
-
sourceId: import("../internal-agents/schema.js").Schema<string>;
|
|
778
|
-
url: import("../internal-agents/schema.js").Schema<string>;
|
|
779
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
780
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
781
|
-
type: import("../internal-agents/schema.js").Schema<"source-document">;
|
|
782
|
-
sourceId: import("../internal-agents/schema.js").Schema<string>;
|
|
783
|
-
title: import("../internal-agents/schema.js").Schema<string>;
|
|
784
|
-
mediaType: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
785
|
-
filename: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
786
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
787
|
-
type: import("../internal-agents/schema.js").Schema<"file">;
|
|
788
|
-
mediaType: import("../internal-agents/schema.js").Schema<string>;
|
|
789
|
-
url: import("../internal-agents/schema.js").Schema<string>;
|
|
790
|
-
filename: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
791
|
-
uploadId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
792
|
-
uploadPath: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
793
|
-
}> | ({
|
|
794
|
-
toolCallId: string;
|
|
795
|
-
state: string;
|
|
796
|
-
} & {
|
|
797
|
-
input?: unknown;
|
|
798
|
-
title?: string | undefined;
|
|
799
|
-
providerExecuted?: boolean | undefined;
|
|
800
|
-
callProviderMetadata?: Record<string, unknown> | undefined;
|
|
801
|
-
output?: unknown;
|
|
802
|
-
errorText?: string | undefined;
|
|
803
|
-
approval?: import("../extensions/schema/schema-validator.js").InferShape<{
|
|
804
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
805
|
-
}> | undefined;
|
|
806
|
-
} & {
|
|
807
|
-
type: "dynamic-tool";
|
|
808
|
-
toolName: string;
|
|
809
|
-
}) | ({
|
|
810
|
-
toolCallId: string;
|
|
811
|
-
state: string;
|
|
812
|
-
} & {
|
|
813
|
-
input?: unknown;
|
|
814
|
-
title?: string | undefined;
|
|
815
|
-
providerExecuted?: boolean | undefined;
|
|
816
|
-
callProviderMetadata?: Record<string, unknown> | undefined;
|
|
817
|
-
output?: unknown;
|
|
818
|
-
errorText?: string | undefined;
|
|
819
|
-
approval?: import("../extensions/schema/schema-validator.js").InferShape<{
|
|
820
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
821
|
-
}> | undefined;
|
|
822
|
-
} & {
|
|
823
|
-
type: `tool-${string}` | "tool_call";
|
|
824
|
-
toolName: string | undefined;
|
|
825
|
-
}) | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
826
|
-
type: import("../internal-agents/schema.js").Schema<`data-${string}`>;
|
|
827
|
-
data: import("../internal-agents/schema.js").Schema<unknown>;
|
|
828
|
-
}>)[]>;
|
|
829
|
-
metadata: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
830
|
-
createdAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
831
|
-
isStopped: import("../internal-agents/schema.js").Schema<boolean | undefined>;
|
|
832
|
-
isCompleted: import("../internal-agents/schema.js").Schema<boolean | undefined>;
|
|
833
|
-
completedAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
834
|
-
agentId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
835
|
-
agentName: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
836
|
-
conversationId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
837
|
-
modelId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
838
|
-
runId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
839
|
-
streamingMessageId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
840
|
-
childRunAudit: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
841
|
-
status: import("../internal-agents/schema.js").Schema<string>;
|
|
842
|
-
description: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
843
|
-
steps: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
844
|
-
durationMs: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
845
|
-
toolCalls: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
846
|
-
toolName: import("../internal-agents/schema.js").Schema<string>;
|
|
847
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
848
|
-
input: import("../internal-agents/schema.js").Schema<unknown>;
|
|
849
|
-
}>[] | undefined>;
|
|
850
|
-
toolResults: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
851
|
-
toolName: import("../internal-agents/schema.js").Schema<string>;
|
|
852
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
853
|
-
input: import("../internal-agents/schema.js").Schema<unknown>;
|
|
854
|
-
output: import("../internal-agents/schema.js").Schema<unknown>;
|
|
855
|
-
}>[] | undefined>;
|
|
856
|
-
terminalErrorCode: import("../internal-agents/schema.js").Schema<string | null | undefined>;
|
|
857
|
-
terminalErrorMessage: import("../internal-agents/schema.js").Schema<string | null | undefined>;
|
|
858
|
-
}> | undefined>;
|
|
859
|
-
usage: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
860
|
-
inputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
861
|
-
outputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
862
|
-
reasoningTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
863
|
-
cachedInputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
864
|
-
}> | undefined>;
|
|
865
|
-
}> | undefined>;
|
|
866
|
-
}>[]>;
|
|
867
528
|
/** Check whether a file is an image. */
|
|
868
529
|
export declare function isImageFile(type: string | undefined): boolean;
|
|
869
530
|
/** Check whether a file is a supported image upload. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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F,2CAA2C;AAC3C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAyD,CAAC;AA2B9F,wCAAwC;AACxC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,WAEnD;AAED,wDAAwD;AACxD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,WAM5C;AAED,kDAAkD;AAClD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,WAEnF;AAED,+CAA+C;AAC/C,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,UAW9B;AASD,mCAAmC;AACnC,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAmB7E;AAED,YAAY,EACV,mBAAmB,EACnB,mBAAmB,IAAI,eAAe,EACtC,wBAAwB,EACxB,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACrB,uBAAuB,GACxB,CAAC"}
|
package/esm/src/chat/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineSchema
|
|
1
|
+
import { defineSchema } from "../schemas/index.js";
|
|
2
2
|
const NATIVE_TEXT_ATTACHMENT_EXTENSIONS = [
|
|
3
3
|
".txt",
|
|
4
4
|
".md",
|
|
@@ -57,10 +57,6 @@ export const getChatRequestContextSchema = defineSchema((v) => v.object({
|
|
|
57
57
|
branchId: v.string().nullable(),
|
|
58
58
|
environmentContext: v.string().optional(),
|
|
59
59
|
}).strict());
|
|
60
|
-
/** Schema for chat request context.
|
|
61
|
-
* @deprecated Use getChatRequestContextSchema()
|
|
62
|
-
*/
|
|
63
|
-
export const chatRequestContextSchema = lazySchema(getChatRequestContextSchema);
|
|
64
60
|
// Helper that returns a nonEmptyString schema for reuse within defineSchema callbacks.
|
|
65
61
|
const nonEmptyString = (v) => v.string().min(1);
|
|
66
62
|
const getChildRunAuditStatusSchema = defineSchema((v) => v.enum(["completed", "failed", "cancelled", "stopped"]));
|
|
@@ -106,16 +102,8 @@ export const getMessageMetadataSchema = defineSchema((v) => v.object({
|
|
|
106
102
|
childRunAudit: getChildRunAuditSchema().optional(),
|
|
107
103
|
usage: getMessageMetadataUsageSchema().optional(),
|
|
108
104
|
}).strict());
|
|
109
|
-
/** Schema for message metadata.
|
|
110
|
-
* @deprecated Use getMessageMetadataSchema()
|
|
111
|
-
*/
|
|
112
|
-
export const messageMetadataSchema = lazySchema(getMessageMetadataSchema);
|
|
113
105
|
/** Zod schema for get chat UI message role. */
|
|
114
106
|
export const getChatUiMessageRoleSchema = defineSchema((v) => v.enum(["system", "user", "assistant", "tool"]));
|
|
115
|
-
/** Schema for chat ui message role.
|
|
116
|
-
* @deprecated Use getChatUiMessageRoleSchema()
|
|
117
|
-
*/
|
|
118
|
-
export const chatUiMessageRoleSchema = lazySchema(getChatUiMessageRoleSchema);
|
|
119
107
|
/** Zod schema for get chat tool part state. */
|
|
120
108
|
export const getChatToolPartStateSchema = defineSchema((v) => v.enum([
|
|
121
109
|
"pending",
|
|
@@ -129,10 +117,6 @@ export const getChatToolPartStateSchema = defineSchema((v) => v.enum([
|
|
|
129
117
|
"error",
|
|
130
118
|
"completed",
|
|
131
119
|
]));
|
|
132
|
-
/** Schema for chat tool part state.
|
|
133
|
-
* @deprecated Use getChatToolPartStateSchema()
|
|
134
|
-
*/
|
|
135
|
-
export const chatToolPartStateSchema = lazySchema(getChatToolPartStateSchema);
|
|
136
120
|
const getToolApprovalSchema = defineSchema((v) => v.object({
|
|
137
121
|
id: nonEmptyString(v),
|
|
138
122
|
}).strict());
|
|
@@ -205,10 +189,6 @@ export const getChatUiMessagePartSchema = defineSchema((v) => v.union([
|
|
|
205
189
|
getChatNamedToolUiPartSchema(),
|
|
206
190
|
getChatDataUiPartSchema(),
|
|
207
191
|
]));
|
|
208
|
-
/** Schema for chat ui message part.
|
|
209
|
-
* @deprecated Use getChatUiMessagePartSchema()
|
|
210
|
-
*/
|
|
211
|
-
export const chatUiMessagePartSchema = lazySchema(getChatUiMessagePartSchema);
|
|
212
192
|
/** Zod schema for get chat UI message. */
|
|
213
193
|
export const getChatUiMessageSchema = defineSchema((v) => v.object({
|
|
214
194
|
id: nonEmptyString(v),
|
|
@@ -216,16 +196,8 @@ export const getChatUiMessageSchema = defineSchema((v) => v.object({
|
|
|
216
196
|
parts: v.array(getChatUiMessagePartSchema()),
|
|
217
197
|
metadata: getMessageMetadataSchema().optional(),
|
|
218
198
|
}).strip());
|
|
219
|
-
/** Schema for chat ui message.
|
|
220
|
-
* @deprecated Use getChatUiMessageSchema()
|
|
221
|
-
*/
|
|
222
|
-
export const chatUiMessageSchema = lazySchema(getChatUiMessageSchema);
|
|
223
199
|
/** Zod schema for get chat UI messages. */
|
|
224
200
|
export const getChatUiMessagesSchema = defineSchema((v) => v.array(getChatUiMessageSchema()));
|
|
225
|
-
/** Schema for chat ui messages.
|
|
226
|
-
* @deprecated Use getChatUiMessagesSchema()
|
|
227
|
-
*/
|
|
228
|
-
export const chatUiMessagesSchema = lazySchema(getChatUiMessagesSchema);
|
|
229
201
|
function hasExtension(filename, extensions) {
|
|
230
202
|
const normalizedFilename = filename?.toLowerCase() ?? "";
|
|
231
203
|
return extensions.some((extension) => normalizedFilename.endsWith(extension));
|
|
@@ -42,6 +42,8 @@ export declare const CACHE_ERROR: import("./types.js").RegisteredError;
|
|
|
42
42
|
export declare const FILE_WATCH_ERROR: import("./types.js").RegisteredError;
|
|
43
43
|
export declare const REQUEST_ERROR: import("./types.js").RegisteredError;
|
|
44
44
|
export declare const SERVICE_OVERLOADED: import("./types.js").RegisteredError;
|
|
45
|
+
export declare const SEMAPHORE_TIMEOUT: import("./types.js").RegisteredError;
|
|
46
|
+
export declare const CIRCUIT_BREAKER_OPEN: import("./types.js").RegisteredError;
|
|
45
47
|
export declare const CACHE_PATH_MISMATCH: import("./types.js").RegisteredError;
|
|
46
48
|
export declare const NETWORK_ERROR: import("./types.js").RegisteredError;
|
|
47
49
|
/** API client request/response errors (replaces VeryfrontAPIError) */
|
|
@@ -132,6 +134,8 @@ export declare const ERROR_REGISTRY: {
|
|
|
132
134
|
readonly "file-watch-error": import("./types.js").RegisteredError;
|
|
133
135
|
readonly "request-error": import("./types.js").RegisteredError;
|
|
134
136
|
readonly "service-overloaded": import("./types.js").RegisteredError;
|
|
137
|
+
readonly "semaphore-timeout": import("./types.js").RegisteredError;
|
|
138
|
+
readonly "circuit-breaker-open": import("./types.js").RegisteredError;
|
|
135
139
|
readonly "cache-path-mismatch": import("./types.js").RegisteredError;
|
|
136
140
|
readonly "network-error": import("./types.js").RegisteredError;
|
|
137
141
|
readonly "api-client-error": import("./types.js").RegisteredError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-registry.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry.ts"],"names":[],"mappings":"AAKA,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAM7D,eAAO,MAAM,gBAAgB,sCAM3B,CAAC;AAEH,eAAO,MAAM,cAAc,sCAMzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,sCAM7B,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,sCAMlC,CAAC;AAEH,eAAO,MAAM,iBAAiB,sCAM5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,sCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,sCAM9B,CAAC;AAEH,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,sCAMnC,CAAC;AAMH,eAAO,MAAM,YAAY,sCAMvB,CAAC;AAEH,eAAO,MAAM,YAAY,sCAMvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,sCAM3B,CAAC;AAEH,eAAO,MA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AAO,MAAM,aAAa,sCAMxB,CAAC;AAEH,eAAO,MAAM,oBAAoB,sCAM/B,CAAC;AAEH,eAAO,MAAM,aAAa,sCAMxB,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,sCAM7B,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,sCAMlC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGjB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,cAAc,CAAC;AAEpD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,wCAE7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,0CAE1D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,SAAS,EAAE,CAEzC"}
|
|
@@ -307,6 +307,20 @@ export const SERVICE_OVERLOADED = defineError({
|
|
|
307
307
|
title: "Service overloaded",
|
|
308
308
|
suggestion: "Reduce load or scale up resources",
|
|
309
309
|
});
|
|
310
|
+
export const SEMAPHORE_TIMEOUT = defineError({
|
|
311
|
+
slug: "semaphore-timeout",
|
|
312
|
+
category: "SERVER",
|
|
313
|
+
status: 503,
|
|
314
|
+
title: "Semaphore acquire timeout",
|
|
315
|
+
suggestion: "Reduce concurrency or increase the semaphore acquire timeout",
|
|
316
|
+
});
|
|
317
|
+
export const CIRCUIT_BREAKER_OPEN = defineError({
|
|
318
|
+
slug: "circuit-breaker-open",
|
|
319
|
+
category: "SERVER",
|
|
320
|
+
status: 503,
|
|
321
|
+
title: "Circuit breaker is open",
|
|
322
|
+
suggestion: "Wait for the breaker reset timeout before retrying",
|
|
323
|
+
});
|
|
310
324
|
export const CACHE_PATH_MISMATCH = defineError({
|
|
311
325
|
slug: "cache-path-mismatch",
|
|
312
326
|
category: "SERVER",
|
|
@@ -649,6 +663,8 @@ export const ERROR_REGISTRY = {
|
|
|
649
663
|
"file-watch-error": FILE_WATCH_ERROR,
|
|
650
664
|
"request-error": REQUEST_ERROR,
|
|
651
665
|
"service-overloaded": SERVICE_OVERLOADED,
|
|
666
|
+
"semaphore-timeout": SEMAPHORE_TIMEOUT,
|
|
667
|
+
"circuit-breaker-open": CIRCUIT_BREAKER_OPEN,
|
|
652
668
|
"cache-path-mismatch": CACHE_PATH_MISMATCH,
|
|
653
669
|
"network-error": NETWORK_ERROR,
|
|
654
670
|
"api-client-error": API_CLIENT_ERROR,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/runtime/deno/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,QAAQ,EACR,kBAAkB,EAElB,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,MAAM,EACN,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,EACjB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/runtime/deno/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,QAAQ,EACR,kBAAkB,EAElB,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,MAAM,EACN,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,EACjB,MAAM,eAAe,CAAC;AA0HvB,cAAM,qBAAsB,YAAW,iBAAiB;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKvC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAKhD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,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,EAAG,MAAM,CAAU;IAC9B,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,EAAE,wBAA+B;IAC1C,QAAQ,CAAC,GAAG,yBAAgC;IAC5C,QAAQ,CAAC,MAAM,oBAA2B;IAC1C,QAAQ,CAAC,KAAK,mBAA0B;IAExC,QAAQ,CAAC,YAAY;;;;;;;;;;MAUnB;IAEF,OAAO,CAAC,YAAY,CAA2B;IAE/C,KAAK,CACH,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,EAC3D,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,MAAM,CAAC;IA4DZ,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { serverLogger } from "../../../../utils/index.js";
|
|
|
5
5
|
import { env as getEnvObject, getEnv, getEnvOverlayStorage, setEnv, } from "../../../compat/process.js";
|
|
6
6
|
import { createFileWatcher, createWatcherIterator, enqueueWatchEvent, } from "../shared/watcher-queue.js";
|
|
7
7
|
import { stopManagedServer } from "../shared/server-lifecycle.js";
|
|
8
|
+
import { getNativeResponse, toNativeResponse } from "../../../compat/http/native-response.js";
|
|
8
9
|
const logger = serverLogger.component("deno");
|
|
9
10
|
/** Default server port. Defined locally to keep adapters module isolated. */
|
|
10
11
|
const DEFAULT_PORT = 3000;
|
|
@@ -320,8 +321,7 @@ export class DenoAdapter {
|
|
|
320
321
|
// Access native Response via `self` to bypass dnt shim transform.
|
|
321
322
|
// In npm packages, dnt replaces Response with undici's polyfill,
|
|
322
323
|
// but Deno.serve requires native Response instances.
|
|
323
|
-
const NativeResponse =
|
|
324
|
-
.Response;
|
|
324
|
+
const NativeResponse = getNativeResponse();
|
|
325
325
|
const server = nativeDeno.serve({
|
|
326
326
|
port,
|
|
327
327
|
hostname,
|
|
@@ -329,18 +329,7 @@ export class DenoAdapter {
|
|
|
329
329
|
handler: async (request) => {
|
|
330
330
|
try {
|
|
331
331
|
const response = await wrappedHandler(request);
|
|
332
|
-
|
|
333
|
-
if (response instanceof NativeResponse)
|
|
334
|
-
return response;
|
|
335
|
-
// Re-wrap polyfilled Response as native Response.
|
|
336
|
-
// dnt replaces Response with undici's polyfill which fails
|
|
337
|
-
// Deno.serve's native instanceof check.
|
|
338
|
-
const r = response;
|
|
339
|
-
return new NativeResponse(r.body, {
|
|
340
|
-
status: r.status,
|
|
341
|
-
statusText: r.statusText,
|
|
342
|
-
headers: r.headers,
|
|
343
|
-
});
|
|
332
|
+
return toNativeResponse(response, NativeResponse);
|
|
344
333
|
}
|
|
345
334
|
catch (error) {
|
|
346
335
|
serverLogger.error("Request handler error:", error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deno-server.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/http/deno-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"deno-server.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/http/deno-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAIpE,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,eAAe,CAAC,CAAkB;IAEpC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCxE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAIvB"}
|