@oh-my-ai-sdk/omakase 0.2.0-beta.1 → 0.2.0-beta.2
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 +147 -8
- package/dist/agent-runtime/adapters/harness-claude-code/bridge/index.mjs +1849 -0
- package/dist/agent-runtime/adapters/harness-claude-code/bridge/package.json +13 -0
- package/dist/agent-runtime/adapters/harness-claude-code/bridge/pnpm-lock.yaml +1041 -0
- package/dist/agent-runtime/adapters/harness-claude-code/bridge/pnpm-workspace.yaml +2 -0
- package/dist/agent-runtime/adapters/harness-claude-code/index.js +20386 -0
- package/dist/agent-runtime/adapters/harness-codex/bridge/index.mjs +1579 -0
- package/dist/agent-runtime/adapters/harness-codex/bridge/package.json +10 -0
- package/dist/agent-runtime/adapters/harness-codex/bridge/pnpm-lock.yaml +110 -0
- package/dist/agent-runtime/adapters/harness-codex/index.js +19608 -0
- package/dist/agent-runtime/adapters/harness-opencode/bridge/host-tool-mcp.mjs +101 -0
- package/dist/agent-runtime/adapters/harness-opencode/bridge/index.mjs +3009 -0
- package/dist/agent-runtime/adapters/harness-opencode/bridge/package.json +13 -0
- package/dist/agent-runtime/adapters/harness-opencode/bridge/pnpm-lock.yaml +933 -0
- package/dist/agent-runtime/adapters/harness-opencode/bridge/pnpm-workspace.yaml +2 -0
- package/dist/agent-runtime/adapters/harness-opencode/index.js +19940 -0
- package/dist/agent-runtime/licenses/@ai-sdk/gateway/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness-acp/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness-claude-code/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness-codex/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness-cursor/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness-grok-build/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness-opencode/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/harness-pi/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@ai-sdk/provider/LICENSE +13 -0
- package/dist/agent-runtime/licenses/@anthropic-ai/sdk/LICENSE +8 -0
- package/dist/agent-runtime/licenses/@archeism/local-fs/LICENSE +21 -0
- package/dist/agent-runtime/licenses/@google/genai/LICENSE +202 -0
- package/dist/agent-runtime/licenses/@oh-my-ai-sdk/omakase/LICENSE +201 -0
- package/dist/agent-runtime/licenses/@silvia-odwyer/photon-node/LICENSE.md +201 -0
- package/dist/agent-runtime/licenses/@vercel/oidc/LICENSE +202 -0
- package/dist/agent-runtime/licenses/@workflow/serde/LICENSE.md +3 -0
- package/dist/agent-runtime/licenses/agent-base/LICENSE +22 -0
- package/dist/agent-runtime/licenses/ai/LICENSE +13 -0
- package/dist/agent-runtime/licenses/base64-js/LICENSE +21 -0
- package/dist/agent-runtime/licenses/buffer-equal-constant-time/LICENSE.txt +12 -0
- package/dist/agent-runtime/licenses/cross-spawn/LICENSE +21 -0
- package/dist/agent-runtime/licenses/debug/LICENSE +20 -0
- package/dist/agent-runtime/licenses/ecdsa-sig-formatter/LICENSE +201 -0
- package/dist/agent-runtime/licenses/eventsource-parser/LICENSE +21 -0
- package/dist/agent-runtime/licenses/extend/LICENSE +23 -0
- package/dist/agent-runtime/licenses/fetch-blob/LICENSE +21 -0
- package/dist/agent-runtime/licenses/formdata-polyfill/LICENSE +21 -0
- package/dist/agent-runtime/licenses/gaxios/LICENSE +202 -0
- package/dist/agent-runtime/licenses/gcp-metadata/LICENSE +202 -0
- package/dist/agent-runtime/licenses/google-auth-library/LICENSE +202 -0
- package/dist/agent-runtime/licenses/google-logging-utils/LICENSE +202 -0
- package/dist/agent-runtime/licenses/graceful-fs/LICENSE +15 -0
- package/dist/agent-runtime/licenses/grok-mermaid/LICENSE +205 -0
- package/dist/agent-runtime/licenses/highlight.js/LICENSE +29 -0
- package/dist/agent-runtime/licenses/hosted-git-info/LICENSE +13 -0
- package/dist/agent-runtime/licenses/https-proxy-agent/LICENSE +22 -0
- package/dist/agent-runtime/licenses/ignore/LICENSE-MIT +21 -0
- package/dist/agent-runtime/licenses/isexe/LICENSE +15 -0
- package/dist/agent-runtime/licenses/jiti/LICENSE +21 -0
- package/dist/agent-runtime/licenses/json-bigint/LICENSE +20 -0
- package/dist/agent-runtime/licenses/jwa/LICENSE +17 -0
- package/dist/agent-runtime/licenses/jws/LICENSE +17 -0
- package/dist/agent-runtime/licenses/marked/LICENSE +44 -0
- package/dist/agent-runtime/licenses/node-domexception/LICENSE +21 -0
- package/dist/agent-runtime/licenses/node-fetch/LICENSE.md +22 -0
- package/dist/agent-runtime/licenses/openai/LICENSE +201 -0
- package/dist/agent-runtime/licenses/partial-json/LICENSE +21 -0
- package/dist/agent-runtime/licenses/proper-lockfile/LICENSE +21 -0
- package/dist/agent-runtime/licenses/safe-buffer/LICENSE +21 -0
- package/dist/agent-runtime/licenses/semver/LICENSE +15 -0
- package/dist/agent-runtime/licenses/signal-exit/LICENSE.txt +16 -0
- package/dist/agent-runtime/licenses/undici/LICENSE +21 -0
- package/dist/agent-runtime/licenses/web-streams-polyfill/LICENSE +22 -0
- package/dist/agent-runtime/licenses/which/LICENSE +15 -0
- package/dist/agent-runtime/licenses/yaml/LICENSE +13 -0
- package/dist/agent-runtime/licenses/zod/LICENSE +21 -0
- package/dist/agent-runtime/manifest.json +53 -0
- package/dist/agent-runtime/versions.json +83 -0
- package/dist/agent-runtime/worker.mjs +339169 -0
- package/dist/agents.d.ts +37 -0
- package/dist/agents.js +417 -0
- package/dist/cli.js +2 -1
- package/dist/code-mode.js +2 -2
- package/dist/durable-worker/versions.json +1 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -11,9 +11,10 @@ configured URI sources. No model-facing registry-management tools.
|
|
|
11
11
|
|
|
12
12
|
## CLI setup
|
|
13
13
|
|
|
14
|
-
Requires Node.
|
|
15
|
-
Claude/Codex session supplies
|
|
16
|
-
|
|
14
|
+
Requires Node.js 22.13 or newer. The host itself needs no model key; your calling
|
|
15
|
+
Claude/Codex session supplies its own model. Registered child agents additionally
|
|
16
|
+
need Bun, their bootstrap prerequisites, and their own configured credentials
|
|
17
|
+
(see below). Configuration stays outside harness MCP registration.
|
|
17
18
|
|
|
18
19
|
For a local beta candidate, install its packed `.tgz` with `bun add /absolute/path/to/archive.tgz`
|
|
19
20
|
and configure your MCP client with the absolute path to that installation's
|
|
@@ -147,9 +148,146 @@ remains alive. Closing the server stops its worker and drains admitted handlers.
|
|
|
147
148
|
Repeating `cell` creates a new intent, **not** a resume request; tools still need
|
|
148
149
|
application idempotency or reconciliation for external effects.
|
|
149
150
|
|
|
150
|
-
Keep ordinary mode for work that does not need these checkpoints.
|
|
151
|
-
|
|
151
|
+
Keep ordinary mode for work that does not need these checkpoints. Ordinary
|
|
152
|
+
execution shares its configured invocation deadline across guest code and tool
|
|
153
|
+
waits (120 seconds by default); durable mode is the long-running path.
|
|
154
|
+
Registered agent runs are available below; the old Flow DSL is not imported.
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## Registered agents in ordinary or durable cells
|
|
158
|
+
|
|
159
|
+
`@oh-my-ai-sdk/omakase/agents` exports `mountAgents(host, options)` and
|
|
160
|
+
`createAgentHost(options)`. Registration reuses Flow's `agent.yaml` directories,
|
|
161
|
+
named profiles, ordinary AI SDK tools under `tools/`, and runtime-download cache.
|
|
162
|
+
There is no new `run` DSL or separate agent MCP server: each trusted registration
|
|
163
|
+
becomes `agents.NAME({ prompt, workspaceDir? })` in the existing cell catalog.
|
|
164
|
+
|
|
165
|
+
The agent feature needs **Bun >=1.3.14** on PATH in addition to Node. Bridge-backed
|
|
166
|
+
Claude, Codex and OpenCode bootstraps also need **pnpm** and first-use registry
|
|
167
|
+
access; `bun add --global pnpm@10.32.1` installs the tested prerequisite. Adapters
|
|
168
|
+
and their pinned bootstrap recipes ship inside Omakase. The native CLI/SDK
|
|
169
|
+
dependencies are downloaded on first use, not bundled into the MCP executable.
|
|
170
|
+
Flow's content-addressed `~/.cache/ai-sdk-harness` store shares those downloads;
|
|
171
|
+
`AI_SDK_HARNESS_STORE` selects a different cache. Parallel runs still have
|
|
172
|
+
separate sessions and processes, not shared model credentials.
|
|
173
|
+
|
|
174
|
+
For Claude with GLM, create `.omakase/agents/reviewer/agent.yaml` in your project:
|
|
175
|
+
|
|
176
|
+
```yaml
|
|
177
|
+
name: reviewer
|
|
178
|
+
harness: glm
|
|
179
|
+
permissionMode: allow-reads
|
|
180
|
+
activeTools: [read]
|
|
181
|
+
harnesses:
|
|
182
|
+
glm:
|
|
183
|
+
harness: claude-code
|
|
184
|
+
options:
|
|
185
|
+
auth: direct
|
|
186
|
+
model: glm-5.3
|
|
187
|
+
env:
|
|
188
|
+
ANTHROPIC_BASE_URL: https://api.z.ai/api/anthropic
|
|
189
|
+
ANTHROPIC_AUTH_TOKEN: ${ZHIPU_API_KEY}
|
|
190
|
+
sandbox:
|
|
191
|
+
type: local-persistent
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Supply `ZHIPU_API_KEY` to the MCP server environment; alternatively use a
|
|
195
|
+
`${file:/absolute/private/key-file}` reference. Do not commit credential values.
|
|
196
|
+
An adjacent `instructions.md` supplies the agent's standing instructions.
|
|
197
|
+
Other existing Flow names, directory references and `name#profile` references
|
|
198
|
+
resolve the same way; callers cannot choose manifests, models or environment
|
|
199
|
+
variables through tool arguments.
|
|
200
|
+
|
|
201
|
+
`activeTools` is the native SDK's optional capability allowlist, not a prompt.
|
|
202
|
+
This reviewer exposes only file reads. Omit it for the harness's usual tool set,
|
|
203
|
+
or list the built-in/custom tools the role actually needs. Approval policy is
|
|
204
|
+
separate; restricting capabilities does not grant approval or sandbox the agent.
|
|
205
|
+
|
|
206
|
+
Create `host.config.mjs` at that project's root:
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
import { fileURLToPath } from 'node:url';
|
|
210
|
+
|
|
211
|
+
export default async ({ createAgentHost }) => createAgentHost({
|
|
212
|
+
workspaceDir: fileURLToPath(new URL('.', import.meta.url)),
|
|
213
|
+
agents: {
|
|
214
|
+
reviewer: { ref: 'reviewer#glm' },
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Connect the same MCP server as before, now using this config:
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
claude mcp add --scope project --transport stdio omakase -- \
|
|
223
|
+
npx -y @oh-my-ai-sdk/omakase@beta --config "$PWD/host.config.mjs"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Long agent sessions also need a suitable **caller's MCP request deadline**.
|
|
227
|
+
For example, start Claude Code with `MCP_TOOL_TIMEOUT=900000 claude` for a
|
|
228
|
+
15-minute deadline. Set this on the caller process, not in the MCP server's
|
|
229
|
+
environment; other harnesses have their own request limits.
|
|
230
|
+
|
|
231
|
+
Ask the caller to execute this body with `execution: "durable"`:
|
|
232
|
+
|
|
233
|
+
```ts
|
|
234
|
+
const reviews = await Promise.all(
|
|
235
|
+
['README.md', 'package.json'].map(path =>
|
|
236
|
+
agents.reviewer({ prompt: `Inspect ${path}; report concrete issues.` }),
|
|
237
|
+
),
|
|
238
|
+
);
|
|
239
|
+
const synthesis = await agents.reviewer({
|
|
240
|
+
prompt: `Combine these actual findings: ${JSON.stringify(reviews)}`,
|
|
241
|
+
});
|
|
242
|
+
return { reviews, synthesis };
|
|
243
|
+
```
|
|
152
244
|
|
|
245
|
+
Without `outputSchema`, a registered tool returns `{ sessionId, text }`. Set a
|
|
246
|
+
registration's `outputSchema` to a concrete JSON Schema to get that structured
|
|
247
|
+
value **directly** instead; its exact schema appears in the catalog and cell
|
|
248
|
+
type checker. Native/answer-tool schema support depends on the selected harness;
|
|
249
|
+
unsupported schemas fail rather than falling back to unvalidated prose.
|
|
250
|
+
|
|
251
|
+
Omit `workspaceDir` to use the registered workspace. A per-call override must
|
|
252
|
+
resolve inside that root, including symlink resolution. This selects the working
|
|
253
|
+
directory; it is not filesystem confinement or a hostile-code security boundary.
|
|
254
|
+
Child capabilities and permissions remain those of the trusted manifest.
|
|
255
|
+
Workers inherit the MCP server's environment; a manifest's `env` is not a
|
|
256
|
+
credential allowlist. Use a suitably restricted server environment.
|
|
257
|
+
|
|
258
|
+
To retain skills or other tools, call `mountAgents` on your existing host. CLI
|
|
259
|
+
factories receive both helpers alongside `createSkillsHost`; native applications
|
|
260
|
+
import them from `/agents` and use the same host snapshots/cell frontends. Direct
|
|
261
|
+
snapshot callers should provide stable `sessionId`/`harnessId` labels: repeated
|
|
262
|
+
tool IDs within that context denote the same intent, and changed input conflicts.
|
|
263
|
+
|
|
264
|
+
**Recovery and limits:** WDK-worker replacement reattaches still-live agent runs
|
|
265
|
+
and reuses completed agent results. It does not restart an interrupted native
|
|
266
|
+
agent or recover after whole-MCP-server death. Failed/unknown intents are not
|
|
267
|
+
silently rerun. Runs retain private state under `~/.local/share/omakase/agents`
|
|
268
|
+
(`stateDir` or `OMAKASE_AGENT_STATE_DIR` overrides it). Cancellation stops owned
|
|
269
|
+
processes. A separate parent-liveness pipe also makes host death stop the worker
|
|
270
|
+
and its owned native processes; it does not recover them or undo effects.
|
|
271
|
+
Retained state may need reconciliation.
|
|
272
|
+
`execution.json` records last-observed diagnostics, not liveness or a complete
|
|
273
|
+
effect journal: abrupt cancellation can leave it marked `running`. Host receipts
|
|
274
|
+
record the invocation outcome. Retention is explicit; no automatic pruning runs.
|
|
275
|
+
The live host also retains invocation inputs and full settled results in memory
|
|
276
|
+
for its lifetime, including ordinary calls. This beta has no bounded replay
|
|
277
|
+
cache. Evicting identities blindly could repeat effects; memory grows with the
|
|
278
|
+
number and size of calls. Retire only drained hosts, since host replacement
|
|
279
|
+
does not recover active work.
|
|
280
|
+
The default executable is `bun`; `OMAKASE_AGENT_RUNTIME_EXECUTABLE` can select an
|
|
281
|
+
absolute Bun path.
|
|
282
|
+
|
|
283
|
+
This ports registration and running agents, not Flow's verb set. JS loops,
|
|
284
|
+
branches, `Promise.all`, dependent calls and unrelated host tools remain available.
|
|
285
|
+
Live steering, `ask`/`pause`, and forwarding a child agent's human approval are
|
|
286
|
+
deferred. Automatic native decisions are honored; an unresolved child approval
|
|
287
|
+
fails closed. The cell host's existing approval transport is unchanged.
|
|
288
|
+
The private OMP adapter is not bundled: OMP **as a child backend** requires its
|
|
289
|
+
separately installed/built adapter; using an MCP-capable harness as the caller
|
|
290
|
+
does not require that child adapter.
|
|
153
291
|
|
|
154
292
|
## Skill reads through Code Mode
|
|
155
293
|
|
|
@@ -210,9 +348,10 @@ not claimed.
|
|
|
210
348
|
|
|
211
349
|
Exports: root host/caller/reader APIs, `/mcp-sdk` for the official SDK client,
|
|
212
350
|
`/skills-server` for the standalone service, `/skills-host` for the bundled host,
|
|
213
|
-
and `/workflow` plus `/workflow-host`
|
|
214
|
-
|
|
215
|
-
|
|
351
|
+
`/agents` for registered native agent runs, and `/workflow` plus `/workflow-host`
|
|
352
|
+
for Workflow-backed cells. Custom ESM CLI factories can use the injected
|
|
353
|
+
`createSkillsHost`, `createAgentHost` and `mountAgents` helpers without resolving
|
|
354
|
+
Omakase imports from the npx cache.
|
|
216
355
|
|
|
217
356
|
## Bounds and release status
|
|
218
357
|
|