@tekmidian/pai 0.60.1 → 0.62.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/{async-CLvuY7b-.mjs → async-DNVWtQl2.mjs} +2 -2
- package/dist/{async-CLvuY7b-.mjs.map → async-DNVWtQl2.mjs.map} +1 -1
- package/dist/{chain-CGyAIHo4.mjs → chain-CuaDawK9.mjs} +4 -4
- package/dist/{chain-CGyAIHo4.mjs.map → chain-CuaDawK9.mjs.map} +1 -1
- package/dist/cli/index.mjs +13 -13
- package/dist/cli/program.mjs +13 -13
- package/dist/{context-handover-cache-BzM7Qudn.mjs → context-handover-cache-DFNnlWv2.mjs} +4 -4
- package/dist/{context-handover-cache-BzM7Qudn.mjs.map → context-handover-cache-DFNnlWv2.mjs.map} +1 -1
- package/dist/daemon/index.mjs +10 -10
- package/dist/{daemon-B_TodsIS.mjs → daemon-Bf7Eock4.mjs} +45 -24
- package/dist/{daemon-B_TodsIS.mjs.map → daemon-Bf7Eock4.mjs.map} +1 -1
- package/dist/daemon-bJi1gDkG.mjs +19 -0
- package/dist/daemon-mcp/index.mjs +8 -10
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/{factory-EUUhSSoq.mjs → factory-BozZa81q.mjs} +3 -3
- package/dist/{factory-EUUhSSoq.mjs.map → factory-BozZa81q.mjs.map} +1 -1
- package/dist/{factory-DW7BCJJT.mjs → factory-UO9_DFMN.mjs} +1 -1
- package/dist/{fallback-CjdakQVu.mjs → fallback-F0TWGVM2.mjs} +11 -13
- package/dist/{fallback-CjdakQVu.mjs.map → fallback-F0TWGVM2.mjs.map} +1 -1
- package/dist/{helpers-D9WkIf9R.mjs → helpers-Dj-B314s.mjs} +3 -2
- package/dist/{helpers-D9WkIf9R.mjs.map → helpers-Dj-B314s.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/load-project-context.mjs +8513 -133
- package/dist/hooks/load-project-context.mjs.map +4 -4
- package/dist/hooks/post-compact-inject.mjs.map +1 -1
- package/dist/hooks/route-agents-to-worker.mjs +3 -3
- package/dist/hooks/route-agents-to-worker.mjs.map +2 -2
- package/dist/hooks/security-validator.mjs +58 -58
- 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/worker-guard.mjs +7859 -0
- package/dist/hooks/worker-guard.mjs.map +7 -0
- package/dist/hooks/worker-proxy.mjs +3 -3
- package/dist/hooks/worker-proxy.mjs.map +2 -2
- package/dist/hooks/worker-status-line.mjs +104 -11
- package/dist/hooks/worker-status-line.mjs.map +4 -4
- package/dist/hooks/worker-supervision.mjs +3 -3
- package/dist/hooks/worker-supervision.mjs.map +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{indexer-backend-DcDtin1O.mjs → indexer-backend-BN9rpp9O.mjs} +2 -2
- package/dist/{main-resolver-BFQfU5xo.mjs → main-resolver-BIft_FVF.mjs} +4 -4
- package/dist/{main-resolver-BFQfU5xo.mjs.map → main-resolver-BIft_FVF.mjs.map} +1 -1
- package/dist/{main-resolver-VMBENifT.mjs → main-resolver-C9-poMdi.mjs} +2 -2
- package/dist/{planner-DN967Lvm.mjs → planner-BG9ivPj0.mjs} +6 -6
- package/dist/{planner-DN967Lvm.mjs.map → planner-BG9ivPj0.mjs.map} +1 -1
- package/dist/{postgres-nvU5pShF.mjs → postgres-CxD6_Dca.mjs} +3 -3
- package/dist/{postgres-nvU5pShF.mjs.map → postgres-CxD6_Dca.mjs.map} +1 -1
- package/dist/{program-BnsjB57Q.mjs → program-BRvCzhjx.mjs} +249 -82
- package/dist/program-BRvCzhjx.mjs.map +1 -0
- package/dist/{run-FeM1_UVa.mjs → run-BVQZI79D.mjs} +610 -253
- package/dist/run-BVQZI79D.mjs.map +1 -0
- package/dist/{run-env-CEHTeIUM.mjs → run-env-BE5xyCwy.mjs} +25 -6
- package/dist/run-env-BE5xyCwy.mjs.map +1 -0
- package/dist/{server-CekGOJcp.mjs → server-BY6AedmC.mjs} +2 -2
- package/dist/{server-CekGOJcp.mjs.map → server-BY6AedmC.mjs.map} +1 -1
- package/dist/{session-keepalive-Bc9aT678.mjs → session-keepalive-DJA97K2X.mjs} +4 -4
- package/dist/{session-keepalive-Bc9aT678.mjs.map → session-keepalive-DJA97K2X.mjs.map} +1 -1
- package/dist/{sqlite-D9p5a4qe.mjs → sqlite-CfKfuggn.mjs} +2 -2
- package/dist/{sqlite-D9p5a4qe.mjs.map → sqlite-CfKfuggn.mjs.map} +1 -1
- package/dist/{tools-r-7ZG8B5.mjs → tools-B52IvaU6.mjs} +3 -3
- package/dist/{tools-qXyHFwNj.mjs → tools-DFdPbX-X.mjs} +2 -2
- package/dist/{tools-qXyHFwNj.mjs.map → tools-DFdPbX-X.mjs.map} +1 -1
- package/dist/{vault-indexer-DHYBpRZ5.mjs → vault-indexer-mCFus_AM.mjs} +2 -2
- package/dist/{vault-indexer-DHYBpRZ5.mjs.map → vault-indexer-mCFus_AM.mjs.map} +1 -1
- package/dist/{wakeup-C48hcN6O.mjs → wakeup-DO1O4udw.mjs} +2 -2
- package/dist/{wakeup-C48hcN6O.mjs.map → wakeup-DO1O4udw.mjs.map} +1 -1
- package/dist/{work-queue-worker-BL4dq5P7.mjs → work-queue-worker-BbrC3I_R.mjs} +2 -2
- package/dist/{work-queue-worker-BL4dq5P7.mjs.map → work-queue-worker-BbrC3I_R.mjs.map} +1 -1
- package/dist/work-queue-worker-z-AATZ2t.mjs +11 -0
- package/docs/commands/README.md +2 -0
- package/docs/commands/worker.md +28 -0
- package/package.json +2 -2
- package/scripts/build-hooks.mjs +6 -5
- package/scripts/build-skill-stubs.mjs +6 -5
- package/src/hooks/ts/lib/tab-title.ts +18 -0
- package/src/hooks/ts/lib/worker-guard.test.ts +188 -0
- package/src/hooks/ts/lib/worker-guard.ts +315 -0
- package/src/hooks/ts/post-tool-use/update-tab-on-action.ts +3 -20
- package/src/hooks/ts/pre-tool-use/worker-guard.ts +75 -0
- package/src/hooks/ts/session-start/load-project-context.ts +14 -0
- package/src/hooks/ts/stop/stop-hook.ts +4 -15
- package/src/hooks/ts/user-prompt/update-tab-titles.ts +2 -10
- package/dist/daemon-jviL3VVJ.mjs +0 -19
- package/dist/program-BnsjB57Q.mjs.map +0 -1
- package/dist/run-FeM1_UVa.mjs.map +0 -1
- package/dist/run-env-CEHTeIUM.mjs.map +0 -1
- package/dist/work-queue-worker-DVOVcEnO.mjs +0 -11
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./utils-C9HsYDpO.mjs";
|
|
2
|
+
import "./migrate-BD7D8EEh.mjs";
|
|
3
|
+
import "./factory-BozZa81q.mjs";
|
|
4
|
+
import "./wakeup-DO1O4udw.mjs";
|
|
5
|
+
import "./context-handover-cache-DFNnlWv2.mjs";
|
|
6
|
+
import "./config-CQCmH_gV.mjs";
|
|
7
|
+
import "./run-env-BE5xyCwy.mjs";
|
|
8
|
+
import "./run-BVQZI79D.mjs";
|
|
9
|
+
import "./server-BY6AedmC.mjs";
|
|
10
|
+
import "./state-n13uPK5B.mjs";
|
|
11
|
+
import "./aibroker-client-BK1h--W_.mjs";
|
|
12
|
+
import "./session-keepalive-DJA97K2X.mjs";
|
|
13
|
+
import "./embeddings-DfrYNIng.mjs";
|
|
14
|
+
import { t as serve } from "./daemon-Bf7Eock4.mjs";
|
|
15
|
+
import "./router-DjFZIoDl.mjs";
|
|
16
|
+
import "./tools-DFdPbX-X.mjs";
|
|
17
|
+
import "./work-queue-worker-BbrC3I_R.mjs";
|
|
18
|
+
|
|
19
|
+
export { serve };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../factory-
|
|
2
|
+
import "../factory-BozZa81q.mjs";
|
|
3
3
|
import { p as MainConfigError, s as loadConfig } from "../config-CQCmH_gV.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { E as readWorkersSection, i as CAPABILITY_NAME_RE, u as MODEL_CAPABILITIES, y as getProviderOrNative } from "../run-env-BE5xyCwy.mjs";
|
|
5
|
+
import { B as loadStatus, K as setWorkerLabel, P as alive, V as loadStatuses, c as handoffFromInside, j as ledgerSummary, l as readInbox, n as runWorker, r as testProvider, u as sayToWorker } from "../run-BVQZI79D.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-F0TWGVM2.mjs";
|
|
8
|
+
import { h as ledgerPath, v as workersLogDir } from "../server-BY6AedmC.mjs";
|
|
9
|
+
import { t as runChain } from "../chain-CuaDawK9.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
|
}
|