@tekmidian/pai 1.0.3 → 1.0.4
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/.claude-plugin/plugin.json +1 -1
- package/dist/{auto-route-B7Yu6Uam.mjs → auto-route-21GdHL70.mjs} +1 -1
- package/dist/{auto-route-CjjQqU1o.mjs → auto-route-C3S2W3Bc.mjs} +1 -1
- package/dist/{budget-Dod6rnA9.mjs → budget-BrloTOZW.mjs} +1 -1
- package/dist/{chain-7n9Gx56r.mjs → chain-D7PFur8Y.mjs} +2 -2
- package/dist/cli/index.mjs +70 -180
- package/dist/{cockpit-actions-DR9X514g.mjs → cockpit-actions-BfRMr2sm.mjs} +6 -6
- package/dist/{cockpit-actions-BBHeyEZI.mjs → cockpit-actions-OodH_vx_.mjs} +20 -18
- package/dist/{cockpit-memory--dnShXBA.mjs → cockpit-memory-teG9M8bG.mjs} +6 -6
- package/dist/config/defaults/config.yaml +6 -0
- package/dist/{controls-CPoeudou.mjs → controls-JLm6g0yP.mjs} +7 -5
- package/dist/daemon/index.mjs +18 -18
- package/dist/{daemon-DKdBNKfa.mjs → daemon-DeYImF1F.mjs} +18 -18
- package/dist/daemon-mcp/index.mjs +18 -18
- package/dist/{daemon-DPAo6WTa.mjs → daemon-nXanenDM.mjs} +21 -17
- package/dist/{detect-9CZNO0yf.mjs → detect-BLKsUOgG.mjs} +2 -2
- package/dist/{detect-D1ziFFfA.mjs → detect-Rrimh0xc.mjs} +3 -3
- package/dist/{embed-pass-DIWjA68P.mjs → embed-pass-e64AwDCa.mjs} +1 -1
- package/dist/{endreason-C577xIQz.mjs → endreason-BC-v05H_.mjs} +17 -3
- package/dist/{factory-DjAAsqr_.mjs → factory-B7nv75rC.mjs} +2 -2
- package/dist/{factory-Bsib-qDG.mjs → factory-Bs9imVMq.mjs} +2 -2
- package/dist/{fallback-DFlItw1Z.mjs → fallback-CBWpp2F2.mjs} +227 -5
- package/dist/{health-Dnym-qcT.mjs → health-C4FQmkJn.mjs} +2 -2
- package/dist/{helpers-BD6V-p9w.mjs → helpers-DSNK_1KP.mjs} +2 -2
- package/dist/{helpers-CMGjy_0N.mjs → helpers-Dz7mjTSw.mjs} +3 -3
- package/dist/hooks/capture-all-events.mjs +21 -2
- package/dist/hooks/capture-tool-output.mjs +21 -2
- package/dist/hooks/worker-pool-host.mjs +52 -9
- package/dist/hooks/worker-status-line.mjs +34 -6
- package/dist/{indexer-backend-Cll7le4P.mjs → indexer-backend-BdjeL4P8.mjs} +31 -228
- package/dist/{ipc-client-CaiGJnSM.mjs → ipc-client-CnYEF31R.mjs} +1 -1
- package/dist/{ipc-client-ZRmDKd5Z.mjs → ipc-client-DN7EvoVo.mjs} +1 -1
- package/dist/{kill-tree-EWYaEk5v.mjs → kill-tree-DleMNZX3.mjs} +2 -2
- package/dist/{kill-tree-BG7dRVtp.mjs → kill-tree-SV6hrIa3.mjs} +2 -2
- package/dist/{launch-Jh5NVeNe.mjs → launch-Di7N-J5X.mjs} +2 -2
- package/dist/{launch-CXVlZjHt.mjs → launch-DlZTKE3u.mjs} +2 -2
- package/dist/{main-config-ops-BEMpuhDz.mjs → main-config-ops-kTXR8Pyv.mjs} +1 -1
- package/dist/{main-resolver-3Ns1HPmS.mjs → main-resolver-yp_puSSb.mjs} +5 -5
- package/dist/{model-inventory-BFVSNFT3.mjs → model-inventory-h6Z9fN_o.mjs} +1 -1
- package/dist/{models-add-C1QIc1DA.mjs → models-add-TVni3A7V.mjs} +19 -19
- package/dist/{pane-audit-DKQt71s4.mjs → pane-audit-Lqy9N_Ki.mjs} +23 -5
- package/dist/{planner-BmFACdLa.mjs → planner-j77ndkBf.mjs} +11 -11
- package/dist/{postgres-BdBNkL_l.mjs → postgres-BK4FP9Zg.mjs} +1 -1
- package/dist/{postgres-C6ti4haA.mjs → postgres-DNIOQijl.mjs} +17 -7
- package/dist/{project-setup-jvfONJTQ.mjs → project-setup-CBRtFFh0.mjs} +15 -235
- package/dist/{providers-CblTFrhz.mjs → providers-C9QC0TtO.mjs} +2 -2
- package/dist/{providers-BeDiVEb-.mjs → providers-FvCLzFge.mjs} +2 -2
- package/dist/{query-feedback-BRfPtqki.mjs → query-feedback-DN52N9C5.mjs} +1 -1
- package/dist/{render-CoMvwMPs.mjs → render-B35bQTE-.mjs} +2 -2
- package/dist/{render-BYmQkuLd.mjs → render-C84BqQRC.mjs} +2 -2
- package/dist/{root-Xglu0OPD.mjs → root-C4oXlXS_.mjs} +7 -7
- package/dist/{root-FtJsxYnm.mjs → root-DD1xx_Vu.mjs} +12 -12
- package/dist/route-table-FEfDuhIV.mjs +15 -0
- package/dist/{routing-BAAST9vT.mjs → routing-DmkheCRH.mjs} +126 -8
- package/dist/{routing-CENt4HH1.mjs → routing-f2zulGwD.mjs} +1 -1
- package/dist/{run-CSC7mgPf.mjs → run-BwZKBJZZ.mjs} +25 -11
- package/dist/{scan-C_Y5W9py.mjs → scan-BBGvU5EB.mjs} +2 -2
- package/dist/{session-BeqAbNPd.mjs → session-BAhtXdxj.mjs} +11 -11
- package/dist/{session-8iqQDkqb.mjs → session-Dn5OJXlg.mjs} +20 -20
- package/dist/{session-scan-BJI_ZO8M.mjs → session-scan-B57dNuA4.mjs} +1 -1
- package/dist/{session-scan-W-gbwJHM.mjs → session-scan-DUn10MBd.mjs} +2 -2
- package/dist/session-usage-CPvXvSkw.mjs +222 -0
- package/dist/{sources-ESUkZaWv.mjs → sources-CiE3rZek.mjs} +1 -1
- package/dist/{viewer-CqozWW39.mjs → viewer-DEySE4c_.mjs} +6 -6
- package/dist/{viewer-mDXUNHNy.mjs → viewer-wfKnvnrI.mjs} +5 -5
- package/dist/{worker-config-DESkIjMF.mjs → worker-config-CO5FXLAT.mjs} +18 -18
- package/dist/{worker-config-CJhEMk19.mjs → worker-config-eY5Qy4vl.mjs} +318 -21
- package/dist/{zettelkasten-BzMm8REH.mjs → zettelkasten-_h_tUm2T.mjs} +1 -1
- package/dist/{zettelkasten-B_rRRRvD.mjs → zettelkasten-tpCRBYvH.mjs} +2 -2
- package/docs/cockpit.md +1 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/pai-plugin.json +1 -1
- package/plugins/context-preservation/plugin.json +1 -1
- package/plugins/core/plugin.json +1 -1
- package/plugins/creative/plugin.json +1 -1
- package/plugins/observability/plugin.json +1 -1
- package/plugins/productivity/plugin.json +1 -1
- package/plugins/semantic-search/plugin.json +1 -1
- package/plugins/ui/plugin.json +1 -1
- package/plugins/zettelkasten/plugin.json +1 -1
- package/src/hooks/ts/capture-all-events.ts +15 -3
- package/src/hooks/ts/lib/raw-capture.ts +7 -0
- package/src/hooks/ts/post-tool-use/capture-tool-output.ts +13 -3
- package/dist/route-table-B7zpoypi.mjs +0 -15
|
@@ -6,6 +6,6 @@ import "./status-ggJ7lgVg.mjs";
|
|
|
6
6
|
import "./pool-Dh-q3iJi.mjs";
|
|
7
7
|
import "./registrable-DpyTtajg.mjs";
|
|
8
8
|
import "./pai-marker-BcZyJguM.mjs";
|
|
9
|
-
import { n as formatAutoRouteJson, t as autoRoute } from "./auto-route-
|
|
9
|
+
import { n as formatAutoRouteJson, t as autoRoute } from "./auto-route-21GdHL70.mjs";
|
|
10
10
|
|
|
11
11
|
export { autoRoute, formatAutoRouteJson };
|
|
@@ -3,7 +3,7 @@ import "./config-Bu1_vbY8.mjs";
|
|
|
3
3
|
import "./paths-CHifubDh.mjs";
|
|
4
4
|
import "./status-ggJ7lgVg.mjs";
|
|
5
5
|
import "./scope-D-h6F6DN.mjs";
|
|
6
|
-
import { A as budgetSkipReason, D as budgetExceeded, E as budgetCache, M as budgetWall, N as fetchBudgetReading, O as budgetFresh, P as pickBudgetWindow, T as BudgetCache, j as budgetUntilLabel, k as budgetFull, w as BUDGET_TTL_MS } from "./routing-
|
|
6
|
+
import { A as budgetSkipReason, D as budgetExceeded, E as budgetCache, M as budgetWall, N as fetchBudgetReading, O as budgetFresh, P as pickBudgetWindow, T as BudgetCache, j as budgetUntilLabel, k as budgetFull, w as BUDGET_TTL_MS } from "./routing-DmkheCRH.mjs";
|
|
7
7
|
import "./tool-errors-7E13StWd.mjs";
|
|
8
8
|
import "./wait-ByV0OyMZ.mjs";
|
|
9
9
|
import "./local-tiers-BE4jGaMa.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as readWorkersSection, wt as appendLedger } from "./config-XpZWOYOG.mjs";
|
|
2
2
|
import { i as ledgerPath, u as workersLogDir } from "./paths-CHifubDh.mjs";
|
|
3
3
|
import { $ as isFlagToken, S as newWorkerId, nt as shortText } from "./status-ggJ7lgVg.mjs";
|
|
4
|
-
import { t as runWorker } from "./run-
|
|
4
|
+
import { t as runWorker } from "./run-BwZKBJZZ.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
|
|
@@ -163,4 +163,4 @@ async function runChain(opts, deps = {}) {
|
|
|
163
163
|
|
|
164
164
|
//#endregion
|
|
165
165
|
export { swapPromptArg as n, runChain as t };
|
|
166
|
-
//# sourceMappingURL=chain-
|
|
166
|
+
//# sourceMappingURL=chain-D7PFur8Y.mjs.map
|
package/dist/cli/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import "../helpers-CRuBUas3.mjs";
|
|
|
14
14
|
import { t as applyRecencyBoost } from "../search-RSyeQqj1.mjs";
|
|
15
15
|
import { t as dropItermBundleId } from "../env-BE8mrsxr.mjs";
|
|
16
16
|
import { a as ownerSessionName, d as terminalHasName } from "../scope-D-h6F6DN.mjs";
|
|
17
|
-
import {
|
|
17
|
+
import { At as hostAllowed, Bn as parkConfigFrom, Cn as providerHostPort, Dt as routerPort, E as budgetCache, Et as routerHandler, F as LimitsCache, Gn as aggregateBySession, Hn as sharedParker, Jn as formatStats, Jt as sessionStartTarget, Kn as appendUsage, Ln as setupsPath, Mn as loadSaved, On as allSetups, Ot as defaultV1Guard, Pn as saveSetup, Qn as readUsage, U as computeInventory, Un as recordDuration, Vn as setParkConfigSource, W as currentInventory, Wn as aggregate, Y as inventoryText, Zn as parseSince, at as readInventoryInput, dn as SESSION_NAME_ENV, jt as resolveBindAddress, kn as downLocalProviders, kt as displayHost, m as readRoutingState, mn as readProfiles, pt as isLoopbackProvider, qn as formatSessionStats, x as SESSION_WORKER_PROVIDER_ENV, xt as routeVerdictLine, yn as localProviderForDelegation } from "../routing-DmkheCRH.mjs";
|
|
18
18
|
import { n as minOf } from "../min-max-DrSRUaWQ.mjs";
|
|
19
19
|
import "../tool-errors-7E13StWd.mjs";
|
|
20
20
|
import "../wait-ByV0OyMZ.mjs";
|
|
@@ -24,48 +24,48 @@ import { d as setSchedConfigSource, f as sharedScheduler, i as mirrorTo, s as sc
|
|
|
24
24
|
import { i as effectiveCap, o as providerCap, r as capacityOf } from "../capacity-DEveQdFV.mjs";
|
|
25
25
|
import "../local-instances-DOxSgT_L.mjs";
|
|
26
26
|
import { n as tierProviderNames, t as isLocalCandidate } from "../local-candidate-DLdwQt0s.mjs";
|
|
27
|
-
import { n as TAILSCALE_STATUS_TIMEOUT_MS } from "../timeouts-1MLooEBB.mjs";
|
|
28
27
|
import { n as OPT, t as CliError } from "../define-CjJsmq-6.mjs";
|
|
29
|
-
import { a as getStorageBackend, c as MergeError, f as humanDuration, i as getRegistryBackend, l as federationDbPath, o as oldRegistryPath, r as createStorageBackend, s as registryDbPath, u as oldFederationPath } from "../factory-
|
|
30
|
-
import { c as resolveFromModule, i as retryTransient, n as embedChunksWithBackend, r as indexProjectWithBackend, s as packageRoot } from "../postgres-
|
|
28
|
+
import { a as getStorageBackend, c as MergeError, f as humanDuration, i as getRegistryBackend, l as federationDbPath, o as oldRegistryPath, r as createStorageBackend, s as registryDbPath, u as oldFederationPath } from "../factory-B7nv75rC.mjs";
|
|
29
|
+
import { c as resolveFromModule, i as retryTransient, n as embedChunksWithBackend, r as indexProjectWithBackend, s as packageRoot } from "../postgres-DNIOQijl.mjs";
|
|
31
30
|
import { d as OLLAMA_ID, f as ollamaDefaultUrl, i as measureThroughput, l as provisionOllama, o as createBackend, s as detectBackends, u as OLLAMA_DEFAULT_MODEL } from "../embedding-gate-6rZrWRXa.mjs";
|
|
32
31
|
import "../embeddings-BVq3esBF.mjs";
|
|
33
32
|
import "../router-CQSc3lk3.mjs";
|
|
34
|
-
import { t as detectProject } from "../detect-
|
|
35
|
-
import { n as getProject$1, o as requireProject, r as getProjectAliases, s as resolveIdentifier } from "../helpers-
|
|
36
|
-
import { a as resolveHome, c as upsertSession, d as scanTranscriptFolders, f as transcriptFiles, l as claudeProjectsDir$1, n as loadScanConfig, o as saveScanConfig, r as migrateScanConfig, s as upsertProject, t as cmdScan, u as findMovedProjects } from "../scan-
|
|
37
|
-
import { A as cmdAdd, B as cmdRebind, F as cmdEdit, H as cmdUnarchive, I as cmdGo, L as cmdInfo$1, M as cmdArchive, N as cmdConsolidate, P as cmdDetect, R as cmdList$1, S as legacy, U as findMovedPath, V as cmdTag$1, _ as cmdList, a as newTop, b as cmdSlug, f as sessionCommand, g as cmdInfo, h as cmdAutoRoute, i as lsCommand, j as cmdAlias, l as renameTop, m as cmdActive, r as collectView, s as openTop, v as cmdRename, x as cmdTag, y as cmdRoute, z as cmdMove } from "../session-
|
|
38
|
-
import { a as detectCurrentProviderName, i as detectCurrentModel, n as buildLaunchPlan, o as launchableProviderNames, r as buildLaunchRows, s as maskLaunchEnv } from "../launch-
|
|
39
|
-
import { a as colorEnabled, c as renderCommandHelp, d as renderOverview, f as renderTable$2, l as renderMarkdown, m as usageLine, o as makeStyle, p as suggest, s as mdCommand, u as renderMore } from "../health-
|
|
40
|
-
import { a as providerResumePlan, n as launchInDir, o as restoreTopLevel, r as launchPrompt, s as resumeArgvText, t as hasConversation } from "../launch-
|
|
41
|
-
import { _ as setupsTable, a as lastSetup, m as rootCommand } from "../root-
|
|
33
|
+
import { t as detectProject } from "../detect-BLKsUOgG.mjs";
|
|
34
|
+
import { n as getProject$1, o as requireProject, r as getProjectAliases, s as resolveIdentifier } from "../helpers-DSNK_1KP.mjs";
|
|
35
|
+
import { a as resolveHome, c as upsertSession, d as scanTranscriptFolders, f as transcriptFiles, l as claudeProjectsDir$1, n as loadScanConfig, o as saveScanConfig, r as migrateScanConfig, s as upsertProject, t as cmdScan, u as findMovedProjects } from "../scan-BBGvU5EB.mjs";
|
|
36
|
+
import { A as cmdAdd, B as cmdRebind, F as cmdEdit, H as cmdUnarchive, I as cmdGo, L as cmdInfo$1, M as cmdArchive, N as cmdConsolidate, P as cmdDetect, R as cmdList$1, S as legacy, U as findMovedPath, V as cmdTag$1, _ as cmdList, a as newTop, b as cmdSlug, f as sessionCommand, g as cmdInfo, h as cmdAutoRoute, i as lsCommand, j as cmdAlias, l as renameTop, m as cmdActive, r as collectView, s as openTop, v as cmdRename, x as cmdTag, y as cmdRoute, z as cmdMove } from "../session-Dn5OJXlg.mjs";
|
|
37
|
+
import { a as detectCurrentProviderName, i as detectCurrentModel, n as buildLaunchPlan, o as launchableProviderNames, r as buildLaunchRows, s as maskLaunchEnv } from "../launch-Di7N-J5X.mjs";
|
|
38
|
+
import { a as colorEnabled, c as renderCommandHelp, d as renderOverview, f as renderTable$2, l as renderMarkdown, m as usageLine, o as makeStyle, p as suggest, s as mdCommand, u as renderMore } from "../health-C4FQmkJn.mjs";
|
|
39
|
+
import { a as providerResumePlan, n as launchInDir, o as restoreTopLevel, r as launchPrompt, s as resumeArgvText, t as hasConversation } from "../launch-DlZTKE3u.mjs";
|
|
40
|
+
import { _ as setupsTable, a as lastSetup, m as rootCommand } from "../root-C4oXlXS_.mjs";
|
|
42
41
|
import { n as fetchLiveSessions, r as sendToSession, t as callAiBroker } from "../aibroker-client-CQPGqLxL.mjs";
|
|
43
|
-
import { a as resolveSessionByNameOrId, o as scanCacheFilePath, r as migrateSessionScanCache, s as scanSessions, t as fmtAge } from "../session-scan-
|
|
44
|
-
import { A as routerPidFile, B as usageContextTokens, D as routerHandoverFile, E as probeRouter, F as startHandover, I as paneWaiver, L as launchPane, M as routerSwapArgs, P as spawnRouter, R as noTerminalReasons, S as usageJson, T as projectLaunchConfig, b as renderUsage, c as reportOriginWithHost, f as dirtyPaths, g as realRunnerDeps, j as routerRunningPid, k as routerLogFile, l as runMessenger, s as finishDetached, u as startDetached, w as pinNotices, x as transcriptUsage, y as priceTableText } from "../run-
|
|
45
|
-
import { C as readRunLog, D as resumeState, E as requestPlanStop, F as runLogPath, I as PlanTracker, M as dirtyConflicts, O as runExitCode, P as loadPlan, S as planStopPath, T as renderStatus, Y as readRunLock, ht as resolveHostSession, j as PlanError, jt as runPaneExec, k as runPlan, l as PlanReporter, nt as closePaneForWorker, ot as inVisiblePane, q as planLockPath, rt as closeSelfPane, u as QueueReporter, vt as writePaneTitle, w as renderSchedule, x as planStatus, y as blockedMessage, yt as psTable } from "../controls-
|
|
46
|
-
import "../endreason-
|
|
47
|
-
import { N as endBuildWait, j as beginBuildWait } from "../render-
|
|
42
|
+
import { a as resolveSessionByNameOrId, o as scanCacheFilePath, r as migrateSessionScanCache, s as scanSessions, t as fmtAge } from "../session-scan-DUn10MBd.mjs";
|
|
43
|
+
import { A as routerPidFile, B as usageContextTokens, D as routerHandoverFile, E as probeRouter, F as startHandover, I as paneWaiver, L as launchPane, M as routerSwapArgs, P as spawnRouter, R as noTerminalReasons, S as usageJson, T as projectLaunchConfig, b as renderUsage, c as reportOriginWithHost, f as dirtyPaths, g as realRunnerDeps, j as routerRunningPid, k as routerLogFile, l as runMessenger, s as finishDetached, u as startDetached, w as pinNotices, x as transcriptUsage, y as priceTableText } from "../run-BwZKBJZZ.mjs";
|
|
44
|
+
import { C as readRunLog, D as resumeState, E as requestPlanStop, F as runLogPath, I as PlanTracker, M as dirtyConflicts, O as runExitCode, P as loadPlan, S as planStopPath, T as renderStatus, Y as readRunLock, ht as resolveHostSession, j as PlanError, jt as runPaneExec, k as runPlan, l as PlanReporter, nt as closePaneForWorker, ot as inVisiblePane, q as planLockPath, rt as closeSelfPane, u as QueueReporter, vt as writePaneTitle, w as renderSchedule, x as planStatus, y as blockedMessage, yt as psTable } from "../controls-JLm6g0yP.mjs";
|
|
45
|
+
import "../endreason-BC-v05H_.mjs";
|
|
46
|
+
import { N as endBuildWait, j as beginBuildWait } from "../render-C84BqQRC.mjs";
|
|
48
47
|
import "../operator-CyuB3aVw.mjs";
|
|
49
|
-
import "../kill-tree-
|
|
48
|
+
import "../kill-tree-DleMNZX3.mjs";
|
|
50
49
|
import { s as poolReloadLive } from "../pool-cli-BggU8GRp.mjs";
|
|
51
|
-
import "../chain-
|
|
52
|
-
import { _ as issueClaims, a as branchDiff, b as workerCommand, c as runQueue, d as loadSettings, f as move, g as issueClaim, h as renderReview, i as projectChecks, l as QueueStore, m as renderList, n as initProject, o as realQueueDeps, p as queueStatePath, r as isGitProject, s as acceptItems, t as formatCheck, u as again, v as issueStale } from "../project-setup-
|
|
53
|
-
import { m as runInPane, r as closeFinishedPanes } from "../pane-audit-
|
|
54
|
-
import "../viewer-
|
|
55
|
-
import
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import "../
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
50
|
+
import "../chain-D7PFur8Y.mjs";
|
|
51
|
+
import { _ as issueClaims, a as branchDiff, b as workerCommand, c as runQueue, d as loadSettings, f as move, g as issueClaim, h as renderReview, i as projectChecks, l as QueueStore, m as renderList, n as initProject, o as realQueueDeps, p as queueStatePath, r as isGitProject, s as acceptItems, t as formatCheck, u as again, v as issueStale } from "../project-setup-CBRtFFh0.mjs";
|
|
52
|
+
import { m as runInPane, r as closeFinishedPanes } from "../pane-audit-Lqy9N_Ki.mjs";
|
|
53
|
+
import "../viewer-wfKnvnrI.mjs";
|
|
54
|
+
import "../fallback-CBWpp2F2.mjs";
|
|
55
|
+
import { g as setWorkersEnabled, s as describeProviders } from "../providers-C9QC0TtO.mjs";
|
|
56
|
+
import { $ as exportDefaultLayout, B as mergeSettings, G as cachedRows, J as handleCockpit, K as cachedSessionMap, Q as warmCockpit, W as SystemMonitor, X as setEndpointHealth, Y as setActionHooks, Z as setRuntimeSampler, at as withWorkerAttribution, et as loadBuildsConfig, it as sessionDisplayName, lt as providersCommand, n as WORKER_CONFIG_COMMANDS, nt as loadSessionMap, q as cachedWorkerWindows, rt as loadWorkerWindows, t as PROVIDER_EDIT_COMMANDS, tt as createEndpointHealth, z as installWorkers } from "../worker-config-eY5Qy4vl.mjs";
|
|
57
|
+
import { a as listConfigOp, i as getConfigValueOp, n as formatConfigGetOutput, o as setConfigValueOp, r as formatConfigSource, s as unsetConfigValueOp, t as MainConfigOpsError } from "../main-config-ops-kTXR8Pyv.mjs";
|
|
58
|
+
import { H as acquireRun, U as readRun, V as cockpitProbeSettings, k as readRuntimeCommands } from "../cockpit-actions-OodH_vx_.mjs";
|
|
59
|
+
import { n as PaiClient } from "../ipc-client-CnYEF31R.mjs";
|
|
60
|
+
import { a as EMBED_PASS_BATCH_SIZE, c as liveYieldCheck, n as DEFAULT_EMBED_MAX_LOAD, o as formatEmbedStatus, r as DEFAULT_EMBED_MAX_MINUTES, s as lastRecordedEmbedPass } from "../embed-pass-e64AwDCa.mjs";
|
|
61
|
+
import { i as totalUsageTokens, r as parseSessionUsage } from "../session-usage-CPvXvSkw.mjs";
|
|
62
|
+
import { Bt as findLatestNote, C as migrateSummaryCooldowns, Dt as nextOccurrence, Et as describeQuiet, Ht as readBodyFile, It as readContextHandoverCache, Mt as LAUNCHD_LABEL, Ot as readQuiet, Pt as resolveDaemonPid, Rt as appendCheckpointToNote, St as loadSessionKeepaliveState, Ut as restartRouter, Vt as findNotesDir$1, bt as reapJob, ht as obsidianEnabled, i as reexecBackground, jt as writeQuiet, mt as OBSIDIAN_DISABLED_MESSAGE, o as backfillKgFromNotes, s as migrateKgBackfillState, v as migrateWorkQueue, vt as migrateIdentityFile, wt as sessionKeepaliveLedgerSummary, yt as jobPaths, zt as applyContinue } from "../indexer-backend-BdjeL4P8.mjs";
|
|
63
|
+
import { n as queriesDirPath, t as migrateQueriesDir } from "../query-feedback-DN52N9C5.mjs";
|
|
64
64
|
import { appendFileSync, chmodSync, closeSync, copyFileSync, cpSync, createReadStream, createWriteStream, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
65
|
-
import { createHash,
|
|
66
|
-
import { basename, dirname,
|
|
65
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
66
|
+
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
67
67
|
import chalk from "chalk";
|
|
68
|
-
import { cpus, homedir,
|
|
68
|
+
import { cpus, homedir, platform, userInfo } from "node:os";
|
|
69
69
|
import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
|
|
70
70
|
import { fileURLToPath } from "node:url";
|
|
71
71
|
import http from "node:http";
|
|
@@ -590,77 +590,6 @@ function startStallMonitor(o) {
|
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
//#endregion
|
|
594
|
-
//#region src/router/cockpit-auth.ts
|
|
595
|
-
/** The /v1 remote rule: loopback (any 127/8, ::1, v4-mapped) or the tailnet. */
|
|
596
|
-
function defaultV1Guard(remoteAddress) {
|
|
597
|
-
return isLoopbackAddress(remoteAddress) || inTailscaleRange(remoteAddress);
|
|
598
|
-
}
|
|
599
|
-
/** Strip the ::ffff: IPv4-mapped prefix (Node reports v4 peers this way on v6 sockets). */
|
|
600
|
-
function normalizeIp(ip) {
|
|
601
|
-
const a = (ip ?? "").trim().toLowerCase();
|
|
602
|
-
return a.startsWith("::ffff:") ? a.slice(7) : a;
|
|
603
|
-
}
|
|
604
|
-
function isLoopbackAddress(ip) {
|
|
605
|
-
const a = normalizeIp(ip);
|
|
606
|
-
return a === "::1" || a.startsWith("127.");
|
|
607
|
-
}
|
|
608
|
-
function ipv4ToInt(ip) {
|
|
609
|
-
const parts = ip.split(".");
|
|
610
|
-
if (parts.length !== 4) return null;
|
|
611
|
-
let out = 0;
|
|
612
|
-
for (const p of parts) {
|
|
613
|
-
if (!/^\d{1,3}$/.test(p)) return null;
|
|
614
|
-
const n = Number(p);
|
|
615
|
-
if (n > 255) return null;
|
|
616
|
-
out = out * 256 + n;
|
|
617
|
-
}
|
|
618
|
-
return out;
|
|
619
|
-
}
|
|
620
|
-
function inTailscaleRange(ip) {
|
|
621
|
-
const n = ipv4ToInt(normalizeIp(ip));
|
|
622
|
-
if (n === null) return false;
|
|
623
|
-
return (n & 4290772992) === 1681915904;
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* router.bind → a concrete address. "loopback" (also empty/unset) is
|
|
627
|
-
* 127.0.0.1; "tailscale" resolves the utun/tailscale interface's IPv4 inside
|
|
628
|
-
* 100.64.0.0/10 (null when Tailscale is down); anything else must be a dotted
|
|
629
|
-
* quad — 0.0.0.0 and every non-IPv4 value are refused (null).
|
|
630
|
-
*/
|
|
631
|
-
function resolveBindAddress(bind, interfaces = networkInterfaces) {
|
|
632
|
-
const v = (bind ?? "").trim().toLowerCase();
|
|
633
|
-
if (!v || v === "loopback") return LOOPBACK_HOST;
|
|
634
|
-
if (v === "tailscale") {
|
|
635
|
-
let fallback;
|
|
636
|
-
for (const [name, addrs] of Object.entries(interfaces() ?? {})) for (const a of addrs ?? []) {
|
|
637
|
-
if (a.family !== "IPv4" && a.family !== 4) continue;
|
|
638
|
-
if (!inTailscaleRange(a.address)) continue;
|
|
639
|
-
if (/^(utun|tailscale)/i.test(name)) return a.address;
|
|
640
|
-
fallback ??= a.address;
|
|
641
|
-
}
|
|
642
|
-
return fallback ?? null;
|
|
643
|
-
}
|
|
644
|
-
if (v === "0.0.0.0" || v === "::" || v === "*") return null;
|
|
645
|
-
return ipv4ToInt(v) !== null ? v : null;
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
* The address to show a human for a bind address: the tailnet hostname
|
|
649
|
-
* (MagicDNS name, from `tailscale status --json`) when the address is the
|
|
650
|
-
* machine's own Tailscale IP, else the address itself.
|
|
651
|
-
*/
|
|
652
|
-
async function displayHost(addr) {
|
|
653
|
-
if (!inTailscaleRange(addr)) return addr;
|
|
654
|
-
try {
|
|
655
|
-
const { execFile } = await import("node:child_process");
|
|
656
|
-
const { promisify } = await import("node:util");
|
|
657
|
-
const { stdout } = await promisify(execFile)("tailscale", ["status", "--json"], { timeout: TAILSCALE_STATUS_TIMEOUT_MS });
|
|
658
|
-
const self = JSON.parse(stdout).Self;
|
|
659
|
-
if (self?.DNSName && self.TailscaleIPs?.includes(addr)) return self.DNSName.replace(/\.$/, "");
|
|
660
|
-
} catch {}
|
|
661
|
-
return addr;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
593
|
//#endregion
|
|
665
594
|
//#region src/router/runtime-samples.ts
|
|
666
595
|
/**
|
|
@@ -901,7 +830,7 @@ function routerSamplerDeps(sched, engineStatusTimeoutMs = () => DEFAULT_RUNTIME_
|
|
|
901
830
|
});
|
|
902
831
|
return {
|
|
903
832
|
inventory: async () => {
|
|
904
|
-
const { currentInventory } = await import("../model-inventory-
|
|
833
|
+
const { currentInventory } = await import("../model-inventory-h6Z9fN_o.mjs");
|
|
905
834
|
return currentInventory();
|
|
906
835
|
},
|
|
907
836
|
sched,
|
|
@@ -916,7 +845,7 @@ function routerSamplerDeps(sched, engineStatusTimeoutMs = () => DEFAULT_RUNTIME_
|
|
|
916
845
|
}
|
|
917
846
|
},
|
|
918
847
|
async rssMb(port) {
|
|
919
|
-
const { processTreeRssMb } = await import("../model-inventory-
|
|
848
|
+
const { processTreeRssMb } = await import("../model-inventory-h6Z9fN_o.mjs");
|
|
920
849
|
const pid = (await exec("lsof", [
|
|
921
850
|
"-ti",
|
|
922
851
|
`tcp:${port}`,
|
|
@@ -1231,6 +1160,12 @@ const runCommand = {
|
|
|
1231
1160
|
const addr = resolveBindAddress(bindName);
|
|
1232
1161
|
if (!addr) throw new CliError(`cannot resolve router.bind "${bindName}" — use "loopback", "tailscale", or an IPv4 (never 0.0.0.0)`, "pai daemon status");
|
|
1233
1162
|
const remote = addr !== LOOPBACK_HOST;
|
|
1163
|
+
const extraHosts = (loadConfig().router.allowedHosts ?? []).filter((h) => h.trim());
|
|
1164
|
+
const hosts = remote ? {
|
|
1165
|
+
bind: addr,
|
|
1166
|
+
extraHosts
|
|
1167
|
+
} : void 0;
|
|
1168
|
+
if (remote && !extraHosts.some((h) => hostAllowed(`${h}:${port}`, addr, extraHosts))) process.stderr.write(`pai: router: router.allowedHosts has no entry matching the bind ${addr} — cockpit requests by hostname will be refused (403)\n`);
|
|
1234
1169
|
const rows = cachedRows(usageFile);
|
|
1235
1170
|
let schedCache;
|
|
1236
1171
|
setSchedConfigSource(() => {
|
|
@@ -1279,7 +1214,7 @@ const runCommand = {
|
|
|
1279
1214
|
sampler.start();
|
|
1280
1215
|
setRuntimeSampler(sampler);
|
|
1281
1216
|
setActionHooks({ runLocalJob: async (kind, tier) => {
|
|
1282
|
-
const { startTier, stopAll } = await import("../worker-config-
|
|
1217
|
+
const { startTier, stopAll } = await import("../worker-config-CO5FXLAT.mjs");
|
|
1283
1218
|
const { readLocalConfig } = await import("../local-tiers-DNMI5W86.mjs");
|
|
1284
1219
|
const { workersYamlPath } = await import("../workers-config-f8KrkY4L.mjs");
|
|
1285
1220
|
const cfg = readLocalConfig(workersYamlPath());
|
|
@@ -1295,7 +1230,10 @@ const runCommand = {
|
|
|
1295
1230
|
setEndpointHealth(endpointHealth);
|
|
1296
1231
|
const serve = (req, res) => handleCockpit(req, res, limits, rows, sessionMap, system, workerWindows);
|
|
1297
1232
|
const inner = routerHandler(void 0, void 0, void 0, usageFile ? () => void 0 : (row) => appendUsage(row), serve, {
|
|
1298
|
-
...remote ? {
|
|
1233
|
+
...remote ? {
|
|
1234
|
+
remoteAllowed: defaultV1Guard,
|
|
1235
|
+
hosts
|
|
1236
|
+
} : {},
|
|
1299
1237
|
isUp: limits.isUp,
|
|
1300
1238
|
health: endpointHealth
|
|
1301
1239
|
});
|
|
@@ -1657,7 +1595,7 @@ const modelsCommand = {
|
|
|
1657
1595
|
if (words[0] === "add") {
|
|
1658
1596
|
const source = words[1];
|
|
1659
1597
|
if (!source) throw new Error("usage: pai models add <hf-id|path> [--name n] [--download] [--try]");
|
|
1660
|
-
const { addModel } = await import("../models-add-
|
|
1598
|
+
const { addModel } = await import("../models-add-TVni3A7V.mjs");
|
|
1661
1599
|
const r = await addModel({
|
|
1662
1600
|
source,
|
|
1663
1601
|
name: typeof ctx.opts.name === "string" ? ctx.opts.name : void 0,
|
|
@@ -1672,7 +1610,7 @@ const modelsCommand = {
|
|
|
1672
1610
|
if (op) {
|
|
1673
1611
|
const runtime = words[1];
|
|
1674
1612
|
if (!runtime) throw new Error(`usage: pai models ${op} <runtime> (configured: ${Object.keys(readRuntimeCommands()).join(", ") || "none"})`);
|
|
1675
|
-
const { defaultDeps, runtimeStartStop } = await import("../cockpit-actions-
|
|
1613
|
+
const { defaultDeps, runtimeStartStop } = await import("../cockpit-actions-BfRMr2sm.mjs");
|
|
1676
1614
|
const r = await runtimeStartStop(runtime, op, defaultDeps(), { model: typeof ctx.opts.model === "string" ? ctx.opts.model : void 0 });
|
|
1677
1615
|
process.stdout.write(r.message + "\n");
|
|
1678
1616
|
if (!r.ok) process.exitCode = 1;
|
|
@@ -2987,7 +2925,7 @@ async function cmdPause(opts) {
|
|
|
2987
2925
|
process.exitCode = 1;
|
|
2988
2926
|
return;
|
|
2989
2927
|
}
|
|
2990
|
-
const { getRegistryBackend } = await import("../factory-
|
|
2928
|
+
const { getRegistryBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
2991
2929
|
const registryBackend = await getRegistryBackend();
|
|
2992
2930
|
const cwd = process.cwd();
|
|
2993
2931
|
const project = await resolveProjectByCwd(registryBackend, cwd);
|
|
@@ -3087,7 +3025,7 @@ function touchSentinel(rootPath) {
|
|
|
3087
3025
|
async function cmdAutosave(opts) {
|
|
3088
3026
|
const minGap = parseInt(opts.minGap ?? String(DEFAULT_MIN_GAP), 10);
|
|
3089
3027
|
const cwd = process.cwd();
|
|
3090
|
-
const { getRegistryBackend } = await import("../factory-
|
|
3028
|
+
const { getRegistryBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
3091
3029
|
const registryBackend = await getRegistryBackend();
|
|
3092
3030
|
const project = await resolveProjectByCwd(registryBackend, cwd);
|
|
3093
3031
|
if (!project) return;
|
|
@@ -3313,7 +3251,7 @@ function finalizeNote(notePath) {
|
|
|
3313
3251
|
}
|
|
3314
3252
|
async function cmdEnd(opts) {
|
|
3315
3253
|
await cmdPause(opts);
|
|
3316
|
-
const { getRegistryBackend } = await import("../factory-
|
|
3254
|
+
const { getRegistryBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
3317
3255
|
const registryBackend = await getRegistryBackend();
|
|
3318
3256
|
const cwd = process.cwd();
|
|
3319
3257
|
const project = await registryBackend.findProjectByCwdPrefix(cwd);
|
|
@@ -3494,7 +3432,7 @@ function buildStopBody(project, sessionId) {
|
|
|
3494
3432
|
}
|
|
3495
3433
|
}
|
|
3496
3434
|
async function cmdHandover(projectSlug, numberOrLatest, sessionId) {
|
|
3497
|
-
const { getRegistryBackend } = await import("../factory-
|
|
3435
|
+
const { getRegistryBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
3498
3436
|
const registryBackend = await getRegistryBackend();
|
|
3499
3437
|
let project;
|
|
3500
3438
|
if (projectSlug) {
|
|
@@ -4441,7 +4379,7 @@ async function countVectorDbPaths(oldPaths) {
|
|
|
4441
4379
|
if (oldPaths.length === 0) return 0;
|
|
4442
4380
|
try {
|
|
4443
4381
|
const { loadConfig } = await import("../config-DtENJ6cL.mjs");
|
|
4444
|
-
const { createStorageBackend } = await import("../factory-
|
|
4382
|
+
const { createStorageBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
4445
4383
|
const config = loadConfig();
|
|
4446
4384
|
if (config.storageBackend !== "postgres") return 0;
|
|
4447
4385
|
const backend = await createStorageBackend(config);
|
|
@@ -4459,7 +4397,7 @@ async function updateVectorDbPaths(moves) {
|
|
|
4459
4397
|
if (moves.length === 0) return 0;
|
|
4460
4398
|
try {
|
|
4461
4399
|
const { loadConfig } = await import("../config-DtENJ6cL.mjs");
|
|
4462
|
-
const { createStorageBackend } = await import("../factory-
|
|
4400
|
+
const { createStorageBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
4463
4401
|
const config = loadConfig();
|
|
4464
4402
|
if (config.storageBackend !== "postgres") return 0;
|
|
4465
4403
|
const backend = await createStorageBackend(config);
|
|
@@ -4546,7 +4484,7 @@ async function displayDryRun(plans) {
|
|
|
4546
4484
|
console.log();
|
|
4547
4485
|
}
|
|
4548
4486
|
async function executeCleanup(plans, skipReindex) {
|
|
4549
|
-
const { getRegistryBackend } = await import("../factory-
|
|
4487
|
+
const { getRegistryBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
4550
4488
|
const registryBackend = await getRegistryBackend();
|
|
4551
4489
|
let deleted = 0;
|
|
4552
4490
|
let renamed = 0;
|
|
@@ -4746,7 +4684,7 @@ async function executeCleanup(plans, skipReindex) {
|
|
|
4746
4684
|
* them into YYYY/MM/ folders and renumber. Dry run unless `execute` is set.
|
|
4747
4685
|
*/
|
|
4748
4686
|
async function runCleanup(projectSlug, opts) {
|
|
4749
|
-
const { getRegistryBackend } = await import("../factory-
|
|
4687
|
+
const { getRegistryBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
4750
4688
|
const registryBackend = await getRegistryBackend();
|
|
4751
4689
|
const dryRun = !opts.execute;
|
|
4752
4690
|
const skipReindex = opts.reindex === false;
|
|
@@ -9029,7 +8967,7 @@ function cmdLogs(opts) {
|
|
|
9029
8967
|
return 0;
|
|
9030
8968
|
}
|
|
9031
8969
|
async function daemonServeCmd() {
|
|
9032
|
-
const { serve } = await import("../daemon-
|
|
8970
|
+
const { serve } = await import("../daemon-DeYImF1F.mjs");
|
|
9033
8971
|
const { loadConfig: lc, ensureConfigDir } = await import("../config-DtENJ6cL.mjs");
|
|
9034
8972
|
ensureConfigDir();
|
|
9035
8973
|
await serve(lc());
|
|
@@ -11201,54 +11139,6 @@ async function watchTicket(dir, id, deps = {}, intervalMs = 1e3, simctl, reap) {
|
|
|
11201
11139
|
}
|
|
11202
11140
|
}
|
|
11203
11141
|
|
|
11204
|
-
//#endregion
|
|
11205
|
-
//#region src/hooks/ts/lib/build-gate.ts
|
|
11206
|
-
/** Tiny reader for the two keys of builds.yaml: flow `[a, b]` or block `- a` lists. */
|
|
11207
|
-
function parseBuildsYaml(text) {
|
|
11208
|
-
const res = {
|
|
11209
|
-
doors: [],
|
|
11210
|
-
patterns: []
|
|
11211
|
-
};
|
|
11212
|
-
let key = null;
|
|
11213
|
-
const unq = (s) => s.trim().replace(/^(['"])(.*)\1$/, "$2");
|
|
11214
|
-
for (const raw of text.split("\n")) {
|
|
11215
|
-
const line = raw.replace(/(^|\s)#.*$/, "");
|
|
11216
|
-
if (!line.trim()) continue;
|
|
11217
|
-
const m = /^(doors|patterns)\s*:\s*(.*)$/.exec(line);
|
|
11218
|
-
if (m) {
|
|
11219
|
-
key = m[1];
|
|
11220
|
-
const rest = m[2].trim();
|
|
11221
|
-
if (rest.startsWith("[")) {
|
|
11222
|
-
res[key].push(...rest.replace(/^\[|\]$/g, "").split(",").map(unq).filter(Boolean));
|
|
11223
|
-
key = null;
|
|
11224
|
-
}
|
|
11225
|
-
continue;
|
|
11226
|
-
}
|
|
11227
|
-
const li = /^\s*-\s+(.*)$/.exec(line);
|
|
11228
|
-
if (li && key) res[key].push(unq(li[1]));
|
|
11229
|
-
else if (!/^\s/.test(line)) key = null;
|
|
11230
|
-
}
|
|
11231
|
-
return res;
|
|
11232
|
-
}
|
|
11233
|
-
/** The nearest `.pai/builds.yaml` at or above `cwd`. */
|
|
11234
|
-
function loadBuildsConfig(cwd) {
|
|
11235
|
-
let dir = resolve(cwd);
|
|
11236
|
-
for (;;) {
|
|
11237
|
-
const f = join(dir, ".pai", "builds.yaml");
|
|
11238
|
-
if (existsSync(f)) try {
|
|
11239
|
-
return {
|
|
11240
|
-
root: dir,
|
|
11241
|
-
...parseBuildsYaml(readFileSync(f, "utf8"))
|
|
11242
|
-
};
|
|
11243
|
-
} catch {
|
|
11244
|
-
return null;
|
|
11245
|
-
}
|
|
11246
|
-
const up = dirname(dir);
|
|
11247
|
-
if (up === dir) return null;
|
|
11248
|
-
dir = up;
|
|
11249
|
-
}
|
|
11250
|
-
}
|
|
11251
|
-
|
|
11252
11142
|
//#endregion
|
|
11253
11143
|
//#region src/builds/doctor.ts
|
|
11254
11144
|
/**
|
|
@@ -15034,7 +14924,7 @@ async function migrateToPostgres(opts = {}) {
|
|
|
15034
14924
|
const dump = pgDump(container, pgConfig, dumpPath);
|
|
15035
14925
|
if (!dump.ok) return refused(dump.reason, dryRun);
|
|
15036
14926
|
}
|
|
15037
|
-
const { PostgresBackend } = await import("../postgres-
|
|
14927
|
+
const { PostgresBackend } = await import("../postgres-BK4FP9Zg.mjs");
|
|
15038
14928
|
await PostgresBackend.ensureDatabase(pgConfig);
|
|
15039
14929
|
const sqlite = new BetterSqlite3(sqliteFederationPath, { readonly: true });
|
|
15040
14930
|
const registrySqlite = sqliteRegistryPath === sqliteFederationPath ? sqlite : new BetterSqlite3(sqliteRegistryPath, { readonly: true });
|
|
@@ -16421,7 +16311,7 @@ const out = (s) => process.stdout.write(s + "\n");
|
|
|
16421
16311
|
async function repoOf(project) {
|
|
16422
16312
|
if (typeof project === "string" && project) {
|
|
16423
16313
|
if (existsSync(project)) return resolve(project);
|
|
16424
|
-
const { getProject } = await import("../helpers-
|
|
16314
|
+
const { getProject } = await import("../helpers-Dz7mjTSw.mjs");
|
|
16425
16315
|
const row = await getProject(project);
|
|
16426
16316
|
if (!row) throw new CliError(`no project ${project}`, "pai projects list");
|
|
16427
16317
|
return row.root_path;
|
|
@@ -17244,7 +17134,7 @@ async function cmdPromote(opts) {
|
|
|
17244
17134
|
console.error(dim$1(` Pick a durable location for the new project.`));
|
|
17245
17135
|
process.exit(1);
|
|
17246
17136
|
}
|
|
17247
|
-
const { getRegistryBackend } = await import("../factory-
|
|
17137
|
+
const { getRegistryBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
17248
17138
|
const registryBackend = await getRegistryBackend();
|
|
17249
17139
|
const encodedDir = encodeDir(targetPath);
|
|
17250
17140
|
if (await registryBackend.getProjectBySlug(slug) ?? await registryBackend.getProjectByRootPath(targetPath) ?? await registryBackend.getProjectByEncodedDir(encodedDir)) {
|
|
@@ -18488,7 +18378,7 @@ async function cmdUnregister(slug, opts = {}) {
|
|
|
18488
18378
|
* deprecated alias that forwards here with a stderr notice.
|
|
18489
18379
|
*/
|
|
18490
18380
|
async function projectListCmd(opts) {
|
|
18491
|
-
const { cmdMain } = await import("../main-resolver-
|
|
18381
|
+
const { cmdMain } = await import("../main-resolver-yp_puSSb.mjs");
|
|
18492
18382
|
await cmdMain(void 0, void 0, opts);
|
|
18493
18383
|
return 0;
|
|
18494
18384
|
}
|
|
@@ -22163,9 +22053,9 @@ async function memorySearchCmd(query, opts) {
|
|
|
22163
22053
|
//#region src/cli/commands/memory/sources-cmd.ts
|
|
22164
22054
|
/** `pai memory sources` — what the indexer has taken in. */
|
|
22165
22055
|
async function memorySourcesCmd(opts) {
|
|
22166
|
-
const { createStorageBackend } = await import("../factory-
|
|
22056
|
+
const { createStorageBackend } = await import("../factory-Bs9imVMq.mjs");
|
|
22167
22057
|
const { loadConfig } = await import("../config-DtENJ6cL.mjs");
|
|
22168
|
-
const { cmdMemorySources } = await import("../sources-
|
|
22058
|
+
const { cmdMemorySources } = await import("../sources-CiE3rZek.mjs");
|
|
22169
22059
|
let backend;
|
|
22170
22060
|
try {
|
|
22171
22061
|
backend = await createStorageBackend(loadConfig());
|
|
@@ -22924,7 +22814,7 @@ async function zettelExploreCmd(note, opts) {
|
|
|
22924
22814
|
const depth = opts.depth ?? 3;
|
|
22925
22815
|
const direction = opts.direction ?? "both";
|
|
22926
22816
|
const mode = opts.mode ?? "all";
|
|
22927
|
-
const { zettelExplore } = await import("../zettelkasten-
|
|
22817
|
+
const { zettelExplore } = await import("../zettelkasten-tpCRBYvH.mjs");
|
|
22928
22818
|
const result = await zettelExplore(await getFedBackend(), {
|
|
22929
22819
|
startNote: note,
|
|
22930
22820
|
depth,
|
|
@@ -22980,7 +22870,7 @@ async function zettelHealthCmd(opts) {
|
|
|
22980
22870
|
const projectPath = opts.project;
|
|
22981
22871
|
const recentDays = opts.days ?? 30;
|
|
22982
22872
|
const includeTypes = opts.include ? opts.include.split(",").map((s) => s.trim()) : void 0;
|
|
22983
|
-
const { zettelHealth } = await import("../zettelkasten-
|
|
22873
|
+
const { zettelHealth } = await import("../zettelkasten-tpCRBYvH.mjs");
|
|
22984
22874
|
const result = await zettelHealth(await getFedBackend(), {
|
|
22985
22875
|
scope,
|
|
22986
22876
|
projectPath,
|
|
@@ -23038,7 +22928,7 @@ async function zettelSurpriseCmd(note, opts) {
|
|
|
23038
22928
|
const limit = opts.limit ?? 10;
|
|
23039
22929
|
const minSimilarity = opts.minSimilarity ?? .3;
|
|
23040
22930
|
const minGraphDistance = opts.minDistance ?? 3;
|
|
23041
|
-
const { zettelSurprise } = await import("../zettelkasten-
|
|
22931
|
+
const { zettelSurprise } = await import("../zettelkasten-tpCRBYvH.mjs");
|
|
23042
22932
|
const backend = await getFedBackend();
|
|
23043
22933
|
console.log();
|
|
23044
22934
|
console.log(header(" PAI Zettel Surprise"));
|
|
@@ -23080,7 +22970,7 @@ async function zettelConverseCmd(question, opts) {
|
|
|
23080
22970
|
const vaultProjectId = Number(opts.vaultProjectId);
|
|
23081
22971
|
const depth = opts.depth ?? 2;
|
|
23082
22972
|
const limit = opts.limit ?? 15;
|
|
23083
|
-
const { zettelConverse } = await import("../zettelkasten-
|
|
22973
|
+
const { zettelConverse } = await import("../zettelkasten-tpCRBYvH.mjs");
|
|
23084
22974
|
const backend = await getFedBackend();
|
|
23085
22975
|
console.log();
|
|
23086
22976
|
console.log(header(" PAI Zettel Converse"));
|
|
@@ -23130,7 +23020,7 @@ async function zettelThemesCmd(opts) {
|
|
|
23130
23020
|
const minClusterSize = opts.minSize ?? 3;
|
|
23131
23021
|
const maxThemes = opts.maxThemes ?? 10;
|
|
23132
23022
|
const similarityThreshold = opts.threshold ?? .65;
|
|
23133
|
-
const { zettelThemes } = await import("../zettelkasten-
|
|
23023
|
+
const { zettelThemes } = await import("../zettelkasten-tpCRBYvH.mjs");
|
|
23134
23024
|
const backend = await getFedBackend();
|
|
23135
23025
|
console.log();
|
|
23136
23026
|
console.log(header(" PAI Zettel Themes"));
|
|
@@ -23178,7 +23068,7 @@ async function zettelSuggestCmd(note, opts) {
|
|
|
23178
23068
|
const vaultProjectId = Number(opts.vaultProjectId);
|
|
23179
23069
|
const limit = opts.limit ?? 5;
|
|
23180
23070
|
const excludeLinked = opts.excludeLinked !== true;
|
|
23181
|
-
const { zettelSuggest } = await import("../zettelkasten-
|
|
23071
|
+
const { zettelSuggest } = await import("../zettelkasten-tpCRBYvH.mjs");
|
|
23182
23072
|
const backend = await getFedBackend();
|
|
23183
23073
|
console.log();
|
|
23184
23074
|
console.log(header(" PAI Zettel Suggest"));
|
|
@@ -3,7 +3,7 @@ import "./config-Bu1_vbY8.mjs";
|
|
|
3
3
|
import "./paths-CHifubDh.mjs";
|
|
4
4
|
import "./status-ggJ7lgVg.mjs";
|
|
5
5
|
import "./scope-D-h6F6DN.mjs";
|
|
6
|
-
import "./routing-
|
|
6
|
+
import "./routing-DmkheCRH.mjs";
|
|
7
7
|
import "./tool-errors-7E13StWd.mjs";
|
|
8
8
|
import "./wait-ByV0OyMZ.mjs";
|
|
9
9
|
import "./local-tiers-BE4jGaMa.mjs";
|
|
@@ -11,10 +11,10 @@ import "./caller-identity-yLFb7CKq.mjs";
|
|
|
11
11
|
import "./capacity-DEveQdFV.mjs";
|
|
12
12
|
import "./local-instances-DOxSgT_L.mjs";
|
|
13
13
|
import "./local-candidate-DLdwQt0s.mjs";
|
|
14
|
-
import "./providers-
|
|
15
|
-
import "./main-config-ops-
|
|
16
|
-
import { C as runtimeOpRefusal, D as writeLedgerLine, E as tierNames, S as runtimeJobProgress, T as spawnMemoryRun, _ as resolveTierName, a as classesOnProvider, b as runningRuntimeJob, c as defaultDeps, d as labelPath, f as logTailSince, g as readLabels, h as readCockpitJob, i as WORKER_ROLE_CLASSES, l as engineInflight, m as orchestratorProvider, n as RUNTIME_START_EVENT, o as cockpitActionLedger, p as memoryRunRefusal, r as RUNTIME_STOP_EVENT, s as cockpitJobFile, t as COCKPIT_ACTION_EVENT, u as labelFor, v as runCockpitAction, w as runtimeStartStop, x as runningRuntimeJobs, y as runningLocalModel } from "./cockpit-actions-
|
|
17
|
-
import "./ipc-client-
|
|
18
|
-
import "./embed-pass-
|
|
14
|
+
import "./providers-C9QC0TtO.mjs";
|
|
15
|
+
import "./main-config-ops-kTXR8Pyv.mjs";
|
|
16
|
+
import { C as runtimeOpRefusal, D as writeLedgerLine, E as tierNames, S as runtimeJobProgress, T as spawnMemoryRun, _ as resolveTierName, a as classesOnProvider, b as runningRuntimeJob, c as defaultDeps, d as labelPath, f as logTailSince, g as readLabels, h as readCockpitJob, i as WORKER_ROLE_CLASSES, l as engineInflight, m as orchestratorProvider, n as RUNTIME_START_EVENT, o as cockpitActionLedger, p as memoryRunRefusal, r as RUNTIME_STOP_EVENT, s as cockpitJobFile, t as COCKPIT_ACTION_EVENT, u as labelFor, v as runCockpitAction, w as runtimeStartStop, x as runningRuntimeJobs, y as runningLocalModel } from "./cockpit-actions-OodH_vx_.mjs";
|
|
17
|
+
import "./ipc-client-CnYEF31R.mjs";
|
|
18
|
+
import "./embed-pass-e64AwDCa.mjs";
|
|
19
19
|
|
|
20
20
|
export { COCKPIT_ACTION_EVENT, RUNTIME_START_EVENT, RUNTIME_STOP_EVENT, WORKER_ROLE_CLASSES, classesOnProvider, cockpitActionLedger, cockpitJobFile, defaultDeps, engineInflight, labelFor, labelPath, logTailSince, memoryRunRefusal, orchestratorProvider, readCockpitJob, readLabels, resolveTierName, runCockpitAction, runningLocalModel, runningRuntimeJob, runningRuntimeJobs, runtimeJobProgress, runtimeOpRefusal, runtimeStartStop, spawnMemoryRun, tierNames, writeLedgerLine };
|