broods 0.17.4 → 0.19.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/index.d.ts CHANGED
@@ -288,11 +288,16 @@ interface AgentChannelsConfig {
288
288
  zalo?: AgentZaloChannelConfig;
289
289
  [key: string]: unknown;
290
290
  }
291
- type AgentChannelWorkspaceScope = {
292
- level: "channel";
291
+ /**
292
+ * How an attached partitioned workspace splits its folders for runs arriving
293
+ * through this door. `shared` mounts the workspace root; `conversation` mounts
294
+ * a private child folder per thread, issue or chat under `alias`.
295
+ */
296
+ type ChannelPartition = {
297
+ by: "shared";
293
298
  alias?: never;
294
299
  } | {
295
- level: "conversation";
300
+ by: "conversation";
296
301
  alias: string;
297
302
  };
298
303
  interface AgentTelegramChannelConfig {
@@ -304,7 +309,7 @@ interface AgentTelegramChannelConfig {
304
309
  allowedUserIds?: string[];
305
310
  reactionEmoji?: string;
306
311
  trace?: "enabled" | "disabled";
307
- workspaceScope?: AgentChannelWorkspaceScope;
312
+ partition?: ChannelPartition;
308
313
  [key: string]: unknown;
309
314
  }
310
315
  interface AgentGitHubChannelConfig {
@@ -324,7 +329,7 @@ interface AgentGitHubChannelConfig {
324
329
  /** When false, the bot does not auto-trigger on new PRs (opened/edited/reopened). Defaults to true. The bot still triggers when assigned to a PR. */
325
330
  triggerOnPROpen?: boolean;
326
331
  trace?: "enabled" | "disabled";
327
- workspaceScope?: AgentChannelWorkspaceScope;
332
+ partition?: ChannelPartition;
328
333
  [key: string]: unknown;
329
334
  }
330
335
  interface AgentSlackChannelConfig {
@@ -336,7 +341,7 @@ interface AgentSlackChannelConfig {
336
341
  allowedUserIds?: string[];
337
342
  reactionEmoji?: string;
338
343
  trace?: "enabled" | "disabled";
339
- workspaceScope?: AgentChannelWorkspaceScope;
344
+ partition?: ChannelPartition;
340
345
  [key: string]: unknown;
341
346
  }
342
347
  interface AgentDiscordChannelConfig {
@@ -351,7 +356,7 @@ interface AgentDiscordChannelConfig {
351
356
  /** Role ids that count as mentioning the agent, e.g. an on-call role. */
352
357
  mentionRoleIds?: string[];
353
358
  trace?: "enabled" | "disabled";
354
- workspaceScope?: AgentChannelWorkspaceScope;
359
+ partition?: ChannelPartition;
355
360
  [key: string]: unknown;
356
361
  }
357
362
  interface AgentPancakeChannelConfig {
@@ -363,7 +368,7 @@ interface AgentPancakeChannelConfig {
363
368
  webhookSecret?: string;
364
369
  senderId?: string;
365
370
  trace?: "enabled" | "disabled";
366
- workspaceScope?: AgentChannelWorkspaceScope;
371
+ partition?: ChannelPartition;
367
372
  [key: string]: unknown;
368
373
  }
369
374
  interface AgentZaloChannelConfig {
@@ -373,7 +378,7 @@ interface AgentZaloChannelConfig {
373
378
  botToken?: string;
374
379
  webhookSecret?: string;
375
380
  trace?: "enabled" | "disabled";
376
- workspaceScope?: AgentChannelWorkspaceScope;
381
+ partition?: ChannelPartition;
377
382
  [key: string]: unknown;
378
383
  }
379
384
 
@@ -1330,7 +1335,7 @@ interface ChannelRecordConfig {
1330
1335
  * gives the runtime a second place to reply.
1331
1336
  */
1332
1337
  replyIn?: ChannelReplyIn;
1333
- workspaceScope?: AgentChannelWorkspaceScope;
1338
+ partition?: ChannelPartition;
1334
1339
  /** Images the agent may stand a sandbox up from for a thread here. */
1335
1340
  sandboxImages?: string[];
1336
1341
  /** Named groups of people, readable from policy conditions as `userRoles`. */
@@ -1812,18 +1817,6 @@ interface ConnectionDefinition<Type extends ChannelType, Config> {
1812
1817
  /** `partition` is lifted out of the authored input, so it is not in here. */
1813
1818
  readonly config: Omit<Config, "partition">;
1814
1819
  }
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
1820
  /**
1828
1821
  * An agent bound to a channel. Every bound agent runs when a message arrives;
1829
1822
  * `reply: false` runs it with a silenced channel, so it can work without
@@ -2192,4 +2185,4 @@ declare function isConnectionDefinition(value: unknown): value is AnyConnectionD
2192
2185
  declare function isBroodsConfig(value: unknown): value is BroodsConfigDefinition;
2193
2186
 
2194
2187
  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 };
2188
+ export type { Account, AccountAgent, AccountChannel, AccountEnvVar, AccountPolicy, AccountSandbox, AccountTool, AccountWorkspace, Agent, 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 };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as O,b as R,c as L}from"./chunk-ce3yb3yz.js";import{A as _,B as U,C as B,D as H,E as K,F as P,G as j,H as G,I as F,J as z,K as Z,L as V,M as X,N as Y,O as J,P as Q,Q as ee,R as te,S as re,T as ne,d as v,e as k,p as S,q as A,r as M,s as h,t as W,u as w,v as E,w as D,x as T,y as q,z as N}from"./chunk-prg3eaft.js";import"./chunk-3cvxks4m.js";var a=500;function i(e){if(typeof e!=="object"||e===null)return!1;let t=e;if(t.type==="subscribe"){let r=t.stream;if(r!=="logs"&&r!=="traces")return!1;let n=t.backfill;if(n!==void 0&&(typeof n!=="number"||!Number.isSafeInteger(n)||n<0||n>500))return!1;if(t.liveOnly!==void 0&&typeof t.liveOnly!=="boolean")return!1;let s=t.minLevel;if(s!==void 0&&!o(s))return!1;return!0}if(t.type==="unsubscribe"){let r=t.stream;return r==="logs"||r==="traces"}return!1}function o(e){return e==="DEBUG"||e==="INFO"||e==="WARN"||e==="ERROR"}function p(e){return e==="task"||e==="cron"||e==="subtask"}export{R as BroodsAccountApiError,L as BroodsAccountClient,M as BroodsClient,W as BroodsWebSocketClient,S as DEFAULT_CORE_BASE_URL,A as IngressAcceptedError,a as MAX_OBSERVABILITY_BACKFILL,W as WebSocketClient,W as WebsocketClient,z as defineAgent,F as defineBroods,ee as defineCron,B as defineDiscordChannel,D as defineDiscordConnection,H as defineGitHubChannel,T as defineGitHubConnection,Z as defineHarness,K as definePancakeChannel,q as definePancakeConnection,Q as definePolicy,X as defineSandbox,Y as defineSkill,P as defineSlackChannel,N as defineSlackConnection,j as defineTelegramChannel,_ as defineTelegramConnection,J as defineTool,V as defineWorkspace,G as defineZaloChannel,U as defineZaloConnection,E as env,O as envPlaceholder,ne as isBroodsConfig,re as isConnectionDefinition,o as isLogLevel,i as isObservabilityClientMessage,te as isResource,p as isRootSpanKind,h as normalizeHttpServiceUrl,k as readSseStream,v as resolveRunEvents,w as toWebSocketBaseUrl};
1
+ import{a as O,b as R,c as L}from"./chunk-nq1vqmh0.js";import{A as _,B as P,C as U,D as B,E as H,F as K,G as j,H as G,I as F,J as z,K as Z,L as V,M as X,N as Y,O as J,P as Q,Q as ee,R as te,S as re,T as ne,d as v,e as k,p as S,q as A,r as M,s as h,t as w,u as W,v as E,w as D,x as T,y as q,z as N}from"./chunk-prg3eaft.js";import"./chunk-3cvxks4m.js";var a=500;function i(e){if(typeof e!=="object"||e===null)return!1;let t=e;if(t.type==="subscribe"){let r=t.stream;if(r!=="logs"&&r!=="traces")return!1;let n=t.backfill;if(n!==void 0&&(typeof n!=="number"||!Number.isSafeInteger(n)||n<0||n>500))return!1;if(t.liveOnly!==void 0&&typeof t.liveOnly!=="boolean")return!1;let s=t.minLevel;if(s!==void 0&&!o(s))return!1;return!0}if(t.type==="unsubscribe"){let r=t.stream;return r==="logs"||r==="traces"}return!1}function o(e){return e==="DEBUG"||e==="INFO"||e==="WARN"||e==="ERROR"}function p(e){return e==="task"||e==="cron"||e==="subtask"}export{R as BroodsAccountApiError,L as BroodsAccountClient,M as BroodsClient,w as BroodsWebSocketClient,S as DEFAULT_CORE_BASE_URL,A as IngressAcceptedError,a as MAX_OBSERVABILITY_BACKFILL,w as WebSocketClient,w as WebsocketClient,z as defineAgent,F as defineBroods,ee as defineCron,U as defineDiscordChannel,D as defineDiscordConnection,B as defineGitHubChannel,T as defineGitHubConnection,Z as defineHarness,H as definePancakeChannel,q as definePancakeConnection,Q as definePolicy,X as defineSandbox,Y as defineSkill,K as defineSlackChannel,N as defineSlackConnection,j as defineTelegramChannel,_ as defineTelegramConnection,J as defineTool,V as defineWorkspace,G as defineZaloChannel,P as defineZaloConnection,E as env,O as envPlaceholder,ne as isBroodsConfig,re as isConnectionDefinition,o as isLogLevel,i as isObservabilityClientMessage,te as isResource,p as isRootSpanKind,h as normalizeHttpServiceUrl,k as readSseStream,v as resolveRunEvents,W as toWebSocketBaseUrl};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "broods",
3
- "version": "0.17.4",
3
+ "version": "0.19.0",
4
4
  "description": "CLI + TypeScript SDK for the broods agent platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",