@skaile/workspaces 6.6.0 → 6.7.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 +28 -0
- package/dist/ai-sdk.js +10 -17
- package/dist/ai-sdk.js.map +1 -1
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-WQ6YQPHV.js → asset-feeds-4A7PJ4OB.js} +18 -18
- package/dist/{asset-feeds-WQ6YQPHV.js.map → asset-feeds-4A7PJ4OB.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +4 -4
- package/dist/asset-manager/index.js +10 -10
- package/dist/asset-manager/installer.js +6 -6
- package/dist/asset-manager/renderers.js +5 -5
- package/dist/asset-manager/src/index.d.ts +89 -15
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install-agent.d.ts +22 -1
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/install-instances.d.ts +30 -1
- package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +12 -0
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/harnesses/claude-sdk.js +21 -15
- package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
- package/dist/bridge/harnesses/codex.js +9 -8
- package/dist/bridge/harnesses/codex.js.map +1 -1
- package/dist/bridge/harnesses/continue.js +11 -9
- package/dist/bridge/harnesses/continue.js.map +1 -1
- package/dist/bridge/harnesses/echo.js +5 -4
- package/dist/bridge/harnesses/echo.js.map +1 -1
- package/dist/bridge/harnesses/gemini.js +8 -6
- package/dist/bridge/harnesses/goose.js +11 -9
- package/dist/bridge/harnesses/goose.js.map +1 -1
- package/dist/bridge/harnesses/omp.js +9 -7
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +11 -9
- package/dist/bridge/harnesses/opencode.js.map +1 -1
- package/dist/bridge/harnesses/qwen.js +9 -7
- package/dist/bridge/harnesses/qwen.js.map +1 -1
- package/dist/bridge/index.js +17 -15
- package/dist/bridge/src/ai-sdk.d.ts.map +1 -1
- package/dist/bridge/src/claude-sdk-surface.d.ts +2 -1
- package/dist/bridge/src/claude-sdk-surface.d.ts.map +1 -1
- package/dist/bridge/src/harness-binaries.d.ts +21 -0
- package/dist/bridge/src/harness-binaries.d.ts.map +1 -0
- package/dist/bridge/src/harness-model-check.d.ts +22 -6
- package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/continue.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/gemini.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/goose.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/omp-models-yml.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/opencode.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/qwen.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/{chunk-LBJ4M5J2.js → chunk-237BMOZW.js} +4 -4
- package/dist/{chunk-LBJ4M5J2.js.map → chunk-237BMOZW.js.map} +1 -1
- package/dist/{chunk-2TLPC6TQ.js → chunk-37AYPPOO.js} +41 -19
- package/dist/chunk-37AYPPOO.js.map +1 -0
- package/dist/{chunk-GTGWRKMJ.js → chunk-37X4A6VZ.js} +6 -6
- package/dist/{chunk-GTGWRKMJ.js.map → chunk-37X4A6VZ.js.map} +1 -1
- package/dist/{chunk-MXI3XWV6.js → chunk-3HSLJAMJ.js} +4 -4
- package/dist/{chunk-MXI3XWV6.js.map → chunk-3HSLJAMJ.js.map} +1 -1
- package/dist/{chunk-RHCEX2EV.js → chunk-3W6XZQ2Y.js} +3 -3
- package/dist/{chunk-RHCEX2EV.js.map → chunk-3W6XZQ2Y.js.map} +1 -1
- package/dist/{chunk-F4CZQD3T.js → chunk-4C2E5QUP.js} +4 -3
- package/dist/chunk-4C2E5QUP.js.map +1 -0
- package/dist/{chunk-DS6UUCFG.js → chunk-4CD2R4MJ.js} +5 -4
- package/dist/chunk-4CD2R4MJ.js.map +1 -0
- package/dist/{chunk-AQNW2FET.js → chunk-6RPS7JEH.js} +92 -39
- package/dist/chunk-6RPS7JEH.js.map +1 -0
- package/dist/{chunk-BSMW3PX2.js → chunk-6UP2EDFN.js} +4 -313
- package/dist/chunk-6UP2EDFN.js.map +1 -0
- package/dist/{chunk-4J7JQX4G.js → chunk-72TLO2AG.js} +4 -4
- package/dist/{chunk-4J7JQX4G.js.map → chunk-72TLO2AG.js.map} +1 -1
- package/dist/{chunk-I5IF3JCG.js → chunk-AO57IFME.js} +3 -3
- package/dist/{chunk-I5IF3JCG.js.map → chunk-AO57IFME.js.map} +1 -1
- package/dist/{chunk-G5SYFFMD.js → chunk-ASBZOTEO.js} +2 -2
- package/dist/{chunk-G5SYFFMD.js.map → chunk-ASBZOTEO.js.map} +1 -1
- package/dist/{chunk-O7QZI6MQ.js → chunk-BB5EJLKZ.js} +2 -2
- package/dist/{chunk-O7QZI6MQ.js.map → chunk-BB5EJLKZ.js.map} +1 -1
- package/dist/{chunk-N2PBAXAA.js → chunk-BKLDBUQA.js} +3 -3
- package/dist/{chunk-N2PBAXAA.js.map → chunk-BKLDBUQA.js.map} +1 -1
- package/dist/{chunk-XD3RYAMR.js → chunk-CTRTFMCX.js} +6 -6
- package/dist/{chunk-XD3RYAMR.js.map → chunk-CTRTFMCX.js.map} +1 -1
- package/dist/{chunk-EPXZQIC6.js → chunk-DFP476EU.js} +8 -4
- package/dist/chunk-DFP476EU.js.map +1 -0
- package/dist/{chunk-MMOWIRHP.js → chunk-G44FFUMA.js} +12 -10
- package/dist/chunk-G44FFUMA.js.map +1 -0
- package/dist/{chunk-JIQUF3X2.js → chunk-G7NMF5WQ.js} +3 -3
- package/dist/{chunk-JIQUF3X2.js.map → chunk-G7NMF5WQ.js.map} +1 -1
- package/dist/{chunk-SHTXMERQ.js → chunk-GAIMSCZ7.js} +10 -8
- package/dist/chunk-GAIMSCZ7.js.map +1 -0
- package/dist/{chunk-6A6HE5LW.js → chunk-HLAEYFUN.js} +3 -3
- package/dist/{chunk-6A6HE5LW.js.map → chunk-HLAEYFUN.js.map} +1 -1
- package/dist/{chunk-YN6N3RBM.js → chunk-HMVAGPYR.js} +47 -11
- package/dist/chunk-HMVAGPYR.js.map +1 -0
- package/dist/{chunk-U3UDOX6I.js → chunk-HPXONAI2.js} +6 -4
- package/dist/chunk-HPXONAI2.js.map +1 -0
- package/dist/{chunk-5ETYBC2X.js → chunk-IRK3LNG3.js} +6 -6
- package/dist/{chunk-5ETYBC2X.js.map → chunk-IRK3LNG3.js.map} +1 -1
- package/dist/{chunk-J262X4JU.js → chunk-J7VEQORJ.js} +69 -16
- package/dist/chunk-J7VEQORJ.js.map +1 -0
- package/dist/{chunk-DI6J2PJB.js → chunk-KO3VSZQP.js} +47 -18
- package/dist/chunk-KO3VSZQP.js.map +1 -0
- package/dist/{chunk-KSH5CFQS.js → chunk-KORDNXKA.js} +3 -3
- package/dist/{chunk-KSH5CFQS.js.map → chunk-KORDNXKA.js.map} +1 -1
- package/dist/{chunk-SCRYXAHH.js → chunk-L3JQJ6D5.js} +6 -6
- package/dist/{chunk-SCRYXAHH.js.map → chunk-L3JQJ6D5.js.map} +1 -1
- package/dist/{chunk-7I5PNB2G.js → chunk-L7QOZG5V.js} +3 -3
- package/dist/{chunk-7I5PNB2G.js.map → chunk-L7QOZG5V.js.map} +1 -1
- package/dist/{chunk-VXYZ5M7Z.js → chunk-LX4TTTRR.js} +64 -27
- package/dist/chunk-LX4TTTRR.js.map +1 -0
- package/dist/{chunk-KSUT5KAE.js → chunk-LZPJOF7Y.js} +3 -3
- package/dist/{chunk-KSUT5KAE.js.map → chunk-LZPJOF7Y.js.map} +1 -1
- package/dist/{chunk-65UAC3ZR.js → chunk-N6ZGB5ES.js} +4 -3
- package/dist/chunk-N6ZGB5ES.js.map +1 -0
- package/dist/{chunk-2M3VLKT2.js → chunk-NURTGAWM.js} +3 -3
- package/dist/{chunk-2M3VLKT2.js.map → chunk-NURTGAWM.js.map} +1 -1
- package/dist/{chunk-J4WKNJHO.js → chunk-O5Y7VMVQ.js} +15 -14
- package/dist/chunk-O5Y7VMVQ.js.map +1 -0
- package/dist/{chunk-6SXSVKQY.js → chunk-O7ADRMCR.js} +63 -14
- package/dist/chunk-O7ADRMCR.js.map +1 -0
- package/dist/{chunk-7PVGND4J.js → chunk-OGTQUEAO.js} +21 -14
- package/dist/chunk-OGTQUEAO.js.map +1 -0
- package/dist/{chunk-VJRL6ZK6.js → chunk-OSABUEWA.js} +3 -3
- package/dist/{chunk-VJRL6ZK6.js.map → chunk-OSABUEWA.js.map} +1 -1
- package/dist/{chunk-WW5NAU6N.js → chunk-PLLZSKOO.js} +3 -3
- package/dist/{chunk-WW5NAU6N.js.map → chunk-PLLZSKOO.js.map} +1 -1
- package/dist/{chunk-7SJHSGUV.js → chunk-Q2NYTMT6.js} +16 -15
- package/dist/chunk-Q2NYTMT6.js.map +1 -0
- package/dist/{chunk-E2EC6SAX.js → chunk-QC5BYUED.js} +51 -15
- package/dist/chunk-QC5BYUED.js.map +1 -0
- package/dist/{chunk-RAU5QPI6.js → chunk-QCR5AE5E.js} +5 -5
- package/dist/{chunk-RAU5QPI6.js.map → chunk-QCR5AE5E.js.map} +1 -1
- package/dist/{chunk-TUFNY6OD.js → chunk-QW5B3TEO.js} +10 -4
- package/dist/chunk-QW5B3TEO.js.map +1 -0
- package/dist/{chunk-Z4FERR4U.js → chunk-RAHAZ7LP.js} +2 -2
- package/dist/{chunk-Z4FERR4U.js.map → chunk-RAHAZ7LP.js.map} +1 -1
- package/dist/{chunk-OY22B7E2.js → chunk-SBNUXJ6E.js} +3 -3
- package/dist/{chunk-OY22B7E2.js.map → chunk-SBNUXJ6E.js.map} +1 -1
- package/dist/{chunk-6ARPZHOV.js → chunk-TMJBEGS4.js} +35 -6
- package/dist/chunk-TMJBEGS4.js.map +1 -0
- package/dist/{chunk-6RHWTZPT.js → chunk-TXX3OUYI.js} +3 -3
- package/dist/{chunk-6RHWTZPT.js.map → chunk-TXX3OUYI.js.map} +1 -1
- package/dist/{chunk-SZKCE7EC.js → chunk-U52FYGK5.js} +5 -5
- package/dist/{chunk-SZKCE7EC.js.map → chunk-U52FYGK5.js.map} +1 -1
- package/dist/{chunk-TCH5UDKT.js → chunk-UCB7FK25.js} +10 -8
- package/dist/chunk-UCB7FK25.js.map +1 -0
- package/dist/{chunk-5XHQBCB5.js → chunk-WFK4MUBL.js} +21 -7
- package/dist/chunk-WFK4MUBL.js.map +1 -0
- package/dist/{chunk-HGZN6JLP.js → chunk-WIYVR24B.js} +4 -4
- package/dist/{chunk-HGZN6JLP.js.map → chunk-WIYVR24B.js.map} +1 -1
- package/dist/{chunk-B6N653ZG.js → chunk-WKENHNDM.js} +6 -6
- package/dist/{chunk-B6N653ZG.js.map → chunk-WKENHNDM.js.map} +1 -1
- package/dist/chunk-WWSRIT3J.js +59 -0
- package/dist/chunk-WWSRIT3J.js.map +1 -0
- package/dist/chunk-XON6ODIC.js +315 -0
- package/dist/chunk-XON6ODIC.js.map +1 -0
- package/dist/{chunk-4BFEPZ6J.js → chunk-ZBA4P5TD.js} +3 -3
- package/dist/{chunk-4BFEPZ6J.js.map → chunk-ZBA4P5TD.js.map} +1 -1
- package/dist/{chunk-JRVQV7WC.js → chunk-ZDTDS62B.js} +595 -126
- package/dist/chunk-ZDTDS62B.js.map +1 -0
- package/dist/{chunk-XYCYGN3Q.js → chunk-ZM4SDVUV.js} +79 -20
- package/dist/chunk-ZM4SDVUV.js.map +1 -0
- package/dist/{claude-code-LZH7Y4Y5.js → claude-code-BLFRZU2X.js} +4 -4
- package/dist/{claude-code-LZH7Y4Y5.js.map → claude-code-BLFRZU2X.js.map} +1 -1
- package/dist/cli/index.js +474 -198
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/agent-pins.d.ts +9 -3
- package/dist/cli/src/agent-pins.d.ts.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/cache.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +2 -0
- 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/harness-preflight.d.ts +38 -0
- package/dist/cli/src/commands/harness-preflight.d.ts.map +1 -0
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +16 -0
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-assets.d.ts +5 -0
- package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-harness.d.ts +15 -7
- package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate.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 +14 -0
- package/dist/cli/src/commands/project.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 +6 -5
- package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/cli/src/commands/session.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +11 -0
- package/dist/cli/src/commands/source.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 +6 -0
- 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/plugin-store/reconcile.d.ts.map +1 -1
- package/dist/cli/src/session-hint.d.ts +7 -0
- package/dist/cli/src/session-hint.d.ts.map +1 -0
- package/dist/connectors/config.js +3 -3
- package/dist/connectors/index.js +21 -19
- package/dist/connectors/src/managed-gitconfig.d.ts +6 -4
- package/dist/connectors/src/managed-gitconfig.d.ts.map +1 -1
- package/dist/{connectors-HU5MHSUJ.js → connectors-OJJU4LSN.js} +24 -22
- package/dist/{connectors-HU5MHSUJ.js.map → connectors-OJJU4LSN.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/index.js +4 -4
- package/dist/core/publish-manifest.js +1 -1
- package/dist/core/runtime-assets.js +3 -3
- package/dist/core/src/agent-instances.d.ts +11 -0
- package/dist/core/src/agent-instances.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/publish-manifest.d.ts +20 -6
- package/dist/core/src/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +9 -0
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/run-state-ignore.d.ts +17 -0
- package/dist/core/src/run-state-ignore.d.ts.map +1 -0
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +2 -2
- package/dist/deploy/index.js +4 -4
- package/dist/discovery/index.js +2 -2
- package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
- package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-CAMWJTMR.js → ensure-sources-F6VQDCWY.js} +26 -24
- package/dist/ensure-sources-F6VQDCWY.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +21 -19
- package/dist/factory-assets/connectors/deploy.js +21 -19
- package/dist/factory-assets/connectors/devserver.js +21 -19
- package/dist/factory-assets/connectors/flow/adapter.js +21 -19
- package/dist/factory-assets/connectors/flow/engine/router-settlement.d.ts +2 -0
- package/dist/factory-assets/connectors/flow/engine/router-settlement.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +5 -5
- package/dist/factory-assets/connectors/flow/run-flow.js +22 -20
- package/dist/factory-assets/connectors/flow.js +21 -19
- package/dist/factory-assets/connectors/git/CONNECTOR.md +4 -1
- package/dist/factory-assets/connectors/git/exec.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +21 -19
- package/dist/factory-assets/connectors/gmail.js +21 -19
- package/dist/factory-assets/connectors/googledrive.js +21 -19
- package/dist/factory-assets/connectors/local.js +21 -19
- package/dist/factory-assets/connectors/mattermost.js +21 -19
- package/dist/factory-assets/connectors/memory.js +21 -19
- package/dist/factory-assets/connectors/minio.js +21 -19
- package/dist/factory-assets/connectors/postgres.js +21 -19
- package/dist/factory-assets/connectors/s3.js +21 -19
- package/dist/factory-assets/connectors/sharepoint.js +21 -19
- package/dist/factory-assets/connectors/sqlite.js +21 -19
- package/dist/factory-assets/connectors/static-server.js +21 -19
- package/dist/factory-assets/connectors/tunnel.js +21 -19
- package/dist/factory-assets/connectors/webdav.js +21 -19
- package/dist/factory-assets/connectors/xstate-store.js +21 -19
- package/dist/factory-assets/connectors/xstate.js +21 -19
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +14 -1
- package/dist/{flows-GVOVQGQW.js → flows-I6ODIPZZ.js} +7 -7
- package/dist/{flows-GVOVQGQW.js.map → flows-I6ODIPZZ.js.map} +1 -1
- package/dist/{helpers-WMCCODAV.js → helpers-PJNUTZXZ.js} +26 -24
- package/dist/{helpers-WMCCODAV.js.map → helpers-PJNUTZXZ.js.map} +1 -1
- package/dist/library/index.js +7 -7
- package/dist/library/install.js +2 -2
- package/dist/library/src/manifest-writer.d.ts +5 -0
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/{library-publish-UQQMHTND.js → library-publish-FNNDWVBO.js} +47 -45
- package/dist/library-publish-FNNDWVBO.js.map +1 -0
- package/dist/model-endpoint/index.js +8 -7
- package/dist/{open-library-OJ4HT2X4.js → open-library-R5EZROFN.js} +29 -27
- package/dist/{open-library-OJ4HT2X4.js.map → open-library-R5EZROFN.js.map} +1 -1
- package/dist/{open-registry-LWGIOJDK.js → open-registry-RZW2AFD6.js} +11 -11
- package/dist/{open-registry-LWGIOJDK.js.map → open-registry-RZW2AFD6.js.map} +1 -1
- package/dist/{paths-FR2752HV.js → paths-RPK5PNZQ.js} +7 -7
- package/dist/{paths-FR2752HV.js.map → paths-RPK5PNZQ.js.map} +1 -1
- package/dist/{plugin-store-IALJUBN2.js → plugin-store-OJTERUEZ.js} +7 -7
- package/dist/{plugin-store-IALJUBN2.js.map → plugin-store-OJTERUEZ.js.map} +1 -1
- package/dist/{project-UQFCYHYS.js → project-S2FT3LLR.js} +43 -41
- package/dist/{project-UQFCYHYS.js.map → project-S2FT3LLR.js.map} +1 -1
- package/dist/resolver/index.js +4 -4
- package/dist/runner/index.js +32 -30
- package/dist/runner/src/capability-roundtrip.d.ts +6 -6
- package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
- package/dist/runner/src/composition/run-snapshot.d.ts +7 -1
- package/dist/runner/src/composition/run-snapshot.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +10 -10
- package/dist/sdk/bridge.js +17 -15
- package/dist/sdk/core.js +4 -4
- package/dist/sdk/flow.js +5 -5
- package/dist/sdk/index.js +32 -30
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +4 -4
- package/dist/sdk/runner.js +32 -30
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/transport/ws/server.js +5 -5
- package/dist/sdk/transport/ws.js +5 -5
- package/dist/sdk/transport.js +5 -5
- package/dist/sdk/types.js +1 -1
- package/dist/serve-preflight-AADSOUO2.js +58 -0
- package/dist/{serve-preflight-TYEKHC32.js.map → serve-preflight-AADSOUO2.js.map} +1 -1
- package/dist/session/index.js +2 -2
- package/dist/{setup-4JV2IMCB.js → setup-HOAJHUFQ.js} +27 -25
- package/dist/setup-HOAJHUFQ.js.map +1 -0
- package/dist/{skills-6QTKFMLW.js → skills-KHHW3RZ3.js} +6 -6
- package/dist/{skills-6QTKFMLW.js.map → skills-KHHW3RZ3.js.map} +1 -1
- package/dist/source-FOELFCY6.js +88 -0
- package/dist/{source-XYMMJVKR.js.map → source-FOELFCY6.js.map} +1 -1
- package/dist/{source-manifest-publish-SZFGGKB4.js → source-manifest-publish-Q7P5AEVU.js} +44 -42
- package/dist/source-manifest-publish-Q7P5AEVU.js.map +1 -0
- package/dist/transport/index.js +5 -5
- package/dist/transport/ws/server.js +5 -5
- package/dist/transport/ws.js +5 -5
- package/dist/tui/index.js +56 -37
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/src/repl.d.ts +10 -0
- package/dist/tui/src/repl.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/src/version.d.ts +4 -4
- package/dist/workspace-plugin/adapters/mcp.js +24 -22
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2TLPC6TQ.js.map +0 -1
- package/dist/chunk-5XHQBCB5.js.map +0 -1
- package/dist/chunk-65UAC3ZR.js.map +0 -1
- package/dist/chunk-6ARPZHOV.js.map +0 -1
- package/dist/chunk-6SXSVKQY.js.map +0 -1
- package/dist/chunk-7PVGND4J.js.map +0 -1
- package/dist/chunk-7SJHSGUV.js.map +0 -1
- package/dist/chunk-AQNW2FET.js.map +0 -1
- package/dist/chunk-BSMW3PX2.js.map +0 -1
- package/dist/chunk-DI6J2PJB.js.map +0 -1
- package/dist/chunk-DS6UUCFG.js.map +0 -1
- package/dist/chunk-E2EC6SAX.js.map +0 -1
- package/dist/chunk-EPXZQIC6.js.map +0 -1
- package/dist/chunk-F4CZQD3T.js.map +0 -1
- package/dist/chunk-J262X4JU.js.map +0 -1
- package/dist/chunk-J4WKNJHO.js.map +0 -1
- package/dist/chunk-JRVQV7WC.js.map +0 -1
- package/dist/chunk-MMOWIRHP.js.map +0 -1
- package/dist/chunk-SHTXMERQ.js.map +0 -1
- package/dist/chunk-TCH5UDKT.js.map +0 -1
- package/dist/chunk-TUFNY6OD.js.map +0 -1
- package/dist/chunk-U3UDOX6I.js.map +0 -1
- package/dist/chunk-VXYZ5M7Z.js.map +0 -1
- package/dist/chunk-XYCYGN3Q.js.map +0 -1
- package/dist/chunk-YN6N3RBM.js.map +0 -1
- package/dist/ensure-sources-CAMWJTMR.js.map +0 -1
- package/dist/library-publish-UQQMHTND.js.map +0 -1
- package/dist/serve-preflight-TYEKHC32.js +0 -56
- package/dist/setup-4JV2IMCB.js.map +0 -1
- package/dist/source-XYMMJVKR.js +0 -86
- package/dist/source-manifest-publish-SZFGGKB4.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/harness-error.ts","../cli/src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;AAWO,SAAS,sBAAsB,OAAA,EAAqC;AACzE,EAAA,MAAM,QAAQ,aAAA,EAAc,CAAE,IAAI,CAAC,CAAA,KAAM,EAAE,EAAE,CAAA;AAC7C,EAAA,IAAI,KAAA,CAAM,QAAA,CAAS,OAAO,CAAA,EAAG,OAAO,MAAA;AACpC,EAAA,OACE,CAAA,wBAAA,EAA2B,OAAO,CAAA,cAAA,EAAiB,KAAA,CAAM,IAAA,CAAK,IAAI,CAAC,CAAA,EAAA,EAChE,eAAe,CAAA,OAAA,EAAU,mBAAA,CAAoB,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAA;AAE9D;AAGA,IAAM,eAAA,GAAkB,+CAAA;AAWjB,SAAS,2BAAA,CACd,OAAA,EACA,KAAA,GAA2B,EAAC,EACpB;AACR,EAAA,MAAM,OAAA,GAAU,CAAC,GAAG,mBAAA,EAAqB,GAAG,KAAK,CAAA;AACjD,EAA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AACA,EAAA,MAAM,SAAA,GAAY,KAAA,CACf,MAAA,CAAO,CAAC,CAAA,KAAM;AACb,IAAA,IAAI;AACF,MAAA,OAAO,YAAA,CAAa,KAAK,IAAA,CAAK,GAAA,EAAK,CAAC,CAAA,EAAG,MAAM,CAAA,CAAE,QAAA,CAAS,gBAAgB,CAAA;AAAA,IAC1E,CAAA,CAAA,MAAQ;AACN,MAAA,OAAO,KAAA;AAAA,IACT;AAAA,EACF,CAAC,CAAA,CACA,GAAA,CAAI,CAAC,CAAA,KAAM,CAAA,CAAE,OAAA,CAAQ,OAAA,EAAS,EAAE,CAAC,CAAA,CACjC,IAAA,EAAK;AACR,EAAA,IAAI,SAAA,CAAU,WAAW,CAAA,EAAG;AAC5B,EAAA,OAAA;AAAA,IACE,CAAA,uCAAA,EAA0C,SAAA,CAAU,IAAA,CAAK,IAAI,CAAC,CAAA,wFAAA;AAAA,GAChE;AACF","file":"chunk-SCRYXAHH.js","sourcesContent":["import { listHarnesses } from \"@skaile/workspaces/bridge\";\nimport { SUPPORTED_HARNESSES } from \"@skaile/workspaces/core\";\nimport { Option } from \"commander\";\n\n/**\n * The refusal for a harness name nothing registers, or `undefined` when it is known. One check\n * for `run` (also with `--dry-run`, so the plan never names a harness the real run refuses),\n * `repl` and `config set harness` (p1022). Load the project's plugins first: a plugin's harness\n * counts. The line names the other command group's names too (p1753), see\n * {@link unknownHarnessTargetMessage}.\n */\nexport function unknownHarnessMessage(harness: string): string | undefined {\n const known = listHarnesses().map((d) => d.id);\n if (known.includes(harness)) return undefined;\n return (\n `Unknown agent harness: \"${harness}\". Available: ${known.join(\", \")}. ` +\n `${DEPLOY_COMMANDS} take: ${SUPPORTED_HARNESSES.join(\", \")}.`\n );\n}\n\n/** The commands that write harness files, so they take the harness targets only. */\nconst DEPLOY_COMMANDS = \"harness set, init --harness and add --harness\";\n\n/**\n * The refusal for a name that is no harness target, for the commands that deploy files\n * (`harness set`, `init --harness`, `add --harness`, `integration --harness`). Same wording as\n * {@link unknownHarnessMessage}: the list is the targets, and the line names the commands that\n * run a session and take every registered harness (p1753).\n *\n * @param harness - The name the user typed.\n * @param extra - Further names the command takes, such as `all`.\n */\nexport function unknownHarnessTargetMessage(\n harness: string,\n extra: readonly string[] = [],\n): string {\n const targets = [...SUPPORTED_HARNESSES, ...extra];\n const registered = listHarnesses().map((d) => d.id);\n return (\n `Unknown agent harness: \"${harness}\". Available: ${targets.join(\", \")}. ` +\n `run, repl and config set harness take: ${registered.join(\", \")}.`\n );\n}\n\nlet warnedDriverFlag = false;\n\n/** Print the `--driver` deprecation line to stderr, once per process. */\nexport function warnDriverFlagDeprecated(): void {\n if (warnedDriverFlag) return;\n warnedDriverFlag = true;\n console.error(\"--driver is deprecated; use --harness\");\n}\n\n/**\n * The hidden `--driver <name>` option every command with `--harness <name>` keeps for one\n * major release: an alias that sets the same value (`--harness` wins when both are given).\n */\nexport function driverAliasOption(): Option {\n return new Option(\"--driver <name>\", \"Deprecated alias of --harness\").hideHelp();\n}\n\n/**\n * Fold a parsed `--driver` alias into `harness`: when `--driver` was given, print the\n * deprecation line once and use its value unless `--harness` (or `fallback`, when neither\n * flag was given) already decided. Returns `opts` with `harness` set and `driver` removed.\n */\nexport function foldDriverFlag<T extends { harness?: string; driver?: string }>(\n opts: T,\n fallback?: string,\n): Omit<T, \"driver\"> & { harness?: string } {\n const { driver, ...rest } = opts;\n if (driver !== undefined) warnDriverFlagDeprecated();\n return { ...rest, harness: rest.harness ?? driver ?? fallback };\n}\n\n/**\n * Turn a harness-start/prompt failure into a friendly, actionable message when the\n * cause is a missing/unusable agent binary; otherwise return `null` so the caller\n * surfaces the raw error unchanged.\n *\n * The bridge classifies these as `category: \"config\"` and carries a `hint`, but the\n * shape reaching the CLI varies: omp's `start()` rejects with the raw spawn error\n * (`code === \"ENOENT\"`), while the subprocess CLI harnesses reject with the classified\n * `AgentError` attached under `.detail`. Duck-type across all of them.\n */\nexport function friendlyHarnessError(err: unknown): string | null {\n const e = err as\n | {\n code?: string;\n syscall?: string;\n message?: string;\n category?: string;\n hint?: string;\n detail?: { category?: string; hint?: string };\n }\n | null\n | undefined;\n if (!e) return null;\n\n // A missing binary is a *spawn* ENOENT (`syscall: \"spawn <bin>\"` / \"spawn … ENOENT\");\n // a bare ENOENT from connector/mount setup is a different failure, not the harness.\n const isSpawnEnoent =\n e.code === \"ENOENT\" &&\n (e.syscall?.startsWith(\"spawn\") === true || /^spawn .*ENOENT/.test(e.message ?? \"\"));\n const isConfig = e.category === \"config\" || e.detail?.category === \"config\";\n if (!isSpawnEnoent && !isConfig) return null;\n\n const hint = e.hint ?? e.detail?.hint;\n const base = hint ?? \"The configured agent binary is not installed or not on your PATH.\";\n return `${base}\\nTry a different harness with \\`--harness claude-sdk\\`.`;\n}\n\n/**\n * Lines that follow the single `✗` line of a failed turn: the classifier's hint\n * (or, for a rejected credential, a pointer at the key), and where the full\n * records are. The JSON records themselves are not printed on the terminal:\n * they live in the project's log database. The pointer names the session whose records\n * the failure left (`logSessionId`); a failure before any session started has none and\n * gets no pointer.\n */\nexport function harnessErrorNotes(err: unknown): string[] {\n const e = err as\n | {\n category?: string;\n hint?: string;\n logSessionId?: string;\n detail?: { category?: string; hint?: string };\n }\n | null\n | undefined;\n const notes: string[] = [];\n const category = e?.category ?? e?.detail?.category;\n const hint = e?.hint ?? e?.detail?.hint;\n if (hint && category !== \"config\") notes.push(hint);\n else if (category === \"auth\") notes.push(\"Check your API key or login.\");\n if (e?.logSessionId) {\n notes.push(`Full records: .skaile/logs.db (skaile session logs ${e.logSessionId}).`);\n }\n return notes;\n}\n","import { existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport path from \"node:path\";\nimport { softDepName } from \"@skaile/workspaces/asset-manager\";\nimport {\n type HarnessName,\n LockParseError,\n readLock,\n resolveSkWorkspaceConfig,\n SKAILE_YAML_DEFAULT,\n SUPPORTED_HARNESSES,\n} from \"@skaile/workspaces/core\";\nimport pc from \"picocolors\";\nimport { unknownHarnessTargetMessage } from \"./harness-error.ts\";\n\n/**\n * Terminal styling helpers used across all CLI commands.\n *\n * @docLink cli/dev-guide#helpers\n */\nexport const S = {\n brand: (s: string) => pc.cyan(pc.bold(s)),\n cmd: (s: string) => pc.cyan(s),\n heading: (s: string) => pc.bold(s),\n bold: (s: string) => pc.bold(s),\n dim: (s: string) => pc.dim(s),\n ok: (s: string) => pc.green(s),\n warn: (s: string) => pc.yellow(s),\n err: (s: string) => pc.red(s),\n label: (s: string) => pc.dim(s),\n rule: (w = 40) => pc.dim(\"─\".repeat(w)),\n};\n\nconst KIND_COLORS: Record<string, (s: string) => string> = {\n skill: pc.blue,\n agent: pc.magenta,\n prompt: pc.yellow,\n flow: pc.green,\n preset: pc.cyan,\n contract: pc.red,\n connector: pc.green,\n knowledge: pc.cyan,\n persona: pc.cyan,\n ruleset: pc.cyan,\n \"mcp-server\": pc.magenta,\n};\n\n/**\n * Fit a plain (ANSI-free) string into exactly `width` columns: truncate with a\n * trailing `…` when too long, pad with spaces when too short. Keeps fixed-width\n * columns from overflowing the row when a value (e.g. an asset name) is wider\n * than its budget.\n */\nexport function fitWidth(s: string, width: number): string {\n if (width <= 0) return \"\";\n if (s.length > width) return width === 1 ? \"…\" : `${s.slice(0, width - 1)}…`;\n return s.padEnd(width);\n}\n\n/** Color-code an asset kind string. */\nexport function kindColor(kind: string): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(kind);\n}\n\n/**\n * Widest kind label (`mcp-server`); the default kind-column width fits it so\n * long kinds don't shove the rest of the row out of alignment.\n */\nexport const KIND_COL_WIDTH = 10;\n\n/**\n * Shared `--target` help suffix: with no flag, the manager deploys into the\n * harness the project is configured for (the harness `skaile config show`\n * resolves), and only then falls back to `claude-code`.\n */\nexport const TARGET_DEFAULT_HINT = \"default: the project's configured harness, else claude-code\";\n\n/**\n * Color-code an asset kind string fit to exactly `width` columns — pads short\n * kinds, truncates over-long ones (via {@link fitWidth}) so the column can never\n * overflow and break row alignment.\n */\nexport function kindColorPad(kind: string, width = KIND_COL_WIDTH): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(fitWidth(kind, width));\n}\n\n/** Color-code a \"kind:name\" reference string. */\nexport function colorRef(ref: string): string {\n const colonIdx = ref.indexOf(\":\");\n if (colonIdx === -1) return ref;\n const kind = ref.slice(0, colonIdx);\n const rest = ref.slice(colonIdx);\n return `${kindColor(kind)}${rest}`;\n}\n\n/**\n * Print a success line prefixed with a green check mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logOk(msg: string) {\n console.log(` ${pc.green(\"✓\")} ${msg}`);\n}\n/**\n * Print an error line prefixed with a red cross to stderr.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logErr(msg: string) {\n console.error(` ${pc.red(\"✗\")} ${msg}`);\n}\n/**\n * Print a warning line prefixed with a yellow exclamation mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logWarn(msg: string) {\n console.log(` ${pc.yellow(\"!\")} ${msg}`);\n}\n/**\n * Like {@link logWarn}, on stderr: a warning about the run itself (an asset scan that stopped\n * early) that must not land in the output a script reads from stdout.\n *\n * @param msg - Message to display.\n */\nexport function logWarnErr(msg: string) {\n console.error(` ${pc.yellow(\"!\")} ${msg}`);\n}\n/**\n * One `!` line per deployed library asset whose body or description is still the untouched\n * `library create` scaffold: `validate` and the publish plan fail both, so `add`, `install` and\n * `update` name every placeholder they fail (p926).\n *\n * @param bodies - Canonical refs the asset manager reported as placeholder bodies.\n * @param descriptions - Canonical refs the asset manager reported as placeholder descriptions.\n */\nexport function warnPlaceholderBodies(\n bodies: readonly string[] | undefined,\n descriptions?: readonly string[],\n) {\n const refs = [...new Set([...(bodies ?? []), ...(descriptions ?? [])])];\n for (const ref of refs) {\n const parts = [\n ...(descriptions?.includes(ref) ? [\"description\"] : []),\n ...(bodies?.includes(ref) ? [\"body\"] : []),\n ];\n const both = parts.length > 1;\n logWarn(\n `${ref} ${parts.join(\" and \")} ${both ? \"are\" : \"is\"} still the scaffold placeholder; write ${both ? \"them\" : \"it\"} (\\`skaile validate\\` fails ${both ? \"them\" : \"it\"})`,\n );\n }\n}\n/**\n * Print an info line prefixed with a dim dot.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logInfo(msg: string) {\n console.log(` ${pc.dim(\"·\")} ${msg}`);\n}\n\n/** Full command path of the command being run (`harness set`), set before its action runs. */\nlet activeCommandPath: string | undefined;\n\n/**\n * Record the command that is about to run, as the path of subcommand names from the root\n * (`harness set`), so advice that repeats the command shows the whole path (p1656).\n */\nexport function setActiveCommand(cmd: { name(): string; parent: unknown }): void {\n const names: string[] = [];\n for (\n let c: { name(): string; parent: unknown } | null = cmd;\n c && c.parent;\n c = c.parent as { name(): string; parent: unknown } | null\n ) {\n names.unshift(c.name());\n }\n activeCommandPath = names.length > 0 ? names.join(\" \") : undefined;\n}\n\n/** The nearest parent directory of `dir` that holds a `skaile.yaml`, or `undefined`. */\nfunction nearestParentProject(dir: string): string | undefined {\n for (let up = path.dirname(dir); up !== dir; dir = up, up = path.dirname(dir)) {\n if (existsSync(path.join(up, SKAILE_YAML_DEFAULT))) return up;\n }\n return undefined;\n}\n\n/**\n * Print the `No skaile.yaml found` line for `projectDir`, plus a second line naming the nearest\n * parent directory that holds a `skaile.yaml`, when there is one: skaile does not search parent\n * directories. The line shows `--project-dir` after the full command path (`skaile harness set\n * --project-dir /x`), the only place the option is accepted (p1656).\n */\nexport function logNoProject(projectDir: string): void {\n const dir = path.resolve(projectDir);\n logErr(`No ${S.cmd(\"skaile.yaml\")} found. Run ${S.cmd(\"skaile init\")} to create one.`);\n const parent = nearestParentProject(dir);\n if (parent) {\n const command =\n activeCommandPath ?? process.argv.slice(2).find((a) => !a.startsWith(\"-\")) ?? \"<command>\";\n logErr(\n `${S.cmd(parent)} holds a ${S.cmd(\"skaile.yaml\")}: run from there or put the option after the command name: ${S.cmd(`skaile ${command} --project-dir ${parent}`)}.`,\n );\n }\n}\n\n/**\n * Stop a project command that has no usable project: print one `✗` line and exit 1, before\n * the command deploys, undeploys, locks or clones anything. Two causes: no `skaile.yaml` in\n * `projectDir` (`No skaile.yaml found`), or a `skaile.yaml` — project, app or user scope —\n * that does not parse (`<file> — parse error: …`, a duplicate key included). Without this a\n * broken file would read as \"nothing declared\" and `install` would undeploy every asset.\n *\n * Library-level commands (`library …`, `search`, `init`) have no project and do not call it.\n */\nexport function requireProjectConfig(\n projectDir: string,\n opts: { allowMissing?: boolean } = {},\n): void {\n const dir = path.resolve(projectDir);\n if (!existsSync(path.join(dir, SKAILE_YAML_DEFAULT))) {\n if (opts.allowMissing) return;\n logNoProject(dir);\n process.exit(1);\n }\n try {\n resolveSkWorkspaceConfig(dir);\n } catch (err) {\n logErr(err instanceof Error ? err.message : String(err));\n process.exit(1);\n }\n // A lock that is not valid YAML is not \"nothing locked\": `update` would overwrite it and\n // `outdated`/`why`/`check` would call every asset unlocked. One line, exit 1 (p1892).\n try {\n readLock(path.join(dir, \"skaile.lock.yaml\"));\n } catch (err) {\n if (err instanceof LockParseError) {\n logErr(err.message);\n process.exit(1);\n }\n // Another lock problem (an old schema) has its own message where the lock is used.\n }\n}\n\n/**\n * Hold warnings raised while a spinner animates and print them once it stops:\n * on a TTY a line written mid-spin is overwritten by the next frame. Pass\n * `push` as `AssetManager`'s `onLibraryCollision`, call `flush()` after\n * `spinner.stop(...)`. Warnings pushed after `flush()` print immediately.\n */\nexport function deferredWarnings(): { push: (msg: string) => void; flush: () => void } {\n const held: string[] = [];\n let live = false;\n return {\n push: (msg) => {\n if (live) logWarn(msg);\n else held.push(msg);\n },\n flush: () => {\n for (const msg of held.splice(0)) logWarn(msg);\n live = true;\n },\n };\n}\n\n/** Max stale copies of one harness named inline by {@link warnStaleHarnessCopies}. */\nconst STALE_COPY_LIST_MAX = 5;\n\n/**\n * Print one warning per harness whose project dir (`.claude/`, `.omp/`, `.codex/`) still holds\n * copies of tracked assets although the project deploys to another harness: after `skaile\n * harness set`, or when a project moved off the old default. Those copies are orphans: `remove`\n * / `clean` / `list` only look in the active harness dir. Every file a deploy created is named\n * (p1671). Nothing is deleted here; `skaile harness set <name> --clean` deletes them. Silent when\n * there are none.\n */\nexport function warnStaleHarnessCopies(am: {\n projectDir: string;\n harness: string;\n listStaleHarnessCopies(): Array<{ harness: HarnessName; path: string }>;\n}): void {\n let stale: Array<{ harness: HarnessName; path: string }>;\n try {\n stale = am.listStaleHarnessCopies();\n } catch {\n return; // advisory only — never fail the command\n }\n for (const harness of SUPPORTED_HARNESSES) {\n const rel = stale\n .filter((s) => s.harness === harness)\n .map((s) => path.relative(am.projectDir, s.path));\n if (rel.length === 0) continue;\n const dir = `${rel[0]?.split(path.sep)[0] ?? harness}/`;\n const shown = rel.slice(0, STALE_COPY_LIST_MAX).join(\", \");\n const more =\n rel.length > STALE_COPY_LIST_MAX ? `, +${rel.length - STALE_COPY_LIST_MAX} more` : \"\";\n logWarn(\n `Stale ${S.cmd(dir)} copies no longer managed (deploying to ${am.harness}): ${shown}${more}. ` +\n `Delete them with ${S.cmd(`skaile harness set ${am.harness} --clean`)}, or pass ${S.cmd(`--target ${harness}`)} to keep using ${dir}.`,\n );\n }\n}\n\n/**\n * Bare asset name of a canonical soft-dep target ref (`@pub/name@ver` → `name`),\n * for compact rendering in `info` / `tree` / `why`. Delegates to the asset-manager\n * parser (the soft-dep read surface) so the two never diverge.\n */\nexport function bareSoftDepName(ref: string): string {\n return softDepName(ref);\n}\n\n/**\n * The report-only soft-dep hint line shared by the `add` no-TTY branch and the\n * `install` surface, so the two user-facing wordings can't drift. Appends a\n * runnable `skaile add` suffix only when the target has a parseable ref.\n */\nexport function formatSoftDepHint(edge: { from: string; to: string; toRef?: string }): string {\n const suffix = edge.toRef ? ` — run \\`skaile add ${edge.toRef}\\` to include it.` : \"\";\n return `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${suffix}`;\n}\n\n/**\n * Build the \"Soft dependencies (inferred)\" section for `skaile info`. Returns one\n * header line plus one line per soft-dep target, each marked `(soft)` to read\n * differently from a typed `requires`. Empty array when there are no soft deps,\n * so the caller prints nothing.\n */\nexport function formatSoftDepSection(targets: string[]): string[] {\n if (targets.length === 0) return [];\n const out = [` ${S.label(\"Soft dependencies (inferred)\")}:`];\n for (const t of targets) out.push(` ${S.dim(\"·\")} ${t} ${S.dim(\"(soft)\")}`);\n return out;\n}\n\n/**\n * Footer line previewing the soft deps that *adding* the highlighted asset would\n * reference (manage TUI). \"references\" + \"not auto-added\" makes clear the pull is\n * report-only. Empty string when there are no targets, so the caller clears.\n */\nexport function formatSoftDepAddPreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`${name} references ${targets.join(\", \")} (soft dep, not auto-added)`);\n}\n\n/**\n * Footer line previewing the soft deps that *removing* the highlighted asset\n * would orphan (manage TUI) — symmetric with {@link formatSoftDepAddPreview}.\n * Empty string when nothing would be orphaned, so the caller clears.\n */\nexport function formatSoftDepRemovePreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`removing ${name} would orphan ${targets.join(\", \")} (soft dep)`);\n}\n\n/** Format a Date as a human-readable relative time string (e.g. \"5m ago\"). */\nexport function formatRelativeTime(date: Date): string {\n const diff = Date.now() - date.getTime();\n const seconds = Math.floor(diff / 1000);\n if (seconds < 60) return \"just now\";\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.floor(hours / 24);\n return `${days}d ago`;\n}\n\n/** Name the old `~/.omp/<dir>` copies a global deploy replaced (omp reads `~/.omp/agent/<dir>`). */\nexport function reportLegacyOmpCopies(removed: string[], kept: string[] = []): void {\n for (const p of removed) {\n logInfo(\n S.dim(`removed the old omp copy ${p.replace(homedir(), \"~\")} (omp reads ~/.omp/agent)`),\n );\n }\n for (const p of kept) {\n logWarn(\n `${p.replace(homedir(), \"~\")} is an old omp location and skaile did not write this copy, so it was kept: delete it if you do not need it`,\n );\n }\n}\n\n/**\n * Parse a `--harness a,b` value into validated {@link HarnessName}s, exiting on\n * an unknown id. Returns `undefined` when the flag is absent (the caller then\n * resolves the full global harness set).\n */\nexport function parseHarnessFilter(raw: string | undefined): HarnessName[] | undefined {\n if (!raw) return undefined;\n const ids = raw\n .split(\",\")\n .map((s) => s.trim())\n .filter(Boolean);\n const out: HarnessName[] = [];\n for (const id of ids) {\n if (!(SUPPORTED_HARNESSES as string[]).includes(id)) {\n logErr(unknownHarnessTargetMessage(id));\n process.exit(1);\n }\n out.push(id as HarnessName);\n }\n return out.length > 0 ? out : undefined;\n}\n\n/** The sentence the agent renderer puts into a delegate sub-agent's file (`asset-manager` fragments). */\nconst SUB_AGENT_MARKER = \"You are a sub-agent:\";\n\n/**\n * One line when a Codex project holds delegate sub-agents. Codex does not load\n * `.codex/agents/*.toml` as spawnable agents (its `spawn_agent` has no `agent_type`), so the\n * delegate exists only as a file there and the orchestrator cannot call it (p428). A delegate is\n * found by the sentence the renderer writes into its file. Silent for every other harness.\n */\nexport function warnFilesOnlyDelegates(projectDir: string, target: string): void {\n if (target !== \"codex\") return;\n const dir = path.join(projectDir, \".codex\", \"skaile-agents\");\n let names: string[];\n try {\n names = readdirSync(dir).filter((f) => f.endsWith(\".md\"));\n } catch {\n return;\n }\n const delegates = names\n .filter((f) => {\n try {\n return readFileSync(path.join(dir, f), \"utf8\").includes(SUB_AGENT_MARKER);\n } catch {\n return false;\n }\n })\n .map((f) => f.replace(/\\.md$/, \"\"))\n .sort();\n if (delegates.length === 0) return;\n logWarn(\n `codex: delegate agents are files only (${delegates.join(\", \")}): Codex does not load .codex/agents as sub-agents, so the orchestrator cannot call them`,\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../cli/src/harness-error.ts","../cli/src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;AAWO,SAAS,sBAAs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";\nimport { Option } from \"commander\";\n\n/**\n * The refusal for a harness name nothing registers, or `undefined` when it is known. One check\n * for `run` (also with `--dry-run`, so the plan never names a harness the real run refuses),\n * `repl` and `config set harness` (p1022). Load the project's plugins first: a plugin's harness\n * counts. The line names the other command group's names too (p1753), see\n * {@link unknownHarnessTargetMessage}.\n */\nexport function unknownHarnessMessage(harness: string): string | undefined {\n const known = listHarnesses().map((d) => d.id);\n if (known.includes(harness)) return undefined;\n return (\n `Unknown agent harness: \"${harness}\". Available: ${known.join(\", \")}. ` +\n `${DEPLOY_COMMANDS} take: ${SUPPORTED_HARNESSES.join(\", \")}.`\n );\n}\n\n/** The commands that write harness files, so they take the harness targets only. */\nconst DEPLOY_COMMANDS = \"harness set, init --harness and add --harness\";\n\n/**\n * The refusal for a name that is no harness target, for the commands that deploy files\n * (`harness set`, `init --harness`, `add --harness`, `integration --harness`). Same wording as\n * {@link unknownHarnessMessage}: the list is the targets, and the line names the commands that\n * run a session and take every registered harness (p1753).\n *\n * @param harness - The name the user typed.\n * @param extra - Further names the command takes, such as `all`.\n */\nexport function unknownHarnessTargetMessage(\n harness: string,\n extra: readonly string[] = [],\n): string {\n const targets = [...SUPPORTED_HARNESSES, ...extra];\n const registered = listHarnesses().map((d) => d.id);\n return (\n `Unknown agent harness: \"${harness}\". Available: ${targets.join(\", \")}. ` +\n `run, repl and config set harness take: ${registered.join(\", \")}.`\n );\n}\n\nlet warnedDriverFlag = false;\n\n/** Print the `--driver` deprecation line to stderr, once per process. */\nexport function warnDriverFlagDeprecated(): void {\n if (warnedDriverFlag) return;\n warnedDriverFlag = true;\n console.error(\"--driver is deprecated; use --harness\");\n}\n\n/**\n * The hidden `--driver <name>` option every command with `--harness <name>` keeps for one\n * major release: an alias that sets the same value (`--harness` wins when both are given).\n */\nexport function driverAliasOption(): Option {\n return new Option(\"--driver <name>\", \"Deprecated alias of --harness\").hideHelp();\n}\n\n/**\n * Fold a parsed `--driver` alias into `harness`: when `--driver` was given, print the\n * deprecation line once and use its value unless `--harness` (or `fallback`, when neither\n * flag was given) already decided. Returns `opts` with `harness` set and `driver` removed.\n */\nexport function foldDriverFlag<T extends { harness?: string; driver?: string }>(\n opts: T,\n fallback?: string,\n): Omit<T, \"driver\"> & { harness?: string } {\n const { driver, ...rest } = opts;\n if (driver !== undefined) warnDriverFlagDeprecated();\n return { ...rest, harness: rest.harness ?? driver ?? fallback };\n}\n\n/**\n * Turn a harness-start/prompt failure into a friendly, actionable message when the\n * cause is a missing/unusable agent binary; otherwise return `null` so the caller\n * surfaces the raw error unchanged.\n *\n * The bridge classifies these as `category: \"config\"` and carries a `hint`, but the\n * shape reaching the CLI varies: omp's `start()` rejects with the raw spawn error\n * (`code === \"ENOENT\"`), while the subprocess CLI harnesses reject with the classified\n * `AgentError` attached under `.detail`. Duck-type across all of them.\n */\nexport function friendlyHarnessError(err: unknown): string | null {\n const e = err as\n | {\n code?: string;\n syscall?: string;\n message?: string;\n category?: string;\n hint?: string;\n detail?: { category?: string; hint?: string };\n }\n | null\n | undefined;\n if (!e) return null;\n\n // A missing binary is a *spawn* ENOENT (`syscall: \"spawn <bin>\"` / \"spawn … ENOENT\");\n // a bare ENOENT from connector/mount setup is a different failure, not the harness.\n const isSpawnEnoent =\n e.code === \"ENOENT\" &&\n (e.syscall?.startsWith(\"spawn\") === true || /^spawn .*ENOENT/.test(e.message ?? \"\"));\n const isConfig = e.category === \"config\" || e.detail?.category === \"config\";\n if (!isSpawnEnoent && !isConfig) return null;\n\n const hint = e.hint ?? e.detail?.hint;\n const base = hint ?? \"The configured agent binary is not installed or not on your PATH.\";\n return `${base}\\nTry a different harness with \\`--harness claude-sdk\\`.`;\n}\n\n/**\n * Lines that follow the single `✗` line of a failed turn: the classifier's hint\n * (or, for a rejected credential, a pointer at the key), and where the full\n * records are. The JSON records themselves are not printed on the terminal:\n * they live in the project's log database. The pointer names the session whose records\n * the failure left (`logSessionId`); a failure before any session started has none and\n * gets no pointer.\n */\nexport function harnessErrorNotes(err: unknown): string[] {\n const e = err as\n | {\n category?: string;\n hint?: string;\n logSessionId?: string;\n detail?: { category?: string; hint?: string };\n }\n | null\n | undefined;\n const notes: string[] = [];\n const category = e?.category ?? e?.detail?.category;\n const hint = e?.hint ?? e?.detail?.hint;\n if (hint && category !== \"config\") notes.push(hint);\n else if (category === \"auth\") notes.push(\"Check your API key or login.\");\n if (e?.logSessionId) {\n notes.push(`Full records: .skaile/logs.db (skaile session logs ${e.logSessionId}).`);\n }\n return notes;\n}\n","import { existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport path from \"node:path\";\nimport { softDepName } from \"@skaile/workspaces/asset-manager\";\nimport {\n type HarnessName,\n LockParseError,\n readLock,\n resolveSkWorkspaceConfig,\n SKAILE_YAML_DEFAULT,\n SUPPORTED_HARNESSES,\n} from \"@skaile/workspaces/core\";\nimport pc from \"picocolors\";\nimport { unknownHarnessTargetMessage } from \"./harness-error.ts\";\n\n/**\n * Terminal styling helpers used across all CLI commands.\n *\n * @docLink cli/dev-guide#helpers\n */\nexport const S = {\n brand: (s: string) => pc.cyan(pc.bold(s)),\n cmd: (s: string) => pc.cyan(s),\n heading: (s: string) => pc.bold(s),\n bold: (s: string) => pc.bold(s),\n dim: (s: string) => pc.dim(s),\n ok: (s: string) => pc.green(s),\n warn: (s: string) => pc.yellow(s),\n err: (s: string) => pc.red(s),\n label: (s: string) => pc.dim(s),\n rule: (w = 40) => pc.dim(\"─\".repeat(w)),\n};\n\nconst KIND_COLORS: Record<string, (s: string) => string> = {\n skill: pc.blue,\n agent: pc.magenta,\n prompt: pc.yellow,\n flow: pc.green,\n preset: pc.cyan,\n contract: pc.red,\n connector: pc.green,\n knowledge: pc.cyan,\n persona: pc.cyan,\n ruleset: pc.cyan,\n \"mcp-server\": pc.magenta,\n};\n\n/**\n * Fit a plain (ANSI-free) string into exactly `width` columns: truncate with a\n * trailing `…` when too long, pad with spaces when too short. Keeps fixed-width\n * columns from overflowing the row when a value (e.g. an asset name) is wider\n * than its budget.\n */\nexport function fitWidth(s: string, width: number): string {\n if (width <= 0) return \"\";\n if (s.length > width) return width === 1 ? \"…\" : `${s.slice(0, width - 1)}…`;\n return s.padEnd(width);\n}\n\n/** Color-code an asset kind string. */\nexport function kindColor(kind: string): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(kind);\n}\n\n/**\n * Widest kind label (`mcp-server`); the default kind-column width fits it so\n * long kinds don't shove the rest of the row out of alignment.\n */\nexport const KIND_COL_WIDTH = 10;\n\n/**\n * Shared `--target` help suffix: with no flag, the manager deploys into the\n * harness the project is configured for (the harness `skaile config show`\n * resolves), and only then falls back to `claude-code`.\n */\nexport const TARGET_DEFAULT_HINT = \"default: the project's configured harness, else claude-code\";\n\n/**\n * Color-code an asset kind string fit to exactly `width` columns — pads short\n * kinds, truncates over-long ones (via {@link fitWidth}) so the column can never\n * overflow and break row alignment.\n */\nexport function kindColorPad(kind: string, width = KIND_COL_WIDTH): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(fitWidth(kind, width));\n}\n\n/** Color-code a \"kind:name\" reference string. */\nexport function colorRef(ref: string): string {\n const colonIdx = ref.indexOf(\":\");\n if (colonIdx === -1) return ref;\n const kind = ref.slice(0, colonIdx);\n const rest = ref.slice(colonIdx);\n return `${kindColor(kind)}${rest}`;\n}\n\n/**\n * Print a success line prefixed with a green check mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logOk(msg: string) {\n console.log(` ${pc.green(\"✓\")} ${msg}`);\n}\n/**\n * Print an error line prefixed with a red cross to stderr.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logErr(msg: string) {\n console.error(` ${pc.red(\"✗\")} ${msg}`);\n}\n/**\n * Print a warning line prefixed with a yellow exclamation mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logWarn(msg: string) {\n console.log(` ${pc.yellow(\"!\")} ${msg}`);\n}\n/**\n * Like {@link logWarn}, on stderr: a warning about the run itself (an asset scan that stopped\n * early) that must not land in the output a script reads from stdout.\n *\n * @param msg - Message to display.\n */\nexport function logWarnErr(msg: string) {\n console.error(` ${pc.yellow(\"!\")} ${msg}`);\n}\n/**\n * One `!` line per deployed library asset whose body or description is still the untouched\n * `library create` scaffold: `validate` and the publish plan fail both, so `add`, `install` and\n * `update` name every placeholder they fail (p926).\n *\n * @param bodies - Canonical refs the asset manager reported as placeholder bodies.\n * @param descriptions - Canonical refs the asset manager reported as placeholder descriptions.\n */\nexport function warnPlaceholderBodies(\n bodies: readonly string[] | undefined,\n descriptions?: readonly string[],\n) {\n const refs = [...new Set([...(bodies ?? []), ...(descriptions ?? [])])];\n for (const ref of refs) {\n const parts = [\n ...(descriptions?.includes(ref) ? [\"description\"] : []),\n ...(bodies?.includes(ref) ? [\"body\"] : []),\n ];\n const both = parts.length > 1;\n logWarn(\n `${ref} ${parts.join(\" and \")} ${both ? \"are\" : \"is\"} still the scaffold placeholder; write ${both ? \"them\" : \"it\"} (\\`skaile validate\\` fails ${both ? \"them\" : \"it\"})`,\n );\n }\n}\n/**\n * Print an info line prefixed with a dim dot.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logInfo(msg: string) {\n console.log(` ${pc.dim(\"·\")} ${msg}`);\n}\n\n/** Full command path of the command being run (`harness set`), set before its action runs. */\nlet activeCommandPath: string | undefined;\n\n/**\n * Record the command that is about to run, as the path of subcommand names from the root\n * (`harness set`), so advice that repeats the command shows the whole path (p1656).\n */\nexport function setActiveCommand(cmd: { name(): string; parent: unknown }): void {\n const names: string[] = [];\n for (\n let c: { name(): string; parent: unknown } | null = cmd;\n c && c.parent;\n c = c.parent as { name(): string; parent: unknown } | null\n ) {\n names.unshift(c.name());\n }\n activeCommandPath = names.length > 0 ? names.join(\" \") : undefined;\n}\n\n/** The nearest parent directory of `dir` that holds a `skaile.yaml`, or `undefined`. */\nfunction nearestParentProject(dir: string): string | undefined {\n for (let up = path.dirname(dir); up !== dir; dir = up, up = path.dirname(dir)) {\n if (existsSync(path.join(up, SKAILE_YAML_DEFAULT))) return up;\n }\n return undefined;\n}\n\n/**\n * Print the `No skaile.yaml found` line for `projectDir`, plus a second line naming the nearest\n * parent directory that holds a `skaile.yaml`, when there is one: skaile does not search parent\n * directories. The line shows `--project-dir` after the full command path (`skaile harness set\n * --project-dir /x`), the only place the option is accepted (p1656).\n */\nexport function logNoProject(projectDir: string): void {\n const dir = path.resolve(projectDir);\n logErr(`No ${S.cmd(\"skaile.yaml\")} found. Run ${S.cmd(\"skaile init\")} to create one.`);\n const parent = nearestParentProject(dir);\n if (parent) {\n const command =\n activeCommandPath ?? process.argv.slice(2).find((a) => !a.startsWith(\"-\")) ?? \"<command>\";\n logErr(\n `${S.cmd(parent)} holds a ${S.cmd(\"skaile.yaml\")}: run from there or put the option after the command name: ${S.cmd(`skaile ${command} --project-dir ${parent}`)}.`,\n );\n }\n}\n\n/**\n * Stop a project command that has no usable project: print one `✗` line and exit 1, before\n * the command deploys, undeploys, locks or clones anything. Two causes: no `skaile.yaml` in\n * `projectDir` (`No skaile.yaml found`), or a `skaile.yaml` — project, app or user scope —\n * that does not parse (`<file> — parse error: …`, a duplicate key included). Without this a\n * broken file would read as \"nothing declared\" and `install` would undeploy every asset.\n *\n * Library-level commands (`library …`, `search`, `init`) have no project and do not call it.\n */\nexport function requireProjectConfig(\n projectDir: string,\n opts: { allowMissing?: boolean } = {},\n): void {\n const dir = path.resolve(projectDir);\n if (!existsSync(path.join(dir, SKAILE_YAML_DEFAULT))) {\n if (opts.allowMissing) return;\n logNoProject(dir);\n process.exit(1);\n }\n try {\n resolveSkWorkspaceConfig(dir);\n } catch (err) {\n logErr(err instanceof Error ? err.message : String(err));\n process.exit(1);\n }\n // A lock that is not valid YAML is not \"nothing locked\": `update` would overwrite it and\n // `outdated`/`why`/`check` would call every asset unlocked. One line, exit 1 (p1892).\n try {\n readLock(path.join(dir, \"skaile.lock.yaml\"));\n } catch (err) {\n if (err instanceof LockParseError) {\n logErr(err.message);\n process.exit(1);\n }\n // Another lock problem (an old schema) has its own message where the lock is used.\n }\n}\n\n/**\n * Hold warnings raised while a spinner animates and print them once it stops:\n * on a TTY a line written mid-spin is overwritten by the next frame. Pass\n * `push` as `AssetManager`'s `onLibraryCollision`, call `flush()` after\n * `spinner.stop(...)`. Warnings pushed after `flush()` print immediately.\n */\nexport function deferredWarnings(): { push: (msg: string) => void; flush: () => void } {\n const held: string[] = [];\n let live = false;\n return {\n push: (msg) => {\n if (live) logWarn(msg);\n else held.push(msg);\n },\n flush: () => {\n for (const msg of held.splice(0)) logWarn(msg);\n live = true;\n },\n };\n}\n\n/** Max stale copies of one harness named inline by {@link warnStaleHarnessCopies}. */\nconst STALE_COPY_LIST_MAX = 5;\n\n/**\n * Print one warning per harness whose project dir (`.claude/`, `.omp/`, `.codex/`) still holds\n * copies of tracked assets although the project deploys to another harness: after `skaile\n * harness set`, or when a project moved off the old default. Those copies are orphans: `remove`\n * / `clean` / `list` only look in the active harness dir. Every file a deploy created is named\n * (p1671). Nothing is deleted here; `skaile harness set <name> --clean` deletes them. Silent when\n * there are none.\n */\nexport function warnStaleHarnessCopies(am: {\n projectDir: string;\n harness: string;\n listStaleHarnessCopies(): Array<{ harness: HarnessName; path: string }>;\n}): void {\n let stale: Array<{ harness: HarnessName; path: string }>;\n try {\n stale = am.listStaleHarnessCopies();\n } catch {\n return; // advisory only — never fail the command\n }\n for (const harness of SUPPORTED_HARNESSES) {\n const rel = stale\n .filter((s) => s.harness === harness)\n .map((s) => path.relative(am.projectDir, s.path));\n if (rel.length === 0) continue;\n const dir = `${rel[0]?.split(path.sep)[0] ?? harness}/`;\n const shown = rel.slice(0, STALE_COPY_LIST_MAX).join(\", \");\n const more =\n rel.length > STALE_COPY_LIST_MAX ? `, +${rel.length - STALE_COPY_LIST_MAX} more` : \"\";\n logWarn(\n `Stale ${S.cmd(dir)} copies no longer managed (deploying to ${am.harness}): ${shown}${more}. ` +\n `Delete them with ${S.cmd(`skaile harness set ${am.harness} --clean`)}, or pass ${S.cmd(`--target ${harness}`)} to keep using ${dir}.`,\n );\n }\n}\n\n/**\n * Bare asset name of a canonical soft-dep target ref (`@pub/name@ver` → `name`),\n * for compact rendering in `info` / `tree` / `why`. Delegates to the asset-manager\n * parser (the soft-dep read surface) so the two never diverge.\n */\nexport function bareSoftDepName(ref: string): string {\n return softDepName(ref);\n}\n\n/**\n * The report-only soft-dep hint line shared by the `add` no-TTY branch and the\n * `install` surface, so the two user-facing wordings can't drift. Appends a\n * runnable `skaile add` suffix only when the target has a parseable ref.\n */\nexport function formatSoftDepHint(edge: { from: string; to: string; toRef?: string }): string {\n const suffix = edge.toRef ? ` — run \\`skaile add ${edge.toRef}\\` to include it.` : \"\";\n return `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${suffix}`;\n}\n\n/**\n * Build the \"Soft dependencies (inferred)\" section for `skaile info`. Returns one\n * header line plus one line per soft-dep target, each marked `(soft)` to read\n * differently from a typed `requires`. Empty array when there are no soft deps,\n * so the caller prints nothing.\n */\nexport function formatSoftDepSection(targets: string[]): string[] {\n if (targets.length === 0) return [];\n const out = [` ${S.label(\"Soft dependencies (inferred)\")}:`];\n for (const t of targets) out.push(` ${S.dim(\"·\")} ${t} ${S.dim(\"(soft)\")}`);\n return out;\n}\n\n/**\n * Footer line previewing the soft deps that *adding* the highlighted asset would\n * reference (manage TUI). \"references\" + \"not auto-added\" makes clear the pull is\n * report-only. Empty string when there are no targets, so the caller clears.\n */\nexport function formatSoftDepAddPreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`${name} references ${targets.join(\", \")} (soft dep, not auto-added)`);\n}\n\n/**\n * Footer line previewing the soft deps that *removing* the highlighted asset\n * would orphan (manage TUI) — symmetric with {@link formatSoftDepAddPreview}.\n * Empty string when nothing would be orphaned, so the caller clears.\n */\nexport function formatSoftDepRemovePreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`removing ${name} would orphan ${targets.join(\", \")} (soft dep)`);\n}\n\n/** Format a Date as a human-readable relative time string (e.g. \"5m ago\"). */\nexport function formatRelativeTime(date: Date): string {\n const diff = Date.now() - date.getTime();\n const seconds = Math.floor(diff / 1000);\n if (seconds < 60) return \"just now\";\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.floor(hours / 24);\n return `${days}d ago`;\n}\n\n/** Name the old `~/.omp/<dir>` copies a global deploy replaced (omp reads `~/.omp/agent/<dir>`). */\nexport function reportLegacyOmpCopies(removed: string[], kept: string[] = []): void {\n for (const p of removed) {\n logInfo(\n S.dim(`removed the old omp copy ${p.replace(homedir(), \"~\")} (omp reads ~/.omp/agent)`),\n );\n }\n for (const p of kept) {\n logWarn(\n `${p.replace(homedir(), \"~\")} is an old omp location and skaile did not write this copy, so it was kept: delete it if you do not need it`,\n );\n }\n}\n\n/**\n * Parse a `--harness a,b` value into validated {@link HarnessName}s, exiting on\n * an unknown id. Returns `undefined` when the flag is absent (the caller then\n * resolves the full global harness set).\n */\nexport function parseHarnessFilter(raw: string | undefined): HarnessName[] | undefined {\n if (!raw) return undefined;\n const ids = raw\n .split(\",\")\n .map((s) => s.trim())\n .filter(Boolean);\n const out: HarnessName[] = [];\n for (const id of ids) {\n if (!(SUPPORTED_HARNESSES as string[]).includes(id)) {\n logErr(unknownHarnessTargetMessage(id));\n process.exit(1);\n }\n out.push(id as HarnessName);\n }\n return out.length > 0 ? out : undefined;\n}\n\n/** The sentence the agent renderer puts into a delegate sub-agent's file (`asset-manager` fragments). */\nconst SUB_AGENT_MARKER = \"You are a sub-agent:\";\n\n/**\n * One line when a Codex project holds delegate sub-agents. Codex does not load\n * `.codex/agents/*.toml` as spawnable agents (its `spawn_agent` has no `agent_type`), so the\n * delegate exists only as a file there and the orchestrator cannot call it (p428). A delegate is\n * found by the sentence the renderer writes into its file. Silent for every other harness.\n */\nexport function warnFilesOnlyDelegates(projectDir: string, target: string): void {\n if (target !== \"codex\") return;\n const dir = path.join(projectDir, \".codex\", \"skaile-agents\");\n let names: string[];\n try {\n names = readdirSync(dir).filter((f) => f.endsWith(\".md\"));\n } catch {\n return;\n }\n const delegates = names\n .filter((f) => {\n try {\n return readFileSync(path.join(dir, f), \"utf8\").includes(SUB_AGENT_MARKER);\n } catch {\n return false;\n }\n })\n .map((f) => f.replace(/\\.md$/, \"\"))\n .sort();\n if (delegates.length === 0) return;\n logWarn(\n `codex: delegate agents are files only (${delegates.join(\", \")}): Codex does not load .codex/agents as sub-agents, so the orchestrator cannot call them`,\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { err, okJson, ok } from './chunk-3MWQKQUB.js';
|
|
2
|
-
import { buildConnectorListPayload } from './chunk-
|
|
2
|
+
import { buildConnectorListPayload } from './chunk-LX4TTTRR.js';
|
|
3
3
|
import { readFile } from 'fs/promises';
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
|
|
@@ -117,5 +117,5 @@ async function connectorDescribe(manager, id) {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export { connectorDescribe, connectorExec, connectorList, connectorLoadSkill, connectorRead, connectorSearch, connectorWrite, mountList, mountRead, mountStatus, mountSync };
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-L7QOZG5V.js.map
|
|
121
|
+
//# sourceMappingURL=chunk-L7QOZG5V.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../workspace-plugin/src/tools/connectors.ts"],"names":[],"mappings":";;;;;AAwBA,SAAS,cAAc,OAAA,EAAiD;AACtE,EAAA,OAAO,OAAA,CACJ,gBAAe,CACf,MAAA,CAAO,CAAC,CAAA,KAA+B,OAAO,CAAA,CAAE,SAAA,KAA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B,IAAA,OAAO,IAAI,CAAA,YAAa,KAAA,GAAQ,EAAE,OAAA,GAAU,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EACvD;AACF;AAcA,eAAsB,iBAAA,CACpB,SACA,EAAA,EACqB;AACrB,EAAA,IAAI,CAAC,OAAA,EAAS,OAAO,GAAA,CAAI,yCAAyC,CAAA;AAClE,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,QAAQ,UAAA,EAAW;AAClC,IAAA,MAAM,aAAa,MAAA,CAAO,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,OAAO,EAAE,CAAA;AACjD,IAAA,IAAI,CAAC,UAAA,EAAY,OAAO,GAAA,CAAI,CAAA,mCAAA,EAAsC,EAAE,CAAA,CAAA,CAAG,CAAA;AACvE,IAAA,OAAO,OAAO,UAAU,CAAA;AAAA,EAC1B,SAAS,CAAA,EAAY;AACnB,IAAA,OAAO,IAAI,CAAA,YAAa,KAAA,GAAQ,EAAE,OAAA,GAAU,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EACvD;AACF","file":"chunk-7I5PNB2G.js","sourcesContent":["// src/tools/connectors.ts\nimport { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { buildConnectorListPayload, type ConnectorManager } from \"@skaile/workspaces/connectors\";\nimport type { ToolResult } from \"../types.js\";\nimport { err, ok, okJson } from \"../types.js\";\n\n// ── Mountable-connector helpers ──────────────────────────────────────────────\n//\n// The unified ConnectorManager owns mountable (filesystem-face) connectors too.\n// A connector is mountable when its `listConnectors()` summary carries a\n// `mountPath`. The `mount*` helpers below project that subset for the legacy\n// `mount_*` tool surface.\n\n/**\n * A connector summary that carries a projected filesystem path. Unlike the raw\n * `listConnectors()` summary, `mountPath` is non-optional here — `listMountable()`\n * runtime-filters to exactly those entries before narrowing to this type.\n */\ntype MountableConnector = ReturnType<ConnectorManager[\"listConnectors\"]>[number] & {\n mountPath: string;\n};\n\n/** Return the mountable (filesystem-face) connectors from a manager. */\nfunction listMountable(manager: ConnectorManager): MountableConnector[] {\n return manager\n .listConnectors()\n .filter((c): c is MountableConnector => typeof c.mountPath === \"string\");\n}\n\n/**\n * A mountable connector as reported to the agent, with an optional `reason`.\n *\n * A fleet-managed mount whose path is gone reports `status: \"error\"` plus a\n * `reason`, even though the connector handle still reads `connected`. One whose\n * probe timed out keeps its cached status and gains a `reason` saying it is\n * unverified: a slow cloud mount is not reported dead.\n */\ntype MountView = MountableConnector & { reason?: string };\n\n/** Overlay a live re-check on the cached connect-time status where one applies. */\nasync function withLiveness(\n manager: ConnectorManager,\n mount: MountableConnector,\n): Promise<MountView> {\n // Optional call: the tool tests' manager doubles omit the method.\n const liveness = await manager.checkMountLiveness?.(mount.id);\n if (!liveness || liveness.state === \"live\") return mount;\n if (liveness.state === \"dead\") return { ...mount, status: \"error\", reason: liveness.reason };\n return { ...mount, reason: liveness.reason };\n}\n\n/**\n * List all mountable (filesystem-face) connectors declared in `skaile.yaml`\n * with their current mount status.\n *\n * @param manager - Active `ConnectorManager` or `null` when not configured.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountList(manager: ConnectorManager | null): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n return okJson(await Promise.all(listMountable(manager).map((m) => withLiveness(manager, m))));\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Sync a mountable connector — pull the latest content from its remote source.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param mountId - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountSync(\n manager: ConnectorManager | null,\n mountId: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const result = await manager.sync(mountId);\n return okJson(result);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Get the current status and metadata for a single mountable connector.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param mountId - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountStatus(\n manager: ConnectorManager | null,\n mountId: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const mount = listMountable(manager).find((v) => v.id === mountId);\n if (!mount) return err(`Mount not found: \"${mountId}\"`);\n return okJson(await withLiveness(manager, mount));\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Read a file from within a mountable connector's projected directory by its\n * relative path.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param mountId - Connector ID declared in `skaile.yaml`.\n * @param filePath - Relative path within the projected mount directory.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountRead(\n manager: ConnectorManager | null,\n mountId: string,\n filePath: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const mount = listMountable(manager).find((v) => v.id === mountId);\n if (!mount) return err(`Mount not found: \"${mountId}\"`);\n const content = await readFile(join(mount.mountPath, filePath), \"utf-8\");\n return ok(content);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * List all connectors registered with the `ConnectorManager`.\n *\n * Returns `{ connected, failed }` — `connected` from `manager.listConnectors()`,\n * `failed` from `manager.listFailedConnectors()`. A connector that threw during\n * `connect()` never enters the active map, so it is absent from the first list\n * entirely; without the second one an agent driven through MCP or OMP has no\n * way to learn that a mount it is about to write into is dead. Returns an error\n * result when no manager is configured (i.e. `skaile.yaml` has no `connectors`\n * section).\n *\n * @param manager - Active `ConnectorManager` or `null` when not configured.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorList(manager: ConnectorManager | null): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n // Same payload as the Claude SDK tool: per-mount health and a notice when one is not ok.\n return okJson(await buildConnectorListPayload(manager));\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Read content from a connector at the given path.\n *\n * Delegates to `manager.read(id, path)`. Returns an error result when the\n * path yields `null` (not found) or the manager is absent.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param path - Resource path within the connector (connector-specific format).\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorRead(\n manager: ConnectorManager | null,\n id: string,\n path: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const content = await manager.read(id, path);\n if (content === null) return err(`No content at path \"${path}\" in connector \"${id}\"`);\n return okJson(content);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Write string content to a connector at the given path.\n *\n * Delegates to `manager.write(id, path, { data: content })`.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param path - Destination path within the connector.\n * @param content - String payload to write.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorWrite(\n manager: ConnectorManager | null,\n id: string,\n path: string,\n content: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n await manager.write(id, path, { data: content });\n return ok(`Written to \"${path}\" in connector \"${id}\"`);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Search a connector's data using a query string.\n *\n * Delegates to `manager.search(id, query)` and returns the result set as JSON.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param query - Free-text or structured query (connector-specific format).\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorSearch(\n manager: ConnectorManager | null,\n id: string,\n query: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const results = await manager.search(id, query);\n return okJson(results);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Execute a named operation on a connector.\n *\n * Delegates to `manager.executeOp(id, operation, args)`. Operations and\n * their argument shapes are connector-specific; use {@link connectorDescribe}\n * to discover what operations a connector supports.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param operation - Operation name (from the connector's `RuntimeSkillDescriptor`).\n * @param args - Named arguments for the operation.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorExec(\n manager: ConnectorManager | null,\n id: string,\n operation: string,\n args: Record<string, unknown>,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const result = await manager.executeOp(id, operation, args);\n return ok(result);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Load the rendered skill body for a connector.\n *\n * Delegates to `manager.loadSkill(id)` and returns the skill content as\n * plain text. Useful when the agent needs the connector's operations and\n * usage instructions injected as prompt context.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorLoadSkill(\n manager: ConnectorManager | null,\n id: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const skill = manager.loadSkill(id);\n return ok(skill);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Describe a connector's capabilities via its `RuntimeSkillDescriptor`.\n *\n * Finds the matching skill descriptor from `manager.listSkills()` and returns\n * it as JSON. The descriptor includes the connector's operations, argument\n * shapes, and usage instructions.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorDescribe(\n manager: ConnectorManager | null,\n id: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const skills = manager.listSkills();\n const descriptor = skills.find((s) => s.id === id);\n if (!descriptor) return err(`No skill descriptor for connector \"${id}\"`);\n return okJson(descriptor);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../workspace-plugin/src/tools/connectors.ts"],"names":[],"mappings":";;;;;AAwBA,SAAS,cAAc,OAAA,EAAiD;AACtE,EAAA,OAAO,OAAA,CACJ,gBAAe,CACf,MAAA,CAAO,CAAC,CAAA,KAA+B,OAAO,CAAA,CAAE,SAAA,KAAc,QAAQ,CAAA;AAC3E;AAaA,eAAe,YAAA,CACb,SACA,KAAA,EACoB;AAEpB,EAAA,MAAM,QAAA,GAAW,MAAM,OAAA,CAAQ,kBAAA,GAAqB,MAAM,EAAE,CAAA;AAC5D,EAAA,IAAI,CAAC,QAAA,IAAY,QAAA,CAAS,KAAA,KAAU,QAAQ,OAAO,KAAA;AACnD,EAAA,IAAI,QAAA,CAAS,KAAA,KAAU,MAAA,EAAQ,OAAO,EAAE,GAAG,KAAA,EAAO,MAAA,EAAQ,OAAA,EAAS,MAAA,EAAQ,QAAA,CAAS,MAAA,EAAO;AAC3F,EAAA,OAAO,EAAE,GAAG,KAAA,EAAO,MAAA,EAAQ,SAAS,MAAA,EAAO;AAC7C;AAUA,eAAsB,UAAU,OAAA,EAAuD;AACrF,EAAA,IAAI,CAAC,OAAA,EAAS,OAAO,GAAA,CAAI,yCAAyC,CAAA;AAClE,EAAA,IAAI;AACF,IAAA,OAAO,MAAA,CAAO,MAAM,OAAA,CAAQ,GAAA,CAAI,cAAc,OAAO,CAAA,CAAE,GAAA,CAAI,CAAC,MAAM,YAAA,CAAa,OAAA,EAAS,CAAC,CAAC,CAAC,CAAC,CAAA;AAAA,EAC9F,SAAS,CAAA,EAAY;AACnB,IAAA,OAAO,IAAI,CAAA,YAAa,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AG,MAAM,CAAA;AAAA,EAClB,SAAS,CAAA,EAAY;AACnB,IAAA,OAAO,IAAI,CAAA,YAAa,KAAA,GAAQ,EAAE,OAAA,GAAU,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EACvD;AACF;AAcA,eAAsB,kBAAA,CACpB,SACA,EAAA,EACqB;AACrB,EAAA,IAAI,CAAC,OAAA,EAAS,OAAO,GAAA,CAAI,yCAAyC,CAAA;AAClE,EAAA,IAAI;AACF,IAAA,MAAM,KAAA,GAAQ,OAAA,CAAQ,SAAA,CAAU,EAAE,CAAA;AAClC,IAAA,OAAO,GAAG,KAAK,CAAA;AAAA,EACjB,SAAS,CAAA,EAAY;AACnB,IAAA,OAAO,IAAI,CAAA,YAAa,KAAA,GAAQ,EAAE,OAAA,GAAU,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EACvD;AACF;AAcA,eAAsB,iBAAA,CACpB,SACA,EAAA,EACqB;AACrB,EAAA,IAAI,CAAC,OAAA,EAAS,OAAO,GAAA,CAAI,yCAAyC,CAAA;AAClE,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,QAAQ,UAAA,EAAW;AAClC,IAAA,MAAM,aAAa,MAAA,CAAO,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,OAAO,EAAE,CAAA;AACjD,IAAA,IAAI,CAAC,UAAA,EAAY,OAAO,GAAA,CAAI,CAAA,mCAAA,EAAsC,EAAE,CAAA,CAAA,CAAG,CAAA;AACvE,IAAA,OAAO,OAAO,UAAU,CAAA;AAAA,EAC1B,SAAS,CAAA,EAAY;AACnB,IAAA,OAAO,IAAI,CAAA,YAAa,KAAA,GAAQ,EAAE,OAAA,GAAU,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EACvD;AACF","file":"chunk-L7QOZG5V.js","sourcesContent":["// src/tools/connectors.ts\nimport { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { buildConnectorListPayload, type ConnectorManager } from \"@skaile/workspaces/connectors\";\nimport type { ToolResult } from \"../types.js\";\nimport { err, ok, okJson } from \"../types.js\";\n\n// ── Mountable-connector helpers ──────────────────────────────────────────────\n//\n// The unified ConnectorManager owns mountable (filesystem-face) connectors too.\n// A connector is mountable when its `listConnectors()` summary carries a\n// `mountPath`. The `mount*` helpers below project that subset for the legacy\n// `mount_*` tool surface.\n\n/**\n * A connector summary that carries a projected filesystem path. Unlike the raw\n * `listConnectors()` summary, `mountPath` is non-optional here — `listMountable()`\n * runtime-filters to exactly those entries before narrowing to this type.\n */\ntype MountableConnector = ReturnType<ConnectorManager[\"listConnectors\"]>[number] & {\n mountPath: string;\n};\n\n/** Return the mountable (filesystem-face) connectors from a manager. */\nfunction listMountable(manager: ConnectorManager): MountableConnector[] {\n return manager\n .listConnectors()\n .filter((c): c is MountableConnector => typeof c.mountPath === \"string\");\n}\n\n/**\n * A mountable connector as reported to the agent, with an optional `reason`.\n *\n * A fleet-managed mount whose path is gone reports `status: \"error\"` plus a\n * `reason`, even though the connector handle still reads `connected`. One whose\n * probe timed out keeps its cached status and gains a `reason` saying it is\n * unverified: a slow cloud mount is not reported dead.\n */\ntype MountView = MountableConnector & { reason?: string };\n\n/** Overlay a live re-check on the cached connect-time status where one applies. */\nasync function withLiveness(\n manager: ConnectorManager,\n mount: MountableConnector,\n): Promise<MountView> {\n // Optional call: the tool tests' manager doubles omit the method.\n const liveness = await manager.checkMountLiveness?.(mount.id);\n if (!liveness || liveness.state === \"live\") return mount;\n if (liveness.state === \"dead\") return { ...mount, status: \"error\", reason: liveness.reason };\n return { ...mount, reason: liveness.reason };\n}\n\n/**\n * List all mountable (filesystem-face) connectors declared in `skaile.yaml`\n * with their current mount status.\n *\n * @param manager - Active `ConnectorManager` or `null` when not configured.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountList(manager: ConnectorManager | null): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n return okJson(await Promise.all(listMountable(manager).map((m) => withLiveness(manager, m))));\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Sync a mountable connector — pull the latest content from its remote source.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param mountId - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountSync(\n manager: ConnectorManager | null,\n mountId: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const result = await manager.sync(mountId);\n return okJson(result);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Get the current status and metadata for a single mountable connector.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param mountId - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountStatus(\n manager: ConnectorManager | null,\n mountId: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const mount = listMountable(manager).find((v) => v.id === mountId);\n if (!mount) return err(`Mount not found: \"${mountId}\"`);\n return okJson(await withLiveness(manager, mount));\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Read a file from within a mountable connector's projected directory by its\n * relative path.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param mountId - Connector ID declared in `skaile.yaml`.\n * @param filePath - Relative path within the projected mount directory.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function mountRead(\n manager: ConnectorManager | null,\n mountId: string,\n filePath: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const mount = listMountable(manager).find((v) => v.id === mountId);\n if (!mount) return err(`Mount not found: \"${mountId}\"`);\n const content = await readFile(join(mount.mountPath, filePath), \"utf-8\");\n return ok(content);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * List all connectors registered with the `ConnectorManager`.\n *\n * Returns `{ connected, failed }` — `connected` from `manager.listConnectors()`,\n * `failed` from `manager.listFailedConnectors()`. A connector that threw during\n * `connect()` never enters the active map, so it is absent from the first list\n * entirely; without the second one an agent driven through MCP or OMP has no\n * way to learn that a mount it is about to write into is dead. Returns an error\n * result when no manager is configured (i.e. `skaile.yaml` has no `connectors`\n * section).\n *\n * @param manager - Active `ConnectorManager` or `null` when not configured.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorList(manager: ConnectorManager | null): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n // Same payload as the Claude SDK tool: per-mount health and a notice when one is not ok.\n return okJson(await buildConnectorListPayload(manager));\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Read content from a connector at the given path.\n *\n * Delegates to `manager.read(id, path)`. Returns an error result when the\n * path yields `null` (not found) or the manager is absent.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param path - Resource path within the connector (connector-specific format).\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorRead(\n manager: ConnectorManager | null,\n id: string,\n path: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const content = await manager.read(id, path);\n if (content === null) return err(`No content at path \"${path}\" in connector \"${id}\"`);\n return okJson(content);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Write string content to a connector at the given path.\n *\n * Delegates to `manager.write(id, path, { data: content })`.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param path - Destination path within the connector.\n * @param content - String payload to write.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorWrite(\n manager: ConnectorManager | null,\n id: string,\n path: string,\n content: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n await manager.write(id, path, { data: content });\n return ok(`Written to \"${path}\" in connector \"${id}\"`);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Search a connector's data using a query string.\n *\n * Delegates to `manager.search(id, query)` and returns the result set as JSON.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param query - Free-text or structured query (connector-specific format).\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorSearch(\n manager: ConnectorManager | null,\n id: string,\n query: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const results = await manager.search(id, query);\n return okJson(results);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Execute a named operation on a connector.\n *\n * Delegates to `manager.executeOp(id, operation, args)`. Operations and\n * their argument shapes are connector-specific; use {@link connectorDescribe}\n * to discover what operations a connector supports.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n * @param operation - Operation name (from the connector's `RuntimeSkillDescriptor`).\n * @param args - Named arguments for the operation.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorExec(\n manager: ConnectorManager | null,\n id: string,\n operation: string,\n args: Record<string, unknown>,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const result = await manager.executeOp(id, operation, args);\n return ok(result);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Load the rendered skill body for a connector.\n *\n * Delegates to `manager.loadSkill(id)` and returns the skill content as\n * plain text. Useful when the agent needs the connector's operations and\n * usage instructions injected as prompt context.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorLoadSkill(\n manager: ConnectorManager | null,\n id: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const skill = manager.loadSkill(id);\n return ok(skill);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n\n/**\n * Describe a connector's capabilities via its `RuntimeSkillDescriptor`.\n *\n * Finds the matching skill descriptor from `manager.listSkills()` and returns\n * it as JSON. The descriptor includes the connector's operations, argument\n * shapes, and usage instructions.\n *\n * @param manager - Active `ConnectorManager` or `null`.\n * @param id - Connector ID declared in `skaile.yaml`.\n *\n * @docLink packages/workspace-plugin/concepts#tool-delivery\n */\nexport async function connectorDescribe(\n manager: ConnectorManager | null,\n id: string,\n): Promise<ToolResult> {\n if (!manager) return err(\"No connectors configured in skaile.yaml\");\n try {\n const skills = manager.listSkills();\n const descriptor = skills.find((s) => s.id === id);\n if (!descriptor) return err(`No skill descriptor for connector \"${id}\"`);\n return okJson(descriptor);\n } catch (e: unknown) {\n return err(e instanceof Error ? e.message : String(e));\n }\n}\n"]}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { declaredConnectErrorKind, ClassifiedConnectError, withConnectErrorKind } from './chunk-
|
|
2
|
-
import { readUnavailableMarker, OAuthRequiredError, ConnectorFieldMissingError, LegacyAuthGrammarError, ConnectorStartupError, resolveAuthRef } from './chunk-
|
|
3
|
-
import { EventNormalizer } from './chunk-
|
|
4
|
-
import { resolveModelTier } from './chunk-
|
|
5
|
-
import { createHarness } from './chunk-
|
|
1
|
+
import { declaredConnectErrorKind, ClassifiedConnectError, withConnectErrorKind } from './chunk-NURTGAWM.js';
|
|
2
|
+
import { readUnavailableMarker, OAuthRequiredError, ConnectorFieldMissingError, LegacyAuthGrammarError, ConnectorStartupError, resolveAuthRef } from './chunk-ZBA4P5TD.js';
|
|
3
|
+
import { EventNormalizer } from './chunk-HMVAGPYR.js';
|
|
4
|
+
import { resolveModelTier } from './chunk-SBNUXJ6E.js';
|
|
5
|
+
import { createHarness } from './chunk-XON6ODIC.js';
|
|
6
6
|
import { pluginRegistry } from './chunk-G5SUWZEU.js';
|
|
7
7
|
import { computeStimulus } from './chunk-IFGTRL2I.js';
|
|
8
|
-
import { resolveFlowOutputFields, interpolateNodeInstruction, resolveNodeBindings, validateConsumedNodeOutput, appendAttempt, resolveTerminalFailureStatus, remainingActiveExecutionMs, deriveCheckEvidence, computeFlowStateFromSnapshots, availableRouterFrontier, evaluateRouterSelection, routerSelectionOutput, planRouterSkips, unsettledRouterBranchIds, countFailedAttempts, hasAutomaticRetryBudget, persistedRouterSelection } from './chunk-
|
|
8
|
+
import { resolveFlowOutputFields, interpolateNodeInstruction, resolveNodeBindings, validateConsumedNodeOutput, appendAttempt, resolveTerminalFailureStatus, remainingActiveExecutionMs, deriveCheckEvidence, computeFlowStateFromSnapshots, availableRouterFrontier, evaluateRouterSelection, routerSelectionOutput, planRouterSkips, unsettledRouterBranchIds, countFailedAttempts, hasAutomaticRetryBudget, persistedRouterSelection } from './chunk-WFK4MUBL.js';
|
|
9
9
|
import { describeStimulus, buildOrchestratorPrompt, renderSubpromptPrompt, renderStimulusPrompt } from './chunk-WD3L5QSU.js';
|
|
10
10
|
import { deterministicNodeKindLabel, nodeInstruction, flowDefaults, isAgentNode, isGateNode, isCheckNode, nodeRequiresApproval, isSubFlowNode, isActiveRuntimeNode, isFunctionNode, isSubpromptNode, isRouterNode, nodeIsOptional, nodeLabel, nodeAssets } from './chunk-7RGTAEG6.js';
|
|
11
|
-
import { withActivityLabelDefs } from './chunk-
|
|
11
|
+
import { withActivityLabelDefs } from './chunk-ASBZOTEO.js';
|
|
12
12
|
import { undeclaredSubFlowOutputReads, mismatchedSubFlowOutputTypes, INPUT_SCHEMA_SHAPES_HINT, coerceInputSchema } from './chunk-LNFKL23K.js';
|
|
13
13
|
import { parseFlowDefinition } from './chunk-JRN5QF4C.js';
|
|
14
14
|
import { classifierDecision, getConsumedOutputSchema, withoutReservedClassifierFields, FLOW_CAPTURE_CHANNELS, captureDestinationFieldName, invalidCaptureDestinationMessage } from './chunk-NUELZWCF.js';
|
|
15
|
-
import { loadHarnessSdk } from './chunk-
|
|
15
|
+
import { loadHarnessSdk } from './chunk-TMJBEGS4.js';
|
|
16
16
|
import { processAlive } from './chunk-4GY63JU6.js';
|
|
17
|
-
import { symlinkEscapeOfProject, isInsideProject } from './chunk-
|
|
17
|
+
import { symlinkEscapeOfProject, isInsideProject } from './chunk-O7ADRMCR.js';
|
|
18
18
|
import { withFsDeadline, FsDeadlineError, fsDeadlineMs, tryWithFsDeadline } from './chunk-GNUA7XT2.js';
|
|
19
19
|
import { portableSpawn } from './chunk-VSX2G7LA.js';
|
|
20
20
|
import { pathTag, scrubLogText } from './chunk-SGI5MRKP.js';
|
|
@@ -1605,22 +1605,41 @@ function networkGitEnv(auth, base = process.env) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
async function runRemoteGit(args, auth, options) {
|
|
1607
1607
|
const keys = subcommandOf(args) === "submodule" ? CHECKOUT_UNSAFE_KEY_RE : TLS_TRUST_KEY_RE;
|
|
1608
|
-
const
|
|
1608
|
+
const hasToken = auth?.credentials?.token !== void 0 && auth.credentials.token !== "";
|
|
1609
|
+
const plainHttp = hasToken && auth !== void 0 && auth.url.startsWith("http://");
|
|
1610
|
+
const withheld = hasToken && !plainHttp ? await tlsTrustOverride(options, keys) : null;
|
|
1611
|
+
let withheldNote;
|
|
1609
1612
|
if (withheld !== null) {
|
|
1613
|
+
withheldNote = tokenWithheldNote(withheld);
|
|
1610
1614
|
authLog.warn(
|
|
1611
1615
|
"not sending the git credential: the checkout's config changes TLS trust or names a filter",
|
|
1612
|
-
{
|
|
1613
|
-
key: withheld
|
|
1614
|
-
}
|
|
1616
|
+
{ key: withheld.key }
|
|
1615
1617
|
);
|
|
1618
|
+
} else if (plainHttp) {
|
|
1619
|
+
withheldNote = "token withheld: the remote URL is http://; use an https:// URL";
|
|
1620
|
+
authLog.warn("not sending the git credential: the remote URL is http://");
|
|
1616
1621
|
}
|
|
1617
1622
|
const recursion = RECURSING_SUBCOMMANDS.has(subcommandOf(args)) ? NO_SUBMODULE_RECURSION : [];
|
|
1618
1623
|
const cwd = options.cwd ?? options.neutralCwd;
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
+
try {
|
|
1625
|
+
return await runGit(
|
|
1626
|
+
[...gitPrefix(options.safeDir), ...NETWORK_GIT_ARGS, ...recursion, ...args],
|
|
1627
|
+
{
|
|
1628
|
+
...cwd === void 0 ? {} : { cwd },
|
|
1629
|
+
timeout: options.timeout,
|
|
1630
|
+
env: networkGitEnv(withheldNote === void 0 ? auth : void 0, options.env)
|
|
1631
|
+
}
|
|
1632
|
+
);
|
|
1633
|
+
} catch (err) {
|
|
1634
|
+
if (withheldNote !== void 0 && err instanceof Error) err.message += `
|
|
1635
|
+
${withheldNote}`;
|
|
1636
|
+
throw err;
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
function tokenWithheldNote(w) {
|
|
1640
|
+
const key = w.key.replace(/sslcainfo$/, "sslCAInfo").replace(/sslcapath$/, "sslCAPath").replace(/sslverify$/, "sslVerify");
|
|
1641
|
+
const fix = /sslcainfo$/i.test(w.key) ? "use GIT_SSL_CAINFO or remove the key" : /sslcapath$/i.test(w.key) ? "use GIT_SSL_CAPATH or remove the key" : "remove the key";
|
|
1642
|
+
return w.key === "unreadable config" ? "token withheld: the git config could not be read; fix the config file or its permissions" : `token withheld: ${w.where} sets ${key}; ${fix}`;
|
|
1624
1643
|
}
|
|
1625
1644
|
var RECURSING_SUBCOMMANDS = /* @__PURE__ */ new Set(["fetch", "pull", "push", "submodule", "clone"]);
|
|
1626
1645
|
var NO_SUBMODULE_RECURSION = [
|
|
@@ -1648,7 +1667,13 @@ async function tlsTrustOverride(options, keyRe = TLS_TRUST_KEY_RE) {
|
|
|
1648
1667
|
keyRe
|
|
1649
1668
|
);
|
|
1650
1669
|
const line = own.find(isUnsafeConfigLine);
|
|
1651
|
-
if (line !== void 0)
|
|
1670
|
+
if (line !== void 0) {
|
|
1671
|
+
const [scope, key] = line.split(/\s+/);
|
|
1672
|
+
return {
|
|
1673
|
+
key: key ?? "unknown",
|
|
1674
|
+
where: scope === "global" ? "your global git config" : "the checkout's git config"
|
|
1675
|
+
};
|
|
1676
|
+
}
|
|
1652
1677
|
if (options.cwd === void 0) return null;
|
|
1653
1678
|
for (const dir of await submoduleGitDirs(options.cwd)) {
|
|
1654
1679
|
const hits = await configMatch(
|
|
@@ -1658,11 +1683,16 @@ async function tlsTrustOverride(options, keyRe = TLS_TRUST_KEY_RE) {
|
|
|
1658
1683
|
keyRe
|
|
1659
1684
|
);
|
|
1660
1685
|
const hit = hits.find(isUnsafeConfigLine);
|
|
1661
|
-
if (hit !== void 0)
|
|
1686
|
+
if (hit !== void 0) {
|
|
1687
|
+
return {
|
|
1688
|
+
key: hit.split(/\s+/)[1] ?? "unknown",
|
|
1689
|
+
where: `the git config of the submodule ${dir}`
|
|
1690
|
+
};
|
|
1691
|
+
}
|
|
1662
1692
|
}
|
|
1663
1693
|
return null;
|
|
1664
1694
|
} catch {
|
|
1665
|
-
return "unreadable config";
|
|
1695
|
+
return { key: "unreadable config", where: "the git config" };
|
|
1666
1696
|
}
|
|
1667
1697
|
}
|
|
1668
1698
|
function isUnsafeConfigLine(line) {
|
|
@@ -10518,17 +10548,24 @@ function isUnavailableBlock(block) {
|
|
|
10518
10548
|
}
|
|
10519
10549
|
var USER_GITCONFIG_BLOCK = ".user-gitconfig";
|
|
10520
10550
|
function writeUserGitconfigInclude(opts) {
|
|
10521
|
-
|
|
10551
|
+
if ("userGitconfigPath" in opts) {
|
|
10552
|
+
throw new TypeError(
|
|
10553
|
+
"writeUserGitconfigInclude: `userGitconfigPath` was replaced by `userGitconfigPaths` (an array of paths); pass `userGitconfigPaths: [path]`"
|
|
10554
|
+
);
|
|
10555
|
+
}
|
|
10556
|
+
const { gitconfigPath, userGitconfigPaths = [] } = opts;
|
|
10522
10557
|
const text = readFileOrEmpty(gitconfigPath);
|
|
10523
10558
|
const blocks = parseBlocks(text).filter((b) => b.mountId !== USER_GITCONFIG_BLOCK);
|
|
10524
|
-
if (
|
|
10525
|
-
const quoted = userGitconfigPath.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
10559
|
+
if (userGitconfigPaths.length > 0) {
|
|
10526
10560
|
blocks.unshift({
|
|
10527
10561
|
mountId: USER_GITCONFIG_BLOCK,
|
|
10528
10562
|
lines: [
|
|
10529
10563
|
blockStart(USER_GITCONFIG_BLOCK),
|
|
10530
10564
|
"[include]",
|
|
10531
|
-
|
|
10565
|
+
// Git config values: a backslash or a double quote needs an escape.
|
|
10566
|
+
...userGitconfigPaths.map(
|
|
10567
|
+
(p) => ` path = "${p.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`
|
|
10568
|
+
),
|
|
10532
10569
|
blockEnd(USER_GITCONFIG_BLOCK)
|
|
10533
10570
|
]
|
|
10534
10571
|
});
|
|
@@ -13681,5 +13718,5 @@ function describeFlowOperations() {
|
|
|
13681
13718
|
}
|
|
13682
13719
|
|
|
13683
13720
|
export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, BoxConnector, CONNECT_FAILURE_CARRY_OVER_TTL_MS, ClassifierSubpromptRunner, ConnectFailureCarryOver, ConnectorManager, DeployConnector, DevServerConnector, FlowAdapter, GitConnector, GmailConnector, GoogleDriveConnector, LocalConnector, LogBuffer, ManagedGitconfigCollisionError, MattermostConnector, MemoryConnector, MinIOConnector, NO_ACTIVE_FLOW_ERROR, PortPool, PostgresConnector, S3Connector, S3FetchStoppedError, S3PresignedRequestError, S3_PRESIGN_BATCH, SQLiteConnector, SessionInlineSubFlowRunner, SessionNodeExecutor, SessionSubpromptRunner, SharePointConnector, StaticServerConnector, SubFlowContractError, TunnelConnector, WebDAVConnector, XStateConnector, XStateStoreConnector, atomicReplaceCredential, buildConnectorListPayload, buildConnectorPromptSection, buildConnectorToolDefs, buildFlowPromptEvent, buildFlowToolDefs, buildLazyFlowToolDefs, buildLazySdkFlowTools, buildSdkConnectorTools, buildSdkFlowTools, checkFleetMountLiveness, classifierQuestion, classifyConnectError, createConnector, createConnector10, createConnector11, createConnector12, createConnector13, createConnector14, createConnector15, createConnector16, createConnector17, createConnector18, createConnector19, createConnector2, createConnector20, createConnector3, createConnector4, createConnector5, createConnector6, createConnector7, createConnector8, createConnector9, createFsWatcher, createWorktree, defaultSpawn, describeFlowOperations, driveOrchestratorTurn, ensureDirMode, ensureFleetMounted, ensureRefreshAttemptStamp, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, missingTokenMediatorMessage, normalizeRuntimeFlow, parseListObjectsV2, presignScopePrefix, presignableKey, readGitSyncStatus, registerBuiltinConnectors, removeMountBlock, removeUnavailableMountBlock, renderCredentialHelperScript, resolveAccessPolicy, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock, writeUnavailableMountBlock, writeUserGitconfigInclude };
|
|
13684
|
-
//# sourceMappingURL=chunk-
|
|
13685
|
-
//# sourceMappingURL=chunk-
|
|
13721
|
+
//# sourceMappingURL=chunk-LX4TTTRR.js.map
|
|
13722
|
+
//# sourceMappingURL=chunk-LX4TTTRR.js.map
|