@tekmidian/pai 0.60.0 → 0.61.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/{chain-DFlzAfDE.mjs → chain-C5oeyUg4.mjs} +4 -4
- package/dist/{chain-DFlzAfDE.mjs.map → chain-C5oeyUg4.mjs.map} +1 -1
- package/dist/cli/index.mjs +12 -12
- package/dist/cli/program.mjs +12 -12
- package/dist/{config-msER8xj_.mjs → config-CQCmH_gV.mjs} +2 -1
- package/dist/config-CQCmH_gV.mjs.map +1 -0
- package/dist/{config-GceCMUxa.mjs → config-DjXq_W42.mjs} +1 -1
- package/dist/{context-handover-cache-DF0xWVB0.mjs → context-handover-cache-BdtJZpgv.mjs} +4 -4
- package/dist/{context-handover-cache-DF0xWVB0.mjs.map → context-handover-cache-BdtJZpgv.mjs.map} +1 -1
- package/dist/daemon/index.mjs +11 -11
- package/dist/{daemon-DArRKBlk.mjs → daemon-DSsIEqzW.mjs} +26 -19
- package/dist/{daemon-DArRKBlk.mjs.map → daemon-DSsIEqzW.mjs.map} +1 -1
- package/dist/daemon-MoFF4oeg.mjs +19 -0
- package/dist/daemon-mcp/index.mjs +9 -11
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/{factory-D6I2jmjQ.mjs → factory-DW7BCJJT.mjs} +1 -1
- package/dist/{factory-ChfAvCzO.mjs → factory-EUUhSSoq.mjs} +5 -6
- package/dist/factory-EUUhSSoq.mjs.map +1 -0
- package/dist/{fallback-B7VEMMRn.mjs → fallback-DDbJVaR8.mjs} +12 -14
- package/dist/{fallback-B7VEMMRn.mjs.map → fallback-DDbJVaR8.mjs.map} +1 -1
- package/dist/hooks/block-sleep-poll.mjs.map +2 -2
- package/dist/hooks/context-compression-hook.mjs.map +1 -1
- package/dist/hooks/post-compact-inject.mjs.map +1 -1
- package/dist/hooks/route-agents-to-worker.mjs +5 -5
- package/dist/hooks/route-agents-to-worker.mjs.map +3 -3
- package/dist/hooks/security-validator.mjs +60 -60
- package/dist/hooks/security-validator.mjs.map +3 -3
- package/dist/hooks/stop-hook.mjs +15 -15
- package/dist/hooks/stop-hook.mjs.map +3 -3
- package/dist/hooks/update-tab-on-action.mjs +14 -12
- package/dist/hooks/update-tab-on-action.mjs.map +3 -3
- package/dist/hooks/update-tab-titles.mjs +13 -9
- package/dist/hooks/update-tab-titles.mjs.map +3 -3
- package/dist/hooks/whisper-rules.mjs +2 -2
- package/dist/hooks/whisper-rules.mjs.map +3 -3
- package/dist/hooks/worker-proxy.mjs +5 -5
- package/dist/hooks/worker-proxy.mjs.map +3 -3
- package/dist/hooks/worker-status-line.mjs +5 -5
- package/dist/hooks/worker-status-line.mjs.map +3 -3
- package/dist/hooks/worker-supervision.mjs +5 -5
- package/dist/hooks/worker-supervision.mjs.map +3 -3
- package/dist/main-resolver-CxOsxtOr.mjs +7 -0
- package/dist/{main-resolver-BqTjt-GL.mjs → main-resolver-DIQ6m_RA.mjs} +4 -4
- package/dist/{main-resolver-BqTjt-GL.mjs.map → main-resolver-DIQ6m_RA.mjs.map} +1 -1
- package/dist/{planner-DbpsMZqY.mjs → planner-D8jAr_sx.mjs} +7 -7
- package/dist/{planner-DbpsMZqY.mjs.map → planner-D8jAr_sx.mjs.map} +1 -1
- package/dist/{program-QSuci3RH.mjs → program-BTdspOOa.mjs} +131 -81
- package/dist/program-BTdspOOa.mjs.map +1 -0
- package/dist/{run-BFxuNnIJ.mjs → run-CxxZKEZw.mjs} +336 -174
- package/dist/run-CxxZKEZw.mjs.map +1 -0
- package/dist/{run-env-kbWVwUvU.mjs → run-env-BE5xyCwy.mjs} +26 -7
- package/dist/run-env-BE5xyCwy.mjs.map +1 -0
- package/dist/{server-B0vBmfJt.mjs → server-BY6AedmC.mjs} +2 -2
- package/dist/{server-B0vBmfJt.mjs.map → server-BY6AedmC.mjs.map} +1 -1
- package/dist/{session-keepalive-CUcFa8ld.mjs → session-keepalive-urk--pfa.mjs} +5 -5
- package/dist/{session-keepalive-CUcFa8ld.mjs.map → session-keepalive-urk--pfa.mjs.map} +1 -1
- package/dist/{tools-CaTZnIau.mjs → tools-qXyHFwNj.mjs} +2 -2
- package/dist/{tools-CaTZnIau.mjs.map → tools-qXyHFwNj.mjs.map} +1 -1
- package/dist/{tools-_7MF8Ebb.mjs → tools-r-7ZG8B5.mjs} +3 -3
- package/dist/{wakeup-CTX3rlz-.mjs → wakeup-C48hcN6O.mjs} +2 -2
- package/dist/{wakeup-CTX3rlz-.mjs.map → wakeup-C48hcN6O.mjs.map} +1 -1
- package/dist/work-queue-worker-1_VBfI_k.mjs +11 -0
- package/dist/{work-queue-worker-B4eZGy5n.mjs → work-queue-worker-DUvPiwGO.mjs} +2 -2
- package/dist/{work-queue-worker-B4eZGy5n.mjs.map → work-queue-worker-DUvPiwGO.mjs.map} +1 -1
- package/docs/commands/worker.md +1 -0
- package/package.json +1 -1
- package/src/hooks/ts/lib/tab-title.ts +18 -0
- package/src/hooks/ts/post-tool-use/update-tab-on-action.ts +3 -20
- package/src/hooks/ts/stop/stop-hook.ts +4 -15
- package/src/hooks/ts/user-prompt/update-tab-titles.ts +2 -10
- package/dist/config-msER8xj_.mjs.map +0 -1
- package/dist/daemon-BppwJtrH.mjs +0 -19
- package/dist/factory-ChfAvCzO.mjs.map +0 -1
- package/dist/main-resolver-CCojcYr2.mjs +0 -7
- package/dist/program-QSuci3RH.mjs.map +0 -1
- package/dist/run-BFxuNnIJ.mjs.map +0 -1
- package/dist/run-env-kbWVwUvU.mjs.map +0 -1
- package/dist/work-queue-worker-DuhZmfDB.mjs +0 -11
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./utils-C9HsYDpO.mjs";
|
|
2
|
+
import "./migrate-BD7D8EEh.mjs";
|
|
3
|
+
import "./factory-EUUhSSoq.mjs";
|
|
4
|
+
import "./wakeup-C48hcN6O.mjs";
|
|
5
|
+
import "./context-handover-cache-BdtJZpgv.mjs";
|
|
6
|
+
import "./config-CQCmH_gV.mjs";
|
|
7
|
+
import "./run-env-BE5xyCwy.mjs";
|
|
8
|
+
import "./run-CxxZKEZw.mjs";
|
|
9
|
+
import "./server-BY6AedmC.mjs";
|
|
10
|
+
import "./state-n13uPK5B.mjs";
|
|
11
|
+
import "./aibroker-client-BK1h--W_.mjs";
|
|
12
|
+
import "./session-keepalive-urk--pfa.mjs";
|
|
13
|
+
import "./embeddings-DfrYNIng.mjs";
|
|
14
|
+
import { t as serve } from "./daemon-DSsIEqzW.mjs";
|
|
15
|
+
import "./router-DjFZIoDl.mjs";
|
|
16
|
+
import "./tools-qXyHFwNj.mjs";
|
|
17
|
+
import "./work-queue-worker-DUvPiwGO.mjs";
|
|
18
|
+
|
|
19
|
+
export { serve };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../factory-
|
|
3
|
-
import { p as MainConfigError, s as loadConfig } from "../config-
|
|
4
|
-
import {
|
|
5
|
-
import { M as alive, R as loadStatus, W as setWorkerLabel, c as handoffFromInside, k as ledgerSummary, l as readInbox, n as runWorker, r as testProvider, u as sayToWorker, z as loadStatuses } from "../run-
|
|
2
|
+
import "../factory-EUUhSSoq.mjs";
|
|
3
|
+
import { p as MainConfigError, s as loadConfig } from "../config-CQCmH_gV.mjs";
|
|
4
|
+
import { E as readWorkersSection, i as CAPABILITY_NAME_RE, u as MODEL_CAPABILITIES, y as getProviderOrNative } from "../run-env-BE5xyCwy.mjs";
|
|
5
|
+
import { M as alive, R as loadStatus, W as setWorkerLabel, c as handoffFromInside, k as ledgerSummary, l as readInbox, n as runWorker, r as testProvider, u as sayToWorker, z as loadStatuses } from "../run-CxxZKEZw.mjs";
|
|
6
6
|
import { t as PaiClient } from "../ipc-client-Dasm515c.mjs";
|
|
7
|
-
import { A as getConfigValueOp, C as psOutput, D as resolveSpecPath, E as readSpecPrompt, M as setConfigValueOp, N as unsetConfigValueOp, O as MainConfigOpsError, _ as setWorkersEnabled, a as addProvider, b as updateProvider, c as describeModels, d as removeProvider, f as resolveProviderName, g as setProviderModel, h as setProviderEnabled, i as fallbackStatusText, j as listConfigOp, l as describeProviders, m as setClass, n as fallbackOn, o as classTargetText, p as setCapabilityPreference, r as fallbackStatus, s as describeCapabilities, t as fallbackOff, u as modelPrefsText, v as unsetCapabilityPreference, w as replayOutput, x as useProvider, y as unsetClass } from "../fallback-
|
|
8
|
-
import { h as ledgerPath, v as workersLogDir } from "../server-
|
|
9
|
-
import { t as runChain } from "../chain-
|
|
7
|
+
import { A as getConfigValueOp, C as psOutput, D as resolveSpecPath, E as readSpecPrompt, M as setConfigValueOp, N as unsetConfigValueOp, O as MainConfigOpsError, _ as setWorkersEnabled, a as addProvider, b as updateProvider, c as describeModels, d as removeProvider, f as resolveProviderName, g as setProviderModel, h as setProviderEnabled, i as fallbackStatusText, j as listConfigOp, l as describeProviders, m as setClass, n as fallbackOn, o as classTargetText, p as setCapabilityPreference, r as fallbackStatus, s as describeCapabilities, t as fallbackOff, u as modelPrefsText, v as unsetCapabilityPreference, w as replayOutput, x as useProvider, y as unsetClass } from "../fallback-DDbJVaR8.mjs";
|
|
8
|
+
import { h as ledgerPath, v as workersLogDir } from "../server-BY6AedmC.mjs";
|
|
9
|
+
import { t as runChain } from "../chain-C5oeyUg4.mjs";
|
|
10
10
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
11
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
12
12
|
|
|
@@ -5498,15 +5498,13 @@ function workerModel(args, configPath) {
|
|
|
5498
5498
|
if (action === "get") {
|
|
5499
5499
|
if (args.provider) {
|
|
5500
5500
|
const name = resolveProviderName(workers, args.provider);
|
|
5501
|
-
|
|
5502
|
-
return p ? text$2(`${name} ${modelPrefsText(p)}`) : error$1(/* @__PURE__ */ new Error(`no provider named "${args.provider}"`));
|
|
5501
|
+
return text$2(`${name} ${modelPrefsText(getProviderOrNative(workers, name))}`);
|
|
5503
5502
|
}
|
|
5504
5503
|
return text$2(describeModels(workers).join("\n"));
|
|
5505
5504
|
}
|
|
5506
5505
|
if (!args.model || !args.model.trim()) return error$1(/* @__PURE__ */ new Error("set needs a non-empty model id"));
|
|
5507
5506
|
const name = resolveProviderName(workers, args.provider);
|
|
5508
|
-
|
|
5509
|
-
return text$2(`${name} ${capability} model: ${p?.models[capability] ?? "?"}`);
|
|
5507
|
+
return text$2(`${name} ${capability} model: ${getProviderOrNative(setProviderModel(name, capability, args.model, configPath), name)?.models[capability] ?? "?"}`);
|
|
5510
5508
|
} catch (e) {
|
|
5511
5509
|
return error$1(e);
|
|
5512
5510
|
}
|