@askexenow/exe-os 0.9.357 → 0.9.359
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/stack-manifests/v0.9.json +3 -3
- package/dist/.dist-verified.json +6 -0
- package/dist/{active-agent-PYMOMGQ7.js → active-agent-DMKNHGSG.js} +6 -4
- package/dist/{active-agent-LCRV3HVS.js → active-agent-Y3DCBD7J.js} +6 -4
- package/dist/{agentic-ontology-TNKI4FOM.js → agentic-ontology-3233PNKV.js} +1 -1
- package/dist/{backfill-metadata-SFS4ARNR.js → backfill-metadata-4DS4A5U3.js} +8 -6
- package/dist/{backup-verify-7NLKR4S6.js → backup-verify-JNYKXIU2.js} +6 -1
- package/dist/{behavior-injection-OT7VX7M6.js → behavior-injection-CGAMI552.js} +10 -8
- package/dist/{behaviors-6GW5AFG4.js → behaviors-57AMN5IP.js} +9 -7
- package/dist/bin/agentic-ontology-backfill.js +9 -7
- package/dist/bin/agentic-reflection-backfill.js +10 -8
- package/dist/bin/agentic-semantic-label.js +9 -7
- package/dist/bin/backfill-conversations.js +8 -6
- package/dist/bin/backfill-responses.js +8 -6
- package/dist/bin/backfill-vectors.js +9 -7
- package/dist/bin/bulk-sync-postgres.js +18 -14
- package/dist/bin/cc-doctor.js +7 -5
- package/dist/bin/cleanup-stale-review-tasks.js +16 -14
- package/dist/bin/cli.js +19 -19
- package/dist/bin/deferred-daemon-restart.js +81 -77
- package/dist/bin/exe-agent-config.js +5 -3
- package/dist/bin/exe-agent.js +14 -12
- package/dist/bin/exe-assign.js +9 -7
- package/dist/bin/exe-boot.js +62 -28
- package/dist/bin/exe-call.js +8 -6
- package/dist/bin/exe-cloud.js +20 -16
- package/dist/bin/exe-config-dump.js +5 -3
- package/dist/bin/exe-dispatch.js +16 -14
- package/dist/bin/exe-doctor.js +9 -6
- package/dist/bin/exe-export-behaviors.js +11 -9
- package/dist/bin/exe-forget.js +10 -8
- package/dist/bin/exe-gateway.js +10 -8
- package/dist/bin/exe-grant.js +17 -4
- package/dist/bin/exe-healthcheck.js +7 -5
- package/dist/bin/exe-heartbeat.js +18 -16
- package/dist/bin/exe-kill.js +20 -18
- package/dist/bin/exe-launch-agent.js +27 -25
- package/dist/bin/exe-memory-reads.js +8 -6
- package/dist/bin/exe-new-employee.js +12 -10
- package/dist/bin/exe-os-mcp-proxy.js +6 -4
- package/dist/bin/exe-pending-messages.js +17 -15
- package/dist/bin/exe-pending-notifications.js +16 -14
- package/dist/bin/exe-pending-reviews.js +16 -14
- package/dist/bin/exe-rename.js +8 -6
- package/dist/bin/exe-review.js +19 -17
- package/dist/bin/exe-search.js +9 -7
- package/dist/bin/exe-session-cleanup.js +20 -18
- package/dist/bin/exe-settings.js +18 -14
- package/dist/bin/exe-start-codex.js +16 -14
- package/dist/bin/exe-start-opencode.js +12 -10
- package/dist/bin/exe-status.js +17 -15
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +6 -4
- package/dist/bin/exe-timers.js +2 -1
- package/dist/bin/git-sweep.js +17 -15
- package/dist/bin/graph-backfill.js +10 -8
- package/dist/bin/graph-export.js +9 -7
- package/dist/bin/import-history.js +13 -11
- package/dist/bin/install.js +83 -79
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +7 -5
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/reconcile-backlog.js +2 -2
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +16 -14
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +9 -7
- package/dist/bin/stack-update.js +4 -4
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-7ZI7JYGR.js → boot-generation-4D3CTT7X.js} +6 -4
- package/dist/{boot-review-sections-3MSXM6V7.js → boot-review-sections-NDFE5443.js} +15 -13
- package/dist/build-manifest.json +2961 -0
- package/dist/{capability-cards-4RD2SB2K.js → capability-cards-OBB7BMMX.js} +5 -3
- package/dist/{capacity-monitor-5XUR3JTN.js → capacity-monitor-QLPEL6S5.js} +17 -15
- package/dist/{catchup-brief-AYJWMQUZ.js → catchup-brief-EN7QR6MP.js} +20 -18
- package/dist/{chunk-ZMVVKOOS.js → chunk-2EAYZ3BK.js} +7 -7
- package/dist/{chunk-4KCLB4TY.js → chunk-2KLVTRY2.js} +1 -1
- package/dist/{chunk-4VU2VCEU.js → chunk-2OVTGZYH.js} +1 -1
- package/dist/{chunk-5Q2J6P4T.js → chunk-2YGAKBRG.js} +3 -3
- package/dist/{chunk-2TL5RKMC.js → chunk-3BAGFZFN.js} +1 -1
- package/dist/{chunk-PM4TIRCR.js → chunk-3ODATKWH.js} +1 -1
- package/dist/{chunk-RUBXKPOT.js → chunk-3ZEVMZ4G.js} +1 -1
- package/dist/{chunk-H4ZSOAP6.js → chunk-44WFVMZ5.js} +1 -1
- package/dist/{chunk-Y4JA5V22.js → chunk-46RPEWTH.js} +1 -1
- package/dist/{chunk-EHL4RCND.js → chunk-4DYJ6NOK.js} +6 -5
- package/dist/{chunk-ZWXSO4FN.js → chunk-4FQIWAXA.js} +9 -9
- package/dist/{chunk-YG4LS7TI.js → chunk-4WSUP4CC.js} +8 -8
- package/dist/{chunk-EWOMZLR6.js → chunk-57GRYGDU.js} +1 -1
- package/dist/{chunk-VCKIV5WG.js → chunk-5I3YC7ER.js} +2 -2
- package/dist/{chunk-UQCYG6EI.js → chunk-5UAMBMNR.js} +1 -1
- package/dist/chunk-5YEUPUV4.js +53 -0
- package/dist/{chunk-34MIJGQS.js → chunk-6EOLGE7T.js} +1 -1
- package/dist/{chunk-AWB7M62V.js → chunk-6KREY2Q7.js} +4 -4
- package/dist/{chunk-FWJFKWYA.js → chunk-6LY3QSJA.js} +2 -2
- package/dist/{chunk-7FKC2TIB.js → chunk-6SK4MM5B.js} +1 -1
- package/dist/{chunk-P7EUKYSQ.js → chunk-6WHYSLGF.js} +1 -1
- package/dist/{chunk-YSUHXDQU.js → chunk-74R44E4S.js} +21 -19
- package/dist/{chunk-DF5K4JJL.js → chunk-A5WEEND7.js} +3 -3
- package/dist/{chunk-OBWTTM7E.js → chunk-AL7JMA54.js} +2 -2
- package/dist/{chunk-JZXHLDQN.js → chunk-APR556TY.js} +1 -1
- package/dist/{chunk-G2MXTLOD.js → chunk-C5YZMYQH.js} +1 -1
- package/dist/{chunk-X7CWCQ5S.js → chunk-CAEWPEBA.js} +1 -1
- package/dist/{chunk-SFSB64NK.js → chunk-DKRSKC5R.js} +1 -1
- package/dist/{chunk-IIHFSNL4.js → chunk-DQ75MEPU.js} +1 -1
- package/dist/{chunk-H4IZKSOY.js → chunk-DWKH2H7W.js} +1 -1
- package/dist/{chunk-M5DPPJLS.js → chunk-EA5FVACM.js} +39 -7
- package/dist/{chunk-S3THSOWV.js → chunk-EUQF3JOH.js} +28 -100
- package/dist/{chunk-2LM5GO5R.js → chunk-EX2SSLNU.js} +5 -5
- package/dist/{chunk-4GGP4Q5N.js → chunk-F3QTF4T7.js} +2 -2
- package/dist/{chunk-EQQYCP6D.js → chunk-FASR2WLT.js} +1 -1
- package/dist/{chunk-NT4GET5B.js → chunk-G2KK64UB.js} +4 -4
- package/dist/{chunk-ABM3DZF3.js → chunk-G37RG543.js} +1 -1
- package/dist/{chunk-AW3WT3TJ.js → chunk-GD7VXXW6.js} +141 -140
- package/dist/{chunk-IT4TFJTK.js → chunk-GSVQBBE5.js} +3 -3
- package/dist/{chunk-LVZZ7YS3.js → chunk-HK7SQDKJ.js} +5 -5
- package/dist/chunk-HKK7LLS5.js +408 -0
- package/dist/{chunk-W3IXTUCL.js → chunk-HLEZ5O5P.js} +77 -37
- package/dist/{chunk-A5P2MMII.js → chunk-HNPHPGGF.js} +2 -2
- package/dist/{chunk-QGLAMWQJ.js → chunk-HPHF5VTT.js} +3 -3
- package/dist/{chunk-IO5FR7BZ.js → chunk-IQWAYXVF.js} +3 -3
- package/dist/{chunk-PNTRRXAN.js → chunk-JBAMYKBL.js} +1 -1
- package/dist/{chunk-2WWGTOVP.js → chunk-JE34CB5H.js} +19 -1
- package/dist/{chunk-APRVAUOR.js → chunk-JY5GAZYC.js} +1 -0
- package/dist/{chunk-PUAA3P47.js → chunk-KIXNMTGC.js} +4 -4
- package/dist/{chunk-ES4XE6AU.js → chunk-LPKTGK7L.js} +4 -4
- package/dist/{chunk-KT4RUFYO.js → chunk-LRETL4I3.js} +3 -3
- package/dist/{chunk-JO6TS75M.js → chunk-LXG37RB2.js} +1 -1
- package/dist/{chunk-CI3YVCUY.js → chunk-MCNDZU5W.js} +1 -1
- package/dist/{chunk-JLXJMDKG.js → chunk-NE57GONM.js} +1 -1
- package/dist/{chunk-72GUU6Z4.js → chunk-NKDKB2RT.js} +3 -3
- package/dist/{chunk-KP3PLOGC.js → chunk-NP2Y7P3I.js} +2 -2
- package/dist/{chunk-ES6PDSEK.js → chunk-OAYTQ4RY.js} +8 -8
- package/dist/{chunk-Z5DTZ464.js → chunk-OIS5VIAH.js} +6 -0
- package/dist/{chunk-VPMAC5VB.js → chunk-OY2PWHYR.js} +1 -1
- package/dist/{chunk-YQ7IZPVC.js → chunk-PDRIIEFV.js} +1 -1
- package/dist/{chunk-W3REQ37P.js → chunk-PLOEFBFW.js} +2 -2
- package/dist/{chunk-X4EDW3FH.js → chunk-POZGQQEZ.js} +1 -1
- package/dist/{chunk-AJGTBW3N.js → chunk-QH2XAUZ5.js} +1 -1
- package/dist/{chunk-6CZXY5BD.js → chunk-QROIFRKI.js} +5 -5
- package/dist/{chunk-P2Y6S53G.js → chunk-R6LNQAUG.js} +1 -1
- package/dist/{chunk-JKOEOHOD.js → chunk-R7F6HKTH.js} +6 -21
- package/dist/{chunk-6WAJJN5W.js → chunk-RFUTLZ2U.js} +3 -3
- package/dist/{chunk-CQPFNVWY.js → chunk-RJ67HG2P.js} +3 -3
- package/dist/{chunk-6H4ZEU7P.js → chunk-SHEWTDPC.js} +4 -4
- package/dist/{chunk-XPGUSSG7.js → chunk-SIGAQQHW.js} +1 -1
- package/dist/{chunk-PUNCHUEX.js → chunk-SNWV44E5.js} +3 -3
- package/dist/{chunk-WJIGSNJM.js → chunk-SQBNN44X.js} +12 -12
- package/dist/{chunk-6UTP7AIH.js → chunk-STFR72YH.js} +1 -1
- package/dist/chunk-TWMWHDOY.js +79 -0
- package/dist/{chunk-RZSPCNLY.js → chunk-UZ5RJYL3.js} +1 -1
- package/dist/chunk-V3W3SATA.js +135 -0
- package/dist/{chunk-WL3CT5KX.js → chunk-VCCZQDCU.js} +2 -2
- package/dist/{chunk-VU2MZ7BP.js → chunk-VNK3MNZE.js} +40 -3
- package/dist/{chunk-MVYB76QG.js → chunk-VRTCVZND.js} +16 -20
- package/dist/{chunk-UEXJYSJX.js → chunk-VXL7PJ56.js} +39 -2
- package/dist/{chunk-4OMIENRX.js → chunk-VY5VU7SX.js} +1 -1
- package/dist/{chunk-JUE37LOD.js → chunk-W3XUU36X.js} +4 -4
- package/dist/{chunk-WHQYVFE2.js → chunk-W5YV2PZE.js} +22 -15
- package/dist/{chunk-DZNXWCJN.js → chunk-WA2MJGPT.js} +1 -1
- package/dist/{chunk-LDRMNJJJ.js → chunk-WCP4OQUL.js} +2 -2
- package/dist/{chunk-25X4JD2V.js → chunk-WDA2KAV7.js} +20 -3
- package/dist/{chunk-YNYISUMW.js → chunk-WRP5AG4D.js} +1 -1
- package/dist/{chunk-HAOZB4W6.js → chunk-X2F6Q7TW.js} +1 -1
- package/dist/{chunk-TQ4O5A4S.js → chunk-XV42EAVK.js} +1 -1
- package/dist/{chunk-TAR5J7WI.js → chunk-XVTKJEI2.js} +4 -4
- package/dist/{chunk-XQAELSOQ.js → chunk-XWWNRFRF.js} +2 -2
- package/dist/{chunk-6SAQSXT2.js → chunk-YKRNH5LU.js} +1 -1
- package/dist/{chunk-QXAE6S3A.js → chunk-YMCIZCNK.js} +3 -3
- package/dist/chunk-YQGMSXT5.js +33 -0
- package/dist/{chunk-LLXYWNCH.js → chunk-Z2PAVJJ4.js} +1 -1
- package/dist/{cleanup-graph-garbage-XUNHVCRR.js → cleanup-graph-garbage-XFGY4EEE.js} +11 -9
- package/dist/{cloud-sync-shutdown-JRAERBUO.js → cloud-sync-shutdown-XCOATIJW.js} +5 -3
- package/dist/{co-activation-5AN2CF23.js → co-activation-XNBLOGK3.js} +5 -3
- package/dist/{co-occurrence-A7E774ZX.js → co-occurrence-HO4PGQC4.js} +9 -7
- package/dist/{conversation-entity-extractor-2XI2GC4N.js → conversation-entity-extractor-5G5DGRJU.js} +4 -4
- package/dist/{crdt-sync-2IUU6GZ6.js → crdt-sync-6TD7LSZW.js} +3 -2
- package/dist/{crm-webhook-BQCP77TI.js → crm-webhook-WZAV5776.js} +2 -2
- package/dist/{cto-delegation-gate-UHHNMWCL.js → cto-delegation-gate-UHMYFM4D.js} +15 -13
- package/dist/{daemon-orchestration-7WS3X5DQ.js → daemon-orchestration-DT5M2ZAR.js} +20 -19
- package/dist/{daemon-ready-signal-TVCPSG7J.js → daemon-ready-signal-CKXPUMJ2.js} +3 -1
- package/dist/{daemon-restart-report-QDRGKLL6.js → daemon-restart-report-HZU5LWXN.js} +2 -1
- package/dist/{daemon-timer-report-NM44WQRH.js → daemon-timer-report-TNJH5SFY.js} +2 -1
- package/dist/{doc-graph-extractor-NFERAJNP.js → doc-graph-extractor-FNCYPFKY.js} +9 -7
- package/dist/{documents-SW2MJUXY.js → documents-GKDZDUED.js} +9 -7
- package/dist/{dreaming-KSNJVNFH.js → dreaming-WPMQJAXW.js} +19 -17
- package/dist/{exe-drift-NBLYKQBQ.js → exe-drift-QTKD2FHT.js} +6 -4
- package/dist/{exe-export-44IWTJHL.js → exe-export-ESJ6KP6J.js} +11 -9
- package/dist/{exe-import-PPECH3KO.js → exe-import-N4X3GEQB.js} +11 -9
- package/dist/{exe-key-ZCRJQYA7.js → exe-key-KZCCHX3W.js} +84 -77
- package/dist/{exe-snapshot-OVINJ6MC.js → exe-snapshot-SCRPHCPZ.js} +20 -18
- package/dist/{fast-db-init-B5Q3SJQG.js → fast-db-init-6H67K76Q.js} +1 -1
- package/dist/{founder-context-5OFTZNDO.js → founder-context-C7X7IRDA.js} +2 -2
- package/dist/founder-monitor-envelope-DHSUMBWU.js +83 -0
- package/dist/gateway/index.js +11 -9
- package/dist/{git-staleness-XQJTOSGZ.js → git-staleness-JCKVMWPO.js} +5 -3
- package/dist/{global-procedures-YCJ3JPAP.js → global-procedures-BR7WGSE7.js} +7 -5
- package/dist/{graph-auto-extract-XJN6PQH3.js → graph-auto-extract-EOXWQRBZ.js} +9 -7
- package/dist/{graph-rag-HCQCZ2W7.js → graph-rag-5FVC5JXH.js} +4 -4
- package/dist/{hook-prefetch-FKXDTCDS.js → hook-prefetch-2CN3MK4H.js} +16 -14
- package/dist/hooks/bug-report-worker.js +18 -16
- package/dist/hooks/codex-stop-task-finalizer.js +19 -17
- package/dist/hooks/commit-complete.js +18 -16
- package/dist/hooks/error-recall.js +10 -8
- package/dist/hooks/exe-heartbeat-hook.js +6 -4
- package/dist/hooks/ingest.js +14 -102
- package/dist/hooks/instructions-loaded.js +7 -5
- package/dist/hooks/manifest.json +19 -19
- package/dist/hooks/notification.js +7 -5
- package/dist/hooks/post-compact.js +17 -15
- package/dist/hooks/post-tool-combined.js +10 -10
- package/dist/hooks/pre-compact.js +18 -16
- package/dist/hooks/pre-tool-use.js +23 -21
- package/dist/hooks/prompt-submit.js +34 -38
- package/dist/hooks/session-end.js +22 -20
- package/dist/hooks/session-start.js +13 -18
- package/dist/hooks/stop.js +21 -19
- package/dist/hooks/subagent-stop.js +19 -17
- package/dist/hooks/summary-worker.js +22 -25
- package/dist/index.js +25 -23
- package/dist/{installer-YSCUE6MT.js → installer-7UV3CNWZ.js} +8 -6
- package/dist/{installer-YTT5OSRL.js → installer-VPNTM3X6.js} +8 -6
- package/dist/{installer-G3DVMNC6.js → installer-YDLSXGD2.js} +8 -6
- package/dist/{intercom-queue-5D52JF3Q.js → intercom-queue-KHKJJYCQ.js} +15 -13
- package/dist/lib/cloud-sync.js +18 -14
- package/dist/lib/consolidation.js +11 -9
- package/dist/lib/crypto.js +2 -1
- package/dist/lib/database.js +9 -3
- package/dist/lib/db-backup.js +1 -1
- package/dist/lib/db-checkpoint-worker.js +4 -0
- package/dist/lib/db-daemon-client.js +3 -1
- package/dist/lib/db-read-worker.js +4 -0
- package/dist/lib/db-write-worker.js +3 -3
- package/dist/lib/db.js +9 -3
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/employee-templates.js +8 -6
- package/dist/lib/employees.js +5 -3
- package/dist/lib/exe-daemon.js +202 -93
- package/dist/lib/hybrid-search.js +9 -7
- package/dist/lib/identity.js +5 -3
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +16 -14
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +6 -4
- package/dist/lib/schedules.js +9 -7
- package/dist/lib/session-registry.js +7 -5
- package/dist/lib/skill-learning.js +10 -8
- package/dist/lib/store.js +8 -6
- package/dist/lib/task-router.js +6 -4
- package/dist/lib/tasks.js +17 -15
- package/dist/lib/tmux-routing.js +15 -13
- package/dist/lib/token-spend.js +8 -4
- package/dist/{license-gate-DKYHCAMN.js → license-gate-YXUSNA2I.js} +3 -3
- package/dist/{license-sync-JVEXPDHN.js → license-sync-XFDOXL3Z.js} +2 -2
- package/dist/mcp/register-tools.js +80 -76
- package/dist/mcp/server.js +81 -77
- package/dist/mcp/tools/complete-reminder.js +7 -5
- package/dist/mcp/tools/create-reminder.js +7 -5
- package/dist/mcp/tools/create-task.js +19 -17
- package/dist/mcp/tools/deactivate-behavior.js +11 -9
- package/dist/mcp/tools/list-reminders.js +7 -5
- package/dist/mcp/tools/list-tasks.js +19 -17
- package/dist/mcp/tools/send-message.js +18 -16
- package/dist/mcp/tools/update-task.js +18 -16
- package/dist/{mcp-health-WDOB6XUB.js → mcp-health-HNVSWKFA.js} +6 -1
- package/dist/{mcp-http-config-L5RDDU6P.js → mcp-http-config-HIP5CEDV.js} +6 -4
- package/dist/{mcp-session-identity-S6UCHBER.js → mcp-session-identity-RTNZ2ZLW.js} +15 -13
- package/dist/{memory-cards-65RGFT5M.js → memory-cards-KG4TPNKK.js} +8 -6
- package/dist/{memory-graph-extractor-ZDZ5VQUX.js → memory-graph-extractor-6HTBLO2N.js} +10 -8
- package/dist/{memory-poisoning-defense-EQUQNXRE.js → memory-poisoning-defense-3ZT57RSJ.js} +5 -3
- package/dist/{memory-pressure-watchdog-CC344JBH.js → memory-pressure-watchdog-ZOZBIMKC.js} +16 -14
- package/dist/{memory-reflection-Q4OT4V55.js → memory-reflection-EQC4FXSW.js} +5 -3
- package/dist/{monitor-grants-NWSQ7ZCQ.js → monitor-grants-BDLVFVDR.js} +3 -1
- package/dist/{notification-ledger-GL3ZPZNR.js → notification-ledger-NZ4HO3M5.js} +16 -14
- package/dist/{notifications-FGYNO2FY.js → notifications-74YECZ4V.js} +15 -13
- package/dist/{orchestration-events-N5FQ4SKU.js → orchestration-events-KRQI4ED5.js} +6 -4
- package/dist/{orchestrator-XUJDK4EW.js → orchestrator-WV2YCHTK.js} +17 -15
- package/dist/org-membership-B32NS5NI.js +34 -0
- package/dist/{pipeline-router-YQOZ4M62.js → pipeline-router-6ZZV7JMA.js} +6 -4
- package/dist/{plan-limits-VBHKYKSK.js → plan-limits-B7AZKZ6U.js} +8 -6
- package/dist/{platform-procedures-F3XB6WWM.js → platform-procedures-2VQGBJU7.js} +1 -1
- package/dist/{projection-worker-NJUNGEXE.js → projection-worker-LRFFQ6JB.js} +2 -2
- package/dist/{prospective-memory-3MKUPDVI.js → prospective-memory-A4GDTIWG.js} +5 -3
- package/dist/{reranker-LGSIL6TX.js → reranker-YVTLJCFC.js} +1 -1
- package/dist/{retrieval-health-AEEQ5IO6.js → retrieval-health-PK2ODTXM.js} +1 -1
- package/dist/{review-polling-2RMEZ5QO.js → review-polling-JFWRNQF6.js} +16 -14
- package/dist/runtime/index.js +19 -17
- package/dist/{session-events-5XSYCV4I.js → session-events-VMQBCUH3.js} +16 -14
- package/dist/{session-kill-telemetry-QJUHG3IG.js → session-kill-telemetry-Z3W256T5.js} +16 -14
- package/dist/{session-scope-LIJ746K2.js → session-scope-2ADEVY3C.js} +15 -13
- package/dist/{setup-wizard-RLUCGGA7.js → setup-wizard-26B36FMC.js} +1 -1
- package/dist/{shard-manager-3L2NMJVJ.js → shard-manager-DFLCDZT5.js} +2 -1
- package/dist/{skill-refinement-FMN3WFSG.js → skill-refinement-APBYOSGX.js} +6 -4
- package/dist/{stack-promote-BGDGAYKG.js → stack-promote-SZYIPTFT.js} +29 -4
- package/dist/{stack-release-SOIHMI3I.js → stack-release-EYRDEGPD.js} +4 -4
- package/dist/{stack-update-AXFHJRK5.js → stack-update-YWK2YXP6.js} +3 -3
- package/dist/{steward-gate-R2XWABMV.js → steward-gate-CIOBPNX6.js} +6 -4
- package/dist/{support-inbox-IITW66TG.js → support-inbox-OAWGFRKW.js} +3 -3
- package/dist/{support-outbox-WHGPUYL2.js → support-outbox-DSWU3IXH.js} +1 -1
- package/dist/{task-enforcement-SFZGBY27.js → task-enforcement-YAU6ZGDC.js} +16 -14
- package/dist/{task-scope-74ZIFQRH.js → task-scope-44N7XP5N.js} +15 -13
- package/dist/{tasks-crud-N54JZCXU.js → tasks-crud-IWVDREXG.js} +15 -13
- package/dist/{tasks-notify-62IJZW55.js → tasks-notify-WK5HA77D.js} +16 -14
- package/dist/{tasks-review-3LHBE6ZJ.js → tasks-review-VDFWFETP.js} +15 -13
- package/dist/{telemetry-upload-HR3QIWZV.js → telemetry-upload-3X5ESEKM.js} +20 -180
- package/dist/{token-budget-DBXHLCMN.js → token-budget-WZGO22ME.js} +6 -4
- package/dist/{tool-telemetry-UFUTCNE3.js → tool-telemetry-F7RWUNVK.js} +1 -1
- package/dist/tui/App.js +24 -22
- package/dist/{tui-data-BPXEJKRQ.js → tui-data-KT7YGVQS.js} +15 -13
- package/dist/{update-support-HLZ7KMVM.js → update-support-ZVRMECNQ.js} +13 -11
- package/dist/{work-state-heartbeat-IQI3LCHN.js → work-state-heartbeat-CA4CN7DQ.js} +1 -1
- package/dist/{worker-gate-5ABYGLC2.js → worker-gate-52MVKYGZ.js} +1 -1
- package/dist/{workflow-engine-XSUWZK6I.js → workflow-engine-ZAFBPVUP.js} +2 -2
- package/dist/{worktree-EUYBBABA.js → worktree-NNVXVV6A.js} +7 -5
- package/dist/{worktree-sweep-LSKFA2PK.js → worktree-sweep-IM2ZQG6Z.js} +8 -6
- package/package.json +14 -4
- package/release-notes.json +34 -30
- package/dist/chunk-7HLWBYH7.js +0 -60
- /package/dist/{chunk-AK77MITT.js → chunk-6JTKIXLU.js} +0 -0
- /package/dist/{chunk-HABPXFHZ.js → chunk-BGYCUZYK.js} +0 -0
- /package/dist/{chunk-GVU3BW6N.js → chunk-COHHVCFA.js} +0 -0
- /package/dist/{chunk-VML2UQK7.js → chunk-FVWI2AR4.js} +0 -0
- /package/dist/{chunk-2267TRAO.js → chunk-R62ITJDQ.js} +0 -0
- /package/dist/{chunk-HMBMHZ3S.js → chunk-U7RZIY74.js} +0 -0
- /package/dist/{chunk-7GOSAV25.js → chunk-XLEYCOHX.js} +0 -0
- /package/dist/{chunk-A627QFOE.js → chunk-YBX3G5OP.js} +0 -0
- /package/dist/{chunk-IHKRHGKT.js → chunk-ZMYXQU4L.js} +0 -0
- /package/dist/{core-memory-KXE4QMOA.js → core-memory-AATZRQEY.js} +0 -0
- /package/dist/{memory-isolation-VSKUKTN4.js → memory-isolation-CF6FYSXD.js} +0 -0
- /package/dist/{oauth-server-JELOVN5D.js → oauth-server-VE5ELXTF.js} +0 -0
- /package/dist/{project-boot-LQ4CF6BI.js → project-boot-WEQSKDD7.js} +0 -0
- /package/dist/{wiki-acl-VR4AFJ3T.js → wiki-acl-GNIXYWHJ.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLATFORM_PROCEDURE_TITLES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3BAGFZFN.js";
|
|
4
4
|
import {
|
|
5
5
|
isGhostBehaviorRow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6LY3QSJA.js";
|
|
7
7
|
import {
|
|
8
8
|
getClient,
|
|
9
9
|
getIdentity,
|
|
10
10
|
listIdentities,
|
|
11
11
|
updateIdentity
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EA5FVACM.js";
|
|
13
13
|
import {
|
|
14
14
|
atomicWriteJsonSync
|
|
15
15
|
} from "./chunk-HSGBZSCA.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveType
|
|
3
|
+
} from "./chunk-GUMRIUI5.js";
|
|
1
4
|
import {
|
|
2
5
|
chunkSourceFile,
|
|
3
6
|
languageForFile
|
|
4
7
|
} from "./chunk-Z6BZQHP5.js";
|
|
5
|
-
import {
|
|
6
|
-
resolveType
|
|
7
|
-
} from "./chunk-GUMRIUI5.js";
|
|
8
8
|
import {
|
|
9
9
|
WORK_STATE_HEARTBEAT_TOOL
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZMYXQU4L.js";
|
|
11
11
|
import {
|
|
12
12
|
hashMemoryContent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FVWI2AR4.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/graph-rag.ts
|
|
16
16
|
import crypto from "crypto";
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import {
|
|
2
|
+
grantsRegistryStatus,
|
|
3
|
+
listGrants,
|
|
4
|
+
resolveExeDataDir,
|
|
5
|
+
revokeGrant
|
|
6
|
+
} from "./chunk-VXL7PJ56.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/org-membership.ts
|
|
9
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync, rmSync as rmSync2 } from "fs";
|
|
10
|
+
import path2 from "path";
|
|
11
|
+
|
|
12
|
+
// src/lib/org-mode-anchor.ts
|
|
13
|
+
import { execFileSync } from "child_process";
|
|
14
|
+
import { existsSync, readFileSync, writeFileSync, rmSync, statSync, chmodSync } from "fs";
|
|
15
|
+
import os from "os";
|
|
16
|
+
import path from "path";
|
|
17
|
+
var SERVICE = "exe-os";
|
|
18
|
+
var ANCHOR_ACCOUNT = "org-mode-anchor";
|
|
19
|
+
var ANCHOR_VALUE = "org-mode";
|
|
20
|
+
var ORG_MODE_ANCHOR_FILENAME = ".exe-os-install-state";
|
|
21
|
+
var _anchorSeen = false;
|
|
22
|
+
var _keychainChecked = false;
|
|
23
|
+
var _keychainResult = false;
|
|
24
|
+
var _macDefaultKeychainProbe = null;
|
|
25
|
+
function macDefaultKeychainExists() {
|
|
26
|
+
if (_macDefaultKeychainProbe !== null) return _macDefaultKeychainProbe;
|
|
27
|
+
try {
|
|
28
|
+
const out = execFileSync("security", ["default-keychain"], {
|
|
29
|
+
encoding: "utf-8",
|
|
30
|
+
timeout: 5e3,
|
|
31
|
+
stdio: ["pipe", "pipe", "ignore"]
|
|
32
|
+
}).trim();
|
|
33
|
+
_macDefaultKeychainProbe = out.length > 0;
|
|
34
|
+
} catch {
|
|
35
|
+
_macDefaultKeychainProbe = false;
|
|
36
|
+
}
|
|
37
|
+
return _macDefaultKeychainProbe;
|
|
38
|
+
}
|
|
39
|
+
function nativeKeychainAllowed() {
|
|
40
|
+
if (process.env.EXE_OS_DISABLE_NATIVE_KEYCHAIN === "1") return false;
|
|
41
|
+
if (process.env.EXE_IS_DAEMON === "1") return false;
|
|
42
|
+
if (process.env.SSH_CONNECTION || process.env.SSH_TTY) return false;
|
|
43
|
+
if (process.platform === "darwin" && !macDefaultKeychainExists()) return false;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
function anchorFilePath() {
|
|
47
|
+
return path.join(os.homedir(), ORG_MODE_ANCHOR_FILENAME);
|
|
48
|
+
}
|
|
49
|
+
function repairAnchorPermissions(p) {
|
|
50
|
+
try {
|
|
51
|
+
const mode = statSync(p).mode & 511;
|
|
52
|
+
if (mode !== 384) chmodSync(p, 384);
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function keychainHasAnchor() {
|
|
57
|
+
if (_keychainChecked) return _keychainResult;
|
|
58
|
+
_keychainResult = keychainGet() === ANCHOR_VALUE;
|
|
59
|
+
_keychainChecked = true;
|
|
60
|
+
return _keychainResult;
|
|
61
|
+
}
|
|
62
|
+
var _probeCount = 0;
|
|
63
|
+
function keychainGet() {
|
|
64
|
+
_probeCount++;
|
|
65
|
+
if (!nativeKeychainAllowed()) return null;
|
|
66
|
+
try {
|
|
67
|
+
if (process.platform === "darwin") {
|
|
68
|
+
return execFileSync(
|
|
69
|
+
"security",
|
|
70
|
+
["find-generic-password", "-s", SERVICE, "-a", ANCHOR_ACCOUNT, "-w"],
|
|
71
|
+
{ encoding: "utf-8", timeout: 5e3, stdio: ["pipe", "pipe", "ignore"] }
|
|
72
|
+
).trim();
|
|
73
|
+
}
|
|
74
|
+
if (process.platform === "linux") {
|
|
75
|
+
return execFileSync(
|
|
76
|
+
"secret-tool",
|
|
77
|
+
["lookup", "service", SERVICE, "account", ANCHOR_ACCOUNT],
|
|
78
|
+
{ encoding: "utf-8", timeout: 5e3, stdio: ["pipe", "pipe", "ignore"] }
|
|
79
|
+
).trim();
|
|
80
|
+
}
|
|
81
|
+
} catch {
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function keychainSet() {
|
|
86
|
+
if (!nativeKeychainAllowed()) return false;
|
|
87
|
+
try {
|
|
88
|
+
if (process.platform === "darwin") {
|
|
89
|
+
execFileSync(
|
|
90
|
+
"security",
|
|
91
|
+
["add-generic-password", "-U", "-s", SERVICE, "-a", ANCHOR_ACCOUNT, "-w", ANCHOR_VALUE],
|
|
92
|
+
{ timeout: 5e3, stdio: ["pipe", "ignore", "ignore"] }
|
|
93
|
+
);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
if (process.platform === "linux") {
|
|
97
|
+
execFileSync(
|
|
98
|
+
"secret-tool",
|
|
99
|
+
["store", "--label", "exe-os org mode", "service", SERVICE, "account", ANCHOR_ACCOUNT],
|
|
100
|
+
{ input: ANCHOR_VALUE, timeout: 5e3, stdio: ["pipe", "ignore", "ignore"] }
|
|
101
|
+
);
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
} catch {
|
|
105
|
+
}
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
function keychainClear() {
|
|
109
|
+
if (!nativeKeychainAllowed()) return;
|
|
110
|
+
try {
|
|
111
|
+
if (process.platform === "darwin") {
|
|
112
|
+
execFileSync("security", ["delete-generic-password", "-s", SERVICE, "-a", ANCHOR_ACCOUNT], {
|
|
113
|
+
timeout: 5e3,
|
|
114
|
+
stdio: ["pipe", "ignore", "ignore"]
|
|
115
|
+
});
|
|
116
|
+
} else if (process.platform === "linux") {
|
|
117
|
+
execFileSync("secret-tool", ["clear", "service", SERVICE, "account", ANCHOR_ACCOUNT], {
|
|
118
|
+
timeout: 5e3,
|
|
119
|
+
stdio: ["pipe", "ignore", "ignore"]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
} catch {
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function orgModeAnchorPresent() {
|
|
126
|
+
if (_anchorSeen) return true;
|
|
127
|
+
const fp = anchorFilePath();
|
|
128
|
+
if (existsSync(fp)) {
|
|
129
|
+
repairAnchorPermissions(fp);
|
|
130
|
+
_anchorSeen = true;
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
if (keychainHasAnchor()) {
|
|
134
|
+
_anchorSeen = true;
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
function writeOrgModeAnchor() {
|
|
140
|
+
_anchorSeen = true;
|
|
141
|
+
const keychainOk = keychainSet();
|
|
142
|
+
_keychainChecked = keychainOk;
|
|
143
|
+
_keychainResult = keychainOk;
|
|
144
|
+
try {
|
|
145
|
+
writeFileSync(
|
|
146
|
+
anchorFilePath(),
|
|
147
|
+
JSON.stringify({ version: 1, anchored_at: (/* @__PURE__ */ new Date()).toISOString() }, null, 2),
|
|
148
|
+
{ mode: 384 }
|
|
149
|
+
);
|
|
150
|
+
} catch (err) {
|
|
151
|
+
if (!keychainOk) {
|
|
152
|
+
process.stderr.write(
|
|
153
|
+
`[exe-os] \u26A0 could not persist the org-mode anchor outside the data dir (${err instanceof Error ? err.message : String(err)}). Org mode still holds for this process and via the in-data-dir latch; re-run once the home directory is writable.
|
|
154
|
+
`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function clearOrgModeAnchor() {
|
|
160
|
+
keychainClear();
|
|
161
|
+
rmSync(anchorFilePath(), { force: true });
|
|
162
|
+
_anchorSeen = false;
|
|
163
|
+
_keychainChecked = true;
|
|
164
|
+
_keychainResult = false;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// src/lib/org-membership.ts
|
|
168
|
+
var ORG_MEMBERSHIPS_FILENAME = "org-memberships.json";
|
|
169
|
+
var ORG_MODE_MARKER_FILENAME = "org-mode.marker";
|
|
170
|
+
var CONFIG_FILENAME = "config.json";
|
|
171
|
+
var ORG_MODE_CLEAR_CONFIRMATION = "I am leaving all orgs and accept founder-mode monitoring";
|
|
172
|
+
var _latchedOrgMode = false;
|
|
173
|
+
var _quarantinePending = false;
|
|
174
|
+
function dataDir() {
|
|
175
|
+
return resolveExeDataDir();
|
|
176
|
+
}
|
|
177
|
+
function orgMembershipsPath() {
|
|
178
|
+
return path2.join(dataDir(), ORG_MEMBERSHIPS_FILENAME);
|
|
179
|
+
}
|
|
180
|
+
function markerPath() {
|
|
181
|
+
return path2.join(dataDir(), ORG_MODE_MARKER_FILENAME);
|
|
182
|
+
}
|
|
183
|
+
function configPath() {
|
|
184
|
+
return path2.join(dataDir(), CONFIG_FILENAME);
|
|
185
|
+
}
|
|
186
|
+
function readActiveOrgMemberships() {
|
|
187
|
+
const p = orgMembershipsPath();
|
|
188
|
+
if (!existsSync2(p)) return [];
|
|
189
|
+
const parsed = JSON.parse(readFileSync2(p, "utf8"));
|
|
190
|
+
if (typeof parsed !== "object" || parsed === null || !Array.isArray(parsed.memberships)) {
|
|
191
|
+
throw new Error(`Malformed org-memberships file: ${p}`);
|
|
192
|
+
}
|
|
193
|
+
const out = [];
|
|
194
|
+
for (const m of parsed.memberships) {
|
|
195
|
+
if (typeof m !== "object" || m === null) throw new Error(`Malformed membership entry in ${p}`);
|
|
196
|
+
const rec = m;
|
|
197
|
+
if (typeof rec.org_id !== "string" || rec.org_id.length === 0) {
|
|
198
|
+
throw new Error(`Membership entry missing org_id in ${p}`);
|
|
199
|
+
}
|
|
200
|
+
if (rec.status !== "invited" && rec.status !== "active" && rec.status !== "revoked") {
|
|
201
|
+
throw new Error(`Membership entry has invalid status in ${p}`);
|
|
202
|
+
}
|
|
203
|
+
if (rec.status !== "revoked") out.push(rec);
|
|
204
|
+
}
|
|
205
|
+
return out;
|
|
206
|
+
}
|
|
207
|
+
function establishOrgMode(orgIds = []) {
|
|
208
|
+
_latchedOrgMode = true;
|
|
209
|
+
writeOrgModeAnchor();
|
|
210
|
+
const dir = dataDir();
|
|
211
|
+
try {
|
|
212
|
+
mkdirSync(dir, { recursive: true });
|
|
213
|
+
const prev = readMarker();
|
|
214
|
+
const known = Array.isArray(prev.org_ids) ? prev.org_ids.filter((x) => typeof x === "string") : [];
|
|
215
|
+
const merged = Array.from(/* @__PURE__ */ new Set([...known, ...orgIds]));
|
|
216
|
+
writeFileSync2(
|
|
217
|
+
markerPath(),
|
|
218
|
+
JSON.stringify(
|
|
219
|
+
{
|
|
220
|
+
...prev,
|
|
221
|
+
version: 1,
|
|
222
|
+
established_at: typeof prev.established_at === "string" ? prev.established_at : (/* @__PURE__ */ new Date()).toISOString(),
|
|
223
|
+
org_ids: merged
|
|
224
|
+
},
|
|
225
|
+
null,
|
|
226
|
+
2
|
|
227
|
+
)
|
|
228
|
+
);
|
|
229
|
+
const cp = configPath();
|
|
230
|
+
let cfg = {};
|
|
231
|
+
if (existsSync2(cp)) {
|
|
232
|
+
try {
|
|
233
|
+
const parsed = JSON.parse(readFileSync2(cp, "utf8"));
|
|
234
|
+
if (typeof parsed === "object" && parsed !== null) cfg = parsed;
|
|
235
|
+
} catch {
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (cfg.org_mode_established !== true) {
|
|
239
|
+
cfg.org_mode_established = true;
|
|
240
|
+
writeFileSync2(cp, JSON.stringify(cfg, null, 2));
|
|
241
|
+
}
|
|
242
|
+
} catch (err) {
|
|
243
|
+
process.stderr.write(
|
|
244
|
+
`[exe-os] \u26A0 could not persist the org-mode latch (${err instanceof Error ? err.message : String(err)}) \u2014 org mode remains active for this process
|
|
245
|
+
`
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
ensureGrantsQuarantined();
|
|
249
|
+
}
|
|
250
|
+
var QUARANTINE_DONE_KEY = "grants_quarantined_at";
|
|
251
|
+
function readMarker() {
|
|
252
|
+
const mp = markerPath();
|
|
253
|
+
if (!existsSync2(mp)) return {};
|
|
254
|
+
try {
|
|
255
|
+
const parsed = JSON.parse(readFileSync2(mp, "utf8"));
|
|
256
|
+
return typeof parsed === "object" && parsed !== null ? parsed : {};
|
|
257
|
+
} catch {
|
|
258
|
+
return {};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function recordQuarantineDone() {
|
|
262
|
+
try {
|
|
263
|
+
const marker = readMarker();
|
|
264
|
+
marker[QUARANTINE_DONE_KEY] = (/* @__PURE__ */ new Date()).toISOString();
|
|
265
|
+
writeFileSync2(markerPath(), JSON.stringify(marker, null, 2));
|
|
266
|
+
} catch {
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function ensureGrantsQuarantined() {
|
|
270
|
+
if (typeof readMarker()[QUARANTINE_DONE_KEY] === "string") {
|
|
271
|
+
_quarantinePending = false;
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const status = grantsRegistryStatus();
|
|
275
|
+
if (status === "absent") {
|
|
276
|
+
_quarantinePending = false;
|
|
277
|
+
recordQuarantineDone();
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (status === "unverifiable") {
|
|
281
|
+
_quarantinePending = true;
|
|
282
|
+
warnQuarantineDeferredOnce(
|
|
283
|
+
"[exe-os] \u26A0 org mode: monitoring grants cannot be integrity-verified yet (encryption key not primed) \u2014 quarantine deferred and will retry. Grants are inert meanwhile (the monitoring writer refuses to run in org mode).\n"
|
|
284
|
+
);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
try {
|
|
288
|
+
_quarantinePending = true;
|
|
289
|
+
const active = listGrants().filter((g) => g.revoked_at === null);
|
|
290
|
+
let revoked = 0;
|
|
291
|
+
for (const g of active) revoked += revokeGrant(g.grant_id);
|
|
292
|
+
const remaining = listGrants().filter((g) => g.revoked_at === null).length;
|
|
293
|
+
if (remaining > 0) {
|
|
294
|
+
process.stderr.write(
|
|
295
|
+
`[exe-os] \u26A0 org mode: ${remaining} monitoring grant(s) could not be quarantined \u2014 will retry.
|
|
296
|
+
`
|
|
297
|
+
);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (revoked > 0) {
|
|
301
|
+
process.stderr.write(
|
|
302
|
+
`[exe-os] \u26A0 org mode established \u2014 quarantined ${revoked} active monitoring grant(s). External monitoring recipients are not permitted on an org install; future sync blobs are encrypted to your key only.
|
|
303
|
+
`
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
_quarantinePending = false;
|
|
307
|
+
recordQuarantineDone();
|
|
308
|
+
} catch (err) {
|
|
309
|
+
process.stderr.write(
|
|
310
|
+
`[exe-os] \u26A0 org mode: monitoring-grant quarantine failed (${err instanceof Error ? err.message : String(err)}) \u2014 will retry. Review with: exe-os grant list
|
|
311
|
+
`
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function stickyLatchPresent() {
|
|
316
|
+
if (existsSync2(markerPath())) return true;
|
|
317
|
+
const cp = configPath();
|
|
318
|
+
if (!existsSync2(cp)) return false;
|
|
319
|
+
try {
|
|
320
|
+
const cfg = JSON.parse(readFileSync2(cp, "utf8"));
|
|
321
|
+
return cfg.org_mode_established === true;
|
|
322
|
+
} catch {
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
function orgModeActive() {
|
|
327
|
+
if (_latchedOrgMode) {
|
|
328
|
+
if (_quarantinePending) ensureGrantsQuarantined();
|
|
329
|
+
return true;
|
|
330
|
+
}
|
|
331
|
+
if (orgModeAnchorPresent()) {
|
|
332
|
+
_latchedOrgMode = true;
|
|
333
|
+
ensureGrantsQuarantined();
|
|
334
|
+
return true;
|
|
335
|
+
}
|
|
336
|
+
if (stickyLatchPresent()) {
|
|
337
|
+
_latchedOrgMode = true;
|
|
338
|
+
writeOrgModeAnchor();
|
|
339
|
+
ensureGrantsQuarantined();
|
|
340
|
+
return true;
|
|
341
|
+
}
|
|
342
|
+
if (!existsSync2(orgMembershipsPath())) return false;
|
|
343
|
+
try {
|
|
344
|
+
const active = readActiveOrgMemberships();
|
|
345
|
+
if (active.length === 0) {
|
|
346
|
+
process.stderr.write(
|
|
347
|
+
"[exe-os] \u26A0 org-memberships file present but lists no active membership \u2014 treating install as org-mode (fail closed: an empty roster is ambiguous, not proof of a founder install)\n"
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
establishOrgMode(active.map((m) => m.org_id));
|
|
351
|
+
return true;
|
|
352
|
+
} catch (err) {
|
|
353
|
+
process.stderr.write(
|
|
354
|
+
`[exe-os] \u26A0 org-memberships file unreadable (${err instanceof Error ? err.message : String(err)}) \u2014 treating install as org-mode (fail closed: founder-monitor writer stays unusable)
|
|
355
|
+
`
|
|
356
|
+
);
|
|
357
|
+
establishOrgMode();
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function orgMembershipPresent() {
|
|
362
|
+
return orgModeActive();
|
|
363
|
+
}
|
|
364
|
+
function clearOrgModeSticky(confirmation) {
|
|
365
|
+
if (confirmation !== ORG_MODE_CLEAR_CONFIRMATION) {
|
|
366
|
+
throw new Error(
|
|
367
|
+
`Refusing to clear the org-mode latch without the exact confirmation phrase ("${ORG_MODE_CLEAR_CONFIRMATION}")`
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
rmSync2(markerPath(), { force: true });
|
|
371
|
+
const cp = configPath();
|
|
372
|
+
if (existsSync2(cp)) {
|
|
373
|
+
try {
|
|
374
|
+
const cfg = JSON.parse(readFileSync2(cp, "utf8"));
|
|
375
|
+
delete cfg.org_mode_established;
|
|
376
|
+
writeFileSync2(cp, JSON.stringify(cfg, null, 2));
|
|
377
|
+
} catch {
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
clearOrgModeAnchor();
|
|
381
|
+
_latchedOrgMode = false;
|
|
382
|
+
}
|
|
383
|
+
var _warnedQuarantineDeferred = false;
|
|
384
|
+
function warnQuarantineDeferredOnce(msg) {
|
|
385
|
+
if (_warnedQuarantineDeferred) return;
|
|
386
|
+
_warnedQuarantineDeferred = true;
|
|
387
|
+
process.stderr.write(msg);
|
|
388
|
+
}
|
|
389
|
+
function _resetOrgModeLatchForTest() {
|
|
390
|
+
_quarantinePending = false;
|
|
391
|
+
_warnedQuarantineDeferred = false;
|
|
392
|
+
_latchedOrgMode = false;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export {
|
|
396
|
+
ORG_MEMBERSHIPS_FILENAME,
|
|
397
|
+
ORG_MODE_MARKER_FILENAME,
|
|
398
|
+
CONFIG_FILENAME,
|
|
399
|
+
ORG_MODE_CLEAR_CONFIRMATION,
|
|
400
|
+
orgMembershipsPath,
|
|
401
|
+
readActiveOrgMemberships,
|
|
402
|
+
establishOrgMode,
|
|
403
|
+
ensureGrantsQuarantined,
|
|
404
|
+
orgModeActive,
|
|
405
|
+
orgMembershipPresent,
|
|
406
|
+
clearOrgModeSticky,
|
|
407
|
+
_resetOrgModeLatchForTest
|
|
408
|
+
};
|