broods 0.28.0 → 0.29.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/account.d.ts +12 -12
- package/dist/account.js +1 -1
- package/dist/{chunk-2149yqc1.js → chunk-3qpgf0c1.js} +2 -2
- package/dist/chunk-7qfjevw2.js +66 -0
- package/dist/chunk-8essas2r.js +2 -0
- package/dist/chunk-90010mby.js +1 -0
- package/dist/chunk-ak8fx04b.js +1 -0
- package/dist/chunk-nwhg2yv5.js +15 -0
- package/dist/{chunk-mnc0tart.js → chunk-xzamx5yk.js} +2 -2
- package/dist/cli/index.js +117 -140
- package/dist/index.d.ts +32 -25
- package/dist/index.js +1 -1
- package/package.json +4 -2
- package/dist/chunk-3cvxks4m.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -122,7 +122,7 @@ interface AgentConfig {
|
|
|
122
122
|
channels?: AgentChannelsConfig;
|
|
123
123
|
tools?: AgentToolsConfig;
|
|
124
124
|
/** Connected MCP servers, keyed by their config-plane row id (#331). */
|
|
125
|
-
|
|
125
|
+
mcp?: AgentMcpConfig;
|
|
126
126
|
/**
|
|
127
127
|
* Tool names withheld for this run, applied after the tool set is built.
|
|
128
128
|
* Set by a channel record; a channel can take a tool away, never add one.
|
|
@@ -287,8 +287,8 @@ interface AgentToolConfig {
|
|
|
287
287
|
config?: Record<string, unknown>;
|
|
288
288
|
[key: string]: unknown;
|
|
289
289
|
}
|
|
290
|
-
type
|
|
291
|
-
interface
|
|
290
|
+
type AgentMcpConfig = Record<string, AgentMcpEntry>;
|
|
291
|
+
interface AgentMcpEntry {
|
|
292
292
|
enabled?: boolean;
|
|
293
293
|
/** Applies to every tool the server exposes. */
|
|
294
294
|
needsApproval?: boolean;
|
|
@@ -728,7 +728,7 @@ type GeneratedIds = {
|
|
|
728
728
|
crons: Record<string, string>;
|
|
729
729
|
skills: Record<string, string>;
|
|
730
730
|
hooks: Record<string, string>;
|
|
731
|
-
|
|
731
|
+
mcp: Record<string, string>;
|
|
732
732
|
policies: Record<string, string>;
|
|
733
733
|
channelRecords: Record<string, string>;
|
|
734
734
|
};
|
|
@@ -1404,7 +1404,7 @@ interface StageScope {
|
|
|
1404
1404
|
stage: string;
|
|
1405
1405
|
}
|
|
1406
1406
|
/** Public MCP server registration returned by the `/v1/mcp` routes (#331). */
|
|
1407
|
-
interface
|
|
1407
|
+
interface AccountMcp {
|
|
1408
1408
|
accountId: string;
|
|
1409
1409
|
serverId: string;
|
|
1410
1410
|
projectId: string;
|
|
@@ -1425,7 +1425,7 @@ interface AccountMcpServer {
|
|
|
1425
1425
|
deletedAt?: string;
|
|
1426
1426
|
}
|
|
1427
1427
|
/** Fields accepted by `POST /v1/mcp`: `url` connects, `bundle` uploads. */
|
|
1428
|
-
interface
|
|
1428
|
+
interface CreateMcpInput {
|
|
1429
1429
|
name: string;
|
|
1430
1430
|
description?: string;
|
|
1431
1431
|
url?: string;
|
|
@@ -1434,7 +1434,7 @@ interface CreateMcpServerInput {
|
|
|
1434
1434
|
allowedTools?: string[];
|
|
1435
1435
|
}
|
|
1436
1436
|
/** Fields accepted by `PATCH /v1/mcp/{serverId}`; every field is optional. */
|
|
1437
|
-
interface
|
|
1437
|
+
interface UpdateMcpInput {
|
|
1438
1438
|
name?: string;
|
|
1439
1439
|
description?: string;
|
|
1440
1440
|
url?: string;
|
|
@@ -1608,11 +1608,11 @@ declare class BroodsAccountClient {
|
|
|
1608
1608
|
/** Mint a short-lived sealed ticket for an interactive PTY session on a persistent sandbox (`sandbox`/`lambda` providers). Throws on 404/403/409. */
|
|
1609
1609
|
openSandboxTerminal(sandboxId: string, reservationKey: string): Promise<SandboxTerminalTicket>;
|
|
1610
1610
|
/** MCP servers live in one stage, so the collection routes need a scope. */
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1611
|
+
listMcp(scope: StageScope): Promise<AccountMcp[]>;
|
|
1612
|
+
createMcp(scope: StageScope, input: CreateMcpInput): Promise<AccountMcp>;
|
|
1613
|
+
getMcp(serverId: string): Promise<AccountMcp | null>;
|
|
1614
|
+
updateMcp(serverId: string, patch: UpdateMcpInput): Promise<AccountMcp | null>;
|
|
1615
|
+
deleteMcp(serverId: string): Promise<boolean>;
|
|
1616
1616
|
listPolicies(): Promise<AccountPolicy[]>;
|
|
1617
1617
|
createPolicy(input: {
|
|
1618
1618
|
name: string;
|
|
@@ -1855,23 +1855,30 @@ type PolicyDefinitionConfig = Omit<PolicyDocument, "version"> & {
|
|
|
1855
1855
|
version?: PolicyDocument["version"];
|
|
1856
1856
|
};
|
|
1857
1857
|
/**
|
|
1858
|
-
* MCP
|
|
1858
|
+
* Fetch-style MCP handler for a hosted server: what
|
|
1859
|
+
* `createMcpHandler(...)` from @modelcontextprotocol/server returns —
|
|
1860
|
+
* either the request function itself or an object exposing it as `fetch`.
|
|
1861
|
+
*/
|
|
1862
|
+
type McpHandler = ((request: Request) => Response | Promise<Response>) | {
|
|
1863
|
+
fetch(request: Request): Response | Promise<Response>;
|
|
1864
|
+
};
|
|
1865
|
+
/**
|
|
1866
|
+
* MCP server registration (#331) — external (`url`) or hosted (`handler`).
|
|
1859
1867
|
* Either way the server's tools are offered as `<name>__<tool>`; an external
|
|
1860
1868
|
* row is dialed over the stateless HTTP transport (spec 2026-07-28) at agent
|
|
1861
1869
|
* registration time. The name namespaces those tools, so it must be 1-32
|
|
1862
1870
|
* lowercase letters, digits, or hyphens, starting with a letter.
|
|
1863
1871
|
*/
|
|
1864
|
-
interface
|
|
1872
|
+
interface McpDefinitionConfig {
|
|
1865
1873
|
/** External server's MCP endpoint; http(s), no embedded credentials. */
|
|
1866
1874
|
url?: string;
|
|
1867
1875
|
/**
|
|
1868
|
-
* Hosted alternative to `url`:
|
|
1869
|
-
*
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
1872
|
-
* request.
|
|
1876
|
+
* Hosted alternative to `url`: declare the server inline —
|
|
1877
|
+
* `handler: createMcpHandler(...)` from @modelcontextprotocol/server,
|
|
1878
|
+
* right next to the `defineMcp` call. The CLI bundles the defining module
|
|
1879
|
+
* and the tool-runner Lambda hosts it, one invoke per request.
|
|
1873
1880
|
*/
|
|
1874
|
-
|
|
1881
|
+
handler?: McpHandler;
|
|
1875
1882
|
/**
|
|
1876
1883
|
* Extra request headers. Credential-bearing headers (Authorization,
|
|
1877
1884
|
* X-Api-Key, ...) must reference an account env var — e.g.
|
|
@@ -2182,7 +2189,7 @@ interface ProviderSettingsInput {
|
|
|
2182
2189
|
}
|
|
2183
2190
|
/** Per-provider settings; provider names stay synced with core's `AgentConfig`. */
|
|
2184
2191
|
type ProviderConfigInput = Partial<Record<keyof NonNullable<AgentConfig["provider"]>, ProviderSettingsInput>>;
|
|
2185
|
-
type AgentDefinitionConfig = EnvRefString<Pick<AgentConfig, "agent" | "model" | "scheduler" | "session" | "tools" | "
|
|
2192
|
+
type AgentDefinitionConfig = EnvRefString<Pick<AgentConfig, "agent" | "model" | "scheduler" | "session" | "tools" | "mcp">> & {
|
|
2186
2193
|
provider?: ProviderConfigInput;
|
|
2187
2194
|
} & {
|
|
2188
2195
|
harness?: HarnessDefinition;
|
|
@@ -2220,11 +2227,11 @@ type WorkspaceDefinitionConfig = Omit<WorkspaceConfig, "isolation"> & {
|
|
|
2220
2227
|
type WorkspaceResource<Name extends string = string> = ResourceDefinition<"workspace", Name, WorkspaceDefinitionConfig>;
|
|
2221
2228
|
type SandboxResource<Name extends string = string> = ResourceDefinition<"sandbox", Name, SandboxDefinitionConfig>;
|
|
2222
2229
|
type SkillResource<Name extends string = string> = ResourceDefinition<"skill", Name, SkillDefinitionConfig>;
|
|
2223
|
-
type
|
|
2230
|
+
type McpResource<Name extends string = string> = ResourceDefinition<"mcp", Name, McpDefinitionConfig>;
|
|
2224
2231
|
type PolicyResource<Name extends string = string> = ResourceDefinition<"policy", Name, PolicyDefinitionConfig>;
|
|
2225
2232
|
type CronResource<Name extends string = string> = ResourceDefinition<"cron", Name, CronDefinitionConfig>;
|
|
2226
2233
|
type ChannelResource<Name extends string = string> = ResourceDefinition<"channelRecord", Name, ChannelDefinitionConfig>;
|
|
2227
|
-
type AnyResource = AgentResource | WorkspaceResource | SandboxResource | CronResource | SkillResource |
|
|
2234
|
+
type AnyResource = AgentResource | WorkspaceResource | SandboxResource | CronResource | SkillResource | McpResource | PolicyResource | ChannelResource;
|
|
2228
2235
|
/**
|
|
2229
2236
|
* References an account/environment variable resolved on the SERVER at runtime —
|
|
2230
2237
|
* set it with `broods env set <NAME>` or in the dashboard (the Convex-style
|
|
@@ -2261,7 +2268,7 @@ declare function defineHarness<const Definition extends HarnessDefinition>(defin
|
|
|
2261
2268
|
declare function defineWorkspace<const Name extends string>(input: ResourceInput<Name, WorkspaceDefinitionConfig>): WorkspaceResource<Name>;
|
|
2262
2269
|
declare function defineSandbox<const Name extends string>(input: ResourceInput<Name, SandboxDefinitionConfig>): SandboxResource<Name>;
|
|
2263
2270
|
declare function defineSkill<const Name extends string>(input: ResourceInput<Name, SkillDefinitionConfig>): SkillResource<Name>;
|
|
2264
|
-
declare function defineMcp<const Name extends string>(input: ResourceInput<Name,
|
|
2271
|
+
declare function defineMcp<const Name extends string>(input: ResourceInput<Name, McpDefinitionConfig>): McpResource<Name>;
|
|
2265
2272
|
declare function definePolicy<const Name extends string>(input: ResourceInput<Name, PolicyDefinitionConfig>): PolicyResource<Name>;
|
|
2266
2273
|
declare function defineCron<const Name extends string>(input: ResourceInput<Name, CronDefinitionConfig>): CronResource<Name>;
|
|
2267
2274
|
declare function isResource(value: unknown): value is AnyResource;
|
|
@@ -2269,4 +2276,4 @@ declare function isConnectionDefinition(value: unknown): value is AnyConnectionD
|
|
|
2269
2276
|
declare function isBroodsConfig(value: unknown): value is BroodsConfigDefinition;
|
|
2270
2277
|
|
|
2271
2278
|
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, defineMcp, definePancakeChannel, definePancakeConnection, definePolicy, defineSandbox, defineSkill, defineSlackChannel, defineSlackConnection, defineTelegramChannel, defineTelegramConnection, defineWorkspace, defineZaloChannel, defineZaloConnection, env, envPlaceholder, isBroodsConfig, isConnectionDefinition, isLogLevel, isObservabilityClientMessage, isResource, isRootSpanKind, normalizeHttpServiceUrl, readSseStream, resolveRunEvents, toWebSocketBaseUrl };
|
|
2272
|
-
export type { Account, AccountAgent, AccountChannel, AccountEnvVar,
|
|
2279
|
+
export type { Account, AccountAgent, AccountChannel, AccountEnvVar, AccountMcp, AccountPolicy, AccountRole, AccountSandbox, 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, AssumeRoleResult, AsyncAgentRun, AsyncPollOptions, AsyncRequestAccepted, AsyncStatus, BroodsAccount, BroodsAccountClientOptions, BroodsClientOptions, BroodsConfigDefinition, BroodsProjectConfig, BroodsWebSocketClientOptions, ChannelAgentInput, ChannelDefinitionConfig, ChannelMessageReceived, ChannelPartition, ChannelRecordConfig, ChannelReference, ChannelReplyIn, ChannelResource, ChannelType, CliManifest, CliManifestResource, ConnectionDefinition, CreateAgentResult, CreateClientCronInput, CreateCronInput, CreateMcpInput, Cron, CronDefinitionConfig, CronDoc, CronLastStatus, CronResource, CronRun, CronStatus, DeleteAccountResult, DiscordChannelInput, DiscordConnectionDefinition, DiscordConnectionInput, DiscordMessageSource, DiscordSource, Doc, EnvAccessor, EnvRef, EnvRefString, GeneratedIds, GitHubChannelInput, GitHubConnectionDefinition, GitHubConnectionInput, GitHubMessageSource, GitHubSource, HarnessDefinition, HarnessType, HookContext, Id, IngressMode, IngressStatus, LogLevel, McpDefinitionConfig, McpHandler, McpResource, 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, SandboxDefinitionOptions, SandboxLifecycleResult, SandboxResource, SandboxSnapshotResult, SandboxTerminalTicket, Skill, SkillDefinitionConfig, SkillResource, SkillUploadInput, SlackChannelInput, SlackConnectionDefinition, SlackConnectionInput, SlackMessageSource, SlackSource, StageDoc, StageScope, TelegramChannelInput, TelegramConnectionDefinition, TelegramConnectionInput, TelegramMessageSource, TelegramSource, ToolApprovalSummary, UpdateAgentInput, UpdateCronInput, UpdateMcpInput, 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{
|
|
1
|
+
import{A as B,B as H,C as K,D as j,E as G,F,G as z,H as Z,I as V,J as X,K as Y,L as J,M as Q,N as ee,O as te,P as re,Q as ne,a as v,b as S,m as k,n as A,o as M,p as h,q as W,r as w,s as E,t as D,u as T,v as q,w as N,x as _,y as P,z as U}from"./chunk-3qpgf0c1.js";import{R as O,S as R,T as L}from"./chunk-xzamx5yk.js";import"./chunk-8essas2r.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,k 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,J as defineMcp,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,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,S 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.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "CLI + TypeScript SDK for the broods agent platform.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -54,7 +54,9 @@
|
|
|
54
54
|
"test": "bun test"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"
|
|
57
|
+
"@modelcontextprotocol/server": "2.0.0",
|
|
58
|
+
"esbuild": "^0.28.2",
|
|
59
|
+
"zod": "^4.4.3"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
62
|
"@ai-sdk/tui": "1.0.78",
|
package/dist/chunk-3cvxks4m.js
DELETED