@blazingagents/sdk 0.36.0 → 0.37.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.
|
@@ -379,6 +379,91 @@ export declare const taskRunResponseSchema: z.ZodObject<{
|
|
|
379
379
|
succeeded: "succeeded";
|
|
380
380
|
}>;
|
|
381
381
|
error: z.ZodNullable<z.ZodString>;
|
|
382
|
+
errorCode: z.ZodNullable<z.ZodEnum<{
|
|
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_required: "subscription_required";
|
|
453
|
+
task_active_run_exists: "task_active_run_exists";
|
|
454
|
+
tenant_deleting: "tenant_deleting";
|
|
455
|
+
tenant_deletion_in_progress: "tenant_deletion_in_progress";
|
|
456
|
+
tenant_deletion_not_ready: "tenant_deletion_not_ready";
|
|
457
|
+
tenant_not_deleting: "tenant_not_deleting";
|
|
458
|
+
tool_approval_continuation_settled: "tool_approval_continuation_settled";
|
|
459
|
+
tool_approval_decision_conflict: "tool_approval_decision_conflict";
|
|
460
|
+
unauthorized: "unauthorized";
|
|
461
|
+
usage_credit_required: "usage_credit_required";
|
|
462
|
+
validation_failed: "validation_failed";
|
|
463
|
+
workspace_busy: "workspace_busy";
|
|
464
|
+
workspace_in_use: "workspace_in_use";
|
|
465
|
+
workspace_not_found: "workspace_not_found";
|
|
466
|
+
}>>;
|
|
382
467
|
userId: z.ZodString;
|
|
383
468
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
384
469
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -513,6 +598,91 @@ export declare const taskRunsListResponseSchema: z.ZodObject<{
|
|
|
513
598
|
succeeded: "succeeded";
|
|
514
599
|
}>;
|
|
515
600
|
error: z.ZodNullable<z.ZodString>;
|
|
601
|
+
errorCode: z.ZodNullable<z.ZodEnum<{
|
|
602
|
+
admin_agent_managed: "admin_agent_managed";
|
|
603
|
+
agent_disabled: "agent_disabled";
|
|
604
|
+
agent_mcp_connection_not_found: "agent_mcp_connection_not_found";
|
|
605
|
+
agent_mcp_connections_invalid: "agent_mcp_connections_invalid";
|
|
606
|
+
api_key_limit_reached: "api_key_limit_reached";
|
|
607
|
+
artifact_session_cap_reached: "artifact_session_cap_reached";
|
|
608
|
+
chat_webhook_conflict: "chat_webhook_conflict";
|
|
609
|
+
chat_webhook_registration_failed: "chat_webhook_registration_failed";
|
|
610
|
+
checkout_evidence_mismatch: "checkout_evidence_mismatch";
|
|
611
|
+
forbidden: "forbidden";
|
|
612
|
+
function_call_conflict: "function_call_conflict";
|
|
613
|
+
idempotency_conflict: "idempotency_conflict";
|
|
614
|
+
input_idempotency_conflict: "input_idempotency_conflict";
|
|
615
|
+
insufficient_scope: "insufficient_scope";
|
|
616
|
+
internal: "internal";
|
|
617
|
+
invalid_cursor: "invalid_cursor";
|
|
618
|
+
invalid_request: "invalid_request";
|
|
619
|
+
mcp_connection_authentication_failed: "mcp_connection_authentication_failed";
|
|
620
|
+
mcp_connection_discovery_failed: "mcp_connection_discovery_failed";
|
|
621
|
+
mcp_connection_in_use: "mcp_connection_in_use";
|
|
622
|
+
mcp_connection_invalid: "mcp_connection_invalid";
|
|
623
|
+
mcp_connection_limit_reached: "mcp_connection_limit_reached";
|
|
624
|
+
mcp_connection_name_conflict: "mcp_connection_name_conflict";
|
|
625
|
+
mcp_connection_stale_credential_version: "mcp_connection_stale_credential_version";
|
|
626
|
+
mcp_connection_unreachable: "mcp_connection_unreachable";
|
|
627
|
+
merchant_account_mismatch: "merchant_account_mismatch";
|
|
628
|
+
merchant_balance_required: "merchant_balance_required";
|
|
629
|
+
merchant_binding_not_found: "merchant_binding_not_found";
|
|
630
|
+
merchant_binding_required: "merchant_binding_required";
|
|
631
|
+
merchant_connection_not_found: "merchant_connection_not_found";
|
|
632
|
+
merchant_credential_invalid: "merchant_credential_invalid";
|
|
633
|
+
merchant_customer_not_found: "merchant_customer_not_found";
|
|
634
|
+
merchant_customer_unmapped: "merchant_customer_unmapped";
|
|
635
|
+
merchant_eligibility_unavailable: "merchant_eligibility_unavailable";
|
|
636
|
+
merchant_event_not_found: "merchant_event_not_found";
|
|
637
|
+
merchant_event_state_conflict: "merchant_event_state_conflict";
|
|
638
|
+
merchant_provider_unavailable: "merchant_provider_unavailable";
|
|
639
|
+
merchant_subscription_required: "merchant_subscription_required";
|
|
640
|
+
message_id_conflict: "message_id_conflict";
|
|
641
|
+
message_not_found: "message_not_found";
|
|
642
|
+
model_discovery_unsupported: "model_discovery_unsupported";
|
|
643
|
+
model_not_found: "model_not_found";
|
|
644
|
+
model_spending_limit_exceeded: "model_spending_limit_exceeded";
|
|
645
|
+
model_validation_unavailable: "model_validation_unavailable";
|
|
646
|
+
not_found: "not_found";
|
|
647
|
+
prompt_variable_missing: "prompt_variable_missing";
|
|
648
|
+
prompt_variable_unknown: "prompt_variable_unknown";
|
|
649
|
+
provider_historical_use: "provider_historical_use";
|
|
650
|
+
provider_in_use: "provider_in_use";
|
|
651
|
+
provider_limit_reached: "provider_limit_reached";
|
|
652
|
+
provider_name_conflict: "provider_name_conflict";
|
|
653
|
+
provider_not_found: "provider_not_found";
|
|
654
|
+
provider_required: "provider_required";
|
|
655
|
+
quota_exceeded: "quota_exceeded";
|
|
656
|
+
rate_limited: "rate_limited";
|
|
657
|
+
service_unavailable: "service_unavailable";
|
|
658
|
+
session_busy: "session_busy";
|
|
659
|
+
session_fork_deleted: "session_fork_deleted";
|
|
660
|
+
session_fork_unavailable: "session_fork_unavailable";
|
|
661
|
+
session_turn_unresponsive: "session_turn_unresponsive";
|
|
662
|
+
session_version_mismatch: "session_version_mismatch";
|
|
663
|
+
skill_invalid_archive: "skill_invalid_archive";
|
|
664
|
+
skill_invalid_markdown: "skill_invalid_markdown";
|
|
665
|
+
skill_limit_reached: "skill_limit_reached";
|
|
666
|
+
skill_name_conflict: "skill_name_conflict";
|
|
667
|
+
skill_not_found: "skill_not_found";
|
|
668
|
+
skill_too_many_files: "skill_too_many_files";
|
|
669
|
+
skill_uncompressed_too_large: "skill_uncompressed_too_large";
|
|
670
|
+
steer_not_available: "steer_not_available";
|
|
671
|
+
subscription_required: "subscription_required";
|
|
672
|
+
task_active_run_exists: "task_active_run_exists";
|
|
673
|
+
tenant_deleting: "tenant_deleting";
|
|
674
|
+
tenant_deletion_in_progress: "tenant_deletion_in_progress";
|
|
675
|
+
tenant_deletion_not_ready: "tenant_deletion_not_ready";
|
|
676
|
+
tenant_not_deleting: "tenant_not_deleting";
|
|
677
|
+
tool_approval_continuation_settled: "tool_approval_continuation_settled";
|
|
678
|
+
tool_approval_decision_conflict: "tool_approval_decision_conflict";
|
|
679
|
+
unauthorized: "unauthorized";
|
|
680
|
+
usage_credit_required: "usage_credit_required";
|
|
681
|
+
validation_failed: "validation_failed";
|
|
682
|
+
workspace_busy: "workspace_busy";
|
|
683
|
+
workspace_in_use: "workspace_in_use";
|
|
684
|
+
workspace_not_found: "workspace_not_found";
|
|
685
|
+
}>>;
|
|
516
686
|
userId: z.ZodString;
|
|
517
687
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
518
688
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cron } from "croner";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { paginatedResponseSchema } from "../api.js";
|
|
3
|
+
import { apiErrorCodeSchema, paginatedResponseSchema } 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,6 +242,9 @@ export const taskRunResponseSchema = z
|
|
|
242
242
|
turnId: turnIdSchema.nullable(),
|
|
243
243
|
status: taskRunStatusSchema,
|
|
244
244
|
error: z.string().nullable(),
|
|
245
|
+
errorCode: apiErrorCodeSchema
|
|
246
|
+
.nullable()
|
|
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."),
|
|
245
248
|
userId: userIdSchema,
|
|
246
249
|
metadata: metadataSchema,
|
|
247
250
|
startedAt: z.iso.datetime({ offset: true }).nullable(),
|