@tekmidian/pai 0.39.0 → 0.40.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 +41 -0
- package/dist/{auto-route-BlWOWT4z.mjs → auto-route-BwzmlW3W.mjs} +2 -2
- package/dist/{auto-route-BlWOWT4z.mjs.map → auto-route-BwzmlW3W.mjs.map} +1 -1
- package/dist/{chain-CTtHligI.mjs → chain-DhVHVnmT.mjs} +263 -791
- package/dist/chain-DhVHVnmT.mjs.map +1 -0
- package/dist/cli/index.mjs +10 -8
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/program.mjs +10 -8
- package/dist/{clusters-wlK0w41E.mjs → clusters-DRHhfli9.mjs} +1 -1
- package/dist/{clusters-wlK0w41E.mjs.map → clusters-DRHhfli9.mjs.map} +1 -1
- package/dist/{config-B64vFg14.mjs → config-D1G9IFpn.mjs} +50 -3
- package/dist/config-D1G9IFpn.mjs.map +1 -0
- package/dist/{config-C_ErGddD.mjs → config-DD52BPB-.mjs} +1 -1
- package/dist/config-Dl8lT4Lu.mjs +527 -0
- package/dist/config-Dl8lT4Lu.mjs.map +1 -0
- package/dist/{context-handover-cache-BpUojjsi.mjs → context-handover-cache-C6_rs7JT.mjs} +112 -24
- package/dist/context-handover-cache-C6_rs7JT.mjs.map +1 -0
- package/dist/daemon/index.mjs +12 -10
- package/dist/daemon/index.mjs.map +1 -1
- package/dist/daemon-BSL9sXxm.mjs +22 -0
- package/dist/{daemon-CTkN_Vn8.mjs → daemon-CpdVUnl_.mjs} +26 -26
- package/dist/{daemon-CTkN_Vn8.mjs.map → daemon-CpdVUnl_.mjs.map} +1 -1
- package/dist/daemon-mcp/index.mjs +127 -6
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/detector-BLVOCiJ_.mjs +5 -0
- package/dist/{detector-Bwk_4Pk4.mjs → detector-smpCm7ku.mjs} +1 -1
- package/dist/{detector-Bwk_4Pk4.mjs.map → detector-smpCm7ku.mjs.map} +1 -1
- package/dist/{factory-A9x-T2Kg.mjs → factory-Bc5EyN54.mjs} +7 -7
- package/dist/{factory-A9x-T2Kg.mjs.map → factory-Bc5EyN54.mjs.map} +1 -1
- package/dist/factory-C7ua_3ik.mjs +3 -0
- package/dist/{providers-FYkZjn_C.mjs → fallback-CdXv-Np0.mjs} +411 -51
- package/dist/fallback-CdXv-Np0.mjs.map +1 -0
- package/dist/hooks/context-compression-hook.mjs +136 -22
- package/dist/hooks/context-compression-hook.mjs.map +4 -4
- package/dist/hooks/post-compact-inject.mjs +98 -7
- package/dist/hooks/post-compact-inject.mjs.map +4 -4
- package/dist/hooks/route-agents-to-worker.mjs +75 -6
- package/dist/hooks/route-agents-to-worker.mjs.map +2 -2
- package/dist/hooks/worker-proxy.mjs +75 -6
- package/dist/hooks/worker-proxy.mjs.map +2 -2
- package/dist/hooks/worker-status-line.mjs +149 -90
- package/dist/hooks/worker-status-line.mjs.map +4 -4
- package/dist/{indexer-backend-TG64CCQC.mjs → indexer-backend-rohVVKrA.mjs} +1 -1
- package/dist/{indexer-backend-TG64CCQC.mjs.map → indexer-backend-rohVVKrA.mjs.map} +1 -1
- package/dist/{ipc-client-BmypMNYk.mjs → ipc-client-C7AVpsyv.mjs} +2 -2
- package/dist/{ipc-client-BmypMNYk.mjs.map → ipc-client-C7AVpsyv.mjs.map} +1 -1
- package/dist/{kg-entity-r8duqhi9.mjs → kg-entity-DbOMPdF9.mjs} +1 -1
- package/dist/{kg-entity-r8duqhi9.mjs.map → kg-entity-DbOMPdF9.mjs.map} +1 -1
- package/dist/{latent-ideas-B7wq75Pt.mjs → latent-ideas-iNp5s55R.mjs} +2 -2
- package/dist/{latent-ideas-B7wq75Pt.mjs.map → latent-ideas-iNp5s55R.mjs.map} +1 -1
- package/dist/{link-boost-HkG7JWZR.mjs → link-boost-NNzADHX_.mjs} +1 -1
- package/dist/{link-boost-HkG7JWZR.mjs.map → link-boost-NNzADHX_.mjs.map} +1 -1
- package/dist/{main-resolver-DlaLOFBA.mjs → main-resolver-CM1IHbuu.mjs} +78 -75
- package/dist/main-resolver-CM1IHbuu.mjs.map +1 -0
- package/dist/main-resolver-E5WlilhM.mjs +6 -0
- package/dist/{neighborhood-lThN-MaQ.mjs → neighborhood-AGL7oXQ2.mjs} +1 -1
- package/dist/{neighborhood-lThN-MaQ.mjs.map → neighborhood-AGL7oXQ2.mjs.map} +1 -1
- package/dist/{note-context-b6k0mAKi.mjs → note-context-BHwYpSFf.mjs} +1 -1
- package/dist/{note-context-b6k0mAKi.mjs.map → note-context-BHwYpSFf.mjs.map} +1 -1
- package/dist/{planner-BDI7bE9B.mjs → planner-Cm3g6fWH.mjs} +5 -3
- package/dist/{planner-BDI7bE9B.mjs.map → planner-Cm3g6fWH.mjs.map} +1 -1
- package/dist/{postgres-mW1n7Vi1.mjs → postgres-Dwxe290H.mjs} +1 -1
- package/dist/{postgres-mW1n7Vi1.mjs.map → postgres-Dwxe290H.mjs.map} +1 -1
- package/dist/{program-DXBwJV7h.mjs → program-AR0qlYRg.mjs} +334 -78
- package/dist/program-AR0qlYRg.mjs.map +1 -0
- package/dist/query-feedback-CGcEiGtY.mjs +3 -0
- package/dist/{query-feedback-BV4CcxqS.mjs → query-feedback-DZfjI34w.mjs} +1 -1
- package/dist/{query-feedback-BV4CcxqS.mjs.map → query-feedback-DZfjI34w.mjs.map} +1 -1
- package/dist/router-CAtyVQud.mjs +3 -0
- package/dist/{router-DcHKnEPa.mjs → router-DHracTUC.mjs} +1 -1
- package/dist/{router-DcHKnEPa.mjs.map → router-DHracTUC.mjs.map} +1 -1
- package/dist/server-BOuAOj9b.mjs +386 -0
- package/dist/server-BOuAOj9b.mjs.map +1 -0
- package/dist/skills/Worker/SKILL.md +19 -1
- package/dist/{sources-kLnQsNrW.mjs → sources-ju6AA7lL.mjs} +1 -1
- package/dist/{sources-kLnQsNrW.mjs.map → sources-ju6AA7lL.mjs.map} +1 -1
- package/dist/{sqlite-BenGr3UP.mjs → sqlite-kFZeWCJ2.mjs} +1 -1
- package/dist/{sqlite-BenGr3UP.mjs.map → sqlite-kFZeWCJ2.mjs.map} +1 -1
- package/dist/{state-Ca9F_sZc.mjs → state-DH_mp5Xe.mjs} +1 -1
- package/dist/{state-CAeyOdfq.mjs → state-ahFAbD8b.mjs} +1 -1
- package/dist/{state-CAeyOdfq.mjs.map → state-ahFAbD8b.mjs.map} +1 -1
- package/dist/{themes-BI4GMRP9.mjs → themes-DqhNUUQk.mjs} +1 -1
- package/dist/{themes-BI4GMRP9.mjs.map → themes-DqhNUUQk.mjs.map} +1 -1
- package/dist/{tools-DGcB3o_S.mjs → tools-CMlHa9lZ.mjs} +14 -14
- package/dist/{tools-DGcB3o_S.mjs.map → tools-CMlHa9lZ.mjs.map} +1 -1
- package/dist/{tools-Bp7hj6OW.mjs → tools-COna9vZR.mjs} +1 -1
- package/dist/{trace-bobARFEX.mjs → trace-DTP6k4B_.mjs} +1 -1
- package/dist/{trace-bobARFEX.mjs.map → trace-DTP6k4B_.mjs.map} +1 -1
- package/dist/{vault-indexer-C3OfXTNF.mjs → vault-indexer-YMH22mLU.mjs} +1 -1
- package/dist/{vault-indexer-C3OfXTNF.mjs.map → vault-indexer-YMH22mLU.mjs.map} +1 -1
- package/dist/{work-queue-worker-R7UGIag_.mjs → work-queue-worker-B3nl8yyn.mjs} +23 -26
- package/dist/work-queue-worker-B3nl8yyn.mjs.map +1 -0
- package/dist/work-queue-worker-BM1GcAAq.mjs +14 -0
- package/dist/{zettelkasten-m5QPtb-L.mjs → zettelkasten-DDvKRm2V.mjs} +3 -3
- package/dist/{zettelkasten-m5QPtb-L.mjs.map → zettelkasten-DDvKRm2V.mjs.map} +1 -1
- package/docs/commands/README.md +5 -2
- package/docs/commands/worker.md +66 -5
- package/docs/images/provider-abstraction-live.png +0 -0
- package/docs/images/workers.png +0 -0
- package/docs/launcher-independence.md +70 -0
- package/docs/provider-abstraction.md +87 -0
- package/docs/provider-independence-details.md +330 -0
- package/docs/provider-independence.md +75 -0
- package/docs/worker.md +72 -11
- package/package.json +1 -1
- package/scripts/build-hooks.mjs +6 -1
- package/scripts/build-skill-stubs.mjs +17 -4
- package/src/hooks/ts/lib/context-fill.test.ts +158 -4
- package/src/hooks/ts/lib/context-fill.ts +102 -35
- package/statusline-command.sh +120 -21
- package/dist/chain-CTtHligI.mjs.map +0 -1
- package/dist/config-B64vFg14.mjs.map +0 -1
- package/dist/context-handover-cache-BpUojjsi.mjs.map +0 -1
- package/dist/daemon-CmHHmKpg.mjs +0 -20
- package/dist/detector-DO730Zq0.mjs +0 -5
- package/dist/factory-BD-np0Vd.mjs +0 -3
- package/dist/main-resolver-D6IImXvF.mjs +0 -4
- package/dist/main-resolver-DlaLOFBA.mjs.map +0 -1
- package/dist/program-DXBwJV7h.mjs.map +0 -1
- package/dist/providers-FYkZjn_C.mjs.map +0 -1
- package/dist/query-feedback-DSVyHtrG.mjs +0 -3
- package/dist/router-Bk77E7hj.mjs +0 -3
- package/dist/runtime-paths-rni52zHX.mjs +0 -50
- package/dist/runtime-paths-rni52zHX.mjs.map +0 -1
- package/dist/work-queue-worker-DW8lz-Oo.mjs +0 -11
- package/dist/work-queue-worker-R7UGIag_.mjs.map +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { o as loadConfig } from "../config-D1G9IFpn.mjs";
|
|
3
|
+
import { t as PaiClient } from "../ipc-client-C7AVpsyv.mjs";
|
|
4
|
+
import { m as readWorkersSection, n as MODEL_CAPABILITIES } from "../config-Dl8lT4Lu.mjs";
|
|
5
|
+
import { _ as workersLogDir, p as ledgerPath } from "../server-BOuAOj9b.mjs";
|
|
6
|
+
import { D as loadStatus, O as loadStatuses, a as testProvider, d as handoffFromInside, f as readInbox, i as runWorker, j as ledgerSummary, p as sayToWorker, t as runChain, w as alive } from "../chain-DhVHVnmT.mjs";
|
|
7
|
+
import { _ as updateProvider, a as addProvider, b as psOutput, c as describeProviders, d as resolveProviderName, f as setClass, g as unsetClass, h as setWorkersEnabled, i as fallbackStatusText, l as modelPrefsText, m as setProviderModel, n as fallbackOn, o as classTargetText, p as setProviderEnabled, r as fallbackStatus, s as describeModels, t as fallbackOff, u as removeProvider, v as useProvider, x as replayOutput } from "../fallback-CdXv-Np0.mjs";
|
|
6
8
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
9
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
10
|
|
|
@@ -4582,10 +4584,17 @@ pai worker run --label "short task label" --class research \\
|
|
|
4582
4584
|
parked in ~/.config/pai/keys/<name>, mode 0600). update changes cost_tier
|
|
4583
4585
|
(1 cheapest … 5 most expensive) and tags (code, vision, image-gen,
|
|
4584
4586
|
long-context, fast, reasoning).
|
|
4585
|
-
- \`worker_classes\` — list/set/unset class → provider[
|
|
4587
|
+
- \`worker_classes\` — list/set/unset class → provider[/<capability>], or constraints
|
|
4586
4588
|
only (max_cost_tier, require_tags) so auto-routing picks a qualifying provider.
|
|
4589
|
+
- \`worker_model\` — show or set a provider's model ids per capability:
|
|
4590
|
+
default, fast, image (get without provider lists every provider's ids).
|
|
4587
4591
|
- \`worker_run\` — start a worker or chain from chat; returns the id immediately.
|
|
4588
4592
|
- \`worker_toggle\` — off makes Agent subagents run on Anthropic again.
|
|
4593
|
+
- \`worker_fallback\` — machine-wide switch: every NEW Claude Code process
|
|
4594
|
+
(interactive, task-bus, daemon summarizer) runs on a worker provider until
|
|
4595
|
+
switched back. on writes the provider env + model pin into the Claude
|
|
4596
|
+
settings file (the token sits there until off), off restores it exactly,
|
|
4597
|
+
status lists running sessions and the note. Subagent routing is unchanged.
|
|
4589
4598
|
|
|
4590
4599
|
### Preferences from chat (map the phrase, use the tool, never mention files)
|
|
4591
4600
|
|
|
@@ -4593,10 +4602,21 @@ pai worker run --label "short task label" --class research \\
|
|
|
4593
4602
|
worker_classes set <class>=<provider>. One line back.
|
|
4594
4603
|
- "prefer the flash model for simple tasks" / "cheap only for drafts" →
|
|
4595
4604
|
worker_classes set simple|draft=<provider>/fast (or a max_cost_tier). One line.
|
|
4605
|
+
- "run everything on <model>" / "make <model> the fast model" / "<model> is
|
|
4606
|
+
the image model" → worker_model set model=<model> (capability=fast|image for
|
|
4607
|
+
the latter two). One line back.
|
|
4596
4608
|
- "reviews should use a reasoning model" → worker_classes set review with
|
|
4597
4609
|
require_tags ["reasoning"] (drop the pin if one exists). One line.
|
|
4598
4610
|
- "what handles reviews" / "show the routing table" → worker_classes list
|
|
4599
4611
|
(plus worker_status for providers). One or two lines.
|
|
4612
|
+
- "switch everything to <provider>" / "fallback on" (plan exhausted, every
|
|
4613
|
+
new session must run on the worker provider) → worker_fallback on. Confirm
|
|
4614
|
+
with one line: provider, that running sessions keep their provider until
|
|
4615
|
+
restarted, and how to switch back.
|
|
4616
|
+
- "back to anthropic" / "fallback off" → worker_fallback off. One line: what
|
|
4617
|
+
was restored.
|
|
4618
|
+
- "is fallback on" / "are we on <provider>" → worker_fallback status. One or
|
|
4619
|
+
two lines.
|
|
4600
4620
|
- Never tell the user to edit a config file — the tools do it.`
|
|
4601
4621
|
};
|
|
4602
4622
|
|
|
@@ -5408,6 +5428,56 @@ At 200 message sessions, that is 1.3MB of context saved — equivalent to 5-10 e
|
|
|
5408
5428
|
`
|
|
5409
5429
|
};
|
|
5410
5430
|
|
|
5431
|
+
//#endregion
|
|
5432
|
+
//#region src/daemon-mcp/tools/worker-model.ts
|
|
5433
|
+
/**
|
|
5434
|
+
* worker_model — the MCP tool behind model selection.
|
|
5435
|
+
*
|
|
5436
|
+
* Extracted from index.ts (which starts its transport on import, so its
|
|
5437
|
+
* inline handlers cannot be imported by tests): this module holds only the
|
|
5438
|
+
* handler, index.ts registers it. The mutations themselves live in
|
|
5439
|
+
* src/workers/providers.ts, shared with the `pai worker model` CLI.
|
|
5440
|
+
*/
|
|
5441
|
+
const text = (s) => ({ content: [{
|
|
5442
|
+
type: "text",
|
|
5443
|
+
text: s
|
|
5444
|
+
}] });
|
|
5445
|
+
const error = (e) => ({
|
|
5446
|
+
content: [{
|
|
5447
|
+
type: "text",
|
|
5448
|
+
text: e instanceof Error ? e.message : String(e)
|
|
5449
|
+
}],
|
|
5450
|
+
isError: true
|
|
5451
|
+
});
|
|
5452
|
+
/**
|
|
5453
|
+
* get: the model ids of one provider (default: the active one), or of every
|
|
5454
|
+
* provider when no provider is given. set: write a provider's model id for a
|
|
5455
|
+
* capability and report the change.
|
|
5456
|
+
*/
|
|
5457
|
+
function workerModel(args, configPath) {
|
|
5458
|
+
try {
|
|
5459
|
+
const action = args.action ?? "get";
|
|
5460
|
+
if (action !== "get" && action !== "set") return error(/* @__PURE__ */ new Error(`unknown action "${String(action)}" (expected: get, set)`));
|
|
5461
|
+
if (args.capability !== void 0 && args.slot !== void 0 && args.capability !== args.slot) return error(/* @__PURE__ */ new Error(`capability "${args.capability}" and slot "${args.slot}" disagree — pass one`));
|
|
5462
|
+
const capability = args.capability ?? args.slot ?? "default";
|
|
5463
|
+
const { workers } = readWorkersSection(configPath);
|
|
5464
|
+
if (action === "get") {
|
|
5465
|
+
if (args.provider) {
|
|
5466
|
+
const name = resolveProviderName(workers, args.provider);
|
|
5467
|
+
const p = workers.providers[name];
|
|
5468
|
+
return p ? text(`${name} ${modelPrefsText(p)}`) : error(/* @__PURE__ */ new Error(`no provider named "${args.provider}"`));
|
|
5469
|
+
}
|
|
5470
|
+
return text(describeModels(workers).join("\n"));
|
|
5471
|
+
}
|
|
5472
|
+
if (!args.model || !args.model.trim()) return error(/* @__PURE__ */ new Error("set needs a non-empty model id"));
|
|
5473
|
+
const name = resolveProviderName(workers, args.provider);
|
|
5474
|
+
const p = setProviderModel(name, capability, args.model, configPath).providers[name];
|
|
5475
|
+
return text(`${name} ${capability} model: ${p?.models[capability] ?? "?"}`);
|
|
5476
|
+
} catch (e) {
|
|
5477
|
+
return error(e);
|
|
5478
|
+
}
|
|
5479
|
+
}
|
|
5480
|
+
|
|
5411
5481
|
//#endregion
|
|
5412
5482
|
//#region src/daemon-mcp/index.ts
|
|
5413
5483
|
/**
|
|
@@ -5814,7 +5884,7 @@ async function startShim() {
|
|
|
5814
5884
|
upstream_url: string().optional().describe("Chat Completions base URL (add, protocol=openai)."),
|
|
5815
5885
|
protocol: _enum(["anthropic", "openai"]).optional().describe("Protocol (add). Default: anthropic."),
|
|
5816
5886
|
engine: _enum(["claude", "codex"]).optional().describe("Runner engine (add). Default: claude."),
|
|
5817
|
-
context_window: number().int().positive().optional().describe("Context window for the meter (add).
|
|
5887
|
+
context_window: number().int().positive().optional().describe("Context window for the meter (add). No default: unset hides the meter unless the init event announces one."),
|
|
5818
5888
|
key_file: string().optional().describe("File holding the API token, 0600 (add)."),
|
|
5819
5889
|
key: string().optional().describe("Raw API token (add) — parked in ~/.config/pai/keys/<name>."),
|
|
5820
5890
|
model: string().optional().describe("Default model id (add)."),
|
|
@@ -5888,6 +5958,44 @@ async function startShim() {
|
|
|
5888
5958
|
return workerError(e);
|
|
5889
5959
|
}
|
|
5890
5960
|
});
|
|
5961
|
+
server.tool("worker_fallback", [
|
|
5962
|
+
"Machine-wide fallback: switch every NEW Claude Code process on this",
|
|
5963
|
+
"machine (interactive, task-bus, daemon summarizer) to a worker provider,",
|
|
5964
|
+
"or back to the Anthropic login.",
|
|
5965
|
+
"",
|
|
5966
|
+
"action=on switches (provider optional, default: active) by writing the",
|
|
5967
|
+
"provider's env into ~/.claude/settings.json — the token is read from its",
|
|
5968
|
+
"key file and then sits in settings.json until off. action=off restores",
|
|
5969
|
+
"settings.json exactly. action=status (default) shows on/off, provider,",
|
|
5970
|
+
"running sessions and the FALLBACK-ACTIVE.md note. Running sessions keep",
|
|
5971
|
+
"their provider until restarted. CLAUDE_SETTINGS_PATH retargets settings",
|
|
5972
|
+
"for dry runs. Subagent routing is unchanged while on."
|
|
5973
|
+
].join("\n"), {
|
|
5974
|
+
action: _enum([
|
|
5975
|
+
"on",
|
|
5976
|
+
"off",
|
|
5977
|
+
"status"
|
|
5978
|
+
]).optional().describe("Default: status."),
|
|
5979
|
+
provider: string().optional().describe("Provider to switch to (on). Default: active.")
|
|
5980
|
+
}, async (args) => {
|
|
5981
|
+
try {
|
|
5982
|
+
const action = args.action ?? "status";
|
|
5983
|
+
if (action === "status") return workerText(fallbackStatusText(fallbackStatus()).join("\n"));
|
|
5984
|
+
if (action === "on") {
|
|
5985
|
+
const r = fallbackOn(args.provider);
|
|
5986
|
+
return workerText([
|
|
5987
|
+
r.alreadyOn ? `fallback already on — provider ${r.provider}, env re-applied` : `fallback on — provider ${r.provider}; every new Claude Code process uses it`,
|
|
5988
|
+
`settings.json env: ${r.envKeys.join(", ")}`,
|
|
5989
|
+
`model pin: ${r.model}`,
|
|
5990
|
+
"running sessions keep their current provider until restarted"
|
|
5991
|
+
].join("\n"));
|
|
5992
|
+
}
|
|
5993
|
+
const r = fallbackOff();
|
|
5994
|
+
return workerText(`fallback off — provider ${r.provider} released, settings.json restored (${r.envKeys.join(", ")})`);
|
|
5995
|
+
} catch (e) {
|
|
5996
|
+
return workerError(e);
|
|
5997
|
+
}
|
|
5998
|
+
});
|
|
5891
5999
|
server.tool("worker_classes", [
|
|
5892
6000
|
"Manage worker classes (list, set, unset).",
|
|
5893
6001
|
"",
|
|
@@ -5939,6 +6047,19 @@ async function startShim() {
|
|
|
5939
6047
|
return workerError(e);
|
|
5940
6048
|
}
|
|
5941
6049
|
});
|
|
6050
|
+
server.tool("worker_model", [
|
|
6051
|
+
"Show or set a provider's model ids (the config behind `pai worker model`).",
|
|
6052
|
+
"",
|
|
6053
|
+
"action=get (default): the model ids of one provider (provider given,",
|
|
6054
|
+
"default: the active one) or of every provider when provider is omitted.",
|
|
6055
|
+
"action=set needs model; capability picks which one (default, fast, image)."
|
|
6056
|
+
].join("\n"), {
|
|
6057
|
+
action: _enum(["get", "set"]).optional().describe("Default: get."),
|
|
6058
|
+
provider: string().optional().describe("Provider to read or change (default: the active one)."),
|
|
6059
|
+
capability: _enum(MODEL_CAPABILITIES).optional().describe("Which model capability to set (default, fast, image). Default: default."),
|
|
6060
|
+
slot: _enum(["default", "fast"]).optional().describe("Deprecated pre-capability alias of `capability`."),
|
|
6061
|
+
model: string().optional().describe("The new model id (required for set).")
|
|
6062
|
+
}, async (args) => workerModel(args));
|
|
5942
6063
|
server.tool("worker_run", [
|
|
5943
6064
|
"Start a worker (or a chain) and return its id immediately.",
|
|
5944
6065
|
"",
|