@theokit/sdk 4.24.0 → 4.26.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/dist/a2a/index.cjs +10 -171
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +3 -170
- package/dist/a2a/index.js.map +1 -1
- package/dist/agent-factory-registry-UU46BUMU.cjs +16 -0
- package/dist/agent-factory-registry-UU46BUMU.cjs.map +1 -0
- package/dist/agent-factory-registry-ZVTABLEY.js +3 -0
- package/dist/agent-factory-registry-ZVTABLEY.js.map +1 -0
- package/dist/auth/index.cjs +63 -367
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +6 -342
- package/dist/auth/index.js.map +1 -1
- package/dist/batch-2FSD2UNL.cjs +244 -0
- package/dist/batch-2FSD2UNL.cjs.map +1 -0
- package/dist/batch-MR2HKYMS.js +241 -0
- package/dist/batch-MR2HKYMS.js.map +1 -0
- package/dist/chunk-2HRYBRD7.cjs +31 -0
- package/dist/chunk-2HRYBRD7.cjs.map +1 -0
- package/dist/chunk-2MF3IE2D.cjs +2863 -0
- package/dist/chunk-2MF3IE2D.cjs.map +1 -0
- package/dist/chunk-2ONFGMBV.js +6 -0
- package/dist/chunk-2ONFGMBV.js.map +1 -0
- package/dist/chunk-2SFBB54R.js +23 -0
- package/dist/chunk-2SFBB54R.js.map +1 -0
- package/dist/chunk-2XLKLVVR.js +18 -0
- package/dist/chunk-2XLKLVVR.js.map +1 -0
- package/dist/chunk-4SXHEZIV.cjs +240 -0
- package/dist/chunk-4SXHEZIV.cjs.map +1 -0
- package/dist/chunk-4VPXM6UU.js +10 -0
- package/dist/chunk-4VPXM6UU.js.map +1 -0
- package/dist/chunk-4WL52CXU.cjs +148 -0
- package/dist/chunk-4WL52CXU.cjs.map +1 -0
- package/dist/chunk-5NBUH3NO.js +39 -0
- package/dist/chunk-5NBUH3NO.js.map +1 -0
- package/dist/chunk-5PZMMF4H.js +43 -0
- package/dist/chunk-5PZMMF4H.js.map +1 -0
- package/dist/chunk-6CLRANZA.js +289 -0
- package/dist/chunk-6CLRANZA.js.map +1 -0
- package/dist/chunk-6JSIEDKL.cjs +121 -0
- package/dist/chunk-6JSIEDKL.cjs.map +1 -0
- package/dist/chunk-6M4ODB2V.cjs +145 -0
- package/dist/chunk-6M4ODB2V.cjs.map +1 -0
- package/dist/chunk-6X6ID4MO.js +20 -0
- package/dist/chunk-6X6ID4MO.js.map +1 -0
- package/dist/chunk-77FOZCOT.js +165 -0
- package/dist/chunk-77FOZCOT.js.map +1 -0
- package/dist/chunk-7AD3ZTZL.js +25 -0
- package/dist/chunk-7AD3ZTZL.js.map +1 -0
- package/dist/chunk-7GFX45DD.js +57 -0
- package/dist/chunk-7GFX45DD.js.map +1 -0
- package/dist/chunk-7S7KKUO6.cjs +45 -0
- package/dist/chunk-7S7KKUO6.cjs.map +1 -0
- package/dist/chunk-7W7ZWMLQ.js +99 -0
- package/dist/chunk-7W7ZWMLQ.js.map +1 -0
- package/dist/chunk-A44COQJJ.cjs +353 -0
- package/dist/chunk-A44COQJJ.cjs.map +1 -0
- package/dist/chunk-AKSBP7OO.js +185 -0
- package/dist/chunk-AKSBP7OO.js.map +1 -0
- package/dist/chunk-ANIZEWTU.cjs +196 -0
- package/dist/chunk-ANIZEWTU.cjs.map +1 -0
- package/dist/chunk-BEURCLDV.cjs +139 -0
- package/dist/chunk-BEURCLDV.cjs.map +1 -0
- package/dist/chunk-BFWPZMG7.js +379 -0
- package/dist/chunk-BFWPZMG7.js.map +1 -0
- package/dist/chunk-BUUUWQMB.cjs +34 -0
- package/dist/chunk-BUUUWQMB.cjs.map +1 -0
- package/dist/chunk-BV2MWEMV.cjs +26 -0
- package/dist/chunk-BV2MWEMV.cjs.map +1 -0
- package/dist/chunk-BWT67BI4.cjs +268 -0
- package/dist/chunk-BWT67BI4.cjs.map +1 -0
- package/dist/chunk-BXV2QUIC.js +191 -0
- package/dist/chunk-BXV2QUIC.js.map +1 -0
- package/dist/chunk-C6Y6CWYD.cjs +44 -0
- package/dist/chunk-C6Y6CWYD.cjs.map +1 -0
- package/dist/chunk-C7PICHRF.cjs +68 -0
- package/dist/chunk-C7PICHRF.cjs.map +1 -0
- package/dist/chunk-CAH3G4IS.js +13 -0
- package/dist/chunk-CAH3G4IS.js.map +1 -0
- package/dist/chunk-D42XHI4O.cjs +565 -0
- package/dist/chunk-D42XHI4O.cjs.map +1 -0
- package/dist/chunk-DGRZNMTU.js +104 -0
- package/dist/chunk-DGRZNMTU.js.map +1 -0
- package/dist/chunk-DUK5WMKJ.js +71 -0
- package/dist/chunk-DUK5WMKJ.js.map +1 -0
- package/dist/chunk-EEZ7CFMM.js +14 -0
- package/dist/chunk-EEZ7CFMM.js.map +1 -0
- package/dist/chunk-EPYZOCOL.cjs +82 -0
- package/dist/chunk-EPYZOCOL.cjs.map +1 -0
- package/dist/chunk-EVADEGM7.cjs +168 -0
- package/dist/chunk-EVADEGM7.cjs.map +1 -0
- package/dist/chunk-FD2UT76F.js +3 -0
- package/dist/chunk-FD2UT76F.js.map +1 -0
- package/dist/chunk-FV3YEMQ7.js +179 -0
- package/dist/chunk-FV3YEMQ7.js.map +1 -0
- package/dist/chunk-G2F67XUR.cjs +184 -0
- package/dist/chunk-G2F67XUR.cjs.map +1 -0
- package/dist/chunk-G6GO6BXD.js +994 -0
- package/dist/chunk-G6GO6BXD.js.map +1 -0
- package/dist/chunk-GIW4L6HY.cjs +27 -0
- package/dist/chunk-GIW4L6HY.cjs.map +1 -0
- package/dist/chunk-GJAGKFTR.js +74 -0
- package/dist/chunk-GJAGKFTR.js.map +1 -0
- package/dist/chunk-HFPGOTVF.cjs +324 -0
- package/dist/chunk-HFPGOTVF.cjs.map +1 -0
- package/dist/chunk-HRA3CPGG.js +486 -0
- package/dist/chunk-HRA3CPGG.js.map +1 -0
- package/dist/chunk-HZQEDNF6.js +66 -0
- package/dist/chunk-HZQEDNF6.js.map +1 -0
- package/dist/chunk-IT3PWBW4.cjs +19 -0
- package/dist/chunk-IT3PWBW4.cjs.map +1 -0
- package/dist/chunk-JD74LN7R.cjs +171 -0
- package/dist/chunk-JD74LN7R.cjs.map +1 -0
- package/dist/chunk-JTFYYKDT.js +135 -0
- package/dist/chunk-JTFYYKDT.js.map +1 -0
- package/dist/chunk-K2BQQ445.js +30 -0
- package/dist/chunk-K2BQQ445.js.map +1 -0
- package/dist/chunk-KAP4GJHO.js +546 -0
- package/dist/chunk-KAP4GJHO.js.map +1 -0
- package/dist/chunk-KDNBTPY2.js +458 -0
- package/dist/chunk-KDNBTPY2.js.map +1 -0
- package/dist/chunk-KIO7QFIV.cjs +223 -0
- package/dist/chunk-KIO7QFIV.cjs.map +1 -0
- package/dist/chunk-KSKU6JY6.cjs +71 -0
- package/dist/chunk-KSKU6JY6.cjs.map +1 -0
- package/dist/chunk-LSLPF6OI.cjs +192 -0
- package/dist/chunk-LSLPF6OI.cjs.map +1 -0
- package/dist/chunk-LU7VALW5.js +312 -0
- package/dist/chunk-LU7VALW5.js.map +1 -0
- package/dist/chunk-LUSXDZPV.cjs +296 -0
- package/dist/chunk-LUSXDZPV.cjs.map +1 -0
- package/dist/chunk-M72RJVPC.js +69 -0
- package/dist/chunk-M72RJVPC.js.map +1 -0
- package/dist/chunk-MQLCZ4HJ.cjs +1010 -0
- package/dist/chunk-MQLCZ4HJ.cjs.map +1 -0
- package/dist/chunk-MUUQ2WFJ.cjs +4 -0
- package/dist/chunk-MUUQ2WFJ.cjs.map +1 -0
- package/dist/chunk-MZ5ZRORA.cjs +496 -0
- package/dist/chunk-MZ5ZRORA.cjs.map +1 -0
- package/dist/chunk-N24XBYNX.cjs +140 -0
- package/dist/chunk-N24XBYNX.cjs.map +1 -0
- package/dist/chunk-NINIJCHU.cjs +23 -0
- package/dist/chunk-NINIJCHU.cjs.map +1 -0
- package/dist/chunk-NRSH7RJY.js +2841 -0
- package/dist/chunk-NRSH7RJY.js.map +1 -0
- package/dist/chunk-OIYQBUW4.cjs +111 -0
- package/dist/chunk-OIYQBUW4.cjs.map +1 -0
- package/dist/chunk-PNVDQL5Y.cjs +15 -0
- package/dist/chunk-PNVDQL5Y.cjs.map +1 -0
- package/dist/chunk-POQT2OIF.js +214 -0
- package/dist/chunk-POQT2OIF.js.map +1 -0
- package/dist/chunk-PSJN532Q.js +10573 -0
- package/dist/chunk-PSJN532Q.js.map +1 -0
- package/dist/chunk-QUTUJ6P6.cjs +76 -0
- package/dist/chunk-QUTUJ6P6.cjs.map +1 -0
- package/dist/chunk-R43CNCES.cjs +460 -0
- package/dist/chunk-R43CNCES.cjs.map +1 -0
- package/dist/chunk-S2BBRVQX.js +68 -0
- package/dist/chunk-S2BBRVQX.js.map +1 -0
- package/dist/chunk-S5RCBTSF.js +145 -0
- package/dist/chunk-S5RCBTSF.js.map +1 -0
- package/dist/chunk-S7OEXQMI.cjs +136 -0
- package/dist/chunk-S7OEXQMI.cjs.map +1 -0
- package/dist/chunk-SKWVAQAY.js +129 -0
- package/dist/chunk-SKWVAQAY.js.map +1 -0
- package/dist/chunk-SQLZ7ONU.js +152 -0
- package/dist/chunk-SQLZ7ONU.js.map +1 -0
- package/dist/chunk-TIZ4TS5V.cjs +72 -0
- package/dist/chunk-TIZ4TS5V.cjs.map +1 -0
- package/dist/chunk-TQKCU7CL.js +142 -0
- package/dist/chunk-TQKCU7CL.js.map +1 -0
- package/dist/chunk-U54XCYG3.js +116 -0
- package/dist/chunk-U54XCYG3.js.map +1 -0
- package/dist/chunk-U6QGZHPN.js +29 -0
- package/dist/chunk-U6QGZHPN.js.map +1 -0
- package/dist/chunk-UCFONJBG.js +79 -0
- package/dist/chunk-UCFONJBG.js.map +1 -0
- package/dist/chunk-UJ7IQJAG.js +141 -0
- package/dist/chunk-UJ7IQJAG.js.map +1 -0
- package/dist/chunk-UVNG67DG.js +253 -0
- package/dist/chunk-UVNG67DG.js.map +1 -0
- package/dist/chunk-V4XRLPEF.js +25 -0
- package/dist/chunk-V4XRLPEF.js.map +1 -0
- package/dist/chunk-VJ26EKGJ.cjs +28 -0
- package/dist/chunk-VJ26EKGJ.cjs.map +1 -0
- package/dist/chunk-VK7MAV65.cjs +90 -0
- package/dist/chunk-VK7MAV65.cjs.map +1 -0
- package/dist/chunk-VYCKUKPA.cjs +106 -0
- package/dist/chunk-VYCKUKPA.cjs.map +1 -0
- package/dist/chunk-VYHJZVL5.cjs +29 -0
- package/dist/chunk-VYHJZVL5.cjs.map +1 -0
- package/dist/chunk-WA3FO4R7.js +155 -0
- package/dist/chunk-WA3FO4R7.js.map +1 -0
- package/dist/chunk-WJVHMTKB.cjs +12 -0
- package/dist/chunk-WJVHMTKB.cjs.map +1 -0
- package/dist/chunk-WLKFWQSJ.js +333 -0
- package/dist/chunk-WLKFWQSJ.js.map +1 -0
- package/dist/chunk-WPZTYOUX.cjs +59 -0
- package/dist/chunk-WPZTYOUX.cjs.map +1 -0
- package/dist/chunk-X2FR4OIT.js +27 -0
- package/dist/chunk-X2FR4OIT.js.map +1 -0
- package/dist/chunk-XIG2IE3L.js +134 -0
- package/dist/chunk-XIG2IE3L.js.map +1 -0
- package/dist/chunk-YLQQX5W2.cjs +20 -0
- package/dist/chunk-YLQQX5W2.cjs.map +1 -0
- package/dist/chunk-YPEPCZHF.cjs +147 -0
- package/dist/chunk-YPEPCZHF.cjs.map +1 -0
- package/dist/chunk-YPQF26X7.cjs +8 -0
- package/dist/chunk-YPQF26X7.cjs.map +1 -0
- package/dist/chunk-YU6KON2I.cjs +160 -0
- package/dist/chunk-YU6KON2I.cjs.map +1 -0
- package/dist/chunk-Z2OC3UIW.cjs +388 -0
- package/dist/chunk-Z2OC3UIW.cjs.map +1 -0
- package/dist/chunk-ZUBIEQJF.cjs +10590 -0
- package/dist/chunk-ZUBIEQJF.cjs.map +1 -0
- package/dist/chunk-ZZWTY3RX.js +230 -0
- package/dist/chunk-ZZWTY3RX.js.map +1 -0
- package/dist/compact-session-OO2GD76G.js +17 -0
- package/dist/compact-session-OO2GD76G.js.map +1 -0
- package/dist/compact-session-OO7NVWPB.cjs +54 -0
- package/dist/compact-session-OO7NVWPB.cjs.map +1 -0
- package/dist/compaction.cjs +54 -303
- package/dist/compaction.cjs.map +1 -1
- package/dist/compaction.js +3 -292
- package/dist/compaction.js.map +1 -1
- package/dist/concurrency.cjs +9 -81
- package/dist/concurrency.cjs.map +1 -1
- package/dist/concurrency.js +5 -80
- package/dist/concurrency.js.map +1 -1
- package/dist/context-GWANQLX4.js +5 -0
- package/dist/context-GWANQLX4.js.map +1 -0
- package/dist/context-KNWVTZSY.cjs +22 -0
- package/dist/context-KNWVTZSY.cjs.map +1 -0
- package/dist/{cron-x3muPNgg.d.cts → cron-D0JKR-yX.d.cts} +2 -1
- package/dist/{cron-B_NkE_VM.d.ts → cron-DivRaEmN.d.ts} +2 -1
- package/dist/cron.cjs +44 -20676
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +1 -1
- package/dist/cron.d.ts +1 -1
- package/dist/cron.js +38 -20676
- package/dist/cron.js.map +1 -1
- package/dist/errors.cjs +78 -470
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +3 -424
- package/dist/errors.js +2 -455
- package/dist/errors.js.map +1 -1
- package/dist/eval.cjs +72 -20411
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +59 -20402
- package/dist/eval.js.map +1 -1
- package/dist/executor-ORJS5GV2.js +981 -0
- package/dist/executor-ORJS5GV2.js.map +1 -0
- package/dist/executor-Y4MKPIUD.cjs +985 -0
- package/dist/executor-Y4MKPIUD.cjs.map +1 -0
- package/dist/filesystem/index.cjs +7 -112
- package/dist/filesystem/index.cjs.map +1 -1
- package/dist/filesystem/index.js +4 -109
- package/dist/filesystem/index.js.map +1 -1
- package/dist/fork-agent-RSV4E3EA.js +61 -0
- package/dist/fork-agent-RSV4E3EA.js.map +1 -0
- package/dist/fork-agent-Y2IK2RYU.cjs +64 -0
- package/dist/fork-agent-Y2IK2RYU.cjs.map +1 -0
- package/dist/fs-session-store-KAUQYSGI.cjs +17 -0
- package/dist/fs-session-store-KAUQYSGI.cjs.map +1 -0
- package/dist/fs-session-store-ZKB5NN37.js +8 -0
- package/dist/fs-session-store-ZKB5NN37.js.map +1 -0
- package/dist/generate-object-H3RNAM6S.cjs +20 -0
- package/dist/generate-object-H3RNAM6S.cjs.map +1 -0
- package/dist/generate-object-YJPDV5BS.js +7 -0
- package/dist/generate-object-YJPDV5BS.js.map +1 -0
- package/dist/index-manager-CB6I7XFQ.cjs +19 -0
- package/dist/index-manager-CB6I7XFQ.cjs.map +1 -0
- package/dist/index-manager-L27Q3QAC.js +10 -0
- package/dist/index-manager-L27Q3QAC.js.map +1 -0
- package/dist/index.cjs +371 -22888
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -21
- package/dist/index.d.ts +16 -21
- package/dist/index.js +92 -22713
- package/dist/index.js.map +1 -1
- package/dist/inject-session-6MJUSGZP.cjs +27 -0
- package/dist/inject-session-6MJUSGZP.cjs.map +1 -0
- package/dist/inject-session-KOFHS5K3.js +25 -0
- package/dist/inject-session-KOFHS5K3.js.map +1 -0
- package/dist/internal/judge/judge-call.d.ts +32 -19
- package/dist/internal/persistence/index.cjs +93 -508
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +11 -489
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/security/index.cjs +44 -361
- package/dist/internal/security/index.cjs.map +1 -1
- package/dist/internal/security/index.js +4 -355
- package/dist/internal/security/index.js.map +1 -1
- package/dist/judge-call-CEQ3FYYD.js +126 -0
- package/dist/judge-call-CEQ3FYYD.js.map +1 -0
- package/dist/judge-call-QG4WZ7F3.cjs +130 -0
- package/dist/judge-call-QG4WZ7F3.cjs.map +1 -0
- package/dist/models.cjs +24 -919
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +11 -907
- package/dist/models.js.map +1 -1
- package/dist/oauth-transaction-store-7CKHPQRN.cjs +32 -0
- package/dist/oauth-transaction-store-7CKHPQRN.cjs.map +1 -0
- package/dist/oauth-transaction-store-W74I6EFD.js +3 -0
- package/dist/oauth-transaction-store-W74I6EFD.js.map +1 -0
- package/dist/path-safety.cjs +31 -200
- package/dist/path-safety.cjs.map +1 -1
- package/dist/path-safety.js +3 -197
- package/dist/path-safety.js.map +1 -1
- package/dist/persistence.cjs +73 -393
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +9 -381
- package/dist/persistence.js.map +1 -1
- package/dist/project.cjs +8 -112
- package/dist/project.cjs.map +1 -1
- package/dist/project.js +6 -110
- package/dist/project.js.map +1 -1
- package/dist/registry-34IWWDQQ.js +9 -0
- package/dist/registry-34IWWDQQ.js.map +1 -0
- package/dist/registry-APYDISL6.cjs +46 -0
- package/dist/registry-APYDISL6.cjs.map +1 -0
- package/dist/retry.cjs +7 -87
- package/dist/retry.cjs.map +1 -1
- package/dist/retry.js +3 -90
- package/dist/retry.js.map +1 -1
- package/dist/run-to-completion-J73I6IY4.cjs +48 -0
- package/dist/run-to-completion-J73I6IY4.cjs.map +1 -0
- package/dist/run-to-completion-JDPIUKSH.js +3 -0
- package/dist/run-to-completion-JDPIUKSH.js.map +1 -0
- package/dist/run-until-PNO3QQLI.cjs +180 -0
- package/dist/run-until-PNO3QQLI.cjs.map +1 -0
- package/dist/run-until-XLHEHRQM.js +177 -0
- package/dist/run-until-XLHEHRQM.js.map +1 -0
- package/dist/sandbox/index.cjs +35 -337
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.js +7 -323
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sanitize/index.cjs +5 -112
- package/dist/sanitize/index.cjs.map +1 -1
- package/dist/sanitize/index.js +1 -114
- package/dist/sanitize/index.js.map +1 -1
- package/dist/server/auth/index.cjs +35 -175
- package/dist/server/auth/index.cjs.map +1 -1
- package/dist/server/auth/index.js +7 -161
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/errors-envelope.cjs +17 -328
- package/dist/server/errors-envelope.cjs.map +1 -1
- package/dist/server/errors-envelope.js +4 -317
- package/dist/server/errors-envelope.js.map +1 -1
- package/dist/session-transcript-LPNZR3YS.cjs +46 -0
- package/dist/session-transcript-LPNZR3YS.cjs.map +1 -0
- package/dist/session-transcript-T7LGJUGW.js +5 -0
- package/dist/session-transcript-T7LGJUGW.js.map +1 -0
- package/dist/skills.cjs +12 -280
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.js +4 -282
- package/dist/skills.js.map +1 -1
- package/dist/stream-object-QEQJJDTI.cjs +20 -0
- package/dist/stream-object-QEQJJDTI.cjs.map +1 -0
- package/dist/stream-object-WUQSSRY2.js +7 -0
- package/dist/stream-object-WUQSSRY2.js.map +1 -0
- package/dist/stream-to-completion-DFJ5T3BK.js +30 -0
- package/dist/stream-to-completion-DFJ5T3BK.js.map +1 -0
- package/dist/stream-to-completion-H2MHISSK.cjs +32 -0
- package/dist/stream-to-completion-H2MHISSK.cjs.map +1 -0
- package/dist/subagents.cjs +2 -8
- package/dist/subagents.cjs.map +1 -1
- package/dist/subagents.js +1 -7
- package/dist/subagents.js.map +1 -1
- package/dist/subscription/index.cjs +4 -17
- package/dist/subscription/index.cjs.map +1 -1
- package/dist/subscription/index.js +3 -16
- package/dist/subscription/index.js.map +1 -1
- package/dist/task-store.cjs +16 -258
- package/dist/task-store.cjs.map +1 -1
- package/dist/task-store.js +4 -259
- package/dist/task-store.js.map +1 -1
- package/dist/types/goal-events.d.ts +2 -1
- package/dist/workflow.cjs +71 -2797
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.js +8 -2812
- package/dist/workflow.js.map +1 -1
- package/package.json +1 -1
package/dist/sandbox/index.cjs
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkS7OEXQMI_cjs = require('../chunk-S7OEXQMI.cjs');
|
|
4
|
+
require('../chunk-WPZTYOUX.cjs');
|
|
5
|
+
var chunkA44COQJJ_cjs = require('../chunk-A44COQJJ.cjs');
|
|
6
|
+
var chunkBEURCLDV_cjs = require('../chunk-BEURCLDV.cjs');
|
|
3
7
|
var child_process = require('child_process');
|
|
4
8
|
var fs = require('fs');
|
|
5
9
|
var path = require('path');
|
|
6
10
|
var os = require('os');
|
|
7
|
-
var promises = require('fs/promises');
|
|
8
11
|
|
|
9
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
13
|
|
|
11
14
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
15
|
|
|
13
|
-
// src/sandbox/bwrap.ts
|
|
14
16
|
function buildBwrapArgv(mode, opts) {
|
|
15
17
|
if (mode === "danger-full-access") return null;
|
|
16
18
|
const cwd = path__default.default.resolve(opts.cwd);
|
|
@@ -112,309 +114,6 @@ function resetBwrapMemo() {
|
|
|
112
114
|
memo = void 0;
|
|
113
115
|
}
|
|
114
116
|
|
|
115
|
-
// src/internal/security/redact.ts
|
|
116
|
-
var REDACT_ENABLED = readEnvOnce();
|
|
117
|
-
function readEnvOnce() {
|
|
118
|
-
const raw = process.env.THEOKIT_REDACT_SECRETS;
|
|
119
|
-
if (raw === void 0) return true;
|
|
120
|
-
return ["1", "true", "yes", "on"].includes(raw.toLowerCase());
|
|
121
|
-
}
|
|
122
|
-
var warnedOptOut = false;
|
|
123
|
-
if (!REDACT_ENABLED && !warnedOptOut) {
|
|
124
|
-
process.stderr.write(
|
|
125
|
-
"[theokit-sdk] Secret redaction is DISABLED via THEOKIT_REDACT_SECRETS. Credentials may leak into errors, telemetry, logs, transcripts.\n"
|
|
126
|
-
);
|
|
127
|
-
warnedOptOut = true;
|
|
128
|
-
}
|
|
129
|
-
var BUILTIN_PATTERNS = [
|
|
130
|
-
// T5.4: 30+ vendor prefixes (was 12 pre-T5.4). Order matters — more
|
|
131
|
-
// specific prefixes precede generic ones (e.g., sk-ant-admin01 before
|
|
132
|
-
// sk-ant-, sk-proj- before sk-). PEM block deliberately first so its
|
|
133
|
-
// multi-line span runs before any per-line patterns can fire.
|
|
134
|
-
/-----BEGIN[ ]+(?:RSA |EC |DSA |OPENSSH |ENCRYPTED |)PRIVATE KEY-----[\s\S]+?-----END[ ]+(?:RSA |EC |DSA |OPENSSH |ENCRYPTED |)PRIVATE KEY-----/g,
|
|
135
|
-
// JWT — exact 3-segment base64url. Dotted; the body floor of 4 chars per
|
|
136
|
-
// segment matches the minimum legal payload while skipping `a.b.c` noise.
|
|
137
|
-
/eyJ[A-Za-z0-9_-]{4,}\.eyJ[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{4,}/g,
|
|
138
|
-
// Azure Storage SAS — match the sig= component (URL-encoded base64).
|
|
139
|
-
/(?<=[?&]sig=)[A-Za-z0-9%+/]{20,}/g,
|
|
140
|
-
// Anthropic
|
|
141
|
-
/sk-ant-admin01-[A-Za-z0-9_-]{10,}/g,
|
|
142
|
-
// Anthropic admin keys (must precede sk-ant-)
|
|
143
|
-
/sk-ant-[A-Za-z0-9_-]{10,}/g,
|
|
144
|
-
// Anthropic regular
|
|
145
|
-
// OpenAI family + clones (sk- generic must come AFTER all sk-foo- variants)
|
|
146
|
-
/sk-proj-[A-Za-z0-9_-]{10,}/g,
|
|
147
|
-
// OpenAI project key (must precede sk- generic)
|
|
148
|
-
/sk-[A-Za-z0-9_-]{10,}/g,
|
|
149
|
-
// OpenAI / OpenRouter / DeepInfra / Together / DeepSeek
|
|
150
|
-
// Provider prefixes (alphabetized for maintainability)
|
|
151
|
-
/AIza[A-Za-z0-9_-]{35}/g,
|
|
152
|
-
// Google API key
|
|
153
|
-
/AKIA[A-Z0-9]{16}/g,
|
|
154
|
-
// AWS access key
|
|
155
|
-
/fw_[A-Za-z0-9]{20,}/g,
|
|
156
|
-
// Fireworks
|
|
157
|
-
/glpat-[A-Za-z0-9_-]{20}/g,
|
|
158
|
-
// GitLab PAT
|
|
159
|
-
/ghp_[A-Za-z0-9]{36}/g,
|
|
160
|
-
// GitHub PAT classic
|
|
161
|
-
/github_pat_[A-Za-z0-9_]{82}/g,
|
|
162
|
-
// GitHub PAT fine-grained
|
|
163
|
-
/gsk_[A-Za-z0-9]{20,}/g,
|
|
164
|
-
// Groq
|
|
165
|
-
/hf_[A-Za-z0-9]{20,}/g,
|
|
166
|
-
// HuggingFace
|
|
167
|
-
/\bpa-[A-Za-z0-9_-]{20,}/g,
|
|
168
|
-
// Voyage AI (word-boundary to skip CSS / kebab IDs)
|
|
169
|
-
/pcsk_[A-Za-z0-9_-]{20,}/g,
|
|
170
|
-
// Pinecone
|
|
171
|
-
/pplx-[A-Za-z0-9_-]{20,}/g,
|
|
172
|
-
// Perplexity
|
|
173
|
-
/r8_[A-Za-z0-9_-]{20,}/g,
|
|
174
|
-
// Replicate
|
|
175
|
-
/rk_live_[A-Za-z0-9]{20,}/g,
|
|
176
|
-
// Stripe restricted
|
|
177
|
-
/sk_live_[A-Za-z0-9]{20,}/g,
|
|
178
|
-
// Stripe secret
|
|
179
|
-
/sntrys_[A-Za-z0-9]{40,}/g,
|
|
180
|
-
// Sentry user auth
|
|
181
|
-
/xai-[A-Za-z0-9_-]{20,}/g,
|
|
182
|
-
// xAI (Grok)
|
|
183
|
-
/xox[bpasr]-[A-Za-z0-9-]{10,}/g,
|
|
184
|
-
//Slack tokens
|
|
185
|
-
// Additional unique-prefix tokens with low false-positive risk
|
|
186
|
-
/npm_[A-Za-z0-9]{36}/g,
|
|
187
|
-
// npm access token
|
|
188
|
-
/SG\.[A-Za-z0-9_-]{22}\.[A-Za-z0-9_-]{43}/g,
|
|
189
|
-
// SendGrid
|
|
190
|
-
/\bSK[A-Za-z0-9]{32}\b/g,
|
|
191
|
-
// Twilio API SID (word-boundary to skip CSS class noise)
|
|
192
|
-
/\bkey-[a-f0-9]{32}\b/g,
|
|
193
|
-
// Mailgun (hex-only narrows false positives)
|
|
194
|
-
/MT[A-Za-z0-9_-]{23}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27}/g,
|
|
195
|
-
// Discord bot
|
|
196
|
-
/\b(?:sdk|mob)-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\b/g
|
|
197
|
-
// LaunchDarkly
|
|
198
|
-
];
|
|
199
|
-
var BEARER_PATTERN = /\b(Bearer\s+)([A-Za-z0-9_\-.+/=]{8,})/g;
|
|
200
|
-
var PARAM_PATTERN = /(\b(?:access_token|api_key|api-key|client_secret|credential|credentials|id_token|jwt|password|private_key|refresh_token|secret|service_account|session_token|token|x-api-key)\b["']?\s*[:=]\s*["']?)([A-Za-z0-9_\-.+/]+)/gi;
|
|
201
|
-
var _extraPatterns = [];
|
|
202
|
-
function maskToken(token) {
|
|
203
|
-
if (token.length < 18) return "***";
|
|
204
|
-
return `${token.slice(0, 6)}...${token.slice(-4)}`;
|
|
205
|
-
}
|
|
206
|
-
var MASK_SHAPE = /^.{6}\.\.\..{4}$/s;
|
|
207
|
-
function coerceToString(value) {
|
|
208
|
-
if (typeof value === "string") return value;
|
|
209
|
-
if (value === null || value === void 0) return null;
|
|
210
|
-
if (typeof value === "object") {
|
|
211
|
-
try {
|
|
212
|
-
const s = JSON.stringify(value);
|
|
213
|
-
return s === void 0 ? null : s;
|
|
214
|
-
} catch {
|
|
215
|
-
return "[unredactable: circular]";
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
return String(value);
|
|
219
|
-
}
|
|
220
|
-
function redactSecrets(text, opts) {
|
|
221
|
-
const coerced = coerceToString(text);
|
|
222
|
-
if (coerced === null) return "";
|
|
223
|
-
if (!REDACT_ENABLED) return coerced;
|
|
224
|
-
let s = coerced;
|
|
225
|
-
for (const re of BUILTIN_PATTERNS) {
|
|
226
|
-
s = s.replace(re, (m) => maskToken(m));
|
|
227
|
-
}
|
|
228
|
-
for (const re of _extraPatterns) {
|
|
229
|
-
s = s.replace(re, (m) => maskToken(m));
|
|
230
|
-
}
|
|
231
|
-
{
|
|
232
|
-
s = s.replace(BEARER_PATTERN, (_, prefix) => `${prefix}***`);
|
|
233
|
-
s = s.replace(PARAM_PATTERN, (whole, prefix, value) => {
|
|
234
|
-
if (MASK_SHAPE.test(value)) return whole;
|
|
235
|
-
return `${prefix}***`;
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
return s;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// src/internal/runtime/lifecycle/env-policy.ts
|
|
242
|
-
var SECRET_PATTERNS = [
|
|
243
|
-
/KEY/i,
|
|
244
|
-
/SECRET/i,
|
|
245
|
-
/TOKEN/i,
|
|
246
|
-
/PASSWORD/i,
|
|
247
|
-
/PASSWD/i,
|
|
248
|
-
/PASSPHRASE/i,
|
|
249
|
-
/[_-]PWD/i,
|
|
250
|
-
/CREDENTIAL/i,
|
|
251
|
-
/PRIVATE/i,
|
|
252
|
-
/_AUTH/i,
|
|
253
|
-
// #54-a — value-embedded-secret conventions (no generic `*_URL` — see keep-list test).
|
|
254
|
-
/DSN/i,
|
|
255
|
-
/WEBHOOK/i,
|
|
256
|
-
/COOKIE/i,
|
|
257
|
-
/CONNECTION[_-]?STRING/i,
|
|
258
|
-
// Known DB / message-broker connection-string vars (carry `user:pass@`).
|
|
259
|
-
/(?:^|[_-])(?:DATABASE|DB|REDIS|MONGO(?:DB)?|POSTGRES(?:QL)?|MYSQL|MARIADB|AMQP|RABBITMQ|CLICKHOUSE|ELASTIC(?:SEARCH)?|CASSANDRA|COUCHDB|MEMCACHED|NATS|KAFKA)[_-]?(?:URL|URI|DSN|CONNECTION)/i
|
|
260
|
-
];
|
|
261
|
-
var CORE_VARS = [
|
|
262
|
-
"PATH",
|
|
263
|
-
"HOME",
|
|
264
|
-
"SHELL",
|
|
265
|
-
"LANG",
|
|
266
|
-
"LC_ALL",
|
|
267
|
-
"LC_CTYPE",
|
|
268
|
-
"TMPDIR",
|
|
269
|
-
"TMP",
|
|
270
|
-
"TEMP",
|
|
271
|
-
"USER",
|
|
272
|
-
"LOGNAME"
|
|
273
|
-
];
|
|
274
|
-
function isSecretName(name) {
|
|
275
|
-
return SECRET_PATTERNS.some((re) => re.test(name));
|
|
276
|
-
}
|
|
277
|
-
function inheritsUnderPolicy(name, policy) {
|
|
278
|
-
if (policy === "all") return true;
|
|
279
|
-
if (policy === "core") return CORE_VARS.includes(name);
|
|
280
|
-
return !isSecretName(name);
|
|
281
|
-
}
|
|
282
|
-
function resolveChildEnv(options = {}) {
|
|
283
|
-
const parent = options.parent ?? process.env;
|
|
284
|
-
const policy = options.policy ?? "inherit-scrubbed";
|
|
285
|
-
const base = {};
|
|
286
|
-
for (const [name, value] of Object.entries(parent)) {
|
|
287
|
-
if (value !== void 0 && inheritsUnderPolicy(name, policy)) base[name] = value;
|
|
288
|
-
}
|
|
289
|
-
for (const [name, value] of Object.entries(options.overrides ?? {})) {
|
|
290
|
-
base[name] = value;
|
|
291
|
-
}
|
|
292
|
-
return base;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// src/sandbox/shell-escape.ts
|
|
296
|
-
function shellEscapePosix(arg) {
|
|
297
|
-
return `'${arg.replace(/'/g, "'\\''")}'`;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// src/sandbox/types.ts
|
|
301
|
-
var SandboxSecurityError = class extends Error {
|
|
302
|
-
code = "sandbox_security";
|
|
303
|
-
constructor(message) {
|
|
304
|
-
super(message);
|
|
305
|
-
this.name = "SandboxSecurityError";
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
var SandboxNotAvailableError = class extends Error {
|
|
309
|
-
code = "sandbox_not_available";
|
|
310
|
-
constructor(message) {
|
|
311
|
-
super(message);
|
|
312
|
-
this.name = "SandboxNotAvailableError";
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
var SandboxBackend = class {
|
|
316
|
-
config;
|
|
317
|
-
constructor(config = {}) {
|
|
318
|
-
this.config = {
|
|
319
|
-
workDir: config.workDir ?? "/tmp",
|
|
320
|
-
timeoutMs: config.timeoutMs ?? 3e4,
|
|
321
|
-
maxOutputBytes: config.maxOutputBytes ?? 5 * 1024 * 1024,
|
|
322
|
-
// #54 — preserve the env policy so backends can scrub secrets.
|
|
323
|
-
env: config.env ?? "inherit-scrubbed"
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
async readFile(path2) {
|
|
327
|
-
const result = await this.execute(`cat ${this.shellEscape(path2)}`);
|
|
328
|
-
if (result.exitCode !== 0) {
|
|
329
|
-
throw new Error(`readFile failed: ${result.stderr}`);
|
|
330
|
-
}
|
|
331
|
-
return result.stdout;
|
|
332
|
-
}
|
|
333
|
-
async writeFile(path2, content) {
|
|
334
|
-
await this.uploadFile(path2, content);
|
|
335
|
-
}
|
|
336
|
-
async glob(pattern, cwd) {
|
|
337
|
-
const dir = cwd ?? this.config.workDir ?? ".";
|
|
338
|
-
const result = await this.execute(
|
|
339
|
-
`find ${this.shellEscape(dir)} -name ${this.shellEscape(pattern)} -type f 2>/dev/null`
|
|
340
|
-
);
|
|
341
|
-
if (result.exitCode !== 0) return [];
|
|
342
|
-
return result.stdout.trim().split("\n").filter(Boolean);
|
|
343
|
-
}
|
|
344
|
-
async grep(pattern, path2) {
|
|
345
|
-
const target = path2 ?? ".";
|
|
346
|
-
const result = await this.execute(
|
|
347
|
-
`grep -rn ${this.shellEscape(pattern)} ${this.shellEscape(target)} 2>/dev/null`
|
|
348
|
-
);
|
|
349
|
-
if (result.exitCode !== 0) return [];
|
|
350
|
-
return result.stdout.trim().split("\n").filter(Boolean);
|
|
351
|
-
}
|
|
352
|
-
async listDir(path2) {
|
|
353
|
-
const result = await this.execute(`ls -1 ${this.shellEscape(path2)}`);
|
|
354
|
-
if (result.exitCode !== 0) return [];
|
|
355
|
-
return result.stdout.trim().split("\n").filter(Boolean);
|
|
356
|
-
}
|
|
357
|
-
truncateOutput(output) {
|
|
358
|
-
const max = this.config.maxOutputBytes ?? 5 * 1024 * 1024;
|
|
359
|
-
if (Buffer.byteLength(output) > max) {
|
|
360
|
-
return `${output.slice(0, max)}
|
|
361
|
-
...(truncated)`;
|
|
362
|
-
}
|
|
363
|
-
return output;
|
|
364
|
-
}
|
|
365
|
-
shellEscape(arg) {
|
|
366
|
-
return shellEscapePosix(arg);
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
async function resolveSandbox(provider, ctx) {
|
|
370
|
-
return provider instanceof SandboxBackend ? provider : provider(ctx);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
// src/sandbox/local-sandbox.ts
|
|
374
|
-
var LocalSandbox = class extends SandboxBackend {
|
|
375
|
-
constructor(config = {}) {
|
|
376
|
-
super(config);
|
|
377
|
-
}
|
|
378
|
-
async execute(command, opts) {
|
|
379
|
-
const timeout = opts?.timeoutMs ?? this.config.timeoutMs ?? 3e4;
|
|
380
|
-
const max = this.config.maxOutputBytes ?? 5 * 1024 * 1024;
|
|
381
|
-
return new Promise((resolve) => {
|
|
382
|
-
const child = child_process.execFile(
|
|
383
|
-
"/bin/sh",
|
|
384
|
-
["-c", command],
|
|
385
|
-
{
|
|
386
|
-
cwd: this.config.workDir,
|
|
387
|
-
timeout,
|
|
388
|
-
maxBuffer: max,
|
|
389
|
-
encoding: "utf-8",
|
|
390
|
-
// #54 — scrub secret-like host env vars from the child by default.
|
|
391
|
-
env: resolveChildEnv({ policy: this.config.env })
|
|
392
|
-
},
|
|
393
|
-
(error, stdout, stderr) => {
|
|
394
|
-
resolve(this.buildResult(error, stdout ?? "", stderr ?? ""));
|
|
395
|
-
}
|
|
396
|
-
);
|
|
397
|
-
child.on("error", () => {
|
|
398
|
-
resolve({ stdout: "", stderr: "spawn error", exitCode: 1, timedOut: false });
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
buildResult(error, stdout, stderr) {
|
|
403
|
-
const timedOut = error !== null && "killed" in error && error.killed;
|
|
404
|
-
return {
|
|
405
|
-
stdout: this.truncateOutput(stdout),
|
|
406
|
-
stderr: this.truncateOutput(stderr),
|
|
407
|
-
exitCode: timedOut ? 124 : error ? 1 : 0,
|
|
408
|
-
timedOut
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
async uploadFile(path2, content) {
|
|
412
|
-
const fullPath = path2.startsWith("/") ? path2 : `${this.config.workDir}/${path2}`;
|
|
413
|
-
await promises.mkdir(path.dirname(fullPath), { recursive: true });
|
|
414
|
-
await promises.writeFile(fullPath, content, "utf-8");
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
|
|
418
117
|
// src/sandbox/seccomp.ts
|
|
419
118
|
var BPF_LD = 0;
|
|
420
119
|
var BPF_W = 0;
|
|
@@ -526,7 +225,7 @@ function allowlistedEnv(source = process.env) {
|
|
|
526
225
|
}
|
|
527
226
|
return out;
|
|
528
227
|
}
|
|
529
|
-
var LinuxSandbox = class extends LocalSandbox {
|
|
228
|
+
var LinuxSandbox = class extends chunkS7OEXQMI_cjs.LocalSandbox {
|
|
530
229
|
mode;
|
|
531
230
|
network;
|
|
532
231
|
cwd;
|
|
@@ -620,7 +319,7 @@ function seccompPathForArch(arch, warn) {
|
|
|
620
319
|
var seccompFilterPath;
|
|
621
320
|
function restrictedSeccompPath() {
|
|
622
321
|
if (seccompFilterPath !== void 0) return seccompFilterPath ?? void 0;
|
|
623
|
-
const path2 = seccompPathForArch(process.arch, (m) => console.warn(redactSecrets(m)));
|
|
322
|
+
const path2 = seccompPathForArch(process.arch, (m) => console.warn(chunkBEURCLDV_cjs.redactSecrets(m)));
|
|
624
323
|
seccompFilterPath = path2 ?? null;
|
|
625
324
|
return path2;
|
|
626
325
|
}
|
|
@@ -640,17 +339,17 @@ function resolveSandboxPosture(opts) {
|
|
|
640
339
|
}
|
|
641
340
|
function createSandboxBackend(opts) {
|
|
642
341
|
const config = { workDir: opts.workDir, timeoutMs: opts.timeoutMs };
|
|
643
|
-
if (opts.mode === "danger-full-access") return new LocalSandbox(config);
|
|
342
|
+
if (opts.mode === "danger-full-access") return new chunkS7OEXQMI_cjs.LocalSandbox(config);
|
|
644
343
|
const detection = (opts.detect ?? detectBwrapMemoizado)();
|
|
645
344
|
if (!detection.ok) {
|
|
646
345
|
if (!warnedUnavailable) {
|
|
647
346
|
warnedUnavailable = true;
|
|
648
|
-
const warn = opts.warn ?? ((m) => console.warn(redactSecrets(m)));
|
|
347
|
+
const warn = opts.warn ?? ((m) => console.warn(chunkBEURCLDV_cjs.redactSecrets(m)));
|
|
649
348
|
warn(
|
|
650
349
|
`[sandbox] OS-level enforcement unavailable (${detection.reason}) \u2014 falling back to tool-level gating only (sandbox_mode=${opts.mode}).`
|
|
651
350
|
);
|
|
652
351
|
}
|
|
653
|
-
return new LocalSandbox(config);
|
|
352
|
+
return new chunkS7OEXQMI_cjs.LocalSandbox(config);
|
|
654
353
|
}
|
|
655
354
|
return new LinuxSandbox(config, { mode: opts.mode, network: opts.network, bin: detection.bin });
|
|
656
355
|
}
|
|
@@ -667,7 +366,7 @@ function decidirConfinamento(opts) {
|
|
|
667
366
|
if (detection.ok) return detection.bin;
|
|
668
367
|
if (!avisouInterativo) {
|
|
669
368
|
avisouInterativo = true;
|
|
670
|
-
const warn = opts.warn ?? ((m) => console.warn(redactSecrets(m)));
|
|
369
|
+
const warn = opts.warn ?? ((m) => console.warn(chunkBEURCLDV_cjs.redactSecrets(m)));
|
|
671
370
|
warn(
|
|
672
371
|
`[sandbox] OS-level enforcement unavailable (${detection.reason}) \u2014 interactive session runs WITHOUT kernel confinement (sandbox_mode=${opts.mode}).`
|
|
673
372
|
);
|
|
@@ -692,24 +391,8 @@ function interactiveWrapCommand(opts) {
|
|
|
692
391
|
};
|
|
693
392
|
}
|
|
694
393
|
|
|
695
|
-
// src/errors.ts
|
|
696
|
-
var TheokitAgentError = class extends Error {
|
|
697
|
-
name = "TheokitAgentError";
|
|
698
|
-
isRetryable;
|
|
699
|
-
code;
|
|
700
|
-
protoErrorCode;
|
|
701
|
-
metadata;
|
|
702
|
-
constructor(message, options = {}) {
|
|
703
|
-
super(message, options.cause !== void 0 ? { cause: options.cause } : void 0);
|
|
704
|
-
this.isRetryable = options.isRetryable ?? false;
|
|
705
|
-
if (options.code !== void 0) this.code = options.code;
|
|
706
|
-
if (options.protoErrorCode !== void 0) this.protoErrorCode = options.protoErrorCode;
|
|
707
|
-
if (options.metadata !== void 0) this.metadata = options.metadata;
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
|
|
711
394
|
// src/sandbox/provision.ts
|
|
712
|
-
var RepoProvisionError = class extends TheokitAgentError {
|
|
395
|
+
var RepoProvisionError = class extends chunkA44COQJJ_cjs.TheokitAgentError {
|
|
713
396
|
constructor(instanceId, message, options = {}) {
|
|
714
397
|
super(`[${instanceId}] ${message}`, {
|
|
715
398
|
code: "repo_provision_failed",
|
|
@@ -723,7 +406,7 @@ var RepoProvisionError = class extends TheokitAgentError {
|
|
|
723
406
|
};
|
|
724
407
|
var SAFE_INSTANCE_ID = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
725
408
|
async function provisionRepo(sandboxOrOpts, maybeOpts) {
|
|
726
|
-
const sandbox = maybeOpts !== void 0 ? sandboxOrOpts : new LocalSandbox();
|
|
409
|
+
const sandbox = maybeOpts !== void 0 ? sandboxOrOpts : new chunkS7OEXQMI_cjs.LocalSandbox();
|
|
727
410
|
const opts = maybeOpts ?? sandboxOrOpts;
|
|
728
411
|
const { repoUrl, ref, instanceId } = opts;
|
|
729
412
|
if (!SAFE_INSTANCE_ID.test(instanceId)) {
|
|
@@ -736,20 +419,20 @@ async function provisionRepo(sandboxOrOpts, maybeOpts) {
|
|
|
736
419
|
throw new RepoProvisionError(instanceId, `invalid ref: must not begin with '-' (got ${ref})`);
|
|
737
420
|
}
|
|
738
421
|
const clone = await sandbox.execute(
|
|
739
|
-
`git -c protocol.ext.allow=never clone --quiet -- ${shellEscapePosix(repoUrl)} ${shellEscapePosix(instanceId)}`
|
|
422
|
+
`git -c protocol.ext.allow=never clone --quiet -- ${chunkS7OEXQMI_cjs.shellEscapePosix(repoUrl)} ${chunkS7OEXQMI_cjs.shellEscapePosix(instanceId)}`
|
|
740
423
|
);
|
|
741
424
|
if (clone.exitCode !== 0) {
|
|
742
425
|
throw new RepoProvisionError(instanceId, `clone failed: ${clone.stderr.trim()}`);
|
|
743
426
|
}
|
|
744
427
|
const top = await sandbox.execute(
|
|
745
|
-
`git -C ${shellEscapePosix(instanceId)} rev-parse --show-toplevel`
|
|
428
|
+
`git -C ${chunkS7OEXQMI_cjs.shellEscapePosix(instanceId)} rev-parse --show-toplevel`
|
|
746
429
|
);
|
|
747
430
|
if (top.exitCode !== 0) {
|
|
748
431
|
throw new RepoProvisionError(instanceId, `resolve repoDir failed: ${top.stderr.trim()}`);
|
|
749
432
|
}
|
|
750
433
|
const repoDir = top.stdout.trim();
|
|
751
434
|
const checkout = await sandbox.execute(
|
|
752
|
-
`git -C ${shellEscapePosix(repoDir)} checkout --quiet ${shellEscapePosix(ref)}`
|
|
435
|
+
`git -C ${chunkS7OEXQMI_cjs.shellEscapePosix(repoDir)} checkout --quiet ${chunkS7OEXQMI_cjs.shellEscapePosix(ref)}`
|
|
753
436
|
);
|
|
754
437
|
if (checkout.exitCode !== 0) {
|
|
755
438
|
throw new RepoProvisionError(instanceId, `checkout ${ref} failed: ${checkout.stderr.trim()}`);
|
|
@@ -757,12 +440,28 @@ async function provisionRepo(sandboxOrOpts, maybeOpts) {
|
|
|
757
440
|
return { repoDir };
|
|
758
441
|
}
|
|
759
442
|
|
|
443
|
+
Object.defineProperty(exports, "LocalSandbox", {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
get: function () { return chunkS7OEXQMI_cjs.LocalSandbox; }
|
|
446
|
+
});
|
|
447
|
+
Object.defineProperty(exports, "SandboxBackend", {
|
|
448
|
+
enumerable: true,
|
|
449
|
+
get: function () { return chunkS7OEXQMI_cjs.SandboxBackend; }
|
|
450
|
+
});
|
|
451
|
+
Object.defineProperty(exports, "SandboxNotAvailableError", {
|
|
452
|
+
enumerable: true,
|
|
453
|
+
get: function () { return chunkS7OEXQMI_cjs.SandboxNotAvailableError; }
|
|
454
|
+
});
|
|
455
|
+
Object.defineProperty(exports, "SandboxSecurityError", {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
get: function () { return chunkS7OEXQMI_cjs.SandboxSecurityError; }
|
|
458
|
+
});
|
|
459
|
+
Object.defineProperty(exports, "resolveSandbox", {
|
|
460
|
+
enumerable: true,
|
|
461
|
+
get: function () { return chunkS7OEXQMI_cjs.resolveSandbox; }
|
|
462
|
+
});
|
|
760
463
|
exports.LinuxSandbox = LinuxSandbox;
|
|
761
|
-
exports.LocalSandbox = LocalSandbox;
|
|
762
464
|
exports.RepoProvisionError = RepoProvisionError;
|
|
763
|
-
exports.SandboxBackend = SandboxBackend;
|
|
764
|
-
exports.SandboxNotAvailableError = SandboxNotAvailableError;
|
|
765
|
-
exports.SandboxSecurityError = SandboxSecurityError;
|
|
766
465
|
exports.allowlistedEnv = allowlistedEnv;
|
|
767
466
|
exports.buildBwrapArgv = buildBwrapArgv;
|
|
768
467
|
exports.buildSeccompFilter = buildSeccompFilter;
|
|
@@ -776,7 +475,6 @@ exports.realProbes = realProbes;
|
|
|
776
475
|
exports.resetBwrapMemo = resetBwrapMemo;
|
|
777
476
|
exports.resetInteractiveWarnLatch = resetInteractiveWarnLatch;
|
|
778
477
|
exports.resetSandboxWarnLatch = resetSandboxWarnLatch;
|
|
779
|
-
exports.resolveSandbox = resolveSandbox;
|
|
780
478
|
exports.resolveSandboxPosture = resolveSandboxPosture;
|
|
781
479
|
exports.restrictedSeccompPath = restrictedSeccompPath;
|
|
782
480
|
exports.seccompPathForArch = seccompPathForArch;
|