broods 0.36.2 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account.d.ts +29 -7
- package/dist/{chunk-a5f47km3.js → chunk-3spnn9yh.js} +2 -2
- package/dist/{chunk-xwnab9tf.js → chunk-794tw7dm.js} +1 -1
- package/dist/{chunk-t04j8m02.js → chunk-a9yb7pfr.js} +1 -1
- package/dist/{chunk-yejgvw0a.js → chunk-n1cm22m2.js} +1 -1
- package/dist/{chunk-q2n2mxeg.js → chunk-pxzdwb6g.js} +4 -4
- package/dist/cli/index.js +75 -75
- package/dist/index.d.ts +38 -17
- package/dist/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-vtfkzp4h.js → chunk-gcm6m7md.js} +0 -0
- /package/dist/{chunk-ty87cm0z.js → chunk-txsgyj2d.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,30 @@ declare const MODEL_PROVIDERS: {
|
|
|
101
101
|
};
|
|
102
102
|
type AccountModelProviderName = keyof typeof MODEL_PROVIDERS;
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Agent config validation, the only copy of it: Convex config HTTP checks a
|
|
106
|
+
* config on write and core re-checks the stored config on every run. Pure
|
|
107
|
+
* module: safe for the default Convex runtime. The public projection lives in
|
|
108
|
+
* ./responses.ts.
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
declare const AGENT_HARNESS_TYPES: readonly ["claude-code", "codex", "deepagents", "opencode", "pi"];
|
|
112
|
+
declare const AGENT_HARNESS_DEBUG_LEVELS: readonly ["error", "warn", "info", "debug", "trace"];
|
|
113
|
+
declare const AGENT_HARNESS_PERMISSION_MODES: readonly ["allow-reads", "allow-edits", "allow-all"];
|
|
114
|
+
declare const AGENT_LIFECYCLE_EVENT_NAMES: readonly ["agent.started", "agent.step.finished", "agent.finished", "agent.failed", "agent.approval.required", "tool.call.started", "tool.call.finished", "tool.result", "subagent.task.started", "subagent.task.finished"];
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Shared validation for MCP server registrations (#331). One normalizer
|
|
118
|
+
* serves every write path (CLI sync, direct API, dashboard). A `url` makes an "http" row
|
|
119
|
+
* core connects to over the stateless 2026-07-28 transport; a `bundle` makes
|
|
120
|
+
* a "hosted" row served by the tool-runner Lambda, hashed here so sha256
|
|
121
|
+
* always travels with the bundle. Auth header values may carry ${NAME}
|
|
122
|
+
* account env refs; they resolve into the encrypted agent config at sync
|
|
123
|
+
* time, never on this row, and credential-bearing headers must use one
|
|
124
|
+
* instead of an inline secret. `oauth` follows the same rule: clientSecret
|
|
125
|
+
* and refreshToken must be ${NAME} refs, so the row never holds a secret.
|
|
126
|
+
*/
|
|
127
|
+
|
|
104
128
|
/**
|
|
105
129
|
* OAuth 2.0 refresh-token grant for an external row. Core mints access tokens
|
|
106
130
|
* at connect time and sends `Authorization: Bearer <token>`, so a server
|
|
@@ -116,20 +140,18 @@ interface McpOauth {
|
|
|
116
140
|
}
|
|
117
141
|
|
|
118
142
|
/**
|
|
119
|
-
* Agent configuration: types for the per-agent settings object,
|
|
120
|
-
*
|
|
143
|
+
* Agent configuration: types for the per-agent settings object, the runtime
|
|
144
|
+
* projection of a stored config, and encryption helpers. The validation rules
|
|
145
|
+
* are the config plane's (`@broods/convex/model/agentRules`), so a config is
|
|
146
|
+
* judged the same on write and on every run.
|
|
121
147
|
* Account types and auth live in `./accounts.ts` and `../auth.ts`.
|
|
122
148
|
*/
|
|
123
149
|
|
|
124
|
-
declare const AGENT_HARNESS_TYPES: readonly ["claude-code", "codex", "deepagents", "opencode", "pi"];
|
|
125
|
-
declare const AGENT_HARNESS_DEBUG_LEVELS: readonly ["error", "warn", "info", "debug", "trace"];
|
|
126
|
-
declare const AGENT_HARNESS_PERMISSION_MODES: readonly ["allow-reads", "allow-edits", "allow-all"];
|
|
127
150
|
interface AgentConfig {
|
|
128
151
|
agent?: AgentBehaviorConfig;
|
|
129
152
|
harness?: AgentHarnessConfig;
|
|
130
153
|
model?: AgentModelConfig;
|
|
131
154
|
provider?: AgentProviderConfig;
|
|
132
|
-
sandbox?: string;
|
|
133
155
|
sandboxes?: string[];
|
|
134
156
|
workspaces?: AgentWorkspaceRef[];
|
|
135
157
|
session?: AgentSessionConfig;
|
|
@@ -297,7 +319,7 @@ interface AgentWebhookHookConfig {
|
|
|
297
319
|
events?: AgentLifecycleEventName[];
|
|
298
320
|
[key: string]: unknown;
|
|
299
321
|
}
|
|
300
|
-
type AgentLifecycleEventName =
|
|
322
|
+
type AgentLifecycleEventName = (typeof AGENT_LIFECYCLE_EVENT_NAMES)[number];
|
|
301
323
|
|
|
302
324
|
type AgentToolsConfig = Record<string, AgentToolConfig>;
|
|
303
325
|
interface AgentToolConfig {
|
|
@@ -1944,10 +1966,8 @@ type SandboxDefinitionConfig = Omit<SandboxConfig, "envVars" | "options"> & {
|
|
|
1944
1966
|
options?: SandboxDefinitionOptions;
|
|
1945
1967
|
};
|
|
1946
1968
|
type HarnessType = NonNullable<AgentConfig["harness"]>["type"];
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
sandbox: SandboxResource | string;
|
|
1950
|
-
};
|
|
1969
|
+
/** Harness settings. The harness runs on the agent's first sandbox. */
|
|
1970
|
+
type HarnessDefinition = NonNullable<AgentConfig["harness"]>;
|
|
1951
1971
|
interface SkillDefinitionConfig {
|
|
1952
1972
|
/**
|
|
1953
1973
|
* Folder containing SKILL.md plus optional scripts/assets. Relative paths are
|
|
@@ -1991,8 +2011,9 @@ interface McpDefinitionConfig {
|
|
|
1991
2011
|
handler?: McpHandler;
|
|
1992
2012
|
/**
|
|
1993
2013
|
* Extra request headers. Credential-bearing headers (Authorization,
|
|
1994
|
-
* X-Api-Key, ...) must reference an account env var
|
|
1995
|
-
* `Bearer ${
|
|
2014
|
+
* X-Api-Key, ...) must reference an account env var by name inside a plain
|
|
2015
|
+
* string, e.g. `"Bearer ${TOKEN}"`. `env()` returns an object, so a template
|
|
2016
|
+
* literal around it sends `[object Object]`. Never carry an inline secret.
|
|
1996
2017
|
*/
|
|
1997
2018
|
headers?: Record<string, string>;
|
|
1998
2019
|
/**
|
|
@@ -2144,7 +2165,7 @@ type PancakeChannelInput = ChannelRulesInput & {
|
|
|
2144
2165
|
};
|
|
2145
2166
|
/**
|
|
2146
2167
|
* Per-agent workspace mount with an optional sandbox override. A bare
|
|
2147
|
-
* `defineWorkspace(...)` inherits the agent
|
|
2168
|
+
* `defineWorkspace(...)` inherits the agent's first sandbox; the object form lets
|
|
2148
2169
|
* a single workspace pin its own sandbox, or set `sandbox: null` to force the
|
|
2149
2170
|
* workspace read-only (no compute attached).
|
|
2150
2171
|
*/
|
|
@@ -2321,10 +2342,10 @@ type AgentDefinitionConfig = EnvRefString<Pick<AgentConfig, "agent" | "model" |
|
|
|
2321
2342
|
webhooks?: readonly EnvRefString<AgentWebhookHookConfig>[];
|
|
2322
2343
|
};
|
|
2323
2344
|
connections?: readonly AnyConnectionDefinition[];
|
|
2324
|
-
sandbox?: SandboxResource | string;
|
|
2325
2345
|
/**
|
|
2326
|
-
*
|
|
2327
|
-
*
|
|
2346
|
+
* Sandboxes this agent runs on. The first is the default: bash with no
|
|
2347
|
+
* workspace runs there, workspaces without their own sandbox mount it, and a
|
|
2348
|
+
* harness runs on it. The model reaches the others by name.
|
|
2328
2349
|
*/
|
|
2329
2350
|
sandboxes?: readonly (SandboxResource | string)[];
|
|
2330
2351
|
workspaces?: readonly AgentWorkspaceInput[];
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W,Se,Me,xe,Ae,ze,
|
|
1
|
+
import{W,Se,Me,xe,Ae,ze,K,$e,P,we,F,Y,ke,X,I,Oe,Ne,je,qe,De,Le,Ue,Fe,Be,Ve,Ze,He,We,Ke,Ge,Je,Ye,Xe,Qe,et,tt,rt,ie,R,g}from"./chunk-pxzdwb6g.js";import{m,Ce,L,U}from"./chunk-mqsvqhkj.js";export{m as BroodsAccountApiError,U as BroodsAccountClient,F as BroodsClient,ke as BroodsWebSocketClient,P as DEFAULT_CORE_BASE_URL,we as IngressAcceptedError,Me as MAX_OBSERVABILITY_BACKFILL,ke as WebSocketClient,ke as WebsocketClient,Ne as defineAgent,je as defineBroods,qe as defineCron,Ye as defineDiscordChannel,Ze as defineDiscordConnection,Xe as defineGitHubChannel,He as defineGitHubConnection,De as defineHarness,Le as defineMcp,Qe as definePancakeChannel,We as definePancakeConnection,Ue as definePolicy,Fe as defineSandbox,Be as defineSkill,et as defineSlackChannel,Ke as defineSlackConnection,tt as defineTelegramChannel,Ge as defineTelegramConnection,Ve as defineWorkspace,rt as defineZaloChannel,Je as defineZaloConnection,Oe as env,Ce as envPlaceholder,ie as isBroodsConfig,R as isConnectionDefinition,xe as isLogLevel,Ae as isObservabilityClientMessage,g as isResource,ze as isRootSpanKind,K as isSandboxLogId,$e as isTraceId,Y as normalizeHttpServiceUrl,Se as readSseStream,L as resolveEnvCredential,W as resolveRunEvents,X as toWebSocketBaseUrl,I as webSocketSubprotocols};
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|