broods 0.13.0 → 0.14.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 +93 -24
- package/dist/{chunk-rr4srzb6.js → chunk-9v4kpqb1.js} +3 -3
- package/dist/cli/index.js +43 -43
- package/dist/index.d.ts +99 -38
- package/dist/index.js +1 -1
- package/package.json +15 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,98 @@
|
|
|
1
1
|
import { SystemModelMessage, LanguageModelCallOptions, RequestOptions, streamText, JSONSchema7, ModelMessage, TextStreamPart, ToolSet } from 'ai';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
readonly
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
95
|
+
type AccountModelProviderName = keyof typeof MODEL_PROVIDERS;
|
|
17
96
|
|
|
18
97
|
/**
|
|
19
98
|
* Agent policy contracts and validation.
|
|
@@ -166,14 +245,6 @@ type AgentModelOutputMetadata = {
|
|
|
166
245
|
[key: string]: unknown;
|
|
167
246
|
};
|
|
168
247
|
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
248
|
interface AgentProviderSettings {
|
|
178
249
|
apiKey?: string;
|
|
179
250
|
/** OpenAI-compatible endpoint (`custom`). Snake form, as documented. */
|
|
@@ -181,13 +252,11 @@ interface AgentProviderSettings {
|
|
|
181
252
|
/** OpenAI-compatible endpoint (`custom`). AI-SDK form; the dashboard writes both. */
|
|
182
253
|
baseURL?: string;
|
|
183
254
|
headers?: Record<string, string>;
|
|
255
|
+
/** Endpoint label; becomes the provider id and the pi harness env prefix. */
|
|
256
|
+
name?: string;
|
|
184
257
|
organization?: string;
|
|
185
258
|
project?: string;
|
|
186
|
-
|
|
187
|
-
region?: string;
|
|
188
|
-
accessKeyId?: string;
|
|
189
|
-
secretAccessKey?: string;
|
|
190
|
-
sessionToken?: string;
|
|
259
|
+
[key: string]: unknown;
|
|
191
260
|
}
|
|
192
261
|
interface AgentWorkspaceRef {
|
|
193
262
|
name: string;
|
|
@@ -1902,26 +1971,18 @@ type AgentPolicyDefinitionConfig = Omit<AgentPolicyConfig, "policyIds"> & {
|
|
|
1902
1971
|
* gains a new top-level field that should be code-definable.
|
|
1903
1972
|
*/
|
|
1904
1973
|
/**
|
|
1905
|
-
* SDK-facing model-provider constructor settings.
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1908
|
-
* typo
|
|
1909
|
-
*
|
|
1910
|
-
* `_ProviderKeyParity` assertion below fails `broods check` if they drift.
|
|
1911
|
-
* Every string field also accepts an `env("NAME")` reference.
|
|
1974
|
+
* SDK-facing model-provider constructor settings. Open by design: everything a
|
|
1975
|
+
* provider's Vercel AI SDK factory accepts is forwarded verbatim, so there is no
|
|
1976
|
+
* key list to keep in sync. Only the keys broods reads itself are named (and so
|
|
1977
|
+
* typo-checked at run time by `validateProviderConfig`); every string field also
|
|
1978
|
+
* accepts an `env("NAME")` reference.
|
|
1912
1979
|
*/
|
|
1913
1980
|
interface ProviderSettingsInput {
|
|
1914
1981
|
apiKey?: string | EnvRef;
|
|
1915
1982
|
base_url?: string | EnvRef;
|
|
1916
1983
|
baseURL?: string | EnvRef;
|
|
1917
1984
|
headers?: Record<string, string | EnvRef>;
|
|
1918
|
-
|
|
1919
|
-
project?: string | EnvRef;
|
|
1920
|
-
name?: string | EnvRef;
|
|
1921
|
-
region?: string | EnvRef;
|
|
1922
|
-
accessKeyId?: string | EnvRef;
|
|
1923
|
-
secretAccessKey?: string | EnvRef;
|
|
1924
|
-
sessionToken?: string | EnvRef;
|
|
1985
|
+
[key: string]: unknown;
|
|
1925
1986
|
}
|
|
1926
1987
|
/** Per-provider settings; provider names stay synced with core's `AgentConfig`. */
|
|
1927
1988
|
type ProviderConfigInput = Partial<Record<keyof NonNullable<AgentConfig["provider"]>, ProviderSettingsInput>>;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as O,c as R}from"./chunk-ce3yb3yz.js";import{A as N,B as _,C as P,D as H,E as K,F as U,G as B,H as j,I as F,J as G,K as z,L as Z,M as V,N as X,O as Y,d as I,e as v,p as k,q as S,r as A,s as M,t as W,u as L,v as w,w as E,x as D,y as T,z as q}from"./chunk-
|
|
1
|
+
import{a as h,b as O,c as R}from"./chunk-ce3yb3yz.js";import{A as N,B as _,C as P,D as H,E as K,F as U,G as B,H as j,I as F,J as G,K as z,L as Z,M as V,N as X,O as Y,d as I,e as v,p as k,q as S,r as A,s as M,t as W,u as L,v as w,w as E,x as D,y as T,z as q}from"./chunk-9v4kpqb1.js";import"./chunk-pfhy5049.js";var o=500;function a(t){if(typeof t!=="object"||t===null)return!1;let e=t;if(e.type==="subscribe"){let r=e.stream;if(r!=="logs"&&r!=="traces")return!1;let n=e.backfill;if(n!==void 0&&(typeof n!=="number"||!Number.isSafeInteger(n)||n<0||n>500))return!1;if(e.liveOnly!==void 0&&typeof e.liveOnly!=="boolean")return!1;let s=e.minLevel;if(s!==void 0&&s!=="INFO"&&s!=="WARN"&&s!=="ERROR")return!1;return!0}if(e.type==="unsubscribe"){let r=e.stream;return r==="logs"||r==="traces"}return!1}function i(t){return t==="task"||t==="cron"||t==="subtask"}export{O as BroodsAccountApiError,R as BroodsAccountClient,A as BroodsClient,W as BroodsWebSocketClient,k as DEFAULT_CORE_BASE_URL,S as IngressAcceptedError,o as MAX_OBSERVABILITY_BACKFILL,W as WebSocketClient,W as WebsocketClient,H as defineAgent,P as defineBroods,z as defineChannelRecord,Z as defineCron,q as defineDiscordChannel,D as defineGitHubChannel,K as defineHarness,N as definePancakeChannel,G as definePolicy,B as defineSandbox,j as defineSkill,T as defineSlackChannel,E as defineTelegramChannel,F as defineTool,U as defineWorkspace,_ as defineZaloChannel,w as env,h as envPlaceholder,Y as isBroodsConfig,X as isChannelDefinition,a as isObservabilityClientMessage,V as isResource,i as isRootSpanKind,M as normalizeHttpServiceUrl,v as readSseStream,I as resolveRunEvents,L as toWebSocketBaseUrl};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "broods",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "CLI + TypeScript SDK for the broods agent platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,13 @@
|
|
|
33
33
|
"import": "./dist/account.js"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
"typesVersions": {
|
|
37
|
+
"*": {
|
|
38
|
+
"account": [
|
|
39
|
+
"./dist/account.d.ts"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
36
43
|
"main": "./dist/index.js",
|
|
37
44
|
"types": "./dist/index.d.ts",
|
|
38
45
|
"files": [
|
|
@@ -41,9 +48,9 @@
|
|
|
41
48
|
"LICENSE.md"
|
|
42
49
|
],
|
|
43
50
|
"scripts": {
|
|
44
|
-
"build": "bun scripts/build.ts && rollup -c rollup.dts.config.mjs &&
|
|
51
|
+
"build": "bun scripts/build.ts && rollup -c rollup.dts.config.mjs && rm -rf .dts-temp",
|
|
45
52
|
"check": "tsc --noEmit",
|
|
46
|
-
"pack:check": "bun run build &&
|
|
53
|
+
"pack:check": "bun run build && publint && attw --pack .",
|
|
47
54
|
"test": "bun test"
|
|
48
55
|
},
|
|
49
56
|
"engines": {
|
|
@@ -57,14 +64,16 @@
|
|
|
57
64
|
},
|
|
58
65
|
"devDependencies": {
|
|
59
66
|
"@ai-sdk/tui": "^1.0.59",
|
|
60
|
-
"
|
|
67
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
61
68
|
"@chat-adapter/discord": "^4.35.0",
|
|
62
69
|
"@chat-adapter/github": "^4.35.0",
|
|
63
70
|
"@chat-adapter/slack": "^4.35.0",
|
|
64
71
|
"@chat-adapter/telegram": "^4.35.0",
|
|
65
72
|
"@types/bun": "^1.3.14",
|
|
73
|
+
"ai": "^7.0.58",
|
|
74
|
+
"publint": "^0.3.23",
|
|
66
75
|
"rollup": "^4.62.2",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
76
|
+
"rollup-plugin-dts": "^6.4.1",
|
|
77
|
+
"typescript": "^6.0.3"
|
|
69
78
|
}
|
|
70
79
|
}
|