@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,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isExeSession,
|
|
3
3
|
strictSessionScopeFilter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KI7O64XV.js";
|
|
5
5
|
import {
|
|
6
6
|
recordOrchestrationEventBestEffort
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3SRZNJKD.js";
|
|
8
8
|
import {
|
|
9
9
|
getProjectName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AEUGIJDO.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_COORDINATOR_TEMPLATE_NAME,
|
|
13
13
|
getCoordinatorName
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-66CGXQUA.js";
|
|
15
15
|
import {
|
|
16
16
|
loadConfigSync
|
|
17
17
|
} from "./chunk-ZIG7VPJV.js";
|
|
@@ -260,7 +260,7 @@ function createRealDeps(getClient) {
|
|
|
260
260
|
});
|
|
261
261
|
},
|
|
262
262
|
createReviewForOrphan: async (task) => {
|
|
263
|
-
const { createReviewForCompletedTask } = await import("./tasks-review-
|
|
263
|
+
const { createReviewForCompletedTask } = await import("./tasks-review-ZVPKY47Z.js");
|
|
264
264
|
const cwd = process.cwd();
|
|
265
265
|
await createReviewForCompletedTask(
|
|
266
266
|
task,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CKOJP7JI.js";
|
|
4
4
|
import {
|
|
5
5
|
flushBatch,
|
|
6
6
|
writeMemory
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CIEVY5TD.js";
|
|
8
8
|
import {
|
|
9
9
|
redactSecrets
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5QCIWWFA.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/support-persistence.ts
|
|
13
13
|
import { mkdir, writeFile, readFile, chmod, rename } from "fs/promises";
|
|
@@ -129,10 +129,10 @@ var POST_WORK_CHECKLIST = `
|
|
|
129
129
|
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
130
130
|
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
131
131
|
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
132
|
-
3. create_task \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects.
|
|
132
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
133
133
|
|
|
134
134
|
## Spawning Rules (mandatory)
|
|
135
|
-
- When rung 3 is right,
|
|
135
|
+
- When rung 3 is right, explicit execution_mode='durable_tmux' is the ONLY tmux dispatch path. Default checklist creation never auto-spawns.
|
|
136
136
|
- NEVER manually launch sessions (tmux send-keys, claude -p). Sessions die immediately. Preferring rung 2 does NOT license manual spawns.
|
|
137
137
|
- NEVER spawn sessions without a task assigned \u2014 idle sessions waste resources.
|
|
138
138
|
- NEVER refuse a dispatched task claiming "not in scope" \u2014 if it's assigned to you, do it.`;
|
|
@@ -159,7 +159,7 @@ You are \${agent_id} \u2014 the founder's most reliable teammate in business. Yo
|
|
|
159
159
|
|
|
160
160
|
**Run the org**
|
|
161
161
|
- Keep the team (CTO, CMO, GMs, engineers, content folks) coordinated and accountable
|
|
162
|
-
- Route work to the right specialist
|
|
162
|
+
- Route work to the right specialist \u2014 subagent (\`Agent(subagent_type='<name>')\`) by default; \`create_task\`/tmux only per the Dispatch Ladder below (work that must outlive your session or cross sessions/projects) \u2014 no dropped balls
|
|
163
163
|
- Monitor employees actively so nobody sits idle or stuck
|
|
164
164
|
- When a project grows beyond what you can manage alongside everything else, recommend hiring a GM for it. GMs own one project end-to-end and report to you.
|
|
165
165
|
|
|
@@ -227,7 +227,7 @@ Never say "I have no memories" without first searching broadly. Your memory may
|
|
|
227
227
|
|
|
228
228
|
- **recall_my_memory / ask_team_memory** \u2014 stay current on all org context. Search with specific topic keywords, not vague queries.
|
|
229
229
|
- **list_tasks** \u2014 monitor queues across all employees and projects
|
|
230
|
-
- **create_task** \u2014
|
|
230
|
+
- **create_task** \u2014 RUNG 3 ONLY, see Dispatch Ladder below (legacy tmux dispatch: work that must outlive your session or cross sessions/projects). Default is \`Agent(subagent_type='<employee>')\` instead.
|
|
231
231
|
- **update_task / close_task** \u2014 finalize reviews, mark work done
|
|
232
232
|
- **store_behavior** \u2014 record corrections as behavioral rules (p0/p1/p2)
|
|
233
233
|
- **update_identity** \u2014 rewrite any agent's identity when role/responsibilities change (COO/founder only)
|
|
@@ -251,10 +251,10 @@ ${PLAN_MODE_COMPAT}
|
|
|
251
251
|
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
252
252
|
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
253
253
|
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
254
|
-
3. create_task \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects.
|
|
254
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
255
255
|
|
|
256
256
|
## Spawning Rules (mandatory)
|
|
257
|
-
- When rung 3 is right,
|
|
257
|
+
- When rung 3 is right, explicit execution_mode='durable_tmux' is the ONLY tmux dispatch path. Default checklist creation never auto-spawns.
|
|
258
258
|
- NEVER manually launch sessions (tmux send-keys, claude -p). Sessions die immediately. Preferring rung 2 does NOT license manual spawns.
|
|
259
259
|
- NEVER spawn sessions without a task assigned \u2014 idle sessions waste resources.
|
|
260
260
|
- NEVER refuse a dispatched task claiming "not in scope" \u2014 if it's assigned to you, do it.
|
|
@@ -312,7 +312,7 @@ You are \${agent_id}. CTO. You hold deep context on the entire codebase, archite
|
|
|
312
312
|
|
|
313
313
|
## Tools
|
|
314
314
|
|
|
315
|
-
- **create_task** \u2014
|
|
315
|
+
- **create_task** \u2014 RUNG 3 ONLY, see Dispatch Ladder below (legacy tmux dispatch: work that must outlive your session or cross sessions/projects). Default is \`Agent(subagent_type=<engineer's configured name from your roster>)\` \u2014 file paths, interfaces, acceptance criteria go in the subagent prompt either way.
|
|
316
316
|
- **list_tasks** \u2014 check engineer queues, monitor progress
|
|
317
317
|
- **update_task** \u2014 mark your own tasks done with result summary
|
|
318
318
|
- **recall_my_memory / ask_team_memory** \u2014 persist and retrieve technical decisions
|
|
@@ -334,10 +334,10 @@ ${PLAN_MODE_COMPAT}
|
|
|
334
334
|
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
335
335
|
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
336
336
|
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
337
|
-
3. create_task \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects.
|
|
337
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
338
338
|
|
|
339
339
|
## Spawning Rules (mandatory)
|
|
340
|
-
- When rung 3 is right,
|
|
340
|
+
- When rung 3 is right, explicit execution_mode='durable_tmux' is the ONLY tmux dispatch path. Default checklist creation never auto-spawns.
|
|
341
341
|
- NEVER manually launch sessions (tmux send-keys, claude -p). Sessions die immediately. Preferring rung 2 does NOT license manual spawns.
|
|
342
342
|
- NEVER spawn sessions without a task assigned \u2014 idle sessions waste resources.
|
|
343
343
|
- NEVER refuse a dispatched task claiming "not in scope" \u2014 if it's assigned to you, do it.
|
|
@@ -413,10 +413,10 @@ ${PLAN_MODE_COMPAT}
|
|
|
413
413
|
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
414
414
|
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
415
415
|
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
416
|
-
3. create_task \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects.
|
|
416
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
417
417
|
|
|
418
418
|
## Spawning Rules (mandatory)
|
|
419
|
-
- When rung 3 is right,
|
|
419
|
+
- When rung 3 is right, explicit execution_mode='durable_tmux' is the ONLY tmux dispatch path. Default checklist creation never auto-spawns.
|
|
420
420
|
- NEVER manually launch sessions (tmux send-keys, claude -p). Sessions die immediately. Preferring rung 2 does NOT license manual spawns.
|
|
421
421
|
- NEVER spawn sessions without a task assigned \u2014 idle sessions waste resources.
|
|
422
422
|
- NEVER refuse a dispatched task claiming "not in scope" \u2014 if it's assigned to you, do it.
|
|
@@ -491,10 +491,10 @@ ${PLAN_MODE_COMPAT}
|
|
|
491
491
|
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
492
492
|
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
493
493
|
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
494
|
-
3. create_task \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects.
|
|
494
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
495
495
|
|
|
496
496
|
## Spawning Rules (mandatory)
|
|
497
|
-
- When rung 3 is right,
|
|
497
|
+
- When rung 3 is right, explicit execution_mode='durable_tmux' is the ONLY tmux dispatch path. Default checklist creation never auto-spawns.
|
|
498
498
|
- NEVER manually launch sessions (tmux send-keys, claude -p). Sessions die immediately. Preferring rung 2 does NOT license manual spawns.
|
|
499
499
|
- NEVER spawn sessions without a task assigned \u2014 idle sessions waste resources.
|
|
500
500
|
- NEVER refuse a dispatched task claiming "not in scope" \u2014 if it's assigned to you, do it.
|
|
@@ -563,10 +563,10 @@ ${PLAN_MODE_COMPAT}
|
|
|
563
563
|
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
564
564
|
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
565
565
|
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
566
|
-
3. create_task \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects.
|
|
566
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
567
567
|
|
|
568
568
|
## Spawning Rules (mandatory)
|
|
569
|
-
- When rung 3 is right,
|
|
569
|
+
- When rung 3 is right, explicit execution_mode='durable_tmux' is the ONLY tmux dispatch path. Default checklist creation never auto-spawns.
|
|
570
570
|
- NEVER manually launch sessions (tmux send-keys, claude -p). Sessions die immediately. Preferring rung 2 does NOT license manual spawns.
|
|
571
571
|
- NEVER spawn sessions without a task assigned \u2014 idle sessions waste resources.
|
|
572
572
|
- NEVER refuse a dispatched task claiming "not in scope" \u2014 if it's assigned to you, do it.
|
|
@@ -610,7 +610,7 @@ You are the AI Product Lead \u2014 the competitive intelligence engine. You stud
|
|
|
610
610
|
- Clone the repo, read the architecture, compare against ours. No shortcuts.
|
|
611
611
|
- Report: what to steal (with file paths), what they do worse (our moat), patterns worth adopting.
|
|
612
612
|
- Write analysis to exe/output/competitive/{repo-name}.md.
|
|
613
|
-
- If a feature is worth building,
|
|
613
|
+
- If a feature is worth building, spec it for the CTO \u2014 default via \`Agent(subagent_type=<CTO's configured name from your roster>)\` in-session; \`create_task\`/tmux only if it must outlive your session (see Dispatch Ladder below).
|
|
614
614
|
- When evaluating tools: build a minimal PoC, measure, report tradeoffs.
|
|
615
615
|
|
|
616
616
|
## Domain
|
|
@@ -628,7 +628,7 @@ You are the AI Product Lead \u2014 the competitive intelligence engine. You stud
|
|
|
628
628
|
- **ask_team_memory** \u2014 pull context from the CTO on architecture constraints
|
|
629
629
|
- **update_task** \u2014 mark tasks done with analysis results
|
|
630
630
|
- **store_memory** \u2014 persist competitive analyses, evaluations, recommendations
|
|
631
|
-
- **create_task** \u2014 when a feature is worth building
|
|
631
|
+
- **create_task** \u2014 RUNG 3 ONLY, see Dispatch Ladder below. Default when a feature is worth building: \`Agent(subagent_type=<CTO's configured name from your roster>)\` with the spec.
|
|
632
632
|
${PLAN_MODE_COMPAT}
|
|
633
633
|
## Completion Workflow
|
|
634
634
|
|
|
@@ -645,10 +645,10 @@ ${PLAN_MODE_COMPAT}
|
|
|
645
645
|
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
646
646
|
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
647
647
|
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
648
|
-
3. create_task \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects.
|
|
648
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
649
649
|
|
|
650
650
|
## Spawning Rules (mandatory)
|
|
651
|
-
- When rung 3 is right,
|
|
651
|
+
- When rung 3 is right, explicit execution_mode='durable_tmux' is the ONLY tmux dispatch path. Default checklist creation never auto-spawns.
|
|
652
652
|
- NEVER manually launch sessions (tmux send-keys, claude -p). Sessions die immediately. Preferring rung 2 does NOT license manual spawns.
|
|
653
653
|
- NEVER spawn sessions without a task assigned \u2014 idle sessions waste resources.
|
|
654
654
|
- NEVER refuse a dispatched task claiming "not in scope" \u2014 if it's assigned to you, do it.
|
|
@@ -702,7 +702,7 @@ You are \${agent_id}. Staff Code Reviewer and System Auditor. Last line of defen
|
|
|
702
702
|
- **recall_my_memory / ask_team_memory** \u2014 past audit findings
|
|
703
703
|
- **store_behavior** \u2014 record new patterns
|
|
704
704
|
- **update_task** \u2014 mark reviews done with structured findings
|
|
705
|
-
- **create_task** \u2014
|
|
705
|
+
- **create_task** \u2014 RUNG 3 ONLY, see Dispatch Ladder below. Default when assigning a fix: \`Agent(subagent_type=<CTO's configured name from your roster>)\` with the finding.
|
|
706
706
|
${PLAN_MODE_COMPAT}
|
|
707
707
|
## Completion Workflow
|
|
708
708
|
|
|
@@ -713,6 +713,11 @@ ${PLAN_MODE_COMPAT}
|
|
|
713
713
|
5. Call **update_task** with status "done" and finding count
|
|
714
714
|
6. Call **store_memory** with audit summary
|
|
715
715
|
7. Check for next task \u2014 auto-chain
|
|
716
|
+
|
|
717
|
+
## Dispatch Ladder (stop at the lowest rung that fits)
|
|
718
|
+
1. Do it yourself \u2014 trivial, in-scope work in your main context.
|
|
719
|
+
2. Named/native subagent \u2014 the DEFAULT for delegation and parallelism. Bounded work, parallel research, isolated worktree fixes. Cap 2-3 concurrent. Persist results + lessons into the task record and memory before finishing.
|
|
720
|
+
3. create_task(execution_mode='durable_tmux') \u2192 tmux employee \u2014 LEGACY. Only for work that must outlive your session or cross sessions/projects. Omitted/default mode is a checklist row and never launches compute.
|
|
716
721
|
`,
|
|
717
722
|
// --- General Manager (project-scoped coordinator) ---
|
|
718
723
|
gm: `---
|
|
@@ -742,7 +747,7 @@ You are \${agent_id}. General Manager \u2014 you own one project or business uni
|
|
|
742
747
|
- Report up to the COO on progress, blockers, and key decisions
|
|
743
748
|
|
|
744
749
|
**Coordinate your team**
|
|
745
|
-
- Route work to specialists
|
|
750
|
+
- Route work to specialists \u2014 subagent (\`Agent(subagent_type='<name>')\`) by default; \`create_task\`/tmux is legacy rung-3, only for work that must outlive your session or cross sessions/projects \u2014 clear specs, acceptance criteria, deadlines
|
|
746
751
|
- Review deliverables against the project brief \u2014 don't rubber-stamp
|
|
747
752
|
- Unblock your team proactively \u2014 don't let tasks sit blocked
|
|
748
753
|
|
|
@@ -781,7 +786,7 @@ You are \${agent_id}. General Manager \u2014 you own one project or business uni
|
|
|
781
786
|
## Tools
|
|
782
787
|
|
|
783
788
|
- **recall_my_memory / ask_team_memory** \u2014 stay current on project context
|
|
784
|
-
- **list_tasks
|
|
789
|
+
- **list_tasks** \u2014 manage your team's work queue. \`create_task\` is legacy rung-3 only \u2014 work that must outlive your session or cross sessions/projects. Default is \`Agent(subagent_type='<name>')\`.
|
|
785
790
|
- **update_task / close_task** \u2014 finalize reviews within your project scope
|
|
786
791
|
- **store_behavior** \u2014 record corrections for your team (p0/p1/p2)
|
|
787
792
|
- **store_memory** \u2014 persist project decisions and outcomes
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLATFORM_PROCEDURE_TITLES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BQEZPRUC.js";
|
|
4
4
|
import {
|
|
5
5
|
isGhostBehaviorRow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6FG34V6D.js";
|
|
7
7
|
import {
|
|
8
|
+
IdentityConflictError,
|
|
8
9
|
getClient,
|
|
9
10
|
getIdentity,
|
|
10
11
|
listIdentities,
|
|
11
12
|
updateIdentity
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-66CGXQUA.js";
|
|
13
14
|
import {
|
|
14
15
|
atomicWriteJsonSync
|
|
15
16
|
} from "./chunk-HSGBZSCA.js";
|
|
@@ -258,7 +259,14 @@ async function importIdentities(identities, updatedBy) {
|
|
|
258
259
|
if (existing?.raw) {
|
|
259
260
|
continue;
|
|
260
261
|
}
|
|
261
|
-
|
|
262
|
+
try {
|
|
263
|
+
await updateIdentity(agentId, content, updatedBy, { expectedContentHash: "" });
|
|
264
|
+
} catch (err) {
|
|
265
|
+
if (err instanceof IdentityConflictError) {
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
throw err;
|
|
269
|
+
}
|
|
262
270
|
imported += 1;
|
|
263
271
|
}
|
|
264
272
|
return imported;
|
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listBehaviors
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6FG34V6D.js";
|
|
4
4
|
import {
|
|
5
5
|
incrementSkillUsage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YGVAKKGJ.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/behavior-injection.ts
|
|
9
9
|
import { appendFile } from "fs/promises";
|
|
10
10
|
var MAX_BEHAVIORS = 10;
|
|
11
11
|
var MIN_BEHAVIORS_FOR_INJECTION = 3;
|
|
12
12
|
var BEHAVIOR_INJECTION_CAP = 15;
|
|
13
|
+
var BEHAVIOR_INJECTION_FETCH_LIMIT = 200;
|
|
14
|
+
var BEHAVIOR_INJECTION_FETCH_MAX = 5e3;
|
|
15
|
+
async function fetchInjectableBehaviors(agentId, projectName, list = listBehaviors) {
|
|
16
|
+
let limit = BEHAVIOR_INJECTION_FETCH_LIMIT;
|
|
17
|
+
let rows = await list(agentId, projectName, limit);
|
|
18
|
+
while (rows.length >= limit && limit < BEHAVIOR_INJECTION_FETCH_MAX && rows[rows.length - 1]?.priority === "p0") {
|
|
19
|
+
limit = Math.min(limit * 4, BEHAVIOR_INJECTION_FETCH_MAX);
|
|
20
|
+
rows = await list(agentId, projectName, limit);
|
|
21
|
+
}
|
|
22
|
+
return rows;
|
|
23
|
+
}
|
|
24
|
+
function selectInjectedBehaviors(sorted, cap = BEHAVIOR_INJECTION_CAP) {
|
|
25
|
+
const p0 = sorted.filter((b) => b.priority === "p0");
|
|
26
|
+
const rest = sorted.filter((b) => b.priority !== "p0");
|
|
27
|
+
const remaining = Math.max(0, cap - p0.length);
|
|
28
|
+
return [...p0, ...rest.slice(0, remaining)];
|
|
29
|
+
}
|
|
13
30
|
function p0OverflowNotice(activeBehaviors, cap = BEHAVIOR_INJECTION_CAP) {
|
|
14
31
|
const storedP0 = activeBehaviors.filter((b) => b.priority === "p0").length;
|
|
15
32
|
const injectedP0 = Math.min(storedP0, cap);
|
|
@@ -28,8 +45,11 @@ function behaviorTruncationNotice(injected, counts) {
|
|
|
28
45
|
return `\u26A0\uFE0F TRUNCATED: showing ${shown} of ${counts.total} active behaviors \u2014 ${dropped} not injected.${p0Clause} Selection order: ${BEHAVIOR_SELECTION_ORDER_DOC}. Your ruleset here is PARTIAL \u2014 do not assume a rule does not exist because it is absent. Run behavior(action='list', priority='p0') for the rest.`;
|
|
29
46
|
}
|
|
30
47
|
function formatOverCapWarning(agentId, counts, cap = BEHAVIOR_INJECTION_CAP) {
|
|
31
|
-
|
|
32
|
-
|
|
48
|
+
const nonP0 = Math.max(0, counts.total - counts.p0);
|
|
49
|
+
const nonP0Budget = Math.max(0, cap - counts.p0);
|
|
50
|
+
const droppedNonP0 = Math.max(0, nonP0 - nonP0Budget);
|
|
51
|
+
if (droppedNonP0 === 0) return null;
|
|
52
|
+
return `\u26A0\uFE0F ${agentId} has ${counts.total} active behaviors (${counts.p0} p0). All p0 rules are always injected and enforced, but only ${nonP0Budget} of your ${nonP0} lower-priority behaviors fit the ${cap} cap \u2014 ${droppedNonP0} are stored but NOT injected at runtime. Deactivate stale lower-priority behaviors with behavior(action='deactivate'), or raise priority to p0 for any that must always apply.`;
|
|
33
53
|
}
|
|
34
54
|
function cosineSimilarity(a, b) {
|
|
35
55
|
if (a.length !== b.length || a.length === 0) return 0;
|
|
@@ -177,6 +197,55 @@ function extractKeywords(title, context) {
|
|
|
177
197
|
const unique = [...new Set(tokens)];
|
|
178
198
|
return unique.filter((t) => !STOP_WORDS.has(t) && t.length >= 3);
|
|
179
199
|
}
|
|
200
|
+
var TASK_BRIEF_BEHAVIOR_CAP = 6;
|
|
201
|
+
var SEMANTIC_RELEVANCE_THRESHOLD = 0.3;
|
|
202
|
+
var KEYWORD_MIN_DISTINCT_HITS = 2;
|
|
203
|
+
async function selectRelevantBehaviorsWithReasons(behaviors, title, context, maxCount = TASK_BRIEF_BEHAVIOR_CAP, projectName) {
|
|
204
|
+
const PROJECT_BOOST = 1.5;
|
|
205
|
+
const keywords = extractKeywords(title, context);
|
|
206
|
+
const keywordScored = (rows) => {
|
|
207
|
+
if (keywords.length === 0) return [];
|
|
208
|
+
return rows.map((b) => {
|
|
209
|
+
const contentLower = b.content.toLowerCase();
|
|
210
|
+
const hit = keywords.filter((kw) => contentLower.includes(kw));
|
|
211
|
+
const raw = hit.length / keywords.length;
|
|
212
|
+
const boosted = projectName && b.project_name === projectName ? raw * PROJECT_BOOST : raw;
|
|
213
|
+
return { b, hit, boosted };
|
|
214
|
+
}).filter((s) => s.hit.length >= KEYWORD_MIN_DISTINCT_HITS).map((s) => ({
|
|
215
|
+
behavior: s.b,
|
|
216
|
+
score: s.boosted,
|
|
217
|
+
method: "keyword",
|
|
218
|
+
reason: `brief mentions ${s.hit.slice(0, 4).map((k) => `"${k}"`).join(", ")}`
|
|
219
|
+
}));
|
|
220
|
+
};
|
|
221
|
+
const withVectors = behaviors.filter((b) => b.vector && b.vector.length > 0);
|
|
222
|
+
const withoutVectors = behaviors.filter((b) => !b.vector || b.vector.length === 0);
|
|
223
|
+
if (withVectors.length > 0) {
|
|
224
|
+
try {
|
|
225
|
+
const { embed } = await import("./lib/embedder.js");
|
|
226
|
+
const taskText = `${title}
|
|
227
|
+
${context}`.slice(0, 2e3);
|
|
228
|
+
const taskVector = await embed(taskText);
|
|
229
|
+
const semantic = withVectors.map((b) => {
|
|
230
|
+
const raw = cosineSimilarity(taskVector, b.vector);
|
|
231
|
+
const boosted = projectName && b.project_name === projectName ? raw * PROJECT_BOOST : raw;
|
|
232
|
+
return { b, raw, boosted };
|
|
233
|
+
}).filter((s) => s.boosted > SEMANTIC_RELEVANCE_THRESHOLD).map((s) => ({
|
|
234
|
+
behavior: s.b,
|
|
235
|
+
score: s.boosted,
|
|
236
|
+
method: "semantic",
|
|
237
|
+
reason: `semantic match ${s.raw.toFixed(2)}` + (s.boosted !== s.raw ? ` (x1.5 same-project boost -> ${s.boosted.toFixed(2)})` : "")
|
|
238
|
+
}));
|
|
239
|
+
const merged = [...semantic, ...keywordScored(withoutVectors)];
|
|
240
|
+
merged.sort((a, b) => b.score - a.score);
|
|
241
|
+
return merged.slice(0, maxCount);
|
|
242
|
+
} catch {
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const all = keywordScored(behaviors);
|
|
246
|
+
all.sort((a, b) => b.score - a.score);
|
|
247
|
+
return all.slice(0, maxCount);
|
|
248
|
+
}
|
|
180
249
|
async function selectRelevantBehaviors(behaviors, title, context, maxCount = MAX_BEHAVIORS, projectName) {
|
|
181
250
|
const PROJECT_BOOST = 1.5;
|
|
182
251
|
const behaviorsWithVectors = behaviors.filter((b) => b.vector && b.vector.length > 0);
|
|
@@ -238,27 +307,64 @@ function formatBehaviorsMarkdown(behaviors) {
|
|
|
238
307
|
lines.push("");
|
|
239
308
|
return lines.join("\n");
|
|
240
309
|
}
|
|
310
|
+
function formatSelectedBehaviorsMarkdown(selected, totalConsidered, cap = TASK_BRIEF_BEHAVIOR_CAP) {
|
|
311
|
+
if (selected.length === 0) return "";
|
|
312
|
+
const method = selected[0].method;
|
|
313
|
+
const lines = [
|
|
314
|
+
"",
|
|
315
|
+
"## Behaviours you are BOUND BY on this task (auto-retrieved)",
|
|
316
|
+
"",
|
|
317
|
+
`These are not suggestions. They were matched against this brief by ${method} retrieval over ${totalConsidered} stored behaviour(s); the top ${selected.length} of at most ${cap} are shown, with the reason each was selected.`,
|
|
318
|
+
"",
|
|
319
|
+
`This list is SCOPED TO THIS BRIEF, not complete. If you are about to do something consequential that no rule here covers, that means retrieval did not match it \u2014 not that no rule exists. Run \`behavior(action='list')\`.`,
|
|
320
|
+
""
|
|
321
|
+
];
|
|
322
|
+
for (const s of selected) {
|
|
323
|
+
const domain = s.behavior.domain ? `[${s.behavior.domain}]` : "[general]";
|
|
324
|
+
const firstLine = s.behavior.content.split("\n")[0].trim().slice(0, 400);
|
|
325
|
+
lines.push(`- ${domain} ${firstLine}`);
|
|
326
|
+
lines.push(` - _why injected: ${s.reason}_`);
|
|
327
|
+
}
|
|
328
|
+
lines.push("");
|
|
329
|
+
return lines.join("\n");
|
|
330
|
+
}
|
|
241
331
|
async function injectBehaviors(opts) {
|
|
242
332
|
try {
|
|
243
|
-
if (opts.assignedBy === "system" || opts.title.startsWith("Review:")) return;
|
|
244
|
-
if (!opts.context.trim()) return;
|
|
333
|
+
if (opts.assignedBy === "system" || opts.title.startsWith("Review:")) return [];
|
|
334
|
+
if (!opts.context.trim()) return [];
|
|
245
335
|
const behaviors = await listBehaviors(opts.assignedTo, opts.projectName, 30);
|
|
246
|
-
if (behaviors.length < MIN_BEHAVIORS_FOR_INJECTION) return;
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
336
|
+
if (behaviors.length < MIN_BEHAVIORS_FOR_INJECTION) return [];
|
|
337
|
+
const cap = opts.cap ?? TASK_BRIEF_BEHAVIOR_CAP;
|
|
338
|
+
const selected = await selectRelevantBehaviorsWithReasons(
|
|
339
|
+
behaviors,
|
|
340
|
+
opts.title,
|
|
341
|
+
opts.context,
|
|
342
|
+
cap,
|
|
343
|
+
opts.projectName
|
|
344
|
+
);
|
|
345
|
+
if (selected.length === 0) return [];
|
|
346
|
+
const markdown = formatSelectedBehaviorsMarkdown(selected, behaviors.length, cap);
|
|
250
347
|
await appendFile(opts.taskFile, markdown, "utf-8");
|
|
251
|
-
|
|
348
|
+
process.stderr.write(
|
|
349
|
+
`[behavior-injection] ${opts.assignedTo} <- ${selected.length}/${behaviors.length} behaviour(s) for "${opts.title.slice(0, 60)}": ` + selected.map((s) => `${s.behavior.id.slice(0, 8)}(${s.score.toFixed(2)})`).join(" ") + "\n"
|
|
350
|
+
);
|
|
351
|
+
await incrementSkillUsage(selected.map((s) => s.behavior));
|
|
352
|
+
return selected;
|
|
252
353
|
} catch (err) {
|
|
253
354
|
process.stderr.write(
|
|
254
355
|
`[behavior-injection] Failed for "${opts.title}": ${err instanceof Error ? err.message : String(err)}
|
|
255
356
|
`
|
|
256
357
|
);
|
|
358
|
+
return [];
|
|
257
359
|
}
|
|
258
360
|
}
|
|
259
361
|
|
|
260
362
|
export {
|
|
261
363
|
BEHAVIOR_INJECTION_CAP,
|
|
364
|
+
BEHAVIOR_INJECTION_FETCH_LIMIT,
|
|
365
|
+
BEHAVIOR_INJECTION_FETCH_MAX,
|
|
366
|
+
fetchInjectableBehaviors,
|
|
367
|
+
selectInjectedBehaviors,
|
|
262
368
|
p0OverflowNotice,
|
|
263
369
|
BEHAVIOR_SELECTION_ORDER_DOC,
|
|
264
370
|
behaviorTruncationNotice,
|
|
@@ -266,7 +372,12 @@ export {
|
|
|
266
372
|
cosineSimilarity,
|
|
267
373
|
scoreRelevance,
|
|
268
374
|
extractKeywords,
|
|
375
|
+
TASK_BRIEF_BEHAVIOR_CAP,
|
|
376
|
+
SEMANTIC_RELEVANCE_THRESHOLD,
|
|
377
|
+
KEYWORD_MIN_DISTINCT_HITS,
|
|
378
|
+
selectRelevantBehaviorsWithReasons,
|
|
269
379
|
selectRelevantBehaviors,
|
|
270
380
|
formatBehaviorsMarkdown,
|
|
381
|
+
formatSelectedBehaviorsMarkdown,
|
|
271
382
|
injectBehaviors
|
|
272
383
|
};
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
BUSY_PATTERN,
|
|
3
3
|
sendIntercom,
|
|
4
4
|
updateTaskStatus
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KI7O64XV.js";
|
|
6
6
|
import {
|
|
7
7
|
recordOrchestrationEventBestEffort
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3SRZNJKD.js";
|
|
9
9
|
import {
|
|
10
10
|
baseAgentName,
|
|
11
11
|
getCoordinatorName,
|
|
12
12
|
isCoordinatorName
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-66CGXQUA.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/play-mode.ts
|
|
16
16
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
|
|
@@ -281,7 +281,7 @@ function strictTaskSessionScope(scope) {
|
|
|
281
281
|
}
|
|
282
282
|
async function countOrphanedTasksForAgent(client, agentName, statuses) {
|
|
283
283
|
const result = await client.execute({
|
|
284
|
-
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status IN (${statuses}) AND session_scope IS NULL`,
|
|
284
|
+
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status IN (${statuses}) AND execution_mode = 'durable_tmux' AND session_scope IS NULL`,
|
|
285
285
|
args: [agentName]
|
|
286
286
|
});
|
|
287
287
|
return Number(result.rows[0]?.cnt ?? 0);
|
|
@@ -332,7 +332,7 @@ async function surfaceStaleDispatchPendingSignals(scopeList, now, thresholdMs =
|
|
|
332
332
|
const sessionScope = signalScope ?? (scopeList.length === 1 ? scopeList[0] : null);
|
|
333
333
|
if (allowedScopes.size > 0 && sessionScope && !allowedScopes.has(sessionScope)) continue;
|
|
334
334
|
try {
|
|
335
|
-
const { writeNotification } = await import("./notifications-
|
|
335
|
+
const { writeNotification } = await import("./notifications-LGYY22W5.js");
|
|
336
336
|
await writeNotification({
|
|
337
337
|
agentId: getCoordinatorName(),
|
|
338
338
|
agentRole: "COO",
|
|
@@ -513,7 +513,7 @@ async function runTaskEnforcementTick(deps) {
|
|
|
513
513
|
let paneIdle;
|
|
514
514
|
if (isManager) {
|
|
515
515
|
const openResult = await client.execute({
|
|
516
|
-
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status = 'open'${effectiveScope.sql}`,
|
|
516
|
+
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status = 'open' AND execution_mode = 'durable_tmux'${effectiveScope.sql}`,
|
|
517
517
|
args: [agentName, ...effectiveScope.args]
|
|
518
518
|
});
|
|
519
519
|
openTasks = Number(openResult.rows[0]?.cnt ?? 0);
|
|
@@ -528,7 +528,7 @@ async function runTaskEnforcementTick(deps) {
|
|
|
528
528
|
}
|
|
529
529
|
if (openTasks > 0) {
|
|
530
530
|
const subtaskResult = await client.execute({
|
|
531
|
-
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_by = ? AND status = 'in_progress'${effectiveScope.sql}`,
|
|
531
|
+
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_by = ? AND status = 'in_progress' AND execution_mode = 'durable_tmux'${effectiveScope.sql}`,
|
|
532
532
|
args: [agentName, ...effectiveScope.args]
|
|
533
533
|
});
|
|
534
534
|
activeSubtasks = Number(subtaskResult.rows[0]?.cnt ?? 0);
|
|
@@ -537,7 +537,7 @@ async function runTaskEnforcementTick(deps) {
|
|
|
537
537
|
let graceRemaining = 0;
|
|
538
538
|
if (openTasks > 0) {
|
|
539
539
|
const newestResult = await client.execute({
|
|
540
|
-
sql: `SELECT created_at FROM tasks WHERE assigned_to = ? AND status = 'open'${effectiveScope.sql} ORDER BY created_at DESC LIMIT 1`,
|
|
540
|
+
sql: `SELECT created_at FROM tasks WHERE assigned_to = ? AND status = 'open' AND execution_mode = 'durable_tmux'${effectiveScope.sql} ORDER BY created_at DESC LIMIT 1`,
|
|
541
541
|
args: [agentName, ...effectiveScope.args]
|
|
542
542
|
});
|
|
543
543
|
const newestCreatedAt = newestResult.rows[0]?.created_at;
|
|
@@ -552,7 +552,7 @@ async function runTaskEnforcementTick(deps) {
|
|
|
552
552
|
let inProgressTasks = 0;
|
|
553
553
|
if (openTasks > 0) {
|
|
554
554
|
const ipResult = await client.execute({
|
|
555
|
-
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status = 'in_progress'${effectiveScope.sql}`,
|
|
555
|
+
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status = 'in_progress' AND execution_mode = 'durable_tmux'${effectiveScope.sql}`,
|
|
556
556
|
args: [agentName, ...effectiveScope.args]
|
|
557
557
|
});
|
|
558
558
|
inProgressTasks = Number(ipResult.rows[0]?.cnt ?? 0);
|
|
@@ -584,7 +584,7 @@ async function runTaskEnforcementTick(deps) {
|
|
|
584
584
|
);
|
|
585
585
|
} else {
|
|
586
586
|
const taskResult = await client.execute({
|
|
587
|
-
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status IN ('open', 'in_progress')${effectiveScope.sql}`,
|
|
587
|
+
sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status IN ('open', 'in_progress') AND execution_mode = 'durable_tmux'${effectiveScope.sql}`,
|
|
588
588
|
args: [agentName, ...effectiveScope.args]
|
|
589
589
|
});
|
|
590
590
|
const taskCount = Number(taskResult.rows[0]?.cnt ?? 0);
|
|
@@ -695,6 +695,7 @@ async function runTaskEnforcementTick(deps) {
|
|
|
695
695
|
const reviewerRows = scopeList.length === 0 ? { rows: [] } : await client.execute({
|
|
696
696
|
sql: `SELECT reviewer, session_scope, id FROM tasks
|
|
697
697
|
WHERE status = 'needs_review'
|
|
698
|
+
AND execution_mode = 'durable_tmux'
|
|
698
699
|
AND reviewer IS NOT NULL
|
|
699
700
|
AND reviewer != ''
|
|
700
701
|
AND session_scope IN (${scopeList.map(() => "?").join(",")})`,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAgentLivenessReport
|
|
3
3
|
} from "./chunk-PHUHIVD5.js";
|
|
4
|
-
import {
|
|
5
|
-
isValidSessionScope
|
|
6
|
-
} from "./chunk-BTSWFMEH.js";
|
|
7
4
|
import {
|
|
8
5
|
leaseExpiryIso,
|
|
9
6
|
leaseNowIso
|
|
10
7
|
} from "./chunk-E23LNUWJ.js";
|
|
8
|
+
import {
|
|
9
|
+
isValidSessionScope
|
|
10
|
+
} from "./chunk-BTSWFMEH.js";
|
|
11
11
|
import {
|
|
12
12
|
getClient
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-66CGXQUA.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/work-claims.ts
|
|
16
16
|
var CLAIM_TTL_MINUTES = 90;
|
|
@@ -306,7 +306,7 @@ async function heartbeatClaims(holderSession, ttlMinutes = CLAIM_TTL_MINUTES) {
|
|
|
306
306
|
}
|
|
307
307
|
async function recordClaimEvent(eventType, sessionScope, agentId, payload, severity) {
|
|
308
308
|
try {
|
|
309
|
-
const { recordOrchestrationEventBestEffort } = await import("./orchestration-events-
|
|
309
|
+
const { recordOrchestrationEventBestEffort } = await import("./orchestration-events-JPHB6NPY.js");
|
|
310
310
|
recordOrchestrationEventBestEffort({
|
|
311
311
|
eventType,
|
|
312
312
|
source: "work-claims",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/lib/atomic-write.ts
|
|
2
|
+
import {
|
|
3
|
+
writeFileSync,
|
|
4
|
+
renameSync,
|
|
5
|
+
fsyncSync,
|
|
6
|
+
openSync,
|
|
7
|
+
closeSync,
|
|
8
|
+
unlinkSync
|
|
9
|
+
} from "fs";
|
|
10
|
+
import path from "path";
|
|
11
|
+
function writeFileAtomicSync(destPath, data) {
|
|
12
|
+
const dir = path.dirname(destPath);
|
|
13
|
+
const tmpPath = path.join(
|
|
14
|
+
dir,
|
|
15
|
+
`.${path.basename(destPath)}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`
|
|
16
|
+
);
|
|
17
|
+
const fd = openSync(tmpPath, "w");
|
|
18
|
+
try {
|
|
19
|
+
writeFileSync(fd, data);
|
|
20
|
+
fsyncSync(fd);
|
|
21
|
+
} finally {
|
|
22
|
+
closeSync(fd);
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
renameSync(tmpPath, destPath);
|
|
26
|
+
} catch (err) {
|
|
27
|
+
try {
|
|
28
|
+
unlinkSync(tmpPath);
|
|
29
|
+
} catch {
|
|
30
|
+
}
|
|
31
|
+
throw err;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
writeFileAtomicSync
|
|
37
|
+
};
|