@maycombhq/atticus 0.0.0-stage → 2.0.0-beta.11
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/LICENSE +177 -0
- package/README.md +17 -2
- package/THIRD-PARTY-LICENSES.txt +2607 -0
- package/dist/bin.js +47 -0
- package/dist/chunk-23VFQHFQ.js +827 -0
- package/dist/chunk-26DBAGOP.js +315 -0
- package/dist/chunk-27EDZN52.js +115 -0
- package/dist/chunk-2K2ZEJVR.js +252 -0
- package/dist/chunk-3DDJLI7N.js +1081 -0
- package/dist/chunk-3G4YI4ZU.js +16 -0
- package/dist/chunk-3LU6YCSQ.js +3507 -0
- package/dist/chunk-3WU7LVTL.js +203 -0
- package/dist/chunk-4AYZQ3SY.js +285 -0
- package/dist/chunk-4ONORLK5.js +234 -0
- package/dist/chunk-4Q3NN7VF.js +32 -0
- package/dist/chunk-4SKZDI62.js +22 -0
- package/dist/chunk-4URR24DD.js +189 -0
- package/dist/chunk-4UZJOQYK.js +70 -0
- package/dist/chunk-4Y4FY34K.js +34 -0
- package/dist/chunk-4YWRU7JK.js +80 -0
- package/dist/chunk-52WCHTVZ.js +41 -0
- package/dist/chunk-55TBYJF2.js +36 -0
- package/dist/chunk-5ACUW753.js +240 -0
- package/dist/chunk-5BJFMAQU.js +32 -0
- package/dist/chunk-5ICB2BXH.js +33 -0
- package/dist/chunk-5NZSJ5ZG.js +60 -0
- package/dist/chunk-5P5BGG5L.js +307 -0
- package/dist/chunk-5RUMHLIS.js +104 -0
- package/dist/chunk-5TY4DTHQ.js +242 -0
- package/dist/chunk-5V5BJACL.js +2929 -0
- package/dist/chunk-6E2GJANQ.js +52 -0
- package/dist/chunk-6N2GUZMZ.js +471 -0
- package/dist/chunk-6RGIM2ZH.js +2069 -0
- package/dist/chunk-6V3DTQWK.js +391 -0
- package/dist/chunk-76WKMA4J.js +14 -0
- package/dist/chunk-77RSRG3A.js +104 -0
- package/dist/chunk-7A7IG7OA.js +2007 -0
- package/dist/chunk-7EFILTCI.js +67 -0
- package/dist/chunk-7HQOZALR.js +180 -0
- package/dist/chunk-7HWXYP4H.js +1217 -0
- package/dist/chunk-7J7UY46S.js +688 -0
- package/dist/chunk-7KXYMC2P.js +38 -0
- package/dist/chunk-7LCQ7JAM.js +55 -0
- package/dist/chunk-7RGCQ4VZ.js +22 -0
- package/dist/chunk-7RUMD56V.js +26 -0
- package/dist/chunk-7S3XFWOU.js +251 -0
- package/dist/chunk-7SZPENUP.js +32 -0
- package/dist/chunk-7VFVQX5K.js +105 -0
- package/dist/chunk-ACWQDL6T.js +37 -0
- package/dist/chunk-ANCI3LFS.js +25 -0
- package/dist/chunk-ASKDCMW5.js +275 -0
- package/dist/chunk-ATNG5VOZ.js +122 -0
- package/dist/chunk-B3QOYE74.js +58 -0
- package/dist/chunk-B3UHYXHU.js +41 -0
- package/dist/chunk-BA5DTXHQ.js +250 -0
- package/dist/chunk-BKFGGJKA.js +2743 -0
- package/dist/chunk-BQNEHB5U.js +212 -0
- package/dist/chunk-BUWSOQLU.js +131 -0
- package/dist/chunk-BX52REMA.js +134 -0
- package/dist/chunk-BXBCMGIQ.js +82 -0
- package/dist/chunk-C2YGYTU6.js +408 -0
- package/dist/chunk-C5JFMAXX.js +102 -0
- package/dist/chunk-C75W7VXX.js +42 -0
- package/dist/chunk-CAN3EBE5.js +1726 -0
- package/dist/chunk-CE4S5ZY3.js +182 -0
- package/dist/chunk-CRQ73DIF.js +25 -0
- package/dist/chunk-CZI2ACNT.js +36 -0
- package/dist/chunk-D7MWYJZF.js +43 -0
- package/dist/chunk-DDAEAZEV.js +54 -0
- package/dist/chunk-DGKNOPSE.js +549 -0
- package/dist/chunk-DQNKG4HY.js +906 -0
- package/dist/chunk-DS3ZEJVN.js +22 -0
- package/dist/chunk-DYWTQXP4.js +108 -0
- package/dist/chunk-E25G46RW.js +54 -0
- package/dist/chunk-EADP3PEN.js +450 -0
- package/dist/chunk-EAQFRD2B.js +430 -0
- package/dist/chunk-EATSD7YD.js +41 -0
- package/dist/chunk-EBWIOODZ.js +339 -0
- package/dist/chunk-EHUYLNLC.js +282 -0
- package/dist/chunk-EI4KQYJ3.js +1496 -0
- package/dist/chunk-EQOSXLK3.js +49 -0
- package/dist/chunk-EV4TEFOD.js +16667 -0
- package/dist/chunk-EW7MRMD5.js +312 -0
- package/dist/chunk-EZSZFI54.js +531 -0
- package/dist/chunk-FMRMTI7W.js +1142 -0
- package/dist/chunk-FOQXYMOR.js +46 -0
- package/dist/chunk-G3PBLW4K.js +246 -0
- package/dist/chunk-G7WZH54P.js +221 -0
- package/dist/chunk-GG6HIU74.js +211 -0
- package/dist/chunk-GMJXC5AL.js +27809 -0
- package/dist/chunk-GPLFYLGH.js +130 -0
- package/dist/chunk-GVFUEGGM.js +19943 -0
- package/dist/chunk-GWSWS264.js +130 -0
- package/dist/chunk-H4VJO3M2.js +229 -0
- package/dist/chunk-HGQZTUAC.js +415 -0
- package/dist/chunk-HOUUBE74.js +166 -0
- package/dist/chunk-HQMCHHY5.js +155 -0
- package/dist/chunk-HR4DVO6X.js +374 -0
- package/dist/chunk-HZYFLEWO.js +39 -0
- package/dist/chunk-IA2RKC6I.js +279 -0
- package/dist/chunk-IILZ7J3L.js +5548 -0
- package/dist/chunk-IRW64JFF.js +247 -0
- package/dist/chunk-IVHN2VYG.js +1526 -0
- package/dist/chunk-IWZPGIGT.js +856 -0
- package/dist/chunk-IY4PHPHT.js +15 -0
- package/dist/chunk-J27QGXO4.js +1247 -0
- package/dist/chunk-JBSD57N7.js +324 -0
- package/dist/chunk-JEUXCIRD.js +120 -0
- package/dist/chunk-JMOLB347.js +46388 -0
- package/dist/chunk-JQX6BSE4.js +130 -0
- package/dist/chunk-JRPQX2EK.js +376 -0
- package/dist/chunk-JUQHYTXN.js +45 -0
- package/dist/chunk-JUZ75OG4.js +344 -0
- package/dist/chunk-KIWEBM6G.js +378 -0
- package/dist/chunk-KLKENMWQ.js +891 -0
- package/dist/chunk-KQDZXGNR.js +14 -0
- package/dist/chunk-KQK6SQPE.js +48 -0
- package/dist/chunk-KQRYW7OS.js +4108 -0
- package/dist/chunk-KU4T2CXJ.js +116 -0
- package/dist/chunk-KXZR2BLL.js +53 -0
- package/dist/chunk-L7I5PKGD.js +915 -0
- package/dist/chunk-LDIARP6F.js +31 -0
- package/dist/chunk-LEHZTKB3.js +34 -0
- package/dist/chunk-LS3WR2RF.js +1071 -0
- package/dist/chunk-LUPW4WLK.js +526 -0
- package/dist/chunk-LVBPY2M6.js +406 -0
- package/dist/chunk-LZWVK4YY.js +169 -0
- package/dist/chunk-MCWWMMLN.js +48 -0
- package/dist/chunk-MKC7P5LD.js +32 -0
- package/dist/chunk-MKFYQQ5Q.js +36 -0
- package/dist/chunk-MKIULIUQ.js +273 -0
- package/dist/chunk-MMB2OHUY.js +263 -0
- package/dist/chunk-MQNBEO3N.js +2610 -0
- package/dist/chunk-MSL3CLHX.js +545 -0
- package/dist/chunk-MV4637YA.js +174 -0
- package/dist/chunk-MYKQVS5W.js +296 -0
- package/dist/chunk-MYOW3RPC.js +143 -0
- package/dist/chunk-NBGBMRIS.js +25 -0
- package/dist/chunk-NBQO75XT.js +287 -0
- package/dist/chunk-NCR24CPV.js +41 -0
- package/dist/chunk-NDW4ROST.js +38 -0
- package/dist/chunk-NELU7LSL.js +3208 -0
- package/dist/chunk-NG5R2WIY.js +2919 -0
- package/dist/chunk-NH5QH3WS.js +119 -0
- package/dist/chunk-NIYB5K5B.js +583 -0
- package/dist/chunk-NR5T46ZY.js +49 -0
- package/dist/chunk-NX6QEEOA.js +163 -0
- package/dist/chunk-O6ILVBYB.js +18 -0
- package/dist/chunk-OFWYZH6B.js +230 -0
- package/dist/chunk-OHXTB6CO.js +50 -0
- package/dist/chunk-OJN7WME4.js +34 -0
- package/dist/chunk-OR5VRULZ.js +226 -0
- package/dist/chunk-ORZSD2KD.js +55 -0
- package/dist/chunk-OXVVRJDQ.js +66 -0
- package/dist/chunk-PQW7PYUR.js +2522 -0
- package/dist/chunk-Q32Y5T2U.js +27 -0
- package/dist/chunk-QWHTTA2X.js +130 -0
- package/dist/chunk-R3RVFCJ2.js +76 -0
- package/dist/chunk-R3VFLYZZ.js +400 -0
- package/dist/chunk-R6RY4Q5T.js +51 -0
- package/dist/chunk-R6UTCLH5.js +166 -0
- package/dist/chunk-RB2VSED2.js +231 -0
- package/dist/chunk-REWZE2XI.js +53 -0
- package/dist/chunk-RIEFYHXI.js +162 -0
- package/dist/chunk-RJDP642F.js +101 -0
- package/dist/chunk-RWMSJP7H.js +279 -0
- package/dist/chunk-S2FDPN32.js +41 -0
- package/dist/chunk-S5LSDXV4.js +40 -0
- package/dist/chunk-S7ZWCMDO.js +192 -0
- package/dist/chunk-SG5KY4VB.js +69 -0
- package/dist/chunk-SH7AZZDA.js +69 -0
- package/dist/chunk-SILY6ZEZ.js +104 -0
- package/dist/chunk-SINJKQSI.js +34 -0
- package/dist/chunk-SIUDWWKS.js +47 -0
- package/dist/chunk-SKMHS4CL.js +766 -0
- package/dist/chunk-SNHOLLGN.js +280 -0
- package/dist/chunk-SUQZGPVG.js +119 -0
- package/dist/chunk-T6ESD5KM.js +6115 -0
- package/dist/chunk-TC3KTG33.js +221 -0
- package/dist/chunk-TCADP67G.js +101 -0
- package/dist/chunk-TEBBD4XH.js +7923 -0
- package/dist/chunk-TGEOLIAK.js +149 -0
- package/dist/chunk-TQYBXDVH.js +133 -0
- package/dist/chunk-TV45EUGM.js +51 -0
- package/dist/chunk-TZXHUDI6.js +233 -0
- package/dist/chunk-U5PDQTLA.js +50 -0
- package/dist/chunk-U6YKL7SI.js +334 -0
- package/dist/chunk-UABFFMWH.js +2078 -0
- package/dist/chunk-UFBKJOWB.js +325 -0
- package/dist/chunk-UFTQIK2J.js +43 -0
- package/dist/chunk-UNFCFJMF.js +95 -0
- package/dist/chunk-UTR67XU2.js +164 -0
- package/dist/chunk-V4XKYGLK.js +405 -0
- package/dist/chunk-VOGCSYOI.js +16 -0
- package/dist/chunk-VYNZED7B.js +53 -0
- package/dist/chunk-WCLAOKCH.js +540 -0
- package/dist/chunk-WFYHOXTB.js +29 -0
- package/dist/chunk-WGU6NIUV.js +113 -0
- package/dist/chunk-WIMOJMAK.js +3702 -0
- package/dist/chunk-WKXOEIOY.js +184 -0
- package/dist/chunk-WUE6HKIU.js +790 -0
- package/dist/chunk-WUP77GG2.js +56 -0
- package/dist/chunk-XF3DATVU.js +150 -0
- package/dist/chunk-XJAJQGXJ.js +18 -0
- package/dist/chunk-XKJRPVJO.js +3898 -0
- package/dist/chunk-XNRPCI23.js +3851 -0
- package/dist/chunk-XOVLGBKI.js +214 -0
- package/dist/chunk-XPJR74MA.js +562 -0
- package/dist/chunk-XPWSNKF3.js +5619 -0
- package/dist/chunk-XR5DD5DQ.js +104 -0
- package/dist/chunk-XZJE6WIT.js +706 -0
- package/dist/chunk-XZRON6IV.js +131 -0
- package/dist/chunk-Y5AYBGLB.js +368 -0
- package/dist/chunk-YLAM4HZH.js +95 -0
- package/dist/chunk-YVCOQ5TZ.js +47 -0
- package/dist/chunk-YWOMGMZB.js +94 -0
- package/dist/chunk-YWZDAZMA.js +18 -0
- package/dist/chunk-Z2EYRUOH.js +172 -0
- package/dist/chunk-Z46OXTBE.js +1611 -0
- package/dist/chunk-ZHWSL6SR.js +45 -0
- package/dist/chunk-ZJQUIG3A.js +87 -0
- package/dist/chunk-ZKUDS7JG.js +310 -0
- package/dist/chunk-ZTNS3L5Z.js +1019 -0
- package/dist/files.json +2024 -0
- package/dist/fixtures/forge/README.md +19 -0
- package/dist/fixtures/forge/expected/discrepancies.yaml +54 -0
- package/dist/fixtures/forge/expected/inputs.yaml +38 -0
- package/dist/fixtures/forge/expected/scan.yaml +342 -0
- package/dist/fixtures/forge/inputs/diagrams/forge-context.drawio +23 -0
- package/dist/fixtures/forge/inputs/partner-specs/northwind-pay-openapi.yaml +11 -0
- package/dist/fixtures/forge/inputs/tickets/ado-stories.json +4 -0
- package/dist/fixtures/forge/inputs/tickets/closed-service-requests.json +5 -0
- package/dist/fixtures/forge/inputs/wiki/integration-patterns.md +11 -0
- package/dist/fixtures/forge/inputs/wiki/ledger-solution-spec.md +9 -0
- package/dist/fixtures/forge/inputs/wiki/snow-firewall-request.md +4 -0
- package/dist/fixtures/forge/metarepo/judgments/reaches/84af5b6af24f7ca8c23013f3.yaml +17 -0
- package/dist/fixtures/forge/metarepo/judgments/reaches/c3917555edebddce8cecb647.yaml +17 -0
- package/dist/fixtures/forge/metarepo/judgments/reaches/c5fafd6601f8ca9e34e0bbd0.yaml +17 -0
- package/dist/fixtures/forge/metarepo/org-pack/agents/architecture-critic.yaml +9 -0
- package/dist/fixtures/forge/metarepo/org-pack/agents/story-writer.yaml +10 -0
- package/dist/fixtures/forge/metarepo/org-pack/checklists/architecture.yaml +115 -0
- package/dist/fixtures/forge/metarepo/org-pack/dialects/forge.yaml +111 -0
- package/dist/fixtures/forge/metarepo/org-pack/gates.yaml +22 -0
- package/dist/fixtures/forge/metarepo/org-pack/pack.yaml +11 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/A.EB.PUB.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/D.JDBC.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/S.DIR.BFF.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/S.GW.SOR.yaml +13 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/S.GW.VND.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/change-templates/feature.md +37 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/skills/add-forge-endpoint/SKILL.md +17 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/snow/firewall-rule.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/snow/gateway-route.yaml +13 -0
- package/dist/fixtures/forge/metarepo/org-pack/profiles/forge/profile.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/profiles/forge/repos.manifest.yaml +44 -0
- package/dist/fixtures/forge/metarepo/org-pack/roles.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/runtime.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/sources.yaml +3 -0
- package/dist/fixtures/forge/repos/forge-events/topics/payments.initiated.yaml +4 -0
- package/dist/fixtures/forge/repos/forge-events/topics/transfers.completed.yaml +4 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/ledger-v1.xml +3 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/policies/SpikeArrest.xml +3 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/policies/VerifyOAuth.xml +4 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/proxies/default.xml +14 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/targets/ledger.xml +5 -0
- package/dist/fixtures/forge/repos/forge-infra/alerts/ledger-api.yaml +5 -0
- package/dist/fixtures/forge/repos/forge-infra/k8s/ledger-api.yaml +15 -0
- package/dist/fixtures/forge/repos/forge-infra/k8s/portal-bff.yaml +7 -0
- package/dist/fixtures/forge/repos/forge-infra/terraform/ledger-db.tf +9 -0
- package/dist/fixtures/forge/repos/forge-ledger/api/ledger-openapi.yaml +31 -0
- package/dist/fixtures/forge/repos/forge-ledger/forge.yaml +4 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/LedgerEndpoints.java +13 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/LedgerEvents.java +11 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/NorthwindClient.java +10 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/application.yml +3 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/db/migration/V1__create_account.sql +5 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/db/migration/V2__create_entry.sql +7 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/pom.xml +1 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/AuditPublisher.java +12 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/BalanceController.java +16 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/LedgerClient.java +13 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/PaymentEvents.java +13 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/resources/application.yml +8 -0
- package/dist/fixtures/forge/repos/forge-portal-ui/package.json +1 -0
- package/dist/fixtures/forge/repos/forge-portal-ui/src/api/balance.ts +5 -0
- package/dist/fixtures/forge/repos/forge-reports-job/src/main/java/forge/reports/DailyEntriesJob.java +19 -0
- package/dist/fixtures/forge/repos/forge-reports-job/src/main/resources/application.yml +3 -0
- package/dist/fixtures/forge-change/README.md +41 -0
- package/dist/fixtures/forge-change/expected/findings.yaml +301 -0
- package/dist/fixtures/forge-change/expected/stories.yaml +101 -0
- package/dist/fixtures/forge-change/judgments/personal-data/0b5f3dbf5257a22275d8c74b.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/2759a66770134c417440bf2d.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/31b1ea2f14d0737f1aca79fd.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/49afd70c08228e65ad6ca1ed.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/761cabcb8a39f5e5866d2dd6.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/adae902b90cc8ffa0c765145.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/ba11bb933105ec9493e065dd.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/bdbcd1cdac3021c68063c3e7.yaml +18 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/brief.md +35 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/change.yaml +120 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/data.md +18 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/design.md +29 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/interfaces.md +17 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/mappings.md +26 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/proposal.md +35 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/snow.md +12 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/specs/transfer-limits/spec.md +19 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s1-refuse-over-limit.md +17 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s2-show-remaining.md +16 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s3-audit-refusals.md +18 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s4-velocity-check.md +16 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories.md +8 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/tasks.md +12 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/ux.md +7 -0
- package/dist/fixtures/forge-change/org-pack/agents/code-and-test-critic.yaml +13 -0
- package/dist/fixtures/forge-change/org-pack/agents/complete-critic.yaml +12 -0
- package/dist/fixtures/forge-change/org-pack/agents/safe-critic.yaml +12 -0
- package/dist/fixtures/forge-change/org-pack/agents/ship-critic.yaml +11 -0
- package/dist/fixtures/forge-change/org-pack/agents/true-critic.yaml +11 -0
- package/dist/fixtures/forge-change/org-pack/checklists/review.yaml +54 -0
- package/dist/fixtures/forge-change/org-pack/gates.yaml +25 -0
- package/dist/fixtures/forge-change/org-pack/teams/team-ledger/checklists/ledger-team.yaml +227 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/2ad84f84bf39c1d5412697e69fe23034d6983ec45a00314bf0975e627589a3c5.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/417c98d8e54a4387d0fd93441c49f44c2868958739070d855c1dce0c41e24db3.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/50203ee22e9cb3ef047295edb6538fe7d5695e1e4b139f3c929013dc6ce47021.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/89f18d67f5d9c325bf35e2a9e020f9ddb6ee13b8523315037f0905cc57c040b1.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/b4097867d26ae8eadc8b9efa8cdd86897013358035f0b40086c299a59c4ba121.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/302d06f49664dd67ad2e21ab9cf74c1b0f7d3f750709c6ed8eff2b70983274e2.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/32f1049c9a5ab4a759543290db4644ec6e221cc45fdfdcf06193837c6a8ce0b9.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/4e4a84bfc04b9f26ca4250319a879901ff7a1c081c71e46a117675fee05026b0.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/604af0fcdd6df6b76208fa88305fdc15c37606c2a4d1ae816477e46ac8c2dd04.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/f0bf50af11f14c50d07904f0dffe1c8c20fb0cd89770645a8824c1d30a443955.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/350954b58833b2c04880c67db45a1b328b7fd541d9f0d943b63905b8875488a6.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/4af95c6c96a206777cec9de1f9c2d8c55a36ddc9b8db2f81d6eb83217b835efa.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/76c34522a49cf7587a4e5689a5030d384603fa780b8aba97d27815cbc829683e.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/a3b2cd1ace48587e5994333db03b34c3a0f9dec4f1932f1730ddfb687f6918c8.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/de288a4fa64d0fc20890f9a787080ce6eac5203b7b9b72d884df11e8cf111835.json +12 -0
- package/dist/fixtures/forge-change/recordings/story-writer/1ddb00eac2aaf91a5ec5d9dfd220116be9f75aec6546a4a3a3b050ed89af2864.json +12 -0
- package/dist/packages/assistant-kit/frameworks-kit/README.md +86 -0
- package/dist/packages/assistant-kit/frameworks-kit/checklist.md +11 -0
- package/dist/packages/assistant-kit/frameworks-kit/examples/tide-lantern.yaml +56 -0
- package/dist/packages/assistant-kit/frameworks-kit/examples/tide-platform.yaml +43 -0
- package/dist/packages/assistant-kit/frameworks-kit/prompts/write-framework-model.md +12 -0
- package/dist/packages/assistant-kit/kit/README.md +98 -0
- package/dist/packages/assistant-kit/kit/c2-reference.md +334 -0
- package/dist/packages/assistant-kit/kit/checklist.md +39 -0
- package/dist/packages/assistant-kit/kit/examples/house-http-client.yaml +102 -0
- package/dist/packages/assistant-kit/kit/examples/tide-apigee.yaml +56 -0
- package/dist/packages/assistant-kit/kit/examples/tide-apim.yaml +32 -0
- package/dist/packages/assistant-kit/kit/examples/tide-kong.yaml +44 -0
- package/dist/packages/assistant-kit/kit/prompts/write-dialect.md +34 -0
- package/dist/packages/assistant-kit/kit/worked-example.md +198 -0
- package/dist/packages/conformance/sample/README.md +4 -0
- package/dist/packages/conformance/sample/inputs/notes.md +3 -0
- package/dist/packages/conformance/sample/inputs/systems.csv +3 -0
- package/dist/packages/conformance/sample/repo/api/greeter.proto +6 -0
- package/dist/packages/conformance/sample/repo/api/openapi.yaml +10 -0
- package/dist/packages/conformance/sample/repo/api/schema.graphql +3 -0
- package/dist/packages/conformance/sample/repo/db/V1__create_greeting.sql +4 -0
- package/dist/packages/conformance/sample/repo/package.json +7 -0
- package/dist/packages/conformance/sample/repo/src/main/java/sample/HelloController.java +10 -0
- package/dist/packages/conformance/sample/repo/web/app.ts +4 -0
- package/dist/packages/evals/datasets/critic-lenses.yaml +62 -0
- package/dist/packages/evals/datasets/dialect-writer.yaml +14 -0
- package/dist/packages/evals/datasets/feature-namer.yaml +34 -0
- package/dist/packages/evals/datasets/glossary-definer.yaml +25 -0
- package/dist/packages/evals/datasets/story-writer.yaml +13 -0
- package/dist/packages/evals/datasets/template-writer.yaml +16 -0
- package/dist/packages/evals/datasets/test-writer.yaml +18 -0
- package/dist/packages/executors/reference/reference-executor.mjs +233 -0
- package/dist/packages/extractors/dialects/argocd.yaml +45 -0
- package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/AccountResource.java +47 -0
- package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/AuditClient.java +12 -0
- package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/LedgerClient.java +17 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/LedgerClient.java +14 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/RatesClient.java +11 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/StatementController.java +36 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/resources/application.yml +7 -0
- package/dist/packages/extractors/dialects/fixtures/quarkus-reactive-messaging/fraud-service/src/main/java/forge/fraud/FraudScorer.java +27 -0
- package/dist/packages/extractors/dialects/fixtures/quarkus-reactive-messaging/fraud-service/src/main/resources/application.properties +4 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/api.tf +38 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/main.tf +95 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/terraform.tfvars +1 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/variables.tf +4 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-azure/forge-azure-infra/main.tf +102 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-gcp/forge-gcp-infra/main.tf +51 -0
- package/dist/packages/extractors/dialects/harness.yaml +101 -0
- package/dist/packages/extractors/dialects/jaxrs.yaml +155 -0
- package/dist/packages/extractors/dialects/micronaut.yaml +207 -0
- package/dist/packages/extractors/dialects/quarkus-reactive-messaging.yaml +158 -0
- package/dist/packages/extractors/dialects/tekton.yaml +71 -0
- package/dist/packages/extractors/dialects/terraform-aws.yaml +267 -0
- package/dist/packages/extractors/dialects/terraform-azure.yaml +212 -0
- package/dist/packages/extractors/dialects/terraform-gcp.yaml +109 -0
- package/dist/packages/extractors/grammars/README.md +11 -0
- package/dist/packages/extractors/grammars/tree-sitter-groovy.LICENSE +21 -0
- package/dist/packages/extractors/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/packages/extractors/grammars/vendored.json +11 -0
- package/dist/packages/learn/lessons/architect-diagrams-and-code.yaml +69 -0
- package/dist/packages/learn/lessons/business-analyst-story-bar.yaml +94 -0
- package/dist/packages/learn/lessons/delivery-lead-release-readiness.yaml +44 -0
- package/dist/packages/learn/lessons/designer-features-in-user-words.yaml +57 -0
- package/dist/packages/learn/lessons/developer-find-your-way.yaml +60 -0
- package/dist/packages/learn/lessons/everyone-first-hour.yaml +74 -0
- package/dist/packages/learn/lessons/platform-lead-coverage-and-defences.yaml +58 -0
- package/dist/packages/learn/lessons/product-owner-first-change.yaml +167 -0
- package/dist/packages/learn/lessons/qa-tests-and-trace.yaml +53 -0
- package/dist/packages/learn/lessons/team-lead-initiative.yaml +146 -0
- package/dist/packages/naysayer/constitution/constitution.yaml +305 -0
- package/dist/packages/naysayer/starter/review.yaml +256 -0
- package/dist/packages/sdk/npm/index.js +10097 -0
- package/dist/packages/speckit/rules/drift.yaml +78 -0
- package/dist/packages/taskrun/rules/conform.yaml +38 -0
- package/dist/packages/testgen/rules/trace.yaml +49 -0
- package/dist/packages/ui/dist/assets/elk-api-DDup23Us.js +2 -0
- package/dist/packages/ui/dist/assets/elk-worker.min--dAJroGl.js +6401 -0
- package/dist/packages/ui/dist/assets/elk-worker.min-DdYmS5kP.js +2 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
- package/dist/packages/ui/dist/assets/index-C0JEkXyN.css +1 -0
- package/dist/packages/ui/dist/assets/index-mTOWhQZm.js +29 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-600-normal-BtY48IV_.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-600-normal-DhS7ScYx.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-700-normal-BQQOj9BB.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-700-normal-DBRwWuxA.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-600-normal-CXCVEoA9.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-600-normal-Dx02qI2_.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-700-normal-BPDUZo87.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-700-normal-e0Uj8ZlN.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-600-normal-BleIgkPp.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-600-normal-C9ZjJQAt.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-700-normal-BPaQ7tlD.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-700-normal-S6aYESQK.woff2 +0 -0
- package/dist/packages/ui/dist/favicon.svg +1 -0
- package/dist/packages/ui/dist/index.html +15 -0
- package/dist/third-party.json +575 -0
- package/dist/vendor/@fission-ai/openspec/bin/openspec.js +85986 -0
- package/dist/vendor/@fission-ai/openspec/package.json +82 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/schema.yaml +248 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/design.md +21 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/proposal.md +34 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/spec.md +13 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/tasks.md +11 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-go.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-java.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-javascript.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-kotlin.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-php.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-python.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-ruby.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-rust.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-scala.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-tsx.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-typescript.wasm +0 -0
- package/dist/vendor/web-tree-sitter/tree-sitter.wasm +0 -0
- package/package.json +36 -3
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
import { createRequire as __atticusCreateRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __atticusFileURLToPath } from "node:url";
|
|
3
|
+
var require = __atticusCreateRequire(import.meta.url);
|
|
4
|
+
var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
5
|
+
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
|
+
import {
|
|
7
|
+
mapCommand,
|
|
8
|
+
mapStateOf
|
|
9
|
+
} from "./chunk-LS3WR2RF.js";
|
|
10
|
+
import {
|
|
11
|
+
factsRepos,
|
|
12
|
+
verifyCommand
|
|
13
|
+
} from "./chunk-Y5AYBGLB.js";
|
|
14
|
+
import "./chunk-52WCHTVZ.js";
|
|
15
|
+
import {
|
|
16
|
+
estateFreshness
|
|
17
|
+
} from "./chunk-G3PBLW4K.js";
|
|
18
|
+
import {
|
|
19
|
+
onboardingQueue
|
|
20
|
+
} from "./chunk-ATNG5VOZ.js";
|
|
21
|
+
import "./chunk-B3QOYE74.js";
|
|
22
|
+
import {
|
|
23
|
+
readPlanProgress
|
|
24
|
+
} from "./chunk-LVBPY2M6.js";
|
|
25
|
+
import "./chunk-EW7MRMD5.js";
|
|
26
|
+
import "./chunk-IA2RKC6I.js";
|
|
27
|
+
import {
|
|
28
|
+
checkoutOf,
|
|
29
|
+
headOf
|
|
30
|
+
} from "./chunk-ASKDCMW5.js";
|
|
31
|
+
import "./chunk-LDIARP6F.js";
|
|
32
|
+
import "./chunk-MYKQVS5W.js";
|
|
33
|
+
import "./chunk-EBWIOODZ.js";
|
|
34
|
+
import "./chunk-BA5DTXHQ.js";
|
|
35
|
+
import {
|
|
36
|
+
isMetarepo,
|
|
37
|
+
notMetarepo
|
|
38
|
+
} from "./chunk-3G4YI4ZU.js";
|
|
39
|
+
import {
|
|
40
|
+
assistantTier,
|
|
41
|
+
readProbes
|
|
42
|
+
} from "./chunk-6RGIM2ZH.js";
|
|
43
|
+
import "./chunk-VOGCSYOI.js";
|
|
44
|
+
import {
|
|
45
|
+
estateRepos,
|
|
46
|
+
productionRepos
|
|
47
|
+
} from "./chunk-IILZ7J3L.js";
|
|
48
|
+
import "./chunk-TEBBD4XH.js";
|
|
49
|
+
import {
|
|
50
|
+
sameCommit
|
|
51
|
+
} from "./chunk-XPWSNKF3.js";
|
|
52
|
+
import "./chunk-WIMOJMAK.js";
|
|
53
|
+
import "./chunk-5V5BJACL.js";
|
|
54
|
+
import "./chunk-GVFUEGGM.js";
|
|
55
|
+
import "./chunk-RJDP642F.js";
|
|
56
|
+
import "./chunk-XZJE6WIT.js";
|
|
57
|
+
import "./chunk-FMRMTI7W.js";
|
|
58
|
+
import {
|
|
59
|
+
currentPromptLimit
|
|
60
|
+
} from "./chunk-BKFGGJKA.js";
|
|
61
|
+
import {
|
|
62
|
+
factsDirOf,
|
|
63
|
+
factsRelOf,
|
|
64
|
+
headFromFiles,
|
|
65
|
+
listQuestions,
|
|
66
|
+
loadOrgPack,
|
|
67
|
+
orgPackDirOf,
|
|
68
|
+
parseFacts,
|
|
69
|
+
require_dist
|
|
70
|
+
} from "./chunk-JMOLB347.js";
|
|
71
|
+
import {
|
|
72
|
+
ensureLocalIgnore,
|
|
73
|
+
writeFileAtomic
|
|
74
|
+
} from "./chunk-MMB2OHUY.js";
|
|
75
|
+
import {
|
|
76
|
+
__toESM
|
|
77
|
+
} from "./chunk-TV45EUGM.js";
|
|
78
|
+
|
|
79
|
+
// packages/cli/dist/map-all.js
|
|
80
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
81
|
+
import { existsSync } from "node:fs";
|
|
82
|
+
import { readFile, stat } from "node:fs/promises";
|
|
83
|
+
import { join } from "node:path";
|
|
84
|
+
var MAP_ALL_STATE_REL = ".atticus/map-all/state.json";
|
|
85
|
+
var statePath = (root) => join(root, ".atticus", "map-all", "state.json");
|
|
86
|
+
var REMIND_MS = 10 * 6e4;
|
|
87
|
+
var IDLE_MINUTES = 15;
|
|
88
|
+
var POLL_MS = 3e3;
|
|
89
|
+
var RETRIES = 3;
|
|
90
|
+
var plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
91
|
+
var tokensText = (n) => n.toLocaleString("en-US");
|
|
92
|
+
var firstLine = (e) => String(e?.message ?? e).split("\n")[0];
|
|
93
|
+
async function readMapAllState(root) {
|
|
94
|
+
const text = await readFile(statePath(root), "utf8").catch(() => void 0);
|
|
95
|
+
if (!text)
|
|
96
|
+
return void 0;
|
|
97
|
+
try {
|
|
98
|
+
const s = JSON.parse(text);
|
|
99
|
+
return s.schemaVersion === 1 && s.repos && typeof s.repos === "object" ? s : void 0;
|
|
100
|
+
} catch {
|
|
101
|
+
return void 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function saveState(root, s, now) {
|
|
105
|
+
s.updatedAt = new Date(now).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
106
|
+
await ensureLocalIgnore(root);
|
|
107
|
+
await writeFileAtomic(statePath(root), `${JSON.stringify(s, null, 2)}
|
|
108
|
+
`);
|
|
109
|
+
}
|
|
110
|
+
function modelModeAllowed(op) {
|
|
111
|
+
const rt = op.runtime;
|
|
112
|
+
return rt.ai !== "off" && rt.modes.allowed.includes("model") && !!rt.adapters.model && rt.adapters.model.type !== "mock";
|
|
113
|
+
}
|
|
114
|
+
async function limitFor(root, op, given) {
|
|
115
|
+
const flag = given ?? currentPromptLimit();
|
|
116
|
+
if (flag !== void 0)
|
|
117
|
+
return { limit: flag, from: "flag" };
|
|
118
|
+
const maxInput = op.runtime.adapters.model?.settings.maxInput;
|
|
119
|
+
if (typeof maxInput === "number")
|
|
120
|
+
return { limit: maxInput, from: "runtime.yaml" };
|
|
121
|
+
const tier = assistantTier(op.runtime, { probes: (await readProbes(root)).results });
|
|
122
|
+
if (tier.maxTokensFrom === "probe" && tier.maxTokens !== void 0)
|
|
123
|
+
return { limit: tier.maxTokens, from: "probe" };
|
|
124
|
+
return void 0;
|
|
125
|
+
}
|
|
126
|
+
function captured() {
|
|
127
|
+
const lines = [];
|
|
128
|
+
const errs = [];
|
|
129
|
+
return { lines, errs, out: (l) => lines.push(l), err: (l) => errs.push(l) };
|
|
130
|
+
}
|
|
131
|
+
function jsonOf(lines) {
|
|
132
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
133
|
+
const l = lines[i].trimStart();
|
|
134
|
+
if (!l.startsWith("{"))
|
|
135
|
+
continue;
|
|
136
|
+
try {
|
|
137
|
+
return JSON.parse(lines.slice(i).join("\n"));
|
|
138
|
+
} catch {
|
|
139
|
+
try {
|
|
140
|
+
return JSON.parse(l);
|
|
141
|
+
} catch {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return void 0;
|
|
147
|
+
}
|
|
148
|
+
async function commitOf(root, repo, f) {
|
|
149
|
+
if (f?.head)
|
|
150
|
+
return f.head;
|
|
151
|
+
const dir = await checkoutOf(root, repo).catch(() => void 0);
|
|
152
|
+
if (!dir || !existsSync(dir))
|
|
153
|
+
return void 0;
|
|
154
|
+
return await headFromFiles(dir) ?? await headOf(dir);
|
|
155
|
+
}
|
|
156
|
+
async function partsOf(root, repo, commit, limit, git) {
|
|
157
|
+
const io = captured();
|
|
158
|
+
const code = await mapCommand(root, repo, { estimate: true, json: true, commit, maxTokens: limit }, io, git ? { git } : {});
|
|
159
|
+
const r = code === 0 ? jsonOf(io.lines) : void 0;
|
|
160
|
+
if (!r)
|
|
161
|
+
return io.errs[0] ?? `atticus map ${repo} --estimate didn't plan it`;
|
|
162
|
+
const planned = r.parts.parts;
|
|
163
|
+
const batches = r.batches ?? void 0;
|
|
164
|
+
if (!planned.length)
|
|
165
|
+
return {
|
|
166
|
+
parts: [{ part: 1, total: 1, paths: [], files: r.files, tokens: r.tokens }],
|
|
167
|
+
total: 1,
|
|
168
|
+
tokens: r.tokens,
|
|
169
|
+
...batches !== void 0 ? { batches } : {}
|
|
170
|
+
};
|
|
171
|
+
const states = r.parts.plan?.parts ?? [];
|
|
172
|
+
const parts = planned.map((p, i) => ({ part: i + 1, total: planned.length, ...p })).filter((p) => states.find((s) => s.part === p.part)?.state !== "done");
|
|
173
|
+
return {
|
|
174
|
+
parts,
|
|
175
|
+
total: planned.length,
|
|
176
|
+
tokens: parts.reduce((n, p) => n + p.tokens, 0),
|
|
177
|
+
...batches !== void 0 ? { batches } : {}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
async function planEstate(root, op, o, c, state) {
|
|
181
|
+
const all = estateRepos(op).map((r) => r.id);
|
|
182
|
+
const production = new Set(productionRepos(op).map((r) => r.id));
|
|
183
|
+
if (o.repos) {
|
|
184
|
+
const unknown = o.repos.filter((r) => !all.includes(r));
|
|
185
|
+
if (unknown.length)
|
|
186
|
+
return `No repo ${unknown.join(", ")} in the manifests (org-pack/profiles/*/repos.manifest.yaml).`;
|
|
187
|
+
}
|
|
188
|
+
const ids = o.repos ? all.filter((r) => o.repos.includes(r)) : all;
|
|
189
|
+
const fresh = await estateFreshness(root, { repos: ids, ...c.git ? { git: c.git } : {} });
|
|
190
|
+
const byId = new Map(fresh.repos.map((r) => [r.repo, r]));
|
|
191
|
+
const skipped = [];
|
|
192
|
+
const todo = [];
|
|
193
|
+
for (const repo of ids) {
|
|
194
|
+
const f = byId.get(repo);
|
|
195
|
+
const commit = await commitOf(root, repo, f);
|
|
196
|
+
if (!commit || f?.state === "no-checkout") {
|
|
197
|
+
skipped.push({ repo, why: "no clone to read: atticus workspace sync clones it" });
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
const state2 = f?.state ?? "not-read";
|
|
201
|
+
if (o.gaps) {
|
|
202
|
+
if (state2 === "not-read")
|
|
203
|
+
skipped.push({ repo, why: "not read yet: the gaps pass follows a read" });
|
|
204
|
+
else if (state2 === "stale" || state2 === "unknown-commit")
|
|
205
|
+
skipped.push({
|
|
206
|
+
repo,
|
|
207
|
+
why: "its clone moved past its facts: atticus map --all --stale reads what changed first"
|
|
208
|
+
});
|
|
209
|
+
else if (isDone(repo, commit))
|
|
210
|
+
skipped.push({ repo, why: "its gaps pass is done at this commit" });
|
|
211
|
+
else
|
|
212
|
+
todo.push({ repo, kind: "gaps", commit, why: "the second pass on what its read left" });
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (state2 === "stale" || state2 === "unknown-commit") {
|
|
216
|
+
todo.push({
|
|
217
|
+
repo,
|
|
218
|
+
kind: "reread",
|
|
219
|
+
commit,
|
|
220
|
+
why: state2 === "stale" ? `its clone moved past its facts: ${plural(f.reread, "fact")} to read again, ${plural(f.toRead, "file")} to read` : "the clone lacks the commit its facts were read at: read whole again",
|
|
221
|
+
started: true
|
|
222
|
+
});
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (state2 === "moved") {
|
|
226
|
+
todo.push({
|
|
227
|
+
repo,
|
|
228
|
+
kind: "carry",
|
|
229
|
+
commit,
|
|
230
|
+
why: "its clone moved, but nothing its facts cite changed: verify carries them",
|
|
231
|
+
started: true
|
|
232
|
+
});
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
if (o.stale) {
|
|
236
|
+
skipped.push({
|
|
237
|
+
repo,
|
|
238
|
+
why: state2 === "fresh" ? "fresh" : "not read yet (atticus map --all reads it)"
|
|
239
|
+
});
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
if (state2 === "fresh") {
|
|
243
|
+
const progress = await readPlanProgress(root, repo, { commit });
|
|
244
|
+
if (progress && !progress.stale && progress.next) {
|
|
245
|
+
todo.push({
|
|
246
|
+
repo,
|
|
247
|
+
kind: "read",
|
|
248
|
+
commit,
|
|
249
|
+
why: `its read is under way: ${progress.done} of ${progress.total} parts read`,
|
|
250
|
+
started: true
|
|
251
|
+
});
|
|
252
|
+
} else
|
|
253
|
+
skipped.push({ repo, why: "read and fresh" });
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
todo.push({ repo, kind: "read", commit, why: "not read yet" });
|
|
257
|
+
}
|
|
258
|
+
const prod = todo.filter((t) => production.has(t.repo));
|
|
259
|
+
const q = await onboardingQueue(root, prod.map((t) => ({ repo: t.repo, ...t.started ? { started: true } : {} })));
|
|
260
|
+
const ordered = [
|
|
261
|
+
...q.queue.map((x) => prod.find((t) => t.repo === x.repo)),
|
|
262
|
+
...todo.filter((t) => !production.has(t.repo))
|
|
263
|
+
];
|
|
264
|
+
const items = [];
|
|
265
|
+
for (const t of ordered) {
|
|
266
|
+
const base = {
|
|
267
|
+
repo: t.repo,
|
|
268
|
+
kind: t.kind,
|
|
269
|
+
commit: t.commit,
|
|
270
|
+
why: t.why,
|
|
271
|
+
...production.has(t.repo) ? {} : { prototype: true }
|
|
272
|
+
};
|
|
273
|
+
if (t.kind === "carry") {
|
|
274
|
+
items.push({ ...base, parts: [], total: 0, tokens: 0 });
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
if (t.kind === "gaps") {
|
|
278
|
+
items.push({
|
|
279
|
+
...base,
|
|
280
|
+
parts: [{ part: 1, total: 1, paths: [], files: 0, tokens: 0 }],
|
|
281
|
+
total: 1,
|
|
282
|
+
tokens: 0
|
|
283
|
+
});
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
const p = await partsOf(root, t.repo, t.commit, c.limit, c.git);
|
|
287
|
+
if (typeof p === "string") {
|
|
288
|
+
skipped.push({ repo: t.repo, why: p });
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
if (c.mode === "model" && p.batches === void 0) {
|
|
292
|
+
skipped.push({
|
|
293
|
+
repo: t.repo,
|
|
294
|
+
why: `a model of ${c.limit} tokens leaves too little room for its files beside the instructions`
|
|
295
|
+
});
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
if (!p.parts.length) {
|
|
299
|
+
skipped.push({ repo: t.repo, why: "every part of its read plan is read" });
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
items.push({ ...base, ...p });
|
|
303
|
+
}
|
|
304
|
+
return { limit: c.limit, limitFrom: c.limitFrom, mode: c.mode, items, skipped };
|
|
305
|
+
function isDone(repo, commit) {
|
|
306
|
+
const r = state?.repos[repo];
|
|
307
|
+
return !!r?.done && r.kind === "gaps" && sameCommit(r.commit, commit);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function planLines(plan) {
|
|
311
|
+
const out = [];
|
|
312
|
+
const reading = plan.items.filter((i) => i.kind !== "carry");
|
|
313
|
+
const parts = reading.reduce((n, i) => n + i.parts.length, 0);
|
|
314
|
+
const tokens = reading.reduce((n, i) => n + i.tokens, 0);
|
|
315
|
+
out.push(`The estate at ${tokensText(plan.limit)} tokens a prompt (${plan.limitFrom === "flag" ? "--max-tokens" : plan.limitFrom === "probe" ? "the limit atticus probe measured" : "runtime.yaml's maxInput"}), ${plan.mode === "model" ? "read by runtime.yaml's model, unattended" : "read by Copilot Chat in agent mode: you paste one line per part"}:`);
|
|
316
|
+
plan.items.forEach((i, n) => {
|
|
317
|
+
const head = ` ${n + 1}. ${i.repo}${i.prototype ? " (prototype: read, never joined)" : ""}`;
|
|
318
|
+
if (i.kind === "carry")
|
|
319
|
+
return out.push(`${head}: ${i.why}.`);
|
|
320
|
+
if (i.kind === "gaps")
|
|
321
|
+
return out.push(`${head}: ${i.why}, planned when it starts.`);
|
|
322
|
+
out.push(`${head}: ${i.kind === "reread" ? "re-read" : "read"}, ${i.why}; ${plural(i.parts.length, "part")}${i.parts.length < i.total ? ` of ${i.total}` : ""}, about ${tokensText(i.tokens)} tokens${plan.mode === "model" && i.batches !== void 0 ? `, ${plural(i.batches, "prompt")}` : ""}.`);
|
|
323
|
+
if (i.total > 1)
|
|
324
|
+
for (const p of i.parts)
|
|
325
|
+
out.push(` part ${p.part} of ${p.total} (about ${tokensText(p.tokens)} tokens, ${plural(p.files, "file")}): ${p.paths.join(", ")}`);
|
|
326
|
+
});
|
|
327
|
+
for (const s of plan.skipped)
|
|
328
|
+
out.push(` - ${s.repo}: skipped, ${s.why}.`);
|
|
329
|
+
out.push(plan.items.length ? `In all: ${plural(plan.items.length, "repo")}, ${plural(parts, "part")} to read, about ${tokensText(tokens)} tokens (estimated from the source, not metered). Then atticus verify --all --write joins the estate once.` : "Nothing to read: every repo is read and fresh, or skipped as said.");
|
|
330
|
+
return out;
|
|
331
|
+
}
|
|
332
|
+
var mtime = async (p) => (await stat(p).catch(() => void 0))?.mtimeMs;
|
|
333
|
+
async function snapOf(root, repo) {
|
|
334
|
+
const dir = factsDirOf(root);
|
|
335
|
+
const [facts, reviewed, verify] = await Promise.all([
|
|
336
|
+
mtime(join(dir, `${repo}.jsonl`)),
|
|
337
|
+
mtime(join(dir, `${repo}.reviewed.jsonl`)),
|
|
338
|
+
mtime(join(dir, `${repo}.verify.yaml`))
|
|
339
|
+
]);
|
|
340
|
+
return {
|
|
341
|
+
...facts !== void 0 ? { facts } : {},
|
|
342
|
+
...reviewed !== void 0 ? { reviewed } : {},
|
|
343
|
+
...verify !== void 0 ? { verify } : {}
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
var sameSnap = (a, b) => a.facts === b.facts && a.reviewed === b.reviewed && a.verify === b.verify;
|
|
347
|
+
async function factsAt(root, repo, commit) {
|
|
348
|
+
const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => "");
|
|
349
|
+
if (!text.trim())
|
|
350
|
+
return 0;
|
|
351
|
+
const p = parseFacts(text);
|
|
352
|
+
return p.ok ? p.facts.filter((f) => sameCommit(f.commit, commit)).length : 0;
|
|
353
|
+
}
|
|
354
|
+
async function settled(root, repo, commit, s, since) {
|
|
355
|
+
if (s.verify === void 0 || s.verify === since.verify)
|
|
356
|
+
return false;
|
|
357
|
+
if (s.verify < (s.facts ?? 0) || s.verify < (s.reviewed ?? 0))
|
|
358
|
+
return false;
|
|
359
|
+
const text = await readFile(join(factsDirOf(root), `${repo}.verify.yaml`), "utf8").catch(() => "");
|
|
360
|
+
try {
|
|
361
|
+
const v = (0, import_yaml.parse)(text) ?? {};
|
|
362
|
+
return v.rejected === 0 && (!v.commit || sameCommit(v.commit, commit));
|
|
363
|
+
} catch {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
async function covered(root, item, part, first, now) {
|
|
368
|
+
if (item.total > 1) {
|
|
369
|
+
const p = await readPlanProgress(root, item.repo);
|
|
370
|
+
return p?.parts.find((x) => x.part === part.part)?.state === "done";
|
|
371
|
+
}
|
|
372
|
+
const moved = now.facts !== first.facts || now.reviewed !== first.reviewed;
|
|
373
|
+
if (item.kind === "read")
|
|
374
|
+
return moved || now.reviewed !== void 0 || await factsAt(root, item.repo, item.commit) > 0;
|
|
375
|
+
return moved;
|
|
376
|
+
}
|
|
377
|
+
var CapReached = class extends Error {
|
|
378
|
+
};
|
|
379
|
+
function capped(inner, o, spent) {
|
|
380
|
+
const over = () => o.maxParts !== void 0 && spent.prompts >= o.maxParts || o.budgetTokens !== void 0 && spent.tokens >= o.budgetTokens;
|
|
381
|
+
const estimated = /* @__PURE__ */ new Map();
|
|
382
|
+
return {
|
|
383
|
+
kind: inner.kind,
|
|
384
|
+
prepare: async (r) => {
|
|
385
|
+
if (over())
|
|
386
|
+
throw new CapReached();
|
|
387
|
+
spent.prompts++;
|
|
388
|
+
const run = await inner.prepare(r);
|
|
389
|
+
const est = r.pack.manifest.totalTokens;
|
|
390
|
+
estimated.set(run.runId, est);
|
|
391
|
+
spent.tokens += est;
|
|
392
|
+
return run;
|
|
393
|
+
},
|
|
394
|
+
run: async (id, signal) => {
|
|
395
|
+
const run = await inner.run(id, signal);
|
|
396
|
+
const u = run.usage;
|
|
397
|
+
if (u)
|
|
398
|
+
spent.tokens += u.inputTokens + u.outputTokens - (estimated.get(id) ?? 0);
|
|
399
|
+
estimated.delete(id);
|
|
400
|
+
return run;
|
|
401
|
+
},
|
|
402
|
+
result: (id) => inner.result(id)
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
async function mapAllCommand(root, o, io, deps = {}) {
|
|
406
|
+
if (!isMetarepo(root)) {
|
|
407
|
+
io.err(notMetarepo(root));
|
|
408
|
+
return 2;
|
|
409
|
+
}
|
|
410
|
+
const clock = deps.clock ?? {
|
|
411
|
+
now: () => Date.now(),
|
|
412
|
+
sleep: (ms) => new Promise((r) => setTimeout(r, ms))
|
|
413
|
+
};
|
|
414
|
+
const op = await loadOrgPack(orgPackDirOf(root));
|
|
415
|
+
const lim = await limitFor(root, op, o.maxTokens);
|
|
416
|
+
if (!lim) {
|
|
417
|
+
io.err("Atticus doesn't know your model's limit, and a part planned too big overflows the reader: pass --max-tokens <n> (the context window of the model Copilot Chat uses, in tokens), or set maxInput under adapters.model in runtime.yaml.");
|
|
418
|
+
return 2;
|
|
419
|
+
}
|
|
420
|
+
const limit = lim.limit;
|
|
421
|
+
const allowed = modelModeAllowed(op);
|
|
422
|
+
const mode = o.mode ?? (allowed ? "model" : "copilot");
|
|
423
|
+
if (mode === "model" && !allowed && !deps.runtime) {
|
|
424
|
+
io.err("runtime.yaml doesn't allow model mode with a provider here: map the estate through Copilot (atticus map --all without --mode model).");
|
|
425
|
+
return 2;
|
|
426
|
+
}
|
|
427
|
+
if (mode === "model" && o.gaps) {
|
|
428
|
+
io.err("The gaps pass is a session for an assistant that opens files: run atticus map --all --gaps --mode hand-off and paste each line into Copilot Chat.");
|
|
429
|
+
return 2;
|
|
430
|
+
}
|
|
431
|
+
let state = await readMapAllState(root);
|
|
432
|
+
if (state && (state.gaps !== !!o.gaps || state.mode !== mode))
|
|
433
|
+
state = void 0;
|
|
434
|
+
const plan = await planEstate(root, op, o, { limit: lim.limit, limitFrom: lim.from, mode, ...deps.git ? { git: deps.git } : {} }, state);
|
|
435
|
+
if (typeof plan === "string") {
|
|
436
|
+
io.err(plan);
|
|
437
|
+
return 2;
|
|
438
|
+
}
|
|
439
|
+
if (o.dryRun) {
|
|
440
|
+
if (o.json)
|
|
441
|
+
io.out(JSON.stringify(plan, null, 2));
|
|
442
|
+
else
|
|
443
|
+
for (const l of planLines(plan))
|
|
444
|
+
io.out(l);
|
|
445
|
+
return 0;
|
|
446
|
+
}
|
|
447
|
+
for (const l of planLines(plan))
|
|
448
|
+
io.out(l);
|
|
449
|
+
const st = state ?? {
|
|
450
|
+
schemaVersion: 1,
|
|
451
|
+
updatedAt: "",
|
|
452
|
+
mode,
|
|
453
|
+
gaps: !!o.gaps,
|
|
454
|
+
repos: {}
|
|
455
|
+
};
|
|
456
|
+
const save = () => saveState(root, st, clock.now());
|
|
457
|
+
await save();
|
|
458
|
+
const totals = {
|
|
459
|
+
parts: 0,
|
|
460
|
+
repos: /* @__PURE__ */ new Set(),
|
|
461
|
+
rejected: /* @__PURE__ */ new Map(),
|
|
462
|
+
added: 0,
|
|
463
|
+
removed: 0,
|
|
464
|
+
ends: [],
|
|
465
|
+
spent: { prompts: 0, tokens: 0 }
|
|
466
|
+
};
|
|
467
|
+
const stopped = () => deps.signal?.aborted === true;
|
|
468
|
+
const repoState = (item) => {
|
|
469
|
+
const r = st.repos[item.repo];
|
|
470
|
+
if (r && sameCommit(r.commit, item.commit) && r.kind === item.kind)
|
|
471
|
+
return r;
|
|
472
|
+
return st.repos[item.repo] = { commit: item.commit, kind: item.kind, parts: {} };
|
|
473
|
+
};
|
|
474
|
+
const partState = (item, part) => repoState(item).parts[String(part)] ??= { retries: 0 };
|
|
475
|
+
const verifyStep = async (item) => {
|
|
476
|
+
const c = captured();
|
|
477
|
+
await verifyCommand(root, item.repo, { commit: item.commit, write: true, json: true }, c);
|
|
478
|
+
const v = jsonOf(c.lines);
|
|
479
|
+
if (!v) {
|
|
480
|
+
io.out(`${item.repo}: verify didn't run: ${c.errs[0] ?? "no report"}`);
|
|
481
|
+
return void 0;
|
|
482
|
+
}
|
|
483
|
+
const links = v.written?.links;
|
|
484
|
+
totals.rejected.set(item.repo, v.rejected);
|
|
485
|
+
if (links) {
|
|
486
|
+
totals.added += links.added.length;
|
|
487
|
+
totals.removed += links.removed.length;
|
|
488
|
+
}
|
|
489
|
+
io.out(`${item.repo}: ${plural(v.accepted, "fact")} kept, ${v.rejected} rejected; coverage ${Math.round(v.coverage.ratio * 100)}% (${v.coverage.unknown.length} files no fact cites yet)${links ? `; links +${links.added.length} -${links.removed.length}` : ""}; ${plural(v.questions?.open ?? 0, "question")} open. ${v.rejected ? `Nothing written to the catalog until the rejected facts are fixed (${factsRelOf(root)}/${item.repo}.rejected.jsonl).` : v.written ? "Written to the catalog." : ""}`.trimEnd());
|
|
490
|
+
return v;
|
|
491
|
+
};
|
|
492
|
+
let quit = false;
|
|
493
|
+
let capHit = false;
|
|
494
|
+
let runtime;
|
|
495
|
+
const items = plan.items;
|
|
496
|
+
for (const [n, item] of items.entries()) {
|
|
497
|
+
if (quit || stopped())
|
|
498
|
+
break;
|
|
499
|
+
const where = `repo ${n + 1} of ${items.length}`;
|
|
500
|
+
if (item.kind === "carry") {
|
|
501
|
+
io.out("");
|
|
502
|
+
io.out(`===== ${item.repo} (${where}): ${item.why} =====`);
|
|
503
|
+
const v = await verifyStep(item);
|
|
504
|
+
if (v && !v.rejected) {
|
|
505
|
+
repoState(item).done = true;
|
|
506
|
+
totals.repos.add(item.repo);
|
|
507
|
+
}
|
|
508
|
+
await save();
|
|
509
|
+
continue;
|
|
510
|
+
}
|
|
511
|
+
if (mode === "model") {
|
|
512
|
+
runtime ??= deps.runtime ?? await deps.makeRuntime?.();
|
|
513
|
+
if (!runtime) {
|
|
514
|
+
io.err("No model runtime: model mode needs runtime.yaml's provider.");
|
|
515
|
+
return 2;
|
|
516
|
+
}
|
|
517
|
+
const r = await modelRead(item, where, capped(runtime, o, totals.spent));
|
|
518
|
+
if (r === "cap") {
|
|
519
|
+
capHit = true;
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
continue;
|
|
523
|
+
}
|
|
524
|
+
for (const part of item.parts) {
|
|
525
|
+
if (quit || stopped())
|
|
526
|
+
break;
|
|
527
|
+
const end = await copilotPart(item, part, where);
|
|
528
|
+
if (end === "quit") {
|
|
529
|
+
quit = true;
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
const interrupted = quit || stopped() || capHit;
|
|
535
|
+
if (interrupted) {
|
|
536
|
+
io.out("");
|
|
537
|
+
io.out(capHit ? `Stopped at the cap (${o.maxParts !== void 0 ? `--max-parts ${o.maxParts}` : ""}${o.maxParts !== void 0 && o.budgetTokens !== void 0 ? ", " : ""}${o.budgetTokens !== void 0 ? `--budget-tokens ${o.budgetTokens}` : ""}): ${plural(totals.spent.prompts, "prompt")} run. atticus map --all carries on from here.` : "Stopped. Where the estate stands is saved: atticus map --all carries on from here.");
|
|
538
|
+
} else if (totals.parts || totals.repos.size) {
|
|
539
|
+
io.out("");
|
|
540
|
+
io.out("Joining the estate: atticus verify --all --write.");
|
|
541
|
+
const repos = await factsRepos(root);
|
|
542
|
+
let passed = 0;
|
|
543
|
+
for (const repo of repos) {
|
|
544
|
+
const c = captured();
|
|
545
|
+
const code = await verifyCommand(root, repo, { write: true, json: true }, c);
|
|
546
|
+
const v = jsonOf(c.lines);
|
|
547
|
+
if (code === 0)
|
|
548
|
+
passed++;
|
|
549
|
+
if (v?.written?.links) {
|
|
550
|
+
totals.added += v.written.links.added.length;
|
|
551
|
+
totals.removed += v.written.links.removed.length;
|
|
552
|
+
}
|
|
553
|
+
if (v)
|
|
554
|
+
totals.rejected.set(repo, v.rejected);
|
|
555
|
+
}
|
|
556
|
+
io.out(`Verified ${plural(repos.length, "repo")}: ${passed} passed${repos.length - passed ? `, ${repos.length - passed} with something to fix` : ""}.`);
|
|
557
|
+
}
|
|
558
|
+
await save();
|
|
559
|
+
await summary(interrupted);
|
|
560
|
+
return 0;
|
|
561
|
+
async function copilotPart(item, part, where) {
|
|
562
|
+
const ps = partState(item, part.part);
|
|
563
|
+
const label = item.total > 1 ? `part ${part.part} of ${item.total}` : "one session";
|
|
564
|
+
const progress = item.total > 1 ? await readPlanProgress(root, item.repo) : void 0;
|
|
565
|
+
const first0 = item.kind === "gaps" ? await gapsLine(item) : ps.retries > 0 || progress?.next && progress.next.part !== part.part ? await restLine(item, part) ?? `/atticus-map ${item.repo}` : `/atticus-map ${item.repo}`;
|
|
566
|
+
if (first0 === void 0) {
|
|
567
|
+
io.out(`${item.repo}: no gaps left; nothing to read.`);
|
|
568
|
+
return finishPart(item, part, ps);
|
|
569
|
+
}
|
|
570
|
+
if (first0 === "done")
|
|
571
|
+
return finishPart(item, part, ps);
|
|
572
|
+
let line = first0;
|
|
573
|
+
await block(item, part, label, where, line, ps.retries);
|
|
574
|
+
let first = await snapOf(root, item.repo);
|
|
575
|
+
let since = first;
|
|
576
|
+
let prev = first;
|
|
577
|
+
let lastChange = clock.now();
|
|
578
|
+
let lastRemind = clock.now();
|
|
579
|
+
const started = clock.now();
|
|
580
|
+
let stuckSaid = false;
|
|
581
|
+
const idleMs = (o.idleMinutes ?? IDLE_MINUTES) * 6e4;
|
|
582
|
+
for (; ; ) {
|
|
583
|
+
if (stopped()) {
|
|
584
|
+
ps.state = "incomplete";
|
|
585
|
+
await save();
|
|
586
|
+
return "quit";
|
|
587
|
+
}
|
|
588
|
+
const typed = deps.input?.take()?.trim().toLowerCase();
|
|
589
|
+
if (typed === "q") {
|
|
590
|
+
ps.state = "incomplete";
|
|
591
|
+
await save();
|
|
592
|
+
return "quit";
|
|
593
|
+
}
|
|
594
|
+
if (typed === "s") {
|
|
595
|
+
io.out(`Skipped ${item.repo} ${label}.`);
|
|
596
|
+
ps.state = "skipped";
|
|
597
|
+
await save();
|
|
598
|
+
totals.ends.push(endOf(item, part, "skipped"));
|
|
599
|
+
return "skipped";
|
|
600
|
+
}
|
|
601
|
+
if (typed === "r") {
|
|
602
|
+
const again = await retry(item, part, label, where);
|
|
603
|
+
if (again === "done")
|
|
604
|
+
return finishPart(item, part, ps);
|
|
605
|
+
first = await snapOf(root, item.repo);
|
|
606
|
+
since = first;
|
|
607
|
+
prev = first;
|
|
608
|
+
lastChange = clock.now();
|
|
609
|
+
stuckSaid = false;
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
612
|
+
const now = await snapOf(root, item.repo);
|
|
613
|
+
if (!sameSnap(now, prev)) {
|
|
614
|
+
lastChange = clock.now();
|
|
615
|
+
stuckSaid = false;
|
|
616
|
+
prev = now;
|
|
617
|
+
}
|
|
618
|
+
if (await settled(root, item.repo, item.commit, now, since) && await covered(root, item, part, first, now)) {
|
|
619
|
+
const v = await verifyStep(item);
|
|
620
|
+
if (v && !v.rejected && await covered(root, item, part, first, await snapOf(root, item.repo)))
|
|
621
|
+
return finishPart(item, part, ps);
|
|
622
|
+
io.out(`Not done yet: ${v?.rejected ? `${plural(v.rejected, "fact")} rejected for the reader to fix` : "the part isn't accounted for in the facts yet"}. Still waiting (s + Enter skips, r + Enter gives the prompt again for what's left).`);
|
|
623
|
+
since = await snapOf(root, item.repo);
|
|
624
|
+
prev = since;
|
|
625
|
+
}
|
|
626
|
+
if (!stuckSaid && clock.now() - lastChange >= idleMs) {
|
|
627
|
+
io.out(`Copilot seems to have stopped on ${item.repo} ${item.total > 1 ? `part ${part.part}` : "(its one session)"}. r + Enter: verify what it wrote and give the prompt again for what's left, in a NEW chat; s: skip; q: stop.`);
|
|
628
|
+
stuckSaid = true;
|
|
629
|
+
}
|
|
630
|
+
if (clock.now() - lastRemind >= (deps.remindMs ?? REMIND_MS)) {
|
|
631
|
+
io.out(`Still waiting on ${item.repo} ${label} (${Math.round((clock.now() - started) / 6e4)} minutes). The line to paste: ${line} (s + Enter skips, r + Enter retries what's left, q + Enter stops)`);
|
|
632
|
+
lastRemind = clock.now();
|
|
633
|
+
}
|
|
634
|
+
await clock.sleep(deps.pollMs ?? POLL_MS);
|
|
635
|
+
}
|
|
636
|
+
async function retry(item2, part2, label2, where2) {
|
|
637
|
+
ps.retries++;
|
|
638
|
+
await save();
|
|
639
|
+
const rest = item2.kind === "gaps" ? await gapsLine(item2) : await restLine(item2, part2);
|
|
640
|
+
if (rest === "done" || rest === void 0 && item2.kind === "gaps")
|
|
641
|
+
return "done";
|
|
642
|
+
line = rest ?? `/atticus-map ${item2.repo}`;
|
|
643
|
+
await block(item2, part2, label2, where2, line, ps.retries);
|
|
644
|
+
if (ps.retries >= RETRIES) {
|
|
645
|
+
const smaller = Math.max(8e3, Math.floor(limit / 2 / 1e3) * 1e3);
|
|
646
|
+
io.out(`${item2.repo} ${label2} has been given again ${plural(ps.retries, "time")}: a smaller limit plans it in smaller parts, each a shorter chat. Stop (q), then atticus map --all --repos ${item2.repo} --max-tokens ${smaller}.`);
|
|
647
|
+
}
|
|
648
|
+
return "again";
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
async function finishPart(item, part, ps) {
|
|
652
|
+
ps.state = "done";
|
|
653
|
+
if (item.kind === "gaps" || part.part === item.total)
|
|
654
|
+
repoState(item).done = true;
|
|
655
|
+
totals.parts++;
|
|
656
|
+
totals.repos.add(item.repo);
|
|
657
|
+
await save();
|
|
658
|
+
return "done";
|
|
659
|
+
}
|
|
660
|
+
async function restLine(item, part) {
|
|
661
|
+
if (!existsSync(join(factsDirOf(root), `${item.repo}.jsonl`)))
|
|
662
|
+
return void 0;
|
|
663
|
+
const v = await verifyStep(item);
|
|
664
|
+
if (!v)
|
|
665
|
+
return void 0;
|
|
666
|
+
const parted = item.total > 1;
|
|
667
|
+
const c = captured();
|
|
668
|
+
const code = await mapCommand(root, item.repo, {
|
|
669
|
+
gaps: true,
|
|
670
|
+
json: true,
|
|
671
|
+
commit: item.commit,
|
|
672
|
+
maxTokens: limit,
|
|
673
|
+
...parted ? { part: part.part } : {}
|
|
674
|
+
}, c, deps.git ? { git: deps.git } : {});
|
|
675
|
+
const g = code === 0 ? jsonOf(c.lines) : void 0;
|
|
676
|
+
if (!g)
|
|
677
|
+
return void 0;
|
|
678
|
+
if (!g.sessions.length && !v.rejected)
|
|
679
|
+
return "done";
|
|
680
|
+
return `/atticus-map ${item.repo}${parted ? ` --part ${part.part}` : ""} --gaps`;
|
|
681
|
+
}
|
|
682
|
+
async function gapsLine(item) {
|
|
683
|
+
const plain = captured();
|
|
684
|
+
await verifyCommand(root, item.repo, { commit: item.commit, json: true }, plain);
|
|
685
|
+
const c = captured();
|
|
686
|
+
const code = await mapCommand(root, item.repo, { gaps: true, json: true, commit: item.commit, maxTokens: limit }, c, deps.git ? { git: deps.git } : {});
|
|
687
|
+
const g = code === 0 ? jsonOf(c.lines) : void 0;
|
|
688
|
+
if (!g) {
|
|
689
|
+
io.out(`${item.repo}: the gaps pass couldn't be planned: ${c.errs[0] ?? "no plan"}`);
|
|
690
|
+
return void 0;
|
|
691
|
+
}
|
|
692
|
+
return g.sessions.length ? `/atticus-map ${item.repo} --gaps` : void 0;
|
|
693
|
+
}
|
|
694
|
+
async function block(item, part, label, where, line, retries) {
|
|
695
|
+
io.out("");
|
|
696
|
+
io.out(`===== ${item.repo}, ${item.kind === "gaps" ? "the gaps pass" : label} (${where})${retries ? `, given again (${retries})` : ""} =====`);
|
|
697
|
+
io.out(`In a NEW Copilot Chat (agent mode), run: ${line}`);
|
|
698
|
+
if (item.total > 1 && !line.includes("--gaps"))
|
|
699
|
+
io.out(`That chat reads part ${part.part}: ${part.paths.join(", ")} (about ${tokensText(part.tokens)} tokens); the estimate it runs names it.`);
|
|
700
|
+
else if (line.includes("--part"))
|
|
701
|
+
io.out(`That chat reads only what is left of part ${part.part}, as the prompt it writes lists.`);
|
|
702
|
+
const copied = await (deps.clipboard ?? (async () => false))(line);
|
|
703
|
+
io.out(copied ? "The line is on your clipboard." : "Copy the line above (no clipboard tool here).");
|
|
704
|
+
io.out("Waiting for the facts it writes. s + Enter skips this part, r + Enter verifies what is there and gives the line again for what's left, q + Enter (or Ctrl+C) stops; atticus map --all carries on.");
|
|
705
|
+
}
|
|
706
|
+
async function modelRead(item, where, rt) {
|
|
707
|
+
io.out("");
|
|
708
|
+
io.out(`===== ${item.repo} (${where}): ${item.kind === "reread" ? "re-reading what changed" : "reading"} on the model, ${plural(item.batches ?? 0, "prompt")} =====`);
|
|
709
|
+
for (let attempt = 1; attempt <= RETRIES; attempt++) {
|
|
710
|
+
if (stopped())
|
|
711
|
+
return "failed";
|
|
712
|
+
const before = await mapStateOf(root, item.repo);
|
|
713
|
+
const resume = !!before && !before.done && sameCommit(before.commit, item.commit);
|
|
714
|
+
let error;
|
|
715
|
+
try {
|
|
716
|
+
await mapCommand(root, item.repo, {
|
|
717
|
+
commit: item.commit,
|
|
718
|
+
maxTokens: limit,
|
|
719
|
+
...resume ? { next: true } : before && !before.done ? { force: true } : {}
|
|
720
|
+
}, io, { runtime: rt, ...deps.git ? { git: deps.git } : {} });
|
|
721
|
+
} catch (e) {
|
|
722
|
+
if (e instanceof CapReached) {
|
|
723
|
+
await save();
|
|
724
|
+
return "cap";
|
|
725
|
+
}
|
|
726
|
+
error = firstLine(e);
|
|
727
|
+
}
|
|
728
|
+
const after = await mapStateOf(root, item.repo);
|
|
729
|
+
const unfinished = !!after && !after.done && sameCommit(after.commit, item.commit);
|
|
730
|
+
if (!error && !unfinished) {
|
|
731
|
+
await verifyStep(item);
|
|
732
|
+
const ps = partState(item, 1);
|
|
733
|
+
return finishPart(item, item.parts[0] ?? { part: 1, total: 1, paths: [], files: 0, tokens: 0 }, ps);
|
|
734
|
+
}
|
|
735
|
+
if (attempt < RETRIES) {
|
|
736
|
+
const wait = (deps.backoffMs ?? 5e3) * 2 ** (attempt - 1);
|
|
737
|
+
io.out(`${item.repo}: the model's read stopped (${error ?? "a prompt got no answer"}); trying what is left again in ${Math.round(wait / 1e3)}s (try ${attempt + 1} of ${RETRIES}).`);
|
|
738
|
+
await clock.sleep(wait);
|
|
739
|
+
} else {
|
|
740
|
+
io.out(`${item.repo}: the model's read failed ${RETRIES} times (${error ?? "a prompt got no answer"}); moving on.`);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
partState(item, 1).state = "failed";
|
|
744
|
+
totals.ends.push({
|
|
745
|
+
repo: item.repo,
|
|
746
|
+
end: "failed",
|
|
747
|
+
command: `atticus map --all --repos ${item.repo}`
|
|
748
|
+
});
|
|
749
|
+
await save();
|
|
750
|
+
return "failed";
|
|
751
|
+
}
|
|
752
|
+
function endOf(item, part, end) {
|
|
753
|
+
return {
|
|
754
|
+
repo: item.repo,
|
|
755
|
+
...item.total > 1 ? { part: part.part, total: item.total } : {},
|
|
756
|
+
end,
|
|
757
|
+
command: `atticus map --all --repos ${item.repo}${o.gaps ? " --gaps" : ""} (or /atticus-map ${item.repo}${o.gaps ? " --gaps" : ""} in a new chat)`
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
async function summary(interrupted2) {
|
|
761
|
+
for (const item of items)
|
|
762
|
+
for (const part of item.kind === "carry" ? [] : item.parts) {
|
|
763
|
+
const s = st.repos[item.repo]?.parts[String(part.part)];
|
|
764
|
+
if (s?.state === "done" || totals.ends.some((e) => e.repo === item.repo && (e.part ?? 1) === part.part))
|
|
765
|
+
continue;
|
|
766
|
+
if (mode === "model" && totals.ends.some((e) => e.repo === item.repo))
|
|
767
|
+
continue;
|
|
768
|
+
totals.ends.push(endOf(item, part, "incomplete"));
|
|
769
|
+
}
|
|
770
|
+
const open = (await listQuestions(root, { state: "open" }).catch(() => ({ questions: [] }))).questions.length;
|
|
771
|
+
const rejected = [...totals.rejected.values()].reduce((n, x) => n + x, 0);
|
|
772
|
+
io.out("");
|
|
773
|
+
io.out(`${interrupted2 ? "So far" : "Done"}: ${plural(totals.repos.size, "repo")} read, ${plural(totals.parts, "part")}${mode === "model" ? ` (${plural(totals.spent.prompts, "prompt")})` : ""}; ${plural(rejected, "fact")} rejected; links +${totals.added} -${totals.removed}; ${plural(open, "question")} open.`);
|
|
774
|
+
const left = totals.ends.filter((e) => e.end !== "done");
|
|
775
|
+
if (left.length) {
|
|
776
|
+
io.out("Not finished:");
|
|
777
|
+
for (const e of left)
|
|
778
|
+
io.out(` ${e.repo}${e.part ? ` part ${e.part} of ${e.total}` : ""}: ${e.end}; ${e.command}`);
|
|
779
|
+
}
|
|
780
|
+
io.out("Next: atticus questions list --mine (answer what the code couldn't settle), then atticus estate fresh.");
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
export {
|
|
784
|
+
MAP_ALL_STATE_REL,
|
|
785
|
+
limitFor,
|
|
786
|
+
mapAllCommand,
|
|
787
|
+
modelModeAllowed,
|
|
788
|
+
planEstate,
|
|
789
|
+
readMapAllState
|
|
790
|
+
};
|