volute 0.39.0 → 0.40.1
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/{accept-AHAOUFBK.js → accept-IVHOHXQS.js} +1 -1
- package/dist/{activity-events-CR4RIHJT.js → activity-events-DS4QRWBY.js} +4 -4
- package/dist/{ai-service-PL7GKFQC.js → ai-service-AUWIPWLP.js} +9 -5
- package/dist/{api-client-LC5YRA32.js → api-client-NFM6GX2N.js} +1 -1
- package/dist/{archive-UEWIFRAR.js → archive-UDHFZN4G.js} +4 -4
- package/dist/{auth-OJ2YW3NR.js → auth-X6ZITZ7D.js} +5 -5
- package/dist/{bridge-F3ZJEKDN.js → bridge-MSZC4HUT.js} +1 -1
- package/dist/{chat-RQ5NV5EA.js → chat-JD3TJINV.js} +9 -9
- package/dist/{chunk-CJ26DXZL.js → chunk-2HZRJ35V.js} +17 -1
- package/dist/{chunk-QDWPM73D.js → chunk-3Y7UDHO7.js} +3 -3
- package/dist/{chunk-6V2U3GFQ.js → chunk-4UMXOMZ6.js} +2 -2
- package/dist/{chunk-7OS7QFDF.js → chunk-5EVW4KOD.js} +3 -3
- package/dist/{chunk-6FSSMAXU.js → chunk-6SYHHEQ7.js} +1 -1
- package/dist/{chunk-OEXOFBW5.js → chunk-AEAZRTEV.js} +1 -1
- package/dist/{chunk-DZ4LYU6J.js → chunk-ANSTTB55.js} +1 -1
- package/dist/{chunk-QDWP435B.js → chunk-B4WPXYPI.js} +1 -1
- package/dist/{chunk-CHCISTH7.js → chunk-BLAXARBZ.js} +511 -335
- package/dist/{chunk-TCNCRDB5.js → chunk-DNU6XLE2.js} +1 -1
- package/dist/{chunk-7W3UWCQD.js → chunk-E25SO3QW.js} +3 -3
- package/dist/{chunk-IA2SZSLB.js → chunk-I57LLNAQ.js} +1 -1
- package/dist/{chunk-WUH54G5S.js → chunk-ITH5ZLZJ.js} +1 -1
- package/dist/{chunk-QJ4GU5XT.js → chunk-JYQQDI3M.js} +2 -2
- package/dist/{chunk-EVKGKQ2P.js → chunk-KMHC36CA.js} +1 -7
- package/dist/chunk-LMMQX4CK.js +49 -0
- package/dist/{chunk-4BO4I7UF.js → chunk-LZ6CQYRO.js} +7 -7
- package/dist/{chunk-RAVQXKAG.js → chunk-MNUXL4XN.js} +67 -3
- package/dist/{chunk-OS5MRIEP.js → chunk-NERYUSER.js} +1 -1
- package/dist/{chunk-XOSAY7PY.js → chunk-PKGA23XM.js} +1 -1
- package/dist/{chunk-IBOU6Q3Y.js → chunk-QV7P3TYO.js} +5 -5
- package/dist/{chunk-7GZB3ZJP.js → chunk-QYI65HCL.js} +2 -2
- package/dist/{chunk-B7MWXFAH.js → chunk-S4SXBQ7F.js} +15 -1
- package/dist/{chunk-X7GM2OPM.js → chunk-SVXOBKQY.js} +2 -2
- package/dist/{chunk-Y5UC6G3O.js → chunk-TOANT6FD.js} +2 -2
- package/dist/{chunk-TT4WT6Y7.js → chunk-YHWGN4FX.js} +1 -1
- package/dist/{chunk-Y4W3OS7Q.js → chunk-YTNBO7S6.js} +8 -8
- package/dist/cli.js +24 -24
- package/dist/{clock-BMLJ2TR6.js → clock-YLDJUKBW.js} +3 -3
- package/dist/{cloud-sync-NQCWJLYI.js → cloud-sync-MAQCJEFJ.js} +17 -17
- package/dist/{config-QB7W3Z7P.js → config-PO4EZLIK.js} +4 -4
- package/dist/connectors/discord-bridge.js +1 -1
- package/dist/connectors/slack-bridge.js +1 -1
- package/dist/connectors/telegram-bridge.js +1 -1
- package/dist/{conversations-EUXHBWJD.js → conversations-AYLXPOGC.js} +5 -5
- package/dist/{create-3QH7DVLC.js → create-T4UJ64WB.js} +4 -4
- package/dist/{create-C3BBFYV7.js → create-ZMTGINV3.js} +1 -1
- package/dist/{daemon-client-2MIPKY3E.js → daemon-client-H6MEKK2W.js} +1 -1
- package/dist/{daemon-restart-UEB3PLKB.js → daemon-restart-LP2DR24J.js} +9 -9
- package/dist/daemon.js +424 -294
- package/dist/{db-IJL6B26S.js → db-FSYOTHSN.js} +1 -1
- package/dist/db-ZEPKEJJD.js +9 -0
- package/dist/{delete-NLXES2C7.js → delete-TXVOH2OC.js} +3 -3
- package/dist/delivery-manager-VNHLQTTO.js +30 -0
- package/dist/{delivery-router-EUW4RIWG.js → delivery-router-T6CYTS3M.js} +4 -4
- package/dist/down-6DYO2QV7.js +17 -0
- package/dist/echo-text-QFCH3H6G.js +31 -0
- package/dist/{env-IQ6Q2333.js → env-77IOWG4U.js} +1 -1
- package/dist/exec-5DGKQ5V3.js +17 -0
- package/dist/{export-JDAK3THX.js → export-TZKOCSCE.js} +6 -6
- package/dist/{extension-LZYHBNLV.js → extension-35NB6GHW.js} +1 -1
- package/dist/{extensions-V7TXKAKM.js → extensions-LQX2N7TI.js} +17 -17
- package/dist/{files-K5XV23H6.js → files-WNNVJWJB.js} +4 -4
- package/dist/{import-GZ5IYVV7.js → import-BNNFCQ7U.js} +11 -11
- package/dist/{isolation-FPF4UTH2.js → isolation-4Q4P7HRV.js} +4 -4
- package/dist/{join-6SZCA5FX.js → join-E2EJEXZO.js} +3 -3
- package/dist/{list-KHJZJPEJ.js → list-BYCEDASJ.js} +1 -1
- package/dist/{login-GYTH67ES.js → login-JNSIYFVH.js} +1 -1
- package/dist/{login-BGF5JY3I.js → login-Y6UAYQVO.js} +3 -3
- package/dist/{logout-YHQLOFLR.js → logout-M6FI62BL.js} +1 -1
- package/dist/{logout-GQHI6KH6.js → logout-VHGWVH63.js} +3 -3
- package/dist/message-delivery-7BCYJLH2.js +40 -0
- package/dist/{mind-QMJIWWWW.js → mind-ELPD6VBP.js} +19 -19
- package/dist/{mind-activity-tracker-Z3KBQTVU.js → mind-activity-tracker-XFRVGXFS.js} +5 -5
- package/dist/{mind-history-WHCNZ6I5.js → mind-history-W4JPTPTV.js} +1 -1
- package/dist/{mind-list-H3HC2ZRG.js → mind-list-QROHCLGT.js} +1 -1
- package/dist/mind-manager-EDCLALBF.js +30 -0
- package/dist/{mind-profile-7VYRJGFZ.js → mind-profile-3LNKXNPA.js} +2 -2
- package/dist/mind-service-WTOFVNLW.js +36 -0
- package/dist/{mind-sleep-ZL5ZXFTM.js → mind-sleep-PVCMLTAH.js} +1 -1
- package/dist/{mind-status-ZWULKOUO.js → mind-status-RAJFLRCN.js} +1 -1
- package/dist/{mind-wake-HK5ORGUK.js → mind-wake-HZUOVE7J.js} +1 -1
- package/dist/{package-IR4ZEQA2.js → package-GO3PHHUF.js} +28 -27
- package/dist/{read-CP7MYMJQ.js → read-OOINVR2H.js} +1 -1
- package/dist/{read-stdin-4B5UYPPM.js → read-stdin-P6HCZUAA.js} +1 -1
- package/dist/{register-XOBFEMI4.js → register-ISOH34RF.js} +1 -1
- package/dist/{registry-LWEOAO53.js → registry-GV35XFT7.js} +3 -3
- package/dist/{reject-43AGXB6B.js → reject-ZBWP62X5.js} +1 -1
- package/dist/{restart-O5QIYQJT.js → restart-QBJV5455.js} +1 -1
- package/dist/{sandbox-KUAVC37A.js → sandbox-5R32QKWQ.js} +5 -5
- package/dist/scheduler-GQBDCGLU.js +30 -0
- package/dist/{schema-K575EBPE.js → schema-LYQUDL7G.js} +4 -2
- package/dist/{seed-GPBERPXJ.js → seed-MO2C7CWC.js} +2 -2
- package/dist/{seed-check-HZPVFJKZ.js → seed-check-3WXXRHTC.js} +2 -2
- package/dist/{seed-cmd-PWF4FYFG.js → seed-cmd-ETIF4WD6.js} +4 -4
- package/dist/{seed-create-NTIICZVB.js → seed-create-BPQC2IOR.js} +6 -6
- package/dist/{seed-sprout-PRPFKGJF.js → seed-sprout-TX72K33T.js} +11 -11
- package/dist/{send-IMHDYJHW.js → send-WO3CVG73.js} +4 -4
- package/dist/{service-DWBRRFXS.js → service-WMV6R6VJ.js} +6 -6
- package/dist/service-install-W3FQXJKB.js +17 -0
- package/dist/{setup-IFYS3TLS.js → setup-OTEC3ZPM.js} +4 -4
- package/dist/{setup-4CWQ53VV.js → setup-ZTW4FVMQ.js} +9 -9
- package/dist/{skill-ICN6Y2ZF.js → skill-QHACP7EU.js} +1 -1
- package/dist/{skills-FJ5W73AV.js → skills-JEWMHIIE.js} +7 -7
- package/dist/sleep-manager-5277OBHI.js +34 -0
- package/dist/{spirit-U6MDQLYT.js → spirit-NVXWSVKM.js} +9 -9
- package/dist/{split-5YBEQTBF.js → split-7AO4IO42.js} +3 -3
- package/dist/{sprout-ABX2G76C.js → sprout-NFJZKYEW.js} +2 -2
- package/dist/{src-OYWRPLC6.js → src-2IMB3V27.js} +1 -1
- package/dist/src-OS75U2O7.js +241910 -0
- package/dist/{src-O4PRLMKM.js → src-XNUXP2FP.js} +1 -1
- package/dist/{start-LMXXRR3X.js → start-2U57BBK7.js} +1 -1
- package/dist/{status-C6BBWNU3.js → status-BRYYYO7C.js} +7 -7
- package/dist/{stop-TWDKVEUX.js → stop-QILBDUAR.js} +1 -1
- package/dist/system-chat-LQSJVY55.js +34 -0
- package/dist/{systems-Y2WZV2K4.js → systems-3XTAHA35.js} +4 -4
- package/dist/{tailscale-2KKXDMNK.js → tailscale-X4HRKRTW.js} +3 -3
- package/dist/{template-hash-SSIBEEYK.js → template-hash-DMHSLRDX.js} +1 -1
- package/dist/up-4H7TL6WB.js +19 -0
- package/dist/{update-V26PT4VN.js → update-OY2JYXYK.js} +61 -14
- package/dist/update-check-IUB7QHAF.js +24 -0
- package/dist/{upgrade-RXFZR5FI.js → upgrade-25J6AE47.js} +3 -3
- package/dist/{variant-HHDTW74J.js → variant-5LQOPCQA.js} +1 -1
- package/dist/{version-notify-ZBMY2TEX.js → version-notify-N37N2C4G.js} +18 -18
- package/dist/{volute-config-TS62GS6A.js → volute-config-7FO6QKWU.js} +1 -1
- package/dist/web-assets/assets/index-DaUp9iE2.js +79 -0
- package/dist/web-assets/assets/index-DqHSW9Fr.css +1 -0
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0009_mind_notices.sql +14 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +27 -26
- package/packages/extensions/notes/dist/ui/assets/index-BbgANhFm.js +67 -0
- package/packages/extensions/notes/dist/ui/index.html +1 -1
- package/packages/extensions/pages/dist/ui/assets/index-Dxk-DYrf.js +2 -0
- package/packages/extensions/pages/dist/ui/index.html +1 -1
- package/packages/extensions/plan/dist/ui/assets/index-Cfzs-0G9.js +67 -0
- package/packages/extensions/plan/dist/ui/index.html +1 -1
- package/templates/_base/.init/.local/hooks/pre-prompt/notices.ts +46 -0
- package/templates/_base/src/lib/context-breakdown.ts +281 -126
- package/templates/_base/src/lib/daemon-client.ts +5 -2
- package/templates/_base/src/lib/transparency.ts +5 -3
- package/templates/_base/src/lib/volute-server.ts +23 -0
- package/templates/claude/package.json.tmpl +5 -5
- package/templates/claude/src/agent.ts +54 -16
- package/templates/claude/src/server.ts +1 -0
- package/templates/codex/package.json.tmpl +5 -5
- package/templates/codex/src/agent.ts +45 -12
- package/templates/codex/src/server.ts +1 -0
- package/templates/pi/package.json.tmpl +6 -6
- package/templates/pi/src/agent.ts +74 -13
- package/templates/pi/src/lib/subagents.ts +19 -17
- package/templates/pi/src/server.ts +1 -0
- package/dist/chunk-K3NQKI34.js +0 -10
- package/dist/db-32YFKMFL.js +0 -9
- package/dist/delivery-manager-N34XKUGL.js +0 -30
- package/dist/down-TCEBGTMY.js +0 -17
- package/dist/echo-text-N3BC3WNX.js +0 -31
- package/dist/exec-2MFHTGOS.js +0 -17
- package/dist/message-delivery-X7MKA3TA.js +0 -40
- package/dist/mind-manager-7GWTTKWD.js +0 -30
- package/dist/mind-service-MO2XJKJN.js +0 -36
- package/dist/scheduler-CGUPAEBA.js +0 -30
- package/dist/service-install-KEBDNZVE.js +0 -17
- package/dist/sleep-manager-6QRMUNHK.js +0 -34
- package/dist/src-6Z4XYDH5.js +0 -2164
- package/dist/system-chat-D343HYGR.js +0 -34
- package/dist/up-ZU6ILVMA.js +0 -19
- package/dist/update-check-XRERV36Y.js +0 -18
- package/dist/web-assets/assets/index-B1zwqwt8.css +0 -1
- package/dist/web-assets/assets/index-D1guJF1i.js +0 -73
- package/packages/extensions/notes/dist/ui/assets/index-Dsua7alJ.js +0 -61
- package/packages/extensions/pages/dist/ui/assets/index-BM7gRdg7.js +0 -2
- package/packages/extensions/plan/dist/ui/assets/index-DWiqtzBv.js +0 -61
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
broadcast
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QYI65HCL.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-B4WPXYPI.js";
|
|
8
8
|
import {
|
|
9
9
|
users
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2HZRJ35V.js";
|
|
11
11
|
|
|
12
12
|
// packages/daemon/src/lib/auth.ts
|
|
13
13
|
import { compareSync, hashSync } from "bcryptjs";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
pollHealthDown,
|
|
9
9
|
readDaemonConfig,
|
|
10
10
|
stopService
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4UMXOMZ6.js";
|
|
12
12
|
import {
|
|
13
13
|
voluteSystemDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-B4WPXYPI.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/down.ts
|
|
17
17
|
import { existsSync, readFileSync, unlinkSync } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readGlobalConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DNU6XLE2.js";
|
|
5
5
|
import {
|
|
6
6
|
logger_default
|
|
7
7
|
} from "./chunk-T2TP6ZC6.js";
|
|
@@ -55,12 +55,6 @@ async function initSandbox() {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
const config = {
|
|
58
|
-
network: {
|
|
59
|
-
allowedDomains: ["*"],
|
|
60
|
-
deniedDomains: [],
|
|
61
|
-
allowLocalBinding: true,
|
|
62
|
-
allowAllUnixSockets: true
|
|
63
|
-
},
|
|
64
58
|
filesystem: {
|
|
65
59
|
denyRead: [],
|
|
66
60
|
allowWrite: [],
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __esm = (fn, res) => function __init() {
|
|
15
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
33
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
34
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
35
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
36
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
37
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
38
|
+
mod
|
|
39
|
+
));
|
|
40
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
__require,
|
|
44
|
+
__esm,
|
|
45
|
+
__commonJS,
|
|
46
|
+
__export,
|
|
47
|
+
__toESM,
|
|
48
|
+
__toCommonJS
|
|
49
|
+
};
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findBridgeForChannel,
|
|
4
4
|
getBridgeConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PKGA23XM.js";
|
|
6
6
|
import {
|
|
7
7
|
publish,
|
|
8
8
|
recordOutbound
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BLAXARBZ.js";
|
|
10
10
|
import {
|
|
11
11
|
readEnv,
|
|
12
12
|
sharedEnvPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ITH5ZLZJ.js";
|
|
14
14
|
import {
|
|
15
15
|
addMessage,
|
|
16
16
|
findDMConversation,
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
getChannelName,
|
|
19
19
|
getConversation,
|
|
20
20
|
getParticipants
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3Y7UDHO7.js";
|
|
22
22
|
import {
|
|
23
23
|
readVoluteConfig
|
|
24
24
|
} from "./chunk-CU6OFXMM.js";
|
|
25
25
|
import {
|
|
26
26
|
getOrCreateMindUser,
|
|
27
27
|
getUserByUsername
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-E25SO3QW.js";
|
|
29
29
|
import {
|
|
30
30
|
logger_default
|
|
31
31
|
} from "./chunk-T2TP6ZC6.js";
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
mindDir,
|
|
37
37
|
voluteSystemDir
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-B4WPXYPI.js";
|
|
39
39
|
import {
|
|
40
40
|
__export
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LMMQX4CK.js";
|
|
42
42
|
|
|
43
43
|
// packages/platforms/src/drivers/discord.ts
|
|
44
44
|
var discord_exports = {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
voluteSystemDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-B4WPXYPI.js";
|
|
5
5
|
|
|
6
6
|
// packages/daemon/src/lib/update-check.ts
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { execFile as execFileCb, execFileSync } from "child_process";
|
|
8
|
+
import { existsSync, readFileSync, realpathSync, writeFileSync } from "fs";
|
|
9
|
+
import { basename, dirname, resolve, sep } from "path";
|
|
10
|
+
import { promisify } from "util";
|
|
11
|
+
var execFile = promisify(execFileCb);
|
|
9
12
|
var CACHE_TTL = 60 * 60 * 1e3;
|
|
10
13
|
function cachePath() {
|
|
11
14
|
return resolve(voluteSystemDir(), "update-check.json");
|
|
@@ -90,6 +93,64 @@ async function checkForUpdate(force = false) {
|
|
|
90
93
|
return { current, latest: current, updateAvailable: false, checkFailed: true };
|
|
91
94
|
}
|
|
92
95
|
}
|
|
96
|
+
function readPackageVersion(pkgDir) {
|
|
97
|
+
try {
|
|
98
|
+
return JSON.parse(readFileSync(resolve(pkgDir, "package.json"), "utf-8")).version ?? null;
|
|
99
|
+
} catch {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function analyzeInstallPath(realPath) {
|
|
104
|
+
const marker = `${sep}node_modules${sep}volute${sep}`;
|
|
105
|
+
const idx = realPath.indexOf(marker);
|
|
106
|
+
if (idx === -1) return { packageRoot: null, prefix: null, isLinked: true };
|
|
107
|
+
const packageRoot = `${realPath.slice(0, idx)}${sep}node_modules${sep}volute`;
|
|
108
|
+
const nodeModulesRoot = dirname(packageRoot);
|
|
109
|
+
const libDir = dirname(nodeModulesRoot);
|
|
110
|
+
const prefix = basename(libDir) === "lib" ? dirname(libDir) : libDir;
|
|
111
|
+
return { packageRoot, prefix, isLinked: false };
|
|
112
|
+
}
|
|
113
|
+
function resolveVoluteInstall() {
|
|
114
|
+
let binPath;
|
|
115
|
+
try {
|
|
116
|
+
binPath = execFileSync("which", ["volute"], { encoding: "utf-8" }).trim();
|
|
117
|
+
} catch {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
if (!binPath) return null;
|
|
121
|
+
let realPath = binPath;
|
|
122
|
+
try {
|
|
123
|
+
realPath = realpathSync(binPath);
|
|
124
|
+
} catch {
|
|
125
|
+
}
|
|
126
|
+
const { packageRoot, prefix, isLinked } = analyzeInstallPath(realPath);
|
|
127
|
+
if (isLinked) {
|
|
128
|
+
let dir = dirname(realPath);
|
|
129
|
+
let version = null;
|
|
130
|
+
for (let i = 0; i < 4 && dir !== dirname(dir); i++) {
|
|
131
|
+
version = readPackageVersion(dir);
|
|
132
|
+
if (version) break;
|
|
133
|
+
dir = dirname(dir);
|
|
134
|
+
}
|
|
135
|
+
return { binPath, realPath, packageRoot: null, prefix: null, version, isLinked: true };
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
binPath,
|
|
139
|
+
realPath,
|
|
140
|
+
packageRoot,
|
|
141
|
+
prefix,
|
|
142
|
+
version: packageRoot ? readPackageVersion(packageRoot) : null,
|
|
143
|
+
isLinked: false
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
async function getResolvedVersion(binPath) {
|
|
147
|
+
try {
|
|
148
|
+
const { stdout } = await execFile(binPath, ["--version"], { timeout: 15e3 });
|
|
149
|
+
return stdout.trim() || null;
|
|
150
|
+
} catch {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
93
154
|
function checkForUpdateCached() {
|
|
94
155
|
const cache = readCache();
|
|
95
156
|
if (!cache) return null;
|
|
@@ -106,5 +167,8 @@ export {
|
|
|
106
167
|
fetchLatestVersion,
|
|
107
168
|
isNewer,
|
|
108
169
|
checkForUpdate,
|
|
170
|
+
analyzeInstallPath,
|
|
171
|
+
resolveVoluteInstall,
|
|
172
|
+
getResolvedVersion,
|
|
109
173
|
checkForUpdateCached
|
|
110
174
|
};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
exec,
|
|
4
4
|
gitExec
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AEAZRTEV.js";
|
|
6
6
|
import {
|
|
7
7
|
readGlobalConfig,
|
|
8
8
|
writeGlobalConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DNU6XLE2.js";
|
|
10
10
|
import {
|
|
11
11
|
logger_default
|
|
12
12
|
} from "./chunk-T2TP6ZC6.js";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
mindDir,
|
|
16
16
|
readRegistry,
|
|
17
17
|
voluteHome
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-B4WPXYPI.js";
|
|
19
19
|
import {
|
|
20
20
|
sharedSkills
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2HZRJ35V.js";
|
|
22
22
|
|
|
23
23
|
// packages/daemon/src/lib/skills.ts
|
|
24
24
|
import { createHash } from "crypto";
|
|
@@ -46,7 +46,7 @@ async function initDefaultSkills() {
|
|
|
46
46
|
const config = readGlobalConfig();
|
|
47
47
|
let extensionSkills = [];
|
|
48
48
|
try {
|
|
49
|
-
const { getExtensionStandardSkills } = await import("./extensions-
|
|
49
|
+
const { getExtensionStandardSkills } = await import("./extensions-LQX2N7TI.js");
|
|
50
50
|
extensionSkills = getExtensionStandardSkills();
|
|
51
51
|
} catch (err) {
|
|
52
52
|
logger_default.warn("failed to load extension standard skills during init", logger_default.errorData(err));
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-T2TP6ZC6.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-B4WPXYPI.js";
|
|
8
8
|
import {
|
|
9
9
|
activity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2HZRJ35V.js";
|
|
11
11
|
|
|
12
12
|
// packages/daemon/src/lib/events/activity-events.ts
|
|
13
13
|
var subscribers = /* @__PURE__ */ new Set();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readGlobalConfig,
|
|
4
4
|
writeGlobalConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DNU6XLE2.js";
|
|
6
6
|
import {
|
|
7
7
|
logger_default
|
|
8
8
|
} from "./chunk-T2TP6ZC6.js";
|
|
@@ -11,6 +11,17 @@ import {
|
|
|
11
11
|
import { complete, getEnvApiKey, getModel, getModels, getProviders } from "@mariozechner/pi-ai";
|
|
12
12
|
import { getOAuthApiKey } from "@mariozechner/pi-ai/oauth";
|
|
13
13
|
var aiLog = logger_default.child("ai-service");
|
|
14
|
+
var providerRefreshHook;
|
|
15
|
+
function setProviderRefreshHook(hook) {
|
|
16
|
+
providerRefreshHook = hook;
|
|
17
|
+
}
|
|
18
|
+
function fireProviderRefreshHook(providerId) {
|
|
19
|
+
try {
|
|
20
|
+
providerRefreshHook?.(providerId);
|
|
21
|
+
} catch (err) {
|
|
22
|
+
aiLog.warn(`provider refresh hook failed for ${providerId}`, logger_default.errorData(err));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
14
25
|
function getAiConfig() {
|
|
15
26
|
const config = readGlobalConfig();
|
|
16
27
|
return config.ai ?? null;
|
|
@@ -131,6 +142,7 @@ async function resolveApiKey(providerId) {
|
|
|
131
142
|
if (result) {
|
|
132
143
|
if (result.newCredentials.access !== providerConfig.oauth.access) {
|
|
133
144
|
saveProviderConfig(providerId, { ...providerConfig, oauth: result.newCredentials });
|
|
145
|
+
fireProviderRefreshHook(providerId);
|
|
134
146
|
}
|
|
135
147
|
return result.apiKey;
|
|
136
148
|
}
|
|
@@ -206,6 +218,8 @@ async function aiComplete(systemPrompt, userMessage, modelId) {
|
|
|
206
218
|
}
|
|
207
219
|
|
|
208
220
|
export {
|
|
221
|
+
setProviderRefreshHook,
|
|
222
|
+
fireProviderRefreshHook,
|
|
209
223
|
getAiConfig,
|
|
210
224
|
saveProviderConfig,
|
|
211
225
|
removeProviderConfig,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
setBridgeConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PKGA23XM.js";
|
|
5
5
|
import {
|
|
6
6
|
readEnv,
|
|
7
7
|
sharedEnvPath,
|
|
8
8
|
writeEnv
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ITH5ZLZJ.js";
|
|
10
10
|
|
|
11
11
|
// packages/daemon/src/lib/template/import-utils.ts
|
|
12
12
|
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
LAUNCHD_PLIST_LABEL,
|
|
4
4
|
LAUNCHD_PLIST_PATH,
|
|
5
5
|
USER_SYSTEMD_UNIT
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4UMXOMZ6.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveVoluteBin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AEAZRTEV.js";
|
|
10
10
|
|
|
11
11
|
// packages/daemon/src/lib/config/service-install.ts
|
|
12
12
|
import { execFile } from "child_process";
|
|
@@ -9,21 +9,21 @@ import {
|
|
|
9
9
|
getSharedSkill,
|
|
10
10
|
installSkill,
|
|
11
11
|
mindSkillsDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QV7P3TYO.js";
|
|
13
13
|
import {
|
|
14
14
|
readVoluteConfig,
|
|
15
15
|
writeVoluteConfig
|
|
16
16
|
} from "./chunk-CU6OFXMM.js";
|
|
17
17
|
import {
|
|
18
18
|
exec
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AEAZRTEV.js";
|
|
20
20
|
import {
|
|
21
21
|
qualifyModelId,
|
|
22
22
|
resolveTemplate
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-S4SXBQ7F.js";
|
|
24
24
|
import {
|
|
25
25
|
readGlobalConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DNU6XLE2.js";
|
|
27
27
|
import {
|
|
28
28
|
logger_default
|
|
29
29
|
} from "./chunk-T2TP6ZC6.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
findMind,
|
|
33
33
|
nextPort,
|
|
34
34
|
voluteSystemDir
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-B4WPXYPI.js";
|
|
36
36
|
|
|
37
37
|
// packages/daemon/src/lib/mind/spirit.ts
|
|
38
38
|
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -128,7 +128,7 @@ async function ensureSpiritProject() {
|
|
|
128
128
|
} catch (err) {
|
|
129
129
|
slog.warn("failed to add tending schedule to spirit config", logger_default.errorData(err));
|
|
130
130
|
}
|
|
131
|
-
const { createMindUser, chownMindDir, ensureVoluteGroup } = await import("./isolation-
|
|
131
|
+
const { createMindUser, chownMindDir, ensureVoluteGroup } = await import("./isolation-4Q4P7HRV.js");
|
|
132
132
|
ensureVoluteGroup();
|
|
133
133
|
createMindUser("volute", resolve(dir, "home"));
|
|
134
134
|
chownMindDir(dir, "volute");
|
|
@@ -162,8 +162,8 @@ async function syncSpiritTemplate() {
|
|
|
162
162
|
cpSync(newPkg, resolve(dir, "package.json"));
|
|
163
163
|
await exec("npm", ["install"], { cwd: dir, env: npmEnv() });
|
|
164
164
|
}
|
|
165
|
-
const db = await (await import("./db-
|
|
166
|
-
const { minds } = await import("./schema-
|
|
165
|
+
const db = await (await import("./db-ZEPKEJJD.js")).getDb();
|
|
166
|
+
const { minds } = await import("./schema-LYQUDL7G.js");
|
|
167
167
|
const { eq } = await import("drizzle-orm");
|
|
168
168
|
await db.update(minds).set({ template: expectedTemplate }).where(eq(minds.name, "volute"));
|
|
169
169
|
}
|
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ if (!process.env.VOLUTE_HOME) {
|
|
|
10
10
|
var command = process.argv[2];
|
|
11
11
|
var args = process.argv.slice(3);
|
|
12
12
|
if (command === "--version" || command === "-v") {
|
|
13
|
-
const { default: pkg } = await import("./package-
|
|
13
|
+
const { default: pkg } = await import("./package-GO3PHHUF.js");
|
|
14
14
|
console.log(pkg.version);
|
|
15
15
|
process.exit(0);
|
|
16
16
|
}
|
|
@@ -31,7 +31,7 @@ var ungatedCommands = /* @__PURE__ */ new Set([
|
|
|
31
31
|
void 0
|
|
32
32
|
]);
|
|
33
33
|
if (!ungatedCommands.has(command)) {
|
|
34
|
-
const { isSetupComplete } = await import("./setup-
|
|
34
|
+
const { isSetupComplete } = await import("./setup-OTEC3ZPM.js");
|
|
35
35
|
if (!isSetupComplete()) {
|
|
36
36
|
console.error("Volute is not set up. Run `volute setup` first.");
|
|
37
37
|
process.exit(1);
|
|
@@ -39,61 +39,61 @@ if (!ungatedCommands.has(command)) {
|
|
|
39
39
|
}
|
|
40
40
|
switch (command) {
|
|
41
41
|
case "setup":
|
|
42
|
-
await import("./setup-
|
|
42
|
+
await import("./setup-ZTW4FVMQ.js").then((m) => m.run(args));
|
|
43
43
|
break;
|
|
44
44
|
case "mind":
|
|
45
|
-
await import("./mind-
|
|
45
|
+
await import("./mind-ELPD6VBP.js").then((m) => m.run(args));
|
|
46
46
|
break;
|
|
47
47
|
case "seed":
|
|
48
|
-
await import("./seed-cmd-
|
|
48
|
+
await import("./seed-cmd-ETIF4WD6.js").then((m) => m.run(args));
|
|
49
49
|
break;
|
|
50
50
|
case "chat":
|
|
51
|
-
await import("./chat-
|
|
51
|
+
await import("./chat-JD3TJINV.js").then((m) => m.run(args));
|
|
52
52
|
break;
|
|
53
53
|
case "variant":
|
|
54
|
-
await import("./variant-
|
|
54
|
+
await import("./variant-5LQOPCQA.js").then((m) => m.run(args));
|
|
55
55
|
break;
|
|
56
56
|
case "clock":
|
|
57
|
-
await import("./clock-
|
|
57
|
+
await import("./clock-YLDJUKBW.js").then((m) => m.run(args));
|
|
58
58
|
break;
|
|
59
59
|
case "skill":
|
|
60
|
-
await import("./skill-
|
|
60
|
+
await import("./skill-QHACP7EU.js").then((m) => m.run(args));
|
|
61
61
|
break;
|
|
62
62
|
case "env":
|
|
63
|
-
await import("./env-
|
|
63
|
+
await import("./env-77IOWG4U.js").then((m) => m.run(args));
|
|
64
64
|
break;
|
|
65
65
|
case "config":
|
|
66
|
-
await import("./config-
|
|
66
|
+
await import("./config-PO4EZLIK.js").then((m) => m.run(args));
|
|
67
67
|
break;
|
|
68
68
|
case "up":
|
|
69
|
-
await import("./up-
|
|
69
|
+
await import("./up-4H7TL6WB.js").then((m) => m.run(args));
|
|
70
70
|
break;
|
|
71
71
|
case "down":
|
|
72
|
-
await import("./down-
|
|
72
|
+
await import("./down-6DYO2QV7.js").then((m) => m.run(args));
|
|
73
73
|
break;
|
|
74
74
|
case "restart":
|
|
75
|
-
await import("./daemon-restart-
|
|
75
|
+
await import("./daemon-restart-LP2DR24J.js").then((m) => m.run(args));
|
|
76
76
|
break;
|
|
77
77
|
case "update":
|
|
78
|
-
await import("./update-
|
|
78
|
+
await import("./update-OY2JYXYK.js").then((m) => m.run(args));
|
|
79
79
|
break;
|
|
80
80
|
case "status":
|
|
81
|
-
await import("./status-
|
|
81
|
+
await import("./status-BRYYYO7C.js").then((m) => m.run(args));
|
|
82
82
|
break;
|
|
83
83
|
case "extension":
|
|
84
|
-
await import("./extension-
|
|
84
|
+
await import("./extension-35NB6GHW.js").then((m) => m.run(args));
|
|
85
85
|
break;
|
|
86
86
|
case "systems":
|
|
87
|
-
await import("./systems-
|
|
87
|
+
await import("./systems-3XTAHA35.js").then((m) => m.run(args));
|
|
88
88
|
break;
|
|
89
89
|
case "login":
|
|
90
|
-
await import("./login-
|
|
90
|
+
await import("./login-Y6UAYQVO.js").then((m) => m.run(args));
|
|
91
91
|
break;
|
|
92
92
|
case "logout":
|
|
93
|
-
await import("./logout-
|
|
93
|
+
await import("./logout-VHGWVH63.js").then((m) => m.run(args));
|
|
94
94
|
break;
|
|
95
95
|
case "service":
|
|
96
|
-
await import("./service-
|
|
96
|
+
await import("./service-WMV6R6VJ.js").then((m) => m.run(args));
|
|
97
97
|
break;
|
|
98
98
|
case "--help":
|
|
99
99
|
case "-h":
|
|
@@ -150,7 +150,7 @@ use --mind <name> or VOLUTE_MIND env var to identify the mind.`);
|
|
|
150
150
|
default: {
|
|
151
151
|
let isExtensionCommand = false;
|
|
152
152
|
try {
|
|
153
|
-
const { daemonFetch } = await import("./daemon-client-
|
|
153
|
+
const { daemonFetch } = await import("./daemon-client-H6MEKK2W.js");
|
|
154
154
|
const res = await daemonFetch("/api/extensions/commands");
|
|
155
155
|
if (res.ok) {
|
|
156
156
|
const extCommands = await res.json();
|
|
@@ -231,7 +231,7 @@ Use --mind <name> or VOLUTE_MIND to specify the mind.
|
|
|
231
231
|
mind = cmdArgs[mindIdx + 1];
|
|
232
232
|
cmdArgs.splice(mindIdx, 2);
|
|
233
233
|
}
|
|
234
|
-
const { readStdin } = await import("./read-stdin-
|
|
234
|
+
const { readStdin } = await import("./read-stdin-P6HCZUAA.js");
|
|
235
235
|
const stdin = await readStdin();
|
|
236
236
|
const cmdRes = await daemonFetch(`/api/ext/${command}/commands/${subcommand}`, {
|
|
237
237
|
method: "POST",
|
|
@@ -264,7 +264,7 @@ Run 'volute --help' for usage.`);
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
if (command !== "update") {
|
|
267
|
-
import("./update-check-
|
|
267
|
+
import("./update-check-IUB7QHAF.js").then((m) => m.checkForUpdate()).then((result) => {
|
|
268
268
|
if (result.updateAvailable) {
|
|
269
269
|
console.error(`
|
|
270
270
|
Update available: ${result.current} \u2192 ${result.latest}`);
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
subcommands
|
|
19
19
|
} from "./chunk-TXSA4Q3V.js";
|
|
20
20
|
import "./chunk-O7IGP7ZW.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-LMMQX4CK.js";
|
|
22
22
|
|
|
23
23
|
// packages/cli/src/commands/clock.ts
|
|
24
24
|
import { CronExpressionParser } from "cron-parser";
|
|
@@ -274,11 +274,11 @@ var cmd = subcommands({
|
|
|
274
274
|
},
|
|
275
275
|
sleep: {
|
|
276
276
|
description: "Put a mind to sleep",
|
|
277
|
-
run: (args) => import("./mind-sleep-
|
|
277
|
+
run: (args) => import("./mind-sleep-PVCMLTAH.js").then((m) => m.run(args))
|
|
278
278
|
},
|
|
279
279
|
wake: {
|
|
280
280
|
description: "Wake a sleeping mind",
|
|
281
|
-
run: (args) => import("./mind-wake-
|
|
281
|
+
run: (args) => import("./mind-wake-HZUOVE7J.js").then((m) => m.run(args))
|
|
282
282
|
}
|
|
283
283
|
},
|
|
284
284
|
footer: "Use --mind <name> or VOLUTE_MIND to identify the mind."
|