@askexenow/exe-os 0.9.300 → 0.9.301
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/erp-nginx/nginx.conf +6 -3
- package/dist/active-agent-UNJO6AJ2.js +27 -0
- package/dist/active-agent-Y5LSIMVC.js +28 -0
- package/dist/agentic-ontology-QEV7GI3T.js +25 -0
- package/dist/backfill-metadata-RQZ4BN7G.js +600 -0
- package/dist/behaviors-A3L5CWMK.js +46 -0
- package/dist/bin/agentic-ontology-backfill.js +5 -5
- package/dist/bin/agentic-reflection-backfill.js +6 -6
- package/dist/bin/agentic-semantic-label.js +5 -5
- package/dist/bin/backfill-conversations.js +4 -4
- package/dist/bin/backfill-responses.js +4 -4
- package/dist/bin/backfill-vectors.js +5 -5
- package/dist/bin/bulk-sync-postgres.js +7 -7
- package/dist/bin/cc-doctor.js +4 -4
- package/dist/bin/cleanup-stale-review-tasks.js +9 -9
- package/dist/bin/cli.js +15 -15
- package/dist/bin/exe-agent-config.js +2 -2
- package/dist/bin/exe-agent.js +4 -4
- package/dist/bin/exe-assign.js +5 -5
- package/dist/bin/exe-boot.js +23 -18
- package/dist/bin/exe-call.js +4 -4
- package/dist/bin/exe-cloud.js +7 -7
- package/dist/bin/exe-dispatch.js +9 -9
- package/dist/bin/exe-doctor.js +2 -2
- package/dist/bin/exe-export-behaviors.js +7 -7
- package/dist/bin/exe-forget.js +6 -6
- package/dist/bin/exe-gateway.js +7 -7
- package/dist/bin/exe-healthcheck.js +4 -4
- package/dist/bin/exe-heartbeat.js +9 -9
- package/dist/bin/exe-kill.js +12 -12
- package/dist/bin/exe-launch-agent.js +16 -16
- 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 +11 -11
- package/dist/bin/exe-search.js +5 -5
- package/dist/bin/exe-session-cleanup.js +14 -14
- package/dist/bin/exe-settings.js +7 -7
- package/dist/bin/exe-start-codex.js +11 -11
- package/dist/bin/exe-start-opencode.js +8 -8
- package/dist/bin/exe-status.js +10 -10
- package/dist/bin/exe-team.js +3 -3
- package/dist/bin/exe-watchdog.js +3 -3
- package/dist/bin/git-sweep.js +10 -10
- package/dist/bin/graph-backfill.js +4 -4
- package/dist/bin/graph-export.js +5 -5
- package/dist/bin/import-history.js +7 -7
- package/dist/bin/install.js +6 -6
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +4 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/scan-tasks.js +9 -9
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +4 -4
- package/dist/capability-cards-VTGDTOZ4.js +89 -0
- package/dist/capacity-monitor-G2MAJPRP.js +51 -0
- package/dist/catchup-brief-VBGEJQRS.js +175 -0
- package/dist/chunk-24JVDLQJ.js +345 -0
- package/dist/chunk-2T3OYZMR.js +1158 -0
- package/dist/chunk-3ABY3QDX.js +199 -0
- package/dist/chunk-3G3ECFB5.js +668 -0
- package/dist/chunk-3LHOFGHT.js +280 -0
- package/dist/chunk-3RA62PNQ.js +58 -0
- package/dist/chunk-3XRS5AVV.js +567 -0
- package/dist/chunk-3YK7X5FD.js +1186 -0
- package/dist/chunk-4L6PVYFE.js +54 -0
- package/dist/chunk-4O67LBMK.js +377 -0
- package/dist/chunk-4OIU3N6U.js +167 -0
- package/dist/chunk-5SYYMNPE.js +30 -0
- package/dist/chunk-5TO5PH7O.js +304 -0
- package/dist/chunk-5XD2Y463.js +402 -0
- package/dist/chunk-63AENHJC.js +123 -0
- package/dist/chunk-673IFJYB.js +731 -0
- package/dist/chunk-7AWH47AR.js +448 -0
- package/dist/chunk-7P4B6AEP.js +227 -0
- package/dist/chunk-7VHOALNC.js +244 -0
- package/dist/chunk-ASJHCAVL.js +38 -0
- package/dist/chunk-DICIFTCS.js +150 -0
- package/dist/chunk-DIFI5JDC.js +76 -0
- package/dist/chunk-DPOIJ5SM.js +284 -0
- package/dist/chunk-FAZNXNA5.js +33 -0
- package/dist/chunk-FCHG5RC4.js +197 -0
- package/dist/chunk-FFKSPZO2.js +157 -0
- package/dist/chunk-FNHYH5U6.js +331 -0
- package/dist/chunk-FWPDAQ6Q.js +1350 -0
- package/dist/chunk-FZB73QOI.js +210 -0
- package/dist/chunk-GJBR6QLD.js +630 -0
- package/dist/chunk-GRSYAHKI.js +535 -0
- package/dist/chunk-J5HFRVNW.js +362 -0
- package/dist/chunk-J6SD7LT2.js +171 -0
- package/dist/chunk-JURL2S27.js +128 -0
- package/dist/chunk-KPUYYOFS.js +122 -0
- package/dist/chunk-LAFARYU5.js +456 -0
- package/dist/chunk-LSDXEHKL.js +381 -0
- package/dist/chunk-MS2EOZJQ.js +290 -0
- package/dist/chunk-MUIMJGSQ.js +128 -0
- package/dist/chunk-NJMPNYBS.js +427 -0
- package/dist/chunk-OJACH2JF.js +128 -0
- package/dist/chunk-OO4IFABD.js +382 -0
- package/dist/chunk-Q65NCNL4.js +1352 -0
- package/dist/chunk-QIGS2LRT.js +735 -0
- package/dist/chunk-S73ZAJ2S.js +262 -0
- package/dist/chunk-SJ4UF7YK.js +1094 -0
- package/dist/chunk-SOZ7D77I.js +204 -0
- package/dist/chunk-TDX2LK2M.js +240 -0
- package/dist/chunk-U5RKGLV6.js +50 -0
- package/dist/chunk-UFGTHBHP.js +127 -0
- package/dist/chunk-ULCYWCPI.js +1079 -0
- package/dist/chunk-V6LOEOXG.js +3372 -0
- package/dist/chunk-VAZOVAW4.js +2162 -0
- package/dist/chunk-VEUQVKKT.js +185 -0
- package/dist/chunk-VIDDJ5RF.js +214 -0
- package/dist/chunk-VNB4ROYG.js +348 -0
- package/dist/chunk-VWUQFZFB.js +395 -0
- package/dist/chunk-W77GRCNA.js +85 -0
- package/dist/chunk-WVMG4ZRH.js +14597 -0
- package/dist/chunk-WYVOTRRZ.js +129 -0
- package/dist/chunk-XQQ7D4I4.js +85 -0
- package/dist/chunk-YHJPTIPR.js +836 -0
- package/dist/chunk-YLKS7KKC.js +2145 -0
- package/dist/chunk-YU3KEVCO.js +333 -0
- package/dist/chunk-ZDPU3JTF.js +221 -0
- package/dist/chunk-ZDY4LYAJ.js +81 -0
- package/dist/chunk-ZG33AACD.js +70 -0
- package/dist/chunk-ZKHPZ6KN.js +181 -0
- package/dist/chunk-ZO2TM5N5.js +97 -0
- package/dist/chunk-ZSUACDQC.js +4388 -0
- package/dist/co-activation-XM25BLZM.js +74 -0
- package/dist/co-occurrence-CKEMDPWO.js +95 -0
- package/dist/core-memory-ZDA76EU3.js +110 -0
- package/dist/crdt-sync-BJKZB6T6.js +33 -0
- package/dist/crm-webhook-E5PAFAUN.js +10 -0
- package/dist/cto-delegation-gate-EMY6ZZ2F.js +280 -0
- package/dist/daemon-orchestration-Y5Y6YNE3.js +143 -0
- package/dist/db-backup-HFJ53IBU.js +43 -0
- package/dist/doc-graph-extractor-ID45AQ2P.js +133 -0
- package/dist/dreaming-N6B7KBIE.js +34 -0
- package/dist/exe-drift-CPUEAPIU.js +70 -0
- package/dist/exe-export-4RTGDV53.js +77 -0
- package/dist/exe-import-AZMIF34Z.js +80 -0
- package/dist/exe-key-LJV23AJI.js +673 -0
- package/dist/exe-snapshot-ZOZBW7V6.js +338 -0
- package/dist/fast-db-init-ATRZGHOL.js +7 -0
- package/dist/gateway/index.js +8 -8
- package/dist/git-staleness-XNOKI4D3.js +112 -0
- package/dist/git-task-sweep-3MO4OVND.js +42 -0
- package/dist/global-procedures-EBAPPWGZ.js +22 -0
- package/dist/graph-auto-extract-VJOUQBPK.js +183 -0
- package/dist/hooks/bug-report-worker.js +11 -11
- package/dist/hooks/codex-stop-task-finalizer.js +11 -11
- package/dist/hooks/commit-complete.js +11 -11
- package/dist/hooks/error-recall.js +6 -6
- package/dist/hooks/exe-heartbeat-hook.js +3 -3
- package/dist/hooks/ingest.js +6 -6
- package/dist/hooks/instructions-loaded.js +4 -4
- package/dist/hooks/manifest.json +19 -19
- package/dist/hooks/notification.js +4 -4
- package/dist/hooks/post-compact.js +11 -11
- package/dist/hooks/post-tool-combined.js +5 -5
- package/dist/hooks/pre-compact.js +12 -12
- package/dist/hooks/pre-tool-use.js +14 -14
- package/dist/hooks/prompt-submit.js +26 -24
- package/dist/hooks/session-end.js +15 -15
- package/dist/hooks/session-start.js +12 -12
- package/dist/hooks/stop.js +14 -14
- package/dist/hooks/subagent-stop.js +10 -10
- package/dist/hooks/summary-worker.js +14 -14
- package/dist/index.js +17 -17
- package/dist/installer-37KFNAWE.js +344 -0
- package/dist/installer-F55NR4E2.js +298 -0
- package/dist/installer-KOYBUS4J.js +40 -0
- package/dist/lib/cloud-sync.js +7 -7
- package/dist/lib/consolidation.js +5 -5
- package/dist/lib/database.js +2 -2
- package/dist/lib/db.js +2 -2
- package/dist/lib/employee-templates.js +4 -4
- package/dist/lib/employees.js +2 -2
- package/dist/lib/exe-daemon.js +40 -40
- package/dist/lib/hybrid-search.js +5 -5
- package/dist/lib/identity.js +2 -2
- package/dist/lib/messaging.js +9 -9
- package/dist/lib/reminders.js +3 -3
- package/dist/lib/schedules.js +5 -5
- package/dist/lib/session-registry.js +4 -4
- package/dist/lib/skill-learning.js +6 -6
- package/dist/lib/store.js +4 -4
- package/dist/lib/task-router.js +3 -3
- package/dist/lib/tasks.js +10 -10
- package/dist/lib/tmux-routing.js +8 -8
- package/dist/lib/token-spend.js +3 -3
- package/dist/mcp/register-tools.js +54 -54
- package/dist/mcp/server.js +55 -55
- package/dist/mcp/tools/complete-reminder.js +4 -4
- package/dist/mcp/tools/create-reminder.js +4 -4
- package/dist/mcp/tools/create-task.js +12 -12
- package/dist/mcp/tools/deactivate-behavior.js +7 -7
- package/dist/mcp/tools/list-reminders.js +4 -4
- package/dist/mcp/tools/list-tasks.js +12 -12
- package/dist/mcp/tools/send-message.js +11 -11
- package/dist/mcp/tools/update-task.js +11 -11
- package/dist/mcp-http-config-7KJZI7UD.js +31 -0
- package/dist/memory-cards-ZIT7ZKL5.js +180 -0
- package/dist/memory-graph-extractor-LY2VORZT.js +22 -0
- package/dist/memory-poisoning-defense-SEM25TY5.js +224 -0
- package/dist/memory-reflection-J2W7CJ7C.js +244 -0
- package/dist/notifications-RLMSI4YE.js +47 -0
- package/dist/orchestration-events-TGQYA72K.js +27 -0
- package/dist/orchestrator-JQD5G3CW.js +35 -0
- package/dist/pipeline-router-3Q3YBYSM.js +15 -0
- package/dist/plan-limits-YGXTYCW4.js +28 -0
- package/dist/project-boot-TDOZKKDR.js +299 -0
- package/dist/projection-worker-TMKUSVGD.js +1084 -0
- package/dist/prospective-memory-CNJDBNWF.js +232 -0
- package/dist/reranker-YQIRNGDM.js +19 -0
- package/dist/retrieval-health-M5BVB7EV.js +12 -0
- package/dist/review-polling-ZMB3OBPC.js +126 -0
- package/dist/runtime/index.js +11 -11
- package/dist/session-events-UTMCKDIN.js +38 -0
- package/dist/session-kill-telemetry-FRQA5MVD.js +31 -0
- package/dist/session-scope-2BD6QLNI.js +88 -0
- package/dist/setup-wizard-W64I6SHC.js +12 -0
- package/dist/skill-refinement-FXCXTUS2.js +159 -0
- package/dist/steward-gate-JDR3SLH3.js +15 -0
- package/dist/task-enforcement-WCEA4FZI.js +506 -0
- package/dist/task-scope-L5GDL2AV.js +37 -0
- package/dist/tasks-crud-S36AFYYM.js +79 -0
- package/dist/tasks-notify-W2W2BJRB.js +40 -0
- package/dist/tasks-review-34WV7BX2.js +49 -0
- package/dist/telemetry-upload-3CSVO3J7.js +741 -0
- package/dist/token-budget-ZG2MQ5GD.js +86 -0
- package/dist/tool-telemetry-ODL4F2CW.js +17 -0
- package/dist/tui/App.js +16 -16
- package/dist/tui-data-Z5UF7KEI.js +260 -0
- package/dist/wiki-acl-SZFHCEC4.js +111 -0
- package/dist/worker-gate-OOO6BWZ6.js +21 -0
- package/dist/workflow-engine-QY3IFFR2.js +28 -0
- package/dist/worktree-CNOQZBNT.js +28 -0
- package/dist/worktree-sweep-SE7ITXC4.js +21 -0
- package/package.json +1 -1
- package/release-notes.json +88 -88
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AUTO_WAKE_COOLDOWN_MS,
|
|
3
|
+
AUTO_WAKE_MAX_RETRIES,
|
|
4
|
+
COO_CONTEXT_THRESHOLD_PCT,
|
|
5
|
+
COO_RESTART_COOLDOWN_MS,
|
|
6
|
+
CRASH_LOOP_THRESHOLD,
|
|
7
|
+
CRASH_LOOP_WINDOW_MS,
|
|
8
|
+
HOOK_PROCESS_PATTERNS,
|
|
9
|
+
IDLE_KILL_INTERCOM_ACK_WINDOW_MS,
|
|
10
|
+
IDLE_NUDGE_DEDUP_MS,
|
|
11
|
+
ORPHAN_MAX_AGE_SECS,
|
|
12
|
+
ORPHAN_PATTERNS,
|
|
13
|
+
ORPHAN_SIGKILL_DELAY_MS,
|
|
14
|
+
REVIEW_NUDGE_COOLDOWN_MS,
|
|
15
|
+
SESSION_CONTEXT_THRESHOLD_PCT,
|
|
16
|
+
SESSION_TTL_HOURS,
|
|
17
|
+
STUCK_TASK_GRACE_MS,
|
|
18
|
+
WORKTREE_REAPER_INTERVAL_MS,
|
|
19
|
+
_resetAutoWakeState,
|
|
20
|
+
_resetCooRestartState,
|
|
21
|
+
checkAutoWakeGates,
|
|
22
|
+
checkSessionTTL,
|
|
23
|
+
classifyTtlKillReason,
|
|
24
|
+
cleanupStaleReviews,
|
|
25
|
+
createAutoWakeRealDeps,
|
|
26
|
+
createCoordinatorRestartRealDeps,
|
|
27
|
+
createIdleKillRealDeps,
|
|
28
|
+
createIdleNudgeRealDeps,
|
|
29
|
+
createOrphanReaperRealDeps,
|
|
30
|
+
createOrphanReaperRealDepsAsync,
|
|
31
|
+
createReviewNudgeRealDeps,
|
|
32
|
+
createSessionTTLRealDeps,
|
|
33
|
+
createStaleReviewRealDeps,
|
|
34
|
+
createStuckTaskRealDeps,
|
|
35
|
+
createWorktreeReaperRealDeps,
|
|
36
|
+
createZombieAgentReaperRealDeps,
|
|
37
|
+
createZombieAgentReaperRealDepsAsync,
|
|
38
|
+
gcStaleCheckpoints,
|
|
39
|
+
getAvailableMemoryGB,
|
|
40
|
+
loadNudgeState,
|
|
41
|
+
pollCoordinatorContextRestart,
|
|
42
|
+
pollIdleEmployees,
|
|
43
|
+
pollIdleKill,
|
|
44
|
+
pollOrphanedTasks,
|
|
45
|
+
pollReviewNudge,
|
|
46
|
+
pollTaskGroupBarriers,
|
|
47
|
+
reapOrphanedMcpProcesses,
|
|
48
|
+
reapOrphanedWorktrees,
|
|
49
|
+
reapZombieAgentProcesses,
|
|
50
|
+
releaseStuckTasks,
|
|
51
|
+
saveNudgeState,
|
|
52
|
+
shouldAutoWake,
|
|
53
|
+
shouldKillIdleSession,
|
|
54
|
+
shouldKillSession,
|
|
55
|
+
shouldNudgeEmployee
|
|
56
|
+
} from "./chunk-VAZOVAW4.js";
|
|
57
|
+
import "./chunk-63AENHJC.js";
|
|
58
|
+
import "./chunk-7AWH47AR.js";
|
|
59
|
+
import "./chunk-7VHOALNC.js";
|
|
60
|
+
import "./chunk-ZSUACDQC.js";
|
|
61
|
+
import "./chunk-3LHOFGHT.js";
|
|
62
|
+
import "./chunk-4FVVJ7ME.js";
|
|
63
|
+
import "./chunk-4JERP7NT.js";
|
|
64
|
+
import "./chunk-5TO5PH7O.js";
|
|
65
|
+
import "./chunk-KOO3J5PV.js";
|
|
66
|
+
import "./chunk-22TVSRQQ.js";
|
|
67
|
+
import "./chunk-SSTLTIF3.js";
|
|
68
|
+
import "./chunk-GJBR6QLD.js";
|
|
69
|
+
import "./chunk-QRTJNSKU.js";
|
|
70
|
+
import "./chunk-NGP6LSV2.js";
|
|
71
|
+
import "./chunk-WYVOTRRZ.js";
|
|
72
|
+
import "./chunk-CVYC6DUW.js";
|
|
73
|
+
import "./chunk-OPU3NYOO.js";
|
|
74
|
+
import "./chunk-GJV3WDWM.js";
|
|
75
|
+
import "./chunk-MP2AFCGL.js";
|
|
76
|
+
import "./chunk-ZG33AACD.js";
|
|
77
|
+
import "./chunk-HYZV25LY.js";
|
|
78
|
+
import "./chunk-V6LOEOXG.js";
|
|
79
|
+
import "./chunk-2I23RPSI.js";
|
|
80
|
+
import "./chunk-VWUQFZFB.js";
|
|
81
|
+
import "./chunk-PNQDP3OA.js";
|
|
82
|
+
import "./chunk-7HLWBYH7.js";
|
|
83
|
+
import "./chunk-FXU7JOXK.js";
|
|
84
|
+
import "./chunk-YTKVJJSU.js";
|
|
85
|
+
import "./chunk-R36FAN53.js";
|
|
86
|
+
import "./chunk-LYH5HE24.js";
|
|
87
|
+
import "./chunk-MLKGABMK.js";
|
|
88
|
+
export {
|
|
89
|
+
AUTO_WAKE_COOLDOWN_MS,
|
|
90
|
+
AUTO_WAKE_MAX_RETRIES,
|
|
91
|
+
COO_CONTEXT_THRESHOLD_PCT,
|
|
92
|
+
COO_RESTART_COOLDOWN_MS,
|
|
93
|
+
CRASH_LOOP_THRESHOLD,
|
|
94
|
+
CRASH_LOOP_WINDOW_MS,
|
|
95
|
+
HOOK_PROCESS_PATTERNS,
|
|
96
|
+
IDLE_KILL_INTERCOM_ACK_WINDOW_MS,
|
|
97
|
+
IDLE_NUDGE_DEDUP_MS,
|
|
98
|
+
ORPHAN_MAX_AGE_SECS,
|
|
99
|
+
ORPHAN_PATTERNS,
|
|
100
|
+
ORPHAN_SIGKILL_DELAY_MS,
|
|
101
|
+
REVIEW_NUDGE_COOLDOWN_MS,
|
|
102
|
+
SESSION_CONTEXT_THRESHOLD_PCT,
|
|
103
|
+
SESSION_TTL_HOURS,
|
|
104
|
+
STUCK_TASK_GRACE_MS,
|
|
105
|
+
WORKTREE_REAPER_INTERVAL_MS,
|
|
106
|
+
_resetAutoWakeState,
|
|
107
|
+
_resetCooRestartState,
|
|
108
|
+
checkAutoWakeGates,
|
|
109
|
+
checkSessionTTL,
|
|
110
|
+
classifyTtlKillReason,
|
|
111
|
+
cleanupStaleReviews,
|
|
112
|
+
createAutoWakeRealDeps,
|
|
113
|
+
createCoordinatorRestartRealDeps,
|
|
114
|
+
createIdleKillRealDeps,
|
|
115
|
+
createIdleNudgeRealDeps,
|
|
116
|
+
createOrphanReaperRealDeps,
|
|
117
|
+
createOrphanReaperRealDepsAsync,
|
|
118
|
+
createReviewNudgeRealDeps,
|
|
119
|
+
createSessionTTLRealDeps,
|
|
120
|
+
createStaleReviewRealDeps,
|
|
121
|
+
createStuckTaskRealDeps,
|
|
122
|
+
createWorktreeReaperRealDeps,
|
|
123
|
+
createZombieAgentReaperRealDeps,
|
|
124
|
+
createZombieAgentReaperRealDepsAsync,
|
|
125
|
+
gcStaleCheckpoints,
|
|
126
|
+
getAvailableMemoryGB,
|
|
127
|
+
loadNudgeState,
|
|
128
|
+
pollCoordinatorContextRestart,
|
|
129
|
+
pollIdleEmployees,
|
|
130
|
+
pollIdleKill,
|
|
131
|
+
pollOrphanedTasks,
|
|
132
|
+
pollReviewNudge,
|
|
133
|
+
pollTaskGroupBarriers,
|
|
134
|
+
reapOrphanedMcpProcesses,
|
|
135
|
+
reapOrphanedWorktrees,
|
|
136
|
+
reapZombieAgentProcesses,
|
|
137
|
+
releaseStuckTasks,
|
|
138
|
+
saveNudgeState,
|
|
139
|
+
shouldAutoWake,
|
|
140
|
+
shouldKillIdleSession,
|
|
141
|
+
shouldKillSession,
|
|
142
|
+
shouldNudgeEmployee
|
|
143
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cleanupCrashDebris,
|
|
3
|
+
cleanupStaleTmp,
|
|
4
|
+
createBackup,
|
|
5
|
+
createBackupAsync,
|
|
6
|
+
enforceRetention,
|
|
7
|
+
findActiveDb,
|
|
8
|
+
getBackupDir,
|
|
9
|
+
getLatestBackup,
|
|
10
|
+
hasBackupToday,
|
|
11
|
+
hasEnoughDiskSpace,
|
|
12
|
+
hasRecentBackup,
|
|
13
|
+
listBackups,
|
|
14
|
+
pruneCorruptQuarantine,
|
|
15
|
+
restoreBackup,
|
|
16
|
+
rotateBackups,
|
|
17
|
+
rotateBackupsByReason,
|
|
18
|
+
selectBackupsToDelete,
|
|
19
|
+
selectStaleTmpFiles
|
|
20
|
+
} from "./chunk-VWUQFZFB.js";
|
|
21
|
+
import "./chunk-R36FAN53.js";
|
|
22
|
+
import "./chunk-LYH5HE24.js";
|
|
23
|
+
import "./chunk-MLKGABMK.js";
|
|
24
|
+
export {
|
|
25
|
+
cleanupCrashDebris,
|
|
26
|
+
cleanupStaleTmp,
|
|
27
|
+
createBackup,
|
|
28
|
+
createBackupAsync,
|
|
29
|
+
enforceRetention,
|
|
30
|
+
findActiveDb,
|
|
31
|
+
getBackupDir,
|
|
32
|
+
getLatestBackup,
|
|
33
|
+
hasBackupToday,
|
|
34
|
+
hasEnoughDiskSpace,
|
|
35
|
+
hasRecentBackup,
|
|
36
|
+
listBackups,
|
|
37
|
+
pruneCorruptQuarantine,
|
|
38
|
+
restoreBackup,
|
|
39
|
+
rotateBackups,
|
|
40
|
+
rotateBackupsByReason,
|
|
41
|
+
selectBackupsToDelete,
|
|
42
|
+
selectStaleTmpFiles
|
|
43
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EXTRACT_TOOL,
|
|
3
|
+
storeExtraction
|
|
4
|
+
} from "./chunk-EDMVA3PT.js";
|
|
5
|
+
import "./chunk-I7AW4237.js";
|
|
6
|
+
import "./chunk-GUMRIUI5.js";
|
|
7
|
+
import {
|
|
8
|
+
getClient
|
|
9
|
+
} from "./chunk-V6LOEOXG.js";
|
|
10
|
+
import "./chunk-2I23RPSI.js";
|
|
11
|
+
import "./chunk-VWUQFZFB.js";
|
|
12
|
+
import "./chunk-PNQDP3OA.js";
|
|
13
|
+
import "./chunk-7HLWBYH7.js";
|
|
14
|
+
import "./chunk-FXU7JOXK.js";
|
|
15
|
+
import "./chunk-R36FAN53.js";
|
|
16
|
+
import "./chunk-LYH5HE24.js";
|
|
17
|
+
import "./chunk-MLKGABMK.js";
|
|
18
|
+
|
|
19
|
+
// src/lib/doc-graph-extractor.ts
|
|
20
|
+
var CHUNK_CONTENT_LIMIT = 3e3;
|
|
21
|
+
var MAX_CHUNKS_PER_CALL = 8;
|
|
22
|
+
var DOC_GRAPH_MEMORY_PREFIX = "doc-graph:";
|
|
23
|
+
async function extractConceptsFromChunks(chunks, model = "claude-haiku-4-5-20251001") {
|
|
24
|
+
if (chunks.length === 0) {
|
|
25
|
+
return { entities: [], relationships: [], hyperedges: [] };
|
|
26
|
+
}
|
|
27
|
+
const selectedChunks = chunks.slice(0, MAX_CHUNKS_PER_CALL);
|
|
28
|
+
const combinedText = selectedChunks.map((chunk, i) => `--- Chunk ${i + 1} ---
|
|
29
|
+
${chunk.slice(0, CHUNK_CONTENT_LIMIT)}`).join("\n\n");
|
|
30
|
+
try {
|
|
31
|
+
const Anthropic = (await import("@anthropic-ai/sdk")).default;
|
|
32
|
+
const client = new Anthropic();
|
|
33
|
+
const response = await client.messages.create({
|
|
34
|
+
model,
|
|
35
|
+
max_tokens: 1024,
|
|
36
|
+
system: `You are extracting a knowledge graph from document content. Identify all key entities (people, companies, concepts, locations, projects, tools, decisions, products) and the relationships between them. Focus on explicitly stated facts \u2014 don't over-infer. Use the simplest canonical form for entity names (e.g., "Anthropic" not "Anthropic, PBC"). For relationships, prefer specific types (depends_on, created, uses, part_of, located_at, manages, supplies) over generic related_to.`,
|
|
37
|
+
messages: [{ role: "user", content: combinedText }],
|
|
38
|
+
tools: [EXTRACT_TOOL],
|
|
39
|
+
tool_choice: { type: "tool", name: "extract_entities_and_relationships" }
|
|
40
|
+
});
|
|
41
|
+
const toolBlock = response.content.find((b) => b.type === "tool_use");
|
|
42
|
+
if (toolBlock && toolBlock.type === "tool_use") {
|
|
43
|
+
const input = toolBlock.input;
|
|
44
|
+
const rawEntities = input.entities ?? [];
|
|
45
|
+
const rawRels = input.relationships ?? [];
|
|
46
|
+
const rawHyperedges = input.hyperedges ?? [];
|
|
47
|
+
return {
|
|
48
|
+
entities: rawEntities.map((e) => ({ name: e.name ?? "", type: e.type ?? "concept" })).filter((e) => e.name.length > 0),
|
|
49
|
+
relationships: rawRels.map((r) => ({
|
|
50
|
+
source: r.source ?? "",
|
|
51
|
+
sourceType: r.source_type ?? "concept",
|
|
52
|
+
target: r.target ?? "",
|
|
53
|
+
targetType: r.target_type ?? "concept",
|
|
54
|
+
relationship: r.relationship ?? "related_to",
|
|
55
|
+
confidence: Number(r.confidence ?? 0.8),
|
|
56
|
+
confidenceLabel: String(r.confidence_label ?? "extracted")
|
|
57
|
+
})).filter((r) => r.source.length > 0 && r.target.length > 0),
|
|
58
|
+
hyperedges: rawHyperedges.map((h) => ({
|
|
59
|
+
label: String(h.label ?? ""),
|
|
60
|
+
relation: String(h.relation ?? ""),
|
|
61
|
+
entityNames: h.entity_names ?? [],
|
|
62
|
+
confidence: Number(h.confidence ?? 1)
|
|
63
|
+
})).filter((h) => h.label.length > 0 && h.entityNames.length >= 3)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
} catch (err) {
|
|
67
|
+
process.stderr.write(
|
|
68
|
+
`[doc-graph-extractor] LLM extraction failed: ${err instanceof Error ? err.message : String(err)}
|
|
69
|
+
`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return { entities: [], relationships: [], hyperedges: [] };
|
|
73
|
+
}
|
|
74
|
+
async function extractAndStoreDocumentGraph(documentId, chunks, model = "claude-haiku-4-5-20251001") {
|
|
75
|
+
if (chunks.length === 0) {
|
|
76
|
+
return { entitiesStored: 0, relationshipsStored: 0, chunksProcessed: 0 };
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
let totalEntities = 0;
|
|
80
|
+
let totalRelationships = 0;
|
|
81
|
+
let totalChunks = 0;
|
|
82
|
+
for (let i = 0; i < chunks.length; i += MAX_CHUNKS_PER_CALL) {
|
|
83
|
+
const batch = chunks.slice(i, i + MAX_CHUNKS_PER_CALL);
|
|
84
|
+
const extraction = await extractConceptsFromChunks(batch, model);
|
|
85
|
+
if (extraction.entities.length > 0 || extraction.relationships.length > 0) {
|
|
86
|
+
const client = getClient();
|
|
87
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
88
|
+
const syntheticMemoryId = `${DOC_GRAPH_MEMORY_PREFIX}${documentId}:${i}`;
|
|
89
|
+
const stored = await storeExtraction(client, extraction, syntheticMemoryId, now);
|
|
90
|
+
totalEntities += stored.entitiesStored;
|
|
91
|
+
totalRelationships += stored.relationshipsStored;
|
|
92
|
+
}
|
|
93
|
+
totalChunks += batch.length;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
entitiesStored: totalEntities,
|
|
97
|
+
relationshipsStored: totalRelationships,
|
|
98
|
+
chunksProcessed: totalChunks
|
|
99
|
+
};
|
|
100
|
+
} catch (err) {
|
|
101
|
+
process.stderr.write(
|
|
102
|
+
`[doc-graph-extractor] extractAndStoreDocumentGraph failed for ${documentId}: ${err instanceof Error ? err.message : String(err)}
|
|
103
|
+
`
|
|
104
|
+
);
|
|
105
|
+
return { entitiesStored: 0, relationshipsStored: 0, chunksProcessed: 0 };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async function extractGraphFromExistingDocument(documentId, model = "claude-haiku-4-5-20251001") {
|
|
109
|
+
const client = getClient();
|
|
110
|
+
const docResult = await client.execute({
|
|
111
|
+
sql: "SELECT id FROM documents WHERE id = ?",
|
|
112
|
+
args: [documentId]
|
|
113
|
+
});
|
|
114
|
+
if (docResult.rows.length === 0) {
|
|
115
|
+
throw new Error(`Document not found: ${documentId}`);
|
|
116
|
+
}
|
|
117
|
+
const chunksResult = await client.execute({
|
|
118
|
+
sql: `SELECT raw_text FROM memories
|
|
119
|
+
WHERE document_id = ? AND COALESCE(status, 'active') = 'active'
|
|
120
|
+
ORDER BY char_offset ASC, timestamp ASC`,
|
|
121
|
+
args: [documentId]
|
|
122
|
+
});
|
|
123
|
+
if (chunksResult.rows.length === 0) {
|
|
124
|
+
return { entitiesStored: 0, relationshipsStored: 0, chunksProcessed: 0 };
|
|
125
|
+
}
|
|
126
|
+
const chunkTexts = chunksResult.rows.map((row) => String(row.raw_text));
|
|
127
|
+
return extractAndStoreDocumentGraph(documentId, chunkTexts, model);
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
extractAndStoreDocumentGraph,
|
|
131
|
+
extractConceptsFromChunks,
|
|
132
|
+
extractGraphFromExistingDocument
|
|
133
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DreamingEngine
|
|
3
|
+
} from "./chunk-QIGS2LRT.js";
|
|
4
|
+
import "./chunk-ZSUACDQC.js";
|
|
5
|
+
import "./chunk-3LHOFGHT.js";
|
|
6
|
+
import "./chunk-4FVVJ7ME.js";
|
|
7
|
+
import "./chunk-4JERP7NT.js";
|
|
8
|
+
import "./chunk-5TO5PH7O.js";
|
|
9
|
+
import "./chunk-KOO3J5PV.js";
|
|
10
|
+
import "./chunk-22TVSRQQ.js";
|
|
11
|
+
import "./chunk-SSTLTIF3.js";
|
|
12
|
+
import "./chunk-GJBR6QLD.js";
|
|
13
|
+
import "./chunk-QRTJNSKU.js";
|
|
14
|
+
import "./chunk-NGP6LSV2.js";
|
|
15
|
+
import "./chunk-WYVOTRRZ.js";
|
|
16
|
+
import "./chunk-CVYC6DUW.js";
|
|
17
|
+
import "./chunk-OPU3NYOO.js";
|
|
18
|
+
import "./chunk-GJV3WDWM.js";
|
|
19
|
+
import "./chunk-MP2AFCGL.js";
|
|
20
|
+
import "./chunk-ZG33AACD.js";
|
|
21
|
+
import "./chunk-HYZV25LY.js";
|
|
22
|
+
import "./chunk-V6LOEOXG.js";
|
|
23
|
+
import "./chunk-2I23RPSI.js";
|
|
24
|
+
import "./chunk-VWUQFZFB.js";
|
|
25
|
+
import "./chunk-PNQDP3OA.js";
|
|
26
|
+
import "./chunk-7HLWBYH7.js";
|
|
27
|
+
import "./chunk-FXU7JOXK.js";
|
|
28
|
+
import "./chunk-YTKVJJSU.js";
|
|
29
|
+
import "./chunk-R36FAN53.js";
|
|
30
|
+
import "./chunk-LYH5HE24.js";
|
|
31
|
+
import "./chunk-MLKGABMK.js";
|
|
32
|
+
export {
|
|
33
|
+
DreamingEngine
|
|
34
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
runDriftProbes
|
|
4
|
+
} from "./chunk-VNB4ROYG.js";
|
|
5
|
+
import "./chunk-V6LOEOXG.js";
|
|
6
|
+
import "./chunk-2I23RPSI.js";
|
|
7
|
+
import "./chunk-VWUQFZFB.js";
|
|
8
|
+
import "./chunk-PNQDP3OA.js";
|
|
9
|
+
import "./chunk-7HLWBYH7.js";
|
|
10
|
+
import "./chunk-FXU7JOXK.js";
|
|
11
|
+
import "./chunk-R36FAN53.js";
|
|
12
|
+
import "./chunk-LYH5HE24.js";
|
|
13
|
+
import "./chunk-MLKGABMK.js";
|
|
14
|
+
|
|
15
|
+
// src/bin/exe-drift.ts
|
|
16
|
+
var AXES = ["continuity", "consistency", "role-fidelity", "world-model"];
|
|
17
|
+
var AXIS_HEADERS = {
|
|
18
|
+
continuity: "Cont.",
|
|
19
|
+
consistency: "Consist.",
|
|
20
|
+
"role-fidelity": "Role",
|
|
21
|
+
"world-model": "World"
|
|
22
|
+
};
|
|
23
|
+
function statusIcon(overall) {
|
|
24
|
+
if (overall >= 80) return "\x1B[32m\u{1F7E2} OK\x1B[0m";
|
|
25
|
+
if (overall >= 60) return "\x1B[33m\u{1F7E0} WARN\x1B[0m";
|
|
26
|
+
return "\x1B[31m\u{1F534} DRIFTING\x1B[0m";
|
|
27
|
+
}
|
|
28
|
+
function padRight(str, len) {
|
|
29
|
+
return str.length >= len ? str.slice(0, len) : str + " ".repeat(len - str.length);
|
|
30
|
+
}
|
|
31
|
+
function padLeft(str, len) {
|
|
32
|
+
return str.length >= len ? str : " ".repeat(len - str.length) + str;
|
|
33
|
+
}
|
|
34
|
+
function formatTable(results) {
|
|
35
|
+
const lines = [];
|
|
36
|
+
const header = padRight("Agent", 10) + AXES.map((a) => padLeft(AXIS_HEADERS[a], 9)).join("") + padLeft("Overall", 9) + " Status";
|
|
37
|
+
lines.push(header);
|
|
38
|
+
lines.push("-".repeat(header.length + 10));
|
|
39
|
+
for (const r of results) {
|
|
40
|
+
const line = padRight(r.agent, 10) + AXES.map((a) => padLeft(String(r.scores[a]), 9)).join("") + padLeft(String(r.overall), 9) + " " + statusIcon(r.overall);
|
|
41
|
+
lines.push(line);
|
|
42
|
+
}
|
|
43
|
+
return lines.join("\n");
|
|
44
|
+
}
|
|
45
|
+
async function runDrift(args) {
|
|
46
|
+
const agentIdx = args.indexOf("--agent");
|
|
47
|
+
const agentId = agentIdx >= 0 ? args[agentIdx + 1] : void 0;
|
|
48
|
+
console.log("\nexe-os doctor --drift\n");
|
|
49
|
+
const results = await runDriftProbes({ agentId });
|
|
50
|
+
if (results.length === 0) {
|
|
51
|
+
console.log("No agents found. Run /exe-team to see available employees.");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
console.log(formatTable(results));
|
|
55
|
+
console.log();
|
|
56
|
+
const flagged = results.filter((r) => r.flags.length > 0);
|
|
57
|
+
if (flagged.length > 0) {
|
|
58
|
+
for (const r of flagged) {
|
|
59
|
+
for (const flag of r.flags) {
|
|
60
|
+
console.log(`\u26A0 ${r.agent}: ${flag}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
console.log();
|
|
64
|
+
} else {
|
|
65
|
+
console.log("All agents within role-fidelity thresholds.\n");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
runDrift
|
|
70
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
exportOrchestration
|
|
4
|
+
} from "./chunk-LSDXEHKL.js";
|
|
5
|
+
import "./chunk-VUH67PT4.js";
|
|
6
|
+
import "./chunk-FNHYH5U6.js";
|
|
7
|
+
import {
|
|
8
|
+
disposeStore,
|
|
9
|
+
initStore
|
|
10
|
+
} from "./chunk-YHJPTIPR.js";
|
|
11
|
+
import "./chunk-CHCA3ZM2.js";
|
|
12
|
+
import "./chunk-OTVEIJUQ.js";
|
|
13
|
+
import "./chunk-FZB73QOI.js";
|
|
14
|
+
import "./chunk-Y25OJWOQ.js";
|
|
15
|
+
import "./chunk-MP2AFCGL.js";
|
|
16
|
+
import "./chunk-V6LOEOXG.js";
|
|
17
|
+
import "./chunk-2I23RPSI.js";
|
|
18
|
+
import "./chunk-VWUQFZFB.js";
|
|
19
|
+
import "./chunk-PNQDP3OA.js";
|
|
20
|
+
import "./chunk-7HLWBYH7.js";
|
|
21
|
+
import "./chunk-FXU7JOXK.js";
|
|
22
|
+
import "./chunk-Z42MXYWW.js";
|
|
23
|
+
import "./chunk-R36FAN53.js";
|
|
24
|
+
import "./chunk-LYH5HE24.js";
|
|
25
|
+
import {
|
|
26
|
+
isMainModule
|
|
27
|
+
} from "./chunk-6Y4B3QF6.js";
|
|
28
|
+
import "./chunk-MLKGABMK.js";
|
|
29
|
+
|
|
30
|
+
// src/bin/exe-export.ts
|
|
31
|
+
import { mkdirSync, writeFileSync } from "fs";
|
|
32
|
+
import path from "path";
|
|
33
|
+
var OUTPUT_FLAG = "--output";
|
|
34
|
+
function printUsage() {
|
|
35
|
+
process.stdout.write("Usage: exe-os export --output <path>\n");
|
|
36
|
+
}
|
|
37
|
+
function parseOutputPath(argv) {
|
|
38
|
+
if (argv.includes("--help") || argv.includes("-h")) {
|
|
39
|
+
printUsage();
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const flagIndex = argv.indexOf(OUTPUT_FLAG);
|
|
43
|
+
if (flagIndex === -1 || !argv[flagIndex + 1]) {
|
|
44
|
+
throw new Error("Missing required --output <path> argument");
|
|
45
|
+
}
|
|
46
|
+
return argv[flagIndex + 1];
|
|
47
|
+
}
|
|
48
|
+
async function runExeExport(argv = process.argv.slice(2)) {
|
|
49
|
+
const outputPath = parseOutputPath(argv);
|
|
50
|
+
if (outputPath == null) return;
|
|
51
|
+
await initStore();
|
|
52
|
+
try {
|
|
53
|
+
const pkg = await exportOrchestration("cli");
|
|
54
|
+
mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
55
|
+
writeFileSync(outputPath, `${JSON.stringify(pkg, null, 2)}
|
|
56
|
+
`, "utf-8");
|
|
57
|
+
process.stdout.write(
|
|
58
|
+
`Exported ${pkg.roster.length} roster entries, ${Object.keys(pkg.identities).length} identities, ${pkg.behaviors.length} behaviors, ${pkg.procedures.length} procedures to ${outputPath}
|
|
59
|
+
`
|
|
60
|
+
);
|
|
61
|
+
} finally {
|
|
62
|
+
try {
|
|
63
|
+
await disposeStore();
|
|
64
|
+
} catch {
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (isMainModule(import.meta.url) && (process.argv[1] ?? "").includes("exe-export")) {
|
|
69
|
+
runExeExport().catch((err) => {
|
|
70
|
+
process.stderr.write(`exe-os export failed: ${err instanceof Error ? err.message : String(err)}
|
|
71
|
+
`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
runExeExport
|
|
77
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
importOrchestration,
|
|
4
|
+
validatePackage
|
|
5
|
+
} from "./chunk-LSDXEHKL.js";
|
|
6
|
+
import "./chunk-VUH67PT4.js";
|
|
7
|
+
import "./chunk-FNHYH5U6.js";
|
|
8
|
+
import {
|
|
9
|
+
disposeStore,
|
|
10
|
+
initStore
|
|
11
|
+
} from "./chunk-YHJPTIPR.js";
|
|
12
|
+
import "./chunk-CHCA3ZM2.js";
|
|
13
|
+
import "./chunk-OTVEIJUQ.js";
|
|
14
|
+
import "./chunk-FZB73QOI.js";
|
|
15
|
+
import "./chunk-Y25OJWOQ.js";
|
|
16
|
+
import "./chunk-MP2AFCGL.js";
|
|
17
|
+
import "./chunk-V6LOEOXG.js";
|
|
18
|
+
import "./chunk-2I23RPSI.js";
|
|
19
|
+
import "./chunk-VWUQFZFB.js";
|
|
20
|
+
import "./chunk-PNQDP3OA.js";
|
|
21
|
+
import "./chunk-7HLWBYH7.js";
|
|
22
|
+
import "./chunk-FXU7JOXK.js";
|
|
23
|
+
import "./chunk-Z42MXYWW.js";
|
|
24
|
+
import "./chunk-R36FAN53.js";
|
|
25
|
+
import "./chunk-LYH5HE24.js";
|
|
26
|
+
import {
|
|
27
|
+
isMainModule
|
|
28
|
+
} from "./chunk-6Y4B3QF6.js";
|
|
29
|
+
import "./chunk-MLKGABMK.js";
|
|
30
|
+
|
|
31
|
+
// src/bin/exe-import.ts
|
|
32
|
+
import { readFileSync } from "fs";
|
|
33
|
+
var FROM_FLAG = "--from";
|
|
34
|
+
var MERGE_FLAG = "--merge";
|
|
35
|
+
function printUsage() {
|
|
36
|
+
process.stdout.write("Usage: exe-os import --from <path> [--merge]\n");
|
|
37
|
+
}
|
|
38
|
+
function parseArgs(argv) {
|
|
39
|
+
if (argv.includes("--help") || argv.includes("-h")) {
|
|
40
|
+
printUsage();
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const flagIndex = argv.indexOf(FROM_FLAG);
|
|
44
|
+
if (flagIndex === -1 || !argv[flagIndex + 1]) {
|
|
45
|
+
throw new Error("Missing required --from <path> argument");
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
packagePath: argv[flagIndex + 1],
|
|
49
|
+
strategy: argv.includes(MERGE_FLAG) ? "merge" : "replace"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
async function runExeImport(argv = process.argv.slice(2)) {
|
|
53
|
+
const parsed = parseArgs(argv);
|
|
54
|
+
if (parsed == null) return;
|
|
55
|
+
await initStore();
|
|
56
|
+
try {
|
|
57
|
+
const raw = readFileSync(parsed.packagePath, "utf-8");
|
|
58
|
+
const pkg = validatePackage(JSON.parse(raw));
|
|
59
|
+
const result = await importOrchestration(pkg, parsed.strategy);
|
|
60
|
+
process.stdout.write(
|
|
61
|
+
`Imported ${result.imported.roster} roster entries, ${result.imported.identities} identities, ${result.imported.behaviors} behaviors, ${result.imported.procedures} procedures using ${parsed.strategy} strategy
|
|
62
|
+
`
|
|
63
|
+
);
|
|
64
|
+
} finally {
|
|
65
|
+
try {
|
|
66
|
+
await disposeStore();
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (isMainModule(import.meta.url) && (process.argv[1] ?? "").includes("exe-import")) {
|
|
72
|
+
runExeImport().catch((err) => {
|
|
73
|
+
process.stderr.write(`exe-os import failed: ${err instanceof Error ? err.message : String(err)}
|
|
74
|
+
`);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
runExeImport
|
|
80
|
+
};
|