@zhixuan92/multi-model-agent-core 0.4.0 → 1.1.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/README.md +33 -93
- package/dist/config/load.js +9 -9
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +169 -275
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +31 -40
- package/dist/config/schema.js.map +1 -1
- package/dist/cost/cost-meter.d.ts +13 -0
- package/dist/cost/cost-meter.d.ts.map +1 -0
- package/dist/cost/cost-meter.js +20 -0
- package/dist/cost/cost-meter.js.map +1 -0
- package/dist/delegate-with-escalation.d.ts +1 -28
- package/dist/delegate-with-escalation.d.ts.map +1 -1
- package/dist/delegate-with-escalation.js +9 -89
- package/dist/delegate-with-escalation.js.map +1 -1
- package/dist/error-codes.d.ts +4 -0
- package/dist/error-codes.d.ts.map +1 -0
- package/dist/error-codes.js +16 -0
- package/dist/error-codes.js.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/model-profiles.json +10 -5
- package/dist/provider.d.ts +2 -2
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +10 -13
- package/dist/provider.js.map +1 -1
- package/dist/readiness/normalization-budget.d.ts +2 -0
- package/dist/readiness/normalization-budget.d.ts.map +1 -0
- package/dist/readiness/normalization-budget.js +9 -0
- package/dist/readiness/normalization-budget.js.map +1 -0
- package/dist/readiness/normalize-brief.d.ts +17 -0
- package/dist/readiness/normalize-brief.d.ts.map +1 -0
- package/dist/readiness/normalize-brief.js +124 -0
- package/dist/readiness/normalize-brief.js.map +1 -0
- package/dist/readiness/readiness.d.ts +16 -0
- package/dist/readiness/readiness.d.ts.map +1 -0
- package/dist/readiness/readiness.js +160 -0
- package/dist/readiness/readiness.js.map +1 -0
- package/dist/reporting/structured-report.d.ts +18 -0
- package/dist/reporting/structured-report.d.ts.map +1 -0
- package/dist/reporting/structured-report.js +100 -0
- package/dist/reporting/structured-report.js.map +1 -0
- package/dist/review/aggregate-result.d.ts +3 -0
- package/dist/review/aggregate-result.d.ts.map +1 -0
- package/dist/review/aggregate-result.js +31 -0
- package/dist/review/aggregate-result.js.map +1 -0
- package/dist/review/quality-reviewer.d.ts +13 -0
- package/dist/review/quality-reviewer.d.ts.map +1 -0
- package/dist/review/quality-reviewer.js +39 -0
- package/dist/review/quality-reviewer.js.map +1 -0
- package/dist/review/reviewer-prompt.d.ts +10 -0
- package/dist/review/reviewer-prompt.d.ts.map +1 -0
- package/dist/review/reviewer-prompt.js +58 -0
- package/dist/review/reviewer-prompt.js.map +1 -0
- package/dist/review/spec-reviewer.d.ts +13 -0
- package/dist/review/spec-reviewer.d.ts.map +1 -0
- package/dist/review/spec-reviewer.js +37 -0
- package/dist/review/spec-reviewer.js.map +1 -0
- package/dist/routing/model-profiles.d.ts +5 -0
- package/dist/routing/model-profiles.d.ts.map +1 -1
- package/dist/routing/model-profiles.js +5 -0
- package/dist/routing/model-profiles.js.map +1 -1
- package/dist/routing/resolve-agent.d.ts +8 -0
- package/dist/routing/resolve-agent.d.ts.map +1 -0
- package/dist/routing/resolve-agent.js +45 -0
- package/dist/routing/resolve-agent.js.map +1 -0
- package/dist/run-tasks.d.ts +0 -23
- package/dist/run-tasks.d.ts.map +1 -1
- package/dist/run-tasks.js +241 -72
- package/dist/run-tasks.js.map +1 -1
- package/dist/runners/claude-runner.d.ts +2 -2
- package/dist/runners/claude-runner.d.ts.map +1 -1
- package/dist/runners/claude-runner.js +76 -28
- package/dist/runners/claude-runner.js.map +1 -1
- package/dist/runners/codex-runner.d.ts +2 -2
- package/dist/runners/codex-runner.d.ts.map +1 -1
- package/dist/runners/codex-runner.js +77 -24
- package/dist/runners/codex-runner.js.map +1 -1
- package/dist/runners/openai-runner.d.ts +2 -2
- package/dist/runners/openai-runner.d.ts.map +1 -1
- package/dist/runners/openai-runner.js +141 -22
- package/dist/runners/openai-runner.js.map +1 -1
- package/dist/runners/prevention.d.ts +2 -0
- package/dist/runners/prevention.d.ts.map +1 -1
- package/dist/runners/prevention.js +12 -0
- package/dist/runners/prevention.js.map +1 -1
- package/dist/runners/supervision.d.ts +1 -5
- package/dist/runners/supervision.d.ts.map +1 -1
- package/dist/runners/supervision.js +0 -68
- package/dist/runners/supervision.js.map +1 -1
- package/dist/tools/call-cache.d.ts +16 -0
- package/dist/tools/call-cache.d.ts.map +1 -0
- package/dist/tools/call-cache.js +28 -0
- package/dist/tools/call-cache.js.map +1 -0
- package/dist/tools/claude-adapter.d.ts +2 -2
- package/dist/tools/claude-adapter.d.ts.map +1 -1
- package/dist/tools/claude-adapter.js +12 -5
- package/dist/tools/claude-adapter.js.map +1 -1
- package/dist/tools/definitions.d.ts +4 -0
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +4 -0
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/openai-adapter.d.ts +4 -4
- package/dist/tools/openai-adapter.d.ts.map +1 -1
- package/dist/tools/openai-adapter.js +9 -2
- package/dist/tools/openai-adapter.js.map +1 -1
- package/dist/types.d.ts +79 -31
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +48 -16
- package/dist/routing/capabilities.d.ts +0 -3
- package/dist/routing/capabilities.d.ts.map +0 -1
- package/dist/routing/capabilities.js +0 -26
- package/dist/routing/capabilities.js.map +0 -1
- package/dist/routing/get-provider-eligibility.d.ts +0 -8
- package/dist/routing/get-provider-eligibility.d.ts.map +0 -1
- package/dist/routing/get-provider-eligibility.js +0 -53
- package/dist/routing/get-provider-eligibility.js.map +0 -1
- package/dist/routing/resolve-task-capabilities.d.ts +0 -7
- package/dist/routing/resolve-task-capabilities.d.ts.map +0 -1
- package/dist/routing/resolve-task-capabilities.js +0 -19
- package/dist/routing/resolve-task-capabilities.js.map +0 -1
- package/dist/routing/select-provider-for-task.d.ts +0 -18
- package/dist/routing/select-provider-for-task.d.ts.map +0 -1
- package/dist/routing/select-provider-for-task.js +0 -50
- package/dist/routing/select-provider-for-task.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
# @zhixuan92/multi-model-agent-core
|
|
2
2
|
|
|
3
|
-
**Runtime library for
|
|
3
|
+
**Runtime library for multi-model-agent.** Import it to run multi-provider agent tasks directly from your own Node program — same routing, supervision, and review pipeline, no MCP client needed.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- **Provider runners** — Claude (`@anthropic-ai/claude-agent-sdk`), Codex (OpenAI Responses API with `codex login` or `OPENAI_API_KEY`), and any OpenAI-compatible endpoint.
|
|
8
|
-
- **Routing engine** — capability filter → quality tier filter → cheapest qualifying provider, with the full escalation chain walked automatically on failure.
|
|
9
|
-
- **`runTasks`** — a single function that takes a task array and a config, runs them in parallel, and returns one result per task (usage, costUSD, savedCostUSD, files touched, status, escalation log).
|
|
10
|
-
- **Config schema** — Zod-validated loader for `~/.multi-model/config.json` so callers get the same config contract as the MCP server.
|
|
11
|
-
- **Sandboxed tool layer** — `readFile`, `writeFile`, `grep`, `glob`, `listFiles`, `runShell` with `cwd-only` confinement via `fs.realpath`, size caps, and per-call enforcement.
|
|
12
|
-
|
|
13
|
-
> **If you just want a `delegate_tasks` tool in Claude Code / Claude Desktop / Codex CLI**, install [`@zhixuan92/multi-model-agent-mcp`](https://www.npmjs.com/package/@zhixuan92/multi-model-agent-mcp) instead — it wraps this library in an MCP stdio server. You don't need `-core` directly for that.
|
|
5
|
+
> **Just want your AI assistant to delegate work?** Install [`@zhixuan92/multi-model-agent-mcp`](https://www.npmjs.com/package/@zhixuan92/multi-model-agent-mcp) instead — it wraps this library in an MCP server.
|
|
14
6
|
|
|
15
7
|
## Install
|
|
16
8
|
|
|
@@ -18,104 +10,52 @@ Use this package when you want to embed the same routing and dispatch logic insi
|
|
|
18
10
|
npm install @zhixuan92/multi-model-agent-core
|
|
19
11
|
```
|
|
20
12
|
|
|
21
|
-
Requires Node
|
|
13
|
+
Requires Node >= 22. ESM only.
|
|
22
14
|
|
|
23
|
-
##
|
|
15
|
+
## Quick example
|
|
24
16
|
|
|
25
17
|
```ts
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
loadConfigFromFile,
|
|
29
|
-
parseConfig,
|
|
30
|
-
multiModelConfigSchema,
|
|
31
|
-
|
|
32
|
-
// Provider factory + dispatch
|
|
33
|
-
createProvider,
|
|
34
|
-
runTasks,
|
|
35
|
-
|
|
36
|
-
// Routing helpers
|
|
37
|
-
selectProviderForTask,
|
|
38
|
-
getProviderEligibility,
|
|
39
|
-
getBaseCapabilities,
|
|
40
|
-
resolveTaskCapabilities,
|
|
41
|
-
findModelProfile,
|
|
42
|
-
getEffectiveCostTier,
|
|
43
|
-
} from '@zhixuan92/multi-model-agent-core';
|
|
44
|
-
|
|
45
|
-
import type {
|
|
46
|
-
MultiModelConfig,
|
|
47
|
-
ProviderConfig,
|
|
48
|
-
TaskSpec,
|
|
49
|
-
RunResult,
|
|
50
|
-
RunStatus,
|
|
51
|
-
Tier,
|
|
52
|
-
Capability,
|
|
53
|
-
CostTier,
|
|
54
|
-
Effort,
|
|
55
|
-
SandboxPolicy,
|
|
56
|
-
} from '@zhixuan92/multi-model-agent-core';
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Subpath exports are available for tree-shaking-friendly imports:
|
|
60
|
-
|
|
61
|
-
| Subpath | What |
|
|
62
|
-
| --- | --- |
|
|
63
|
-
| `./config/schema` | `parseConfig`, `multiModelConfigSchema` |
|
|
64
|
-
| `./config/load` | `loadConfigFromFile` |
|
|
65
|
-
| `./routing/capabilities` | base provider capability table |
|
|
66
|
-
| `./routing/model-profiles` | tier/cost defaults per model name prefix |
|
|
67
|
-
| `./routing/select-provider-for-task` | routing decision |
|
|
68
|
-
| `./routing/get-provider-eligibility` | per-provider eligibility breakdown with reasons |
|
|
69
|
-
| `./routing/resolve-task-capabilities` | merges per-task overrides into provider capabilities |
|
|
70
|
-
| `./provider` | `createProvider` factory |
|
|
71
|
-
| `./run-tasks` | `runTasks` parallel dispatcher |
|
|
72
|
-
| `./types` | all shared types |
|
|
18
|
+
import { loadConfigFromFile } from '@zhixuan92/multi-model-agent-core/config/load';
|
|
19
|
+
import { runTasks } from '@zhixuan92/multi-model-agent-core/run-tasks';
|
|
73
20
|
|
|
74
|
-
|
|
21
|
+
const config = await loadConfigFromFile();
|
|
75
22
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
providers: {
|
|
81
|
-
claude: { type: 'claude', model: 'claude-sonnet-4-6' },
|
|
82
|
-
codex: { type: 'codex', model: 'gpt-5-codex' },
|
|
83
|
-
},
|
|
84
|
-
defaults: { maxTurns: 200, timeoutMs: 600_000, tools: 'full' },
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const results = await runTasks(
|
|
88
|
-
[
|
|
89
|
-
{ prompt: 'Refactor auth.ts to use JWT.', tier: 'reasoning', requiredCapabilities: ['file_read', 'file_write'] },
|
|
90
|
-
{ prompt: 'List all .ts files.', tier: 'trivial', requiredCapabilities: ['glob'] },
|
|
91
|
-
],
|
|
92
|
-
config,
|
|
93
|
-
);
|
|
23
|
+
const results = await runTasks([
|
|
24
|
+
{ prompt: 'Refactor auth.ts to use JWT.', agentType: 'complex' },
|
|
25
|
+
{ prompt: 'Write unit tests for auth module.', agentType: 'standard' },
|
|
26
|
+
], config);
|
|
94
27
|
|
|
95
28
|
for (const r of results) {
|
|
96
|
-
console.log(r.status, r.output);
|
|
29
|
+
console.log(r.status, r.usage.costUSD, r.output);
|
|
97
30
|
}
|
|
98
31
|
```
|
|
99
32
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## Sandbox
|
|
103
|
-
|
|
104
|
-
File tools enforce `sandboxPolicy: 'cwd-only'` by default — paths must resolve (via `fs.realpath`) inside the task's `cwd`. `runShell` is hard-disabled under `cwd-only`. `readFile` rejects targets larger than 50 MiB and `writeFile` rejects content larger than 100 MiB before touching memory or disk.
|
|
105
|
-
|
|
106
|
-
## Updating
|
|
107
|
-
|
|
108
|
-
Bump via `npm install @zhixuan92/multi-model-agent-core@latest` (or `npm update`). The package is on **0.x semver**: any MINOR bump (`0.2.x → 0.3.0`) may change the config schema, the `runTasks` task shape, or exported types. PATCH bumps (`0.3.0 → 0.3.1`) are strictly backwards-compatible bug fixes.
|
|
33
|
+
## What's inside
|
|
109
34
|
|
|
110
|
-
|
|
35
|
+
- **Provider runners** — Claude, Codex, and any OpenAI-compatible endpoint
|
|
36
|
+
- **Routing engine** — capability filter → agent type → cheapest qualifier
|
|
37
|
+
- **`runTasks`** — parallel dispatch, returns per-task results with usage, cost, files touched, status, and escalation log
|
|
38
|
+
- **Reviewed lifecycle** — spec review + quality review by a different agent
|
|
39
|
+
- **Config schema** — Zod-validated, same contract as the MCP server
|
|
40
|
+
- **Sandboxed tools** — `readFile`, `writeFile`, `grep`, `glob`, `listFiles`, `runShell` with `cwd-only` confinement
|
|
111
41
|
|
|
112
|
-
|
|
42
|
+
## Subpath exports
|
|
113
43
|
|
|
114
|
-
|
|
44
|
+
| Subpath | What |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `./config/schema` | `parseConfig`, `multiModelConfigSchema` |
|
|
47
|
+
| `./config/load` | `loadConfigFromFile` |
|
|
48
|
+
| `./routing/select-provider-for-task` | Routing decision |
|
|
49
|
+
| `./routing/get-provider-eligibility` | Per-provider eligibility with reasons |
|
|
50
|
+
| `./routing/capabilities` | Base provider capability table |
|
|
51
|
+
| `./routing/model-profiles` | Cost/tier defaults per model |
|
|
52
|
+
| `./provider` | `createProvider` factory |
|
|
53
|
+
| `./run-tasks` | `runTasks` parallel dispatcher |
|
|
54
|
+
| `./types` | All shared types |
|
|
115
55
|
|
|
116
|
-
Full
|
|
56
|
+
## Full documentation
|
|
117
57
|
|
|
118
|
-
→
|
|
58
|
+
→ **[github.com/zhixuan312/multi-model-agent](https://github.com/zhixuan312/multi-model-agent)**
|
|
119
59
|
|
|
120
60
|
## License
|
|
121
61
|
|
package/dist/config/load.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import { multiModelConfigSchema } from './schema.js';
|
|
3
3
|
/**
|
|
4
|
-
* Warn if any openai-compatible
|
|
5
|
-
* inline `apiKey` instead of using `apiKeyEnv`. The schema permits both
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Warn if any openai-compatible agent in the parsed config carries an
|
|
5
|
+
* inline `apiKey` instead of using `apiKeyEnv`. The schema permits both,
|
|
6
|
+
* but storing a plaintext API key in a config file that may end up in a
|
|
7
|
+
* backup, dotfile repo, or git is a footgun. We surface the issue at load
|
|
8
|
+
* time, once, so the operator notices.
|
|
9
9
|
*/
|
|
10
10
|
function warnOnInlineApiKey(config, configPath) {
|
|
11
11
|
const offenders = [];
|
|
12
|
-
for (const [name,
|
|
13
|
-
if (
|
|
14
|
-
typeof
|
|
12
|
+
for (const [name, agent] of Object.entries(config.agents)) {
|
|
13
|
+
if (agent.type === 'openai-compatible' &&
|
|
14
|
+
typeof agent.apiKey === 'string') {
|
|
15
15
|
offenders.push(name);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
if (offenders.length > 0) {
|
|
19
19
|
// eslint-disable-next-line no-console
|
|
20
20
|
console.warn(`[multi-model-agent] WARNING: ${configPath} stores an inline \`apiKey\` for ` +
|
|
21
|
-
`
|
|
21
|
+
`agent(s): ${offenders.join(', ')}. Prefer \`apiKeyEnv\` and read the key ` +
|
|
22
22
|
`from an environment variable so it never lands in version control.`);
|
|
23
23
|
}
|
|
24
24
|
}
|
package/dist/config/load.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,MAAwB,EAAE,UAAkB;IACtE,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,MAAwB,EAAE,UAAkB;IACtE,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1D,IACE,KAAK,CAAC,IAAI,KAAK,mBAAmB;YAClC,OAAQ,KAA8B,CAAC,MAAM,KAAK,QAAQ,EAC1D,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,sCAAsC;QACtC,OAAO,CAAC,IAAI,CACV,gCAAgC,UAAU,mCAAmC;YAC3E,aAAa,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,0CAA0C;YAC3E,oEAAoE,CACvE,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAY;IACnD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACvC,IAAI,GAAG,EAAE,CAAC;gBACR,MAAM,CAAC,IAAI,KAAK,CAAC,0BAA0B,IAAI,EAAE,CAAC,CAAC,CAAC;gBACpD,OAAO;YACT,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAC7B,MAAM,MAAM,GAAG,sBAAsB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACjD,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBACjC,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,KAAK,CAAC,qBAAqB,IAAI,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAChG,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,285 +1,179 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { MultiModelConfig } from '../types.js';
|
|
3
|
-
export declare const codexProviderConfigSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<"codex">;
|
|
5
|
-
model: z.ZodString;
|
|
6
|
-
effort: z.ZodOptional<z.ZodEnum<{
|
|
7
|
-
high: "high";
|
|
8
|
-
medium: "medium";
|
|
9
|
-
low: "low";
|
|
10
|
-
none: "none";
|
|
11
|
-
}>>;
|
|
12
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
15
|
-
none: "none";
|
|
16
|
-
"cwd-only": "cwd-only";
|
|
17
|
-
}>>;
|
|
18
|
-
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
19
|
-
web_search: "web_search";
|
|
20
|
-
image_generation: "image_generation";
|
|
21
|
-
code_interpreter: "code_interpreter";
|
|
22
|
-
}>>>;
|
|
23
|
-
costTier: z.ZodOptional<z.ZodEnum<{
|
|
24
|
-
high: "high";
|
|
25
|
-
medium: "medium";
|
|
26
|
-
low: "low";
|
|
27
|
-
free: "free";
|
|
28
|
-
}>>;
|
|
29
|
-
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
30
|
-
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
export declare const claudeProviderConfigSchema: z.ZodObject<{
|
|
34
|
-
type: z.ZodLiteral<"claude">;
|
|
35
|
-
model: z.ZodString;
|
|
36
|
-
effort: z.ZodOptional<z.ZodEnum<{
|
|
37
|
-
high: "high";
|
|
38
|
-
medium: "medium";
|
|
39
|
-
low: "low";
|
|
40
|
-
none: "none";
|
|
41
|
-
}>>;
|
|
42
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
43
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
44
|
-
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
45
|
-
none: "none";
|
|
46
|
-
"cwd-only": "cwd-only";
|
|
47
|
-
}>>;
|
|
48
|
-
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
49
|
-
web_search: "web_search";
|
|
50
|
-
image_generation: "image_generation";
|
|
51
|
-
code_interpreter: "code_interpreter";
|
|
52
|
-
}>>>;
|
|
53
|
-
costTier: z.ZodOptional<z.ZodEnum<{
|
|
54
|
-
high: "high";
|
|
55
|
-
medium: "medium";
|
|
56
|
-
low: "low";
|
|
57
|
-
free: "free";
|
|
58
|
-
}>>;
|
|
59
|
-
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
60
|
-
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
61
|
-
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
62
|
-
}, z.core.$strip>;
|
|
63
|
-
export declare const openAICompatibleProviderConfigSchema: z.ZodObject<{
|
|
64
|
-
type: z.ZodLiteral<"openai-compatible">;
|
|
65
|
-
model: z.ZodString;
|
|
66
|
-
baseUrl: z.ZodString;
|
|
67
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
|
68
|
-
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
69
|
-
effort: z.ZodOptional<z.ZodEnum<{
|
|
70
|
-
high: "high";
|
|
71
|
-
medium: "medium";
|
|
72
|
-
low: "low";
|
|
73
|
-
none: "none";
|
|
74
|
-
}>>;
|
|
75
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
76
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
77
|
-
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
78
|
-
none: "none";
|
|
79
|
-
"cwd-only": "cwd-only";
|
|
80
|
-
}>>;
|
|
81
|
-
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
82
|
-
web_search: "web_search";
|
|
83
|
-
image_generation: "image_generation";
|
|
84
|
-
code_interpreter: "code_interpreter";
|
|
85
|
-
}>>>;
|
|
86
|
-
costTier: z.ZodOptional<z.ZodEnum<{
|
|
87
|
-
high: "high";
|
|
88
|
-
medium: "medium";
|
|
89
|
-
low: "low";
|
|
90
|
-
free: "free";
|
|
91
|
-
}>>;
|
|
92
|
-
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
93
|
-
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
94
|
-
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
95
|
-
}, z.core.$strip>;
|
|
96
|
-
export declare const providerConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
-
type: z.ZodLiteral<"codex">;
|
|
98
|
-
model: z.ZodString;
|
|
99
|
-
effort: z.ZodOptional<z.ZodEnum<{
|
|
100
|
-
high: "high";
|
|
101
|
-
medium: "medium";
|
|
102
|
-
low: "low";
|
|
103
|
-
none: "none";
|
|
104
|
-
}>>;
|
|
105
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
106
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
107
|
-
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
108
|
-
none: "none";
|
|
109
|
-
"cwd-only": "cwd-only";
|
|
110
|
-
}>>;
|
|
111
|
-
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
112
|
-
web_search: "web_search";
|
|
113
|
-
image_generation: "image_generation";
|
|
114
|
-
code_interpreter: "code_interpreter";
|
|
115
|
-
}>>>;
|
|
116
|
-
costTier: z.ZodOptional<z.ZodEnum<{
|
|
117
|
-
high: "high";
|
|
118
|
-
medium: "medium";
|
|
119
|
-
low: "low";
|
|
120
|
-
free: "free";
|
|
121
|
-
}>>;
|
|
122
|
-
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
123
|
-
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
124
|
-
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
125
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
-
type: z.ZodLiteral<"claude">;
|
|
127
|
-
model: z.ZodString;
|
|
128
|
-
effort: z.ZodOptional<z.ZodEnum<{
|
|
129
|
-
high: "high";
|
|
130
|
-
medium: "medium";
|
|
131
|
-
low: "low";
|
|
132
|
-
none: "none";
|
|
133
|
-
}>>;
|
|
134
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
135
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
136
|
-
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
137
|
-
none: "none";
|
|
138
|
-
"cwd-only": "cwd-only";
|
|
139
|
-
}>>;
|
|
140
|
-
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
141
|
-
web_search: "web_search";
|
|
142
|
-
image_generation: "image_generation";
|
|
143
|
-
code_interpreter: "code_interpreter";
|
|
144
|
-
}>>>;
|
|
145
|
-
costTier: z.ZodOptional<z.ZodEnum<{
|
|
146
|
-
high: "high";
|
|
147
|
-
medium: "medium";
|
|
148
|
-
low: "low";
|
|
149
|
-
free: "free";
|
|
150
|
-
}>>;
|
|
151
|
-
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
152
|
-
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
153
|
-
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
155
|
-
type: z.ZodLiteral<"openai-compatible">;
|
|
156
|
-
model: z.ZodString;
|
|
157
|
-
baseUrl: z.ZodString;
|
|
158
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
|
159
|
-
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
160
|
-
effort: z.ZodOptional<z.ZodEnum<{
|
|
161
|
-
high: "high";
|
|
162
|
-
medium: "medium";
|
|
163
|
-
low: "low";
|
|
164
|
-
none: "none";
|
|
165
|
-
}>>;
|
|
166
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
167
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
168
|
-
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
169
|
-
none: "none";
|
|
170
|
-
"cwd-only": "cwd-only";
|
|
171
|
-
}>>;
|
|
172
|
-
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
173
|
-
web_search: "web_search";
|
|
174
|
-
image_generation: "image_generation";
|
|
175
|
-
code_interpreter: "code_interpreter";
|
|
176
|
-
}>>>;
|
|
177
|
-
costTier: z.ZodOptional<z.ZodEnum<{
|
|
178
|
-
high: "high";
|
|
179
|
-
medium: "medium";
|
|
180
|
-
low: "low";
|
|
181
|
-
free: "free";
|
|
182
|
-
}>>;
|
|
183
|
-
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
184
|
-
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
185
|
-
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
186
|
-
}, z.core.$strip>], "type">;
|
|
187
3
|
export declare const multiModelConfigSchema: z.ZodObject<{
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
4
|
+
agents: z.ZodObject<{
|
|
5
|
+
standard: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
model: z.ZodString;
|
|
7
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
8
|
+
web_search: "web_search";
|
|
9
|
+
web_fetch: "web_fetch";
|
|
10
|
+
}>>>;
|
|
11
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
high: "high";
|
|
13
|
+
medium: "medium";
|
|
14
|
+
low: "low";
|
|
15
|
+
none: "none";
|
|
16
|
+
}>>;
|
|
17
|
+
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
none: "none";
|
|
23
|
+
"cwd-only": "cwd-only";
|
|
24
|
+
}>>;
|
|
25
|
+
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
type: z.ZodLiteral<"openai-compatible">;
|
|
27
|
+
baseUrl: z.ZodString;
|
|
28
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
29
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
30
|
+
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
31
|
+
web_search: "web_search";
|
|
32
|
+
}>>>;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
model: z.ZodString;
|
|
35
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
36
|
+
web_search: "web_search";
|
|
37
|
+
web_fetch: "web_fetch";
|
|
38
|
+
}>>>;
|
|
39
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
high: "high";
|
|
41
|
+
medium: "medium";
|
|
42
|
+
low: "low";
|
|
43
|
+
none: "none";
|
|
44
|
+
}>>;
|
|
45
|
+
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
none: "none";
|
|
51
|
+
"cwd-only": "cwd-only";
|
|
52
|
+
}>>;
|
|
53
|
+
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
type: z.ZodLiteral<"claude">;
|
|
55
|
+
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
56
|
+
web_search: "web_search";
|
|
57
|
+
image_generation: "image_generation";
|
|
58
|
+
code_interpreter: "code_interpreter";
|
|
59
|
+
}>>>;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
model: z.ZodString;
|
|
62
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
63
|
+
web_search: "web_search";
|
|
64
|
+
web_fetch: "web_fetch";
|
|
65
|
+
}>>>;
|
|
66
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
high: "high";
|
|
68
|
+
medium: "medium";
|
|
69
|
+
low: "low";
|
|
70
|
+
none: "none";
|
|
71
|
+
}>>;
|
|
72
|
+
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
none: "none";
|
|
78
|
+
"cwd-only": "cwd-only";
|
|
79
|
+
}>>;
|
|
80
|
+
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
type: z.ZodLiteral<"codex">;
|
|
82
|
+
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
83
|
+
web_search: "web_search";
|
|
84
|
+
image_generation: "image_generation";
|
|
85
|
+
code_interpreter: "code_interpreter";
|
|
86
|
+
}>>>;
|
|
87
|
+
}, z.core.$strict>], "type">;
|
|
88
|
+
complex: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
89
|
+
model: z.ZodString;
|
|
90
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
91
|
+
web_search: "web_search";
|
|
92
|
+
web_fetch: "web_fetch";
|
|
93
|
+
}>>>;
|
|
94
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
high: "high";
|
|
96
|
+
medium: "medium";
|
|
97
|
+
low: "low";
|
|
98
|
+
none: "none";
|
|
99
|
+
}>>;
|
|
100
|
+
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
none: "none";
|
|
106
|
+
"cwd-only": "cwd-only";
|
|
107
|
+
}>>;
|
|
108
|
+
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
type: z.ZodLiteral<"openai-compatible">;
|
|
110
|
+
baseUrl: z.ZodString;
|
|
111
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
112
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
113
|
+
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
114
|
+
web_search: "web_search";
|
|
115
|
+
}>>>;
|
|
116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
117
|
+
model: z.ZodString;
|
|
118
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
119
|
+
web_search: "web_search";
|
|
120
|
+
web_fetch: "web_fetch";
|
|
121
|
+
}>>>;
|
|
122
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
high: "high";
|
|
124
|
+
medium: "medium";
|
|
125
|
+
low: "low";
|
|
126
|
+
none: "none";
|
|
127
|
+
}>>;
|
|
128
|
+
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
133
|
+
none: "none";
|
|
134
|
+
"cwd-only": "cwd-only";
|
|
135
|
+
}>>;
|
|
136
|
+
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
type: z.ZodLiteral<"claude">;
|
|
138
|
+
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
139
|
+
web_search: "web_search";
|
|
140
|
+
image_generation: "image_generation";
|
|
141
|
+
code_interpreter: "code_interpreter";
|
|
142
|
+
}>>>;
|
|
143
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
144
|
+
model: z.ZodString;
|
|
145
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
146
|
+
web_search: "web_search";
|
|
147
|
+
web_fetch: "web_fetch";
|
|
148
|
+
}>>>;
|
|
149
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
high: "high";
|
|
151
|
+
medium: "medium";
|
|
152
|
+
low: "low";
|
|
153
|
+
none: "none";
|
|
154
|
+
}>>;
|
|
155
|
+
inputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
outputCostPerMTok: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
sandboxPolicy: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
none: "none";
|
|
161
|
+
"cwd-only": "cwd-only";
|
|
162
|
+
}>>;
|
|
163
|
+
inputTokenSoftLimit: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
type: z.ZodLiteral<"codex">;
|
|
165
|
+
hostedTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
166
|
+
web_search: "web_search";
|
|
167
|
+
image_generation: "image_generation";
|
|
168
|
+
code_interpreter: "code_interpreter";
|
|
169
|
+
}>>>;
|
|
170
|
+
}, z.core.$strict>], "type">;
|
|
171
|
+
}, z.core.$strip>;
|
|
279
172
|
defaults: z.ZodDefault<z.ZodObject<{
|
|
280
173
|
maxTurns: z.ZodDefault<z.ZodNumber>;
|
|
281
174
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
282
175
|
tools: z.ZodDefault<z.ZodEnum<{
|
|
176
|
+
readonly: "readonly";
|
|
283
177
|
none: "none";
|
|
284
178
|
full: "full";
|
|
285
179
|
}>>;
|