@skaile/workspaces 6.15.0 → 6.16.1
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 +79 -0
- package/dist/agent-file-refresh-VRD2SNJW.js +89 -0
- package/dist/agent-file-refresh-VRD2SNJW.js.map +1 -0
- package/dist/ai-sdk.js +8 -7
- package/dist/ai-sdk.js.map +1 -1
- package/dist/{asset-feeds-PM7FKHJP.js → asset-feeds-ON7FYHHF.js} +25 -23
- package/dist/asset-feeds-ON7FYHHF.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +8 -7
- package/dist/asset-manager/history.js +7 -6
- package/dist/asset-manager/index.js +17 -15
- package/dist/asset-manager/installer.js +16 -9
- package/dist/asset-manager/renderers.js +8 -8
- package/dist/asset-manager/src/add-remove/add.d.ts +134 -0
- package/dist/asset-manager/src/add-remove/add.d.ts.map +1 -0
- package/dist/asset-manager/src/add-remove/remove.d.ts +329 -0
- package/dist/asset-manager/src/add-remove/remove.d.ts.map +1 -0
- package/dist/asset-manager/src/agent-render.d.ts +116 -0
- package/dist/asset-manager/src/agent-render.d.ts.map +1 -0
- package/dist/asset-manager/src/composed-blocks.d.ts +40 -0
- package/dist/asset-manager/src/composed-blocks.d.ts.map +1 -0
- package/dist/asset-manager/src/config/core.d.ts +297 -0
- package/dist/asset-manager/src/config/core.d.ts.map +1 -0
- package/dist/asset-manager/src/config/edit.d.ts +161 -0
- package/dist/asset-manager/src/config/edit.d.ts.map +1 -0
- package/dist/asset-manager/src/index.d.ts +31 -2961
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install/clone-commit-fetcher.d.ts +11 -0
- package/dist/asset-manager/src/install/clone-commit-fetcher.d.ts.map +1 -0
- package/dist/asset-manager/src/install/install.d.ts +151 -0
- package/dist/asset-manager/src/install/install.d.ts.map +1 -0
- package/dist/asset-manager/src/install/restore.d.ts +76 -0
- package/dist/asset-manager/src/install/restore.d.ts.map +1 -0
- package/dist/asset-manager/src/install-agent.d.ts +52 -4
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/install-instances.d.ts +70 -2
- package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +54 -4
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/lock/copies.d.ts +156 -0
- package/dist/asset-manager/src/lock/copies.d.ts.map +1 -0
- package/dist/asset-manager/src/lock/library.d.ts +261 -0
- package/dist/asset-manager/src/lock/library.d.ts.map +1 -0
- package/dist/asset-manager/src/mcp-render.d.ts +86 -0
- package/dist/asset-manager/src/mcp-render.d.ts.map +1 -0
- package/dist/asset-manager/src/omp-sweep.d.ts +25 -0
- package/dist/asset-manager/src/omp-sweep.d.ts.map +1 -0
- package/dist/asset-manager/src/read/diff.d.ts +109 -0
- package/dist/asset-manager/src/read/diff.d.ts.map +1 -0
- package/dist/asset-manager/src/read/doctor.d.ts +116 -0
- package/dist/asset-manager/src/read/doctor.d.ts.map +1 -0
- package/dist/asset-manager/src/read/gaps.d.ts +120 -0
- package/dist/asset-manager/src/read/gaps.d.ts.map +1 -0
- package/dist/asset-manager/src/read/graph.d.ts +69 -0
- package/dist/asset-manager/src/read/graph.d.ts.map +1 -0
- package/dist/asset-manager/src/read/outdated.d.ts +152 -0
- package/dist/asset-manager/src/read/outdated.d.ts.map +1 -0
- package/dist/asset-manager/src/read/state.d.ts +265 -0
- package/dist/asset-manager/src/read/state.d.ts.map +1 -0
- package/dist/asset-manager/src/renderers.d.ts +11 -1
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/asset-manager/src/resolve/guards.d.ts +167 -0
- package/dist/asset-manager/src/resolve/guards.d.ts.map +1 -0
- package/dist/asset-manager/src/resolve/scan.d.ts +222 -0
- package/dist/asset-manager/src/resolve/scan.d.ts.map +1 -0
- package/dist/asset-manager/src/resolve/stores.d.ts +176 -0
- package/dist/asset-manager/src/resolve/stores.d.ts.map +1 -0
- package/dist/asset-manager/src/shared/files.d.ts +42 -0
- package/dist/asset-manager/src/shared/files.d.ts.map +1 -0
- package/dist/asset-manager/src/shared/library-hooks.d.ts +16 -0
- package/dist/asset-manager/src/shared/library-hooks.d.ts.map +1 -0
- package/dist/asset-manager/src/shared/library.d.ts +96 -0
- package/dist/asset-manager/src/shared/library.d.ts.map +1 -0
- package/dist/asset-manager/src/shared/refs.d.ts +101 -0
- package/dist/asset-manager/src/shared/refs.d.ts.map +1 -0
- package/dist/asset-manager/src/shared/types.d.ts +399 -0
- package/dist/asset-manager/src/shared/types.d.ts.map +1 -0
- package/dist/bridge/harnesses/claude-sdk.js +11 -17
- package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
- package/dist/bridge/harnesses/codex.js +10 -10
- package/dist/bridge/harnesses/continue.js +12 -16
- package/dist/bridge/harnesses/continue.js.map +1 -1
- package/dist/bridge/harnesses/echo.js +3 -8
- package/dist/bridge/harnesses/echo.js.map +1 -1
- package/dist/bridge/harnesses/gemini.js +5 -5
- package/dist/bridge/harnesses/goose.js +13 -17
- package/dist/bridge/harnesses/goose.js.map +1 -1
- package/dist/bridge/harnesses/omp.js +5 -11
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +13 -17
- package/dist/bridge/harnesses/opencode.js.map +1 -1
- package/dist/bridge/harnesses/qwen.js +6 -11
- package/dist/bridge/harnesses/qwen.js.map +1 -1
- package/dist/bridge/index.js +16 -16
- package/dist/bridge/src/codex/managed-harness.d.ts.map +1 -1
- package/dist/bridge/src/driver-contract.d.ts +72 -0
- package/dist/bridge/src/driver-contract.d.ts.map +1 -0
- package/dist/bridge/src/harness-model-check.d.ts +1 -1
- package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/_subprocess-cli.d.ts +8 -0
- package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/codex.d.ts +2 -0
- package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/continue.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/echo.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.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 -0
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/preflight.d.ts +114 -0
- package/dist/bridge/src/preflight.d.ts.map +1 -0
- package/dist/bridge/src/registry.d.ts +12 -0
- package/dist/bridge/src/registry.d.ts.map +1 -1
- package/dist/{chunk-MUQBP2BK.js → chunk-2JUCWMIS.js} +8808 -8337
- package/dist/chunk-2JUCWMIS.js.map +1 -0
- package/dist/{chunk-VS6XC5JE.js → chunk-2MTRRK37.js} +3 -3
- package/dist/{chunk-VS6XC5JE.js.map → chunk-2MTRRK37.js.map} +1 -1
- package/dist/chunk-2PJYJPDE.js +3 -0
- package/dist/chunk-2PJYJPDE.js.map +1 -0
- package/dist/{chunk-J7FEWDRQ.js → chunk-2SSG5B24.js} +4 -4
- package/dist/{chunk-J7FEWDRQ.js.map → chunk-2SSG5B24.js.map} +1 -1
- package/dist/{chunk-WDG5IVEA.js → chunk-2ZDZJ7XQ.js} +3 -3
- package/dist/{chunk-WDG5IVEA.js.map → chunk-2ZDZJ7XQ.js.map} +1 -1
- package/dist/{chunk-V2VDTQ7A.js → chunk-3A7JUOY2.js} +3 -3
- package/dist/{chunk-V2VDTQ7A.js.map → chunk-3A7JUOY2.js.map} +1 -1
- package/dist/{chunk-R7422XD4.js → chunk-3CRZJR7E.js} +20 -14
- package/dist/chunk-3CRZJR7E.js.map +1 -0
- package/dist/chunk-3LAJJURV.js +26 -0
- package/dist/chunk-3LAJJURV.js.map +1 -0
- package/dist/{chunk-FJJEC6O2.js → chunk-3UYKT62L.js} +5 -5
- package/dist/{chunk-FJJEC6O2.js.map → chunk-3UYKT62L.js.map} +1 -1
- package/dist/{chunk-HCIXCCUH.js → chunk-4X5WXQV7.js} +4 -4
- package/dist/{chunk-HCIXCCUH.js.map → chunk-4X5WXQV7.js.map} +1 -1
- package/dist/chunk-4ZNKEDYH.js +887 -0
- package/dist/chunk-4ZNKEDYH.js.map +1 -0
- package/dist/{chunk-OIWFXUZB.js → chunk-6M44OQKH.js} +40 -44
- package/dist/chunk-6M44OQKH.js.map +1 -0
- package/dist/{chunk-SXRN27TU.js → chunk-72DYHOO2.js} +24 -25
- package/dist/chunk-72DYHOO2.js.map +1 -0
- package/dist/{chunk-BNLXZXZN.js → chunk-BRAOB37W.js} +97 -47
- package/dist/chunk-BRAOB37W.js.map +1 -0
- package/dist/{chunk-ZLDAPZIX.js → chunk-BTMSHGN3.js} +4 -4
- package/dist/{chunk-ZLDAPZIX.js.map → chunk-BTMSHGN3.js.map} +1 -1
- package/dist/{chunk-7K73MCI6.js → chunk-CU5WY6HN.js} +3 -3
- package/dist/{chunk-7K73MCI6.js.map → chunk-CU5WY6HN.js.map} +1 -1
- package/dist/{chunk-CG63XGVV.js → chunk-EGKCKWWE.js} +3 -3
- package/dist/{chunk-CG63XGVV.js.map → chunk-EGKCKWWE.js.map} +1 -1
- package/dist/{chunk-CJO3XKO7.js → chunk-ETGC2MEM.js} +4 -4
- package/dist/{chunk-CJO3XKO7.js.map → chunk-ETGC2MEM.js.map} +1 -1
- package/dist/{chunk-PFBPESW7.js → chunk-FPG36VC4.js} +8 -13
- package/dist/chunk-FPG36VC4.js.map +1 -0
- package/dist/{chunk-SBAUZ7XH.js → chunk-H3PY5DFL.js} +4 -4
- package/dist/{chunk-SBAUZ7XH.js.map → chunk-H3PY5DFL.js.map} +1 -1
- package/dist/{chunk-7HRZACI4.js → chunk-HW4BDJPC.js} +17 -6
- package/dist/chunk-HW4BDJPC.js.map +1 -0
- package/dist/{chunk-7VBD5XUM.js → chunk-IG4YQ7ER.js} +32 -90
- package/dist/chunk-IG4YQ7ER.js.map +1 -0
- package/dist/{chunk-YDMZWVZN.js → chunk-K4763755.js} +8 -8
- package/dist/{chunk-YDMZWVZN.js.map → chunk-K4763755.js.map} +1 -1
- package/dist/{chunk-6WIZC6GM.js → chunk-KDRA6FYE.js} +120 -211
- package/dist/chunk-KDRA6FYE.js.map +1 -0
- package/dist/{chunk-KOI7QFDH.js → chunk-M7XIYHWB.js} +3 -3
- package/dist/{chunk-KOI7QFDH.js.map → chunk-M7XIYHWB.js.map} +1 -1
- package/dist/{chunk-7LJUK5JK.js → chunk-MG6QD7GE.js} +201 -43
- package/dist/chunk-MG6QD7GE.js.map +1 -0
- package/dist/{chunk-CWUHUL6W.js → chunk-NAQXDTF3.js} +3 -3
- package/dist/{chunk-CWUHUL6W.js.map → chunk-NAQXDTF3.js.map} +1 -1
- package/dist/{chunk-JIZ35OOU.js → chunk-NJ6UCY2B.js} +3 -3
- package/dist/{chunk-JIZ35OOU.js.map → chunk-NJ6UCY2B.js.map} +1 -1
- package/dist/{chunk-A3G3FHGB.js → chunk-NNJQQYHY.js} +2 -2
- package/dist/{chunk-A3G3FHGB.js.map → chunk-NNJQQYHY.js.map} +1 -1
- package/dist/{chunk-TYRAEMWE.js → chunk-OD4N5O7V.js} +4 -4
- package/dist/{chunk-TYRAEMWE.js.map → chunk-OD4N5O7V.js.map} +1 -1
- package/dist/{chunk-LBJCOEXH.js → chunk-P6FJDT35.js} +27 -7
- package/dist/chunk-P6FJDT35.js.map +1 -0
- package/dist/{chunk-IOXFT5D7.js → chunk-PD42JZWI.js} +3 -3
- package/dist/{chunk-IOXFT5D7.js.map → chunk-PD42JZWI.js.map} +1 -1
- package/dist/{chunk-MS2IXLTC.js → chunk-PMXTBWFD.js} +27 -7
- package/dist/chunk-PMXTBWFD.js.map +1 -0
- package/dist/{chunk-O74SRQ3W.js → chunk-PPSSDUN6.js} +3 -3
- package/dist/{chunk-O74SRQ3W.js.map → chunk-PPSSDUN6.js.map} +1 -1
- package/dist/{chunk-IYXOSBQ4.js → chunk-PRB67LCK.js} +126 -17
- package/dist/chunk-PRB67LCK.js.map +1 -0
- package/dist/{chunk-6VQW2X2F.js → chunk-QUIK7L3Z.js} +9 -9
- package/dist/{chunk-6VQW2X2F.js.map → chunk-QUIK7L3Z.js.map} +1 -1
- package/dist/{chunk-DRUAQ7IY.js → chunk-QUPZKTF3.js} +9 -8
- package/dist/chunk-QUPZKTF3.js.map +1 -0
- package/dist/{chunk-7FXOOUOC.js → chunk-RPRMD7XV.js} +27 -11
- package/dist/chunk-RPRMD7XV.js.map +1 -0
- package/dist/{chunk-U7EJB6LY.js → chunk-S3UOZBGE.js} +20 -3
- package/dist/chunk-S3UOZBGE.js.map +1 -0
- package/dist/{chunk-LQWOU7S2.js → chunk-SFBLZOV5.js} +3 -3
- package/dist/{chunk-LQWOU7S2.js.map → chunk-SFBLZOV5.js.map} +1 -1
- package/dist/{chunk-XPSZIBPU.js → chunk-SMCG4PMP.js} +43 -48
- package/dist/chunk-SMCG4PMP.js.map +1 -0
- package/dist/{chunk-EB2LKPI6.js → chunk-SMFZ5YGN.js} +4 -4
- package/dist/{chunk-EB2LKPI6.js.map → chunk-SMFZ5YGN.js.map} +1 -1
- package/dist/{chunk-IRIWNKQS.js → chunk-SX54OQQT.js} +4 -4
- package/dist/{chunk-IRIWNKQS.js.map → chunk-SX54OQQT.js.map} +1 -1
- package/dist/{chunk-2PVYDAFN.js → chunk-T65N4CIZ.js} +3 -3
- package/dist/{chunk-2PVYDAFN.js.map → chunk-T65N4CIZ.js.map} +1 -1
- package/dist/{chunk-C5ZCREBI.js → chunk-TVRL3IPZ.js} +3 -3
- package/dist/{chunk-C5ZCREBI.js.map → chunk-TVRL3IPZ.js.map} +1 -1
- package/dist/{chunk-RKTEHX2S.js → chunk-TW5AP6IF.js} +5 -5
- package/dist/{chunk-RKTEHX2S.js.map → chunk-TW5AP6IF.js.map} +1 -1
- package/dist/{chunk-EMIOFJQJ.js → chunk-TYK752MU.js} +3 -3
- package/dist/{chunk-EMIOFJQJ.js.map → chunk-TYK752MU.js.map} +1 -1
- package/dist/{chunk-HPQ2WDYC.js → chunk-U2WPJHRA.js} +5 -5
- package/dist/{chunk-HPQ2WDYC.js.map → chunk-U2WPJHRA.js.map} +1 -1
- package/dist/{chunk-YLKOCMU7.js → chunk-U6UFPOEK.js} +326 -1058
- package/dist/chunk-U6UFPOEK.js.map +1 -0
- package/dist/{chunk-MEU2HHGV.js → chunk-U7P22GEB.js} +386 -46
- package/dist/chunk-U7P22GEB.js.map +1 -0
- package/dist/{chunk-AEFDFCS2.js → chunk-VFEZUSB6.js} +4 -4
- package/dist/{chunk-AEFDFCS2.js.map → chunk-VFEZUSB6.js.map} +1 -1
- package/dist/{chunk-A4VKIVGB.js → chunk-WW22FS74.js} +75 -67
- package/dist/chunk-WW22FS74.js.map +1 -0
- package/dist/{chunk-72PPC4SC.js → chunk-Z23I2JA6.js} +6 -6
- package/dist/{chunk-72PPC4SC.js.map → chunk-Z23I2JA6.js.map} +1 -1
- package/dist/{chunk-KIFAU62K.js → chunk-Z7HLX4V2.js} +4 -4
- package/dist/{chunk-KIFAU62K.js.map → chunk-Z7HLX4V2.js.map} +1 -1
- package/dist/{chunk-CVUMZTNO.js → chunk-ZQPBYLCS.js} +4 -4
- package/dist/{chunk-CVUMZTNO.js.map → chunk-ZQPBYLCS.js.map} +1 -1
- package/dist/{claude-code-5QYXWC5H.js → claude-code-VL6UM7BZ.js} +4 -4
- package/dist/{claude-code-5QYXWC5H.js.map → claude-code-VL6UM7BZ.js.map} +1 -1
- package/dist/cli/index.js +491 -298
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/agent-file-refresh.d.ts +25 -0
- package/dist/cli/src/agent-file-refresh.d.ts.map +1 -0
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +9 -2
- 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.d.ts +1 -1
- package/dist/cli/src/commands/harness.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +5 -7
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-export.d.ts.map +1 -1
- 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 +27 -48
- 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/source.d.ts +6 -9
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts +6 -0
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/config-checks.d.ts.map +1 -1
- package/dist/cli/src/harness-error.d.ts +11 -9
- package/dist/cli/src/harness-error.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +48 -74
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/connectors/config.js +5 -5
- package/dist/connectors/index.js +19 -19
- package/dist/{connectors-DLXW27NQ.js → connectors-7EPJRVLJ.js} +22 -22
- package/dist/{connectors-DLXW27NQ.js.map → connectors-7EPJRVLJ.js.map} +1 -1
- package/dist/core/index.js +7 -6
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +3 -3
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +5 -5
- package/dist/core/src/agent-prompt-sections.d.ts +96 -4
- package/dist/core/src/agent-prompt-sections.d.ts.map +1 -1
- package/dist/core/src/check-asset.d.ts +115 -0
- package/dist/core/src/check-asset.d.ts.map +1 -0
- package/dist/core/src/harness-model.d.ts +20 -0
- package/dist/core/src/harness-model.d.ts.map +1 -0
- package/dist/core/src/index.d.ts +10 -6
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +12 -10
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +42 -11
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/publish-manifest.d.ts +17 -0
- package/dist/core/src/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/repo-identity.d.ts +41 -0
- package/dist/core/src/repo-identity.d.ts.map +1 -0
- package/dist/core/src/repo-manager.d.ts +3 -9
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +4 -4
- package/dist/deploy/index.js +7 -6
- package/dist/deploy/index.js.map +1 -1
- package/dist/discovery/index.js +5 -5
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/{ensure-sources-I7GCXPXK.js → ensure-sources-CI3JQJST.js} +30 -28
- package/dist/ensure-sources-CI3JQJST.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +19 -19
- package/dist/factory-assets/connectors/deploy.js +19 -19
- package/dist/factory-assets/connectors/devserver.js +19 -19
- package/dist/factory-assets/connectors/flow/adapter.js +19 -19
- package/dist/factory-assets/connectors/flow/engine.js +8 -7
- package/dist/factory-assets/connectors/flow/run-flow.js +21 -21
- package/dist/factory-assets/connectors/flow.js +19 -19
- package/dist/factory-assets/connectors/git.js +19 -19
- package/dist/factory-assets/connectors/gmail.js +19 -19
- package/dist/factory-assets/connectors/googledrive.js +19 -19
- package/dist/factory-assets/connectors/local.js +19 -19
- package/dist/factory-assets/connectors/mattermost.js +19 -19
- package/dist/factory-assets/connectors/memory.js +19 -19
- package/dist/factory-assets/connectors/minio.js +19 -19
- package/dist/factory-assets/connectors/postgres.js +19 -19
- package/dist/factory-assets/connectors/s3.js +19 -19
- package/dist/factory-assets/connectors/sharepoint.js +19 -19
- package/dist/factory-assets/connectors/sqlite.js +19 -19
- package/dist/factory-assets/connectors/static-server.js +19 -19
- package/dist/factory-assets/connectors/tunnel.js +19 -19
- package/dist/factory-assets/connectors/webdav.js +19 -19
- package/dist/factory-assets/connectors/xstate-store.js +19 -19
- package/dist/factory-assets/connectors/xstate.js +19 -19
- package/dist/{flows-J64L5MGJ.js → flows-6XQAYQS4.js} +12 -11
- package/dist/{flows-J64L5MGJ.js.map → flows-6XQAYQS4.js.map} +1 -1
- package/dist/{helpers-U75UGGH5.js → helpers-26MR5QPO.js} +30 -28
- package/dist/{helpers-U75UGGH5.js.map → helpers-26MR5QPO.js.map} +1 -1
- package/dist/library/index.js +10 -10
- package/dist/library/install.js +4 -4
- package/dist/library/src/index.d.ts +1 -1
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/local/db.d.ts.map +1 -1
- package/dist/library/src/local/library-manager.d.ts.map +1 -1
- package/dist/library/src/local/library.d.ts.map +1 -1
- package/dist/library/src/local/schema.d.ts +19 -0
- package/dist/library/src/local/schema.d.ts.map +1 -1
- package/dist/library/src/user-library.d.ts +18 -0
- package/dist/library/src/user-library.d.ts.map +1 -1
- package/dist/{library-publish-57422ULT.js → library-publish-YHYGA6G5.js} +71 -65
- package/dist/library-publish-YHYGA6G5.js.map +1 -0
- package/dist/model-endpoint/index.js +10 -9
- package/dist/{open-library-EVUKLOV7.js → open-library-FVV6GG4I.js} +33 -31
- package/dist/{open-library-EVUKLOV7.js.map → open-library-FVV6GG4I.js.map} +1 -1
- package/dist/{open-registry-4HNCWOCN.js → open-registry-VX2BVMS5.js} +16 -16
- package/dist/{open-registry-4HNCWOCN.js.map → open-registry-VX2BVMS5.js.map} +1 -1
- package/dist/{paths-PXBWY532.js → paths-PIWSSUUG.js} +10 -9
- package/dist/{paths-PXBWY532.js.map → paths-PIWSSUUG.js.map} +1 -1
- package/dist/{plugin-store-ZC3EGZ3D.js → plugin-store-MVTW6G7J.js} +10 -9
- package/dist/{plugin-store-ZC3EGZ3D.js.map → plugin-store-MVTW6G7J.js.map} +1 -1
- package/dist/{project-HB7OYPEF.js → project-BOAHGBMI.js} +47 -45
- package/dist/{project-HB7OYPEF.js.map → project-BOAHGBMI.js.map} +1 -1
- package/dist/resolver/index.js +8 -7
- package/dist/runner/composition-content.d.ts +2 -0
- package/dist/runner/composition-content.js +29 -0
- package/dist/runner/composition-content.js.map +1 -0
- package/dist/runner/index.js +37 -36
- package/dist/runner/src/composition/content-entry.d.ts +15 -0
- package/dist/runner/src/composition/content-entry.d.ts.map +1 -0
- package/dist/runner/src/composition/content-source.d.ts +7 -0
- package/dist/runner/src/composition/content-source.d.ts.map +1 -1
- package/dist/runner/src/composition/dry-run.d.ts +5 -1
- package/dist/runner/src/composition/dry-run.d.ts.map +1 -1
- package/dist/runner/src/composition/index.d.ts +1 -1
- package/dist/runner/src/composition/index.d.ts.map +1 -1
- package/dist/runner/src/composition/prompt-sections.d.ts +47 -20
- package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -1
- package/dist/runner/src/external-mcp.d.ts +32 -7
- package/dist/runner/src/external-mcp.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +3 -8
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +17 -15
- package/dist/sdk/bridge.js +16 -16
- package/dist/sdk/core.js +7 -6
- package/dist/sdk/flow.js +8 -7
- package/dist/sdk/index.js +37 -36
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +8 -7
- package/dist/sdk/runner.js +37 -36
- package/dist/sdk/transport/ws/server.js +8 -7
- package/dist/sdk/transport/ws.js +8 -7
- package/dist/sdk/transport.js +8 -7
- package/dist/serve-preflight-XJS5OZML.js +138 -0
- package/dist/serve-preflight-XJS5OZML.js.map +1 -0
- package/dist/{setup-2XV6T53V.js → setup-BFEBJLYF.js} +31 -29
- package/dist/setup-BFEBJLYF.js.map +1 -0
- package/dist/{skills-5D4KDVPJ.js → skills-OCG7B5CL.js} +13 -12
- package/dist/{skills-5D4KDVPJ.js.map → skills-OCG7B5CL.js.map} +1 -1
- package/dist/source-J2MJIHDS.js +93 -0
- package/dist/{source-VXE3RSSA.js.map → source-J2MJIHDS.js.map} +1 -1
- package/dist/{source-manifest-publish-IIVQLM67.js → source-manifest-publish-6MYDXCKZ.js} +51 -49
- package/dist/source-manifest-publish-6MYDXCKZ.js.map +1 -0
- package/dist/transport/index.js +8 -7
- package/dist/transport/ws/server.js +8 -7
- package/dist/transport/ws.js +8 -7
- package/dist/tui/index.js +37 -36
- package/dist/tui/index.js.map +1 -1
- package/dist/types/src/runtime.d.ts +6 -0
- package/dist/types/src/runtime.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +26 -26
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +7 -1
- package/dist/asset-feeds-PM7FKHJP.js.map +0 -1
- package/dist/chunk-2RVEYDQK.js +0 -110
- package/dist/chunk-2RVEYDQK.js.map +0 -1
- package/dist/chunk-6WIZC6GM.js.map +0 -1
- package/dist/chunk-7FXOOUOC.js.map +0 -1
- package/dist/chunk-7HRZACI4.js.map +0 -1
- package/dist/chunk-7LJUK5JK.js.map +0 -1
- package/dist/chunk-7VBD5XUM.js.map +0 -1
- package/dist/chunk-A4VKIVGB.js.map +0 -1
- package/dist/chunk-BNLXZXZN.js.map +0 -1
- package/dist/chunk-DRUAQ7IY.js.map +0 -1
- package/dist/chunk-IYXOSBQ4.js.map +0 -1
- package/dist/chunk-LBJCOEXH.js.map +0 -1
- package/dist/chunk-MEU2HHGV.js.map +0 -1
- package/dist/chunk-MS2IXLTC.js.map +0 -1
- package/dist/chunk-MUQBP2BK.js.map +0 -1
- package/dist/chunk-OIWFXUZB.js.map +0 -1
- package/dist/chunk-PFBPESW7.js.map +0 -1
- package/dist/chunk-R7422XD4.js.map +0 -1
- package/dist/chunk-SXRN27TU.js.map +0 -1
- package/dist/chunk-U7EJB6LY.js.map +0 -1
- package/dist/chunk-XPSZIBPU.js.map +0 -1
- package/dist/chunk-YLKOCMU7.js.map +0 -1
- package/dist/cli/src/commands/harness-preflight.d.ts +0 -40
- package/dist/cli/src/commands/harness-preflight.d.ts.map +0 -1
- package/dist/ensure-sources-I7GCXPXK.js.map +0 -1
- package/dist/library-publish-57422ULT.js.map +0 -1
- package/dist/serve-preflight-YY3YC6GH.js +0 -61
- package/dist/serve-preflight-YY3YC6GH.js.map +0 -1
- package/dist/setup-2XV6T53V.js.map +0 -1
- package/dist/source-VXE3RSSA.js +0 -91
- package/dist/source-manifest-publish-IIVQLM67.js.map +0 -1
package/dist/cli/index.js
CHANGED
|
@@ -1,97 +1,99 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { AI_RESOURCES } from '../chunk-BTMSHGN3.js';
|
|
3
|
+
import { status, enable, disable, install, uninstall } from '../chunk-NJ6UCY2B.js';
|
|
4
|
+
import { makeValidateCommand, scanIdentities, findManifestCandidates } from '../chunk-6M44OQKH.js';
|
|
5
|
+
import { storeNotInstallableReason, mcpNotRunnableHere } from '../chunk-4X5WXQV7.js';
|
|
6
|
+
import { refreshStaleAgentFiles } from '../chunk-3LAJJURV.js';
|
|
7
|
+
import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError, removeProviderEntry } from '../chunk-TW5AP6IF.js';
|
|
8
|
+
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, pinComposedAgents, reportRewritten, reportReplaced, reportRelocked, reportMoved, reportStoreNotChecked, reportStoreNotCheckedForUpdates, globalProblems, editedConventionFiles, supportsInstallManifest, runYamlInstall, REF_HINT, reportInstalledSoftDeps } from '../chunk-3CRZJR7E.js';
|
|
8
9
|
import { createSpinner } from '../chunk-NESV47MF.js';
|
|
9
|
-
import { getStoreConfig, storeFetch, isStoreAuthenticated, getStoreToken } from '../chunk-
|
|
10
|
-
import { makeSourceCommand, dropVanishedSourceRows, syncProjectSources, divergedSourceClones, uncachedSources } from '../chunk-
|
|
11
|
-
import { manifestEntryRootRefusals, manifestEntryFilesRefusals, libraryAssetRefusals, manifestEntryRenames, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, exitOnLibrarySymlinks, resolveLibraryPublisherDetailed, getStoreIdentity, warnLibraryNameFallback, indexLibrary, warnIgnoredDomainFiles, removedDomainOption, rejectRemovedDomainOption, requireValidPublisherOrExit, exitOnManifestPublisherProblems, exitOnRootSkillLibrary, findAssetManifestFile,
|
|
12
|
-
import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-
|
|
13
|
-
import { getKindRegistry, getKnownKinds } from '../chunk-
|
|
14
|
-
import { logErr, unknownHarnessTargetMessage, S, logOk, setActiveCommand, logInfo, logWarnErr, canonicalHarnessId,
|
|
15
|
-
import {
|
|
16
|
-
import { loadDeclaredPlugins } from '../chunk-2PVYDAFN.js';
|
|
10
|
+
import { getStoreConfig, storeFetch, isStoreAuthenticated, getStoreToken } from '../chunk-SX54OQQT.js';
|
|
11
|
+
import { makeSourceCommand, dropVanishedSourceRows, syncProjectSources, divergedSourceClones, uncachedSources } from '../chunk-SMCG4PMP.js';
|
|
12
|
+
import { manifestEntryRootRefusals, manifestEntryFilesRefusals, libraryAssetRefusals, manifestEntryRenames, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, exitOnLibrarySymlinks, resolveLibraryPublisherDetailed, getStoreIdentity, warnLibraryNameFallback, indexLibrary, warnIgnoredDomainFiles, removedDomainOption, rejectRemovedDomainOption, requireValidPublisherOrExit, exitOnManifestPublisherProblems, exitOnRootSkillLibrary, findAssetManifestFile, checkAssetFileFull, registerLibraryAsset, DOMAIN_REMOVED_HINT, reportLibrarySymlinks, manifestParseErrorText, runAssetChecks, checkAssetFile, rootLevelAssetFileProblem, manifestPublisherProblems, assetEntryRef, exitOnManifestPathProblems, exitOnRootSkillExtraAssets, manifestRequiresProblems, composeRefContext, registeredAssetKeys, duplicateAssetMessage, manifestParseFailureLine, unresolvedManifestDependencies, findEntryManifestFile, unheldRequiresOfFile, warnLegacyBundleFiles, warnUntrackedAssetFiles, manifestKindOfFile, checkComposeKinds } from '../chunk-KDRA6FYE.js';
|
|
13
|
+
import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-Z7HLX4V2.js';
|
|
14
|
+
import { getKindRegistry, getKnownKinds } from '../chunk-U2WPJHRA.js';
|
|
15
|
+
import { logErr, unknownHarnessTargetMessage, S, logOk, setActiveCommand, logInfo, logWarnErr, canonicalHarnessId, noteExperimentalHarness, logWarn, TARGET_DEFAULT_HINT, parseHarnessFilter, requireProjectConfig, deferredWarnings, warnPlaceholderBodies, warnFilesOnlyDelegates, reportLegacyOmpCopies, reportUnknownHarnesses, warnProjectConfig, logNoProject, warnStaleHarnessCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, reportProjectConfig, driverAliasOption, foldDriverFlag, friendlyHarnessError, harnessErrorNotes, agentInstanceErrorLines, formatSoftDepHint, formatRelativeTime, isRecord, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-WW22FS74.js';
|
|
16
|
+
import { loadDeclaredPlugins } from '../chunk-T65N4CIZ.js';
|
|
17
17
|
import { LocalSecretsProvider } from '../chunk-ILFGVSTJ.js';
|
|
18
|
-
import { resolveInstanceAgentDir, instanceSessionOverrides,
|
|
19
|
-
import '../chunk-
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
18
|
+
import { resolveInstanceAgentDir, instanceSessionOverrides, loadAgentManifest, manifestModelForHarness, runAgentChat, resolveSessionId, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, hashAgentFiles, instanceForSession, resolveAgentInstance, MarkdownStreamer, createFinalTextFallback, describeComposition } from '../chunk-U6UFPOEK.js';
|
|
19
|
+
import '../chunk-NNJQQYHY.js';
|
|
20
|
+
import '../chunk-Z23I2JA6.js';
|
|
21
|
+
import '../chunk-TVRL3IPZ.js';
|
|
22
|
+
import '../chunk-PD42JZWI.js';
|
|
23
23
|
import '../chunk-WYZXSJBK.js';
|
|
24
|
-
import '../chunk-
|
|
25
|
-
import '../chunk-
|
|
24
|
+
import '../chunk-SMFZ5YGN.js';
|
|
25
|
+
import '../chunk-3A7JUOY2.js';
|
|
26
26
|
import '../chunk-KW37WNXY.js';
|
|
27
27
|
import '../chunk-3MWQKQUB.js';
|
|
28
|
-
import '../chunk-
|
|
28
|
+
import '../chunk-3UYKT62L.js';
|
|
29
29
|
import '../chunk-O7SG5PC2.js';
|
|
30
30
|
import '../chunk-7QBNJTTQ.js';
|
|
31
31
|
import '../chunk-O2SYFJWP.js';
|
|
32
|
-
import '../chunk-
|
|
32
|
+
import '../chunk-CU5WY6HN.js';
|
|
33
33
|
import '../chunk-32NA4TVC.js';
|
|
34
34
|
import '../chunk-W3UDISS2.js';
|
|
35
|
-
import { runFlow, resumeFlow } from '../chunk-
|
|
35
|
+
import { runFlow, resumeFlow } from '../chunk-K4763755.js';
|
|
36
36
|
import '../chunk-4R6DROGN.js';
|
|
37
|
-
import { parseSkillRequirements, validateRequirements } from '../chunk-
|
|
38
|
-
import '../chunk-
|
|
39
|
-
import '../chunk-
|
|
37
|
+
import { parseSkillRequirements, validateRequirements } from '../chunk-M7XIYHWB.js';
|
|
38
|
+
import '../chunk-SFBLZOV5.js';
|
|
39
|
+
import '../chunk-QUIK7L3Z.js';
|
|
40
40
|
import '../chunk-6HTN2UIJ.js';
|
|
41
|
-
import '../chunk-
|
|
42
|
-
import {
|
|
43
|
-
import '../chunk-
|
|
44
|
-
import '../chunk-
|
|
45
|
-
import
|
|
41
|
+
import '../chunk-H3PY5DFL.js';
|
|
42
|
+
import { preflight, detectHarnesses } from '../chunk-PRB67LCK.js';
|
|
43
|
+
import '../chunk-2SSG5B24.js';
|
|
44
|
+
import '../chunk-OD4N5O7V.js';
|
|
45
|
+
import '../chunk-72DYHOO2.js';
|
|
46
46
|
import '../chunk-5KSGZP3E.js';
|
|
47
47
|
import '../chunk-7EKQDY2T.js';
|
|
48
48
|
import '../chunk-HXST2IYJ.js';
|
|
49
49
|
import '../chunk-U7EZ2WSC.js';
|
|
50
|
-
import '../chunk-
|
|
50
|
+
import '../chunk-VFEZUSB6.js';
|
|
51
51
|
import '../chunk-NBAGV6L2.js';
|
|
52
|
-
import '../chunk-
|
|
53
|
-
import
|
|
52
|
+
import '../chunk-PPSSDUN6.js';
|
|
53
|
+
import '../chunk-YKD2MYLU.js';
|
|
54
54
|
import '../chunk-5DE3DGVR.js';
|
|
55
55
|
import '../chunk-7DN6JKP2.js';
|
|
56
|
-
import '../chunk-
|
|
57
|
-
import { listHarnesses } from '../chunk-
|
|
56
|
+
import '../chunk-NAQXDTF3.js';
|
|
57
|
+
import { listHarnesses } from '../chunk-S3UOZBGE.js';
|
|
58
58
|
import '../chunk-G5SUWZEU.js';
|
|
59
|
-
import '../chunk-
|
|
59
|
+
import '../chunk-EGKCKWWE.js';
|
|
60
60
|
import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-6UP2EDFN.js';
|
|
61
61
|
import '../chunk-IFGTRL2I.js';
|
|
62
|
-
import { loadFlow, flowLookupRoots, findFlowFileInRoots, loadAllFlowEntries } from '../chunk-
|
|
62
|
+
import { loadFlow, flowLookupRoots, findFlowFileInRoots, loadAllFlowEntries } from '../chunk-2ZDZJ7XQ.js';
|
|
63
63
|
import '../chunk-WD3L5QSU.js';
|
|
64
64
|
import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, nodeAssets } from '../chunk-7RGTAEG6.js';
|
|
65
65
|
import '../chunk-JPV4WE5L.js';
|
|
66
|
-
import { setLibraryAssetCheck, setRenamedEntryLookup, LibraryEntryError, AssetManager, parseRefTolerant, MissingManifestError, writeHarnessSwitchState, harnessSwitchKeptKey, parseCanonicalLockKey,
|
|
67
|
-
import { CatalogHttpError, OfflineError, libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, addMissingEntryVersions, isGitRepo, ensureGitRepo, conflictingAssetRoot, scanUnlistedAssets, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, getStoreManifestsDir, assertValidLibraryName, unparsableAssetFiles, missingRootAssets, syncManifestWithDisk, renamedLibraryName, storeManifestFile, getDefaultValue, isSecretPlaceholder } from '../chunk-7FXOOUOC.js';
|
|
68
|
-
import { flowFileNameError, SEMVER_RE } from '../chunk-DRUAQ7IY.js';
|
|
69
|
-
import '../chunk-CVUMZTNO.js';
|
|
70
|
-
import '../chunk-F3D25RGM.js';
|
|
71
|
-
import '../chunk-3TXEJN4W.js';
|
|
66
|
+
import { setLibraryAssetCheck, setRenamedEntryLookup, LibraryEntryError, AssetManager, parseRefTolerant, MissingManifestError, writeHarnessSwitchState, harnessSwitchKeptKey, parseCanonicalLockKey, readHarnessSwitchState } from '../chunk-2JUCWMIS.js';
|
|
72
67
|
import '../chunk-ISHJITXJ.js';
|
|
73
68
|
import '../chunk-LNFKL23K.js';
|
|
74
69
|
import '../chunk-JRN5QF4C.js';
|
|
75
70
|
import '../chunk-NUELZWCF.js';
|
|
76
|
-
import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-
|
|
71
|
+
import { installTargetOf, SCAFFOLD_KINDS, assembleAgentPrompt } from '../chunk-MG6QD7GE.js';
|
|
72
|
+
import '../chunk-2PJYJPDE.js';
|
|
77
73
|
import '../chunk-PKE3PXOK.js';
|
|
74
|
+
import { isCompositionError, createCompositionContentSource, compileComposition, agentPromptInput } from '../chunk-4ZNKEDYH.js';
|
|
75
|
+
import { CatalogHttpError, OfflineError, libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, addMissingEntryVersions, isGitRepo, ensureGitRepo, conflictingAssetRoot, scanUnlistedAssets, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, getStoreManifestsDir, assertValidLibraryName, unparsableAssetFiles, missingRootAssets, syncManifestWithDisk, renamedLibraryName, storeManifestFile, getDefaultValue, isSecretPlaceholder } from '../chunk-RPRMD7XV.js';
|
|
76
|
+
import { parseManifestFile, flowFileNameError, SEMVER_RE } from '../chunk-QUPZKTF3.js';
|
|
77
|
+
import '../chunk-ZQPBYLCS.js';
|
|
78
|
+
import '../chunk-F3D25RGM.js';
|
|
79
|
+
import '../chunk-3TXEJN4W.js';
|
|
78
80
|
import '../chunk-LKBRBVVS.js';
|
|
79
81
|
import '../chunk-UQ6LFBPZ.js';
|
|
80
|
-
import { CODEX_IDENTITY_DIR } from '../chunk-
|
|
81
|
-
import {
|
|
82
|
-
import { LockParseError, loadSettings, globalSettingsPath, resolveSettings, projectSettingsPath, saveSettings, WorkspaceYamlEditor, readLock, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, resolveConfiguredHarnessName, FACTORY_SOURCE_URL, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-MEU2HHGV.js';
|
|
82
|
+
import { CODEX_IDENTITY_DIR } from '../chunk-IG4YQ7ER.js';
|
|
83
|
+
import { LockParseError, loadSettings, globalSettingsPath, resolveSettings, projectSettingsPath, saveSettings, modelForHarness, WorkspaceYamlEditor, readLock, resolveLibraryDir, identityFindings, assetPathProblem, checkAgentSkillConformance, resolveSettingsWithSources, resolveConfiguredHarnessName, FACTORY_SOURCE_URL, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-U7P22GEB.js';
|
|
83
84
|
import '../chunk-4GY63JU6.js';
|
|
84
|
-
import { factoryAssetRoots } from '../chunk-
|
|
85
|
+
import { factoryAssetRoots } from '../chunk-ETGC2MEM.js';
|
|
85
86
|
import { deployedPaths, deployedBase, deployedDir } from '../chunk-5KRMNUL4.js';
|
|
86
87
|
import { DEFAULT_HARNESS_ID, HARNESS_DEFAULTS } from '../chunk-C5HFK34M.js';
|
|
87
88
|
import { findKindDirs } from '../chunk-MWXYN6NY.js';
|
|
88
|
-
import { SourceEntryError, LegacyKeyError, ConfigParseError, resolveSkWorkspaceConfig, unselectedInstanceIds, instanceChoiceText, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, effectiveAgentInstances,
|
|
89
|
+
import { SourceEntryError, LegacyKeyError, ConfigParseError, resolveSkWorkspaceConfig, unselectedInstanceIds, instanceChoiceText, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, repoIdentity, resolveAgentDefinitionDir, effectiveAgentInstances, sameRepo, matchPin, coerceVersion, loadSkWorkspaceConfig, configParseErrorOf, findWorkspaceRoot, isWorkspaceConfigFilename, SKAILE_YAML_DEFAULT, AGENT_PROFILE_FIELDS } from '../chunk-BRAOB37W.js';
|
|
89
90
|
import { globalCacheRoot, globalSkaileDir, userConfigPath } from '../chunk-L5VSIPQD.js';
|
|
90
91
|
import { HARNESS_TARGETS, SUPPORTED_HARNESSES, harnessNameForHarnessId } from '../chunk-VTETQCR6.js';
|
|
91
|
-
import { loadSkPublishManifest, SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, LIBRARY_GITIGNORE, librarySymlinkMessage, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-
|
|
92
|
-
import { setWalkTruncationSink, dedupeRequirements, parseFrontmatter, scanDirectory, parseRequires } from '../chunk-
|
|
92
|
+
import { loadSkPublishManifest, SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, LIBRARY_GITIGNORE, librarySymlinkMessage, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-PMXTBWFD.js';
|
|
93
|
+
import { setWalkTruncationSink, dedupeRequirements, parseFrontmatter, scanDirectory, parseRequires } from '../chunk-2MTRRK37.js';
|
|
93
94
|
import { pluginTitle } from '../chunk-RVRB27AN.js';
|
|
94
|
-
import { parseAssetRef, isValidAssetName,
|
|
95
|
+
import { parseAssetRef, isValidAssetName, depToStr, assetRefToStr, slugifyAssetName, parseAssetRefLoose } from '../chunk-HW4BDJPC.js';
|
|
96
|
+
import { effectiveComposes, validatePreset, validateAgent, composeSlotDiagnostics, agentDeprecationDiagnostics, SLOT_ID_PATTERN } from '../chunk-LCXQ4LVP.js';
|
|
95
97
|
import { portableSpawn, portableSpawnSync } from '../chunk-VSX2G7LA.js';
|
|
96
98
|
import { parseModelRef, resolveEntryBaseUrl } from '../chunk-RXGPFAMN.js';
|
|
97
99
|
import { RUN_STATE_GITIGNORE_ENTRIES, openSqlite } from '../chunk-RZL4TOK3.js';
|
|
@@ -134,6 +136,30 @@ function truncateText(text, max) {
|
|
|
134
136
|
if (max <= 1) return "\u2026".slice(0, Math.max(0, max));
|
|
135
137
|
return `${flat.slice(0, max - 1).trimEnd()}\u2026`;
|
|
136
138
|
}
|
|
139
|
+
function wrapText(text, width) {
|
|
140
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
141
|
+
if (flat === "") return [];
|
|
142
|
+
const lines = [];
|
|
143
|
+
let line = "";
|
|
144
|
+
for (let word of flat.split(" ")) {
|
|
145
|
+
while (word.length > width) {
|
|
146
|
+
if (line !== "") {
|
|
147
|
+
lines.push(line);
|
|
148
|
+
line = "";
|
|
149
|
+
}
|
|
150
|
+
lines.push(word.slice(0, width));
|
|
151
|
+
word = word.slice(width);
|
|
152
|
+
}
|
|
153
|
+
if (line === "") line = word;
|
|
154
|
+
else if (line.length + 1 + word.length <= width) line = `${line} ${word}`;
|
|
155
|
+
else {
|
|
156
|
+
lines.push(line);
|
|
157
|
+
line = word;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (line !== "") lines.push(line);
|
|
161
|
+
return lines;
|
|
162
|
+
}
|
|
137
163
|
function localEntryRef(e) {
|
|
138
164
|
return e.publisher ? `${e.kind}:@${e.publisher}/${e.name}` : e.name;
|
|
139
165
|
}
|
|
@@ -241,7 +267,7 @@ async function runSearch(kind, query, opts) {
|
|
|
241
267
|
}
|
|
242
268
|
}
|
|
243
269
|
async function searchIndex(query, kind, projectDir) {
|
|
244
|
-
const { openLibrary: openLibrary2 } = await import('../open-library-
|
|
270
|
+
const { openLibrary: openLibrary2 } = await import('../open-library-FVV6GG4I.js');
|
|
245
271
|
const library = await openLibrary2();
|
|
246
272
|
try {
|
|
247
273
|
const { libraryDirMissing: libraryDirMissing2 } = await import('../library/index.js');
|
|
@@ -417,14 +443,14 @@ async function withAddVersions(entries, projectDir) {
|
|
|
417
443
|
}
|
|
418
444
|
async function searchLocal(query, kind, opts, showStore, airGapped) {
|
|
419
445
|
const projectDir = path19__default.resolve(opts.projectDir);
|
|
420
|
-
const { restoreSourceReaders } = await import('../source-
|
|
446
|
+
const { restoreSourceReaders } = await import('../source-J2MJIHDS.js');
|
|
421
447
|
for (const name of await restoreSourceReaders(projectDir)) {
|
|
422
448
|
logInfo(`Re-registered source "${name}" (its library entry was removed elsewhere).`);
|
|
423
449
|
}
|
|
424
450
|
const factory = await searchFactory(projectDir, query, kind);
|
|
425
451
|
let entries = unionEntries(await searchIndex(query, kind, projectDir), factory);
|
|
426
452
|
if (entries.length === 0 && !query && !kind && !airGapped) {
|
|
427
|
-
const { autoSyncForSearch } = await import('../source-
|
|
453
|
+
const { autoSyncForSearch } = await import('../source-J2MJIHDS.js');
|
|
428
454
|
if (await autoSyncForSearch(projectDir)) {
|
|
429
455
|
entries = unionEntries(await searchIndex(query, kind, projectDir), factory);
|
|
430
456
|
}
|
|
@@ -478,7 +504,7 @@ function layoutLocalTable(rows, width, style = {}) {
|
|
|
478
504
|
}
|
|
479
505
|
return { ruleWidth: nameW + gap + descW + tailSpan, lines };
|
|
480
506
|
}
|
|
481
|
-
const stackedW = width - (indent + 2)
|
|
507
|
+
const stackedW = width - (indent + 2);
|
|
482
508
|
const stackable = stackedW >= MIN_LOCAL_DESCRIPTION_WIDTH && rows.some((r) => r.description !== "");
|
|
483
509
|
if (!stackable && indent + nameW + tailSpan <= width) {
|
|
484
510
|
for (const r of rows) {
|
|
@@ -487,17 +513,18 @@ function layoutLocalTable(rows, width, style = {}) {
|
|
|
487
513
|
return { ruleWidth: nameW + tailSpan, lines };
|
|
488
514
|
}
|
|
489
515
|
const subPad = " ".repeat(indent + 2);
|
|
490
|
-
const subDescW = width - (indent + 2) - tailSpan;
|
|
491
516
|
for (const r of rows) {
|
|
492
517
|
lines.push(`${pad}${styleRef(r.ref)}`);
|
|
493
|
-
const
|
|
494
|
-
const
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
518
|
+
const body = stackedW >= MIN_LOCAL_DESCRIPTION_WIDTH ? wrapText(r.description, stackedW) : [];
|
|
519
|
+
const plainTail = [r.version, r.library ?? ""].filter((s) => s !== "").join(COLUMN_GAP);
|
|
520
|
+
const styledTail = [r.version ? styleVer(r.version) : "", r.library ? styleLib(r.library) : ""].filter((s) => s !== "").join(COLUMN_GAP);
|
|
521
|
+
const last = body.at(-1);
|
|
522
|
+
if (plainTail !== "" && last !== void 0 && last.length + gap + plainTail.length <= stackedW) {
|
|
523
|
+
body[body.length - 1] = `${last}${COLUMN_GAP}${styledTail}`;
|
|
524
|
+
} else if (plainTail !== "") {
|
|
525
|
+
body.push(styledTail);
|
|
526
|
+
}
|
|
527
|
+
for (const text of body) lines.push(`${subPad}${text}`);
|
|
501
528
|
}
|
|
502
529
|
return { ruleWidth: Math.max(1, Math.min(nameW, width - indent)), lines };
|
|
503
530
|
}
|
|
@@ -544,7 +571,7 @@ async function searchStore(query, kind, opts, airGapped) {
|
|
|
544
571
|
logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
|
|
545
572
|
return "skipped";
|
|
546
573
|
}
|
|
547
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
574
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-FVV6GG4I.js');
|
|
548
575
|
try {
|
|
549
576
|
const remote = await openCatalogSource2({ projectDir: path19__default.resolve(opts.projectDir) });
|
|
550
577
|
const assets = await remote.listAssets(kind ? { kind } : {});
|
|
@@ -1154,7 +1181,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
1154
1181
|
return { entry: match ?? deployed, deployed: true };
|
|
1155
1182
|
}
|
|
1156
1183
|
const lookup = opts.storeLookup ?? (async (filter) => {
|
|
1157
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
1184
|
+
const { resolveCatalogSource } = await import('../open-library-FVV6GG4I.js');
|
|
1158
1185
|
const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
|
|
1159
1186
|
try {
|
|
1160
1187
|
return await source.listAssets(filter);
|
|
@@ -1170,7 +1197,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
1170
1197
|
);
|
|
1171
1198
|
return { entry: hit ? catalogAssetToEntry(hit) : null };
|
|
1172
1199
|
} catch (err) {
|
|
1173
|
-
const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
1200
|
+
const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-FVV6GG4I.js');
|
|
1174
1201
|
const storeNote = err instanceof Error ? err.message : String(err);
|
|
1175
1202
|
const disabled = err instanceof LocalCatalogDisabledError2 || /catalog\.url/i.test(storeNote);
|
|
1176
1203
|
return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
|
|
@@ -1305,13 +1332,18 @@ function makeDoctorCommand() {
|
|
|
1305
1332
|
projectDir: path19__default.resolve(opts.projectDir)
|
|
1306
1333
|
});
|
|
1307
1334
|
const { gaps } = await am2.projectState();
|
|
1308
|
-
const edited =
|
|
1335
|
+
const edited = [
|
|
1336
|
+
...await editedConventionFiles(path19__default.resolve(opts.projectDir)),
|
|
1337
|
+
...await am2.staleAgentFileLines()
|
|
1338
|
+
];
|
|
1309
1339
|
const notices = [
|
|
1310
1340
|
...(await am2.mcpNotices()).map((n) => n.text),
|
|
1311
1341
|
// A library that went back past the lock is no drift either (p1257).
|
|
1312
1342
|
...await am2.libraryOlderNotices(),
|
|
1313
1343
|
// An asset-named agent file an instance's file replaced: the next install removes it.
|
|
1314
|
-
...am2.leftoverAgentFileNotices()
|
|
1344
|
+
...am2.leftoverAgentFileNotices(),
|
|
1345
|
+
// An agent whose `extends` parent is not there: said once at `add`, then here (v16-D11).
|
|
1346
|
+
...am2.missingParentNotices()
|
|
1315
1347
|
];
|
|
1316
1348
|
await am2.probeStoreOrigins();
|
|
1317
1349
|
const notChecked = am2.takeStoreNotChecked();
|
|
@@ -1462,6 +1494,38 @@ function withCanonicalRef(def) {
|
|
|
1462
1494
|
const { id: _storageId, ...rest } = def;
|
|
1463
1495
|
return { ref: catalogAssetRef(def), ...rest };
|
|
1464
1496
|
}
|
|
1497
|
+
function migrateSourceProblems(srcPath) {
|
|
1498
|
+
const root = path19.resolve(srcPath);
|
|
1499
|
+
const isFile2 = fs8.statSync(root).isFile();
|
|
1500
|
+
const registry = getKindRegistry();
|
|
1501
|
+
const candidates = isFile2 ? [{ filePath: root, kind: manifestKindOfFile(root) }] : findManifestCandidates(root);
|
|
1502
|
+
const lines = [];
|
|
1503
|
+
for (const c of candidates) {
|
|
1504
|
+
if (c.kind === void 0) continue;
|
|
1505
|
+
const rel = path19.relative(isFile2 ? path19.dirname(root) : root, c.filePath);
|
|
1506
|
+
let text;
|
|
1507
|
+
try {
|
|
1508
|
+
text = fs8.readFileSync(c.filePath, "utf-8");
|
|
1509
|
+
} catch {
|
|
1510
|
+
continue;
|
|
1511
|
+
}
|
|
1512
|
+
const parsed = parseManifestFile(c.filePath, text);
|
|
1513
|
+
if (!parsed.ok) {
|
|
1514
|
+
lines.push(`${rel} [${c.kind}] \u2014 ${manifestParseErrorText(parsed.reason)}`);
|
|
1515
|
+
continue;
|
|
1516
|
+
}
|
|
1517
|
+
for (const f of checkAssetFile(
|
|
1518
|
+
"migrate",
|
|
1519
|
+
c.filePath,
|
|
1520
|
+
c.kind,
|
|
1521
|
+
registry,
|
|
1522
|
+
isFile2 ? path19.dirname(root) : root
|
|
1523
|
+
)) {
|
|
1524
|
+
lines.push(`${rel} [${f.tag}] \u2014 ${f.text}`);
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
return lines;
|
|
1528
|
+
}
|
|
1465
1529
|
function resolveLibraryOption(opts) {
|
|
1466
1530
|
if (opts.library && opts.to && opts.library !== opts.to) {
|
|
1467
1531
|
logErr(
|
|
@@ -1541,23 +1605,32 @@ function makeAssetCommand() {
|
|
|
1541
1605
|
process.exit(1);
|
|
1542
1606
|
}
|
|
1543
1607
|
const importedFm = parseFrontmatter(norm.content);
|
|
1544
|
-
const
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
getKindRegistry(),
|
|
1550
|
-
norm.content
|
|
1551
|
-
);
|
|
1552
|
-
const refusals = [...checked.errors, ...checked.advisories.filter((f) => f.scaffoldBody)];
|
|
1553
|
-
if (refusals.length > 0) {
|
|
1554
|
-
for (const f of refusals) logErr(`${norm.name}/SKILL.md [${f.tag}] \u2014 ${f.text}`);
|
|
1608
|
+
const importedParse = parseManifestFile(src.skillFile, norm.content);
|
|
1609
|
+
if (!importedParse.ok) {
|
|
1610
|
+
logErr(
|
|
1611
|
+
`${norm.name}/SKILL.md [skill] \u2014 ${manifestParseErrorText(importedParse.reason)}`
|
|
1612
|
+
);
|
|
1555
1613
|
logErr(
|
|
1556
|
-
`Not imported:
|
|
1614
|
+
`Not imported: SKILL.md does not parse. Fix it in ${src.skillFile} and run the import again.`
|
|
1557
1615
|
);
|
|
1558
1616
|
process.exit(1);
|
|
1559
1617
|
}
|
|
1560
|
-
|
|
1618
|
+
const checked = runAssetChecks("import", {
|
|
1619
|
+
kind: "skill",
|
|
1620
|
+
parsed: importedFm.data,
|
|
1621
|
+
body: importedFm.body,
|
|
1622
|
+
dirName: norm.name,
|
|
1623
|
+
registry: getKindRegistry(),
|
|
1624
|
+
rawText: norm.content
|
|
1625
|
+
});
|
|
1626
|
+
if (checked.errors.length > 0) {
|
|
1627
|
+
for (const f of checked.errors) logErr(`${norm.name}/SKILL.md [${f.tag}] \u2014 ${f.text}`);
|
|
1628
|
+
logErr(
|
|
1629
|
+
`Not imported: ${checked.errors.length} problem(s) in SKILL.md. Fix them in ${src.skillFile} (or drop --no-normalize) and run the import again.`
|
|
1630
|
+
);
|
|
1631
|
+
process.exit(1);
|
|
1632
|
+
}
|
|
1633
|
+
for (const f of checked.warnings) {
|
|
1561
1634
|
logWarn(`${norm.name}/SKILL.md [${f.tag}] \u2014 ${f.text}`);
|
|
1562
1635
|
}
|
|
1563
1636
|
fs8.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
|
|
@@ -1641,6 +1714,14 @@ function makeAssetCommand() {
|
|
|
1641
1714
|
);
|
|
1642
1715
|
process.exit(1);
|
|
1643
1716
|
}
|
|
1717
|
+
const migrateProblems = migrateSourceProblems(srcPath);
|
|
1718
|
+
if (migrateProblems.length > 0) {
|
|
1719
|
+
for (const line of migrateProblems) logErr(line);
|
|
1720
|
+
logErr(
|
|
1721
|
+
`Not migrated: ${migrateProblems.length} problem(s) in ${srcPath}. Fix them there and run the migrate again.`
|
|
1722
|
+
);
|
|
1723
|
+
process.exit(1);
|
|
1724
|
+
}
|
|
1644
1725
|
switch (opts.mode) {
|
|
1645
1726
|
case "copy":
|
|
1646
1727
|
fs8.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
|
|
@@ -1827,9 +1908,9 @@ function dirSizeOfDir(dir) {
|
|
|
1827
1908
|
return total;
|
|
1828
1909
|
}
|
|
1829
1910
|
function removeCacheTargets(targets, opts) {
|
|
1830
|
-
const
|
|
1831
|
-
for (const t of
|
|
1832
|
-
return
|
|
1911
|
+
const present = targets.filter((t) => existsSync(t));
|
|
1912
|
+
for (const t of present) rmSync(t, { recursive: true, force: true });
|
|
1913
|
+
return present;
|
|
1833
1914
|
}
|
|
1834
1915
|
function fmtBytes(n) {
|
|
1835
1916
|
const u = ["B", "KB", "MB", "GB"];
|
|
@@ -1932,7 +2013,7 @@ function makeCatalogCommand() {
|
|
|
1932
2013
|
return catalog;
|
|
1933
2014
|
}
|
|
1934
2015
|
async function runLocalCatalogTest(projectDir) {
|
|
1935
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
2016
|
+
const { resolveCatalogSource } = await import('../open-library-FVV6GG4I.js');
|
|
1936
2017
|
let resolved;
|
|
1937
2018
|
try {
|
|
1938
2019
|
resolved = await resolveCatalogSource({ projectDir });
|
|
@@ -2108,7 +2189,7 @@ async function scanLibraryFlowEntries() {
|
|
|
2108
2189
|
const { LocalIndex, resolveIndexPath, scanAuthoringLibraries } = await import('../library/index.js');
|
|
2109
2190
|
const indexPath = resolveIndexPath();
|
|
2110
2191
|
if (!existsSync(indexPath)) return entries;
|
|
2111
|
-
const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-
|
|
2192
|
+
const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-VX2BVMS5.js');
|
|
2112
2193
|
const index = new LocalIndex({ indexPath });
|
|
2113
2194
|
try {
|
|
2114
2195
|
for (const { library, assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
|
|
@@ -2536,22 +2617,27 @@ function makeConfigCommand() {
|
|
|
2536
2617
|
if (key === "harness") {
|
|
2537
2618
|
value = canonicalHarnessId(value);
|
|
2538
2619
|
await loadDeclaredPlugins(projectDir);
|
|
2539
|
-
const unknown =
|
|
2620
|
+
const [unknown] = await preflight({ projectDir }, value, void 0, void 0, {
|
|
2621
|
+
checks: ["harness"]
|
|
2622
|
+
});
|
|
2540
2623
|
if (unknown) {
|
|
2541
|
-
logErr(unknown);
|
|
2624
|
+
logErr(unknown.line);
|
|
2542
2625
|
process.exit(1);
|
|
2543
2626
|
}
|
|
2627
|
+
noteExperimentalHarness(value);
|
|
2544
2628
|
}
|
|
2545
2629
|
if (key === "model") {
|
|
2546
2630
|
await loadDeclaredPlugins(projectDir);
|
|
2547
2631
|
const harness = (await resolveSettings(projectDir)).harness ?? DEFAULT_HARNESS_ID;
|
|
2548
|
-
const refusal2 =
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2632
|
+
const [refusal2] = await preflight(
|
|
2633
|
+
{ projectDir, roles: resolveSkWorkspaceConfig(projectDir).roles },
|
|
2634
|
+
harness,
|
|
2635
|
+
value,
|
|
2636
|
+
void 0,
|
|
2637
|
+
{ checks: ["refusal"] }
|
|
2638
|
+
);
|
|
2553
2639
|
if (refusal2) {
|
|
2554
|
-
logErr(`${refusal2} (the project's harness is ${harness})`);
|
|
2640
|
+
logErr(`${refusal2.line} (the project's harness is ${harness})`);
|
|
2555
2641
|
process.exit(1);
|
|
2556
2642
|
}
|
|
2557
2643
|
}
|
|
@@ -2716,11 +2802,11 @@ function makeConnectCommand() {
|
|
|
2716
2802
|
process.exitCode = 1;
|
|
2717
2803
|
return;
|
|
2718
2804
|
}
|
|
2719
|
-
await new Promise((
|
|
2805
|
+
await new Promise((resolve5) => {
|
|
2720
2806
|
client.onMessage((event) => {
|
|
2721
2807
|
console.log(formatEvent(event));
|
|
2722
2808
|
if (event.type === "finished" || event.type === "debug_result") {
|
|
2723
|
-
|
|
2809
|
+
resolve5();
|
|
2724
2810
|
}
|
|
2725
2811
|
});
|
|
2726
2812
|
client.send(parsed);
|
|
@@ -2764,12 +2850,12 @@ function makeConnectCommand() {
|
|
|
2764
2850
|
client.send(cmd);
|
|
2765
2851
|
rl.prompt();
|
|
2766
2852
|
});
|
|
2767
|
-
await new Promise((
|
|
2768
|
-
rl.on("close",
|
|
2853
|
+
await new Promise((resolve5) => {
|
|
2854
|
+
rl.on("close", resolve5);
|
|
2769
2855
|
client.onDisconnect(() => {
|
|
2770
2856
|
logErr("Server disconnected");
|
|
2771
2857
|
rl.close();
|
|
2772
|
-
|
|
2858
|
+
resolve5();
|
|
2773
2859
|
});
|
|
2774
2860
|
});
|
|
2775
2861
|
await client.disconnect();
|
|
@@ -2865,15 +2951,15 @@ function parseOpArgs(args) {
|
|
|
2865
2951
|
async function promptText(label, defaultVal) {
|
|
2866
2952
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
2867
2953
|
const hint = defaultVal ? ` [${defaultVal}]` : "";
|
|
2868
|
-
return new Promise((
|
|
2954
|
+
return new Promise((resolve5) => {
|
|
2869
2955
|
rl.question(` ${label}${hint}: `, (answer) => {
|
|
2870
2956
|
rl.close();
|
|
2871
|
-
|
|
2957
|
+
resolve5(answer.trim() || defaultVal || "");
|
|
2872
2958
|
});
|
|
2873
2959
|
});
|
|
2874
2960
|
}
|
|
2875
2961
|
async function promptSecret(label) {
|
|
2876
|
-
return new Promise((
|
|
2962
|
+
return new Promise((resolve5) => {
|
|
2877
2963
|
process.stdout.write(` ${label} (hidden): `);
|
|
2878
2964
|
const stdin = process.stdin;
|
|
2879
2965
|
stdin.setRawMode?.(true);
|
|
@@ -2886,7 +2972,7 @@ async function promptSecret(label) {
|
|
|
2886
2972
|
stdin.pause();
|
|
2887
2973
|
stdin.removeListener("data", onData);
|
|
2888
2974
|
process.stdout.write("\n");
|
|
2889
|
-
|
|
2975
|
+
resolve5(value);
|
|
2890
2976
|
} else if (char === "") {
|
|
2891
2977
|
process.exit(1);
|
|
2892
2978
|
} else if (char === "\x7F") {
|
|
@@ -3186,17 +3272,17 @@ async function runDebugQuery(query, parentOpts, args) {
|
|
|
3186
3272
|
process.exitCode = 1;
|
|
3187
3273
|
return;
|
|
3188
3274
|
}
|
|
3189
|
-
await new Promise((
|
|
3275
|
+
await new Promise((resolve5) => {
|
|
3190
3276
|
const timeout = setTimeout(() => {
|
|
3191
3277
|
logErr("Timeout: no debug_result received within 5s");
|
|
3192
3278
|
process.exitCode = 1;
|
|
3193
|
-
|
|
3279
|
+
resolve5();
|
|
3194
3280
|
}, 5e3);
|
|
3195
3281
|
client.onMessage((event) => {
|
|
3196
3282
|
if (event.type !== "debug_result") return;
|
|
3197
3283
|
clearTimeout(timeout);
|
|
3198
3284
|
printDebugResult(query, event.data);
|
|
3199
|
-
|
|
3285
|
+
resolve5();
|
|
3200
3286
|
});
|
|
3201
3287
|
client.send({ type: "debug", query, args });
|
|
3202
3288
|
});
|
|
@@ -3297,7 +3383,7 @@ async function ensureTargetsRegistered(projectDir) {
|
|
|
3297
3383
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
3298
3384
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
3299
3385
|
if (config.plugins && config.plugins.length > 0) {
|
|
3300
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
3386
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-MVTW6G7J.js');
|
|
3301
3387
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
3302
3388
|
for (const f of result.failed) logWarn(f.error);
|
|
3303
3389
|
}
|
|
@@ -3340,12 +3426,12 @@ async function runUp(opts) {
|
|
|
3340
3426
|
await holdUntilSignal(handle, controller);
|
|
3341
3427
|
}
|
|
3342
3428
|
function holdUntilSignal(handle, controller) {
|
|
3343
|
-
return new Promise((
|
|
3429
|
+
return new Promise((resolve5) => {
|
|
3344
3430
|
const onSig = () => {
|
|
3345
3431
|
process.removeListener("SIGINT", onSig);
|
|
3346
3432
|
controller.abort();
|
|
3347
3433
|
logInfo("Stopping\u2026");
|
|
3348
|
-
handle.stop().then(() => logOk("Stopped.")).catch((e) => logErr(`stop failed: ${e instanceof Error ? e.message : String(e)}`)).finally(() =>
|
|
3434
|
+
handle.stop().then(() => logOk("Stopped.")).catch((e) => logErr(`stop failed: ${e instanceof Error ? e.message : String(e)}`)).finally(() => resolve5());
|
|
3349
3435
|
};
|
|
3350
3436
|
process.on("SIGINT", onSig);
|
|
3351
3437
|
});
|
|
@@ -3582,6 +3668,12 @@ function makeHarnessCommand() {
|
|
|
3582
3668
|
).action(async (name, opts) => {
|
|
3583
3669
|
await runHarnessSet(name, path19__default.resolve(opts.projectDir), opts);
|
|
3584
3670
|
});
|
|
3671
|
+
cmd.command("list").description(
|
|
3672
|
+
"List the harnesses run, repl and config set harness take, and whether the release tests cover them"
|
|
3673
|
+
).option("--project-dir <path>", "Project directory", process.cwd()).option("--json", "Machine-readable output").action(async (opts) => {
|
|
3674
|
+
await loadDeclaredPlugins(path19__default.resolve(opts.projectDir));
|
|
3675
|
+
runHarnessList(opts);
|
|
3676
|
+
});
|
|
3585
3677
|
cmd.command("status").description("Report each harness's installed program, version, SDK and login").option(
|
|
3586
3678
|
"--project-dir <path>",
|
|
3587
3679
|
"Project whose node_modules the SDK probe looks in",
|
|
@@ -3592,6 +3684,34 @@ function makeHarnessCommand() {
|
|
|
3592
3684
|
helpOnBareGroup(cmd);
|
|
3593
3685
|
return cmd;
|
|
3594
3686
|
}
|
|
3687
|
+
function runHarnessList(opts) {
|
|
3688
|
+
const rows = listHarnesses().map((h) => ({
|
|
3689
|
+
id: h.id,
|
|
3690
|
+
name: h.name,
|
|
3691
|
+
stability: h.stability ?? null
|
|
3692
|
+
}));
|
|
3693
|
+
if (opts.json) {
|
|
3694
|
+
console.log(JSON.stringify(rows, null, 2));
|
|
3695
|
+
return;
|
|
3696
|
+
}
|
|
3697
|
+
const cols = [
|
|
3698
|
+
{ header: "harness", cell: (r) => r.id },
|
|
3699
|
+
{ header: "stability", cell: (r) => r.stability ?? "-" },
|
|
3700
|
+
{ header: "name", cell: (r) => r.name }
|
|
3701
|
+
];
|
|
3702
|
+
const widths = cols.map((c) => Math.max(c.header.length, ...rows.map((r) => c.cell(r).length)));
|
|
3703
|
+
const fmt = (parts) => parts.map((p6, i) => p6.padEnd(widths[i] ?? p6.length)).join(" ");
|
|
3704
|
+
console.log();
|
|
3705
|
+
console.log(` ${S.heading(fmt(cols.map((c) => c.header)))}`);
|
|
3706
|
+
for (const r of rows) console.log(` ${fmt(cols.map((c) => c.cell(r)))}`);
|
|
3707
|
+
console.log();
|
|
3708
|
+
if (rows.some((r) => r.stability === "experimental")) {
|
|
3709
|
+
console.log(
|
|
3710
|
+
` ${S.dim("experimental: not covered by the release tests (smoke only: run --dry-run)")}`
|
|
3711
|
+
);
|
|
3712
|
+
console.log();
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
3595
3715
|
function loginSuffix(login) {
|
|
3596
3716
|
if (!login) return "";
|
|
3597
3717
|
if (login.status === "ok") return ` login: ok${login.detail ? ` (${login.detail})` : ""}`;
|
|
@@ -4542,7 +4662,7 @@ async function reindexLibrary(lib, library, name) {
|
|
|
4542
4662
|
resolved.publisher
|
|
4543
4663
|
);
|
|
4544
4664
|
const { removed, unknownKind, skipped, failed, renamed, superseded, versionAdded } = await syncManifestWithDisk(lib.path, resolved.publisher, registry, {
|
|
4545
|
-
check: (e) => checkAssetFile(e.source, e.kind, registry, lib.path, composeRefs),
|
|
4665
|
+
check: (e) => checkAssetFile("index", e.source, e.kind, registry, lib.path, composeRefs),
|
|
4546
4666
|
// A flow the engine would never load under its id (p871): keep it out of the manifest and the index.
|
|
4547
4667
|
refuse: (e) => e.kind === "flow" && flowFileNameError({ id: e.name }, path19.basename(e.source)) !== void 0
|
|
4548
4668
|
});
|
|
@@ -4565,14 +4685,12 @@ async function reindexLibrary(lib, library, name) {
|
|
|
4565
4685
|
reportVersionsAdded(versionAdded, manifest);
|
|
4566
4686
|
const invalidVersion = skipped.filter((x) => x.reason === "invalid-version");
|
|
4567
4687
|
for (const s of invalidVersion) {
|
|
4568
|
-
const
|
|
4569
|
-
(f) => f.text
|
|
4570
|
-
);
|
|
4571
|
-
const detail = found?.text ?? s.detail;
|
|
4572
|
-
const hint = detail.includes("Write it quoted") ? "" : " Set a valid `metadata.version` (e.g. 0.1.0).";
|
|
4573
|
-
logErr(
|
|
4574
|
-
`${s.kind}:${s.name} skipped: ${detail}.${hint} Re-run \`skaile library index ${name}\` after the fix.`
|
|
4688
|
+
const lines = checkAssetFile("index", path19.join(lib.path, s.file), s.kind, registry).map(
|
|
4689
|
+
(f) => `${s.file} [${f.tag}] \u2014 ${f.text}`
|
|
4575
4690
|
);
|
|
4691
|
+
for (const line of lines.length > 0 ? lines : [`${s.file} [${s.kind}] \u2014 ${s.detail}`]) {
|
|
4692
|
+
logErr(line);
|
|
4693
|
+
}
|
|
4576
4694
|
}
|
|
4577
4695
|
const duplicates = skipped.filter((x) => x.reason === "duplicate");
|
|
4578
4696
|
for (const s of duplicates) {
|
|
@@ -4614,8 +4732,13 @@ async function reindexLibrary(lib, library, name) {
|
|
|
4614
4732
|
if (a.source) continue;
|
|
4615
4733
|
const file = findEntryManifestFile(lib.path, a);
|
|
4616
4734
|
if (!file) continue;
|
|
4735
|
+
const rel = path19.relative(lib.path, file);
|
|
4617
4736
|
for (const f of unheldRequiresOfFile(file, a.kind, composeRefs)) {
|
|
4618
|
-
logWarn(`${
|
|
4737
|
+
logWarn(`${rel} [${f.tag}] \u2014 ${f.text}`);
|
|
4738
|
+
}
|
|
4739
|
+
const checked = checkAssetFileFull("index", file, a.kind, registry, lib.path, composeRefs);
|
|
4740
|
+
for (const f of checked.warnings.filter((w) => w.unheldRef === void 0)) {
|
|
4741
|
+
logWarn(`${rel} [${f.tag}] \u2014 ${f.text}`);
|
|
4619
4742
|
}
|
|
4620
4743
|
}
|
|
4621
4744
|
const skippedUnparsable = unparsable.length + syncUnparsable.length;
|
|
@@ -4656,10 +4779,30 @@ async function reindexLibrary(lib, library, name) {
|
|
|
4656
4779
|
async function indexPulledLibrary(lib, library, name) {
|
|
4657
4780
|
const res = await indexLibrary(lib, library);
|
|
4658
4781
|
for (const e of res.errors) logWarn(e);
|
|
4782
|
+
warnDanglingEntries(res.errors, lib, name);
|
|
4659
4783
|
logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
|
|
4660
4784
|
warnUnlistedAssets(await countUnlistedAssets(lib.path), name, lib.ownership);
|
|
4661
4785
|
warnIgnoredDomainFiles(lib.path);
|
|
4662
4786
|
}
|
|
4787
|
+
function warnDanglingEntries(errors, lib, name) {
|
|
4788
|
+
const reader = lib.ownership === "reader";
|
|
4789
|
+
let missing = false;
|
|
4790
|
+
for (const e of errors) {
|
|
4791
|
+
const root = /root "(.*)" contains no files$/.exec(e)?.[1];
|
|
4792
|
+
if (root === void 0) continue;
|
|
4793
|
+
if (!fs8.existsSync(path19.resolve(lib.path, root))) {
|
|
4794
|
+
missing = true;
|
|
4795
|
+
continue;
|
|
4796
|
+
}
|
|
4797
|
+
logWarn(
|
|
4798
|
+
reader ? `Ask the owner: root "${root}" holds no files; add the asset's files, or drop the entry.` : `root "${root}" holds no files: add the asset's files, or drop the entry.`
|
|
4799
|
+
);
|
|
4800
|
+
}
|
|
4801
|
+
if (!missing) return;
|
|
4802
|
+
logWarn(
|
|
4803
|
+
reader ? `Ask the owner to push the folder(s) or drop the entry from ${SKAILE_MANIFEST_FILENAME}, then run \`skaile library pull ${name}\`; \`add\` of those assets fails until then.` : `A manifest entry has no folder; run \`skaile library index ${name}\` to drop it from ${SKAILE_MANIFEST_FILENAME}.`
|
|
4804
|
+
);
|
|
4805
|
+
}
|
|
4663
4806
|
function warnUnlistedAssets(unlisted, name, ownership) {
|
|
4664
4807
|
if (unlisted === 0) return;
|
|
4665
4808
|
const fix = ownership !== "reader" ? `run \`skaile library index ${name}\`.` : `add them to ${SKAILE_MANIFEST_FILENAME} in the source repo and pull, or, for your own repo, run \`skaile library set ${name} ownership=owner\` and then \`skaile library index ${name}\`.`;
|
|
@@ -5007,7 +5150,7 @@ function remoteBranches(url) {
|
|
|
5007
5150
|
return r.stdout.split("\n").map((line) => line.split(" ")[1]?.replace(/^refs\/heads\//, "")).filter((b) => !!b);
|
|
5008
5151
|
}
|
|
5009
5152
|
async function warnIfNotGithubRemote(name, url) {
|
|
5010
|
-
const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-
|
|
5153
|
+
const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-YHYGA6G5.js');
|
|
5011
5154
|
if (!isGithubRemote(url)) logWarn(notGithubRemoteMessage(name, url));
|
|
5012
5155
|
}
|
|
5013
5156
|
function scaffoldLibraryFiles(dir, name) {
|
|
@@ -5059,7 +5202,7 @@ async function refuseRemoteOfSource(manager, url) {
|
|
|
5059
5202
|
const libraries = await manager.listLibraries();
|
|
5060
5203
|
const cacheRoot = path19.resolve(getGlobalCacheDir()) + path19.sep;
|
|
5061
5204
|
const clash = libraries.find(
|
|
5062
|
-
(l) => path19.resolve(l.path).startsWith(cacheRoot) && "url" in l.backendConfig &&
|
|
5205
|
+
(l) => path19.resolve(l.path).startsWith(cacheRoot) && "url" in l.backendConfig && sameRepo(l.backendConfig.url, url)
|
|
5063
5206
|
);
|
|
5064
5207
|
if (!clash) return;
|
|
5065
5208
|
logErr(
|
|
@@ -5395,15 +5538,21 @@ function makeLibraryCommand() {
|
|
|
5395
5538
|
process.exit(1);
|
|
5396
5539
|
}
|
|
5397
5540
|
}
|
|
5398
|
-
|
|
5399
|
-
|
|
5541
|
+
const nameKind = opts.kind ?? kind ?? "skill";
|
|
5542
|
+
const nameProblem = identityFindings({
|
|
5543
|
+
kind: nameKind,
|
|
5544
|
+
parsed: nameKind === "flow" ? { id: name } : { name },
|
|
5545
|
+
body: void 0,
|
|
5546
|
+
dirName: name
|
|
5547
|
+
})[0];
|
|
5548
|
+
if (nameProblem) {
|
|
5549
|
+
logErr(nameProblem.text);
|
|
5400
5550
|
process.exit(1);
|
|
5401
5551
|
}
|
|
5402
5552
|
if (opts.publisher !== void 0) requireValidPublisherOrExit(opts.publisher);
|
|
5403
5553
|
if (opts.description !== void 0) {
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
logErr("--description must be 1\u20131024 characters (Agent Skills spec).");
|
|
5554
|
+
if (opts.description.trim().length === 0) {
|
|
5555
|
+
logErr("--description must not be empty.");
|
|
5407
5556
|
process.exit(1);
|
|
5408
5557
|
}
|
|
5409
5558
|
}
|
|
@@ -5423,6 +5572,11 @@ function makeLibraryCommand() {
|
|
|
5423
5572
|
process.exit(1);
|
|
5424
5573
|
}
|
|
5425
5574
|
if (opts.dir) assertCreateDirInsideLibrary(libRoot, destDir, opts.dir);
|
|
5575
|
+
const skippedDir = opts.dir ? assetPathProblem(opts.dir) : void 0;
|
|
5576
|
+
if (skippedDir) {
|
|
5577
|
+
logErr(`--dir "${opts.dir}": ${skippedDir}`);
|
|
5578
|
+
process.exit(1);
|
|
5579
|
+
}
|
|
5426
5580
|
const taken = conflictingAssetRoot(
|
|
5427
5581
|
libRoot,
|
|
5428
5582
|
effectiveKind,
|
|
@@ -5457,7 +5611,11 @@ function makeLibraryCommand() {
|
|
|
5457
5611
|
);
|
|
5458
5612
|
}
|
|
5459
5613
|
const scaffoldFile = findAssetManifestFile(res.path, effectiveKind, name);
|
|
5460
|
-
const
|
|
5614
|
+
const scaffoldChecked = scaffoldFile ? checkAssetFileFull("create", scaffoldFile, effectiveKind, getKindRegistry()) : { errors: [], warnings: [] };
|
|
5615
|
+
const scaffoldProblems = scaffoldChecked.errors;
|
|
5616
|
+
for (const w of scaffoldChecked.warnings) {
|
|
5617
|
+
logWarn(`${path19.relative(target.path, scaffoldFile ?? "")} [${w.tag}] \u2014 ${w.text}`);
|
|
5618
|
+
}
|
|
5461
5619
|
const { ref } = await registerLibraryAsset(target, library, {
|
|
5462
5620
|
kind: effectiveKind,
|
|
5463
5621
|
name,
|
|
@@ -5851,16 +6009,16 @@ function makeLibraryCommand() {
|
|
|
5851
6009
|
"With --create-repo: create the repo private (the store only accepts public repos)"
|
|
5852
6010
|
).option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
|
|
5853
6011
|
async (lib, opts) => {
|
|
5854
|
-
const { runLibraryPublish } = await import('../library-publish-
|
|
6012
|
+
const { runLibraryPublish } = await import('../library-publish-YHYGA6G5.js');
|
|
5855
6013
|
await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
|
|
5856
6014
|
}
|
|
5857
6015
|
);
|
|
5858
6016
|
cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
|
|
5859
|
-
const { runLibraryRegister } = await import('../library-publish-
|
|
6017
|
+
const { runLibraryRegister } = await import('../library-publish-YHYGA6G5.js');
|
|
5860
6018
|
await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
|
|
5861
6019
|
});
|
|
5862
6020
|
cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
|
|
5863
|
-
const { runLibraryYank } = await import('../library-publish-
|
|
6021
|
+
const { runLibraryYank } = await import('../library-publish-YHYGA6G5.js');
|
|
5864
6022
|
await withStoreErrorHandling(() => runLibraryYank(lib, opts));
|
|
5865
6023
|
});
|
|
5866
6024
|
return cmd;
|
|
@@ -6520,7 +6678,7 @@ function scheduleSoftDepPreview() {
|
|
|
6520
6678
|
}
|
|
6521
6679
|
async function loadAssets() {
|
|
6522
6680
|
softDepPreviewCache.clear();
|
|
6523
|
-
const { gatherAssetFeeds } = await import('../asset-feeds-
|
|
6681
|
+
const { gatherAssetFeeds } = await import('../asset-feeds-ON7FYHHF.js');
|
|
6524
6682
|
const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
|
|
6525
6683
|
if (notes.length > 0) {
|
|
6526
6684
|
state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
|
|
@@ -6724,7 +6882,7 @@ function reconcileCollapsedSets(rows) {
|
|
|
6724
6882
|
async function loadSourcesAndLibraries() {
|
|
6725
6883
|
try {
|
|
6726
6884
|
const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
|
|
6727
|
-
import('../open-library-
|
|
6885
|
+
import('../open-library-FVV6GG4I.js'),
|
|
6728
6886
|
import('../core/index.js')
|
|
6729
6887
|
]);
|
|
6730
6888
|
const { manager, library, close } = await openLibraryManager2();
|
|
@@ -7191,10 +7349,10 @@ async function showInfo() {
|
|
|
7191
7349
|
}
|
|
7192
7350
|
console.log();
|
|
7193
7351
|
console.log(pc5.dim(" Press any key to return..."));
|
|
7194
|
-
await new Promise((
|
|
7352
|
+
await new Promise((resolve5) => {
|
|
7195
7353
|
const onData = () => {
|
|
7196
7354
|
process.stdin.removeListener("data", onData);
|
|
7197
|
-
|
|
7355
|
+
resolve5();
|
|
7198
7356
|
};
|
|
7199
7357
|
process.stdin.once("data", onData);
|
|
7200
7358
|
});
|
|
@@ -8631,10 +8789,10 @@ function planMarkdownMoves(root, knownKinds, manual, unknownTypes, identities, c
|
|
|
8631
8789
|
);
|
|
8632
8790
|
continue;
|
|
8633
8791
|
}
|
|
8634
|
-
const
|
|
8635
|
-
if (
|
|
8792
|
+
const present = existing.get(identity);
|
|
8793
|
+
if (present !== void 0) {
|
|
8636
8794
|
conflicts.push(
|
|
8637
|
-
`${
|
|
8795
|
+
`${present} already is ${identity}, and ${posix2(path19__default.relative(root, file))} would become it too: rename one first. Nothing was changed.`
|
|
8638
8796
|
);
|
|
8639
8797
|
continue;
|
|
8640
8798
|
}
|
|
@@ -8751,10 +8909,10 @@ function planBundles(root, skaileYamls, publisher, notes, manual, conflicts, ide
|
|
|
8751
8909
|
notConverted.push(`${origin.replace(/\/$/, "")} (${rel(target)} exists)`);
|
|
8752
8910
|
return;
|
|
8753
8911
|
}
|
|
8754
|
-
const
|
|
8755
|
-
if (
|
|
8912
|
+
const present = existing.get(identity);
|
|
8913
|
+
if (present !== void 0) {
|
|
8756
8914
|
conflicts.push(
|
|
8757
|
-
`${
|
|
8915
|
+
`${present} already is ${identity}, and ${origin} would become it too: rename the bundle first. Nothing was changed.`
|
|
8758
8916
|
);
|
|
8759
8917
|
return;
|
|
8760
8918
|
}
|
|
@@ -9881,14 +10039,14 @@ function action2(fn) {
|
|
|
9881
10039
|
try {
|
|
9882
10040
|
await fn(...args);
|
|
9883
10041
|
} catch (err) {
|
|
9884
|
-
const { condensePluginFailure } = await import('../plugin-store-
|
|
10042
|
+
const { condensePluginFailure } = await import('../plugin-store-MVTW6G7J.js');
|
|
9885
10043
|
logErr(condensePluginFailure(err instanceof Error ? err.message : String(err)));
|
|
9886
10044
|
process.exitCode = 1;
|
|
9887
10045
|
}
|
|
9888
10046
|
};
|
|
9889
10047
|
}
|
|
9890
10048
|
async function reconcileAndReport(projectDir, plugins, opts = {}) {
|
|
9891
|
-
const { reconcilePlugins } = await import('../plugin-store-
|
|
10049
|
+
const { reconcilePlugins } = await import('../plugin-store-MVTW6G7J.js');
|
|
9892
10050
|
if (plugins.length === 0) {
|
|
9893
10051
|
logInfo("No plugins declared \u2014 nothing to reconcile.");
|
|
9894
10052
|
return;
|
|
@@ -9899,14 +10057,14 @@ async function reconcileAndReport(projectDir, plugins, opts = {}) {
|
|
|
9899
10057
|
else logInfo(`Plugin store ${result.reason}.`);
|
|
9900
10058
|
} catch (err) {
|
|
9901
10059
|
if (opts.strict) throw err;
|
|
9902
|
-
const { condensePluginFailure } = await import('../plugin-store-
|
|
10060
|
+
const { condensePluginFailure } = await import('../plugin-store-MVTW6G7J.js');
|
|
9903
10061
|
logWarn(
|
|
9904
10062
|
`reconcile skipped: ${condensePluginFailure(err instanceof Error ? err.message : String(err))}`
|
|
9905
10063
|
);
|
|
9906
10064
|
}
|
|
9907
10065
|
}
|
|
9908
10066
|
async function verifyPluginLoads(projectDir, spec, declared) {
|
|
9909
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
10067
|
+
const { loadPlugins } = await import('../plugin-store-MVTW6G7J.js');
|
|
9910
10068
|
const { createPluginRegistry } = await import('../plugin-registry/index.js');
|
|
9911
10069
|
const registry = createPluginRegistry();
|
|
9912
10070
|
await loadPlugins(
|
|
@@ -9929,7 +10087,7 @@ async function runInstall2(typedSpec, opts) {
|
|
|
9929
10087
|
const rawSpec = typedSpec.trim();
|
|
9930
10088
|
const projectDir = path19__default.resolve(opts.projectDir);
|
|
9931
10089
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
9932
|
-
const { specName, rollbackPluginStore, npmSpecError, projectRelativeFileSpec } = await import('../plugin-store-
|
|
10090
|
+
const { specName, rollbackPluginStore, npmSpecError, projectRelativeFileSpec } = await import('../plugin-store-MVTW6G7J.js');
|
|
9933
10091
|
const specError = npmSpecError(rawSpec);
|
|
9934
10092
|
if (specError) throw new Error(specError);
|
|
9935
10093
|
const spec = projectRelativeFileSpec(rawSpec, process.cwd(), projectDir);
|
|
@@ -9966,7 +10124,7 @@ async function runInstall2(typedSpec, opts) {
|
|
|
9966
10124
|
async function runRemove(name, opts) {
|
|
9967
10125
|
const projectDir = path19__default.resolve(opts.projectDir);
|
|
9968
10126
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
9969
|
-
const { specName } = await import('../plugin-store-
|
|
10127
|
+
const { specName } = await import('../plugin-store-MVTW6G7J.js');
|
|
9970
10128
|
const yamlPath = path19__default.join(projectDir, "skaile.yaml");
|
|
9971
10129
|
if (!existsSync(yamlPath)) {
|
|
9972
10130
|
logInfo(`No plugin matching ${S.cmd(name)}: there is no skaile.yaml in ${projectDir}.`);
|
|
@@ -9982,7 +10140,7 @@ async function runRemove(name, opts) {
|
|
|
9982
10140
|
logOk(`Removed ${S.cmd(name)} from skaile.yaml plugins`);
|
|
9983
10141
|
const remaining = editor.getPlugins();
|
|
9984
10142
|
if (remaining.length === 0) {
|
|
9985
|
-
const { rollbackPluginStore } = await import('../plugin-store-
|
|
10143
|
+
const { rollbackPluginStore } = await import('../plugin-store-MVTW6G7J.js');
|
|
9986
10144
|
await rollbackPluginStore(projectDir, []);
|
|
9987
10145
|
logInfo("No plugins declared; removed .skaile/plugins/.");
|
|
9988
10146
|
return;
|
|
@@ -10005,7 +10163,7 @@ async function runList(opts) {
|
|
|
10005
10163
|
const registry = createPluginRegistry();
|
|
10006
10164
|
if (declared.length > 0) {
|
|
10007
10165
|
try {
|
|
10008
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
10166
|
+
const { loadPlugins } = await import('../plugin-store-MVTW6G7J.js');
|
|
10009
10167
|
const result = await loadPlugins(projectDir, declared, registry);
|
|
10010
10168
|
for (const f of result.failed) logWarn(f.error);
|
|
10011
10169
|
} catch (err) {
|
|
@@ -10088,11 +10246,11 @@ function presetItemsToWorkspace(preset, values) {
|
|
|
10088
10246
|
}
|
|
10089
10247
|
function resolveItemConfig(item, preset, values, envVarsToSet) {
|
|
10090
10248
|
const byKey = placeholderIndex(item, preset);
|
|
10091
|
-
const
|
|
10249
|
+
const resolve5 = (key) => {
|
|
10092
10250
|
const ph = byKey.get(key) ?? { key, type: "text", required: true };
|
|
10093
10251
|
return resolvePlaceholderValue(ph, values[key]);
|
|
10094
10252
|
};
|
|
10095
|
-
return substituteNode(item.config ?? {},
|
|
10253
|
+
return substituteNode(item.config ?? {}, resolve5, envVarsToSet);
|
|
10096
10254
|
}
|
|
10097
10255
|
function placeholderIndex(item, preset) {
|
|
10098
10256
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -10100,20 +10258,20 @@ function placeholderIndex(item, preset) {
|
|
|
10100
10258
|
for (const ph of item.placeholders ?? []) map.set(ph.key, ph);
|
|
10101
10259
|
return map;
|
|
10102
10260
|
}
|
|
10103
|
-
function substituteNode(node,
|
|
10104
|
-
if (typeof node === "string") return substituteString(node,
|
|
10105
|
-
if (Array.isArray(node)) return node.map((el) => substituteNode(el,
|
|
10261
|
+
function substituteNode(node, resolve5, envVarsToSet) {
|
|
10262
|
+
if (typeof node === "string") return substituteString(node, resolve5, envVarsToSet);
|
|
10263
|
+
if (Array.isArray(node)) return node.map((el) => substituteNode(el, resolve5, envVarsToSet));
|
|
10106
10264
|
if (node && typeof node === "object") {
|
|
10107
10265
|
const out = {};
|
|
10108
|
-
for (const [k, v] of Object.entries(node)) out[k] = substituteNode(v,
|
|
10266
|
+
for (const [k, v] of Object.entries(node)) out[k] = substituteNode(v, resolve5, envVarsToSet);
|
|
10109
10267
|
return out;
|
|
10110
10268
|
}
|
|
10111
10269
|
return node;
|
|
10112
10270
|
}
|
|
10113
|
-
function substituteString(value,
|
|
10271
|
+
function substituteString(value, resolve5, envVarsToSet) {
|
|
10114
10272
|
const tokens = [...value.matchAll(TOKEN_RE)];
|
|
10115
10273
|
if (tokens.length === 0) return value;
|
|
10116
|
-
const secret = tokens.find(([, ns]) => ns === "SECRET") ?? tokens.find(([, , key]) => "envRef" in
|
|
10274
|
+
const secret = tokens.find(([, ns]) => ns === "SECRET") ?? tokens.find(([, , key]) => "envRef" in resolve5(key));
|
|
10117
10275
|
if (secret) {
|
|
10118
10276
|
const [full, , key] = secret;
|
|
10119
10277
|
if (tokens.length > 1 || full !== value) {
|
|
@@ -10125,7 +10283,7 @@ function substituteString(value, resolve4, envVarsToSet) {
|
|
|
10125
10283
|
return `env:${key}`;
|
|
10126
10284
|
}
|
|
10127
10285
|
return value.replace(TOKEN_RE, (_m, _ns, key) => {
|
|
10128
|
-
const resolved =
|
|
10286
|
+
const resolved = resolve5(key);
|
|
10129
10287
|
return "envRef" in resolved ? resolved.envRef : resolved.value;
|
|
10130
10288
|
});
|
|
10131
10289
|
}
|
|
@@ -10174,11 +10332,11 @@ function buildPresetFromWorkspace(config, name, sources = []) {
|
|
|
10174
10332
|
};
|
|
10175
10333
|
}
|
|
10176
10334
|
function neededSources(config, lock) {
|
|
10177
|
-
const factoryUrl =
|
|
10178
|
-
const nonFactory = (config.sources ?? []).filter((s) =>
|
|
10335
|
+
const factoryUrl = repoIdentity(FACTORY_SOURCE_URL).key;
|
|
10336
|
+
const nonFactory = (config.sources ?? []).filter((s) => repoIdentity(s.url).key !== factoryUrl);
|
|
10179
10337
|
if (!lock) return nonFactory;
|
|
10180
|
-
const inClosure = new Set(lock.sources.map((s) =>
|
|
10181
|
-
return nonFactory.filter((s) => inClosure.has(
|
|
10338
|
+
const inClosure = new Set(lock.sources.map((s) => repoIdentity(s.url).key));
|
|
10339
|
+
return nonFactory.filter((s) => inClosure.has(repoIdentity(s.url).key));
|
|
10182
10340
|
}
|
|
10183
10341
|
function sourcesWithSidecar(sources) {
|
|
10184
10342
|
return sources.filter((s) => existsSync(storeManifestFile(s.url))).map((s) => s.url);
|
|
@@ -10534,10 +10692,10 @@ function applyItems(editor, config, items) {
|
|
|
10534
10692
|
unchangedSources: []
|
|
10535
10693
|
};
|
|
10536
10694
|
const existingSourceUrls = new Map(
|
|
10537
|
-
editor.getSources().map((src) => [
|
|
10695
|
+
editor.getSources().map((src) => [repoIdentity(src.url).key, src])
|
|
10538
10696
|
);
|
|
10539
10697
|
for (const src of items.sources) {
|
|
10540
|
-
const key =
|
|
10698
|
+
const key = repoIdentity(src.url).key;
|
|
10541
10699
|
const existing = existingSourceUrls.get(key);
|
|
10542
10700
|
if (!existing) {
|
|
10543
10701
|
editor.setSource(src);
|
|
@@ -10872,61 +11030,6 @@ async function sessionIdsHint(projectDir) {
|
|
|
10872
11030
|
return sessions.length > 0 ? "Run skaile session list to see the ids." : null;
|
|
10873
11031
|
}
|
|
10874
11032
|
|
|
10875
|
-
// cli/src/commands/harness-preflight.ts
|
|
10876
|
-
var present = (...lines) => lines.filter((l) => !!l);
|
|
10877
|
-
var OR_PICK_ANOTHER = "Or pick another harness with --harness.";
|
|
10878
|
-
function missingBinary(harnessId) {
|
|
10879
|
-
const hint = HARNESS_BINARIES[harnessId]?.hint ?? `${harnessId} is not installed.`;
|
|
10880
|
-
return `${hint} ${OR_PICK_ANOTHER}`;
|
|
10881
|
-
}
|
|
10882
|
-
var claudeSdk = async (input, deps) => present(
|
|
10883
|
-
await deps.sdkProblem(input.projectDir, input.harness),
|
|
10884
|
-
checkHarnessModel("claude-sdk", input),
|
|
10885
|
-
checkModelSurface("claude-sdk", input)
|
|
10886
|
-
);
|
|
10887
|
-
var codex = async (input, deps) => present(
|
|
10888
|
-
await deps.sdkProblem(input.projectDir, input.harness),
|
|
10889
|
-
checkHarnessModel("codex", input),
|
|
10890
|
-
deps.codexCredential(input)
|
|
10891
|
-
);
|
|
10892
|
-
var omp = async (input, deps) => {
|
|
10893
|
-
if (!deps.hasBinary("omp")) return [missingBinary("omp")];
|
|
10894
|
-
const refusal = checkHarnessModel("omp", input);
|
|
10895
|
-
if (refusal) return [refusal];
|
|
10896
|
-
const own = input.model && !input.model.startsWith("@") ? input.model : void 0;
|
|
10897
|
-
const unlisted = own && isUnlistedModel(input);
|
|
10898
|
-
return present(unlisted ? await deps.ompListed(own) : void 0);
|
|
10899
|
-
};
|
|
10900
|
-
function cliHarness(harnessId) {
|
|
10901
|
-
return async (input, deps) => deps.hasBinary(harnessId) ? present(checkHarnessModel(harnessId, input), checkModelSurface(harnessId, input)) : [missingBinary(harnessId)];
|
|
10902
|
-
}
|
|
10903
|
-
var PREFLIGHTS = {
|
|
10904
|
-
"claude-sdk": claudeSdk,
|
|
10905
|
-
codex,
|
|
10906
|
-
omp,
|
|
10907
|
-
gemini: cliHarness("gemini"),
|
|
10908
|
-
qwen: cliHarness("qwen"),
|
|
10909
|
-
opencode: cliHarness("opencode"),
|
|
10910
|
-
goose: cliHarness("goose"),
|
|
10911
|
-
continue: cliHarness("continue")
|
|
10912
|
-
};
|
|
10913
|
-
async function preflightHarness(input, deps = {}) {
|
|
10914
|
-
const check = PREFLIGHTS[input.harness];
|
|
10915
|
-
if (!check) return [];
|
|
10916
|
-
return check(
|
|
10917
|
-
{
|
|
10918
|
-
...input,
|
|
10919
|
-
registry: input.registry ?? loadRegistryView({ projectDir: input.projectDir }).merged
|
|
10920
|
-
},
|
|
10921
|
-
{
|
|
10922
|
-
hasBinary: deps.hasBinary ?? ((id) => resolveHarnessBinary(HARNESS_BINARIES[id]) !== void 0),
|
|
10923
|
-
sdkProblem: deps.sdkProblem ?? checkHarnessSdk,
|
|
10924
|
-
ompListed: deps.ompListed ?? checkOmpListedModel,
|
|
10925
|
-
codexCredential: deps.codexCredential ?? checkCodexCredential
|
|
10926
|
-
}
|
|
10927
|
-
);
|
|
10928
|
-
}
|
|
10929
|
-
|
|
10930
11033
|
// cli/src/commands/run.ts
|
|
10931
11034
|
function resolveSingleShotAgentDir(projectDir, agentDefinition) {
|
|
10932
11035
|
if (!agentDefinition) return resolveAgentDir(projectDir);
|
|
@@ -10944,6 +11047,51 @@ async function printCompositionDryRun(projectDir, agentDir, harness, model, chec
|
|
|
10944
11047
|
await printCompositionPlan(projectDir, agentDir, manifest, harness, model, instanceIdOverride);
|
|
10945
11048
|
return reportPreflight(await check(model ?? manifestModelForHarness(manifest, harness)));
|
|
10946
11049
|
}
|
|
11050
|
+
async function printAgentPrompt(projectDir, agentDir, harness, instanceIdOverride, json) {
|
|
11051
|
+
if (!agentDir) {
|
|
11052
|
+
logErr(
|
|
11053
|
+
"No agent definition: the project has no `agent:` and neither --instance nor --agent-definition picks one, so there is no agent prompt to print."
|
|
11054
|
+
);
|
|
11055
|
+
return false;
|
|
11056
|
+
}
|
|
11057
|
+
const manifest = await loadAgentManifest(agentDir);
|
|
11058
|
+
if (!manifest) {
|
|
11059
|
+
logErr(`${agentDir} has no agent.yaml or AGENT.md: not an agent package.`);
|
|
11060
|
+
return false;
|
|
11061
|
+
}
|
|
11062
|
+
const wsConfig = resolveSkWorkspaceConfig(projectDir);
|
|
11063
|
+
const { instanceId: instanceId2, instance } = instanceForSession(wsConfig, instanceIdOverride, agentDir);
|
|
11064
|
+
const resolved = await resolveAgentInstance({
|
|
11065
|
+
instanceId: instanceId2,
|
|
11066
|
+
instance,
|
|
11067
|
+
asset: { manifest, dir: agentDir },
|
|
11068
|
+
projectDir,
|
|
11069
|
+
registry: getKindRegistry(),
|
|
11070
|
+
host: { nativeSubagents: harnessNameForHarnessId(harness) !== void 0 },
|
|
11071
|
+
dryRun: true
|
|
11072
|
+
});
|
|
11073
|
+
const { composed, memory } = agentPromptInput(resolved, []);
|
|
11074
|
+
const assembled = await assembleAgentPrompt({
|
|
11075
|
+
srcDir: agentDir,
|
|
11076
|
+
projectDir,
|
|
11077
|
+
harness,
|
|
11078
|
+
instanceId: instanceId2,
|
|
11079
|
+
instance,
|
|
11080
|
+
wsConfig,
|
|
11081
|
+
resolved: { composed, memory }
|
|
11082
|
+
});
|
|
11083
|
+
if (!assembled) {
|
|
11084
|
+
logErr(`${agentDir} has no agent.yaml or AGENT.md: not an agent package.`);
|
|
11085
|
+
return false;
|
|
11086
|
+
}
|
|
11087
|
+
for (const warning of resolved.warnings) logWarnErr(warning);
|
|
11088
|
+
process.stdout.write(
|
|
11089
|
+
json ? `${JSON.stringify({ agent: instanceId2, harness, prompt: assembled.sentPrompt })}
|
|
11090
|
+
` : `${assembled.sentPrompt}
|
|
11091
|
+
`
|
|
11092
|
+
);
|
|
11093
|
+
return true;
|
|
11094
|
+
}
|
|
10947
11095
|
async function printCompositionPlan(projectDir, agentDir, manifest, harness, model, instanceIdOverride) {
|
|
10948
11096
|
console.log();
|
|
10949
11097
|
console.log(` ${S.label("Project dir:")} ${projectDir}`);
|
|
@@ -11014,7 +11162,7 @@ async function printSkillDryRun(projectDir, skill) {
|
|
|
11014
11162
|
return false;
|
|
11015
11163
|
}
|
|
11016
11164
|
const content = fs8__default.readFileSync(file, "utf-8");
|
|
11017
|
-
const prerequisiteErrors = checkAssetFile(file, "skill", getKindRegistry()).filter(
|
|
11165
|
+
const prerequisiteErrors = checkAssetFile("validate", file, "skill", getKindRegistry()).filter(
|
|
11018
11166
|
(f) => f.text.startsWith("metadata.prerequisites")
|
|
11019
11167
|
);
|
|
11020
11168
|
if (prerequisiteErrors.length > 0) {
|
|
@@ -11122,9 +11270,10 @@ function harnessOptionDescription() {
|
|
|
11122
11270
|
return `Harness to run (${listHarnesses().map((d) => d.id).join(", ")}); claude-code (deploy) = claude-sdk (run)`;
|
|
11123
11271
|
}
|
|
11124
11272
|
function reportPreflight(problems) {
|
|
11125
|
-
for (const line of problems) logErr(line);
|
|
11273
|
+
for (const { line } of problems) logErr(line);
|
|
11126
11274
|
return problems.length > 0;
|
|
11127
11275
|
}
|
|
11276
|
+
var START_CHECKS = ["start", "refusal", "readiness"];
|
|
11128
11277
|
function nodeSkillRefs(flow) {
|
|
11129
11278
|
const refs = /* @__PURE__ */ new Map();
|
|
11130
11279
|
for (const node of flow.nodes) {
|
|
@@ -11163,16 +11312,31 @@ function makeRunCommand() {
|
|
|
11163
11312
|
).option(
|
|
11164
11313
|
"--instance <id>",
|
|
11165
11314
|
"Run the skaile.yaml `agents:` instance <id> (`default` is the primary `agent:`) with its overrides; single-shot prompts only"
|
|
11166
|
-
).option(
|
|
11315
|
+
).option(
|
|
11316
|
+
"--print-prompt",
|
|
11317
|
+
"With --dry-run: print the agent prompt a run assembles (the body of the native agent file) on stdout and nothing else, then exit 0; exit 1 when there is no agent definition"
|
|
11318
|
+
).option("--json", "With --print-prompt: print { agent, harness, prompt } as one JSON line").option("--skill <name>", "Skill name (for single-shot mode)").action(async (positional, opts) => {
|
|
11167
11319
|
const projectDir = path19__default.resolve(opts.projectDir);
|
|
11168
11320
|
await loadDeclaredPlugins(projectDir);
|
|
11321
|
+
if (opts.printPrompt) warnProjectConfig(projectDir, { stderr: true });
|
|
11169
11322
|
if (await reportProjectConfig(projectDir, { harness: false, instances: true }) > 0) {
|
|
11170
11323
|
process.exit(1);
|
|
11171
11324
|
}
|
|
11172
|
-
const
|
|
11325
|
+
const cliHarness = canonicalHarnessId(
|
|
11173
11326
|
foldDriverFlag(opts).harness
|
|
11174
11327
|
);
|
|
11175
11328
|
const dryRun = opts.dryRun ?? false;
|
|
11329
|
+
const printPrompt = opts.printPrompt ?? false;
|
|
11330
|
+
if (printPrompt && !dryRun) {
|
|
11331
|
+
logErr(
|
|
11332
|
+
"--print-prompt needs --dry-run: `skaile run --dry-run --print-prompt` prints the prompt and starts nothing."
|
|
11333
|
+
);
|
|
11334
|
+
process.exit(1);
|
|
11335
|
+
}
|
|
11336
|
+
if (opts.json && !printPrompt) {
|
|
11337
|
+
logErr("--json on `run` only goes with --print-prompt.");
|
|
11338
|
+
process.exit(1);
|
|
11339
|
+
}
|
|
11176
11340
|
const agentDefinition = opts.agentDefinition?.trim() || void 0;
|
|
11177
11341
|
const instanceId2 = opts.instance?.trim() || void 0;
|
|
11178
11342
|
if (instanceId2 && agentDefinition) {
|
|
@@ -11181,8 +11345,8 @@ function makeRunCommand() {
|
|
|
11181
11345
|
);
|
|
11182
11346
|
process.exit(1);
|
|
11183
11347
|
}
|
|
11184
|
-
let flowId = positional[0];
|
|
11185
|
-
if (!flowId) {
|
|
11348
|
+
let flowId = positional[0] ?? "";
|
|
11349
|
+
if (!flowId && !printPrompt) {
|
|
11186
11350
|
const flows = discoverProjectFlows(projectDir);
|
|
11187
11351
|
if (flows.length === 0) {
|
|
11188
11352
|
logErr(
|
|
@@ -11205,17 +11369,34 @@ function makeRunCommand() {
|
|
|
11205
11369
|
flowId = selected;
|
|
11206
11370
|
}
|
|
11207
11371
|
const config = await resolveSettings(projectDir, {
|
|
11208
|
-
harness:
|
|
11372
|
+
harness: cliHarness,
|
|
11209
11373
|
model: opts.model
|
|
11210
11374
|
});
|
|
11211
11375
|
const harness = config.harness ?? DEFAULT_HARNESS_ID;
|
|
11212
11376
|
const model = config.model;
|
|
11213
|
-
const unknownHarness =
|
|
11377
|
+
const [unknownHarness] = await preflight({ projectDir }, harness, void 0, void 0, {
|
|
11378
|
+
checks: ["harness"]
|
|
11379
|
+
});
|
|
11214
11380
|
if (unknownHarness) {
|
|
11215
|
-
logErr(unknownHarness);
|
|
11381
|
+
logErr(unknownHarness.line);
|
|
11216
11382
|
process.exit(1);
|
|
11217
11383
|
}
|
|
11218
|
-
|
|
11384
|
+
noteExperimentalHarness(harness);
|
|
11385
|
+
if (printPrompt) {
|
|
11386
|
+
try {
|
|
11387
|
+
const agentDir = instanceId2 ? resolveInstanceAgentDir(projectDir, resolveSkWorkspaceConfig(projectDir), instanceId2) : resolveSingleShotAgentDir(projectDir, agentDefinition);
|
|
11388
|
+
if (!await printAgentPrompt(projectDir, agentDir, harness, instanceId2, opts.json === true)) {
|
|
11389
|
+
process.exit(1);
|
|
11390
|
+
}
|
|
11391
|
+
} catch (err) {
|
|
11392
|
+
logErr(err instanceof Error ? err.message : String(err));
|
|
11393
|
+
process.exit(1);
|
|
11394
|
+
}
|
|
11395
|
+
return;
|
|
11396
|
+
}
|
|
11397
|
+
const preflightFor = (forModel) => preflight({ projectDir, roles: config.roles }, harness, forModel, void 0, {
|
|
11398
|
+
checks: START_CHECKS
|
|
11399
|
+
});
|
|
11219
11400
|
const flowPath = findProjectFlowFile(flowId, projectDir);
|
|
11220
11401
|
if (flowPath && agentDefinition) {
|
|
11221
11402
|
logErr(
|
|
@@ -11286,6 +11467,7 @@ function makeRunCommand() {
|
|
|
11286
11467
|
);
|
|
11287
11468
|
}
|
|
11288
11469
|
}
|
|
11470
|
+
await refreshStaleAgentFiles({ projectDir, harness: config.harness });
|
|
11289
11471
|
await runAgentChat({
|
|
11290
11472
|
projectDir,
|
|
11291
11473
|
...agentDir ? { agentDir } : {},
|
|
@@ -11381,12 +11563,13 @@ function makeResumeCommand() {
|
|
|
11381
11563
|
harness: session.harness,
|
|
11382
11564
|
model: session.model
|
|
11383
11565
|
});
|
|
11384
|
-
return
|
|
11385
|
-
projectDir,
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11566
|
+
return preflight(
|
|
11567
|
+
{ projectDir, roles: settings.roles },
|
|
11568
|
+
settings.harness ?? DEFAULT_HARNESS_ID,
|
|
11569
|
+
settings.model,
|
|
11570
|
+
void 0,
|
|
11571
|
+
{ checks: START_CHECKS }
|
|
11572
|
+
);
|
|
11390
11573
|
};
|
|
11391
11574
|
if (!dryRun && reportPreflight(await preflightLines())) process.exit(1);
|
|
11392
11575
|
console.log();
|
|
@@ -11508,6 +11691,7 @@ function makeReplCommand() {
|
|
|
11508
11691
|
harness: harnessOverride,
|
|
11509
11692
|
model: opts.model
|
|
11510
11693
|
});
|
|
11694
|
+
noteExperimentalHarness(effective.harness ?? DEFAULT_HARNESS_ID);
|
|
11511
11695
|
let effectiveModel = effective.model;
|
|
11512
11696
|
if (!opts.model && instanceId2) {
|
|
11513
11697
|
try {
|
|
@@ -11518,14 +11702,16 @@ function makeReplCommand() {
|
|
|
11518
11702
|
} catch {
|
|
11519
11703
|
}
|
|
11520
11704
|
}
|
|
11521
|
-
const
|
|
11522
|
-
projectDir,
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11705
|
+
const problems = await preflight(
|
|
11706
|
+
{ projectDir, roles: effective.roles },
|
|
11707
|
+
effective.harness ?? DEFAULT_HARNESS_ID,
|
|
11708
|
+
effectiveModel,
|
|
11709
|
+
void 0,
|
|
11710
|
+
{ checks: START_CHECKS }
|
|
11711
|
+
);
|
|
11712
|
+
if (reportPreflight(problems)) process.exit(1);
|
|
11528
11713
|
try {
|
|
11714
|
+
await refreshStaleAgentFiles({ projectDir, harness: harnessOverride });
|
|
11529
11715
|
await startRepl({
|
|
11530
11716
|
projectDir,
|
|
11531
11717
|
cwd: agentCwd !== projectDir ? agentCwd : void 0,
|
|
@@ -11663,7 +11849,7 @@ function makeServeCommand() {
|
|
|
11663
11849
|
process.exitCode = 1;
|
|
11664
11850
|
return;
|
|
11665
11851
|
}
|
|
11666
|
-
const dirProblem = (await import('../serve-preflight-
|
|
11852
|
+
const dirProblem = (await import('../serve-preflight-XJS5OZML.js')).checkServeProjectDir(
|
|
11667
11853
|
opts.projectDir
|
|
11668
11854
|
);
|
|
11669
11855
|
if (dirProblem) {
|
|
@@ -11692,7 +11878,7 @@ function makeServeCommand() {
|
|
|
11692
11878
|
}
|
|
11693
11879
|
let providers = parseProviderIds(opts.providers);
|
|
11694
11880
|
if (!managedCodex) {
|
|
11695
|
-
const { resolveServeProvider } = await import('../serve-preflight-
|
|
11881
|
+
const { resolveServeProvider } = await import('../serve-preflight-XJS5OZML.js');
|
|
11696
11882
|
const picked = resolveServeProvider(opts.projectDir, opts.provider, providers);
|
|
11697
11883
|
if ("problem" in picked) {
|
|
11698
11884
|
logErr(picked.problem);
|
|
@@ -11702,37 +11888,43 @@ function makeServeCommand() {
|
|
|
11702
11888
|
providers = [...picked.providers];
|
|
11703
11889
|
}
|
|
11704
11890
|
const modelEndpoint = parseModelEndpointFlag(opts.modelEndpoint, opts.modelEndpointAgent);
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11891
|
+
if (!managedCodex) {
|
|
11892
|
+
const { preflight: preflight2 } = await import('../bridge/index.js');
|
|
11893
|
+
const {
|
|
11894
|
+
agentRefLookups,
|
|
11895
|
+
checkModelEndpointPeer,
|
|
11896
|
+
checkServeConnectors,
|
|
11897
|
+
resolveServeStart,
|
|
11898
|
+
serveAgentRef,
|
|
11899
|
+
servesLocalRegistry
|
|
11900
|
+
} = await import('../serve-preflight-XJS5OZML.js');
|
|
11901
|
+
const { harness, model } = await resolveServeStart(opts.projectDir, {
|
|
11902
|
+
harness: opts.harness,
|
|
11903
|
+
model: opts.model
|
|
11904
|
+
});
|
|
11905
|
+
const stage = async (checks, agentRef) => (await preflight2(
|
|
11906
|
+
{ projectDir: opts.projectDir, providers },
|
|
11907
|
+
harness,
|
|
11908
|
+
model,
|
|
11909
|
+
agentRef,
|
|
11910
|
+
{
|
|
11911
|
+
checks,
|
|
11912
|
+
serve: true,
|
|
11913
|
+
agentRefs: agentRefLookups
|
|
11914
|
+
}
|
|
11915
|
+
))[0]?.line;
|
|
11916
|
+
const problem = await stage(["harness", "agent"], serveAgentRef(opts.projectDir)) ?? await checkServeConnectors(opts.projectDir) ?? await stage(["start"]) ?? await checkModelEndpointPeer(opts.projectDir, modelEndpoint) ?? (model && servesLocalRegistry(opts.projectDir) ? await stage(["refusal", "readiness"]) : void 0);
|
|
11917
|
+
if (problem) {
|
|
11918
|
+
logErr(problem);
|
|
11919
|
+
process.exitCode = 1;
|
|
11920
|
+
return;
|
|
11921
|
+
}
|
|
11734
11922
|
}
|
|
11735
11923
|
try {
|
|
11924
|
+
if (!managedCodex) {
|
|
11925
|
+
const { refreshStaleAgentFiles: refreshStaleAgentFiles2 } = await import('../agent-file-refresh-VRD2SNJW.js');
|
|
11926
|
+
await refreshStaleAgentFiles2({ projectDir: opts.projectDir, harness: opts.harness });
|
|
11927
|
+
}
|
|
11736
11928
|
await startAgentServer({
|
|
11737
11929
|
port,
|
|
11738
11930
|
...opts.host ? { host: opts.host } : {},
|
|
@@ -11770,12 +11962,12 @@ function makeServeCommand() {
|
|
|
11770
11962
|
);
|
|
11771
11963
|
}
|
|
11772
11964
|
async function ensurePluginsLoadedForServe(projectDir) {
|
|
11773
|
-
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-
|
|
11965
|
+
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-26MR5QPO.js');
|
|
11774
11966
|
try {
|
|
11775
11967
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
11776
11968
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
11777
11969
|
if (!config.plugins || config.plugins.length === 0) return;
|
|
11778
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
11970
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-MVTW6G7J.js');
|
|
11779
11971
|
const { pluginRegistry } = await import('../plugin-registry/index.js');
|
|
11780
11972
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
11781
11973
|
if (result.loaded.length > 0) {
|
|
@@ -11789,14 +11981,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
|
|
|
11789
11981
|
}
|
|
11790
11982
|
}
|
|
11791
11983
|
async function runCompileTest(opts) {
|
|
11792
|
-
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-
|
|
11984
|
+
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-26MR5QPO.js');
|
|
11793
11985
|
const { tmpdir } = await import('os');
|
|
11794
|
-
const { dirname:
|
|
11986
|
+
const { dirname: dirname4, join: join6, resolve: resolve5 } = await import('path');
|
|
11795
11987
|
const { fileURLToPath: fileURLToPath2 } = await import('url');
|
|
11796
11988
|
const { unlinkSync, existsSync: existsSync24 } = await import('fs');
|
|
11797
11989
|
const { spawn } = await import('child_process');
|
|
11798
11990
|
const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
|
|
11799
|
-
const { MONOREPO_ROOT } = await import('../paths-
|
|
11991
|
+
const { MONOREPO_ROOT } = await import('../paths-PIWSSUUG.js');
|
|
11800
11992
|
if (MONOREPO_ROOT === null) {
|
|
11801
11993
|
logErr2("--compile-test is only available inside the skaile-dev workspace.");
|
|
11802
11994
|
logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
|
|
@@ -11805,7 +11997,7 @@ async function runCompileTest(opts) {
|
|
|
11805
11997
|
}
|
|
11806
11998
|
const outfile = join6(tmpdir(), `skaile-compile-test-${Date.now()}`);
|
|
11807
11999
|
const __thisFile = fileURLToPath2(import.meta.url);
|
|
11808
|
-
const entryPoint =
|
|
12000
|
+
const entryPoint = resolve5(dirname4(__thisFile), "..", "index.ts");
|
|
11809
12001
|
logInfo2(`Building compiled binary...`);
|
|
11810
12002
|
logInfo2(`Entry: ${S2.dim(entryPoint)}`);
|
|
11811
12003
|
logInfo2(`Output: ${S2.dim(outfile)}`);
|
|
@@ -12120,19 +12312,19 @@ function buildTailSelect(q) {
|
|
|
12120
12312
|
return { sql, params };
|
|
12121
12313
|
}
|
|
12122
12314
|
function sleepUnlessAborted(ms, signal) {
|
|
12123
|
-
return new Promise((
|
|
12315
|
+
return new Promise((resolve5) => {
|
|
12124
12316
|
if (signal?.aborted) {
|
|
12125
|
-
|
|
12317
|
+
resolve5();
|
|
12126
12318
|
return;
|
|
12127
12319
|
}
|
|
12128
12320
|
const timer = setTimeout(() => {
|
|
12129
12321
|
signal?.removeEventListener("abort", onAbort);
|
|
12130
|
-
|
|
12322
|
+
resolve5();
|
|
12131
12323
|
}, ms);
|
|
12132
12324
|
const onAbort = () => {
|
|
12133
12325
|
clearTimeout(timer);
|
|
12134
12326
|
signal?.removeEventListener("abort", onAbort);
|
|
12135
|
-
|
|
12327
|
+
resolve5();
|
|
12136
12328
|
};
|
|
12137
12329
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
12138
12330
|
});
|
|
@@ -12219,7 +12411,7 @@ async function remoteTail(opts) {
|
|
|
12219
12411
|
]
|
|
12220
12412
|
});
|
|
12221
12413
|
const filter = makeFilter(opts.query);
|
|
12222
|
-
return new Promise((
|
|
12414
|
+
return new Promise((resolve5, reject) => {
|
|
12223
12415
|
let settled = false;
|
|
12224
12416
|
const finish2 = (err) => {
|
|
12225
12417
|
if (settled) return;
|
|
@@ -12230,11 +12422,11 @@ async function remoteTail(opts) {
|
|
|
12230
12422
|
}
|
|
12231
12423
|
opts.signal?.removeEventListener("abort", onAbort);
|
|
12232
12424
|
if (err) reject(err);
|
|
12233
|
-
else
|
|
12425
|
+
else resolve5();
|
|
12234
12426
|
};
|
|
12235
12427
|
const onAbort = () => finish2();
|
|
12236
12428
|
if (opts.signal?.aborted) {
|
|
12237
|
-
|
|
12429
|
+
resolve5();
|
|
12238
12430
|
return;
|
|
12239
12431
|
}
|
|
12240
12432
|
opts.signal?.addEventListener("abort", onAbort, { once: true });
|
|
@@ -12756,8 +12948,8 @@ function makeStoreCommand() {
|
|
|
12756
12948
|
"--all",
|
|
12757
12949
|
`List every match (default: ${STORE_ROW_LIMIT} rows, only what \`skaile add\` can install)`
|
|
12758
12950
|
).option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
|
|
12759
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
12760
|
-
const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-
|
|
12951
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-FVV6GG4I.js');
|
|
12952
|
+
const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-VX2BVMS5.js');
|
|
12761
12953
|
const projectDir = path19__default.resolve(opts.projectDir);
|
|
12762
12954
|
if (opts.kind && !getKnownKinds2().has(opts.kind)) {
|
|
12763
12955
|
logErr(
|
|
@@ -12815,8 +13007,8 @@ function makeStoreCommand() {
|
|
|
12815
13007
|
}
|
|
12816
13008
|
});
|
|
12817
13009
|
store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
|
|
12818
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
12819
|
-
const { supportsInstallManifest: supportsInstallManifest2 } = await import('../project-
|
|
13010
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-FVV6GG4I.js');
|
|
13011
|
+
const { supportsInstallManifest: supportsInstallManifest2 } = await import('../project-BOAHGBMI.js');
|
|
12820
13012
|
try {
|
|
12821
13013
|
parseAssetRef(ref);
|
|
12822
13014
|
} catch (e) {
|
|
@@ -13187,14 +13379,14 @@ async function needsCatalog(am2, projectDir) {
|
|
|
13187
13379
|
try {
|
|
13188
13380
|
const yamlPath = path19__default.join(projectDir, "skaile.yaml");
|
|
13189
13381
|
declaredUrls = new Set(
|
|
13190
|
-
WorkspaceYamlEditor.load(yamlPath).getSources().map((s) =>
|
|
13382
|
+
WorkspaceYamlEditor.load(yamlPath).getSources().map((s) => repoIdentity(s.url).key)
|
|
13191
13383
|
);
|
|
13192
13384
|
} catch {
|
|
13193
13385
|
}
|
|
13194
|
-
const factoryUrl =
|
|
13386
|
+
const factoryUrl = repoIdentity(FACTORY_SOURCE_URL).key;
|
|
13195
13387
|
for (const [key, e] of Object.entries(lock?.assets ?? {})) {
|
|
13196
13388
|
if (e.library !== void 0 || e.source === void 0) continue;
|
|
13197
|
-
const url =
|
|
13389
|
+
const url = repoIdentity(e.source.url).key;
|
|
13198
13390
|
if (declaredUrls.has(url)) continue;
|
|
13199
13391
|
if (url === factoryUrl) {
|
|
13200
13392
|
const { kind, name, publisher } = parseCanonicalLockKey(key);
|
|
@@ -13532,6 +13724,7 @@ Project:
|
|
|
13532
13724
|
setup Interactive provider setup wizard
|
|
13533
13725
|
config show|get|set Personal settings
|
|
13534
13726
|
harness set <name> Switch the project to claude-code | omp | codex and install
|
|
13727
|
+
harness list [--json] List harnesses and whether the release tests cover them
|
|
13535
13728
|
|
|
13536
13729
|
Assets (skill, agent, prompt, flow, preset, contract):
|
|
13537
13730
|
add <ref> [--global] Add to skaile.yaml + deploy
|
|
@@ -13800,7 +13993,7 @@ async function bootstrapUserConfig() {
|
|
|
13800
13993
|
}
|
|
13801
13994
|
async function hydrateInitSources(resolved, created) {
|
|
13802
13995
|
try {
|
|
13803
|
-
const { ensureSourcesCloned } = await import('../ensure-sources-
|
|
13996
|
+
const { ensureSourcesCloned } = await import('../ensure-sources-CI3JQJST.js');
|
|
13804
13997
|
const hydrate = ensureSourcesCloned(resolved, { quiet: true });
|
|
13805
13998
|
for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
|
|
13806
13999
|
if (hydrate.failed.length > 0) {
|
|
@@ -13841,7 +14034,7 @@ function printInitSummary(resolved, projectDir, created) {
|
|
|
13841
14034
|
}
|
|
13842
14035
|
program.hook("preAction", (_program, actionCommand) => setActiveCommand(actionCommand));
|
|
13843
14036
|
program.command("setup").description("Interactive provider setup wizard").action(async () => {
|
|
13844
|
-
const { cmdSetup } = await import('../setup-
|
|
14037
|
+
const { cmdSetup } = await import('../setup-BFEBJLYF.js');
|
|
13845
14038
|
await cmdSetup([], { projectDir: process.cwd() });
|
|
13846
14039
|
});
|
|
13847
14040
|
program.addCommand(makeInstallCommand());
|
|
@@ -13922,7 +14115,7 @@ program.hook("postAction", async (_thisCommand, actionCommand) => {
|
|
|
13922
14115
|
const opts = actionCommand.opts();
|
|
13923
14116
|
if (opts.global || opts.dryRun) return;
|
|
13924
14117
|
const projectDir = path19__default.resolve(opts.projectDir ?? process.cwd());
|
|
13925
|
-
const { refreshPluginSkills } = await import('../claude-code-
|
|
14118
|
+
const { refreshPluginSkills } = await import('../claude-code-VL6UM7BZ.js');
|
|
13926
14119
|
try {
|
|
13927
14120
|
if (await refreshPluginSkills(projectDir)) {
|
|
13928
14121
|
logInfo(`Updated ${S.cmd(".claude/plugins/skaile/skills")} (the --full plugin copy)`);
|