@askexenow/exe-os 0.9.374 → 0.9.376
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.customer.example +16 -1
- package/deploy/compose/.env.example +16 -1
- package/deploy/compose/docker-compose.yml +80 -18
- package/deploy/compose/gateway-watchdog.sh +17 -0
- package/deploy/compose/generate-env.ts +41 -1
- package/deploy/compose/sso-edge/default.conf.template +59 -63
- package/deploy/compose/sso-edge/error-pages/404.html +129 -0
- package/deploy/compose/sso-edge/error-pages/500.html +129 -0
- package/deploy/compose/sso-edge/error-pages/503.html +118 -0
- package/deploy/compose/sso-edge/sso-redirect.conf +115 -92
- package/dist/.dist-verified.json +3 -3
- package/dist/{active-agent-ONPPEWQV.js → active-agent-BOBBUJ74.js} +6 -6
- package/dist/{active-agent-UJKMG7LJ.js → active-agent-GFGEGK2U.js} +6 -6
- package/dist/{agent-defs-generator-ZWI6DXOE.js → agent-defs-generator-OX6UFPRX.js} +5 -5
- package/dist/{agent-loop-OYHJKNYH.js → agent-loop-7ZRH56EX.js} +1 -1
- package/dist/{agentic-ontology-WHFJ3QFS.js → agentic-ontology-DT3VOXBT.js} +1 -1
- package/dist/{backfill-metadata-3OUSQD5V.js → backfill-metadata-VRP6PTPP.js} +9 -9
- package/dist/{backup-verify-ZKTUYLTA.js → backup-verify-LWHKGOOV.js} +1 -1
- package/dist/behavior-injection-GMZKZ3BT.js +83 -0
- package/dist/behavior-promotion-QPC4AQ24.js +62 -0
- package/dist/{behaviors-ZJ45TFBJ.js → behaviors-GPI4BLTC.js} +16 -14
- package/dist/bin/agentic-ontology-backfill.js +10 -10
- package/dist/bin/agentic-reflection-backfill.js +11 -11
- package/dist/bin/agentic-semantic-label.js +10 -10
- package/dist/bin/backfill-conversations.js +14 -12
- package/dist/bin/backfill-responses.js +14 -12
- package/dist/bin/backfill-vectors.js +16 -14
- package/dist/bin/bulk-sync-postgres.js +21 -19
- package/dist/bin/cc-doctor.js +19 -11
- package/dist/bin/cleanup-stale-review-tasks.js +27 -26
- package/dist/bin/cli.js +83 -109
- package/dist/bin/daemon-restart-handoff.js +2 -1
- package/dist/bin/deferred-daemon-restart.js +118 -110
- package/dist/bin/exe-actions.js +176 -0
- package/dist/bin/exe-agent-config.js +5 -5
- package/dist/bin/exe-agent.js +23 -23
- package/dist/bin/exe-assign.js +16 -14
- package/dist/bin/exe-boot.js +91 -71
- package/dist/bin/exe-call.js +8 -8
- package/dist/bin/exe-cicd.js +1210 -0
- package/dist/bin/exe-cloud.js +70 -37
- package/dist/bin/exe-config-dump.js +5 -5
- package/dist/bin/exe-dispatch.js +28 -27
- package/dist/bin/exe-doctor.js +12 -11
- package/dist/bin/exe-export-behaviors.js +20 -18
- package/dist/bin/exe-forget.js +11 -11
- package/dist/bin/exe-gateway.js +10 -10
- package/dist/bin/exe-healthcheck.js +22 -10
- package/dist/bin/exe-heartbeat.js +33 -32
- package/dist/bin/exe-kill.js +32 -31
- package/dist/bin/exe-launch-agent.js +76 -54
- package/dist/bin/exe-mcp.js +10 -6
- package/dist/bin/exe-memory-reads.js +9 -9
- package/dist/bin/exe-model-supervisor.js +138 -0
- package/dist/bin/exe-new-employee.js +14 -14
- package/dist/bin/exe-os-mcp-proxy.js +10 -6
- package/dist/bin/exe-pending-messages.js +28 -27
- package/dist/bin/exe-pending-notifications.js +27 -26
- package/dist/bin/exe-pending-reviews.js +28 -27
- package/dist/bin/exe-rename.js +9 -9
- package/dist/bin/exe-repo-truth.js +1 -1
- package/dist/bin/exe-review.js +31 -30
- package/dist/bin/exe-search.js +10 -10
- package/dist/bin/exe-session-cleanup.js +32 -31
- package/dist/bin/exe-settings.js +21 -19
- package/dist/bin/exe-start-codex.js +31 -25
- package/dist/bin/exe-start-opencode.js +24 -22
- package/dist/bin/exe-start.sh +11 -2
- package/dist/bin/exe-status.js +29 -28
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +7 -7
- package/dist/bin/exe-timers.js +2 -1
- package/dist/bin/exe-watchdog.js +170 -16
- package/dist/bin/generate-hook-manifest.js +8 -41
- package/dist/bin/git-sweep.js +28 -27
- package/dist/bin/graph-backfill.js +11 -11
- package/dist/bin/graph-export.js +10 -10
- package/dist/bin/hooks-cli.js +289 -0
- package/dist/bin/import-history.js +14 -14
- package/dist/bin/install.js +130 -116
- package/dist/bin/intercom-check.js +5 -5
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +7 -7
- package/dist/bin/postgres-agentic-reflection-backfill.js +4 -4
- package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/reconcile-backlog.js +2 -2
- package/dist/bin/registry-proxy.js +2 -2
- package/dist/bin/scan-tasks.js +52 -38
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +9 -9
- package/dist/bin/stack-update.js +10 -5
- package/dist/bin/verify-stack.js +3 -1
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-JKVZ4ZAT.js → boot-generation-BN6GKASY.js} +6 -6
- package/dist/{boot-review-sections-2M6BTG73.js → boot-review-sections-OQ5JGSOD.js} +26 -25
- package/dist/{branch-hygiene-U5GFRSTP.js → branch-hygiene-QLD77IMJ.js} +1 -1
- package/dist/build-manifest.json +1186 -1106
- package/dist/{capability-cards-5IMJT6J7.js → capability-cards-EDZ62HKG.js} +5 -5
- package/dist/{capacity-monitor-SAXCQK7O.js → capacity-monitor-6GMTVILS.js} +28 -27
- package/dist/{catchup-brief-U2TXBLHD.js → catchup-brief-SGGBMDUP.js} +32 -31
- package/dist/{cc-binary-detect-6TNIY5JX.js → cc-binary-detect-ZR6WNOUU.js} +1 -3
- package/dist/{chunk-NKETJCB5.js → chunk-2ODXCCMR.js} +18 -3
- package/dist/{hook-integrity-KGAV6ZC2.js → chunk-3L72UBUH.js} +28 -15
- package/dist/chunk-3OX5S7KZ.js +273 -0
- package/dist/{chunk-W75GTHR3.js → chunk-3SRZNJKD.js} +1 -1
- package/dist/{chunk-I4DNJFDR.js → chunk-42IFYZUN.js} +4 -4
- package/dist/{chunk-JHI5WMK5.js → chunk-473JUDCT.js} +5 -5
- package/dist/{chunk-ANLFH23R.js → chunk-4F5CNI65.js} +1 -1
- package/dist/{chunk-AWWKRZMB.js → chunk-4KVSCQND.js} +87 -14
- package/dist/{chunk-ZCERWHY2.js → chunk-4M6RXJEY.js} +33 -23
- package/dist/{chunk-YTSXPJUQ.js → chunk-4YJEEOYT.js} +3 -3
- package/dist/{chunk-6RKKVPYF.js → chunk-4YUGB637.js} +1 -1
- package/dist/{chunk-XXOPG4BW.js → chunk-4ZSOKEDY.js} +3 -3
- package/dist/{chunk-55BEFF4V.js → chunk-5DF4Y6EC.js} +1 -1
- package/dist/{chunk-4QCFFW2H.js → chunk-5QCIWWFA.js} +46 -0
- package/dist/{chunk-3UUX5OY4.js → chunk-5QKLWJ4Z.js} +1 -1
- package/dist/{chunk-YSLGFPWX.js → chunk-5UBWBXLF.js} +3 -3
- package/dist/chunk-5WA4DG2A.js +117 -0
- package/dist/{chunk-4EN3IZ3Q.js → chunk-64ODONK2.js} +67 -1
- package/dist/{chunk-TAMDAOCU.js → chunk-66CGXQUA.js} +239 -39
- package/dist/{chunk-QHJR7IMX.js → chunk-6F3FQCAQ.js} +3 -3
- package/dist/{chunk-WMEYJT4R.js → chunk-6FG34V6D.js} +15 -14
- package/dist/{chunk-NMH5ZQPU.js → chunk-6KQ6WMTI.js} +1 -1
- package/dist/{chunk-IRVOXUSK.js → chunk-6WKBTZVL.js} +10 -4
- package/dist/{chunk-NOKJCF27.js → chunk-7INEFMVU.js} +9 -3
- package/dist/{chunk-GSJLB6JI.js → chunk-7THUQU44.js} +34 -8
- package/dist/{chunk-HDLAB7W3.js → chunk-7UH2JWBF.js} +1 -1
- package/dist/{chunk-KTCXJWJG.js → chunk-7UNMSF5O.js} +1 -1
- package/dist/{chunk-JTVIANUB.js → chunk-AEUGIJDO.js} +3 -1
- package/dist/{chunk-DSJI76XL.js → chunk-AHNVFBVB.js} +113 -16
- package/dist/{chunk-IBS2FAI4.js → chunk-AUKRBHHZ.js} +4 -1
- package/dist/{chunk-AKLJ4JH3.js → chunk-BBK2TSK3.js} +1 -1
- package/dist/{chunk-ZL4AGWAH.js → chunk-BNWWVYRN.js} +6 -5
- package/dist/{chunk-PY3FOMRN.js → chunk-BQEZPRUC.js} +4 -4
- package/dist/{chunk-DIXXEE3S.js → chunk-BQXYXJYC.js} +721 -309
- package/dist/{chunk-ORM7ZFKC.js → chunk-BZ546I4Q.js} +32 -0
- package/dist/{chunk-3KDCORDO.js → chunk-C2UN464N.js} +1 -1
- package/dist/{chunk-75H4R62K.js → chunk-CBPNZFSU.js} +0 -2
- package/dist/{chunk-YLXTKI6M.js → chunk-CHO5SNWR.js} +1 -1
- package/dist/{chunk-MXPNVSXI.js → chunk-CIEVY5TD.js} +11 -11
- package/dist/{chunk-UBK7HK3J.js → chunk-CKLJT2DH.js} +2 -2
- package/dist/{chunk-MOGA4Q7F.js → chunk-CKOJP7JI.js} +1 -1
- package/dist/{chunk-V3W3SATA.js → chunk-CL4J4757.js} +1 -1
- package/dist/{chunk-XNNECNDL.js → chunk-CQFWTWC6.js} +13 -13
- package/dist/{chunk-PDVXWXTL.js → chunk-CROVXJ4S.js} +3 -3
- package/dist/{chunk-WJG344NC.js → chunk-CWSLTSL6.js} +8 -8
- package/dist/{chunk-VMTZ4RUW.js → chunk-DDMGQ5Q3.js} +60 -26
- package/dist/{chunk-YKC7QDZH.js → chunk-DN24VTS5.js} +31 -6
- package/dist/{chunk-IN6CAM4F.js → chunk-EHAN752X.js} +7 -7
- package/dist/{chunk-EXTZSNWL.js → chunk-EPHSISMT.js} +2 -2
- package/dist/{chunk-6EZQUNE6.js → chunk-FCMQVEVL.js} +36 -3
- package/dist/{chunk-3L2QU5ZF.js → chunk-FS7XF7SE.js} +1 -1
- package/dist/{chunk-LGS2V2XD.js → chunk-FUKVP54K.js} +66 -19
- package/dist/{chunk-44TLJZJ5.js → chunk-FX2QRSRT.js} +1 -1
- package/dist/{chunk-PWRC5XZO.js → chunk-FXZ6VGFW.js} +16 -8
- package/dist/{chunk-NT7W4RXD.js → chunk-GKDAQL45.js} +1 -1
- package/dist/{chunk-EKE37MO4.js → chunk-GOT5ZHPX.js} +3 -3
- package/dist/{chunk-SLLLOOEI.js → chunk-GPJIBLP4.js} +1 -0
- package/dist/{chunk-EKYYMIVT.js → chunk-GPUOUUHA.js} +10 -1
- package/dist/{chunk-PB5S7YOF.js → chunk-GXNBPTPJ.js} +1 -1
- package/dist/{chunk-4SJ4LK4V.js → chunk-HE34XVD5.js} +5 -5
- package/dist/{chunk-6VHOQ3IM.js → chunk-HHAKXIKX.js} +12 -9
- package/dist/{chunk-TFKCERAK.js → chunk-HHT527PV.js} +38 -41
- package/dist/{chunk-ZSODLMFV.js → chunk-HIVOLPLD.js} +1 -40
- package/dist/{chunk-UCFC2AEI.js → chunk-I3LDTSWU.js} +1 -1
- package/dist/{chunk-Q3AXXKDF.js → chunk-IKXH4BFC.js} +5 -5
- package/dist/chunk-IMYGYIAI.js +23 -0
- package/dist/{chunk-GS7LIT34.js → chunk-IPHLUZ37.js} +1 -1
- package/dist/{chunk-M4IRPXSZ.js → chunk-IZA7XW2Q.js} +3 -3
- package/dist/{chunk-SEQIPGLU.js → chunk-IZLML47J.js} +1 -1
- package/dist/{chunk-4HKTO2SV.js → chunk-JRMHGO5B.js} +1 -1
- package/dist/{chunk-U73AC5AN.js → chunk-JSTTPYL3.js} +16 -16
- package/dist/{chunk-6SCGLHJ7.js → chunk-JVWLHBAV.js} +4 -4
- package/dist/{chunk-OVEQE6YS.js → chunk-K7UNIEB4.js} +254 -48
- package/dist/{chunk-HNWS7YHN.js → chunk-KBR5LIWD.js} +1 -1
- package/dist/{chunk-AKLQSC6W.js → chunk-KI7O64XV.js} +328 -98
- package/dist/{chunk-XXFKSJYA.js → chunk-KK3MIY5C.js} +5 -5
- package/dist/{chunk-U6SUKSZR.js → chunk-KO3OHI6V.js} +3 -3
- package/dist/{chunk-NJFJWQNN.js → chunk-L5CGXEZC.js} +27 -22
- package/dist/{chunk-NBXDXKLC.js → chunk-LK3XQDBP.js} +1 -1
- package/dist/{chunk-T3QUKNLI.js → chunk-LM443ORV.js} +1 -1
- package/dist/{chunk-BBSIEYF5.js → chunk-LNAFLXL7.js} +12 -4
- package/dist/{chunk-32YV32VA.js → chunk-LTUA5EYI.js} +122 -11
- package/dist/{chunk-23MVDXLY.js → chunk-MAXD5JQL.js} +11 -10
- package/dist/{chunk-GNUAL43X.js → chunk-MFASHRJ6.js} +5 -5
- package/dist/chunk-MFYMDGE7.js +37 -0
- package/dist/{chunk-VKJGHAZT.js → chunk-MGVILAYU.js} +57 -13
- package/dist/{chunk-DB55JZHU.js → chunk-MSLWRWTI.js} +1 -1
- package/dist/{chunk-C2L622QJ.js → chunk-NB5IRTC4.js} +52 -44
- package/dist/{chunk-2ZOEC4KC.js → chunk-ND75TGPR.js} +2 -2
- package/dist/{chunk-VRTCVZND.js → chunk-NE34MWVL.js} +142 -16
- package/dist/{chunk-S2WBS6BG.js → chunk-NMOFLWDY.js} +1 -1
- package/dist/{chunk-CRCB5S7I.js → chunk-NPXKGBVZ.js} +140 -23
- package/dist/{chunk-JSMDRKPJ.js → chunk-NRBGUIPE.js} +1 -1
- package/dist/{chunk-4LWBC7CM.js → chunk-NY6SBR4O.js} +1 -1
- package/dist/{chunk-UCUOGVDX.js → chunk-O3K2C22L.js} +13 -1
- package/dist/{chunk-R522MWAR.js → chunk-OATET4BV.js} +2 -2
- package/dist/chunk-OOZU5H3T.js +86 -0
- package/dist/{chunk-XFTEX77S.js → chunk-OQ4FNDRG.js} +28 -6
- package/dist/{chunk-VYQ7B7DI.js → chunk-OWVX52XF.js} +4 -4
- package/dist/{chunk-AETLDRZB.js → chunk-PEAAX6UA.js} +1 -1
- package/dist/{chunk-UM3N6VND.js → chunk-PFAVHC5N.js} +5 -5
- package/dist/chunk-PMVVUIHH.js +85 -0
- package/dist/chunk-PPMGQFLJ.js +2317 -0
- package/dist/{chunk-7TSBV3SD.js → chunk-PTY2N23C.js} +310 -2
- package/dist/{chunk-UKLN57Q5.js → chunk-PZ5SKYK6.js} +4 -4
- package/dist/{chunk-636LKCKE.js → chunk-Q6ZLQMP2.js} +1 -1
- package/dist/{chunk-N7VEP5B3.js → chunk-QFR5EKZG.js} +29 -7
- package/dist/{chunk-YMP2QSOP.js → chunk-QN56VQ6Z.js} +1 -1
- package/dist/{chunk-6YVUR3OU.js → chunk-QR3BUMOS.js} +2 -2
- package/dist/{chunk-XZ65ST2I.js → chunk-QV5CQLQH.js} +2 -2
- package/dist/{chunk-DJOIMFKV.js → chunk-REZIGNA6.js} +2 -2
- package/dist/{chunk-UQGSBM3U.js → chunk-RFPMXR6B.js} +11 -0
- package/dist/{chunk-DN4YVV4Z.js → chunk-RSABKW6B.js} +1 -1
- package/dist/{chunk-LP4GB656.js → chunk-RZNP35SI.js} +2 -2
- package/dist/{chunk-NUTZJZKW.js → chunk-SKTAZGFI.js} +10 -42
- package/dist/{chunk-TQAZTRQ3.js → chunk-SVXUT2DN.js} +4 -4
- package/dist/{chunk-DJ7YXOTU.js → chunk-T7EF5CQO.js} +3 -3
- package/dist/{chunk-QAEWWYHL.js → chunk-TDF2XKLK.js} +5 -1
- package/dist/{chunk-ZGYNKA3O.js → chunk-TT5BBVLX.js} +29 -31
- package/dist/{chunk-5H47VHB7.js → chunk-UWX6MMCX.js} +1 -1
- package/dist/{chunk-XL5MFGMR.js → chunk-V4YNN7PA.js} +10 -3
- package/dist/{chunk-SL6KQYDU.js → chunk-V5DDXXMP.js} +7 -7
- package/dist/{chunk-DZKPOSFD.js → chunk-VH6SPPNA.js} +1 -1
- package/dist/{chunk-LDNYSMPZ.js → chunk-VJUUI2VT.js} +1 -1
- package/dist/{chunk-CBCGDEJA.js → chunk-VN5WOOAQ.js} +42 -6
- package/dist/{chunk-EXDW3E2R.js → chunk-VPHJ2LUI.js} +165 -15
- package/dist/{chunk-GOMQ7PVQ.js → chunk-WJC6AAJN.js} +1 -1
- package/dist/{chunk-GJI77VDO.js → chunk-WVBVUVZB.js} +6 -5
- package/dist/{chunk-A6PDF4BO.js → chunk-XTQ7R2PA.js} +2 -2
- package/dist/{chunk-L6RXG36J.js → chunk-Y2HD2YB7.js} +1 -1
- package/dist/{chunk-KTU3EAWK.js → chunk-YAACLBZ7.js} +5 -5
- package/dist/{chunk-7GE2EQ23.js → chunk-YGVAKKGJ.js} +11 -6
- package/dist/chunk-YLHACCCB.js +166 -0
- package/dist/{chunk-PLZSZOZN.js → chunk-YP6UGVEY.js} +3 -3
- package/dist/{chunk-ULIBLJ6W.js → chunk-YYC553FO.js} +5 -5
- package/dist/{chunk-T35RCQFE.js → chunk-YZPEQW7H.js} +9 -8
- package/dist/{chunk-KI5PFRG6.js → chunk-ZKGWHT56.js} +60 -2
- package/dist/{chunk-NUK7EEN5.js → chunk-ZKJ5S23O.js} +33 -13
- package/dist/chunk-ZLPS3GR7.js +146 -0
- package/dist/{chunk-XH7YL7JM.js → chunk-ZMX22HSS.js} +50 -6
- package/dist/{chunk-JY5GAZYC.js → chunk-ZQEJ4IX2.js} +4 -0
- package/dist/{chunk-R4CBHKZ2.js → chunk-ZS5JO6QV.js} +7 -6
- package/dist/{cleanup-graph-garbage-DPJGO52H.js → cleanup-graph-garbage-LAPIZGFX.js} +12 -12
- package/dist/{cloud-sync-command-JPNTT4OQ.js → cloud-sync-command-QAZ2NWRA.js} +11 -2
- package/dist/{cloud-sync-db-init-V2LWIUQU.js → cloud-sync-db-init-HAGVF32Y.js} +1 -1
- package/dist/{cloud-sync-shutdown-BNALPWGX.js → cloud-sync-shutdown-DAEPCFVK.js} +5 -5
- package/dist/{co-activation-CMNSWS6B.js → co-activation-523TKQPZ.js} +5 -5
- package/dist/{co-occurrence-WRI2NAN6.js → co-occurrence-PQUCTENN.js} +36 -17
- package/dist/{code-context-index-NOJSHLPN.js → code-context-index-LIDOFKOR.js} +6 -4
- package/dist/{code-context-watcher-VZNZU3BO.js → code-context-watcher-4F7K2N3U.js} +6 -4
- package/dist/{content-extractor-NXYNEF5K.js → content-extractor-DJM5EUDA.js} +2 -2
- package/dist/{conversation-entity-extractor-74252CAO.js → conversation-entity-extractor-THGKQ5RD.js} +5 -5
- package/dist/{crdt-sync-B3JN6AIV.js → crdt-sync-32B55NOJ.js} +1 -1
- package/dist/{crm-webhook-GYWQRFET.js → crm-webhook-FHRISFYQ.js} +2 -2
- package/dist/{cto-delegation-gate-LQHVLEMW.js → cto-delegation-gate-O6XPGECP.js} +27 -26
- package/dist/{daemon-auth-QZHEO7IQ.js → daemon-auth-PNKHERLV.js} +6 -1
- package/dist/daemon-drift-N2GKUBAO.js +15 -0
- package/dist/{daemon-orchestration-5HIQALZH.js → daemon-orchestration-BWLSJG2X.js} +33 -30
- package/dist/{daemon-ready-P2BR2XP5.js → daemon-ready-BN6EZLTQ.js} +1 -1
- package/dist/{daemon-ready-signal-CKXPUMJ2.js → daemon-ready-signal-PNDMVKPJ.js} +3 -1
- package/dist/{daemon-restart-circuit-breaker-SMTWFX27.js → daemon-restart-circuit-breaker-CD4VMCU7.js} +1 -1
- package/dist/daemon-restart-report-FIO5HZTJ.js +15 -0
- package/dist/{daemon-timer-report-TNJH5SFY.js → daemon-timer-report-6UK5PSDP.js} +2 -1
- package/dist/{db-integrity-events-2DTFO37N.js → db-integrity-events-GYGANKZV.js} +1 -1
- package/dist/{destructive-data-guard-BVFWPPIS.js → destructive-data-guard-HHWUBIGS.js} +1 -1
- package/dist/{doc-graph-extractor-PQHDHQPQ.js → doc-graph-extractor-HOKOV7BE.js} +10 -10
- package/dist/{documents-C4SSPJMC.js → documents-HWEJMONR.js} +16 -14
- package/dist/{dreaming-XAO3FCBV.js → dreaming-FMNDODG2.js} +31 -30
- package/dist/{employee-boot-brief-W4OHUMRQ.js → employee-boot-brief-DBFROOQJ.js} +35 -34
- package/dist/{entity-boost-3UWGXG5O.js → entity-boost-5V4W6NFA.js} +1 -1
- package/dist/{exe-drift-AG2KMKD5.js → exe-drift-V55UAYRT.js} +6 -6
- package/dist/{exe-export-IC5BT335.js → exe-export-LHN42ZUS.js} +18 -16
- package/dist/{exe-import-A35ZLDPG.js → exe-import-M536BEZC.js} +18 -16
- package/dist/{exe-key-TCMJNYLA.js → exe-key-37XIR22X.js} +111 -107
- package/dist/{exe-org-JXCR3JYZ.js → exe-org-7TDIRNTE.js} +14 -14
- package/dist/{exe-snapshot-SV6SRIG6.js → exe-snapshot-EOUBCIQK.js} +34 -33
- package/dist/{fast-db-init-L2RGKJWH.js → fast-db-init-GWUZ746B.js} +1 -1
- package/dist/{founder-context-D4HFIESJ.js → founder-context-6LQKET4A.js} +2 -2
- package/dist/{fts-integrity-4YB34KWX.js → fts-integrity-PLAL6NMG.js} +1 -1
- package/dist/gateway/index.js +17 -17
- package/dist/{git-main-guard-VTW4N3CM.js → git-main-guard-BGICS25C.js} +1 -1
- package/dist/{git-staleness-TN7CYGFG.js → git-staleness-QNNXJK3W.js} +5 -5
- package/dist/{global-procedures-YFDEIOG7.js → global-procedures-NMQGF54V.js} +7 -7
- package/dist/{gotrue-session-ODZ2ERJX.js → gotrue-session-U4H3UGHL.js} +1 -3
- package/dist/{graph-auto-extract-3YR3TYRW.js → graph-auto-extract-7POGAKHM.js} +10 -10
- package/dist/{graph-query-AP5R6ZHO.js → graph-query-ZEDO4BDF.js} +1 -1
- package/dist/{graph-rag-Z2KCJTPK.js → graph-rag-JA7XN7NO.js} +5 -5
- package/dist/hook-integrity-6NLSNTXD.js +15 -0
- package/dist/{hook-prefetch-K5DN3TOQ.js → hook-prefetch-4KH3D4YU.js} +28 -26
- package/dist/hook-tamper-log-Z4PWC7N4.js +90 -0
- package/dist/hooks/bug-report-worker.js +31 -30
- package/dist/hooks/codex-stop-task-finalizer.js +33 -32
- package/dist/hooks/commit-complete.js +30 -29
- package/dist/hooks/error-recall.js +12 -12
- package/dist/hooks/exe-heartbeat-hook.js +7 -7
- package/dist/hooks/ingest-worker.js +17 -15
- package/dist/hooks/ingest.js +20 -20
- package/dist/hooks/instructions-loaded.js +9 -9
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +8 -8
- package/dist/hooks/post-compact.js +7 -7
- package/dist/hooks/post-tool-combined.js +14 -14
- package/dist/hooks/pre-compact.js +30 -29
- package/dist/hooks/pre-tool-use.js +303 -489
- package/dist/hooks/prompt-submit.js +61 -54
- package/dist/hooks/session-end.js +35 -34
- package/dist/hooks/session-start.js +18 -18
- package/dist/hooks/stop.js +36 -35
- package/dist/hooks/subagent-stop.js +32 -31
- package/dist/hooks/summary-worker.js +36 -35
- package/dist/index.js +39 -38
- package/dist/{installer-LK35OX6R.js → installer-M34Q7LAS.js} +25 -10
- package/dist/{installer-54HTN5RE.js → installer-POV6TDQ5.js} +12 -8
- package/dist/{installer-LLWKZI2S.js → installer-S624ZOMB.js} +12 -8
- package/dist/{intercom-queue-5NOT2RKI.js → intercom-queue-MKDWAEUV.js} +26 -25
- package/dist/lib/cloud-sync.js +27 -19
- package/dist/lib/consolidation.js +12 -12
- package/dist/lib/database.js +5 -5
- package/dist/lib/db-backup.js +7 -1
- package/dist/lib/db-daemon-client.js +8 -6
- package/dist/lib/db-write-worker.js +4 -4
- package/dist/lib/db.js +5 -5
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embedder.js +6 -4
- package/dist/lib/employee-templates.js +8 -8
- package/dist/lib/employees.js +5 -5
- package/dist/lib/exe-daemon-client.js +5 -3
- package/dist/lib/exe-daemon.js +333 -262
- package/dist/lib/hybrid-search.js +10 -10
- package/dist/lib/identity-templates.js +1 -1
- package/dist/lib/identity.js +17 -7
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +27 -26
- package/dist/lib/post-tool-memory.js +9 -9
- package/dist/lib/registry-proxy.js +3 -1
- package/dist/lib/reminders.js +6 -6
- package/dist/lib/schedules.js +11 -11
- package/dist/lib/session-registry.js +11 -7
- package/dist/lib/session-wrappers.js +1 -1
- package/dist/lib/skill-learning.js +17 -15
- package/dist/lib/status-brief.js +2 -1
- package/dist/lib/store.js +9 -9
- package/dist/lib/task-router.js +6 -6
- package/dist/lib/tasks.js +28 -27
- package/dist/lib/tmux-routing.js +26 -25
- package/dist/lib/tmux-status.js +5 -1
- package/dist/lib/token-spend.js +6 -6
- package/dist/{license-gate-JVMB6OFD.js → license-gate-2QNMBAZU.js} +3 -3
- package/dist/{license-sync-5VYS2F2W.js → license-sync-FEDKH5MD.js} +2 -2
- package/dist/{mailbox-inbox-4MEUOL3J.js → mailbox-inbox-XE72D3AX.js} +2 -2
- package/dist/{mailbox-outbox-J6WIF3UY.js → mailbox-outbox-DNDDP2HW.js} +1 -1
- package/dist/mcp/register-tools.js +110 -106
- package/dist/mcp/server.js +113 -109
- package/dist/mcp/tools/complete-reminder.js +7 -7
- package/dist/mcp/tools/create-reminder.js +7 -7
- package/dist/mcp/tools/create-task.js +30 -29
- package/dist/mcp/tools/deactivate-behavior.js +18 -16
- package/dist/mcp/tools/list-reminders.js +7 -7
- package/dist/mcp/tools/list-tasks.js +30 -29
- package/dist/mcp/tools/send-message.js +33 -30
- package/dist/mcp/tools/update-task.js +29 -28
- package/dist/{mcp-child-registry-OTG4MWO7.js → mcp-child-registry-DVHYAHPW.js} +2 -2
- package/dist/{mcp-health-HNVSWKFA.js → mcp-health-B5EKRCZG.js} +2 -2
- package/dist/{mcp-http-config-DQWL7U2Z.js → mcp-http-config-ZJ7XHWT7.js} +10 -6
- package/dist/{mcp-session-identity-277GASTQ.js → mcp-session-identity-PEVM7VIP.js} +26 -25
- package/dist/{memory-cards-3S2ZQPR7.js → memory-cards-VN5DEWPD.js} +9 -9
- package/dist/{memory-graph-extractor-A6DFEFIN.js → memory-graph-extractor-TMEB6WLA.js} +11 -11
- package/dist/{memory-poisoning-defense-ZVP4H6DY.js → memory-poisoning-defense-DYHARQ2G.js} +5 -5
- package/dist/{memory-pressure-watchdog-6W5F6R7H.js → memory-pressure-watchdog-J6Q3SIBL.js} +27 -26
- package/dist/{memory-queue-client-ADSDP6OX.js → memory-queue-client-QC2OTMJB.js} +6 -4
- package/dist/{memory-reflection-BKB2YOE6.js → memory-reflection-ZYJUOSFX.js} +9 -9
- package/dist/{message-queue-client-XQN7QABL.js → message-queue-client-OEQCGSWC.js} +1 -25
- package/dist/{notification-ledger-CLGM7ODF.js → notification-ledger-TG6EFYBP.js} +29 -28
- package/dist/{notifications-MACUZPYP.js → notifications-LGYY22W5.js} +26 -25
- package/dist/{orchestration-events-N7LYMUGA.js → orchestration-events-JPHB6NPY.js} +6 -6
- package/dist/{orchestrator-4X24EWHV.js → orchestrator-IC4WGP6L.js} +28 -27
- package/dist/{org-brief-session-FZOFMO5U.js → org-brief-session-DEPHWCQR.js} +9 -9
- package/dist/{org-consent-policy-O5E6HXBL.js → org-consent-policy-T27AO5OJ.js} +2 -2
- package/dist/{org-join-POWUG25F.js → org-join-A3YXC5RB.js} +2 -2
- package/dist/{org-key-admin-E7EMDOZZ.js → org-key-admin-SQFHCVP2.js} +3 -3
- package/dist/{org-partner-runtime-FODONVTM.js → org-partner-runtime-L7L2WWGN.js} +10 -10
- package/dist/{org-row-visibility-VX4AVV5Q.js → org-row-visibility-M54Z6ZH3.js} +1 -1
- package/dist/{pipeline-router-6GGT2ZW3.js → pipeline-router-NKYAUR3Y.js} +6 -6
- package/dist/{plan-limits-FUN76LYY.js → plan-limits-ISRRGF23.js} +8 -8
- package/dist/{platform-procedures-7YSCLF4Z.js → platform-procedures-Z7ZGBJWN.js} +1 -1
- package/dist/{project-boot-3Q65LCIP.js → project-boot-BLYGVUJH.js} +4 -1
- package/dist/{project-name-LJVFMYTQ.js → project-name-WKSNNKXK.js} +6 -6
- package/dist/{projection-worker-4OANGP5K.js → projection-worker-RNYPE46G.js} +2 -2
- package/dist/{prospective-memory-KR3P4T6N.js → prospective-memory-GEO6E3UL.js} +5 -5
- package/dist/{push-notifications-NCZLH6DI.js → push-notifications-EY6BXZUY.js} +27 -26
- package/dist/{reproject-worktree-memories-PWYKPB2U.js → reproject-worktree-memories-DAA5GWMH.js} +28 -27
- package/dist/{reranker-6V3C2AO4.js → reranker-7OADQPMG.js} +1 -1
- package/dist/{retrieval-health-5D7O6VH6.js → retrieval-health-FCEDWN2P.js} +2 -2
- package/dist/{review-polling-QW3LJ4KN.js → review-polling-G52BR4MC.js} +27 -26
- package/dist/runtime/index.js +39 -38
- package/dist/{session-events-T45SSTMF.js → session-events-P6E2373E.js} +27 -26
- package/dist/{session-kill-telemetry-QSPVJGBF.js → session-kill-telemetry-OHNJMIVT.js} +27 -26
- package/dist/{session-mcp-config-SC5BLWZG.js → session-mcp-config-WFZAH6R5.js} +2 -1
- package/dist/{session-scope-KRWE54C4.js → session-scope-DKOHPQPJ.js} +26 -25
- package/dist/{setup-wizard-GP3TBTPF.js → setup-wizard-RNU3RFBE.js} +1 -1
- package/dist/{skill-refinement-C7JTMLJG.js → skill-refinement-AKJTHFXC.js} +6 -6
- package/dist/{stack-generate-manifest-MFMDWRUP.js → stack-generate-manifest-7WJZWSPK.js} +163 -15
- package/dist/{stack-promote-EKSCYY63.js → stack-promote-OP2URGFF.js} +4 -4
- package/dist/{stack-release-2GZAAFO4.js → stack-release-MY6U2QIO.js} +31 -8
- package/dist/{stack-update-J6JXSTAZ.js → stack-update-QSHSLUTZ.js} +3 -3
- package/dist/{steward-gate-BFCCMCSW.js → steward-gate-KMLS5ECC.js} +6 -6
- package/dist/{subagent-brief-injection-ED36PLYY.js → subagent-brief-injection-HCKZQZBF.js} +37 -36
- package/dist/{support-inbox-YW47SYJF.js → support-inbox-UBXU5RKV.js} +11 -11
- package/dist/{support-outbox-HFJWG52M.js → support-outbox-G2NG2U5K.js} +2 -2
- package/dist/{sweep-budget-KMPJ7O5Z.js → sweep-budget-YGLCNXZZ.js} +9 -3
- package/dist/{task-enforcement-CECTQX4U.js → task-enforcement-2GR7HU6V.js} +27 -26
- package/dist/{task-request-inbox-Q5T4N5K7.js → task-request-inbox-ANCVK2VG.js} +2 -2
- package/dist/{task-scope-ERVEUEYU.js → task-scope-QANJJXXB.js} +30 -29
- package/dist/{tasks-crud-ZRQNJXQ2.js → tasks-crud-45WOIMIM.js} +44 -25
- package/dist/{tasks-notify-MIZH4C2O.js → tasks-notify-ZJS4MA3S.js} +29 -26
- package/dist/{tasks-review-Z7J2P6DG.js → tasks-review-ZVPKY47Z.js} +26 -25
- package/dist/{telemetry-upload-LVQUQYFP.js → telemetry-upload-VY3UWAEL.js} +10 -10
- package/dist/{token-budget-BU4NOVZF.js → token-budget-XHX6XFEC.js} +6 -6
- package/dist/{tool-capability-index-7F42MOJT.js → tool-capability-index-6HLZU437.js} +1 -1
- package/dist/{tool-telemetry-O27EVMBR.js → tool-telemetry-GBDI4AXR.js} +1 -1
- package/dist/tui/App.js +36 -35
- package/dist/{tui-data-TPWWBIUQ.js → tui-data-IQFE3UW3.js} +30 -29
- package/dist/{typed-messages-RCMPEKJN.js → typed-messages-P2HLLA62.js} +1 -1
- package/dist/{update-support-F2F5537B.js → update-support-BDN5AK4R.js} +25 -22
- package/dist/{work-claims-B73X5NE7.js → work-claims-PDQNLE5K.js} +7 -7
- package/dist/{work-state-heartbeat-P4YX6E2R.js → work-state-heartbeat-CH6BLQKV.js} +1 -1
- package/dist/{worker-gate-BEEIIVWA.js → worker-gate-NUUSQMBT.js} +1 -3
- package/dist/{workflow-engine-5X46PFCW.js → workflow-engine-RZ7QEI3Z.js} +2 -2
- package/dist/{worktree-W47CIMJ6.js → worktree-Q25PZST6.js} +11 -7
- package/dist/worktree-ownership-guard-4LKMW6PW.js +421 -0
- package/dist/{worktree-sweep-BNBD4RFX.js → worktree-sweep-EV5YQ2OB.js} +8 -8
- package/package.json +15 -3
- package/release-notes.json +5 -5
- package/src/commands/exe.md +16 -16
- package/stack.release.json +9 -8
- package/dist/behavior-injection-M6UYZCMW.js +0 -63
- package/dist/chunk-BJ7AVSY6.js +0 -50
- package/dist/daemon-restart-report-EIVD6WDJ.js +0 -10
- package/dist/worktree-ownership-guard-OUWJROW2.js +0 -88
- /package/dist/{chunk-GQOEWNVM.js → chunk-4EG4DT4F.js} +0 -0
- /package/dist/{chunk-AISULNGL.js → chunk-BRAIWGMF.js} +0 -0
- /package/dist/{chunk-NRG7KZIP.js → chunk-HQEAZDAC.js} +0 -0
- /package/dist/{chunk-VZAFWPAY.js → chunk-IK4344V5.js} +0 -0
- /package/dist/{chunk-GM7TLYOK.js → chunk-K3VDF6II.js} +0 -0
- /package/dist/{chunk-2AJGV5UL.js → chunk-KM7DAG5J.js} +0 -0
- /package/dist/{chunk-YO4BO2CL.js → chunk-QIEYJ4KZ.js} +0 -0
- /package/dist/{chunk-WSQASFLP.js → chunk-VCTK5HRA.js} +0 -0
- /package/dist/{chunk-KQ6RJWRW.js → chunk-VPT6VMBG.js} +0 -0
- /package/dist/{chunk-6WIFPD2P.js → chunk-YZ4AEMR7.js} +0 -0
- /package/dist/{core-memory-7I7RE2SJ.js → core-memory-UIZKCY4L.js} +0 -0
- /package/dist/{memory-isolation-2TUZ7Z4K.js → memory-isolation-3GJ6WLYX.js} +0 -0
- /package/dist/{oauth-server-AYM37SQ4.js → oauth-server-ZRHXIRXQ.js} +0 -0
- /package/dist/{wiki-acl-IBQLLBTS.js → wiki-acl-MFOYK5F4.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isCrdtSyncEnabled
|
|
3
|
-
} from "./chunk-KQ6RJWRW.js";
|
|
4
1
|
import {
|
|
5
2
|
compress,
|
|
6
3
|
decompress
|
|
7
4
|
} from "./chunk-NEHOQ3P2.js";
|
|
5
|
+
import {
|
|
6
|
+
isCrdtSyncEnabled
|
|
7
|
+
} from "./chunk-VPT6VMBG.js";
|
|
8
8
|
import {
|
|
9
9
|
orgMembershipsPath,
|
|
10
10
|
orgModeActive
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
} from "./chunk-3SXHEQ7X.js";
|
|
22
22
|
import {
|
|
23
23
|
getAuthHeader
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SKTAZGFI.js";
|
|
25
25
|
import {
|
|
26
26
|
GHOST_BEHAVIOR_SQL,
|
|
27
27
|
isGhostBehaviorRow
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6FG34V6D.js";
|
|
29
29
|
import {
|
|
30
30
|
retryOnDaemonTransportError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QV5CQLQH.js";
|
|
32
32
|
import {
|
|
33
33
|
decryptSyncBlob,
|
|
34
34
|
encryptSyncBlob,
|
|
@@ -41,10 +41,10 @@ import {
|
|
|
41
41
|
loadEmployees,
|
|
42
42
|
registerBinSymlinks,
|
|
43
43
|
saveEmployees
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-66CGXQUA.js";
|
|
45
45
|
import {
|
|
46
46
|
loadDeviceId
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-Y2HD2YB7.js";
|
|
48
48
|
import {
|
|
49
49
|
EXE_AI_DIR
|
|
50
50
|
} from "./chunk-ZIG7VPJV.js";
|
|
@@ -751,7 +751,7 @@ var CLOUD_REUPLOAD_REQUIRED_MESSAGE = "Cloud sync is blocked because this device
|
|
|
751
751
|
async function getCloudReuploadRequired(client = getClient()) {
|
|
752
752
|
try {
|
|
753
753
|
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
754
|
-
const result = await client.execute("SELECT key, value FROM sync_meta WHERE key IN ('cloud_reupload_required', 'cloud_relink_required')");
|
|
754
|
+
const result = await client.execute("SELECT key, value FROM sync_meta WHERE key IN ('cloud_reupload_required', 'cloud_relink_required', 'cloud_reupload_in_progress')");
|
|
755
755
|
return result.rows.some((row) => String(row.value ?? "") === "1");
|
|
756
756
|
} catch (e) {
|
|
757
757
|
const msg = e instanceof Error ? e.message : String(e);
|
|
@@ -759,15 +759,38 @@ async function getCloudReuploadRequired(client = getClient()) {
|
|
|
759
759
|
throw new Error(`[cloud-sync] Key-rotation guard check failed: ${msg}`);
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
+
async function getCloudReuploadInProgress(client = getClient()) {
|
|
763
|
+
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
764
|
+
const result = await client.execute("SELECT value FROM sync_meta WHERE key = 'cloud_reupload_in_progress'");
|
|
765
|
+
return result.rows.some((row) => String(row.value ?? "") === "1");
|
|
766
|
+
}
|
|
767
|
+
async function beginCloudReupload(client = getClient()) {
|
|
768
|
+
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
769
|
+
try {
|
|
770
|
+
await client.execute({
|
|
771
|
+
sql: "DELETE FROM sync_meta WHERE key IN ('last_cloud_pull_version', 'last_cloud_push_version', ?)",
|
|
772
|
+
args: [CLOUD_MEMORY_PUSH_SCAN_CURSOR_KEY]
|
|
773
|
+
});
|
|
774
|
+
} catch (e) {
|
|
775
|
+
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_in_progress', '0') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
776
|
+
throw e;
|
|
777
|
+
}
|
|
778
|
+
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_in_progress', '1') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
779
|
+
}
|
|
780
|
+
async function markCloudReuploadIncomplete(client = getClient()) {
|
|
781
|
+
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
782
|
+
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_required', '1') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
783
|
+
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_in_progress', '1') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
784
|
+
}
|
|
762
785
|
async function clearCloudReuploadRequired(client = getClient()) {
|
|
763
786
|
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
764
787
|
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_required', '0') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
765
788
|
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_relink_required', '0') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
789
|
+
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_in_progress', '0') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
766
790
|
await client.execute({
|
|
767
791
|
sql: "INSERT INTO sync_meta (key, value) VALUES ('cloud_reuploaded_at', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",
|
|
768
792
|
args: [(/* @__PURE__ */ new Date()).toISOString()]
|
|
769
793
|
});
|
|
770
|
-
await client.execute("DELETE FROM sync_meta WHERE key IN ('last_cloud_pull_version', 'last_cloud_push_version')");
|
|
771
794
|
}
|
|
772
795
|
var getCloudRelinkRequired = getCloudReuploadRequired;
|
|
773
796
|
async function clearCloudRelinkRequired(client = getClient()) {
|
|
@@ -783,6 +806,7 @@ async function clearCloudRelinkRequired(client = getClient()) {
|
|
|
783
806
|
async function markCloudReuploadRequired(client = getClient()) {
|
|
784
807
|
await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
|
|
785
808
|
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_required', '1') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
809
|
+
await client.execute("INSERT INTO sync_meta (key, value) VALUES ('cloud_reupload_in_progress', '0') ON CONFLICT(key) DO UPDATE SET value = excluded.value");
|
|
786
810
|
}
|
|
787
811
|
function defaultOnProgress(stage, detail) {
|
|
788
812
|
const msg = detail ? `[cloud-sync] ${stage}: ${detail}` : `[cloud-sync] ${stage}`;
|
|
@@ -1005,7 +1029,7 @@ async function cloudSync(config, options) {
|
|
|
1005
1029
|
throw new Error("[cloud-sync] Database not initialized. Call initStore() before cloudSync().");
|
|
1006
1030
|
}
|
|
1007
1031
|
try {
|
|
1008
|
-
if (await getCloudReuploadRequired(client)) throw new Error(CLOUD_REUPLOAD_REQUIRED_MESSAGE);
|
|
1032
|
+
if (!options?.allowKeyRotationReupload && await getCloudReuploadRequired(client)) throw new Error(CLOUD_REUPLOAD_REQUIRED_MESSAGE);
|
|
1009
1033
|
} catch (err) {
|
|
1010
1034
|
const msg = err instanceof Error ? err.message : String(err);
|
|
1011
1035
|
if (msg === CLOUD_REUPLOAD_REQUIRED_MESSAGE || msg.includes("key rotation") || msg.includes("guard check failed")) throw err;
|
|
@@ -1069,7 +1093,7 @@ async function cloudSync(config, options) {
|
|
|
1069
1093
|
})
|
|
1070
1094
|
};
|
|
1071
1095
|
if (shouldUseCrdtMergeForCloudSync()) {
|
|
1072
|
-
const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-
|
|
1096
|
+
const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-32B55NOJ.js");
|
|
1073
1097
|
initCrdtDoc();
|
|
1074
1098
|
importExistingMemories(
|
|
1075
1099
|
pullResult.records.map((rec) => ({
|
|
@@ -1281,6 +1305,8 @@ async function cloudSync(config, options) {
|
|
|
1281
1305
|
await stageDone("pull");
|
|
1282
1306
|
}
|
|
1283
1307
|
let pushed = 0;
|
|
1308
|
+
let memoryPushErrors = 0;
|
|
1309
|
+
let pendingMemories = 0;
|
|
1284
1310
|
if (!shouldSkip("memories")) {
|
|
1285
1311
|
onProgress("Cloud sync", `pushing memories...`);
|
|
1286
1312
|
const pushMeta = await client.execute(
|
|
@@ -1292,6 +1318,7 @@ async function cloudSync(config, options) {
|
|
|
1292
1318
|
lastPullVersion
|
|
1293
1319
|
});
|
|
1294
1320
|
pushed = memoryPush.pushed;
|
|
1321
|
+
memoryPushErrors = memoryPush.errors;
|
|
1295
1322
|
if (memoryPush.deferred) {
|
|
1296
1323
|
const elapsedMs = Date.now() - syncStartTime;
|
|
1297
1324
|
if (pushed > 0) {
|
|
@@ -1308,6 +1335,18 @@ async function cloudSync(config, options) {
|
|
|
1308
1335
|
);
|
|
1309
1336
|
return partialCloudSyncResult({ pushed, pulled, elapsedMs, deferred: true });
|
|
1310
1337
|
}
|
|
1338
|
+
if (memoryPushErrors > 0) {
|
|
1339
|
+
try {
|
|
1340
|
+
const pendingRes = await client.execute({
|
|
1341
|
+
sql: "SELECT COUNT(*) AS cnt FROM memories WHERE (scope IS NULL OR scope != 'personal') AND version > ?",
|
|
1342
|
+
args: [memoryPush.finalCursor]
|
|
1343
|
+
});
|
|
1344
|
+
pendingMemories = finiteVersion(pendingRes.rows[0]?.cnt, 0);
|
|
1345
|
+
} catch (err) {
|
|
1346
|
+
logError(`[cloud-sync] pending memory count failed after push errors: ${err instanceof Error ? err.message : String(err)}`);
|
|
1347
|
+
}
|
|
1348
|
+
if (pendingMemories < 1) pendingMemories = 1;
|
|
1349
|
+
}
|
|
1311
1350
|
await stageDone("memories");
|
|
1312
1351
|
}
|
|
1313
1352
|
const rosterSkipped = shouldSkip("roster");
|
|
@@ -1654,7 +1693,9 @@ async function cloudSync(config, options) {
|
|
|
1654
1693
|
coreMemory: coreMemoryResult,
|
|
1655
1694
|
roster: rosterResult,
|
|
1656
1695
|
codeContext: codeContextResult,
|
|
1657
|
-
elapsedMs: Date.now() - syncStartTime
|
|
1696
|
+
elapsedMs: Date.now() - syncStartTime,
|
|
1697
|
+
memoryPushErrors,
|
|
1698
|
+
pendingMemories
|
|
1658
1699
|
};
|
|
1659
1700
|
} finally {
|
|
1660
1701
|
_cloudSyncInProgress = false;
|
|
@@ -3103,6 +3144,9 @@ export {
|
|
|
3103
3144
|
cloudPull,
|
|
3104
3145
|
CLOUD_REUPLOAD_REQUIRED_MESSAGE,
|
|
3105
3146
|
getCloudReuploadRequired,
|
|
3147
|
+
getCloudReuploadInProgress,
|
|
3148
|
+
beginCloudReupload,
|
|
3149
|
+
markCloudReuploadIncomplete,
|
|
3106
3150
|
clearCloudReuploadRequired,
|
|
3107
3151
|
getCloudRelinkRequired,
|
|
3108
3152
|
clearCloudRelinkRequired,
|
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
// src/lib/git-main-guard.ts
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
3
|
import path from "path";
|
|
4
|
+
|
|
5
|
+
// src/lib/git-command-lex.ts
|
|
6
|
+
var SHELLS = /* @__PURE__ */ new Set(["sh", "bash", "zsh", "dash", "ksh"]);
|
|
7
|
+
function basename(tok) {
|
|
8
|
+
return tok.split("/").pop() ?? tok;
|
|
9
|
+
}
|
|
10
|
+
function isGitProgram(tok) {
|
|
11
|
+
return tok === "git" || /(?:^|\/)git$/.test(tok);
|
|
12
|
+
}
|
|
13
|
+
function isShellProgram(tok) {
|
|
14
|
+
return SHELLS.has(basename(tok));
|
|
15
|
+
}
|
|
16
|
+
function isDashC(tok) {
|
|
17
|
+
return /^-[a-z]*c[a-z]*$/i.test(tok) && tok.includes("c");
|
|
18
|
+
}
|
|
19
|
+
var SHELL_VALUE_OPTS = /* @__PURE__ */ new Set(["-o", "+o", "-O", "+O", "--rcfile", "--init-file"]);
|
|
20
|
+
function shellDashCScriptIndex(tokens, i) {
|
|
21
|
+
if (!isShellProgram(tokens[i])) return -1;
|
|
22
|
+
let j = i + 1;
|
|
23
|
+
while (j < tokens.length) {
|
|
24
|
+
const t = tokens[j];
|
|
25
|
+
if (isDashC(t)) return j + 1 < tokens.length ? j + 1 : -1;
|
|
26
|
+
if (SHELL_VALUE_OPTS.has(t)) {
|
|
27
|
+
j += 2;
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (t.startsWith("-")) {
|
|
31
|
+
j++;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
return -1;
|
|
35
|
+
}
|
|
36
|
+
return -1;
|
|
37
|
+
}
|
|
38
|
+
function isLeadingAssignment(tok) {
|
|
39
|
+
return /^[A-Za-z_][A-Za-z0-9_]*=/.test(tok);
|
|
40
|
+
}
|
|
41
|
+
function normalizeCleanGit(tokens) {
|
|
42
|
+
const first = tokens[0];
|
|
43
|
+
if (first === void 0) return { ok: false, reason: "empty command" };
|
|
44
|
+
if (isLeadingAssignment(first)) return { ok: false, reason: "leading environment assignment before git" };
|
|
45
|
+
if (isShellProgram(first)) return { ok: false, reason: `command runs a shell ("${first}") whose script cannot be verified` };
|
|
46
|
+
if (!isGitProgram(first)) return { ok: false, reason: `git is wrapped or embedded (program is "${first}", not a bare 'git')` };
|
|
47
|
+
return { ok: true, tokens: ["git", ...tokens.slice(1)] };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/lib/git-main-guard.ts
|
|
4
51
|
var MAIN_GUARD_OVERRIDE_TOKEN = "EXE_FORCE_ALLOW_MAIN_HISTORY_REWRITE=1";
|
|
5
52
|
var MAIN_GUARD_OVERRIDE_ENV = "EXE_FORCE_ALLOW_MAIN_HISTORY_REWRITE";
|
|
6
53
|
var GIT_TIMEOUT_MS = (() => {
|
|
@@ -123,13 +170,6 @@ function tokenizeShell(command) {
|
|
|
123
170
|
push();
|
|
124
171
|
return { tokens, hasShellControl };
|
|
125
172
|
}
|
|
126
|
-
var SHELLS = /* @__PURE__ */ new Set(["sh", "bash", "zsh", "dash", "ksh"]);
|
|
127
|
-
function basename(tok) {
|
|
128
|
-
return tok.split("/").pop() ?? tok;
|
|
129
|
-
}
|
|
130
|
-
function isGitProgram(tok) {
|
|
131
|
-
return tok === "git" || /(?:^|\/)git$/.test(tok);
|
|
132
|
-
}
|
|
133
173
|
function isGhProgram(tok) {
|
|
134
174
|
return tok === "gh" || /(?:^|\/)gh$/.test(tok);
|
|
135
175
|
}
|
|
@@ -164,34 +204,6 @@ function classifyGhSegment(tokens) {
|
|
|
164
204
|
if (/git\/refs\/tags\//.test(refPath)) return "tag";
|
|
165
205
|
return "block";
|
|
166
206
|
}
|
|
167
|
-
function isShellProgram(tok) {
|
|
168
|
-
return SHELLS.has(basename(tok));
|
|
169
|
-
}
|
|
170
|
-
function isDashC(tok) {
|
|
171
|
-
return /^-[a-z]*c[a-z]*$/i.test(tok) && tok.includes("c");
|
|
172
|
-
}
|
|
173
|
-
var SHELL_VALUE_OPTS = /* @__PURE__ */ new Set(["-o", "+o", "-O", "+O", "--rcfile", "--init-file"]);
|
|
174
|
-
function shellDashCScriptIndex(tokens, i) {
|
|
175
|
-
if (!isShellProgram(tokens[i])) return -1;
|
|
176
|
-
let j = i + 1;
|
|
177
|
-
while (j < tokens.length) {
|
|
178
|
-
const t = tokens[j];
|
|
179
|
-
if (isDashC(t)) return j + 1 < tokens.length ? j + 1 : -1;
|
|
180
|
-
if (SHELL_VALUE_OPTS.has(t)) {
|
|
181
|
-
j += 2;
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
if (t.startsWith("-")) {
|
|
185
|
-
j++;
|
|
186
|
-
continue;
|
|
187
|
-
}
|
|
188
|
-
return -1;
|
|
189
|
-
}
|
|
190
|
-
return -1;
|
|
191
|
-
}
|
|
192
|
-
function isLeadingAssignment(tok) {
|
|
193
|
-
return /^[A-Za-z_][A-Za-z0-9_]*=/.test(tok);
|
|
194
|
-
}
|
|
195
207
|
var FORCE_PUSH_FLAGS = /* @__PURE__ */ new Set(["-f", "--force"]);
|
|
196
208
|
function isForcePushFlag(t) {
|
|
197
209
|
return FORCE_PUSH_FLAGS.has(t) || /^--force-with-lease(=.*)?$/.test(t) || t === "--force-if-includes";
|
|
@@ -646,14 +658,6 @@ function hasEmergencyOverride(command, env = process.env) {
|
|
|
646
658
|
if (env[MAIN_GUARD_OVERRIDE_ENV] === "1") return true;
|
|
647
659
|
return new RegExp(String.raw`^\s*${MAIN_GUARD_OVERRIDE_ENV}=1\s+(?:git|gh)\b`).test(command);
|
|
648
660
|
}
|
|
649
|
-
function normalizeCleanGit(tokens) {
|
|
650
|
-
const first = tokens[0];
|
|
651
|
-
if (first === void 0) return { ok: false, reason: "empty command" };
|
|
652
|
-
if (isLeadingAssignment(first)) return { ok: false, reason: "leading environment assignment before git" };
|
|
653
|
-
if (isShellProgram(first)) return { ok: false, reason: `command runs a shell ("${first}") whose script cannot be verified` };
|
|
654
|
-
if (!isGitProgram(first)) return { ok: false, reason: `git is wrapped or embedded (program is "${first}", not a bare 'git')` };
|
|
655
|
-
return { ok: true, tokens: ["git", ...tokens.slice(1)] };
|
|
656
|
-
}
|
|
657
661
|
function evaluateMainGuard(command, opts = {}) {
|
|
658
662
|
const env = opts.env ?? process.env;
|
|
659
663
|
const cwd = opts.cwd ?? process.cwd();
|
|
@@ -775,10 +779,14 @@ ${OVERRIDE_LINE}`;
|
|
|
775
779
|
}
|
|
776
780
|
|
|
777
781
|
export {
|
|
782
|
+
basename,
|
|
783
|
+
isGitProgram,
|
|
784
|
+
isShellProgram,
|
|
785
|
+
shellDashCScriptIndex,
|
|
786
|
+
isLeadingAssignment,
|
|
778
787
|
MAIN_GUARD_OVERRIDE_TOKEN,
|
|
779
788
|
MAIN_GUARD_OVERRIDE_ENV,
|
|
780
789
|
tokenizeShell,
|
|
781
|
-
isGitProgram,
|
|
782
790
|
isGhProgram,
|
|
783
791
|
splitShellSegments,
|
|
784
792
|
containsDestructiveGitCandidate,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCurrentSessionScope,
|
|
3
3
|
strictSessionScopeFilter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KI7O64XV.js";
|
|
5
5
|
import {
|
|
6
6
|
getProjectName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AEUGIJDO.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/session-events.ts
|
|
10
10
|
import { randomUUID } from "crypto";
|
|
@@ -4,6 +4,12 @@ import {
|
|
|
4
4
|
SUSPEND_CLUSTER_WINDOW_MS,
|
|
5
5
|
findTimerWakeClusterArtifacts
|
|
6
6
|
} from "./chunk-YQGMSXT5.js";
|
|
7
|
+
import {
|
|
8
|
+
TIMER_HARM_SEVERE_MS,
|
|
9
|
+
collectTimerHarmContext,
|
|
10
|
+
foldTimerHarm,
|
|
11
|
+
harmStateLabel
|
|
12
|
+
} from "./chunk-3OX5S7KZ.js";
|
|
7
13
|
|
|
8
14
|
// src/lib/daemon-timer-report.ts
|
|
9
15
|
import { existsSync, readFileSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
@@ -69,11 +75,35 @@ function median(values) {
|
|
|
69
75
|
const mid = Math.floor(sorted.length / 2);
|
|
70
76
|
return sorted.length % 2 === 0 ? (sorted[mid - 1] + sorted[mid]) / 2 : sorted[mid];
|
|
71
77
|
}
|
|
72
|
-
function
|
|
78
|
+
function classifyByDuration(maxMs, p95Ms, tripped) {
|
|
73
79
|
if (tripped || maxMs >= TIMER_SEVERE_MS) return "blocked";
|
|
74
80
|
if (maxMs >= TIMER_SLOW_THRESHOLD_MS || p95Ms >= TIMER_SLOW_THRESHOLD_MS) return "slow";
|
|
75
81
|
return "healthy";
|
|
76
82
|
}
|
|
83
|
+
function classifyByHarm(harmState, maxHarmMs, maxMs, p95Ms, trippedBlockThreshold, chargedTrips) {
|
|
84
|
+
if (chargedTrips > 0) return "blocked";
|
|
85
|
+
if (harmState === "unknown") return classifyByDuration(maxMs, p95Ms, trippedBlockThreshold);
|
|
86
|
+
if (harmState === "blocking") return maxHarmMs >= TIMER_SEVERE_MS ? "blocked" : "slow";
|
|
87
|
+
return "healthy";
|
|
88
|
+
}
|
|
89
|
+
function parsePausedIntervals(raw, atMs, wallMs) {
|
|
90
|
+
if (!Array.isArray(raw) || raw.length === 0) return null;
|
|
91
|
+
if (atMs === null || wallMs === null || !Number.isFinite(wallMs)) return null;
|
|
92
|
+
const tickStartMs = atMs - Math.max(0, wallMs);
|
|
93
|
+
const intervals = [];
|
|
94
|
+
for (const entry of raw) {
|
|
95
|
+
if (typeof entry !== "object" || entry === null) continue;
|
|
96
|
+
const startOffsetMs = entry.startOffsetMs;
|
|
97
|
+
const endOffsetMs = entry.endOffsetMs;
|
|
98
|
+
if (typeof startOffsetMs !== "number" || !Number.isFinite(startOffsetMs)) continue;
|
|
99
|
+
if (typeof endOffsetMs !== "number" || !Number.isFinite(endOffsetMs)) continue;
|
|
100
|
+
const startMs = tickStartMs + startOffsetMs;
|
|
101
|
+
const endMs = tickStartMs + endOffsetMs;
|
|
102
|
+
if (endMs < startMs) continue;
|
|
103
|
+
intervals.push({ startMs, endMs });
|
|
104
|
+
}
|
|
105
|
+
return intervals.length > 0 ? intervals : null;
|
|
106
|
+
}
|
|
77
107
|
function buildTimerReport(opts = {}) {
|
|
78
108
|
const maxBytes = opts.maxBytesPerFile ?? 4 * 1024 * 1024;
|
|
79
109
|
const inFlightKnown = Array.isArray(opts.inFlight);
|
|
@@ -84,6 +114,13 @@ function buildTimerReport(opts = {}) {
|
|
|
84
114
|
const samplesByTimer = /* @__PURE__ */ new Map();
|
|
85
115
|
const clockJumpsByTimer = /* @__PURE__ */ new Map();
|
|
86
116
|
const timeoutsByTimer = /* @__PURE__ */ new Map();
|
|
117
|
+
const awaitLagByTimer = /* @__PURE__ */ new Map();
|
|
118
|
+
const awaitAtByTimer = /* @__PURE__ */ new Map();
|
|
119
|
+
const harmContext = collectTimerHarmContext(records, (ts) => {
|
|
120
|
+
if (typeof ts !== "string") return null;
|
|
121
|
+
const parsed = Date.parse(ts);
|
|
122
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
123
|
+
});
|
|
87
124
|
let oldestMs = null;
|
|
88
125
|
let newestMs = null;
|
|
89
126
|
const stampOf = (rec) => {
|
|
@@ -101,26 +138,62 @@ function buildTimerReport(opts = {}) {
|
|
|
101
138
|
const timer2 = typeof data.timer === "string" ? data.timer : null;
|
|
102
139
|
if (!timer2) continue;
|
|
103
140
|
const atMs2 = stampOf(rec);
|
|
104
|
-
const cur = timeoutsByTimer.get(timer2) ?? { count: 0, lastAtMs: null };
|
|
141
|
+
const cur = timeoutsByTimer.get(timer2) ?? { count: 0, lastAtMs: null, atMs: [] };
|
|
105
142
|
cur.count += 1;
|
|
143
|
+
cur.atMs.push(atMs2);
|
|
106
144
|
if (atMs2 !== null && (cur.lastAtMs === null || atMs2 > cur.lastAtMs)) cur.lastAtMs = atMs2;
|
|
107
145
|
timeoutsByTimer.set(timer2, cur);
|
|
108
146
|
continue;
|
|
109
147
|
}
|
|
110
148
|
if (rec.event !== "process_stats") continue;
|
|
111
149
|
const type = data.type;
|
|
150
|
+
if (type === "timer_long_await") {
|
|
151
|
+
const timer2 = typeof data.timer === "string" ? data.timer : null;
|
|
152
|
+
const lag = typeof data.maxEventLoopLagMs === "number" ? data.maxEventLoopLagMs : null;
|
|
153
|
+
const awaitAtMs = stampOf(rec);
|
|
154
|
+
if (timer2 !== null && lag !== null && Number.isFinite(lag)) {
|
|
155
|
+
const lags = awaitLagByTimer.get(timer2) ?? [];
|
|
156
|
+
lags.push(lag);
|
|
157
|
+
awaitLagByTimer.set(timer2, lags);
|
|
158
|
+
const ats = awaitAtByTimer.get(timer2) ?? [];
|
|
159
|
+
ats.push(awaitAtMs);
|
|
160
|
+
awaitAtByTimer.set(timer2, ats);
|
|
161
|
+
}
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
112
164
|
if (type !== "timer_duration" && type !== "timer_slow") continue;
|
|
113
165
|
const timer = typeof data.timer === "string" ? data.timer : null;
|
|
114
|
-
const
|
|
115
|
-
if (timer === null ||
|
|
166
|
+
const wallMs = typeof data.durationMs === "number" && Number.isFinite(data.durationMs) ? data.durationMs : null;
|
|
167
|
+
if (timer === null || wallMs === null) continue;
|
|
116
168
|
const atMs = stampOf(rec);
|
|
117
169
|
const sleptMs = typeof data.sleptMs === "number" ? data.sleptMs : 0;
|
|
118
170
|
if (data.clockJump === true || sleptMs > 1e3) {
|
|
119
171
|
clockJumpsByTimer.set(timer, (clockJumpsByTimer.get(timer) ?? 0) + 1);
|
|
120
172
|
continue;
|
|
121
173
|
}
|
|
174
|
+
const busyMs = typeof data.busyMs === "number" && Number.isFinite(data.busyMs) ? data.busyMs : null;
|
|
175
|
+
const sweepPausedMs = typeof data.sweepPausedMs === "number" && Number.isFinite(data.sweepPausedMs) ? data.sweepPausedMs : null;
|
|
176
|
+
const tick = {
|
|
177
|
+
timer,
|
|
178
|
+
atMs,
|
|
179
|
+
wallMs,
|
|
180
|
+
busyMs,
|
|
181
|
+
sweepPausedMs,
|
|
182
|
+
syncExecMs: typeof data.syncExecMs === "number" && Number.isFinite(data.syncExecMs) ? data.syncExecMs : null,
|
|
183
|
+
peakLagMs: typeof data.peakLagMs === "number" && Number.isFinite(data.peakLagMs) ? data.peakLagMs : null,
|
|
184
|
+
attribution: typeof data.attribution === "string" ? data.attribution : null,
|
|
185
|
+
// Bug 7eaaf4f3: null (field absent) means the record predates this
|
|
186
|
+
// instrumentation — the harm model keeps the historical whole-tick
|
|
187
|
+
// disclaim for it. A present number (0 or more) is precise evidence.
|
|
188
|
+
peakLagOutsideParkMs: typeof data.peakLagOutsideParkMs === "number" && Number.isFinite(data.peakLagOutsideParkMs) ? data.peakLagOutsideParkMs : null,
|
|
189
|
+
// Bug set following 7eaaf4f3 (codex-review P1s on PR #962, findings
|
|
190
|
+
// #2/#4): see parsePausedIntervals in daemon-restart-report.ts for the
|
|
191
|
+
// same conversion (tick-relative offsets -> absolute epoch ms).
|
|
192
|
+
pausedIntervals: parsePausedIntervals(data.pausedIntervals, atMs, wallMs)
|
|
193
|
+
};
|
|
194
|
+
const durationMs = busyMs !== null ? Math.max(0, busyMs) : Math.max(0, wallMs - (sweepPausedMs ?? 0));
|
|
122
195
|
const arr = samplesByTimer.get(timer) ?? [];
|
|
123
|
-
arr.push({ durationMs, atMs });
|
|
196
|
+
arr.push({ durationMs, atMs, tick });
|
|
124
197
|
samplesByTimer.set(timer, arr);
|
|
125
198
|
}
|
|
126
199
|
const suspendArtifacts = /* @__PURE__ */ new Set();
|
|
@@ -150,8 +223,18 @@ function buildTimerReport(opts = {}) {
|
|
|
150
223
|
]);
|
|
151
224
|
const timers = [...allTimers].map((timer) => {
|
|
152
225
|
const samples = samplesByTimer.get(timer) ?? [];
|
|
153
|
-
const timeouts = timeoutsByTimer.get(timer) ?? { count: 0, lastAtMs: null };
|
|
226
|
+
const timeouts = timeoutsByTimer.get(timer) ?? { count: 0, lastAtMs: null, atMs: [] };
|
|
154
227
|
const durations = samples.map((s) => s.durationMs);
|
|
228
|
+
const harm = foldTimerHarm({
|
|
229
|
+
timer,
|
|
230
|
+
ticks: samples.map((s) => s.tick),
|
|
231
|
+
watchdogTripAtMs: timeouts.atMs,
|
|
232
|
+
respondedAwaitLagMs: awaitLagByTimer.get(timer) ?? [],
|
|
233
|
+
respondedAwaitAtMs: awaitAtByTimer.get(timer) ?? [],
|
|
234
|
+
stalls: harmContext.stalls,
|
|
235
|
+
hostStarvationAtMs: harmContext.hostStarvationAtMs,
|
|
236
|
+
globalBlockAtMs: harmContext.globalBlockAtMs
|
|
237
|
+
});
|
|
155
238
|
const maxMs = durations.length > 0 ? Math.max(...durations) : 0;
|
|
156
239
|
const avgMs = durations.length > 0 ? Math.round(durations.reduce((a, b) => a + b, 0) / durations.length) : 0;
|
|
157
240
|
const p95Ms = p95(durations);
|
|
@@ -185,12 +268,27 @@ function buildTimerReport(opts = {}) {
|
|
|
185
268
|
lastTimeoutAtMs: timeouts.lastAtMs,
|
|
186
269
|
trippedBlockThreshold,
|
|
187
270
|
inFlight: inFlightKnown ? inFlightSet.has(timer) : null,
|
|
188
|
-
status:
|
|
271
|
+
status: classifyByHarm(
|
|
272
|
+
harm.state,
|
|
273
|
+
harm.maxHarmMs,
|
|
274
|
+
maxMs,
|
|
275
|
+
p95Ms,
|
|
276
|
+
trippedBlockThreshold,
|
|
277
|
+
harm.chargedTrips
|
|
278
|
+
),
|
|
279
|
+
maxHarmMs: harm.maxHarmMs,
|
|
280
|
+
harmState: harm.state,
|
|
281
|
+
maxSyncExecMs: harm.maxSyncExecMs,
|
|
282
|
+
disclaimedLagMs: harm.disclaimedLagMs,
|
|
283
|
+
disclaimReason: harm.disclaimReason,
|
|
284
|
+
chargedTrips: harm.chargedTrips,
|
|
285
|
+
disclaimedTrips: harm.disclaimedTrips,
|
|
286
|
+
parkedMs: harm.parkedMs
|
|
189
287
|
};
|
|
190
288
|
});
|
|
191
289
|
const rank = { blocked: 0, slow: 1, healthy: 2 };
|
|
192
290
|
timers.sort(
|
|
193
|
-
(a, b) => rank[a.status] - rank[b.status] || b.maxMs - a.maxMs || b.timeoutCount - a.timeoutCount || a.timer.localeCompare(b.timer)
|
|
291
|
+
(a, b) => rank[a.status] - rank[b.status] || b.maxHarmMs - a.maxHarmMs || b.maxMs - a.maxMs || b.timeoutCount - a.timeoutCount || a.timer.localeCompare(b.timer)
|
|
194
292
|
);
|
|
195
293
|
return {
|
|
196
294
|
logsFound: sources.length > 0,
|
|
@@ -267,12 +365,12 @@ function formatTimerReport(report, now = Date.now()) {
|
|
|
267
365
|
report.inFlightKnown ? "Live: daemon reachable \u2014 in-flight state is current." : "Live: daemon unreachable \u2014 in-flight shown as '?' (unknown, not idle)."
|
|
268
366
|
);
|
|
269
367
|
lines.push("");
|
|
270
|
-
const head = ` ${"timer".padEnd(26)} ${"last".padStart(8)} ${"avg".padStart(8)} ${"p95".padStart(8)} ${"max".padStart(8)} ${"trips".padStart(5)} ${"run".padStart(3)} ${"next".padEnd(8)} ${"samples".padStart(7)} ${"skew".padStart(4)} last seen`;
|
|
368
|
+
const head = ` ${"timer".padEnd(26)} ${"last".padStart(8)} ${"avg".padStart(8)} ${"p95".padStart(8)} ${"max".padStart(8)} ${"harm".padStart(8)} ${"state".padEnd(10)} ${"trips".padStart(5)} ${"run".padStart(3)} ${"next".padEnd(8)} ${"samples".padStart(7)} ${"skew".padStart(4)} last seen`;
|
|
271
369
|
lines.push(head);
|
|
272
370
|
lines.push(" " + "\u2500".repeat(Math.max(0, head.length - 3)));
|
|
273
371
|
for (const t of report.timers) {
|
|
274
372
|
lines.push(
|
|
275
|
-
`${statusIndicator(t.status)} ${t.timer.padEnd(26)} ${ms(t.lastMs).padStart(8)} ${ms(t.avgMs).padStart(8)} ${ms(t.p95Ms).padStart(8)} ${ms(t.maxMs).padStart(8)} ${String(t.timeoutCount).padStart(5)} ${inFlightLabel(t.inFlight).padStart(3)} ${nextRunLabel(t.nextRunMs, now).padEnd(8)} ${String(t.samples).padStart(7)} ${String(t.clockJumpSamples + t.suspendSamples).padStart(4)} ${shortClock(t.lastAtMs)}`
|
|
373
|
+
`${statusIndicator(t.status)} ${t.timer.padEnd(26)} ${ms(t.lastMs).padStart(8)} ${ms(t.avgMs).padStart(8)} ${ms(t.p95Ms).padStart(8)} ${ms(t.maxMs).padStart(8)} ${ms(t.maxHarmMs).padStart(8)} ${harmStateLabel(t.harmState).padEnd(10)} ${String(t.timeoutCount).padStart(5)} ${inFlightLabel(t.inFlight).padStart(3)} ${nextRunLabel(t.nextRunMs, now).padEnd(8)} ${String(t.samples).padStart(7)} ${String(t.clockJumpSamples + t.suspendSamples).padStart(4)} ${shortClock(t.lastAtMs)}`
|
|
276
374
|
);
|
|
277
375
|
}
|
|
278
376
|
lines.push("");
|
|
@@ -285,13 +383,26 @@ function formatTimerReport(report, now = Date.now()) {
|
|
|
285
383
|
if (blocked.length > 0) {
|
|
286
384
|
lines.push("");
|
|
287
385
|
lines.push(
|
|
288
|
-
`\u{1F534} BLOCKING RISK \u2014 these
|
|
386
|
+
`\u{1F534} BLOCKING RISK \u2014 these HELD the event loop (harm \u2265${TIMER_HARM_SEVERE_MS / 1e3}s, or a duration-only record in the danger zone).`
|
|
289
387
|
);
|
|
290
388
|
lines.push(" A tick that blocks the loop past the budget can self-restart the daemon (exit 75)");
|
|
291
389
|
lines.push(" and drop every agent's MCP connection.");
|
|
292
390
|
for (const t of blocked) {
|
|
293
|
-
const trips = t.
|
|
294
|
-
|
|
391
|
+
const trips = t.chargedTrips > 0 ? `${t.chargedTrips} watchdog trip(s), last ${shortClock(t.lastTimeoutAtMs)}` : "no watchdog trip (single slow tick)";
|
|
392
|
+
const harmNote = t.harmState === "unknown" ? "harm unmeasured (record predates the harm fields)" : `harm ${ms(t.maxHarmMs)}`;
|
|
393
|
+
lines.push(` \u2022 ${t.timer}: ${harmNote}, active max ${ms(t.maxMs)} \u2014 ${trips}`);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
const disclaimed = report.timers.filter((t) => t.disclaimedLagMs > 0 || t.disclaimedTrips > 0);
|
|
397
|
+
if (disclaimed.length > 0) {
|
|
398
|
+
lines.push("");
|
|
399
|
+
lines.push("\u{1F7E2} NOT charged as harm \u2014 the log explains these away (the system working):");
|
|
400
|
+
for (const t of disclaimed) {
|
|
401
|
+
const bits = [];
|
|
402
|
+
if (t.disclaimedLagMs > 0) bits.push(`peak lag ${ms(t.disclaimedLagMs)}`);
|
|
403
|
+
if (t.disclaimedTrips > 0) bits.push(`${t.disclaimedTrips} watchdog trip(s)`);
|
|
404
|
+
if (t.parkedMs > 0) bits.push(`parked ${ms(t.parkedMs)} with the loop FREE`);
|
|
405
|
+
lines.push(` \u2022 ${t.timer}: ${bits.join(", ")}${t.disclaimReason ? ` \u2014 ${t.disclaimReason}` : ""}`);
|
|
295
406
|
}
|
|
296
407
|
}
|
|
297
408
|
lines.push("");
|
|
@@ -313,12 +424,27 @@ function formatTimerReport(report, now = Date.now()) {
|
|
|
313
424
|
);
|
|
314
425
|
lines.push(" shut laptop lid, not an event-loop block. What remains is real.");
|
|
315
426
|
lines.push(
|
|
316
|
-
"
|
|
427
|
+
" harm = event-loop hold this timer can be BLAMED for; it drives colour and rank, NOT"
|
|
428
|
+
);
|
|
429
|
+
lines.push(
|
|
430
|
+
" duration. last/avg/p95/max are ACTIVE time (deliberate starvation-gate pauses already"
|
|
431
|
+
);
|
|
432
|
+
lines.push(
|
|
433
|
+
" subtracted) and are still an ASYNC SPAN, not CPU on the loop: a long span may be"
|
|
434
|
+
);
|
|
435
|
+
lines.push(
|
|
436
|
+
" awaited I/O and harmless. state: BLOCKING held the loop; long-await ran long with the"
|
|
437
|
+
);
|
|
438
|
+
lines.push(
|
|
439
|
+
" loop free; unmeasured = the record predates the harm fields, so colour falls back to"
|
|
440
|
+
);
|
|
441
|
+
lines.push(
|
|
442
|
+
" duration \u2014 absence of evidence is NOT evidence of health."
|
|
317
443
|
);
|
|
318
444
|
lines.push(
|
|
319
|
-
"
|
|
445
|
+
" CAVEAT: a long span still trips the 10s watchdog and the overlap guard, so the next"
|
|
320
446
|
);
|
|
321
|
-
lines.push("
|
|
447
|
+
lines.push(" tick is SKIPPED. Harmless to the loop is not the same as free.");
|
|
322
448
|
lines.push("");
|
|
323
449
|
return lines.join("\n");
|
|
324
450
|
}
|