broods 0.13.0 → 0.17.3

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/index.d.ts CHANGED
@@ -1,58 +1,98 @@
1
1
  import { SystemModelMessage, LanguageModelCallOptions, RequestOptions, streamText, JSONSchema7, ModelMessage, TextStreamPart, ToolSet } from 'ai';
2
2
 
3
3
  /**
4
- * Supported account model provider names.
5
- * Keep provider identifiers here so config validation and model resolution share one source.
4
+ * Every Vercel AI SDK provider that ships language models, plus `custom`
5
+ * (any OpenAI-compatible endpoint) and `minimax`. Image-, speech- and
6
+ * transcription-only providers are deliberately absent: they cannot back
7
+ * `config.model`.
6
8
  */
7
- declare const ACCOUNT_MODEL_PROVIDERS: {
8
- readonly google: true;
9
- readonly openai: true;
10
- readonly anthropic: true;
11
- readonly bedrock: true;
12
- readonly vercel: true;
13
- readonly minimax: true;
14
- readonly custom: true;
9
+ declare const MODEL_PROVIDERS: {
10
+ readonly anthropic: {
11
+ readonly label: "Anthropic";
12
+ readonly modelPlaceholder: "claude-sonnet-4-5-20250929";
13
+ };
14
+ readonly azure: {
15
+ readonly label: "Azure OpenAI";
16
+ readonly modelPlaceholder: "gpt-4.1-mini";
17
+ };
18
+ readonly baseten: {
19
+ readonly label: "Baseten";
20
+ readonly modelPlaceholder: "deepseek-ai/DeepSeek-V3";
21
+ };
22
+ readonly bedrock: {
23
+ readonly label: "Amazon Bedrock";
24
+ readonly modelPlaceholder: "anthropic.claude-sonnet-4-5-20250929-v1:0";
25
+ };
26
+ readonly cerebras: {
27
+ readonly label: "Cerebras";
28
+ readonly modelPlaceholder: "llama3.1-8b";
29
+ };
30
+ readonly cohere: {
31
+ readonly label: "Cohere";
32
+ readonly modelPlaceholder: "command-a-03-2025";
33
+ };
34
+ readonly custom: {
35
+ readonly label: "Custom OpenAI-compatible";
36
+ readonly modelPlaceholder: "gpt-oss-120b";
37
+ };
38
+ readonly deepinfra: {
39
+ readonly label: "DeepInfra";
40
+ readonly modelPlaceholder: "deepseek-ai/DeepSeek-V3";
41
+ };
42
+ readonly deepseek: {
43
+ readonly label: "DeepSeek";
44
+ readonly modelPlaceholder: "deepseek-chat";
45
+ };
46
+ readonly fireworks: {
47
+ readonly label: "Fireworks";
48
+ readonly modelPlaceholder: "accounts/fireworks/models/deepseek-v3";
49
+ };
50
+ readonly google: {
51
+ readonly label: "Google";
52
+ readonly modelPlaceholder: "gemini-2.5-flash";
53
+ };
54
+ readonly groq: {
55
+ readonly label: "Groq";
56
+ readonly modelPlaceholder: "llama-3.3-70b-versatile";
57
+ };
58
+ readonly minimax: {
59
+ readonly label: "MiniMax";
60
+ readonly modelPlaceholder: "MiniMax-M2.7";
61
+ };
62
+ readonly mistral: {
63
+ readonly label: "Mistral";
64
+ readonly modelPlaceholder: "mistral-large-latest";
65
+ };
66
+ readonly openai: {
67
+ readonly label: "OpenAI";
68
+ readonly modelPlaceholder: "gpt-4.1-mini";
69
+ };
70
+ readonly perplexity: {
71
+ readonly label: "Perplexity";
72
+ readonly modelPlaceholder: "sonar-pro";
73
+ };
74
+ readonly togetherai: {
75
+ readonly label: "Together.ai";
76
+ readonly modelPlaceholder: "deepseek-ai/DeepSeek-V3";
77
+ };
78
+ readonly v0: {
79
+ readonly label: "Vercel v0";
80
+ readonly modelPlaceholder: "v0-1.0-md";
81
+ };
82
+ readonly vercel: {
83
+ readonly label: "Vercel AI Gateway";
84
+ readonly modelPlaceholder: "openai/gpt-4.1-mini";
85
+ };
86
+ readonly vertex: {
87
+ readonly label: "Google Vertex AI";
88
+ readonly modelPlaceholder: "gemini-2.5-flash";
89
+ };
90
+ readonly xai: {
91
+ readonly label: "xAI Grok";
92
+ readonly modelPlaceholder: "grok-4";
93
+ };
15
94
  };
16
- type AccountModelProviderName = keyof typeof ACCOUNT_MODEL_PROVIDERS;
17
-
18
- /**
19
- * Agent policy contracts and validation.
20
- * Runtime decisions are made by OPA using the same document/input shape.
21
- */
22
- declare const AGENT_POLICY_ACTIONS: readonly ["agent.invoke", "tool.call", "workspace.read", "workspace.write", "workspace.exec", "subagent.run", "skill.load"];
23
- type AgentPolicyAction = (typeof AGENT_POLICY_ACTIONS)[number];
24
- type AgentPolicyEffect = "allow" | "deny";
25
- type AgentPolicyMode = "enforce" | "audit";
26
- type AgentPolicyConditionOperator = "equals" | "notEquals" | "in" | "notIn" | "prefix" | "contains";
27
- interface AgentPolicyCondition {
28
- attribute: string;
29
- operator: AgentPolicyConditionOperator;
30
- value: string | number | boolean | string[] | number[] | boolean[];
31
- }
32
- interface AgentPolicyResourceSelector {
33
- toolNames?: string[];
34
- toolIds?: string[];
35
- workspaceIds?: string[];
36
- workspaceNames?: string[];
37
- filePaths?: string[];
38
- subagentIds?: string[];
39
- skillPaths?: string[];
40
- }
41
- interface AgentPolicyRule {
42
- id: string;
43
- effect: AgentPolicyEffect;
44
- actions: AgentPolicyAction[];
45
- resources?: AgentPolicyResourceSelector;
46
- conditions?: AgentPolicyCondition[];
47
- }
48
- interface AgentPolicyDocument {
49
- version: 1;
50
- rules: AgentPolicyRule[];
51
- }
52
- interface AgentPolicyConfig {
53
- policyIds?: string[];
54
- mode?: AgentPolicyMode;
55
- }
95
+ type AccountModelProviderName = keyof typeof MODEL_PROVIDERS;
56
96
 
57
97
  /**
58
98
  * Agent configuration: types for the per-agent settings object, input
@@ -83,7 +123,8 @@ interface AgentConfig {
83
123
  skills?: AgentSkillsConfig;
84
124
  subagent?: AgentSubagentConfig;
85
125
  scheduler?: AgentSchedulerConfig;
86
- policy?: AgentPolicyConfig;
126
+ /** Policies that gate this agent. Each one carries its own enforcement mode. */
127
+ policies?: string[];
87
128
  publicAccess?: boolean;
88
129
  [key: string]: unknown;
89
130
  }
@@ -166,14 +207,6 @@ type AgentModelOutputMetadata = {
166
207
  [key: string]: unknown;
167
208
  };
168
209
  type AgentProviderConfig = Partial<Record<AccountModelProviderName, AgentProviderSettings>>;
169
- /**
170
- * Constructor settings for a model provider. The keys are an explicit allow-list
171
- * (no open index signature) so a misspelled option — most commonly the camel
172
- * `baseUrl` instead of the canonical `base_url`/`baseURL` — is a compile-time
173
- * error in the SDK and is caught by `normalizeProviderSettings` at runtime.
174
- * Keep this list in sync with `normalizeProviderSettings` and the SDK's
175
- * `KNOWN_PROVIDER_SETTING_KEYS`.
176
- */
177
210
  interface AgentProviderSettings {
178
211
  apiKey?: string;
179
212
  /** OpenAI-compatible endpoint (`custom`). Snake form, as documented. */
@@ -181,13 +214,11 @@ interface AgentProviderSettings {
181
214
  /** OpenAI-compatible endpoint (`custom`). AI-SDK form; the dashboard writes both. */
182
215
  baseURL?: string;
183
216
  headers?: Record<string, string>;
217
+ /** Endpoint label; becomes the provider id and the pi harness env prefix. */
218
+ name?: string;
184
219
  organization?: string;
185
220
  project?: string;
186
- name?: string;
187
- region?: string;
188
- accessKeyId?: string;
189
- secretAccessKey?: string;
190
- sessionToken?: string;
221
+ [key: string]: unknown;
191
222
  }
192
223
  interface AgentWorkspaceRef {
193
224
  name: string;
@@ -269,7 +300,8 @@ interface AgentTelegramChannelConfig {
269
300
  apiUrl?: string;
270
301
  botToken?: string;
271
302
  webhookSecret?: string;
272
- allowedChatIds?: number[];
303
+ allowedChannelIds?: string[];
304
+ allowedUserIds?: string[];
273
305
  reactionEmoji?: string;
274
306
  trace?: "enabled" | "disabled";
275
307
  workspaceScope?: AgentChannelWorkspaceScope;
@@ -281,7 +313,8 @@ interface AgentGitHubChannelConfig {
281
313
  webhookSecret?: string;
282
314
  appId?: string;
283
315
  privateKey?: string;
284
- allowedRepos?: string[];
316
+ allowedChannelIds?: string[];
317
+ allowedUserIds?: string[];
285
318
  /** Bot username for @-mention detection (e.g. "my-bot" or "my-bot[bot]"). */
286
319
  userName?: string;
287
320
  /** Bot's numeric GitHub user ID for self-message detection. */
@@ -300,6 +333,7 @@ interface AgentSlackChannelConfig {
300
333
  botToken?: string;
301
334
  signingSecret?: string;
302
335
  allowedChannelIds?: string[];
336
+ allowedUserIds?: string[];
303
337
  reactionEmoji?: string;
304
338
  trace?: "enabled" | "disabled";
305
339
  workspaceScope?: AgentChannelWorkspaceScope;
@@ -310,7 +344,8 @@ interface AgentDiscordChannelConfig {
310
344
  apiUrl?: string;
311
345
  botToken?: string;
312
346
  publicKey?: string;
313
- allowedGuildIds?: string[];
347
+ allowedChannelIds?: string[];
348
+ allowedUserIds?: string[];
314
349
  /** Bot's Discord user id. Set it to answer only when the agent is mentioned. */
315
350
  botUserId?: string;
316
351
  /** Role ids that count as mentioning the agent, e.g. an on-call role. */
@@ -320,6 +355,8 @@ interface AgentDiscordChannelConfig {
320
355
  [key: string]: unknown;
321
356
  }
322
357
  interface AgentPancakeChannelConfig {
358
+ allowedChannelIds?: string[];
359
+ allowedUserIds?: string[];
323
360
  id?: string;
324
361
  pageId?: string;
325
362
  pageAccessToken?: string;
@@ -330,11 +367,11 @@ interface AgentPancakeChannelConfig {
330
367
  [key: string]: unknown;
331
368
  }
332
369
  interface AgentZaloChannelConfig {
370
+ allowedChannelIds?: string[];
371
+ allowedUserIds?: string[];
333
372
  id?: string;
334
373
  botToken?: string;
335
374
  webhookSecret?: string;
336
- allowedUserIds?: string[];
337
- allowedGroupIds?: string[];
338
375
  trace?: "enabled" | "disabled";
339
376
  workspaceScope?: AgentChannelWorkspaceScope;
340
377
  [key: string]: unknown;
@@ -475,6 +512,60 @@ interface WorkspaceConfig {
475
512
  harness?: WorkspaceHarnessConfig;
476
513
  }
477
514
 
515
+ /**
516
+ * Agent policy contracts and validation.
517
+ * Runtime decisions are made by OPA using the same document/input shape.
518
+ */
519
+ declare const POLICY_ACTIONS: readonly ["agent.invoke", "tool.call", "workspace.read", "workspace.write", "workspace.exec", "subagent.run", "skill.load"];
520
+ type PolicyAction = (typeof POLICY_ACTIONS)[number];
521
+ type PolicyEffect = "allow" | "deny";
522
+ type PolicyMode = "enforce" | "audit";
523
+ type PolicyConditionOperator = "equals" | "notEquals" | "in" | "notIn" | "prefix" | "contains";
524
+ interface PolicyCondition {
525
+ attribute: string;
526
+ operator: PolicyConditionOperator;
527
+ value: string | number | boolean | string[] | number[] | boolean[];
528
+ }
529
+ interface PolicyResourceSelector {
530
+ toolNames?: string[];
531
+ toolIds?: string[];
532
+ workspaceIds?: string[];
533
+ workspaceNames?: string[];
534
+ filePaths?: string[];
535
+ subagentIds?: string[];
536
+ skillPaths?: string[];
537
+ }
538
+ interface PolicyRule {
539
+ id: string;
540
+ effect: PolicyEffect;
541
+ actions: PolicyAction[];
542
+ resources?: PolicyResourceSelector;
543
+ conditions?: PolicyCondition[];
544
+ }
545
+ interface PolicyDocument {
546
+ version: 1;
547
+ /**
548
+ * How hard this policy bites. `audit` records what it would have done and
549
+ * blocks nothing; `enforce` lets its deny rules refuse, and switches the
550
+ * places it is attached to over to default-deny. Omitted reads as `audit`,
551
+ * so a freshly written policy can never break a running agent.
552
+ */
553
+ mode?: PolicyMode;
554
+ rules: PolicyRule[];
555
+ }
556
+
557
+ /**
558
+ * Channel records: an account-scoped row per real place a team talks — one Slack
559
+ * channel, one Discord channel, one repository. It binds that place to an agent
560
+ * and adds instructions, workspaces, policies and roles scoped to it.
561
+ * Distinct from `config.channels`, which holds one adapter's credentials.
562
+ * A record narrows and adds; it never grants capability the agent lacks.
563
+ */
564
+
565
+ /** Where a reply lands: its own thread, or wherever the message came from. */
566
+ declare const CHANNEL_REPLY_TARGETS: readonly ["thread", "source"];
567
+ type ChannelReplyIn = (typeof CHANNEL_REPLY_TARGETS)[number];
568
+
478
569
  /**
479
570
  * Telegram channel adapter implementated as a ChannelAdapter.
480
571
  * Implements Telegram auth, message normalization, and reply actions through the Chat SDK Telegram adapter.
@@ -856,11 +947,11 @@ type WebSocketClientMessage = WebSocketClientExecuteMessage | WebSocketClientCon
856
947
  * the gateway, the SDK/CLI, and the dashboard. Pure types + tiny pure helpers,
857
948
  * zero runtime deps. Kept separate from the agent-test websocket-contracts.
858
949
  */
859
- type LogLevel = "INFO" | "WARN" | "ERROR";
950
+ type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR";
860
951
  declare const MAX_OBSERVABILITY_BACKFILL = 500;
861
952
  type ObservabilityLogEntry = {
862
953
  ts: number;
863
- level: LogLevel | "DEBUG";
954
+ level: LogLevel;
864
955
  eventType: string;
865
956
  message: string;
866
957
  traceId?: string;
@@ -921,6 +1012,8 @@ type ObservabilityErrorMessage = {
921
1012
  };
922
1013
  type ObservabilityServerMessage = ObservabilityReadyMessage | ObservabilityBackfillMessage | ObservabilityLogMessage | ObservabilitySpanMessage | ObservabilityErrorMessage;
923
1014
  declare function isObservabilityClientMessage(v: unknown): v is ObservabilityClientMessage;
1015
+ /** Narrow an unknown wire value to a LogLevel. */
1016
+ declare function isLogLevel(value: unknown): value is LogLevel;
924
1017
  /** Whether a span is a top-level run, each of which owns its own trace. */
925
1018
  declare function isRootSpanKind(kind: ObservabilitySpanRow["kind"]): boolean;
926
1019
 
@@ -1188,7 +1281,7 @@ interface AccountPolicy {
1188
1281
  policyId: string;
1189
1282
  name: string;
1190
1283
  description?: string;
1191
- document: AgentPolicyDocument;
1284
+ document: PolicyDocument;
1192
1285
  status: string;
1193
1286
  createdAt: string;
1194
1287
  updatedAt: string;
@@ -1223,9 +1316,8 @@ interface ChannelRecordConfig {
1223
1316
  name: string;
1224
1317
  workspaceId: string;
1225
1318
  }>;
1226
- policyIds?: string[];
1227
- /** Enforcement stage here. `audit` watches a rule before it refuses anyone. */
1228
- policyMode?: "enforce" | "audit";
1319
+ /** Added to whatever the agent already carries. Each policy holds its own mode. */
1320
+ policies?: string[];
1229
1321
  /**
1230
1322
  * Tool names withheld in this channel, applied after the tool set is built —
1231
1323
  * so it also covers sandbox tools (`bash`, `read`, …) that `config.tools`
@@ -1233,18 +1325,18 @@ interface ChannelRecordConfig {
1233
1325
  */
1234
1326
  denyTools?: string[];
1235
1327
  /**
1236
- * Where the reply lands. `inline` answers in the channel and threads only
1237
- * when the message already did. Slack only — no other provider gives the
1238
- * runtime a second place to reply.
1328
+ * Where the reply lands. `source` answers wherever the message came from, and
1329
+ * threads only when the message already did. Slack only — no other provider
1330
+ * gives the runtime a second place to reply.
1239
1331
  */
1240
- threadPolicy?: "always-thread" | "inline";
1332
+ replyIn?: ChannelReplyIn;
1241
1333
  workspaceScope?: AgentChannelWorkspaceScope;
1242
1334
  /** Images the agent may stand a sandbox up from for a thread here. */
1243
1335
  sandboxImages?: string[];
1244
- /** Named groups of people, readable from policy conditions as `actorRoles`. */
1336
+ /** Named groups of people, readable from policy conditions as `userRoles`. */
1245
1337
  tagRoles?: Array<{
1246
1338
  roleId: string;
1247
- actorIds: string[];
1339
+ userIds: string[];
1248
1340
  }>;
1249
1341
  }
1250
1342
  /** The stage a tool belongs to. Tools with the same name in two stages are two tools. */
@@ -1453,14 +1545,14 @@ declare class BroodsAccountClient {
1453
1545
  createPolicy(input: {
1454
1546
  name: string;
1455
1547
  description?: string;
1456
- document: AgentPolicyDocument;
1548
+ document: PolicyDocument;
1457
1549
  }): Promise<AccountPolicy>;
1458
1550
  getPolicy(policyId: string): Promise<AccountPolicy | null>;
1459
1551
  /** PATCH a policy. `description: null` clears it. Returns null when the policy is gone. */
1460
1552
  updatePolicy(policyId: string, patch: {
1461
1553
  name?: string;
1462
1554
  description?: string | null;
1463
- document?: AgentPolicyDocument;
1555
+ document?: PolicyDocument;
1464
1556
  status?: string;
1465
1557
  }): Promise<AccountPolicy | null>;
1466
1558
  deletePolicy(policyId: string): Promise<boolean>;
@@ -1596,7 +1688,7 @@ declare function toWebSocketBaseUrl(url: string): string;
1596
1688
 
1597
1689
  declare const RESOURCE_MARKER: unique symbol;
1598
1690
  declare const CONFIG_MARKER: unique symbol;
1599
- declare const CHANNEL_MARKER: unique symbol;
1691
+ declare const CONNECTION_MARKER: unique symbol;
1600
1692
  interface EnvRef<Name extends string = string> {
1601
1693
  readonly __beeblastEnv: true;
1602
1694
  readonly name: Name;
@@ -1703,46 +1795,148 @@ interface ToolDefinitionConfig<Input = Record<string, unknown>> {
1703
1795
  */
1704
1796
  defaultConfig?: Record<string, unknown>;
1705
1797
  }
1706
- type PolicyDefinitionConfig = Omit<AgentPolicyDocument, "version"> & {
1707
- version?: AgentPolicyDocument["version"];
1798
+ type PolicyDefinitionConfig = Omit<PolicyDocument, "version"> & {
1799
+ version?: PolicyDocument["version"];
1708
1800
  };
1709
1801
  type ChannelType = "telegram" | "github" | "slack" | "discord" | "pancake" | "zalo";
1710
- interface ChannelDefinition<Type extends ChannelType, Config> {
1711
- readonly [CHANNEL_MARKER]: true;
1712
- readonly kind: "channel";
1802
+ /**
1803
+ * A connection is one app install: the credentials an agent needs before a
1804
+ * provider can reach it at all. Channels point at a connection; a connection
1805
+ * never points back, which is what keeps the reference graph acyclic.
1806
+ */
1807
+ interface ConnectionDefinition<Type extends ChannelType, Config> {
1808
+ readonly [CONNECTION_MARKER]: true;
1809
+ readonly kind: "connection";
1713
1810
  readonly type: Type;
1714
- readonly workspaceScope?: AgentChannelWorkspaceScope;
1715
- readonly config: Config;
1811
+ readonly partition?: ChannelPartition;
1812
+ /** `partition` is lifted out of the authored input, so it is not in here. */
1813
+ readonly config: Omit<Config, "partition">;
1716
1814
  }
1815
+ /**
1816
+ * How an attached partitioned workspace splits its folders for runs arriving
1817
+ * through this door. `shared` mounts the workspace root; `conversation` mounts
1818
+ * a private child folder per thread, issue or chat under `alias`.
1819
+ */
1820
+ type ChannelPartition = {
1821
+ by: "shared";
1822
+ alias?: never;
1823
+ } | {
1824
+ by: "conversation";
1825
+ alias: string;
1826
+ };
1827
+ /**
1828
+ * An agent bound to a channel. Every bound agent runs when a message arrives;
1829
+ * `reply: false` runs it with a silenced channel, so it can work without
1830
+ * speaking in the room.
1831
+ */
1832
+ type ChannelAgentInput = AgentResource | {
1833
+ agent: AgentResource;
1834
+ reply?: boolean;
1835
+ };
1717
1836
  type RequiredChannelKeys<Config, Keys extends keyof Config> = Required<Pick<Config, Keys>> & Omit<Config, Keys>;
1718
1837
  type ChannelSecret = string | EnvRef | undefined;
1719
- type ChannelIdentityInput = {
1838
+ type ConnectionIdentityInput = {
1839
+ /** Include the dashboard trace link in channel replies. Off by default. */
1720
1840
  trace?: "enabled" | "disabled";
1721
- workspaceScope?: AgentChannelWorkspaceScope;
1841
+ partition?: ChannelPartition;
1842
+ /**
1843
+ * Rooms this connection answers in, on top of every channel declared against
1844
+ * it. Use `["*"]` to answer everywhere instead, which is the only reason to
1845
+ * name rooms here at all: a room with rules belongs in a channel resource.
1846
+ */
1847
+ allowedChannelIds?: readonly string[];
1848
+ /** Provider user ids allowed to trigger the agent. `["*"]` or omitted is everyone. */
1849
+ allowedUserIds?: readonly string[];
1722
1850
  };
1723
- type TelegramChannelInput = EnvRefString<RequiredChannelKeys<Pick<AgentTelegramChannelConfig, "apiUrl" | "botToken" | "webhookSecret" | "allowedChatIds" | "reactionEmoji">, "botToken" | "webhookSecret" | "allowedChatIds">> & ChannelIdentityInput;
1724
- type GitHubChannelInput = EnvRefString<RequiredChannelKeys<Pick<AgentGitHubChannelConfig, "apiUrl" | "webhookSecret" | "appId" | "privateKey" | "allowedRepos" | "userName" | "botUserId" | "triggerOnIssueOpen" | "triggerOnPROpen">, "webhookSecret" | "appId" | "privateKey">> & ChannelIdentityInput;
1725
- type SlackChannelInput = EnvRefString<RequiredChannelKeys<Pick<AgentSlackChannelConfig, "apiUrl" | "botToken" | "signingSecret" | "allowedChannelIds" | "reactionEmoji">, "botToken" | "signingSecret">> & ChannelIdentityInput;
1726
- type DiscordChannelInput = EnvRefString<RequiredChannelKeys<Pick<AgentDiscordChannelConfig, "apiUrl" | "botToken" | "publicKey" | "allowedGuildIds" | "botUserId" | "mentionRoleIds">, "botToken" | "publicKey">> & ChannelIdentityInput;
1727
- interface PancakeChannelInput extends ChannelIdentityInput {
1851
+ type TelegramConnectionInput = EnvRefString<RequiredChannelKeys<Pick<AgentTelegramChannelConfig, "apiUrl" | "botToken" | "webhookSecret" | "reactionEmoji">, "botToken" | "webhookSecret">> & ConnectionIdentityInput;
1852
+ type GitHubConnectionInput = EnvRefString<RequiredChannelKeys<Pick<AgentGitHubChannelConfig, "apiUrl" | "webhookSecret" | "appId" | "privateKey" | "userName" | "botUserId" | "triggerOnIssueOpen" | "triggerOnPROpen">, "webhookSecret" | "appId" | "privateKey">> & ConnectionIdentityInput;
1853
+ type SlackConnectionInput = EnvRefString<RequiredChannelKeys<Pick<AgentSlackChannelConfig, "apiUrl" | "botToken" | "signingSecret" | "reactionEmoji">, "botToken" | "signingSecret">> & ConnectionIdentityInput;
1854
+ type DiscordConnectionInput = EnvRefString<RequiredChannelKeys<Pick<AgentDiscordChannelConfig, "apiUrl" | "botToken" | "publicKey" | "botUserId" | "mentionRoleIds">, "botToken" | "publicKey">> & ConnectionIdentityInput;
1855
+ interface PancakeConnectionInput extends ConnectionIdentityInput {
1728
1856
  pageId: ChannelSecret;
1729
1857
  pageAccessToken: ChannelSecret;
1730
1858
  webhookSecret: ChannelSecret;
1731
1859
  senderId?: string | EnvRef;
1732
1860
  }
1733
- interface ZaloChannelInput extends ChannelIdentityInput {
1861
+ interface ZaloConnectionInput extends ConnectionIdentityInput {
1734
1862
  botToken: ChannelSecret;
1735
1863
  webhookSecret: ChannelSecret;
1736
- allowedUserIds?: readonly (string | EnvRef)[];
1737
- allowedGroupIds?: readonly (string | EnvRef)[];
1738
- }
1739
- type TelegramChannelDefinition = ChannelDefinition<"telegram", TelegramChannelInput>;
1740
- type GitHubChannelDefinition = ChannelDefinition<"github", GitHubChannelInput>;
1741
- type SlackChannelDefinition = ChannelDefinition<"slack", SlackChannelInput>;
1742
- type DiscordChannelDefinition = ChannelDefinition<"discord", DiscordChannelInput>;
1743
- type PancakeChannelDefinition = ChannelDefinition<"pancake", PancakeChannelInput>;
1744
- type ZaloChannelDefinition = ChannelDefinition<"zalo", ZaloChannelInput>;
1745
- type AnyChannelDefinition = TelegramChannelDefinition | GitHubChannelDefinition | SlackChannelDefinition | DiscordChannelDefinition | PancakeChannelDefinition | ZaloChannelDefinition;
1864
+ }
1865
+ type TelegramConnectionDefinition = ConnectionDefinition<"telegram", TelegramConnectionInput>;
1866
+ type GitHubConnectionDefinition = ConnectionDefinition<"github", GitHubConnectionInput>;
1867
+ type SlackConnectionDefinition = ConnectionDefinition<"slack", SlackConnectionInput>;
1868
+ type DiscordConnectionDefinition = ConnectionDefinition<"discord", DiscordConnectionInput>;
1869
+ type PancakeConnectionDefinition = ConnectionDefinition<"pancake", PancakeConnectionInput>;
1870
+ type ZaloConnectionDefinition = ConnectionDefinition<"zalo", ZaloConnectionInput>;
1871
+ type AnyConnectionDefinition = TelegramConnectionDefinition | GitHubConnectionDefinition | SlackConnectionDefinition | DiscordConnectionDefinition | PancakeConnectionDefinition | ZaloConnectionDefinition;
1872
+ /**
1873
+ * One real place a team talks: a Slack channel, a Discord channel, a repo. It
1874
+ * narrows and adds — instructions append, policies union, tools and workspaces
1875
+ * only narrow — and never grants what a bound agent lacks. It names the
1876
+ * connection it belongs to, so `platform` is never written by hand.
1877
+ */
1878
+ type ChannelDefinitionConfig = {
1879
+ connection: AnyConnectionDefinition;
1880
+ /** Provider id of the place, from the per-platform field on the input. */
1881
+ externalId: string;
1882
+ /** Team, guild or repo owner the place sits in, when the provider has one. */
1883
+ workspaceRef?: string;
1884
+ /** Every one of these runs. Omit and the connection's own agent answers. */
1885
+ agents?: readonly ChannelAgentInput[];
1886
+ /** Appended after each agent's own system prompt, never replacing it. */
1887
+ instructions?: string;
1888
+ /** Selects from what the agent already attaches; anything else is dropped. */
1889
+ workspaces?: readonly AgentWorkspaceInput[];
1890
+ /** Added to whatever the agent already carries. Each policy holds its own mode. */
1891
+ policies?: readonly (PolicyResource | string)[];
1892
+ denyTools?: readonly string[];
1893
+ /** Where the reply lands. Slack only. */
1894
+ replyIn?: ChannelReplyIn;
1895
+ partition?: ChannelPartition;
1896
+ sandboxImages?: readonly string[];
1897
+ tagRoles?: readonly {
1898
+ roleId: string;
1899
+ userIds: readonly string[];
1900
+ }[];
1901
+ };
1902
+ /** Rules shared by every channel, whatever the provider calls its rooms. */
1903
+ type ChannelRulesInput = Omit<ChannelDefinitionConfig, "connection" | "externalId" | "workspaceRef" | "replyIn">;
1904
+ type SlackChannelInput = ChannelRulesInput & {
1905
+ connection: SlackConnectionDefinition;
1906
+ /** Slack channel id, e.g. "C0123ABCD". */
1907
+ channelId: string;
1908
+ /** Slack team id the channel sits in. */
1909
+ teamId?: string;
1910
+ /** Where the reply lands. Slack is the only provider with a choice. */
1911
+ replyIn?: ChannelReplyIn;
1912
+ };
1913
+ type DiscordChannelInput = ChannelRulesInput & {
1914
+ connection: DiscordConnectionDefinition;
1915
+ /** Discord channel id (a snowflake). */
1916
+ channelId: string;
1917
+ /** Guild the channel sits in. */
1918
+ guildId?: string;
1919
+ };
1920
+ type GitHubChannelInput = ChannelRulesInput & {
1921
+ connection: GitHubConnectionDefinition;
1922
+ /** Repository full name, e.g. "beeblast/api". */
1923
+ repo: string;
1924
+ };
1925
+ type TelegramChannelInput = ChannelRulesInput & {
1926
+ connection: TelegramConnectionDefinition;
1927
+ /** Telegram chat id, e.g. "-1001234567". */
1928
+ chatId: string;
1929
+ };
1930
+ type ZaloChannelInput = ChannelRulesInput & {
1931
+ connection: ZaloConnectionDefinition;
1932
+ /** Zalo user or group chat id. */
1933
+ chatId: string;
1934
+ };
1935
+ type PancakeChannelInput = ChannelRulesInput & {
1936
+ connection: PancakeConnectionDefinition;
1937
+ /** Pancake conversation id. */
1938
+ conversationId: string;
1939
+ };
1746
1940
  /**
1747
1941
  * Per-agent workspace mount with an optional sandbox override. A bare
1748
1942
  * `defineWorkspace(...)` inherits the agent-level sandbox; the object form lets
@@ -1890,9 +2084,6 @@ interface AgentHooks {
1890
2084
  text?: string;
1891
2085
  }>;
1892
2086
  }
1893
- type AgentPolicyDefinitionConfig = Omit<AgentPolicyConfig, "policyIds"> & {
1894
- policies?: readonly (PolicyResource | string)[];
1895
- };
1896
2087
  /**
1897
2088
  * Code-first agent config surface. Built from an explicit `Pick` of `AgentConfig`
1898
2089
  * (not `Omit`) so the SDK input type does NOT inherit `AgentConfig`'s
@@ -1902,26 +2093,18 @@ type AgentPolicyDefinitionConfig = Omit<AgentPolicyConfig, "policyIds"> & {
1902
2093
  * gains a new top-level field that should be code-definable.
1903
2094
  */
1904
2095
  /**
1905
- * SDK-facing model-provider constructor settings. Written as an explicit
1906
- * interface — NOT `EnvRefString<AgentProviderSettings>` — because TypeScript
1907
- * suppresses excess-property checks through mapped types, which would let a
1908
- * typo like the camel `baseUrl` (instead of `base_url`/`baseURL`) slip past
1909
- * `tsc`. Keep the keys in lockstep with core's `AgentProviderSettings`; the
1910
- * `_ProviderKeyParity` assertion below fails `broods check` if they drift.
1911
- * Every string field also accepts an `env("NAME")` reference.
2096
+ * SDK-facing model-provider constructor settings. Open by design: everything a
2097
+ * provider's Vercel AI SDK factory accepts is forwarded verbatim, so there is no
2098
+ * key list to keep in sync. Only the keys broods reads itself are named (and so
2099
+ * typo-checked at run time by `validateProviderConfig`); every string field also
2100
+ * accepts an `env("NAME")` reference.
1912
2101
  */
1913
2102
  interface ProviderSettingsInput {
1914
2103
  apiKey?: string | EnvRef;
1915
2104
  base_url?: string | EnvRef;
1916
2105
  baseURL?: string | EnvRef;
1917
2106
  headers?: Record<string, string | EnvRef>;
1918
- organization?: string | EnvRef;
1919
- project?: string | EnvRef;
1920
- name?: string | EnvRef;
1921
- region?: string | EnvRef;
1922
- accessKeyId?: string | EnvRef;
1923
- secretAccessKey?: string | EnvRef;
1924
- sessionToken?: string | EnvRef;
2107
+ [key: string]: unknown;
1925
2108
  }
1926
2109
  /** Per-provider settings; provider names stay synced with core's `AgentConfig`. */
1927
2110
  type ProviderConfigInput = Partial<Record<keyof NonNullable<AgentConfig["provider"]>, ProviderSettingsInput>>;
@@ -1932,12 +2115,13 @@ type AgentDefinitionConfig = EnvRefString<Pick<AgentConfig, "agent" | "model" |
1932
2115
  hooks?: AgentHooks & {
1933
2116
  webhooks?: readonly EnvRefString<AgentWebhookHookConfig>[];
1934
2117
  };
1935
- channels?: readonly AnyChannelDefinition[];
2118
+ connections?: readonly AnyConnectionDefinition[];
1936
2119
  sandbox?: SandboxResource | string;
1937
2120
  workspaces?: readonly AgentWorkspaceInput[];
1938
2121
  subagent?: AgentSubagentDefinitionConfig;
1939
2122
  skills?: AgentSkillsDefinitionConfig;
1940
- policy?: AgentPolicyDefinitionConfig;
2123
+ /** Policies that gate this agent. Each one carries its own enforcement mode. */
2124
+ policies?: readonly (PolicyResource | string)[];
1941
2125
  /**
1942
2126
  * Opt the agent into the public runtime endpoint (SSE/WebSocket via the
1943
2127
  * stage runtime key). Off by default — secured: when unset the public
@@ -1949,45 +2133,24 @@ type AgentDefinitionConfig = EnvRefString<Pick<AgentConfig, "agent" | "model" |
1949
2133
  type CronDefinitionConfig = Omit<CreateCronInput, "agentId" | "name"> & {
1950
2134
  agent: AgentResource | string;
1951
2135
  };
2136
+ type AgentResource<Name extends string = string> = ResourceDefinition<"agent", Name, AgentDefinitionConfig>;
1952
2137
  /**
1953
- * Binds one real place — a Slack channel, a Discord channel, a repo — to the
1954
- * agent that answers there. Distinct from `channels` on an agent, which carries
1955
- * one adapter's credentials: those say how to reach Slack, this says who replies
1956
- * in #product-eng. A record narrows and adds, never granting what the agent lacks.
2138
+ * Code-first workspace config. Says `partitioned` where storage says
2139
+ * `isolation`: the flag permits a split, it does not perform one — a channel's
2140
+ * `partition` decides which folder a run actually mounts.
1957
2141
  */
1958
- type ChannelRecordDefinitionConfig = {
1959
- platform: ChannelType;
1960
- /** Provider id of the place: a Slack channel id, or an owner/repo. */
1961
- externalId: string;
1962
- /** Team or guild the place sits in, when the provider has one. */
1963
- workspaceRef?: string;
1964
- /** Who answers here. The first is the default when a turn matches no other. */
1965
- agents: readonly (AgentResource | string)[];
1966
- /** Appended after the bound agent's own system prompt. */
1967
- instructions?: string;
1968
- /** Selects from what the agent already attaches; anything else is dropped. */
1969
- workspaces?: readonly AgentWorkspaceInput[];
1970
- policies?: readonly (PolicyResource | string)[];
1971
- policyMode?: AgentPolicyConfig["mode"];
1972
- denyTools?: readonly string[];
1973
- /** Where the reply lands. Slack only — see the channel-records docs. */
1974
- threadPolicy?: "always-thread" | "inline";
1975
- workspaceScope?: AgentChannelWorkspaceScope;
1976
- sandboxImages?: readonly string[];
1977
- tagRoles?: readonly {
1978
- roleId: string;
1979
- actorIds: readonly string[];
1980
- }[];
2142
+ type WorkspaceDefinitionConfig = Omit<WorkspaceConfig, "isolation"> & {
2143
+ /** Allow this workspace to be split into per-conversation folders. */
2144
+ partitioned?: boolean;
1981
2145
  };
1982
- type AgentResource<Name extends string = string> = ResourceDefinition<"agent", Name, AgentDefinitionConfig>;
1983
- type WorkspaceResource<Name extends string = string> = ResourceDefinition<"workspace", Name, WorkspaceConfig>;
2146
+ type WorkspaceResource<Name extends string = string> = ResourceDefinition<"workspace", Name, WorkspaceDefinitionConfig>;
1984
2147
  type SandboxResource<Name extends string = string> = ResourceDefinition<"sandbox", Name, SandboxDefinitionConfig>;
1985
2148
  type SkillResource<Name extends string = string> = ResourceDefinition<"skill", Name, SkillDefinitionConfig>;
1986
2149
  type ToolResource<Name extends string = string> = ResourceDefinition<"tool", Name, ToolDefinitionConfig>;
1987
2150
  type PolicyResource<Name extends string = string> = ResourceDefinition<"policy", Name, PolicyDefinitionConfig>;
1988
2151
  type CronResource<Name extends string = string> = ResourceDefinition<"cron", Name, CronDefinitionConfig>;
1989
- type ChannelRecordResource<Name extends string = string> = ResourceDefinition<"channelRecord", Name, ChannelRecordDefinitionConfig>;
1990
- type AnyResource = AgentResource | WorkspaceResource | SandboxResource | CronResource | SkillResource | ToolResource | PolicyResource | ChannelRecordResource;
2152
+ type ChannelResource<Name extends string = string> = ResourceDefinition<"channelRecord", Name, ChannelDefinitionConfig>;
2153
+ type AnyResource = AgentResource | WorkspaceResource | SandboxResource | CronResource | SkillResource | ToolResource | PolicyResource | ChannelResource;
1991
2154
  /**
1992
2155
  * References an account/environment variable resolved on the SERVER at runtime —
1993
2156
  * set it with `broods env set <NAME>` or in the dashboard (the Convex-style
@@ -2001,27 +2164,32 @@ type AnyResource = AgentResource | WorkspaceResource | SandboxResource | CronRes
2001
2164
  * bake the literal local value into the deployed config instead of deferring it.
2002
2165
  */
2003
2166
  declare const env: EnvAccessor;
2004
- declare function defineTelegramChannel(config: TelegramChannelInput): TelegramChannelDefinition;
2005
- declare function defineGitHubChannel(config: GitHubChannelInput): GitHubChannelDefinition;
2006
- declare function defineSlackChannel(config: SlackChannelInput): SlackChannelDefinition;
2007
- declare function defineDiscordChannel(config: DiscordChannelInput): DiscordChannelDefinition;
2008
- declare function definePancakeChannel(config: PancakeChannelInput): PancakeChannelDefinition;
2009
- declare function defineZaloChannel(config: ZaloChannelInput): ZaloChannelDefinition;
2167
+ declare function defineDiscordConnection(config: DiscordConnectionInput): DiscordConnectionDefinition;
2168
+ declare function defineGitHubConnection(config: GitHubConnectionInput): GitHubConnectionDefinition;
2169
+ declare function definePancakeConnection(config: PancakeConnectionInput): PancakeConnectionDefinition;
2170
+ declare function defineSlackConnection(config: SlackConnectionInput): SlackConnectionDefinition;
2171
+ declare function defineTelegramConnection(config: TelegramConnectionInput): TelegramConnectionDefinition;
2172
+ declare function defineZaloConnection(config: ZaloConnectionInput): ZaloConnectionDefinition;
2173
+ declare function defineDiscordChannel<const Name extends string>(input: ResourceInput<Name, DiscordChannelInput>): ChannelResource<Name>;
2174
+ declare function defineGitHubChannel<const Name extends string>(input: ResourceInput<Name, GitHubChannelInput>): ChannelResource<Name>;
2175
+ declare function definePancakeChannel<const Name extends string>(input: ResourceInput<Name, PancakeChannelInput>): ChannelResource<Name>;
2176
+ declare function defineSlackChannel<const Name extends string>(input: ResourceInput<Name, SlackChannelInput>): ChannelResource<Name>;
2177
+ declare function defineTelegramChannel<const Name extends string>(input: ResourceInput<Name, TelegramChannelInput>): ChannelResource<Name>;
2178
+ declare function defineZaloChannel<const Name extends string>(input: ResourceInput<Name, ZaloChannelInput>): ChannelResource<Name>;
2010
2179
  declare function defineBroods(config: BroodsProjectConfig): BroodsConfigDefinition;
2011
2180
  declare function defineAgent<const Name extends string>(input: ResourceInput<Name, AgentDefinitionConfig>): AgentResource<Name>;
2012
2181
  declare function defineHarness<const Definition extends HarnessDefinition>(definition: Definition): Definition;
2013
- declare function defineWorkspace<const Name extends string>(input: ResourceInput<Name, WorkspaceConfig>): WorkspaceResource<Name>;
2182
+ declare function defineWorkspace<const Name extends string>(input: ResourceInput<Name, WorkspaceDefinitionConfig>): WorkspaceResource<Name>;
2014
2183
  declare function defineSandbox<const Name extends string>(input: ResourceInput<Name, SandboxDefinitionConfig>): SandboxResource<Name>;
2015
2184
  declare function defineSkill<const Name extends string>(input: ResourceInput<Name, SkillDefinitionConfig>): SkillResource<Name>;
2016
2185
  declare function defineTool<const Name extends string, Input = Record<string, unknown>>(input: {
2017
2186
  name: Name;
2018
2187
  } & ToolDefinitionConfig<Input>): ToolResource<Name>;
2019
2188
  declare function definePolicy<const Name extends string>(input: ResourceInput<Name, PolicyDefinitionConfig>): PolicyResource<Name>;
2020
- declare function defineChannelRecord<const Name extends string>(input: ResourceInput<Name, ChannelRecordDefinitionConfig>): ChannelRecordResource<Name>;
2021
2189
  declare function defineCron<const Name extends string>(input: ResourceInput<Name, CronDefinitionConfig>): CronResource<Name>;
2022
2190
  declare function isResource(value: unknown): value is AnyResource;
2023
- declare function isChannelDefinition(value: unknown): value is AnyChannelDefinition;
2191
+ declare function isConnectionDefinition(value: unknown): value is AnyConnectionDefinition;
2024
2192
  declare function isBroodsConfig(value: unknown): value is BroodsConfigDefinition;
2025
2193
 
2026
- export { BroodsAccountApiError, BroodsAccountClient, BroodsClient, BroodsWebSocketClient, DEFAULT_CORE_BASE_URL, IngressAcceptedError, MAX_OBSERVABILITY_BACKFILL, BroodsWebSocketClient as WebSocketClient, BroodsWebSocketClient as WebsocketClient, defineAgent, defineBroods, defineChannelRecord, defineCron, defineDiscordChannel, defineGitHubChannel, defineHarness, definePancakeChannel, definePolicy, defineSandbox, defineSkill, defineSlackChannel, defineTelegramChannel, defineTool, defineWorkspace, defineZaloChannel, env, envPlaceholder, isBroodsConfig, isChannelDefinition, isObservabilityClientMessage, isResource, isRootSpanKind, normalizeHttpServiceUrl, readSseStream, resolveRunEvents, toWebSocketBaseUrl };
2027
- export type { Account, AccountAgent, AccountChannel, AccountEnvVar, AccountPolicy, AccountSandbox, AccountTool, AccountWorkspace, Agent, AgentChannelWorkspaceScope, AgentChannelsConfig, AgentCodeHookConfig, AgentConfig, AgentConfigDoc, AgentDefinitionConfig, AgentDiscordChannelConfig, AgentGitHubChannelConfig, AgentHandle, AgentHookEventName, AgentHooks, AgentHooksConfig, AgentPancakeChannelConfig, AgentPolicyConfig, AgentPolicyDefinitionConfig, AgentPolicyDocument, AgentProviderSettings, AgentReference, AgentResource, AgentRunEventInput, AgentRunInput, AgentRunModelOverrides, AgentRunOverrides, AgentRunResult, AgentSkillsDefinitionConfig, AgentSlackChannelConfig, AgentStreamPart, AgentSubagentDefinitionConfig, AgentTelegramChannelConfig, AgentWebhookHookConfig, AgentWorkspaceInput, AgentWorkspaceRef, AgentWorkspaceRefInput, AgentZaloChannelConfig, AnyChannelDefinition, AnyResource, AsyncAgentRun, AsyncPollOptions, AsyncRequestAccepted, AsyncStatus, BroodsAccount, BroodsAccountClientOptions, BroodsClientOptions, BroodsConfigDefinition, BroodsProjectConfig, BroodsWebSocketClientOptions, ChannelDefinition, ChannelMessageReceived, ChannelRecordConfig, ChannelRecordDefinitionConfig, ChannelRecordResource, ChannelReference, ChannelType, CliManifest, CliManifestResource, CliResourceKind, CreateAgentResult, CreateClientCronInput, CreateCronInput, CreateToolInput, Cron, CronDefinitionConfig, CronDoc, CronLastStatus, CronResource, CronRun, CronStatus, CustomTool, DeleteAccountResult, DiscordChannelDefinition, DiscordChannelInput, DiscordMessageSource, DiscordSource, Doc, EnvAccessor, EnvRef, EnvRefString, GeneratedIds, GitHubChannelDefinition, GitHubChannelInput, GitHubMessageSource, GitHubSource, HarnessDefinition, HarnessType, HookContext, Id, IngressMode, IngressStatus, LogLevel, ObservabilityBackfillMessage, ObservabilityClientMessage, ObservabilityErrorMessage, ObservabilityLogEntry, ObservabilityLogMessage, ObservabilityReadyMessage, ObservabilityServerMessage, ObservabilitySpanMessage, ObservabilitySpanRow, ObservabilitySubscribeMessage, ObservabilityUnsubscribeMessage, PancakeChannelDefinition, PancakeChannelInput, PancakeMessageSource, PancakeSource, PolicyDefinitionConfig, PolicyResource, ProjectDoc, ProviderConfigInput, ProviderSettingsInput, ResourceApi, ResourceDefinition, ResourceInput, ResourceKind, RotateSecretResult, Sandbox, SandboxConfig, SandboxConfigDoc, SandboxDefinitionConfig, SandboxLifecycleResult, SandboxResource, SandboxSnapshotResult, SandboxTerminalTicket, Skill, SkillDefinitionConfig, SkillResource, SkillUploadInput, SlackChannelDefinition, SlackChannelInput, SlackMessageSource, SlackSource, StageDoc, TelegramChannelDefinition, TelegramChannelInput, TelegramMessageSource, TelegramSource, ToolApprovalSummary, ToolDefinitionConfig, ToolExecuteContext, ToolExecuteOptions, ToolResource, ToolScope, UpdateAgentInput, UpdateCronInput, UpdateToolInput, WebSocketAttachInput, WebSocketClientAttachMessage, WebSocketClientCancelMessage, WebSocketClientControlMessage, WebSocketClientExecuteMessage, WebSocketClientMessage, WebSocketConstructorLike, WebSocketHandlers, WebSocketLike, WebSocketOutputMessage, WebSocketRunInput, WebSocketServerMessage, WebSocketStreamMessage, WebSocketSubscription, Workspace, WorkspaceConfig, WorkspaceConfigDoc, WorkspaceFileEntry, WorkspaceResource, ZaloChannelDefinition, ZaloChannelInput, ZaloMessageSource, ZaloSource };
2194
+ export { BroodsAccountApiError, BroodsAccountClient, BroodsClient, BroodsWebSocketClient, DEFAULT_CORE_BASE_URL, IngressAcceptedError, MAX_OBSERVABILITY_BACKFILL, BroodsWebSocketClient as WebSocketClient, BroodsWebSocketClient as WebsocketClient, defineAgent, defineBroods, defineCron, defineDiscordChannel, defineDiscordConnection, defineGitHubChannel, defineGitHubConnection, defineHarness, definePancakeChannel, definePancakeConnection, definePolicy, defineSandbox, defineSkill, defineSlackChannel, defineSlackConnection, defineTelegramChannel, defineTelegramConnection, defineTool, defineWorkspace, defineZaloChannel, defineZaloConnection, env, envPlaceholder, isBroodsConfig, isConnectionDefinition, isLogLevel, isObservabilityClientMessage, isResource, isRootSpanKind, normalizeHttpServiceUrl, readSseStream, resolveRunEvents, toWebSocketBaseUrl };
2195
+ export type { Account, AccountAgent, AccountChannel, AccountEnvVar, AccountPolicy, AccountSandbox, AccountTool, AccountWorkspace, Agent, AgentChannelWorkspaceScope, AgentChannelsConfig, AgentCodeHookConfig, AgentConfig, AgentConfigDoc, AgentDefinitionConfig, AgentDiscordChannelConfig, AgentGitHubChannelConfig, AgentHandle, AgentHookEventName, AgentHooks, AgentHooksConfig, AgentPancakeChannelConfig, AgentProviderSettings, AgentReference, AgentResource, AgentRunEventInput, AgentRunInput, AgentRunModelOverrides, AgentRunOverrides, AgentRunResult, AgentSkillsDefinitionConfig, AgentSlackChannelConfig, AgentStreamPart, AgentSubagentDefinitionConfig, AgentTelegramChannelConfig, AgentWebhookHookConfig, AgentWorkspaceInput, AgentWorkspaceRef, AgentWorkspaceRefInput, AgentZaloChannelConfig, AnyConnectionDefinition, AnyResource, AsyncAgentRun, AsyncPollOptions, AsyncRequestAccepted, AsyncStatus, BroodsAccount, BroodsAccountClientOptions, BroodsClientOptions, BroodsConfigDefinition, BroodsProjectConfig, BroodsWebSocketClientOptions, ChannelAgentInput, ChannelDefinitionConfig, ChannelMessageReceived, ChannelPartition, ChannelRecordConfig, ChannelReference, ChannelReplyIn, ChannelResource, ChannelType, CliManifest, CliManifestResource, CliResourceKind, ConnectionDefinition, CreateAgentResult, CreateClientCronInput, CreateCronInput, CreateToolInput, Cron, CronDefinitionConfig, CronDoc, CronLastStatus, CronResource, CronRun, CronStatus, CustomTool, DeleteAccountResult, DiscordChannelInput, DiscordConnectionDefinition, DiscordConnectionInput, DiscordMessageSource, DiscordSource, Doc, EnvAccessor, EnvRef, EnvRefString, GeneratedIds, GitHubChannelInput, GitHubConnectionDefinition, GitHubConnectionInput, GitHubMessageSource, GitHubSource, HarnessDefinition, HarnessType, HookContext, Id, IngressMode, IngressStatus, LogLevel, ObservabilityBackfillMessage, ObservabilityClientMessage, ObservabilityErrorMessage, ObservabilityLogEntry, ObservabilityLogMessage, ObservabilityReadyMessage, ObservabilityServerMessage, ObservabilitySpanMessage, ObservabilitySpanRow, ObservabilitySubscribeMessage, ObservabilityUnsubscribeMessage, PancakeChannelInput, PancakeConnectionDefinition, PancakeConnectionInput, PancakeMessageSource, PancakeSource, PolicyDefinitionConfig, PolicyDocument, PolicyResource, ProjectDoc, ProviderConfigInput, ProviderSettingsInput, ResourceApi, ResourceDefinition, ResourceInput, ResourceKind, RotateSecretResult, Sandbox, SandboxConfig, SandboxConfigDoc, SandboxDefinitionConfig, SandboxLifecycleResult, SandboxResource, SandboxSnapshotResult, SandboxTerminalTicket, Skill, SkillDefinitionConfig, SkillResource, SkillUploadInput, SlackChannelInput, SlackConnectionDefinition, SlackConnectionInput, SlackMessageSource, SlackSource, StageDoc, TelegramChannelInput, TelegramConnectionDefinition, TelegramConnectionInput, TelegramMessageSource, TelegramSource, ToolApprovalSummary, ToolDefinitionConfig, ToolExecuteContext, ToolExecuteOptions, ToolResource, ToolScope, UpdateAgentInput, UpdateCronInput, UpdateToolInput, WebSocketAttachInput, WebSocketClientAttachMessage, WebSocketClientCancelMessage, WebSocketClientControlMessage, WebSocketClientExecuteMessage, WebSocketClientMessage, WebSocketConstructorLike, WebSocketHandlers, WebSocketLike, WebSocketOutputMessage, WebSocketRunInput, WebSocketServerMessage, WebSocketStreamMessage, WebSocketSubscription, Workspace, WorkspaceConfig, WorkspaceConfigDoc, WorkspaceDefinitionConfig, WorkspaceFileEntry, WorkspaceResource, ZaloChannelInput, ZaloConnectionDefinition, ZaloConnectionInput, ZaloMessageSource, ZaloSource };