@zhixuan92/multi-model-agent-core 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/README.md +18 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,16 @@
1
1
  # @zhixuan92/multi-model-agent-core
2
2
 
3
- Runtime library for [`multi-model-agent`](https://github.com/zhixuan312/multi-model-agent): provider runners (Claude, Codex, OpenAI-compatible), routing logic (capability / quality tier / cost), config schema, and a sandboxed file/shell tool layer.
3
+ **Runtime library for [`multi-model-agent`](https://github.com/zhixuan312/multi-model-agent) import it to run multi-provider agent tasks directly from your own Node program.**
4
4
 
5
- This is the building-block library. If you just want to run the MCP server, install [`@zhixuan92/multi-model-agent-mcp`](https://www.npmjs.com/package/@zhixuan92/multi-model-agent-mcp) instead.
5
+ Use this package when you want to embed the same routing and dispatch logic inside your own process instead of going through an MCP client. It ships:
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.
6
14
 
7
15
  ## Install
8
16
 
@@ -95,6 +103,14 @@ for (const r of results) {
95
103
 
96
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.
97
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.
109
+
110
+ Always skim [`CHANGELOG.md`](https://github.com/zhixuan312/multi-model-agent/blob/HEAD/CHANGELOG.md) before picking up a new MINOR version — if it calls out a schema change, update your config loader and any stored task specs before upgrading. Subpath exports listed above are part of the public API contract and are versioned together with the main entry point.
111
+
112
+ If you also depend on `@zhixuan92/multi-model-agent-mcp`, keep the two packages on matching MINOR versions — the MCP server declares a `^0.X.0` range on this library and mismatched versions can surface as type drift or schema validation errors.
113
+
98
114
  ## Documentation
99
115
 
100
116
  Full docs, configuration reference, supported providers, and the routing matrix live in the project README:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhixuan92/multi-model-agent-core",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Core library for multi-model-agent: provider runners (Claude, Codex, OpenAI-compatible), routing logic, config schema, and tool/sandbox primitives.",