@skaile/workspaces 5.6.1 → 5.8.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 +176 -0
- package/README.md +4 -2
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-LU7NHOAP.js → asset-feeds-EYRZR4K5.js} +55 -31
- package/dist/asset-feeds-EYRZR4K5.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +10 -10
- package/dist/asset-manager/index.js +16 -16
- package/dist/asset-manager/installer.js +12 -12
- package/dist/asset-manager/renderers.js +11 -11
- package/dist/asset-manager/src/index.d.ts +364 -30
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install-agent.d.ts +11 -0
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +6 -3
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +148 -212
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +91 -67
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +16 -17
- package/dist/bridge/drivers/continue.js.map +1 -1
- package/dist/bridge/drivers/echo.js +4 -4
- package/dist/bridge/drivers/gemini.js +8 -8
- package/dist/bridge/drivers/goose.js +16 -17
- package/dist/bridge/drivers/goose.js.map +1 -1
- package/dist/bridge/drivers/omp.js +68 -104
- package/dist/bridge/drivers/omp.js.map +1 -1
- package/dist/bridge/drivers/opencode.js +16 -17
- package/dist/bridge/drivers/opencode.js.map +1 -1
- package/dist/bridge/drivers/qwen.js +8 -8
- package/dist/bridge/index.js +17 -18
- package/dist/bridge/src/codex/managed-driver.d.ts +13 -10
- package/dist/bridge/src/codex/managed-driver.d.ts.map +1 -1
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts +12 -2
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +1 -1
- package/dist/bridge/src/drivers/claude-sdk.d.ts +37 -62
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/codex.d.ts +26 -10
- package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
- package/dist/bridge/src/drivers/continue.d.ts +2 -2
- package/dist/bridge/src/drivers/continue.d.ts.map +1 -1
- package/dist/bridge/src/drivers/gemini.d.ts +2 -2
- package/dist/bridge/src/drivers/gemini.d.ts.map +1 -1
- package/dist/bridge/src/drivers/goose.d.ts +2 -2
- package/dist/bridge/src/drivers/goose.d.ts.map +1 -1
- package/dist/bridge/src/drivers/omp.d.ts +24 -35
- package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
- package/dist/bridge/src/drivers/opencode.d.ts +2 -2
- package/dist/bridge/src/drivers/opencode.d.ts.map +1 -1
- package/dist/bridge/src/drivers/recovery-policy.d.ts +79 -0
- package/dist/bridge/src/drivers/recovery-policy.d.ts.map +1 -0
- package/dist/bridge/src/index.d.ts +1 -0
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/reconfigure-ledger.d.ts +117 -0
- package/dist/bridge/src/reconfigure-ledger.d.ts.map +1 -0
- package/dist/bridge/src/types.d.ts +57 -6
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/{chunk-OLLAQLFJ.js → chunk-2FRUUDZY.js} +5 -5
- package/dist/{chunk-OLLAQLFJ.js.map → chunk-2FRUUDZY.js.map} +1 -1
- package/dist/{chunk-SDFROXSA.js → chunk-2LWYNQK7.js} +3 -3
- package/dist/{chunk-SDFROXSA.js.map → chunk-2LWYNQK7.js.map} +1 -1
- package/dist/{chunk-TZCQ7ZWQ.js → chunk-36AFURKZ.js} +10 -11
- package/dist/chunk-36AFURKZ.js.map +1 -0
- package/dist/{chunk-MX3UQXLU.js → chunk-4MQS7CAF.js} +256 -92
- package/dist/chunk-4MQS7CAF.js.map +1 -0
- package/dist/{chunk-45VFGT7A.js → chunk-4PTSR4UU.js} +3 -3
- package/dist/{chunk-45VFGT7A.js.map → chunk-4PTSR4UU.js.map} +1 -1
- package/dist/{chunk-VX3INFBA.js → chunk-6GRX5L6A.js} +5 -5
- package/dist/{chunk-VX3INFBA.js.map → chunk-6GRX5L6A.js.map} +1 -1
- package/dist/{chunk-NFGRW3L7.js → chunk-7RGTAEG6.js} +3 -3
- package/dist/{chunk-NFGRW3L7.js.map → chunk-7RGTAEG6.js.map} +1 -1
- package/dist/{chunk-5B5IZVEP.js → chunk-AWQYXZVG.js} +15 -6
- package/dist/chunk-AWQYXZVG.js.map +1 -0
- package/dist/{chunk-XBSQ4KMC.js → chunk-B4X2N7JQ.js} +205 -3
- package/dist/chunk-B4X2N7JQ.js.map +1 -0
- package/dist/{chunk-FRHE7FFB.js → chunk-B6GIW55K.js} +5 -3
- package/dist/chunk-B6GIW55K.js.map +1 -0
- package/dist/{chunk-LLKKLKZJ.js → chunk-BJNUNQAW.js} +3 -3
- package/dist/{chunk-LLKKLKZJ.js.map → chunk-BJNUNQAW.js.map} +1 -1
- package/dist/{chunk-7ZHLYXTI.js → chunk-BTE2V4IW.js} +3 -3
- package/dist/{chunk-7ZHLYXTI.js.map → chunk-BTE2V4IW.js.map} +1 -1
- package/dist/{chunk-ZBBM6O6P.js → chunk-CGT45WN7.js} +3 -3
- package/dist/{chunk-ZBBM6O6P.js.map → chunk-CGT45WN7.js.map} +1 -1
- package/dist/{chunk-47ZD34KB.js → chunk-CIFS5K6T.js} +3 -3
- package/dist/{chunk-47ZD34KB.js.map → chunk-CIFS5K6T.js.map} +1 -1
- package/dist/{chunk-BTISGSK4.js → chunk-CKQEIY43.js} +4 -4
- package/dist/{chunk-BTISGSK4.js.map → chunk-CKQEIY43.js.map} +1 -1
- package/dist/{chunk-KXTO7HON.js → chunk-EAZECHPM.js} +3 -3
- package/dist/{chunk-KXTO7HON.js.map → chunk-EAZECHPM.js.map} +1 -1
- package/dist/{chunk-VKSXST23.js → chunk-EF7NPDDU.js} +4 -4
- package/dist/{chunk-VKSXST23.js.map → chunk-EF7NPDDU.js.map} +1 -1
- package/dist/chunk-EPBKISS5.js +84 -0
- package/dist/chunk-EPBKISS5.js.map +1 -0
- package/dist/{chunk-VJENKWXF.js → chunk-F2EKONM7.js} +3 -3
- package/dist/{chunk-VJENKWXF.js.map → chunk-F2EKONM7.js.map} +1 -1
- package/dist/{chunk-DMLDYFDS.js → chunk-F3RDEH5U.js} +7 -4
- package/dist/chunk-F3RDEH5U.js.map +1 -0
- package/dist/{chunk-UAP2XHRF.js → chunk-FTJJO3EM.js} +39 -29
- package/dist/chunk-FTJJO3EM.js.map +1 -0
- package/dist/{chunk-2GRB5ITE.js → chunk-FVJK4QWM.js} +4 -4
- package/dist/{chunk-2GRB5ITE.js.map → chunk-FVJK4QWM.js.map} +1 -1
- package/dist/{chunk-AOAZCSDI.js → chunk-FZNG4V4J.js} +16 -30
- package/dist/chunk-FZNG4V4J.js.map +1 -0
- package/dist/{chunk-BF33SCLY.js → chunk-GB7WDMH2.js} +4 -4
- package/dist/{chunk-BF33SCLY.js.map → chunk-GB7WDMH2.js.map} +1 -1
- package/dist/{chunk-NARITJS2.js → chunk-GCICGXDD.js} +3 -3
- package/dist/{chunk-NARITJS2.js.map → chunk-GCICGXDD.js.map} +1 -1
- package/dist/{chunk-PA7WLID3.js → chunk-GTILM2CI.js} +56 -5
- package/dist/chunk-GTILM2CI.js.map +1 -0
- package/dist/{chunk-WIHQWVWL.js → chunk-GXXFLBUQ.js} +26 -27
- package/dist/chunk-GXXFLBUQ.js.map +1 -0
- package/dist/{chunk-PTO2YDDG.js → chunk-H7QUDDKH.js} +1337 -168
- package/dist/chunk-H7QUDDKH.js.map +1 -0
- package/dist/{chunk-I4QBZLOR.js → chunk-HG34RNTK.js} +7 -13
- package/dist/chunk-HG34RNTK.js.map +1 -0
- package/dist/{chunk-65EYRFZJ.js → chunk-HYDRDNKN.js} +10 -6
- package/dist/chunk-HYDRDNKN.js.map +1 -0
- package/dist/{chunk-4GNJELPH.js → chunk-I6NLLJHZ.js} +2 -2
- package/dist/{chunk-4GNJELPH.js.map → chunk-I6NLLJHZ.js.map} +1 -1
- package/dist/{chunk-VSQFGU5D.js → chunk-ILFGVSTJ.js} +3 -3
- package/dist/{chunk-VSQFGU5D.js.map → chunk-ILFGVSTJ.js.map} +1 -1
- package/dist/{chunk-2XFUXGV6.js → chunk-IONAUNWB.js} +3 -3
- package/dist/{chunk-2XFUXGV6.js.map → chunk-IONAUNWB.js.map} +1 -1
- package/dist/{chunk-CT6NQSA4.js → chunk-ISHJITXJ.js} +3 -3
- package/dist/{chunk-CT6NQSA4.js.map → chunk-ISHJITXJ.js.map} +1 -1
- package/dist/chunk-IZCR27MU.js +60 -0
- package/dist/chunk-IZCR27MU.js.map +1 -0
- package/dist/{chunk-2W4LBLIN.js → chunk-JAKOMFC6.js} +68 -20
- package/dist/chunk-JAKOMFC6.js.map +1 -0
- package/dist/{chunk-MFHKHXDE.js → chunk-L5VSIPQD.js} +5 -5
- package/dist/chunk-L5VSIPQD.js.map +1 -0
- package/dist/{chunk-RGXVQZOV.js → chunk-LEMHVDET.js} +89 -67
- package/dist/chunk-LEMHVDET.js.map +1 -0
- package/dist/{chunk-37FTLYFP.js → chunk-LNFKL23K.js} +3 -3
- package/dist/{chunk-37FTLYFP.js.map → chunk-LNFKL23K.js.map} +1 -1
- package/dist/{chunk-6NPINANG.js → chunk-LSXHED6I.js} +6 -6
- package/dist/{chunk-6NPINANG.js.map → chunk-LSXHED6I.js.map} +1 -1
- package/dist/{chunk-XUUYAS3Z.js → chunk-M3WPBTGJ.js} +3 -3
- package/dist/{chunk-XUUYAS3Z.js.map → chunk-M3WPBTGJ.js.map} +1 -1
- package/dist/{chunk-QZLWJETK.js → chunk-MGGFBZWA.js} +3 -3
- package/dist/{chunk-QZLWJETK.js.map → chunk-MGGFBZWA.js.map} +1 -1
- package/dist/{chunk-QD772CGQ.js → chunk-NPLPCRW5.js} +5 -5
- package/dist/{chunk-QD772CGQ.js.map → chunk-NPLPCRW5.js.map} +1 -1
- package/dist/{chunk-QCI6D7E4.js → chunk-NUELZWCF.js} +266 -170
- package/dist/chunk-NUELZWCF.js.map +1 -0
- package/dist/{chunk-GP6ZL7PE.js → chunk-OFBIWVCR.js} +3 -3
- package/dist/{chunk-GP6ZL7PE.js.map → chunk-OFBIWVCR.js.map} +1 -1
- package/dist/{chunk-D2V42LUE.js → chunk-P23M65LB.js} +93 -52
- package/dist/chunk-P23M65LB.js.map +1 -0
- package/dist/{chunk-46OVMT76.js → chunk-PMECEZK3.js} +16 -10
- package/dist/chunk-PMECEZK3.js.map +1 -0
- package/dist/{chunk-27HS2DHB.js → chunk-PTSGWKHR.js} +4 -4
- package/dist/{chunk-27HS2DHB.js.map → chunk-PTSGWKHR.js.map} +1 -1
- package/dist/{chunk-OKGUDNDT.js → chunk-Q6E6FM7P.js} +35 -33
- package/dist/chunk-Q6E6FM7P.js.map +1 -0
- package/dist/{chunk-PJS2YWGG.js → chunk-QOP6KDFR.js} +8 -9
- package/dist/chunk-QOP6KDFR.js.map +1 -0
- package/dist/{chunk-AO7VJ6G6.js → chunk-QVNRCDTV.js} +29 -8
- package/dist/chunk-QVNRCDTV.js.map +1 -0
- package/dist/{chunk-VBBBZDI7.js → chunk-S53LOR7B.js} +3 -3
- package/dist/{chunk-VBBBZDI7.js.map → chunk-S53LOR7B.js.map} +1 -1
- package/dist/{chunk-KUFNKVBM.js → chunk-SH5D7U7N.js} +20 -7
- package/dist/{chunk-KUFNKVBM.js.map → chunk-SH5D7U7N.js.map} +1 -1
- package/dist/{chunk-SX4UIDKT.js → chunk-UAROCOXF.js} +3 -3
- package/dist/{chunk-SX4UIDKT.js.map → chunk-UAROCOXF.js.map} +1 -1
- package/dist/{chunk-JMKB7IB4.js → chunk-UMVKJM4Q.js} +4 -4
- package/dist/chunk-UMVKJM4Q.js.map +1 -0
- package/dist/{chunk-HCYS7GFP.js → chunk-V2DXZYBB.js} +3 -3
- package/dist/{chunk-HCYS7GFP.js.map → chunk-V2DXZYBB.js.map} +1 -1
- package/dist/{chunk-KYXOGHY6.js → chunk-W5DWWE4Y.js} +4 -4
- package/dist/{chunk-KYXOGHY6.js.map → chunk-W5DWWE4Y.js.map} +1 -1
- package/dist/{chunk-FK6HPLQA.js → chunk-WTQ3TATB.js} +3 -3
- package/dist/{chunk-FK6HPLQA.js.map → chunk-WTQ3TATB.js.map} +1 -1
- package/dist/{chunk-OGLDAJFL.js → chunk-Y4N2NUZD.js} +4 -4
- package/dist/{chunk-OGLDAJFL.js.map → chunk-Y4N2NUZD.js.map} +1 -1
- package/dist/{chunk-XOGG7VDZ.js → chunk-Y7QA2OLD.js} +17 -25
- package/dist/chunk-Y7QA2OLD.js.map +1 -0
- package/dist/{chunk-2KOKBTR4.js → chunk-YSHVQGUS.js} +123 -28
- package/dist/chunk-YSHVQGUS.js.map +1 -0
- package/dist/chunk-ZAOGFXDO.js +112 -0
- package/dist/chunk-ZAOGFXDO.js.map +1 -0
- package/dist/{chunk-7KLC4LZO.js → chunk-ZKSJMZKD.js} +17 -13
- package/dist/chunk-ZKSJMZKD.js.map +1 -0
- package/dist/cli/index.js +1169 -672
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts +5 -2
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +27 -5
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +49 -4
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts +9 -0
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +8 -2
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts +10 -4
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +15 -4
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/publish-core.d.ts +10 -1
- package/dist/cli/src/commands/publish-core.d.ts.map +1 -1
- package/dist/cli/src/commands/session.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +18 -3
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/tree.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts +8 -5
- package/dist/cli/src/flow-discovery.d.ts.map +1 -1
- package/dist/cli/src/open-library.d.ts +0 -11
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +30 -10
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +26 -27
- package/dist/connectors/src/access-policy.d.ts +33 -0
- package/dist/connectors/src/access-policy.d.ts.map +1 -0
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +2 -0
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors-O6Y6VESP.js +44 -0
- package/dist/{connectors-HWENZFKW.js.map → connectors-O6Y6VESP.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/index.js +9 -9
- package/dist/core/logging.js +1 -1
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +6 -6
- package/dist/core/src/cache-paths.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +4 -4
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +3 -3
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/logging/config.d.ts +9 -1
- package/dist/core/src/logging/config.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +17 -2
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +22 -6
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +41 -6
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/store.d.ts +16 -2
- package/dist/core/src/store.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +10 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +5 -5
- package/dist/deploy/index.js +9 -9
- package/dist/discovery/index.js +5 -5
- package/dist/discovery/src/index.d.ts +1 -1
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/source-config.d.ts +12 -0
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-DSTSXJWK.js → ensure-sources-SKLNM4UZ.js} +19 -19
- package/dist/{ensure-sources-DSTSXJWK.js.map → ensure-sources-SKLNM4UZ.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +26 -27
- package/dist/factory-assets/connectors/deploy.js +26 -27
- package/dist/factory-assets/connectors/devserver.js +26 -27
- package/dist/factory-assets/connectors/flow/adapter.d.ts +6 -0
- package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/adapter.js +26 -27
- package/dist/factory-assets/connectors/flow/contract/expression.d.ts +3 -0
- package/dist/factory-assets/connectors/flow/contract/expression.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract.js +4 -4
- package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts +4 -3
- package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts +6 -1
- package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +13 -13
- package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/prompt-fragments.js +3 -3
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +28 -29
- package/dist/factory-assets/connectors/flow.js +26 -27
- package/dist/factory-assets/connectors/git/config.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +26 -27
- package/dist/factory-assets/connectors/gmail.js +26 -27
- package/dist/factory-assets/connectors/googledrive.js +26 -27
- package/dist/factory-assets/connectors/local.js +26 -27
- package/dist/factory-assets/connectors/mattermost.js +26 -27
- package/dist/factory-assets/connectors/memory.js +26 -27
- package/dist/factory-assets/connectors/minio.js +26 -27
- package/dist/factory-assets/connectors/postgres.js +26 -27
- package/dist/factory-assets/connectors/s3.js +26 -27
- package/dist/factory-assets/connectors/sharepoint.js +26 -27
- package/dist/factory-assets/connectors/sqlite.js +26 -27
- package/dist/factory-assets/connectors/static-server.js +26 -27
- package/dist/factory-assets/connectors/tunnel.js +26 -27
- package/dist/factory-assets/connectors/webdav.js +26 -27
- package/dist/factory-assets/connectors/xstate-store.js +26 -27
- package/dist/factory-assets/connectors/xstate.js +26 -27
- package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +10 -7
- package/dist/flows-CBYRSAGS.js +26 -0
- package/dist/{flows-ENQY2DV7.js.map → flows-CBYRSAGS.js.map} +1 -1
- package/dist/{helpers-R44RUTDY.js → helpers-MWZDRBLD.js} +19 -19
- package/dist/{helpers-R44RUTDY.js.map → helpers-MWZDRBLD.js.map} +1 -1
- package/dist/library/index.js +13 -13
- package/dist/library/install.js +3 -3
- package/dist/library/src/index.d.ts +5 -3
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/local/library-manager.d.ts +6 -0
- package/dist/library/src/local/library-manager.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +5 -2
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/local/scan-authoring-libraries.d.ts +43 -0
- package/dist/library/src/local/scan-authoring-libraries.d.ts.map +1 -0
- package/dist/library/src/manifest-writer.d.ts +46 -1
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts +12 -0
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/{library-publish-LFOJJVMK.js → library-publish-PICMDSB2.js} +129 -49
- package/dist/library-publish-PICMDSB2.js.map +1 -0
- package/dist/open-library-OG457THY.js +40 -0
- package/dist/{open-library-4WUMQHES.js.map → open-library-OG457THY.js.map} +1 -1
- package/dist/open-registry-ZUZJ7MS7.js +32 -0
- package/dist/{open-registry-NVPCQPND.js.map → open-registry-ZUZJ7MS7.js.map} +1 -1
- package/dist/paths-FQ64OLJG.js +22 -0
- package/dist/{paths-YUCP7K6U.js.map → paths-FQ64OLJG.js.map} +1 -1
- package/dist/{plugin-store-66QFBNEO.js → plugin-store-MPAMD5OT.js} +11 -11
- package/dist/{plugin-store-66QFBNEO.js.map → plugin-store-MPAMD5OT.js.map} +1 -1
- package/dist/project-2GFT5LEZ.js +41 -0
- package/dist/{project-VMOHUXBD.js.map → project-2GFT5LEZ.js.map} +1 -1
- package/dist/resolver/index.js +10 -10
- package/dist/runner/index.js +41 -42
- package/dist/runner/src/logging-bootstrap.d.ts +6 -0
- package/dist/runner/src/logging-bootstrap.d.ts.map +1 -1
- package/dist/runner/src/reconfigure-handler.d.ts +38 -17
- package/dist/runner/src/reconfigure-handler.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-capability-wiring.d.ts +0 -2
- package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +16 -16
- package/dist/sdk/bridge.js +17 -18
- package/dist/sdk/core.js +9 -9
- package/dist/sdk/flow.js +13 -13
- package/dist/sdk/index.js +69 -46
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +10 -10
- package/dist/sdk/runner.js +41 -42
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/src/agent-session.d.ts +8 -0
- package/dist/sdk/src/agent-session.d.ts.map +1 -1
- package/dist/sdk/store.js +2 -1
- package/dist/sdk/types.js +1 -1
- package/dist/secrets/index.js +2 -2
- package/dist/session/index.js +2 -2
- package/dist/{setup-PYY23HGZ.js → setup-WHMCSIF2.js} +27 -28
- package/dist/setup-WHMCSIF2.js.map +1 -0
- package/dist/skills-TVO26Y4V.js +26 -0
- package/dist/{skills-CS7NE5TT.js.map → skills-TVO26Y4V.js.map} +1 -1
- package/dist/source-LKOFTOEK.js +41 -0
- package/dist/{source-JCF6KSQN.js.map → source-LKOFTOEK.js.map} +1 -1
- package/dist/{source-manifest-publish-O6P7G2M7.js → source-manifest-publish-L5J3QXER.js} +28 -28
- package/dist/{source-manifest-publish-O6P7G2M7.js.map → source-manifest-publish-L5J3QXER.js.map} +1 -1
- package/dist/store/index.js +2 -1
- package/dist/store/src/store.d.ts +8 -5
- package/dist/store/src/store.d.ts.map +1 -1
- package/dist/tui/index.js +41 -42
- package/dist/tui/index.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/ask-slots.d.ts +68 -0
- package/dist/types/src/ask-slots.d.ts.map +1 -0
- package/dist/types/src/delivery.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +29 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/manifests/index.d.ts +1 -1
- package/dist/types/src/manifests/index.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +4 -0
- package/dist/types/src/manifests/preset.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +12 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +33 -34
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +2 -2
- package/package.json +1 -1
- package/dist/asset-feeds-LU7NHOAP.js.map +0 -1
- package/dist/chunk-2KOKBTR4.js.map +0 -1
- package/dist/chunk-2NYXQYHN.js +0 -22
- package/dist/chunk-2NYXQYHN.js.map +0 -1
- package/dist/chunk-2W4LBLIN.js.map +0 -1
- package/dist/chunk-46OVMT76.js.map +0 -1
- package/dist/chunk-5B5IZVEP.js.map +0 -1
- package/dist/chunk-65EYRFZJ.js.map +0 -1
- package/dist/chunk-7KLC4LZO.js.map +0 -1
- package/dist/chunk-AO7VJ6G6.js.map +0 -1
- package/dist/chunk-AOAZCSDI.js.map +0 -1
- package/dist/chunk-D2V42LUE.js.map +0 -1
- package/dist/chunk-DMLDYFDS.js.map +0 -1
- package/dist/chunk-EINLFFP6.js +0 -59
- package/dist/chunk-EINLFFP6.js.map +0 -1
- package/dist/chunk-FRHE7FFB.js.map +0 -1
- package/dist/chunk-I4QBZLOR.js.map +0 -1
- package/dist/chunk-JMKB7IB4.js.map +0 -1
- package/dist/chunk-MFHKHXDE.js.map +0 -1
- package/dist/chunk-MX3UQXLU.js.map +0 -1
- package/dist/chunk-OKGUDNDT.js.map +0 -1
- package/dist/chunk-PA7WLID3.js.map +0 -1
- package/dist/chunk-PJS2YWGG.js.map +0 -1
- package/dist/chunk-PTO2YDDG.js.map +0 -1
- package/dist/chunk-QCI6D7E4.js.map +0 -1
- package/dist/chunk-RGXVQZOV.js.map +0 -1
- package/dist/chunk-TZCQ7ZWQ.js.map +0 -1
- package/dist/chunk-UAP2XHRF.js.map +0 -1
- package/dist/chunk-WIHQWVWL.js.map +0 -1
- package/dist/chunk-XBSQ4KMC.js.map +0 -1
- package/dist/chunk-XOGG7VDZ.js.map +0 -1
- package/dist/connectors-HWENZFKW.js +0 -45
- package/dist/flows-ENQY2DV7.js +0 -26
- package/dist/library-publish-LFOJJVMK.js.map +0 -1
- package/dist/open-library-4WUMQHES.js +0 -40
- package/dist/open-registry-NVPCQPND.js +0 -32
- package/dist/paths-YUCP7K6U.js +0 -22
- package/dist/project-VMOHUXBD.js +0 -41
- package/dist/setup-PYY23HGZ.js.map +0 -1
- package/dist/skills-CS7NE5TT.js +0 -26
- package/dist/source-JCF6KSQN.js +0 -41
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { formatDroppedToolsNotice, filterInProcessMcpServerTools, checkToolPropertyKeys } from '../../chunk-X5O56UO4.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { freshBudget, isFirstAttempt, spend, isSpent, decide, isAvailable } from '../../chunk-IZCR27MU.js';
|
|
3
|
+
import { AskSlots } from '../../chunk-EPBKISS5.js';
|
|
4
|
+
import { scrubPoisonedTranscript, transcriptStoreForRuntime, resolveClaudeConfigDir, claudeEndpointMode, buildClaudeEndpointEnv } from '../../chunk-S53LOR7B.js';
|
|
5
|
+
import { dispatchCapability } from '../../chunk-GCICGXDD.js';
|
|
6
|
+
import { fetchProviderModels } from '../../chunk-PTSGWKHR.js';
|
|
7
|
+
import { ReconfigureLedger, AuthError, stripRunnerPrivateEnv, classifyClaudeSdkError, reclassifyAuthAsAccountUnavailable, AccountUnavailableError, isLongContextEntitlementRejection, LONG_CONTEXT_CREDITS_API_ERROR } from '../../chunk-B4X2N7JQ.js';
|
|
7
8
|
import { agentExecRequested, wrapAgentCommand, resolveAgentExec } from '../../chunk-YROR332M.js';
|
|
8
|
-
import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger, entryCredentialValue, registryDriverConfig } from '../../chunk-
|
|
9
|
+
import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger, entryCredentialValue, registryDriverConfig } from '../../chunk-AWQYXZVG.js';
|
|
9
10
|
import '../../chunk-6E6PKKAD.js';
|
|
10
|
-
import { withActivityLabelShape } from '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
12
|
-
import '../../chunk-
|
|
11
|
+
import { withActivityLabelShape } from '../../chunk-F3RDEH5U.js';
|
|
12
|
+
import '../../chunk-B6GIW55K.js';
|
|
13
|
+
import '../../chunk-36AFURKZ.js';
|
|
13
14
|
import '../../chunk-4GY63JU6.js';
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
15
|
+
import '../../chunk-GB7WDMH2.js';
|
|
16
|
+
import '../../chunk-PMECEZK3.js';
|
|
16
17
|
import '../../chunk-5BEFNLOR.js';
|
|
17
18
|
import '../../chunk-A2ULN3KX.js';
|
|
18
|
-
import '../../chunk-
|
|
19
|
-
import '../../chunk-
|
|
19
|
+
import '../../chunk-JAKOMFC6.js';
|
|
20
|
+
import '../../chunk-L5VSIPQD.js';
|
|
20
21
|
import '../../chunk-CPSIPIX7.js';
|
|
21
|
-
import '../../chunk-
|
|
22
|
+
import '../../chunk-BTE2V4IW.js';
|
|
22
23
|
import '../../chunk-RVRB27AN.js';
|
|
23
|
-
import '../../chunk-
|
|
24
|
-
import '../../chunk-
|
|
24
|
+
import '../../chunk-GTILM2CI.js';
|
|
25
|
+
import '../../chunk-QVNRCDTV.js';
|
|
25
26
|
import '../../chunk-ICSCSM5D.js';
|
|
26
|
-
import '../../chunk-
|
|
27
|
+
import '../../chunk-UMVKJM4Q.js';
|
|
27
28
|
import { mergeRegistries, parseModelRef, isEntryEnabled, resolveEntryBaseUrl } from '../../chunk-MJHSLODD.js';
|
|
28
29
|
import '../../chunk-C3CAXQMA.js';
|
|
29
30
|
import { createLogger } from '../../chunk-BOFL7GIF.js';
|
|
@@ -305,9 +306,6 @@ if (typeof globalThis.require === "undefined") {
|
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
var LIVE_SET_MODEL_TIMEOUT_MS = 5e3;
|
|
308
|
-
function freshRetryBudget() {
|
|
309
|
-
return { staleResume: false, poison: false, auth: false, queryEnded: false, limit: false };
|
|
310
|
-
}
|
|
311
309
|
function isSeatCapacityFailure(detail, subtype) {
|
|
312
310
|
if (detail.category !== "rate_limit") return false;
|
|
313
311
|
if (subtype === "error_max_budget_usd") return false;
|
|
@@ -357,10 +355,6 @@ function apiErrorExcerpt(text) {
|
|
|
357
355
|
).replace(/\b(access_token|api_key|token|key|sig|signature)=[^\s&"]+/gi, "$1=[redacted]").replace(/\b(sk-ant-|sk-)[A-Za-z0-9_-]{6,}/g, "[redacted]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g, "[redacted]");
|
|
358
356
|
return masked.length > API_ERROR_EXCERPT_MAX ? `${masked.slice(0, API_ERROR_EXCERPT_MAX)}\u2026` : masked;
|
|
359
357
|
}
|
|
360
|
-
var STALE_RESUME_PATTERN = /No conversation found with session ID/i;
|
|
361
|
-
function isPoisonedHistoryError(message) {
|
|
362
|
-
return /invalid_request_error/i.test(message) && /media[_ ]?type|could not process image|image exceeds|cache_control/i.test(message);
|
|
363
|
-
}
|
|
364
358
|
function snapshotProcessEnv() {
|
|
365
359
|
const env = {};
|
|
366
360
|
for (const [k, v] of Object.entries(process.env)) {
|
|
@@ -559,10 +553,6 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
559
553
|
* {@link shouldRecycleQuery}; reset on every fresh spawn.
|
|
560
554
|
*/
|
|
561
555
|
lastNumTurns = null;
|
|
562
|
-
/** What the resident query runs; `null` until the first spawn. */
|
|
563
|
-
liveQueryConfig = null;
|
|
564
|
-
/** A config change the resident query cannot take live: respawn at the next turn. */
|
|
565
|
-
recycleForConfig = false;
|
|
566
556
|
/**
|
|
567
557
|
* The capability tool set the resident query's `skaile-capabilities` server
|
|
568
558
|
* was built from ({@link capabilityToolsKey}); `null` without capability hooks.
|
|
@@ -571,8 +561,8 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
571
561
|
* respawn rebuilds the server — see {@link capabilityToolsChanged}.
|
|
572
562
|
*/
|
|
573
563
|
liveCapabilityToolsKey = null;
|
|
574
|
-
/**
|
|
575
|
-
|
|
564
|
+
/** Owns the desired config, drift and ordering of live reconfigures. */
|
|
565
|
+
reconfig;
|
|
576
566
|
/** {@link LIVE_SET_MODEL_TIMEOUT_MS}, as a field so tests can shorten it. */
|
|
577
567
|
setModelTimeoutMs = LIVE_SET_MODEL_TIMEOUT_MS;
|
|
578
568
|
/**
|
|
@@ -607,30 +597,24 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
607
597
|
*/
|
|
608
598
|
errorResultGraceTimer = null;
|
|
609
599
|
/**
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
* been spent.
|
|
613
|
-
*
|
|
600
|
+
* The in-flight turn's recovery budget: which one-shot recoveries (stale
|
|
601
|
+
* resume, poison scrub, auth refresh, limit failover, query-ended replay) have
|
|
602
|
+
* been spent. Owned by the recovery policy; the single source for "was this
|
|
603
|
+
* kind already spent?" and "is it still available?".
|
|
614
604
|
*
|
|
615
605
|
* Set unconditionally at the top of every {@link runPrompt} attempt; never
|
|
616
|
-
* reset elsewhere — the next
|
|
617
|
-
*/
|
|
618
|
-
authSelfHealUsed = false;
|
|
619
|
-
/**
|
|
620
|
-
* Mirror of the in-flight turn's seat-failover budget — same contract as
|
|
621
|
-
* {@link authSelfHealUsed}, for the `onLimitBlocked` path.
|
|
622
|
-
*/
|
|
623
|
-
limitFailoverUsed = false;
|
|
624
|
-
/**
|
|
625
|
-
* Mirror of the in-flight turn's stale-resume retry budget — same contract as
|
|
626
|
-
* {@link authSelfHealUsed}, for the "No conversation found" fresh-session retry.
|
|
606
|
+
* reset elsewhere — the next attempt's set is the only legitimate transition.
|
|
627
607
|
*/
|
|
628
|
-
|
|
608
|
+
recoveryBudget = freshBudget();
|
|
629
609
|
/**
|
|
630
|
-
*
|
|
631
|
-
*
|
|
610
|
+
* The recovery policy's answer for the failure that rejected this attempt,
|
|
611
|
+
* recorded where the failure was classified ({@link failTurn}, or the
|
|
612
|
+
* dispatch-failure site in {@link consumeMessages}). {@link failTurn} defers
|
|
613
|
+
* the error event on it and {@link runPrompt}'s catch carries it out — the
|
|
614
|
+
* policy is never consulted a second time for the same failure. `null` until
|
|
615
|
+
* a failure is recorded; cleared at every attempt start and turn end.
|
|
632
616
|
*/
|
|
633
|
-
|
|
617
|
+
recoveryDecision = null;
|
|
634
618
|
/**
|
|
635
619
|
* Set when THIS attempt saw an upstream usage-limit rejection: either the
|
|
636
620
|
* SDK's `rate_limit_event` telemetry with `status: "rejected"`, or an error
|
|
@@ -775,6 +759,13 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
775
759
|
constructor(config) {
|
|
776
760
|
super();
|
|
777
761
|
this.config = config;
|
|
762
|
+
this.reconfig = new ReconfigureLedger({
|
|
763
|
+
config: () => this.config,
|
|
764
|
+
isLive: () => this.query != null,
|
|
765
|
+
isIdle: () => !this.running,
|
|
766
|
+
applyLive: (delta, live) => this.applyLive(delta, live),
|
|
767
|
+
log: this.log
|
|
768
|
+
});
|
|
778
769
|
}
|
|
779
770
|
get runtimeSessionId() {
|
|
780
771
|
return this.sessionId || void 0;
|
|
@@ -786,76 +777,35 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
786
777
|
* applies at the start of the next one, as omp does). A change it cannot take
|
|
787
778
|
* live (thinking/effort, a model on another registry entry, a rejected or
|
|
788
779
|
* timed-out `setModel`) recycles the query at the next turn boundary, so the
|
|
789
|
-
* fresh CLI resumes with the new config.
|
|
780
|
+
* fresh CLI resumes with the new config. The {@link ReconfigureLedger} owns
|
|
781
|
+
* the scope rule, ordering and drift; {@link applyLive} is this driver's hook.
|
|
790
782
|
*/
|
|
791
783
|
reconfigure(patch) {
|
|
792
|
-
|
|
793
|
-
const scope = scopeReconfigureModel({
|
|
794
|
-
model: patch.model,
|
|
795
|
-
modelRef: this.config.modelRef,
|
|
796
|
-
registry: this.config.registry,
|
|
797
|
-
roles: this.config.roles
|
|
798
|
-
});
|
|
799
|
-
if (scope.ok) {
|
|
800
|
-
this.config.model = patch.model;
|
|
801
|
-
if (scope.modelRef !== void 0) this.config.modelRef = scope.modelRef;
|
|
802
|
-
} else {
|
|
803
|
-
this.log.warn("model change refused; keeping the current model", {
|
|
804
|
-
model: patch.model,
|
|
805
|
-
providerId: scope.providerId
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
if (patch.thinking !== void 0) this.config.thinking = patch.thinking;
|
|
810
|
-
if (patch.effort !== void 0) this.config.effort = patch.effort;
|
|
811
|
-
if (this.query && !this.running) void this.syncLiveQueryConfig();
|
|
812
|
-
}
|
|
813
|
-
/** Whether the driver config moved away from what the resident query runs. */
|
|
814
|
-
liveConfigDrifted() {
|
|
815
|
-
const live = this.liveQueryConfig;
|
|
816
|
-
if (!this.query || !live) return false;
|
|
817
|
-
const { model, modelRef, thinking, effort } = this.config;
|
|
818
|
-
return model !== live.model || modelRef !== live.modelRef || thinking !== live.thinking || effort !== live.effort;
|
|
819
|
-
}
|
|
820
|
-
/** Queue {@link applyConfigToLiveQuery} behind any switch still in flight. */
|
|
821
|
-
syncLiveQueryConfig() {
|
|
822
|
-
const next = (this.liveConfigSync ?? Promise.resolve()).then(
|
|
823
|
-
() => this.applyConfigToLiveQuery()
|
|
824
|
-
);
|
|
825
|
-
this.liveConfigSync = next;
|
|
826
|
-
void next.finally(() => {
|
|
827
|
-
if (this.liveConfigSync === next) this.liveConfigSync = null;
|
|
828
|
-
});
|
|
829
|
-
return next;
|
|
784
|
+
return this.reconfig.reconfigure(patch);
|
|
830
785
|
}
|
|
831
|
-
/** Bring the resident query in line with
|
|
832
|
-
async
|
|
786
|
+
/** Bring the resident query in line with a drifted config. Never rejects. */
|
|
787
|
+
async applyLive(delta, live) {
|
|
833
788
|
const query = this.query;
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
const { model, modelRef, thinking, effort } = this.config;
|
|
837
|
-
const recycle = (reason, data = {}) => {
|
|
838
|
-
this.recycleForConfig = true;
|
|
789
|
+
if (!query) return "respawn";
|
|
790
|
+
const respawn = (reason, data = {}) => {
|
|
839
791
|
this.log.info("config change needs a fresh query; recycling at the next turn", {
|
|
840
792
|
reason,
|
|
841
793
|
...data
|
|
842
794
|
});
|
|
795
|
+
return "respawn";
|
|
843
796
|
};
|
|
844
797
|
try {
|
|
845
|
-
if (thinking !==
|
|
846
|
-
|
|
847
|
-
return;
|
|
798
|
+
if (delta.thinking !== void 0 || delta.effort !== void 0) {
|
|
799
|
+
return respawn("thinking_or_effort");
|
|
848
800
|
}
|
|
849
801
|
const endpoint = this.resolveEndpoint();
|
|
850
802
|
if (endpoint.providerId !== live.providerId) {
|
|
851
|
-
|
|
852
|
-
return;
|
|
803
|
+
return respawn("provider_changed", { from: live.providerId, to: endpoint.providerId });
|
|
853
804
|
}
|
|
854
|
-
const providerModel = endpoint.model || model || "sonnet";
|
|
805
|
+
const providerModel = endpoint.model || this.config.model || "sonnet";
|
|
855
806
|
if (providerModel !== live.providerModel) {
|
|
856
807
|
if (this.inputStream == null || this.inputStream.ended || this.shouldRecycleQuery()) {
|
|
857
|
-
|
|
858
|
-
return;
|
|
808
|
+
return respawn("query_due_for_recycle");
|
|
859
809
|
}
|
|
860
810
|
let timer;
|
|
861
811
|
try {
|
|
@@ -871,17 +821,18 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
871
821
|
} finally {
|
|
872
822
|
clearTimeout(timer);
|
|
873
823
|
}
|
|
874
|
-
if (this.query !== query) return;
|
|
824
|
+
if (this.query !== query) return "applied";
|
|
875
825
|
this.log.info("switched the resident query's model", {
|
|
876
826
|
from: live.providerModel,
|
|
877
827
|
to: providerModel
|
|
878
828
|
});
|
|
829
|
+
live.providerModel = providerModel;
|
|
879
830
|
}
|
|
880
|
-
|
|
831
|
+
return "applied";
|
|
881
832
|
} catch (err) {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
}
|
|
833
|
+
return respawn("set_model_failed", {
|
|
834
|
+
error: err instanceof Error ? err.message : String(err)
|
|
835
|
+
});
|
|
885
836
|
}
|
|
886
837
|
}
|
|
887
838
|
getModel() {
|
|
@@ -920,7 +871,9 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
920
871
|
*/
|
|
921
872
|
prompt(message) {
|
|
922
873
|
this.supersedePendingQuestion();
|
|
923
|
-
const queuedPrompt = this.promptTail.then(
|
|
874
|
+
const queuedPrompt = this.promptTail.then(
|
|
875
|
+
() => this.runPrompt(message, freshBudget())
|
|
876
|
+
);
|
|
924
877
|
this.promptTail = queuedPrompt.then(
|
|
925
878
|
() => void 0,
|
|
926
879
|
() => void 0
|
|
@@ -933,13 +886,11 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
933
886
|
* Retries recurse here rather than through {@link prompt}, so they cannot
|
|
934
887
|
* enqueue behind themselves and deadlock.
|
|
935
888
|
*/
|
|
936
|
-
async runPrompt(message,
|
|
889
|
+
async runPrompt(message, budget) {
|
|
937
890
|
if (this.killed) throw new Error(KILLED_TURN_MESSAGE);
|
|
938
891
|
if (!this.sdk) await this.start();
|
|
939
|
-
this.
|
|
940
|
-
this.
|
|
941
|
-
this.staleResumeRetryUsed = _budget.staleResume;
|
|
942
|
-
this.poisonScrubUsed = _budget.poison;
|
|
892
|
+
this.recoveryBudget = budget;
|
|
893
|
+
this.recoveryDecision = null;
|
|
943
894
|
this.limitRejectionSeen = false;
|
|
944
895
|
this.limitTurnRejectedForFailover = false;
|
|
945
896
|
this.providerResponseReported = false;
|
|
@@ -948,8 +899,8 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
948
899
|
this.deferredTurnError = null;
|
|
949
900
|
this.heldFailoverResult = null;
|
|
950
901
|
let retrying = false;
|
|
951
|
-
const
|
|
952
|
-
if (
|
|
902
|
+
const isFirstAttempt2 = isFirstAttempt(budget);
|
|
903
|
+
if (isFirstAttempt2) {
|
|
953
904
|
this._lastTokens = null;
|
|
954
905
|
this._lastContextTokens = null;
|
|
955
906
|
this._lastModelUsage = null;
|
|
@@ -963,8 +914,8 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
963
914
|
this.lastApiErrorRender = null;
|
|
964
915
|
this.turnCompleted = false;
|
|
965
916
|
this.disarmErrorResultGrace();
|
|
966
|
-
|
|
967
|
-
if (this.query && (this.inputStream == null || this.inputStream.ended || this.
|
|
917
|
+
await this.reconfig.flushBeforeTurn();
|
|
918
|
+
if (this.query && (this.inputStream == null || this.inputStream.ended || this.reconfig.needsRespawn || this.shouldRecycleQuery() || this.capabilityToolsChanged())) {
|
|
968
919
|
this.recycleQueryForNextTurn();
|
|
969
920
|
}
|
|
970
921
|
const turnPromise = new Promise((resolve, reject) => {
|
|
@@ -989,35 +940,33 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
989
940
|
await turnPromise;
|
|
990
941
|
} catch (err) {
|
|
991
942
|
if (this.killed) throw err;
|
|
992
|
-
|
|
943
|
+
const decision = this.recoveryDecision;
|
|
944
|
+
const attempt = decision && "attempt" in decision ? decision.attempt : null;
|
|
945
|
+
if (attempt === "query_ended_replay") {
|
|
993
946
|
this.log.warn("turn was enqueued into an ending query; replaying on a fresh one");
|
|
994
947
|
this.retractUnfinishedText();
|
|
995
948
|
retrying = true;
|
|
996
|
-
return this.runPrompt(message,
|
|
949
|
+
return this.runPrompt(message, spend(budget, attempt));
|
|
997
950
|
}
|
|
998
|
-
|
|
999
|
-
const isStaleResume = !_budget.staleResume && STALE_RESUME_PATTERN.test(errMsg);
|
|
1000
|
-
if (isStaleResume) {
|
|
951
|
+
if (attempt === "stale_resume") {
|
|
1001
952
|
this.prepareStaleResumeRetry();
|
|
1002
953
|
retrying = true;
|
|
1003
|
-
return this.runPrompt(message,
|
|
954
|
+
return this.runPrompt(message, spend(budget, attempt));
|
|
1004
955
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
if (await this.attemptPoisonScrubRetry(poisonSessionId)) {
|
|
956
|
+
if (attempt === "poison_scrub") {
|
|
957
|
+
const poisonSessionId = this.config.resumeSessionId || this.sessionId;
|
|
958
|
+
if (poisonSessionId && await this.attemptPoisonScrubRetry(poisonSessionId)) {
|
|
1009
959
|
retrying = true;
|
|
1010
|
-
return this.runPrompt(message,
|
|
960
|
+
return this.runPrompt(message, spend(budget, attempt));
|
|
1011
961
|
}
|
|
1012
962
|
}
|
|
1013
|
-
|
|
1014
|
-
if (authOwns) {
|
|
963
|
+
if (attempt === "auth_refresh" && err instanceof AuthError) {
|
|
1015
964
|
if (await this.attemptAuthSelfHeal(err)) {
|
|
1016
965
|
this.retractUnfinishedText();
|
|
1017
966
|
retrying = true;
|
|
1018
|
-
return this.runPrompt(message,
|
|
967
|
+
return this.runPrompt(message, spend(budget, attempt));
|
|
1019
968
|
}
|
|
1020
|
-
} else if (
|
|
969
|
+
} else if (attempt === "limit_failover") {
|
|
1021
970
|
if (await this.attemptLimitFailover(err)) {
|
|
1022
971
|
if (this.abortController?.signal.aborted) {
|
|
1023
972
|
this.log.info("aborted during the seat failover; not replaying the prompt");
|
|
@@ -1030,7 +979,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
1030
979
|
this.heldFailoverResult = null;
|
|
1031
980
|
this.retractUnfinishedText();
|
|
1032
981
|
retrying = true;
|
|
1033
|
-
return this.runPrompt(message,
|
|
982
|
+
return this.runPrompt(message, spend(budget, attempt));
|
|
1034
983
|
}
|
|
1035
984
|
if (this.limitTurnRejectedForFailover) {
|
|
1036
985
|
this.emitAgentEnd();
|
|
@@ -1050,6 +999,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
1050
999
|
this.limitTurnRejectedForFailover = false;
|
|
1051
1000
|
this.lastLimitInfo = null;
|
|
1052
1001
|
this.deferredTurnError = null;
|
|
1002
|
+
this.recoveryDecision = null;
|
|
1053
1003
|
this.heldFailoverResult = null;
|
|
1054
1004
|
this.failoverUsageCarry = null;
|
|
1055
1005
|
this.suppressedAuthRenderText = null;
|
|
@@ -1788,12 +1738,11 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
1788
1738
|
};
|
|
1789
1739
|
if (apiKey) queryArgs.apiKey = apiKey;
|
|
1790
1740
|
this.query = query(queryArgs);
|
|
1791
|
-
this.
|
|
1792
|
-
this.liveQueryConfig = {
|
|
1741
|
+
this.reconfig.setSnapshot({
|
|
1793
1742
|
...spawnConfig,
|
|
1794
1743
|
providerId: endpoint.providerId,
|
|
1795
1744
|
providerModel: String(options.model)
|
|
1796
|
-
};
|
|
1745
|
+
});
|
|
1797
1746
|
this.consumeMessages().catch((err) => {
|
|
1798
1747
|
this.log.error("message loop terminated unexpectedly", err);
|
|
1799
1748
|
});
|
|
@@ -1829,6 +1778,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
1829
1778
|
resolve,
|
|
1830
1779
|
originalInput: input,
|
|
1831
1780
|
questionTexts,
|
|
1781
|
+
slots: new AskSlots(questionTexts),
|
|
1832
1782
|
answers: {}
|
|
1833
1783
|
};
|
|
1834
1784
|
opts.signal.addEventListener(
|
|
@@ -1848,11 +1798,11 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
1848
1798
|
answerQuestion(answer, question) {
|
|
1849
1799
|
const pending = this.pendingQuestion;
|
|
1850
1800
|
if (!pending) return false;
|
|
1851
|
-
const
|
|
1852
|
-
if (
|
|
1853
|
-
pending.answers[
|
|
1801
|
+
const { slot, complete } = pending.slots.answer(question);
|
|
1802
|
+
if (slot !== void 0) {
|
|
1803
|
+
pending.answers[slot] = answer;
|
|
1854
1804
|
}
|
|
1855
|
-
if (
|
|
1805
|
+
if (complete) {
|
|
1856
1806
|
this.pendingQuestion = null;
|
|
1857
1807
|
this.lastSdkMessageAt = Date.now();
|
|
1858
1808
|
pending.resolve({
|
|
@@ -2064,11 +2014,11 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2064
2014
|
this.endInputStream();
|
|
2065
2015
|
const neverDispatched = !this.turnCompleted && this.turnReject != null && !this.firstSdkMessageSeen && !this.abortController?.signal.aborted;
|
|
2066
2016
|
if (neverDispatched) {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
"The model process ended before this turn was dispatched."
|
|
2070
|
-
)
|
|
2017
|
+
const neverDispatchedErr = new QueryEndedBeforeTurnError(
|
|
2018
|
+
"The model process ended before this turn was dispatched."
|
|
2071
2019
|
);
|
|
2020
|
+
this.recoveryDecision = this.decideRecovery(neverDispatchedErr);
|
|
2021
|
+
this.rejectTurnSilently(neverDispatchedErr);
|
|
2072
2022
|
} else {
|
|
2073
2023
|
this.completeTurn();
|
|
2074
2024
|
}
|
|
@@ -2101,7 +2051,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2101
2051
|
errors: [error.message],
|
|
2102
2052
|
oauthCredential: this.usingOauthCredential
|
|
2103
2053
|
});
|
|
2104
|
-
const detail = rawDetail.category === "auth" && this.
|
|
2054
|
+
const detail = rawDetail.category === "auth" && isSpent(this.recoveryBudget, "auth_refresh") ? reclassifyAuthAsAccountUnavailable(rawDetail) : rawDetail;
|
|
2105
2055
|
this.log.error("consumer error", {
|
|
2106
2056
|
message: error.message,
|
|
2107
2057
|
category: detail.category,
|
|
@@ -2192,13 +2142,15 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2192
2142
|
* caller transitions even if the listener chain misbehaves; the emit is
|
|
2193
2143
|
* wrapped in try/catch so a listener failure cannot leak out.
|
|
2194
2144
|
*
|
|
2195
|
-
*
|
|
2196
|
-
*
|
|
2197
|
-
*
|
|
2198
|
-
*
|
|
2199
|
-
* {@link
|
|
2200
|
-
*
|
|
2201
|
-
*
|
|
2145
|
+
* Recovery deferral: the recovery policy is asked ONCE per failure
|
|
2146
|
+
* ({@link decideRecovery}) — unless the caller already decided and passes its
|
|
2147
|
+
* answer as `decided` — and the answer is recorded on the turn. When it names
|
|
2148
|
+
* an attempt, the downstream `agent-event: error` emission is deferred: the
|
|
2149
|
+
* rejected turn promise still travels to {@link runPrompt}'s catch, which
|
|
2150
|
+
* carries out that recorded attempt. If the attempt succeeds the user never
|
|
2151
|
+
* sees the failure (a 401 self-heal, a seat switch, a stale-resume replay);
|
|
2152
|
+
* if it declines, the catch emits the held-back error exactly once. A retry
|
|
2153
|
+
* that fails again is decided afresh against the spent budget, so it emits
|
|
2202
2154
|
* normally. This stops the historical "401 flashes in the UI even though
|
|
2203
2155
|
* self-heal worked" misbehaviour where the bridge emitted the error event
|
|
2204
2156
|
* before the retry decision was known.
|
|
@@ -2207,7 +2159,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2207
2159
|
* § "Runner-side handling on 401" (the AI 401 mediation path that
|
|
2208
2160
|
* exposed this hang).
|
|
2209
2161
|
*/
|
|
2210
|
-
failTurn(err, detail) {
|
|
2162
|
+
failTurn(err, detail, decided) {
|
|
2211
2163
|
this.disarmTurnStallWatchdog();
|
|
2212
2164
|
this.disarmErrorResultGrace();
|
|
2213
2165
|
const hadPendingTurn = this.turnReject != null;
|
|
@@ -2222,54 +2174,43 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2222
2174
|
error: err.message,
|
|
2223
2175
|
...detail ? { detail } : {}
|
|
2224
2176
|
};
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
this.
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
}
|
|
2236
|
-
if (hadPendingTurn && this.willFailoverOnLimit()) {
|
|
2237
|
-
this.log.info("deferring limit error event; seat failover will be attempted");
|
|
2238
|
-
this.deferredTurnError = event;
|
|
2239
|
-
return;
|
|
2240
|
-
}
|
|
2241
|
-
if (hadPendingTurn && this.willAttemptPoisonScrub(err.message)) {
|
|
2242
|
-
this.log.info("deferring poisoned-history error event; a transcript scrub will be attempted");
|
|
2243
|
-
this.deferredTurnError = event;
|
|
2244
|
-
return;
|
|
2177
|
+
if (hadPendingTurn) {
|
|
2178
|
+
const decision = decided ?? this.decideRecovery(err);
|
|
2179
|
+
this.recoveryDecision = decision;
|
|
2180
|
+
if ("attempt" in decision) {
|
|
2181
|
+
this.log.info("deferring turn error event; recovery attempt pending", {
|
|
2182
|
+
attempt: decision.attempt
|
|
2183
|
+
});
|
|
2184
|
+
this.deferredTurnError = event;
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2245
2187
|
}
|
|
2246
2188
|
this.emitTurnErrorEvent(event);
|
|
2247
2189
|
}
|
|
2248
2190
|
/**
|
|
2249
|
-
*
|
|
2250
|
-
*
|
|
2251
|
-
*
|
|
2252
|
-
* (to decide whether to reject the turn at all) — one predicate so the two
|
|
2253
|
-
* can never disagree and strand a deferred event.
|
|
2191
|
+
* Ask the recovery policy what to do about `err`. Called once per failure, by
|
|
2192
|
+
* the code that classifies it; the answer is recorded in
|
|
2193
|
+
* {@link recoveryDecision} and acted on by {@link runPrompt}'s catch.
|
|
2254
2194
|
*/
|
|
2255
|
-
|
|
2256
|
-
return
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2195
|
+
decideRecovery(err) {
|
|
2196
|
+
return decide(
|
|
2197
|
+
{
|
|
2198
|
+
message: err.message,
|
|
2199
|
+
authError: err instanceof AuthError,
|
|
2200
|
+
limitRejected: this.limitRejectionSeen,
|
|
2201
|
+
queryEnded: err instanceof QueryEndedBeforeTurnError
|
|
2202
|
+
},
|
|
2203
|
+
this.recoveryBudget,
|
|
2204
|
+
this.recoveryWiring()
|
|
2205
|
+
);
|
|
2265
2206
|
}
|
|
2266
|
-
/**
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2207
|
+
/** Which host callbacks and session state a recovery could use right now. */
|
|
2208
|
+
recoveryWiring() {
|
|
2209
|
+
return {
|
|
2210
|
+
onAuthError: this.config.onAuthError != null,
|
|
2211
|
+
onLimitBlocked: this.config.onLimitBlocked != null,
|
|
2212
|
+
resumableSessionId: Boolean(this.config.resumeSessionId || this.sessionId)
|
|
2213
|
+
};
|
|
2273
2214
|
}
|
|
2274
2215
|
/** Emit one `agent-event: error`, swallowing a throwing listener. */
|
|
2275
2216
|
emitTurnErrorEvent(event) {
|
|
@@ -2532,12 +2473,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2532
2473
|
* why that is forced: `_devlog/notes/2026-06-08-auth-error-text-suppress.md`.
|
|
2533
2474
|
*/
|
|
2534
2475
|
isSuppressibleAuthRenderText(text) {
|
|
2535
|
-
|
|
2536
|
-
return this.textIsAuthRender(text) && isCliAuthRenderText(text);
|
|
2537
|
-
}
|
|
2538
|
-
/** Whether a 401 on this attempt can still be self-healed and retried. */
|
|
2539
|
-
authSelfHealAvailable() {
|
|
2540
|
-
return !this.authSelfHealUsed && this.config.onAuthError != null;
|
|
2476
|
+
return this.textIsAuthRender(text) && isCliAuthRenderText(text) && isAvailable(this.recoveryBudget, "auth_refresh", this.recoveryWiring());
|
|
2541
2477
|
}
|
|
2542
2478
|
/**
|
|
2543
2479
|
* Stash a dropped auth render as evidence for {@link handleResultErrorPayload}.
|
|
@@ -2550,7 +2486,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2550
2486
|
* qualifies; requiring a marker only the CLI itself emits keeps that prose out.
|
|
2551
2487
|
*/
|
|
2552
2488
|
stashSuppressedAuthRender(text) {
|
|
2553
|
-
if (!this.
|
|
2489
|
+
if (!isAvailable(this.recoveryBudget, "auth_refresh", this.recoveryWiring())) return;
|
|
2554
2490
|
if (!isCliAuthRenderText(text)) return;
|
|
2555
2491
|
this.suppressedAuthRenderText = text;
|
|
2556
2492
|
}
|
|
@@ -2752,7 +2688,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2752
2688
|
subtype: msg.subtype,
|
|
2753
2689
|
oauthCredential: this.usingOauthCredential
|
|
2754
2690
|
});
|
|
2755
|
-
const detail = rawDetail.category === "auth" && this.
|
|
2691
|
+
const detail = rawDetail.category === "auth" && isSpent(this.recoveryBudget, "auth_refresh") ? reclassifyAuthAsAccountUnavailable(rawDetail) : rawDetail;
|
|
2756
2692
|
this.log.error("turn ended with error", {
|
|
2757
2693
|
subtype: msg.subtype,
|
|
2758
2694
|
terminalReason: msg.terminal_reason,
|
|
@@ -2775,7 +2711,9 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2775
2711
|
});
|
|
2776
2712
|
}
|
|
2777
2713
|
const errorText = effectiveErrors.join("; ") || `Agent stopped: ${msg.subtype}`;
|
|
2778
|
-
|
|
2714
|
+
const failure = detail.category === "auth" ? new AuthError({ ...detail, message: errorText }) : detail.category === "account" ? new AccountUnavailableError({ ...detail, message: errorText }) : new Error(errorText);
|
|
2715
|
+
const decision = this.decideRecovery(failure);
|
|
2716
|
+
if (this.turnReject != null && "attempt" in decision && decision.attempt === "stale_resume") {
|
|
2779
2717
|
const detached = this.query;
|
|
2780
2718
|
this.query = null;
|
|
2781
2719
|
this.endInputStream();
|
|
@@ -2783,16 +2721,14 @@ var ClaudeSdkDriver = class extends AgentDriver {
|
|
|
2783
2721
|
detached?.close();
|
|
2784
2722
|
} catch {
|
|
2785
2723
|
}
|
|
2786
|
-
this.failTurn(new Error(errorText), detail);
|
|
2724
|
+
this.failTurn(new Error(errorText), detail, decision);
|
|
2787
2725
|
return true;
|
|
2788
2726
|
}
|
|
2789
|
-
if (detail.category === "auth") {
|
|
2790
|
-
this.failTurn(
|
|
2791
|
-
} else if (
|
|
2792
|
-
this.failTurn(new AccountUnavailableError({ ...detail, message: errorText }), detail);
|
|
2793
|
-
} else if (this.willFailoverOnLimit()) {
|
|
2727
|
+
if (detail.category === "auth" || detail.category === "account") {
|
|
2728
|
+
this.failTurn(failure, detail, decision);
|
|
2729
|
+
} else if ("attempt" in decision && decision.attempt === "limit_failover") {
|
|
2794
2730
|
this.limitTurnRejectedForFailover = true;
|
|
2795
|
-
this.failTurn(
|
|
2731
|
+
this.failTurn(failure, detail, decision);
|
|
2796
2732
|
} else if (errors.length > 0) {
|
|
2797
2733
|
this.emit("agent-event", {
|
|
2798
2734
|
type: "error",
|