@blazingagents/sdk 0.39.0 → 0.41.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/contracts/api.d.ts +9 -1
- package/dist/contracts/api.js +9 -1
- package/dist/contracts/entities/session-inputs.d.ts +4 -4
- package/dist/contracts/entities/sessions.d.ts +1 -1
- package/dist/contracts/entities/tasks.d.ts +12 -184
- package/dist/contracts/entities/tasks.js +2 -2
- package/package.json +1 -1
package/dist/contracts/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import type { BlazingAgentsErrorCode } from "../types.ts";
|
|
2
3
|
/**
|
|
3
4
|
* `/v1` error envelope — see docs/adr/0003-ai-sdk-native-wire-protocol.md.
|
|
4
5
|
* Closed producer code set; `code` is what SDKs switch on and `message` is
|
|
@@ -35,6 +36,7 @@ export declare const apiErrorCodeSchema: z.ZodEnum<{
|
|
|
35
36
|
merchant_balance_required: "merchant_balance_required";
|
|
36
37
|
merchant_binding_not_found: "merchant_binding_not_found";
|
|
37
38
|
merchant_binding_required: "merchant_binding_required";
|
|
39
|
+
merchant_connection_in_use: "merchant_connection_in_use";
|
|
38
40
|
merchant_connection_not_found: "merchant_connection_not_found";
|
|
39
41
|
merchant_credential_invalid: "merchant_credential_invalid";
|
|
40
42
|
merchant_customer_not_found: "merchant_customer_not_found";
|
|
@@ -92,9 +94,15 @@ export declare const apiErrorCodeSchema: z.ZodEnum<{
|
|
|
92
94
|
workspace_in_use: "workspace_in_use";
|
|
93
95
|
workspace_not_found: "workspace_not_found";
|
|
94
96
|
}>;
|
|
97
|
+
/**
|
|
98
|
+
* A code as received: any non-empty string, so a server newer than this SDK
|
|
99
|
+
* can send a code the SDK does not list. The type keeps autocomplete for the
|
|
100
|
+
* listed codes.
|
|
101
|
+
*/
|
|
102
|
+
export declare const receivedApiErrorCodeSchema: z.ZodType<BlazingAgentsErrorCode>;
|
|
95
103
|
export declare const receivedApiErrorResponseSchema: z.ZodObject<{
|
|
96
104
|
error: z.ZodObject<{
|
|
97
|
-
code: z.
|
|
105
|
+
code: z.ZodType<BlazingAgentsErrorCode, unknown, z.core.$ZodTypeInternals<BlazingAgentsErrorCode, unknown>>;
|
|
98
106
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
99
107
|
message: z.ZodString;
|
|
100
108
|
param: z.ZodOptional<z.ZodString>;
|
package/dist/contracts/api.js
CHANGED
|
@@ -75,6 +75,7 @@ export const apiErrorCodeSchema = z.enum([
|
|
|
75
75
|
"chat_webhook_conflict",
|
|
76
76
|
"chat_webhook_registration_failed",
|
|
77
77
|
"merchant_connection_not_found",
|
|
78
|
+
"merchant_connection_in_use",
|
|
78
79
|
"merchant_credential_invalid",
|
|
79
80
|
"merchant_provider_unavailable",
|
|
80
81
|
"merchant_customer_not_found",
|
|
@@ -92,7 +93,14 @@ export const apiErrorCodeSchema = z.enum([
|
|
|
92
93
|
"tenant_deletion_not_ready",
|
|
93
94
|
"tenant_not_deleting",
|
|
94
95
|
]);
|
|
95
|
-
|
|
96
|
+
/**
|
|
97
|
+
* A code as received: any non-empty string, so a server newer than this SDK
|
|
98
|
+
* can send a code the SDK does not list. The type keeps autocomplete for the
|
|
99
|
+
* listed codes.
|
|
100
|
+
*/
|
|
101
|
+
export const receivedApiErrorCodeSchema = z
|
|
102
|
+
.string()
|
|
103
|
+
.min(1);
|
|
96
104
|
const receivedApiErrorSchema = z
|
|
97
105
|
.object({
|
|
98
106
|
code: receivedApiErrorCodeSchema,
|
|
@@ -11,12 +11,12 @@ export declare const sessionInputSchema: z.ZodObject<{
|
|
|
11
11
|
requestId: z.ZodString;
|
|
12
12
|
sequence: z.ZodNumber;
|
|
13
13
|
message: z.ZodObject<{
|
|
14
|
+
role: z.ZodLiteral<"user">;
|
|
14
15
|
id: z.ZodString;
|
|
15
16
|
parts: z.ZodArray<z.ZodObject<{
|
|
16
17
|
type: z.ZodString;
|
|
17
18
|
}, z.core.$loose>>;
|
|
18
19
|
metadata: z.ZodOptional<z.ZodUnknown>;
|
|
19
|
-
role: z.ZodLiteral<"user">;
|
|
20
20
|
}, z.core.$loose>;
|
|
21
21
|
state: z.ZodEnum<{
|
|
22
22
|
accepted: "accepted";
|
|
@@ -49,12 +49,12 @@ export declare const sessionInputResponseSchema: z.ZodObject<{
|
|
|
49
49
|
requestId: z.ZodString;
|
|
50
50
|
sequence: z.ZodNumber;
|
|
51
51
|
message: z.ZodObject<{
|
|
52
|
+
role: z.ZodLiteral<"user">;
|
|
52
53
|
id: z.ZodString;
|
|
53
54
|
parts: z.ZodArray<z.ZodObject<{
|
|
54
55
|
type: z.ZodString;
|
|
55
56
|
}, z.core.$loose>>;
|
|
56
57
|
metadata: z.ZodOptional<z.ZodUnknown>;
|
|
57
|
-
role: z.ZodLiteral<"user">;
|
|
58
58
|
}, z.core.$loose>;
|
|
59
59
|
state: z.ZodEnum<{
|
|
60
60
|
accepted: "accepted";
|
|
@@ -88,12 +88,12 @@ export declare const sessionInputsResponseSchema: z.ZodObject<{
|
|
|
88
88
|
requestId: z.ZodString;
|
|
89
89
|
sequence: z.ZodNumber;
|
|
90
90
|
message: z.ZodObject<{
|
|
91
|
+
role: z.ZodLiteral<"user">;
|
|
91
92
|
id: z.ZodString;
|
|
92
93
|
parts: z.ZodArray<z.ZodObject<{
|
|
93
94
|
type: z.ZodString;
|
|
94
95
|
}, z.core.$loose>>;
|
|
95
96
|
metadata: z.ZodOptional<z.ZodUnknown>;
|
|
96
|
-
role: z.ZodLiteral<"user">;
|
|
97
97
|
}, z.core.$loose>;
|
|
98
98
|
state: z.ZodEnum<{
|
|
99
99
|
accepted: "accepted";
|
|
@@ -164,12 +164,12 @@ export declare const chatSteerConsumedEventSchema: z.ZodObject<{
|
|
|
164
164
|
requestId: z.ZodString;
|
|
165
165
|
sequence: z.ZodNumber;
|
|
166
166
|
message: z.ZodObject<{
|
|
167
|
+
role: z.ZodLiteral<"user">;
|
|
167
168
|
id: z.ZodString;
|
|
168
169
|
parts: z.ZodArray<z.ZodObject<{
|
|
169
170
|
type: z.ZodString;
|
|
170
171
|
}, z.core.$loose>>;
|
|
171
172
|
metadata: z.ZodOptional<z.ZodUnknown>;
|
|
172
|
-
role: z.ZodLiteral<"user">;
|
|
173
173
|
}, z.core.$loose>;
|
|
174
174
|
turnId: z.ZodString;
|
|
175
175
|
}, z.core.$strip>;
|
|
@@ -368,7 +368,7 @@ export declare const turnStreamErrorEventSchema: z.ZodObject<{
|
|
|
368
368
|
type: z.ZodLiteral<"data-ba-error">;
|
|
369
369
|
transient: z.ZodLiteral<true>;
|
|
370
370
|
data: z.ZodObject<{
|
|
371
|
-
code: z.ZodCustom<"admin_agent_managed" | "agent_disabled" | "agent_mcp_connection_not_found" | "agent_mcp_connections_invalid" | "api_key_limit_reached" | "artifact_session_cap_reached" | "chat_webhook_conflict" | "chat_webhook_registration_failed" | "checkout_evidence_mismatch" | "forbidden" | "function_call_conflict" | "idempotency_conflict" | "input_idempotency_conflict" | "insufficient_scope" | "internal" | "invalid_cursor" | "invalid_request" | "mcp_connection_authentication_failed" | "mcp_connection_discovery_failed" | "mcp_connection_in_use" | "mcp_connection_invalid" | "mcp_connection_limit_reached" | "mcp_connection_name_conflict" | "mcp_connection_stale_credential_version" | "mcp_connection_unreachable" | "merchant_account_mismatch" | "merchant_balance_required" | "merchant_binding_not_found" | "merchant_binding_required" | "merchant_connection_not_found" | "merchant_credential_invalid" | "merchant_customer_not_found" | "merchant_customer_unmapped" | "merchant_eligibility_unavailable" | "merchant_event_not_found" | "merchant_event_state_conflict" | "merchant_provider_unavailable" | "merchant_subscription_required" | "message_id_conflict" | "message_not_found" | "model_discovery_unsupported" | "model_not_found" | "model_spending_limit_exceeded" | "model_validation_unavailable" | "not_found" | "prompt_variable_missing" | "prompt_variable_unknown" | "provider_historical_use" | "provider_in_use" | "provider_limit_reached" | "provider_name_conflict" | "provider_not_found" | "provider_required" | "quota_exceeded" | "rate_limited" | "service_unavailable" | "session_busy" | "session_fork_deleted" | "session_fork_unavailable" | "session_turn_unresponsive" | "session_version_mismatch" | "skill_invalid_archive" | "skill_invalid_markdown" | "skill_limit_reached" | "skill_name_conflict" | "skill_not_found" | "skill_too_many_files" | "skill_uncompressed_too_large" | "steer_not_available" | "subscription_already_paid" | "subscription_not_cancelled" | "subscription_required" | "task_active_run_exists" | "tenant_deleting" | "tenant_deletion_in_progress" | "tenant_deletion_not_ready" | "tenant_not_deleting" | "tool_approval_continuation_settled" | "tool_approval_decision_conflict" | "turn_interrupted" | "unauthorized" | "usage_credit_required" | "validation_failed" | "workspace_busy" | "workspace_in_use" | "workspace_not_found" | (string & {}), "admin_agent_managed" | "agent_disabled" | "agent_mcp_connection_not_found" | "agent_mcp_connections_invalid" | "api_key_limit_reached" | "artifact_session_cap_reached" | "chat_webhook_conflict" | "chat_webhook_registration_failed" | "checkout_evidence_mismatch" | "forbidden" | "function_call_conflict" | "idempotency_conflict" | "input_idempotency_conflict" | "insufficient_scope" | "internal" | "invalid_cursor" | "invalid_request" | "mcp_connection_authentication_failed" | "mcp_connection_discovery_failed" | "mcp_connection_in_use" | "mcp_connection_invalid" | "mcp_connection_limit_reached" | "mcp_connection_name_conflict" | "mcp_connection_stale_credential_version" | "mcp_connection_unreachable" | "merchant_account_mismatch" | "merchant_balance_required" | "merchant_binding_not_found" | "merchant_binding_required" | "merchant_connection_not_found" | "merchant_credential_invalid" | "merchant_customer_not_found" | "merchant_customer_unmapped" | "merchant_eligibility_unavailable" | "merchant_event_not_found" | "merchant_event_state_conflict" | "merchant_provider_unavailable" | "merchant_subscription_required" | "message_id_conflict" | "message_not_found" | "model_discovery_unsupported" | "model_not_found" | "model_spending_limit_exceeded" | "model_validation_unavailable" | "not_found" | "prompt_variable_missing" | "prompt_variable_unknown" | "provider_historical_use" | "provider_in_use" | "provider_limit_reached" | "provider_name_conflict" | "provider_not_found" | "provider_required" | "quota_exceeded" | "rate_limited" | "service_unavailable" | "session_busy" | "session_fork_deleted" | "session_fork_unavailable" | "session_turn_unresponsive" | "session_version_mismatch" | "skill_invalid_archive" | "skill_invalid_markdown" | "skill_limit_reached" | "skill_name_conflict" | "skill_not_found" | "skill_too_many_files" | "skill_uncompressed_too_large" | "steer_not_available" | "subscription_already_paid" | "subscription_not_cancelled" | "subscription_required" | "task_active_run_exists" | "tenant_deleting" | "tenant_deletion_in_progress" | "tenant_deletion_not_ready" | "tenant_not_deleting" | "tool_approval_continuation_settled" | "tool_approval_decision_conflict" | "turn_interrupted" | "unauthorized" | "usage_credit_required" | "validation_failed" | "workspace_busy" | "workspace_in_use" | "workspace_not_found" | (string & {})>;
|
|
371
|
+
code: z.ZodCustom<"admin_agent_managed" | "agent_disabled" | "agent_mcp_connection_not_found" | "agent_mcp_connections_invalid" | "api_key_limit_reached" | "artifact_session_cap_reached" | "chat_webhook_conflict" | "chat_webhook_registration_failed" | "checkout_evidence_mismatch" | "forbidden" | "function_call_conflict" | "idempotency_conflict" | "input_idempotency_conflict" | "insufficient_scope" | "internal" | "invalid_cursor" | "invalid_request" | "mcp_connection_authentication_failed" | "mcp_connection_discovery_failed" | "mcp_connection_in_use" | "mcp_connection_invalid" | "mcp_connection_limit_reached" | "mcp_connection_name_conflict" | "mcp_connection_stale_credential_version" | "mcp_connection_unreachable" | "merchant_account_mismatch" | "merchant_balance_required" | "merchant_binding_not_found" | "merchant_binding_required" | "merchant_connection_in_use" | "merchant_connection_not_found" | "merchant_credential_invalid" | "merchant_customer_not_found" | "merchant_customer_unmapped" | "merchant_eligibility_unavailable" | "merchant_event_not_found" | "merchant_event_state_conflict" | "merchant_provider_unavailable" | "merchant_subscription_required" | "message_id_conflict" | "message_not_found" | "model_discovery_unsupported" | "model_not_found" | "model_spending_limit_exceeded" | "model_validation_unavailable" | "not_found" | "prompt_variable_missing" | "prompt_variable_unknown" | "provider_historical_use" | "provider_in_use" | "provider_limit_reached" | "provider_name_conflict" | "provider_not_found" | "provider_required" | "quota_exceeded" | "rate_limited" | "service_unavailable" | "session_busy" | "session_fork_deleted" | "session_fork_unavailable" | "session_turn_unresponsive" | "session_version_mismatch" | "skill_invalid_archive" | "skill_invalid_markdown" | "skill_limit_reached" | "skill_name_conflict" | "skill_not_found" | "skill_too_many_files" | "skill_uncompressed_too_large" | "steer_not_available" | "subscription_already_paid" | "subscription_not_cancelled" | "subscription_required" | "task_active_run_exists" | "tenant_deleting" | "tenant_deletion_in_progress" | "tenant_deletion_not_ready" | "tenant_not_deleting" | "tool_approval_continuation_settled" | "tool_approval_decision_conflict" | "turn_interrupted" | "unauthorized" | "usage_credit_required" | "validation_failed" | "workspace_busy" | "workspace_in_use" | "workspace_not_found" | (string & {}), "admin_agent_managed" | "agent_disabled" | "agent_mcp_connection_not_found" | "agent_mcp_connections_invalid" | "api_key_limit_reached" | "artifact_session_cap_reached" | "chat_webhook_conflict" | "chat_webhook_registration_failed" | "checkout_evidence_mismatch" | "forbidden" | "function_call_conflict" | "idempotency_conflict" | "input_idempotency_conflict" | "insufficient_scope" | "internal" | "invalid_cursor" | "invalid_request" | "mcp_connection_authentication_failed" | "mcp_connection_discovery_failed" | "mcp_connection_in_use" | "mcp_connection_invalid" | "mcp_connection_limit_reached" | "mcp_connection_name_conflict" | "mcp_connection_stale_credential_version" | "mcp_connection_unreachable" | "merchant_account_mismatch" | "merchant_balance_required" | "merchant_binding_not_found" | "merchant_binding_required" | "merchant_connection_in_use" | "merchant_connection_not_found" | "merchant_credential_invalid" | "merchant_customer_not_found" | "merchant_customer_unmapped" | "merchant_eligibility_unavailable" | "merchant_event_not_found" | "merchant_event_state_conflict" | "merchant_provider_unavailable" | "merchant_subscription_required" | "message_id_conflict" | "message_not_found" | "model_discovery_unsupported" | "model_not_found" | "model_spending_limit_exceeded" | "model_validation_unavailable" | "not_found" | "prompt_variable_missing" | "prompt_variable_unknown" | "provider_historical_use" | "provider_in_use" | "provider_limit_reached" | "provider_name_conflict" | "provider_not_found" | "provider_required" | "quota_exceeded" | "rate_limited" | "service_unavailable" | "session_busy" | "session_fork_deleted" | "session_fork_unavailable" | "session_turn_unresponsive" | "session_version_mismatch" | "skill_invalid_archive" | "skill_invalid_markdown" | "skill_limit_reached" | "skill_name_conflict" | "skill_not_found" | "skill_too_many_files" | "skill_uncompressed_too_large" | "steer_not_available" | "subscription_already_paid" | "subscription_not_cancelled" | "subscription_required" | "task_active_run_exists" | "tenant_deleting" | "tenant_deletion_in_progress" | "tenant_deletion_not_ready" | "tenant_not_deleting" | "tool_approval_continuation_settled" | "tool_approval_decision_conflict" | "turn_interrupted" | "unauthorized" | "usage_credit_required" | "validation_failed" | "workspace_busy" | "workspace_in_use" | "workspace_not_found" | (string & {})>;
|
|
372
372
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
373
373
|
message: z.ZodString;
|
|
374
374
|
}, z.core.$strict>;
|
|
@@ -379,93 +379,7 @@ export declare const taskRunResponseSchema: z.ZodObject<{
|
|
|
379
379
|
succeeded: "succeeded";
|
|
380
380
|
}>;
|
|
381
381
|
error: z.ZodNullable<z.ZodString>;
|
|
382
|
-
errorCode: z.ZodNullable<z.
|
|
383
|
-
admin_agent_managed: "admin_agent_managed";
|
|
384
|
-
agent_disabled: "agent_disabled";
|
|
385
|
-
agent_mcp_connection_not_found: "agent_mcp_connection_not_found";
|
|
386
|
-
agent_mcp_connections_invalid: "agent_mcp_connections_invalid";
|
|
387
|
-
api_key_limit_reached: "api_key_limit_reached";
|
|
388
|
-
artifact_session_cap_reached: "artifact_session_cap_reached";
|
|
389
|
-
chat_webhook_conflict: "chat_webhook_conflict";
|
|
390
|
-
chat_webhook_registration_failed: "chat_webhook_registration_failed";
|
|
391
|
-
checkout_evidence_mismatch: "checkout_evidence_mismatch";
|
|
392
|
-
forbidden: "forbidden";
|
|
393
|
-
function_call_conflict: "function_call_conflict";
|
|
394
|
-
idempotency_conflict: "idempotency_conflict";
|
|
395
|
-
input_idempotency_conflict: "input_idempotency_conflict";
|
|
396
|
-
insufficient_scope: "insufficient_scope";
|
|
397
|
-
internal: "internal";
|
|
398
|
-
invalid_cursor: "invalid_cursor";
|
|
399
|
-
invalid_request: "invalid_request";
|
|
400
|
-
mcp_connection_authentication_failed: "mcp_connection_authentication_failed";
|
|
401
|
-
mcp_connection_discovery_failed: "mcp_connection_discovery_failed";
|
|
402
|
-
mcp_connection_in_use: "mcp_connection_in_use";
|
|
403
|
-
mcp_connection_invalid: "mcp_connection_invalid";
|
|
404
|
-
mcp_connection_limit_reached: "mcp_connection_limit_reached";
|
|
405
|
-
mcp_connection_name_conflict: "mcp_connection_name_conflict";
|
|
406
|
-
mcp_connection_stale_credential_version: "mcp_connection_stale_credential_version";
|
|
407
|
-
mcp_connection_unreachable: "mcp_connection_unreachable";
|
|
408
|
-
merchant_account_mismatch: "merchant_account_mismatch";
|
|
409
|
-
merchant_balance_required: "merchant_balance_required";
|
|
410
|
-
merchant_binding_not_found: "merchant_binding_not_found";
|
|
411
|
-
merchant_binding_required: "merchant_binding_required";
|
|
412
|
-
merchant_connection_not_found: "merchant_connection_not_found";
|
|
413
|
-
merchant_credential_invalid: "merchant_credential_invalid";
|
|
414
|
-
merchant_customer_not_found: "merchant_customer_not_found";
|
|
415
|
-
merchant_customer_unmapped: "merchant_customer_unmapped";
|
|
416
|
-
merchant_eligibility_unavailable: "merchant_eligibility_unavailable";
|
|
417
|
-
merchant_event_not_found: "merchant_event_not_found";
|
|
418
|
-
merchant_event_state_conflict: "merchant_event_state_conflict";
|
|
419
|
-
merchant_provider_unavailable: "merchant_provider_unavailable";
|
|
420
|
-
merchant_subscription_required: "merchant_subscription_required";
|
|
421
|
-
message_id_conflict: "message_id_conflict";
|
|
422
|
-
message_not_found: "message_not_found";
|
|
423
|
-
model_discovery_unsupported: "model_discovery_unsupported";
|
|
424
|
-
model_not_found: "model_not_found";
|
|
425
|
-
model_spending_limit_exceeded: "model_spending_limit_exceeded";
|
|
426
|
-
model_validation_unavailable: "model_validation_unavailable";
|
|
427
|
-
not_found: "not_found";
|
|
428
|
-
prompt_variable_missing: "prompt_variable_missing";
|
|
429
|
-
prompt_variable_unknown: "prompt_variable_unknown";
|
|
430
|
-
provider_historical_use: "provider_historical_use";
|
|
431
|
-
provider_in_use: "provider_in_use";
|
|
432
|
-
provider_limit_reached: "provider_limit_reached";
|
|
433
|
-
provider_name_conflict: "provider_name_conflict";
|
|
434
|
-
provider_not_found: "provider_not_found";
|
|
435
|
-
provider_required: "provider_required";
|
|
436
|
-
quota_exceeded: "quota_exceeded";
|
|
437
|
-
rate_limited: "rate_limited";
|
|
438
|
-
service_unavailable: "service_unavailable";
|
|
439
|
-
session_busy: "session_busy";
|
|
440
|
-
session_fork_deleted: "session_fork_deleted";
|
|
441
|
-
session_fork_unavailable: "session_fork_unavailable";
|
|
442
|
-
session_turn_unresponsive: "session_turn_unresponsive";
|
|
443
|
-
session_version_mismatch: "session_version_mismatch";
|
|
444
|
-
skill_invalid_archive: "skill_invalid_archive";
|
|
445
|
-
skill_invalid_markdown: "skill_invalid_markdown";
|
|
446
|
-
skill_limit_reached: "skill_limit_reached";
|
|
447
|
-
skill_name_conflict: "skill_name_conflict";
|
|
448
|
-
skill_not_found: "skill_not_found";
|
|
449
|
-
skill_too_many_files: "skill_too_many_files";
|
|
450
|
-
skill_uncompressed_too_large: "skill_uncompressed_too_large";
|
|
451
|
-
steer_not_available: "steer_not_available";
|
|
452
|
-
subscription_already_paid: "subscription_already_paid";
|
|
453
|
-
subscription_not_cancelled: "subscription_not_cancelled";
|
|
454
|
-
subscription_required: "subscription_required";
|
|
455
|
-
task_active_run_exists: "task_active_run_exists";
|
|
456
|
-
tenant_deleting: "tenant_deleting";
|
|
457
|
-
tenant_deletion_in_progress: "tenant_deletion_in_progress";
|
|
458
|
-
tenant_deletion_not_ready: "tenant_deletion_not_ready";
|
|
459
|
-
tenant_not_deleting: "tenant_not_deleting";
|
|
460
|
-
tool_approval_continuation_settled: "tool_approval_continuation_settled";
|
|
461
|
-
tool_approval_decision_conflict: "tool_approval_decision_conflict";
|
|
462
|
-
unauthorized: "unauthorized";
|
|
463
|
-
usage_credit_required: "usage_credit_required";
|
|
464
|
-
validation_failed: "validation_failed";
|
|
465
|
-
workspace_busy: "workspace_busy";
|
|
466
|
-
workspace_in_use: "workspace_in_use";
|
|
467
|
-
workspace_not_found: "workspace_not_found";
|
|
468
|
-
}>>;
|
|
382
|
+
errorCode: z.ZodNullable<z.ZodType<import("../../types.ts").BlazingAgentsErrorCode, unknown, z.core.$ZodTypeInternals<import("../../types.ts").BlazingAgentsErrorCode, unknown>>>;
|
|
469
383
|
userId: z.ZodString;
|
|
470
384
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
471
385
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -600,93 +514,7 @@ export declare const taskRunsListResponseSchema: z.ZodObject<{
|
|
|
600
514
|
succeeded: "succeeded";
|
|
601
515
|
}>;
|
|
602
516
|
error: z.ZodNullable<z.ZodString>;
|
|
603
|
-
errorCode: z.ZodNullable<z.
|
|
604
|
-
admin_agent_managed: "admin_agent_managed";
|
|
605
|
-
agent_disabled: "agent_disabled";
|
|
606
|
-
agent_mcp_connection_not_found: "agent_mcp_connection_not_found";
|
|
607
|
-
agent_mcp_connections_invalid: "agent_mcp_connections_invalid";
|
|
608
|
-
api_key_limit_reached: "api_key_limit_reached";
|
|
609
|
-
artifact_session_cap_reached: "artifact_session_cap_reached";
|
|
610
|
-
chat_webhook_conflict: "chat_webhook_conflict";
|
|
611
|
-
chat_webhook_registration_failed: "chat_webhook_registration_failed";
|
|
612
|
-
checkout_evidence_mismatch: "checkout_evidence_mismatch";
|
|
613
|
-
forbidden: "forbidden";
|
|
614
|
-
function_call_conflict: "function_call_conflict";
|
|
615
|
-
idempotency_conflict: "idempotency_conflict";
|
|
616
|
-
input_idempotency_conflict: "input_idempotency_conflict";
|
|
617
|
-
insufficient_scope: "insufficient_scope";
|
|
618
|
-
internal: "internal";
|
|
619
|
-
invalid_cursor: "invalid_cursor";
|
|
620
|
-
invalid_request: "invalid_request";
|
|
621
|
-
mcp_connection_authentication_failed: "mcp_connection_authentication_failed";
|
|
622
|
-
mcp_connection_discovery_failed: "mcp_connection_discovery_failed";
|
|
623
|
-
mcp_connection_in_use: "mcp_connection_in_use";
|
|
624
|
-
mcp_connection_invalid: "mcp_connection_invalid";
|
|
625
|
-
mcp_connection_limit_reached: "mcp_connection_limit_reached";
|
|
626
|
-
mcp_connection_name_conflict: "mcp_connection_name_conflict";
|
|
627
|
-
mcp_connection_stale_credential_version: "mcp_connection_stale_credential_version";
|
|
628
|
-
mcp_connection_unreachable: "mcp_connection_unreachable";
|
|
629
|
-
merchant_account_mismatch: "merchant_account_mismatch";
|
|
630
|
-
merchant_balance_required: "merchant_balance_required";
|
|
631
|
-
merchant_binding_not_found: "merchant_binding_not_found";
|
|
632
|
-
merchant_binding_required: "merchant_binding_required";
|
|
633
|
-
merchant_connection_not_found: "merchant_connection_not_found";
|
|
634
|
-
merchant_credential_invalid: "merchant_credential_invalid";
|
|
635
|
-
merchant_customer_not_found: "merchant_customer_not_found";
|
|
636
|
-
merchant_customer_unmapped: "merchant_customer_unmapped";
|
|
637
|
-
merchant_eligibility_unavailable: "merchant_eligibility_unavailable";
|
|
638
|
-
merchant_event_not_found: "merchant_event_not_found";
|
|
639
|
-
merchant_event_state_conflict: "merchant_event_state_conflict";
|
|
640
|
-
merchant_provider_unavailable: "merchant_provider_unavailable";
|
|
641
|
-
merchant_subscription_required: "merchant_subscription_required";
|
|
642
|
-
message_id_conflict: "message_id_conflict";
|
|
643
|
-
message_not_found: "message_not_found";
|
|
644
|
-
model_discovery_unsupported: "model_discovery_unsupported";
|
|
645
|
-
model_not_found: "model_not_found";
|
|
646
|
-
model_spending_limit_exceeded: "model_spending_limit_exceeded";
|
|
647
|
-
model_validation_unavailable: "model_validation_unavailable";
|
|
648
|
-
not_found: "not_found";
|
|
649
|
-
prompt_variable_missing: "prompt_variable_missing";
|
|
650
|
-
prompt_variable_unknown: "prompt_variable_unknown";
|
|
651
|
-
provider_historical_use: "provider_historical_use";
|
|
652
|
-
provider_in_use: "provider_in_use";
|
|
653
|
-
provider_limit_reached: "provider_limit_reached";
|
|
654
|
-
provider_name_conflict: "provider_name_conflict";
|
|
655
|
-
provider_not_found: "provider_not_found";
|
|
656
|
-
provider_required: "provider_required";
|
|
657
|
-
quota_exceeded: "quota_exceeded";
|
|
658
|
-
rate_limited: "rate_limited";
|
|
659
|
-
service_unavailable: "service_unavailable";
|
|
660
|
-
session_busy: "session_busy";
|
|
661
|
-
session_fork_deleted: "session_fork_deleted";
|
|
662
|
-
session_fork_unavailable: "session_fork_unavailable";
|
|
663
|
-
session_turn_unresponsive: "session_turn_unresponsive";
|
|
664
|
-
session_version_mismatch: "session_version_mismatch";
|
|
665
|
-
skill_invalid_archive: "skill_invalid_archive";
|
|
666
|
-
skill_invalid_markdown: "skill_invalid_markdown";
|
|
667
|
-
skill_limit_reached: "skill_limit_reached";
|
|
668
|
-
skill_name_conflict: "skill_name_conflict";
|
|
669
|
-
skill_not_found: "skill_not_found";
|
|
670
|
-
skill_too_many_files: "skill_too_many_files";
|
|
671
|
-
skill_uncompressed_too_large: "skill_uncompressed_too_large";
|
|
672
|
-
steer_not_available: "steer_not_available";
|
|
673
|
-
subscription_already_paid: "subscription_already_paid";
|
|
674
|
-
subscription_not_cancelled: "subscription_not_cancelled";
|
|
675
|
-
subscription_required: "subscription_required";
|
|
676
|
-
task_active_run_exists: "task_active_run_exists";
|
|
677
|
-
tenant_deleting: "tenant_deleting";
|
|
678
|
-
tenant_deletion_in_progress: "tenant_deletion_in_progress";
|
|
679
|
-
tenant_deletion_not_ready: "tenant_deletion_not_ready";
|
|
680
|
-
tenant_not_deleting: "tenant_not_deleting";
|
|
681
|
-
tool_approval_continuation_settled: "tool_approval_continuation_settled";
|
|
682
|
-
tool_approval_decision_conflict: "tool_approval_decision_conflict";
|
|
683
|
-
unauthorized: "unauthorized";
|
|
684
|
-
usage_credit_required: "usage_credit_required";
|
|
685
|
-
validation_failed: "validation_failed";
|
|
686
|
-
workspace_busy: "workspace_busy";
|
|
687
|
-
workspace_in_use: "workspace_in_use";
|
|
688
|
-
workspace_not_found: "workspace_not_found";
|
|
689
|
-
}>>;
|
|
517
|
+
errorCode: z.ZodNullable<z.ZodType<import("../../types.ts").BlazingAgentsErrorCode, unknown, z.core.$ZodTypeInternals<import("../../types.ts").BlazingAgentsErrorCode, unknown>>>;
|
|
690
518
|
userId: z.ZodString;
|
|
691
519
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
692
520
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -743,6 +571,16 @@ export declare const createTaskRunResponseSchema: z.ZodObject<{
|
|
|
743
571
|
* `error`, and `finishedAt`, so one poll loop can follow the run.
|
|
744
572
|
*/
|
|
745
573
|
export declare const taskRunMessagesResponseSchema: z.ZodObject<{
|
|
574
|
+
error: z.ZodNullable<z.ZodString>;
|
|
575
|
+
finishedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
576
|
+
status: z.ZodEnum<{
|
|
577
|
+
blocked: "blocked";
|
|
578
|
+
canceled: "canceled";
|
|
579
|
+
failed: "failed";
|
|
580
|
+
queued: "queued";
|
|
581
|
+
running: "running";
|
|
582
|
+
succeeded: "succeeded";
|
|
583
|
+
}>;
|
|
746
584
|
data: z.ZodArray<z.ZodObject<{
|
|
747
585
|
id: z.ZodString;
|
|
748
586
|
role: z.ZodEnum<{
|
|
@@ -758,16 +596,6 @@ export declare const taskRunMessagesResponseSchema: z.ZodObject<{
|
|
|
758
596
|
}, z.core.$loose>>;
|
|
759
597
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
760
598
|
latestCursor: z.ZodNullable<z.ZodString>;
|
|
761
|
-
error: z.ZodNullable<z.ZodString>;
|
|
762
|
-
finishedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
763
|
-
status: z.ZodEnum<{
|
|
764
|
-
blocked: "blocked";
|
|
765
|
-
canceled: "canceled";
|
|
766
|
-
failed: "failed";
|
|
767
|
-
queued: "queued";
|
|
768
|
-
running: "running";
|
|
769
|
-
succeeded: "succeeded";
|
|
770
|
-
}>;
|
|
771
599
|
}, z.core.$strip>;
|
|
772
600
|
export type TaskListItem = z.infer<typeof taskListItemSchema>;
|
|
773
601
|
export type TaskRunStatus = z.infer<typeof taskRunStatusSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cron } from "croner";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
3
|
+
import { paginatedResponseSchema, receivedApiErrorCodeSchema } from "../api.js";
|
|
4
4
|
import { agentIdSchema, sessionIdSchema, taskIdSchema, taskRunIdSchema, tenantIdSchema, turnIdSchema, } from "../ids.js";
|
|
5
5
|
import { MAX_TASK_NAME_LENGTH, MAX_TASK_PROMPT_LENGTH, MIN_TASK_INTERVAL_MS, } from "../limitations.js";
|
|
6
6
|
import { atLeastOneFieldMessage, hasObjectKeys } from "../utils.js";
|
|
@@ -242,7 +242,7 @@ export const taskRunResponseSchema = z
|
|
|
242
242
|
turnId: turnIdSchema.nullable(),
|
|
243
243
|
status: taskRunStatusSchema,
|
|
244
244
|
error: z.string().nullable(),
|
|
245
|
-
errorCode:
|
|
245
|
+
errorCode: receivedApiErrorCodeSchema
|
|
246
246
|
.nullable()
|
|
247
247
|
.describe("Machine-readable reason a run ended `blocked` or `failed`: one of the API error codes, such as `usage_credit_required`, `quota_exceeded` or `provider_required`. `null` for every other run, and for a failure without a code; `error` carries the message."),
|
|
248
248
|
userId: userIdSchema,
|