@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,6 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
filterTimerWakeClusterArtifacts
|
|
3
3
|
} from "./chunk-YQGMSXT5.js";
|
|
4
|
+
import {
|
|
5
|
+
POST_AWAIT_ATTRIBUTION,
|
|
6
|
+
TIMER_HARM_BLOCKING_MS,
|
|
7
|
+
collectTimerHarmContext,
|
|
8
|
+
foldTimerHarm,
|
|
9
|
+
harmIndicator,
|
|
10
|
+
harmStateLabel
|
|
11
|
+
} from "./chunk-3OX5S7KZ.js";
|
|
4
12
|
|
|
5
13
|
// src/lib/daemon-restart-report.ts
|
|
6
14
|
import { existsSync, readFileSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
@@ -13,6 +21,13 @@ function logPaths(baseName) {
|
|
|
13
21
|
const dir = logDir();
|
|
14
22
|
return [path.join(dir, baseName), path.join(dir, `${baseName}.1`)];
|
|
15
23
|
}
|
|
24
|
+
var TIMER_BLOCKING_HARM_MS = TIMER_HARM_BLOCKING_MS;
|
|
25
|
+
function timerHarmMs(sample) {
|
|
26
|
+
if (sample.attribution === POST_AWAIT_ATTRIBUTION) {
|
|
27
|
+
return Math.max(sample.syncExecMs, sample.peakLagMs);
|
|
28
|
+
}
|
|
29
|
+
return sample.syncExecMs;
|
|
30
|
+
}
|
|
16
31
|
function readRecords(files, maxBytes) {
|
|
17
32
|
const records = [];
|
|
18
33
|
for (const file of files) {
|
|
@@ -85,6 +100,24 @@ function parseTsMs(ts) {
|
|
|
85
100
|
const parsed = Date.parse(ts);
|
|
86
101
|
return Number.isFinite(parsed) ? parsed : null;
|
|
87
102
|
}
|
|
103
|
+
function parsePausedIntervals(raw, atMs, wallMs) {
|
|
104
|
+
if (!Array.isArray(raw) || raw.length === 0) return null;
|
|
105
|
+
if (atMs === null || wallMs === null || !Number.isFinite(wallMs)) return null;
|
|
106
|
+
const tickStartMs = atMs - Math.max(0, wallMs);
|
|
107
|
+
const intervals = [];
|
|
108
|
+
for (const entry of raw) {
|
|
109
|
+
if (typeof entry !== "object" || entry === null) continue;
|
|
110
|
+
const startOffsetMs = entry.startOffsetMs;
|
|
111
|
+
const endOffsetMs = entry.endOffsetMs;
|
|
112
|
+
if (typeof startOffsetMs !== "number" || !Number.isFinite(startOffsetMs)) continue;
|
|
113
|
+
if (typeof endOffsetMs !== "number" || !Number.isFinite(endOffsetMs)) continue;
|
|
114
|
+
const startMs = tickStartMs + startOffsetMs;
|
|
115
|
+
const endMs = tickStartMs + endOffsetMs;
|
|
116
|
+
if (endMs < startMs) continue;
|
|
117
|
+
intervals.push({ startMs, endMs });
|
|
118
|
+
}
|
|
119
|
+
return intervals.length > 0 ? intervals : null;
|
|
120
|
+
}
|
|
88
121
|
function maxIso(a, b) {
|
|
89
122
|
if (!b) return a;
|
|
90
123
|
if (!a) return b;
|
|
@@ -124,34 +157,121 @@ function buildRestartReport(opts = {}) {
|
|
|
124
157
|
const causes = [...causeMap.entries()].map(([cause, v]) => ({ cause, count: v.count, lastSeen: v.lastSeen })).sort((a, b) => b.count - a.count || a.cause.localeCompare(b.cause));
|
|
125
158
|
const totalRestarts = causes.reduce((sum, c) => sum + c.count, 0);
|
|
126
159
|
const rawTimerSamples = [];
|
|
160
|
+
const watchdogTripsByTimer = /* @__PURE__ */ new Map();
|
|
161
|
+
const responsiveAwaitLagByTimer = /* @__PURE__ */ new Map();
|
|
162
|
+
const responsiveAwaitAtByTimer = /* @__PURE__ */ new Map();
|
|
163
|
+
const harmContext = collectTimerHarmContext(healthRecords, parseTsMs);
|
|
127
164
|
for (const rec of healthRecords) {
|
|
165
|
+
if (rec.event === "timer_timeout") {
|
|
166
|
+
const timer2 = typeof rec.data?.timer === "string" ? rec.data.timer : null;
|
|
167
|
+
if (!timer2) continue;
|
|
168
|
+
const trips = watchdogTripsByTimer.get(timer2) ?? [];
|
|
169
|
+
trips.push(parseTsMs(rec.ts));
|
|
170
|
+
watchdogTripsByTimer.set(timer2, trips);
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
128
173
|
if (rec.event !== "process_stats") continue;
|
|
129
174
|
const data = rec.data;
|
|
130
175
|
if (!data) continue;
|
|
131
176
|
const type = data.type;
|
|
177
|
+
if (type === "timer_long_await") {
|
|
178
|
+
const timer2 = typeof data.timer === "string" ? data.timer : null;
|
|
179
|
+
const lag = typeof data.maxEventLoopLagMs === "number" ? data.maxEventLoopLagMs : null;
|
|
180
|
+
if (timer2 !== null && lag !== null && Number.isFinite(lag)) {
|
|
181
|
+
const lags = responsiveAwaitLagByTimer.get(timer2) ?? [];
|
|
182
|
+
lags.push(lag);
|
|
183
|
+
responsiveAwaitLagByTimer.set(timer2, lags);
|
|
184
|
+
const ats = responsiveAwaitAtByTimer.get(timer2) ?? [];
|
|
185
|
+
ats.push(parseTsMs(rec.ts));
|
|
186
|
+
responsiveAwaitAtByTimer.set(timer2, ats);
|
|
187
|
+
}
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
132
190
|
if (type !== "timer_duration" && type !== "timer_slow") continue;
|
|
133
191
|
const timer = typeof data.timer === "string" ? data.timer : null;
|
|
134
192
|
const busyMs = typeof data.busyMs === "number" && Number.isFinite(data.busyMs) ? data.busyMs : null;
|
|
135
193
|
const wallDurationMs = typeof data.durationMs === "number" ? data.durationMs : null;
|
|
136
|
-
const
|
|
194
|
+
const sweepPausedMs = typeof data.sweepPausedMs === "number" && Number.isFinite(data.sweepPausedMs) ? data.sweepPausedMs : 0;
|
|
195
|
+
let durationMs;
|
|
196
|
+
if (busyMs !== null) durationMs = busyMs;
|
|
197
|
+
else if (sweepPausedMs > 0) durationMs = Math.max(0, (wallDurationMs ?? 0) - sweepPausedMs);
|
|
198
|
+
else durationMs = wallDurationMs;
|
|
137
199
|
if (timer === null || durationMs === null || !Number.isFinite(durationMs)) continue;
|
|
200
|
+
const syncExecMs = typeof data.syncExecMs === "number" && Number.isFinite(data.syncExecMs) ? data.syncExecMs : 0;
|
|
201
|
+
const peakLagMs = typeof data.peakLagMs === "number" && Number.isFinite(data.peakLagMs) ? data.peakLagMs : 0;
|
|
138
202
|
const sleptMs = typeof data.sleptMs === "number" ? data.sleptMs : 0;
|
|
139
203
|
if (data.clockJump === true || sleptMs > 1e3) continue;
|
|
140
|
-
|
|
204
|
+
const attribution = typeof data.attribution === "string" ? data.attribution : null;
|
|
205
|
+
const atMs = parseTsMs(rec.ts);
|
|
206
|
+
rawTimerSamples.push({
|
|
207
|
+
timer,
|
|
208
|
+
durationMs,
|
|
209
|
+
atMs,
|
|
210
|
+
syncExecMs,
|
|
211
|
+
peakLagMs,
|
|
212
|
+
attribution,
|
|
213
|
+
tick: {
|
|
214
|
+
timer,
|
|
215
|
+
atMs,
|
|
216
|
+
wallMs: wallDurationMs,
|
|
217
|
+
busyMs,
|
|
218
|
+
// Distinguish "the field was absent" (legacy record) from "recorded 0".
|
|
219
|
+
sweepPausedMs: typeof data.sweepPausedMs === "number" && Number.isFinite(data.sweepPausedMs) ? data.sweepPausedMs : null,
|
|
220
|
+
syncExecMs: typeof data.syncExecMs === "number" && Number.isFinite(data.syncExecMs) ? data.syncExecMs : null,
|
|
221
|
+
peakLagMs: typeof data.peakLagMs === "number" && Number.isFinite(data.peakLagMs) ? data.peakLagMs : null,
|
|
222
|
+
attribution,
|
|
223
|
+
// Bug 7eaaf4f3: null (field absent) means the record predates this
|
|
224
|
+
// instrumentation — the harm model keeps the historical whole-tick
|
|
225
|
+
// disclaim for it. A present number (0 or more) is precise evidence.
|
|
226
|
+
peakLagOutsideParkMs: typeof data.peakLagOutsideParkMs === "number" && Number.isFinite(data.peakLagOutsideParkMs) ? data.peakLagOutsideParkMs : null,
|
|
227
|
+
// Bug set following 7eaaf4f3 (codex-review P1s on PR #962, findings
|
|
228
|
+
// #2/#4): convert the logged tick-relative offsets back to absolute
|
|
229
|
+
// epoch ms using this tick's own start (atMs - wallMs). Falls back to
|
|
230
|
+
// null (record predates the field, or the start could not be derived)
|
|
231
|
+
// so foldTimerHarm keeps using the historical whole-span heuristic.
|
|
232
|
+
pausedIntervals: parsePausedIntervals(data.pausedIntervals, atMs, wallDurationMs)
|
|
233
|
+
}
|
|
234
|
+
});
|
|
141
235
|
}
|
|
142
236
|
const clockCleanTimerSamples = rawTimerSamples.filter((sample) => sample.durationMs >= 0);
|
|
143
237
|
const timerSamples = /* @__PURE__ */ new Map();
|
|
144
|
-
for (const
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
238
|
+
for (const sample of filterTimerWakeClusterArtifacts(clockCleanTimerSamples)) {
|
|
239
|
+
const cur = timerSamples.get(sample.timer) ?? { durations: [], ticks: [] };
|
|
240
|
+
cur.durations.push(sample.durationMs);
|
|
241
|
+
cur.ticks.push(sample.tick);
|
|
242
|
+
timerSamples.set(sample.timer, cur);
|
|
243
|
+
}
|
|
244
|
+
for (const timer of watchdogTripsByTimer.keys()) {
|
|
245
|
+
if (!timerSamples.has(timer)) timerSamples.set(timer, { durations: [], ticks: [] });
|
|
148
246
|
}
|
|
149
|
-
const slowTimers = [...timerSamples.entries()].map(([timer,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
247
|
+
const slowTimers = [...timerSamples.entries()].map(([timer, { durations, ticks }]) => {
|
|
248
|
+
const harm = foldTimerHarm({
|
|
249
|
+
timer,
|
|
250
|
+
ticks,
|
|
251
|
+
watchdogTripAtMs: watchdogTripsByTimer.get(timer) ?? [],
|
|
252
|
+
respondedAwaitLagMs: responsiveAwaitLagByTimer.get(timer) ?? [],
|
|
253
|
+
respondedAwaitAtMs: responsiveAwaitAtByTimer.get(timer) ?? [],
|
|
254
|
+
stalls: harmContext.stalls,
|
|
255
|
+
hostStarvationAtMs: harmContext.hostStarvationAtMs,
|
|
256
|
+
globalBlockAtMs: harmContext.globalBlockAtMs
|
|
257
|
+
});
|
|
258
|
+
return {
|
|
259
|
+
timer,
|
|
260
|
+
maxMs: durations.length > 0 ? Math.max(...durations) : 0,
|
|
261
|
+
p95Ms: p95(durations),
|
|
262
|
+
samples: durations.length,
|
|
263
|
+
maxSyncExecMs: harm.maxSyncExecMs,
|
|
264
|
+
maxPeakLagMs: harm.maxPeakLagMs,
|
|
265
|
+
maxHarmMs: harm.maxHarmMs,
|
|
266
|
+
blocking: harm.state === "blocking",
|
|
267
|
+
harmState: harm.state,
|
|
268
|
+
disclaimedLagMs: harm.disclaimedLagMs,
|
|
269
|
+
disclaimReason: harm.disclaimReason,
|
|
270
|
+
chargedTrips: harm.chargedTrips,
|
|
271
|
+
disclaimedTrips: harm.disclaimedTrips,
|
|
272
|
+
parkedMs: harm.parkedMs
|
|
273
|
+
};
|
|
274
|
+
}).sort((a, b) => b.maxHarmMs - a.maxHarmMs || b.maxMs - a.maxMs || b.p95Ms - a.p95Ms).slice(0, topTimers);
|
|
155
275
|
let totalBlocks = 0;
|
|
156
276
|
let maxLagMs = 0;
|
|
157
277
|
let lagSum = 0;
|
|
@@ -249,13 +369,41 @@ function formatRestartReport(report) {
|
|
|
249
369
|
if (report.slowTimers.length === 0) {
|
|
250
370
|
lines.push("\u{1F7E2} No timer durations recorded (no slow ticks observed).");
|
|
251
371
|
} else {
|
|
252
|
-
lines.push(
|
|
372
|
+
lines.push(
|
|
373
|
+
` ${"timer".padEnd(24)} ${"active".padStart(8)} ${"p95".padStart(8)} ${"harm".padStart(8)} samples status`
|
|
374
|
+
);
|
|
253
375
|
for (const t of report.slowTimers) {
|
|
254
|
-
const indicator =
|
|
376
|
+
const indicator = harmIndicator({
|
|
377
|
+
state: t.harmState,
|
|
378
|
+
maxHarmMs: t.maxHarmMs,
|
|
379
|
+
maxActiveMs: t.maxMs
|
|
380
|
+
});
|
|
381
|
+
const label = harmStateLabel(t.harmState);
|
|
255
382
|
lines.push(
|
|
256
|
-
`${indicator} ${t.timer.padEnd(24)} ${ms(t.maxMs).padStart(8)} ${ms(t.p95Ms).padStart(8)} ${t.samples}`
|
|
383
|
+
`${indicator} ${t.timer.padEnd(24)} ${ms(t.maxMs).padStart(8)} ${ms(t.p95Ms).padStart(8)} ${ms(t.maxHarmMs).padStart(8)} ${t.samples} ${label}`
|
|
257
384
|
);
|
|
258
385
|
}
|
|
386
|
+
const disclaimed = report.slowTimers.filter(
|
|
387
|
+
(t) => t.disclaimedLagMs > 0 || t.disclaimedTrips > 0
|
|
388
|
+
);
|
|
389
|
+
if (disclaimed.length > 0) {
|
|
390
|
+
lines.push("");
|
|
391
|
+
lines.push(" Not charged as harm (the log explains these away):");
|
|
392
|
+
for (const t of disclaimed) {
|
|
393
|
+
const bits = [];
|
|
394
|
+
if (t.disclaimedLagMs > 0) bits.push(`peak lag ${ms(t.disclaimedLagMs)}`);
|
|
395
|
+
if (t.disclaimedTrips > 0) bits.push(`${t.disclaimedTrips} watchdog trip(s)`);
|
|
396
|
+
if (t.parkedMs > 0) bits.push(`parked ${ms(t.parkedMs)} (loop free)`);
|
|
397
|
+
lines.push(` \u2022 ${t.timer}: ${bits.join(", ")}${t.disclaimReason ? ` \u2014 ${t.disclaimReason}` : ""}`);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
lines.push("");
|
|
401
|
+
lines.push(
|
|
402
|
+
` active = time the tick was RUNNING (deliberate pauses excluded). harm = event-loop`
|
|
403
|
+
);
|
|
404
|
+
lines.push(
|
|
405
|
+
` hold this timer can be BLAMED for. Rank/colour follow harm, never elapsed time.`
|
|
406
|
+
);
|
|
259
407
|
}
|
|
260
408
|
lines.push("");
|
|
261
409
|
const el = report.eventLoop;
|
|
@@ -273,6 +421,8 @@ function formatRestartReport(report) {
|
|
|
273
421
|
}
|
|
274
422
|
|
|
275
423
|
export {
|
|
424
|
+
TIMER_BLOCKING_HARM_MS,
|
|
425
|
+
timerHarmMs,
|
|
276
426
|
buildRestartReport,
|
|
277
427
|
formatRestartReport
|
|
278
428
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractMemoryGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FUKVP54K.js";
|
|
4
4
|
import {
|
|
5
5
|
flushBatch,
|
|
6
6
|
writeMemory
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CIEVY5TD.js";
|
|
8
8
|
import {
|
|
9
9
|
extractKeywords
|
|
10
10
|
} from "./chunk-CHCA3ZM2.js";
|
|
11
11
|
import {
|
|
12
12
|
getActiveAgent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5DF4Y6EC.js";
|
|
14
14
|
|
|
15
15
|
// src/mcp/tools/import-conversations.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -308,9 +308,10 @@ function registerImportConversations(server) {
|
|
|
308
308
|
try {
|
|
309
309
|
const keywords = extractKeywords(memory.text);
|
|
310
310
|
const keywordsStr = keywords.length > 0 ? keywords.join(" ") : null;
|
|
311
|
+
const sessionId = process.env.SESSION_ID ?? "import";
|
|
311
312
|
let entities = null;
|
|
312
313
|
try {
|
|
313
|
-
const graph = extractMemoryGraph(memory.text, agentId, projectName, "import_conversations");
|
|
314
|
+
const graph = extractMemoryGraph(memory.text, agentId, projectName, "import_conversations", sessionId);
|
|
314
315
|
if (graph.entities.length > 0) {
|
|
315
316
|
entities = JSON.stringify(graph.entities.map((e) => e.name));
|
|
316
317
|
}
|
|
@@ -321,7 +322,7 @@ function registerImportConversations(server) {
|
|
|
321
322
|
id,
|
|
322
323
|
agent_id: agentId,
|
|
323
324
|
agent_role: agentRole,
|
|
324
|
-
session_id:
|
|
325
|
+
session_id: sessionId,
|
|
325
326
|
timestamp: memory.metadata.original_timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
326
327
|
tool_name: "import_conversations",
|
|
327
328
|
project_name: projectName,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
queueMailboxDeposit
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NY6SBR4O.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/mailbox-inbox.ts
|
|
6
6
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -41,7 +41,7 @@ function getMailboxInboxState(orgId, mailboxId) {
|
|
|
41
41
|
async function loadAuth(opts) {
|
|
42
42
|
if (opts.authHeader !== void 0) return opts.authHeader;
|
|
43
43
|
try {
|
|
44
|
-
const { getAuthHeader } = await import("./gotrue-session-
|
|
44
|
+
const { getAuthHeader } = await import("./gotrue-session-U4H3UGHL.js");
|
|
45
45
|
return await getAuthHeader();
|
|
46
46
|
} catch {
|
|
47
47
|
return null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CKOJP7JI.js";
|
|
4
4
|
import {
|
|
5
5
|
reserveVersions,
|
|
6
6
|
vectorToBlob
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CIEVY5TD.js";
|
|
8
8
|
import {
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-66CGXQUA.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/documents.ts
|
|
13
13
|
import crypto from "crypto";
|
|
@@ -92,7 +92,7 @@ async function resolveDefaultWorkspaceId(cwd) {
|
|
|
92
92
|
const client = getClient();
|
|
93
93
|
let projectName;
|
|
94
94
|
try {
|
|
95
|
-
const { getProjectName } = await import("./project-name-
|
|
95
|
+
const { getProjectName } = await import("./project-name-WKSNNKXK.js");
|
|
96
96
|
projectName = getProjectName(cwd);
|
|
97
97
|
} catch {
|
|
98
98
|
return null;
|
|
@@ -270,7 +270,7 @@ async function ingestDocument(input) {
|
|
|
270
270
|
await client.batch([documentStmt, ...chunkStmts], "write");
|
|
271
271
|
const embedded = vectors.filter((v) => v !== null).length;
|
|
272
272
|
const originalTexts = input.chunks.map((c) => c.text);
|
|
273
|
-
import("./doc-graph-extractor-
|
|
273
|
+
import("./doc-graph-extractor-HOKOV7BE.js").then(
|
|
274
274
|
({ extractAndStoreDocumentGraph }) => extractAndStoreDocumentGraph(documentId, originalTexts)
|
|
275
275
|
).catch((err) => {
|
|
276
276
|
process.stderr.write(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-66CGXQUA.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/skill-refinement.ts
|
|
6
6
|
import crypto from "crypto";
|
|
@@ -101,14 +101,19 @@ async function runSkillRefinement() {
|
|
|
101
101
|
} else if (row.use_count >= MIN_USES_FOR_PROMOTION && successRate > HIGH_SUCCESS_RATE) {
|
|
102
102
|
result.promotedToIdentity++;
|
|
103
103
|
try {
|
|
104
|
-
const {
|
|
105
|
-
const
|
|
106
|
-
if (identity) {
|
|
107
|
-
const promotionBlock = `
|
|
104
|
+
const { mutateIdentity } = await import("./lib/identity.js");
|
|
105
|
+
const promotionBlock = `
|
|
108
106
|
|
|
109
107
|
## Promoted Skill (auto-promoted ${now.split("T")[0]})
|
|
110
108
|
${row.content}`;
|
|
111
|
-
|
|
109
|
+
const { changed } = await mutateIdentity(
|
|
110
|
+
row.agent_id,
|
|
111
|
+
(current) => current ? current.raw + promotionBlock : null,
|
|
112
|
+
"skill-refinement"
|
|
113
|
+
);
|
|
114
|
+
if (!changed) {
|
|
115
|
+
result.promotedToIdentity--;
|
|
116
|
+
continue;
|
|
112
117
|
}
|
|
113
118
|
await client.execute({
|
|
114
119
|
sql: `UPDATE behaviors SET active = 0, last_refined_at = ?, updated_at = ? WHERE id = ?`,
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deactivateBehavior,
|
|
3
|
+
listBehaviors
|
|
4
|
+
} from "./chunk-6FG34V6D.js";
|
|
5
|
+
import {
|
|
6
|
+
IdentityConflictError,
|
|
7
|
+
IdentityLockError,
|
|
8
|
+
getIdentity,
|
|
9
|
+
mutateIdentity,
|
|
10
|
+
withIdentityLock
|
|
11
|
+
} from "./chunk-66CGXQUA.js";
|
|
12
|
+
|
|
13
|
+
// src/lib/behavior-promotion.ts
|
|
14
|
+
var PROMOTED_SECTION_HEADING = "## Promoted lessons (permanent \u2014 promoted from behaviours)";
|
|
15
|
+
var DEFAULT_MIN_STABLE_DAYS = 30;
|
|
16
|
+
function isPromotionEligible(behavior, opts = {}) {
|
|
17
|
+
const minStableDays = opts.minStableDays ?? DEFAULT_MIN_STABLE_DAYS;
|
|
18
|
+
const now = opts.now ?? /* @__PURE__ */ new Date();
|
|
19
|
+
if (!behavior.active) {
|
|
20
|
+
return { eligible: false, stableDays: 0, reason: "behaviour is not active" };
|
|
21
|
+
}
|
|
22
|
+
const updated = Date.parse(behavior.updated_at || behavior.created_at);
|
|
23
|
+
if (!Number.isFinite(updated)) {
|
|
24
|
+
return { eligible: false, stableDays: 0, reason: "behaviour has no readable timestamp" };
|
|
25
|
+
}
|
|
26
|
+
const stableDays = Math.floor((now.getTime() - updated) / 864e5);
|
|
27
|
+
if (stableDays < minStableDays) {
|
|
28
|
+
return {
|
|
29
|
+
eligible: false,
|
|
30
|
+
stableDays,
|
|
31
|
+
reason: `unchanged for ${stableDays}d, needs ${minStableDays}d`
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
eligible: true,
|
|
36
|
+
stableDays,
|
|
37
|
+
reason: `active and unchanged for ${stableDays}d (>= ${minStableDays}d). NOTE: this is stability, not measured adherence.`
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
async function listPromotionCandidates(agentId, opts = {}) {
|
|
41
|
+
const behaviors = await listBehaviors(agentId, opts.projectName, opts.limit ?? 100);
|
|
42
|
+
return behaviors.map((behavior) => ({ behavior, eligibility: isPromotionEligible(behavior, opts) })).filter((c) => c.eligibility.eligible);
|
|
43
|
+
}
|
|
44
|
+
function formatPromotedLine(behavior, promotedBy, promotedAt) {
|
|
45
|
+
const content = behavior.content.trim().replace(/\s*\n\s*/g, " ");
|
|
46
|
+
return `- ${content}
|
|
47
|
+
- _promoted from behaviour ${behavior.id} on ${promotedAt.slice(0, 10)} by ${promotedBy}; first learned ${(behavior.created_at || "unknown").slice(0, 10)}_`;
|
|
48
|
+
}
|
|
49
|
+
function isAlreadyPromoted(identityRaw, behaviorId) {
|
|
50
|
+
return identityRaw.includes(`promoted from behaviour ${behaviorId}`);
|
|
51
|
+
}
|
|
52
|
+
function listPromotedBehaviorIds(identityRaw) {
|
|
53
|
+
const ids = /* @__PURE__ */ new Set();
|
|
54
|
+
for (const m of identityRaw.matchAll(/promoted from behaviour ([A-Za-z0-9-]+)/g)) {
|
|
55
|
+
ids.add(m[1]);
|
|
56
|
+
}
|
|
57
|
+
return [...ids];
|
|
58
|
+
}
|
|
59
|
+
function promotedRulesDropped(before, after) {
|
|
60
|
+
const stillThere = new Set(listPromotedBehaviorIds(after));
|
|
61
|
+
return listPromotedBehaviorIds(before).filter((id) => !stillThere.has(id));
|
|
62
|
+
}
|
|
63
|
+
function applyPromotionToIdentity(identityRaw, behavior, promotedBy, promotedAt) {
|
|
64
|
+
if (isAlreadyPromoted(identityRaw, behavior.id)) return identityRaw;
|
|
65
|
+
const line = formatPromotedLine(behavior, promotedBy, promotedAt);
|
|
66
|
+
if (identityRaw.includes(PROMOTED_SECTION_HEADING)) {
|
|
67
|
+
const start = identityRaw.indexOf(PROMOTED_SECTION_HEADING);
|
|
68
|
+
const afterHeading = start + PROMOTED_SECTION_HEADING.length;
|
|
69
|
+
const nextHeading = identityRaw.slice(afterHeading).search(/\n## /);
|
|
70
|
+
const insertAt = nextHeading === -1 ? identityRaw.length : afterHeading + nextHeading;
|
|
71
|
+
const head = identityRaw.slice(0, insertAt).replace(/\s+$/, "");
|
|
72
|
+
return `${head}
|
|
73
|
+
${line}
|
|
74
|
+
${identityRaw.slice(insertAt)}`;
|
|
75
|
+
}
|
|
76
|
+
const body = identityRaw.replace(/\s+$/, "");
|
|
77
|
+
return `${body}
|
|
78
|
+
|
|
79
|
+
${PROMOTED_SECTION_HEADING}
|
|
80
|
+
|
|
81
|
+
These were behaviours that stayed stable long enough to become part of who this agent is. Identity is injected on a separate path from behaviours, so these no longer consume a behaviour injection slot. Each line records where it came from.
|
|
82
|
+
|
|
83
|
+
${line}
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
async function promoteBehaviorToIdentity(opts) {
|
|
87
|
+
const now = opts.now ?? /* @__PURE__ */ new Date();
|
|
88
|
+
const promotedAt = now.toISOString();
|
|
89
|
+
const behaviors = await listBehaviors(opts.agentId, opts.projectName, 200);
|
|
90
|
+
const behavior = behaviors.find((b) => b.id === opts.behaviorId);
|
|
91
|
+
if (!behavior) {
|
|
92
|
+
return { promoted: false, reason: `no active behaviour ${opts.behaviorId} for ${opts.agentId}` };
|
|
93
|
+
}
|
|
94
|
+
const eligibility = isPromotionEligible(behavior, { minStableDays: opts.minStableDays, now });
|
|
95
|
+
if (!eligibility.eligible && !opts.force) {
|
|
96
|
+
return { promoted: false, reason: `not eligible: ${eligibility.reason}` };
|
|
97
|
+
}
|
|
98
|
+
let slotFreed = false;
|
|
99
|
+
try {
|
|
100
|
+
return await withIdentityLock(opts.agentId, async () => {
|
|
101
|
+
const identity = getIdentity(opts.agentId);
|
|
102
|
+
if (!identity) {
|
|
103
|
+
return { promoted: false, reason: `${opts.agentId} has no identity file to promote into` };
|
|
104
|
+
}
|
|
105
|
+
if (isAlreadyPromoted(identity.raw, behavior.id)) {
|
|
106
|
+
return { promoted: false, reason: `behaviour ${behavior.id} is already in the identity file` };
|
|
107
|
+
}
|
|
108
|
+
await mutateIdentity(
|
|
109
|
+
opts.agentId,
|
|
110
|
+
(current) => {
|
|
111
|
+
if (!current) return null;
|
|
112
|
+
if (isAlreadyPromoted(current.raw, behavior.id)) return null;
|
|
113
|
+
return applyPromotionToIdentity(current.raw, behavior, opts.promotedBy, promotedAt);
|
|
114
|
+
},
|
|
115
|
+
opts.promotedBy
|
|
116
|
+
);
|
|
117
|
+
const written = getIdentity(opts.agentId);
|
|
118
|
+
if (!written || !isAlreadyPromoted(written.raw, behavior.id)) {
|
|
119
|
+
return {
|
|
120
|
+
promoted: false,
|
|
121
|
+
reason: `the promoted line for ${behavior.id} is not present in ${opts.agentId}'s identity after the write \u2014 NOT deactivating the behaviour, so the rule stays enforced.`
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
try {
|
|
125
|
+
slotFreed = await deactivateBehavior(behavior.id);
|
|
126
|
+
} catch (err) {
|
|
127
|
+
process.stderr.write(
|
|
128
|
+
`[behavior-promotion] identity updated but deactivation of ${behavior.id} FAILED \u2014 the rule is now live in BOTH places: ${err instanceof Error ? err.message : String(err)}
|
|
129
|
+
`
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
promoted: true,
|
|
134
|
+
record: {
|
|
135
|
+
behaviorId: behavior.id,
|
|
136
|
+
agentId: opts.agentId,
|
|
137
|
+
promotedBy: opts.promotedBy,
|
|
138
|
+
promotedAt,
|
|
139
|
+
stableDays: eligibility.stableDays,
|
|
140
|
+
slotFreed
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
} catch (err) {
|
|
145
|
+
if (err instanceof IdentityConflictError || err instanceof IdentityLockError) {
|
|
146
|
+
return {
|
|
147
|
+
promoted: false,
|
|
148
|
+
reason: `could not safely write ${opts.agentId}'s identity while promoting ${behavior.id} \u2014 the behaviour is left active. ${err.message}`
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
throw err;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export {
|
|
156
|
+
PROMOTED_SECTION_HEADING,
|
|
157
|
+
DEFAULT_MIN_STABLE_DAYS,
|
|
158
|
+
isPromotionEligible,
|
|
159
|
+
listPromotionCandidates,
|
|
160
|
+
formatPromotedLine,
|
|
161
|
+
isAlreadyPromoted,
|
|
162
|
+
listPromotedBehaviorIds,
|
|
163
|
+
promotedRulesDropped,
|
|
164
|
+
applyPromotionToIdentity,
|
|
165
|
+
promoteBehaviorToIdentity
|
|
166
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withScopedReadWindow
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-REZIGNA6.js";
|
|
4
4
|
import {
|
|
5
5
|
requireOrgPartnerBinding,
|
|
6
6
|
resolvePartnerIdentities
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
sealMailboxEnvelope,
|
|
23
23
|
unrecordedText,
|
|
24
24
|
verifyManifest
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EHAN752X.js";
|
|
26
26
|
import {
|
|
27
27
|
queueMailboxDeposit
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-NY6SBR4O.js";
|
|
29
29
|
|
|
30
30
|
// src/lib/up-brief.ts
|
|
31
31
|
import { appendFileSync, mkdirSync, readFileSync } from "fs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveType
|
|
3
|
-
} from "./chunk-GUMRIUI5.js";
|
|
4
1
|
import {
|
|
5
2
|
chunkSourceFile,
|
|
6
3
|
languageForFile
|
|
7
4
|
} from "./chunk-Z6BZQHP5.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveType
|
|
7
|
+
} from "./chunk-GUMRIUI5.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveAnthropicAuth
|
|
10
10
|
} from "./chunk-VGMACSEV.js";
|
|
11
11
|
import {
|
|
12
12
|
WORK_STATE_HEARTBEAT_TOOL
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IK4344V5.js";
|
|
14
14
|
import {
|
|
15
15
|
hashMemoryContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RSABKW6B.js";
|
|
17
17
|
|
|
18
18
|
// src/lib/graph-rag.ts
|
|
19
19
|
import crypto from "crypto";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolvePartnerIdentities
|
|
3
3
|
} from "./chunk-4YLBKEL5.js";
|
|
4
|
+
import {
|
|
5
|
+
asOrgBillablePlan
|
|
6
|
+
} from "./chunk-X2X3IGZU.js";
|
|
4
7
|
import {
|
|
5
8
|
OrgKeyPinConflictError,
|
|
6
9
|
orgKeyPinConfirmation,
|
|
7
10
|
pinOrgKey,
|
|
8
11
|
readOrgKeyPin
|
|
9
12
|
} from "./chunk-UBMZ3YQU.js";
|
|
10
|
-
import {
|
|
11
|
-
asOrgBillablePlan
|
|
12
|
-
} from "./chunk-X2X3IGZU.js";
|
|
13
13
|
import {
|
|
14
14
|
displayFingerprint,
|
|
15
15
|
ed25519PrivateKeyFromSeed,
|
|
@@ -32,7 +32,7 @@ function resolveEndpoint(opts) {
|
|
|
32
32
|
async function resolveAuth(opts) {
|
|
33
33
|
if (opts.authHeader !== void 0) return opts.authHeader ?? {};
|
|
34
34
|
try {
|
|
35
|
-
const { getAuthHeader } = await import("./gotrue-session-
|
|
35
|
+
const { getAuthHeader } = await import("./gotrue-session-U4H3UGHL.js");
|
|
36
36
|
return await getAuthHeader() ?? {};
|
|
37
37
|
} catch {
|
|
38
38
|
return {};
|
|
@@ -47,14 +47,14 @@ async function resolveUserId(opts, headers) {
|
|
|
47
47
|
const token = bearer.replace(/^Bearer\s+/i, "").trim();
|
|
48
48
|
if (!token) {
|
|
49
49
|
throw new InviteError(
|
|
50
|
-
"Not signed in \u2014 redeeming an invite requires an account.
|
|
50
|
+
"Not signed in \u2014 redeeming an invite requires an account session. exe-os has no\nemail/password sign-in: ask support for a token and run `exe-os login --token <jwt>`."
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
|
-
const { decodeJwt } = await import("./gotrue-session-
|
|
53
|
+
const { decodeJwt } = await import("./gotrue-session-U4H3UGHL.js");
|
|
54
54
|
const sub = decodeJwt(token)?.sub;
|
|
55
55
|
if (!sub) {
|
|
56
56
|
throw new InviteError(
|
|
57
|
-
"The stored session token carries no account id (`sub`).
|
|
57
|
+
"The stored session token carries no account id (`sub`). Ask support for a replacement\ntoken and store it with `exe-os login --token <jwt>`."
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
return sub;
|
|
@@ -149,7 +149,8 @@ async function readJson(resp, what) {
|
|
|
149
149
|
if (resp.status === 404) throw new InviteError(`${what}: no such invite code (or it has already been used).`);
|
|
150
150
|
if (resp.status === 401 || resp.status === 403) {
|
|
151
151
|
throw new InviteError(
|
|
152
|
-
`${what}: the server refused this invite for this account (HTTP ${resp.status}).
|
|
152
|
+
`${what}: the server refused this invite for this account (HTTP ${resp.status}). Check the code was issued to this account; if the session is stale, store a fresh
|
|
153
|
+
support-issued token with \`exe-os login --token <jwt>\`.`
|
|
153
154
|
);
|
|
154
155
|
}
|
|
155
156
|
if (resp.status === 410) throw new InviteError(`${what}: this invite has expired.`);
|