@tekmidian/pai 0.9.7 → 0.9.8
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/FEATURE.md +8 -1
- package/README.md +232 -10
- package/dist/cli/index.mjs +4 -4
- package/dist/cli/index.mjs.map +1 -1
- package/dist/daemon/index.mjs +4 -4
- package/dist/{daemon-kp49BE7u.mjs → daemon-WQY1kwOF.mjs} +10 -10
- package/dist/{daemon-kp49BE7u.mjs.map → daemon-WQY1kwOF.mjs.map} +1 -1
- package/dist/daemon-mcp/index.mjs +6 -2
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/{helpers-BEST-4Gx.mjs → helpers-OCVFgprQ.mjs} +9 -1
- package/dist/helpers-OCVFgprQ.mjs.map +1 -0
- package/dist/index.d.mts +0 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{indexer-backend-CIIlrYh6.mjs → indexer-backend-DXkDh-kc.mjs} +2 -2
- package/dist/{indexer-backend-CIIlrYh6.mjs.map → indexer-backend-DXkDh-kc.mjs.map} +1 -1
- package/dist/{sync-BOsnEj2-.mjs → sync-CdHSL9Kc.mjs} +2 -2
- package/dist/{sync-BOsnEj2-.mjs.map → sync-CdHSL9Kc.mjs.map} +1 -1
- package/dist/{tools-8t7BQrm9.mjs → tools-gMHdjmHC.mjs} +6 -3
- package/dist/tools-gMHdjmHC.mjs.map +1 -0
- package/dist/{vault-indexer-TTCl1QOL.mjs → vault-indexer-iHRjcy6e.mjs} +2 -2
- package/dist/{vault-indexer-TTCl1QOL.mjs.map → vault-indexer-iHRjcy6e.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/helpers-BEST-4Gx.mjs.map +0 -1
- package/dist/tools-8t7BQrm9.mjs.map +0 -1
package/dist/daemon/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "../db-BtuN768f.mjs";
|
|
3
|
-
import "../helpers-
|
|
4
|
-
import "../sync-
|
|
3
|
+
import "../helpers-OCVFgprQ.mjs";
|
|
4
|
+
import "../sync-CdHSL9Kc.mjs";
|
|
5
5
|
import "../embeddings-DGRAPAYb.mjs";
|
|
6
6
|
import "../search-DC1qhkKn.mjs";
|
|
7
7
|
import "../kg-extraction-BlGM40q7.mjs";
|
|
8
8
|
import { t as PaiClient } from "../ipc-client-CoyUHPod.mjs";
|
|
9
9
|
import { i as ensureConfigDir, o as loadConfig } from "../config-BuhHWyOK.mjs";
|
|
10
10
|
import "../factory-DKDPRhAN.mjs";
|
|
11
|
-
import { n as serve } from "../daemon-
|
|
11
|
+
import { n as serve } from "../daemon-WQY1kwOF.mjs";
|
|
12
12
|
import "../state-BIlxNRUn.mjs";
|
|
13
|
-
import "../tools-
|
|
13
|
+
import "../tools-gMHdjmHC.mjs";
|
|
14
14
|
import "../detector-CNU3zCwP.mjs";
|
|
15
15
|
import { Command } from "commander";
|
|
16
16
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-95iHPtFO.mjs";
|
|
2
2
|
import { n as openRegistry } from "./db-BtuN768f.mjs";
|
|
3
|
-
import { d as sha256 } from "./helpers-
|
|
4
|
-
import { n as indexAll } from "./sync-
|
|
3
|
+
import { d as sha256 } from "./helpers-OCVFgprQ.mjs";
|
|
4
|
+
import { n as indexAll } from "./sync-CdHSL9Kc.mjs";
|
|
5
5
|
import { t as configureEmbeddingModel } from "./embeddings-DGRAPAYb.mjs";
|
|
6
6
|
import { t as extractAndStoreTriples$1 } from "./kg-extraction-BlGM40q7.mjs";
|
|
7
7
|
import { n as CONFIG_FILE, s as DEFAULT_NOTIFICATION_CONFIG, t as CONFIG_DIR } from "./config-BuhHWyOK.mjs";
|
|
8
8
|
import { t as createStorageBackend } from "./factory-DKDPRhAN.mjs";
|
|
9
9
|
import { C as setStorageBackend, E as startTime, O as storageBackend, S as setStartTime, T as shutdownRequested, _ as setLastIndexTime, a as indexSchedulerTimer, b as setRegistryDb, c as lastVaultIndexTime, d as setDaemonConfig, f as setEmbedInProgress, g as setLastEmbedTime, h as setIndexSchedulerTimer, i as indexInProgress, k as vaultIndexInProgress, l as notificationConfig, m as setIndexInProgress, n as embedInProgress, o as lastEmbedTime, p as setEmbedSchedulerTimer, r as embedSchedulerTimer, s as lastIndexTime, t as daemonConfig, u as registryDb, v as setLastVaultIndexTime, w as setVaultIndexInProgress, x as setShutdownRequested, y as setNotificationConfig } from "./state-BIlxNRUn.mjs";
|
|
10
|
-
import { a as toolSessionList, c as toolProjectHealth, d as toolProjectTodo, f as toolMemoryGet, i as toolRegistrySearch, l as toolProjectInfo, n as toolMemoryTaxonomy, o as toolSessionRoute, p as toolMemorySearch, r as toolMemoryWakeup, s as toolProjectDetect, u as toolProjectList } from "./tools-
|
|
10
|
+
import { a as toolSessionList, c as toolProjectHealth, d as toolProjectTodo, f as toolMemoryGet, i as toolRegistrySearch, l as toolProjectInfo, n as toolMemoryTaxonomy, o as toolSessionRoute, p as toolMemorySearch, r as toolMemoryWakeup, s as toolProjectDetect, u as toolProjectList } from "./tools-gMHdjmHC.mjs";
|
|
11
11
|
import { t as detectTopicShift } from "./detector-CNU3zCwP.mjs";
|
|
12
12
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { homedir, setPriority } from "node:os";
|
|
@@ -123,7 +123,7 @@ async function runIndex() {
|
|
|
123
123
|
process.stderr.write(`[pai-daemon] Index complete: ${projects} projects, ${result.filesProcessed} files, ${result.chunksCreated} chunks (${elapsed}ms)\n`);
|
|
124
124
|
}
|
|
125
125
|
} else {
|
|
126
|
-
const { indexAllWithBackend } = await import("./indexer-backend-
|
|
126
|
+
const { indexAllWithBackend } = await import("./indexer-backend-DXkDh-kc.mjs");
|
|
127
127
|
const { projects, result } = await indexAllWithBackend(storageBackend, registryDb);
|
|
128
128
|
const elapsed = Date.now() - t0;
|
|
129
129
|
setLastIndexTime(Date.now());
|
|
@@ -162,7 +162,7 @@ async function runVaultIndex() {
|
|
|
162
162
|
const t0 = Date.now();
|
|
163
163
|
process.stderr.write("[pai-daemon] Starting vault index run...\n");
|
|
164
164
|
try {
|
|
165
|
-
const { indexVault } = await import("./vault-indexer-
|
|
165
|
+
const { indexVault } = await import("./vault-indexer-iHRjcy6e.mjs");
|
|
166
166
|
const r = await indexVault(storageBackend, vaultProjectId, daemonConfig.vaultPath);
|
|
167
167
|
const elapsed = Date.now() - t0;
|
|
168
168
|
setLastVaultIndexTime(Date.now());
|
|
@@ -215,7 +215,7 @@ async function runEmbed() {
|
|
|
215
215
|
const rows = registryDb.prepare("SELECT id, slug FROM projects WHERE status = 'active'").all();
|
|
216
216
|
for (const r of rows) projectNames.set(r.id, r.slug);
|
|
217
217
|
} catch {}
|
|
218
|
-
const { embedChunksWithBackend } = await import("./indexer-backend-
|
|
218
|
+
const { embedChunksWithBackend } = await import("./indexer-backend-DXkDh-kc.mjs");
|
|
219
219
|
const count = await embedChunksWithBackend(storageBackend, () => shutdownRequested, projectNames);
|
|
220
220
|
let vaultEmbedCount = 0;
|
|
221
221
|
if (daemonConfig.vaultPath) try {
|
|
@@ -703,7 +703,7 @@ async function dispatchTool(method, params) {
|
|
|
703
703
|
case "zettel_themes":
|
|
704
704
|
case "zettel_god_notes":
|
|
705
705
|
case "zettel_communities": {
|
|
706
|
-
const { toolZettelExplore, toolZettelHealth, toolZettelSurprise, toolZettelSuggest, toolZettelConverse, toolZettelThemes, toolZettelGodNotes, toolZettelCommunities } = await import("./tools-
|
|
706
|
+
const { toolZettelExplore, toolZettelHealth, toolZettelSurprise, toolZettelSuggest, toolZettelConverse, toolZettelThemes, toolZettelGodNotes, toolZettelCommunities } = await import("./tools-gMHdjmHC.mjs").then((n) => n.t);
|
|
707
707
|
switch (method) {
|
|
708
708
|
case "zettel_explore": return toolZettelExplore(storageBackend, p);
|
|
709
709
|
case "zettel_health": return toolZettelHealth(storageBackend, p);
|
|
@@ -745,7 +745,7 @@ async function dispatchTool(method, params) {
|
|
|
745
745
|
case "kg_query":
|
|
746
746
|
case "kg_invalidate":
|
|
747
747
|
case "kg_contradictions": {
|
|
748
|
-
const { toolKgAdd, toolKgQuery, toolKgInvalidate, toolKgContradictions } = await import("./tools-
|
|
748
|
+
const { toolKgAdd, toolKgQuery, toolKgInvalidate, toolKgContradictions } = await import("./tools-gMHdjmHC.mjs").then((n) => n.t);
|
|
749
749
|
const pgPool = storageBackend.getPool?.() ?? null;
|
|
750
750
|
if (!pgPool) throw new Error(`${method} requires a Postgres storage backend`);
|
|
751
751
|
switch (method) {
|
|
@@ -757,7 +757,7 @@ async function dispatchTool(method, params) {
|
|
|
757
757
|
break;
|
|
758
758
|
}
|
|
759
759
|
case "memory_tunnels": {
|
|
760
|
-
const { toolMemoryTunnels } = await import("./tools-
|
|
760
|
+
const { toolMemoryTunnels } = await import("./tools-gMHdjmHC.mjs").then((n) => n.t);
|
|
761
761
|
return toolMemoryTunnels(registryDb, storageBackend, p);
|
|
762
762
|
}
|
|
763
763
|
default: throw new Error(`Unknown method: ${method}`);
|
|
@@ -3136,4 +3136,4 @@ var daemon_exports = /* @__PURE__ */ __exportAll({ serve: () => serve });
|
|
|
3136
3136
|
|
|
3137
3137
|
//#endregion
|
|
3138
3138
|
export { serve as n, daemon_exports as t };
|
|
3139
|
-
//# sourceMappingURL=daemon-
|
|
3139
|
+
//# sourceMappingURL=daemon-WQY1kwOF.mjs.map
|