@askexenow/exe-os 0.9.303 → 0.9.310
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/.env.example +8 -2
- package/deploy/compose/docker-compose.yml +12 -5
- package/deploy/compose/generate-env.ts +16 -4
- package/deploy/stack-manifests/v0.9.json +86 -8
- package/dist/{active-agent-SJ2EH6WL.js → active-agent-ORX47ZKW.js} +3 -3
- package/dist/{active-agent-F3TFM4GE.js → active-agent-S5T2YMOR.js} +3 -3
- package/dist/{agentic-ontology-B36CUQLH.js → agentic-ontology-6KBAXLSJ.js} +1 -1
- package/dist/{backfill-metadata-HPLVG42J.js → backfill-metadata-FV7GX6AS.js} +4 -4
- package/dist/{behaviors-KRP2Q5XL.js → behaviors-47CPEKJ7.js} +5 -5
- 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 +6 -6
- package/dist/bin/backfill-responses.js +6 -6
- package/dist/bin/backfill-vectors.js +8 -8
- package/dist/bin/bulk-sync-postgres.js +12 -12
- package/dist/bin/cc-doctor.js +4 -4
- package/dist/bin/cleanup-stale-review-tasks.js +13 -13
- package/dist/bin/cli.js +20 -17
- package/dist/bin/deferred-daemon-restart.js +4 -4
- package/dist/bin/exe-agent-config.js +2 -2
- package/dist/bin/exe-agent.js +8 -8
- package/dist/bin/exe-assign.js +8 -8
- package/dist/bin/exe-boot.js +21 -21
- package/dist/bin/exe-call.js +4 -4
- package/dist/bin/exe-cloud.js +12 -12
- package/dist/bin/exe-config-dump.js +2 -2
- package/dist/bin/exe-dispatch.js +13 -13
- 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 +21 -11
- package/dist/bin/exe-healthcheck.js +4 -4
- package/dist/bin/exe-heartbeat.js +13 -13
- package/dist/bin/exe-kill.js +16 -16
- package/dist/bin/exe-launch-agent.js +23 -23
- package/dist/bin/exe-new-employee.js +8 -8
- package/dist/bin/exe-pending-messages.js +14 -14
- package/dist/bin/exe-pending-notifications.js +13 -13
- package/dist/bin/exe-pending-reviews.js +13 -13
- package/dist/bin/exe-preflight.js +108 -0
- package/dist/bin/exe-rename.js +4 -4
- package/dist/bin/exe-review.js +15 -15
- package/dist/bin/exe-search.js +5 -5
- package/dist/bin/exe-session-cleanup.js +18 -18
- package/dist/bin/exe-settings.js +12 -12
- package/dist/bin/exe-start-codex.js +12 -12
- package/dist/bin/exe-start-opencode.js +8 -8
- package/dist/bin/exe-status.js +14 -14
- package/dist/bin/exe-support.js +4 -4
- package/dist/bin/exe-team.js +3 -3
- package/dist/bin/git-sweep.js +14 -14
- 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-launchd.js +4 -1
- package/dist/bin/install.js +13 -13
- 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/prune-orphan-chunks.js +43 -10
- package/dist/bin/scan-tasks.js +13 -13
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +4 -4
- package/dist/bin/stack-update.js +30 -5
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{capability-cards-7FFJF4HF.js → capability-cards-WQVY7WSS.js} +2 -2
- package/dist/{capacity-monitor-G4XO7GNU.js → capacity-monitor-BUKYPSWR.js} +14 -14
- package/dist/{catchup-brief-NBAN42X7.js → catchup-brief-X5IVQAOH.js} +16 -16
- package/dist/{chunk-SCUUQ3VB.js → chunk-255DIG4B.js} +1 -1
- package/dist/{chunk-NWUPOAFV.js → chunk-2NGPZCWX.js} +2 -2
- package/dist/{chunk-7CMIKNAB.js → chunk-2NVEKSSP.js} +7 -7
- package/dist/{chunk-3BE52GPB.js → chunk-2UVN2NBN.js} +1 -1
- package/dist/{chunk-7RMIXFMD.js → chunk-3KH6GXXX.js} +4 -4
- package/dist/{chunk-S4OOC2EM.js → chunk-43R2GILO.js} +1 -1
- package/dist/{chunk-CTIEJGO4.js → chunk-4BANMHJ5.js} +3 -3
- package/dist/{chunk-D6INBP4F.js → chunk-4L4R6AQJ.js} +1 -1
- package/dist/{chunk-Q32XYR7C.js → chunk-4Q5VNQTV.js} +3 -3
- package/dist/{chunk-YHYWYSWK.js → chunk-4RJJ5FJ2.js} +13 -1
- package/dist/{chunk-53LLDHLD.js → chunk-5DPE7B7K.js} +1 -1
- package/dist/{chunk-QPA5UAXG.js → chunk-62UZWGFX.js} +2 -2
- package/dist/{chunk-KCJZJJJG.js → chunk-66JPZELX.js} +10 -10
- package/dist/{chunk-B7BDXCKK.js → chunk-6LNSZADA.js} +14 -14
- package/dist/{chunk-75SBA2D4.js → chunk-6OD2RVIA.js} +155 -146
- package/dist/chunk-7ODTYODO.js +350 -0
- package/dist/{chunk-YLAYKXX3.js → chunk-7WDIGRSO.js} +1 -1
- package/dist/{chunk-CTUQZ7LF.js → chunk-AC6DKMVS.js} +1 -1
- package/dist/{chunk-2DDRLHWF.js → chunk-B2J3BBJC.js} +2 -2
- package/dist/{chunk-HU5SQUZX.js → chunk-BUOMSIXH.js} +1 -1
- package/dist/{chunk-PY6RG2DV.js → chunk-DFUCFLZH.js} +1 -1
- package/dist/{chunk-PNYUSBLA.js → chunk-DKHBMIVE.js} +1 -1
- package/dist/{chunk-4VHQ6QQ3.js → chunk-DNFU56ZS.js} +1 -1
- package/dist/{chunk-PRU6NRJY.js → chunk-EOS7VPVT.js} +5 -5
- package/dist/{chunk-BM3YRAE5.js → chunk-FM7XZDZI.js} +1 -1
- package/dist/chunk-G6EJKYK3.js +33 -0
- package/dist/{chunk-C5CR4XDV.js → chunk-GMZMBLHT.js} +1 -1
- package/dist/{chunk-JLOB72OV.js → chunk-GSY6HL3T.js} +5 -5
- package/dist/{chunk-FMJ4D5G6.js → chunk-HED6D5KR.js} +20 -20
- package/dist/{chunk-UI5WA22X.js → chunk-HQODUV3G.js} +2 -2
- package/dist/{chunk-O2KITXII.js → chunk-IIHE3FNC.js} +3 -3
- package/dist/{chunk-HUO7WZFC.js → chunk-IRIPGGGL.js} +1 -1
- package/dist/{chunk-S76SQ6R5.js → chunk-ISILDO7P.js} +1 -1
- package/dist/{chunk-MGKZPSXW.js → chunk-IZPO6IOZ.js} +1 -1
- package/dist/{chunk-624YJGMR.js → chunk-J3QZPDNH.js} +1 -1
- package/dist/{chunk-6U6HNE2Y.js → chunk-JDYO76PI.js} +1 -1
- package/dist/{chunk-MDO5LEP7.js → chunk-JNARUXDC.js} +1 -1
- package/dist/{chunk-UN6KSHLI.js → chunk-JV225JBX.js} +1 -1
- package/dist/{chunk-7WQ36FAD.js → chunk-JZW5AOWI.js} +1 -1
- package/dist/{chunk-XHJESIVW.js → chunk-K7KBAJQL.js} +9 -9
- package/dist/{chunk-HHKI2FBV.js → chunk-KAVUTP5G.js} +2 -2
- package/dist/{chunk-4GBTBZFC.js → chunk-KPVVTHPK.js} +8 -8
- package/dist/{chunk-D3IYBLWN.js → chunk-KSMITUGY.js} +3 -3
- package/dist/{chunk-NME5E325.js → chunk-LMX7UKGX.js} +3 -3
- package/dist/{chunk-UFYO4DLS.js → chunk-MTIJ2NXY.js} +1 -1
- package/dist/{chunk-KLAVORDC.js → chunk-NCC3F6GM.js} +1 -1
- package/dist/{chunk-HDCP6CGI.js → chunk-NIZQ3CIS.js} +1 -1
- package/dist/{chunk-ALVJ3CT3.js → chunk-OBJXZII2.js} +2 -2
- package/dist/{chunk-P4WXINQT.js → chunk-OR3TAZL3.js} +1 -1
- package/dist/{chunk-CCYRCRLW.js → chunk-PMEOSD6S.js} +2 -2
- package/dist/{chunk-JBWYZAQE.js → chunk-PPXQE7AS.js} +3 -3
- package/dist/{chunk-PTR4DP7H.js → chunk-QEGXNJGR.js} +4 -4
- package/dist/{chunk-FTOUQEYH.js → chunk-RPBTYQKJ.js} +1 -1
- package/dist/{chunk-7L2EV3XX.js → chunk-RVXWGPD3.js} +39 -6
- package/dist/{chunk-5SYMJCBM.js → chunk-RZJ6DXVE.js} +1 -1
- package/dist/{chunk-N5G4T47B.js → chunk-SCYWCWKY.js} +3 -3
- package/dist/{chunk-5Y2DO57X.js → chunk-SOT23KWW.js} +1 -1
- package/dist/{chunk-JPGU7XUA.js → chunk-SPOXL7HF.js} +7 -7
- package/dist/{chunk-OVQDDRGZ.js → chunk-TN2YCFQE.js} +4 -4
- package/dist/{chunk-QTDS7LFB.js → chunk-U63BZI2B.js} +3 -3
- package/dist/{chunk-7RGIYC7W.js → chunk-V42BSVX6.js} +2 -2
- package/dist/{chunk-MO3G76UK.js → chunk-V4BW5HFQ.js} +3 -3
- package/dist/{chunk-Y4TYFJ37.js → chunk-VFSYVQX4.js} +1 -1
- package/dist/{chunk-EWIW3R6V.js → chunk-VT6P7FV4.js} +1 -1
- package/dist/{chunk-4NWEVZKT.js → chunk-W2J2RF5N.js} +3 -3
- package/dist/{chunk-X37ENEN5.js → chunk-WBJXJ2R4.js} +9 -9
- package/dist/chunk-WCGNCH3Q.js +72 -0
- package/dist/{chunk-G4SVYLPT.js → chunk-WJ2PZGRV.js} +1 -1
- package/dist/{chunk-2JESQBYU.js → chunk-WZBUKC5N.js} +1 -1
- package/dist/{chunk-7DAUFPDV.js → chunk-X4AFBL4N.js} +1 -1
- package/dist/{chunk-UJJIFFIJ.js → chunk-XV5HRIXG.js} +11 -11
- package/dist/{chunk-VTMPER4B.js → chunk-XYG722JW.js} +2 -2
- package/dist/{chunk-4OTIVBY3.js → chunk-YB7U4WTY.js} +4 -4
- package/dist/{chunk-YLLUDO54.js → chunk-Z6H6Y4BS.js} +1 -1
- package/dist/{chunk-ZXZU6NCE.js → chunk-ZOVHXTGC.js} +1 -1
- package/dist/{chunk-JAPPHNDZ.js → chunk-ZZXADKAP.js} +2 -2
- package/dist/{co-activation-W3DTVIXG.js → co-activation-WN25AJOC.js} +2 -2
- package/dist/{co-occurrence-JP6QO7DC.js → co-occurrence-YP2Q3OEA.js} +2 -2
- package/dist/{code-context-index-6SWHYPLZ.js → code-context-index-ZWONKBKX.js} +3 -3
- package/dist/{crdt-sync-V4MYKLOX.js → crdt-sync-ZFIFL2QM.js} +1 -1
- package/dist/{crm-webhook-PJZ37A2Q.js → crm-webhook-DGPHULOO.js} +2 -2
- package/dist/{cto-delegation-gate-72TPHIVT.js → cto-delegation-gate-OF2A3TSS.js} +12 -12
- package/dist/{daemon-orchestration-7ESTK6HS.js → daemon-orchestration-G4RRTPP7.js} +16 -16
- package/dist/{db-backup-3CT2GJK2.js → db-backup-EORG4LBO.js} +1 -1
- package/dist/{doc-graph-extractor-ECZF4H6G.js → doc-graph-extractor-APZS3DFD.js} +2 -2
- package/dist/{dreaming-BZZAZHL5.js → dreaming-Q4E3WBGY.js} +13 -13
- package/dist/{exe-drift-24KYGBPH.js → exe-drift-CI5R6GUT.js} +3 -3
- package/dist/{exe-export-SONG5KUF.js → exe-export-HQIQASIT.js} +6 -6
- package/dist/{exe-import-JJJL7E5D.js → exe-import-ULZK56WC.js} +6 -6
- package/dist/{exe-key-BRKHDMIX.js → exe-key-ILNSBGRN.js} +4 -4
- package/dist/{exe-snapshot-436XVPEC.js → exe-snapshot-RUZTWZOF.js} +16 -16
- package/dist/{factory-CTFAGZUA.js → factory-YHQZ6RZZ.js} +14 -6
- package/dist/{fast-db-init-4VL3ZQIH.js → fast-db-init-KNJRL7T3.js} +1 -1
- package/dist/{founder-context-6KTVHGVC.js → founder-context-QCTMEK66.js} +2 -2
- package/dist/gateway/index.js +17 -17
- package/dist/{git-staleness-VFDGCAMO.js → git-staleness-KIA5YI4H.js} +2 -2
- package/dist/{git-task-sweep-KZ27TCNB.js → git-task-sweep-WH6QE7HL.js} +13 -13
- package/dist/{global-procedures-LDKZ2IPH.js → global-procedures-SYZZCGDS.js} +3 -3
- package/dist/{graph-auto-extract-VA3SFHPF.js → graph-auto-extract-J2TIWZEE.js} +2 -2
- package/dist/hooks/bug-report-worker.js +15 -15
- package/dist/hooks/codex-stop-task-finalizer.js +15 -15
- package/dist/hooks/commit-complete.js +15 -15
- package/dist/hooks/error-recall.js +6 -6
- package/dist/hooks/exe-heartbeat-hook.js +3 -3
- package/dist/hooks/ingest-worker.js +3 -3
- package/dist/hooks/ingest.js +6 -6
- package/dist/hooks/instructions-loaded.js +4 -4
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +4 -4
- package/dist/hooks/post-compact.js +14 -14
- package/dist/hooks/post-tool-combined.js +6 -6
- package/dist/hooks/pre-compact.js +18 -18
- package/dist/hooks/pre-tool-use.js +18 -18
- package/dist/hooks/prompt-submit.js +27 -27
- package/dist/hooks/session-end.js +23 -23
- package/dist/hooks/session-start.js +12 -12
- package/dist/hooks/stop.js +21 -21
- package/dist/hooks/subagent-stop.js +14 -14
- package/dist/hooks/summary-worker.js +21 -21
- package/dist/index.js +26 -26
- package/dist/{installer-7LYVKNUK.js → installer-3NB3IBHF.js} +5 -5
- package/dist/{installer-B6PUJTSR.js → installer-IIJFCTMH.js} +5 -5
- package/dist/{installer-MSAJOOHK.js → installer-PSDYMGN7.js} +5 -5
- package/dist/lib/cloud-sync.js +12 -12
- package/dist/lib/consolidation.js +5 -5
- package/dist/lib/database.js +2 -2
- package/dist/lib/db-daemon-client.js +3 -3
- package/dist/lib/db.js +2 -2
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embedder.js +3 -3
- package/dist/lib/employee-templates.js +4 -4
- package/dist/lib/employees.js +2 -2
- package/dist/lib/exe-daemon-client.js +2 -2
- package/dist/lib/exe-daemon.js +51 -51
- package/dist/lib/hybrid-search.js +5 -5
- package/dist/lib/identity.js +2 -2
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +13 -13
- 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 +14 -14
- package/dist/lib/tmux-routing.js +12 -12
- package/dist/lib/token-spend.js +3 -3
- package/dist/{license-gate-U7TC44UX.js → license-gate-7SDHCJUO.js} +3 -3
- package/dist/mcp/register-tools.js +69 -69
- package/dist/mcp/server.js +90 -73
- 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 +16 -16
- 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 +16 -16
- package/dist/mcp/tools/send-message.js +15 -15
- package/dist/mcp/tools/update-task.js +15 -15
- package/dist/{mcp-http-config-DKDEXFVS.js → mcp-http-config-QSOVFXHW.js} +3 -3
- package/dist/mcp-tool-surface-CSPFXL3F.js +15 -0
- package/dist/{memory-cards-OMPYI2GY.js → memory-cards-II67WFL2.js} +2 -2
- package/dist/{memory-graph-extractor-QARQCG53.js → memory-graph-extractor-PM4Q2KJG.js} +3 -3
- package/dist/{memory-poisoning-defense-4J5CPLJT.js → memory-poisoning-defense-ECXSX7HK.js} +2 -2
- package/dist/{memory-queue-client-2NURVA62.js → memory-queue-client-HLURQEV6.js} +3 -3
- package/dist/{memory-reflection-KSOFEZNV.js → memory-reflection-PXF6YFDU.js} +2 -2
- package/dist/{notifications-FAHXEFR2.js → notifications-UP7WQGG4.js} +12 -12
- package/dist/{orchestration-events-2MVWZ2ET.js → orchestration-events-PZLLPCKY.js} +3 -3
- package/dist/{orchestrator-DMM6AJVL.js → orchestrator-PUT45J4O.js} +14 -14
- package/dist/{pipeline-router-M3ESJZYK.js → pipeline-router-5CRWKESM.js} +3 -3
- package/dist/{plan-limits-BDOAH4DJ.js → plan-limits-SH2NDFNX.js} +5 -5
- package/dist/{projection-worker-UBPNRKPX.js → projection-worker-HWY37MNC.js} +2 -2
- package/dist/{prospective-memory-OALGUYBS.js → prospective-memory-FQSVMCGG.js} +2 -2
- package/dist/{reranker-CTZ4SYCN.js → reranker-AALRMGMM.js} +1 -1
- package/dist/{retrieval-health-P4ZMY4H3.js → retrieval-health-PNWJSJNG.js} +1 -1
- package/dist/{review-polling-VQUPLRWQ.js → review-polling-65JZUE3T.js} +13 -13
- package/dist/runtime/index.js +20 -20
- package/dist/{session-events-4GHYBXXH.js → session-events-EJ3OSAA6.js} +13 -13
- package/dist/{session-kill-telemetry-S445CSOH.js → session-kill-telemetry-3HGM7SNQ.js} +13 -13
- package/dist/{session-scope-PPGKSJEL.js → session-scope-JGDYAMJO.js} +12 -12
- package/dist/{setup-wizard-ERES36LR.js → setup-wizard-44LMFM2C.js} +1 -1
- package/dist/{skill-refinement-KITOKH6T.js → skill-refinement-DUOO6B7V.js} +2 -2
- package/dist/{stack-release-JZVTSBJJ.js → stack-release-XYMKU7NT.js} +53 -4
- package/dist/{stack-update-V7AJ425P.js → stack-update-XHQJRJEP.js} +3 -3
- package/dist/{steward-gate-VLN2FTQD.js → steward-gate-6NWRDLX2.js} +3 -3
- package/dist/{task-enforcement-XAPBTPBF.js → task-enforcement-UOULTGFB.js} +12 -12
- package/dist/{task-scope-ZGFHVDG5.js → task-scope-P5STKYAC.js} +12 -12
- package/dist/{tasks-crud-KIZREZSN.js → tasks-crud-24HMTULR.js} +12 -12
- package/dist/{tasks-notify-3W3YIVF4.js → tasks-notify-LAIU7UUI.js} +13 -13
- package/dist/{tasks-review-F5PPITAJ.js → tasks-review-AFJAU2DY.js} +12 -12
- package/dist/{telemetry-upload-ZUFI5VH4.js → telemetry-upload-DWFGC2XJ.js} +7 -7
- package/dist/{token-budget-7BD6ROHF.js → token-budget-4RFZKWGH.js} +3 -3
- package/dist/{tool-capability-index-335P663V.js → tool-capability-index-ZEXBWKUZ.js} +1 -1
- package/dist/{tool-telemetry-P6XVPFOF.js → tool-telemetry-BS5JXM5M.js} +1 -1
- package/dist/tui/App.js +21 -21
- package/dist/{tui-data-QWJVWVTP.js → tui-data-UNO5B7PU.js} +12 -12
- package/dist/{worker-gate-IHCMOXDF.js → worker-gate-C6CTTYMD.js} +1 -1
- package/dist/{workflow-engine-PJ7JAO6E.js → workflow-engine-4W2KYCDV.js} +2 -2
- package/dist/{worktree-4BR3ZQWN.js → worktree-2CXY6NEB.js} +4 -4
- package/dist/{worktree-sweep-XCPOF3RD.js → worktree-sweep-K3CJFSUL.js} +5 -5
- package/package.json +3 -2
- package/release-notes.json +9 -42
- package/stack.release.json +11 -11
- /package/dist/{chunk-V7E4I7J5.js → chunk-2EJ636HI.js} +0 -0
- /package/dist/{chunk-ERAHOO7R.js → chunk-2NS3QRMJ.js} +0 -0
- /package/dist/{chunk-PCU4ZMUA.js → chunk-A2YZG4AD.js} +0 -0
- /package/dist/{chunk-YH2IYVPW.js → chunk-AE74NOE6.js} +0 -0
- /package/dist/{chunk-Q5V3B6BP.js → chunk-GWPICNSO.js} +0 -0
- /package/dist/{chunk-6JJBGPMF.js → chunk-I3DPCSDG.js} +0 -0
- /package/dist/{chunk-Z77S2QQU.js → chunk-J3SR5MGG.js} +0 -0
- /package/dist/{chunk-KYF3KSFT.js → chunk-K4BKJJ4F.js} +0 -0
- /package/dist/{chunk-PGQMMD5P.js → chunk-MQCTK6EF.js} +0 -0
- /package/dist/{chunk-EW2P62CV.js → chunk-QE7UVQDP.js} +0 -0
- /package/dist/{chunk-PP3RXZID.js → chunk-QNXM2HXW.js} +0 -0
- /package/dist/{chunk-O573H7LS.js → chunk-YUBTHJVV.js} +0 -0
- /package/dist/{core-memory-VIWP7GJL.js → core-memory-OC5ITKKV.js} +0 -0
- /package/dist/{entity-boost-VZ7ZEDVR.js → entity-boost-NF3LE6OJ.js} +0 -0
- /package/dist/{message-queue-client-32HOVUK7.js → message-queue-client-4VDU6BZY.js} +0 -0
- /package/dist/{oauth-server-V4H3SY7H.js → oauth-server-EWUL7DMD.js} +0 -0
- /package/dist/{project-boot-DQZXRY5C.js → project-boot-2TCPDZ4S.js} +0 -0
- /package/dist/{wiki-acl-HNP5GGDA.js → wiki-acl-CONNF6ES.js} +0 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
// src/lib/preflight-checks.ts
|
|
2
|
+
import { readFileSync, existsSync } from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
var REQUIRED_INFRA = {
|
|
5
|
+
postgres: ["exe-db", "postgres", "db", "exe-db-jkt"],
|
|
6
|
+
redis: ["redis"],
|
|
7
|
+
clickhouse: ["clickhouse"],
|
|
8
|
+
"exe-sso-edge": ["exe-sso-edge", "sso-edge"],
|
|
9
|
+
cloudflared: ["cloudflared"]
|
|
10
|
+
};
|
|
11
|
+
var FORBIDDEN_HOST_SUBSTRINGS = ["askexe.com", "askexenow.com"];
|
|
12
|
+
var CLIENT_FACING_HOST_FIELDS = ["healthHost", "healthUrl"];
|
|
13
|
+
var BYOK_ENFORCEMENT_VARS = ["EXE_ALLOW_DIRECT_PROVIDER_KEYS", "EXE_BILLING_MODE"];
|
|
14
|
+
var BYOK_LEGACY_VARS = ["BYOK_ENABLED"];
|
|
15
|
+
function resolveDefaultManifest() {
|
|
16
|
+
let dir = path.dirname(new URL(import.meta.url).pathname);
|
|
17
|
+
for (let i = 0; i < 6; i++) {
|
|
18
|
+
const candidate = path.join(dir, "deploy", "stack-manifests", "v0.9.json");
|
|
19
|
+
if (existsSync(candidate)) return candidate;
|
|
20
|
+
const parent = path.dirname(dir);
|
|
21
|
+
if (parent === dir) break;
|
|
22
|
+
dir = parent;
|
|
23
|
+
}
|
|
24
|
+
return path.join(process.cwd(), "deploy", "stack-manifests", "v0.9.json");
|
|
25
|
+
}
|
|
26
|
+
function parseImageRef(image) {
|
|
27
|
+
const hasDigest = /@sha256:[0-9a-f]{64}/i.test(image);
|
|
28
|
+
const withoutDigest = image.replace(/@sha256:[0-9a-f]{64}/i, "");
|
|
29
|
+
const lastSlash = withoutDigest.lastIndexOf("/");
|
|
30
|
+
const namePart = lastSlash >= 0 ? withoutDigest.slice(lastSlash + 1) : withoutDigest;
|
|
31
|
+
const colonIdx = namePart.indexOf(":");
|
|
32
|
+
const hasTag = colonIdx >= 0;
|
|
33
|
+
const tag = hasTag ? namePart.slice(colonIdx + 1) : "";
|
|
34
|
+
return { hasDigest, hasTag, tag };
|
|
35
|
+
}
|
|
36
|
+
function loadEnvLikeFile(filePath) {
|
|
37
|
+
const vars = /* @__PURE__ */ new Set();
|
|
38
|
+
if (!filePath || !existsSync(filePath)) return { vars, exists: false };
|
|
39
|
+
const raw = readFileSync(filePath, "utf8");
|
|
40
|
+
for (const line of raw.split("\n")) {
|
|
41
|
+
const m = line.match(/^\s*#?\s*([A-Z][A-Z0-9_]+)\s*=/);
|
|
42
|
+
if (m) vars.add(m[1]);
|
|
43
|
+
}
|
|
44
|
+
return { vars, exists: true };
|
|
45
|
+
}
|
|
46
|
+
function readComposeText(composePath) {
|
|
47
|
+
if (!composePath || !existsSync(composePath)) return { text: "", exists: false };
|
|
48
|
+
return { text: readFileSync(composePath, "utf8"), exists: true };
|
|
49
|
+
}
|
|
50
|
+
function resolveStack(manifest, requested) {
|
|
51
|
+
if (manifest.services && !manifest.stacks) {
|
|
52
|
+
return { version: manifest.version ?? "(single)", services: manifest.services };
|
|
53
|
+
}
|
|
54
|
+
if (!manifest.stacks) return { version: "(none)", services: {} };
|
|
55
|
+
const version = requested ?? manifest.latest ?? Object.keys(manifest.stacks).sort().pop() ?? "";
|
|
56
|
+
const entry = manifest.stacks[version];
|
|
57
|
+
return { version, services: entry?.services ?? {} };
|
|
58
|
+
}
|
|
59
|
+
function checkDigestPinning(services) {
|
|
60
|
+
const bug = "ee16e7ef (digest-pinning)";
|
|
61
|
+
const offenders = [];
|
|
62
|
+
for (const [name, svc] of Object.entries(services)) {
|
|
63
|
+
if (!svc.image) continue;
|
|
64
|
+
const { hasDigest } = parseImageRef(svc.image);
|
|
65
|
+
if (!hasDigest) offenders.push(`${name}=${svc.image}`);
|
|
66
|
+
}
|
|
67
|
+
if (offenders.length > 0) {
|
|
68
|
+
return {
|
|
69
|
+
check: "digest-pinning",
|
|
70
|
+
status: "fail",
|
|
71
|
+
bug,
|
|
72
|
+
offenders,
|
|
73
|
+
message: `${offenders.length} image(s) tag-pinned WITHOUT @sha256 digest (release claims digest-pinning): ${offenders.join(", ")}`
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return { check: "digest-pinning", status: "pass", bug, message: "all images @sha256 digest-pinned" };
|
|
77
|
+
}
|
|
78
|
+
function checkNoLatest(services) {
|
|
79
|
+
const bug = "monitor :latest / no-:latest";
|
|
80
|
+
const offenders = [];
|
|
81
|
+
for (const [name, svc] of Object.entries(services)) {
|
|
82
|
+
if (!svc.image) continue;
|
|
83
|
+
const { hasDigest, hasTag, tag } = parseImageRef(svc.image);
|
|
84
|
+
if (tag === "latest") offenders.push(`${name}=${svc.image}`);
|
|
85
|
+
else if (!hasTag && !hasDigest) offenders.push(`${name}=${svc.image} (untagged \u2192 implicit :latest)`);
|
|
86
|
+
}
|
|
87
|
+
if (offenders.length > 0) {
|
|
88
|
+
return {
|
|
89
|
+
check: "no-latest",
|
|
90
|
+
status: "fail",
|
|
91
|
+
bug,
|
|
92
|
+
offenders,
|
|
93
|
+
message: `${offenders.length} image(s) use :latest / are untagged: ${offenders.join(", ")}`
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return { check: "no-latest", status: "pass", bug, message: "no :latest / untagged images" };
|
|
97
|
+
}
|
|
98
|
+
function checkDependencyClosure(services) {
|
|
99
|
+
const bug = "4948fc48 (dependency-closure)";
|
|
100
|
+
const present = /* @__PURE__ */ new Set();
|
|
101
|
+
for (const [name, svc] of Object.entries(services)) {
|
|
102
|
+
present.add(name);
|
|
103
|
+
if (svc.composeService) present.add(svc.composeService);
|
|
104
|
+
}
|
|
105
|
+
const missing = [];
|
|
106
|
+
for (const [canonical, aliases] of Object.entries(REQUIRED_INFRA)) {
|
|
107
|
+
if (!aliases.some((a) => present.has(a))) missing.push(canonical);
|
|
108
|
+
}
|
|
109
|
+
if (missing.length > 0) {
|
|
110
|
+
return {
|
|
111
|
+
check: "dependency-closure",
|
|
112
|
+
status: "fail",
|
|
113
|
+
bug,
|
|
114
|
+
offenders: missing,
|
|
115
|
+
message: `manifest missing required infra dependency closure \u2014 selected/fresh installs would skip: ${missing.join(", ")}`
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
return { check: "dependency-closure", status: "pass", bug, message: `all required infra present (${Object.keys(REQUIRED_INFRA).join(", ")})` };
|
|
119
|
+
}
|
|
120
|
+
function checkNoHardcodedHost(services) {
|
|
121
|
+
const bug = "ERP white-label-leak (no-hardcoded-askexe-host)";
|
|
122
|
+
const offenders = [];
|
|
123
|
+
for (const [name, svc] of Object.entries(services)) {
|
|
124
|
+
for (const field of CLIENT_FACING_HOST_FIELDS) {
|
|
125
|
+
const val = svc[field];
|
|
126
|
+
if (typeof val !== "string") continue;
|
|
127
|
+
const hit = FORBIDDEN_HOST_SUBSTRINGS.find((h) => val.includes(h));
|
|
128
|
+
if (hit) offenders.push(`${name}.${field}=${val}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (offenders.length > 0) {
|
|
132
|
+
return {
|
|
133
|
+
check: "no-hardcoded-askexe-host",
|
|
134
|
+
status: "fail",
|
|
135
|
+
bug,
|
|
136
|
+
offenders,
|
|
137
|
+
message: `client-facing field(s) hardcode an AskExe host (white-label leak): ${offenders.join(", ")}`
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
return { check: "no-hardcoded-askexe-host", status: "pass", bug, message: "no hardcoded AskExe hosts in client-facing fields" };
|
|
141
|
+
}
|
|
142
|
+
function checkEnvContract(env, compose) {
|
|
143
|
+
const bug = "BYOK env-contract-mismatch";
|
|
144
|
+
if (!env.exists && !compose.exists) {
|
|
145
|
+
return {
|
|
146
|
+
check: "env-contract",
|
|
147
|
+
status: "warn",
|
|
148
|
+
bug,
|
|
149
|
+
message: "env example + compose not provided \u2014 BYOK enforcement contract not verified (pass --env / --compose to enforce)"
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const declared = new Set(env.vars);
|
|
153
|
+
if (compose.exists) {
|
|
154
|
+
for (const m of compose.text.matchAll(/\$\{?([A-Z][A-Z0-9_]+)/g)) declared.add(m[1]);
|
|
155
|
+
}
|
|
156
|
+
const missingEnforcement = BYOK_ENFORCEMENT_VARS.filter((v) => !declared.has(v));
|
|
157
|
+
const exposedLegacy = BYOK_LEGACY_VARS.filter((v) => declared.has(v));
|
|
158
|
+
if (missingEnforcement.length > 0 && exposedLegacy.length > 0) {
|
|
159
|
+
return {
|
|
160
|
+
check: "env-contract",
|
|
161
|
+
status: "fail",
|
|
162
|
+
bug,
|
|
163
|
+
offenders: [...exposedLegacy.map((v) => `exposes ${v}`), ...missingEnforcement.map((v) => `missing ${v}`)],
|
|
164
|
+
message: `BYOK env-contract mismatch \u2014 customer surface exposes ${exposedLegacy.join("/")} but billing enforcement reads ${BYOK_ENFORCEMENT_VARS.join("+")} (absent). BYOK can bypass billing.`
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
if (missingEnforcement.length > 0) {
|
|
168
|
+
return {
|
|
169
|
+
check: "env-contract",
|
|
170
|
+
status: "warn",
|
|
171
|
+
bug,
|
|
172
|
+
offenders: missingEnforcement.map((v) => `missing ${v}`),
|
|
173
|
+
message: `billing enforcement vars not declared: ${missingEnforcement.join(", ")}`
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
return { check: "env-contract", status: "pass", bug, message: `BYOK enforcement vars present (${BYOK_ENFORCEMENT_VARS.join(", ")})` };
|
|
177
|
+
}
|
|
178
|
+
function checkNoHostNet(composeTexts) {
|
|
179
|
+
const bug = "monitor host-networking (no-host-net)";
|
|
180
|
+
const available = composeTexts.filter((c) => c.exists);
|
|
181
|
+
if (available.length === 0) {
|
|
182
|
+
return {
|
|
183
|
+
check: "no-host-net",
|
|
184
|
+
status: "warn",
|
|
185
|
+
bug,
|
|
186
|
+
message: "no compose file provided \u2014 host-networking not verified (pass --compose / --monitor-compose to enforce)"
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
const HOST_NET = /^\s*network_mode\s*:\s*["']?host["']?\s*$/;
|
|
190
|
+
const HOST_NET_FLAG = /--network(?:=|\s+)["']?host["']?/;
|
|
191
|
+
const offenders = [];
|
|
192
|
+
for (const compose of available) {
|
|
193
|
+
const lines = compose.text.split("\n");
|
|
194
|
+
let currentService = null;
|
|
195
|
+
let serviceIndent = -1;
|
|
196
|
+
for (const rawLine of lines) {
|
|
197
|
+
const line = rawLine.replace(/\r$/, "");
|
|
198
|
+
const trimmed = line.trim();
|
|
199
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
200
|
+
const indent = line.match(/^(\s*)/)?.[1]?.length ?? 0;
|
|
201
|
+
const headerMatch = line.match(/^(\s+)([A-Za-z0-9._-]+):\s*$/);
|
|
202
|
+
if (headerMatch && (currentService === null || indent <= serviceIndent)) {
|
|
203
|
+
currentService = headerMatch[2];
|
|
204
|
+
serviceIndent = headerMatch[1].length;
|
|
205
|
+
}
|
|
206
|
+
if (HOST_NET.test(line) || HOST_NET_FLAG.test(line)) {
|
|
207
|
+
const where = currentService ? `${compose.label}:${currentService}` : compose.label;
|
|
208
|
+
offenders.push(`${where} (${trimmed})`);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (offenders.length > 0) {
|
|
213
|
+
return {
|
|
214
|
+
check: "no-host-net",
|
|
215
|
+
status: "fail",
|
|
216
|
+
bug,
|
|
217
|
+
offenders,
|
|
218
|
+
message: `compose service(s) use host networking (network_mode: host) \u2014 bypasses Docker isolation + SSO edge: ${offenders.join(", ")}`
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
return { check: "no-host-net", status: "pass", bug, message: "no host networking (network_mode: host) in compose" };
|
|
222
|
+
}
|
|
223
|
+
function runChecks(services, env, compose, monitorCompose, customerComposeLabel) {
|
|
224
|
+
return [
|
|
225
|
+
checkDigestPinning(services),
|
|
226
|
+
checkNoLatest(services),
|
|
227
|
+
checkDependencyClosure(services),
|
|
228
|
+
checkNoHardcodedHost(services),
|
|
229
|
+
checkEnvContract(env, compose),
|
|
230
|
+
checkNoHostNet([
|
|
231
|
+
{ label: customerComposeLabel, text: compose.text, exists: compose.exists },
|
|
232
|
+
monitorCompose
|
|
233
|
+
])
|
|
234
|
+
];
|
|
235
|
+
}
|
|
236
|
+
function tally(findings) {
|
|
237
|
+
const passed = findings.filter((f) => f.status === "pass").length;
|
|
238
|
+
const warned = findings.filter((f) => f.status === "warn").length;
|
|
239
|
+
const failed = findings.filter((f) => f.status === "fail").length;
|
|
240
|
+
const verdict = failed > 0 ? "RED" : warned > 0 ? "YELLOW" : "GREEN";
|
|
241
|
+
return { verdict, passed, warned, failed };
|
|
242
|
+
}
|
|
243
|
+
function runPreflight(options) {
|
|
244
|
+
const manifestPath = options?.manifestPath ?? resolveDefaultManifest();
|
|
245
|
+
if (!existsSync(manifestPath)) {
|
|
246
|
+
return {
|
|
247
|
+
verdict: "RED",
|
|
248
|
+
manifestPath,
|
|
249
|
+
stackVersion: "(missing)",
|
|
250
|
+
findings: [{ check: "manifest-load", status: "fail", bug: "preflight", message: `manifest not found: ${manifestPath}` }],
|
|
251
|
+
passed: 0,
|
|
252
|
+
warned: 0,
|
|
253
|
+
failed: 1
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
let manifest;
|
|
257
|
+
try {
|
|
258
|
+
manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
259
|
+
} catch (err) {
|
|
260
|
+
return {
|
|
261
|
+
verdict: "RED",
|
|
262
|
+
manifestPath,
|
|
263
|
+
stackVersion: "(parse-error)",
|
|
264
|
+
findings: [{ check: "manifest-load", status: "fail", bug: "preflight", message: `manifest parse error: ${err instanceof Error ? err.message : String(err)}` }],
|
|
265
|
+
passed: 0,
|
|
266
|
+
warned: 0,
|
|
267
|
+
failed: 1
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
const { version, services } = resolveStack(manifest, options?.stackVersion);
|
|
271
|
+
const repoRoot = path.resolve(path.dirname(manifestPath), "..", "..");
|
|
272
|
+
const envExamplePath = options?.envExamplePath ?? path.join(repoRoot, "deploy", "compose", ".env.example");
|
|
273
|
+
const composePath = options?.composePath ?? path.join(repoRoot, "deploy", "compose", "docker-compose.yml");
|
|
274
|
+
const monitorComposePath = options?.monitorComposePath ?? path.join(repoRoot, "deploy", "monitor", "docker-compose.hub.yml");
|
|
275
|
+
const env = loadEnvLikeFile(envExamplePath);
|
|
276
|
+
const compose = readComposeText(composePath);
|
|
277
|
+
const monitorComposeRead = readComposeText(monitorComposePath);
|
|
278
|
+
const monitorCompose = { label: "monitor-compose", text: monitorComposeRead.text, exists: monitorComposeRead.exists };
|
|
279
|
+
const findings = runChecks(services, env, compose, monitorCompose, "customer-compose");
|
|
280
|
+
const { verdict, passed, warned, failed } = tally(findings);
|
|
281
|
+
return { verdict, manifestPath, stackVersion: version, findings, passed, warned, failed };
|
|
282
|
+
}
|
|
283
|
+
function runPreflightOnManifest(input) {
|
|
284
|
+
const label = input.label ?? "(in-memory manifest)";
|
|
285
|
+
const { version, services } = resolveStack(input.manifest, input.stackVersion);
|
|
286
|
+
const env = loadEnvLikeFile(input.envExamplePath);
|
|
287
|
+
const compose = readComposeText(input.composePath);
|
|
288
|
+
const monitorComposeRead = readComposeText(input.monitorComposePath);
|
|
289
|
+
const monitorCompose = { label: "monitor-compose", text: monitorComposeRead.text, exists: monitorComposeRead.exists };
|
|
290
|
+
const findings = runChecks(services, env, compose, monitorCompose, "customer-compose");
|
|
291
|
+
const { verdict, passed, warned, failed } = tally(findings);
|
|
292
|
+
return { verdict, manifestPath: label, stackVersion: version, findings, passed, warned, failed };
|
|
293
|
+
}
|
|
294
|
+
var ICONS = { pass: "\u{1F7E2}", warn: "\u{1F7E0}", fail: "\u{1F534}" };
|
|
295
|
+
function formatPreflightFindings(report, all = false) {
|
|
296
|
+
const lines = [];
|
|
297
|
+
for (const f of report.findings) {
|
|
298
|
+
if (!all && f.status === "pass") continue;
|
|
299
|
+
lines.push(` ${ICONS[f.status]} ${f.check} [guards ${f.bug}]: ${f.message}`);
|
|
300
|
+
}
|
|
301
|
+
return lines.join("\n");
|
|
302
|
+
}
|
|
303
|
+
function isPreflightOverrideEnabled(env = process.env) {
|
|
304
|
+
return /^(1|true|yes|on)$/i.test((env.EXE_PREFLIGHT_OVERRIDE ?? "").trim());
|
|
305
|
+
}
|
|
306
|
+
function assertPreflightGate(report, options = {}) {
|
|
307
|
+
const ctx = options.context ? `[${options.context}] ` : "";
|
|
308
|
+
const log = options.log ?? ((m) => console.log(m));
|
|
309
|
+
const warn = options.warn ?? ((m) => console.warn(m));
|
|
310
|
+
const override = options.allowRed === true || isPreflightOverrideEnabled();
|
|
311
|
+
if (report.verdict === "GREEN") {
|
|
312
|
+
log(`${ctx}\u{1F7E2} preflight GREEN (pass ${report.passed} / warn ${report.warned} / fail ${report.failed}) \u2014 stack ${report.stackVersion}`);
|
|
313
|
+
return report;
|
|
314
|
+
}
|
|
315
|
+
if (report.verdict === "YELLOW") {
|
|
316
|
+
warn(`${ctx}\u{1F7E0} preflight YELLOW (${report.warned} warning(s)) \u2014 stack ${report.stackVersion}. Proceeding; warnings are non-blocking:`);
|
|
317
|
+
warn(formatPreflightFindings(report));
|
|
318
|
+
return report;
|
|
319
|
+
}
|
|
320
|
+
const findings = formatPreflightFindings(report);
|
|
321
|
+
if (override) {
|
|
322
|
+
warn(`${ctx}\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`);
|
|
323
|
+
warn(`${ctx}\u2551 \u26A0\uFE0F BREAK-GLASS: preflight is RED but override is engaged \u2551`);
|
|
324
|
+
warn(`${ctx}\u2551 A RED manifest is shipping INTENTIONALLY. This is logged. \u2551`);
|
|
325
|
+
warn(`${ctx}\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D`);
|
|
326
|
+
warn(`${ctx}RED findings (overridden):
|
|
327
|
+
${findings}`);
|
|
328
|
+
warn(`${ctx}Override via: ${options.allowRed === true ? "--allow-red flag" : "EXE_PREFLIGHT_OVERRIDE env"}. Remediate the manifest immediately after.`);
|
|
329
|
+
return report;
|
|
330
|
+
}
|
|
331
|
+
throw new Error(
|
|
332
|
+
`${ctx}Preflight gate FAILED (RED) \u2014 stack ${report.stackVersion}. Company procedure: no manifest published or stack-update applied until preflight is GREEN.
|
|
333
|
+
${findings}
|
|
334
|
+
Break-glass: re-run with --allow-red or EXE_PREFLIGHT_OVERRIDE=1 to ship a RED manifest intentionally (LOUDLY logged).`
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export {
|
|
339
|
+
resolveDefaultManifest,
|
|
340
|
+
resolveStack,
|
|
341
|
+
checkDigestPinning,
|
|
342
|
+
checkNoLatest,
|
|
343
|
+
checkDependencyClosure,
|
|
344
|
+
checkNoHardcodedHost,
|
|
345
|
+
checkEnvContract,
|
|
346
|
+
checkNoHostNet,
|
|
347
|
+
runPreflight,
|
|
348
|
+
runPreflightOnManifest,
|
|
349
|
+
assertPreflightGate
|
|
350
|
+
};
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
} from "./chunk-PROQW3NL.js";
|
|
8
8
|
import {
|
|
9
9
|
vectorToBlob
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WBJXJ2R4.js";
|
|
11
11
|
import {
|
|
12
12
|
extractKeywords,
|
|
13
13
|
keywordsToString
|
|
14
14
|
} from "./chunk-CHCA3ZM2.js";
|
|
15
15
|
import {
|
|
16
16
|
isCoordinatorName
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SCYWCWKY.js";
|
|
18
18
|
|
|
19
19
|
// src/lib/consolidation.ts
|
|
20
20
|
import { randomUUID } from "crypto";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
dispatchTaskToEmployee,
|
|
3
3
|
markTaskNotificationsRead,
|
|
4
4
|
notifyTaskDone
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TN2YCFQE.js";
|
|
6
6
|
import {
|
|
7
7
|
cleanupReviewFile,
|
|
8
8
|
createTaskCore,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
sessionScopeFilter,
|
|
12
12
|
updateTaskStatus,
|
|
13
13
|
writeNotification
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HED6D5KR.js";
|
|
15
15
|
import {
|
|
16
16
|
orgBus
|
|
17
17
|
} from "./chunk-MP2AFCGL.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getClient,
|
|
20
20
|
getCoordinatorName,
|
|
21
21
|
isCoordinatorName
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SCYWCWKY.js";
|
|
23
23
|
import {
|
|
24
24
|
EXE_AI_DIR
|
|
25
25
|
} from "./chunk-DFIOOK5R.js";
|
|
@@ -61,7 +61,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
|
|
|
61
61
|
}
|
|
62
62
|
if (unblockedRows.rows.length > 0 && !process.env.VITEST) {
|
|
63
63
|
try {
|
|
64
|
-
const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-
|
|
64
|
+
const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-LAIU7UUI.js");
|
|
65
65
|
const dispatched = /* @__PURE__ */ new Set();
|
|
66
66
|
for (const ur of unblockedRows.rows) {
|
|
67
67
|
const assignee = String(ur.assigned_to);
|
|
@@ -333,7 +333,7 @@ async function updateTask(input) {
|
|
|
333
333
|
await markTaskNotificationsRead(taskFile);
|
|
334
334
|
if (isCompletionReviewTransition && !isCoordinator && row.reviewer) {
|
|
335
335
|
try {
|
|
336
|
-
const { writeNotification: writeNotification2 } = await import("./notifications-
|
|
336
|
+
const { writeNotification: writeNotification2 } = await import("./notifications-UP7WQGG4.js");
|
|
337
337
|
const reviewer = String(row.reviewer);
|
|
338
338
|
await writeNotification2({
|
|
339
339
|
agentId: reviewer,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/lib/providers/billing-mode.ts
|
|
2
|
+
function isTrue(v) {
|
|
3
|
+
return typeof v === "string" && v.trim().toLowerCase() === "true";
|
|
4
|
+
}
|
|
5
|
+
function resolveBillingMode(env = process.env) {
|
|
6
|
+
const rawMode = (env.EXE_BILLING_MODE ?? "").trim().toLowerCase();
|
|
7
|
+
const explicitAllow = isTrue(env.EXE_ALLOW_DIRECT_PROVIDER_KEYS);
|
|
8
|
+
const byokAlias = isTrue(env.BYOK_ENABLED);
|
|
9
|
+
if (rawMode === "metered") {
|
|
10
|
+
return {
|
|
11
|
+
mode: "metered",
|
|
12
|
+
allowDirectKeys: false,
|
|
13
|
+
reason: byokAlias || explicitAllow ? "EXE_BILLING_MODE=metered overrides BYOK opt-in \u2014 metering enforced, direct keys rejected" : "EXE_BILLING_MODE=metered \u2014 metering enforced"
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const byokRequested = rawMode === "byok" || byokAlias || explicitAllow;
|
|
17
|
+
if (!byokRequested) {
|
|
18
|
+
return {
|
|
19
|
+
mode: "metered",
|
|
20
|
+
allowDirectKeys: false,
|
|
21
|
+
reason: "no BYOK opt-in (EXE_BILLING_MODE/EXE_ALLOW_DIRECT_PROVIDER_KEYS/BYOK_ENABLED unset) \u2014 metering enforced"
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
mode: "byok",
|
|
26
|
+
allowDirectKeys: true,
|
|
27
|
+
reason: "BYOK explicitly enabled \u2014 direct provider keys accepted, billing not metered"
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
resolveBillingMode
|
|
33
|
+
};
|
|
@@ -119,7 +119,7 @@ function releaseBackfillLock() {
|
|
|
119
119
|
}
|
|
120
120
|
async function getTaskAwareCapacity() {
|
|
121
121
|
const { getClient } = await import("./lib/database.js");
|
|
122
|
-
const { sessionScopeFilter } = await import("./task-scope-
|
|
122
|
+
const { sessionScopeFilter } = await import("./task-scope-P5STKYAC.js");
|
|
123
123
|
const client = getClient();
|
|
124
124
|
const scope = sessionScopeFilter();
|
|
125
125
|
const result = await client.execute({
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LMX7UKGX.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionScopeFilter,
|
|
6
6
|
verifyPaneAtCapacity,
|
|
7
7
|
writeNotification
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HED6D5KR.js";
|
|
9
9
|
import {
|
|
10
10
|
listSessions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WJ2PZGRV.js";
|
|
12
12
|
import {
|
|
13
13
|
getTransport
|
|
14
14
|
} from "./chunk-KOO3J5PV.js";
|
|
15
15
|
import {
|
|
16
16
|
recordOrchestrationEventBestEffort
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OR3TAZL3.js";
|
|
18
18
|
import {
|
|
19
19
|
getClient,
|
|
20
20
|
isCoordinatorName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SCYWCWKY.js";
|
|
22
22
|
|
|
23
23
|
// src/lib/capacity-monitor.ts
|
|
24
24
|
var CAPACITY_PATTERNS = [
|
|
@@ -2,11 +2,7 @@ import {
|
|
|
2
2
|
ensureWorktree,
|
|
3
3
|
getGitRoot,
|
|
4
4
|
isWorktreeDirty
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
LEASE_MINUTES,
|
|
8
|
-
leaseExpiryIso
|
|
9
|
-
} from "./chunk-E23LNUWJ.js";
|
|
5
|
+
} from "./chunk-RZJ6DXVE.js";
|
|
10
6
|
import {
|
|
11
7
|
buildTaskResult,
|
|
12
8
|
serializeMessage
|
|
@@ -15,17 +11,21 @@ import {
|
|
|
15
11
|
queueIntercom
|
|
16
12
|
} from "./chunk-4FVVJ7ME.js";
|
|
17
13
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
LEASE_MINUTES,
|
|
15
|
+
leaseExpiryIso
|
|
16
|
+
} from "./chunk-E23LNUWJ.js";
|
|
20
17
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
18
|
+
registerSession
|
|
19
|
+
} from "./chunk-WJ2PZGRV.js";
|
|
23
20
|
import {
|
|
24
21
|
listTmuxSessions
|
|
25
22
|
} from "./chunk-SSTLTIF3.js";
|
|
23
|
+
import {
|
|
24
|
+
getTransport
|
|
25
|
+
} from "./chunk-KOO3J5PV.js";
|
|
26
26
|
import {
|
|
27
27
|
recordOrchestrationEventBestEffort
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OR3TAZL3.js";
|
|
29
29
|
import {
|
|
30
30
|
getAgentRuntime,
|
|
31
31
|
normalizeCcModelName
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
PlanLimitError,
|
|
38
38
|
assertEmployeeLimitSync
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-XYG722JW.js";
|
|
40
40
|
import {
|
|
41
41
|
getSessionKey
|
|
42
42
|
} from "./chunk-CVYC6DUW.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from "./chunk-MP2AFCGL.js";
|
|
52
52
|
import {
|
|
53
53
|
ensureAgentSymlink
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-NIZQ3CIS.js";
|
|
55
55
|
import {
|
|
56
56
|
expandDualPrefixTools
|
|
57
57
|
} from "./chunk-HYZV25LY.js";
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
isCoordinatorName,
|
|
64
64
|
loadEmployees,
|
|
65
65
|
loadEmployeesSync
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-SCYWCWKY.js";
|
|
67
67
|
import {
|
|
68
68
|
loadDeviceId
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-JV225JBX.js";
|
|
70
70
|
import {
|
|
71
71
|
EXE_AI_DIR
|
|
72
72
|
} from "./chunk-DFIOOK5R.js";
|
|
@@ -673,7 +673,7 @@ async function createTaskCore(input) {
|
|
|
673
673
|
if (isCoordinatorSession) {
|
|
674
674
|
earlySessionScope = resolved;
|
|
675
675
|
} else {
|
|
676
|
-
const { getSessionProject } = await import("./session-scope-
|
|
676
|
+
const { getSessionProject } = await import("./session-scope-JGDYAMJO.js");
|
|
677
677
|
const sessionProject = getSessionProject(resolved);
|
|
678
678
|
if (sessionProject && sessionProject !== input.projectName) {
|
|
679
679
|
scopeMismatchWarning = `session/project mismatch: session "${resolved}" owns "${sessionProject}" but task targets "${input.projectName}". Routed to default scope.`;
|
|
@@ -922,7 +922,7 @@ async function queryTaskRows(opts) {
|
|
|
922
922
|
}
|
|
923
923
|
if (opts.founderId !== null) {
|
|
924
924
|
try {
|
|
925
|
-
const { founderScopeFilter } = await import("./founder-context-
|
|
925
|
+
const { founderScopeFilter } = await import("./founder-context-QCTMEK66.js");
|
|
926
926
|
const founderFilter = founderScopeFilter(opts.founderId);
|
|
927
927
|
const cleaned = founderFilter.sql.replace(/^\s*AND\s+/, "");
|
|
928
928
|
conditions.push(cleaned);
|
|
@@ -1154,7 +1154,7 @@ async function updateTaskStatus(input) {
|
|
|
1154
1154
|
} catch {
|
|
1155
1155
|
}
|
|
1156
1156
|
try {
|
|
1157
|
-
const { writeNotification: writeNotification2 } = await import("./notifications-
|
|
1157
|
+
const { writeNotification: writeNotification2 } = await import("./notifications-UP7WQGG4.js");
|
|
1158
1158
|
await writeNotification2({
|
|
1159
1159
|
agentId: reviewer,
|
|
1160
1160
|
agentRole: isCoordinatorName(reviewer) ? "COO" : "manager",
|
|
@@ -1574,7 +1574,7 @@ ${input.result ?? ""}`;
|
|
|
1574
1574
|
}
|
|
1575
1575
|
if (shouldWriteCompletionMemory && input.result) {
|
|
1576
1576
|
try {
|
|
1577
|
-
const { writeMemoryViaDaemon } = await import("./memory-queue-client-
|
|
1577
|
+
const { writeMemoryViaDaemon } = await import("./memory-queue-client-HLURQEV6.js");
|
|
1578
1578
|
await writeMemoryViaDaemon({
|
|
1579
1579
|
raw_text: input.result,
|
|
1580
1580
|
agent_id: String(row.assigned_to),
|
|
@@ -1677,7 +1677,7 @@ ${input.result ?? ""}`;
|
|
|
1677
1677
|
}
|
|
1678
1678
|
if (input.status === "done" || input.status === "needs_review") {
|
|
1679
1679
|
try {
|
|
1680
|
-
const { incrementSkillSuccess } = await import("./skill-refinement-
|
|
1680
|
+
const { incrementSkillSuccess } = await import("./skill-refinement-DUOO6B7V.js");
|
|
1681
1681
|
await incrementSkillSuccess(
|
|
1682
1682
|
String(row.assigned_to),
|
|
1683
1683
|
row.project_name ? String(row.project_name) : null
|
|
@@ -3315,7 +3315,7 @@ async function verifyPaneAtCapacity(sessionName) {
|
|
|
3315
3315
|
reason: `capture-pane failed: ${err instanceof Error ? err.message : String(err)}`
|
|
3316
3316
|
};
|
|
3317
3317
|
}
|
|
3318
|
-
const { isAtCapacity } = await import("./capacity-monitor-
|
|
3318
|
+
const { isAtCapacity } = await import("./capacity-monitor-BUKYPSWR.js");
|
|
3319
3319
|
if (!isAtCapacity(pane)) {
|
|
3320
3320
|
return {
|
|
3321
3321
|
atCapacity: false,
|