@skaile/workspaces 6.0.0 → 6.2.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 +98 -0
- package/dist/{asset-feeds-PXUWCXVI.js → asset-feeds-KPKCE64E.js} +31 -23
- package/dist/asset-feeds-KPKCE64E.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +10 -10
- package/dist/asset-manager/fragments.js +1 -1
- package/dist/asset-manager/index.js +19 -19
- package/dist/asset-manager/installer.js +13 -13
- package/dist/asset-manager/renderers.js +11 -11
- package/dist/asset-manager/src/index.d.ts +339 -19
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +40 -0
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/mcp-config.d.ts +21 -0
- package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
- package/dist/asset-manager/src/renderers.d.ts +7 -0
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/harnesses/claude-sdk.js +18 -22
- package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
- package/dist/bridge/harnesses/codex.js +24 -17
- package/dist/bridge/harnesses/codex.js.map +1 -1
- package/dist/bridge/harnesses/continue.js +14 -14
- package/dist/bridge/harnesses/echo.js +4 -4
- package/dist/bridge/harnesses/gemini.js +10 -10
- package/dist/bridge/harnesses/goose.js +14 -14
- package/dist/bridge/harnesses/omp.js +15 -8
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +14 -14
- package/dist/bridge/harnesses/qwen.js +10 -10
- package/dist/bridge/index.js +19 -19
- package/dist/bridge/src/claude-sdk-surface.d.ts +17 -0
- package/dist/bridge/src/claude-sdk-surface.d.ts.map +1 -0
- package/dist/bridge/src/harness-model-check.d.ts +30 -0
- package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
- package/dist/bridge/src/index.d.ts +2 -1
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/normalizer.d.ts +3 -1
- package/dist/bridge/src/normalizer.d.ts.map +1 -1
- package/dist/bridge/src/runner-private-env.d.ts +7 -0
- package/dist/bridge/src/runner-private-env.d.ts.map +1 -1
- package/dist/{chunk-HK7HMEPT.js → chunk-27SXN33H.js} +13 -5
- package/dist/chunk-27SXN33H.js.map +1 -0
- package/dist/{chunk-TKHJXPSB.js → chunk-2XM3ZH36.js} +183 -33
- package/dist/chunk-2XM3ZH36.js.map +1 -0
- package/dist/{chunk-E3GPGTW3.js → chunk-3HACK2Z7.js} +142 -28
- package/dist/chunk-3HACK2Z7.js.map +1 -0
- package/dist/{chunk-T2BDID2J.js → chunk-5JPW27BI.js} +10 -9
- package/dist/chunk-5JPW27BI.js.map +1 -0
- package/dist/{chunk-2UUKCROR.js → chunk-5LQ62LNT.js} +4 -4
- package/dist/{chunk-2UUKCROR.js.map → chunk-5LQ62LNT.js.map} +1 -1
- package/dist/{chunk-UL22SDGR.js → chunk-6CYKTHNT.js} +194 -127
- package/dist/chunk-6CYKTHNT.js.map +1 -0
- package/dist/{chunk-XFIEVEU7.js → chunk-6OHZUUR7.js} +5 -4
- package/dist/chunk-6OHZUUR7.js.map +1 -0
- package/dist/{chunk-E572OHGY.js → chunk-76FLBODK.js} +4 -3
- package/dist/chunk-76FLBODK.js.map +1 -0
- package/dist/{chunk-GN4VVSAA.js → chunk-7DRFKAJZ.js} +7 -7
- package/dist/{chunk-GN4VVSAA.js.map → chunk-7DRFKAJZ.js.map} +1 -1
- package/dist/chunk-7H6XRCPG.js +31 -0
- package/dist/chunk-7H6XRCPG.js.map +1 -0
- package/dist/{chunk-MCUJTNY5.js → chunk-7Y6S4XLL.js} +3 -3
- package/dist/{chunk-MCUJTNY5.js.map → chunk-7Y6S4XLL.js.map} +1 -1
- package/dist/{chunk-DHYSUJ3H.js → chunk-BEYNH2LS.js} +4 -4
- package/dist/{chunk-DHYSUJ3H.js.map → chunk-BEYNH2LS.js.map} +1 -1
- package/dist/{chunk-GEQSUC6U.js → chunk-BOT64P3U.js} +4 -4
- package/dist/{chunk-GEQSUC6U.js.map → chunk-BOT64P3U.js.map} +1 -1
- package/dist/{chunk-L4YKW5AY.js → chunk-BRK5QZKI.js} +121 -20
- package/dist/chunk-BRK5QZKI.js.map +1 -0
- package/dist/{chunk-YGRZNFRO.js → chunk-BY5WIRCU.js} +58 -5
- package/dist/chunk-BY5WIRCU.js.map +1 -0
- package/dist/{chunk-Z7ZEZZB6.js → chunk-C5HFK34M.js} +3 -3
- package/dist/chunk-C5HFK34M.js.map +1 -0
- package/dist/{chunk-DUMTLYSO.js → chunk-COAFAYBS.js} +31 -7
- package/dist/chunk-COAFAYBS.js.map +1 -0
- package/dist/{chunk-7XSAW5OC.js → chunk-E5NQRHEB.js} +30 -7
- package/dist/chunk-E5NQRHEB.js.map +1 -0
- package/dist/{chunk-BFMYYNDT.js → chunk-F3D25RGM.js} +11 -3
- package/dist/chunk-F3D25RGM.js.map +1 -0
- package/dist/{chunk-VBI7HGHB.js → chunk-GF5JXQIZ.js} +3 -3
- package/dist/{chunk-VBI7HGHB.js.map → chunk-GF5JXQIZ.js.map} +1 -1
- package/dist/{chunk-ZFUZ5AKM.js → chunk-I7LC5TDY.js} +3 -3
- package/dist/{chunk-ZFUZ5AKM.js.map → chunk-I7LC5TDY.js.map} +1 -1
- package/dist/{chunk-3IXIEHUB.js → chunk-ICSGNT5P.js} +7 -7
- package/dist/{chunk-3IXIEHUB.js.map → chunk-ICSGNT5P.js.map} +1 -1
- package/dist/{chunk-WEH33JSG.js → chunk-ITFCWMOY.js} +93 -29
- package/dist/chunk-ITFCWMOY.js.map +1 -0
- package/dist/{chunk-WDXZA7QW.js → chunk-IZQOO6MN.js} +2 -2
- package/dist/{chunk-WDXZA7QW.js.map → chunk-IZQOO6MN.js.map} +1 -1
- package/dist/{chunk-WDAIWDLK.js → chunk-JFLQICIU.js} +5 -5
- package/dist/{chunk-WDAIWDLK.js.map → chunk-JFLQICIU.js.map} +1 -1
- package/dist/{chunk-ARWKK325.js → chunk-JJJ2G4K2.js} +5 -5
- package/dist/{chunk-ARWKK325.js.map → chunk-JJJ2G4K2.js.map} +1 -1
- package/dist/{chunk-GOCWM7FN.js → chunk-JMIKGAUA.js} +43 -4
- package/dist/chunk-JMIKGAUA.js.map +1 -0
- package/dist/{chunk-X3RMRJNR.js → chunk-JRN5QF4C.js} +8 -3
- package/dist/chunk-JRN5QF4C.js.map +1 -0
- package/dist/{chunk-SNEE6UGY.js → chunk-K3R2UKG7.js} +18 -12
- package/dist/chunk-K3R2UKG7.js.map +1 -0
- package/dist/{chunk-VXEYX73S.js → chunk-KB56WBQ3.js} +4 -4
- package/dist/{chunk-VXEYX73S.js.map → chunk-KB56WBQ3.js.map} +1 -1
- package/dist/{chunk-OHNKYHRR.js → chunk-KJSC2ZD6.js} +264 -18
- package/dist/chunk-KJSC2ZD6.js.map +1 -0
- package/dist/{chunk-UQ33Y4DM.js → chunk-KPKGWXUJ.js} +4 -4
- package/dist/{chunk-UQ33Y4DM.js.map → chunk-KPKGWXUJ.js.map} +1 -1
- package/dist/{chunk-AF432MS3.js → chunk-KXJMQTOU.js} +3 -3
- package/dist/{chunk-AF432MS3.js.map → chunk-KXJMQTOU.js.map} +1 -1
- package/dist/chunk-LRBP3234.js +302 -0
- package/dist/chunk-LRBP3234.js.map +1 -0
- package/dist/{chunk-UVVVR4XO.js → chunk-M4OG2YN4.js} +4 -4
- package/dist/{chunk-UVVVR4XO.js.map → chunk-M4OG2YN4.js.map} +1 -1
- package/dist/{chunk-QOM5Z62G.js → chunk-MAZ3UXJK.js} +17 -24
- package/dist/chunk-MAZ3UXJK.js.map +1 -0
- package/dist/{chunk-Y2TO2U7W.js → chunk-MM4YO3EL.js} +3 -3
- package/dist/{chunk-Y2TO2U7W.js.map → chunk-MM4YO3EL.js.map} +1 -1
- package/dist/{chunk-OULSJRXV.js → chunk-OCQNUV4T.js} +7 -7
- package/dist/{chunk-OULSJRXV.js.map → chunk-OCQNUV4T.js.map} +1 -1
- package/dist/{chunk-SZXGRHQQ.js → chunk-PJJSBZZP.js} +4 -4
- package/dist/{chunk-SZXGRHQQ.js.map → chunk-PJJSBZZP.js.map} +1 -1
- package/dist/{chunk-OAHVKSQJ.js → chunk-PKBLJI23.js} +1471 -126
- package/dist/chunk-PKBLJI23.js.map +1 -0
- package/dist/{chunk-NOA6EJXE.js → chunk-PKE3PXOK.js} +3 -3
- package/dist/{chunk-NOA6EJXE.js.map → chunk-PKE3PXOK.js.map} +1 -1
- package/dist/{chunk-WYHQUCHR.js → chunk-PMWRM4EJ.js} +109 -48
- package/dist/chunk-PMWRM4EJ.js.map +1 -0
- package/dist/{chunk-H6UVIKQ2.js → chunk-PNUM7GUY.js} +3 -3
- package/dist/{chunk-H6UVIKQ2.js.map → chunk-PNUM7GUY.js.map} +1 -1
- package/dist/{chunk-SRODW6M2.js → chunk-Q5RN4PWV.js} +3 -3
- package/dist/{chunk-SRODW6M2.js.map → chunk-Q5RN4PWV.js.map} +1 -1
- package/dist/{chunk-LN6QB7XI.js → chunk-QIHL3YPL.js} +4 -4
- package/dist/{chunk-LN6QB7XI.js.map → chunk-QIHL3YPL.js.map} +1 -1
- package/dist/{chunk-U56GGCC2.js → chunk-QK7AG5AV.js} +4 -4
- package/dist/{chunk-U56GGCC2.js.map → chunk-QK7AG5AV.js.map} +1 -1
- package/dist/{chunk-OTIB4D2K.js → chunk-QPWR3YMY.js} +15 -5
- package/dist/chunk-QPWR3YMY.js.map +1 -0
- package/dist/{chunk-4DWBSTYA.js → chunk-QXKUFROW.js} +22 -5
- package/dist/chunk-QXKUFROW.js.map +1 -0
- package/dist/{chunk-4XWLB7JB.js → chunk-RQMIZONH.js} +95 -35
- package/dist/chunk-RQMIZONH.js.map +1 -0
- package/dist/{chunk-LSI2IVFT.js → chunk-RXGPFAMN.js} +4 -3
- package/dist/chunk-RXGPFAMN.js.map +1 -0
- package/dist/{chunk-3JKGY2YC.js → chunk-S2H3RBK7.js} +182 -33
- package/dist/chunk-S2H3RBK7.js.map +1 -0
- package/dist/{chunk-VJRTDKXS.js → chunk-SJNZ4WPA.js} +165 -106
- package/dist/chunk-SJNZ4WPA.js.map +1 -0
- package/dist/{chunk-KX2PT5Q4.js → chunk-T2VBPVWZ.js} +77 -18
- package/dist/chunk-T2VBPVWZ.js.map +1 -0
- package/dist/{chunk-6Z5KTFJT.js → chunk-TSTRH4SM.js} +3 -3
- package/dist/{chunk-6Z5KTFJT.js.map → chunk-TSTRH4SM.js.map} +1 -1
- package/dist/{chunk-7CV3HFWJ.js → chunk-TZERN27L.js} +5 -5
- package/dist/{chunk-7CV3HFWJ.js.map → chunk-TZERN27L.js.map} +1 -1
- package/dist/{chunk-JDR6ILCW.js → chunk-U673DB5U.js} +4 -4
- package/dist/{chunk-JDR6ILCW.js.map → chunk-U673DB5U.js.map} +1 -1
- package/dist/{chunk-FKU57Q5Q.js → chunk-URCJIV7T.js} +3 -3
- package/dist/{chunk-FKU57Q5Q.js.map → chunk-URCJIV7T.js.map} +1 -1
- package/dist/{chunk-ADPM6AYF.js → chunk-VSX2G7LA.js} +3 -3
- package/dist/{chunk-ADPM6AYF.js.map → chunk-VSX2G7LA.js.map} +1 -1
- package/dist/{chunk-F2GOZMRA.js → chunk-X37JUNEW.js} +49 -49
- package/dist/chunk-X37JUNEW.js.map +1 -0
- package/dist/{chunk-NMI2TWMH.js → chunk-Z3IRZBXB.js} +158 -344
- package/dist/chunk-Z3IRZBXB.js.map +1 -0
- package/dist/{chunk-7TPYPVAH.js → chunk-ZWJCRHP3.js} +3 -3
- package/dist/{chunk-7TPYPVAH.js.map → chunk-ZWJCRHP3.js.map} +1 -1
- package/dist/{claude-code-VJGYBXQR.js → claude-code-BBMNVH2J.js} +5 -5
- package/dist/{claude-code-VJGYBXQR.js.map → claude-code-BBMNVH2J.js.map} +1 -1
- package/dist/cli/index.js +964 -501
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/agent-pins.d.ts +11 -0
- package/dist/cli/src/agent-pins.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 +1 -1
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/diff.d.ts.map +1 -1
- package/dist/cli/src/commands/harness.d.ts +24 -0
- package/dist/cli/src/commands/harness.d.ts.map +1 -0
- package/dist/cli/src/commands/integration.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 +28 -3
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +19 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/rebuild.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/serve-preflight.d.ts +31 -1
- package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/serve.d.ts +10 -0
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/cli/src/commands/session-logs/local-query.d.ts +2 -0
- package/dist/cli/src/commands/session-logs/local-query.d.ts.map +1 -1
- package/dist/cli/src/commands/source-manifest-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/source-manifest.d.ts +19 -7
- package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +9 -2
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/store.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/commands/why.d.ts.map +1 -1
- package/dist/cli/src/config-checks.d.ts +55 -0
- package/dist/cli/src/config-checks.d.ts.map +1 -0
- package/dist/cli/src/harness-error.d.ts +12 -1
- package/dist/cli/src/harness-error.d.ts.map +1 -1
- package/dist/cli/src/helpers.d.ts +18 -8
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/index.d.ts +10 -1
- package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/spec.d.ts +8 -0
- package/dist/cli/src/plugin-store/spec.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +27 -0
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/cli/src/store-addable.d.ts +11 -0
- package/dist/cli/src/store-addable.d.ts.map +1 -1
- package/dist/connectors/config.js +5 -5
- package/dist/connectors/index.js +23 -23
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors-47EM6C2P.js +48 -0
- package/dist/{connectors-CXZLXAFZ.js.map → connectors-47EM6C2P.js.map} +1 -1
- package/dist/core/framework.js +1 -1
- package/dist/core/index.js +9 -9
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/provider-registry-credentials.js +2 -2
- package/dist/core/provider-registry.js +1 -1
- package/dist/core/publish-manifest.js +3 -3
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +5 -5
- package/dist/core/src/agent-instances.d.ts.map +1 -1
- package/dist/core/src/config-key-diagnostics.d.ts +9 -0
- package/dist/core/src/config-key-diagnostics.d.ts.map +1 -0
- package/dist/core/src/framework.d.ts +5 -3
- package/dist/core/src/framework.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +3 -2
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +12 -0
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +25 -0
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +15 -0
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/provider-registry.d.ts +6 -0
- package/dist/core/src/provider-registry.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +18 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/src/workspace-yaml-editor.d.ts +9 -2
- package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
- package/dist/core/workspace-config.js +4 -4
- package/dist/deploy/index.js +9 -9
- package/dist/discovery/index.js +5 -5
- package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
- package/dist/discovery/src/parse-manifest.d.ts.map +1 -1
- package/dist/{ensure-sources-UPTHZKGF.js → ensure-sources-K5EFNC3L.js} +36 -22
- package/dist/ensure-sources-K5EFNC3L.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +23 -23
- package/dist/factory-assets/connectors/deploy.js +23 -23
- package/dist/factory-assets/connectors/devserver.js +23 -23
- package/dist/factory-assets/connectors/flow/adapter.js +23 -23
- package/dist/factory-assets/connectors/flow/contract/normalize.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract.js +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +11 -11
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +25 -25
- package/dist/factory-assets/connectors/flow.js +23 -23
- package/dist/factory-assets/connectors/git.js +23 -23
- package/dist/factory-assets/connectors/gmail.js +23 -23
- package/dist/factory-assets/connectors/googledrive.js +23 -23
- package/dist/factory-assets/connectors/local.js +23 -23
- package/dist/factory-assets/connectors/mattermost.js +23 -23
- package/dist/factory-assets/connectors/memory.js +23 -23
- package/dist/factory-assets/connectors/minio.js +23 -23
- package/dist/factory-assets/connectors/postgres.js +23 -23
- package/dist/factory-assets/connectors/s3.js +23 -23
- package/dist/factory-assets/connectors/sharepoint.js +23 -23
- package/dist/factory-assets/connectors/sqlite.js +23 -23
- package/dist/factory-assets/connectors/static-server.js +23 -23
- package/dist/factory-assets/connectors/tunnel.js +23 -23
- package/dist/factory-assets/connectors/webdav.js +23 -23
- package/dist/factory-assets/connectors/xstate-store.js +23 -23
- package/dist/factory-assets/connectors/xstate.js +23 -23
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +1 -1
- package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +2 -2
- package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +3 -3
- package/dist/flows-KLBNSKLO.js +26 -0
- package/dist/{flows-TJQIMGUX.js.map → flows-KLBNSKLO.js.map} +1 -1
- package/dist/helpers-LUSV2ICC.js +52 -0
- package/dist/{helpers-DE53KG3E.js.map → helpers-LUSV2ICC.js.map} +1 -1
- package/dist/library/index.js +14 -14
- package/dist/library/install.js +5 -5
- package/dist/library/src/index.d.ts +2 -2
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/install/index.d.ts +1 -1
- package/dist/library/src/install/index.d.ts.map +1 -1
- package/dist/library/src/install/install-from-manifest.d.ts +13 -0
- package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
- package/dist/library/src/install/source-fetch-github.d.ts.map +1 -1
- package/dist/library/src/local/library-dir.d.ts +22 -5
- package/dist/library/src/local/library-dir.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +8 -0
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/library/src/remote/rest-catalog-source.d.ts +3 -2
- package/dist/library/src/remote/rest-catalog-source.d.ts.map +1 -1
- package/dist/{library-publish-KKQ2ULLX.js → library-publish-XMRCKRNR.js} +59 -58
- package/dist/library-publish-XMRCKRNR.js.map +1 -0
- package/dist/model-endpoint/index.js +12 -12
- package/dist/model-endpoint/src/openai-chat.d.ts +7 -2
- package/dist/model-endpoint/src/openai-chat.d.ts.map +1 -1
- package/dist/model-endpoint/src/openai-shared.d.ts +8 -0
- package/dist/model-endpoint/src/openai-shared.d.ts.map +1 -1
- package/dist/model-endpoint/src/server.d.ts.map +1 -1
- package/dist/model-endpoint/src/types.d.ts +1 -1
- package/dist/model-endpoint/src/types.d.ts.map +1 -1
- package/dist/model-endpoint/src/usage-cost.d.ts +23 -0
- package/dist/model-endpoint/src/usage-cost.d.ts.map +1 -0
- package/dist/open-library-XBR46DJL.js +56 -0
- package/dist/{open-library-RJGJIW5H.js.map → open-library-XBR46DJL.js.map} +1 -1
- package/dist/open-registry-W562DCDL.js +32 -0
- package/dist/{open-registry-3QS3J7KO.js.map → open-registry-W562DCDL.js.map} +1 -1
- package/dist/paths-2AZXB3QL.js +22 -0
- package/dist/{paths-QAV4C3KX.js.map → paths-2AZXB3QL.js.map} +1 -1
- package/dist/plugin-store-36SIL4TV.js +23 -0
- package/dist/{plugin-store-MSH6GK6T.js.map → plugin-store-36SIL4TV.js.map} +1 -1
- package/dist/project-D7GN7WLS.js +86 -0
- package/dist/{project-HZW2MZPA.js.map → project-D7GN7WLS.js.map} +1 -1
- package/dist/resolver/index.js +10 -10
- package/dist/runner/index.js +40 -40
- package/dist/runner/src/capability-roundtrip.d.ts +7 -6
- package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
- package/dist/runner/src/composition/content-source.d.ts.map +1 -1
- package/dist/runner/src/composition/errors.d.ts +16 -1
- package/dist/runner/src/composition/errors.d.ts.map +1 -1
- package/dist/runner/src/credential-notice.d.ts +3 -3
- package/dist/runner/src/credential-notice.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +20 -7
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +19 -19
- package/dist/sdk/bridge.js +19 -19
- package/dist/sdk/core.js +9 -9
- package/dist/sdk/flow.js +11 -11
- package/dist/sdk/index.js +40 -40
- package/dist/sdk/resolver.js +10 -10
- package/dist/sdk/runner.js +40 -40
- package/dist/sdk/transport/ws/server.js +10 -10
- package/dist/sdk/transport/ws.js +10 -10
- package/dist/sdk/transport.js +10 -10
- package/dist/serve-preflight-CGA5G3AE.js +135 -0
- package/dist/serve-preflight-CGA5G3AE.js.map +1 -0
- package/dist/{setup-AGYB4PKR.js → setup-IBDNJAOU.js} +32 -32
- package/dist/{setup-AGYB4PKR.js.map → setup-IBDNJAOU.js.map} +1 -1
- package/dist/skills-CTTO7SZK.js +26 -0
- package/dist/{skills-2LMQ2IAD.js.map → skills-CTTO7SZK.js.map} +1 -1
- package/dist/source-2DJ5KNOI.js +85 -0
- package/dist/{source-GBMYD3RO.js.map → source-2DJ5KNOI.js.map} +1 -1
- package/dist/source-fetch-github-RWHV4I5Z.js +4 -0
- package/dist/{source-fetch-github-ST4MFL3D.js.map → source-fetch-github-RWHV4I5Z.js.map} +1 -1
- package/dist/{source-manifest-publish-FK22TVQT.js → source-manifest-publish-IYWUMUCY.js} +55 -57
- package/dist/source-manifest-publish-IYWUMUCY.js.map +1 -0
- package/dist/transport/index.js +10 -10
- package/dist/transport/ws/server.js +10 -10
- package/dist/transport/ws.js +10 -10
- package/dist/tui/index.js +48 -41
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/src/repl.d.ts.map +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/install-manifest.d.ts +1 -1
- package/dist/types/src/install-manifest.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/scaffold-body.d.ts +2 -0
- package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +30 -30
- package/dist/workspace-plugin/adapters/omp.js +15 -15
- package/dist/workspace-plugin/index.js +2 -2
- package/package.json +1 -1
- package/dist/asset-feeds-PXUWCXVI.js.map +0 -1
- package/dist/chunk-3JKGY2YC.js.map +0 -1
- package/dist/chunk-4DWBSTYA.js.map +0 -1
- package/dist/chunk-4XWLB7JB.js.map +0 -1
- package/dist/chunk-7XSAW5OC.js.map +0 -1
- package/dist/chunk-BFMYYNDT.js.map +0 -1
- package/dist/chunk-DUMTLYSO.js.map +0 -1
- package/dist/chunk-E3GPGTW3.js.map +0 -1
- package/dist/chunk-E572OHGY.js.map +0 -1
- package/dist/chunk-F2GOZMRA.js.map +0 -1
- package/dist/chunk-GOCWM7FN.js.map +0 -1
- package/dist/chunk-HK7HMEPT.js.map +0 -1
- package/dist/chunk-KX2PT5Q4.js.map +0 -1
- package/dist/chunk-L4YKW5AY.js.map +0 -1
- package/dist/chunk-LSI2IVFT.js.map +0 -1
- package/dist/chunk-NMI2TWMH.js.map +0 -1
- package/dist/chunk-OAHVKSQJ.js.map +0 -1
- package/dist/chunk-OHNKYHRR.js.map +0 -1
- package/dist/chunk-OTIB4D2K.js.map +0 -1
- package/dist/chunk-PUK7TQT4.js +0 -13
- package/dist/chunk-PUK7TQT4.js.map +0 -1
- package/dist/chunk-QOM5Z62G.js.map +0 -1
- package/dist/chunk-SNEE6UGY.js.map +0 -1
- package/dist/chunk-T2BDID2J.js.map +0 -1
- package/dist/chunk-TKHJXPSB.js.map +0 -1
- package/dist/chunk-UL22SDGR.js.map +0 -1
- package/dist/chunk-VJRTDKXS.js.map +0 -1
- package/dist/chunk-WEH33JSG.js.map +0 -1
- package/dist/chunk-WYHQUCHR.js.map +0 -1
- package/dist/chunk-X3RMRJNR.js.map +0 -1
- package/dist/chunk-XFIEVEU7.js.map +0 -1
- package/dist/chunk-YGRZNFRO.js.map +0 -1
- package/dist/chunk-Z7ZEZZB6.js.map +0 -1
- package/dist/connectors-CXZLXAFZ.js +0 -48
- package/dist/ensure-sources-UPTHZKGF.js.map +0 -1
- package/dist/flows-TJQIMGUX.js +0 -26
- package/dist/helpers-DE53KG3E.js +0 -38
- package/dist/library-publish-KKQ2ULLX.js.map +0 -1
- package/dist/open-library-RJGJIW5H.js +0 -42
- package/dist/open-registry-3QS3J7KO.js +0 -32
- package/dist/paths-QAV4C3KX.js +0 -22
- package/dist/plugin-store-MSH6GK6T.js +0 -23
- package/dist/project-HZW2MZPA.js +0 -84
- package/dist/serve-preflight-L4POEHNQ.js +0 -108
- package/dist/serve-preflight-L4POEHNQ.js.map +0 -1
- package/dist/skills-2LMQ2IAD.js +0 -26
- package/dist/source-GBMYD3RO.js +0 -85
- package/dist/source-fetch-github-ST4MFL3D.js +0 -4
- package/dist/source-manifest-publish-FK22TVQT.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../bridge/src/error-classifier.ts","../bridge/src/reconfigure-model-ref.ts","../bridge/src/reconfigure-ledger.ts","../bridge/src/runner-private-env.ts"],"names":[],"mappings":";;;AAkDO,IAAM,SAAA,GAAN,cAAwB,KAAA,CAAM;AAAA,EAC1B,MAAA;AAAA,EACT,YAAY,MAAA,EAAoB;AAC9B,IAAA,KAAA,CAAM,OAAO,OAAO,CAAA;AACpB,IAAA,IAAA,CAAK,IAAA,GAAO,WAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AACF;AAaO,IAAM,uBAAA,GAAN,cAAsC,KAAA,CAAM;AAAA,EACxC,MAAA;AAAA,EACT,YAAY,MAAA,EAAoB;AAC9B,IAAA,KAAA,CAAM,OAAO,OAAO,CAAA;AACpB,IAAA,IAAA,CAAK,IAAA,GAAO,yBAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AACF;AAQO,SAAS,mCAAmC,MAAA,EAAgC;AACjF,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH,QAAA,EAAU,SAAA;AAAA,IACV,UAAA,E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A,CAAI,GAAA,CAAI,GAAG,CAAA,EAAG;AACjB,QAAA,MAAA,CAAO,MAAA,CAAO,WAAW,EAAE,CAAC,GAAG,GAAG,KAAA,CAAM,GAAG,CAAA,EAAG,CAAA;AAC9C,QAAA,MAAA,CAAO,MAAA,CAAO,UAAU,EAAE,CAAC,GAAG,GAAG,QAAA,CAAS,GAAG,CAAA,EAAG,CAAA;AAAA,MAClD;AAAA,IACF;AACA,IAAA,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAK,IAAA,CAAK,8CAAA,EAAgD;AAAA,MACrE,QAAQ,MAAA,CAAO,QAAA;AAAA,MACf,MAAA,EAAQ,MAAA,CAAO,IAAA,CAAK,KAAK;AAAA,KAC1B,CAAA;AACD,IAAA,IAAI,MAAA,CAAO,IAAA,CAAK,SAAS,CAAA,CAAE,SAAS,CAAA,EAAG;AACrC,MAAA,IAAA,CAAK,OAAA,CAAQ,kBAAkB,EAAE,OAAA,EAAS,OAAO,QAAA,EAAU,SAAA,EAAW,UAAU,CAAA;AAAA,IAClF;AACA,IAAA,OAAO,MAAA,CAAO,QAAA;AAAA,EAChB;AACF;;;AChQO,IAAM,uBAAA,GAA6C;AAAA,EACxD,sBAAA;AAAA,EACA;AACF;AAMO,SAAS,sBAAoE,GAAA,EAAW;AAC7F,EAAA,KAAA,MAAW,GAAA,IAAO,uBAAA,EAAyB,OAAO,GAAA,CAAI,GAAG,CAAA;AACzD,EAAA,OAAO,GAAA;AACT","file":"chunk-XFIEVEU7.js","sourcesContent":["/**\n * Error classification for the Claude Agent SDK harness.\n *\n * Wraps the Anthropic API error patterns surfaced through the bundled\n * `claude-cli.js`. The CLI flattens upstream HTTP errors into terse strings\n * like:\n *\n * `Claude Code returned an error result: Failed to authenticate. API Error:\n * 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\n * \"Invalid authentication credentials\"}}`\n *\n * Word-for-word that reads as an auth failure, but in practice it also\n * fires when a Claude Max OAuth subscription has exhausted its current\n * quota window — Anthropic returns a non-200 that the CLI relabels as\n * \"Failed to authenticate\" without preserving the original error type.\n *\n * The classifier here:\n * 1. Parses an embedded JSON body when the upstream included one\n * (e.g. `{\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",...}}`)\n * so we believe the structured `error.type` over the surrounding\n * free-text wrapper.\n * 2. Honours the SDK's `terminal_reason` when it explicitly indicates\n * a blocking-limit / rapid-refill / model-error condition — those\n * are authoritative even if the textual error reads as auth.\n * 3. Falls back to keyword heuristics on the message text.\n * 4. For OAuth-style credentials (Claude Code subscriptions), adds a\n * hint that bounces user attention to quota rather than credentials,\n * because that's overwhelmingly the cause when a CredentialsFile\n * provider that worked yesterday now returns \"Invalid authentication\n * credentials\" without anyone touching the file.\n */\n\nimport type { AgentError } from \"./types.js\";\n\n/**\n * Error thrown by harnesses when the upstream provider rejects the credential\n * with an authentication-shaped failure (HTTP 401 / `authentication_error`\n * structured body). Carries the structured {@link AgentError} produced by\n * {@link classifyClaudeSdkError} so the runner can mediate without\n * re-classifying string text.\n *\n * The runner's 401-mediation handler `instanceof`-discriminates on this\n * subclass so the auth-vs-rate_limit fork stays in one place.\n *\n * Spec: `_devlog/specs/2026-05-07-unified-credential-mediation.md`\n * § \"Runner-side handling on 401\".\n *\n * @category Errors\n * @since 3.3.0\n */\nexport class AuthError extends Error {\n readonly detail: AgentError;\n constructor(detail: AgentError) {\n super(detail.message);\n this.name = \"AuthError\";\n this.detail = detail;\n }\n}\n\n/**\n * Error thrown when an auth-shaped failure persists *after* a successful\n * credential self-heal — the refresh worked, yet the immediate retry still\n * returned 401. That combination rules out the credential and points at the\n * account itself: a hidden-tier rate limit, a billing block, or anti-abuse\n * throttling on OAuth tokens used at scale (Anthropic mislabels all three as\n * `authentication_error`). It deliberately does **not** extend {@link AuthError}\n * so the harness's auth self-heal does not fire again on it.\n *\n * @category Errors\n */\nexport class AccountUnavailableError extends Error {\n readonly detail: AgentError;\n constructor(detail: AgentError) {\n super(detail.message);\n this.name = \"AccountUnavailableError\";\n this.detail = detail;\n }\n}\n\n/**\n * Re-label an auth-shaped {@link AgentError} as an `account` failure. Called\n * when a 401 recurs after a successful credential refresh: the credential is\n * fine, so the user needs an account-state hint, not \"check your API key\".\n * Pure function.\n */\nexport function reclassifyAuthAsAccountUnavailable(detail: AgentError): AgentError {\n return {\n ...detail,\n category: \"account\",\n statusCode: detail.statusCode ?? 401,\n retryable: false,\n hint: \"The credential was refreshed successfully but Anthropic still rejected the request. This is an account-state issue, not an invalid credential — usually a rate limit at a hidden tier, a billing block, or anti-abuse throttling. Wait a few minutes and retry; if it persists, check the account's billing and usage limits at https://console.anthropic.com/.\",\n };\n}\n\n/**\n * `terminal_reason` values from the Claude Agent SDK that imply the failure\n * is a rate / quota / blocking condition rather than a credential problem.\n */\nconst RATE_LIMIT_TERMINAL_REASONS = new Set<string>([\"blocking_limit\", \"rapid_refill_breaker\"]);\n\n/**\n * `terminal_reason` values that indicate a generic, retryable model failure.\n * `prompt_too_long` is handled separately (not retryable, different hint).\n */\nconst MODEL_TERMINAL_REASONS = new Set<string>([\"model_error\", \"image_error\"]);\n\n/**\n * Input shape for {@link classifyClaudeSdkError} when decoding an `SDKResultError`.\n *\n * All fields are optional; `classifyClaudeSdkError` also accepts a plain `string`\n * (a thrown exception message) for the common non-SDK code paths.\n *\n * @docLink packages/bridge/api-reference#error-classifier\n */\nexport interface ClaudeSdkResultErrorInput {\n /** `errors` array from `SDKResultError`. Empty when not provided. */\n errors?: string[];\n /**\n * `terminal_reason` from `SDKResultError`. Authoritative when set to a\n * blocking/rapid-refill value, regardless of message text.\n */\n terminalReason?: string;\n /** `subtype` from `SDKResultError` — `error_max_turns` etc. */\n subtype?: string;\n /**\n * `true` when the configured Anthropic credential is a Claude Code\n * subscription (`CredentialsFile` provider) rather than a raw API key.\n * Changes the hint copy because `Invalid authentication credentials`\n * on an OAuth subscription almost always means quota.\n */\n oauthCredential?: boolean;\n}\n\n/**\n * The `apiError` tag the Claude Agent SDK (0.3.289) puts on the assistant\n * message it renders for a long-context entitlement 429.\n */\nexport const LONG_CONTEXT_CREDITS_API_ERROR = \"long_context_credits_required\";\n\n/**\n * Upstream and SDK-rendered wordings of the long-context entitlement 429:\n * \"Extra usage is required for long context\", \"Usage credits are required for\n * long context requests\", and the CLI's \"Usage credits required for 1M context\".\n */\nconst LONG_CONTEXT_ENTITLEMENT_PATTERN =\n /\\b(?:extra usage is|usage credits(?: are)?) required for (?:long|1m) context\\b/i;\n\n/**\n * Whether any of `texts` is the 429 Anthropic returns when the account may not\n * use a long (1M) context window: the seat is not out of quota, it cannot serve\n * a context over 200k. Matches only that wording, never a usage-limit 429.\n *\n * @docLink packages/bridge/api-reference#error-classifier\n */\nexport function isLongContextEntitlementRejection(\n texts: ReadonlyArray<string | null | undefined>,\n): boolean {\n return texts.some(\n (text) => typeof text === \"string\" && LONG_CONTEXT_ENTITLEMENT_PATTERN.test(text),\n );\n}\n\n/**\n * Classify a Claude SDK result-error or thrown error into a structured\n * {@link AgentError}. Pure function — safe to call from any layer.\n *\n * @param input - Either a free-text error message (from a thrown exception)\n * or a partially-decoded `SDKResultError` shape with `errors[]`,\n * `terminal_reason`, and `subtype`.\n * @returns A category, retryable flag, and human-readable hint.\n * @docLink packages/bridge/api-reference#error-classifier\n */\nexport function classifyClaudeSdkError(input: string | ClaudeSdkResultErrorInput): AgentError {\n const opts: ClaudeSdkResultErrorInput = typeof input === \"string\" ? { errors: [input] } : input;\n\n const message = (opts.errors ?? []).join(\"; \") || \"Unknown agent error\";\n\n // ── 1. Honour authoritative `terminal_reason` ──────────────────────────\n const byTerminalReason = classifyByTerminalReason(message, opts);\n if (byTerminalReason) {\n return byTerminalReason;\n }\n\n // ── 2. Inspect embedded JSON body for a structured error.type ──────────\n const structured = tryParseEmbeddedAnthropicError(message);\n if (structured) {\n const byStructured = classifyByStructuredError(message, structured, opts);\n if (byStructured) {\n return byStructured;\n }\n }\n\n // ── 3. Heuristic keyword classification on the wrapper text ────────────\n const lower = message.toLowerCase();\n\n const byKeyword = classifyByKeyword(message, lower, opts);\n if (byKeyword) {\n return byKeyword;\n }\n\n // ── 4. SDK result subtypes ─────────────────────────────────────────────\n const bySubtype = classifyBySubtype(message, opts);\n if (bySubtype) {\n return bySubtype;\n }\n\n return {\n message,\n category: \"unknown\",\n retryable: true,\n };\n}\n\n/**\n * Phase 1: classify on the SDK's authoritative `terminal_reason`. Returns\n * `null` when the reason is unset or not one of the recognised values.\n */\nfunction classifyByTerminalReason(\n message: string,\n opts: ClaudeSdkResultErrorInput,\n): AgentError | null {\n if (opts.terminalReason && RATE_LIMIT_TERMINAL_REASONS.has(opts.terminalReason)) {\n return {\n message,\n category: \"rate_limit\",\n retryable: true,\n hint: oauthQuotaHint(opts.oauthCredential),\n };\n }\n if (opts.terminalReason === \"prompt_too_long\") {\n return {\n message,\n category: \"model\",\n retryable: false,\n hint: \"The conversation is too long for the configured model. Start a new session or compact the existing one.\",\n };\n }\n if (opts.terminalReason && MODEL_TERMINAL_REASONS.has(opts.terminalReason)) {\n return {\n message,\n category: \"model\",\n retryable: true,\n hint: \"The model rejected this turn. Try again or switch models.\",\n };\n }\n return null;\n}\n\n/**\n * Phase 2: classify on the structured `error.type` parsed from an embedded\n * Anthropic JSON body. Returns `null` for an unrecognised `errorType`.\n */\nfunction classifyByStructuredError(\n message: string,\n structured: { errorType: string; statusCode?: number },\n opts: ClaudeSdkResultErrorInput,\n): AgentError | null {\n if (structured.errorType === \"rate_limit_error\") {\n return {\n message,\n category: \"rate_limit\",\n statusCode: structured.statusCode ?? 429,\n retryable: true,\n hint: oauthQuotaHint(opts.oauthCredential),\n };\n }\n if (structured.errorType === \"overloaded_error\") {\n return {\n message,\n category: \"rate_limit\",\n statusCode: structured.statusCode ?? 529,\n retryable: true,\n hint: \"Anthropic is overloaded. Try again in a moment.\",\n };\n }\n if (structured.errorType === \"authentication_error\") {\n // Anthropic genuinely says it's an auth failure. But for OAuth\n // credentials with the `oauth-2025-04-20` beta flow, this still\n // overwhelmingly correlates with quota. Surface both possibilities\n // in the hint so the user does not first re-upload a perfectly\n // good credentials file.\n return {\n message,\n category: \"auth\",\n statusCode: structured.statusCode ?? 401,\n retryable: false,\n hint: opts.oauthCredential\n ? \"Anthropic rejected the OAuth credential. With Claude Code subscriptions this is usually a quota or rate-limit issue rather than an invalid token — wait a few minutes before re-uploading the credentials file. If it persists, re-export `~/.claude/.credentials.json` from a working Claude Code install.\"\n : \"Anthropic rejected the API key. Check it in Settings -> AI Providers.\",\n };\n }\n if (structured.errorType === \"permission_error\") {\n return {\n message,\n category: \"auth\",\n statusCode: structured.statusCode ?? 403,\n retryable: false,\n hint: \"The configured credential does not have access to the requested model.\",\n };\n }\n if (structured.errorType === \"invalid_request_error\") {\n return {\n message,\n category: \"validation\",\n statusCode: structured.statusCode ?? 400,\n retryable: false,\n hint: \"Anthropic rejected the request shape. This is likely a bug — please report it.\",\n };\n }\n return null;\n}\n\n/**\n * Phase 3: heuristic keyword classification on the lowercased wrapper text.\n * `lower` is the pre-lowercased `message`. Returns `null` when no bucket hits.\n */\nfunction classifyByKeyword(\n message: string,\n lower: string,\n opts: ClaudeSdkResultErrorInput,\n): AgentError | null {\n if (\n lower.includes(\"rate limit\") ||\n lower.includes(\"rate_limit\") ||\n lower.includes(\"too many requests\") ||\n lower.includes(\"429\") ||\n lower.includes(\"quota\") ||\n lower.includes(\"blocking_limit\") ||\n lower.includes(\"rapid_refill\")\n ) {\n return {\n message,\n category: \"rate_limit\",\n retryable: true,\n hint: oauthQuotaHint(opts.oauthCredential),\n };\n }\n\n if (\n lower.includes(\"credit balance\") ||\n lower.includes(\"insufficient credit\") ||\n lower.includes(\"out of credits\")\n ) {\n return {\n message,\n category: \"rate_limit\",\n retryable: false,\n hint: \"The configured Anthropic account is out of credits. Top up at https://console.anthropic.com/ or switch providers.\",\n };\n }\n\n if (lower.includes(\"oauth authentication is currently not supported\")) {\n return {\n message,\n category: \"auth\",\n statusCode: 401,\n retryable: false,\n hint: \"The Claude Code CLI did not send the OAuth beta header. The bundled CLI in this image is too old — rebuild the agent image.\",\n };\n }\n\n // The Claude Code CLI emits this terse, JSON-less string when it finds no\n // usable credential — most commonly because the OAuth access token in\n // `~/.claude/.credentials.json` expired and the file carries no refresh token\n // (the platform provisions access-token-only files by design). It MUST be\n // classified as `auth` so the harness promotes it to `AuthError` and the\n // `onAuthError` self-heal re-mints the credential. Without this branch the\n // message falls through to `unknown`, the self-heal never fires, and every\n // subsequent turn dead-ends on \"please /login\". The check sits ahead of the\n // generic auth keywords because the string contains none of them.\n if (lower.includes(\"not logged in\") || lower.includes(\"please run /login\")) {\n return {\n message,\n category: \"auth\",\n statusCode: 401,\n retryable: false,\n hint: opts.oauthCredential\n ? \"The Claude Code OAuth credential expired and could not be auto-refreshed in-container. The runner will re-mint it — retry the prompt. If it persists, re-export `~/.claude/.credentials.json` from a working Claude Code install.\"\n : \"No Anthropic credential is configured for this provider. Add one in Settings -> AI Providers.\",\n };\n }\n\n if (\n lower.includes(\"api key\") ||\n lower.includes(\"authentication\") ||\n lower.includes(\"invalid authentication\") ||\n lower.includes(\"unauthorized\") ||\n lower.includes(\"401\") ||\n lower.includes(\"403\")\n ) {\n return {\n message,\n category: \"auth\",\n retryable: false,\n hint: opts.oauthCredential\n ? \"Anthropic rejected the OAuth credential. With Claude Code subscriptions this is usually a quota or rate-limit issue rather than an invalid token — wait a few minutes before re-uploading the credentials file.\"\n : \"Check the API key configured for this AI provider in Settings.\",\n };\n }\n\n if (\n lower.includes(\"model\") &&\n (lower.includes(\"not found\") ||\n lower.includes(\"not available\") ||\n lower.includes(\"does not exist\"))\n ) {\n return {\n message,\n category: \"model\",\n retryable: false,\n hint: \"The selected model is not available for this credential. Change the model in the AI provider config.\",\n };\n }\n\n if (\n lower.includes(\"context length\") ||\n lower.includes(\"token limit\") ||\n lower.includes(\"max_tokens\") ||\n lower.includes(\"prompt is too long\") ||\n lower.includes(\"prompt_too_long\")\n ) {\n return {\n message,\n category: \"model\",\n retryable: false,\n hint: \"The conversation is too long for the model. Start a new session or compact this one.\",\n };\n }\n\n if (\n lower.includes(\"timeout\") ||\n lower.includes(\"econnrefused\") ||\n lower.includes(\"enotfound\") ||\n lower.includes(\"fetch failed\") ||\n lower.includes(\"network\")\n ) {\n return {\n message,\n category: \"network\",\n retryable: true,\n hint: \"Network error reaching Anthropic. The runner will retry — try again if it persists.\",\n };\n }\n\n return null;\n}\n\n/**\n * Phase 4: classify on the SDK result `subtype` (`error_max_turns` etc).\n * Returns `null` when the subtype is unset or unrecognised.\n */\nfunction classifyBySubtype(message: string, opts: ClaudeSdkResultErrorInput): AgentError | null {\n if (opts.subtype === \"error_max_turns\") {\n return {\n message,\n category: \"unknown\",\n retryable: true,\n hint: \"The agent stopped after reaching `max_turns`. Resume the session or raise `max_turns` in the agent config.\",\n };\n }\n if (opts.subtype === \"error_max_budget_usd\") {\n return {\n message,\n category: \"rate_limit\",\n retryable: false,\n hint: \"The agent stopped because it hit the configured per-turn budget. Raise the budget or split the work.\",\n };\n }\n return null;\n}\n\n/**\n * The shared keyword buckets matched by {@link classifyGenericErrorMessage}.\n * Harnesses layer a provider-specific `hint` on top of the returned category.\n */\nexport type GenericErrorCategory = \"auth\" | \"rate_limit\" | \"model\" | \"network\";\n\n/**\n * Classify a free-text harness error against the keyword buckets common to the\n * subprocess/SDK harnesses (omp, codex). Returns the matched `category` +\n * `retryable` flag, or `null` when no shared bucket matches so the caller can\n * fall through to its own provider-specific buckets (e.g. codex sandbox) and\n * `unknown` default. The harness supplies the user-facing `hint` — only the\n * bucketing logic is shared, not the copy.\n */\nexport function classifyGenericErrorMessage(\n msg: string,\n): { category: GenericErrorCategory; retryable: boolean } | null {\n const lower = msg.toLowerCase();\n if (\n lower.includes(\"api key\") ||\n lower.includes(\"unauthorized\") ||\n lower.includes(\"authentication\") ||\n lower.includes(\"401\")\n ) {\n return { category: \"auth\", retryable: false };\n }\n if (\n lower.includes(\"rate limit\") ||\n lower.includes(\"429\") ||\n lower.includes(\"too many requests\") ||\n lower.includes(\"quota\")\n ) {\n return { category: \"rate_limit\", retryable: true };\n }\n if (\n lower.includes(\"model\") &&\n (lower.includes(\"not found\") ||\n lower.includes(\"not available\") ||\n lower.includes(\"does not exist\"))\n ) {\n return { category: \"model\", retryable: false };\n }\n if (\n lower.includes(\"context length\") ||\n lower.includes(\"too long\") ||\n lower.includes(\"token limit\") ||\n lower.includes(\"max_tokens\")\n ) {\n return { category: \"model\", retryable: false };\n }\n if (\n lower.includes(\"timeout\") ||\n lower.includes(\"econnrefused\") ||\n lower.includes(\"enotfound\") ||\n lower.includes(\"network\") ||\n lower.includes(\"fetch failed\") ||\n lower.includes(\"fetch\") ||\n lower.includes(\"connection\")\n ) {\n return { category: \"network\", retryable: true };\n }\n return null;\n}\n\n/**\n * Returns the rate-limit hint copy, branched on whether the active\n * credential is a Claude Code OAuth subscription.\n */\nfunction oauthQuotaHint(oauthCredential?: boolean): string {\n if (oauthCredential) {\n return \"Quota exhausted on this Claude Code subscription. Wait for the rate-limit window to reset (typically a few minutes for short windows, longer for daily/weekly limits) before retrying. The credential itself is fine.\";\n }\n return \"The Anthropic account hit a rate limit. Wait a moment and try again.\";\n}\n\n/**\n * Try to extract a structured Anthropic error body from a free-text wrapper.\n * The bundled `claude-cli.js` typically formats failures as\n * `... API Error: <status> {\"type\":\"error\",\"error\":{\"type\":\"<errorType>\",...}}`\n * with optional trailing garbage after the JSON.\n *\n * Strategy: find the first `{`, then forward-scan tracking brace depth (with\n * string-literal awareness so braces inside quoted values do not throw the\n * count). The substring from `braceStart` to the matching `}` is the JSON\n * candidate; one `JSON.parse` does the rest. O(n) in the input length.\n *\n * Returns `null` when nothing parseable is found.\n */\nfunction tryParseEmbeddedAnthropicError(\n text: string,\n): { errorType: string; statusCode?: number } | null {\n const braceStart = text.indexOf(\"{\");\n if (braceStart < 0) {\n return null;\n }\n\n const braceEnd = findMatchingCloseBrace(text, braceStart);\n if (braceEnd < 0) {\n return null;\n }\n\n let parsed: { type?: string; error?: { type?: string; message?: string } };\n try {\n parsed = JSON.parse(text.slice(braceStart, braceEnd));\n } catch {\n return null;\n }\n const errorType = parsed?.error?.type;\n if (typeof errorType !== \"string\") {\n return null;\n }\n const statusMatch = text.match(/API Error:\\s*(\\d{3})/i);\n const statusCode = statusMatch ? Number(statusMatch[1]) : undefined;\n return { errorType, statusCode };\n}\n\n/**\n * Forward-scan `text` from `braceStart` (a `{`) with brace counting, returning\n * the index just past the matching close brace, or `-1` if unbalanced.\n * String-literal awareness: skip braces between unescaped double quotes.\n */\nfunction findMatchingCloseBrace(text: string, braceStart: number): number {\n let depth = 0;\n let inString = false;\n let escaped = false;\n for (let i = braceStart; i < text.length; i++) {\n const ch = text.charCodeAt(i);\n if (inString) {\n if (escaped) {\n escaped = false;\n } else if (ch === 92 /* \\ */) {\n escaped = true;\n } else if (ch === 34 /* \" */) {\n inString = false;\n }\n continue;\n }\n if (ch === 34 /* \" */) {\n inString = true;\n } else if (ch === 123 /* { */) {\n depth++;\n } else if (ch === 125 /* } */) {\n depth--;\n if (depth === 0) {\n return i + 1;\n }\n }\n }\n return -1;\n}\n","// The registry selector a live model change (`reconfigure({ model })`) leaves a\n// session on. Shared by the runner's `runner.reconfigure` handler and every\n// harness whose `reconfigure()` rewrites `modelRef`, so both pick the same entry.\nimport {\n type AIProviderLlmEntry,\n type AIProviderRegistry,\n isEntryEnabled,\n type MergedAIProviderRegistry,\n parseModelRef,\n registryEntries,\n} from \"@skaile/workspaces/core/provider-registry\";\n\n/** What a model-only reconfigure does to the session's registry selector. */\nexport type ReconfigureModelScope =\n | {\n ok: true;\n /** The selector to run from now on; `undefined` leaves `modelRef` unset. */\n modelRef: string | undefined;\n }\n | {\n ok: false;\n code: \"model_not_on_provider\";\n /** The entry the session runs on, or the one the patch named. */\n providerId: string;\n message: string;\n };\n\nexport interface ReconfigureModelScopeInput {\n /** The model the patch names: bare, `<providerId>/<modelId>` or `@role`. */\n model: string;\n /** The session's current selector (`AgentConfig.modelRef`). */\n modelRef: string | undefined;\n registry: AIProviderRegistry | MergedAIProviderRegistry | undefined;\n roles?: Record<string, string>;\n}\n\nfunction selectable(\n registry: AIProviderRegistry | MergedAIProviderRegistry,\n): Array<[string, AIProviderLlmEntry]> {\n return registryEntries(registry).filter(\n (pair): pair is [string, AIProviderLlmEntry] =>\n (pair[1].kind === \"llm\" || pair[1].kind === \"embed\") && isEntryEnabled(pair[1]),\n );\n}\n\n/**\n * Whether an entry serves a model id. An entry that declares no model at all\n * (no `model_map`, no `capabilities`) passes any id through, as the wake does.\n * Otherwise the id must be a declared logical id or a `model_map` target: the\n * platform sends the provider-side id the wake translated to.\n */\nfunction entryServes(entry: AIProviderLlmEntry, modelId: string): boolean {\n const map = entry.model_map ?? {};\n const caps = entry.capabilities ?? {};\n if (Object.keys(map).length === 0 && Object.keys(caps).length === 0) return true;\n return modelId in map || modelId in caps || Object.values(map).includes(modelId);\n}\n\n/** The entry a selector runs on, resolved the way the harnesses resolve it. */\nfunction currentProviderId(\n modelRef: string | undefined,\n registry: AIProviderRegistry | MergedAIProviderRegistry,\n entries: Array<[string, AIProviderLlmEntry]>,\n roles: Record<string, string> | undefined,\n): string | undefined {\n const named = modelRef?.trim();\n if (!named) return entries[0]?.[0];\n // A selector that is exactly an entry id names the endpoint and no model.\n if (entries.some(([id]) => id === named)) return named;\n return parseModelRef(named, registry, roles)?.providerId;\n}\n\n/**\n * Decide the selector a live model change leaves the session on.\n *\n * A bare model id keeps the provider the session already runs on\n * (`<currentProvider>/<model>`): re-resolving it by id alone could move the\n * session to another entry that lists the same id, which changes billing and\n * data residency without a sign. Only a patch that names a provider\n * (`<providerId>/<model>` or `@role`) moves it. When the target entry declares\n * its models and this one is not among them, the patch is refused so the host\n * applies it at the next wake instead.\n *\n * A registry with at most one usable entry has nowhere to move to and keeps the\n * old behaviour: the selector becomes the patch's model when one was set.\n */\nexport function scopeReconfigureModel(input: ReconfigureModelScopeInput): ReconfigureModelScope {\n const { model, modelRef, registry, roles } = input;\n const legacy: ReconfigureModelScope = {\n ok: true,\n modelRef: modelRef === undefined ? undefined : model,\n };\n if (!registry) return legacy;\n const entries = selectable(registry);\n if (entries.length <= 1) return legacy;\n\n const selector = model.trim();\n if (selector.startsWith(\"@\")) return { ok: true, modelRef: selector };\n\n const slash = selector.indexOf(\"/\");\n if (slash > 0) {\n const head = selector.slice(0, slash);\n const tail = selector.slice(slash + 1);\n const named = entries.find(([id]) => id === head);\n if (named && tail !== \"\") {\n if (entryServes(named[1], tail)) return { ok: true, modelRef: selector };\n return refuse(head, tail);\n }\n }\n\n const providerId = currentProviderId(modelRef, registry, entries, roles);\n const current = entries.find(([id]) => id === providerId);\n if (!current) return legacy;\n if (!entryServes(current[1], selector)) return refuse(current[0], selector);\n return { ok: true, modelRef: `${current[0]}/${selector}` };\n}\n\nfunction refuse(providerId: string, modelId: string): ReconfigureModelScope {\n return {\n ok: false,\n code: \"model_not_on_provider\",\n providerId,\n message: `AI provider entry \"${providerId}\" does not list model \"${modelId}\"; the change applies when the session next starts.`,\n };\n}\n","// One owner for a live reconfigure (`AgentHarness.reconfigure()`): the desired\n// config, the snapshot the running process was last given, drift between them,\n// serial ordering of patches, the provider-entry scope rule, rollback on a\n// refusal and the typed outcome. A harness supplies one `applyLive` hook that\n// pushes a delta into its process; everything else lives here.\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { scopeReconfigureModel } from \"./reconfigure-model-ref.js\";\nimport type {\n AgentConfig,\n ReconfigureApplied,\n ReconfigureOutcome,\n ReconfigurePatch,\n ReconfigureRollback,\n} from \"./types.js\";\n\n/** The config fields a live reconfigure reads and writes (the harness's own config object). */\nexport type ReconfigureConfig = Pick<\n AgentConfig,\n \"model\" | \"modelRef\" | \"thinking\" | \"effort\" | \"registry\" | \"roles\"\n>;\n\n/** What the running process holds: the settings it spawned with or was last switched to. */\nexport interface ReconfigureSnapshot {\n model?: string;\n modelRef?: string;\n thinking?: AgentConfig[\"thinking\"];\n effort?: AgentConfig[\"effort\"];\n}\n\n/**\n * What an {@link ReconfigureLedgerOptions.applyLive} hook answers:\n *\n * - `\"applied\"`: the process now runs the delta.\n * - `\"respawn\"`: the process cannot take it live; the harness replaces it before\n * the next turn and the new process reads the desired config.\n * - `{ rejected }`: the process refuses it; the ledger rolls the config back to\n * the snapshot.\n */\nexport type ReconfigureApplyResult = \"applied\" | \"respawn\" | { rejected: string };\n\n/**\n * What an {@link ReconfigureLedgerOptions.applyLive} hook is told about a push.\n * `late` is true when the whole delta was answered `ok` earlier (it landed\n * mid-turn): a refusal then reaches the host only through\n * {@link ReconfigureLedgerOptions.onLateRejection}, so the hook must not also\n * report it on another channel (an `error` event).\n */\nexport interface ReconfigurePushContext {\n late: boolean;\n}\n\nconst FIELDS = [\"model\", \"modelRef\", \"thinking\", \"effort\"] as const;\n\nexport interface ReconfigureLedgerOptions<S extends ReconfigureSnapshot> {\n /**\n * The desired config. A getter, because a harness may replace its config object;\n * the ledger writes accepted patches into whatever it returns.\n */\n config: () => ReconfigureConfig;\n /**\n * Push a delta (the fields whose desired value differs from the snapshot) into\n * the running process. Called with the process up and idle, or at a turn\n * boundary through {@link ReconfigureLedger.flushBeforeTurn}. The hook receives\n * the live snapshot and may refine it (a harness that keeps extra fields on `S`\n * updates them here); on `\"applied\"` the ledger copies the delta into it.\n * A hook that throws counts as a rejection. Its `context.late` says whether a\n * refusal is reported elsewhere (see {@link ReconfigurePushContext}). Absent: the process reads the\n * desired config at its next spawn and there is nothing to push.\n */\n applyLive?: (\n delta: ReconfigureApplied,\n snapshot: S,\n context: ReconfigurePushContext,\n ) => ReconfigureApplyResult | Promise<ReconfigureApplyResult>;\n /** Whether the process is up and can take a push. Default: true. */\n isLive?: () => boolean;\n /** Whether no turn is in flight. Default: true. */\n isIdle?: () => boolean;\n /**\n * Called synchronously once a patch is written to the desired config, before\n * any live push. For harnesses that must refresh a derived cache on a change.\n */\n onDesired?: (applied: ReconfigureApplied) => void;\n /**\n * A refusal that arrives after the patch was already answered `ok` (it landed\n * mid-turn and flushed at the turn boundary). The config is already rolled back\n * when this runs, and an idle-time refusal never calls it (the capability call\n * answers that one). A harness emits the harness event `reconfigure-rollback`.\n */\n onLateRejection?: (rollback: ReconfigureRollback) => void;\n log?: Pick<Logger, \"warn\" | \"info\">;\n}\n\n/**\n * Serialised live reconfigure for one harness.\n *\n * `ok: true` means effective from the next turn: the next turn runs on the new\n * settings by live switch, query recycle or respawn. A patch that lands while a\n * turn is in flight (or before the process is ready) stays desired, is answered\n * `ok`, and is pushed by {@link flushBeforeTurn}.\n *\n * @category Bridge\n */\nexport class ReconfigureLedger<S extends ReconfigureSnapshot = ReconfigureSnapshot> {\n private snapshot: S | null = null;\n private respawn = false;\n private tail: Promise<unknown> | null = null;\n\n constructor(private readonly options: ReconfigureLedgerOptions<S>) {}\n\n /**\n * Record what a freshly spawned process runs. Call at every spawn: the\n * desired config is what that spawn read, so drift is computed against this.\n * `null` forgets the process (nothing left to push to).\n */\n setSnapshot(snapshot: S | null): void {\n this.snapshot = snapshot;\n this.respawn = false;\n }\n\n /**\n * The process cannot take the desired config live and the harness must replace\n * it before the next turn. Cleared by the next {@link setSnapshot}.\n */\n get needsRespawn(): boolean {\n return this.respawn;\n }\n\n /**\n * Apply a patch: scope the model to the session's provider entry, write it to\n * the desired config, and push it when the process is up and idle. Patches run\n * one at a time in arrival order.\n */\n reconfigure(patch: ReconfigurePatch): Promise<ReconfigureOutcome> {\n return this.enqueue(() => this.runPatch(patch));\n }\n\n /**\n * Push any drift to the process at a turn boundary. Await it before the turn\n * is sent, so the turn runs on the desired settings. Never rejects.\n */\n flushBeforeTurn(): Promise<void> {\n return this.enqueue(async () => {\n const snapshot = this.snapshot;\n if (!snapshot || this.respawn || !(this.options.isLive?.() ?? true)) return;\n await this.flush(snapshot, new Set());\n });\n }\n\n private enqueue<T>(job: () => Promise<T>): Promise<T> {\n // With nothing in flight the job's synchronous prefix (scope + write) runs now.\n const run = this.tail ? this.tail.then(job) : job();\n const settled = run.then(\n () => undefined,\n () => undefined,\n );\n this.tail = settled;\n void settled.then(() => {\n if (this.tail === settled) this.tail = null;\n });\n return run;\n }\n\n private async runPatch(patch: ReconfigurePatch): Promise<ReconfigureOutcome> {\n const config = this.options.config();\n const applied: ReconfigureApplied = {};\n if (patch.model !== undefined) {\n // In registry mode the spawned model derives from `modelRef`, so it moves\n // too: scoped to the current entry unless the patch names another one.\n const scope = scopeReconfigureModel({\n model: patch.model,\n modelRef: config.modelRef,\n registry: config.registry,\n roles: config.roles,\n });\n if (!scope.ok) {\n this.options.log?.warn(\"model change refused; keeping the current model\", {\n model: patch.model,\n providerId: scope.providerId,\n });\n return {\n ok: false,\n code: scope.code,\n message: scope.message,\n providerId: scope.providerId,\n };\n }\n config.model = applied.model = patch.model;\n if (scope.modelRef !== undefined) config.modelRef = applied.modelRef = scope.modelRef;\n }\n if (patch.thinking !== undefined) config.thinking = applied.thinking = patch.thinking;\n if (patch.effort !== undefined) config.effort = applied.effort = patch.effort;\n this.options.onDesired?.(applied);\n\n const snapshot = this.snapshot;\n // No process: the next spawn reads the desired config.\n if (!snapshot || this.respawn) return { ok: true, applied };\n const live = this.options.isLive?.() ?? true;\n const idle = this.options.isIdle?.() ?? true;\n // Mid-turn or before ready: stays desired, flushed at the turn boundary.\n if (!live || !idle) return { ok: true, applied };\n\n const own = new Set(Object.keys(applied) as Array<keyof ReconfigureApplied>);\n const rejected = await this.flush(snapshot, own);\n return rejected === null\n ? { ok: true, applied }\n : { ok: false, code: \"rejected\", message: rejected };\n }\n\n /**\n * Push the drift to the process. Returns the refusal message, or `null` when\n * the process took it (or will, by respawn). On a refusal the config rolls back\n * to the snapshot; fields outside `own` were answered `ok` earlier, so they are\n * reported through `onLateRejection`.\n */\n private async flush(\n snapshot: S,\n own: ReadonlySet<keyof ReconfigureApplied>,\n ): Promise<string | null> {\n const hook = this.options.applyLive;\n if (!hook) return null;\n const config = this.options.config();\n const delta: ReconfigureApplied = {};\n for (const key of FIELDS) {\n const value = config[key];\n if (value !== undefined && value !== snapshot[key]) Object.assign(delta, { [key]: value });\n }\n if (Object.keys(delta).length === 0) return null;\n\n // Nothing in the delta was answered to a caller of this push: it is all late.\n const context: ReconfigurePushContext = { late: own.size === 0 };\n let result: ReconfigureApplyResult;\n try {\n result = await hook(delta, snapshot, context);\n } catch (err) {\n result = { rejected: err instanceof Error ? err.message : String(err) };\n }\n // The process was replaced meanwhile; the new one read the desired config.\n if (this.snapshot !== snapshot) return null;\n\n if (result === \"applied\") {\n Object.assign(snapshot, delta);\n return null;\n }\n if (result === \"respawn\") {\n this.respawn = true;\n return null;\n }\n\n const requested: ReconfigureApplied = {};\n const restored: ReconfigureApplied = {};\n for (const key of Object.keys(delta) as (keyof ReconfigureApplied)[]) {\n // The hook may have applied part of the delta and refined the snapshot.\n Object.assign(config, { [key]: snapshot[key] });\n if (!own.has(key)) {\n Object.assign(requested, { [key]: delta[key] });\n Object.assign(restored, { [key]: snapshot[key] });\n }\n }\n this.options.log?.warn(\"live reconfigure refused; config rolled back\", {\n reason: result.rejected,\n fields: Object.keys(delta),\n });\n if (Object.keys(requested).length > 0) {\n this.options.onLateRejection?.({ message: result.rejected, requested, restored });\n }\n return result.rejected;\n }\n}\n","/**\n * Environment variables that belong to the runner process and must never reach\n * an agent child (the CLI, its tools, MCP servers, hooks).\n *\n * `SKAILE_WS_AUTH_TOKEN` authenticates the host on the runner's own WebSocket.\n * An agent that can read it can connect to the runner as the host and send host\n * commands (prompts, connector mutations such as flow-gate approvals). The\n * runner removes it from `process.env` at startup; every harness strips it again\n * from the env it hands its child, so a value that slips back in through\n * `AgentConfig.env` or an embedder that skipped the startup scrub still stops\n * at the harness.\n */\nexport const RUNNER_PRIVATE_ENV_KEYS: readonly string[] = [\n \"SKAILE_WS_AUTH_TOKEN\",\n \"SKAILE_WS_AUTH_TOKEN_FILE\",\n];\n\n/**\n * Remove every {@link RUNNER_PRIVATE_ENV_KEYS} entry from `env`, in place, and\n * return it. Call it on the final child env, after every merge.\n */\nexport function stripRunnerPrivateEnv<T extends Record<string, string | undefined>>(env: T): T {\n for (const key of RUNNER_PRIVATE_ENV_KEYS) delete env[key];\n return env;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/plugin-store/paths.ts","../cli/src/plugin-store/spec.ts","../cli/src/plugin-store/load.ts","../cli/src/plugin-store/reconcile.ts","../cli/src/plugin-store/index.ts"],"names":["existsSync","readFileSync","join"],"mappings":";;;;;;;;AAWO,SAAS,WAAW,UAAA,EAA4B;AACrD,EAAA,OAAO,IAAA,CAAK,UAAA,EAAY,SAAA,EAAW,SAAS,CAAA;AAC9C;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,kBAAkB,UAAA,EAA4B;AAC5D,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,iBAAiB,CAAA;AACvD;AAGA,SAAS,cAAc,MAAA,EAAqC;AAC1D,EAAA,IAAI,OAAO,MAAA,KAAW,QAAA,EAAU,OAAO,MAAA;AACvC,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,MAAM,CAAA,EAAG;AACzB,IAAA,KAAA,MAAW,KAAK,MAAA,EAAQ;AACtB,MAAA,MAAM,GAAA,GAAM,cAAc,CAAC,CAAA;AAC3B,MAAA,IAAI,KAAK,OAAO,GAAA;AAAA,IAClB;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,IAAI,MAAA,IAAU,OAAO,MAAA,KAAW,QAAA,EAAU;AACxC,IAAA,MAAM,GAAA,GAAM,MAAA;AACZ,IAAA,KAAA,MAAW,QAAQ,CAAC,QAAA,EAAU,MAAA,EAAQ,SAAA,EAAW,SAAS,CAAA,EAAG;AAC3D,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AiB,IAAA,EAAM,MAAM,CAAA;AAAA,EAC3D;AACF","file":"chunk-YGRZNFRO.js","sourcesContent":["/**\n * Pure path helpers for the project-local plugin store.\n *\n * The store is a self-contained npm workspace owned by the CLI under\n * `<projectDir>/.skaile/plugins/`. Only `resolvePluginEntry` reads the filesystem.\n */\n\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\n\n/** `<projectDir>/.skaile/plugins` — the store root. */\nexport function pluginsDir(projectDir: string): string {\n return join(projectDir, \".skaile\", \"plugins\");\n}\n\n/** `<store>/package.json` — generated, never user-edited. */\nexport function pluginsPkgJson(projectDir: string): string {\n return join(pluginsDir(projectDir), \"package.json\");\n}\n\n/** `<store>/node_modules` — where reconciled plugin packages land. */\nexport function nodeModulesDir(projectDir: string): string {\n return join(pluginsDir(projectDir), \"node_modules\");\n}\n\n/** `<store>/.reconcile-hash` — SHA of plugins-list + lock slice; skip reinstall when unchanged. */\nexport function reconcileHashFile(projectDir: string): string {\n return join(pluginsDir(projectDir), \".reconcile-hash\");\n}\n\n/** Pick the file an `exports` target points at, preferring the ESM-friendly conditions. */\nfunction exportsTarget(target: unknown): string | undefined {\n if (typeof target === \"string\") return target;\n if (Array.isArray(target)) {\n for (const t of target) {\n const hit = exportsTarget(t);\n if (hit) return hit;\n }\n return undefined;\n }\n if (target && typeof target === \"object\") {\n const map = target as Record<string, unknown>;\n for (const cond of [\"import\", \"node\", \"default\", \"require\"]) {\n if (cond in map) {\n const hit = exportsTarget(map[cond]);\n if (hit) return hit;\n }\n }\n }\n return undefined;\n}\n\n/**\n * Absolute path to a plugin package's entry file under the store's\n * `node_modules`, resolved from its `package.json` (`exports[\".\"]`, then\n * `module`, then `main`, then `index.js`). Node's ESM loader rejects directory\n * imports, so the entry must be a file; `import()` of the result works inside\n * compiled binaries via `pathToFileURL`.\n *\n * @throws When the package is not installed or declares no resolvable entry.\n */\nexport function resolvePluginEntry(projectDir: string, pkgName: string): string {\n const pkgDir = join(nodeModulesDir(projectDir), pkgName);\n const pkgJsonPath = join(pkgDir, \"package.json\");\n if (!existsSync(pkgJsonPath)) {\n throw new Error(`package \"${pkgName}\" is not installed in ${nodeModulesDir(projectDir)}`);\n }\n const pkg = JSON.parse(readFileSync(pkgJsonPath, \"utf8\")) as {\n exports?: unknown;\n module?: string;\n main?: string;\n };\n let rel: string | undefined;\n if (pkg.exports !== undefined) {\n const root =\n typeof pkg.exports === \"object\" && pkg.exports !== null && !Array.isArray(pkg.exports)\n ? ((pkg.exports as Record<string, unknown>)[\".\"] ?? pkg.exports)\n : pkg.exports;\n rel = exportsTarget(root);\n }\n rel ??= pkg.module ?? pkg.main ?? \"index.js\";\n const entry = resolve(pkgDir, rel);\n if (!existsSync(entry)) {\n throw new Error(`package \"${pkgName}\" entry ${rel} does not exist`);\n }\n return entry;\n}\n","/**\n * Parse npm package specifiers from the `plugins:` list into name + range.\n *\n * The leading `@` of a scope is NOT a separator: only the last `@` at a\n * non-zero index splits the package name from its semver range.\n * \"@skaile/provider-fly@^0.1.0\" → { name: \"@skaile/provider-fly\", range: \"^0.1.0\" }\n * \"@skaile/connector-redis\" → { name: \"@skaile/connector-redis\", range: \"*\" }\n * \"lodash@^4\" → { name: \"lodash\", range: \"^4\" }\n */\n\n/** A parsed plugin specifier: package name plus a semver range (`\"*\"` when omitted). */\nexport interface PluginSpec {\n name: string;\n range: string;\n}\n\n/**\n * Parse a single plugin specifier into `{ name, range }`.\n *\n * @param spec - An npm specifier, e.g. `\"@skaile/provider-fly@^0.1.0\"` or `\"lodash\"`.\n * @returns The package name and semver range (range defaults to `\"*\"`).\n * @throws Error when the specifier is empty.\n */\nexport function parseSpec(spec: string): PluginSpec {\n const trimmed = spec.trim();\n if (!trimmed) throw new Error(\"parseSpec: empty specifier\");\n\n // Find the version-separating `@` — the last one that is not the scope `@`\n // at index 0. A bare `@scope/name` has its only `@` at index 0 (no range).\n const at = trimmed.lastIndexOf(\"@\");\n if (at <= 0) {\n return { name: trimmed, range: \"*\" };\n }\n const name = trimmed.slice(0, at);\n const range = trimmed.slice(at + 1);\n return { name, range: range.length > 0 ? range : \"*\" };\n}\n\n/** Convenience: just the package name of a specifier. */\nexport function specName(spec: string): string {\n return parseSpec(spec).name;\n}\n","/**\n * Runtime plugin loader: dynamic-import each reconciled plugin and let it\n * self-register into the `pluginRegistry`.\n *\n * Each plugin specifier resolves to an absolute path under the store's\n * `node_modules`; we import it via a `file://` URL so the import works inside\n * `bun --compile` binaries (which bundle only the literal-string switches, but\n * can still execute a `file://` import against the unpacked store on disk).\n * Failures are caught per-plugin so one broken plugin never aborts the rest.\n */\n\nimport { pathToFileURL } from \"node:url\";\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { resolvePluginEntry } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/** Options for {@link loadPlugins}. */\nexport interface LoadOptions {\n log?: Logger;\n}\n\n/** Result of a load pass: which specs registered and which failed. */\nexport interface LoadResult {\n loaded: string[];\n failed: { spec: string; error: string; reason: string }[];\n}\n\n/** The self-registration entrypoint a plugin module is expected to export. */\ntype PluginModule = { register?: (registry: PluginRegistry) => void };\n\n/**\n * Load and register each plugin in `plugins` into `registry`.\n *\n * @param projectDir - Project root holding `.skaile/plugins/node_modules`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param registry - Registry to register into. Defaults to the process-wide `pluginRegistry`.\n * @param opts - Optional logger.\n * @returns Loaded specs + per-plugin failures (never throws).\n */\nexport async function loadPlugins(\n projectDir: string,\n plugins: string[],\n registry: PluginRegistry = pluginRegistry,\n opts: LoadOptions = {},\n): Promise<LoadResult> {\n const loaded: string[] = [];\n const failed: { spec: string; error: string; reason: string }[] = [];\n\n for (const spec of plugins) {\n try {\n const { name } = parseSpec(spec);\n const entry = resolvePluginEntry(projectDir, name);\n const mod = (await import(pathToFileURL(entry).href)) as PluginModule;\n if (typeof mod.register !== \"function\") {\n throw new Error(`plugin \"${name}\" does not export a register() function`);\n }\n mod.register(registry);\n loaded.push(spec);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n failed.push({ spec, error: `failed to load plugin \"${spec}\": ${message}`, reason: message });\n opts.log?.warn(`plugin load failed: ${spec}`, { error: message });\n }\n }\n\n return { loaded, failed };\n}\n","/**\n * Reconcile the project-local plugin store (`<projectDir>/.skaile/plugins/`).\n *\n * The reconciler is hash-skipped: it computes a SHA-256 over the sorted plugin\n * list plus the lock file's `plugins` slice and compares it to the stored\n * `.reconcile-hash`. On a match it returns with zero further I/O; otherwise it\n * regenerates the store's `package.json` and runs `bun install` against it.\n *\n * The install step is injectable (`InstallFn`) so tests stay hermetic — they\n * pass a fake installer that records calls and writes a stub `node_modules`.\n */\n\nimport { createHash } from \"node:crypto\";\nimport { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { readPluginsLockSlice } from \"@skaile/workspaces/core\";\nimport { nodeModulesDir, pluginsDir, pluginsPkgJson, reconcileHashFile } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/** How `InstallFn` may treat the store's lock: `frozen` forbids lock changes. */\nexport interface InstallOptions {\n /**\n * `false` when the spec list changed since the last `package.json`, so the\n * lock has to change too. Defaults to `true` (frozen when a lock exists).\n */\n frozen?: boolean;\n}\n\n/**\n * Installs the store's dependencies. Returns `ok: false` (never throws) on a\n * failed install so the reconciler can surface the captured `output`.\n */\nexport type InstallFn = (\n pluginsDir: string,\n opts?: InstallOptions,\n) => Promise<{ ok: boolean; output: string }>;\n\n/** Options for {@link reconcilePlugins}. */\nexport interface ReconcileOptions {\n /** Injectable installer. Defaults to a real `bun install` of the store. */\n runInstall?: InstallFn;\n /**\n * Lock slice to fold into the reconcile-hash. Defaults to\n * `readPluginsLockSlice(projectDir)` so a lock edit invalidates the hash.\n */\n lockSlice?: unknown;\n}\n\n/** Result of a reconcile pass. */\nexport interface ReconcileResult {\n changed: boolean;\n reason: \"no-plugins\" | \"up-to-date\" | \"reconciled\";\n}\n\n/** Run a command to completion, capturing stdout+stderr. `started: false` when it cannot spawn. */\nasync function runCapture(\n args: string[],\n cwd: string,\n): Promise<{ started: boolean; code: number; output: string }> {\n const { portableSpawn } = await import(\"@skaile/workspaces/core\");\n const proc = portableSpawn(args, { cwd });\n const chunks: string[] = [];\n const decoder = new TextDecoder();\n const pump = async (stream: ReadableStream<Uint8Array>) => {\n const reader = stream.getReader();\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value) chunks.push(decoder.decode(value, { stream: true }));\n }\n };\n await Promise.all([pump(proc.stdout), pump(proc.stderr)]);\n const code = await proc.exited;\n // `portableSpawn` reports a spawn error (ENOENT) as exit -1 with no pid.\n return { started: proc.pid !== -1, code, output: chunks.join(\"\") };\n}\n\n/**\n * The default real installer: `bun install` inside the store directory, or\n * `npm install` when `bun` is not on PATH. Frozen only when a lock exists and\n * the spec list did not change (`opts.frozen !== false`): a changed list has to\n * rewrite the lock, which a frozen install refuses.\n */\nexport const defaultInstall: InstallFn = async (dir, opts = {}) => {\n const hasBunLock = existsSync(`${dir}/bun.lock`) || existsSync(`${dir}/bun.lockb`);\n const hasNpmLock = existsSync(`${dir}/package-lock.json`);\n const frozen = opts.frozen !== false;\n\n const bunArgs =\n frozen && (hasBunLock || hasNpmLock)\n ? [\"bun\", \"install\", \"--frozen-lockfile\"]\n : [\"bun\", \"install\"];\n const withBun = await runCapture(bunArgs, dir);\n if (withBun.started) return { ok: withBun.code === 0, output: withBun.output };\n\n const npmArgs =\n frozen && hasNpmLock\n ? [\"npm\", \"ci\", \"--ignore-scripts\", \"--no-audit\", \"--no-fund\"]\n : [\"npm\", \"install\", \"--ignore-scripts\", \"--no-audit\", \"--no-fund\"];\n const withNpm = await runCapture(npmArgs, dir);\n if (withNpm.started) return { ok: withNpm.code === 0, output: withNpm.output };\n return {\n ok: false,\n output:\n \"neither bun nor npm found on PATH; plugin install needs one of them (https://bun.sh or https://nodejs.org)\",\n };\n};\n\n/**\n * Generate the store's `package.json` from the plugin specs. Returns the\n * previous file content (`undefined` when there was none) and whether the\n * dependency set changed.\n */\nfunction writePackageJson(\n projectDir: string,\n plugins: string[],\n): { previous: string | undefined; depsChanged: boolean } {\n const dependencies: Record<string, string> = {};\n for (const spec of plugins) {\n const { name, range } = parseSpec(spec);\n dependencies[name] = range;\n }\n const pkg = {\n name: \"skaile-project-plugins\",\n private: true,\n dependencies,\n };\n const file = pluginsPkgJson(projectDir);\n const previous = existsSync(file) ? readFileSync(file, \"utf8\") : undefined;\n let before: Record<string, string> | undefined;\n try {\n before = previous === undefined ? undefined : JSON.parse(previous).dependencies;\n } catch {\n before = undefined;\n }\n const sortedJson = (d: Record<string, string> | undefined) =>\n JSON.stringify(Object.entries(d ?? {}).sort(([a], [b]) => a.localeCompare(b)));\n const depsChanged = before === undefined || sortedJson(before) !== sortedJson(dependencies);\n mkdirSync(pluginsDir(projectDir), { recursive: true });\n writeFileSync(file, `${JSON.stringify(pkg, null, 2)}\\n`);\n return { previous, depsChanged };\n}\n\n/**\n * Reconcile the plugin store for a project.\n *\n * @param projectDir - Project root containing `skaile.yaml` / `skaile.lock.yaml`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param opts - Optional injectable installer + lock slice override.\n * @returns Whether the store changed and why.\n */\nexport async function reconcilePlugins(\n projectDir: string,\n plugins: string[],\n opts: ReconcileOptions = {},\n): Promise<ReconcileResult> {\n if (plugins.length === 0) {\n return { changed: false, reason: \"no-plugins\" };\n }\n\n const lockSlice = opts.lockSlice ?? readPluginsLockSlice(projectDir);\n const wantHash = createHash(\"sha256\")\n .update(JSON.stringify({ plugins: [...plugins].sort(), lock: lockSlice }))\n .digest(\"hex\");\n\n const hashFile = reconcileHashFile(projectDir);\n if (existsSync(hashFile)) {\n const have = readFileSync(hashFile, \"utf8\").trim();\n if (have === wantHash) {\n return { changed: false, reason: \"up-to-date\" };\n }\n }\n\n const { previous, depsChanged } = writePackageJson(projectDir, plugins);\n\n const install = opts.runInstall ?? defaultInstall;\n const result = await install(pluginsDir(projectDir), { frozen: !depsChanged });\n if (!result.ok) {\n // A failed install must not leave the spec behind: the next reconcile\n // would compare against it and treat the store as already changed.\n if (previous === undefined) rmSync(pluginsPkgJson(projectDir), { force: true });\n else writeFileSync(pluginsPkgJson(projectDir), previous);\n throw new Error(`plugin install failed:\\n${result.output}`);\n }\n\n writeFileSync(hashFile, wantHash);\n return { changed: true, reason: \"reconciled\" };\n}\n\n/**\n * Put the store back to `previousPlugins` after `plugin install` failed past\n * the reconcile (the plugin installed but does not load). Best effort: a\n * failing reinstall is swallowed, the store is then rebuilt by the next\n * reconcile because the hash no longer matches the declared list.\n *\n * With no previous plugins every generated file of the store goes away\n * (`package.json`, hash, lock file and `node_modules`), so the store keeps\n * neither the rejected spec nor its installed package.\n */\nexport async function rollbackPluginStore(\n projectDir: string,\n previousPlugins: string[],\n opts: ReconcileOptions = {},\n): Promise<void> {\n if (previousPlugins.length === 0) {\n const dir = pluginsDir(projectDir);\n rmSync(pluginsPkgJson(projectDir), { force: true });\n rmSync(reconcileHashFile(projectDir), { force: true });\n rmSync(nodeModulesDir(projectDir), { recursive: true, force: true });\n for (const lock of [\"bun.lock\", \"bun.lockb\", \"package-lock.json\"]) {\n rmSync(join(dir, lock), { force: true });\n }\n return;\n }\n try {\n await reconcilePlugins(projectDir, previousPlugins, opts);\n } catch {\n // the next reconcile retries\n }\n}\n","/**\n * The project-local plugin store: reconcile (`<projectDir>/.skaile/plugins/`)\n * then load the reconciled plugins into the `pluginRegistry`.\n *\n * `ensurePluginsLoaded` is the single entrypoint commands wire in. It is a\n * guarded no-op when `plugins` is empty/undefined — zero overhead for the\n * common case where no project declares `plugins:` in `skaile.yaml`.\n */\n\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport pc from \"picocolors\";\nimport { type LoadResult, loadPlugins } from \"./load.js\";\nimport { type ReconcileOptions, reconcilePlugins } from \"./reconcile.js\";\nimport { specName } from \"./spec.js\";\n\nexport type { LoadResult } from \"./load.js\";\nexport { loadPlugins } from \"./load.js\";\nexport type { ReconcileOptions } from \"./reconcile.js\";\nexport { reconcilePlugins, rollbackPluginStore } from \"./reconcile.js\";\nexport { specName } from \"./spec.js\";\n\n/** Options for {@link ensurePluginsLoaded}. */\nexport interface EnsurePluginsOptions extends ReconcileOptions {\n log?: Logger;\n}\n\n/**\n * Reconcile the plugin store then load each plugin into `registry`.\n *\n * No-op (returns immediately) when `plugins` is empty/undefined, so the common\n * no-plugins path costs nothing.\n *\n * @param projectDir - Project root.\n * @param plugins - The `skaile.yaml` `plugins:` list (may be undefined).\n * @param registry - Registry to register into. Defaults to `pluginRegistry`.\n * @param opts - Injectable installer / lock slice + optional logger.\n * @returns The load result, or an empty result when there are no plugins.\n */\nexport async function ensurePluginsLoaded(\n projectDir: string,\n plugins: string[] | undefined,\n registry: PluginRegistry = pluginRegistry,\n opts: EnsurePluginsOptions = {},\n): Promise<LoadResult> {\n if (!plugins || plugins.length === 0) {\n return { loaded: [], failed: [] };\n }\n await reconcilePlugins(projectDir, plugins, opts);\n return loadPlugins(projectDir, plugins, registry, { log: opts.log });\n}\n\n/**\n * The installer's output of a failed `plugin install` is a dump (bun's banner, resolver\n * progress, then the `error:` lines). A load warning keeps the first line and the cause of it\n * (p1113); `skaile plugin install <spec>` prints the whole output.\n *\n * bun: the last `error:` line. npm: its `code` line and the first detail line after it\n * (`E404: 404 Not Found - GET …`), never the trailing `A complete log of this run can be found\n * in: …` pointer (p1272).\n */\nexport function condensePluginFailure(reason: string): string {\n const lines = reason\n .split(\"\\n\")\n .map((l) => l.trim())\n .filter((l) => l !== \"\");\n const [first, ...rest] = lines;\n if (!reason.startsWith(\"plugin install failed\") || first === undefined || rest.length === 0) {\n return reason;\n }\n const head = first.replace(/:$/, \"\");\n const npmPrefix = /^npm (ERR!|error)\\s*/i;\n const npmLines = rest\n .filter((l) => npmPrefix.test(l) && !/^npm \\S+\\s+A complete log of this run\\b/i.test(l))\n .map((l) => l.replace(npmPrefix, \"\"))\n .filter((l) => l !== \"\");\n const codeLine = npmLines.find((l) => /^code\\s+\\S+/i.test(l));\n if (codeLine) {\n const code = codeLine.replace(/^code\\s+/i, \"\");\n const detail = npmLines.find((l) => l !== codeLine && !/^code\\s/i.test(l));\n return `${head}: npm ${code}${detail ? `: ${detail}` : \"\"}`;\n }\n const causes = rest.filter(\n (l) => /^error\\b/i.test(l) || (npmPrefix.test(l) && !/A complete log of this run\\b/i.test(l)),\n );\n const cause =\n causes.at(-1) ?? rest.filter((l) => !/A complete log of this run\\b/i.test(l)).at(-1);\n return `${head}: ${cause ?? rest.at(-1)}`;\n}\n\n/** One `! plugin <name> failed to load: <reason>` line on stderr (stdout carries a run's answer). */\nfunction warnPluginFailed(spec: string, reason: string): void {\n let name = spec;\n try {\n name = specName(spec);\n } catch {\n /* a spec that does not parse is named as written */\n }\n process.stderr.write(\n ` ${pc.yellow(\"!\")} plugin ${name} failed to load: ${condensePluginFailure(reason)}\\n`,\n );\n}\n\n/**\n * Reconcile + load the `plugins:` of the project's `skaile.yaml` into the process registry, so a\n * plugin's harness is known to `run`, `repl` and `config set harness`. A plugin that fails to\n * reconcile or load is skipped (its harness stays unknown, the command goes on) and named in one\n * `! plugin <name> failed to load: <reason>` line on stderr. An unreadable config is not this\n * function's to report: the command reads it again and says so.\n */\nexport async function loadDeclaredPlugins(projectDir: string): Promise<void> {\n let plugins: string[] | undefined;\n try {\n const { resolveSkWorkspaceConfig } = await import(\"@skaile/workspaces/core\");\n plugins = resolveSkWorkspaceConfig(projectDir).plugins;\n } catch {\n return;\n }\n if (!plugins || plugins.length === 0) return;\n try {\n const result = await ensurePluginsLoaded(projectDir, plugins, pluginRegistry);\n for (const f of result.failed) warnPluginFailed(f.spec, f.reason);\n } catch (err) {\n // The store could not be reconciled: no plugin was loaded.\n const reason = err instanceof Error ? err.message : String(err);\n for (const spec of plugins) warnPluginFailed(spec, reason);\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../core/src/framework.ts"],"names":[],"mappings":";AA4BO,IAAM,kBAAA,GAAqB;AAO3B,IAAM,gBAAA,GAAiD;AAAA,EAC5D,YAAA,EAAc;AAAA,IACZ,SAAA,EAAW,gBAAA;AAAA,IACX,SAAA,EAAW,gBAAA;AAAA,IACX,UAAA,EAAY;AAAA,GACd;AAAA,EACA,KAAA,EAAO;AAAA,IACL,SAAA,EAAW,eAAA;AAAA,IACX,SAAA,EAAW,eAAA;AAAA,IACX,UAAA,EAAY;AAAA,GACd;AAAA,EACA,GAAA,EAAK;AAAA,IACH,SAAA,EAAW,aAAA;AAAA,IACX,SAAA,EAAW,aAAA;AAAA,IACX,UAAA,EAAY;AAAA;AAEhB;AA0BO,SAAS,oBAAoB,QAAA,EAAsC;AACxE,EAAA,MAAM,OAAA,GAAU,SAAS,OAAA,IAAW,kBAAA;AACpC,EAAA,MAAM,QAAA,GAAW,gBAAA,CAAiB,OAAO,CAAA,IAAK,iBAAiB,kBAAkB,CAAA;AACjF,EAAA,OAAO;AAAA,IACL,SAAA,EAAW,QAAA,CAAS,SAAA,IAAa,QAAA,CAAU,SAAA;AAAA,IAC3C,SAAA,EAAW,QAAA,CAAS,SAAA,IAAa,QAAA,CAAU,SAAA;AAAA,IAC3C,UAAA,EAAY,QAAA,CAAS,UAAA,IAAc,QAAA,CAAU;AAAA,GAC/C;AACF","file":"chunk-Z7ZEZZB6.js","sourcesContent":["/**\n * Harness path resolution — maps execution harness names to their runtime paths.\n */\n\n// ── Types ─────────────────────────────────────────────────────────────────────\n\n/**\n * Resolved runtime path structure for a bridge harness.\n * All three directories are relative to the project root.\n * @docLink packages/core/concepts#harness-paths\n */\nexport interface HarnessPaths {\n /** Where skills (SKILL.md dirs) are installed relative to projectDir */\n skillsDir: string;\n /** Where agent definitions are installed relative to projectDir */\n agentsDir: string;\n /** Where prompt files are installed relative to projectDir */\n promptsDir: string;\n}\n\n// ── Harness defaults ───────────────────────────────────────────────────────────\n\n/**\n * The harness a session runs on when no settings layer, flag or profile names\n * one. The single definition: settings defaults, path resolution and the\n * runner's session build all import it.\n * @docLink packages/core/concepts#harness-defaults\n */\nexport const DEFAULT_HARNESS_ID = \"omp\";\n\n/**\n * Built-in per-harness runtime path conventions (relative to project root).\n * Covers `claude-sdk`, `codex`, and `omp`. Used as defaults by `resolveHarnessPaths`.\n * @docLink packages/core/concepts#harness-defaults\n */\nexport const HARNESS_DEFAULTS: Record<string, HarnessPaths> = {\n \"claude-sdk\": {\n skillsDir: \".claude/skills\",\n agentsDir: \".claude/agents\",\n promptsDir: \".claude/commands\",\n },\n codex: {\n skillsDir: \".codex/skills\",\n agentsDir: \".codex/agents\",\n promptsDir: \".codex/rules\",\n },\n omp: {\n skillsDir: \".omp/skills\",\n agentsDir: \".omp/agents\",\n promptsDir: \".omp/prompts\",\n },\n};\n\n// ── Harness resolution ─────────────────────────────────────────────────────────\n\n/** Settings interface — minimal subset needed for harness path resolution. */\ninterface SettingsLike {\n skillsDir?: string;\n agentsDir?: string;\n promptsDir?: string;\n harness?: string;\n}\n\n/**\n * Resolve the effective runtime paths for a bridge harness.\n *\n * Looks up `HARNESS_DEFAULTS[settings.harness]`, then overlays any per-field\n * overrides from `settings.skillsDir`, `settings.agentsDir`, `settings.promptsDir`.\n * Falls back to the `omp` defaults for unknown harness values.\n *\n * To look up file install paths for a specific IDE/tool target, use\n * `HARNESS_TARGETS[harnessName]` from `harness-targets.ts` directly.\n *\n * @param settings - Minimal settings object providing `harness` and optional path overrides\n * @returns `HarnessPaths` with resolved relative paths for skills, agents, and prompts\n * @docLink packages/core/concepts#resolve-harness-paths\n */\nexport function resolveHarnessPaths(settings: SettingsLike): HarnessPaths {\n const harness = settings.harness ?? DEFAULT_HARNESS_ID;\n const defaults = HARNESS_DEFAULTS[harness] ?? HARNESS_DEFAULTS[DEFAULT_HARNESS_ID];\n return {\n skillsDir: settings.skillsDir ?? defaults!.skillsDir,\n agentsDir: settings.agentsDir ?? defaults!.agentsDir,\n promptsDir: settings.promptsDir ?? defaults!.promptsDir,\n };\n}\n"]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export { connectorDescribe, connectorExec, connectorList, connectorLoadSkill, connectorRead, connectorSearch, connectorWrite, mountList, mountRead, mountStatus, mountSync } from './chunk-7TPYPVAH.js';
|
|
2
|
-
import './chunk-3MWQKQUB.js';
|
|
3
|
-
import './chunk-SNEE6UGY.js';
|
|
4
|
-
import './chunk-6GWSDPBP.js';
|
|
5
|
-
import './chunk-LN6QB7XI.js';
|
|
6
|
-
import './chunk-4XWLB7JB.js';
|
|
7
|
-
import './chunk-WDAIWDLK.js';
|
|
8
|
-
import './chunk-4DWBSTYA.js';
|
|
9
|
-
import './chunk-JDR6ILCW.js';
|
|
10
|
-
import './chunk-LOO5CB5M.js';
|
|
11
|
-
import './chunk-BIRW3HOG.js';
|
|
12
|
-
import './chunk-7CV3HFWJ.js';
|
|
13
|
-
import './chunk-GEQSUC6U.js';
|
|
14
|
-
import './chunk-XFIEVEU7.js';
|
|
15
|
-
import './chunk-7DN6JKP2.js';
|
|
16
|
-
import './chunk-UVVVR4XO.js';
|
|
17
|
-
import './chunk-F2GOZMRA.js';
|
|
18
|
-
import './chunk-G5SUWZEU.js';
|
|
19
|
-
import './chunk-IFGTRL2I.js';
|
|
20
|
-
import './chunk-SZXGRHQQ.js';
|
|
21
|
-
import './chunk-WD3L5QSU.js';
|
|
22
|
-
import './chunk-7RGTAEG6.js';
|
|
23
|
-
import './chunk-JCPD4QRM.js';
|
|
24
|
-
import './chunk-LNFKL23K.js';
|
|
25
|
-
import './chunk-X3RMRJNR.js';
|
|
26
|
-
import './chunk-NUELZWCF.js';
|
|
27
|
-
import './chunk-E572OHGY.js';
|
|
28
|
-
import './chunk-L4YKW5AY.js';
|
|
29
|
-
import './chunk-4GY63JU6.js';
|
|
30
|
-
import './chunk-OTIB4D2K.js';
|
|
31
|
-
import './chunk-5KRMNUL4.js';
|
|
32
|
-
import './chunk-Z7ZEZZB6.js';
|
|
33
|
-
import './chunk-MWXYN6NY.js';
|
|
34
|
-
import './chunk-OHNKYHRR.js';
|
|
35
|
-
import './chunk-L5VSIPQD.js';
|
|
36
|
-
import './chunk-VTETQCR6.js';
|
|
37
|
-
import './chunk-UQ33Y4DM.js';
|
|
38
|
-
import './chunk-RVRB27AN.js';
|
|
39
|
-
import './chunk-GOCWM7FN.js';
|
|
40
|
-
import './chunk-WDXZA7QW.js';
|
|
41
|
-
import './chunk-ADPM6AYF.js';
|
|
42
|
-
import './chunk-DKXNKFKP.js';
|
|
43
|
-
import './chunk-LSI2IVFT.js';
|
|
44
|
-
import './chunk-C3CAXQMA.js';
|
|
45
|
-
import './chunk-BOFL7GIF.js';
|
|
46
|
-
import './chunk-NSBPE2FW.js';
|
|
47
|
-
//# sourceMappingURL=connectors-CXZLXAFZ.js.map
|
|
48
|
-
//# sourceMappingURL=connectors-CXZLXAFZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/ensure-sources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,gBAAgB,GAAA,EAAqB;AAC5C,EAAA,OAAY,IAAA,CAAA,IAAA,CAAK,iBAAA,EAAkB,EAAG,GAAG,CAAA;AAC3C;AASA,SAAS,kBAAA,CAAmB,UAAkB,KAAA,EAAsC;AAClF,EAAA,IAAI;AACF,IAAA,OAAO,mBAAA,CAAoB,IAAA,CAAK,QAAQ,CAAA,CAAE,UAAA,EAAW;AAAA,EACvD,SAAS,GAAA,EAAK;AACZ,IAAA,IAAI,CAAC,KAAA,EAAO;AACV,MAAA,MAAA,CAAO,CAAA,eAAA,EAAkB,QAAQ,CAAA,EAAA,EAAK,GAAA,YAAe,KAAA,GAAQ,IAAI,OAAA,GAAU,MAAA,CAA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AAA,EAAQ,KAAA,CAAM,CAAA,eAAA,EAAkB,CAAC,CAAA,EAAA,CAAI,CAAA;AAC5D,EAAA,IAAI,MAAA,CAAO,MAAA,CAAO,MAAA,GAAS,CAAA,EAAG;AAC5B,IAAA,OAAA,CAAQ,yBAAyB,MAAA,CAAO,MAAA,CAAO,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,EAC7D;AACF;AAUO,SAAS,mBAAA,CACd,UAAA,EACA,IAAA,GAA4B,EAAC,EACf;AACd,EAAA,MAAM,MAAA,GAAuB,EAAE,MAAA,EAAQ,EAAC,EAAG,QAAQ,EAAC,EAAG,MAAA,EAAQ,EAAC,EAAE;AAClE,EAAA,MAAM,QAAA,GAAgB,IAAA,CAAA,IAAA,CAAK,UAAA,EAAY,aAAa,CAAA;AACpD,EAAA,IAAI,CAAC,UAAA,CAAW,QAAQ,CAAA,EAAG,OAAO,MAAA;AAElC,EAAA,MAAM,KAAA,GAAQ,KAAK,KAAA,IAAS,KAAA;AAC5B,EAAA,MAAM,OAAA,GAAU,kBAAA,CAAmB,QAAA,EAAU,KAAK,CAAA;AAClD,EAAA,IAAI,OAAA,KAAY,MAAM,OAAO,MAAA;AAC7B,EAAA,IAAI,OAAA,CAAQ,MAAA,KAAW,CAAA,EAAG,OAAO,MAAA;AAEjC,EAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC3B,IAAA,kBAAA,CAAmB,KAAA,EAAO,OAAO,MAAM,CAAA;AAAA,EACzC;AAEA,EAAA,IAAI,CAAC,KAAA,EAAO;AACV,IAAA,iBAAA,CAAkB,MAAM,CAAA;AAAA,EAC1B;AAEA,EAAA,OAAO,MAAA;AACT","file":"ensure-sources-UPTHZKGF.js","sourcesContent":["/**\n * ensure-sources.ts — hydrate the `~/.skaile/cache/sources/` clone cache from a\n * project's `skaile.yaml` `sources:` entries.\n *\n * Called by `skaile init` (idempotent: no-op when no sources declared) and\n * `skaile install` so checking out a project pulls its source clones onto\n * the local machine.\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, mkdirSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport {\n getGlobalCacheDir,\n type SourceEntry,\n sourceCacheKey,\n sourceShortName,\n WorkspaceYamlEditor,\n} from \"@skaile/workspaces/core\";\nimport { logErr, logInfo, logOk } from \"./helpers.ts\";\n\nfunction sourceClonePath(key: string): string {\n return path.join(getGlobalCacheDir(), key);\n}\n\nexport interface EnsureResult {\n cloned: string[];\n cached: string[];\n failed: string[];\n}\n\n/** Load `sources:` from a project's `skaile.yaml`, or `null` when unavailable. */\nfunction loadProjectSources(yamlPath: string, quiet: boolean): SourceEntry[] | null {\n try {\n return WorkspaceYamlEditor.load(yamlPath).getSources();\n } catch (err) {\n if (!quiet) {\n logErr(`Could not read ${yamlPath}: ${err instanceof Error ? err.message : String(err)}`);\n }\n return null;\n }\n}\n\n/**\n * Hydrate a single source entry into `result`: skip when already cached,\n * otherwise clone and record success/failure. Mutates `result` in place.\n */\nfunction hydrateSourceEntry(entry: SourceEntry, quiet: boolean, result: EnsureResult): void {\n const key = sourceCacheKey(entry.url);\n const slug = sourceShortName(entry.url);\n const dest = sourceClonePath(key);\n if (existsSync(dest)) {\n result.cached.push(slug);\n return;\n }\n mkdirSync(path.dirname(dest), { recursive: true });\n const args = [\"clone\", entry.url, dest];\n if (entry.pin) args.splice(1, 0, \"--branch\", entry.pin);\n const clone = spawnSync(\"git\", args, { stdio: quiet ? \"pipe\" : \"inherit\" });\n if (clone.status !== 0) {\n result.failed.push(slug);\n if (quiet) {\n logErr(`git clone failed for ${entry.url}`);\n }\n return;\n }\n result.cloned.push(slug);\n}\n\n/** Log a full-hydrate summary of cloned + reused-cached entries. */\nfunction logHydrateSummary(result: EnsureResult): void {\n for (const n of result.cloned) logOk(`Cloned source \"${n}\".`);\n if (result.cached.length > 0) {\n logInfo(`Reused cached clones: ${result.cached.join(\", \")}`);\n }\n}\n\n/**\n * Walk `projectDir/skaile.yaml` `sources:` and clone any entries whose\n * clone directory does not yet exist under `~/.skaile/cache/sources/`. Existing\n * clones are left untouched — this is hydration, not sync.\n *\n * Quiet by default: when `quiet: true` the helper only prints failures.\n * On full hydrate (`quiet: false`) it logs each cloned/cached entry.\n */\nexport function ensureSourcesCloned(\n projectDir: string,\n opts: { quiet?: boolean } = {},\n): EnsureResult {\n const result: EnsureResult = { cloned: [], cached: [], failed: [] };\n const yamlPath = path.join(projectDir, \"skaile.yaml\");\n if (!existsSync(yamlPath)) return result;\n\n const quiet = opts.quiet ?? false;\n const sources = loadProjectSources(yamlPath, quiet);\n if (sources === null) return result;\n if (sources.length === 0) return result;\n\n for (const entry of sources) {\n hydrateSourceEntry(entry, quiet, result);\n }\n\n if (!quiet) {\n logHydrateSummary(result);\n }\n\n return result;\n}\n"]}
|
package/dist/flows-TJQIMGUX.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export { flowFindFlowForSession, flowGetSession, flowList, flowListSessions, flowShow } from './chunk-SRODW6M2.js';
|
|
2
|
-
import './chunk-WYZXSJBK.js';
|
|
3
|
-
import './chunk-6Z5KTFJT.js';
|
|
4
|
-
import './chunk-3MWQKQUB.js';
|
|
5
|
-
import './chunk-H6UVIKQ2.js';
|
|
6
|
-
import './chunk-L4YKW5AY.js';
|
|
7
|
-
import './chunk-4GY63JU6.js';
|
|
8
|
-
import './chunk-OTIB4D2K.js';
|
|
9
|
-
import './chunk-5KRMNUL4.js';
|
|
10
|
-
import './chunk-Z7ZEZZB6.js';
|
|
11
|
-
import './chunk-MWXYN6NY.js';
|
|
12
|
-
import './chunk-OHNKYHRR.js';
|
|
13
|
-
import './chunk-L5VSIPQD.js';
|
|
14
|
-
import './chunk-VTETQCR6.js';
|
|
15
|
-
import './chunk-UQ33Y4DM.js';
|
|
16
|
-
import './chunk-RVRB27AN.js';
|
|
17
|
-
import './chunk-GOCWM7FN.js';
|
|
18
|
-
import './chunk-WDXZA7QW.js';
|
|
19
|
-
import './chunk-ADPM6AYF.js';
|
|
20
|
-
import './chunk-DKXNKFKP.js';
|
|
21
|
-
import './chunk-LSI2IVFT.js';
|
|
22
|
-
import './chunk-C3CAXQMA.js';
|
|
23
|
-
import './chunk-BOFL7GIF.js';
|
|
24
|
-
import './chunk-NSBPE2FW.js';
|
|
25
|
-
//# sourceMappingURL=flows-TJQIMGUX.js.map
|
|
26
|
-
//# sourceMappingURL=flows-TJQIMGUX.js.map
|
package/dist/helpers-DE53KG3E.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export { KIND_COL_WIDTH, S, TARGET_DEFAULT_HINT, bareSoftDepName, colorRef, deferredWarnings, fitWidth, formatRelativeTime, formatSoftDepAddPreview, formatSoftDepHint, formatSoftDepRemovePreview, formatSoftDepSection, kindColor, kindColorPad, logErr, logInfo, logNoProject, logOk, logWarn, parseHarnessFilter, reportLegacyOmpCopies, requireProjectConfig, warnFilesOnlyDelegates, warnLegacyClaudeCopies, warnPlaceholderBodies } from './chunk-KX2PT5Q4.js';
|
|
2
|
-
import './chunk-OAHVKSQJ.js';
|
|
3
|
-
import './chunk-UL22SDGR.js';
|
|
4
|
-
import './chunk-QOM5Z62G.js';
|
|
5
|
-
import './chunk-7XSAW5OC.js';
|
|
6
|
-
import './chunk-BFMYYNDT.js';
|
|
7
|
-
import './chunk-3TXEJN4W.js';
|
|
8
|
-
import './chunk-ISHJITXJ.js';
|
|
9
|
-
import './chunk-LNFKL23K.js';
|
|
10
|
-
import './chunk-X3RMRJNR.js';
|
|
11
|
-
import './chunk-NUELZWCF.js';
|
|
12
|
-
import './chunk-3JKGY2YC.js';
|
|
13
|
-
import './chunk-NOA6EJXE.js';
|
|
14
|
-
import './chunk-KTBKW2FI.js';
|
|
15
|
-
import './chunk-UQ6LFBPZ.js';
|
|
16
|
-
import './chunk-DUMTLYSO.js';
|
|
17
|
-
import './chunk-E572OHGY.js';
|
|
18
|
-
import './chunk-L4YKW5AY.js';
|
|
19
|
-
import './chunk-4GY63JU6.js';
|
|
20
|
-
import './chunk-OTIB4D2K.js';
|
|
21
|
-
import './chunk-5KRMNUL4.js';
|
|
22
|
-
import './chunk-Z7ZEZZB6.js';
|
|
23
|
-
import './chunk-MWXYN6NY.js';
|
|
24
|
-
import './chunk-OHNKYHRR.js';
|
|
25
|
-
import './chunk-L5VSIPQD.js';
|
|
26
|
-
import './chunk-VTETQCR6.js';
|
|
27
|
-
import './chunk-UQ33Y4DM.js';
|
|
28
|
-
import './chunk-RVRB27AN.js';
|
|
29
|
-
import './chunk-GOCWM7FN.js';
|
|
30
|
-
import './chunk-WDXZA7QW.js';
|
|
31
|
-
import './chunk-ADPM6AYF.js';
|
|
32
|
-
import './chunk-DKXNKFKP.js';
|
|
33
|
-
import './chunk-LSI2IVFT.js';
|
|
34
|
-
import './chunk-C3CAXQMA.js';
|
|
35
|
-
import './chunk-BOFL7GIF.js';
|
|
36
|
-
import './chunk-NSBPE2FW.js';
|
|
37
|
-
//# sourceMappingURL=helpers-DE53KG3E.js.map
|
|
38
|
-
//# sourceMappingURL=helpers-DE53KG3E.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/commands/library-publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFA,IAAM,iBAAA,GAAoB,sBAAA;AAG1B,SAAS,YAAY,GAAA,EAAkC;AACrD,EAAA,IAAI,GAAA,CAAI,OAAA,KAAY,KAAA,EAAO,OAAO,MAAA;AAClC,EAAA,OAAQ,IAAI,aAAA,CAAmC,GAAA;AACjD;AAGA,SAAS,SAAS,GAAA,EAAsB;AACtC,EAAA,IAAI,GAAA,CAAI,OAAA,KAAY,KAAA,EAAO,OAAO,MAAA;AAClC,EAAA,OAAQ,GAAA,CAAI,cAAmC,MAAA,IAAU,MAAA;AAC3D;AAMA,SAAS,aAAa,OAAA,EAAoC;AACxD,EAAA,IA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AA,CAAE,IAAI,CAAA,CAAE,CAAA;AAAA,MAChF,SAAS,GAAA,EAAK;AACZ,QAAA,MAAA;AAAA,UACE,CAAA,eAAA,EAAkB,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,EAAA,EAAK,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,SACzF;AAAA,MACF;AAAA,IACF;AAEA,IAAA,KAAA,CAAM,CAAA,OAAA,EAAU,MAAA,CAAO,MAAM,CAAA,UAAA,CAAY,CAAA;AACzC,IAAA,KAAA,MAAW,CAAA,IAAK,MAAA,EAAQ,OAAA,CAAQ,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAA;AAAA,EAC1C,CAAA,SAAE;AACA,IAAA,KAAA,EAAM;AAAA,EACR;AACF","file":"library-publish-KKQ2ULLX.js","sourcesContent":["/**\n * `skaile library publish / register / yank` — the first-party publish flow.\n * A git-backed library you own carries an in-repo `skaile.manifest.yaml`; this\n * commits + pushes the library repo (publish), or takes the current remote HEAD\n * as-is (register), then registers + syncs it as a store source and publishes\n * the manifest's assets, each under its own namespace — `assets[].publisher`,\n * else the manifest's top-level `publisher` (no namespace remap — first-party\n * authors intend their declared namespace). Every distinct namespace is\n * preflighted before the push. The plan phase (dry-run and real) also requires the\n * remote to be a GitHub url and warns about a missing LICENSE and, for `publish`,\n * untracked files that `git add -A` would make public.\n *\n * - `publish` = commit (if dirty) + push + register + sync + publish.\n * - `register` = same, but skip the commit/push (bytes already on GitHub).\n * - `yank` = unpublish the library's published assets (all, or one).\n *\n * The store REST surface is reached through the injectable {@link PublisherClient}\n * (default HTTP); git side-effects go through an injectable `spawn`. Both seams\n * keep the flow unit/integration-testable without a live store or a real remote.\n *\n * @docLink cli/commands/library\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { basename, dirname, join, relative, sep } from \"node:path\";\nimport {\n type AssetEntry,\n decodeSkaileManifest,\n loadSkPublishManifest,\n matchPin,\n type SkPublishManifest,\n readAssetBody,\n} from \"@skaile/workspaces/core\";\nimport { isSecretFileName } from \"@skaile/workspaces/core/publish-manifest\";\nimport { type ParseManifestResult, parseManifestFile } from \"@skaile/workspaces/discovery\";\nimport {\n type GitBackendConfig,\n type Library,\n missingRootAssets,\n scanUnlistedAssets,\n UNLISTED_SCAN_SKIP_DIRS,\n upsertManifestAsset,\n} from \"@skaile/workspaces/library\";\nimport { type ComposeRefContext, composeRefContext } from \"../agent-checks.ts\";\nimport { logErr, logInfo, logOk, logWarn, S } from \"../helpers.ts\";\nimport { openCatalogSource, openLibraryManager } from \"../open-library.ts\";\nimport { getKindRegistry } from \"../open-registry.ts\";\nimport {\n type AssetCheckResult,\n checkAsset,\n checkAssetFile,\n declaredVersion,\n duplicateAssetMessage,\n findEntryManifestFile,\n invalidSemverText,\n} from \"../skill-checks.ts\";\nimport { isStoreAuthenticated } from \"../store-client.ts\";\nimport { makeHttpPublisherClient, type PublisherClient } from \"../store-publisher.ts\";\nimport {\n exitOnLibrarySymlinks,\n exitOnManifestPublisherProblems,\n exitOnManifestRootProblems,\n type ManifestDependencyProblem,\n manifestDependencyProblems,\n manifestRequiresProblems,\n registeredAssetKeys,\n} from \"./library-index.ts\";\nimport { scanIdentities } from \"./validate.ts\";\nimport {\n assetEntryRef,\n assetNamespace,\n bareName,\n exitOnEmptyAsset,\n formatNamespaceAvailability,\n manifestNamespaces,\n plannedRefs,\n preflightNamespace,\n publishToStore,\n refFor,\n} from \"./publish-core.ts\";\n\n/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */\ntype SpawnLike = typeof spawnSync;\n\n/** The fixed filename a library carries at its root for publication. */\nconst MANIFEST_FILENAME = \"skaile.manifest.yaml\";\n\n/** The remote url of a git-backed library, or `undefined` for a local one. */\nfunction remoteUrlOf(lib: Library): string | undefined {\n if (lib.backend !== \"git\") return undefined;\n return (lib.backendConfig as GitBackendConfig).url;\n}\n\n/** The publish branch of a git-backed library (defaults to `main`). */\nfunction branchOf(lib: Library): string {\n if (lib.backend !== \"git\") return \"main\";\n return (lib.backendConfig as GitBackendConfig).branch ?? \"main\";\n}\n\n/**\n * Read + decode the in-repo `skaile.manifest.yaml`. Prints each error\n * diagnostic and exits (1) — mirroring the sidecar flow's validation gate.\n */\nfunction loadManifest(libPath: string): SkPublishManifest {\n let text: string;\n try {\n text = readFileSync(join(libPath, MANIFEST_FILENAME), \"utf-8\");\n } catch {\n logErr(\n `No ${S.dim(MANIFEST_FILENAME)} in the library — author it (see \\`skaile library create\\`) ` +\n \"and run `skaile validate` before publishing.\",\n );\n process.exit(1);\n }\n const { manifest, diagnostics } = decodeSkaileManifest(text);\n const errors = diagnostics.filter((d) => d.severity === \"error\");\n if (errors.length > 0) {\n for (const d of errors) logErr(`${d.code}: ${d.message}`);\n logErr(\"The manifest has errors — fix them with `skaile validate` before publishing.\");\n process.exit(1);\n }\n return manifest;\n}\n\n/** Run a git command in `cwd` via the injected spawn; returns the result. */\nfunction runGit(spawn: SpawnLike, cwd: string, args: string[]) {\n return spawn(\"git\", [\"-C\", cwd, ...args], { encoding: \"utf-8\" });\n}\n\n/**\n * Refuse (exit 1) a `--ref` that is not a valid git ref name, or that names no branch, tag\n * or commit of the library repo (local, or fetched from `origin`). A library directory that\n * is not a git repo yet has nothing to check against and passes: `publish` creates the repo.\n *\n * The ref is sent to the store as a plain string and the store ingests the GitHub repo at that\n * name, so only what GitHub resolves by name is accepted: a branch, a tag or a commit id. A\n * revision expression (`HEAD~1`, `v1.0^{}`) resolves locally but not in the store, so it is\n * refused here rather than published under a ref the store cannot read.\n */\nfunction exitOnUnknownRef(libPath: string, libName: string, ref: string, spawn: SpawnLike): void {\n const wellFormed =\n !ref.startsWith(\"-\") &&\n spawn(\"git\", [\"check-ref-format\", \"--allow-onelevel\", ref], { encoding: \"utf-8\" }).status === 0;\n if (!wellFormed) {\n logErr(\n `--ref \"${ref}\" is not a valid git ref name; pass a branch or tag name or a commit id ` +\n \"(revision expressions like HEAD~1 are not accepted).\",\n );\n process.exit(1);\n }\n if (runGit(spawn, libPath, [\"rev-parse\", \"--git-dir\"]).status !== 0) return;\n const exists = [ref, `refs/remotes/origin/${ref}`].some(\n (candidate) =>\n runGit(spawn, libPath, [\"rev-parse\", \"--verify\", \"--quiet\", `${candidate}^{commit}`])\n .status === 0,\n );\n if (!exists) {\n logErr(\n `--ref \"${ref}\" is not a branch, tag or commit of library \"${libName}\"; ` +\n `fetch it first (\\`skaile library pull ${libName}\\`) if it only exists on the remote.`,\n );\n process.exit(1);\n }\n}\n\n/**\n * Ensure `libPath` is a git repo whose `origin` points at `remoteUrl`, then\n * commit any changes and push to `branch`. Idempotent re-publish: an unchanged\n * tree makes `git commit` fail with \"nothing to commit\" — swallowed. Push (or\n * any other git) failures surface as thrown Errors carrying git's stderr.\n */\nfunction commitAndPush(opts: {\n libPath: string;\n remoteUrl: string;\n branch: string;\n spawn: SpawnLike;\n}): void {\n const { libPath, remoteUrl, branch, spawn } = opts;\n\n const gitDir = runGit(spawn, libPath, [\"rev-parse\", \"--git-dir\"]);\n if (gitDir.status !== 0) {\n const init = runGit(spawn, libPath, [\"init\"]);\n if (init.status !== 0) {\n throw new Error(\n `git init failed: ${(init.stderr ?? \"\").toString().trim() || `exit ${init.status}`}`,\n );\n }\n }\n\n // Point origin at the resolved remote (add if absent, else set-url).\n const getUrl = runGit(spawn, libPath, [\"remote\", \"get-url\", \"origin\"]);\n const originArgs =\n getUrl.status === 0\n ? [\"remote\", \"set-url\", \"origin\", remoteUrl]\n : [\"remote\", \"add\", \"origin\", remoteUrl];\n const setOrigin = runGit(spawn, libPath, originArgs);\n if (setOrigin.status !== 0) {\n throw new Error(\n `git remote failed: ${(setOrigin.stderr ?? \"\").toString().trim() || `exit ${setOrigin.status}`}`,\n );\n }\n\n const add = runGit(spawn, libPath, [\"add\", \"-A\"]);\n if (add.status !== 0) {\n throw new Error(\n `git add failed: ${(add.stderr ?? \"\").toString().trim() || `exit ${add.status}`}`,\n );\n }\n\n // Fixed bot identity via -c so the commit succeeds regardless of the author's\n // git config (the publish commit is a machine action).\n const commit = spawn(\n \"git\",\n [\n \"-C\",\n libPath,\n \"-c\",\n \"user.email=publish@skaile.store\",\n \"-c\",\n \"user.name=skaile\",\n \"commit\",\n \"-m\",\n \"chore: publish\",\n ],\n { encoding: \"utf-8\" },\n );\n if (commit.status !== 0) {\n const out = `${commit.stdout ?? \"\"}${commit.stderr ?? \"\"}`;\n if (!/nothing to commit/i.test(out)) {\n throw new Error(`git commit failed: ${out.trim() || `exit ${commit.status}`}`);\n }\n }\n\n const push = runGit(spawn, libPath, [\"push\", \"origin\", `HEAD:${branch}`]);\n if (push.status !== 0) {\n throw new Error(\n `git push failed: ${(push.stderr ?? \"\").toString().trim() || `exit ${push.status}`}`,\n );\n }\n}\n\n/**\n * `true` when `url` is a GitHub repo remote the store can fetch: `https://github.com/<o>/<r>[.git]`,\n * `git@github.com:<o>/<r>[.git]` or `ssh://git@github.com/<o>/<r>[.git]`. The store is\n * pointer-only and fetches bytes from GitHub, so any other remote (a local path, a `file://`\n * url, another host) can be pushed to but never published.\n */\nexport function isGithubRemote(url: string): boolean {\n return /^(?:https:\\/\\/github\\.com\\/|git@github\\.com:|ssh:\\/\\/git@github\\.com\\/)[^/\\s]+\\/[^/\\s]+?(?:\\.git)?\\/?$/i.test(\n url.trim(),\n );\n}\n\n/** The advisory for a remote `library publish` cannot use (see {@link isGithubRemote}). */\nexport function notGithubRemoteMessage(name: string, url: string): string {\n return (\n `The remote of library \"${name}\" is not a GitHub url: ${url}. ` +\n \"The store fetches published assets from GitHub — repoint it with \" +\n `\\`skaile library set ${name} backendConfig.url=https://github.com/<owner>/<repo>\\`.`\n );\n}\n\n/** How many untracked paths the publish plan lists before collapsing to \"and N more\". */\nconst MAX_LISTED_UNTRACKED = 10;\n\n/** A first-party manifest asset resolved to its on-disk manifest file, read and parsed. */\ninterface PlanAsset {\n entry: AssetEntry;\n /** Path relative to the library root, for messages. */\n rel: string;\n parsed: ParseManifestResult;\n /** The shared per-asset checks ({@link checkAsset}); `undefined` when the file did not parse. */\n checked: AssetCheckResult | undefined;\n}\n\n/**\n * The first-party assets the plan covers (a `root:` entry or a `files:` list), each with its\n * manifest file read. Curated entries (`source`) carry no library directory and a root with no\n * manifest file is `missingRootAssets`' concern, so both are left out.\n */\nfunction planAssets(\n libPath: string,\n manifest: SkPublishManifest,\n targetName: string | undefined,\n composeRefs: ComposeRefContext,\n): PlanAsset[] {\n const out: PlanAsset[] = [];\n const registry = getKindRegistry();\n for (const entry of manifest.assets ?? []) {\n if (targetName && entry.name !== targetName) continue;\n if (entry.source || manifest.source) continue;\n const file = findEntryManifestFile(libPath, entry);\n if (!file) continue;\n const text = readFileSync(file, \"utf-8\");\n const parsed = parseManifestFile(file, text);\n let checked: AssetCheckResult | undefined;\n if (parsed.ok) {\n checked = checkAsset(\n entry.kind,\n parsed.data,\n readAssetBody(file, text),\n basename(dirname(file)),\n registry,\n text,\n basename(file),\n { dir: dirname(file), libraryRoot: libPath, composeRefs },\n );\n }\n out.push({ entry, rel: relative(libPath, file), parsed, checked });\n }\n return out;\n}\n\n/**\n * The manifest with every entry's `version` replaced by the one in its asset\n * file — the version a publish ships (the file is the source of truth; the\n * entry only mirrors it after `skaile library index`).\n */\nfunction manifestWithFileVersions(\n manifest: SkPublishManifest,\n assets: PlanAsset[],\n): SkPublishManifest {\n return {\n ...manifest,\n assets: manifest.assets?.map((entry) => {\n const planned = assets.find((a) => a.entry === entry);\n const fileVersion = planned?.parsed.ok ? declaredVersion(planned.parsed.data) : undefined;\n return fileVersion === undefined ? entry : { ...entry, version: fileVersion };\n }),\n };\n}\n\n/** A manifest entry whose version differs from the one in its asset file. */\ninterface VersionDrift {\n asset: PlanAsset;\n ref: string;\n /** The version the manifest records (`assets[].version ?? version`), `undefined` when none. */\n entryVersion: string | undefined;\n fileVersion: string;\n}\n\n/**\n * The planned assets whose manifest entry does not carry the version of their asset\n * file. The store reads the manifest it finds in the pushed repo, so a publish\n * records the entry's version — {@link manifestWithFileVersions} is what the plan\n * shows, and these are the entries a real publish has to rewrite to match it.\n */\nfunction versionDrift(assets: PlanAsset[], manifest: SkPublishManifest): VersionDrift[] {\n const out: VersionDrift[] = [];\n for (const asset of assets) {\n if (!asset.parsed.ok) continue;\n const fileVersion = declaredVersion(asset.parsed.data);\n const entryVersion = asset.entry.version ?? manifest.version;\n if (fileVersion !== undefined && fileVersion !== entryVersion) {\n out.push({ asset, ref: assetEntryRef(asset.entry, manifest), entryVersion, fileVersion });\n }\n }\n return out;\n}\n\nconst describeDrift = (d: VersionDrift): string =>\n `${d.ref}: manifest version ${d.entryVersion ?? \"(none)\"} → ${d.fileVersion} (${d.asset.rel.split(sep).join(\"/\")})`;\n\n/**\n * Reasons the plan cannot publish an asset: its manifest file cannot be parsed (an\n * empty `SKILL.md`), or it fails the errors of the shared per-asset check list\n * ({@link checkAsset}: version not semver, the kind's manifest schema — the skill\n * schema refuses the scaffold `TODO:` description — and the flow definition parser),\n * or its manifest entry carries a version that is not semver. These are the cases\n * `skaile validate` fails on and `skaile library index` keeps out of the manifest;\n * a hand-edited manifest can still list one, so the plan stops rather than ships it.\n */\nfunction assetRefusals(assets: PlanAsset[], manifest: SkPublishManifest): string[] {\n const refusals: string[] = [];\n for (const { entry, rel, parsed, checked } of assets) {\n const ref = assetEntryRef(entry, manifest);\n if (!parsed.ok || !checked) {\n const reason = parsed.ok ? \"\" : parsed.reason;\n refusals.push(`${ref} (${rel}) — manifest file could not be parsed: ${reason}`);\n continue;\n }\n for (const f of checked.errors) refusals.push(`${ref} (${rel}) [${f.tag}] — ${f.text}`);\n // An untouched scaffold body is an error in `validate` too: a publish would ship an empty asset.\n // (A `requires:` ref no registered library holds is judged against the store: see `storeHolderVerdicts`.)\n for (const f of checked.advisories.filter((a) => a.scaffoldBody)) {\n refusals.push(`${ref} (${rel}) [${f.tag}] — ${f.text}`);\n }\n // The asset file renamed in place: the entry is a ref `add` cannot resolve (p700).\n const fileName = entry.kind === \"flow\" ? parsed.data.id : parsed.data.name;\n if (typeof fileName === \"string\" && fileName !== \"\" && fileName !== entry.name) {\n refusals.push(\n `${ref} (${rel}) — the asset file now names \"${fileName}\": run \\`skaile library index\\` to rename the entry, or restore the name.`,\n );\n }\n // The file's own version is checked above; the entry's can differ from it.\n const entryInvalid = entry.version === undefined ? undefined : invalidSemverText(entry.version);\n if (entryInvalid && entry.version !== declaredVersion(parsed.data)) {\n refusals.push(`${ref} (${rel}) — ${entryInvalid}`);\n }\n }\n return refusals;\n}\n\n/**\n * Per-asset advisories for the assets the plan would publish — the advisories of the\n * shared check list `skaile validate` runs (agentskills.io conformance for skills, the\n * untouched `library create` scaffold for skill, agent, prompt, contract, flow and\n * preset), one line per asset/finding. An unparsable manifest is {@link assetRefusals}'\n * to report.\n */\nfunction assetWarnings(assets: PlanAsset[], manifest: SkPublishManifest): string[] {\n const warnings: string[] = [];\n for (const { entry, rel, parsed, checked } of assets) {\n if (!parsed.ok || !checked || Object.keys(parsed.data).length === 0) continue;\n for (const f of checked.advisories.filter((a) => !a.scaffoldBody && !a.unheldRef)) {\n warnings.push(`${assetEntryRef(entry, manifest)} (${rel}) [${f.tag}] — ${f.text}`);\n }\n }\n return warnings;\n}\n\n/** Asks the store whether it lists `ref` (`kind:@publisher/name`); rejects when it cannot be asked. */\ntype StoreHolds = (ref: string) => Promise<boolean>;\n\nasync function storeListsRef(ref: string): Promise<boolean> {\n const remote = await openCatalogSource({ projectDir: process.cwd() });\n return (await remote.resolve(ref)) !== null;\n}\n\ntype HolderAnswer = { listed: true } | { listed: false } | { error: string };\n\nasync function holdsAnswer(holds: StoreHolds, ref: string): Promise<HolderAnswer> {\n try {\n return { listed: await holds(ref) };\n } catch (err) {\n return { error: err instanceof Error ? err.message : String(err) };\n }\n}\n\n/**\n * What the publish plan says about every `requires:` (asset file) and `dependencies:` (manifest)\n * ref that no registered library holds (p1200). `validate` and `library index` warn from what is\n * registered on this machine alone; the plan also asks the store. A store that lists the ref\n * says nothing; one that does not refuses the plan, since `add` would fail on the consumer's\n * side; one that cannot be asked only warns.\n */\nasync function storeHolderVerdicts(\n assets: PlanAsset[],\n manifest: SkPublishManifest,\n dependencies: ManifestDependencyProblem[],\n holds: StoreHolds,\n): Promise<{ refusals: string[]; warnings: string[] }> {\n const wanted: Array<{ where: string; what: string; ref: string }> = [];\n for (const { entry, rel, checked } of assets) {\n for (const f of checked?.advisories ?? []) {\n if (!f.unheldRef) continue;\n wanted.push({\n where: `${assetEntryRef(entry, manifest)} (${rel}) [${f.tag}]`,\n what: \"requires\",\n ref: f.unheldRef,\n });\n }\n }\n for (const p of dependencies) {\n if (!p.unheldRef) continue;\n wanted.push({\n where: `${MANIFEST_FILENAME} [assets] — ${p.asset}`,\n what: \"dependency\",\n ref: p.unheldRef,\n });\n }\n const answers = new Map<string, HolderAnswer>();\n const out = { refusals: [] as string[], warnings: [] as string[] };\n for (const { where, what, ref } of wanted) {\n let answer = answers.get(ref);\n if (answer === undefined) {\n answer = await holdsAnswer(holds, ref);\n answers.set(ref, answer);\n }\n if (\"listed\" in answer && answer.listed) continue;\n const base = `${where} — ${what} \"${ref}\" is not held by any registered library`;\n if (\"error\" in answer) {\n out.warnings.push(\n `${base} and the store could not be asked (${answer.error.split(\"\\n\")[0]}). \\`skaile add\\` fails for a consumer unless the store or a registered library holds it`,\n );\n } else {\n out.refusals.push(\n `${base} and the store does not list it, so \\`skaile add\\` would fail with \"${what} … not found\". Publish that asset first, register the library that holds it, or drop the ${what}.`,\n );\n }\n }\n return out;\n}\n\n/**\n * Advisory publish-plan warnings: a missing LICENSE (a public repo without one grants\n * consumers no rights), per-asset skill warnings ({@link assetWarnings}) and — for `publish`,\n * which runs `git add -A` — untracked files that would become public. Never throws; a\n * non-git directory simply yields no untracked warning.\n */\nfunction publishWarnings(\n libPath: string,\n spawn: SpawnLike,\n skipPush: boolean,\n manifest: SkPublishManifest,\n assets: PlanAsset[],\n): string[] {\n const warnings: string[] = [];\n if (!existsSync(join(libPath, \"LICENSE\")) && !existsSync(join(libPath, \"LICENSE.md\"))) {\n warnings.push(\n \"No LICENSE or LICENSE.md in the library root — a public repo without a license grants consumers no rights to use it.\",\n );\n }\n warnings.push(...assetWarnings(assets, manifest));\n if (!skipPush) {\n const status = runGit(spawn, libPath, [\"status\", \"--porcelain\", \"--untracked-files=all\"]);\n if (status.status === 0) {\n const lines = (status.stdout ?? \"\").toString().split(\"\\n\");\n const untracked = lines.filter((l) => l.startsWith(\"?? \")).map((l) => l.slice(3));\n if (untracked.length > 0) {\n const shown = untracked.slice(0, MAX_LISTED_UNTRACKED).join(\", \");\n const more =\n untracked.length > MAX_LISTED_UNTRACKED\n ? ` and ${untracked.length - MAX_LISTED_UNTRACKED} more`\n : \"\";\n warnings.push(\n `${untracked.length} untracked file(s) will be committed by \\`git add -A\\` and published: ${shown}${more}.`,\n );\n }\n // `git add -A` also stages every change of a tracked file: name them too.\n const changed = lines\n .filter((l) => l.length > 3 && !l.startsWith(\"?? \") && !l.startsWith(\"!! \"))\n .map((l) => {\n const code = l.slice(0, 2);\n const label = code.includes(\"D\")\n ? \"deleted\"\n : code.includes(\"R\")\n ? \"renamed\"\n : code.includes(\"A\")\n ? \"added\"\n : \"modified\";\n return `${label} ${l.slice(3)}`;\n });\n if (changed.length > 0) {\n const shown = changed.slice(0, MAX_LISTED_UNTRACKED).join(\", \");\n const more =\n changed.length > MAX_LISTED_UNTRACKED\n ? ` and ${changed.length - MAX_LISTED_UNTRACKED} more`\n : \"\";\n warnings.push(\n `${changed.length} changed tracked file(s) will be committed by \\`git add -A\\` and published: ${shown}${more}.`,\n );\n }\n // A secret the commit would publish: a `.env`, a private key (p704).\n const secrets = lines\n .filter((l) => l.length > 3 && !l.startsWith(\"!! \") && !l.slice(0, 2).includes(\"D\"))\n .map((l) => l.slice(3).split(\" -> \").pop() ?? \"\")\n .filter((file) => isSecretFileName(basename(file.replace(/^\"|\"$/g, \"\"))));\n if (secrets.length > 0) {\n warnings.push(\n `${secrets.length} file(s) look like secrets and will be committed by \\`git add -A\\` and published: ${secrets.join(\", \")}. Delete them or add them to .gitignore.`,\n );\n }\n }\n }\n return warnings;\n}\n\n/**\n * The store only registers PUBLIC repos (the backend rejects a private one with \"must be\n * public\"), so a repo provisioned with `--private` can be created and linked but not published.\n */\nconst PRIVATE_REPO_WARNING =\n \"--private: the store only accepts PUBLIC repos — registering a private repo is rejected. \" +\n \"The repo will be created private, but publishing it will fail; share it directly \" +\n \"(`skaile source add <url>` with the consumer's own git credentials) instead.\";\n\n/**\n * Provision a GitHub repo `github.com/<you>/<name>` via `gh` (public unless `isPrivate`) and\n * return its https url. Parses the url `gh` prints on success. Throws on failure.\n */\nfunction createRepoViaGh(name: string, spawn: SpawnLike, isPrivate: boolean): string {\n const res = spawn(\"gh\", [\"repo\", \"create\", name, isPrivate ? \"--private\" : \"--public\"], {\n encoding: \"utf-8\",\n });\n if (res.status !== 0) {\n const stderr = (res.stderr ?? \"\").toString().trim();\n throw new Error(`gh repo create ${name} failed: ${stderr || `exit ${res.status}`}`);\n }\n // `gh repo create` prints the repo url (e.g. `https://github.com/<owner>/<name>`);\n // scan combined output for the first github.com url so we capture whatever\n // owner gh resolved (the authed user).\n const out = `${res.stdout ?? \"\"}\\n${res.stderr ?? \"\"}`;\n const match = out.match(/https:\\/\\/github\\.com\\/[^\\s]+/);\n if (!match) {\n throw new Error(`gh repo create ${name} succeeded but printed no repo url:\\n${out.trim()}`);\n }\n return match[0].replace(/\\.git$/, \"\").trim();\n}\n\n/** `--asset <ref>` split into its parts: `[kind:][@publisher/]name[#pin]`. */\ninterface AssetSelection {\n kind?: string;\n publisher?: string;\n name: string;\n pin?: string;\n}\n\nfunction parseAssetSelection(ref: string): AssetSelection {\n const [head, ...pinParts] = ref.trim().split(\"#\");\n const pin = pinParts.join(\"#\") || undefined;\n const colon = head.indexOf(\":\");\n const kind = colon > 0 ? head.slice(0, colon) : undefined;\n const rest = colon > 0 ? head.slice(colon + 1) : head;\n const scoped = rest.startsWith(\"@\") ? rest.indexOf(\"/\") : -1;\n const publisher = scoped > 0 ? rest.slice(1, scoped) : undefined;\n const name = scoped > 0 ? rest.slice(scoped + 1) : rest;\n return { kind, publisher, name, pin };\n}\n\n/** The manifest entries `--asset` selects: same name, and kind / publisher when the ref names them. */\nfunction selectedEntries(manifest: SkPublishManifest, sel: AssetSelection): AssetEntry[] {\n return (manifest.assets ?? []).filter(\n (a) =>\n a.name === sel.name &&\n (!sel.kind || a.kind === sel.kind) &&\n (!sel.publisher || assetNamespace(a, manifest) === sel.publisher),\n );\n}\n\n/**\n * What the plan says about asset directories the manifest does not list - the ones\n * `skaile library index` would add or skip. A directory holding a kind + name the manifest\n * already names elsewhere is refused (index skips it and exits 1); a new asset the shared\n * checks reject is refused with the same finding text `validate` prints; a valid new asset is\n * refused as well, as `validate` does: the plan would not ship it, but `git add -A` would commit\n * its files (p1193).\n */\nasync function unlistedAssetProblems(\n libPath: string,\n manifest: SkPublishManifest,\n libName: string,\n targetName: string | undefined,\n composeRefs: ComposeRefContext,\n): Promise<string[]> {\n const refusals: string[] = [];\n const registry = getKindRegistry();\n const unlisted = await scanUnlistedAssets(\n libPath,\n manifest.publisher ?? libName,\n registry,\n UNLISTED_SCAN_SKIP_DIRS,\n );\n for (const u of unlisted) {\n if (targetName && u.entry.name !== targetName) continue;\n const rel = relative(libPath, u.entry.source);\n if (u.registeredAt) {\n refusals.push(\n duplicateAssetMessage(\n u.entry.kind,\n u.entry.name,\n u.root,\n `already registered at \"${u.registeredAt}\"`,\n libName,\n ),\n );\n continue;\n }\n if (u.parseFailure) {\n // `library index` rejects the file too: send the author to the file, not to the command.\n refusals.push(\n `${u.entry.kind}:${u.entry.name} (${rel}) [${u.entry.kind}] — parse error: ${u.parseFailure}`,\n );\n continue;\n }\n const errors = checkAssetFile(u.entry.source, u.entry.kind, registry, libPath, composeRefs);\n for (const f of errors)\n refusals.push(`${u.entry.kind}:${u.entry.name} (${rel}) [${f.tag}] — ${f.text}`);\n if (errors.length === 0) {\n refusals.push(\n `${u.entry.kind}:${u.entry.name} (${rel}) is on disk but not in the manifest, so it is not published; run \\`skaile library index ${libName}\\`.`,\n );\n }\n }\n return refusals;\n}\n\n/** Shared publish body for `publish` (pushes) and `register` (skips the push). */\nasync function publishLibrary(\n name: string,\n opts: {\n asset?: string;\n createRepo?: boolean;\n private?: boolean;\n ref?: string;\n dryRun?: boolean;\n skipPush: boolean;\n /** Asks the store whether it lists a ref; injected by tests. */\n storeHolds?: StoreHolds;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n exitOnEmptyAsset(opts.asset);\n const injected = client !== undefined;\n const { manager, close } = await openLibraryManager();\n try {\n const lib = await manager.requireLibraryDir(name);\n const manifest = loadManifest(lib.path);\n\n // A publisher that is not a valid slug would publish refs `add` cannot parse: refuse\n // (dry-run included) with the text `library index` and `validate` print.\n exitOnManifestPublisherProblems(lib.path, name);\n // The same symlink refusal as `validate` and `library index`.\n exitOnLibrarySymlinks(lib.path, `skaile library publish ${name}`);\n // A `root:` outside the library, or through a symlink, is never found by `add` (p701).\n exitOnManifestRootProblems(lib.path, `skaile library publish ${name}`);\n\n // A manifest entry whose directory is gone would publish a catalog entry\n // that points at nothing — refuse (dry-run included) rather than plan it.\n const missing = missingRootAssets(lib.path, manifest);\n if (missing.length > 0) {\n for (const a of missing) {\n logErr(`${assetEntryRef(a, manifest)} — root \"${a.root}\" does not exist in the library.`);\n }\n logErr(\n \"The manifest lists assets that are no longer on disk. Run \" +\n `\\`skaile library index ${name}\\` to drop them from the manifest, then re-run.`,\n );\n process.exit(1);\n }\n\n // `--asset` must select something: a plan of 0 assets that exits 0 reads as a publish.\n const selection = opts.asset ? parseAssetSelection(opts.asset) : undefined;\n if (opts.asset && selection && selectedEntries(manifest, selection).length === 0) {\n const listed = (manifest.assets ?? []).map((a) => assetEntryRef(a, manifest));\n logErr(\n `No asset matches \"${opts.asset}\" in library \"${name}\"` +\n (listed.length > 0\n ? ` (the manifest lists: ${listed.join(\", \")}).`\n : \" (the manifest lists no assets).\"),\n );\n process.exit(1);\n }\n\n // `--ref` must name a ref the library repo has: a plan for `source ref: nosuchref` reads as a\n // publish of it.\n if (opts.ref !== undefined) exitOnUnknownRef(lib.path, name, opts.ref, spawn);\n\n // Resolve the remote: git-backed → its url; local + --create-repo → provision\n // and link; else stop with a hint.\n let remoteUrl = remoteUrlOf(lib);\n let wouldCreateRepo = false;\n if (opts.private && !opts.createRepo) {\n logErr(\n \"--private only applies together with --create-repo (it sets the new repo's visibility).\",\n );\n process.exit(1);\n }\n const visibility = opts.private ? \"private\" : \"public\";\n if (!remoteUrl) {\n if (opts.createRepo) {\n if (opts.private) logWarn(PRIVATE_REPO_WARNING);\n if (opts.dryRun) {\n // A dry-run must not provision anything — defer the real\n // `gh repo create` to the live run and just show the would-be remote.\n wouldCreateRepo = true;\n remoteUrl = `https://github.com/<your-account>/${lib.name}`;\n } else {\n remoteUrl = createRepoViaGh(lib.name, spawn, opts.private === true);\n await manager.updateLibrary(name, {\n backend: \"git\",\n backendConfig: { url: remoteUrl, branch: \"main\", authHint: \"ssh\" },\n });\n logOk(`Created + linked ${S.dim(remoteUrl)} (${visibility}).`);\n }\n } else {\n logErr(\n `Library \"${name}\" has no remote — run ${S.cmd(`skaile library link ${name} <url>`)} ` +\n \"first, or pass `--create-repo` to provision a public repo.\",\n );\n process.exit(1);\n }\n } else if (!isGithubRemote(remoteUrl)) {\n // Plan-phase gate (dry-run and real): the store fetches from GitHub, so a\n // local-path / other-host remote can never be published. A remote here means\n // the library is already git-backed, where `library link` refuses.\n logErr(notGithubRemoteMessage(name, remoteUrl));\n process.exit(1);\n }\n\n // Each asset publishes under `assets[].publisher ?? manifest.publisher`\n // (first-party — no remap), so one library can span several namespaces.\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const namespaces = manifestNamespaces(manifest, targetName);\n\n // An asset whose manifest file cannot be parsed or carries a non-semver version\n // must not be planned (dry-run included): it would publish as a broken entry.\n // An agent's `composes:` refs resolve as in `validate` and `library index` (p415).\n const composeRefs = composeRefContext(\n scanIdentities(lib.path),\n await registeredAssetKeys(lib.path),\n manifest.publisher,\n );\n const assets = planAssets(lib.path, manifest, targetName, composeRefs);\n const wouldBeRefs = plannedRefs(manifestWithFileVersions(manifest, assets), targetName);\n const unlisted = await unlistedAssetProblems(lib.path, manifest, name, targetName, composeRefs);\n // A manifest `dependencies:` entry `validate` and `index` reject would ship as an unresolvable ref.\n const requiresRefusals = manifestRequiresProblems(lib.path)\n .filter((p) => !targetName || p.asset.endsWith(`:${targetName}`))\n .map(\n (p) =>\n `${MANIFEST_FILENAME} [assets] — ${p.asset}: ${p.message}. ` +\n \"Use the `kind:@<publisher>/name[#version]` form.\",\n );\n // A `requires:` / `dependencies:` ref no registered library holds: the store has the last word.\n const unheldDependencies = (await manifestDependencyProblems(lib.path)).filter(\n (p) => p.unheldRef && (!targetName || p.asset.endsWith(`:${targetName}`)),\n );\n const storeVerdicts = await storeHolderVerdicts(\n assets,\n manifest,\n unheldDependencies,\n opts.storeHolds ?? storeListsRef,\n );\n const refusals = [\n ...assetRefusals(assets, manifest),\n ...requiresRefusals,\n ...unlisted,\n ...storeVerdicts.refusals,\n ];\n if (selection?.pin !== undefined) {\n const held = selectedEntries(manifest, selection).map((e) => {\n const planned = assets.find((a) => a.entry === e);\n const fileVersion = planned?.parsed.ok ? declaredVersion(planned.parsed.data) : undefined;\n return fileVersion ?? e.version ?? manifest.version;\n });\n if (!held.some((v) => v !== undefined && matchPin(selection.pin, v))) {\n logErr(\n `${opts.asset}: the library holds ${held.filter((v) => v).join(\", \") || \"no version\"} of this asset, not #${selection.pin}. ` +\n \"A publish ships the version in the asset file; drop the pin or change the file version.\",\n );\n process.exit(1);\n }\n }\n if (refusals.length > 0) {\n for (const r of refusals) logErr(r);\n logErr(\n \"These assets cannot be published. Fix them (see `skaile validate`), then run \" +\n `\\`skaile library index ${name}\\` and re-run.`,\n );\n process.exit(1);\n }\n\n // The store records the version of the manifest it finds in the pushed repo, so\n // the plan (file versions) and the publish only agree when the entries match the\n // files. `publish` rewrites them before it commits; `register` pushes nothing,\n // so it cannot, and stops instead.\n const drift = versionDrift(assets, manifest);\n if (drift.length > 0 && opts.skipPush) {\n for (const d of drift) logErr(describeDrift(d));\n logErr(\n \"register publishes the remote HEAD as-is, so these manifest versions would be recorded \" +\n `instead of the file versions. Run \\`skaile library index ${name}\\`, commit and push, then re-run.`,\n );\n process.exit(1);\n }\n\n const sourceRef = opts.ref ?? branchOf(lib);\n const warnings = [\n ...publishWarnings(lib.path, spawn, opts.skipPush, manifest, assets),\n ...storeVerdicts.warnings,\n ];\n\n if (opts.dryRun) {\n logInfo(`Publish plan for ${S.bold(name)}:`);\n logInfo(\n ` remote: ${remoteUrl}${wouldCreateRepo ? ` (would be created ${visibility} via \\`gh repo create --${visibility}\\`)` : \"\"}`,\n );\n logInfo(\n ` publisher: ${namespaces.length > 0 ? namespaces.join(\", \") : \"<manifest publisher>\"}`,\n );\n // Best-effort namespace-availability probe — a read-only GET, only when\n // signed in (or a client is injected). A failure keeps dry-run offline-safe.\n const canCheck = injected || isStoreAuthenticated();\n if (!canCheck) {\n // The real run stops at \"Not signed in\" before any namespace check.\n logWarn(\"namespace check skipped: not signed in (run `skaile store login`)\");\n } else if (namespaces.length > 0) {\n for (const ns of namespaces) {\n try {\n const avail = await (client ?? makeHttpPublisherClient()).namespaceAvailability(ns);\n const prefix = namespaces.length > 1 ? `@${ns} — ` : \"\";\n logInfo(` namespace: ${prefix}${formatNamespaceAvailability(avail)}`);\n } catch {\n // Store unreachable / not signed in — skip the advisory, never fail.\n }\n }\n }\n logInfo(` source ref: ${sourceRef}`);\n logInfo(` would publish ${wouldBeRefs.length} asset(s):`);\n for (const r of wouldBeRefs) logInfo(` ${r}`);\n for (const d of drift) logInfo(` would update the manifest: ${describeDrift(d)}`);\n for (const w of warnings) logWarn(w);\n return;\n }\n\n // Real run: surface the same advisories before anything is pushed.\n for (const w of warnings) logWarn(w);\n\n // A real publish makes store calls, so it needs a token (injected fakes bypass).\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const pub = client ?? makeHttpPublisherClient();\n\n // Preflight EVERY distinct namespace BEFORE the public git push, so a\n // reserved/unclaimed one fails fast with guidance instead of after publishing bytes.\n for (const ns of namespaces) {\n const gate = await preflightNamespace(pub, ns);\n if (!gate.ok) {\n logErr(gate.message ?? `Cannot publish under @${ns}.`);\n process.exit(1);\n }\n }\n\n // Bring the entries to the file versions the plan showed, before they are committed.\n for (const d of drift) {\n upsertManifestAsset(lib.path, {\n kind: d.asset.entry.kind,\n name: d.asset.entry.name,\n root: d.asset.entry.root ?? \"\",\n version: d.fileVersion,\n });\n logInfo(`Updated the manifest: ${describeDrift(d)}`);\n }\n\n // publish commits + pushes the library repo; register takes the remote HEAD as-is.\n if (!opts.skipPush) {\n // `git add -A` stages every non-ignored file → a PUBLIC push. Surface it so\n // an unexpected file in the working tree is not silently published.\n logInfo(\n `Committing the library and pushing to the PUBLIC remote ${S.dim(remoteUrl)} ` +\n \"(.gitignore honored; anything else in the working tree becomes public).\",\n );\n commitAndPush({ libPath: lib.path, remoteUrl, branch: branchOf(lib), spawn });\n logOk(`Pushed ${S.dim(name)} to ${S.dim(remoteUrl)}.`);\n }\n\n const { published } = await publishToStore({\n sourceUrl: remoteUrl,\n ref: sourceRef,\n manifest: manifestWithFileVersions(manifest, assets),\n assetName: targetName,\n client: pub,\n });\n\n if (published.length > 0) {\n logInfo(`Consumers can now \\`skaile add ${published[0]}\\`.`);\n }\n } finally {\n close();\n }\n}\n\n/**\n * `skaile library publish <lib>` — commit + push the library repo, register +\n * sync it as a store source, and publish its manifest's assets under the\n * manifest publisher. See the module header for the full flow.\n */\nexport async function runLibraryPublish(\n name: string,\n opts: {\n asset?: string;\n createRepo?: boolean;\n private?: boolean;\n ref?: string;\n dryRun?: boolean;\n storeHolds?: StoreHolds;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n await publishLibrary(name, { ...opts, skipPush: false }, client, spawn);\n}\n\n/**\n * `skaile library register <lib>` — same as publish but skips the commit/push\n * (the bytes are already on GitHub at the current remote HEAD). Still requires a\n * git-backed remote.\n */\nexport async function runLibraryRegister(\n name: string,\n opts: { asset?: string; ref?: string; dryRun?: boolean },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n await publishLibrary(name, { ...opts, skipPush: true }, client, spawn);\n}\n\n/**\n * `skaile library yank <lib>` — unpublish the library's published assets from\n * the store (all, or the single asset matching `opts.asset`'s name).\n * Auth-gated like publish.\n */\nexport async function runLibraryYank(\n name: string,\n opts: { asset?: string },\n client?: PublisherClient,\n): Promise<void> {\n exitOnEmptyAsset(opts.asset);\n const injected = client !== undefined;\n const { manager, close } = await openLibraryManager();\n try {\n const lib = await manager.requireLibrary(name);\n const remoteUrl = remoteUrlOf(lib);\n if (!remoteUrl) {\n logErr(`Library \"${name}\" has no remote — nothing published to yank.`);\n process.exit(1);\n }\n\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const pub = client ?? makeHttpPublisherClient();\n const rows = await pub.sourcesList();\n const source = rows.find((r) => r.url === remoteUrl);\n if (!source) {\n logErr(`Library \"${name}\" is not registered in the store — nothing to yank.`);\n process.exit(1);\n }\n\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const candidates = (await pub.sourceCandidates(source.id)).filter(\n (c) => c.published && (!targetName || c.name === targetName),\n );\n if (candidates.length === 0) {\n logInfo(\"No published assets matched — nothing to yank.\");\n return;\n }\n\n // Report each yanked asset under its own namespace\n // (`assets[].publisher ?? manifest.publisher`); fall back to `kind:name`\n // when the manifest is absent or declares no namespace for it.\n const manifest = loadSkPublishManifest(lib.path);\n const yanked: string[] = [];\n for (const c of candidates) {\n try {\n await pub.assetUnpublish(c.id);\n const entry = manifest?.assets?.find((a) => a.kind === c.kind && a.name === c.name);\n const ns = manifest && entry ? assetNamespace(entry, manifest) : undefined;\n yanked.push(ns ? refFor(c.kind, ns, c.name, c.version) : `${c.kind}:${c.name}`);\n } catch (err) {\n logErr(\n `Failed to yank ${c.kind}:${c.name}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n logOk(`Yanked ${yanked.length} asset(s):`);\n for (const r of yanked) logInfo(` ${r}`);\n } finally {\n close();\n }\n}\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export { LocalCatalogDisabledError, openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-DHYSUJ3H.js';
|
|
2
|
-
import './chunk-KX2PT5Q4.js';
|
|
3
|
-
import './chunk-ARWKK325.js';
|
|
4
|
-
import './chunk-SZXGRHQQ.js';
|
|
5
|
-
import './chunk-7RGTAEG6.js';
|
|
6
|
-
import './chunk-OAHVKSQJ.js';
|
|
7
|
-
import './chunk-UL22SDGR.js';
|
|
8
|
-
import './chunk-QOM5Z62G.js';
|
|
9
|
-
import './chunk-7XSAW5OC.js';
|
|
10
|
-
import './chunk-BFMYYNDT.js';
|
|
11
|
-
import './chunk-3TXEJN4W.js';
|
|
12
|
-
import './chunk-ISHJITXJ.js';
|
|
13
|
-
import './chunk-LNFKL23K.js';
|
|
14
|
-
import './chunk-X3RMRJNR.js';
|
|
15
|
-
import './chunk-NUELZWCF.js';
|
|
16
|
-
import './chunk-3JKGY2YC.js';
|
|
17
|
-
import './chunk-NOA6EJXE.js';
|
|
18
|
-
import './chunk-KTBKW2FI.js';
|
|
19
|
-
import './chunk-UQ6LFBPZ.js';
|
|
20
|
-
import './chunk-DUMTLYSO.js';
|
|
21
|
-
import './chunk-E572OHGY.js';
|
|
22
|
-
import './chunk-L4YKW5AY.js';
|
|
23
|
-
import './chunk-4GY63JU6.js';
|
|
24
|
-
import './chunk-OTIB4D2K.js';
|
|
25
|
-
import './chunk-5KRMNUL4.js';
|
|
26
|
-
import './chunk-Z7ZEZZB6.js';
|
|
27
|
-
import './chunk-MWXYN6NY.js';
|
|
28
|
-
import './chunk-OHNKYHRR.js';
|
|
29
|
-
import './chunk-L5VSIPQD.js';
|
|
30
|
-
import './chunk-VTETQCR6.js';
|
|
31
|
-
import './chunk-UQ33Y4DM.js';
|
|
32
|
-
import './chunk-RVRB27AN.js';
|
|
33
|
-
import './chunk-GOCWM7FN.js';
|
|
34
|
-
import './chunk-WDXZA7QW.js';
|
|
35
|
-
import './chunk-ADPM6AYF.js';
|
|
36
|
-
import './chunk-DKXNKFKP.js';
|
|
37
|
-
import './chunk-LSI2IVFT.js';
|
|
38
|
-
import './chunk-C3CAXQMA.js';
|
|
39
|
-
import './chunk-BOFL7GIF.js';
|
|
40
|
-
import './chunk-NSBPE2FW.js';
|
|
41
|
-
//# sourceMappingURL=open-library-RJGJIW5H.js.map
|
|
42
|
-
//# sourceMappingURL=open-library-RJGJIW5H.js.map
|