@theokit/sdk 4.37.2 → 4.38.0
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/CHANGELOG.md +72 -72
- package/dist/agent-2GZC4W2A.cjs +51 -0
- package/dist/{agent-IE6IE4NW.cjs.map → agent-2GZC4W2A.cjs.map} +1 -1
- package/dist/agent-3H3UKD6U.js +42 -0
- package/dist/{agent-DW2J37IH.js.map → agent-3H3UKD6U.js.map} +1 -1
- package/dist/{agent-SmxntivO.d.ts → agent-C3AEtM-W.d.ts} +39 -37
- package/dist/{agent-DGv1-d81.d.cts → agent-U3lBX-5t.d.cts} +39 -37
- package/dist/agent.d.ts +1 -1
- package/dist/auth/index.cjs +15 -15
- package/dist/auth/index.js +4 -4
- package/dist/{batch-SY5GZLFD.js → batch-LXSALQC3.js} +9 -9
- package/dist/{batch-SY5GZLFD.js.map → batch-LXSALQC3.js.map} +1 -1
- package/dist/{batch-3SEPDXCU.cjs → batch-NZGN6SFV.cjs} +23 -23
- package/dist/{batch-3SEPDXCU.cjs.map → batch-NZGN6SFV.cjs.map} +1 -1
- package/dist/{chunk-D4ZUJTFB.cjs → chunk-2K7PRHDB.cjs} +8 -8
- package/dist/{chunk-D4ZUJTFB.cjs.map → chunk-2K7PRHDB.cjs.map} +1 -1
- package/dist/chunk-2R6NBT5F.cjs +112 -0
- package/dist/chunk-2R6NBT5F.cjs.map +1 -0
- package/dist/{chunk-2423XDPT.cjs → chunk-3BSP7LSG.cjs} +26 -26
- package/dist/{chunk-2423XDPT.cjs.map → chunk-3BSP7LSG.cjs.map} +1 -1
- package/dist/{chunk-6EDQBX7U.cjs → chunk-3MUIYMUG.cjs} +17 -17
- package/dist/{chunk-6EDQBX7U.cjs.map → chunk-3MUIYMUG.cjs.map} +1 -1
- package/dist/{chunk-P34DHHYQ.cjs → chunk-3VKTDQMX.cjs} +34 -27
- package/dist/chunk-3VKTDQMX.cjs.map +1 -0
- package/dist/{chunk-77WHPVXE.js → chunk-3XKVRLR2.js} +4 -4
- package/dist/chunk-3XKVRLR2.js.map +1 -0
- package/dist/{chunk-SWIBQFPH.cjs → chunk-3XRXORBS.cjs} +4 -4
- package/dist/{chunk-SWIBQFPH.cjs.map → chunk-3XRXORBS.cjs.map} +1 -1
- package/dist/{chunk-DCJ5MCJ3.js → chunk-4APWS2YF.js} +7 -7
- package/dist/{chunk-DCJ5MCJ3.js.map → chunk-4APWS2YF.js.map} +1 -1
- package/dist/{chunk-56ZM6P7Z.cjs → chunk-4MWBKBS4.cjs} +12 -12
- package/dist/chunk-4MWBKBS4.cjs.map +1 -0
- package/dist/chunk-4NVV3GRU.js +110 -0
- package/dist/chunk-4NVV3GRU.js.map +1 -0
- package/dist/{chunk-QGDKZDPN.js → chunk-4WIJSKFA.js} +3 -3
- package/dist/{chunk-QGDKZDPN.js.map → chunk-4WIJSKFA.js.map} +1 -1
- package/dist/{chunk-VNNK6AKU.js → chunk-5BVBNE2F.js} +3 -3
- package/dist/chunk-5BVBNE2F.js.map +1 -0
- package/dist/{chunk-EEZ7CFMM.js → chunk-5KOW3GLE.js} +2 -2
- package/dist/chunk-5KOW3GLE.js.map +1 -0
- package/dist/{chunk-FK4EJD2I.cjs → chunk-6OIO4FYX.cjs} +7 -7
- package/dist/{chunk-FK4EJD2I.cjs.map → chunk-6OIO4FYX.cjs.map} +1 -1
- package/dist/{chunk-IEUDKUPM.cjs → chunk-6OKPJZMX.cjs} +8 -8
- package/dist/{chunk-IEUDKUPM.cjs.map → chunk-6OKPJZMX.cjs.map} +1 -1
- package/dist/{chunk-QFMXXUUT.js → chunk-6XZBKFQ7.js} +3 -3
- package/dist/{chunk-QFMXXUUT.js.map → chunk-6XZBKFQ7.js.map} +1 -1
- package/dist/{chunk-H5YVJB4K.cjs → chunk-6ZGD7R27.cjs} +37 -37
- package/dist/chunk-6ZGD7R27.cjs.map +1 -0
- package/dist/{chunk-HEN5WXXI.js → chunk-7QDTZJRV.js} +6 -6
- package/dist/{chunk-HEN5WXXI.js.map → chunk-7QDTZJRV.js.map} +1 -1
- package/dist/{chunk-MHCKWQR3.cjs → chunk-A3MHE2MQ.cjs} +8 -8
- package/dist/{chunk-MHCKWQR3.cjs.map → chunk-A3MHE2MQ.cjs.map} +1 -1
- package/dist/{chunk-5SB4V74H.js → chunk-A4XXV2C6.js} +18 -18
- package/dist/chunk-A4XXV2C6.js.map +1 -0
- package/dist/{chunk-6VP3XGEK.js → chunk-A6GXYF2Q.js} +9 -9
- package/dist/{chunk-6VP3XGEK.js.map → chunk-A6GXYF2Q.js.map} +1 -1
- package/dist/{chunk-SDIBMLL5.js → chunk-ACHGT3D2.js} +8 -8
- package/dist/{chunk-SDIBMLL5.js.map → chunk-ACHGT3D2.js.map} +1 -1
- package/dist/{chunk-XAEAMI5H.js → chunk-AOZYORH7.js} +4 -4
- package/dist/chunk-AOZYORH7.js.map +1 -0
- package/dist/{chunk-LTCOPATU.cjs → chunk-BE3W4HYV.cjs} +2 -2
- package/dist/chunk-BE3W4HYV.cjs.map +1 -0
- package/dist/{chunk-NQ4AC2U4.cjs → chunk-BT6DFWZB.cjs} +9 -9
- package/dist/{chunk-NQ4AC2U4.cjs.map → chunk-BT6DFWZB.cjs.map} +1 -1
- package/dist/{chunk-XAYVHS2B.cjs → chunk-BUGVDCI5.cjs} +4 -4
- package/dist/{chunk-XAYVHS2B.cjs.map → chunk-BUGVDCI5.cjs.map} +1 -1
- package/dist/{chunk-IT3PWBW4.cjs → chunk-BURYFNOM.cjs} +2 -2
- package/dist/chunk-BURYFNOM.cjs.map +1 -0
- package/dist/{chunk-NNSKJCBM.cjs → chunk-D3SJLXYZ.cjs} +10 -10
- package/dist/{chunk-NNSKJCBM.cjs.map → chunk-D3SJLXYZ.cjs.map} +1 -1
- package/dist/{chunk-MRODLUGY.cjs → chunk-ED7ANP6W.cjs} +4 -4
- package/dist/{chunk-MRODLUGY.cjs.map → chunk-ED7ANP6W.cjs.map} +1 -1
- package/dist/{chunk-MXSMAGDU.js → chunk-EDI7DBWO.js} +33 -26
- package/dist/chunk-EDI7DBWO.js.map +1 -0
- package/dist/{chunk-T4QWDOG6.js → chunk-EE24WJJR.js} +5 -5
- package/dist/{chunk-T4QWDOG6.js.map → chunk-EE24WJJR.js.map} +1 -1
- package/dist/{chunk-ZJN6NTHE.js → chunk-EUB7YLU2.js} +3 -3
- package/dist/{chunk-ZJN6NTHE.js.map → chunk-EUB7YLU2.js.map} +1 -1
- package/dist/{chunk-ALU3KC4G.cjs → chunk-G7X2Y7Y2.cjs} +156 -156
- package/dist/chunk-G7X2Y7Y2.cjs.map +1 -0
- package/dist/{chunk-YCXMSDSP.js → chunk-HHUDNTZC.js} +4 -4
- package/dist/{chunk-YCXMSDSP.js.map → chunk-HHUDNTZC.js.map} +1 -1
- package/dist/{chunk-GL7CFBVC.js → chunk-HI6G3SNY.js} +48 -48
- package/dist/chunk-HI6G3SNY.js.map +1 -0
- package/dist/{chunk-G6AASL5T.cjs → chunk-HLK35TD7.cjs} +24 -24
- package/dist/{chunk-G6AASL5T.cjs.map → chunk-HLK35TD7.cjs.map} +1 -1
- package/dist/{chunk-4YB7B3RP.cjs → chunk-IBDE4R5L.cjs} +13 -13
- package/dist/{chunk-4YB7B3RP.cjs.map → chunk-IBDE4R5L.cjs.map} +1 -1
- package/dist/{chunk-WDGCZDRG.js → chunk-JCXIDFRI.js} +3 -3
- package/dist/{chunk-WDGCZDRG.js.map → chunk-JCXIDFRI.js.map} +1 -1
- package/dist/{chunk-I35DI7ES.js → chunk-JI34KBNC.js} +3 -3
- package/dist/{chunk-I35DI7ES.js.map → chunk-JI34KBNC.js.map} +1 -1
- package/dist/{chunk-TAPQWDW2.js → chunk-KCZW75PI.js} +2 -2
- package/dist/chunk-KCZW75PI.js.map +1 -0
- package/dist/{chunk-U2WLFOA3.cjs → chunk-KL7E244K.cjs} +4 -4
- package/dist/{chunk-U2WLFOA3.cjs.map → chunk-KL7E244K.cjs.map} +1 -1
- package/dist/{chunk-PAEJPLVN.cjs → chunk-KTXOHCAE.cjs} +4 -4
- package/dist/{chunk-PAEJPLVN.cjs.map → chunk-KTXOHCAE.cjs.map} +1 -1
- package/dist/{chunk-2WFB5ZOX.js → chunk-KWXC6ERT.js} +5 -5
- package/dist/{chunk-2WFB5ZOX.js.map → chunk-KWXC6ERT.js.map} +1 -1
- package/dist/{chunk-56OXYUZE.js → chunk-LGCEYEU2.js} +3 -3
- package/dist/chunk-LGCEYEU2.js.map +1 -0
- package/dist/{chunk-FAY3QDGC.cjs → chunk-M4OGSS66.cjs} +11 -11
- package/dist/{chunk-FAY3QDGC.cjs.map → chunk-M4OGSS66.cjs.map} +1 -1
- package/dist/{chunk-F6Y4IEQM.js → chunk-M6UUTNDT.js} +4 -4
- package/dist/{chunk-F6Y4IEQM.js.map → chunk-M6UUTNDT.js.map} +1 -1
- package/dist/{chunk-GM7QDQ24.cjs → chunk-MXRBNJ6D.cjs} +11 -11
- package/dist/{chunk-GM7QDQ24.cjs.map → chunk-MXRBNJ6D.cjs.map} +1 -1
- package/dist/{chunk-YPQF26X7.cjs → chunk-OBA6YK2R.cjs} +2 -2
- package/dist/chunk-OBA6YK2R.cjs.map +1 -0
- package/dist/{chunk-BJMKQOY2.cjs → chunk-OFWU6UKF.cjs} +11 -11
- package/dist/{chunk-BJMKQOY2.cjs.map → chunk-OFWU6UKF.cjs.map} +1 -1
- package/dist/{chunk-3O2ELBST.cjs → chunk-PG3QQLWS.cjs} +5 -5
- package/dist/{chunk-3O2ELBST.cjs.map → chunk-PG3QQLWS.cjs.map} +1 -1
- package/dist/{chunk-2ONFGMBV.js → chunk-PY2RQOA7.js} +2 -2
- package/dist/chunk-PY2RQOA7.js.map +1 -0
- package/dist/{chunk-UQPDFW4E.js → chunk-QFWQLXCL.js} +3 -3
- package/dist/{chunk-UQPDFW4E.js.map → chunk-QFWQLXCL.js.map} +1 -1
- package/dist/{chunk-YBFDBOUN.cjs → chunk-QJQ2MAZF.cjs} +8 -8
- package/dist/{chunk-YBFDBOUN.cjs.map → chunk-QJQ2MAZF.cjs.map} +1 -1
- package/dist/{chunk-QUFSDDNU.cjs → chunk-R4AMI7KD.cjs} +15 -15
- package/dist/{chunk-QUFSDDNU.cjs.map → chunk-R4AMI7KD.cjs.map} +1 -1
- package/dist/{chunk-CSZRJ4RE.js → chunk-SGTMDQ4O.js} +5 -5
- package/dist/{chunk-CSZRJ4RE.js.map → chunk-SGTMDQ4O.js.map} +1 -1
- package/dist/{chunk-3ILFUXNE.cjs → chunk-SRIF7HMN.cjs} +5 -5
- package/dist/{chunk-3ILFUXNE.cjs.map → chunk-SRIF7HMN.cjs.map} +1 -1
- package/dist/{chunk-THEYGCYS.cjs → chunk-TKDWD3MU.cjs} +4 -4
- package/dist/chunk-TKDWD3MU.cjs.map +1 -0
- package/dist/{chunk-ZW345YOI.js → chunk-UD2T7ISG.js} +4 -4
- package/dist/{chunk-ZW345YOI.js.map → chunk-UD2T7ISG.js.map} +1 -1
- package/dist/{chunk-EXQV452X.js → chunk-UWEALKAN.js} +3 -3
- package/dist/{chunk-EXQV452X.js.map → chunk-UWEALKAN.js.map} +1 -1
- package/dist/{chunk-W52DKZBR.cjs → chunk-UZBA6YYP.cjs} +454 -333
- package/dist/chunk-UZBA6YYP.cjs.map +1 -0
- package/dist/{chunk-VYJSHGAY.js → chunk-VUDH4D2M.js} +201 -80
- package/dist/chunk-VUDH4D2M.js.map +1 -0
- package/dist/{chunk-W4QN5CMG.cjs → chunk-VVMLMKYZ.cjs} +9 -9
- package/dist/{chunk-W4QN5CMG.cjs.map → chunk-VVMLMKYZ.cjs.map} +1 -1
- package/dist/{chunk-JNIWFCKI.js → chunk-VYD6BGKK.js} +3 -3
- package/dist/{chunk-JNIWFCKI.js.map → chunk-VYD6BGKK.js.map} +1 -1
- package/dist/{chunk-YHZXBDAW.js → chunk-XJ5TMOGA.js} +16 -16
- package/dist/{chunk-YHZXBDAW.js.map → chunk-XJ5TMOGA.js.map} +1 -1
- package/dist/{chunk-7DXLNNKH.cjs → chunk-XKBJT7WI.cjs} +4 -4
- package/dist/{chunk-7DXLNNKH.cjs.map → chunk-XKBJT7WI.cjs.map} +1 -1
- package/dist/{chunk-YDLNI7J6.js → chunk-XS7SKY2F.js} +3 -3
- package/dist/{chunk-YDLNI7J6.js.map → chunk-XS7SKY2F.js.map} +1 -1
- package/dist/{chunk-NFCKEBHI.js → chunk-YCHC45BY.js} +3 -3
- package/dist/{chunk-NFCKEBHI.js.map → chunk-YCHC45BY.js.map} +1 -1
- package/dist/{chunk-ICYBIC6N.cjs → chunk-YVI4YPUP.cjs} +4 -4
- package/dist/chunk-YVI4YPUP.cjs.map +1 -0
- package/dist/{chunk-TQI3KRXZ.cjs → chunk-ZET34IZE.cjs} +18 -18
- package/dist/{chunk-TQI3KRXZ.cjs.map → chunk-ZET34IZE.cjs.map} +1 -1
- package/dist/{chunk-GLUWH6JO.js → chunk-ZFZYPLQI.js} +4 -4
- package/dist/{chunk-GLUWH6JO.js.map → chunk-ZFZYPLQI.js.map} +1 -1
- package/dist/{chunk-M5ZQBOIZ.js → chunk-ZK3BJ4XQ.js} +3 -3
- package/dist/{chunk-M5ZQBOIZ.js.map → chunk-ZK3BJ4XQ.js.map} +1 -1
- package/dist/{chunk-CD73YHEH.js → chunk-ZYOHF37V.js} +3 -3
- package/dist/{chunk-CD73YHEH.js.map → chunk-ZYOHF37V.js.map} +1 -1
- package/dist/compact-session-RR3ILTES.js +17 -0
- package/dist/{compact-session-WNKKIIDW.js.map → compact-session-RR3ILTES.js.map} +1 -1
- package/dist/compact-session-YOWJJPPB.cjs +54 -0
- package/dist/{compact-session-H5TKLD55.cjs.map → compact-session-YOWJJPPB.cjs.map} +1 -1
- package/dist/compaction.cjs +19 -19
- package/dist/compaction.d.cts +9 -9
- package/dist/compaction.d.ts +9 -9
- package/dist/compaction.js +3 -3
- package/dist/concurrency.cjs +6 -6
- package/dist/concurrency.js +4 -4
- package/dist/context-Q6ISOCN2.cjs +22 -0
- package/dist/{context-ZV33V4DC.cjs.map → context-Q6ISOCN2.cjs.map} +1 -1
- package/dist/context-ZDBBPIHY.js +5 -0
- package/dist/{context-VAYLPT4O.js.map → context-ZDBBPIHY.js.map} +1 -1
- package/dist/{cron-BiK_aNJI.d.cts → cron-BdXOZco9.d.cts} +2 -2
- package/dist/{cron-Dx7B-3WB.d.ts → cron-ChQ6zcW2.d.ts} +2 -2
- package/dist/cron.cjs +29 -29
- package/dist/cron.d.cts +3 -3
- package/dist/cron.d.ts +3 -3
- package/dist/cron.js +28 -28
- package/dist/{errors-DyVbXdR4.d.cts → errors-BUVjJGJA.d.cts} +1 -1
- package/dist/{errors-Cua4WC9H.d.ts → errors-CZIUKLHt.d.ts} +1 -1
- package/dist/errors.cjs +21 -21
- package/dist/errors.d.cts +2 -2
- package/dist/errors.d.ts +2 -2
- package/dist/errors.js +2 -2
- package/dist/eval.cjs +32 -32
- package/dist/eval.js +28 -28
- package/dist/{executor-PAH72CB5.js → executor-ASDDIM2X.js} +7 -7
- package/dist/{executor-PAH72CB5.js.map → executor-ASDDIM2X.js.map} +1 -1
- package/dist/{executor-OZSYXDKF.cjs → executor-DPCBSI35.cjs} +23 -23
- package/dist/{executor-OZSYXDKF.cjs.map → executor-DPCBSI35.cjs.map} +1 -1
- package/dist/filesystem/index.cjs +7 -7
- package/dist/filesystem/index.js +3 -3
- package/dist/fs-session-store-K5QUPNJZ.js +10 -0
- package/dist/{fs-session-store-6MY7PNI2.js.map → fs-session-store-K5QUPNJZ.js.map} +1 -1
- package/dist/fs-session-store-T5ZLQX42.cjs +19 -0
- package/dist/{fs-session-store-7E7UPLF2.cjs.map → fs-session-store-T5ZLQX42.cjs.map} +1 -1
- package/dist/generate-object-F56VIZ6U.cjs +20 -0
- package/dist/{generate-object-5SCEH2EE.cjs.map → generate-object-F56VIZ6U.cjs.map} +1 -1
- package/dist/generate-object-LPSO6GVW.js +7 -0
- package/dist/{generate-object-I7UD4NWN.js.map → generate-object-LPSO6GVW.js.map} +1 -1
- package/dist/index-manager-DBJ55ZSO.cjs +19 -0
- package/dist/{index-manager-R6ZJFEZF.cjs.map → index-manager-DBJ55ZSO.cjs.map} +1 -1
- package/dist/index-manager-F2H2RCZU.js +10 -0
- package/dist/{index-manager-KKAK7NT3.js.map → index-manager-F2H2RCZU.js.map} +1 -1
- package/dist/index.cjs +140 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -42
- package/dist/index.d.ts +42 -42
- package/dist/index.js +54 -54
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-DM4SKTZO.cjs → inject-session-25EC74WV.cjs} +10 -10
- package/dist/{inject-session-DM4SKTZO.cjs.map → inject-session-25EC74WV.cjs.map} +1 -1
- package/dist/{inject-session-UXNJQTZ6.js → inject-session-RKNLUE72.js} +7 -7
- package/dist/{inject-session-UXNJQTZ6.js.map → inject-session-RKNLUE72.js.map} +1 -1
- package/dist/internal/agent-loop/live-events.d.ts +46 -0
- package/dist/internal/budget/compute-cost.d.ts +1 -1
- package/dist/internal/diagnostics.d.ts +31 -29
- package/dist/internal/error-mappers/anthropic.d.ts +1 -1
- package/dist/internal/global-singleton.d.ts +7 -7
- package/dist/internal/judge/judge-call.d.ts +14 -14
- package/dist/internal/llm/retrying-client.d.ts +29 -29
- package/dist/internal/llm/transport-error.d.ts +2 -2
- package/dist/internal/persistence/exclusive-create.d.cts +2 -2
- package/dist/internal/persistence/exclusive-create.d.ts +2 -2
- package/dist/internal/persistence/fs-session-store.d.cts +18 -18
- package/dist/internal/persistence/fs-session-store.d.ts +18 -18
- package/dist/internal/persistence/index.cjs +25 -25
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +6 -6
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/persistence/paths.d.cts +7 -7
- package/dist/internal/persistence/paths.d.ts +7 -7
- package/dist/internal/persistence/session-transcript.d.cts +7 -7
- package/dist/internal/persistence/session-transcript.d.ts +7 -7
- package/dist/internal/persistence/session-writer.d.cts +30 -13
- package/dist/internal/persistence/session-writer.d.ts +30 -13
- package/dist/internal/runtime/fixtures/fixture-run-base.d.ts +45 -13
- package/dist/internal/runtime/lifecycle/goal-marker.d.ts +8 -8
- package/dist/internal/security/index.cjs +13 -13
- package/dist/internal/security/index.js +3 -3
- package/dist/internal/session/agent-session.d.ts +14 -14
- package/dist/internal/session/session-cache.d.ts +9 -9
- package/dist/judge-call-3S3T6O2Z.js +5 -0
- package/dist/{judge-call-TAEIXMYG.js.map → judge-call-3S3T6O2Z.js.map} +1 -1
- package/dist/judge-call-XIQJ5GIE.cjs +22 -0
- package/dist/{judge-call-SP3G3X2Y.cjs.map → judge-call-XIQJ5GIE.cjs.map} +1 -1
- package/dist/models.cjs +20 -20
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +5 -5
- package/dist/models.js.map +1 -1
- package/dist/path-safety.cjs +10 -10
- package/dist/path-safety.js +3 -3
- package/dist/persistence.cjs +34 -34
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.d.cts +1 -1
- package/dist/persistence.d.ts +1 -1
- package/dist/persistence.js +14 -14
- package/dist/persistence.js.map +1 -1
- package/dist/project.cjs +5 -5
- package/dist/project.js +3 -3
- package/dist/registry-BA3SLAN7.cjs +46 -0
- package/dist/{registry-N3GTKYCI.cjs.map → registry-BA3SLAN7.cjs.map} +1 -1
- package/dist/registry-KMI5RA22.js +9 -0
- package/dist/{registry-SOXE4RY6.js.map → registry-KMI5RA22.js.map} +1 -1
- package/dist/retry.cjs +4 -4
- package/dist/retry.js +3 -3
- package/dist/{run-until-YZ2ODWOF.js → run-until-BK56WG4P.js} +3 -3
- package/dist/{run-until-YZ2ODWOF.js.map → run-until-BK56WG4P.js.map} +1 -1
- package/dist/{run-until-ZZ2JLPJM.cjs → run-until-L5KQD3PV.cjs} +4 -4
- package/dist/{run-until-ZZ2JLPJM.cjs.map → run-until-L5KQD3PV.cjs.map} +1 -1
- package/dist/{run-CwEJtLPE.d.ts → run-vJHg2eGw.d.cts} +201 -174
- package/dist/{run-CwEJtLPE.d.cts → run-vJHg2eGw.d.ts} +201 -174
- package/dist/sandbox/bwrap.d.cts +20 -20
- package/dist/sandbox/bwrap.d.ts +20 -20
- package/dist/sandbox/index.cjs +39 -39
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +35 -35
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/linux-sandbox.d.cts +26 -21
- package/dist/sandbox/linux-sandbox.d.ts +26 -21
- package/dist/server/auth/index.cjs.map +1 -1
- package/dist/server/auth/index.d.cts +6 -6
- package/dist/server/auth/index.d.ts +6 -6
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/auth/orchestrator.d.cts +2 -2
- package/dist/server/auth/orchestrator.d.ts +2 -2
- package/dist/server/auth/types.d.cts +4 -4
- package/dist/server/auth/types.d.ts +4 -4
- package/dist/server/errors-envelope.cjs +14 -14
- package/dist/server/errors-envelope.d.cts +3 -3
- package/dist/server/errors-envelope.d.ts +3 -3
- package/dist/server/errors-envelope.js +3 -3
- package/dist/session-transcript-DFGX6WNL.cjs +50 -0
- package/dist/{session-transcript-EAKR4D2W.cjs.map → session-transcript-DFGX6WNL.cjs.map} +1 -1
- package/dist/session-transcript-MMPWCESR.js +5 -0
- package/dist/{session-transcript-6WKLYIN4.js.map → session-transcript-MMPWCESR.js.map} +1 -1
- package/dist/skills.cjs +7 -7
- package/dist/skills.js +5 -5
- package/dist/stream-object-AFERZU63.js +7 -0
- package/dist/{stream-object-OFM66VUT.js.map → stream-object-AFERZU63.js.map} +1 -1
- package/dist/stream-object-YPXZ4F5P.cjs +20 -0
- package/dist/{stream-object-Y7YCX3BI.cjs.map → stream-object-YPXZ4F5P.cjs.map} +1 -1
- package/dist/subagents-loader.cjs +6 -6
- package/dist/subagents-loader.d.cts +2 -2
- package/dist/subagents-loader.d.ts +2 -2
- package/dist/subagents-loader.js +4 -4
- package/dist/subscription/index.cjs +3 -3
- package/dist/subscription/index.js +2 -2
- package/dist/task-store.cjs +7 -7
- package/dist/task-store.js +4 -4
- package/dist/types/agent-prims.d.ts +4 -4
- package/dist/types/goal-events.d.ts +24 -23
- package/dist/types/run.d.ts +27 -0
- package/dist/types/session-record.d.ts +14 -13
- package/dist/workflow.cjs +27 -27
- package/dist/workflow.js +6 -6
- package/package.json +12 -13
- package/dist/agent-DW2J37IH.js +0 -42
- package/dist/agent-IE6IE4NW.cjs +0 -51
- package/dist/chunk-2ONFGMBV.js.map +0 -1
- package/dist/chunk-56OXYUZE.js.map +0 -1
- package/dist/chunk-56ZM6P7Z.cjs.map +0 -1
- package/dist/chunk-5SB4V74H.js.map +0 -1
- package/dist/chunk-77WHPVXE.js.map +0 -1
- package/dist/chunk-ALU3KC4G.cjs.map +0 -1
- package/dist/chunk-EEZ7CFMM.js.map +0 -1
- package/dist/chunk-GL7CFBVC.js.map +0 -1
- package/dist/chunk-H5YVJB4K.cjs.map +0 -1
- package/dist/chunk-ICYBIC6N.cjs.map +0 -1
- package/dist/chunk-IT3PWBW4.cjs.map +0 -1
- package/dist/chunk-ITLS5LRF.cjs +0 -105
- package/dist/chunk-ITLS5LRF.cjs.map +0 -1
- package/dist/chunk-LTCOPATU.cjs.map +0 -1
- package/dist/chunk-MXSMAGDU.js.map +0 -1
- package/dist/chunk-P34DHHYQ.cjs.map +0 -1
- package/dist/chunk-TAPQWDW2.js.map +0 -1
- package/dist/chunk-THEYGCYS.cjs.map +0 -1
- package/dist/chunk-VNNK6AKU.js.map +0 -1
- package/dist/chunk-VYJSHGAY.js.map +0 -1
- package/dist/chunk-W52DKZBR.cjs.map +0 -1
- package/dist/chunk-XAEAMI5H.js.map +0 -1
- package/dist/chunk-YPQF26X7.cjs.map +0 -1
- package/dist/chunk-YVTNFKZO.js +0 -103
- package/dist/chunk-YVTNFKZO.js.map +0 -1
- package/dist/compact-session-H5TKLD55.cjs +0 -54
- package/dist/compact-session-WNKKIIDW.js +0 -17
- package/dist/context-VAYLPT4O.js +0 -5
- package/dist/context-ZV33V4DC.cjs +0 -22
- package/dist/fs-session-store-6MY7PNI2.js +0 -10
- package/dist/fs-session-store-7E7UPLF2.cjs +0 -19
- package/dist/generate-object-5SCEH2EE.cjs +0 -20
- package/dist/generate-object-I7UD4NWN.js +0 -7
- package/dist/index-manager-KKAK7NT3.js +0 -10
- package/dist/index-manager-R6ZJFEZF.cjs +0 -19
- package/dist/judge-call-SP3G3X2Y.cjs +0 -22
- package/dist/judge-call-TAEIXMYG.js +0 -5
- package/dist/registry-N3GTKYCI.cjs +0 -46
- package/dist/registry-SOXE4RY6.js +0 -9
- package/dist/session-transcript-6WKLYIN4.js +0 -5
- package/dist/session-transcript-EAKR4D2W.cjs +0 -50
- package/dist/stream-object-OFM66VUT.js +0 -7
- package/dist/stream-object-Y7YCX3BI.cjs +0 -20
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkPNVDQL5Y_cjs = require('../../chunk-PNVDQL5Y.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
var chunk2K7PRHDB_cjs = require('../../chunk-2K7PRHDB.cjs');
|
|
5
|
+
var chunkZET34IZE_cjs = require('../../chunk-ZET34IZE.cjs');
|
|
6
|
+
var chunk6OIO4FYX_cjs = require('../../chunk-6OIO4FYX.cjs');
|
|
7
7
|
var chunkYLQQX5W2_cjs = require('../../chunk-YLQQX5W2.cjs');
|
|
8
|
-
var
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
8
|
+
var chunkYVI4YPUP_cjs = require('../../chunk-YVI4YPUP.cjs');
|
|
9
|
+
require('../../chunk-A3MHE2MQ.cjs');
|
|
10
|
+
require('../../chunk-BE3W4HYV.cjs');
|
|
11
11
|
var promises = require('fs/promises');
|
|
12
12
|
|
|
13
13
|
async function createExclusive(path, data, options) {
|
|
@@ -41,67 +41,67 @@ Object.defineProperty(exports, "PersistenceSchema", {
|
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "displayTheokitHome", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk2K7PRHDB_cjs.displayTheokitHome; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "getProfilesRoot", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk2K7PRHDB_cjs.getProfilesRoot; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "getTheokitHome", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk2K7PRHDB_cjs.getTheokitHome; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "migrateSchema", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunk2K7PRHDB_cjs.migrateSchema; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "readVersionedJson", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunk2K7PRHDB_cjs.readVersionedJson; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "writeVersionedJson", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunk2K7PRHDB_cjs.writeVersionedJson; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "JsonlParseError", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkZET34IZE_cjs.JsonlParseError; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "appendJsonl", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkZET34IZE_cjs.appendJsonl; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "loadJsonl", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkZET34IZE_cjs.loadJsonl; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "readJsonlIds", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkZET34IZE_cjs.readJsonlIds; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "withFileLock", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkZET34IZE_cjs.withFileLock; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "applyWalWithFallback", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunk6OIO4FYX_cjs.applyWalWithFallback; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "containsCjk", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunk6OIO4FYX_cjs.containsCjk; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "isCorruptionError", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunk6OIO4FYX_cjs.isCorruptionError; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "openSqliteResilient", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunk6OIO4FYX_cjs.openSqliteResilient; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "sanitizeFts5Query", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunk6OIO4FYX_cjs.sanitizeFts5Query; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "withCwdMutex", {
|
|
107
107
|
enumerable: true,
|
|
@@ -109,15 +109,15 @@ Object.defineProperty(exports, "withCwdMutex", {
|
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "atomicWriteJson", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkYVI4YPUP_cjs.atomicWriteJson; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "atomicWriteText", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkYVI4YPUP_cjs.atomicWriteText; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "replaceFileAtomic", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkYVI4YPUP_cjs.replaceFileAtomic; }
|
|
121
121
|
});
|
|
122
122
|
exports.casUpdate = casUpdate;
|
|
123
123
|
exports.createExclusive = createExclusive;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":";;;;;;;;;;;;AAgCA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAMA,aAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACjBO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.cjs","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":";;;;;;;;;;;;AAgCA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAMA,aAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACjBO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.cjs","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Atomically create `path` with `data`. Returns true iff this call\n * created the file (race-free under POSIX-compliant filesystems).\n *\n * @internal\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * @internal\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Execute a CAS UPDATE. Returns true iff the actual changes count matches\n * `expectedChanges`. SQL errors (invalid syntax, closed db) propagate.\n *\n * @internal\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { PersistenceSchema } from '../../chunk-CAH3G4IS.js';
|
|
2
|
-
export { displayTheokitHome, getProfilesRoot, getTheokitHome, migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-
|
|
3
|
-
export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-
|
|
4
|
-
export { applyWalWithFallback, containsCjk, isCorruptionError, openSqliteResilient, sanitizeFts5Query } from '../../chunk-
|
|
2
|
+
export { displayTheokitHome, getProfilesRoot, getTheokitHome, migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-UD2T7ISG.js';
|
|
3
|
+
export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-XJ5TMOGA.js';
|
|
4
|
+
export { applyWalWithFallback, containsCjk, isCorruptionError, openSqliteResilient, sanitizeFts5Query } from '../../chunk-ZFZYPLQI.js';
|
|
5
5
|
export { withCwdMutex } from '../../chunk-2XLKLVVR.js';
|
|
6
|
-
export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
6
|
+
export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-LGCEYEU2.js';
|
|
7
|
+
import '../../chunk-ZYOHF37V.js';
|
|
8
|
+
import '../../chunk-KCZW75PI.js';
|
|
9
9
|
import { open } from 'fs/promises';
|
|
10
10
|
|
|
11
11
|
async function createExclusive(path, data, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":";;;;;;;;;;AAgCA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACjBO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.js","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":";;;;;;;;;;AAgCA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACjBO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.js","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Atomically create `path` with `data`. Returns true iff this call\n * created the file (race-free under POSIX-compliant filesystems).\n *\n * @internal\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * @internal\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Execute a CAS UPDATE. Returns true iff the actual changes count matches\n * `expectedChanges`. SQL errors (invalid syntax, closed db) propagate.\n *\n * @internal\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* `path.join(cwd, ".theokit")` in callers — use this function so tests
|
|
11
11
|
* and overrides stay consistent.
|
|
12
12
|
*
|
|
13
|
-
* M94 —
|
|
14
|
-
* transcript
|
|
15
|
-
*
|
|
16
|
-
* transcript
|
|
13
|
+
* M94 — this comment said "the ONLY canonical resolver", and stopped being true: the
|
|
14
|
+
* transcript gained `transcriptRoot()`, which is **home-anchored** (`~/.theokit`) with the same
|
|
15
|
+
* `THEOKIT_HOME` override. The two defaults differ on purpose — unifying would move the
|
|
16
|
+
* transcript of everyone who does NOT set the variable, which is a data migration and not a
|
|
17
17
|
* re-export.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* — registry
|
|
21
|
-
*
|
|
19
|
+
* A consequence worth writing down: **without `THEOKIT_HOME` the state stays split in two**
|
|
20
|
+
* — registry in `<cwd>/.theokit`, transcript in `~/.theokit`. M94 unifies only for those who set
|
|
21
|
+
* the variable. Unifying both defaults is another milestone's work.
|
|
22
22
|
* - `getProfilesRoot()` is intentionally home-anchored (not affected by
|
|
23
23
|
* `THEOKIT_HOME`) so `theokit profile list` discovers all profiles
|
|
24
24
|
* regardless of which is active.
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* `path.join(cwd, ".theokit")` in callers — use this function so tests
|
|
11
11
|
* and overrides stay consistent.
|
|
12
12
|
*
|
|
13
|
-
* M94 —
|
|
14
|
-
* transcript
|
|
15
|
-
*
|
|
16
|
-
* transcript
|
|
13
|
+
* M94 — this comment said "the ONLY canonical resolver", and stopped being true: the
|
|
14
|
+
* transcript gained `transcriptRoot()`, which is **home-anchored** (`~/.theokit`) with the same
|
|
15
|
+
* `THEOKIT_HOME` override. The two defaults differ on purpose — unifying would move the
|
|
16
|
+
* transcript of everyone who does NOT set the variable, which is a data migration and not a
|
|
17
17
|
* re-export.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* — registry
|
|
21
|
-
*
|
|
19
|
+
* A consequence worth writing down: **without `THEOKIT_HOME` the state stays split in two**
|
|
20
|
+
* — registry in `<cwd>/.theokit`, transcript in `~/.theokit`. M94 unifies only for those who set
|
|
21
|
+
* the variable. Unifying both defaults is another milestone's work.
|
|
22
22
|
* - `getProfilesRoot()` is intentionally home-anchored (not affected by
|
|
23
23
|
* `THEOKIT_HOME`) so `theokit profile list` discovers all profiles
|
|
24
24
|
* regardless of which is active.
|
|
@@ -57,16 +57,16 @@ export declare function reconstructMessages(records: readonly SessionRecord[]):
|
|
|
57
57
|
/**
|
|
58
58
|
* Raiz do estado de transcript.
|
|
59
59
|
*
|
|
60
|
-
* `THEOKIT_HOME`
|
|
61
|
-
* `getTheokitHome(cwd)
|
|
62
|
-
*
|
|
63
|
-
*
|
|
60
|
+
* `THEOKIT_HOME` wins; the fallback is `~/.theokit`. Home-anchored on purpose, and NOT
|
|
61
|
+
* `paths.ts`'s `getTheokitHome(cwd)`: that one falls back to `<cwd>/.theokit`, and switching
|
|
62
|
+
* by it would move the transcript of everyone who does **not** set the variable. The sibling with the
|
|
63
|
+
* right shape is `catalog-source-models-dev.ts` (M94 ADR-2).
|
|
64
64
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
65
|
+
* Before M94 this function ignored the env var, so whoever set it had their state split in
|
|
66
|
+
* two silently — sessions stayed in `~/.theokit` while the rest of the SDK migrated.
|
|
67
67
|
*/
|
|
68
68
|
export declare function transcriptRoot(): string;
|
|
69
|
-
/** @deprecated Use {@link transcriptRoot}.
|
|
69
|
+
/** @deprecated Use {@link transcriptRoot}. Kept as an alias — same value. */
|
|
70
70
|
export declare function defaultBaseDir(): string;
|
|
71
71
|
/**
|
|
72
72
|
* Expand a leading `~` / `~/` to the user's home dir. `node:path` does NOT expand `~`, so a
|
|
@@ -57,16 +57,16 @@ export declare function reconstructMessages(records: readonly SessionRecord[]):
|
|
|
57
57
|
/**
|
|
58
58
|
* Raiz do estado de transcript.
|
|
59
59
|
*
|
|
60
|
-
* `THEOKIT_HOME`
|
|
61
|
-
* `getTheokitHome(cwd)
|
|
62
|
-
*
|
|
63
|
-
*
|
|
60
|
+
* `THEOKIT_HOME` wins; the fallback is `~/.theokit`. Home-anchored on purpose, and NOT
|
|
61
|
+
* `paths.ts`'s `getTheokitHome(cwd)`: that one falls back to `<cwd>/.theokit`, and switching
|
|
62
|
+
* by it would move the transcript of everyone who does **not** set the variable. The sibling with the
|
|
63
|
+
* right shape is `catalog-source-models-dev.ts` (M94 ADR-2).
|
|
64
64
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
65
|
+
* Before M94 this function ignored the env var, so whoever set it had their state split in
|
|
66
|
+
* two silently — sessions stayed in `~/.theokit` while the rest of the SDK migrated.
|
|
67
67
|
*/
|
|
68
68
|
export declare function transcriptRoot(): string;
|
|
69
|
-
/** @deprecated Use {@link transcriptRoot}.
|
|
69
|
+
/** @deprecated Use {@link transcriptRoot}. Kept as an alias — same value. */
|
|
70
70
|
export declare function defaultBaseDir(): string;
|
|
71
71
|
/**
|
|
72
72
|
* Expand a leading `~` / `~/` to the user's home dir. `node:path` does NOT expand `~`, so a
|
|
@@ -45,6 +45,17 @@ export declare class SessionBusyError extends TheokitAgentError {
|
|
|
45
45
|
export interface SessionWriterLease {
|
|
46
46
|
readonly sessionPath: string;
|
|
47
47
|
release(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Re-stamp the ownership record, so a **live** owner never crosses the staleness window.
|
|
50
|
+
*
|
|
51
|
+
* Idempotent and cheap: one `write` of a ~80-byte JSON. Call it on the path that already writes to
|
|
52
|
+
* the session — appending a turn — and the cross-host window stops being a lie about liveness.
|
|
53
|
+
*
|
|
54
|
+
* A no-op after `release()`: renewing a lease you no longer hold would re-create the lock file and
|
|
55
|
+
* hand this process ownership it gave up. That is the one direction of this API that could
|
|
56
|
+
* *create* the double-writer it exists to prevent.
|
|
57
|
+
*/
|
|
58
|
+
renew(): void;
|
|
48
59
|
}
|
|
49
60
|
/**
|
|
50
61
|
* Take the exclusive writer lease for `sessionPath`, or reject with {@link SessionBusyError}.
|
|
@@ -54,21 +65,27 @@ export interface SessionWriterLease {
|
|
|
54
65
|
* processes, not just across async tasks in one process.
|
|
55
66
|
*/
|
|
56
67
|
/**
|
|
57
|
-
*
|
|
68
|
+
* Staleness window **between machines** — and only between them.
|
|
58
69
|
*
|
|
59
|
-
* 30 s
|
|
60
|
-
*
|
|
61
|
-
* "
|
|
62
|
-
*
|
|
70
|
+
* 30 s from ACQUISITION. Calling it a "heartbeat" would be a lie: the record is written once, when
|
|
71
|
+
* the lease is taken, and is **not** renewed on every write. An earlier version of this comment
|
|
72
|
+
* claimed "the owner touches the file on every acquisition, so a live process never crosses the
|
|
73
|
+
* window" — false twice over, and adversarial review measured both.
|
|
63
74
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
75
|
+
* On the **same host** this does not matter: `reclaimable` decides by `pid`, which is exact, and age
|
|
76
|
+
* never enters the calculation. Across hosts it does matter, and it is a real limit: a **live**
|
|
77
|
+
* remote owner loses the lease after 30 s, because there is no way to ask another machine whether
|
|
78
|
+
* its process still exists.
|
|
67
79
|
*
|
|
68
|
-
* **
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
80
|
+
* **The residue is now closable by the caller** (`agent-builder#118`). `SessionWriterLease.renew()`
|
|
81
|
+
* re-stamps the record; calling it on the path that already writes to the session — appending a turn
|
|
82
|
+
* — keeps a live owner from ever crossing the window. It costs one `write` of ~80 bytes on a file
|
|
83
|
+
* that was previously written once per session.
|
|
84
|
+
*
|
|
85
|
+
* It is `renew()` and not an internal timer on purpose. A timer inside the lease would keep the event
|
|
86
|
+
* loop alive (or need `unref` plus its own teardown), and it would renew a lease belonging to a
|
|
87
|
+
* process that is hung rather than working — which is precisely the state the window exists to
|
|
88
|
+
* detect. Tying the renewal to a real write means the record tracks **progress**, not mere existence.
|
|
72
89
|
*/
|
|
73
|
-
export declare const
|
|
90
|
+
export declare const HEARTBEAT_WINDOW_MS = 30000;
|
|
74
91
|
export declare function acquireSessionWriter(sessionPath: string): Promise<SessionWriterLease>;
|
|
@@ -45,6 +45,17 @@ export declare class SessionBusyError extends TheokitAgentError {
|
|
|
45
45
|
export interface SessionWriterLease {
|
|
46
46
|
readonly sessionPath: string;
|
|
47
47
|
release(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Re-stamp the ownership record, so a **live** owner never crosses the staleness window.
|
|
50
|
+
*
|
|
51
|
+
* Idempotent and cheap: one `write` of a ~80-byte JSON. Call it on the path that already writes to
|
|
52
|
+
* the session — appending a turn — and the cross-host window stops being a lie about liveness.
|
|
53
|
+
*
|
|
54
|
+
* A no-op after `release()`: renewing a lease you no longer hold would re-create the lock file and
|
|
55
|
+
* hand this process ownership it gave up. That is the one direction of this API that could
|
|
56
|
+
* *create* the double-writer it exists to prevent.
|
|
57
|
+
*/
|
|
58
|
+
renew(): void;
|
|
48
59
|
}
|
|
49
60
|
/**
|
|
50
61
|
* Take the exclusive writer lease for `sessionPath`, or reject with {@link SessionBusyError}.
|
|
@@ -54,21 +65,27 @@ export interface SessionWriterLease {
|
|
|
54
65
|
* processes, not just across async tasks in one process.
|
|
55
66
|
*/
|
|
56
67
|
/**
|
|
57
|
-
*
|
|
68
|
+
* Staleness window **between machines** — and only between them.
|
|
58
69
|
*
|
|
59
|
-
* 30 s
|
|
60
|
-
*
|
|
61
|
-
* "
|
|
62
|
-
*
|
|
70
|
+
* 30 s from ACQUISITION. Calling it a "heartbeat" would be a lie: the record is written once, when
|
|
71
|
+
* the lease is taken, and is **not** renewed on every write. An earlier version of this comment
|
|
72
|
+
* claimed "the owner touches the file on every acquisition, so a live process never crosses the
|
|
73
|
+
* window" — false twice over, and adversarial review measured both.
|
|
63
74
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
75
|
+
* On the **same host** this does not matter: `reclaimable` decides by `pid`, which is exact, and age
|
|
76
|
+
* never enters the calculation. Across hosts it does matter, and it is a real limit: a **live**
|
|
77
|
+
* remote owner loses the lease after 30 s, because there is no way to ask another machine whether
|
|
78
|
+
* its process still exists.
|
|
67
79
|
*
|
|
68
|
-
* **
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
80
|
+
* **The residue is now closable by the caller** (`agent-builder#118`). `SessionWriterLease.renew()`
|
|
81
|
+
* re-stamps the record; calling it on the path that already writes to the session — appending a turn
|
|
82
|
+
* — keeps a live owner from ever crossing the window. It costs one `write` of ~80 bytes on a file
|
|
83
|
+
* that was previously written once per session.
|
|
84
|
+
*
|
|
85
|
+
* It is `renew()` and not an internal timer on purpose. A timer inside the lease would keep the event
|
|
86
|
+
* loop alive (or need `unref` plus its own teardown), and it would renew a lease belonging to a
|
|
87
|
+
* process that is hung rather than working — which is precisely the state the window exists to
|
|
88
|
+
* detect. Tying the renewal to a real write means the record tracks **progress**, not mere existence.
|
|
72
89
|
*/
|
|
73
|
-
export declare const
|
|
90
|
+
export declare const HEARTBEAT_WINDOW_MS = 30000;
|
|
74
91
|
export declare function acquireSessionWriter(sessionPath: string): Promise<SessionWriterLease>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ModelSelection } from "../../../types/agent.js";
|
|
2
2
|
import type { ConversationTurn } from "../../../types/conversation.js";
|
|
3
3
|
import type { SDKMessage } from "../../../types/messages.js";
|
|
4
|
-
import type { Run, RunOperation, RunResult, RunStatus } from "../../../types/run.js";
|
|
4
|
+
import type { Run, RunOperation, RunResult, RunStatus, RunTimelineEvent } from "../../../types/run.js";
|
|
5
5
|
import type { FixtureScript } from "./fixture-types.js";
|
|
6
6
|
export declare abstract class FixtureRunBase implements Run {
|
|
7
7
|
readonly id: string;
|
|
@@ -19,6 +19,16 @@ export declare abstract class FixtureRunBase implements Run {
|
|
|
19
19
|
protected resolveTermination: (value: RunResult) => void;
|
|
20
20
|
protected terminated: boolean;
|
|
21
21
|
private eventNotifier;
|
|
22
|
+
/**
|
|
23
|
+
* theokit#140 - the run's single ordered timeline: structural events and live token/tool deltas,
|
|
24
|
+
* in the order they actually occurred.
|
|
25
|
+
*
|
|
26
|
+
* Kept alongside `script.events` rather than replacing it. `stream()` is the SDKMessage view and
|
|
27
|
+
* stays byte-identical for every existing consumer; this is the complete view, and a consumer
|
|
28
|
+
* picks one. Merging them would have changed `stream()`'s element type - a breaking change for
|
|
29
|
+
* an additive feature.
|
|
30
|
+
*/
|
|
31
|
+
protected readonly timeline: RunTimelineEvent[];
|
|
22
32
|
constructor(options: FixtureRunBaseOptions);
|
|
23
33
|
abstract bootstrap(): void;
|
|
24
34
|
/**
|
|
@@ -27,24 +37,46 @@ export declare abstract class FixtureRunBase implements Run {
|
|
|
27
37
|
* consumers of `stream()` wake up and yield it.
|
|
28
38
|
*/
|
|
29
39
|
protected notifyNewEvents(): void;
|
|
40
|
+
/**
|
|
41
|
+
* theokit#140 - every event of this run, in true order, from ONE source.
|
|
42
|
+
*
|
|
43
|
+
* ## The defect this replaces
|
|
44
|
+
*
|
|
45
|
+
* A consumer that needed tool calls interleaved with tokens had to fuse two surfaces by hand:
|
|
46
|
+
* `stream()`, which was batched and post-completion, and `SendOptions.onDelta`, which was live.
|
|
47
|
+
* Neither was complete alone - `onDelta` has no `run_started`/`system`, and `stream()` had no
|
|
48
|
+
* token granularity - so the entire reconciliation, including its dedup, lived in the consumer.
|
|
49
|
+
* `@theokit/agents` carried ~200 lines of exactly that, and it is the documented root of its
|
|
50
|
+
* ordering bug (theokit#47), its namespace-dedup bug (#138) and its missing terminal frame (#142).
|
|
51
|
+
*
|
|
52
|
+
* The ordering is not reconstructed here. Both kinds are appended by the loop AS THEY HAPPEN, so
|
|
53
|
+
* arrival order IS model order - there is nothing to sort, and no timestamp heuristic to get
|
|
54
|
+
* wrong.
|
|
55
|
+
*
|
|
56
|
+
* `callId` is whatever the SDK's own `tool_call` events carry, so a consumer no longer holds two
|
|
57
|
+
* id namespaces and no longer has to correlate them.
|
|
58
|
+
*/
|
|
59
|
+
events(): AsyncGenerator<RunTimelineEvent, void>;
|
|
60
|
+
/** theokit#140 - append to the timeline and wake `events()`. */
|
|
61
|
+
protected pushTimeline(event: RunTimelineEvent): void;
|
|
30
62
|
stream(): AsyncGenerator<SDKMessage, void>;
|
|
31
63
|
/**
|
|
32
|
-
* theokit#101 —
|
|
64
|
+
* theokit#101 — when the run ends in error, `stream()` has to SAY SO.
|
|
33
65
|
*
|
|
34
|
-
*
|
|
35
|
-
* `status: 'error'`
|
|
36
|
-
* `script.events`
|
|
37
|
-
*
|
|
66
|
+
* The error always existed: the loop records it in `ctx.error` and `wait()` returns
|
|
67
|
+
* `status: 'error'` with the message. Only `stream()` failed to mention it — it drains
|
|
68
|
+
* `script.events` and stops. A provider failure (404 "No endpoints found", auth, timeout)
|
|
69
|
+
* produced a turn that looked successful and empty, on EVERY surface consuming the
|
|
38
70
|
* stream: HTTP web, MCP, stdio, TUI in-process.
|
|
39
71
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
72
|
+
* A silent error is the worst kind (Unbreakable Rule 8). And the asymmetry was what made it
|
|
73
|
+
* hard to diagnose: anyone debugging via `wait()` saw the error and would not reproduce the
|
|
74
|
+
* report of anyone debugging via the stream.
|
|
43
75
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
76
|
+
* It emits `SDKStatusMessage` with `status: "ERROR"` — the type ALREADY EXISTS in the `SDKMessage` union
|
|
77
|
+
* and is already expected by consumers. A new type would be breaking for every consumer doing
|
|
78
|
+
* an exhaustive switch; this one is additive, and a consumer ignoring `status` simply
|
|
79
|
+
* behaves as before — never worse than today.
|
|
48
80
|
*/
|
|
49
81
|
private terminalErrorEvent;
|
|
50
82
|
wait(): Promise<RunResult>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The goal-loop's continuation marker — in a LEAF module, on purpose.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* It lived in `goal-loop.ts` and was imported by `run-until.ts`, which `goal-loop` in turn
|
|
5
|
+
* imports back. The cycle was broken at runtime (the return edge is `import type` + a dynamic
|
|
6
|
+
* `await import()`), but the cycle detector counts the dynamic edge — and counting a dynamic import as a cycle
|
|
7
|
+
* makes the gate impossible to satisfy without abandoning the canonical cycle-breaking technique.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* A constant shared by two modules that know each other is the textbook case for extraction into a
|
|
10
|
+
* leaf: neither needs to import the other to know it. The cycle disappears under ANY detector, with no
|
|
11
|
+
* tool policy and without changing a line of behavior.
|
|
12
12
|
*/
|
|
13
13
|
export declare const GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../../chunk-MUUQ2WFJ.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
var
|
|
4
|
+
var chunkQJQ2MAZF_cjs = require('../../chunk-QJQ2MAZF.cjs');
|
|
5
|
+
require('../../chunk-A3MHE2MQ.cjs');
|
|
6
|
+
var chunkBE3W4HYV_cjs = require('../../chunk-BE3W4HYV.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "ForbiddenPathError", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkQJQ2MAZF_cjs.ForbiddenPathError; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "PathTraversalError", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkQJQ2MAZF_cjs.PathTraversalError; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "assertNoSymlinkEscape", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkQJQ2MAZF_cjs.assertNoSymlinkEscape; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "isForbiddenPath", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkQJQ2MAZF_cjs.isForbiddenPath; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "safePathJoin", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkQJQ2MAZF_cjs.safePathJoin; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "sanitizeIdentifier", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkQJQ2MAZF_cjs.sanitizeIdentifier; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "validateArtifactPath", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkQJQ2MAZF_cjs.validateArtifactPath; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "addPattern", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkBE3W4HYV_cjs.addPattern; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "maskToken", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkBE3W4HYV_cjs.maskToken; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "redactSecrets", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkBE3W4HYV_cjs.redactSecrets; }
|
|
49
49
|
});
|
|
50
50
|
//# sourceMappingURL=index.cjs.map
|
|
51
51
|
//# sourceMappingURL=index.cjs.map
|