@cubos/agent-sdk 0.0.1159880 → 0.0.1160412

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.
@@ -40,6 +40,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
40
40
  user: import("../generated/schema.js").components["schemas"]["UserRef"] | null;
41
41
  user_identifier: string | null;
42
42
  user_identifier_label: string | null;
43
+ waiting_on_mcp: import("../generated/schema.js").components["schemas"]["WaitingOnMcp"] | null;
43
44
  }[]>;
44
45
  /** Every tag the tenant's conversations carry, with how many carry each —
45
46
  * most used first. Tags have no registry: this is the vocabulary in use. */
@@ -71,6 +72,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
71
72
  user: import("../generated/schema.js").components["schemas"]["UserRef"] | null;
72
73
  user_identifier: string | null;
73
74
  user_identifier_label: string | null;
75
+ waiting_on_mcp: import("../generated/schema.js").components["schemas"]["WaitingOnMcp"] | null;
74
76
  }>;
75
77
  create: (input: Schemas["CreateConversationInput"]) => Promise<{
76
78
  agent: import("../generated/schema.js").components["schemas"]["AgentRef"] | null;
@@ -96,6 +98,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
96
98
  user: import("../generated/schema.js").components["schemas"]["UserRef"] | null;
97
99
  user_identifier: string | null;
98
100
  user_identifier_label: string | null;
101
+ waiting_on_mcp: import("../generated/schema.js").components["schemas"]["WaitingOnMcp"] | null;
99
102
  }>;
100
103
  update: (id: string, input: Schemas["UpdateConversationInput"]) => Promise<{
101
104
  agent: import("../generated/schema.js").components["schemas"]["AgentRef"] | null;
@@ -121,6 +124,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
121
124
  user: import("../generated/schema.js").components["schemas"]["UserRef"] | null;
122
125
  user_identifier: string | null;
123
126
  user_identifier_label: string | null;
127
+ waiting_on_mcp: import("../generated/schema.js").components["schemas"]["WaitingOnMcp"] | null;
124
128
  }>;
125
129
  archive: (id: string) => Promise<{
126
130
  agent: import("../generated/schema.js").components["schemas"]["AgentRef"] | null;
@@ -146,6 +150,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
146
150
  user: import("../generated/schema.js").components["schemas"]["UserRef"] | null;
147
151
  user_identifier: string | null;
148
152
  user_identifier_label: string | null;
153
+ waiting_on_mcp: import("../generated/schema.js").components["schemas"]["WaitingOnMcp"] | null;
149
154
  }>;
150
155
  /** Clears the backoff and re-dispatches a conversation stuck after failures. */
151
156
  retryNow: (id: string) => Promise<{
@@ -172,6 +177,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
172
177
  user: import("../generated/schema.js").components["schemas"]["UserRef"] | null;
173
178
  user_identifier: string | null;
174
179
  user_identifier_label: string | null;
180
+ waiting_on_mcp: import("../generated/schema.js").components["schemas"]["WaitingOnMcp"] | null;
175
181
  }>;
176
182
  listEvents: (id: string, query?: {
177
183
  before?: number;
@@ -8,11 +8,13 @@ import type { Schemas } from "../schemas.js";
8
8
  */
9
9
  export declare function mcpsApi(t: Transport, tenantSlug: string): {
10
10
  list: (signal?: AbortSignal) => Promise<{
11
+ blocking?: boolean;
11
12
  created_at: string;
12
13
  display_name: string;
13
14
  id: string;
14
15
  last_error: string | null;
15
16
  last_refreshed_at: string | null;
17
+ outage: import("../generated/schema.js").components["schemas"]["McpOutage"] | null;
16
18
  slug: string;
17
19
  tool_count: number;
18
20
  transport: import("../generated/schema.js").components["schemas"]["McpTransport"];
@@ -20,6 +22,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
20
22
  url: string;
21
23
  }[]>;
22
24
  get: (slug: string, signal?: AbortSignal) => Promise<{
25
+ blocking?: boolean;
23
26
  created_at: string;
24
27
  display_name: string;
25
28
  dynamic_tools: boolean;
@@ -30,6 +33,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
30
33
  id: string;
31
34
  last_error: string | null;
32
35
  last_refreshed_at: string | null;
36
+ outage: import("../generated/schema.js").components["schemas"]["McpOutage"] | null;
33
37
  skills: import("../generated/schema.js").components["schemas"]["McpSkillSummary"][];
34
38
  slug: string;
35
39
  tools: import("../generated/schema.js").components["schemas"]["McpTool"][];
@@ -38,6 +42,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
38
42
  url: string;
39
43
  }>;
40
44
  create: (input: Schemas["CreateMcpInput"]) => Promise<{
45
+ blocking?: boolean;
41
46
  created_at: string;
42
47
  display_name: string;
43
48
  dynamic_tools: boolean;
@@ -48,6 +53,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
48
53
  id: string;
49
54
  last_error: string | null;
50
55
  last_refreshed_at: string | null;
56
+ outage: import("../generated/schema.js").components["schemas"]["McpOutage"] | null;
51
57
  skills: import("../generated/schema.js").components["schemas"]["McpSkillSummary"][];
52
58
  slug: string;
53
59
  tools: import("../generated/schema.js").components["schemas"]["McpTool"][];
@@ -56,6 +62,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
56
62
  url: string;
57
63
  }>;
58
64
  update: (currentSlug: string, input: Schemas["UpdateMcpInput"]) => Promise<{
65
+ blocking?: boolean;
59
66
  created_at: string;
60
67
  display_name: string;
61
68
  dynamic_tools: boolean;
@@ -66,6 +73,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
66
73
  id: string;
67
74
  last_error: string | null;
68
75
  last_refreshed_at: string | null;
76
+ outage: import("../generated/schema.js").components["schemas"]["McpOutage"] | null;
69
77
  skills: import("../generated/schema.js").components["schemas"]["McpSkillSummary"][];
70
78
  slug: string;
71
79
  tools: import("../generated/schema.js").components["schemas"]["McpTool"][];
@@ -76,6 +84,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
76
84
  delete: (slug: string) => Promise<void>;
77
85
  /** Re-handshakes the server and re-reads its tool list. */
78
86
  refresh: (slug: string) => Promise<{
87
+ blocking?: boolean;
79
88
  created_at: string;
80
89
  display_name: string;
81
90
  dynamic_tools: boolean;
@@ -86,6 +95,7 @@ export declare function mcpsApi(t: Transport, tenantSlug: string): {
86
95
  id: string;
87
96
  last_error: string | null;
88
97
  last_refreshed_at: string | null;
98
+ outage: import("../generated/schema.js").components["schemas"]["McpOutage"] | null;
89
99
  skills: import("../generated/schema.js").components["schemas"]["McpSkillSummary"][];
90
100
  slug: string;
91
101
  tools: import("../generated/schema.js").components["schemas"]["McpTool"][];
@@ -316,7 +316,7 @@ export interface paths {
316
316
  };
317
317
  content?: never;
318
318
  };
319
- /** @description Another instance is already reconciling this provider. */
319
+ /** @description A later refresh or sweep of this provider started while this one ran; its result stands and this one's was dropped. */
320
320
  409: {
321
321
  headers: {
322
322
  [name: string]: unknown;
@@ -3411,7 +3411,7 @@ export interface paths {
3411
3411
  put?: never;
3412
3412
  /**
3413
3413
  * Refresh models
3414
- * @description Re-fetches the provider upstream and reconciles the cached `provider_models` catalog: new rows are inserted, vanished rows are soft-deleted via `disappeared_at`, and capability probes re-run. Returns the reconciled catalog. A Postgres advisory lock serializes reconciles; a concurrent one returns 409. Only ever touches a provider owned by `tenant_slug` itself — a shared provider is refreshed through `POST /ai-providers/shared/{slug}/models/refresh` instead.
3414
+ * @description Re-fetches the provider upstream and reconciles the cached `provider_models` catalog: new rows are inserted, vanished rows are soft-deleted via `disappeared_at`, and capability probes re-run. Returns the reconciled catalog. When passes overlap, one that started earlier writes nothing once a later one has started: it stops and returns 409, and the later pass's catalog and health are the ones that stand. Only ever touches a provider owned by `tenant_slug` itself — a shared provider is refreshed through `POST /ai-providers/shared/{slug}/models/refresh` instead.
3415
3415
  */
3416
3416
  post: {
3417
3417
  parameters: {
@@ -3453,7 +3453,7 @@ export interface paths {
3453
3453
  };
3454
3454
  content?: never;
3455
3455
  };
3456
- /** @description Another instance is already reconciling this provider. */
3456
+ /** @description A later refresh or sweep of this provider started while this one ran; its result stands and this one's was dropped. */
3457
3457
  409: {
3458
3458
  headers: {
3459
3459
  [name: string]: unknown;
@@ -9024,7 +9024,7 @@ export interface paths {
9024
9024
  put?: never;
9025
9025
  /**
9026
9026
  * Refresh MCP tool catalog
9027
- * @description Calls `tools/list` on the MCP server, upserts the catalog, flags tools absent upstream as disappeared, and runs per-provider tool validation into `provider_incompatibilities`. Probe failures land in `last_error`; the refreshed MCP is always returned.
9027
+ * @description Calls `tools/list` on the MCP server, upserts the catalog, flags tools absent upstream as disappeared, and runs per-provider tool validation into `provider_incompatibilities`. Probe failures, and a listing that cannot be stored, land in `last_error`; the refreshed MCP is always returned.
9028
9028
  */
9029
9029
  post: {
9030
9030
  parameters: {
@@ -13480,6 +13480,7 @@ export interface components {
13480
13480
  * the contact without fetching the full user per row. Null when unlabeled or unbound.
13481
13481
  */
13482
13482
  user_identifier_label: string | null;
13483
+ waiting_on_mcp: components["schemas"]["WaitingOnMcp"] | null;
13483
13484
  };
13484
13485
  ConversationContext: {
13485
13486
  /** @description The context currently set, or null when the client has set none. */
@@ -14097,6 +14098,8 @@ export interface components {
14097
14098
  slug: string;
14098
14099
  };
14099
14100
  CreateMcpInput: {
14101
+ /** @description See [`Mcp::blocking`]. Defaults to true. */
14102
+ blocking?: boolean;
14100
14103
  display_name: string;
14101
14104
  dynamic_tools?: boolean;
14102
14105
  /**
@@ -14422,7 +14425,7 @@ export interface components {
14422
14425
  slug: string | null;
14423
14426
  };
14424
14427
  /** @enum {string} */
14425
- EventType: "user_message" | "task_prompt" | "agent_directive" | "agent_message" | "agent_file" | "llm_call" | "tool_result" | "turn_done" | "todo_update" | "memory_lookup" | "media_transcription" | "sub_conversation_started" | "sub_conversation_finished" | "eval_subcall_request" | "eval_subcall_result" | "compaction_done" | "filesystem_root" | "harness_error" | "guardrail_verdict" | "client_tool_call" | "title_generated" | "context_update" | "time_notice";
14428
+ EventType: "user_message" | "task_prompt" | "agent_directive" | "agent_message" | "agent_file" | "llm_call" | "tool_result" | "turn_done" | "todo_update" | "memory_lookup" | "media_transcription" | "sub_conversation_started" | "sub_conversation_finished" | "eval_subcall_request" | "eval_subcall_result" | "compaction_done" | "filesystem_root" | "harness_error" | "guardrail_verdict" | "scheduled_runs_update" | "auto_call_update" | "client_tool_call" | "title_generated" | "context_update" | "time_notice";
14426
14429
  ExternalChannel: {
14427
14430
  agent: components["schemas"]["AgentRef"];
14428
14431
  connection_secret_hint: string;
@@ -14745,6 +14748,15 @@ export interface components {
14745
14748
  tokens?: components["schemas"]["TokenCounts"];
14746
14749
  };
14747
14750
  Mcp: {
14751
+ /**
14752
+ * @description While this MCP is unreachable, every conversation whose agent reaches
14753
+ * it waits — no model call, nothing sent to the user — and resumes when
14754
+ * it answers again, re-running the calls that failed when that is safe:
14755
+ * a call that certainly was not sent, or one to a tool marked read-only
14756
+ * or idempotent. When false, a failure is a tool error the model reads
14757
+ * and works around.
14758
+ */
14759
+ blocking?: boolean;
14748
14760
  /** Format: date-time */
14749
14761
  created_at: string;
14750
14762
  display_name: string;
@@ -14782,6 +14794,7 @@ export interface components {
14782
14794
  last_error: string | null;
14783
14795
  /** Format: date-time */
14784
14796
  last_refreshed_at: string | null;
14797
+ outage: components["schemas"]["McpOutage"] | null;
14785
14798
  /**
14786
14799
  * @description Skills shipped with this MCP. An agent that enables the MCP inherits
14787
14800
  * them, and a skill can gate a subset of the MCP's tools.
@@ -14799,6 +14812,8 @@ export interface components {
14799
14812
  error: string;
14800
14813
  };
14801
14814
  McpListItem: {
14815
+ /** @description See [`Mcp::blocking`]. */
14816
+ blocking?: boolean;
14802
14817
  /** Format: date-time */
14803
14818
  created_at: string;
14804
14819
  display_name: string;
@@ -14807,6 +14822,7 @@ export interface components {
14807
14822
  last_error: string | null;
14808
14823
  /** Format: date-time */
14809
14824
  last_refreshed_at: string | null;
14825
+ outage: components["schemas"]["McpOutage"] | null;
14810
14826
  slug: string;
14811
14827
  /** Format: int64 */
14812
14828
  tool_count: number;
@@ -14815,6 +14831,35 @@ export interface components {
14815
14831
  updated_at: string;
14816
14832
  url: string;
14817
14833
  };
14834
+ /**
14835
+ * @description An MCP that stopped answering: a request to it failed in transport (no
14836
+ * connection, no answer in time, a 502/503/504), and nothing has answered
14837
+ * since. Cleared by the first answer — a turn's call or a probe.
14838
+ */
14839
+ McpOutage: {
14840
+ /**
14841
+ * Format: int32
14842
+ * @description Failures in a row: the one that opened the outage plus every probe
14843
+ * that failed since (and, when a probe answered but the calls kept
14844
+ * failing, the outages before it).
14845
+ */
14846
+ consecutive_failures: number;
14847
+ /** @description The newest transport failure, with its causes. */
14848
+ last_error: string | null;
14849
+ /** Format: date-time */
14850
+ last_error_at: string | null;
14851
+ /**
14852
+ * Format: date-time
14853
+ * @description When the server is tried next. Probes back off from 15 s to once a
14854
+ * minute.
14855
+ */
14856
+ next_probe_at: string;
14857
+ /**
14858
+ * Format: date-time
14859
+ * @description When the first failure of this outage was seen.
14860
+ */
14861
+ since: string;
14862
+ };
14818
14863
  /** @description Reduced MCP reference embedded into agent MCP listings in place of a bare `mcp_id`. */
14819
14864
  McpRef: {
14820
14865
  display_name: string;
@@ -16157,6 +16202,11 @@ export interface components {
16157
16202
  slug?: string | null;
16158
16203
  };
16159
16204
  UpdateMcpInput: {
16205
+ /**
16206
+ * @description See [`Mcp::blocking`]. Turning it off while the MCP is down releases
16207
+ * the conversations waiting on it at once.
16208
+ */
16209
+ blocking?: boolean | null;
16160
16210
  display_name?: string | null;
16161
16211
  dynamic_tools?: boolean | null;
16162
16212
  /**
@@ -16467,6 +16517,16 @@ export interface components {
16467
16517
  token: string;
16468
16518
  };
16469
16519
  Value: unknown;
16520
+ /** @description See [`Conversation::waiting_on_mcp`]. */
16521
+ WaitingOnMcp: {
16522
+ display_name: string;
16523
+ /**
16524
+ * Format: date-time
16525
+ * @description When the MCP's outage began.
16526
+ */
16527
+ since: string;
16528
+ slug: string;
16529
+ };
16470
16530
  WhatsappChannel: {
16471
16531
  agent: components["schemas"]["AgentRef"];
16472
16532
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubos/agent-sdk",
3
- "version": "0.0.1159880",
3
+ "version": "0.0.1160412",
4
4
  "type": "module",
5
5
  "description": "Client for the Cubos Agent conversation API. Runs anywhere fetch does.",
6
6
  "license": "SEE LICENSE IN LICENSE",