abtars 0.1.0-alpha.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/LICENSE +190 -0
- package/README.md +84 -0
- package/bundle/_registry.generated-M4WY2MMI.js +35 -0
- package/bundle/_registry.generated-M4WY2MMI.js.map +7 -0
- package/bundle/abtars-browser.js +162 -0
- package/bundle/abtars-browser.js.map +7 -0
- package/bundle/abtars-cli.js +1438 -0
- package/bundle/abtars-cli.js.map +7 -0
- package/bundle/abtars-restart.js +12 -0
- package/bundle/abtars-restart.js.map +7 -0
- package/bundle/abtars-rss.js +165 -0
- package/bundle/abtars-rss.js.map +7 -0
- package/bundle/abtars-task.js +258 -0
- package/bundle/abtars-task.js.map +7 -0
- package/bundle/abtars.js +4072 -0
- package/bundle/abtars.js.map +7 -0
- package/bundle/agent-api-rate-limit-OQNFMXTZ.js +38 -0
- package/bundle/agent-api-rate-limit-OQNFMXTZ.js.map +7 -0
- package/bundle/agent-registry-LT4JNQH6.js +18 -0
- package/bundle/agent-registry-LT4JNQH6.js.map +7 -0
- package/bundle/agents/default.md +29 -0
- package/bundle/anthropic-adapter-2APTH3LA.js +40 -0
- package/bundle/anthropic-adapter-2APTH3LA.js.map +7 -0
- package/bundle/bridge-lock-transport-4AC2G5G6.js +39 -0
- package/bundle/bridge-lock-transport-4AC2G5G6.js.map +7 -0
- package/bundle/browse-delivery-JXBY36GK.js +17 -0
- package/bundle/browse-delivery-JXBY36GK.js.map +7 -0
- package/bundle/browser-ELNDVPLC.js +18 -0
- package/bundle/browser-ELNDVPLC.js.map +7 -0
- package/bundle/capability-CIL3G4FI.js +17 -0
- package/bundle/capability-CIL3G4FI.js.map +7 -0
- package/bundle/chunk-265TPOPC.js +289 -0
- package/bundle/chunk-265TPOPC.js.map +7 -0
- package/bundle/chunk-2UENBO6M.js +223 -0
- package/bundle/chunk-2UENBO6M.js.map +7 -0
- package/bundle/chunk-2UPU3OW6.js +67 -0
- package/bundle/chunk-2UPU3OW6.js.map +7 -0
- package/bundle/chunk-2XU2X4OI.js +125 -0
- package/bundle/chunk-2XU2X4OI.js.map +7 -0
- package/bundle/chunk-3B7BBE4F.js +758 -0
- package/bundle/chunk-3B7BBE4F.js.map +7 -0
- package/bundle/chunk-3E545J66.js +69 -0
- package/bundle/chunk-3E545J66.js.map +7 -0
- package/bundle/chunk-5R2ANXQ7.js +510 -0
- package/bundle/chunk-5R2ANXQ7.js.map +7 -0
- package/bundle/chunk-6CPN4IGS.js +507 -0
- package/bundle/chunk-6CPN4IGS.js.map +7 -0
- package/bundle/chunk-6NR3OHEW.js +88 -0
- package/bundle/chunk-6NR3OHEW.js.map +7 -0
- package/bundle/chunk-6SETMHNN.js +206 -0
- package/bundle/chunk-6SETMHNN.js.map +7 -0
- package/bundle/chunk-6UCRKRWR.js +644 -0
- package/bundle/chunk-6UCRKRWR.js.map +7 -0
- package/bundle/chunk-AR6GO6YC.js +83 -0
- package/bundle/chunk-AR6GO6YC.js.map +7 -0
- package/bundle/chunk-AZJIODTQ.js +54 -0
- package/bundle/chunk-AZJIODTQ.js.map +7 -0
- package/bundle/chunk-BHMZ4RCC.js +3706 -0
- package/bundle/chunk-BHMZ4RCC.js.map +7 -0
- package/bundle/chunk-BQ2L4GMG.js +9175 -0
- package/bundle/chunk-BQ2L4GMG.js.map +7 -0
- package/bundle/chunk-BSSBCSCL.js +159 -0
- package/bundle/chunk-BSSBCSCL.js.map +7 -0
- package/bundle/chunk-BUUVFUPO.js +157 -0
- package/bundle/chunk-BUUVFUPO.js.map +7 -0
- package/bundle/chunk-CEVRHKJY.js +131 -0
- package/bundle/chunk-CEVRHKJY.js.map +7 -0
- package/bundle/chunk-CWOHNFUV.js +39 -0
- package/bundle/chunk-CWOHNFUV.js.map +7 -0
- package/bundle/chunk-D2DCBO6M.js +228 -0
- package/bundle/chunk-D2DCBO6M.js.map +7 -0
- package/bundle/chunk-FMWKEPM7.js +31 -0
- package/bundle/chunk-FMWKEPM7.js.map +7 -0
- package/bundle/chunk-GRNENTPA.js +145 -0
- package/bundle/chunk-GRNENTPA.js.map +7 -0
- package/bundle/chunk-GST5T3WZ.js +93 -0
- package/bundle/chunk-GST5T3WZ.js.map +7 -0
- package/bundle/chunk-GUQVJC3U.js +299 -0
- package/bundle/chunk-GUQVJC3U.js.map +7 -0
- package/bundle/chunk-HX7Y7EYP.js +3659 -0
- package/bundle/chunk-HX7Y7EYP.js.map +7 -0
- package/bundle/chunk-JCJS4ZIB.js +296 -0
- package/bundle/chunk-JCJS4ZIB.js.map +7 -0
- package/bundle/chunk-JW6RU47G.js +184 -0
- package/bundle/chunk-JW6RU47G.js.map +7 -0
- package/bundle/chunk-LSPKJQCI.js +24 -0
- package/bundle/chunk-LSPKJQCI.js.map +7 -0
- package/bundle/chunk-M6VBAPNT.js +16 -0
- package/bundle/chunk-M6VBAPNT.js.map +7 -0
- package/bundle/chunk-MPX525QO.js +129 -0
- package/bundle/chunk-MPX525QO.js.map +7 -0
- package/bundle/chunk-MW6WDLU7.js +130 -0
- package/bundle/chunk-MW6WDLU7.js.map +7 -0
- package/bundle/chunk-NT3OBORC.js +215 -0
- package/bundle/chunk-NT3OBORC.js.map +7 -0
- package/bundle/chunk-NWDBD4PA.js +50 -0
- package/bundle/chunk-NWDBD4PA.js.map +7 -0
- package/bundle/chunk-OP7BTAWY.js +29 -0
- package/bundle/chunk-OP7BTAWY.js.map +7 -0
- package/bundle/chunk-PLCY3GFH.js +77 -0
- package/bundle/chunk-PLCY3GFH.js.map +7 -0
- package/bundle/chunk-PNEDC45Y.js +97 -0
- package/bundle/chunk-PNEDC45Y.js.map +7 -0
- package/bundle/chunk-QBGBT5QS.js +81 -0
- package/bundle/chunk-QBGBT5QS.js.map +7 -0
- package/bundle/chunk-RVE2N7FA.js +70 -0
- package/bundle/chunk-RVE2N7FA.js.map +7 -0
- package/bundle/chunk-TZHIDLDS.js +71910 -0
- package/bundle/chunk-TZHIDLDS.js.map +7 -0
- package/bundle/chunk-UCQ2WC3B.js +126 -0
- package/bundle/chunk-UCQ2WC3B.js.map +7 -0
- package/bundle/chunk-UHRP745J.js +214 -0
- package/bundle/chunk-UHRP745J.js.map +7 -0
- package/bundle/chunk-V76TVMCM.js +58 -0
- package/bundle/chunk-V76TVMCM.js.map +7 -0
- package/bundle/chunk-VVEDVGCR.js +981 -0
- package/bundle/chunk-VVEDVGCR.js.map +7 -0
- package/bundle/chunk-W6FAL35D.js +102 -0
- package/bundle/chunk-W6FAL35D.js.map +7 -0
- package/bundle/chunk-X6TERNVJ.js +15902 -0
- package/bundle/chunk-X6TERNVJ.js.map +7 -0
- package/bundle/chunk-X76UX47U.js +47 -0
- package/bundle/chunk-X76UX47U.js.map +7 -0
- package/bundle/chunk-XREWVCUO.js +518 -0
- package/bundle/chunk-XREWVCUO.js.map +7 -0
- package/bundle/chunk-Y6XAEX2Q.js +408 -0
- package/bundle/chunk-Y6XAEX2Q.js.map +7 -0
- package/bundle/chunk-YOCTDKKL.js +28 -0
- package/bundle/chunk-YOCTDKKL.js.map +7 -0
- package/bundle/chunk-ZXPXCDA6.js +160 -0
- package/bundle/chunk-ZXPXCDA6.js.map +7 -0
- package/bundle/commands-BHVUOU3V.js +31 -0
- package/bundle/commands-BHVUOU3V.js.map +7 -0
- package/bundle/completion-buffer-P253ONKF.js +13 -0
- package/bundle/completion-buffer-P253ONKF.js.map +7 -0
- package/bundle/config-RGSDAPZN.js +19 -0
- package/bundle/config-RGSDAPZN.js.map +7 -0
- package/bundle/config-show-ERTATR6E.js +40 -0
- package/bundle/config-show-ERTATR6E.js.map +7 -0
- package/bundle/context-HCEGZNDC.js +72 -0
- package/bundle/context-HCEGZNDC.js.map +7 -0
- package/bundle/delegation-tools-GYTS2D6A.js +27 -0
- package/bundle/delegation-tools-GYTS2D6A.js.map +7 -0
- package/bundle/deploy-lib-import-32ZFKHWP.js +49 -0
- package/bundle/deploy-lib-import-32ZFKHWP.js.map +7 -0
- package/bundle/digital-signature-OFCGSHWO.js +13 -0
- package/bundle/digital-signature-OFCGSHWO.js.map +7 -0
- package/bundle/direct-api-transport-YR7SXXNN.js +860 -0
- package/bundle/direct-api-transport-YR7SXXNN.js.map +7 -0
- package/bundle/discord-adapter-YYWVMPPU.js +584 -0
- package/bundle/discord-adapter-YYWVMPPU.js.map +7 -0
- package/bundle/dist-MTMKARCP.js +1969 -0
- package/bundle/dist-MTMKARCP.js.map +7 -0
- package/bundle/dns-wakeup-27M7D2MR.js +107 -0
- package/bundle/dns-wakeup-27M7D2MR.js.map +7 -0
- package/bundle/doctor-QNUSDY73.js +248 -0
- package/bundle/doctor-QNUSDY73.js.map +7 -0
- package/bundle/ensure-invariants-NMXNS476.js +49 -0
- package/bundle/ensure-invariants-NMXNS476.js.map +7 -0
- package/bundle/env-schema-2KBHBDGN.js +19 -0
- package/bundle/env-schema-2KBHBDGN.js.map +7 -0
- package/bundle/esm-DDP6NCZG.js +100663 -0
- package/bundle/esm-DDP6NCZG.js.map +7 -0
- package/bundle/fallback-policy-L4QV2PEJ.js +46 -0
- package/bundle/fallback-policy-L4QV2PEJ.js.map +7 -0
- package/bundle/health-check-SPA7NT6N.js +56 -0
- package/bundle/health-check-SPA7NT6N.js.map +7 -0
- package/bundle/hook-system-6Q5YTR53.js +17 -0
- package/bundle/hook-system-6Q5YTR53.js.map +7 -0
- package/bundle/hotskills-K7BM4YLB.js +12 -0
- package/bundle/hotskills-K7BM4YLB.js.map +7 -0
- package/bundle/install-6HRZVKUM.js +15 -0
- package/bundle/install-6HRZVKUM.js.map +7 -0
- package/bundle/install-log-IAPHYKD4.js +28 -0
- package/bundle/install-log-IAPHYKD4.js.map +7 -0
- package/bundle/install-manifest-SPQRUNXL.js +102 -0
- package/bundle/install-manifest-SPQRUNXL.js.map +7 -0
- package/bundle/install-validate-PVLZXYLQ.js +53 -0
- package/bundle/install-validate-PVLZXYLQ.js.map +7 -0
- package/bundle/irc-adapter-OI5UZSQF.js +293 -0
- package/bundle/irc-adapter-OI5UZSQF.js.map +7 -0
- package/bundle/irc-config-55YO6EGB.js +88 -0
- package/bundle/irc-config-55YO6EGB.js.map +7 -0
- package/bundle/logs-ZNYXX5PA.js +19 -0
- package/bundle/logs-ZNYXX5PA.js.map +7 -0
- package/bundle/media-utils-XNNDTYFI.js +4662 -0
- package/bundle/media-utils-XNNDTYFI.js.map +7 -0
- package/bundle/message-pipeline-LLH5SYMO.js +33 -0
- package/bundle/message-pipeline-LLH5SYMO.js.map +7 -0
- package/bundle/meta.json +41304 -0
- package/bundle/model-health-registry-35LQNVQR.js +11 -0
- package/bundle/model-health-registry-35LQNVQR.js.map +7 -0
- package/bundle/notification-Y5S5MMLV.js +13 -0
- package/bundle/notification-Y5S5MMLV.js.map +7 -0
- package/bundle/openrouter-credits-EDY7ETAU.js +32 -0
- package/bundle/openrouter-credits-EDY7ETAU.js.map +7 -0
- package/bundle/passwd-RRFV4CC5.js +133 -0
- package/bundle/passwd-RRFV4CC5.js.map +7 -0
- package/bundle/paths-G33RZWZ7.js +17 -0
- package/bundle/paths-G33RZWZ7.js.map +7 -0
- package/bundle/peer-client-52XYMNI7.js +156 -0
- package/bundle/peer-client-52XYMNI7.js.map +7 -0
- package/bundle/peer-config-VK6EDLN5.js +16 -0
- package/bundle/peer-config-VK6EDLN5.js.map +7 -0
- package/bundle/peer-sessions-EAXTNQ36.js +49 -0
- package/bundle/peer-sessions-EAXTNQ36.js.map +7 -0
- package/bundle/pending-callback-RIMQZ7FJ.js +40 -0
- package/bundle/pending-callback-RIMQZ7FJ.js.map +7 -0
- package/bundle/phase-transport-KYERDL2O.js +22 -0
- package/bundle/phase-transport-KYERDL2O.js.map +7 -0
- package/bundle/public/css/dashboard.css +542 -0
- package/bundle/public/index.html +180 -0
- package/bundle/public/js/app.js +437 -0
- package/bundle/public/memory-universe.js +384 -0
- package/bundle/responses-adapter-AAQTY3K4.js +30 -0
- package/bundle/responses-adapter-AAQTY3K4.js.map +7 -0
- package/bundle/restore-ZE3SEPSS.js +46 -0
- package/bundle/restore-ZE3SEPSS.js.map +7 -0
- package/bundle/self-healer-utils-DMUUXC47.js +43 -0
- package/bundle/self-healer-utils-DMUUXC47.js.map +7 -0
- package/bundle/skill-stats-LLEXEXLR.js +22 -0
- package/bundle/skill-stats-LLEXEXLR.js.map +7 -0
- package/bundle/sleep-OYIUOVQD.js +19 -0
- package/bundle/sleep-OYIUOVQD.js.map +7 -0
- package/bundle/soul-loader-54WCVNLJ.js +16 -0
- package/bundle/soul-loader-54WCVNLJ.js.map +7 -0
- package/bundle/src-JL4PVO23.js +8 -0
- package/bundle/src-JL4PVO23.js.map +7 -0
- package/bundle/sse-parser-anthropic-P7CE2MH2.js +72 -0
- package/bundle/sse-parser-anthropic-P7CE2MH2.js.map +7 -0
- package/bundle/sse-parser-responses-EQQA5FWN.js +63 -0
- package/bundle/sse-parser-responses-EQQA5FWN.js.map +7 -0
- package/bundle/ssrf-guard-FZCBYIVW.js +64 -0
- package/bundle/ssrf-guard-FZCBYIVW.js.map +7 -0
- package/bundle/start-FH3GRMJ4.js +35 -0
- package/bundle/start-FH3GRMJ4.js.map +7 -0
- package/bundle/stream-single-WSG4D53C.js +33 -0
- package/bundle/stream-single-WSG4D53C.js.map +7 -0
- package/bundle/stt-2UH3RITX.js +14 -0
- package/bundle/stt-2UH3RITX.js.map +7 -0
- package/bundle/subagent-runtime-LE2ZXH3G.js +12 -0
- package/bundle/subagent-runtime-LE2ZXH3G.js.map +7 -0
- package/bundle/system-message-T5R3EYYN.js +30 -0
- package/bundle/system-message-T5R3EYYN.js.map +7 -0
- package/bundle/system-status-KQ6KHFJ6.js +189 -0
- package/bundle/system-status-KQ6KHFJ6.js.map +7 -0
- package/bundle/task-store-K7CQDEPI.js +22 -0
- package/bundle/task-store-K7CQDEPI.js.map +7 -0
- package/bundle/telegram-adapter-2V3XUMT5.js +1060 -0
- package/bundle/telegram-adapter-2V3XUMT5.js.map +7 -0
- package/bundle/tool-registry-MU3OX4UI.js +38 -0
- package/bundle/tool-registry-MU3OX4UI.js.map +7 -0
- package/bundle/tool-sandbox-VYOK4ZOA.js +20 -0
- package/bundle/tool-sandbox-VYOK4ZOA.js.map +7 -0
- package/bundle/transport-config-YLXU33RO.js +57 -0
- package/bundle/transport-config-YLXU33RO.js.map +7 -0
- package/bundle/update-QCW5LXRN.js +13 -0
- package/bundle/update-QCW5LXRN.js.map +7 -0
- package/bundle/update-check-27KZSAP6.js +12 -0
- package/bundle/update-check-27KZSAP6.js.map +7 -0
- package/bundle/usage-tracker-OVVEVMOY.js +17 -0
- package/bundle/usage-tracker-OVVEVMOY.js.map +7 -0
- package/bundle/user-registry-D4SD73UV.js +16 -0
- package/bundle/user-registry-D4SD73UV.js.map +7 -0
- package/core/professor.json +14 -0
- package/core/prompts/browsing_prompt.md +39 -0
- package/core/prompts/compaction.md +32 -0
- package/core/skills/memory/classification/SKILL.md +37 -0
- package/core/skills/memory/memory-anomalies/SKILL.md +39 -0
- package/core/skills/memory/memory-search/SKILL.md +48 -0
- package/core/skills/memory/topic-save/SKILL.md +44 -0
- package/core/skills/ops/cron/SKILL.md +51 -0
- package/core/skills/ops/gdrive-backup/SKILL.md +15 -0
- package/core/skills/ops/session-start/SKILL.md +11 -0
- package/core/skills/ops/skill-authoring/SKILL.md +54 -0
- package/core/skills/ops/system-health/SKILL.md +104 -0
- package/core/skills/ops/troubleshooting/SKILL.md +48 -0
- package/core/skills/ops/trust-gating/SKILL.md +30 -0
- package/core/skills/tools/a2a-communication/SKILL.md +68 -0
- package/core/skills/tools/browse-delegate/SKILL.md +27 -0
- package/core/skills/tools/browser/SKILL.md +36 -0
- package/core/skills/tools/clawhub/SKILL.md +44 -0
- package/core/skills/tools/delegation/SKILL.md +48 -0
- package/core/skills/tools/fxtwitter/SKILL.md +52 -0
- package/core/skills/tools/gmail/SKILL.md +44 -0
- package/core/skills/tools/irc-chat/SKILL.md +84 -0
- package/core/skills/tools/linear/SKILL.md +90 -0
- package/core/skills/tools/mcporter/SKILL.md +46 -0
- package/core/skills/tools/model-scout/SKILL.md +132 -0
- package/core/skills/tools/model-scout/scout-add-model.py +67 -0
- package/core/skills/tools/model-scout/scout-ollama.py +116 -0
- package/core/skills/tools/model-scout/scout-openrouter.py +85 -0
- package/core/skills/tools/nlm/SKILL.md +40 -0
- package/core/skills/tools/todo/SKILL.md +30 -0
- package/core/skills/tools/twitterX/SKILL.md +52 -0
- package/core/skills/tools/twitterX/scripts/abtars-tweet.js +532 -0
- package/core/skills/tools/twitterX/scripts/package.json +1 -0
- package/core/skills/tools/web-fetch/SKILL.md +29 -0
- package/package.json +59 -0
- package/scripts/abtars-daemon.service +23 -0
- package/scripts/abtars-fetch.sh +42 -0
- package/scripts/abtars-watchdog.service +13 -0
- package/scripts/abtars.sh +14 -0
- package/scripts/abtars@.service +21 -0
- package/scripts/browser-patchright.sh +79 -0
- package/scripts/com.abtars.daemon.plist +24 -0
- package/scripts/com.abtars.watchdog.plist +27 -0
- package/scripts/daily-backup.sh +62 -0
- package/scripts/doctor.sh +553 -0
- package/scripts/hooks/audit-logger.sh +22 -0
- package/scripts/upgrade-deps.sh +64 -0
- package/scripts/watchdog.sh +309 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import "./chunk-NWDBD4PA.js";
|
|
3
|
+
|
|
4
|
+
// src/components/transport/fallback-policy.ts
|
|
5
|
+
var FallbackPolicy = class {
|
|
6
|
+
candidates;
|
|
7
|
+
registry;
|
|
8
|
+
lastDecision = null;
|
|
9
|
+
constructor(candidates, registry) {
|
|
10
|
+
this.candidates = candidates;
|
|
11
|
+
this.registry = registry;
|
|
12
|
+
}
|
|
13
|
+
/** Pick the next candidate to try. Returns null if all exhausted. */
|
|
14
|
+
selectModel(sessionTokens) {
|
|
15
|
+
const skipped = [];
|
|
16
|
+
for (const c of this.candidates) {
|
|
17
|
+
if (this.registry.shouldSkip(c.model, c.endpoint)) {
|
|
18
|
+
const level = this.registry.getBucketLevel(c.model, c.endpoint);
|
|
19
|
+
skipped.push(`${c.model}: bucket ${level}%`);
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (sessionTokens && sessionTokens > 0 && c.maxContext > 0 && sessionTokens > c.maxContext * 0.95) {
|
|
23
|
+
skipped.push(`${c.model}: context too large`);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
this.lastDecision = { chosen: c, skipped };
|
|
27
|
+
return c;
|
|
28
|
+
}
|
|
29
|
+
this.lastDecision = null;
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
/** Get surviving candidates (not skipped by health). For compaction fallback. */
|
|
33
|
+
survivingCandidates() {
|
|
34
|
+
return this.candidates.filter((c) => !this.registry.shouldSkip(c.model, c.endpoint));
|
|
35
|
+
}
|
|
36
|
+
recordSuccess(candidate) {
|
|
37
|
+
this.registry.recordSuccess(candidate.model, candidate.endpoint);
|
|
38
|
+
}
|
|
39
|
+
recordError(candidate, kind, retryAfterMs) {
|
|
40
|
+
this.registry.recordError(candidate.model, candidate.endpoint, kind, retryAfterMs);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
FallbackPolicy
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=fallback-policy-L4QV2PEJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/transport/fallback-policy.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * FallbackPolicy \u2014 per-agent model selection with shared health registry.\n * Owns an ordered candidate list. Delegates health checks to ModelHealthRegistry.\n */\n\nimport type { ModelHealthRegistry, ErrorKind } from \"./model-health-registry.js\";\n\nexport interface ModelCandidate {\n model: string;\n endpoint: string;\n apiKey?: string;\n maxContext: number;\n}\n\nexport interface FallbackDecision {\n chosen: ModelCandidate;\n skipped: string[];\n}\n\nexport class FallbackPolicy {\n readonly candidates: readonly ModelCandidate[];\n readonly registry: ModelHealthRegistry;\n lastDecision: FallbackDecision | null = null;\n\n constructor(candidates: readonly ModelCandidate[], registry: ModelHealthRegistry) {\n this.candidates = candidates;\n this.registry = registry;\n }\n\n /** Pick the next candidate to try. Returns null if all exhausted. */\n selectModel(sessionTokens?: number): ModelCandidate | null {\n const skipped: string[] = [];\n for (const c of this.candidates) {\n if (this.registry.shouldSkip(c.model, c.endpoint)) {\n const level = this.registry.getBucketLevel(c.model, c.endpoint);\n skipped.push(`${c.model}: bucket ${level}%`);\n continue;\n }\n if (sessionTokens && sessionTokens > 0 && c.maxContext > 0 && sessionTokens > c.maxContext * 0.95) {\n skipped.push(`${c.model}: context too large`);\n continue;\n }\n this.lastDecision = { chosen: c, skipped };\n return c;\n }\n this.lastDecision = null;\n return null;\n }\n\n /** Get surviving candidates (not skipped by health). For compaction fallback. */\n survivingCandidates(): ModelCandidate[] {\n return this.candidates.filter(c => !this.registry.shouldSkip(c.model, c.endpoint));\n }\n\n recordSuccess(candidate: ModelCandidate): void {\n this.registry.recordSuccess(candidate.model, candidate.endpoint);\n }\n\n recordError(candidate: ModelCandidate, kind: ErrorKind, retryAfterMs?: number): void {\n this.registry.recordError(candidate.model, candidate.endpoint, kind, retryAfterMs);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAmBO,IAAM,iBAAN,MAAqB;AAAA,EACjB;AAAA,EACA;AAAA,EACT,eAAwC;AAAA,EAExC,YAAY,YAAuC,UAA+B;AAChF,SAAK,aAAa;AAClB,SAAK,WAAW;AAAA,EAClB;AAAA;AAAA,EAGA,YAAY,eAA+C;AACzD,UAAM,UAAoB,CAAC;AAC3B,eAAW,KAAK,KAAK,YAAY;AAC/B,UAAI,KAAK,SAAS,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG;AACjD,cAAM,QAAQ,KAAK,SAAS,eAAe,EAAE,OAAO,EAAE,QAAQ;AAC9D,gBAAQ,KAAK,GAAG,EAAE,KAAK,YAAY,KAAK,GAAG;AAC3C;AAAA,MACF;AACA,UAAI,iBAAiB,gBAAgB,KAAK,EAAE,aAAa,KAAK,gBAAgB,EAAE,aAAa,MAAM;AACjG,gBAAQ,KAAK,GAAG,EAAE,KAAK,qBAAqB;AAC5C;AAAA,MACF;AACA,WAAK,eAAe,EAAE,QAAQ,GAAG,QAAQ;AACzC,aAAO;AAAA,IACT;AACA,SAAK,eAAe;AACpB,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,sBAAwC;AACtC,WAAO,KAAK,WAAW,OAAO,OAAK,CAAC,KAAK,SAAS,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC;AAAA,EACnF;AAAA,EAEA,cAAc,WAAiC;AAC7C,SAAK,SAAS,cAAc,UAAU,OAAO,UAAU,QAAQ;AAAA,EACjE;AAAA,EAEA,YAAY,WAA2B,MAAiB,cAA6B;AACnF,SAAK,SAAS,YAAY,UAAU,OAAO,UAAU,UAAU,MAAM,YAAY;AAAA,EACnF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import "./chunk-NWDBD4PA.js";
|
|
3
|
+
|
|
4
|
+
// src/cli/commands/health-check.ts
|
|
5
|
+
import { execFileSync } from "node:child_process";
|
|
6
|
+
import { join } from "node:path";
|
|
7
|
+
import { existsSync } from "node:fs";
|
|
8
|
+
import { homedir } from "node:os";
|
|
9
|
+
function checkOllama() {
|
|
10
|
+
try {
|
|
11
|
+
execFileSync("ollama", ["--version"], { timeout: 5e3, stdio: "pipe" });
|
|
12
|
+
return { ok: true, label: "Ollama" };
|
|
13
|
+
} catch {
|
|
14
|
+
return { ok: false, label: "Ollama (memory embeddings disabled)", hint: "Install: curl -fsSL https://ollama.com/install.sh | sh" };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function checkEmbeddingModel() {
|
|
18
|
+
try {
|
|
19
|
+
const out = execFileSync("ollama", ["list"], { timeout: 1e4, stdio: "pipe", encoding: "utf-8" });
|
|
20
|
+
if (out.includes("nomic-embed-text")) {
|
|
21
|
+
return { ok: true, label: "Embedding model (nomic-embed-text)" };
|
|
22
|
+
}
|
|
23
|
+
return { ok: false, label: "Embedding model missing", hint: "Run: ollama pull nomic-embed-text" };
|
|
24
|
+
} catch {
|
|
25
|
+
return { ok: false, label: "Embedding model (ollama not reachable)", hint: "Start ollama, then: ollama pull nomic-embed-text" };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function checkSqliteVec(home) {
|
|
29
|
+
const abmindLib = join(process.env["ABMIND_HOME"] ?? join(homedir(), ".abmind"), "lib", "node_modules", "sqlite-vec");
|
|
30
|
+
const bundleNm = join(home, "current", "node_modules", "sqlite-vec");
|
|
31
|
+
if (existsSync(abmindLib) || existsSync(bundleNm)) {
|
|
32
|
+
return { ok: true, label: "sqlite-vec (vector search)" };
|
|
33
|
+
}
|
|
34
|
+
return { ok: false, label: "sqlite-vec (falling back to brute-force search)", hint: "Run: abmind install or cd ~/.abmind/lib && npm install sqlite-vec" };
|
|
35
|
+
}
|
|
36
|
+
function printHealthSummary(home) {
|
|
37
|
+
const items = [
|
|
38
|
+
{ ok: true, label: `Node.js ${process.versions.node}` },
|
|
39
|
+
checkOllama(),
|
|
40
|
+
checkEmbeddingModel(),
|
|
41
|
+
checkSqliteVec(home)
|
|
42
|
+
];
|
|
43
|
+
process.stdout.write("\n\u2500\u2500 Dependency health \u2500\u2500\n");
|
|
44
|
+
for (const item of items) {
|
|
45
|
+
const icon = item.ok ? "\u2705" : "\u26A0\uFE0F ";
|
|
46
|
+
process.stdout.write(` ${icon} ${item.label}
|
|
47
|
+
`);
|
|
48
|
+
if (item.hint) process.stdout.write(` ${item.hint}
|
|
49
|
+
`);
|
|
50
|
+
}
|
|
51
|
+
process.stdout.write("\n");
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
printHealthSummary
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=health-check-SPA7NT6N.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/cli/commands/health-check.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Post-install/update health summary \u2014 detect missing external deps.\n */\n\nimport { execFileSync } from \"node:child_process\";\nimport { join } from \"node:path\";\nimport { existsSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\n\ninterface HealthItem {\n ok: boolean;\n label: string;\n hint?: string;\n}\n\nfunction checkOllama(): HealthItem {\n try {\n execFileSync(\"ollama\", [\"--version\"], { timeout: 5000, stdio: \"pipe\" });\n return { ok: true, label: \"Ollama\" };\n } catch {\n return { ok: false, label: \"Ollama (memory embeddings disabled)\", hint: \"Install: curl -fsSL https://ollama.com/install.sh | sh\" };\n }\n}\n\nfunction checkEmbeddingModel(): HealthItem {\n try {\n const out = execFileSync(\"ollama\", [\"list\"], { timeout: 10000, stdio: \"pipe\", encoding: \"utf-8\" });\n if (out.includes(\"nomic-embed-text\")) {\n return { ok: true, label: \"Embedding model (nomic-embed-text)\" };\n }\n return { ok: false, label: \"Embedding model missing\", hint: \"Run: ollama pull nomic-embed-text\" };\n } catch {\n return { ok: false, label: \"Embedding model (ollama not reachable)\", hint: \"Start ollama, then: ollama pull nomic-embed-text\" };\n }\n}\n\nfunction checkSqliteVec(home: string): HealthItem {\n const abmindLib = join(process.env[\"ABMIND_HOME\"] ?? join(homedir(), \".abmind\"), \"lib\", \"node_modules\", \"sqlite-vec\");\n const bundleNm = join(home, \"current\", \"node_modules\", \"sqlite-vec\");\n if (existsSync(abmindLib) || existsSync(bundleNm)) {\n return { ok: true, label: \"sqlite-vec (vector search)\" };\n }\n return { ok: false, label: \"sqlite-vec (falling back to brute-force search)\", hint: \"Run: abmind install or cd ~/.abmind/lib && npm install sqlite-vec\" };\n}\n\nexport function printHealthSummary(home: string): void {\n const items: HealthItem[] = [\n { ok: true, label: `Node.js ${process.versions.node}` },\n checkOllama(),\n checkEmbeddingModel(),\n checkSqliteVec(home),\n ];\n\n process.stdout.write(\"\\n\u2500\u2500 Dependency health \u2500\u2500\\n\");\n for (const item of items) {\n const icon = item.ok ? \"\u2705\" : \"\u26A0\uFE0F \";\n process.stdout.write(` ${icon} ${item.label}\\n`);\n if (item.hint) process.stdout.write(` ${item.hint}\\n`);\n }\n process.stdout.write(\"\\n\");\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAIA,SAAS,oBAAoB;AAC7B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAQxB,SAAS,cAA0B;AACjC,MAAI;AACF,iBAAa,UAAU,CAAC,WAAW,GAAG,EAAE,SAAS,KAAM,OAAO,OAAO,CAAC;AACtE,WAAO,EAAE,IAAI,MAAM,OAAO,SAAS;AAAA,EACrC,QAAQ;AACN,WAAO,EAAE,IAAI,OAAO,OAAO,uCAAuC,MAAM,yDAAyD;AAAA,EACnI;AACF;AAEA,SAAS,sBAAkC;AACzC,MAAI;AACF,UAAM,MAAM,aAAa,UAAU,CAAC,MAAM,GAAG,EAAE,SAAS,KAAO,OAAO,QAAQ,UAAU,QAAQ,CAAC;AACjG,QAAI,IAAI,SAAS,kBAAkB,GAAG;AACpC,aAAO,EAAE,IAAI,MAAM,OAAO,qCAAqC;AAAA,IACjE;AACA,WAAO,EAAE,IAAI,OAAO,OAAO,2BAA2B,MAAM,oCAAoC;AAAA,EAClG,QAAQ;AACN,WAAO,EAAE,IAAI,OAAO,OAAO,0CAA0C,MAAM,mDAAmD;AAAA,EAChI;AACF;AAEA,SAAS,eAAe,MAA0B;AAChD,QAAM,YAAY,KAAK,QAAQ,IAAI,aAAa,KAAK,KAAK,QAAQ,GAAG,SAAS,GAAG,OAAO,gBAAgB,YAAY;AACpH,QAAM,WAAW,KAAK,MAAM,WAAW,gBAAgB,YAAY;AACnE,MAAI,WAAW,SAAS,KAAK,WAAW,QAAQ,GAAG;AACjD,WAAO,EAAE,IAAI,MAAM,OAAO,6BAA6B;AAAA,EACzD;AACA,SAAO,EAAE,IAAI,OAAO,OAAO,mDAAmD,MAAM,oEAAoE;AAC1J;AAEO,SAAS,mBAAmB,MAAoB;AACrD,QAAM,QAAsB;AAAA,IAC1B,EAAE,IAAI,MAAM,OAAO,WAAW,QAAQ,SAAS,IAAI,GAAG;AAAA,IACtD,YAAY;AAAA,IACZ,oBAAoB;AAAA,IACpB,eAAe,IAAI;AAAA,EACrB;AAEA,UAAQ,OAAO,MAAM,iDAA6B;AAClD,aAAW,QAAQ,OAAO;AACxB,UAAM,OAAO,KAAK,KAAK,WAAM;AAC7B,YAAQ,OAAO,MAAM,KAAK,IAAI,IAAI,KAAK,KAAK;AAAA,CAAI;AAChD,QAAI,KAAK,KAAM,SAAQ,OAAO,MAAM,QAAQ,KAAK,IAAI;AAAA,CAAI;AAAA,EAC3D;AACA,UAAQ,OAAO,MAAM,IAAI;AAC3B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import {
|
|
3
|
+
fire,
|
|
4
|
+
getHookSummary,
|
|
5
|
+
hasHooks,
|
|
6
|
+
loadHookConfig
|
|
7
|
+
} from "./chunk-GRNENTPA.js";
|
|
8
|
+
import "./chunk-BUUVFUPO.js";
|
|
9
|
+
import "./chunk-X76UX47U.js";
|
|
10
|
+
import "./chunk-NWDBD4PA.js";
|
|
11
|
+
export {
|
|
12
|
+
fire,
|
|
13
|
+
getHookSummary,
|
|
14
|
+
hasHooks,
|
|
15
|
+
loadHookConfig
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=hook-system-6Q5YTR53.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import {
|
|
3
|
+
register
|
|
4
|
+
} from "./chunk-GUQVJC3U.js";
|
|
5
|
+
import "./chunk-FMWKEPM7.js";
|
|
6
|
+
import "./chunk-BUUVFUPO.js";
|
|
7
|
+
import "./chunk-X76UX47U.js";
|
|
8
|
+
import "./chunk-NWDBD4PA.js";
|
|
9
|
+
export {
|
|
10
|
+
register
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=hotskills-K7BM4YLB.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import {
|
|
3
|
+
install,
|
|
4
|
+
writeWrapper
|
|
5
|
+
} from "./chunk-XREWVCUO.js";
|
|
6
|
+
import "./chunk-265TPOPC.js";
|
|
7
|
+
import "./chunk-FMWKEPM7.js";
|
|
8
|
+
import "./chunk-BUUVFUPO.js";
|
|
9
|
+
import "./chunk-X76UX47U.js";
|
|
10
|
+
import "./chunk-NWDBD4PA.js";
|
|
11
|
+
export {
|
|
12
|
+
install,
|
|
13
|
+
writeWrapper
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=install-6HRZVKUM.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import "./chunk-NWDBD4PA.js";
|
|
3
|
+
|
|
4
|
+
// src/cli/install-log.ts
|
|
5
|
+
import { appendFileSync, mkdirSync } from "node:fs";
|
|
6
|
+
import { join } from "node:path";
|
|
7
|
+
var logPath = null;
|
|
8
|
+
function initInstallLog(abtarsHome) {
|
|
9
|
+
const logsDir = join(abtarsHome, "logs");
|
|
10
|
+
mkdirSync(logsDir, { recursive: true });
|
|
11
|
+
logPath = join(logsDir, "install.log");
|
|
12
|
+
}
|
|
13
|
+
function logInstall(line) {
|
|
14
|
+
if (!logPath) return;
|
|
15
|
+
appendFileSync(logPath, line + "\n");
|
|
16
|
+
}
|
|
17
|
+
function logInstallHeader(command) {
|
|
18
|
+
if (!logPath) return;
|
|
19
|
+
appendFileSync(logPath, `
|
|
20
|
+
=== abtars ${command} ${(/* @__PURE__ */ new Date()).toISOString().slice(0, 16)} ===
|
|
21
|
+
`);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
initInstallLog,
|
|
25
|
+
logInstall,
|
|
26
|
+
logInstallHeader
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=install-log-IAPHYKD4.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/cli/install-log.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * install-log.ts \u2014 Append-only install/onboard log at ~/.abtars/logs/install.log\n */\n\nimport { appendFileSync, mkdirSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nlet logPath: string | null = null;\n\nexport function initInstallLog(abtarsHome: string): void {\n const logsDir = join(abtarsHome, \"logs\");\n mkdirSync(logsDir, { recursive: true });\n logPath = join(logsDir, \"install.log\");\n}\n\nexport function logInstall(line: string): void {\n if (!logPath) return;\n appendFileSync(logPath, line + \"\\n\");\n}\n\nexport function logInstallHeader(command: string): void {\n if (!logPath) return;\n appendFileSync(logPath, `\\n=== abtars ${command} ${new Date().toISOString().slice(0, 16)} ===\\n`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAIA,SAAS,gBAAgB,iBAAiB;AAC1C,SAAS,YAAY;AAErB,IAAI,UAAyB;AAEtB,SAAS,eAAe,YAA0B;AACvD,QAAM,UAAU,KAAK,YAAY,MAAM;AACvC,YAAU,SAAS,EAAE,WAAW,KAAK,CAAC;AACtC,YAAU,KAAK,SAAS,aAAa;AACvC;AAEO,SAAS,WAAW,MAAoB;AAC7C,MAAI,CAAC,QAAS;AACd,iBAAe,SAAS,OAAO,IAAI;AACrC;AAEO,SAAS,iBAAiB,SAAuB;AACtD,MAAI,CAAC,QAAS;AACd,iBAAe,SAAS;AAAA,aAAgB,OAAO,KAAI,oBAAI,KAAK,GAAE,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC;AAAA,CAAQ;AAClG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import {
|
|
3
|
+
init_logger,
|
|
4
|
+
logWarn
|
|
5
|
+
} from "./chunk-BUUVFUPO.js";
|
|
6
|
+
import "./chunk-X76UX47U.js";
|
|
7
|
+
import "./chunk-NWDBD4PA.js";
|
|
8
|
+
|
|
9
|
+
// src/cli/install-manifest.ts
|
|
10
|
+
init_logger();
|
|
11
|
+
import { readFileSync, existsSync, mkdirSync, copyFileSync, chmodSync, statSync } from "node:fs";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
var TAG = "manifest";
|
|
14
|
+
var SUPPORTED_VERSION = 2;
|
|
15
|
+
var cached = null;
|
|
16
|
+
function loadManifest(repoRoot) {
|
|
17
|
+
if (cached) return cached;
|
|
18
|
+
const root = repoRoot ?? process.cwd();
|
|
19
|
+
const p = join(root, "install-manifest.json");
|
|
20
|
+
let raw;
|
|
21
|
+
try {
|
|
22
|
+
raw = JSON.parse(readFileSync(p, "utf-8"));
|
|
23
|
+
} catch (err) {
|
|
24
|
+
throw new Error(`Invalid JSON in install-manifest.json: ${err instanceof Error ? err.message : String(err)}`);
|
|
25
|
+
}
|
|
26
|
+
if (raw.manifestVersion > SUPPORTED_VERSION) {
|
|
27
|
+
logWarn(TAG, `manifest version ${raw.manifestVersion} > supported ${SUPPORTED_VERSION} \u2014 some features may not be applied`);
|
|
28
|
+
}
|
|
29
|
+
cached = raw;
|
|
30
|
+
return raw;
|
|
31
|
+
}
|
|
32
|
+
function _resetManifestCache() {
|
|
33
|
+
cached = null;
|
|
34
|
+
}
|
|
35
|
+
function isLazyRootAllowed(manifest, relPath) {
|
|
36
|
+
return manifest.lazyRoots.some((root) => relPath === root || relPath.startsWith(root + "/"));
|
|
37
|
+
}
|
|
38
|
+
function reconcileManifest(manifest, home, repoRoot, fix) {
|
|
39
|
+
const ok = [];
|
|
40
|
+
const fixed = [];
|
|
41
|
+
const warnings = [];
|
|
42
|
+
for (const dir of manifest.directories) {
|
|
43
|
+
const abs = join(home, dir.path);
|
|
44
|
+
if (existsSync(abs)) {
|
|
45
|
+
if (dir.mode) {
|
|
46
|
+
const actual = (statSync(abs).mode & 511).toString(8);
|
|
47
|
+
const expected = dir.mode.replace(/^0/, "");
|
|
48
|
+
if (actual !== expected) {
|
|
49
|
+
if (fix) {
|
|
50
|
+
chmodSync(abs, parseInt(dir.mode, 8));
|
|
51
|
+
fixed.push(`${dir.path}/ permissions ${actual} \u2192 ${expected}`);
|
|
52
|
+
} else {
|
|
53
|
+
warnings.push(`${dir.path}/ permissions ${actual}, expected ${expected}`);
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
ok.push(`${dir.path}/`);
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
ok.push(`${dir.path}/`);
|
|
60
|
+
}
|
|
61
|
+
} else if (fix) {
|
|
62
|
+
mkdirSync(abs, { recursive: true, mode: dir.mode ? parseInt(dir.mode, 8) : void 0 });
|
|
63
|
+
fixed.push(`created ${dir.path}/`);
|
|
64
|
+
} else {
|
|
65
|
+
warnings.push(`${dir.path}/ MISSING`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
for (const seed of manifest.configSeeds) {
|
|
69
|
+
const dest = join(home, seed.dest);
|
|
70
|
+
if (existsSync(dest)) {
|
|
71
|
+
ok.push(seed.dest);
|
|
72
|
+
} else {
|
|
73
|
+
const src = join(repoRoot, seed.source);
|
|
74
|
+
if (fix && existsSync(src)) {
|
|
75
|
+
mkdirSync(join(home, seed.dest, ".."), { recursive: true });
|
|
76
|
+
copyFileSync(src, dest);
|
|
77
|
+
if (seed.mode) chmodSync(dest, parseInt(seed.mode, 8));
|
|
78
|
+
fixed.push(`seeded ${seed.dest} from ${seed.source}`);
|
|
79
|
+
} else if (!existsSync(src)) {
|
|
80
|
+
warnings.push(`${seed.dest} MISSING (source ${seed.source} not found)`);
|
|
81
|
+
} else {
|
|
82
|
+
warnings.push(`${seed.dest} MISSING (seed from ${seed.source})`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
for (const req of manifest.requiredConfigs) {
|
|
87
|
+
const abs = join(home, req.path);
|
|
88
|
+
if (existsSync(abs)) {
|
|
89
|
+
ok.push(req.path);
|
|
90
|
+
} else {
|
|
91
|
+
warnings.push(`${req.path} MISSING \u2014 ${req.remediation}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return { ok, fixed, warnings };
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
_resetManifestCache,
|
|
98
|
+
isLazyRootAllowed,
|
|
99
|
+
loadManifest,
|
|
100
|
+
reconcileManifest
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=install-manifest-SPQRUNXL.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/cli/install-manifest.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * install-manifest.ts \u2014 Load and validate install-manifest.json.\n * Single source of truth for install-time requirements.\n */\n\nimport { readFileSync, existsSync, mkdirSync, copyFileSync, chmodSync, statSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { logWarn } from \"../components/logger.js\";\n\nconst TAG = \"manifest\";\nconst SUPPORTED_VERSION = 2;\n\n// \u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface ManifestDirectory {\n path: string;\n mode?: string;\n}\n\nexport interface ManifestConfigSeed {\n source: string;\n dest: string;\n mode?: string;\n}\n\nexport interface ManifestRequiredConfig {\n path: string;\n remediation: string;\n}\n\nexport interface ManifestScripts {\n include: string[];\n executable: string;\n}\n\nexport interface ManifestServices {\n supervised: {\n macos?: { plist: string; placeholders: string[] };\n linux?: { units: string[] };\n };\n}\n\n\nexport interface InstallManifest {\n manifestVersion: number;\n directories: ManifestDirectory[];\n lazyRoots: string[];\n configSeeds: ManifestConfigSeed[];\n requiredConfigs: ManifestRequiredConfig[];\n scripts: ManifestScripts;\n services: ManifestServices;\n cliWrappers: string[];\n}\n\n// \u2500\u2500 Loader \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nlet cached: InstallManifest | null = null;\n\nexport function loadManifest(repoRoot?: string): InstallManifest {\n if (cached) return cached;\n const root = repoRoot ?? process.cwd();\n const p = join(root, \"install-manifest.json\");\n let raw: InstallManifest;\n try { raw = JSON.parse(readFileSync(p, \"utf-8\")) as InstallManifest; }\n catch (err) { throw new Error(`Invalid JSON in install-manifest.json: ${err instanceof Error ? err.message : String(err)}`); }\n if (raw.manifestVersion > SUPPORTED_VERSION) {\n logWarn(TAG, `manifest version ${raw.manifestVersion} > supported ${SUPPORTED_VERSION} \u2014 some features may not be applied`);\n }\n cached = raw;\n return raw;\n}\n\n/** Clear cache (for tests). */\nexport function _resetManifestCache(): void { cached = null; }\n\n/** Check if a path is under a declared lazyRoot. */\nexport function isLazyRootAllowed(manifest: InstallManifest, relPath: string): boolean {\n return manifest.lazyRoots.some(root => relPath === root || relPath.startsWith(root + \"/\"));\n}\n\n// \u2500\u2500 Reconciliation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface ReconcileResult {\n ok: string[];\n fixed: string[];\n warnings: string[];\n}\n\n/**\n * Reconcile install state against manifest. If fix=true, creates missing dirs\n * and seeds missing configs. Returns a report.\n */\nexport function reconcileManifest(\n manifest: InstallManifest,\n home: string,\n repoRoot: string,\n fix: boolean,\n): ReconcileResult {\n const ok: string[] = [];\n const fixed: string[] = [];\n const warnings: string[] = [];\n\n // Eager directories\n for (const dir of manifest.directories) {\n const abs = join(home, dir.path);\n if (existsSync(abs)) {\n if (dir.mode) {\n const actual = (statSync(abs).mode & 0o777).toString(8);\n const expected = dir.mode.replace(/^0/, \"\");\n if (actual !== expected) {\n if (fix) {\n chmodSync(abs, parseInt(dir.mode, 8));\n fixed.push(`${dir.path}/ permissions ${actual} \u2192 ${expected}`);\n } else {\n warnings.push(`${dir.path}/ permissions ${actual}, expected ${expected}`);\n }\n } else {\n ok.push(`${dir.path}/`);\n }\n } else {\n ok.push(`${dir.path}/`);\n }\n } else if (fix) {\n mkdirSync(abs, { recursive: true, mode: dir.mode ? parseInt(dir.mode, 8) : undefined });\n fixed.push(`created ${dir.path}/`);\n } else {\n warnings.push(`${dir.path}/ MISSING`);\n }\n }\n\n // Config seeds\n for (const seed of manifest.configSeeds) {\n const dest = join(home, seed.dest);\n if (existsSync(dest)) {\n ok.push(seed.dest);\n } else {\n const src = join(repoRoot, seed.source);\n if (fix && existsSync(src)) {\n mkdirSync(join(home, seed.dest, \"..\"), { recursive: true });\n copyFileSync(src, dest);\n if (seed.mode) chmodSync(dest, parseInt(seed.mode, 8));\n fixed.push(`seeded ${seed.dest} from ${seed.source}`);\n } else if (!existsSync(src)) {\n warnings.push(`${seed.dest} MISSING (source ${seed.source} not found)`);\n } else {\n warnings.push(`${seed.dest} MISSING (seed from ${seed.source})`);\n }\n }\n }\n\n // Required configs (report only, never auto-fix)\n for (const req of manifest.requiredConfigs) {\n const abs = join(home, req.path);\n if (existsSync(abs)) {\n ok.push(req.path);\n } else {\n warnings.push(`${req.path} MISSING \u2014 ${req.remediation}`);\n }\n }\n\n return { ok, fixed, warnings };\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
2
|
+
import "./chunk-NWDBD4PA.js";
|
|
3
|
+
|
|
4
|
+
// src/cli/commands/install-validate.ts
|
|
5
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
6
|
+
import { join } from "node:path";
|
|
7
|
+
function validateMinimumViability(configDir) {
|
|
8
|
+
const errors = [];
|
|
9
|
+
const envPath = join(configDir, ".env");
|
|
10
|
+
if (!existsSync(envPath)) return { ok: true, errors: [] };
|
|
11
|
+
const envVars = /* @__PURE__ */ new Map();
|
|
12
|
+
const lines = readFileSync(envPath, "utf-8").split("\n");
|
|
13
|
+
for (const line of lines) {
|
|
14
|
+
const match = line.match(/^([A-Z_]+)=(.*)$/);
|
|
15
|
+
if (match) envVars.set(match[1], match[2].replace(/^["']|["']$/g, ""));
|
|
16
|
+
}
|
|
17
|
+
const mainChatId = envVars.get("MAIN_CHAT_ID");
|
|
18
|
+
const provider = envVars.get("MAIN_CHAT_PROVIDER") ?? "telegram";
|
|
19
|
+
const tgToken = envVars.get("TELEGRAM_BOT_TOKEN");
|
|
20
|
+
const dcToken = envVars.get("DISCORD_BOT_TOKEN");
|
|
21
|
+
if (!mainChatId) {
|
|
22
|
+
errors.push("MAIN_CHAT_ID not set (operator delivery address)");
|
|
23
|
+
}
|
|
24
|
+
if (provider === "telegram" && !tgToken) {
|
|
25
|
+
errors.push("TELEGRAM_BOT_TOKEN not set (required for MAIN_CHAT_PROVIDER=telegram)");
|
|
26
|
+
} else if (provider === "discord" && !dcToken) {
|
|
27
|
+
errors.push("DISCORD_BOT_TOKEN not set (required for MAIN_CHAT_PROVIDER=discord)");
|
|
28
|
+
}
|
|
29
|
+
if (!tgToken && !dcToken) {
|
|
30
|
+
errors.push("No platform token configured (need TELEGRAM_BOT_TOKEN or DISCORD_BOT_TOKEN)");
|
|
31
|
+
}
|
|
32
|
+
return { ok: errors.length === 0, errors };
|
|
33
|
+
}
|
|
34
|
+
function formatValidationError(result, invocation) {
|
|
35
|
+
const lines = [
|
|
36
|
+
"\u274C Install incomplete: no viable operator channel configured.",
|
|
37
|
+
"",
|
|
38
|
+
"Missing:",
|
|
39
|
+
...result.errors.map((e) => ` \u2022 ${e}`),
|
|
40
|
+
"",
|
|
41
|
+
"Configure ONE of:",
|
|
42
|
+
" 1. Telegram: TELEGRAM_BOT_TOKEN + MAIN_CHAT_ID",
|
|
43
|
+
" 2. Discord: DISCORD_BOT_TOKEN + MAIN_CHAT_ID + MAIN_CHAT_PROVIDER=discord",
|
|
44
|
+
"",
|
|
45
|
+
`Then re-run: ${invocation}`
|
|
46
|
+
];
|
|
47
|
+
return lines.join("\n");
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
formatValidationError,
|
|
51
|
+
validateMinimumViability
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=install-validate-PVLZXYLQ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/cli/commands/install-validate.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * install-validate.ts \u2014 Post-install healthcheck.\n * Validates minimum viability BEFORE first boot.\n * Runs ONCE at end of install, not on every boot.\n */\n\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nexport interface ValidationResult {\n ok: boolean;\n errors: string[];\n}\n\n/**\n * Validate that the installed config has at least one viable operator channel.\n * Returns errors if not \u2014 caller decides whether to exit or warn.\n */\nexport function validateMinimumViability(configDir: string): ValidationResult {\n const errors: string[] = [];\n\n // Read .env file \u2014 if no .env exists, skip validation (not configured yet, onboard will handle)\n const envPath = join(configDir, \".env\");\n if (!existsSync(envPath)) return { ok: true, errors: [] };\n\n const envVars = new Map<string, string>();\n const lines = readFileSync(envPath, \"utf-8\").split(\"\\n\");\n for (const line of lines) {\n const match = line.match(/^([A-Z_]+)=(.*)$/);\n if (match) envVars.set(match[1]!, match[2]!.replace(/^[\"']|[\"']$/g, \"\"));\n }\n\n const mainChatId = envVars.get(\"MAIN_CHAT_ID\");\n const provider = envVars.get(\"MAIN_CHAT_PROVIDER\") ?? \"telegram\";\n const tgToken = envVars.get(\"TELEGRAM_BOT_TOKEN\");\n const dcToken = envVars.get(\"DISCORD_BOT_TOKEN\");\n\n // Must have MAIN_CHAT_ID\n if (!mainChatId) {\n errors.push(\"MAIN_CHAT_ID not set (operator delivery address)\");\n }\n\n // Must have the matching platform token\n if (provider === \"telegram\" && !tgToken) {\n errors.push(\"TELEGRAM_BOT_TOKEN not set (required for MAIN_CHAT_PROVIDER=telegram)\");\n } else if (provider === \"discord\" && !dcToken) {\n errors.push(\"DISCORD_BOT_TOKEN not set (required for MAIN_CHAT_PROVIDER=discord)\");\n }\n\n // At least one platform token must exist\n if (!tgToken && !dcToken) {\n errors.push(\"No platform token configured (need TELEGRAM_BOT_TOKEN or DISCORD_BOT_TOKEN)\");\n }\n\n return { ok: errors.length === 0, errors };\n}\n\n/**\n * Format validation failure as a user-friendly error message.\n */\nexport function formatValidationError(result: ValidationResult, invocation: string): string {\n const lines = [\n \"\u274C Install incomplete: no viable operator channel configured.\",\n \"\",\n \"Missing:\",\n ...result.errors.map(e => ` \u2022 ${e}`),\n \"\",\n \"Configure ONE of:\",\n \" 1. Telegram: TELEGRAM_BOT_TOKEN + MAIN_CHAT_ID\",\n \" 2. Discord: DISCORD_BOT_TOKEN + MAIN_CHAT_ID + MAIN_CHAT_PROVIDER=discord\",\n \"\",\n `Then re-run: ${invocation}`,\n ];\n return lines.join(\"\\n\");\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAMA,SAAS,YAAY,oBAAoB;AACzC,SAAS,YAAY;AAWd,SAAS,yBAAyB,WAAqC;AAC5E,QAAM,SAAmB,CAAC;AAG1B,QAAM,UAAU,KAAK,WAAW,MAAM;AACtC,MAAI,CAAC,WAAW,OAAO,EAAG,QAAO,EAAE,IAAI,MAAM,QAAQ,CAAC,EAAE;AAExD,QAAM,UAAU,oBAAI,IAAoB;AACxC,QAAM,QAAQ,aAAa,SAAS,OAAO,EAAE,MAAM,IAAI;AACvD,aAAW,QAAQ,OAAO;AACxB,UAAM,QAAQ,KAAK,MAAM,kBAAkB;AAC3C,QAAI,MAAO,SAAQ,IAAI,MAAM,CAAC,GAAI,MAAM,CAAC,EAAG,QAAQ,gBAAgB,EAAE,CAAC;AAAA,EACzE;AAEA,QAAM,aAAa,QAAQ,IAAI,cAAc;AAC7C,QAAM,WAAW,QAAQ,IAAI,oBAAoB,KAAK;AACtD,QAAM,UAAU,QAAQ,IAAI,oBAAoB;AAChD,QAAM,UAAU,QAAQ,IAAI,mBAAmB;AAG/C,MAAI,CAAC,YAAY;AACf,WAAO,KAAK,kDAAkD;AAAA,EAChE;AAGA,MAAI,aAAa,cAAc,CAAC,SAAS;AACvC,WAAO,KAAK,uEAAuE;AAAA,EACrF,WAAW,aAAa,aAAa,CAAC,SAAS;AAC7C,WAAO,KAAK,qEAAqE;AAAA,EACnF;AAGA,MAAI,CAAC,WAAW,CAAC,SAAS;AACxB,WAAO,KAAK,6EAA6E;AAAA,EAC3F;AAEA,SAAO,EAAE,IAAI,OAAO,WAAW,GAAG,OAAO;AAC3C;AAKO,SAAS,sBAAsB,QAA0B,YAA4B;AAC1F,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG,OAAO,OAAO,IAAI,OAAK,YAAO,CAAC,EAAE;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,UAAU;AAAA,EAC5B;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|