@askexenow/exe-os 0.9.166 → 0.9.167
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/deploy/compose/backup.sh +45 -7
- package/deploy/compose/setup.sh +7 -0
- package/deploy/stack-manifests/v0.9.json +40 -1
- package/dist/{active-agent-R2KMWMR6.js → active-agent-DGTIJN2U.js} +2 -2
- package/dist/{active-agent-CYMM3QQA.js → active-agent-HVMLG6FH.js} +2 -2
- package/dist/{agentic-ontology-GKAKYNPE.js → agentic-ontology-S54AFODT.js} +1 -1
- package/dist/{backfill-metadata-Z5SYUWAV.js → backfill-metadata-74IWETRF.js} +4 -3
- package/dist/{behaviors-QGU6XI5R.js → behaviors-LZVAVHTC.js} +2 -2
- package/dist/bin/agentic-ontology-backfill.js +5 -4
- package/dist/bin/agentic-reflection-backfill.js +6 -5
- package/dist/bin/agentic-semantic-label.js +5 -4
- package/dist/bin/backfill-conversations.js +5 -4
- package/dist/bin/backfill-responses.js +5 -4
- package/dist/bin/backfill-vectors.js +6 -5
- package/dist/bin/bulk-sync-postgres.js +6 -5
- package/dist/bin/cleanup-stale-review-tasks.js +9 -9
- package/dist/bin/cli.js +16 -13
- package/dist/bin/daily-summary.js +0 -217
- package/dist/bin/deferred-daemon-restart.js +8 -0
- package/dist/bin/exe-agent-config.js +1 -1
- package/dist/bin/exe-agent.js +10 -10
- package/dist/bin/exe-assign.js +7 -6
- package/dist/bin/exe-boot.js +20 -19
- package/dist/bin/exe-call.js +4 -4
- package/dist/bin/exe-cloud.js +3 -3
- package/dist/bin/exe-dispatch.js +9 -9
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +7 -6
- package/dist/bin/exe-forget.js +6 -5
- package/dist/bin/exe-gateway.js +5 -5
- package/dist/bin/exe-heartbeat.js +9 -9
- package/dist/bin/exe-kill.js +13 -12
- package/dist/bin/exe-launch-agent.js +11 -10
- package/dist/bin/exe-new-employee.js +6 -6
- package/dist/bin/exe-pending-messages.js +10 -10
- package/dist/bin/exe-pending-notifications.js +9 -9
- package/dist/bin/exe-pending-reviews.js +9 -9
- package/dist/bin/exe-rename.js +4 -4
- package/dist/bin/exe-review.js +12 -11
- package/dist/bin/exe-search.js +5 -4
- package/dist/bin/exe-session-cleanup.js +19 -14
- package/dist/bin/exe-settings.js +3 -3
- package/dist/bin/exe-start-codex.js +11 -10
- package/dist/bin/exe-start-opencode.js +8 -7
- package/dist/bin/exe-status.js +10 -10
- package/dist/bin/exe-team.js +2 -2
- package/dist/bin/git-sweep.js +9 -9
- package/dist/bin/graph-backfill.js +4 -3
- package/dist/bin/graph-export.js +5 -4
- package/dist/bin/import-history.js +171 -0
- package/dist/bin/install-launchd.js +41 -0
- package/dist/bin/install.js +50 -74
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/scan-tasks.js +22 -12
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +4 -3
- package/dist/bin/stack-update.js +61 -857
- package/dist/bin/vps-backup.js +170 -0
- package/dist/bin/vps-health-gate.js +232 -0
- package/dist/{capacity-monitor-ZEAE4WP2.js → capacity-monitor-JBZB2S4P.js} +10 -10
- package/dist/{catchup-brief-OGWCHENC.js → catchup-brief-HE2EMZS5.js} +12 -11
- package/dist/{chunk-DJJNB47C.js → chunk-27DO3EZO.js} +1 -1
- package/dist/{chunk-45FYZIHI.js → chunk-32YUET3Y.js} +2 -2
- package/dist/{chunk-Y75ECPO5.js → chunk-3FW5LUGI.js} +2 -2
- package/dist/{chunk-4OZGQZ4U.js → chunk-3M3O56VT.js} +636 -179
- package/dist/{chunk-77WQOD6J.js → chunk-4CXUZ4NI.js} +2 -2
- package/dist/{chunk-PBXWPHEK.js → chunk-4VEHJZ6R.js} +1 -1
- package/dist/{chunk-TH22QIEC.js → chunk-6A4COFDG.js} +1 -1
- package/dist/{chunk-ACBTCC2L.js → chunk-7OJH2A6I.js} +1 -1
- package/dist/{chunk-NHCOTCI6.js → chunk-A7SGEBXJ.js} +2 -2
- package/dist/{chunk-5MPQSNZF.js → chunk-AUTCT6AY.js} +1 -1
- package/dist/{chunk-OEKSTOTE.js → chunk-AZAZ2C75.js} +1 -1
- package/dist/chunk-CHCA3ZM2.js +167 -0
- package/dist/{chunk-X347L57O.js → chunk-CSTJQDOE.js} +4 -3
- package/dist/{chunk-B234R3VW.js → chunk-D7WLV6WD.js} +2 -2
- package/dist/{chunk-GMXF3AHJ.js → chunk-DGAONW36.js} +1 -1
- package/dist/chunk-EAT5YL3W.js +229 -0
- package/dist/{chunk-OD4H5YCJ.js → chunk-EKTQE2R5.js} +8 -8
- package/dist/{chunk-Z44PC42G.js → chunk-ELUBA7XL.js} +2 -2
- package/dist/{chunk-ZWS6XQER.js → chunk-F5AKOE4P.js} +7 -7
- package/dist/{chunk-T5YULDDO.js → chunk-FVI4UBKO.js} +27 -4
- package/dist/{chunk-ESRI7MFI.js → chunk-GAN7PW6G.js} +28 -24
- package/dist/{chunk-K4OWYJSP.js → chunk-GM2WZTG3.js} +2 -2
- package/dist/{chunk-TAB5QGIK.js → chunk-GZYQTPTF.js} +3 -3
- package/dist/{chunk-CXDU5DE3.js → chunk-IAUNGATJ.js} +1 -1
- package/dist/{chunk-YS63NS6M.js → chunk-IHSM5GR4.js} +1 -1
- package/dist/{chunk-23PTS2ZD.js → chunk-IP7KJAUW.js} +117 -15
- package/dist/{chunk-D6IMJAV2.js → chunk-J64P2LB2.js} +2 -2
- package/dist/{chunk-CXAVSQZM.js → chunk-JXMSCKRM.js} +1 -1
- package/dist/{chunk-RQMK3IQH.js → chunk-K4OTJP6N.js} +14 -7
- package/dist/{chunk-L7ROZR2H.js → chunk-KXAUMIOX.js} +1 -1
- package/dist/{chunk-TPC3LAP7.js → chunk-LGY2BIOT.js} +13 -0
- package/dist/{chunk-RPIDSBK7.js → chunk-LLHRJEE4.js} +3 -3
- package/dist/{chunk-6WG2VIKC.js → chunk-LM7H6XU4.js} +1 -1
- package/dist/{chunk-Y6GMKZZ2.js → chunk-LOFFGJSY.js} +150 -23
- package/dist/{chunk-W7SDGBEC.js → chunk-MFI5OXYW.js} +52 -84
- package/dist/{chunk-KNPEVPYG.js → chunk-MSSQWF6X.js} +2 -2
- package/dist/{chunk-QIQAO3VG.js → chunk-NEFFFKMD.js} +3 -3
- package/dist/{chunk-YUC552KZ.js → chunk-NEHONJJC.js} +3 -3
- package/dist/{chunk-KZ7SXZ2V.js → chunk-NFMQRLCD.js} +1 -1
- package/dist/{chunk-52HCNDPG.js → chunk-O4TATDOV.js} +1 -1
- package/dist/{chunk-AR3OYGLB.js → chunk-PEFBRL4S.js} +28 -6
- package/dist/{chunk-AEUXUEJG.js → chunk-PEXVU3HU.js} +5 -3
- package/dist/chunk-Q2G5C3HV.js +217 -0
- package/dist/{chunk-KOO56JVC.js → chunk-Q6N6LDEJ.js} +1 -1
- package/dist/{chunk-TXSJ2L5O.js → chunk-QI4IXJN7.js} +1 -1
- package/dist/{chunk-HLVQ5Y7B.js → chunk-RE4VLK45.js} +1 -1
- package/dist/{chunk-TF6SZGDT.js → chunk-SA2PH6WY.js} +1 -1
- package/dist/{chunk-5RSYY7BE.js → chunk-SJYOPYXH.js} +117 -9
- package/dist/{chunk-PJGHBANY.js → chunk-TTJE7CCU.js} +1 -1
- package/dist/{chunk-A7KEWR6S.js → chunk-TXWQPL2U.js} +1 -1
- package/dist/{chunk-XXSJ35J5.js → chunk-U5ZH52FB.js} +2 -2
- package/dist/{chunk-G4FDG3LK.js → chunk-UVNDLF74.js} +63 -40
- package/dist/{chunk-5OD3AFRW.js → chunk-V6RCZ25F.js} +1 -1
- package/dist/{chunk-LHMBIFKD.js → chunk-VYNNN2S3.js} +4 -4
- package/dist/chunk-WCYT54XP.js +934 -0
- package/dist/{chunk-5AMSQRHT.js → chunk-XGYSTVUH.js} +1 -1
- package/dist/{chunk-MKZBHM6A.js → chunk-XLWF3C4R.js} +4 -4
- package/dist/{chunk-YL36L2SN.js → chunk-Y7YHLV57.js} +1 -1
- package/dist/{chunk-HZC4MR4H.js → chunk-YBKB2PXY.js} +1 -1
- package/dist/{chunk-NWM3A4TK.js → chunk-ZDNLKXZA.js} +1 -1
- package/dist/{chunk-O7KW6QMH.js → chunk-ZW4TKQUM.js} +15 -5
- package/dist/{chunk-6BURHBE6.js → chunk-ZXB44R3E.js} +32 -11
- package/dist/co-occurrence-WCED475N.js +73 -0
- package/dist/{code-context-index-B6VIWPSF.js → code-context-index-LSZ3DKTJ.js} +2 -2
- package/dist/{crdt-sync-XA22KI3S.js → crdt-sync-PBXZTHZC.js} +1 -1
- package/dist/{crm-webhook-CIZNOEY4.js → crm-webhook-W7Q25VZU.js} +2 -2
- package/dist/{cto-delegation-gate-H5IULFRC.js → cto-delegation-gate-JKULOLMC.js} +8 -8
- package/dist/{daemon-orchestration-VO5XQIJL.js → daemon-orchestration-CHV6MB42.js} +13 -11
- package/dist/{exe-drift-DMT75WR3.js → exe-drift-PW36OULT.js} +2 -2
- package/dist/{exe-export-2RZWOSX6.js → exe-export-XQOD3KE6.js} +6 -5
- package/dist/{exe-import-NFNYATHL.js → exe-import-QOFP67LW.js} +6 -5
- package/dist/{exe-key-4D7CF3BU.js → exe-key-WQ34UZR6.js} +1 -1
- package/dist/{fast-db-init-LAEISZQ2.js → fast-db-init-UKETGWQI.js} +1 -1
- package/dist/gateway/index.js +6 -6
- package/dist/{git-staleness-M46AYLPP.js → git-staleness-ATV5CGAP.js} +1 -1
- package/dist/{git-task-sweep-PXOS56YT.js → git-task-sweep-KXZRIP4T.js} +9 -9
- package/dist/{global-procedures-KROQQX54.js → global-procedures-G6IKCYKM.js} +3 -3
- package/dist/{graph-auto-extract-QJ2BBJM2.js → graph-auto-extract-ZJXJOLE2.js} +1 -1
- package/dist/hooks/bug-report-worker.js +10 -10
- package/dist/hooks/codex-stop-task-finalizer.js +10 -10
- package/dist/hooks/commit-complete.js +11 -11
- package/dist/hooks/error-recall.js +8 -7
- package/dist/hooks/exe-heartbeat-hook.js +2 -2
- package/dist/hooks/ingest-worker.js +3 -3
- package/dist/hooks/ingest.js +9 -9
- package/dist/hooks/instructions-loaded.js +3 -3
- package/dist/hooks/notification.js +3 -3
- package/dist/hooks/post-compact.js +10 -10
- package/dist/hooks/post-tool-combined.js +5 -5
- package/dist/hooks/pre-compact.js +16 -16
- package/dist/hooks/pre-tool-use.js +14 -14
- package/dist/hooks/prompt-submit.js +30 -29
- package/dist/hooks/session-end.js +46 -25
- package/dist/hooks/session-start.js +48 -10
- package/dist/hooks/stop.js +17 -17
- package/dist/hooks/subagent-stop.js +10 -10
- package/dist/hooks/summary-worker.js +17 -16
- package/dist/index.js +17 -17
- package/dist/{installer-SDBLJBAB.js → installer-DE2LH5EC.js} +4 -4
- package/dist/{installer-ZA6QNQ4P.js → installer-M2MDS7HC.js} +4 -4
- package/dist/{installer-6KAY6LD6.js → installer-VE23YFXU.js} +4 -4
- package/dist/{intercom-queue-K3DVKSPJ.js → intercom-queue-RNM6EPGA.js} +1 -1
- package/dist/keyword-extractor-UJHFWVZE.js +11 -0
- package/dist/lib/cloud-sync.js +3 -3
- package/dist/lib/consolidation.js +5 -4
- package/dist/lib/database.js +1 -1
- package/dist/lib/db-daemon-client.js +1 -1
- package/dist/lib/db.js +1 -1
- package/dist/lib/embed-worker.js +98 -0
- package/dist/lib/embedder.js +2 -2
- package/dist/lib/employee-templates.js +4 -4
- package/dist/lib/employees.js +1 -1
- package/dist/lib/exe-daemon-client.js +1 -1
- package/dist/lib/exe-daemon.js +523 -500
- package/dist/lib/hybrid-search.js +5 -6
- package/dist/lib/identity.js +1 -1
- package/dist/lib/messaging.js +9 -9
- package/dist/lib/reminders.js +2 -2
- package/dist/lib/schedules.js +5 -4
- package/dist/lib/skill-learning.js +3 -3
- package/dist/lib/store.js +4 -3
- package/dist/lib/task-router.js +2 -2
- package/dist/lib/tasks.js +9 -9
- package/dist/lib/tmux-routing.js +8 -8
- package/dist/lib/tmux-transport.js +1 -1
- package/dist/lib/token-spend.js +2 -2
- package/dist/lib/transport.js +2 -2
- package/dist/lib/ws-client.js +3 -1
- package/dist/mcp/register-tools.js +54 -51
- package/dist/mcp/server.js +58 -55
- package/dist/mcp/tools/complete-reminder.js +3 -3
- package/dist/mcp/tools/create-reminder.js +3 -3
- package/dist/mcp/tools/create-task.js +11 -11
- package/dist/mcp/tools/deactivate-behavior.js +4 -4
- package/dist/mcp/tools/list-reminders.js +3 -3
- package/dist/mcp/tools/list-tasks.js +11 -11
- package/dist/mcp/tools/send-message.js +11 -11
- package/dist/mcp/tools/update-task.js +10 -10
- package/dist/{mcp-http-config-LK2EDOEJ.js → mcp-http-config-Z2E4VUOF.js} +2 -2
- package/dist/{memory-cards-V3DKSRWL.js → memory-cards-SFDKDIAW.js} +1 -1
- package/dist/memory-graph-extractor-YD4GNH7T.js +16 -0
- package/dist/{memory-poisoning-defense-3B75HS74.js → memory-poisoning-defense-VEGNFELN.js} +1 -1
- package/dist/{memory-queue-client-LFPZPPQA.js → memory-queue-client-5HB2XUH7.js} +2 -2
- package/dist/{memory-reflection-HTDAUUE5.js → memory-reflection-MTPRQNI6.js} +2 -2
- package/dist/{notifications-76VCYXWW.js → notifications-6TCE6OBG.js} +8 -8
- package/dist/{orchestrator-CBNSBI5P.js → orchestrator-W2GYJR23.js} +10 -10
- package/dist/{plan-limits-SOR3QXKV.js → plan-limits-4EP46323.js} +2 -2
- package/dist/{projection-worker-FK5YOEIL.js → projection-worker-EBUYNMU2.js} +1 -1
- package/dist/{review-polling-ZLNDUKL4.js → review-polling-2N7KQFZZ.js} +9 -9
- package/dist/runtime/index.js +15 -15
- package/dist/{session-events-CUSPL25D.js → session-events-K47FHAXJ.js} +9 -9
- package/dist/{session-kill-telemetry-FLBRHBDP.js → session-kill-telemetry-275YUXM5.js} +2 -2
- package/dist/{session-scope-PX2ABSJO.js → session-scope-XSFJZEER.js} +8 -8
- package/dist/{setup-wizard-Y6PBZGFX.js → setup-wizard-UEO7HYLQ.js} +1 -1
- package/dist/{skill-refinement-L7PGKCYO.js → skill-refinement-WXBTANDQ.js} +1 -1
- package/dist/stack-update-2B2UXREV.js +50 -0
- package/dist/{task-enforcement-7FUILB63.js → task-enforcement-2JIJSXPU.js} +14 -16
- package/dist/{task-scope-2N45TE32.js → task-scope-W73Z3XWE.js} +8 -8
- package/dist/{tasks-crud-ADLCGHGH.js → tasks-crud-HPJKI3QQ.js} +8 -8
- package/dist/{tasks-review-PJ2DUI6N.js → tasks-review-MXLMPGNZ.js} +8 -8
- package/dist/{token-budget-T5DFXVTM.js → token-budget-BA46CVHX.js} +1 -1
- package/dist/{tool-capability-index-6JJN6ZRC.js → tool-capability-index-42VVN5BS.js} +1 -1
- package/dist/{tool-telemetry-72PVO5HV.js → tool-telemetry-GZ5E2AUL.js} +1 -1
- package/dist/tui/App.js +22 -18
- package/dist/{tui-data-63JHE6EZ.js → tui-data-PVXWQCJX.js} +8 -8
- package/dist/{worker-gate-REVBJUZ6.js → worker-gate-WTTK64TK.js} +1 -1
- package/dist/{workflow-engine-W2WNHJG5.js → workflow-engine-LT3WTT7V.js} +2 -2
- package/package.json +1 -1
- package/release-notes.json +209 -209
- /package/dist/{chunk-BNOZUS6J.js → chunk-6VVCAVRT.js} +0 -0
- /package/dist/{chunk-IC7GKK6I.js → chunk-CWQZZ7X3.js} +0 -0
- /package/dist/{chunk-ZI2ZVERO.js → chunk-EIW5GOBW.js} +0 -0
- /package/dist/{chunk-2BGGDNRD.js → chunk-IPPJEM26.js} +0 -0
- /package/dist/{chunk-4ISDU5KR.js → chunk-K5UR73PM.js} +0 -0
- /package/dist/{chunk-ZWRTVUQ6.js → chunk-KIMO5S45.js} +0 -0
- /package/dist/{chunk-S2FX5KJ4.js → chunk-WBLILGAP.js} +0 -0
- /package/dist/{core-memory-PCJ3L46L.js → core-memory-RAC6M67J.js} +0 -0
- /package/dist/{entity-boost-GHFPE6A2.js → entity-boost-5FIRFRDC.js} +0 -0
- /package/dist/{message-queue-client-CHRQYBH5.js → message-queue-client-PTQ2S7D7.js} +0 -0
- /package/dist/{wiki-acl-QYRAYYVQ.js → wiki-acl-MSDRCIAI.js} +0 -0
package/dist/bin/graph-export.js
CHANGED
|
@@ -5,15 +5,16 @@ import {
|
|
|
5
5
|
} from "../chunk-46SQTBQW.js";
|
|
6
6
|
import {
|
|
7
7
|
fastDbInit
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-K5UR73PM.js";
|
|
9
9
|
import {
|
|
10
10
|
disposeStore
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-ZXB44R3E.js";
|
|
12
|
+
import "../chunk-CHCA3ZM2.js";
|
|
13
|
+
import "../chunk-WBLILGAP.js";
|
|
13
14
|
import "../chunk-MP2AFCGL.js";
|
|
14
15
|
import {
|
|
15
16
|
getClient
|
|
16
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-SJYOPYXH.js";
|
|
17
18
|
import "../chunk-RVSGXGWG.js";
|
|
18
19
|
import "../chunk-FXU7JOXK.js";
|
|
19
20
|
import "../chunk-6D23UNXU.js";
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import {
|
|
2
|
+
conversationsToMemories,
|
|
3
|
+
detectFormat,
|
|
4
|
+
parseChatGPT,
|
|
5
|
+
parseClaude,
|
|
6
|
+
parseGeneric
|
|
7
|
+
} from "../chunk-Q2G5C3HV.js";
|
|
8
|
+
import {
|
|
9
|
+
extractMemoryGraph
|
|
10
|
+
} from "../chunk-EAT5YL3W.js";
|
|
11
|
+
import {
|
|
12
|
+
flushBatch,
|
|
13
|
+
initStore,
|
|
14
|
+
writeMemory
|
|
15
|
+
} from "../chunk-ZXB44R3E.js";
|
|
16
|
+
import {
|
|
17
|
+
extractKeywords,
|
|
18
|
+
keywordsToString
|
|
19
|
+
} from "../chunk-CHCA3ZM2.js";
|
|
20
|
+
import "../chunk-WBLILGAP.js";
|
|
21
|
+
import "../chunk-MP2AFCGL.js";
|
|
22
|
+
import "../chunk-SJYOPYXH.js";
|
|
23
|
+
import "../chunk-RVSGXGWG.js";
|
|
24
|
+
import "../chunk-FXU7JOXK.js";
|
|
25
|
+
import "../chunk-6D23UNXU.js";
|
|
26
|
+
import "../chunk-4GXRETYL.js";
|
|
27
|
+
import "../chunk-LYH5HE24.js";
|
|
28
|
+
import "../chunk-MLKGABMK.js";
|
|
29
|
+
|
|
30
|
+
// src/bin/import-history.ts
|
|
31
|
+
import { readFile, readdir, stat } from "fs/promises";
|
|
32
|
+
import crypto from "crypto";
|
|
33
|
+
import path from "path";
|
|
34
|
+
async function runImportHistoryCli(args) {
|
|
35
|
+
if (args.includes("--help") || args.includes("-h") || args.length === 0) {
|
|
36
|
+
console.log(`
|
|
37
|
+
exe-os import-history \u2014 Import conversation history into memory
|
|
38
|
+
|
|
39
|
+
Usage:
|
|
40
|
+
exe-os import-history <path> [options]
|
|
41
|
+
|
|
42
|
+
Options:
|
|
43
|
+
--format <fmt> Format: chatgpt, claude, generic, markdown, auto (default: auto)
|
|
44
|
+
--project <name> Project name for memory scoping (default: import)
|
|
45
|
+
--dry-run Parse and report counts without storing
|
|
46
|
+
--force Override 50K memory safety cap
|
|
47
|
+
`);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const inputPath = args[0];
|
|
51
|
+
let format = "auto";
|
|
52
|
+
let projectName = "import";
|
|
53
|
+
let dryRun = false;
|
|
54
|
+
let force = false;
|
|
55
|
+
for (let i = 1; i < args.length; i++) {
|
|
56
|
+
if (args[i] === "--format" && args[i + 1]) {
|
|
57
|
+
format = args[++i];
|
|
58
|
+
} else if (args[i] === "--project" && args[i + 1]) {
|
|
59
|
+
projectName = args[++i];
|
|
60
|
+
} else if (args[i] === "--dry-run") {
|
|
61
|
+
dryRun = true;
|
|
62
|
+
} else if (args[i] === "--force") {
|
|
63
|
+
force = true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const resolvedPath = path.resolve(inputPath);
|
|
67
|
+
const stats = await stat(resolvedPath);
|
|
68
|
+
let files;
|
|
69
|
+
if (stats.isDirectory()) {
|
|
70
|
+
files = await collectFiles(resolvedPath);
|
|
71
|
+
} else {
|
|
72
|
+
files = [resolvedPath];
|
|
73
|
+
}
|
|
74
|
+
console.log(`[import] Scanning ${files.length} file(s) from ${resolvedPath}`);
|
|
75
|
+
const allConversations = [];
|
|
76
|
+
let detectedFormat = "generic";
|
|
77
|
+
for (const file of files) {
|
|
78
|
+
try {
|
|
79
|
+
const content = await readFile(file, "utf-8");
|
|
80
|
+
const fmt = format === "auto" ? detectFormat(content, file) : format;
|
|
81
|
+
detectedFormat = fmt;
|
|
82
|
+
let convos;
|
|
83
|
+
switch (fmt) {
|
|
84
|
+
case "chatgpt":
|
|
85
|
+
convos = parseChatGPT(content, file);
|
|
86
|
+
break;
|
|
87
|
+
case "claude":
|
|
88
|
+
convos = parseClaude(content, file);
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
convos = parseGeneric(content, file);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
allConversations.push(...convos);
|
|
95
|
+
} catch (err) {
|
|
96
|
+
console.warn(`[import] Skipping ${file}: ${err instanceof Error ? err.message : String(err)}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const memories = conversationsToMemories(allConversations, detectedFormat);
|
|
100
|
+
console.log(`[import] ${allConversations.length} conversations \u2192 ${memories.length} memories`);
|
|
101
|
+
if (memories.length > 5e4 && !force) {
|
|
102
|
+
console.error(`[import] Cap exceeded (${memories.length} > 50000). Use --force to override.`);
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
if (dryRun) {
|
|
106
|
+
console.log("[import] Dry run \u2014 no memories stored.");
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
await initStore();
|
|
110
|
+
const agentId = process.env.AGENT_ID ?? "import";
|
|
111
|
+
const agentRole = process.env.AGENT_ROLE ?? "importer";
|
|
112
|
+
let stored = 0;
|
|
113
|
+
for (let i = 0; i < memories.length; i++) {
|
|
114
|
+
const mem = memories[i];
|
|
115
|
+
const keywords = extractKeywords(mem.text);
|
|
116
|
+
const graphResult = extractMemoryGraph(mem.text, agentId, projectName, "import_conversations");
|
|
117
|
+
try {
|
|
118
|
+
await writeMemory({
|
|
119
|
+
id: crypto.randomUUID(),
|
|
120
|
+
agent_id: agentId,
|
|
121
|
+
agent_role: agentRole,
|
|
122
|
+
session_id: "cli-import",
|
|
123
|
+
timestamp: mem.metadata.original_timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
124
|
+
tool_name: "import_conversations",
|
|
125
|
+
project_name: projectName,
|
|
126
|
+
has_error: false,
|
|
127
|
+
raw_text: mem.text,
|
|
128
|
+
vector: null,
|
|
129
|
+
source_path: mem.metadata.source_path,
|
|
130
|
+
source_type: "conversation_import",
|
|
131
|
+
memory_type: "conversation",
|
|
132
|
+
tier: 3,
|
|
133
|
+
importance: 4,
|
|
134
|
+
intent: "import",
|
|
135
|
+
domain: "conversation",
|
|
136
|
+
keywords: keywordsToString(keywords),
|
|
137
|
+
referenced_entities: graphResult.entities.length > 0 ? JSON.stringify(graphResult.entities.map((e) => e.name)) : null
|
|
138
|
+
});
|
|
139
|
+
stored++;
|
|
140
|
+
} catch {
|
|
141
|
+
}
|
|
142
|
+
if ((i + 1) % 50 === 0) {
|
|
143
|
+
await flushBatch();
|
|
144
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
145
|
+
}
|
|
146
|
+
if ((i + 1) % 500 === 0) {
|
|
147
|
+
console.log(`[import] ${i + 1}/${memories.length} processed, ${stored} stored`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
await flushBatch();
|
|
151
|
+
console.log(`[import] Done. ${stored}/${memories.length} memories stored.`);
|
|
152
|
+
}
|
|
153
|
+
async function collectFiles(dirPath) {
|
|
154
|
+
const entries = await readdir(dirPath, { withFileTypes: true });
|
|
155
|
+
const files = [];
|
|
156
|
+
for (const entry of entries) {
|
|
157
|
+
const full = path.join(dirPath, entry.name);
|
|
158
|
+
if (entry.isDirectory()) {
|
|
159
|
+
files.push(...await collectFiles(full));
|
|
160
|
+
} else if (entry.isFile()) {
|
|
161
|
+
const ext = path.extname(entry.name).toLowerCase();
|
|
162
|
+
if ([".json", ".md", ".markdown", ".txt"].includes(ext)) {
|
|
163
|
+
files.push(full);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return files;
|
|
168
|
+
}
|
|
169
|
+
export {
|
|
170
|
+
runImportHistoryCli
|
|
171
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/bin/install-launchd.ts
|
|
4
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
|
|
5
|
+
import { execSync } from "child_process";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import os from "os";
|
|
8
|
+
var HOME = os.homedir();
|
|
9
|
+
var PLIST_NAME = "com.askexe.exed.plist";
|
|
10
|
+
var LAUNCH_AGENTS_DIR = path.join(HOME, "Library", "LaunchAgents");
|
|
11
|
+
var PLIST_DEST = path.join(LAUNCH_AGENTS_DIR, PLIST_NAME);
|
|
12
|
+
var scriptDir = path.dirname(new URL(import.meta.url).pathname);
|
|
13
|
+
var templatePath = path.join(scriptDir, "..", "assets", PLIST_NAME);
|
|
14
|
+
if (!existsSync(templatePath)) {
|
|
15
|
+
console.error(`Template not found: ${templatePath}`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
var nodePath = process.execPath;
|
|
19
|
+
var daemonPath = path.join(scriptDir, "..", "lib", "exe-daemon.js");
|
|
20
|
+
if (!existsSync(daemonPath)) {
|
|
21
|
+
console.error(`Daemon not found: ${daemonPath}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
var plist = readFileSync(templatePath, "utf8");
|
|
25
|
+
plist = plist.replace(/__NODE_PATH__/g, nodePath);
|
|
26
|
+
plist = plist.replace(/__DAEMON_PATH__/g, daemonPath);
|
|
27
|
+
plist = plist.replace(/__HOME__/g, HOME);
|
|
28
|
+
mkdirSync(LAUNCH_AGENTS_DIR, { recursive: true });
|
|
29
|
+
try {
|
|
30
|
+
execSync(`launchctl unload "${PLIST_DEST}" 2>/dev/null`, { timeout: 5e3 });
|
|
31
|
+
} catch {
|
|
32
|
+
}
|
|
33
|
+
writeFileSync(PLIST_DEST, plist);
|
|
34
|
+
console.log(`Wrote ${PLIST_DEST}`);
|
|
35
|
+
try {
|
|
36
|
+
execSync(`launchctl load "${PLIST_DEST}"`, { timeout: 5e3 });
|
|
37
|
+
console.log("Loaded into launchd \u2014 daemon will auto-restart on crash/exit.");
|
|
38
|
+
} catch (err) {
|
|
39
|
+
console.error(`Failed to load: ${err instanceof Error ? err.message : String(err)}`);
|
|
40
|
+
console.log(`Manual load: launchctl load "${PLIST_DEST}"`);
|
|
41
|
+
}
|
package/dist/bin/install.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
setupGhostty,
|
|
7
7
|
setupTmux,
|
|
8
8
|
setupWezterm
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-32YUET3Y.js";
|
|
10
|
+
import "../chunk-KXAUMIOX.js";
|
|
11
11
|
import "../chunk-GNHN5HRQ.js";
|
|
12
12
|
import {
|
|
13
13
|
generateSessionWrappers
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
requestDeployRestart,
|
|
18
18
|
updateMcpVersionMarker
|
|
19
19
|
} from "../chunk-PWMMIGVQ.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-IHSM5GR4.js";
|
|
21
21
|
import "../chunk-HYZV25LY.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-SJYOPYXH.js";
|
|
23
23
|
import "../chunk-RVSGXGWG.js";
|
|
24
24
|
import "../chunk-FXU7JOXK.js";
|
|
25
25
|
import "../chunk-4GXRETYL.js";
|
|
@@ -88,105 +88,81 @@ function spawnDaemonInline(pkgRoot) {
|
|
|
88
88
|
var DEFERRED_RESTART_PID_PATH = path.join(EXE_DIR, "deferred-restart.pid");
|
|
89
89
|
function setupDaemonKeepalive() {
|
|
90
90
|
const plistDir = path.join(os.homedir(), "Library", "LaunchAgents");
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const scriptDir = path.join(EXE_DIR, "bin");
|
|
94
|
-
if (!existsSync(scriptDir)) {
|
|
95
|
-
mkdirSync(scriptDir, { recursive: true });
|
|
96
|
-
}
|
|
91
|
+
const newPlistPath = path.join(plistDir, "com.askexe.exed.plist");
|
|
92
|
+
const oldPlistPath = path.join(plistDir, "com.askexe.exed-keepalive.plist");
|
|
97
93
|
const totalGB = os.totalmem() / (1024 * 1024 * 1024);
|
|
98
94
|
if (totalGB <= 8) {
|
|
99
|
-
process.stderr.write("exe-os: skipping launchd
|
|
95
|
+
process.stderr.write("exe-os: skipping launchd daemon \u2014 system <= 8GB RAM\n");
|
|
100
96
|
return;
|
|
101
97
|
}
|
|
98
|
+
if (existsSync(oldPlistPath)) {
|
|
99
|
+
try {
|
|
100
|
+
execSync(`launchctl unload "${oldPlistPath}" 2>/dev/null`, { timeout: 5e3 });
|
|
101
|
+
} catch {
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
unlinkSync(oldPlistPath);
|
|
105
|
+
} catch {
|
|
106
|
+
}
|
|
107
|
+
}
|
|
102
108
|
const pkgRoot = resolvePackageRoot();
|
|
103
109
|
const daemonPath = path.join(pkgRoot, "dist", "lib", "exe-daemon.js");
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
set -euo pipefail
|
|
108
|
-
|
|
109
|
-
PID_FILE="$HOME/.exe-os/exed.pid"
|
|
110
|
-
SOCK_FILE="$HOME/.exe-os/exed.sock"
|
|
111
|
-
LOG_FILE="$HOME/.exe-os/logs/daemon-keepalive.log"
|
|
112
|
-
DAEMON_PATH="${daemonPath}"
|
|
113
|
-
HEAP_CAP=${Math.max(2048, Math.round(totalGB * 0.33 * 1024))}
|
|
114
|
-
|
|
115
|
-
mkdir -p "$HOME/.exe-os/logs"
|
|
116
|
-
|
|
117
|
-
# Check if daemon is alive
|
|
118
|
-
if [ -f "$PID_FILE" ]; then
|
|
119
|
-
PID=$(cat "$PID_FILE" 2>/dev/null || echo "")
|
|
120
|
-
if [ -n "$PID" ] && kill -0 "$PID" 2>/dev/null; then
|
|
121
|
-
exit 0 # Daemon is alive
|
|
122
|
-
fi
|
|
123
|
-
fi
|
|
124
|
-
|
|
125
|
-
# Daemon is dead \u2014 respawn
|
|
126
|
-
echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] keepalive: daemon not running, respawning" >> "$LOG_FILE"
|
|
127
|
-
|
|
128
|
-
# Clean stale files
|
|
129
|
-
rm -f "$PID_FILE" "$SOCK_FILE" 2>/dev/null || true
|
|
130
|
-
|
|
131
|
-
# Find node
|
|
132
|
-
NODE_BIN=$(which node 2>/dev/null || echo "")
|
|
133
|
-
if [ -z "$NODE_BIN" ]; then
|
|
134
|
-
# Try NVM default
|
|
135
|
-
export NVM_DIR="$HOME/.nvm"
|
|
136
|
-
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" --no-use 2>/dev/null
|
|
137
|
-
NODE_BIN=$(which node 2>/dev/null || echo "")
|
|
138
|
-
fi
|
|
139
|
-
if [ -z "$NODE_BIN" ]; then
|
|
140
|
-
echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] keepalive: node not found, cannot respawn" >> "$LOG_FILE"
|
|
141
|
-
exit 1
|
|
142
|
-
fi
|
|
143
|
-
|
|
144
|
-
# Spawn daemon
|
|
145
|
-
"$NODE_BIN" --max-old-space-size=$HEAP_CAP "$DAEMON_PATH" >> "$LOG_FILE" 2>&1 &
|
|
146
|
-
disown
|
|
147
|
-
|
|
148
|
-
echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] keepalive: daemon respawned (pid $!)" >> "$LOG_FILE"
|
|
149
|
-
`;
|
|
150
|
-
writeFileSync(keepaliveScript, scriptContent, { mode: 493 });
|
|
110
|
+
const nodePath = process.execPath;
|
|
111
|
+
const home = os.homedir();
|
|
112
|
+
const heapCapMB = totalGB <= 16 ? 2048 : totalGB <= 32 ? 4096 : totalGB <= 64 ? 6144 : 8192;
|
|
151
113
|
const plistContent = `<?xml version="1.0" encoding="UTF-8"?>
|
|
152
114
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
153
115
|
<plist version="1.0">
|
|
154
116
|
<dict>
|
|
155
117
|
<key>Label</key>
|
|
156
|
-
<string>com.askexe.exed
|
|
118
|
+
<string>com.askexe.exed</string>
|
|
157
119
|
<key>ProgramArguments</key>
|
|
158
120
|
<array>
|
|
159
|
-
<string>${
|
|
121
|
+
<string>${nodePath}</string>
|
|
122
|
+
<string>--max-old-space-size=${heapCapMB}</string>
|
|
123
|
+
<string>--expose-gc</string>
|
|
124
|
+
<string>${daemonPath}</string>
|
|
160
125
|
</array>
|
|
161
|
-
<key>
|
|
162
|
-
<integer>300</integer>
|
|
163
|
-
<key>RunAtLoad</key>
|
|
126
|
+
<key>KeepAlive</key>
|
|
164
127
|
<true/>
|
|
165
|
-
<key>
|
|
166
|
-
<
|
|
128
|
+
<key>ThrottleInterval</key>
|
|
129
|
+
<integer>10</integer>
|
|
130
|
+
<key>EnvironmentVariables</key>
|
|
131
|
+
<dict>
|
|
132
|
+
<key>PATH</key>
|
|
133
|
+
<string>/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin:${path.dirname(nodePath)}</string>
|
|
134
|
+
<key>HOME</key>
|
|
135
|
+
<string>${home}</string>
|
|
136
|
+
</dict>
|
|
167
137
|
<key>StandardOutPath</key>
|
|
168
|
-
<string>${path.join(
|
|
138
|
+
<string>${path.join(home, ".exe-os", "logs", "exed-launchd.log")}</string>
|
|
139
|
+
<key>StandardErrorPath</key>
|
|
140
|
+
<string>${path.join(home, ".exe-os", "logs", "exed-launchd.log")}</string>
|
|
141
|
+
<key>WorkingDirectory</key>
|
|
142
|
+
<string>${home}</string>
|
|
143
|
+
<key>RunAtLoad</key>
|
|
144
|
+
<true/>
|
|
169
145
|
</dict>
|
|
170
146
|
</plist>
|
|
171
147
|
`;
|
|
172
148
|
if (!existsSync(plistDir)) {
|
|
173
149
|
mkdirSync(plistDir, { recursive: true });
|
|
174
150
|
}
|
|
175
|
-
if (existsSync(
|
|
176
|
-
const existing = readFileSync(
|
|
151
|
+
if (existsSync(newPlistPath)) {
|
|
152
|
+
const existing = readFileSync(newPlistPath, "utf8");
|
|
177
153
|
if (existing === plistContent) {
|
|
178
|
-
process.stderr.write("exe-os: launchd
|
|
154
|
+
process.stderr.write("exe-os: launchd daemon supervisor already configured\n");
|
|
179
155
|
return;
|
|
180
156
|
}
|
|
181
157
|
try {
|
|
182
|
-
execSync(`launchctl unload "${
|
|
158
|
+
execSync(`launchctl unload "${newPlistPath}" 2>/dev/null`, { timeout: 5e3 });
|
|
183
159
|
} catch {
|
|
184
160
|
}
|
|
185
161
|
}
|
|
186
|
-
writeFileSync(
|
|
162
|
+
writeFileSync(newPlistPath, plistContent);
|
|
187
163
|
try {
|
|
188
|
-
execSync(`launchctl load "${
|
|
189
|
-
process.stderr.write("exe-os: launchd
|
|
164
|
+
execSync(`launchctl load "${newPlistPath}"`, { timeout: 5e3 });
|
|
165
|
+
process.stderr.write("exe-os: launchd daemon supervisor registered (auto-restart on crash)\n");
|
|
190
166
|
} catch (err) {
|
|
191
167
|
process.stderr.write(`exe-os: launchctl load failed: ${err instanceof Error ? err.message : String(err)}
|
|
192
168
|
`);
|
|
@@ -358,7 +334,7 @@ if (args.includes("--commands-only")) {
|
|
|
358
334
|
}
|
|
359
335
|
try {
|
|
360
336
|
execSync("which codex", { encoding: "utf8", timeout: 5e3 });
|
|
361
|
-
const { runCodexInstaller } = await import("../installer-
|
|
337
|
+
const { runCodexInstaller } = await import("../installer-VE23YFXU.js");
|
|
362
338
|
await runCodexInstaller();
|
|
363
339
|
} catch {
|
|
364
340
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
fastDbInit
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-K5UR73PM.js";
|
|
5
5
|
import "../chunk-MLKGABMK.js";
|
|
6
6
|
|
|
7
7
|
// src/bin/intercom-check.ts
|
|
@@ -17,7 +17,7 @@ async function main() {
|
|
|
17
17
|
}
|
|
18
18
|
if (isCoordinator) {
|
|
19
19
|
try {
|
|
20
|
-
const { listPendingReviews, cleanupOrphanedReviews, formatAge, isStale } = await import("../tasks-review-
|
|
20
|
+
const { listPendingReviews, cleanupOrphanedReviews, formatAge, isStale } = await import("../tasks-review-MXLMPGNZ.js");
|
|
21
21
|
const { extractRootExe } = await import("../lib/tmux-routing.js");
|
|
22
22
|
let sessionScope = process.env.EXE_SESSION ? extractRootExe(process.env.EXE_SESSION) ?? void 0 : void 0;
|
|
23
23
|
if (!sessionScope) {
|
|
@@ -96,7 +96,7 @@ async function main() {
|
|
|
96
96
|
}
|
|
97
97
|
if (!isCoordinator) {
|
|
98
98
|
try {
|
|
99
|
-
const { listBehaviors } = await import("../behaviors-
|
|
99
|
+
const { listBehaviors } = await import("../behaviors-LZVAVHTC.js");
|
|
100
100
|
const sessionStart = process.env.EXE_SESSION_START_ISO ?? "";
|
|
101
101
|
if (sessionStart) {
|
|
102
102
|
const behaviors = await listBehaviors(agent);
|
|
@@ -115,7 +115,7 @@ async function main() {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
try {
|
|
118
|
-
const { readUnreadNotifications, markAsRead } = await import("../notifications-
|
|
118
|
+
const { readUnreadNotifications, markAsRead } = await import("../notifications-6TCE6OBG.js");
|
|
119
119
|
const { resolveExeSession } = await import("../lib/tmux-routing.js");
|
|
120
120
|
const sessionScope = resolveExeSession();
|
|
121
121
|
const notifications = await readUnreadNotifications(agent, sessionScope);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
buildReflectionCheckpoint
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-2BGGDNRD.js";
|
|
4
|
+
} from "../chunk-27DO3EZO.js";
|
|
6
5
|
import {
|
|
7
6
|
pgSslConfig
|
|
8
7
|
} from "../chunk-EQSQ4HBW.js";
|
|
8
|
+
import "../chunk-IPPJEM26.js";
|
|
9
9
|
import {
|
|
10
10
|
politeBatchPause,
|
|
11
11
|
startManagedJob
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
inferSemanticLabel,
|
|
4
|
-
stableId
|
|
5
|
-
} from "../chunk-2BGGDNRD.js";
|
|
6
2
|
import {
|
|
7
3
|
pgSslConfig
|
|
8
4
|
} from "../chunk-EQSQ4HBW.js";
|
|
5
|
+
import {
|
|
6
|
+
inferSemanticLabel,
|
|
7
|
+
stableId
|
|
8
|
+
} from "../chunk-IPPJEM26.js";
|
|
9
9
|
import {
|
|
10
10
|
politeBatchPause,
|
|
11
11
|
startManagedJob
|
package/dist/bin/pre-publish.js
CHANGED
package/dist/bin/scan-tasks.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
queryTaskRows
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-MFI5OXYW.js";
|
|
5
5
|
import "../chunk-LOQCOHEW.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-QI4IXJN7.js";
|
|
7
7
|
import "../chunk-64WZEXXA.js";
|
|
8
|
-
import "../chunk-A7KEWR6S.js";
|
|
9
|
-
import "../chunk-X347L57O.js";
|
|
10
8
|
import "../chunk-GZIAQYGI.js";
|
|
9
|
+
import "../chunk-TXWQPL2U.js";
|
|
10
|
+
import "../chunk-CSTJQDOE.js";
|
|
11
11
|
import "../chunk-ZQX6UOP6.js";
|
|
12
12
|
import "../chunk-H2CFBUGF.js";
|
|
13
13
|
import "../chunk-NGP6LSV2.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-OPU3NYOO.js";
|
|
14
|
+
import "../chunk-RE4VLK45.js";
|
|
16
15
|
import {
|
|
17
16
|
getSessionRuntime
|
|
18
17
|
} from "../chunk-CVYC6DUW.js";
|
|
18
|
+
import "../chunk-OPU3NYOO.js";
|
|
19
19
|
import "../chunk-GJV3WDWM.js";
|
|
20
20
|
import "../chunk-MP2AFCGL.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-IHSM5GR4.js";
|
|
22
22
|
import "../chunk-HYZV25LY.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-SJYOPYXH.js";
|
|
24
24
|
import "../chunk-RVSGXGWG.js";
|
|
25
25
|
import "../chunk-FXU7JOXK.js";
|
|
26
26
|
import "../chunk-MVMMULOJ.js";
|
|
@@ -72,7 +72,7 @@ function checkMcpHealth() {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
async function scanFromDb(agentId, tmuxSession, projectName) {
|
|
75
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
75
|
+
const { fastDbInit } = await import("../fast-db-init-UKETGWQI.js");
|
|
76
76
|
try {
|
|
77
77
|
await fastDbInit();
|
|
78
78
|
} catch (err) {
|
|
@@ -80,15 +80,25 @@ async function scanFromDb(agentId, tmuxSession, projectName) {
|
|
|
80
80
|
`);
|
|
81
81
|
return { open: [], inProgress: [], done: 0, total: 0 };
|
|
82
82
|
}
|
|
83
|
+
let instanceFilter = "";
|
|
84
|
+
const instanceArgs = [];
|
|
85
|
+
if (tmuxSession) {
|
|
86
|
+
const agentPart = tmuxSession.split("-")[0] ?? "";
|
|
87
|
+
const instanceNum = agentPart.replace(/^[a-z]+/i, "");
|
|
88
|
+
if (instanceNum && parseInt(instanceNum, 10) >= 2) {
|
|
89
|
+
instanceFilter = " AND (instance_id = ? OR instance_id IS NULL)";
|
|
90
|
+
instanceArgs.push(tmuxSession);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
83
93
|
const rows = await queryTaskRows({
|
|
84
94
|
projectName: projectName === void 0 ? void 0 : projectName ?? null,
|
|
85
|
-
columns: "id, title, priority, status, assigned_to, reviewer, assigned_tmux, checkpoint, checkpoint_count",
|
|
95
|
+
columns: "id, title, priority, status, assigned_to, reviewer, assigned_tmux, checkpoint, checkpoint_count, instance_id",
|
|
86
96
|
limit: 1e3,
|
|
87
97
|
orderBy: "CASE status WHEN 'in_progress' THEN 0 WHEN 'open' THEN 1 WHEN 'blocked' THEN 2 WHEN 'needs_review' THEN 3 ELSE 4 END, priority ASC, created_at DESC",
|
|
88
98
|
extraConditions: [
|
|
89
|
-
|
|
99
|
+
`((assigned_to = ? AND status IN ('open', 'in_progress', 'blocked', 'needs_review')${instanceFilter}) OR (reviewer = ? AND status = 'needs_review'))`
|
|
90
100
|
],
|
|
91
|
-
extraArgs: [agentId, agentId]
|
|
101
|
+
extraArgs: [agentId, ...instanceArgs, agentId]
|
|
92
102
|
});
|
|
93
103
|
const open = [];
|
|
94
104
|
const inProgress = [];
|
package/dist/bin/setup.js
CHANGED
|
@@ -8,12 +8,13 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
disposeStore,
|
|
10
10
|
initStore
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-ZXB44R3E.js";
|
|
12
|
+
import "../chunk-CHCA3ZM2.js";
|
|
13
|
+
import "../chunk-WBLILGAP.js";
|
|
13
14
|
import "../chunk-MP2AFCGL.js";
|
|
14
15
|
import {
|
|
15
16
|
getClient
|
|
16
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-SJYOPYXH.js";
|
|
17
18
|
import "../chunk-RVSGXGWG.js";
|
|
18
19
|
import "../chunk-FXU7JOXK.js";
|
|
19
20
|
import {
|