@tekmidian/pai 0.38.0 → 0.39.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/{auto-route-DM7GhJ8y.mjs → auto-route-BlWOWT4z.mjs} +2 -2
- package/dist/{auto-route-DM7GhJ8y.mjs.map → auto-route-BlWOWT4z.mjs.map} +1 -1
- package/dist/{providers-DUshcB-d.mjs → chain-CTtHligI.mjs} +699 -1405
- package/dist/chain-CTtHligI.mjs.map +1 -0
- package/dist/cli/index.mjs +4 -3
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/program.mjs +4 -3
- package/dist/{clusters-Do4tEGyc.mjs → clusters-wlK0w41E.mjs} +1 -1
- package/dist/{clusters-Do4tEGyc.mjs.map → clusters-wlK0w41E.mjs.map} +1 -1
- package/dist/daemon/index.mjs +7 -7
- package/dist/{daemon-CGg1VCbA.mjs → daemon-CTkN_Vn8.mjs} +25 -25
- package/dist/{daemon-CGg1VCbA.mjs.map → daemon-CTkN_Vn8.mjs.map} +1 -1
- package/dist/{daemon-DsGGiIJM.mjs → daemon-CmHHmKpg.mjs} +7 -7
- package/dist/daemon-mcp/index.mjs +55 -3
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/{detector-CMap-9vw.mjs → detector-Bwk_4Pk4.mjs} +1 -1
- package/dist/{detector-CMap-9vw.mjs.map → detector-Bwk_4Pk4.mjs.map} +1 -1
- package/dist/detector-DO730Zq0.mjs +5 -0
- package/dist/{factory-DD2T33C9.mjs → factory-A9x-T2Kg.mjs} +5 -5
- package/dist/{factory-DD2T33C9.mjs.map → factory-A9x-T2Kg.mjs.map} +1 -1
- package/dist/factory-BD-np0Vd.mjs +3 -0
- package/dist/hooks/route-agents-to-worker.mjs +36 -6
- package/dist/hooks/route-agents-to-worker.mjs.map +2 -2
- package/dist/hooks/worker-proxy.mjs +34 -4
- package/dist/hooks/worker-proxy.mjs.map +2 -2
- package/dist/hooks/worker-status-line.mjs +100 -9
- package/dist/hooks/worker-status-line.mjs.map +4 -4
- package/dist/{indexer-backend-Cox9BCo-.mjs → indexer-backend-TG64CCQC.mjs} +1 -1
- package/dist/{indexer-backend-Cox9BCo-.mjs.map → indexer-backend-TG64CCQC.mjs.map} +1 -1
- package/dist/{latent-ideas-BC1oINZ-.mjs → latent-ideas-B7wq75Pt.mjs} +2 -2
- package/dist/{latent-ideas-BC1oINZ-.mjs.map → latent-ideas-B7wq75Pt.mjs.map} +1 -1
- package/dist/{link-boost-QFLrJwD6.mjs → link-boost-HkG7JWZR.mjs} +1 -1
- package/dist/{link-boost-QFLrJwD6.mjs.map → link-boost-HkG7JWZR.mjs.map} +1 -1
- package/dist/{neighborhood-D9MJ1c8f.mjs → neighborhood-lThN-MaQ.mjs} +1 -1
- package/dist/{neighborhood-D9MJ1c8f.mjs.map → neighborhood-lThN-MaQ.mjs.map} +1 -1
- package/dist/{note-context-d1wT_-GA.mjs → note-context-b6k0mAKi.mjs} +1 -1
- package/dist/{note-context-d1wT_-GA.mjs.map → note-context-b6k0mAKi.mjs.map} +1 -1
- package/dist/planner-BDI7bE9B.mjs +243 -0
- package/dist/planner-BDI7bE9B.mjs.map +1 -0
- package/dist/{postgres--BjPtLa0.mjs → postgres-mW1n7Vi1.mjs} +1 -1
- package/dist/{postgres--BjPtLa0.mjs.map → postgres-mW1n7Vi1.mjs.map} +1 -1
- package/dist/{program-Y0hAiVy8.mjs → program-DXBwJV7h.mjs} +70 -19
- package/dist/{program-Y0hAiVy8.mjs.map → program-DXBwJV7h.mjs.map} +1 -1
- package/dist/providers-FYkZjn_C.mjs +1405 -0
- package/dist/providers-FYkZjn_C.mjs.map +1 -0
- package/dist/{query-feedback-BUJxgw5B.mjs → query-feedback-BV4CcxqS.mjs} +1 -1
- package/dist/{query-feedback-BUJxgw5B.mjs.map → query-feedback-BV4CcxqS.mjs.map} +1 -1
- package/dist/query-feedback-DSVyHtrG.mjs +3 -0
- package/dist/router-Bk77E7hj.mjs +3 -0
- package/dist/{router-DK_sLsUL.mjs → router-DcHKnEPa.mjs} +1 -1
- package/dist/{router-DK_sLsUL.mjs.map → router-DcHKnEPa.mjs.map} +1 -1
- package/dist/{sources-Bi7--33T.mjs → sources-kLnQsNrW.mjs} +1 -1
- package/dist/{sources-Bi7--33T.mjs.map → sources-kLnQsNrW.mjs.map} +1 -1
- package/dist/{sqlite-DtaL1glm.mjs → sqlite-BenGr3UP.mjs} +1 -1
- package/dist/{sqlite-DtaL1glm.mjs.map → sqlite-BenGr3UP.mjs.map} +1 -1
- package/dist/{state-BY2L6-vX.mjs → state-CAeyOdfq.mjs} +1 -1
- package/dist/{state-BY2L6-vX.mjs.map → state-CAeyOdfq.mjs.map} +1 -1
- package/dist/{state-8Hm9E4tW.mjs → state-Ca9F_sZc.mjs} +1 -1
- package/dist/{themes-BN0a2duq.mjs → themes-BI4GMRP9.mjs} +1 -1
- package/dist/{themes-BN0a2duq.mjs.map → themes-BI4GMRP9.mjs.map} +1 -1
- package/dist/{tools-CGPqpU3A.mjs → tools-Bp7hj6OW.mjs} +1 -1
- package/dist/{tools-y2bJpKom.mjs → tools-DGcB3o_S.mjs} +13 -13
- package/dist/{tools-y2bJpKom.mjs.map → tools-DGcB3o_S.mjs.map} +1 -1
- package/dist/{trace-h23JCcFD.mjs → trace-bobARFEX.mjs} +1 -1
- package/dist/{trace-h23JCcFD.mjs.map → trace-bobARFEX.mjs.map} +1 -1
- package/dist/{vault-indexer-DgsPjMgs.mjs → vault-indexer-C3OfXTNF.mjs} +1 -1
- package/dist/{vault-indexer-DgsPjMgs.mjs.map → vault-indexer-C3OfXTNF.mjs.map} +1 -1
- package/dist/{work-queue-worker-gsKd2LJa.mjs → work-queue-worker-DW8lz-Oo.mjs} +3 -3
- package/dist/{work-queue-worker-Dva_v_pI.mjs → work-queue-worker-R7UGIag_.mjs} +3 -3
- package/dist/{work-queue-worker-Dva_v_pI.mjs.map → work-queue-worker-R7UGIag_.mjs.map} +1 -1
- package/dist/{zettelkasten-vo7psPdT.mjs → zettelkasten-m5QPtb-L.mjs} +3 -3
- package/dist/{zettelkasten-vo7psPdT.mjs.map → zettelkasten-m5QPtb-L.mjs.map} +1 -1
- package/docs/commands/README.md +4 -0
- package/docs/commands/worker.md +56 -0
- package/docs/worker.md +89 -1
- package/package.json +1 -1
- package/src/hooks/ts/pre-tool-use/route-agents-to-worker.ts +2 -2
- package/dist/detector-DtLExmHN.mjs +0 -5
- package/dist/factory-BXzqRYVZ.mjs +0 -3
- package/dist/providers-DUshcB-d.mjs.map +0 -1
- package/dist/query-feedback-DhyLOe5S.mjs +0 -3
- package/dist/router-1zi8jiNF.mjs +0 -3
- /package/dist/{main-resolver-IhZo4pI0.mjs → main-resolver-D6IImXvF.mjs} +0 -0
|
@@ -11,10 +11,11 @@ import { _ as findMovedProjects, a as findLatestNote, c as extractAndStoreTriple
|
|
|
11
11
|
import { a as schedulerLogPath, i as paiSocketPath, n as daemonLogPath, r as daemonPidPath } from "./runtime-paths-rni52zHX.mjs";
|
|
12
12
|
import { t as PaiClient } from "./ipc-client-BmypMNYk.mjs";
|
|
13
13
|
import { a as expandHome, c as UNROUTED, i as ensureConfigDir, n as CONFIG_FILE$2, o as loadConfig, s as OWNER_LABEL_PREFIX, t as CONFIG_DIR } from "./config-B64vFg14.mjs";
|
|
14
|
-
import { r as humanDuration, t as createStorageBackend } from "./factory-
|
|
15
|
-
import {
|
|
14
|
+
import { r as humanDuration, t as createStorageBackend } from "./factory-A9x-T2Kg.mjs";
|
|
15
|
+
import { B as workersLogDir, H as PROVIDER_TAGS, I as parseRunnerArgs, J as readWorkersSection, R as eventsPath, U as WorkersConfigError, X as readJsonStrict, Z as writeJsonAtomic, a as testProvider, b as openPaneForWorker, c as stopProxy, f as discardWorker, g as sayToWorker, i as runWorker, j as loadStatus, l as describeMcp, m as handoffFromInside, o as DEFAULT_PROXY_PORT, p as mergeWorker, s as ensureProxyRunning, t as runChain, v as checkPaneForWorker, y as openFollowPane, z as ledgerPath } from "./chain-CTtHligI.mjs";
|
|
16
16
|
import { s as kgQuery } from "./kg-entity-r8duqhi9.mjs";
|
|
17
17
|
import { _ as scanSessions, a as renderDedupedSessions, c as probeResume, d as callAiBroker, f as fetchLiveSessions, g as resolveSessionByNameOrId, h as fmtAge, i as normalizeName$2, l as restoreTopLevel, m as sendToSession, o as hasConversation, p as revealItermSession, r as buildDeduped, s as launchInDir, t as cmdMain, u as printExitDir } from "./main-resolver-DlaLOFBA.mjs";
|
|
18
|
+
import { a as setClass, c as unsetClass, d as followWorkers, f as psOutput, i as removeProvider, l as updateProvider, m as statusLineOutput, n as classTargetText, o as setProviderEnabled, p as replayOutput, r as describeProviders, s as setWorkersEnabled, t as addProvider, u as useProvider } from "./providers-FYkZjn_C.mjs";
|
|
18
19
|
import { appendFileSync, chmodSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
19
20
|
import { homedir, platform, tmpdir } from "node:os";
|
|
20
21
|
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
@@ -1889,7 +1890,7 @@ function cmdUnregister(db, slug, opts = {}) {
|
|
|
1889
1890
|
//#region src/cli/commands/project/projects-index.ts
|
|
1890
1891
|
function registerProjectsCommands(projectsCmd, getDb) {
|
|
1891
1892
|
projectsCmd.command("list", { isDefault: true }).description("Show the unified deduped listing (same as `pai`).\nUse --all to include cold / zero-session / archived projects.").option("--all", "Show all entries including cold / zero-session / archived projects").option("-n, --n <count>", "Max rows to show", "20").action(async (opts) => {
|
|
1892
|
-
const { cmdMain } = await import("./main-resolver-
|
|
1893
|
+
const { cmdMain } = await import("./main-resolver-D6IImXvF.mjs");
|
|
1893
1894
|
await cmdMain(getDb(), void 0, void 0, opts);
|
|
1894
1895
|
});
|
|
1895
1896
|
projectsCmd.command("list-raw").description("Raw registry listing with slug, path, status, last_active columns").option("--all", "Include archived projects (default: active only)").option("--status <status>", "Filter by status: active | archived").option("--tag <tag>", "Filter by tag").option("--type <type>", "Filter by type").action((opts) => {
|
|
@@ -2961,9 +2962,9 @@ function registerStatsCommands(memoryCmd, getDb) {
|
|
|
2961
2962
|
//#region src/cli/commands/memory/sources-cmd.ts
|
|
2962
2963
|
function registerSourcesCommand(memoryCmd) {
|
|
2963
2964
|
memoryCmd.command("sources").description("Show what the indexer has taken in: composition by source, which roots\ncontent enters from, the heaviest single files, and how many chunks are\nrewritten per day (which distinguishes a finite backlog from a treadmill).").option("--limit <n>", "Rows per section (default 8)", "8").action(async (opts) => {
|
|
2964
|
-
const { createStorageBackend } = await import("./factory-
|
|
2965
|
+
const { createStorageBackend } = await import("./factory-BD-np0Vd.mjs");
|
|
2965
2966
|
const { loadConfig } = await import("./config-C_ErGddD.mjs");
|
|
2966
|
-
const { cmdMemorySources } = await import("./sources-
|
|
2967
|
+
const { cmdMemorySources } = await import("./sources-kLnQsNrW.mjs");
|
|
2967
2968
|
let backend;
|
|
2968
2969
|
try {
|
|
2969
2970
|
backend = await createStorageBackend(loadConfig());
|
|
@@ -3650,7 +3651,7 @@ function cmdLogs(opts) {
|
|
|
3650
3651
|
}
|
|
3651
3652
|
function registerDaemonCommands(daemonCmd) {
|
|
3652
3653
|
daemonCmd.command("serve").description("Start the PAI daemon in the foreground").action(async () => {
|
|
3653
|
-
const { serve } = await import("./daemon-
|
|
3654
|
+
const { serve } = await import("./daemon-CmHHmKpg.mjs");
|
|
3654
3655
|
const { loadConfig: lc, ensureConfigDir } = await import("./config-C_ErGddD.mjs");
|
|
3655
3656
|
ensureConfigDir();
|
|
3656
3657
|
await serve(lc());
|
|
@@ -7228,7 +7229,7 @@ async function cmdExplore(note, opts) {
|
|
|
7228
7229
|
const depth = parseInt(opts.depth ?? "3", 10);
|
|
7229
7230
|
const direction = opts.direction ?? "both";
|
|
7230
7231
|
const mode = opts.mode ?? "all";
|
|
7231
|
-
const { zettelExplore } = await import("./zettelkasten-
|
|
7232
|
+
const { zettelExplore } = await import("./zettelkasten-m5QPtb-L.mjs");
|
|
7232
7233
|
const result = zettelExplore(getFedDb(), {
|
|
7233
7234
|
startNote: note,
|
|
7234
7235
|
depth,
|
|
@@ -7293,7 +7294,7 @@ async function cmdHealth(opts) {
|
|
|
7293
7294
|
const projectPath = opts.project;
|
|
7294
7295
|
const recentDays = parseInt(opts.days ?? "30", 10);
|
|
7295
7296
|
const includeTypes = opts.include ? opts.include.split(",").map((s) => s.trim()) : void 0;
|
|
7296
|
-
const { zettelHealth } = await import("./zettelkasten-
|
|
7297
|
+
const { zettelHealth } = await import("./zettelkasten-m5QPtb-L.mjs");
|
|
7297
7298
|
const result = zettelHealth(getFedDb(), {
|
|
7298
7299
|
scope,
|
|
7299
7300
|
projectPath,
|
|
@@ -7364,7 +7365,7 @@ async function cmdSurprise(note, opts) {
|
|
|
7364
7365
|
const limit = parseInt(opts.limit ?? "10", 10);
|
|
7365
7366
|
const minSimilarity = parseFloat(opts.minSimilarity ?? "0.3");
|
|
7366
7367
|
const minGraphDistance = parseInt(opts.minDistance ?? "3", 10);
|
|
7367
|
-
const { zettelSurprise } = await import("./zettelkasten-
|
|
7368
|
+
const { zettelSurprise } = await import("./zettelkasten-m5QPtb-L.mjs");
|
|
7368
7369
|
const db = getFedDb();
|
|
7369
7370
|
console.log();
|
|
7370
7371
|
console.log(header(" PAI Zettel Surprise"));
|
|
@@ -7419,7 +7420,7 @@ async function cmdSuggest(note, opts) {
|
|
|
7419
7420
|
const vaultProjectId = parseInt(opts.vaultProjectId, 10);
|
|
7420
7421
|
const limit = parseInt(opts.limit ?? "5", 10);
|
|
7421
7422
|
const excludeLinked = opts.excludeLinked !== false;
|
|
7422
|
-
const { zettelSuggest } = await import("./zettelkasten-
|
|
7423
|
+
const { zettelSuggest } = await import("./zettelkasten-m5QPtb-L.mjs");
|
|
7423
7424
|
const db = getFedDb();
|
|
7424
7425
|
console.log();
|
|
7425
7426
|
console.log(header(" PAI Zettel Suggest"));
|
|
@@ -7472,7 +7473,7 @@ async function cmdConverse(question, opts) {
|
|
|
7472
7473
|
const vaultProjectId = parseInt(opts.vaultProjectId, 10);
|
|
7473
7474
|
const depth = parseInt(opts.depth ?? "2", 10);
|
|
7474
7475
|
const limit = parseInt(opts.limit ?? "15", 10);
|
|
7475
|
-
const { zettelConverse } = await import("./zettelkasten-
|
|
7476
|
+
const { zettelConverse } = await import("./zettelkasten-m5QPtb-L.mjs");
|
|
7476
7477
|
const db = getFedDb();
|
|
7477
7478
|
console.log();
|
|
7478
7479
|
console.log(header(" PAI Zettel Converse"));
|
|
@@ -7535,7 +7536,7 @@ async function cmdThemes(opts) {
|
|
|
7535
7536
|
const minClusterSize = parseInt(opts.minSize ?? "3", 10);
|
|
7536
7537
|
const maxThemes = parseInt(opts.maxThemes ?? "10", 10);
|
|
7537
7538
|
const similarityThreshold = parseFloat(opts.threshold ?? "0.65");
|
|
7538
|
-
const { zettelThemes } = await import("./zettelkasten-
|
|
7539
|
+
const { zettelThemes } = await import("./zettelkasten-m5QPtb-L.mjs");
|
|
7539
7540
|
const db = getFedDb();
|
|
7540
7541
|
console.log();
|
|
7541
7542
|
console.log(header(" PAI Zettel Themes"));
|
|
@@ -9110,7 +9111,7 @@ async function escalate(task, headline, detail, state, now, opts) {
|
|
|
9110
9111
|
state.alarmedAt[task.id] = now;
|
|
9111
9112
|
let delivered = false;
|
|
9112
9113
|
try {
|
|
9113
|
-
const { routeNotification } = await import("./router-
|
|
9114
|
+
const { routeNotification } = await import("./router-Bk77E7hj.mjs");
|
|
9114
9115
|
const { loadConfig } = await import("./config-C_ErGddD.mjs");
|
|
9115
9116
|
delivered = (await routeNotification({
|
|
9116
9117
|
event: "error",
|
|
@@ -11727,9 +11728,9 @@ function cmdActive(db, opts) {
|
|
|
11727
11728
|
], rows));
|
|
11728
11729
|
}
|
|
11729
11730
|
async function cmdAutoRoute(opts) {
|
|
11730
|
-
const { autoRoute, formatAutoRoute, formatAutoRouteJson } = await import("./auto-route-
|
|
11731
|
+
const { autoRoute, formatAutoRoute, formatAutoRouteJson } = await import("./auto-route-BlWOWT4z.mjs");
|
|
11731
11732
|
const { openRegistry } = await import("./db-XEwJbuGO.mjs");
|
|
11732
|
-
const { createStorageBackend } = await import("./factory-
|
|
11733
|
+
const { createStorageBackend } = await import("./factory-BD-np0Vd.mjs");
|
|
11733
11734
|
const { loadConfig } = await import("./config-C_ErGddD.mjs");
|
|
11734
11735
|
const config = loadConfig();
|
|
11735
11736
|
const registryDb = openRegistry();
|
|
@@ -13880,7 +13881,7 @@ function fail(e) {
|
|
|
13880
13881
|
process.exitCode = 1;
|
|
13881
13882
|
}
|
|
13882
13883
|
function registerWorkerCommands(workerCmd) {
|
|
13883
|
-
workerCmd.command("run").description("Run one claude-code worker through the configured provider.\nUnknown options are passed to claude verbatim (e.g. -p, --allowedTools);\n--output-format/--verbose are handled here.\n--chain draft,implement[,review] runs a spec-first pipeline;\n--agent <name> runs an agent definition from ~/.claude/agents.").allowUnknownOption(true).option("--provider <name>", "Provider to run on (default: active, else routing order)").option("--class <name>", "Use the provider of this class (draft, implement, review, research, spotcheck, simple, complex, image)").option("--role <name>", "Alias of --class (roles were renamed to classes)").option("--chain <stages>", "Comma-separated stage classes, e.g. draft,implement or draft,implement,review").option("--agent <name>", "Run the agent definition ~/.claude/agents/<name>.md on a worker").option("--model <model>", "Override the provider's model for this run").option("--label <text>", "Short task label shown in ps / follow / status line").option("--mcp <names>", "MCP servers/sets this worker may use (comma-separated; see `pai worker mcp`)").option("--no-pane", "Do not open a follow pane for this worker").argument("[args...]", "claude arguments, e.g. -p '<task>' --allowedTools 'Read,Edit,Bash'").action(async (args, opts) => {
|
|
13884
|
+
workerCmd.command("run").description("Run one claude-code worker through the configured provider.\nUnknown options are passed to claude verbatim (e.g. -p, --allowedTools);\n--output-format/--verbose are handled here.\n--chain draft,implement[,review] runs a spec-first pipeline;\n--agent <name> runs an agent definition from ~/.claude/agents.").allowUnknownOption(true).option("--provider <name>", "Provider to run on (default: active, else routing order)").option("--class <name>", "Use the provider of this class (draft, implement, review, research, spotcheck, simple, complex, image)").option("--role <name>", "Alias of --class (roles were renamed to classes)").option("--chain <stages>", "Comma-separated stage classes, e.g. draft,implement or draft,implement,review").option("--agent <name>", "Run the agent definition ~/.claude/agents/<name>.md on a worker").option("--model <model>", "Override the provider's model for this run").option("--label <text>", "Short task label shown in ps / follow / status line").option("--mcp <names>", "MCP servers/sets this worker may use (comma-separated; see `pai worker mcp`)").option("--no-pane", "Do not open a follow pane for this worker").option("--worktree", "Run in a git worktree on branch worker/<id> (default for implement/complex/plan in a git repo)").option("--no-worktree", "Run in place, no worktree").argument("[args...]", "claude arguments, e.g. -p '<task>' --allowedTools 'Read,Edit,Bash'").action(async (args, opts) => {
|
|
13884
13885
|
try {
|
|
13885
13886
|
const className = opts.class ?? opts.role;
|
|
13886
13887
|
let claudeArgs = args;
|
|
@@ -13916,6 +13917,7 @@ function registerWorkerCommands(workerCmd) {
|
|
|
13916
13917
|
label,
|
|
13917
13918
|
mcpFlag: opts.mcp,
|
|
13918
13919
|
noPane: opts.pane === false,
|
|
13920
|
+
worktreeFlag: opts.worktree,
|
|
13919
13921
|
claudeArgs
|
|
13920
13922
|
});
|
|
13921
13923
|
process.exitCode = rc;
|
|
@@ -14018,6 +14020,55 @@ function registerWorkerCommands(workerCmd) {
|
|
|
14018
14020
|
fail(e);
|
|
14019
14021
|
}
|
|
14020
14022
|
});
|
|
14023
|
+
workerCmd.command("handoff <json>").description("From inside a worker: append a handoff to the parent's inbox and (when it runs) say it to the parent.\nPayload: {\"kind\":\"proposal|question|blocker\",\"text\":\"…\",\"data\":{…}} — from/to come from the environment.").action(async (json) => {
|
|
14024
|
+
try {
|
|
14025
|
+
let payload;
|
|
14026
|
+
try {
|
|
14027
|
+
payload = JSON.parse(json);
|
|
14028
|
+
} catch {
|
|
14029
|
+
fail(/* @__PURE__ */ new Error(`payload is not JSON: ${json}`));
|
|
14030
|
+
return;
|
|
14031
|
+
}
|
|
14032
|
+
const h = await handoffFromInside(currentLogDir(), process.env, payload);
|
|
14033
|
+
console.log(`ok → ${h.to} (${h.kind}); inbox ${h.to}.inbox.jsonl`);
|
|
14034
|
+
} catch (e) {
|
|
14035
|
+
fail(e);
|
|
14036
|
+
}
|
|
14037
|
+
});
|
|
14038
|
+
workerCmd.command("merge <id>").description("Merge a worker's worktree branch (worker/<id>) into the original checkout, then remove the worktree").action((id) => {
|
|
14039
|
+
try {
|
|
14040
|
+
console.log(mergeWorker(currentLogDir(), id));
|
|
14041
|
+
} catch (e) {
|
|
14042
|
+
fail(e);
|
|
14043
|
+
}
|
|
14044
|
+
});
|
|
14045
|
+
workerCmd.command("discard <id>").description("Drop a worker's worktree and branch, keeping nothing").action((id) => {
|
|
14046
|
+
try {
|
|
14047
|
+
console.log(discardWorker(currentLogDir(), id));
|
|
14048
|
+
} catch (e) {
|
|
14049
|
+
fail(e);
|
|
14050
|
+
}
|
|
14051
|
+
});
|
|
14052
|
+
workerCmd.command("controls <id> <who>").description("Hand the desktop controls (clickr) to a worker or take them back.\n<who> is `you` (the worker may actuate) or `me` (the operator keeps them);\ninside a worker's pane, typing \"your controls\" does the same.").action((id, who) => {
|
|
14053
|
+
try {
|
|
14054
|
+
if (who !== "you" && who !== "me") {
|
|
14055
|
+
fail(/* @__PURE__ */ new Error(`<who> must be "you" or "me"`));
|
|
14056
|
+
return;
|
|
14057
|
+
}
|
|
14058
|
+
if (!loadStatus(currentLogDir(), id)) {
|
|
14059
|
+
fail(/* @__PURE__ */ new Error(`no worker named "${id}"`));
|
|
14060
|
+
return;
|
|
14061
|
+
}
|
|
14062
|
+
const proc = spawn("clickr", ["controls", who], { stdio: "inherit" });
|
|
14063
|
+
proc.on("error", (e) => fail(/* @__PURE__ */ new Error(`cannot run clickr controls: ${e.message} (is clickr installed?)`)));
|
|
14064
|
+
proc.on("close", (code) => {
|
|
14065
|
+
if (code === 0) console.log(`controls → ${who === "you" ? id : "operator"}`);
|
|
14066
|
+
process.exitCode = code ?? 1;
|
|
14067
|
+
});
|
|
14068
|
+
} catch (e) {
|
|
14069
|
+
fail(e);
|
|
14070
|
+
}
|
|
14071
|
+
});
|
|
14021
14072
|
workerCmd.command("resume <id> <text>").description("Continue a finished worker on the same provider: claude --resume <session>").option("--print-id", "Print the new worker id on its own line (pane follow handoff)").option("--no-pane", "Do not open a follow pane for the resumed worker").action(async (id, text, opts) => {
|
|
14022
14073
|
try {
|
|
14023
14074
|
const old = loadStatus(currentLogDir(), id);
|
|
@@ -14484,7 +14535,7 @@ async function countVectorDbPaths(oldPaths) {
|
|
|
14484
14535
|
if (oldPaths.length === 0) return 0;
|
|
14485
14536
|
try {
|
|
14486
14537
|
const { loadConfig } = await import("./config-C_ErGddD.mjs");
|
|
14487
|
-
const { PostgresBackend } = await import("./postgres
|
|
14538
|
+
const { PostgresBackend } = await import("./postgres-mW1n7Vi1.mjs");
|
|
14488
14539
|
const config = loadConfig();
|
|
14489
14540
|
if (config.storageBackend !== "postgres") return 0;
|
|
14490
14541
|
const pgBackend = new PostgresBackend(config.postgres ?? {});
|
|
@@ -14505,7 +14556,7 @@ async function updateVectorDbPaths(moves) {
|
|
|
14505
14556
|
if (moves.length === 0) return 0;
|
|
14506
14557
|
try {
|
|
14507
14558
|
const { loadConfig } = await import("./config-C_ErGddD.mjs");
|
|
14508
|
-
const { PostgresBackend } = await import("./postgres
|
|
14559
|
+
const { PostgresBackend } = await import("./postgres-mW1n7Vi1.mjs");
|
|
14509
14560
|
const config = loadConfig();
|
|
14510
14561
|
if (config.storageBackend !== "postgres") return 0;
|
|
14511
14562
|
const pgBackend = new PostgresBackend(config.postgres ?? {});
|
|
@@ -16030,4 +16081,4 @@ claude() {
|
|
|
16030
16081
|
|
|
16031
16082
|
//#endregion
|
|
16032
16083
|
export { drainStdio as n, buildProgram as t };
|
|
16033
|
-
//# sourceMappingURL=program-
|
|
16084
|
+
//# sourceMappingURL=program-DXBwJV7h.mjs.map
|