@skaile/workspaces 5.18.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +88 -0
- package/README.md +8 -8
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-MKB5JUML.js → asset-feeds-PXUWCXVI.js} +21 -21
- package/dist/{asset-feeds-MKB5JUML.js.map → asset-feeds-PXUWCXVI.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +10 -10
- package/dist/asset-manager/index.js +17 -17
- package/dist/asset-manager/installer.js +13 -13
- package/dist/asset-manager/renderers.js +12 -12
- package/dist/asset-manager/src/index.d.ts +113 -24
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install-agent.d.ts +2 -2
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/install-instances.d.ts +8 -8
- package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +3 -3
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/mcp-config.d.ts +39 -13
- package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
- package/dist/asset-manager/src/renderers.d.ts +12 -12
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/codex-app-server.js +2 -2
- package/dist/bridge/harnesses/claude-sdk.d.ts +2 -0
- package/dist/bridge/{drivers → harnesses}/claude-sdk.js +75 -73
- package/dist/bridge/harnesses/claude-sdk.js.map +1 -0
- package/dist/bridge/{drivers/gemini.d.ts → harnesses/codex.d.ts} +1 -1
- package/dist/bridge/{drivers → harnesses}/codex.js +52 -52
- package/dist/bridge/harnesses/codex.js.map +1 -0
- package/dist/bridge/{drivers/claude-sdk.d.ts → harnesses/continue.d.ts} +1 -1
- package/dist/bridge/{drivers → harnesses}/continue.js +29 -29
- package/dist/bridge/harnesses/continue.js.map +1 -0
- package/dist/bridge/{drivers → harnesses}/echo.d.ts +1 -1
- package/dist/bridge/{drivers → harnesses}/echo.js +27 -27
- package/dist/bridge/harnesses/echo.js.map +1 -0
- package/dist/bridge/{drivers/continue.d.ts → harnesses/gemini.d.ts} +1 -1
- package/dist/bridge/harnesses/gemini.js +18 -0
- package/dist/bridge/{drivers → harnesses}/goose.d.ts +1 -1
- package/dist/bridge/{drivers → harnesses}/goose.js +29 -29
- package/dist/bridge/harnesses/goose.js.map +1 -0
- package/dist/bridge/{drivers → harnesses}/omp.d.ts +1 -1
- package/dist/bridge/{drivers → harnesses}/omp.js +43 -485
- package/dist/bridge/harnesses/omp.js.map +1 -0
- package/dist/bridge/{drivers → harnesses}/opencode.d.ts +1 -1
- package/dist/bridge/{drivers → harnesses}/opencode.js +30 -30
- package/dist/bridge/harnesses/opencode.js.map +1 -0
- package/dist/bridge/{drivers → harnesses}/qwen.d.ts +1 -1
- package/dist/bridge/{drivers → harnesses}/qwen.js +20 -20
- package/dist/bridge/harnesses/qwen.js.map +1 -0
- package/dist/bridge/index.js +24 -22
- package/dist/bridge/src/agent-exec.d.ts +2 -2
- package/dist/bridge/src/agent-transcript.d.ts +1 -1
- package/dist/bridge/src/agent-transcript.d.ts.map +1 -1
- package/dist/bridge/src/approval-card.d.ts +3 -3
- package/dist/bridge/src/capability-dispatch.d.ts +5 -5
- package/dist/bridge/src/cloud.d.ts +4 -4
- package/dist/bridge/src/codex/config-toml.d.ts +3 -3
- package/dist/bridge/src/codex/friendly-error.d.ts +1 -1
- package/dist/bridge/src/codex/friendly-error.d.ts.map +1 -1
- package/dist/bridge/src/codex/{managed-driver.d.ts → managed-harness.d.ts} +5 -5
- package/dist/bridge/src/codex/managed-harness.d.ts.map +1 -0
- package/dist/bridge/src/codex/native-approvals.d.ts +1 -1
- package/dist/bridge/src/codex/native-approvals.d.ts.map +1 -1
- package/dist/bridge/src/error-classifier.d.ts +7 -7
- package/dist/bridge/src/{driver-capabilities.d.ts → harness-capabilities.d.ts} +18 -18
- package/dist/bridge/src/harness-capabilities.d.ts.map +1 -0
- package/dist/bridge/src/harness-model-check.d.ts +25 -0
- package/dist/bridge/src/harness-model-check.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/_subprocess-cli.d.ts +8 -8
- package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/claude-context-usage.d.ts +5 -5
- package/dist/bridge/src/harnesses/claude-context-usage.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/claude-sdk.d.ts +27 -27
- package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/claude-self-turns.d.ts +5 -5
- package/dist/bridge/src/harnesses/claude-self-turns.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/claude-tool-allowlist.d.ts +4 -4
- package/dist/bridge/src/harnesses/claude-tool-allowlist.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/codex.d.ts +14 -14
- package/dist/bridge/src/harnesses/codex.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/continue.d.ts +12 -12
- package/dist/bridge/src/harnesses/continue.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/echo.d.ts +16 -16
- package/dist/bridge/src/harnesses/echo.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/flow-script.d.ts +9 -9
- package/dist/bridge/src/harnesses/flow-script.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/gemini.d.ts +15 -15
- package/dist/bridge/src/harnesses/gemini.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/goose.d.ts +10 -10
- package/dist/bridge/src/harnesses/goose.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/omp-models-yml.d.ts +23 -12
- package/dist/bridge/src/harnesses/omp-models-yml.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/omp.d.ts +23 -23
- package/dist/bridge/src/harnesses/omp.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/opencode.d.ts +11 -11
- package/dist/bridge/src/harnesses/opencode.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/qwen.d.ts +12 -12
- package/dist/bridge/src/harnesses/qwen.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/recovery-policy.d.ts +4 -4
- package/dist/bridge/src/harnesses/recovery-policy.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/resume-probe.d.ts +3 -3
- package/dist/bridge/src/harnesses/resume-probe.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/sanitize-assistant-text.d.ts +1 -1
- package/dist/bridge/src/harnesses/sanitize-assistant-text.d.ts.map +1 -0
- package/dist/bridge/src/{drivers → harnesses}/scrub-transcript.d.ts +1 -1
- package/dist/bridge/src/harnesses/scrub-transcript.d.ts.map +1 -0
- package/dist/bridge/src/index.d.ts +4 -4
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/logger.d.ts +4 -4
- package/dist/bridge/src/models.d.ts +1 -1
- package/dist/bridge/src/normalizer.d.ts +2 -2
- package/dist/bridge/src/provider-materialize/continue-config-yaml.d.ts +5 -5
- package/dist/bridge/src/provider-materialize/continue-config-yaml.d.ts.map +1 -1
- package/dist/bridge/src/provider-materialize/credential-env.d.ts +3 -3
- package/dist/bridge/src/provider-materialize/{env-drivers.d.ts → env-harnesses.d.ts} +19 -19
- package/dist/bridge/src/provider-materialize/env-harnesses.d.ts.map +1 -0
- package/dist/bridge/src/provider-materialize/goose-custom-providers.d.ts +5 -5
- package/dist/bridge/src/provider-materialize/goose-custom-providers.d.ts.map +1 -1
- package/dist/bridge/src/provider-materialize/opencode-config.d.ts +7 -7
- package/dist/bridge/src/provider-materialize/opencode-config.d.ts.map +1 -1
- package/dist/bridge/src/provider-materialize/session-config-home.d.ts +5 -5
- package/dist/bridge/src/provider-materialize/session-config-home.d.ts.map +1 -1
- package/dist/bridge/src/provider-registry-derive.d.ts +4 -4
- package/dist/bridge/src/provider-registry-derive.d.ts.map +1 -1
- package/dist/bridge/src/reconfigure-ledger.d.ts +8 -8
- package/dist/bridge/src/reconfigure-ledger.d.ts.map +1 -1
- package/dist/bridge/src/registry.d.ts +34 -41
- package/dist/bridge/src/registry.d.ts.map +1 -1
- package/dist/bridge/src/runner-private-env.d.ts +2 -2
- package/dist/bridge/src/runtime.d.ts +11 -11
- package/dist/bridge/src/runtime.d.ts.map +1 -1
- package/dist/bridge/src/types.d.ts +158 -158
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/{chunk-CKBCX3HQ.js → chunk-2UUKCROR.js} +4 -4
- package/dist/{chunk-CKBCX3HQ.js.map → chunk-2UUKCROR.js.map} +1 -1
- package/dist/{chunk-7ANRSTNR.js → chunk-3IXIEHUB.js} +36 -17
- package/dist/chunk-3IXIEHUB.js.map +1 -0
- package/dist/{chunk-YZ3N7IUU.js → chunk-3JKGY2YC.js} +91 -55
- package/dist/chunk-3JKGY2YC.js.map +1 -0
- package/dist/{chunk-X5YPJV4N.js → chunk-3MWQKQUB.js} +2 -2
- package/dist/{chunk-X5YPJV4N.js.map → chunk-3MWQKQUB.js.map} +1 -1
- package/dist/{chunk-EPBKISS5.js → chunk-3TG2NV2F.js} +2 -2
- package/dist/chunk-3TG2NV2F.js.map +1 -0
- package/dist/{chunk-L2AMXONH.js → chunk-3X7VTCPG.js} +2 -2
- package/dist/chunk-3X7VTCPG.js.map +1 -0
- package/dist/{chunk-3KMREAR2.js → chunk-4DWBSTYA.js} +24 -24
- package/dist/chunk-4DWBSTYA.js.map +1 -0
- package/dist/{chunk-YARXR3CN.js → chunk-4XWLB7JB.js} +52 -46
- package/dist/chunk-4XWLB7JB.js.map +1 -0
- package/dist/{chunk-5TBFN46Z.js → chunk-5KRMNUL4.js} +4 -4
- package/dist/chunk-5KRMNUL4.js.map +1 -0
- package/dist/{chunk-YIF2IJUA.js → chunk-6GWSDPBP.js} +3 -3
- package/dist/{chunk-YIF2IJUA.js.map → chunk-6GWSDPBP.js.map} +1 -1
- package/dist/{chunk-BBWSGVVE.js → chunk-7CV3HFWJ.js} +5 -5
- package/dist/chunk-7CV3HFWJ.js.map +1 -0
- package/dist/{chunk-YROR332M.js → chunk-7DN6JKP2.js} +2 -2
- package/dist/chunk-7DN6JKP2.js.map +1 -0
- package/dist/{chunk-IZCR27MU.js → chunk-7EKQDY2T.js} +3 -3
- package/dist/chunk-7EKQDY2T.js.map +1 -0
- package/dist/{chunk-VOBXINUZ.js → chunk-7TPYPVAH.js} +4 -4
- package/dist/{chunk-VOBXINUZ.js.map → chunk-7TPYPVAH.js.map} +1 -1
- package/dist/{chunk-U2FI547Z.js → chunk-7XSAW5OC.js} +3 -3
- package/dist/{chunk-U2FI547Z.js.map → chunk-7XSAW5OC.js.map} +1 -1
- package/dist/{chunk-ICSCSM5D.js → chunk-ADPM6AYF.js} +3 -3
- package/dist/{chunk-ICSCSM5D.js.map → chunk-ADPM6AYF.js.map} +1 -1
- package/dist/{chunk-LW7ZI6EQ.js → chunk-AF432MS3.js} +3 -3
- package/dist/chunk-AF432MS3.js.map +1 -0
- package/dist/{chunk-WJLYL6RY.js → chunk-ARWKK325.js} +5 -5
- package/dist/{chunk-WJLYL6RY.js.map → chunk-ARWKK325.js.map} +1 -1
- package/dist/{chunk-AJ7EGIFR.js → chunk-BIRW3HOG.js} +3 -3
- package/dist/chunk-BIRW3HOG.js.map +1 -0
- package/dist/{chunk-X3AUS4RW.js → chunk-DHYSUJ3H.js} +4 -4
- package/dist/{chunk-X3AUS4RW.js.map → chunk-DHYSUJ3H.js.map} +1 -1
- package/dist/{chunk-SRNCN4X2.js → chunk-DUMTLYSO.js} +10 -10
- package/dist/chunk-DUMTLYSO.js.map +1 -0
- package/dist/{chunk-GOK4QRJR.js → chunk-E3GPGTW3.js} +8 -8
- package/dist/chunk-E3GPGTW3.js.map +1 -0
- package/dist/{chunk-CKNIYIV2.js → chunk-E572OHGY.js} +5 -5
- package/dist/chunk-E572OHGY.js.map +1 -0
- package/dist/{chunk-KY4UXX7M.js → chunk-F2GOZMRA.js} +63 -64
- package/dist/chunk-F2GOZMRA.js.map +1 -0
- package/dist/{chunk-6E6PKKAD.js → chunk-G5SUWZEU.js} +18 -8
- package/dist/chunk-G5SUWZEU.js.map +1 -0
- package/dist/{chunk-7FHZB2QU.js → chunk-GEQSUC6U.js} +12 -12
- package/dist/chunk-GEQSUC6U.js.map +1 -0
- package/dist/{chunk-AIBAOXDU.js → chunk-GN4VVSAA.js} +18 -18
- package/dist/chunk-GN4VVSAA.js.map +1 -0
- package/dist/{chunk-XTO436PV.js → chunk-HK7HMEPT.js} +13 -13
- package/dist/chunk-HK7HMEPT.js.map +1 -0
- package/dist/{chunk-Y56YIT6J.js → chunk-JCPD4QRM.js} +4 -4
- package/dist/chunk-JCPD4QRM.js.map +1 -0
- package/dist/{chunk-GBYNC5V3.js → chunk-JDR6ILCW.js} +4 -4
- package/dist/chunk-JDR6ILCW.js.map +1 -0
- package/dist/{chunk-K4O6L3WH.js → chunk-KNY356I3.js} +3 -3
- package/dist/{chunk-K4O6L3WH.js.map → chunk-KNY356I3.js.map} +1 -1
- package/dist/{chunk-4ZTPYIBE.js → chunk-KW37WNXY.js} +12 -12
- package/dist/chunk-KW37WNXY.js.map +1 -0
- package/dist/{chunk-BO426QWN.js → chunk-KX2PT5Q4.js} +8 -8
- package/dist/chunk-KX2PT5Q4.js.map +1 -0
- package/dist/{chunk-T2TQAH2X.js → chunk-L4YKW5AY.js} +105 -38
- package/dist/chunk-L4YKW5AY.js.map +1 -0
- package/dist/{chunk-WJCQFNF6.js → chunk-LN6QB7XI.js} +3 -3
- package/dist/{chunk-WJCQFNF6.js.map → chunk-LN6QB7XI.js.map} +1 -1
- package/dist/{chunk-MJHSLODD.js → chunk-LSI2IVFT.js} +2 -2
- package/dist/chunk-LSI2IVFT.js.map +1 -0
- package/dist/{chunk-2ABUJYVI.js → chunk-MCUJTNY5.js} +3 -3
- package/dist/{chunk-2ABUJYVI.js.map → chunk-MCUJTNY5.js.map} +1 -1
- package/dist/{chunk-A2ULN3KX.js → chunk-MWXYN6NY.js} +2 -2
- package/dist/{chunk-A2ULN3KX.js.map → chunk-MWXYN6NY.js.map} +1 -1
- package/dist/{chunk-EAZECHPM.js → chunk-NBAGV6L2.js} +5 -5
- package/dist/chunk-NBAGV6L2.js.map +1 -0
- package/dist/{chunk-U7V5SIFW.js → chunk-NMI2TWMH.js} +46 -18
- package/dist/chunk-NMI2TWMH.js.map +1 -0
- package/dist/{chunk-VM3PH7BB.js → chunk-OAHVKSQJ.js} +604 -178
- package/dist/chunk-OAHVKSQJ.js.map +1 -0
- package/dist/{chunk-2NOLF7B2.js → chunk-OHNKYHRR.js} +53 -17
- package/dist/chunk-OHNKYHRR.js.map +1 -0
- package/dist/{chunk-KC6HGWXN.js → chunk-OTIB4D2K.js} +3 -3
- package/dist/{chunk-KC6HGWXN.js.map → chunk-OTIB4D2K.js.map} +1 -1
- package/dist/{chunk-WMF2C5U7.js → chunk-OULSJRXV.js} +17 -17
- package/dist/chunk-OULSJRXV.js.map +1 -0
- package/dist/{chunk-HPVMTX6M.js → chunk-QOM5Z62G.js} +47 -12
- package/dist/chunk-QOM5Z62G.js.map +1 -0
- package/dist/{chunk-ZBMC6IAE.js → chunk-SNEE6UGY.js} +33 -32
- package/dist/chunk-SNEE6UGY.js.map +1 -0
- package/dist/{chunk-RD6N2D7I.js → chunk-SRODW6M2.js} +4 -4
- package/dist/{chunk-RD6N2D7I.js.map → chunk-SRODW6M2.js.map} +1 -1
- package/dist/{chunk-D6UBEYQH.js → chunk-SZXGRHQQ.js} +6 -6
- package/dist/chunk-SZXGRHQQ.js.map +1 -0
- package/dist/{chunk-X6GUNN7X.js → chunk-T2BDID2J.js} +39 -39
- package/dist/chunk-T2BDID2J.js.map +1 -0
- package/dist/{chunk-RP3FZ2T6.js → chunk-TKHJXPSB.js} +110 -37
- package/dist/chunk-TKHJXPSB.js.map +1 -0
- package/dist/{chunk-CD7SVH6W.js → chunk-U56GGCC2.js} +4 -4
- package/dist/{chunk-CD7SVH6W.js.map → chunk-U56GGCC2.js.map} +1 -1
- package/dist/{chunk-VKPBUPH7.js → chunk-UL22SDGR.js} +36 -11
- package/dist/chunk-UL22SDGR.js.map +1 -0
- package/dist/{chunk-CKICWXMU.js → chunk-UQ33Y4DM.js} +139 -10
- package/dist/chunk-UQ33Y4DM.js.map +1 -0
- package/dist/{chunk-34C2EKWJ.js → chunk-UVVVR4XO.js} +38 -38
- package/dist/chunk-UVVVR4XO.js.map +1 -0
- package/dist/{chunk-KSBDLCZI.js → chunk-VBI7HGHB.js} +11 -11
- package/dist/{chunk-KSBDLCZI.js.map → chunk-VBI7HGHB.js.map} +1 -1
- package/dist/{chunk-PBSN4RTV.js → chunk-VJRTDKXS.js} +590 -450
- package/dist/chunk-VJRTDKXS.js.map +1 -0
- package/dist/{chunk-IG5LZ3WU.js → chunk-VTETQCR6.js} +10 -10
- package/dist/chunk-VTETQCR6.js.map +1 -0
- package/dist/{chunk-EFLKSMCO.js → chunk-VUJXZDCY.js} +5 -5
- package/dist/{chunk-EFLKSMCO.js.map → chunk-VUJXZDCY.js.map} +1 -1
- package/dist/{chunk-V3D4HQMS.js → chunk-VXEYX73S.js} +4 -4
- package/dist/{chunk-V3D4HQMS.js.map → chunk-VXEYX73S.js.map} +1 -1
- package/dist/{chunk-M3WPBTGJ.js → chunk-WD3L5QSU.js} +2 -2
- package/dist/{chunk-M3WPBTGJ.js.map → chunk-WD3L5QSU.js.map} +1 -1
- package/dist/chunk-WDAIWDLK.js +505 -0
- package/dist/chunk-WDAIWDLK.js.map +1 -0
- package/dist/{chunk-IW6F6R2W.js → chunk-WEH33JSG.js} +105 -35
- package/dist/chunk-WEH33JSG.js.map +1 -0
- package/dist/{chunk-OYIENLJI.js → chunk-WYHQUCHR.js} +15 -15
- package/dist/{chunk-OYIENLJI.js.map → chunk-WYHQUCHR.js.map} +1 -1
- package/dist/{chunk-R6O6YWU7.js → chunk-WYZXSJBK.js} +3 -3
- package/dist/{chunk-R6O6YWU7.js.map → chunk-WYZXSJBK.js.map} +1 -1
- package/dist/{chunk-B4X2N7JQ.js → chunk-XFIEVEU7.js} +14 -14
- package/dist/chunk-XFIEVEU7.js.map +1 -0
- package/dist/{chunk-Q6E6FM7P.js → chunk-XKNXPLKR.js} +6 -6
- package/dist/{chunk-Q6E6FM7P.js.map → chunk-XKNXPLKR.js.map} +1 -1
- package/dist/chunk-Y2TO2U7W.js +285 -0
- package/dist/chunk-Y2TO2U7W.js.map +1 -0
- package/dist/{chunk-JYWW32JI.js → chunk-YGRZNFRO.js} +18 -6
- package/dist/chunk-YGRZNFRO.js.map +1 -0
- package/dist/{chunk-5BEFNLOR.js → chunk-Z7ZEZZB6.js} +8 -8
- package/dist/chunk-Z7ZEZZB6.js.map +1 -0
- package/dist/{chunk-PHRNUTSG.js → chunk-ZFUZ5AKM.js} +4 -4
- package/dist/{chunk-PHRNUTSG.js.map → chunk-ZFUZ5AKM.js.map} +1 -1
- package/dist/claude-code-VJGYBXQR.js +10 -0
- package/dist/claude-code-VJGYBXQR.js.map +1 -0
- package/dist/cli/index.js +930 -685
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/agent-checks.d.ts +5 -0
- package/dist/cli/src/agent-checks.d.ts.map +1 -1
- package/dist/cli/src/agent-pins.d.ts +18 -0
- package/dist/cli/src/agent-pins.d.ts.map +1 -0
- package/dist/cli/src/commands/catalog.d.ts +9 -3
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/complete-resolvers.d.ts.map +1 -1
- package/dist/cli/src/commands/config.d.ts +2 -2
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/diff.d.ts.map +1 -1
- package/dist/cli/src/commands/flow.d.ts +8 -8
- package/dist/cli/src/commands/flow.d.ts.map +1 -1
- package/dist/cli/src/commands/integration.d.ts +1 -1
- package/dist/cli/src/commands/integration.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +17 -5
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts +3 -0
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-assets.d.ts +2 -0
- package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-files.d.ts +14 -0
- package/dist/cli/src/commands/migrate-files.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-harness.d.ts +49 -0
- package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate.d.ts +4 -2
- package/dist/cli/src/commands/migrate.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin/claude-code.d.ts +6 -0
- package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin/codex.d.ts +19 -4
- package/dist/cli/src/commands/plugin/codex.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin/types.d.ts +1 -6
- package/dist/cli/src/commands/plugin/types.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin-registry-cmd.d.ts +1 -1
- package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-export.d.ts +1 -1
- package/dist/cli/src/commands/project.d.ts +7 -4
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/providers.d.ts +13 -0
- package/dist/cli/src/commands/providers.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts +2 -2
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/serve-preflight.d.ts +30 -7
- package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/serve.d.ts +1 -1
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts +69 -53
- package/dist/cli/src/flow-discovery.d.ts.map +1 -1
- package/dist/cli/src/harness-error.d.ts +47 -0
- package/dist/cli/src/harness-error.d.ts.map +1 -0
- package/dist/cli/src/helpers.d.ts +5 -5
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/index.d.ts +8 -4
- package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
- package/dist/cli/src/setup.d.ts +3 -3
- package/dist/cli/src/setup.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +32 -1
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/connectors/config.js +4 -4
- package/dist/connectors/index.js +29 -27
- package/dist/connectors/src/connector-prompt.d.ts +5 -5
- package/dist/connectors/src/connector-registry.d.ts +1 -1
- package/dist/connectors-CXZLXAFZ.js +48 -0
- package/dist/{connectors-YNQ3WJGM.js.map → connectors-CXZLXAFZ.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/discovery.js +1 -1
- package/dist/core/framework.js +1 -1
- package/dist/{bridge/drivers/codex.d.ts → core/harness-targets.d.ts} +1 -1
- package/dist/core/harness-targets.js +4 -0
- package/dist/core/harness-targets.js.map +1 -0
- package/dist/core/index.js +10 -10
- package/dist/core/provider-registry-credentials.js +2 -2
- package/dist/core/provider-registry.js +1 -1
- package/dist/core/publish-manifest.js +1 -1
- package/dist/core/runtime-assets.js +4 -4
- package/dist/core/src/asset-roots.d.ts +16 -2
- package/dist/core/src/asset-roots.d.ts.map +1 -1
- package/dist/core/src/bind.d.ts +33 -14
- package/dist/core/src/bind.d.ts.map +1 -1
- package/dist/core/src/discovery.d.ts +1 -1
- package/dist/core/src/framework.d.ts +21 -21
- package/dist/core/src/framework.d.ts.map +1 -1
- package/dist/core/src/{driver-sdk.d.ts → harness-sdk.d.ts} +9 -9
- package/dist/core/src/harness-sdk.d.ts.map +1 -0
- package/dist/core/src/harness-targets.d.ts +71 -0
- package/dist/core/src/harness-targets.d.ts.map +1 -0
- package/dist/core/src/index.d.ts +11 -11
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +8 -0
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/provider-registry.d.ts +2 -2
- package/dist/core/src/publish-manifest.d.ts +45 -10
- package/dist/core/src/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/settings.d.ts +17 -16
- package/dist/core/src/settings.d.ts.map +1 -1
- package/dist/core/src/store.d.ts +12 -12
- package/dist/core/src/store.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +49 -22
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/src/workspace-yaml-editor.d.ts +1 -1
- package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +3 -3
- package/dist/deploy/index.js +11 -11
- package/dist/discovery/index.js +3 -3
- package/dist/discovery/src/discover-manifest.d.ts +1 -1
- package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-UJWEZSR3.js → ensure-sources-UPTHZKGF.js} +20 -20
- package/dist/{ensure-sources-UJWEZSR3.js.map → ensure-sources-UPTHZKGF.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +29 -27
- package/dist/factory-assets/connectors/deploy.js +29 -27
- package/dist/factory-assets/connectors/devserver.js +29 -27
- package/dist/factory-assets/connectors/flow/CONNECTOR.md +5 -5
- package/dist/factory-assets/connectors/flow/adapter.d.ts +3 -3
- package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/adapter.js +29 -27
- package/dist/factory-assets/connectors/flow/engine/loader.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts +8 -5
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/types.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +11 -11
- package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts +2 -2
- package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/orchestrator-turn.d.ts +4 -4
- package/dist/factory-assets/connectors/flow/orchestrator-turn.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/prompt-fragments.js +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.d.ts +12 -12
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +30 -28
- package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts +22 -22
- package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow.js +29 -27
- package/dist/factory-assets/connectors/git.js +29 -27
- package/dist/factory-assets/connectors/gmail.js +29 -27
- package/dist/factory-assets/connectors/googledrive.js +29 -27
- package/dist/factory-assets/connectors/local.js +29 -27
- package/dist/factory-assets/connectors/mattermost.js +29 -27
- package/dist/factory-assets/connectors/memory.js +29 -27
- package/dist/factory-assets/connectors/minio.js +29 -27
- package/dist/factory-assets/connectors/postgres.js +29 -27
- package/dist/factory-assets/connectors/s3.js +29 -27
- package/dist/factory-assets/connectors/sharepoint.js +29 -27
- package/dist/factory-assets/connectors/sqlite.js +29 -27
- package/dist/factory-assets/connectors/static-server.js +29 -27
- package/dist/factory-assets/connectors/tunnel.js +29 -27
- package/dist/factory-assets/connectors/webdav.js +29 -27
- package/dist/factory-assets/connectors/xstate/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/xstate/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/xstate-store.js +29 -27
- package/dist/factory-assets/connectors/xstate.js +29 -27
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
- package/dist/flows-TJQIMGUX.js +26 -0
- package/dist/{flows-BHY73K3O.js.map → flows-TJQIMGUX.js.map} +1 -1
- package/dist/{helpers-3CG7ZVX4.js → helpers-DE53KG3E.js} +20 -20
- package/dist/{helpers-3CG7ZVX4.js.map → helpers-DE53KG3E.js.map} +1 -1
- package/dist/library/index.js +14 -14
- package/dist/library/install.js +2 -2
- package/dist/library/src/index.d.ts +1 -1
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts +13 -0
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/{library-publish-NWWVYJUK.js → library-publish-KKQ2ULLX.js} +140 -63
- package/dist/library-publish-KKQ2ULLX.js.map +1 -0
- package/dist/model-endpoint/index.js +14 -14
- package/dist/model-endpoint/src/resolve.d.ts +1 -1
- package/dist/open-library-RJGJIW5H.js +42 -0
- package/dist/{open-library-7ZG2FFAX.js.map → open-library-RJGJIW5H.js.map} +1 -1
- package/dist/open-registry-3QS3J7KO.js +32 -0
- package/dist/{open-registry-RBELV5YH.js.map → open-registry-3QS3J7KO.js.map} +1 -1
- package/dist/paths-QAV4C3KX.js +22 -0
- package/dist/{paths-BFM6K2QO.js.map → paths-QAV4C3KX.js.map} +1 -1
- package/dist/plugin-registry/index.js +1 -1
- package/dist/plugin-registry/src/context.d.ts +3 -3
- package/dist/plugin-registry/src/context.d.ts.map +1 -1
- package/dist/plugin-registry/src/deploy-handle.d.ts +1 -1
- package/dist/plugin-registry/src/index.d.ts +2 -2
- package/dist/plugin-registry/src/index.d.ts.map +1 -1
- package/dist/plugin-registry/src/internal.d.ts.map +1 -1
- package/dist/plugin-registry/src/registry.d.ts +3 -3
- package/dist/plugin-registry/src/registry.d.ts.map +1 -1
- package/dist/plugin-registry/src/targets.d.ts +9 -9
- package/dist/plugin-registry/src/targets.d.ts.map +1 -1
- package/dist/plugin-store-MSH6GK6T.js +23 -0
- package/dist/{plugin-store-QOQDM24E.js.map → plugin-store-MSH6GK6T.js.map} +1 -1
- package/dist/plugins/src/asset-kind-provider.d.ts +1 -1
- package/dist/project-HZW2MZPA.js +84 -0
- package/dist/{project-YQM3I25D.js.map → project-HZW2MZPA.js.map} +1 -1
- package/dist/resolver/index.js +10 -10
- package/dist/runner/index.js +45 -44
- package/dist/runner/src/agent.d.ts +3 -3
- package/dist/runner/src/agent.d.ts.map +1 -1
- package/dist/runner/src/agents/in-process-host.d.ts +1 -1
- package/dist/runner/src/agents/instances.d.ts +1 -1
- package/dist/runner/src/agents/instances.d.ts.map +1 -1
- package/dist/runner/src/agents/run-controller.d.ts +7 -7
- package/dist/runner/src/agents/run-controller.d.ts.map +1 -1
- package/dist/runner/src/agents/standalone-surface.d.ts +2 -2
- package/dist/runner/src/agents/standalone-surface.d.ts.map +1 -1
- package/dist/runner/src/ai-provider-switch.d.ts +7 -7
- package/dist/runner/src/assistant-home.d.ts +1 -1
- package/dist/runner/src/capability-registry.d.ts +2 -2
- package/dist/runner/src/coalesced-restart.d.ts +2 -2
- package/dist/runner/src/compaction/context-window.d.ts +8 -8
- package/dist/runner/src/compaction/context-window.d.ts.map +1 -1
- package/dist/runner/src/compaction/orchestrator.d.ts +24 -24
- package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
- package/dist/runner/src/compaction-gate.d.ts +30 -30
- package/dist/runner/src/compaction-gate.d.ts.map +1 -1
- package/dist/runner/src/composition/compile.d.ts +11 -0
- package/dist/runner/src/composition/compile.d.ts.map +1 -1
- package/dist/runner/src/composition/dry-run.d.ts +2 -2
- 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/resolve-instance.d.ts +2 -2
- package/dist/runner/src/composition/resolve.d.ts +1 -1
- package/dist/runner/src/config.d.ts +3 -3
- package/dist/runner/src/config.d.ts.map +1 -1
- package/dist/runner/src/context-usage/collector.d.ts +15 -15
- package/dist/runner/src/context-usage/collector.d.ts.map +1 -1
- package/dist/runner/src/context-usage/compose.d.ts +6 -6
- package/dist/runner/src/context-usage/compose.d.ts.map +1 -1
- package/dist/runner/src/context-usage/estimator.d.ts +1 -1
- package/dist/runner/src/context-usage/index.d.ts +1 -1
- package/dist/runner/src/context-usage/index.d.ts.map +1 -1
- package/dist/runner/src/context-usage/transcript-tracker.d.ts +2 -2
- package/dist/runner/src/context-usage/transcript-tracker.d.ts.map +1 -1
- package/dist/runner/src/credential-notice.d.ts +3 -3
- package/dist/runner/src/credential-notice.d.ts.map +1 -1
- package/dist/runner/src/credential-rotated.d.ts +1 -1
- package/dist/runner/src/final-text.d.ts +1 -1
- package/dist/runner/src/{driver-swap-gate.d.ts → harness-swap-gate.d.ts} +21 -21
- package/dist/runner/src/harness-swap-gate.d.ts.map +1 -0
- package/dist/runner/src/late-mcp-rebuild.d.ts +6 -6
- package/dist/runner/src/late-mcp-rebuild.d.ts.map +1 -1
- package/dist/runner/src/lifecycle-handler.d.ts +1 -1
- package/dist/runner/src/lifecycle-handler.d.ts.map +1 -1
- package/dist/runner/src/manifest.d.ts +1 -1
- package/dist/runner/src/mcp-runtime-handlers.d.ts +6 -6
- package/dist/runner/src/mcp-runtime-handlers.d.ts.map +1 -1
- package/dist/runner/src/model-endpoint-discovery.d.ts +1 -1
- package/dist/runner/src/pending-turns.d.ts +3 -3
- package/dist/runner/src/platform-blocks.d.ts +5 -5
- package/dist/runner/src/platform-blocks.d.ts.map +1 -1
- package/dist/runner/src/prompt-turn-queue.d.ts +1 -1
- package/dist/runner/src/provider-quota-forwarder.d.ts +1 -1
- package/dist/runner/src/provider-quota-forwarder.d.ts.map +1 -1
- package/dist/runner/src/reconfigure-handler.d.ts +14 -14
- package/dist/runner/src/reconfigure-handler.d.ts.map +1 -1
- package/dist/runner/src/resource-handler.d.ts +1 -1
- package/dist/runner/src/resources.d.ts +5 -5
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/runner-capabilities.d.ts +7 -7
- package/dist/runner/src/runtime-session-emit.d.ts +5 -5
- package/dist/runner/src/runtime-session-emit.d.ts.map +1 -1
- package/dist/runner/src/s3-presign-client.d.ts +1 -1
- package/dist/runner/src/serve-credentials.d.ts +7 -7
- package/dist/runner/src/serve-credentials.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +32 -32
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +41 -41
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/runner/src/session-capability-wiring.d.ts +9 -9
- package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
- package/dist/runner/src/session-stimulus.d.ts +1 -1
- package/dist/runner/src/session.d.ts +5 -5
- package/dist/runner/src/session.d.ts.map +1 -1
- package/dist/runner/src/skill-staging.d.ts +16 -16
- package/dist/runner/src/skill-staging.d.ts.map +1 -1
- package/dist/runner/src/turn-end-contract.d.ts +55 -0
- package/dist/runner/src/turn-end-contract.d.ts.map +1 -0
- package/dist/runner/src/turn-scheduler.d.ts +27 -22
- package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
- package/dist/runner/src/turn-status-replay.d.ts +1 -1
- package/dist/runner/src/usage-limit-turn-hold.d.ts +1 -1
- package/dist/sdk/asset-manager.js +17 -17
- package/dist/sdk/bridge.js +24 -22
- package/dist/sdk/core.js +10 -10
- package/dist/sdk/flow.js +11 -11
- package/dist/sdk/index.js +49 -48
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +10 -10
- package/dist/sdk/runner.js +45 -44
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/src/agent-session.d.ts +1 -1
- package/dist/sdk/src/local-runtime.d.ts +1 -1
- package/dist/sdk/src/local-runtime.d.ts.map +1 -1
- package/dist/sdk/src/types.d.ts +1 -1
- package/dist/sdk/src/types.d.ts.map +1 -1
- package/dist/sdk/store.js +2 -2
- package/dist/sdk/transport/ws/server.js +11 -11
- package/dist/sdk/transport/ws.js +11 -11
- package/dist/sdk/transport.js +11 -11
- package/dist/sdk/types.js +1 -1
- package/dist/serve-preflight-L4POEHNQ.js +108 -0
- package/dist/serve-preflight-L4POEHNQ.js.map +1 -0
- package/dist/session/index.js +2 -2
- package/dist/session/src/dispatcher.d.ts +2 -2
- package/dist/sessions-2Q7SSYPT.js +5 -0
- package/dist/{sessions-DICDEONJ.js.map → sessions-2Q7SSYPT.js.map} +1 -1
- package/dist/{setup-AAHVAXRA.js → setup-AGYB4PKR.js} +50 -48
- package/dist/setup-AGYB4PKR.js.map +1 -0
- package/dist/skills-2LMQ2IAD.js +26 -0
- package/dist/{skills-RSZVUIYZ.js.map → skills-2LMQ2IAD.js.map} +1 -1
- package/dist/source-GBMYD3RO.js +85 -0
- package/dist/{source-KWMCMEMB.js.map → source-GBMYD3RO.js.map} +1 -1
- package/dist/{source-manifest-publish-EDYKM4YZ.js → source-manifest-publish-FK22TVQT.js} +57 -56
- package/dist/source-manifest-publish-FK22TVQT.js.map +1 -0
- package/dist/store/index.js +2 -2
- package/dist/store/src/store.d.ts +3 -3
- package/dist/store/src/store.d.ts.map +1 -1
- package/dist/transport/index.js +11 -11
- package/dist/transport/src/ws/server.d.ts +1 -1
- package/dist/transport/src/ws/server.d.ts.map +1 -1
- package/dist/transport/ws/server.js +11 -11
- package/dist/transport/ws.js +11 -11
- package/dist/tui/index.js +65 -64
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/src/repl-session.d.ts +5 -5
- package/dist/tui/src/repl.d.ts +5 -5
- package/dist/tui/src/repl.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/agent-lifecycle.d.ts +1 -1
- package/dist/types/src/agent-lifecycle.d.ts.map +1 -1
- package/dist/types/src/ask-slots.d.ts +1 -1
- package/dist/types/src/capabilities.d.ts +1 -1
- package/dist/types/src/context-usage.d.ts +22 -22
- package/dist/types/src/context-usage.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +49 -49
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/lifecycle.d.ts +6 -6
- package/dist/types/src/lifecycle.d.ts.map +1 -1
- package/dist/types/src/logging.d.ts +1 -1
- package/dist/types/src/manifests/agent.d.ts +3 -3
- package/dist/types/src/manifests/scaffold-body.d.ts +6 -3
- package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
- package/dist/types/src/protocol.d.ts +4 -4
- package/dist/types/src/runtime.d.ts +38 -38
- package/dist/types/src/runtime.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +22 -11
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/validator-DRHMJ457.js +5 -0
- package/dist/{validator-FA2PFW6N.js.map → validator-DRHMJ457.js.map} +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +36 -34
- package/dist/workspace-plugin/adapters/omp.js +26 -26
- package/dist/workspace-plugin/adapters/omp.js.map +1 -1
- package/dist/workspace-plugin/index.js +3 -3
- package/dist/workspace-plugin/src/plugin.d.ts +5 -5
- package/dist/workspace-plugin/src/plugin.d.ts.map +1 -1
- package/dist/workspace-plugin/src/tools/flows.d.ts +1 -1
- package/dist/workspace-plugin/src/tools/validator.d.ts +6 -6
- package/dist/workspace-plugin/src/tools/validator.d.ts.map +1 -1
- package/dist/workspace-plugin/src/types.d.ts +2 -2
- package/dist/workspace-plugin/src/types.d.ts.map +1 -1
- package/package.json +59 -59
- package/dist/bridge/drivers/claude-sdk.js.map +0 -1
- package/dist/bridge/drivers/codex.js.map +0 -1
- package/dist/bridge/drivers/continue.js.map +0 -1
- package/dist/bridge/drivers/echo.js.map +0 -1
- package/dist/bridge/drivers/gemini.js +0 -18
- package/dist/bridge/drivers/goose.js.map +0 -1
- package/dist/bridge/drivers/omp.js.map +0 -1
- package/dist/bridge/drivers/opencode.js.map +0 -1
- package/dist/bridge/drivers/qwen.js.map +0 -1
- package/dist/bridge/src/codex/managed-driver.d.ts.map +0 -1
- package/dist/bridge/src/driver-capabilities.d.ts.map +0 -1
- package/dist/bridge/src/driver-model-check.d.ts +0 -21
- package/dist/bridge/src/driver-model-check.d.ts.map +0 -1
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +0 -1
- package/dist/bridge/src/drivers/claude-context-usage.d.ts.map +0 -1
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +0 -1
- package/dist/bridge/src/drivers/claude-self-turns.d.ts.map +0 -1
- package/dist/bridge/src/drivers/claude-tool-allowlist.d.ts.map +0 -1
- package/dist/bridge/src/drivers/codex.d.ts.map +0 -1
- package/dist/bridge/src/drivers/continue.d.ts.map +0 -1
- package/dist/bridge/src/drivers/echo.d.ts.map +0 -1
- package/dist/bridge/src/drivers/flow-script.d.ts.map +0 -1
- package/dist/bridge/src/drivers/gemini.d.ts.map +0 -1
- package/dist/bridge/src/drivers/goose.d.ts.map +0 -1
- package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +0 -1
- package/dist/bridge/src/drivers/omp.d.ts.map +0 -1
- package/dist/bridge/src/drivers/opencode.d.ts.map +0 -1
- package/dist/bridge/src/drivers/qwen.d.ts.map +0 -1
- package/dist/bridge/src/drivers/recovery-policy.d.ts.map +0 -1
- package/dist/bridge/src/drivers/resume-probe.d.ts.map +0 -1
- package/dist/bridge/src/drivers/sanitize-assistant-text.d.ts.map +0 -1
- package/dist/bridge/src/drivers/scrub-transcript.d.ts.map +0 -1
- package/dist/bridge/src/provider-materialize/env-drivers.d.ts.map +0 -1
- package/dist/chunk-2NOLF7B2.js.map +0 -1
- package/dist/chunk-34C2EKWJ.js.map +0 -1
- package/dist/chunk-3KMREAR2.js.map +0 -1
- package/dist/chunk-4ZTPYIBE.js.map +0 -1
- package/dist/chunk-5BEFNLOR.js.map +0 -1
- package/dist/chunk-5TBFN46Z.js.map +0 -1
- package/dist/chunk-6E6PKKAD.js.map +0 -1
- package/dist/chunk-7ANRSTNR.js.map +0 -1
- package/dist/chunk-7FHZB2QU.js.map +0 -1
- package/dist/chunk-AIBAOXDU.js.map +0 -1
- package/dist/chunk-AJ7EGIFR.js.map +0 -1
- package/dist/chunk-B4X2N7JQ.js.map +0 -1
- package/dist/chunk-BBWSGVVE.js.map +0 -1
- package/dist/chunk-BO426QWN.js.map +0 -1
- package/dist/chunk-CKICWXMU.js.map +0 -1
- package/dist/chunk-CKNIYIV2.js.map +0 -1
- package/dist/chunk-D6UBEYQH.js.map +0 -1
- package/dist/chunk-EAZECHPM.js.map +0 -1
- package/dist/chunk-EPBKISS5.js.map +0 -1
- package/dist/chunk-GBYNC5V3.js.map +0 -1
- package/dist/chunk-GOK4QRJR.js.map +0 -1
- package/dist/chunk-HPVMTX6M.js.map +0 -1
- package/dist/chunk-IG5LZ3WU.js.map +0 -1
- package/dist/chunk-IW6F6R2W.js.map +0 -1
- package/dist/chunk-IZCR27MU.js.map +0 -1
- package/dist/chunk-JYWW32JI.js.map +0 -1
- package/dist/chunk-KY4UXX7M.js.map +0 -1
- package/dist/chunk-L2AMXONH.js.map +0 -1
- package/dist/chunk-LW7ZI6EQ.js.map +0 -1
- package/dist/chunk-MJHSLODD.js.map +0 -1
- package/dist/chunk-PBSN4RTV.js.map +0 -1
- package/dist/chunk-RP3FZ2T6.js.map +0 -1
- package/dist/chunk-SRNCN4X2.js.map +0 -1
- package/dist/chunk-T2TQAH2X.js.map +0 -1
- package/dist/chunk-U7V5SIFW.js.map +0 -1
- package/dist/chunk-VKPBUPH7.js.map +0 -1
- package/dist/chunk-VM3PH7BB.js.map +0 -1
- package/dist/chunk-WMF2C5U7.js.map +0 -1
- package/dist/chunk-X6GUNN7X.js.map +0 -1
- package/dist/chunk-XTO436PV.js.map +0 -1
- package/dist/chunk-Y56YIT6J.js.map +0 -1
- package/dist/chunk-YARXR3CN.js.map +0 -1
- package/dist/chunk-YROR332M.js.map +0 -1
- package/dist/chunk-YZ3N7IUU.js.map +0 -1
- package/dist/chunk-ZBMC6IAE.js.map +0 -1
- package/dist/cli/src/driver-error.d.ts +0 -21
- package/dist/cli/src/driver-error.d.ts.map +0 -1
- package/dist/connectors-YNQ3WJGM.js +0 -46
- package/dist/core/driver-targets.d.ts +0 -2
- package/dist/core/driver-targets.js +0 -4
- package/dist/core/driver-targets.js.map +0 -1
- package/dist/core/src/driver-sdk.d.ts.map +0 -1
- package/dist/core/src/driver-targets.d.ts +0 -71
- package/dist/core/src/driver-targets.d.ts.map +0 -1
- package/dist/flows-BHY73K3O.js +0 -26
- package/dist/library-publish-NWWVYJUK.js.map +0 -1
- package/dist/open-library-7ZG2FFAX.js +0 -42
- package/dist/open-registry-RBELV5YH.js +0 -32
- package/dist/paths-BFM6K2QO.js +0 -22
- package/dist/plugin-store-QOQDM24E.js +0 -23
- package/dist/project-YQM3I25D.js +0 -83
- package/dist/runner/src/driver-swap-gate.d.ts.map +0 -1
- package/dist/serve-preflight-5QMY7DBC.js +0 -60
- package/dist/serve-preflight-5QMY7DBC.js.map +0 -1
- package/dist/sessions-DICDEONJ.js +0 -5
- package/dist/setup-AAHVAXRA.js.map +0 -1
- package/dist/skills-RSZVUIYZ.js +0 -26
- package/dist/source-KWMCMEMB.js +0 -84
- package/dist/source-manifest-publish-EDYKM4YZ.js.map +0 -1
- package/dist/validator-FA2PFW6N.js +0 -5
- /package/dist/bridge/{drivers → harnesses}/gemini.js.map +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -1,97 +1,99 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { makeValidateCommand, scanIdentities, isRecord } from '../chunk-NMI2TWMH.js';
|
|
2
3
|
import { storeNotInstallableReason } from '../chunk-PUK7TQT4.js';
|
|
3
|
-
import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-
|
|
4
|
-
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportRewritten, reportReplaced, reportRelocked, reportMoved, reportStoreNotChecked, globalProblems, editedConventionFiles, supportsInstallManifest, REF_HINT, reportInstalledSoftDeps } from '../chunk-
|
|
4
|
+
import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError, removeProviderEntry } from '../chunk-3IXIEHUB.js';
|
|
5
|
+
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, pinComposedAgents, reportRewritten, reportReplaced, reportRelocked, reportMoved, reportStoreNotChecked, globalProblems, editedConventionFiles, supportsInstallManifest, REF_HINT, reportInstalledSoftDeps } from '../chunk-WEH33JSG.js';
|
|
5
6
|
import { createSpinner } from '../chunk-NESV47MF.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, parseHarnessFilter, requireProjectConfig, deferredWarnings, warnPlaceholderBodies, warnFilesOnlyDelegates, reportLegacyOmpCopies, logNoProject, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-
|
|
14
|
-
import { getKindRegistry, getKnownKinds } from '../chunk-
|
|
7
|
+
import { getStoreConfig, storeFetch, isStoreAuthenticated, getStoreToken } from '../chunk-VXEYX73S.js';
|
|
8
|
+
import { makeSourceCommand, syncProjectSources, divergedSourceClones } from '../chunk-WYHQUCHR.js';
|
|
9
|
+
import { deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, exitOnLibrarySymlinks, resolveLibraryPublisherDetailed, getStoreIdentity, warnLibraryNameFallback, indexLibrary, warnIgnoredDomainFiles, removedDomainOption, rejectRemovedDomainOption, requireValidPublisherOrExit, exitOnManifestPublisherProblems, findAssetManifestFile, checkAssetFile, registerLibraryAsset, DOMAIN_REMOVED_HINT, reportLibrarySymlinks, checkAsset, manifestPublisherProblems, exitOnManifestRootProblems, manifestRequiresProblems, composeRefContext, registeredAssetKeys, assetEntryRef, duplicateAssetMessage, unresolvedManifestDependencies, findEntryManifestFile, unheldRequiresOfFile, warnLegacyBundleFiles, checkComposeKinds } from '../chunk-TKHJXPSB.js';
|
|
10
|
+
import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-DHYSUJ3H.js';
|
|
11
|
+
import { AI_RESOURCES } from '../chunk-2UUKCROR.js';
|
|
12
|
+
import { loadDeclaredPlugins } from '../chunk-YGRZNFRO.js';
|
|
13
|
+
import { status, enable, disable, install, uninstall } from '../chunk-Y2TO2U7W.js';
|
|
14
|
+
import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, parseHarnessFilter, requireProjectConfig, deferredWarnings, warnPlaceholderBodies, warnFilesOnlyDelegates, reportLegacyOmpCopies, logNoProject, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-KX2PT5Q4.js';
|
|
15
|
+
import { getKindRegistry, getKnownKinds } from '../chunk-ARWKK325.js';
|
|
15
16
|
import { LocalSecretsProvider } from '../chunk-ILFGVSTJ.js';
|
|
16
|
-
import { resolveInstanceAgentDir, instanceSessionOverrides, runAgentChat, isCompositionError, resolveSessionId, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition,
|
|
17
|
-
import
|
|
18
|
-
import '../chunk-
|
|
19
|
-
import '../chunk-
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
17
|
+
import { resolveInstanceAgentDir, instanceSessionOverrides, runAgentChat, isCompositionError, resolveSessionId, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition, manifestModelForHarness, instanceForSession, resolveAgentInstance, describeComposition, MarkdownStreamer, createFinalTextFallback } from '../chunk-VJRTDKXS.js';
|
|
18
|
+
import '../chunk-VBI7HGHB.js';
|
|
19
|
+
import '../chunk-OULSJRXV.js';
|
|
20
|
+
import '../chunk-7TPYPVAH.js';
|
|
21
|
+
import '../chunk-SRODW6M2.js';
|
|
22
|
+
import '../chunk-WYZXSJBK.js';
|
|
23
|
+
import '../chunk-U56GGCC2.js';
|
|
23
24
|
import '../chunk-6Z5KTFJT.js';
|
|
24
|
-
import '../chunk-
|
|
25
|
-
import '../chunk-
|
|
26
|
-
import '../chunk-
|
|
25
|
+
import '../chunk-KW37WNXY.js';
|
|
26
|
+
import '../chunk-3MWQKQUB.js';
|
|
27
|
+
import '../chunk-E3GPGTW3.js';
|
|
27
28
|
import '../chunk-O7SG5PC2.js';
|
|
28
29
|
import '../chunk-7QBNJTTQ.js';
|
|
29
30
|
import '../chunk-O2SYFJWP.js';
|
|
30
|
-
import '../chunk-
|
|
31
|
+
import '../chunk-AF432MS3.js';
|
|
31
32
|
import '../chunk-32NA4TVC.js';
|
|
32
33
|
import '../chunk-W3UDISS2.js';
|
|
33
|
-
import '../chunk-
|
|
34
|
-
import '../chunk-
|
|
35
|
-
import { runFlow, resumeFlow } from '../chunk-X6GUNN7X.js';
|
|
34
|
+
import '../chunk-ZFUZ5AKM.js';
|
|
35
|
+
import { runFlow, resumeFlow } from '../chunk-T2BDID2J.js';
|
|
36
36
|
import '../chunk-4R6DROGN.js';
|
|
37
37
|
import { parseSkillRequirements, validateRequirements } from '../chunk-FKU57Q5Q.js';
|
|
38
38
|
import '../chunk-H6UVIKQ2.js';
|
|
39
|
-
import '../chunk-
|
|
40
|
-
import '../chunk-
|
|
41
|
-
import '../chunk-
|
|
42
|
-
import { checkModelProvider,
|
|
43
|
-
import '../chunk-
|
|
44
|
-
import '../chunk-
|
|
39
|
+
import '../chunk-SNEE6UGY.js';
|
|
40
|
+
import '../chunk-6GWSDPBP.js';
|
|
41
|
+
import '../chunk-LN6QB7XI.js';
|
|
42
|
+
import { checkModelProvider, checkHarnessModel } from '../chunk-4XWLB7JB.js';
|
|
43
|
+
import '../chunk-WDAIWDLK.js';
|
|
44
|
+
import '../chunk-4DWBSTYA.js';
|
|
45
|
+
import '../chunk-JDR6ILCW.js';
|
|
45
46
|
import '../chunk-LOO5CB5M.js';
|
|
46
|
-
import '../chunk-
|
|
47
|
-
import '../chunk-
|
|
48
|
-
import '../chunk-
|
|
49
|
-
import '../chunk-
|
|
50
|
-
import '../chunk-
|
|
51
|
-
import
|
|
52
|
-
import '../chunk-
|
|
47
|
+
import '../chunk-BIRW3HOG.js';
|
|
48
|
+
import '../chunk-7CV3HFWJ.js';
|
|
49
|
+
import '../chunk-GEQSUC6U.js';
|
|
50
|
+
import '../chunk-XFIEVEU7.js';
|
|
51
|
+
import '../chunk-7DN6JKP2.js';
|
|
52
|
+
import '../chunk-UVVVR4XO.js';
|
|
53
|
+
import { listHarnesses, getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-F2GOZMRA.js';
|
|
54
|
+
import '../chunk-G5SUWZEU.js';
|
|
53
55
|
import '../chunk-IFGTRL2I.js';
|
|
54
|
-
import {
|
|
55
|
-
import '../chunk-
|
|
56
|
+
import { loadFlow, flowLookupRoots, findFlowFileInRoots, loadAllFlowEntries } from '../chunk-SZXGRHQQ.js';
|
|
57
|
+
import '../chunk-WD3L5QSU.js';
|
|
56
58
|
import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind } from '../chunk-7RGTAEG6.js';
|
|
57
|
-
import '../chunk-
|
|
58
|
-
import { LibraryEntryError, AssetManager, parseRefTolerant, MissingManifestError, normalizeRepoUrl, FACTORY_SOURCE_URL
|
|
59
|
-
import { CatalogHttpError, libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, isGitRepo, ensureGitRepo, conflictingAssetRoot, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, getStoreManifestsDir, assertValidLibraryName, unparsableAssetFiles, syncManifestWithDisk, storeManifestFile, getDefaultValue, isSecretPlaceholder } from '../chunk-
|
|
60
|
-
import { flowFileNameError, SEMVER_RE } from '../chunk-
|
|
61
|
-
import '../chunk-
|
|
59
|
+
import '../chunk-JCPD4QRM.js';
|
|
60
|
+
import { LibraryEntryError, AssetManager, parseRefTolerant, MissingManifestError, parseCanonicalLockKey, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-OAHVKSQJ.js';
|
|
61
|
+
import { CatalogHttpError, libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, isGitRepo, ensureGitRepo, conflictingAssetRoot, scanUnlistedAssets, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, getStoreManifestsDir, assertValidLibraryName, unparsableAssetFiles, syncManifestWithDisk, renamedLibraryName, storeManifestFile, getDefaultValue, isSecretPlaceholder } from '../chunk-UL22SDGR.js';
|
|
62
|
+
import { flowFileNameError, SEMVER_RE } from '../chunk-QOM5Z62G.js';
|
|
63
|
+
import '../chunk-7XSAW5OC.js';
|
|
62
64
|
import '../chunk-BFMYYNDT.js';
|
|
63
65
|
import '../chunk-3TXEJN4W.js';
|
|
64
66
|
import '../chunk-ISHJITXJ.js';
|
|
65
67
|
import '../chunk-LNFKL23K.js';
|
|
66
68
|
import '../chunk-X3RMRJNR.js';
|
|
67
69
|
import '../chunk-NUELZWCF.js';
|
|
68
|
-
import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-
|
|
70
|
+
import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-3JKGY2YC.js';
|
|
69
71
|
import '../chunk-NOA6EJXE.js';
|
|
70
72
|
import '../chunk-KTBKW2FI.js';
|
|
71
73
|
import '../chunk-UQ6LFBPZ.js';
|
|
72
|
-
import '../chunk-
|
|
73
|
-
import { effectiveComposes, validatePreset, validateAgent, composeSlotDiagnostics, agentDeprecationDiagnostics, SLOT_ID_PATTERN } from '../chunk-
|
|
74
|
-
import { loadSettings, globalSettingsPath, resolveSettings, projectSettingsPath, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, readLock, globalInstallDir, GLOBAL_INSTALL_DIR_NAME,
|
|
74
|
+
import '../chunk-DUMTLYSO.js';
|
|
75
|
+
import { effectiveComposes, validatePreset, validateAgent, composeSlotDiagnostics, agentDeprecationDiagnostics, SLOT_ID_PATTERN } from '../chunk-E572OHGY.js';
|
|
76
|
+
import { loadSettings, globalSettingsPath, resolveSettings, projectSettingsPath, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, readLock, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-L4YKW5AY.js';
|
|
75
77
|
import '../chunk-4GY63JU6.js';
|
|
76
|
-
import { factoryAssetRoots } from '../chunk-
|
|
77
|
-
import { deployedDir } from '../chunk-
|
|
78
|
-
import {
|
|
79
|
-
import { findKindDirs } from '../chunk-
|
|
80
|
-
import { SourceEntryError, resolveSkWorkspaceConfig, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, effectiveAgentInstances, matchPin, coerceVersion, loadSkWorkspaceConfig, isWorkspaceConfigFilename } from '../chunk-
|
|
78
|
+
import { factoryAssetRoots } from '../chunk-OTIB4D2K.js';
|
|
79
|
+
import { deployedDir } from '../chunk-5KRMNUL4.js';
|
|
80
|
+
import { DEFAULT_HARNESS_ID, HARNESS_DEFAULTS } from '../chunk-Z7ZEZZB6.js';
|
|
81
|
+
import { findKindDirs } from '../chunk-MWXYN6NY.js';
|
|
82
|
+
import { SourceEntryError, LegacyKeyError, resolveSkWorkspaceConfig, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, effectiveAgentInstances, matchPin, coerceVersion, loadSkWorkspaceConfig, findWorkspaceRoot, isWorkspaceConfigFilename, SKAILE_YAML_DEFAULT, AGENT_PROFILE_FIELDS } from '../chunk-OHNKYHRR.js';
|
|
81
83
|
import { globalCacheRoot, globalSkaileDir, userConfigPath } from '../chunk-L5VSIPQD.js';
|
|
82
|
-
import {
|
|
83
|
-
import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, LIBRARY_GITIGNORE, librarySymlinkMessage, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-
|
|
84
|
+
import { HARNESS_TARGETS, SUPPORTED_HARNESSES, harnessNameForHarnessId } from '../chunk-VTETQCR6.js';
|
|
85
|
+
import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, LIBRARY_GITIGNORE, librarySymlinkMessage, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-UQ33Y4DM.js';
|
|
84
86
|
import { pluginTitle } from '../chunk-RVRB27AN.js';
|
|
85
87
|
import { dedupeRequirements, parseFrontmatter, scanDirectory, parseRequires } from '../chunk-GOCWM7FN.js';
|
|
86
88
|
import { parseAssetRef, isValidPublisher, PUBLISHER_HINT, isValidAssetName, ASSET_NAME_HINT, depToStr, assetRefToStr, slugifyAssetName, parseAssetRefLoose } from '../chunk-WDXZA7QW.js';
|
|
87
|
-
import { portableSpawn, portableSpawnSync } from '../chunk-
|
|
89
|
+
import { portableSpawn, portableSpawnSync } from '../chunk-ADPM6AYF.js';
|
|
88
90
|
import { openSqlite } from '../chunk-DKXNKFKP.js';
|
|
89
|
-
import { parseModelRef, resolveEntryBaseUrl } from '../chunk-
|
|
91
|
+
import { parseModelRef, resolveEntryBaseUrl } from '../chunk-LSI2IVFT.js';
|
|
90
92
|
import '../chunk-C3CAXQMA.js';
|
|
91
93
|
import { registerLogStore, LogStore, StdoutSink } from '../chunk-BOFL7GIF.js';
|
|
92
94
|
import '../chunk-NSBPE2FW.js';
|
|
93
|
-
import * as
|
|
94
|
-
import
|
|
95
|
+
import * as fs8 from 'fs';
|
|
96
|
+
import fs8__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
|
|
95
97
|
import * as path18 from 'path';
|
|
96
98
|
import path18__default, { resolve, join } from 'path';
|
|
97
99
|
import { fileURLToPath } from 'url';
|
|
@@ -231,7 +233,7 @@ async function runSearch(kind, query, opts) {
|
|
|
231
233
|
}
|
|
232
234
|
}
|
|
233
235
|
async function searchIndex(query, kind) {
|
|
234
|
-
const { openLibrary: openLibrary2 } = await import('../open-library-
|
|
236
|
+
const { openLibrary: openLibrary2 } = await import('../open-library-RJGJIW5H.js');
|
|
235
237
|
const library = await openLibrary2();
|
|
236
238
|
try {
|
|
237
239
|
const { libraryDirMissing: libraryDirMissing2 } = await import('../library/index.js');
|
|
@@ -383,14 +385,14 @@ async function expandCompetingOrigins(entries, projectDir) {
|
|
|
383
385
|
}
|
|
384
386
|
async function searchLocal(query, kind, opts, showStore, airGapped) {
|
|
385
387
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
386
|
-
const { restoreSourceReaders } = await import('../source-
|
|
388
|
+
const { restoreSourceReaders } = await import('../source-GBMYD3RO.js');
|
|
387
389
|
for (const name of await restoreSourceReaders(projectDir)) {
|
|
388
390
|
logInfo(`Re-registered source "${name}" (its library entry was removed elsewhere).`);
|
|
389
391
|
}
|
|
390
392
|
const factory = await searchFactory(projectDir, query, kind);
|
|
391
393
|
let entries = unionEntries(await searchIndex(query, kind), factory);
|
|
392
394
|
if (entries.length === 0 && !query && !kind && !airGapped) {
|
|
393
|
-
const { autoSyncForSearch } = await import('../source-
|
|
395
|
+
const { autoSyncForSearch } = await import('../source-GBMYD3RO.js');
|
|
394
396
|
if (await autoSyncForSearch(projectDir)) {
|
|
395
397
|
entries = unionEntries(await searchIndex(query, kind), factory);
|
|
396
398
|
}
|
|
@@ -504,7 +506,7 @@ async function searchStore(query, kind, opts, airGapped) {
|
|
|
504
506
|
logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
|
|
505
507
|
return;
|
|
506
508
|
}
|
|
507
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
509
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-RJGJIW5H.js');
|
|
508
510
|
try {
|
|
509
511
|
const remote = await openCatalogSource2({ projectDir: path18__default.resolve(opts.projectDir) });
|
|
510
512
|
const assets = await remote.listAssets(kind ? { kind } : {});
|
|
@@ -613,7 +615,7 @@ function makeAddCommand() {
|
|
|
613
615
|
return new Command("add").description("Add to skaile.yaml + deploy").argument("<ref>", "Asset reference (kind:@<publisher>/name#<version>)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Record in ~/.skaile/skaile.yaml + deploy to every global harness").option(
|
|
614
616
|
"--harness <ids>",
|
|
615
617
|
"Comma-separated global harnesses to deploy into (default: all resolved); implies --global"
|
|
616
|
-
).option("--target <agent>", `
|
|
618
|
+
).option("--target <agent>", `Harness target (${TARGET_DEFAULT_HINT})`).option(
|
|
617
619
|
"--link",
|
|
618
620
|
"symlink local-path assets instead of copying (dev loop; machine-local, not for committing)"
|
|
619
621
|
).option(
|
|
@@ -636,7 +638,7 @@ function makeAddCommand() {
|
|
|
636
638
|
projectDir: path18__default.resolve(opts.projectDir),
|
|
637
639
|
global: opts.global || harnesses !== void 0,
|
|
638
640
|
harnesses,
|
|
639
|
-
|
|
641
|
+
harness: opts.target,
|
|
640
642
|
verboseCollisions: opts.verbose === true,
|
|
641
643
|
onLibraryCollision: (msg, keys) => {
|
|
642
644
|
collisionKeys.push(...keys ?? [msg.split(" exists in ")[0]]);
|
|
@@ -673,6 +675,7 @@ function makeAddCommand() {
|
|
|
673
675
|
});
|
|
674
676
|
spinner.stop("Done");
|
|
675
677
|
warnings.flush();
|
|
678
|
+
if (!am2.global) await pinComposedAgents(am2.projectDir);
|
|
676
679
|
await promptSoftDepAdds(am2, ref, {
|
|
677
680
|
isTTY: !!process.stdin.isTTY,
|
|
678
681
|
link: opts.link,
|
|
@@ -685,12 +688,25 @@ function makeAddCommand() {
|
|
|
685
688
|
onHint: (line) => logInfo(S.dim(line))
|
|
686
689
|
});
|
|
687
690
|
if (added.length === 0) {
|
|
688
|
-
const
|
|
691
|
+
const parsedRef = parseAssetRef(ref);
|
|
692
|
+
const kind = parsedRef.kind;
|
|
689
693
|
const presetNote = presetAddNote(ref, presets);
|
|
694
|
+
const mcpFootprint = kind === "mcp-server" ? await am2.mcpRenderFootprint(parsedRef.name) : void 0;
|
|
690
695
|
if (presetNote) logInfo(presetNote);
|
|
691
|
-
else if (
|
|
696
|
+
else if (mcpFootprint?.written)
|
|
692
697
|
logInfo(
|
|
693
|
-
`
|
|
698
|
+
`Wrote ${S.cmd(`${mcpFootprint.file} entry "${parsedRef.name}"`)}${mcpFootprint.payloadDir ? ` and ${S.cmd(mcpFootprint.payloadDir)}` : ""}`
|
|
699
|
+
);
|
|
700
|
+
else if (mcpFootprint) {
|
|
701
|
+
const why = (await am2.mcpNotices()).find(
|
|
702
|
+
(n) => n.kind === "skipped" && n.id === parsedRef.name
|
|
703
|
+
);
|
|
704
|
+
logInfo(
|
|
705
|
+
`Recorded in skaile.yaml; ${mcpFootprint.file} has no entry for "${parsedRef.name}"${why?.reason ? ` (${why.reason})` : ""}.`
|
|
706
|
+
);
|
|
707
|
+
} else if (!installTargetOf(getKindRegistry(), kind))
|
|
708
|
+
logInfo(
|
|
709
|
+
`Recorded in skaile.yaml (store bytes are fetched + verified into .skaile/cache/store). ${kind} assets are not deployed into the harness target \u2014 they are composed when skaile runs the agent.`
|
|
694
710
|
);
|
|
695
711
|
else logInfo("Nothing to deploy (already up to date).");
|
|
696
712
|
} else {
|
|
@@ -699,7 +715,7 @@ function makeAddCommand() {
|
|
|
699
715
|
logOk(library ? `${a} (library ${library})` : a);
|
|
700
716
|
}
|
|
701
717
|
warnPlaceholderBodies(placeholderBodies, placeholderDescriptions);
|
|
702
|
-
if (!am2.global) warnFilesOnlyDelegates(am2.projectDir, am2.
|
|
718
|
+
if (!am2.global) warnFilesOnlyDelegates(am2.projectDir, am2.harness);
|
|
703
719
|
if (am2.global) {
|
|
704
720
|
for (const a of added) {
|
|
705
721
|
const { kind, name } = parseAssetRef(a);
|
|
@@ -748,7 +764,7 @@ function makeRemoveCommand() {
|
|
|
748
764
|
return new Command("remove").description("Remove from skaile.yaml + undeploy").argument("<ref>", "Asset reference (kind:@publisher/name, or kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Remove from ~/.skaile/skaile.yaml + undeploy from every global harness").option(
|
|
749
765
|
"--harness <ids>",
|
|
750
766
|
"Comma-separated global harnesses to undeploy from (default: all resolved); implies --global"
|
|
751
|
-
).option("--target <agent>", `
|
|
767
|
+
).option("--target <agent>", `Harness target (${TARGET_DEFAULT_HINT})`).option(
|
|
752
768
|
"--force",
|
|
753
769
|
"Remove even when another installed asset requires it, or when the folder is not one the lock holds"
|
|
754
770
|
).option("--no-soft-deps", "skip the orphaned-soft-dep prompt (don't remove, don't report)").action(async (ref, opts) => {
|
|
@@ -760,7 +776,7 @@ function makeRemoveCommand() {
|
|
|
760
776
|
projectDir: path18__default.resolve(opts.projectDir),
|
|
761
777
|
global: opts.global || harnesses !== void 0,
|
|
762
778
|
harnesses,
|
|
763
|
-
|
|
779
|
+
harness: opts.target
|
|
764
780
|
});
|
|
765
781
|
let result;
|
|
766
782
|
try {
|
|
@@ -818,8 +834,8 @@ function makeListCommand() {
|
|
|
818
834
|
"-g, --global",
|
|
819
835
|
"Read the global SSOT (~/.skaile/skaile.yaml); report state per harness"
|
|
820
836
|
).option("--harness <ids>", "Comma-separated global harnesses to report (implies --global)").option("--json", "Output as JSON").addOption(
|
|
821
|
-
new Option("--target <agent>", `
|
|
822
|
-
|
|
837
|
+
new Option("--target <agent>", `Harness target (${TARGET_DEFAULT_HINT})`).choices(
|
|
838
|
+
SUPPORTED_HARNESSES
|
|
823
839
|
)
|
|
824
840
|
).action(async (kind, opts) => {
|
|
825
841
|
const harnesses = parseHarnessFilter(opts.harness);
|
|
@@ -830,7 +846,7 @@ function makeListCommand() {
|
|
|
830
846
|
const am2 = new AssetManager({
|
|
831
847
|
registry: getKindRegistry(),
|
|
832
848
|
projectDir: path18__default.resolve(opts.projectDir),
|
|
833
|
-
|
|
849
|
+
harness: opts.target
|
|
834
850
|
});
|
|
835
851
|
let declared;
|
|
836
852
|
try {
|
|
@@ -949,12 +965,21 @@ function readTextOrEmpty(file) {
|
|
|
949
965
|
return "";
|
|
950
966
|
}
|
|
951
967
|
}
|
|
952
|
-
function
|
|
968
|
+
function infoShowsLocked(locked, latest) {
|
|
969
|
+
return locked !== void 0 && !locked.startsWith("0.0.0-sha") && latest !== void 0 && latest !== locked;
|
|
970
|
+
}
|
|
971
|
+
function infoVersionLine(locked, latest) {
|
|
972
|
+
if (infoShowsLocked(locked, latest)) return `locked ${locked} (latest ${latest})`;
|
|
973
|
+
return latest || void 0;
|
|
974
|
+
}
|
|
975
|
+
function lockedVersionOf(projectDir, kind, name, publisher) {
|
|
953
976
|
try {
|
|
954
977
|
const lock = readLock(path18__default.join(projectDir, "skaile.lock.yaml"));
|
|
955
978
|
for (const key of Object.keys(lock?.assets ?? {})) {
|
|
956
979
|
const id = parseCanonicalLockKey(key);
|
|
957
|
-
if (id.kind
|
|
980
|
+
if (id.kind !== kind || id.name !== name || !id.version) continue;
|
|
981
|
+
if (publisher && id.publisher && id.publisher !== publisher.replace(/^@/, "")) continue;
|
|
982
|
+
return id.version;
|
|
958
983
|
}
|
|
959
984
|
} catch {
|
|
960
985
|
}
|
|
@@ -989,7 +1014,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
989
1014
|
return { entry: match ?? deployed };
|
|
990
1015
|
}
|
|
991
1016
|
const lookup = opts.storeLookup ?? (async (filter) => {
|
|
992
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
1017
|
+
const { resolveCatalogSource } = await import('../open-library-RJGJIW5H.js');
|
|
993
1018
|
const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
|
|
994
1019
|
try {
|
|
995
1020
|
return await source.listAssets(filter);
|
|
@@ -1005,7 +1030,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
1005
1030
|
);
|
|
1006
1031
|
return { entry: hit ? catalogAssetToEntry(hit) : null };
|
|
1007
1032
|
} catch (err) {
|
|
1008
|
-
const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
1033
|
+
const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-RJGJIW5H.js');
|
|
1009
1034
|
const storeNote = err instanceof Error ? err.message : String(err);
|
|
1010
1035
|
const disabled = err instanceof LocalCatalogDisabledError2 || /catalog\.url/i.test(storeNote);
|
|
1011
1036
|
return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
|
|
@@ -1041,10 +1066,19 @@ function makeInfoCommand() {
|
|
|
1041
1066
|
console.log(` ${S.heading(entry.name)}`);
|
|
1042
1067
|
console.log(` ${S.rule(40)}`);
|
|
1043
1068
|
console.log(` kind: ${kindColor(entry.kind)}`);
|
|
1044
|
-
|
|
1069
|
+
const infoLocked = lockedVersionOf(
|
|
1070
|
+
projectDir,
|
|
1071
|
+
entry.kind,
|
|
1072
|
+
entry.name,
|
|
1073
|
+
parseRefTolerant(ref)?.publisher
|
|
1074
|
+
);
|
|
1075
|
+
const showLocked = infoShowsLocked(infoLocked, entry.version);
|
|
1076
|
+
const infoVersionText = infoVersionLine(infoLocked, entry.version);
|
|
1077
|
+
if (infoVersionText) console.log(` version: ${infoVersionText}`);
|
|
1045
1078
|
if (entry.description) console.log(` description: ${entry.description}`);
|
|
1046
1079
|
if (entry.publisher) console.log(` repository: ${S.dim(entry.publisher)}`);
|
|
1047
|
-
|
|
1080
|
+
const infoSource = showLocked && entry.source.endsWith(`#${entry.version}`) ? `${entry.source.slice(0, -`#${entry.version}`.length)}#${infoLocked}` : entry.source;
|
|
1081
|
+
console.log(` source: ${S.dim(infoSource)}`);
|
|
1048
1082
|
if (entry.kind === "mcp-server") {
|
|
1049
1083
|
const skipped = (await am2.mcpNotices()).find(
|
|
1050
1084
|
(n) => n.kind === "skipped" && (n.id === entry.name || n.id.endsWith(`/${entry.name}`))
|
|
@@ -1118,13 +1152,17 @@ function makeDoctorCommand() {
|
|
|
1118
1152
|
});
|
|
1119
1153
|
const { gaps } = await am2.projectState();
|
|
1120
1154
|
const edited = await editedConventionFiles(path18__default.resolve(opts.projectDir));
|
|
1121
|
-
const notices =
|
|
1155
|
+
const notices = [
|
|
1156
|
+
...(await am2.mcpNotices()).map((n) => n.text),
|
|
1157
|
+
// A library that went back past the lock is no drift either (p1257).
|
|
1158
|
+
...await am2.libraryOlderNotices()
|
|
1159
|
+
];
|
|
1122
1160
|
if (gaps.length === 0 && edited.length === 0) {
|
|
1123
1161
|
logOk("No missing dependencies.");
|
|
1124
|
-
for (const n of notices) logWarn(n
|
|
1162
|
+
for (const n of notices) logWarn(n);
|
|
1125
1163
|
return;
|
|
1126
1164
|
}
|
|
1127
|
-
for (const n of notices) logWarn(n
|
|
1165
|
+
for (const n of notices) logWarn(n);
|
|
1128
1166
|
process.exitCode = 1;
|
|
1129
1167
|
for (const e of edited) logErr(e);
|
|
1130
1168
|
for (const g of gaps) if (g.type !== "requires") logErr(g.message);
|
|
@@ -1156,16 +1194,16 @@ function claudeSkillRoots() {
|
|
|
1156
1194
|
}
|
|
1157
1195
|
function resolveImportSource(nameOrPath) {
|
|
1158
1196
|
const asPath = path18.resolve(nameOrPath);
|
|
1159
|
-
if (
|
|
1160
|
-
const dir =
|
|
1197
|
+
if (fs8.existsSync(asPath)) {
|
|
1198
|
+
const dir = fs8.statSync(asPath).isDirectory() ? asPath : path18.dirname(asPath);
|
|
1161
1199
|
const skillFile = path18.join(dir, "SKILL.md");
|
|
1162
|
-
if (
|
|
1200
|
+
if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "path" };
|
|
1163
1201
|
}
|
|
1164
1202
|
if (!nameOrPath.includes(path18.sep) && !nameOrPath.startsWith(".")) {
|
|
1165
1203
|
for (const root of claudeSkillRoots()) {
|
|
1166
1204
|
const dir = path18.join(root, nameOrPath);
|
|
1167
1205
|
const skillFile = path18.join(dir, "SKILL.md");
|
|
1168
|
-
if (
|
|
1206
|
+
if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
|
|
1169
1207
|
}
|
|
1170
1208
|
}
|
|
1171
1209
|
return null;
|
|
@@ -1304,7 +1342,7 @@ function makeAssetCommand() {
|
|
|
1304
1342
|
);
|
|
1305
1343
|
process.exit(1);
|
|
1306
1344
|
}
|
|
1307
|
-
const rawSkill =
|
|
1345
|
+
const rawSkill = fs8.readFileSync(src.skillFile, "utf8");
|
|
1308
1346
|
const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
|
|
1309
1347
|
fallbackName: path18.basename(src.dir),
|
|
1310
1348
|
version: opts.version,
|
|
@@ -1316,7 +1354,7 @@ function makeAssetCommand() {
|
|
|
1316
1354
|
);
|
|
1317
1355
|
}
|
|
1318
1356
|
const destDir = path18.join(target.path, norm.name);
|
|
1319
|
-
if (
|
|
1357
|
+
if (fs8.existsSync(destDir)) {
|
|
1320
1358
|
logErr(`Destination already exists: ${destDir}`);
|
|
1321
1359
|
process.exit(1);
|
|
1322
1360
|
}
|
|
@@ -1346,8 +1384,8 @@ function makeAssetCommand() {
|
|
|
1346
1384
|
for (const f of checked.advisories) {
|
|
1347
1385
|
logWarn(`${norm.name}/SKILL.md [${f.tag}] \u2014 ${f.text}`);
|
|
1348
1386
|
}
|
|
1349
|
-
|
|
1350
|
-
|
|
1387
|
+
fs8.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
|
|
1388
|
+
fs8.writeFileSync(path18.join(destDir, "SKILL.md"), norm.content, "utf8");
|
|
1351
1389
|
for (const note of norm.notes) logInfo(` \u2022 ${note}`);
|
|
1352
1390
|
const fm = parseFrontmatter(norm.content).data;
|
|
1353
1391
|
for (const f of checkAgentSkillConformance(fm, { dirName: norm.name })) {
|
|
@@ -1387,7 +1425,7 @@ function makeAssetCommand() {
|
|
|
1387
1425
|
logErr(`Invalid --mode "${opts.mode}". Expected: copy | move.`);
|
|
1388
1426
|
process.exit(1);
|
|
1389
1427
|
}
|
|
1390
|
-
if (!
|
|
1428
|
+
if (!fs8.existsSync(srcPath)) {
|
|
1391
1429
|
logErr(`Source path does not exist: ${srcPath}`);
|
|
1392
1430
|
process.exit(1);
|
|
1393
1431
|
}
|
|
@@ -1415,9 +1453,9 @@ function makeAssetCommand() {
|
|
|
1415
1453
|
}
|
|
1416
1454
|
const basename3 = path18.basename(srcPath);
|
|
1417
1455
|
const destDir = target.path;
|
|
1418
|
-
|
|
1456
|
+
fs8.mkdirSync(destDir, { recursive: true });
|
|
1419
1457
|
const destPath = path18.join(destDir, basename3);
|
|
1420
|
-
if (
|
|
1458
|
+
if (fs8.existsSync(destPath)) {
|
|
1421
1459
|
logErr(`Destination already exists: ${destPath}`);
|
|
1422
1460
|
process.exit(1);
|
|
1423
1461
|
}
|
|
@@ -1429,10 +1467,10 @@ function makeAssetCommand() {
|
|
|
1429
1467
|
}
|
|
1430
1468
|
switch (opts.mode) {
|
|
1431
1469
|
case "copy":
|
|
1432
|
-
|
|
1470
|
+
fs8.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
|
|
1433
1471
|
break;
|
|
1434
1472
|
case "move":
|
|
1435
|
-
|
|
1473
|
+
fs8.renameSync(srcPath, destPath);
|
|
1436
1474
|
break;
|
|
1437
1475
|
}
|
|
1438
1476
|
if (target.backend === "git" && opts.commit) {
|
|
@@ -1448,7 +1486,7 @@ function makeAssetCommand() {
|
|
|
1448
1486
|
}
|
|
1449
1487
|
logOk(`Migrated ${basename3} \u2192 ${target.name} (${opts.mode})`);
|
|
1450
1488
|
const publisher = loadSkPublishManifest(target.path)?.publisher ?? "<publisher>";
|
|
1451
|
-
const migratedKind =
|
|
1489
|
+
const migratedKind = fs8.existsSync(path18.join(destPath, "SKILL.md")) ? "skill" : "<kind>";
|
|
1452
1490
|
logInfo(
|
|
1453
1491
|
`Not addable yet: run ${S.cmd(`skaile library index ${target.name}`)}, then ${S.cmd(`skaile add ${migratedKind}:@${publisher.replace(/^@/, "")}/${basename3}`)}`
|
|
1454
1492
|
);
|
|
@@ -1703,7 +1741,7 @@ function makeCatalogCommand() {
|
|
|
1703
1741
|
return catalog;
|
|
1704
1742
|
}
|
|
1705
1743
|
async function runLocalCatalogTest(projectDir) {
|
|
1706
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
1744
|
+
const { resolveCatalogSource } = await import('../open-library-RJGJIW5H.js');
|
|
1707
1745
|
let resolved;
|
|
1708
1746
|
try {
|
|
1709
1747
|
resolved = await resolveCatalogSource({ projectDir });
|
|
@@ -1850,17 +1888,23 @@ complete -F _${bin}_completion ${bin}`,
|
|
|
1850
1888
|
end
|
|
1851
1889
|
complete -c ${bin} -f -a '(__${bin}_complete)'`
|
|
1852
1890
|
};
|
|
1853
|
-
function
|
|
1891
|
+
function flowsOfRoots(roots) {
|
|
1854
1892
|
const byId = /* @__PURE__ */ new Map();
|
|
1855
|
-
for (const root of
|
|
1893
|
+
for (const root of roots) {
|
|
1856
1894
|
for (const { flow } of loadAllFlowEntries(root)) {
|
|
1857
1895
|
if (!byId.has(flow.id)) byId.set(flow.id, flow);
|
|
1858
1896
|
}
|
|
1859
1897
|
}
|
|
1860
1898
|
return [...byId.values()];
|
|
1861
1899
|
}
|
|
1862
|
-
function
|
|
1863
|
-
return
|
|
1900
|
+
function discoverProjectFlows(projectDir) {
|
|
1901
|
+
return flowsOfRoots(flowLookupRoots(projectDir));
|
|
1902
|
+
}
|
|
1903
|
+
function findProjectFlowFile(flowId, projectDir) {
|
|
1904
|
+
return findFlowFileInRoots(flowId, flowLookupRoots(projectDir));
|
|
1905
|
+
}
|
|
1906
|
+
function discoverFlows(projectDir) {
|
|
1907
|
+
return flowsOfRoots(aiResourceRoots(projectDir));
|
|
1864
1908
|
}
|
|
1865
1909
|
var libraryFlowEntriesCache;
|
|
1866
1910
|
function libraryFlowEntries() {
|
|
@@ -1873,15 +1917,23 @@ async function scanLibraryFlowEntries() {
|
|
|
1873
1917
|
const { LocalIndex, resolveIndexPath, scanAuthoringLibraries } = await import('../library/index.js');
|
|
1874
1918
|
const indexPath = resolveIndexPath();
|
|
1875
1919
|
if (!existsSync(indexPath)) return entries;
|
|
1876
|
-
const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-
|
|
1920
|
+
const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-3QS3J7KO.js');
|
|
1877
1921
|
const index = new LocalIndex({ indexPath });
|
|
1878
1922
|
try {
|
|
1879
|
-
for (const { assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
|
|
1923
|
+
for (const { library, assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
|
|
1880
1924
|
for (const asset of assets) {
|
|
1881
1925
|
if (asset.kind !== "flow") continue;
|
|
1926
|
+
if (flowFileNameError(asset.manifest, path18__default.basename(asset.manifestPath))) continue;
|
|
1882
1927
|
try {
|
|
1883
1928
|
const flow = loadFlow(asset.manifestPath);
|
|
1884
|
-
if (flow.id)
|
|
1929
|
+
if (flow.id) {
|
|
1930
|
+
entries.push({
|
|
1931
|
+
flow,
|
|
1932
|
+
path: asset.manifestPath,
|
|
1933
|
+
ref: `flow:@${asset.publisher}/${asset.name}`,
|
|
1934
|
+
library: library.name
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1885
1937
|
} catch {
|
|
1886
1938
|
}
|
|
1887
1939
|
}
|
|
@@ -1901,10 +1953,25 @@ async function discoverFlowsWithLibraries(projectDir) {
|
|
|
1901
1953
|
}
|
|
1902
1954
|
return [...byId.values()];
|
|
1903
1955
|
}
|
|
1904
|
-
async function
|
|
1905
|
-
const
|
|
1906
|
-
|
|
1907
|
-
|
|
1956
|
+
async function discoverOtherFlows(projectDir) {
|
|
1957
|
+
const inProject = new Set(discoverProjectFlows(projectDir).map((f) => f.id));
|
|
1958
|
+
const libraryById = /* @__PURE__ */ new Map();
|
|
1959
|
+
for (const entry of await libraryFlowEntries()) {
|
|
1960
|
+
if (!libraryById.has(entry.flow.id)) libraryById.set(entry.flow.id, entry);
|
|
1961
|
+
}
|
|
1962
|
+
const others = [];
|
|
1963
|
+
for (const flow of await discoverFlowsWithLibraries(projectDir)) {
|
|
1964
|
+
if (inProject.has(flow.id)) continue;
|
|
1965
|
+
const lib = libraryById.get(flow.id);
|
|
1966
|
+
others.push({
|
|
1967
|
+
flow,
|
|
1968
|
+
...lib ? { addRef: lib.ref, library: lib.library } : {}
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1971
|
+
return others;
|
|
1972
|
+
}
|
|
1973
|
+
async function findLibraryFlow(flowId) {
|
|
1974
|
+
return (await libraryFlowEntries()).find((e) => e.flow.id === flowId);
|
|
1908
1975
|
}
|
|
1909
1976
|
function findSkills() {
|
|
1910
1977
|
const found = [];
|
|
@@ -1923,11 +1990,11 @@ function findSkills() {
|
|
|
1923
1990
|
return deduped;
|
|
1924
1991
|
}
|
|
1925
1992
|
function walkSkills(dir, out) {
|
|
1926
|
-
for (const entry of
|
|
1993
|
+
for (const entry of fs8__default.readdirSync(dir, { withFileTypes: true })) {
|
|
1927
1994
|
const full = path18__default.join(dir, entry.name);
|
|
1928
1995
|
if (entry.isDirectory()) {
|
|
1929
1996
|
const skillMd = path18__default.join(full, "SKILL.md");
|
|
1930
|
-
if (
|
|
1997
|
+
if (fs8__default.existsSync(skillMd)) {
|
|
1931
1998
|
out.push({ name: entry.name, path: full, skillPath: skillMd });
|
|
1932
1999
|
} else {
|
|
1933
2000
|
walkSkills(full, out);
|
|
@@ -1942,21 +2009,21 @@ function resolveSkillNames() {
|
|
|
1942
2009
|
}
|
|
1943
2010
|
function resolveFlowIds() {
|
|
1944
2011
|
try {
|
|
1945
|
-
return
|
|
2012
|
+
return discoverProjectFlows().map((f) => f.id);
|
|
1946
2013
|
} catch {
|
|
1947
2014
|
return [];
|
|
1948
2015
|
}
|
|
1949
2016
|
}
|
|
1950
2017
|
function resolveSessionIds(projectDir) {
|
|
1951
2018
|
const sessionsDir = path18__default.join(projectDir, ".skaile", "sessions");
|
|
1952
|
-
if (!
|
|
2019
|
+
if (!fs8__default.existsSync(sessionsDir)) return [];
|
|
1953
2020
|
try {
|
|
1954
|
-
return
|
|
2021
|
+
return fs8__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
|
|
1955
2022
|
} catch {
|
|
1956
2023
|
return [];
|
|
1957
2024
|
}
|
|
1958
2025
|
}
|
|
1959
|
-
var CONFIG_KEYS = ["provider", "model", "
|
|
2026
|
+
var CONFIG_KEYS = ["provider", "model", "harness", "framework", "projectDir", "apiKey"];
|
|
1960
2027
|
|
|
1961
2028
|
// cli/src/commands/complete.ts
|
|
1962
2029
|
function makeCompleteCommand(program2) {
|
|
@@ -2003,7 +2070,56 @@ function resolveDynamic(words, cword) {
|
|
|
2003
2070
|
if (cmd === "config" && ["get", "set"].includes(sub) && isLast(3)) return CONFIG_KEYS;
|
|
2004
2071
|
return null;
|
|
2005
2072
|
}
|
|
2006
|
-
|
|
2073
|
+
function unknownHarnessMessage(harness) {
|
|
2074
|
+
const known = listHarnesses().map((d) => d.id);
|
|
2075
|
+
if (known.includes(harness)) return void 0;
|
|
2076
|
+
return `Unknown agent harness: "${harness}". Available: ${known.join(", ")}`;
|
|
2077
|
+
}
|
|
2078
|
+
var warnedDriverFlag = false;
|
|
2079
|
+
function warnDriverFlagDeprecated() {
|
|
2080
|
+
if (warnedDriverFlag) return;
|
|
2081
|
+
warnedDriverFlag = true;
|
|
2082
|
+
console.error("--driver is deprecated; use --harness");
|
|
2083
|
+
}
|
|
2084
|
+
function driverAliasOption() {
|
|
2085
|
+
return new Option("--driver <name>", "Deprecated alias of --harness").hideHelp();
|
|
2086
|
+
}
|
|
2087
|
+
function foldDriverFlag(opts, fallback) {
|
|
2088
|
+
const { driver, ...rest } = opts;
|
|
2089
|
+
if (driver !== void 0) warnDriverFlagDeprecated();
|
|
2090
|
+
return { ...rest, harness: rest.harness ?? driver ?? fallback };
|
|
2091
|
+
}
|
|
2092
|
+
function friendlyHarnessError(err) {
|
|
2093
|
+
const e = err;
|
|
2094
|
+
if (!e) return null;
|
|
2095
|
+
const isSpawnEnoent = e.code === "ENOENT" && (e.syscall?.startsWith("spawn") === true || /^spawn .*ENOENT/.test(e.message ?? ""));
|
|
2096
|
+
const isConfig = e.category === "config" || e.detail?.category === "config";
|
|
2097
|
+
if (!isSpawnEnoent && !isConfig) return null;
|
|
2098
|
+
const hint = e.hint ?? e.detail?.hint;
|
|
2099
|
+
const base = hint ?? "The configured agent binary is not installed or not on your PATH.";
|
|
2100
|
+
return `${base}
|
|
2101
|
+
Try a different harness with \`--harness claude-sdk\`.`;
|
|
2102
|
+
}
|
|
2103
|
+
function harnessErrorNotes(err) {
|
|
2104
|
+
const e = err;
|
|
2105
|
+
const notes = [];
|
|
2106
|
+
const category = e?.category ?? e?.detail?.category;
|
|
2107
|
+
const hint = e?.hint ?? e?.detail?.hint;
|
|
2108
|
+
if (hint && category !== "config") notes.push(hint);
|
|
2109
|
+
else if (category === "auth") notes.push("Check your API key or login.");
|
|
2110
|
+
if (e?.logSessionId) {
|
|
2111
|
+
notes.push(`Full records: .skaile/logs.db (skaile session logs ${e.logSessionId}).`);
|
|
2112
|
+
}
|
|
2113
|
+
return notes;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
// cli/src/commands/config.ts
|
|
2117
|
+
var PERSONAL_KEYS = /* @__PURE__ */ new Set(["harness", "model"]);
|
|
2118
|
+
function resolveDriverKeyAlias(key) {
|
|
2119
|
+
if (key !== "driver") return key;
|
|
2120
|
+
console.error("`driver` is deprecated; use `harness`");
|
|
2121
|
+
return "harness";
|
|
2122
|
+
}
|
|
2007
2123
|
var CATALOG_KEYS = /* @__PURE__ */ new Set(["catalog.url", "catalog.cache_ttl", "catalog.framing"]);
|
|
2008
2124
|
async function setCatalogKey(key, raw) {
|
|
2009
2125
|
const { CatalogConfigSchema, saveConfig } = await import('../library/index.js');
|
|
@@ -2017,10 +2133,10 @@ async function setCatalogKey(key, raw) {
|
|
|
2017
2133
|
process.exit(1);
|
|
2018
2134
|
}
|
|
2019
2135
|
const filePath = userConfigPath();
|
|
2020
|
-
const
|
|
2136
|
+
const fs11 = await import('fs');
|
|
2021
2137
|
let existing = {};
|
|
2022
|
-
if (
|
|
2023
|
-
const parsed = parseYaml3(
|
|
2138
|
+
if (fs11.existsSync(filePath)) {
|
|
2139
|
+
const parsed = parseYaml3(fs11.readFileSync(filePath, "utf-8"));
|
|
2024
2140
|
if (parsed && typeof parsed === "object") existing = parsed;
|
|
2025
2141
|
}
|
|
2026
2142
|
const catalog = {
|
|
@@ -2031,12 +2147,37 @@ async function setCatalogKey(key, raw) {
|
|
|
2031
2147
|
logOk(`Set ${pc5.bold(key)} = ${String(checked.data[field])}`);
|
|
2032
2148
|
console.log(S.dim(` \u2192 ${filePath}`));
|
|
2033
2149
|
}
|
|
2150
|
+
async function unsetCatalogKey(key) {
|
|
2151
|
+
const { saveConfig } = await import('../library/index.js');
|
|
2152
|
+
const { parse: parseYaml3 } = await import('yaml');
|
|
2153
|
+
const field = key.slice("catalog.".length);
|
|
2154
|
+
const filePath = userConfigPath();
|
|
2155
|
+
const fs11 = await import('fs');
|
|
2156
|
+
let existing = {};
|
|
2157
|
+
if (fs11.existsSync(filePath)) {
|
|
2158
|
+
const parsed = parseYaml3(fs11.readFileSync(filePath, "utf-8"));
|
|
2159
|
+
if (parsed && typeof parsed === "object") existing = parsed;
|
|
2160
|
+
}
|
|
2161
|
+
const catalog = existing.catalog ?? {};
|
|
2162
|
+
if (!(field in catalog)) {
|
|
2163
|
+
logInfo(`${key} is not set in ${filePath}`);
|
|
2164
|
+
return;
|
|
2165
|
+
}
|
|
2166
|
+
const { [field]: _removed, ...restCatalog } = catalog;
|
|
2167
|
+
const { catalog: _catalog, ...rest } = existing;
|
|
2168
|
+
saveConfig(
|
|
2169
|
+
filePath,
|
|
2170
|
+
Object.keys(restCatalog).length > 0 ? { ...rest, catalog: restCatalog } : rest
|
|
2171
|
+
);
|
|
2172
|
+
logOk(`Unset ${pc5.bold(key)} (the default applies again)`);
|
|
2173
|
+
console.log(S.dim(` \u2192 ${filePath}`));
|
|
2174
|
+
}
|
|
2034
2175
|
var API_KEY_PREFIX = "apiKey.";
|
|
2035
2176
|
function collectWorkspaceDefaults(projectDir) {
|
|
2036
2177
|
const wsDefaults = {};
|
|
2037
2178
|
const ws = resolveSkWorkspaceConfig(projectDir);
|
|
2038
2179
|
const p6 = ws.agent_config?.default ?? {};
|
|
2039
|
-
if (p6.
|
|
2180
|
+
if (p6.harness) wsDefaults.harness = p6.harness;
|
|
2040
2181
|
if (p6.model) wsDefaults.model = p6.model;
|
|
2041
2182
|
if (p6.skills_dir) wsDefaults.skills_dir = p6.skills_dir;
|
|
2042
2183
|
if (p6.agents_dir) wsDefaults.agents_dir = p6.agents_dir;
|
|
@@ -2050,7 +2191,7 @@ function printEffectiveSection(config, sources) {
|
|
|
2050
2191
|
console.log();
|
|
2051
2192
|
console.log(S.heading(" Effective Config"));
|
|
2052
2193
|
console.log(` ${S.rule(40)}`);
|
|
2053
|
-
for (const key of ["
|
|
2194
|
+
for (const key of ["harness", "model"]) {
|
|
2054
2195
|
const value = config[key];
|
|
2055
2196
|
if (value !== void 0) {
|
|
2056
2197
|
const origin = sources[key];
|
|
@@ -2077,7 +2218,7 @@ function printModelSelectionSection(config, projectDir) {
|
|
|
2077
2218
|
console.log(` ${S.rule(40)}`);
|
|
2078
2219
|
const selector = config.model;
|
|
2079
2220
|
if (!selector) {
|
|
2080
|
-
console.log(` ${S.dim("no model: selector \u2014 the
|
|
2221
|
+
console.log(` ${S.dim("no model: selector \u2014 the harness applies its own default")}`);
|
|
2081
2222
|
} else {
|
|
2082
2223
|
const resolved = parseModelRef(selector, registry, config.roles);
|
|
2083
2224
|
if (!resolved) {
|
|
@@ -2109,8 +2250,8 @@ function printModelSelectionSection(config, projectDir) {
|
|
|
2109
2250
|
}
|
|
2110
2251
|
}
|
|
2111
2252
|
function printResolvedPathsSection(config) {
|
|
2112
|
-
const fw = config.
|
|
2113
|
-
const paths =
|
|
2253
|
+
const fw = config.harness ?? DEFAULT_HARNESS_ID;
|
|
2254
|
+
const paths = HARNESS_DEFAULTS[fw] ?? HARNESS_DEFAULTS[DEFAULT_HARNESS_ID];
|
|
2114
2255
|
if (!paths) return;
|
|
2115
2256
|
console.log();
|
|
2116
2257
|
console.log(` ${S.heading("Resolved Paths")} ${S.dim(`(${fw})`)}`);
|
|
@@ -2162,10 +2303,31 @@ function setApiKeySugar(provider, value, projectDir) {
|
|
|
2162
2303
|
);
|
|
2163
2304
|
console.log(` ${S.dim("Verify with:")} ${S.cmd(`skaile providers test ${provider}`)}`);
|
|
2164
2305
|
}
|
|
2306
|
+
function unsetApiKeySugar(provider, projectDir) {
|
|
2307
|
+
try {
|
|
2308
|
+
const removed = removeProviderEntry(provider, { projectDir });
|
|
2309
|
+
if (!removed) {
|
|
2310
|
+
logInfo(`apiKey.${provider} is not set: the user registry has no provider '${provider}'`);
|
|
2311
|
+
return;
|
|
2312
|
+
}
|
|
2313
|
+
logOk(
|
|
2314
|
+
`Unset ${pc5.bold(`apiKey.${provider}`)}: removed ${pc5.bold(provider)} from the user registry`
|
|
2315
|
+
);
|
|
2316
|
+
console.log(S.dim(` \u2192 ${removed.path}`));
|
|
2317
|
+
if (removed.stillDefinedElsewhere) {
|
|
2318
|
+
logInfo(`'${provider}' is still defined in another layer: run skaile providers list`);
|
|
2319
|
+
}
|
|
2320
|
+
} catch (error) {
|
|
2321
|
+
if (!(error instanceof ProviderRegistryWriteError)) throw error;
|
|
2322
|
+
logErr(error.message);
|
|
2323
|
+
process.exit(1);
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2165
2326
|
function makeConfigCommand() {
|
|
2166
2327
|
const cmd = new Command("config").description("Manage personal config (.skaile/settings.json)");
|
|
2167
2328
|
cmd.command("show").description("Show effective config with sources").option("--project-dir <path>", "Project directory").action((opts) => showConfig(opts));
|
|
2168
|
-
cmd.command("get <key>").description("Get an effective config value").option("--project-dir <path>", "Project directory").option("--global", "Read ~/.skaile/settings.json only, not the project's value").action(async (
|
|
2329
|
+
cmd.command("get <key>").description("Get an effective config value").option("--project-dir <path>", "Project directory").option("--global", "Read ~/.skaile/settings.json only, not the project's value").action(async (rawKey, opts) => {
|
|
2330
|
+
const key = resolveDriverKeyAlias(rawKey);
|
|
2169
2331
|
const projectDir = opts.projectDir ? path18__default.resolve(opts.projectDir) : process.cwd();
|
|
2170
2332
|
if (CATALOG_KEYS.has(key)) {
|
|
2171
2333
|
const { resolveConfig } = await import('../library/index.js');
|
|
@@ -2178,77 +2340,91 @@ function makeConfigCommand() {
|
|
|
2178
2340
|
console.log(value ?? S.dim("(not set)"));
|
|
2179
2341
|
});
|
|
2180
2342
|
cmd.command("set <key> <value>").description(
|
|
2181
|
-
"Set a personal config value (
|
|
2182
|
-
).option("--project-dir <path>", "Project directory").option("--global", "Write to ~/.skaile/settings.json instead of project-local").action(
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2343
|
+
"Set a personal config value (harness, model, apiKey.<provider>) or a catalog setting (catalog.url, catalog.cache_ttl, catalog.framing). `config unset <key>` removes every one of them again"
|
|
2344
|
+
).option("--project-dir <path>", "Project directory").option("--global", "Write to ~/.skaile/settings.json instead of project-local").action(
|
|
2345
|
+
async (rawKey, value, opts) => {
|
|
2346
|
+
const key = resolveDriverKeyAlias(rawKey);
|
|
2347
|
+
const projectDir = opts.projectDir ? path18__default.resolve(opts.projectDir) : process.cwd();
|
|
2348
|
+
if (CATALOG_KEYS.has(key)) {
|
|
2349
|
+
await setCatalogKey(key, value);
|
|
2350
|
+
return;
|
|
2351
|
+
}
|
|
2352
|
+
if (key === "provider" || key === "cloud" || key === "cloudConfig") {
|
|
2353
|
+
logErr(
|
|
2354
|
+
`'${key}' is no longer a setting \u2014 an endpoint is an AI provider registry entry and a session selects one with a model reference.
|
|
2191
2355
|
Define it: skaile providers add <id> --preset <preset>
|
|
2192
2356
|
Select it: skaile config set model <providerId>/<modelId>`
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2357
|
+
);
|
|
2358
|
+
process.exit(1);
|
|
2359
|
+
}
|
|
2360
|
+
const isApiKey = key.startsWith(API_KEY_PREFIX);
|
|
2361
|
+
if (!PERSONAL_KEYS.has(key) && !isApiKey) {
|
|
2362
|
+
logErr(
|
|
2363
|
+
`'${key}' is not a personal setting.
|
|
2200
2364
|
Personal keys: ${[...PERSONAL_KEYS].join(", ")}, ${API_KEY_PREFIX}<provider>
|
|
2201
|
-
Project config (
|
|
2202
|
-
|
|
2203
|
-
process.exit(1);
|
|
2204
|
-
}
|
|
2205
|
-
if (isApiKey) {
|
|
2206
|
-
setApiKeySugar(key.slice(API_KEY_PREFIX.length), value, projectDir);
|
|
2207
|
-
return;
|
|
2208
|
-
}
|
|
2209
|
-
if (key === "driver") {
|
|
2210
|
-
await loadDeclaredPlugins(projectDir);
|
|
2211
|
-
const known = listDrivers().map((d) => d.id);
|
|
2212
|
-
if (!known.includes(value)) {
|
|
2213
|
-
logErr(`Unknown agent driver: "${value}". Available: ${known.join(", ")}`);
|
|
2365
|
+
Project config (harness, model, paths, resources) belongs in skaile.yaml`
|
|
2366
|
+
);
|
|
2214
2367
|
process.exit(1);
|
|
2215
2368
|
}
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
const
|
|
2231
|
-
|
|
2232
|
-
|
|
2369
|
+
if (isApiKey) {
|
|
2370
|
+
setApiKeySugar(key.slice(API_KEY_PREFIX.length), value, projectDir);
|
|
2371
|
+
return;
|
|
2372
|
+
}
|
|
2373
|
+
if (key === "harness") {
|
|
2374
|
+
await loadDeclaredPlugins(projectDir);
|
|
2375
|
+
const unknown = unknownHarnessMessage(value);
|
|
2376
|
+
if (unknown) {
|
|
2377
|
+
logErr(unknown);
|
|
2378
|
+
process.exit(1);
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
const projectHarness = key === "harness" ? resolveSkWorkspaceConfig(projectDir).agent_config?.default?.harness : void 0;
|
|
2382
|
+
const filePath = opts.global ? globalSettingsPath() : projectSettingsPath(projectDir);
|
|
2383
|
+
const existing = await loadSettings(filePath);
|
|
2384
|
+
await saveSettings({ ...existing, [key]: value }, filePath);
|
|
2385
|
+
logOk(`Set ${pc5.bold(key)} = ${value}`);
|
|
2386
|
+
console.log(S.dim(` \u2192 ${filePath}`));
|
|
2387
|
+
if (projectHarness && projectHarness !== value) {
|
|
2233
2388
|
logWarn(
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
} else {
|
|
2237
|
-
console.log(
|
|
2238
|
-
S.dim(
|
|
2239
|
-
` \u2192 resolves to ${resolved.providerId}${resolved.providerModelId ? `/${resolved.providerModelId}` : ""}`
|
|
2240
|
-
)
|
|
2389
|
+
`skaile.yaml sets harness ${projectHarness}; a personal harness does not override the project harness.
|
|
2390
|
+
Remove this one again: skaile config unset harness${opts.global ? " --global" : ""}`
|
|
2241
2391
|
);
|
|
2242
|
-
|
|
2392
|
+
}
|
|
2393
|
+
if (key === "model") {
|
|
2394
|
+
const view = loadRegistryView({ projectDir });
|
|
2395
|
+
const resolved = parseModelRef(value, view.merged);
|
|
2396
|
+
if (!resolved) {
|
|
2397
|
+
logWarn(
|
|
2398
|
+
"no AI provider is configured yet \u2014 add one with `skaile providers add <id> --preset <preset>`"
|
|
2399
|
+
);
|
|
2400
|
+
} else {
|
|
2401
|
+
console.log(
|
|
2402
|
+
S.dim(
|
|
2403
|
+
` \u2192 resolves to ${resolved.providerId}${resolved.providerModelId ? `/${resolved.providerModelId}` : ""}`
|
|
2404
|
+
)
|
|
2405
|
+
);
|
|
2406
|
+
for (const warning of resolved.warnings) logWarn(warning);
|
|
2407
|
+
}
|
|
2243
2408
|
}
|
|
2244
2409
|
}
|
|
2245
|
-
|
|
2246
|
-
cmd.command("unset <key>").description(
|
|
2410
|
+
);
|
|
2411
|
+
cmd.command("unset <key>").description(
|
|
2412
|
+
"Remove a value that `config set` wrote: harness, model, apiKey.<provider> (removes the provider entry) or catalog.url, catalog.cache_ttl, catalog.framing (the default applies again)"
|
|
2413
|
+
).option("--project-dir <path>", "Project directory").option("--global", "Remove from ~/.skaile/settings.json instead of project-local").action(async (rawKey, opts) => {
|
|
2414
|
+
const key = resolveDriverKeyAlias(rawKey);
|
|
2247
2415
|
const projectDir = opts.projectDir ? path18__default.resolve(opts.projectDir) : process.cwd();
|
|
2416
|
+
if (CATALOG_KEYS.has(key)) {
|
|
2417
|
+
await unsetCatalogKey(key);
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
if (key.startsWith(API_KEY_PREFIX) && key.length > API_KEY_PREFIX.length) {
|
|
2421
|
+
unsetApiKeySugar(key.slice(API_KEY_PREFIX.length), projectDir);
|
|
2422
|
+
return;
|
|
2423
|
+
}
|
|
2248
2424
|
if (!PERSONAL_KEYS.has(key)) {
|
|
2249
2425
|
logErr(
|
|
2250
|
-
`'${key}' is not a
|
|
2251
|
-
|
|
2426
|
+
`'${key}' is not a setting that can be unset.
|
|
2427
|
+
Keys: ${[...PERSONAL_KEYS].join(", ")}, ${API_KEY_PREFIX}<provider>, ${[...CATALOG_KEYS].join(", ")}`
|
|
2252
2428
|
);
|
|
2253
2429
|
process.exit(1);
|
|
2254
2430
|
}
|
|
@@ -2844,7 +3020,7 @@ function makeDebugCommand() {
|
|
|
2844
3020
|
cmd.command("mcp").description("List MCP servers and their registered tools").action(async (_, parent) => {
|
|
2845
3021
|
await runDebugQuery("mcp", parent.parent.opts());
|
|
2846
3022
|
});
|
|
2847
|
-
cmd.command("config").description("Dump
|
|
3023
|
+
cmd.command("config").description("Dump harness config (API keys redacted)").action(async (_, parent) => {
|
|
2848
3024
|
await runDebugQuery("config", parent.parent.opts());
|
|
2849
3025
|
});
|
|
2850
3026
|
cmd.command("state [store]").description("Read a shared state store snapshot (or list all stores)").action(async (store, _, parent) => {
|
|
@@ -2904,7 +3080,7 @@ async function ensureTargetsRegistered(projectDir) {
|
|
|
2904
3080
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
2905
3081
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
2906
3082
|
if (config.plugins && config.plugins.length > 0) {
|
|
2907
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
3083
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-MSH6GK6T.js');
|
|
2908
3084
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
2909
3085
|
for (const f of result.failed) logWarn(f.error);
|
|
2910
3086
|
}
|
|
@@ -3056,7 +3232,7 @@ function makeDiffCommand() {
|
|
|
3056
3232
|
}
|
|
3057
3233
|
const result = await am2.diff(ref);
|
|
3058
3234
|
const problems = gaps.filter(
|
|
3059
|
-
(g) => !(result.status === "differs" && (g.type === "content" || g.type === "modified"))
|
|
3235
|
+
(g) => !(result.status === "differs" && !result.fileSetDiffers && (g.type === "content" || g.type === "modified"))
|
|
3060
3236
|
);
|
|
3061
3237
|
switch (result.status) {
|
|
3062
3238
|
case "not-found":
|
|
@@ -3088,26 +3264,52 @@ function makeDiffCommand() {
|
|
|
3088
3264
|
}
|
|
3089
3265
|
function makeFlowCommand() {
|
|
3090
3266
|
const cmd = new Command("flow").description("Manage flows");
|
|
3091
|
-
cmd.command("list").description("List
|
|
3092
|
-
const
|
|
3093
|
-
|
|
3267
|
+
cmd.command("list").description("List the flows of this project").option("--project-dir <path>", "Project directory", process.cwd()).option("--all", "Also list the flows of registered libraries and cached sources").action(async (opts) => {
|
|
3268
|
+
const projectDir = path18__default.resolve(opts.projectDir);
|
|
3269
|
+
const flows = discoverProjectFlows(projectDir);
|
|
3270
|
+
const others = opts.all ? await discoverOtherFlows(projectDir) : [];
|
|
3271
|
+
if (flows.length === 0 && others.length === 0) {
|
|
3094
3272
|
logInfo("No flows found.");
|
|
3273
|
+
console.log(
|
|
3274
|
+
` ${S.dim(
|
|
3275
|
+
opts.all ? "No registered library or source holds a flow either." : "Add one with skaile add flow:@<publisher>/<name>; skaile flow list --all also shows the flows of your libraries."
|
|
3276
|
+
)}`
|
|
3277
|
+
);
|
|
3095
3278
|
return;
|
|
3096
3279
|
}
|
|
3280
|
+
const row = (id, name, description) => {
|
|
3281
|
+
console.log(` ${S.cmd(id.padEnd(24))} ${name}`);
|
|
3282
|
+
if (description) console.log(` ${"".padEnd(24)} ${S.dim(description)}`);
|
|
3283
|
+
};
|
|
3097
3284
|
console.log();
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
if (
|
|
3285
|
+
if (flows.length > 0 || !opts.all) {
|
|
3286
|
+
console.log(S.heading(" Available Flows"));
|
|
3287
|
+
console.log(` ${S.rule(50)}`);
|
|
3288
|
+
for (const f of flows) row(f.id, f.name, f.description);
|
|
3289
|
+
if (flows.length === 0) console.log(` ${S.dim("No flow in this project.")}`);
|
|
3290
|
+
console.log();
|
|
3291
|
+
}
|
|
3292
|
+
if (others.length > 0) {
|
|
3293
|
+
console.log(S.heading(" Not in this project"));
|
|
3294
|
+
console.log(` ${S.rule(50)}`);
|
|
3295
|
+
for (const o of others) {
|
|
3296
|
+
row(o.flow.id, o.flow.name, o.flow.description);
|
|
3297
|
+
const how = o.addRef ? `skaile add ${o.addRef} (library ${o.library})` : "in a cached source or the global root; add it from its source";
|
|
3298
|
+
console.log(` ${"".padEnd(24)} ${S.dim(how)}`);
|
|
3299
|
+
}
|
|
3300
|
+
console.log();
|
|
3103
3301
|
}
|
|
3104
|
-
console.log();
|
|
3105
3302
|
});
|
|
3106
|
-
cmd.command("show <id>").description("Show flow details and node graph").option("--project-dir <path>", "Project directory", process.cwd()).action(async (id, opts) => {
|
|
3107
|
-
const
|
|
3108
|
-
const flow =
|
|
3303
|
+
cmd.command("show <id>").description("Show flow details and node graph").option("--project-dir <path>", "Project directory", process.cwd()).option("--all", "Also look in registered libraries and cached sources").action(async (id, opts) => {
|
|
3304
|
+
const projectDir = path18__default.resolve(opts.projectDir);
|
|
3305
|
+
const flow = discoverProjectFlows(projectDir).find((f) => f.id === id) ?? (opts.all ? (await discoverOtherFlows(projectDir)).find((o) => o.flow.id === id)?.flow : void 0);
|
|
3109
3306
|
if (!flow) {
|
|
3110
3307
|
logErr(`Flow not found: ${id}`);
|
|
3308
|
+
if (!opts.all) {
|
|
3309
|
+
console.log(
|
|
3310
|
+
` ${S.dim("Not in this project. skaile flow show <id> --all also looks in your libraries.")}`
|
|
3311
|
+
);
|
|
3312
|
+
}
|
|
3111
3313
|
process.exit(1);
|
|
3112
3314
|
}
|
|
3113
3315
|
console.log();
|
|
@@ -3169,236 +3371,6 @@ function makeHistoryCommand() {
|
|
|
3169
3371
|
return cmd;
|
|
3170
3372
|
}
|
|
3171
3373
|
var SKAILE_MCP_NAME = "skaile-workspace";
|
|
3172
|
-
var MCP_SERVER_ENTRY = {
|
|
3173
|
-
command: "skaile",
|
|
3174
|
-
args: ["mcp-server"],
|
|
3175
|
-
env: {}
|
|
3176
|
-
};
|
|
3177
|
-
function mcpFilePath(projectDir) {
|
|
3178
|
-
return path18__default.join(projectDir, ".mcp.json");
|
|
3179
|
-
}
|
|
3180
|
-
function legacyMcpFilePath(projectDir) {
|
|
3181
|
-
return path18__default.join(projectDir, ".claude", "mcp.json");
|
|
3182
|
-
}
|
|
3183
|
-
async function removeSkaileMcpEntry(mcpPath) {
|
|
3184
|
-
const mcp = await readJsonStrict(mcpPath);
|
|
3185
|
-
if (!mcp?.mcpServers || !(SKAILE_MCP_NAME in mcp.mcpServers)) return false;
|
|
3186
|
-
const { [SKAILE_MCP_NAME]: _removed, ...rest } = mcp.mcpServers;
|
|
3187
|
-
const updated = { ...mcp, mcpServers: rest };
|
|
3188
|
-
if (Object.keys(rest).length === 0) delete updated.mcpServers;
|
|
3189
|
-
if (Object.keys(updated).length === 0) await fs5.unlink(mcpPath);
|
|
3190
|
-
else await writeJson(mcpPath, updated);
|
|
3191
|
-
return true;
|
|
3192
|
-
}
|
|
3193
|
-
function pluginDir(projectDir) {
|
|
3194
|
-
return path18__default.join(projectDir, ".claude", "plugins", "skaile");
|
|
3195
|
-
}
|
|
3196
|
-
async function readJsonStrict(p6) {
|
|
3197
|
-
let raw;
|
|
3198
|
-
try {
|
|
3199
|
-
raw = await fs5.readFile(p6, "utf-8");
|
|
3200
|
-
} catch {
|
|
3201
|
-
return null;
|
|
3202
|
-
}
|
|
3203
|
-
try {
|
|
3204
|
-
return JSON.parse(raw);
|
|
3205
|
-
} catch (e) {
|
|
3206
|
-
throw new Error(
|
|
3207
|
-
`cannot parse ${p6}: ${e instanceof Error ? e.message : String(e)}; please fix or remove`
|
|
3208
|
-
);
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
async function writeJson(p6, value) {
|
|
3212
|
-
await fs5.mkdir(path18__default.dirname(p6), { recursive: true });
|
|
3213
|
-
await fs5.writeFile(p6, `${JSON.stringify(value, null, 2)}
|
|
3214
|
-
`);
|
|
3215
|
-
}
|
|
3216
|
-
var SKIPPED_IN_SKILL = /* @__PURE__ */ new Set(["__pycache__", "node_modules", ".DS_Store"]);
|
|
3217
|
-
async function copyInstalledSkills(projectDir, skillsDir) {
|
|
3218
|
-
for (const entry of await fs5.readdir(skillsDir).catch(() => [])) {
|
|
3219
|
-
if (entry !== ".gitkeep")
|
|
3220
|
-
await fs5.rm(path18__default.join(skillsDir, entry), { recursive: true, force: true });
|
|
3221
|
-
}
|
|
3222
|
-
for (const root of [
|
|
3223
|
-
path18__default.join(projectDir, ".claude", "skills"),
|
|
3224
|
-
path18__default.join(projectDir, ".skaile", "skills")
|
|
3225
|
-
]) {
|
|
3226
|
-
for (const name of await fs5.readdir(root).catch(() => [])) {
|
|
3227
|
-
const from = path18__default.join(root, name);
|
|
3228
|
-
if (!existsSync(path18__default.join(from, "SKILL.md"))) continue;
|
|
3229
|
-
const to = path18__default.join(skillsDir, name);
|
|
3230
|
-
await fs5.rm(to, { recursive: true, force: true });
|
|
3231
|
-
await fs5.cp(from, to, {
|
|
3232
|
-
recursive: true,
|
|
3233
|
-
dereference: true,
|
|
3234
|
-
filter: (src) => !SKIPPED_IN_SKILL.has(path18__default.basename(src))
|
|
3235
|
-
});
|
|
3236
|
-
}
|
|
3237
|
-
}
|
|
3238
|
-
}
|
|
3239
|
-
async function install(projectDir, opts) {
|
|
3240
|
-
return opts?.full ? installFullPlugin(projectDir) : installMcp(projectDir);
|
|
3241
|
-
}
|
|
3242
|
-
async function installMcp(projectDir) {
|
|
3243
|
-
const mcpPath = mcpFilePath(projectDir);
|
|
3244
|
-
const existing = await readJsonStrict(mcpPath) ?? {};
|
|
3245
|
-
const mcpServers = { ...existing.mcpServers ?? {} };
|
|
3246
|
-
const previous = mcpServers[SKAILE_MCP_NAME];
|
|
3247
|
-
const matches = previous && JSON.stringify(previous) === JSON.stringify(MCP_SERVER_ENTRY);
|
|
3248
|
-
let warning;
|
|
3249
|
-
if (previous && !matches) {
|
|
3250
|
-
warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path18__default.relative(projectDir, mcpPath)}`;
|
|
3251
|
-
}
|
|
3252
|
-
mcpServers[SKAILE_MCP_NAME] = MCP_SERVER_ENTRY;
|
|
3253
|
-
await writeJson(mcpPath, { ...existing, mcpServers });
|
|
3254
|
-
const migrated = await removeSkaileMcpEntry(legacyMcpFilePath(projectDir));
|
|
3255
|
-
return { changed: !matches || migrated, method: "mcp", warning };
|
|
3256
|
-
}
|
|
3257
|
-
async function dropSymlink(p6) {
|
|
3258
|
-
const stat = await fs5.lstat(p6).catch(() => void 0);
|
|
3259
|
-
if (stat?.isSymbolicLink()) await fs5.unlink(p6);
|
|
3260
|
-
}
|
|
3261
|
-
async function installFullPlugin(projectDir) {
|
|
3262
|
-
const dir = pluginDir(projectDir);
|
|
3263
|
-
await dropSymlink(dir);
|
|
3264
|
-
await dropSymlink(path18__default.join(dir, "skills"));
|
|
3265
|
-
for (const [rel, content] of Object.entries(buildClaudePluginFiles())) {
|
|
3266
|
-
const dest = path18__default.join(dir, rel);
|
|
3267
|
-
await fs5.mkdir(path18__default.dirname(dest), { recursive: true });
|
|
3268
|
-
await fs5.writeFile(dest, content);
|
|
3269
|
-
}
|
|
3270
|
-
await copyInstalledSkills(projectDir, path18__default.join(dir, "skills"));
|
|
3271
|
-
const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
|
|
3272
|
-
const settings = await readJsonStrict(settingsPath) ?? {};
|
|
3273
|
-
const plugins = settings.plugins ?? [];
|
|
3274
|
-
if (!plugins.includes(dir)) plugins.push(dir);
|
|
3275
|
-
await writeJson(settingsPath, { ...settings, plugins });
|
|
3276
|
-
return { changed: true, method: "plugin" };
|
|
3277
|
-
}
|
|
3278
|
-
async function uninstall(projectDir) {
|
|
3279
|
-
const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
|
|
3280
|
-
const mcpPath = mcpFilePath(projectDir);
|
|
3281
|
-
const dir = pluginDir(projectDir);
|
|
3282
|
-
const rel = (p6) => path18__default.relative(projectDir, p6);
|
|
3283
|
-
const files = [];
|
|
3284
|
-
const settings = await readJsonStrict(settingsPath);
|
|
3285
|
-
if (settings && Array.isArray(settings.plugins)) {
|
|
3286
|
-
const next = settings.plugins.filter((p6) => p6 !== dir);
|
|
3287
|
-
if (next.length !== settings.plugins.length) {
|
|
3288
|
-
files.push(rel(settingsPath));
|
|
3289
|
-
const updated = { ...settings, plugins: next };
|
|
3290
|
-
if (next.length === 0) delete updated.plugins;
|
|
3291
|
-
if (Object.keys(updated).length === 0) await fs5.unlink(settingsPath);
|
|
3292
|
-
else await writeJson(settingsPath, updated);
|
|
3293
|
-
}
|
|
3294
|
-
}
|
|
3295
|
-
if (existsSync(dir)) {
|
|
3296
|
-
await fs5.rm(dir, { recursive: true, force: true });
|
|
3297
|
-
files.push(rel(dir));
|
|
3298
|
-
}
|
|
3299
|
-
if (await removeSkaileMcpEntry(mcpPath)) files.push(rel(mcpPath));
|
|
3300
|
-
const legacyPath = legacyMcpFilePath(projectDir);
|
|
3301
|
-
if (await removeSkaileMcpEntry(legacyPath)) files.push(rel(legacyPath));
|
|
3302
|
-
for (const emptyDir of [path18__default.dirname(dir), path18__default.join(projectDir, ".claude")]) {
|
|
3303
|
-
await fs5.rmdir(emptyDir).catch(() => void 0);
|
|
3304
|
-
}
|
|
3305
|
-
return { changed: files.length > 0, files };
|
|
3306
|
-
}
|
|
3307
|
-
async function detectInstall(projectDir) {
|
|
3308
|
-
const dir = pluginDir(projectDir);
|
|
3309
|
-
const settings = await readJsonStrict(
|
|
3310
|
-
path18__default.join(projectDir, ".claude", "settings.json")
|
|
3311
|
-
);
|
|
3312
|
-
if (existsSync(path18__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
|
|
3313
|
-
return { method: "plugin", pluginPath: dir };
|
|
3314
|
-
}
|
|
3315
|
-
const mcp = await readJsonStrict(mcpFilePath(projectDir));
|
|
3316
|
-
if (mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers) {
|
|
3317
|
-
return { method: "mcp" };
|
|
3318
|
-
}
|
|
3319
|
-
return null;
|
|
3320
|
-
}
|
|
3321
|
-
async function enable(projectDir) {
|
|
3322
|
-
const detected = await detectInstall(projectDir);
|
|
3323
|
-
if (!detected) throw new Error("plugin not installed for claude-code");
|
|
3324
|
-
const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
|
|
3325
|
-
const settings = await readJsonStrict(settingsPath) ?? {};
|
|
3326
|
-
if (detected.method === "plugin") {
|
|
3327
|
-
const disabled2 = settings.disabledPlugins ?? [];
|
|
3328
|
-
const next2 = disabled2.filter((p6) => p6 !== detected.pluginPath);
|
|
3329
|
-
if (next2.length === disabled2.length) return { changed: false };
|
|
3330
|
-
const updated2 = { ...settings, disabledPlugins: next2 };
|
|
3331
|
-
if (next2.length === 0) delete updated2.disabledPlugins;
|
|
3332
|
-
await writeJson(settingsPath, updated2);
|
|
3333
|
-
return { changed: true };
|
|
3334
|
-
}
|
|
3335
|
-
const disabled = settings.disabledMcpjsonServers ?? [];
|
|
3336
|
-
const next = disabled.filter((n) => n !== SKAILE_MCP_NAME);
|
|
3337
|
-
if (next.length === disabled.length) return { changed: false };
|
|
3338
|
-
const updated = { ...settings, disabledMcpjsonServers: next };
|
|
3339
|
-
if (next.length === 0) delete updated.disabledMcpjsonServers;
|
|
3340
|
-
await writeJson(settingsPath, updated);
|
|
3341
|
-
return { changed: true };
|
|
3342
|
-
}
|
|
3343
|
-
async function disable(projectDir) {
|
|
3344
|
-
const detected = await detectInstall(projectDir);
|
|
3345
|
-
if (!detected) throw new Error("plugin not installed for claude-code");
|
|
3346
|
-
const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
|
|
3347
|
-
const settings = await readJsonStrict(settingsPath) ?? {};
|
|
3348
|
-
if (detected.method === "plugin") {
|
|
3349
|
-
const list2 = settings.disabledPlugins ?? [];
|
|
3350
|
-
if (list2.includes(detected.pluginPath)) return { changed: false };
|
|
3351
|
-
await writeJson(settingsPath, {
|
|
3352
|
-
...settings,
|
|
3353
|
-
disabledPlugins: [...list2, detected.pluginPath]
|
|
3354
|
-
});
|
|
3355
|
-
return { changed: true };
|
|
3356
|
-
}
|
|
3357
|
-
const list = settings.disabledMcpjsonServers ?? [];
|
|
3358
|
-
if (list.includes(SKAILE_MCP_NAME)) return { changed: false };
|
|
3359
|
-
await writeJson(settingsPath, {
|
|
3360
|
-
...settings,
|
|
3361
|
-
disabledMcpjsonServers: [...list, SKAILE_MCP_NAME]
|
|
3362
|
-
});
|
|
3363
|
-
return { changed: true };
|
|
3364
|
-
}
|
|
3365
|
-
async function status(projectDir) {
|
|
3366
|
-
const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
|
|
3367
|
-
const mcpPath = mcpFilePath(projectDir);
|
|
3368
|
-
const dir = pluginDir(projectDir);
|
|
3369
|
-
const settings = await readJsonStrict(settingsPath);
|
|
3370
|
-
const mcp = await readJsonStrict(mcpPath);
|
|
3371
|
-
const pluginInstalled = !!(existsSync(path18__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
|
|
3372
|
-
const mcpInstalled = !!(mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers);
|
|
3373
|
-
if (!pluginInstalled && !mcpInstalled) {
|
|
3374
|
-
return {
|
|
3375
|
-
harness: "claude-code",
|
|
3376
|
-
installed: "no",
|
|
3377
|
-
enabled: "n/a",
|
|
3378
|
-
method: "\u2014",
|
|
3379
|
-
location: "\u2014"
|
|
3380
|
-
};
|
|
3381
|
-
}
|
|
3382
|
-
if (pluginInstalled) {
|
|
3383
|
-
const disabled2 = settings?.disabledPlugins?.includes(dir) ?? false;
|
|
3384
|
-
return {
|
|
3385
|
-
harness: "claude-code",
|
|
3386
|
-
installed: "yes",
|
|
3387
|
-
enabled: disabled2 ? "no" : "yes",
|
|
3388
|
-
method: "plugin",
|
|
3389
|
-
location: path18__default.relative(projectDir, dir)
|
|
3390
|
-
};
|
|
3391
|
-
}
|
|
3392
|
-
const disabled = settings?.disabledMcpjsonServers?.includes(SKAILE_MCP_NAME) ?? false;
|
|
3393
|
-
return {
|
|
3394
|
-
harness: "claude-code",
|
|
3395
|
-
installed: "yes",
|
|
3396
|
-
enabled: disabled ? "no" : "yes",
|
|
3397
|
-
method: "mcp",
|
|
3398
|
-
location: path18__default.relative(projectDir, mcpPath)
|
|
3399
|
-
};
|
|
3400
|
-
}
|
|
3401
|
-
var SKAILE_MCP_NAME2 = "skaile-workspace";
|
|
3402
3374
|
function buildEntry(projectDir) {
|
|
3403
3375
|
return {
|
|
3404
3376
|
command: "skaile",
|
|
@@ -3438,14 +3410,14 @@ async function install2(projectDir) {
|
|
|
3438
3410
|
const cfg = await readConfig(p6) ?? {};
|
|
3439
3411
|
const next = buildEntry(projectDir);
|
|
3440
3412
|
const servers = { ...cfg.mcp_servers ?? {} };
|
|
3441
|
-
const previous = servers[
|
|
3413
|
+
const previous = servers[SKAILE_MCP_NAME];
|
|
3442
3414
|
const matches = previous && JSON.stringify(previous) === JSON.stringify(next);
|
|
3443
3415
|
let warning;
|
|
3444
3416
|
if (previous && !matches) {
|
|
3445
|
-
warning = `overwrote existing ${
|
|
3417
|
+
warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path18__default.relative(projectDir, p6)}`;
|
|
3446
3418
|
}
|
|
3447
3419
|
if (matches) return { changed: false, method: "toml" };
|
|
3448
|
-
servers[
|
|
3420
|
+
servers[SKAILE_MCP_NAME] = next;
|
|
3449
3421
|
await writeConfig(p6, { ...cfg, mcp_servers: servers });
|
|
3450
3422
|
return { changed: true, method: "toml", warning };
|
|
3451
3423
|
}
|
|
@@ -3474,7 +3446,9 @@ async function trustLevel(projects, projectDir) {
|
|
|
3474
3446
|
return { root, level: entry?.trust_level, known: entry !== void 0 };
|
|
3475
3447
|
}
|
|
3476
3448
|
async function trustEntry(projectDir) {
|
|
3477
|
-
|
|
3449
|
+
return trustEntryFor(await fs5.realpath(projectDir).catch(() => projectDir));
|
|
3450
|
+
}
|
|
3451
|
+
function trustEntryFor(root) {
|
|
3478
3452
|
return `[projects.${JSON.stringify(root)}]
|
|
3479
3453
|
trust_level = "trusted"`;
|
|
3480
3454
|
}
|
|
@@ -3492,7 +3466,12 @@ async function trustProject(projectDir) {
|
|
|
3492
3466
|
}
|
|
3493
3467
|
await fs5.mkdir(path18__default.dirname(p6), { recursive: true });
|
|
3494
3468
|
await fs5.writeFile(p6, next);
|
|
3495
|
-
await writeTrustMark(projectDir,
|
|
3469
|
+
await writeTrustMark(projectDir, [
|
|
3470
|
+
.../* @__PURE__ */ new Set([
|
|
3471
|
+
...(await markedRoots(projectDir)).roots,
|
|
3472
|
+
(await trustLevel(projects, projectDir)).root
|
|
3473
|
+
])
|
|
3474
|
+
]);
|
|
3496
3475
|
return "added";
|
|
3497
3476
|
}
|
|
3498
3477
|
var TRUST_MARK = "codexTrustAdded";
|
|
@@ -3509,51 +3488,80 @@ async function readState(projectDir) {
|
|
|
3509
3488
|
}
|
|
3510
3489
|
return {};
|
|
3511
3490
|
}
|
|
3512
|
-
async function
|
|
3491
|
+
async function markedRoots(projectDir) {
|
|
3492
|
+
const mark = (await readState(projectDir))[TRUST_MARK];
|
|
3493
|
+
if (mark === true) {
|
|
3494
|
+
return { roots: [await fs5.realpath(projectDir).catch(() => projectDir)], legacy: true };
|
|
3495
|
+
}
|
|
3496
|
+
const list = typeof mark === "string" ? [mark] : Array.isArray(mark) ? mark : [];
|
|
3497
|
+
return { roots: list.filter((r) => typeof r === "string"), legacy: false };
|
|
3498
|
+
}
|
|
3499
|
+
async function writeTrustMark(projectDir, roots) {
|
|
3513
3500
|
const state2 = await readState(projectDir);
|
|
3514
|
-
if (
|
|
3501
|
+
if (roots.length > 0) state2[TRUST_MARK] = roots;
|
|
3515
3502
|
else delete state2[TRUST_MARK];
|
|
3516
3503
|
await fs5.mkdir(path18__default.dirname(stateFilePath(projectDir)), { recursive: true });
|
|
3517
3504
|
await fs5.writeFile(stateFilePath(projectDir), JSON.stringify(state2, null, 2));
|
|
3518
3505
|
}
|
|
3519
3506
|
async function untrustProject(projectDir) {
|
|
3520
|
-
|
|
3507
|
+
const result = { removed: [], kept: [] };
|
|
3508
|
+
const { roots, legacy } = await markedRoots(projectDir);
|
|
3509
|
+
if (roots.length === 0) return result;
|
|
3521
3510
|
const { path: p6, raw, projects } = await readUserConfig();
|
|
3522
|
-
const
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3511
|
+
const current = await fs5.realpath(projectDir).catch(() => projectDir);
|
|
3512
|
+
let text = raw;
|
|
3513
|
+
for (const root of roots) {
|
|
3514
|
+
const parsed = projects[root];
|
|
3515
|
+
if (!parsed) {
|
|
3516
|
+
if (legacy) result.kept.push({ root, reason: "absent" });
|
|
3517
|
+
continue;
|
|
3518
|
+
}
|
|
3519
|
+
if (root !== current && await fs5.stat(root).then(() => true).catch(() => false)) {
|
|
3520
|
+
result.kept.push({ root, reason: "in-use" });
|
|
3521
|
+
continue;
|
|
3522
|
+
}
|
|
3523
|
+
if (Object.keys(parsed).length !== 1 || parsed.trust_level !== "trusted") {
|
|
3524
|
+
result.kept.push({ root, reason: "edited" });
|
|
3525
|
+
continue;
|
|
3526
|
+
}
|
|
3527
|
+
const entry = `${trustEntryFor(root)}
|
|
3532
3528
|
`;
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3529
|
+
const at = text.indexOf(entry);
|
|
3530
|
+
if (at === -1) {
|
|
3531
|
+
result.kept.push({ root, reason: "edited" });
|
|
3532
|
+
continue;
|
|
3533
|
+
}
|
|
3534
|
+
const before = text.slice(0, at).replace(/\n+$/, "");
|
|
3535
|
+
const after = text.slice(at + entry.length).replace(/^\n+/, "");
|
|
3536
|
+
const next = [before, after].filter((s) => s !== "").join("\n\n");
|
|
3537
|
+
try {
|
|
3538
|
+
const left = parse$1(next).projects ?? {};
|
|
3539
|
+
if (root in left) {
|
|
3540
|
+
result.kept.push({ root, reason: "edited" });
|
|
3541
|
+
continue;
|
|
3542
|
+
}
|
|
3543
|
+
} catch {
|
|
3544
|
+
result.kept.push({ root, reason: "edited" });
|
|
3545
|
+
continue;
|
|
3546
|
+
}
|
|
3547
|
+
text = next;
|
|
3548
|
+
result.removed.push(root);
|
|
3543
3549
|
}
|
|
3544
|
-
if (
|
|
3545
|
-
|
|
3550
|
+
if (result.removed.length > 0) {
|
|
3551
|
+
if (text === "") await fs5.unlink(p6);
|
|
3552
|
+
else await fs5.writeFile(p6, `${text}
|
|
3546
3553
|
`);
|
|
3547
|
-
|
|
3548
|
-
|
|
3554
|
+
}
|
|
3555
|
+
await writeTrustMark(projectDir, []);
|
|
3556
|
+
return result;
|
|
3549
3557
|
}
|
|
3550
3558
|
async function uninstall2(projectDir) {
|
|
3551
3559
|
const p6 = configPath(projectDir);
|
|
3552
3560
|
const cfg = await readConfig(p6);
|
|
3553
|
-
if (!cfg?.mcp_servers || !(
|
|
3561
|
+
if (!cfg?.mcp_servers || !(SKAILE_MCP_NAME in cfg.mcp_servers)) {
|
|
3554
3562
|
return { changed: false };
|
|
3555
3563
|
}
|
|
3556
|
-
const { [
|
|
3564
|
+
const { [SKAILE_MCP_NAME]: _removed, ...rest } = cfg.mcp_servers;
|
|
3557
3565
|
const updated = { ...cfg, mcp_servers: rest };
|
|
3558
3566
|
if (Object.keys(rest).length === 0) delete updated.mcp_servers;
|
|
3559
3567
|
if (Object.keys(updated).length === 0) {
|
|
@@ -3574,7 +3582,7 @@ async function isTrusted(projectDir) {
|
|
|
3574
3582
|
async function status2(projectDir) {
|
|
3575
3583
|
const p6 = configPath(projectDir);
|
|
3576
3584
|
const cfg = await readConfig(p6);
|
|
3577
|
-
const installed = !!(cfg?.mcp_servers &&
|
|
3585
|
+
const installed = !!(cfg?.mcp_servers && SKAILE_MCP_NAME in cfg.mcp_servers);
|
|
3578
3586
|
if (!installed) {
|
|
3579
3587
|
return {
|
|
3580
3588
|
harness: "codex",
|
|
@@ -3641,12 +3649,15 @@ async function status3(projectDir) {
|
|
|
3641
3649
|
// cli/src/commands/integration.ts
|
|
3642
3650
|
var ALL_HARNESSES = ["claude-code", "omp", "codex"];
|
|
3643
3651
|
var TOGGLE_SUPPORTED = ["claude-code"];
|
|
3644
|
-
function
|
|
3645
|
-
if (
|
|
3646
|
-
if (
|
|
3647
|
-
logErr(`Unknown
|
|
3652
|
+
function resolveHarness(harness) {
|
|
3653
|
+
if (harness === "all") return [...ALL_HARNESSES];
|
|
3654
|
+
if (harness === "claude-code" || harness === "omp" || harness === "codex") return [harness];
|
|
3655
|
+
logErr(`Unknown harness "${harness}". Supported: ${ALL_HARNESSES.join(", ")}, all`);
|
|
3648
3656
|
return null;
|
|
3649
3657
|
}
|
|
3658
|
+
function withHarness(raw, fallback) {
|
|
3659
|
+
return foldDriverFlag(raw, fallback);
|
|
3660
|
+
}
|
|
3650
3661
|
async function runHarnessStep(label, body) {
|
|
3651
3662
|
try {
|
|
3652
3663
|
await body();
|
|
@@ -3712,7 +3723,7 @@ ${await trustEntry(projectDir)}`
|
|
|
3712
3723
|
}
|
|
3713
3724
|
async function runInstall(opts) {
|
|
3714
3725
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
3715
|
-
const targets =
|
|
3726
|
+
const targets = resolveHarness(opts.harness);
|
|
3716
3727
|
if (!targets) return 1;
|
|
3717
3728
|
let exitCode = 0;
|
|
3718
3729
|
if (targets.includes("claude-code")) {
|
|
@@ -3751,16 +3762,31 @@ async function uninstallCodex(projectDir) {
|
|
|
3751
3762
|
else logInfo(`codex: not installed`);
|
|
3752
3763
|
const trust = await untrustProject(projectDir);
|
|
3753
3764
|
const userFile = userConfigPath2().replace(homedir(), "~");
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
`
|
|
3765
|
+
const current = await fs5.realpath(projectDir).catch(() => projectDir);
|
|
3766
|
+
for (const root of trust.removed) {
|
|
3767
|
+
logOk(
|
|
3768
|
+
root === current ? `Removed the trust entry skaile added from ${S.cmd(userFile)}` : `Removed the trust entry skaile added for ${S.cmd(root)} (the project was moved from there) from ${S.cmd(userFile)}`
|
|
3758
3769
|
);
|
|
3759
3770
|
}
|
|
3771
|
+
for (const { root, reason } of trust.kept) {
|
|
3772
|
+
if (reason === "edited") {
|
|
3773
|
+
logInfo(
|
|
3774
|
+
`codex: left the trust entry for ${root} in ${userFile} (you edited it since install). Remove it there if you do not need it.`
|
|
3775
|
+
);
|
|
3776
|
+
} else if (reason === "in-use") {
|
|
3777
|
+
logInfo(
|
|
3778
|
+
`codex: the trust entry for ${root} stays in ${userFile}: that directory still exists. Remove it there when you no longer use it.`
|
|
3779
|
+
);
|
|
3780
|
+
} else {
|
|
3781
|
+
logInfo(
|
|
3782
|
+
`codex: ${userFile} has no trust entry for ${root}. If the project was moved, the entry for its old path stays; remove it from ${userFile}.`
|
|
3783
|
+
);
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3760
3786
|
}
|
|
3761
3787
|
async function runUninstall(opts) {
|
|
3762
3788
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
3763
|
-
const targets =
|
|
3789
|
+
const targets = resolveHarness(opts.harness);
|
|
3764
3790
|
if (!targets) return 1;
|
|
3765
3791
|
let exitCode = 0;
|
|
3766
3792
|
if (targets.includes("claude-code")) {
|
|
@@ -3865,8 +3891,8 @@ async function toggleTarget(t, projectDir, action3) {
|
|
|
3865
3891
|
}
|
|
3866
3892
|
async function runToggle(opts, action3) {
|
|
3867
3893
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
3868
|
-
const requestedAll = opts.
|
|
3869
|
-
const targets =
|
|
3894
|
+
const requestedAll = opts.harness === "all";
|
|
3895
|
+
const targets = resolveHarness(opts.harness);
|
|
3870
3896
|
if (!targets) return 1;
|
|
3871
3897
|
const usageError = checkToggleSupported(targets, requestedAll, action3);
|
|
3872
3898
|
if (usageError !== null) return usageError;
|
|
@@ -3878,7 +3904,7 @@ async function runToggle(opts, action3) {
|
|
|
3878
3904
|
}
|
|
3879
3905
|
async function runStatus2(opts) {
|
|
3880
3906
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
3881
|
-
const targets =
|
|
3907
|
+
const targets = resolveHarness(opts.harness);
|
|
3882
3908
|
if (!targets) return 1;
|
|
3883
3909
|
const rows = [];
|
|
3884
3910
|
let exitCode = 0;
|
|
@@ -4007,23 +4033,23 @@ function makeIntegrationCommand() {
|
|
|
4007
4033
|
const cmd = new Command("integration").description(
|
|
4008
4034
|
"Manage skaile agent integration / workspace-plugin adapter (Claude Code / OMP / Codex)"
|
|
4009
4035
|
);
|
|
4010
|
-
cmd.command("install").description("Install skaile workspace plugin").option("--
|
|
4036
|
+
cmd.command("install").description("Install skaile workspace plugin").option("--harness <name>", "Target: claude-code | omp | codex | all (default: all)").addOption(driverAliasOption()).option("--project-dir <path>", "Project directory", process.cwd()).option(
|
|
4011
4037
|
"--full",
|
|
4012
4038
|
"Claude Code: generate the full .claude/plugins/skaile/ directory (MCP + hooks) instead of the default MCP-only install"
|
|
4013
|
-
).action(async (
|
|
4014
|
-
process.exitCode = await runInstall(
|
|
4039
|
+
).action(async (raw) => {
|
|
4040
|
+
process.exitCode = await runInstall(withHarness(raw, "all"));
|
|
4015
4041
|
});
|
|
4016
|
-
cmd.command("uninstall").description("Uninstall skaile workspace plugin").option("--
|
|
4017
|
-
process.exitCode = await runUninstall(
|
|
4042
|
+
cmd.command("uninstall").description("Uninstall skaile workspace plugin").option("--harness <name>", "Target: claude-code | omp | codex | all (default: all)").addOption(driverAliasOption()).option("--project-dir <path>", "Project directory", process.cwd()).action(async (raw) => {
|
|
4043
|
+
process.exitCode = await runUninstall(withHarness(raw, "all"));
|
|
4018
4044
|
});
|
|
4019
|
-
cmd.command("enable").description("Enable an installed plugin (claude-code only)").option("--
|
|
4020
|
-
process.exitCode = await runToggle(
|
|
4045
|
+
cmd.command("enable").description("Enable an installed plugin (claude-code only)").option("--harness <name>", "Target: claude-code | all (default: claude-code)").addOption(driverAliasOption()).option("--project-dir <path>", "Project directory", process.cwd()).action(async (raw) => {
|
|
4046
|
+
process.exitCode = await runToggle(withHarness(raw, "claude-code"), "enable");
|
|
4021
4047
|
});
|
|
4022
|
-
cmd.command("disable").description("Disable an installed plugin (claude-code only)").option("--
|
|
4023
|
-
process.exitCode = await runToggle(
|
|
4048
|
+
cmd.command("disable").description("Disable an installed plugin (claude-code only)").option("--harness <name>", "Target: claude-code | all (default: claude-code)").addOption(driverAliasOption()).option("--project-dir <path>", "Project directory", process.cwd()).action(async (raw) => {
|
|
4049
|
+
process.exitCode = await runToggle(withHarness(raw, "claude-code"), "disable");
|
|
4024
4050
|
});
|
|
4025
|
-
cmd.command("status").description("Show install / enable status across harnesses").option("--
|
|
4026
|
-
process.exitCode = await runStatus2(
|
|
4051
|
+
cmd.command("status").description("Show install / enable status across harnesses").option("--harness <name>", "Target: claude-code | omp | codex | all (default: all)").addOption(driverAliasOption()).option("--project-dir <path>", "Project directory", process.cwd()).action(async (raw) => {
|
|
4052
|
+
process.exitCode = await runStatus2(withHarness(raw, "all"));
|
|
4027
4053
|
});
|
|
4028
4054
|
cmd.command("omp-exec <kind> <name>").description(
|
|
4029
4055
|
"Run one tool or slash command of the omp extension (used by .omp/extensions/skaile.ts)"
|
|
@@ -4071,7 +4097,7 @@ function unfinishedGitState(dir) {
|
|
|
4071
4097
|
for (const [entry, state2] of Object.entries(UNFINISHED_GIT_ENTRIES)) {
|
|
4072
4098
|
const p6 = spawnSync("git", ["rev-parse", "--git-path", entry], { cwd: dir, encoding: "utf-8" });
|
|
4073
4099
|
if (p6.status !== 0) return "the git directory could not be read";
|
|
4074
|
-
if (
|
|
4100
|
+
if (fs8.existsSync(path18.resolve(dir, p6.stdout.trim()))) return state2;
|
|
4075
4101
|
}
|
|
4076
4102
|
return null;
|
|
4077
4103
|
}
|
|
@@ -4143,7 +4169,7 @@ async function reindexLibrary(lib, library, name) {
|
|
|
4143
4169
|
const res = await indexLibrary(lib, library, {
|
|
4144
4170
|
exclude: (a) => skippedKeys.has(`${a.kind}:${a.name}`) || duplicateFiles.has(path18.resolve(a.manifestPath))
|
|
4145
4171
|
});
|
|
4146
|
-
const unparsable = res.
|
|
4172
|
+
const unparsable = res.unparsable;
|
|
4147
4173
|
for (const e of res.errors) (unparsable.includes(e) ? logErr : logWarn)(e);
|
|
4148
4174
|
const syncUnparsable = skipped.filter(
|
|
4149
4175
|
(s) => s.reason === "unparsable" && !unparsable.some((e) => e.includes(s.file))
|
|
@@ -4153,6 +4179,15 @@ async function reindexLibrary(lib, library, name) {
|
|
|
4153
4179
|
}
|
|
4154
4180
|
for (const p6 of badRequires) logErr(`${p6.asset}: ${p6.message}`);
|
|
4155
4181
|
for (const w of await unresolvedManifestDependencies(lib.path)) logWarn(w);
|
|
4182
|
+
const listed = loadSkPublishManifest(lib.path);
|
|
4183
|
+
for (const a of listed?.assets ?? []) {
|
|
4184
|
+
if (a.source) continue;
|
|
4185
|
+
const file = findEntryManifestFile(lib.path, a);
|
|
4186
|
+
if (!file) continue;
|
|
4187
|
+
for (const f of unheldRequiresOfFile(file, a.kind, composeRefs)) {
|
|
4188
|
+
logWarn(`${path18.relative(lib.path, file)} [${f.tag}] \u2014 ${f.text}`);
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4156
4191
|
const skippedUnparsable = unparsable.length + syncUnparsable.length;
|
|
4157
4192
|
const failing = skippedUnparsable + invalidVersion.length + badRequires.length + failed.length + duplicates.length;
|
|
4158
4193
|
(failing > 0 ? logWarn : logOk)(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
|
|
@@ -4210,7 +4245,7 @@ function assertManifestEditableOrExit(libraryPath) {
|
|
|
4210
4245
|
}
|
|
4211
4246
|
var DEPLOYED_COPY_DIRS = [
|
|
4212
4247
|
...new Set(
|
|
4213
|
-
Object.values(
|
|
4248
|
+
Object.values(HARNESS_TARGETS).flatMap(
|
|
4214
4249
|
(t) => Object.values(t.local).filter((d) => typeof d === "string")
|
|
4215
4250
|
)
|
|
4216
4251
|
)
|
|
@@ -4218,10 +4253,10 @@ var DEPLOYED_COPY_DIRS = [
|
|
|
4218
4253
|
async function refuseUnusableLibraryDir(dir, force = false) {
|
|
4219
4254
|
const deployed = DEPLOYED_COPY_DIRS.filter((d) => {
|
|
4220
4255
|
const full = path18.join(dir, d);
|
|
4221
|
-
return
|
|
4256
|
+
return fs8.existsSync(full) && fs8.statSync(full).isDirectory() && fs8.readdirSync(full).length > 0;
|
|
4222
4257
|
});
|
|
4223
4258
|
if (deployed.length > 0 && !force) {
|
|
4224
|
-
const where =
|
|
4259
|
+
const where = fs8.existsSync(path18.join(dir, "skaile.yaml")) ? "skaile.yaml with deployed copies" : "deployed copies";
|
|
4225
4260
|
logErr(
|
|
4226
4261
|
`${dir} is a project folder (${where} in ${deployed.map((d) => `${d}/`).join(", ")}): a library holds asset sources, not the copies \`skaile add\` deployed. Pick another --path for the library, or pass --force when the sources live in those folders.`
|
|
4227
4262
|
);
|
|
@@ -4246,13 +4281,13 @@ function canonicalDir(dir) {
|
|
|
4246
4281
|
const abs = path18.resolve(dir);
|
|
4247
4282
|
const missing = [];
|
|
4248
4283
|
let existing = abs;
|
|
4249
|
-
while (!
|
|
4284
|
+
while (!fs8.existsSync(existing)) {
|
|
4250
4285
|
const parent = path18.dirname(existing);
|
|
4251
4286
|
if (parent === existing) return abs;
|
|
4252
4287
|
missing.unshift(path18.basename(existing));
|
|
4253
4288
|
existing = parent;
|
|
4254
4289
|
}
|
|
4255
|
-
return path18.join(
|
|
4290
|
+
return path18.join(fs8.realpathSync(existing), ...missing);
|
|
4256
4291
|
}
|
|
4257
4292
|
function refuseGlobalInstallFolder(name, dir) {
|
|
4258
4293
|
const reserved = globalInstallDir();
|
|
@@ -4298,7 +4333,7 @@ async function refuseNestedLibraryPath(manager, dir, exceptId) {
|
|
|
4298
4333
|
function assertCreateDirInsideLibrary(libRoot, destDir, given) {
|
|
4299
4334
|
const exists = (p6) => {
|
|
4300
4335
|
try {
|
|
4301
|
-
|
|
4336
|
+
fs8.lstatSync(p6);
|
|
4302
4337
|
return true;
|
|
4303
4338
|
} catch {
|
|
4304
4339
|
return false;
|
|
@@ -4308,12 +4343,12 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
|
|
|
4308
4343
|
while (!exists(probe)) probe = path18.dirname(probe);
|
|
4309
4344
|
let realProbe;
|
|
4310
4345
|
try {
|
|
4311
|
-
realProbe =
|
|
4346
|
+
realProbe = fs8.realpathSync(probe);
|
|
4312
4347
|
} catch {
|
|
4313
4348
|
logErr(`--dir "${given}" passes through a broken symlink (${probe}).`);
|
|
4314
4349
|
process.exit(1);
|
|
4315
4350
|
}
|
|
4316
|
-
if (!
|
|
4351
|
+
if (!fs8.statSync(realProbe).isDirectory()) {
|
|
4317
4352
|
logErr(`--dir "${given}": ${probe} is not a directory.`);
|
|
4318
4353
|
process.exit(1);
|
|
4319
4354
|
}
|
|
@@ -4332,11 +4367,11 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
|
|
|
4332
4367
|
if (part === "" || part === ".") continue;
|
|
4333
4368
|
walked = path18.join(walked, part);
|
|
4334
4369
|
if (!exists(walked)) break;
|
|
4335
|
-
if (
|
|
4370
|
+
if (fs8.lstatSync(walked).isSymbolicLink()) {
|
|
4336
4371
|
logErr(
|
|
4337
4372
|
librarySymlinkMessage({
|
|
4338
4373
|
path: relParts.slice(0, i + 1).join("/"),
|
|
4339
|
-
target:
|
|
4374
|
+
target: fs8.readlinkSync(walked)
|
|
4340
4375
|
})
|
|
4341
4376
|
);
|
|
4342
4377
|
process.exit(1);
|
|
@@ -4344,7 +4379,7 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
|
|
|
4344
4379
|
}
|
|
4345
4380
|
}
|
|
4346
4381
|
function adoptWritesManifest(libPath) {
|
|
4347
|
-
if (!
|
|
4382
|
+
if (!fs8.existsSync(path18.join(libPath, SKAILE_MANIFEST_FILENAME))) return true;
|
|
4348
4383
|
const manifest = loadSkPublishManifest(libPath);
|
|
4349
4384
|
if (!manifest || manifest.source || (manifest.assets ?? []).length > 0) return false;
|
|
4350
4385
|
return manifestPublisherProblems(libPath).length === 0;
|
|
@@ -4402,8 +4437,8 @@ function pruneEmptyLibraryParents(libPath) {
|
|
|
4402
4437
|
for (; ; ) {
|
|
4403
4438
|
const rel = path18.relative(root, canonicalDir(dir));
|
|
4404
4439
|
if (rel === "" || rel.startsWith("..") || path18.isAbsolute(rel)) return;
|
|
4405
|
-
if (!
|
|
4406
|
-
|
|
4440
|
+
if (!fs8.existsSync(dir) || fs8.readdirSync(dir).length > 0) return;
|
|
4441
|
+
fs8.rmdirSync(dir);
|
|
4407
4442
|
dir = path18.dirname(dir);
|
|
4408
4443
|
}
|
|
4409
4444
|
}
|
|
@@ -4417,7 +4452,7 @@ function remoteBranches(url) {
|
|
|
4417
4452
|
return r.stdout.split("\n").map((line) => line.split(" ")[1]?.replace(/^refs\/heads\//, "")).filter((b) => !!b);
|
|
4418
4453
|
}
|
|
4419
4454
|
async function warnIfNotGithubRemote(name, url) {
|
|
4420
|
-
const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-
|
|
4455
|
+
const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-KKQ2ULLX.js');
|
|
4421
4456
|
if (!isGithubRemote(url)) logWarn(notGithubRemoteMessage(name, url));
|
|
4422
4457
|
}
|
|
4423
4458
|
function scaffoldLibraryFiles(dir, name) {
|
|
@@ -4450,8 +4485,8 @@ by the same ref.
|
|
|
4450
4485
|
const written = [];
|
|
4451
4486
|
for (const [file, content] of files) {
|
|
4452
4487
|
const target = path18.join(dir, file);
|
|
4453
|
-
if (
|
|
4454
|
-
|
|
4488
|
+
if (fs8.existsSync(target)) continue;
|
|
4489
|
+
fs8.writeFileSync(target, content, "utf8");
|
|
4455
4490
|
written.push(file);
|
|
4456
4491
|
}
|
|
4457
4492
|
return written;
|
|
@@ -4544,7 +4579,7 @@ function makeLibraryCommand() {
|
|
|
4544
4579
|
const ownership = flagged[0] ?? gone?.ownership ?? "owner";
|
|
4545
4580
|
const libPath = opts.path ? path18.resolve(opts.path) : path18.join(resolveLibraryDir(), name);
|
|
4546
4581
|
refuseGlobalInstallFolder(name, libPath);
|
|
4547
|
-
if (
|
|
4582
|
+
if (fs8.existsSync(libPath) && !fs8.statSync(libPath).isDirectory()) {
|
|
4548
4583
|
logErr(`${libPath} exists and is not a directory.`);
|
|
4549
4584
|
process.exit(1);
|
|
4550
4585
|
}
|
|
@@ -4565,7 +4600,7 @@ function makeLibraryCommand() {
|
|
|
4565
4600
|
if (existing) await manager.removeLibrary(name);
|
|
4566
4601
|
await assertLibraryPathFree(manager, libPath);
|
|
4567
4602
|
await refuseNestedLibraryPath(manager, libPath);
|
|
4568
|
-
if (
|
|
4603
|
+
if (fs8.existsSync(libPath)) {
|
|
4569
4604
|
exitOnLibrarySymlinks(libPath, `skaile library init ${name} --path ${libPath}`);
|
|
4570
4605
|
await refuseUnusableLibraryDir(libPath, opts.force);
|
|
4571
4606
|
}
|
|
@@ -4588,9 +4623,9 @@ function makeLibraryCommand() {
|
|
|
4588
4623
|
backend = "git";
|
|
4589
4624
|
backendConfig = { url: adopted.url, branch: adopted.branch, authHint: "ssh" };
|
|
4590
4625
|
} else {
|
|
4591
|
-
|
|
4626
|
+
fs8.mkdirSync(libPath, { recursive: true });
|
|
4592
4627
|
}
|
|
4593
|
-
const blank =
|
|
4628
|
+
const blank = fs8.readdirSync(libPath).every((entry) => entry === ".git");
|
|
4594
4629
|
const isDefault = !hasDefault && ownership !== "reader";
|
|
4595
4630
|
await manager.addLibrary({
|
|
4596
4631
|
name,
|
|
@@ -4754,6 +4789,16 @@ function makeLibraryCommand() {
|
|
|
4754
4789
|
);
|
|
4755
4790
|
process.exit(1);
|
|
4756
4791
|
}
|
|
4792
|
+
const wanted = path18.relative(libRoot, path18.join(destDir, name));
|
|
4793
|
+
const onDisk = (await scanUnlistedAssets(libRoot, target.name, getKindRegistry())).find(
|
|
4794
|
+
(u) => u.entry.kind === effectiveKind && u.entry.name === name && u.root !== wanted
|
|
4795
|
+
);
|
|
4796
|
+
if (onDisk) {
|
|
4797
|
+
logErr(
|
|
4798
|
+
`${effectiveKind}:${name} already exists at "${onDisk.root}" (not in the manifest yet) \u2014 creating it again under "${path18.relative(libRoot, destDir) || "."}" would be a duplicate. Run \`skaile library index ${target.name}\` first or pick another name.`
|
|
4799
|
+
);
|
|
4800
|
+
process.exit(1);
|
|
4801
|
+
}
|
|
4757
4802
|
const res = am2.create(name, effectiveKind, destDir, { description: opts.description });
|
|
4758
4803
|
if (!res.ok) {
|
|
4759
4804
|
logErr(res.path);
|
|
@@ -4765,6 +4810,8 @@ function makeLibraryCommand() {
|
|
|
4765
4810
|
`Description is a TODO placeholder \u2014 edit it (what the ${effectiveKind} does and when to use it) or \`skaile validate\` will fail.`
|
|
4766
4811
|
);
|
|
4767
4812
|
}
|
|
4813
|
+
const scaffoldFile = findAssetManifestFile(res.path, effectiveKind, name);
|
|
4814
|
+
const scaffoldProblems = scaffoldFile ? checkAssetFile(scaffoldFile, effectiveKind, getKindRegistry()) : [];
|
|
4768
4815
|
const { ref } = await registerLibraryAsset(target, library, {
|
|
4769
4816
|
kind: effectiveKind,
|
|
4770
4817
|
name,
|
|
@@ -4772,7 +4819,13 @@ function makeLibraryCommand() {
|
|
|
4772
4819
|
version: "0.1.0",
|
|
4773
4820
|
publisher: opts.publisher
|
|
4774
4821
|
});
|
|
4775
|
-
|
|
4822
|
+
if (scaffoldProblems.length > 0) {
|
|
4823
|
+
logInfo(
|
|
4824
|
+
`Created ${ref}, not ready to add yet: ${scaffoldProblems[0]?.text}. Fix the file, then run \`skaile library index ${target.name}\` and \`skaile validate ${target.path}\`.`
|
|
4825
|
+
);
|
|
4826
|
+
} else {
|
|
4827
|
+
logOk(`Indexed \u2014 add it with \`skaile add ${ref}\``);
|
|
4828
|
+
}
|
|
4776
4829
|
} finally {
|
|
4777
4830
|
close();
|
|
4778
4831
|
}
|
|
@@ -4810,12 +4863,19 @@ function makeLibraryCommand() {
|
|
|
4810
4863
|
}
|
|
4811
4864
|
const newPath = path18.join(path18.dirname(lib.path), newName);
|
|
4812
4865
|
refuseGlobalInstallFolder(newName, newPath);
|
|
4813
|
-
if (
|
|
4866
|
+
if (fs8.existsSync(newPath)) {
|
|
4814
4867
|
logErr(`Target directory already exists: ${newPath}`);
|
|
4815
4868
|
process.exit(1);
|
|
4816
4869
|
}
|
|
4817
|
-
|
|
4870
|
+
const renamedBack = renamedLibraryName(newName) === lib.name;
|
|
4871
|
+
fs8.renameSync(lib.path, newPath);
|
|
4818
4872
|
await manager.updateLibrary(lib.id, { name: newName, path: newPath });
|
|
4873
|
+
if (renamedBack) {
|
|
4874
|
+
new AssetManager({
|
|
4875
|
+
registry: getKindRegistry(),
|
|
4876
|
+
projectDir: process.cwd()
|
|
4877
|
+
}).renameLockedLibrary(lib.name, newName);
|
|
4878
|
+
}
|
|
4819
4879
|
logOk(`Renamed ${lib.name} \u2192 ${newName}`);
|
|
4820
4880
|
}
|
|
4821
4881
|
cmd.command("rename <old> <new>").description("Rename a library (also moves the directory)").action(async (oldName, newName) => {
|
|
@@ -4895,7 +4955,7 @@ function makeLibraryCommand() {
|
|
|
4895
4955
|
patch.isDefault = false;
|
|
4896
4956
|
} else if (field === "path") {
|
|
4897
4957
|
const dir = path18.resolve(value);
|
|
4898
|
-
if (!
|
|
4958
|
+
if (!fs8.existsSync(dir) || !fs8.statSync(dir).isDirectory()) {
|
|
4899
4959
|
logErr(`Directory does not exist: ${dir}. \`library set path=\` does not move files.`);
|
|
4900
4960
|
process.exit(1);
|
|
4901
4961
|
}
|
|
@@ -5114,16 +5174,16 @@ function makeLibraryCommand() {
|
|
|
5114
5174
|
"With --create-repo: create the repo private (the store only accepts public repos)"
|
|
5115
5175
|
).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(
|
|
5116
5176
|
async (lib, opts) => {
|
|
5117
|
-
const { runLibraryPublish } = await import('../library-publish-
|
|
5177
|
+
const { runLibraryPublish } = await import('../library-publish-KKQ2ULLX.js');
|
|
5118
5178
|
await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
|
|
5119
5179
|
}
|
|
5120
5180
|
);
|
|
5121
5181
|
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) => {
|
|
5122
|
-
const { runLibraryRegister } = await import('../library-publish-
|
|
5182
|
+
const { runLibraryRegister } = await import('../library-publish-KKQ2ULLX.js');
|
|
5123
5183
|
await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
|
|
5124
5184
|
});
|
|
5125
5185
|
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) => {
|
|
5126
|
-
const { runLibraryYank } = await import('../library-publish-
|
|
5186
|
+
const { runLibraryYank } = await import('../library-publish-KKQ2ULLX.js');
|
|
5127
5187
|
await withStoreErrorHandling(() => runLibraryYank(lib, opts));
|
|
5128
5188
|
});
|
|
5129
5189
|
return cmd;
|
|
@@ -5273,7 +5333,7 @@ function colorLine(line) {
|
|
|
5273
5333
|
if (/error|Error|ERROR|failed|Failed/.test(line)) return pc5.red(line);
|
|
5274
5334
|
if (/connector|MCP|tool/.test(line)) return pc5.yellow(line);
|
|
5275
5335
|
if (/rebuilt|registered|ready/.test(line)) return pc5.green(line);
|
|
5276
|
-
if (/\[
|
|
5336
|
+
if (/\[harness\]/.test(line)) return pc5.cyan(line);
|
|
5277
5337
|
if (/\[serve\]/.test(line)) return pc5.dim(line);
|
|
5278
5338
|
return line;
|
|
5279
5339
|
}
|
|
@@ -5783,7 +5843,7 @@ function scheduleSoftDepPreview() {
|
|
|
5783
5843
|
}
|
|
5784
5844
|
async function loadAssets() {
|
|
5785
5845
|
softDepPreviewCache.clear();
|
|
5786
|
-
const { gatherAssetFeeds } = await import('../asset-feeds-
|
|
5846
|
+
const { gatherAssetFeeds } = await import('../asset-feeds-PXUWCXVI.js');
|
|
5787
5847
|
const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
|
|
5788
5848
|
if (notes.length > 0) {
|
|
5789
5849
|
state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
|
|
@@ -5987,7 +6047,7 @@ function reconcileCollapsedSets(rows) {
|
|
|
5987
6047
|
async function loadSourcesAndLibraries() {
|
|
5988
6048
|
try {
|
|
5989
6049
|
const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
|
|
5990
|
-
import('../open-library-
|
|
6050
|
+
import('../open-library-RJGJIW5H.js'),
|
|
5991
6051
|
import('../core/index.js')
|
|
5992
6052
|
]);
|
|
5993
6053
|
const { manager, library, close } = await openLibraryManager2();
|
|
@@ -6958,8 +7018,8 @@ function makeManageCommand() {
|
|
|
6958
7018
|
}
|
|
6959
7019
|
function makeMcpServerCommand() {
|
|
6960
7020
|
return new Command("mcp-server").description("Start skaile workspace MCP server (stdio transport)").option("--project-dir <path>", "Project directory (default: cwd)", process.cwd()).action(async (opts) => {
|
|
6961
|
-
const
|
|
6962
|
-
const projectDir =
|
|
7021
|
+
const path42 = await import('path');
|
|
7022
|
+
const projectDir = path42.default.resolve(opts.projectDir);
|
|
6963
7023
|
const { LogStore: LogStore2, StdoutSink: StdoutSink2, registerLogStore: registerLogStore2 } = await import('../core/logging.js');
|
|
6964
7024
|
registerLogStore2(
|
|
6965
7025
|
new LogStore2({
|
|
@@ -7172,6 +7232,35 @@ function changeLabel(change, base) {
|
|
|
7172
7232
|
return `move ${rel(change.from)} \u2192 ${rel(change.to)}`;
|
|
7173
7233
|
}
|
|
7174
7234
|
}
|
|
7235
|
+
function resolveMode(opts, writeFlag = "--write") {
|
|
7236
|
+
if (opts.write && opts.dryRun) {
|
|
7237
|
+
logErr(`${writeFlag} and --dry-run are mutually exclusive.`);
|
|
7238
|
+
process.exit(1);
|
|
7239
|
+
}
|
|
7240
|
+
return opts.write === true;
|
|
7241
|
+
}
|
|
7242
|
+
function printChanges(changes, base) {
|
|
7243
|
+
for (const change of changes) {
|
|
7244
|
+
console.log();
|
|
7245
|
+
console.log(colorizeDiff(renderChange(change, base)).trimEnd());
|
|
7246
|
+
}
|
|
7247
|
+
}
|
|
7248
|
+
function finish(changes, write, base, writeFlag = "--write") {
|
|
7249
|
+
console.log();
|
|
7250
|
+
if (changes.length === 0) {
|
|
7251
|
+
logOk("Nothing to migrate.");
|
|
7252
|
+
return;
|
|
7253
|
+
}
|
|
7254
|
+
if (!write) {
|
|
7255
|
+
logInfo(
|
|
7256
|
+
`Dry run: ${changes.length} file change(s) planned, nothing written. Re-run with ${writeFlag} to apply.`
|
|
7257
|
+
);
|
|
7258
|
+
return;
|
|
7259
|
+
}
|
|
7260
|
+
applyChanges2(changes);
|
|
7261
|
+
logOk(`Applied ${changes.length} file change(s):`);
|
|
7262
|
+
for (const change of changes) console.log(` ${S.dim(changeLabel(change, base))}`);
|
|
7263
|
+
}
|
|
7175
7264
|
|
|
7176
7265
|
// cli/src/commands/migrate-agents.ts
|
|
7177
7266
|
var TARGET_SPEC_VERSION = "0.2";
|
|
@@ -7890,13 +7979,22 @@ function repoPublisher(root) {
|
|
|
7890
7979
|
}
|
|
7891
7980
|
return DEFAULT_PUBLISHER;
|
|
7892
7981
|
}
|
|
7893
|
-
function planBundles(root, skaileYamls, publisher, notes, manual) {
|
|
7982
|
+
function planBundles(root, skaileYamls, publisher, notes, manual, conflicts) {
|
|
7894
7983
|
const changes = [];
|
|
7895
7984
|
const presets = [];
|
|
7896
7985
|
const handled = /* @__PURE__ */ new Set();
|
|
7986
|
+
const claimed = /* @__PURE__ */ new Map();
|
|
7897
7987
|
const rel = (p6) => posix2(path18__default.relative(root, p6));
|
|
7898
7988
|
const convert = (name, bundleFile, dir) => {
|
|
7899
7989
|
const target = path18__default.join(dir === root ? path18__default.join(dir, name) : dir, `${name}.preset.yaml`);
|
|
7990
|
+
const origin = bundleFile ? rel(bundleFile) : `${rel(path18__default.join(dir, "skills")) || "skills"}/`;
|
|
7991
|
+
const earlier = claimed.get(target);
|
|
7992
|
+
if (earlier !== void 0) {
|
|
7993
|
+
conflicts.push(
|
|
7994
|
+
`${earlier} and ${origin} both become ${rel(target)}: rename one bundle first. Nothing was changed.`
|
|
7995
|
+
);
|
|
7996
|
+
return;
|
|
7997
|
+
}
|
|
7900
7998
|
if (existsSync(target)) {
|
|
7901
7999
|
manual.push(`${rel(target)} already exists; bundle ${name} not converted`);
|
|
7902
8000
|
return;
|
|
@@ -7932,6 +8030,7 @@ function planBundles(root, skaileYamls, publisher, notes, manual) {
|
|
|
7932
8030
|
);
|
|
7933
8031
|
return;
|
|
7934
8032
|
}
|
|
8033
|
+
claimed.set(target, origin);
|
|
7935
8034
|
const after = presetText(name, description, refs, version);
|
|
7936
8035
|
if (before !== void 0 && bundleFile) {
|
|
7937
8036
|
changes.push({ type: "move", from: bundleFile, to: target, before, after });
|
|
@@ -8061,6 +8160,7 @@ function planAssetMigration(options) {
|
|
|
8061
8160
|
const knownKinds = new Set(options.registry.getAllKinds());
|
|
8062
8161
|
const notes = [];
|
|
8063
8162
|
const manual = [];
|
|
8163
|
+
const conflicts = [];
|
|
8064
8164
|
const unknownTypes = [];
|
|
8065
8165
|
const { moves, changes: moveChanges } = planMarkdownMoves(root, knownKinds, manual, unknownTypes);
|
|
8066
8166
|
for (const move of moves) {
|
|
@@ -8081,7 +8181,7 @@ function planAssetMigration(options) {
|
|
|
8081
8181
|
}
|
|
8082
8182
|
}
|
|
8083
8183
|
const publisher = repoPublisher(root);
|
|
8084
|
-
const bundleChanges = planBundles(root, skaileYamls, publisher, notes, manual);
|
|
8184
|
+
const bundleChanges = planBundles(root, skaileYamls, publisher, notes, manual, conflicts);
|
|
8085
8185
|
const skaileChanges = skaileYamls.flatMap(
|
|
8086
8186
|
({ file, source }) => planSkaileYaml(root, file, source, notes, manual)
|
|
8087
8187
|
);
|
|
@@ -8089,9 +8189,146 @@ function planAssetMigration(options) {
|
|
|
8089
8189
|
changes: [...moveChanges, ...agentChanges, ...bundleChanges, ...skaileChanges],
|
|
8090
8190
|
notes,
|
|
8091
8191
|
manual,
|
|
8192
|
+
conflicts,
|
|
8092
8193
|
unknownTypes
|
|
8093
8194
|
};
|
|
8094
8195
|
}
|
|
8196
|
+
var SKAILE_YAML_SUFFIX = ".skaile.yaml";
|
|
8197
|
+
var OLD_KEY = "driver";
|
|
8198
|
+
var NEW_KEY = "harness";
|
|
8199
|
+
var AGENT_CONFIG_KEYS = ["agent-config", "agent_config", "agentConfig"];
|
|
8200
|
+
function renameInMap(map, where, notes) {
|
|
8201
|
+
const oldIdx = map.items.findIndex((p6) => isScalar(p6.key) && p6.key.value === OLD_KEY);
|
|
8202
|
+
if (oldIdx < 0) return false;
|
|
8203
|
+
const hasNew = map.items.some((p6) => isScalar(p6.key) && p6.key.value === NEW_KEY);
|
|
8204
|
+
if (hasNew) {
|
|
8205
|
+
map.items.splice(oldIdx, 1);
|
|
8206
|
+
notes.push(
|
|
8207
|
+
`${where}: both \`harness\` and \`driver\` set; kept \`harness\`, dropped \`driver\``
|
|
8208
|
+
);
|
|
8209
|
+
} else {
|
|
8210
|
+
(map.items[oldIdx]?.key).value = NEW_KEY;
|
|
8211
|
+
notes.push(`${where}: \`driver\` \u2192 \`harness\``);
|
|
8212
|
+
}
|
|
8213
|
+
return true;
|
|
8214
|
+
}
|
|
8215
|
+
function migrateHarnessYaml(text, label = SKAILE_YAML_DEFAULT) {
|
|
8216
|
+
const doc = parseDocument(text);
|
|
8217
|
+
if (doc.errors.length > 0) {
|
|
8218
|
+
throw new Error(`invalid YAML: ${doc.errors[0]?.message ?? "parse error"}`);
|
|
8219
|
+
}
|
|
8220
|
+
const root = doc.contents;
|
|
8221
|
+
if (!isMap(root)) return { output: text, notes: [] };
|
|
8222
|
+
const notes = [];
|
|
8223
|
+
let changed = false;
|
|
8224
|
+
for (const key of AGENT_CONFIG_KEYS) {
|
|
8225
|
+
const block = root.get(key, true);
|
|
8226
|
+
if (!isMap(block)) continue;
|
|
8227
|
+
const flat = AGENT_PROFILE_FIELDS.some((f) => {
|
|
8228
|
+
const v = block.get(f, true);
|
|
8229
|
+
return isScalar(v) && typeof v.value === "string";
|
|
8230
|
+
});
|
|
8231
|
+
if (flat) {
|
|
8232
|
+
changed = renameInMap(block, `${label}: ${key}`, notes) || changed;
|
|
8233
|
+
continue;
|
|
8234
|
+
}
|
|
8235
|
+
for (const pair of block.items) {
|
|
8236
|
+
if (!isMap(pair.value) || !isScalar(pair.key)) continue;
|
|
8237
|
+
changed = renameInMap(pair.value, `${label}: ${key}.${String(pair.key.value)}`, notes) || changed;
|
|
8238
|
+
}
|
|
8239
|
+
}
|
|
8240
|
+
return { output: changed ? String(doc) : text, notes };
|
|
8241
|
+
}
|
|
8242
|
+
function migrateHarnessSettings(text, label = "settings.json") {
|
|
8243
|
+
let parsed;
|
|
8244
|
+
try {
|
|
8245
|
+
parsed = JSON.parse(text);
|
|
8246
|
+
} catch {
|
|
8247
|
+
return { output: text, notes: [] };
|
|
8248
|
+
}
|
|
8249
|
+
if (!isRecord(parsed) || !(OLD_KEY in parsed)) return { output: text, notes: [] };
|
|
8250
|
+
const notes = [];
|
|
8251
|
+
const out = {};
|
|
8252
|
+
for (const [k, v] of Object.entries(parsed)) {
|
|
8253
|
+
if (k !== OLD_KEY) {
|
|
8254
|
+
out[k] = v;
|
|
8255
|
+
} else if (NEW_KEY in parsed) {
|
|
8256
|
+
notes.push(
|
|
8257
|
+
`${label}: both \`harness\` and \`driver\` set; kept \`harness\`, dropped \`driver\``
|
|
8258
|
+
);
|
|
8259
|
+
} else {
|
|
8260
|
+
out[NEW_KEY] = v;
|
|
8261
|
+
notes.push(`${label}: \`driver\` \u2192 \`harness\``);
|
|
8262
|
+
}
|
|
8263
|
+
}
|
|
8264
|
+
const trailing = text.endsWith("\n") ? "\n" : "";
|
|
8265
|
+
return { output: `${JSON.stringify(out, null, 2)}${trailing}`, notes };
|
|
8266
|
+
}
|
|
8267
|
+
function workspaceYamlFiles(projectDir) {
|
|
8268
|
+
const files = [];
|
|
8269
|
+
if (existsSync(path18__default.join(projectDir, SKAILE_YAML_DEFAULT))) {
|
|
8270
|
+
files.push(path18__default.join(projectDir, SKAILE_YAML_DEFAULT));
|
|
8271
|
+
}
|
|
8272
|
+
try {
|
|
8273
|
+
for (const entry of readdirSync(projectDir).sort()) {
|
|
8274
|
+
if (entry.endsWith(SKAILE_YAML_SUFFIX)) files.push(path18__default.join(projectDir, entry));
|
|
8275
|
+
}
|
|
8276
|
+
} catch {
|
|
8277
|
+
}
|
|
8278
|
+
return files;
|
|
8279
|
+
}
|
|
8280
|
+
function planHarnessMigration(opts) {
|
|
8281
|
+
const changes = [];
|
|
8282
|
+
const notes = [];
|
|
8283
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8284
|
+
const plan = (file, rewrite) => {
|
|
8285
|
+
if (seen.has(file) || !existsSync(file)) return;
|
|
8286
|
+
seen.add(file);
|
|
8287
|
+
const before = readText(file);
|
|
8288
|
+
const label = path18__default.basename(file);
|
|
8289
|
+
let result;
|
|
8290
|
+
try {
|
|
8291
|
+
result = rewrite(before, label);
|
|
8292
|
+
} catch (error) {
|
|
8293
|
+
notes.push(`${file}: skipped \u2014 ${error.message}`);
|
|
8294
|
+
return;
|
|
8295
|
+
}
|
|
8296
|
+
if (result.output === before) return;
|
|
8297
|
+
notes.push(...result.notes);
|
|
8298
|
+
changes.push({ type: "write", path: file, before, after: result.output });
|
|
8299
|
+
};
|
|
8300
|
+
for (const file of workspaceYamlFiles(opts.projectDir)) plan(file, migrateHarnessYaml);
|
|
8301
|
+
plan(projectSettingsPath(opts.projectDir), migrateHarnessSettings);
|
|
8302
|
+
plan(globalSettingsPath(), migrateHarnessSettings);
|
|
8303
|
+
return { changes, notes };
|
|
8304
|
+
}
|
|
8305
|
+
function runMigrateHarness(opts) {
|
|
8306
|
+
const apply = resolveMode(
|
|
8307
|
+
{ write: opts.apply === true || opts.write === true, dryRun: opts.dryRun },
|
|
8308
|
+
"--apply"
|
|
8309
|
+
);
|
|
8310
|
+
const cwd = process.cwd();
|
|
8311
|
+
const projectDir = path18__default.resolve(opts.projectDir ?? findWorkspaceRoot(cwd) ?? cwd);
|
|
8312
|
+
const plan = planHarnessMigration({ projectDir });
|
|
8313
|
+
for (const note of plan.notes) console.log(` ${note}`);
|
|
8314
|
+
printChanges(plan.changes, projectDir);
|
|
8315
|
+
finish(plan.changes, apply, projectDir, "--apply");
|
|
8316
|
+
}
|
|
8317
|
+
function addMigrateHarnessCommand(migrate) {
|
|
8318
|
+
migrate.command("harness").description(
|
|
8319
|
+
"Rename the `driver` key to `harness` in skaile.yaml agent-config and settings.json"
|
|
8320
|
+
).option("--project-dir <path>", "Project directory (default: the workspace root of the cwd)").option("--apply", "Write the changes (default: print a diff and write nothing)").option("--write", "Same as --apply").option("--dry-run", "Print the diff and write nothing (the default)").addHelpText(
|
|
8321
|
+
"after",
|
|
8322
|
+
`
|
|
8323
|
+
Rewrites (the connector/mount \`driver\` of connectors: and mounts: is never touched):
|
|
8324
|
+
skaile.yaml agent-config.<profile>.driver -> harness (also the flat agent-config: { driver: \u2026 } shape)
|
|
8325
|
+
.skaile/settings.json, ~/.skaile/settings.json driver -> harness
|
|
8326
|
+
A profile or file that sets both keeps \`harness\` and drops \`driver\`.
|
|
8327
|
+
|
|
8328
|
+
Dry run by default: prints a unified diff per file. Pass --apply to write.
|
|
8329
|
+
`
|
|
8330
|
+
).action((opts) => runMigrateHarness(opts));
|
|
8331
|
+
}
|
|
8095
8332
|
|
|
8096
8333
|
// cli/src/commands/migrate-legacy-entry.ts
|
|
8097
8334
|
var ANTHROPIC_VERSION_HEADER = { "anthropic-version": "2023-06-01" };
|
|
@@ -8190,9 +8427,9 @@ function legacyProfileEntry(inputs = {}) {
|
|
|
8190
8427
|
|
|
8191
8428
|
// cli/src/commands/migrate-providers.ts
|
|
8192
8429
|
var LEGACY_PROFILE_KEYS = ["provider", "cloud", "cloud_config", "cloudConfig"];
|
|
8193
|
-
var
|
|
8430
|
+
var AGENT_CONFIG_KEYS2 = ["agent-config", "agent_config", "agentConfig"];
|
|
8194
8431
|
var FLAT_PROFILE_FIELDS = [
|
|
8195
|
-
"
|
|
8432
|
+
"harness",
|
|
8196
8433
|
"provider",
|
|
8197
8434
|
"cloud",
|
|
8198
8435
|
"model",
|
|
@@ -8234,7 +8471,7 @@ function workspaceConfigFiles(dir) {
|
|
|
8234
8471
|
return names.filter((name) => isWorkspaceConfigFilename(name)).sort().map((name) => path18__default.join(dir, name));
|
|
8235
8472
|
}
|
|
8236
8473
|
function readAgentConfigBlock(raw) {
|
|
8237
|
-
const key =
|
|
8474
|
+
const key = AGENT_CONFIG_KEYS2.find((candidate) => raw[candidate] !== void 0);
|
|
8238
8475
|
if (!key) return void 0;
|
|
8239
8476
|
const block = raw[key];
|
|
8240
8477
|
if (typeof block !== "object" || block === null || Array.isArray(block)) return void 0;
|
|
@@ -8475,7 +8712,8 @@ Rewrites (run on a repo root):
|
|
|
8475
8712
|
agent persona:/rules: refs to the old path become composes items
|
|
8476
8713
|
*.bundle.yaml <name>.preset.yaml beside it, or <name>/<name>.preset.yaml
|
|
8477
8714
|
for a bundle at the repo root (items: kind:@publisher/name);
|
|
8478
|
-
kind: bundle entries of skaile.yaml#assets become kind: preset
|
|
8715
|
+
kind: bundle entries of skaile.yaml#assets become kind: preset;
|
|
8716
|
+
two bundles with one name are refused (exit 1, nothing written)
|
|
8479
8717
|
skaile.yaml dependencies bundle:@... -> preset:@...
|
|
8480
8718
|
skaile.yaml publisher/version/assets
|
|
8481
8719
|
-> skaile.manifest.yaml (publisher without "@"); keys removed,
|
|
@@ -8484,35 +8722,6 @@ Rewrites (run on a repo root):
|
|
|
8484
8722
|
|
|
8485
8723
|
Dry run by default: prints a unified diff per file. Pass --write to apply.
|
|
8486
8724
|
`;
|
|
8487
|
-
function resolveMode(opts) {
|
|
8488
|
-
if (opts.write && opts.dryRun) {
|
|
8489
|
-
logErr("--write and --dry-run are mutually exclusive.");
|
|
8490
|
-
process.exit(1);
|
|
8491
|
-
}
|
|
8492
|
-
return opts.write === true;
|
|
8493
|
-
}
|
|
8494
|
-
function printChanges(changes, base) {
|
|
8495
|
-
for (const change of changes) {
|
|
8496
|
-
console.log();
|
|
8497
|
-
console.log(colorizeDiff(renderChange(change, base)).trimEnd());
|
|
8498
|
-
}
|
|
8499
|
-
}
|
|
8500
|
-
function finish(changes, write, base) {
|
|
8501
|
-
console.log();
|
|
8502
|
-
if (changes.length === 0) {
|
|
8503
|
-
logOk("Nothing to migrate.");
|
|
8504
|
-
return;
|
|
8505
|
-
}
|
|
8506
|
-
if (!write) {
|
|
8507
|
-
logInfo(
|
|
8508
|
-
`Dry run: ${changes.length} file change(s) planned, nothing written. Re-run with --write to apply.`
|
|
8509
|
-
);
|
|
8510
|
-
return;
|
|
8511
|
-
}
|
|
8512
|
-
applyChanges2(changes);
|
|
8513
|
-
logOk(`Applied ${changes.length} file change(s):`);
|
|
8514
|
-
for (const change of changes) console.log(` ${S.dim(changeLabel(change, base))}`);
|
|
8515
|
-
}
|
|
8516
8725
|
async function runMigrateAgents(paths, opts) {
|
|
8517
8726
|
const write = resolveMode(opts);
|
|
8518
8727
|
const base = process.cwd();
|
|
@@ -8553,6 +8762,11 @@ async function runMigrateAssets(root, opts) {
|
|
|
8553
8762
|
root: path18__default.resolve(root ?? base),
|
|
8554
8763
|
registry: getKindRegistry()
|
|
8555
8764
|
});
|
|
8765
|
+
if (plan.conflicts.length > 0) {
|
|
8766
|
+
for (const conflict of plan.conflicts) logErr(conflict);
|
|
8767
|
+
process.exitCode = 1;
|
|
8768
|
+
return;
|
|
8769
|
+
}
|
|
8556
8770
|
for (const note of plan.notes) console.log(` ${note}`);
|
|
8557
8771
|
for (const note of plan.manual) logWarn(note);
|
|
8558
8772
|
for (const { file, type } of plan.unknownTypes) {
|
|
@@ -8572,6 +8786,7 @@ function makeMigrateCommand() {
|
|
|
8572
8786
|
cmd.command("assets").description(
|
|
8573
8787
|
"Move persona/ruleset files, bundles and the publication half of skaile.yaml onto the kind model"
|
|
8574
8788
|
).argument("[root]", "Repo root to migrate (default: current directory)").option("--write", "Apply the changes (default: print a diff and write nothing)").option("--dry-run", "Print the diff and write nothing (the default)").addHelpText("after", ASSETS_HELP).action((root, opts) => runMigrateAssets(root, opts));
|
|
8789
|
+
addMigrateHarnessCommand(cmd);
|
|
8575
8790
|
return cmd;
|
|
8576
8791
|
}
|
|
8577
8792
|
function makeNpxCommand() {
|
|
@@ -8627,7 +8842,7 @@ function makeNpxCommand() {
|
|
|
8627
8842
|
registry: getKindRegistry(),
|
|
8628
8843
|
projectDir,
|
|
8629
8844
|
global: opts.global,
|
|
8630
|
-
|
|
8845
|
+
harness: opts.target,
|
|
8631
8846
|
onLibraryCollision: warnings.push
|
|
8632
8847
|
});
|
|
8633
8848
|
spinner.start(`Installing ${skillRef}`);
|
|
@@ -8702,6 +8917,12 @@ function outdatedStatus(e) {
|
|
|
8702
8917
|
if (e.contentChanged) {
|
|
8703
8918
|
return `${e.currentVersion} content changed since lock ${S.dim(`(library ${e.library})`)}${moves}`;
|
|
8704
8919
|
}
|
|
8920
|
+
if (e.pinned && e.latestVersion !== void 0) {
|
|
8921
|
+
return `locked ${e.currentVersion} (latest ${e.latestVersion}, pinned in skaile.yaml)`;
|
|
8922
|
+
}
|
|
8923
|
+
if (e.library !== void 0 && e.libraryOlder !== void 0) {
|
|
8924
|
+
return `library is at ${e.libraryOlder}, locked ${e.currentVersion} ${S.dim(`(library ${e.library})`)}${moves}`;
|
|
8925
|
+
}
|
|
8705
8926
|
if (e.library !== void 0 && e.latestVersion !== void 0) {
|
|
8706
8927
|
return `${e.currentVersion} \u2192 ${e.latestVersion} ${S.dim(`(library ${e.library})`)}${moves}`;
|
|
8707
8928
|
}
|
|
@@ -8712,15 +8933,15 @@ function outdatedStatus(e) {
|
|
|
8712
8933
|
}
|
|
8713
8934
|
function makeOutdatedCommand() {
|
|
8714
8935
|
return new Command("outdated").description("Check for assets behind their repo or library").argument("[ref]", "Check a specific asset (kind:@publisher/name)").option("--project-dir <path>", "Project directory", process.cwd()).addOption(
|
|
8715
|
-
new Option("--target <agent>", `
|
|
8716
|
-
|
|
8936
|
+
new Option("--target <agent>", `Harness target (${TARGET_DEFAULT_HINT})`).choices(
|
|
8937
|
+
SUPPORTED_HARNESSES
|
|
8717
8938
|
)
|
|
8718
8939
|
).action(async (filter, opts) => {
|
|
8719
8940
|
requireProjectConfig(opts.projectDir);
|
|
8720
8941
|
const am2 = new AssetManager({
|
|
8721
8942
|
registry: getKindRegistry(),
|
|
8722
8943
|
projectDir: path18__default.resolve(opts.projectDir),
|
|
8723
|
-
|
|
8944
|
+
harness: opts.target
|
|
8724
8945
|
});
|
|
8725
8946
|
const entries = await am2.outdated();
|
|
8726
8947
|
if (entries.length === 0) {
|
|
@@ -8743,7 +8964,7 @@ function makeOutdatedCommand() {
|
|
|
8743
8964
|
);
|
|
8744
8965
|
}
|
|
8745
8966
|
console.log();
|
|
8746
|
-
if (filtered.some((e) => e.problem === void 0)) {
|
|
8967
|
+
if (filtered.some((e) => e.problem === void 0 && !e.pinned)) {
|
|
8747
8968
|
logWarn(`Run ${S.cmd("skaile update")} to re-lock and re-deploy.`);
|
|
8748
8969
|
}
|
|
8749
8970
|
if (filtered.some((e) => e.problem !== void 0 && !e.manualFix)) {
|
|
@@ -8825,7 +9046,7 @@ function action2(fn) {
|
|
|
8825
9046
|
};
|
|
8826
9047
|
}
|
|
8827
9048
|
async function reconcileAndReport(projectDir, plugins, opts = {}) {
|
|
8828
|
-
const { reconcilePlugins } = await import('../plugin-store-
|
|
9049
|
+
const { reconcilePlugins } = await import('../plugin-store-MSH6GK6T.js');
|
|
8829
9050
|
if (plugins.length === 0) {
|
|
8830
9051
|
logInfo("No plugins declared \u2014 nothing to reconcile.");
|
|
8831
9052
|
return;
|
|
@@ -8840,13 +9061,13 @@ async function reconcileAndReport(projectDir, plugins, opts = {}) {
|
|
|
8840
9061
|
}
|
|
8841
9062
|
}
|
|
8842
9063
|
async function verifyPluginLoads(projectDir, spec) {
|
|
8843
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
9064
|
+
const { loadPlugins } = await import('../plugin-store-MSH6GK6T.js');
|
|
8844
9065
|
const { createPluginRegistry } = await import('../plugin-registry/index.js');
|
|
8845
9066
|
const registry = createPluginRegistry();
|
|
8846
9067
|
const result = await loadPlugins(projectDir, [spec], registry);
|
|
8847
9068
|
const failure = result.failed[0];
|
|
8848
9069
|
if (failure) throw new Error(failure.error);
|
|
8849
|
-
const contributed = ["
|
|
9070
|
+
const contributed = ["harness", "connector", "deployTarget"].flatMap(
|
|
8850
9071
|
(kind) => registry.list(kind).map((m) => `${kind} ${m.id}`)
|
|
8851
9072
|
);
|
|
8852
9073
|
logOk(`Loaded ${S.cmd(spec)}${contributed.length > 0 ? ` (${contributed.join(", ")})` : ""}`);
|
|
@@ -8854,7 +9075,7 @@ async function verifyPluginLoads(projectDir, spec) {
|
|
|
8854
9075
|
async function runInstall2(spec, opts) {
|
|
8855
9076
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
8856
9077
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
8857
|
-
const { specName, rollbackPluginStore } = await import('../plugin-store-
|
|
9078
|
+
const { specName, rollbackPluginStore } = await import('../plugin-store-MSH6GK6T.js');
|
|
8858
9079
|
const yamlPath = path18__default.join(projectDir, "skaile.yaml");
|
|
8859
9080
|
if (!existsSync(yamlPath)) {
|
|
8860
9081
|
throw new Error(`no skaile.yaml in ${projectDir}; run \`skaile init\` first`);
|
|
@@ -8883,7 +9104,7 @@ async function runInstall2(spec, opts) {
|
|
|
8883
9104
|
async function runRemove(name, opts) {
|
|
8884
9105
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
8885
9106
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
8886
|
-
const { specName } = await import('../plugin-store-
|
|
9107
|
+
const { specName } = await import('../plugin-store-MSH6GK6T.js');
|
|
8887
9108
|
const yamlPath = path18__default.join(projectDir, "skaile.yaml");
|
|
8888
9109
|
if (!existsSync(yamlPath)) {
|
|
8889
9110
|
logInfo(`No plugin matching ${S.cmd(name)}: there is no skaile.yaml in ${projectDir}.`);
|
|
@@ -8915,7 +9136,7 @@ async function runList(opts) {
|
|
|
8915
9136
|
const registry = createPluginRegistry();
|
|
8916
9137
|
if (declared.length > 0) {
|
|
8917
9138
|
try {
|
|
8918
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
9139
|
+
const { loadPlugins } = await import('../plugin-store-MSH6GK6T.js');
|
|
8919
9140
|
const result = await loadPlugins(projectDir, declared, registry);
|
|
8920
9141
|
for (const f of result.failed) logWarn(f.error);
|
|
8921
9142
|
} catch (err) {
|
|
@@ -8923,7 +9144,7 @@ async function runList(opts) {
|
|
|
8923
9144
|
}
|
|
8924
9145
|
}
|
|
8925
9146
|
const kinds = [
|
|
8926
|
-
{ kind: "
|
|
9147
|
+
{ kind: "harness", label: "harnesses" },
|
|
8927
9148
|
{ kind: "connector", label: "connectors" },
|
|
8928
9149
|
{ kind: "deployTarget", label: "deploy targets" }
|
|
8929
9150
|
];
|
|
@@ -8941,7 +9162,7 @@ async function runList(opts) {
|
|
|
8941
9162
|
}
|
|
8942
9163
|
function makePluginCommand() {
|
|
8943
9164
|
const cmd = new Command("plugin").description(
|
|
8944
|
-
"Manage registry plugins (
|
|
9165
|
+
"Manage registry plugins (harnesses / connectors / deploy targets) declared in skaile.yaml"
|
|
8945
9166
|
);
|
|
8946
9167
|
cmd.command("install <spec>").description("Add a plugin spec to skaile.yaml plugins and reconcile the store").option("--project-dir <path>", "Project directory", process.cwd()).action(action2(runInstall2));
|
|
8947
9168
|
cmd.command("remove <name>").description("Remove a plugin (by package name) from skaile.yaml plugins and reconcile").option("--project-dir <path>", "Project directory", process.cwd()).action(action2(runRemove));
|
|
@@ -9183,8 +9404,8 @@ function redactSecrets(preset, findings) {
|
|
|
9183
9404
|
}
|
|
9184
9405
|
return { preset: next, keys };
|
|
9185
9406
|
}
|
|
9186
|
-
function placeholderKey(itemId,
|
|
9187
|
-
return `${itemId}_${
|
|
9407
|
+
function placeholderKey(itemId, path42) {
|
|
9408
|
+
return `${itemId}_${path42}`.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
|
|
9188
9409
|
}
|
|
9189
9410
|
function setAtPath(root, segments, value) {
|
|
9190
9411
|
let node = root;
|
|
@@ -9529,6 +9750,7 @@ async function runPresetInstall(projectDir) {
|
|
|
9529
9750
|
logInfo("Installing new dependencies\u2026");
|
|
9530
9751
|
const result = await am2.install({});
|
|
9531
9752
|
for (const d of result.deployed) logOk(d);
|
|
9753
|
+
await pinComposedAgents(projectDir);
|
|
9532
9754
|
for (const m of result.missing) logErr(`Missing: ${m}${result.missingHints?.[m] ?? ""}`);
|
|
9533
9755
|
if (reportStoreNotChecked(result.storeNotChecked)) process.exitCode = 1;
|
|
9534
9756
|
await reportInstalledSoftDeps(am2);
|
|
@@ -9764,55 +9986,28 @@ function makeRebuildCommand() {
|
|
|
9764
9986
|
logInfo(`Written: ${result.manifestPath}`);
|
|
9765
9987
|
});
|
|
9766
9988
|
}
|
|
9767
|
-
|
|
9768
|
-
// cli/src/driver-error.ts
|
|
9769
|
-
function friendlyDriverError(err) {
|
|
9770
|
-
const e = err;
|
|
9771
|
-
if (!e) return null;
|
|
9772
|
-
const isSpawnEnoent = e.code === "ENOENT" && (e.syscall?.startsWith("spawn") === true || /^spawn .*ENOENT/.test(e.message ?? ""));
|
|
9773
|
-
const isConfig = e.category === "config" || e.detail?.category === "config";
|
|
9774
|
-
if (!isSpawnEnoent && !isConfig) return null;
|
|
9775
|
-
const hint = e.hint ?? e.detail?.hint;
|
|
9776
|
-
const base = hint ?? "The configured agent binary is not installed or not on your PATH.";
|
|
9777
|
-
return `${base}
|
|
9778
|
-
Try a different harness with \`--driver claude-sdk\`.`;
|
|
9779
|
-
}
|
|
9780
|
-
function driverErrorNotes(err) {
|
|
9781
|
-
const e = err;
|
|
9782
|
-
const notes = [];
|
|
9783
|
-
const category = e?.category ?? e?.detail?.category;
|
|
9784
|
-
const hint = e?.hint ?? e?.detail?.hint;
|
|
9785
|
-
if (hint && category !== "config") notes.push(hint);
|
|
9786
|
-
else if (category === "auth") notes.push("Check your API key or login.");
|
|
9787
|
-
if (e?.logSessionId) {
|
|
9788
|
-
notes.push(`Full records: .skaile/logs.db (skaile session logs ${e.logSessionId}).`);
|
|
9789
|
-
}
|
|
9790
|
-
return notes;
|
|
9791
|
-
}
|
|
9792
|
-
|
|
9793
|
-
// cli/src/commands/run.ts
|
|
9794
9989
|
function resolveSingleShotAgentDir(projectDir, agentDefinition) {
|
|
9795
9990
|
if (!agentDefinition) return resolveAgentDir(projectDir);
|
|
9796
9991
|
const asPath = agentDefinition.endsWith("agent.yaml") ? path18__default.dirname(path18__default.resolve(projectDir, agentDefinition)) : agentDefinition;
|
|
9797
9992
|
const dir = resolveAgentDefinitionDir(projectDir, asPath);
|
|
9798
|
-
if (!dir || !
|
|
9993
|
+
if (!dir || !fs8__default.existsSync(path18__default.join(dir, "agent.yaml"))) {
|
|
9799
9994
|
throw new Error(
|
|
9800
9995
|
`--agent-definition "${agentDefinition}" does not resolve to an agent directory with agent.yaml${dir ? ` (looked in ${dir})` : ""}`
|
|
9801
9996
|
);
|
|
9802
9997
|
}
|
|
9803
9998
|
return dir;
|
|
9804
9999
|
}
|
|
9805
|
-
async function printCompositionDryRun(projectDir, agentDir,
|
|
10000
|
+
async function printCompositionDryRun(projectDir, agentDir, harness, model, instanceIdOverride) {
|
|
9806
10001
|
const manifest = agentDir ? await loadAgentManifest(agentDir) : void 0;
|
|
9807
|
-
const refusal =
|
|
10002
|
+
const refusal = checkHarnessModel(harness, {
|
|
9808
10003
|
registry: loadRegistryView({ projectDir }).merged,
|
|
9809
|
-
model: model ??
|
|
10004
|
+
model: model ?? manifestModelForHarness(manifest, harness)
|
|
9810
10005
|
});
|
|
9811
10006
|
if (refusal) throw new Error(refusal);
|
|
9812
10007
|
console.log();
|
|
9813
10008
|
console.log(` ${S.label("Project dir:")} ${projectDir}`);
|
|
9814
10009
|
console.log(` ${S.label("Agent dir:")} ${agentDir ?? S.dim("(none)")}`);
|
|
9815
|
-
console.log(` ${S.label("
|
|
10010
|
+
console.log(` ${S.label("Harness:")} ${harness}${model ? S.dim(` / ${model}`) : ""}`);
|
|
9816
10011
|
console.log(` ${S.warn("(dry run \u2014 no model will be started)")}`);
|
|
9817
10012
|
console.log();
|
|
9818
10013
|
if (!agentDir || !manifest) {
|
|
@@ -9830,7 +10025,7 @@ async function printCompositionDryRun(projectDir, agentDir, driver, model, insta
|
|
|
9830
10025
|
asset: { manifest, dir: agentDir },
|
|
9831
10026
|
projectDir,
|
|
9832
10027
|
registry: getKindRegistry(),
|
|
9833
|
-
host: { nativeSubagents:
|
|
10028
|
+
host: { nativeSubagents: harnessNameForHarnessId(harness) !== void 0 },
|
|
9834
10029
|
dryRun: true
|
|
9835
10030
|
});
|
|
9836
10031
|
console.log(` ${S.label("Instance:")} ${instanceId2}`);
|
|
@@ -9853,13 +10048,13 @@ async function printCompositionDryRun(projectDir, agentDir, driver, model, insta
|
|
|
9853
10048
|
}
|
|
9854
10049
|
async function findSkillFile(projectDir, skill) {
|
|
9855
10050
|
const name = skill.trim().replace(/^skill:/, "").replace(/^@[^/]+\//, "").replace(/#.*$/, "");
|
|
9856
|
-
for (const target of
|
|
10051
|
+
for (const target of SUPPORTED_HARNESSES) {
|
|
9857
10052
|
const file = path18__default.join(deployedDir("skill", name, target, false, projectDir), "SKILL.md");
|
|
9858
|
-
if (
|
|
10053
|
+
if (fs8__default.existsSync(file)) return file;
|
|
9859
10054
|
}
|
|
9860
10055
|
const am2 = new AssetManager({ registry: getKindRegistry(), projectDir });
|
|
9861
10056
|
const entry = await am2.info(`skill:${name}`);
|
|
9862
|
-
return entry?.source &&
|
|
10057
|
+
return entry?.source && fs8__default.existsSync(entry.source) ? entry.source : void 0;
|
|
9863
10058
|
}
|
|
9864
10059
|
async function printSkillDryRun(projectDir, skill) {
|
|
9865
10060
|
const file = await findSkillFile(projectDir, skill);
|
|
@@ -9869,7 +10064,7 @@ async function printSkillDryRun(projectDir, skill) {
|
|
|
9869
10064
|
);
|
|
9870
10065
|
return false;
|
|
9871
10066
|
}
|
|
9872
|
-
const content =
|
|
10067
|
+
const content = fs8__default.readFileSync(file, "utf-8");
|
|
9873
10068
|
const { data } = parseFrontmatter(content);
|
|
9874
10069
|
const meta = data.metadata ?? {};
|
|
9875
10070
|
console.log(` ${S.label("Skill:")} ${S.heading(String(data.name ?? skill))}`);
|
|
@@ -9966,11 +10161,11 @@ function isNearFlowId(typed, id) {
|
|
|
9966
10161
|
const b = id.toLowerCase();
|
|
9967
10162
|
return a.length >= 3 && (b.includes(a) || a.includes(b) || editDistance2(a, b) <= 2);
|
|
9968
10163
|
}
|
|
9969
|
-
function
|
|
9970
|
-
return `Harness to run (${
|
|
10164
|
+
function harnessOptionDescription() {
|
|
10165
|
+
return `Harness to run (${listHarnesses().map((d) => d.id).join(", ")})`;
|
|
9971
10166
|
}
|
|
9972
10167
|
function makeRunCommand() {
|
|
9973
|
-
const cmd = new Command("run").description("Start a flow or run a single-shot text prompt").argument("[flow-id-or-text...]", "Flow ID or text prompt").option("--project-dir <path>", "Project directory", process.cwd()).option("--
|
|
10168
|
+
const cmd = new Command("run").description("Start a flow or run a single-shot text prompt").argument("[flow-id-or-text...]", "Flow ID or text prompt").option("--project-dir <path>", "Project directory", process.cwd()).option("--harness <name>", harnessOptionDescription()).addOption(driverAliasOption()).option("--model <name>", "Model override").option("--label <label>", "Human-readable session label").option("--dry-run", "Print plan without executing (single-shot: resolved composition items)").option(
|
|
9974
10169
|
"--agent-definition <ref|path>",
|
|
9975
10170
|
"Agent asset for this one invocation (agent:@pub/name, ai-assets://\u2026, or a directory with agent.yaml); single-shot prompts only"
|
|
9976
10171
|
).option(
|
|
@@ -9979,7 +10174,7 @@ function makeRunCommand() {
|
|
|
9979
10174
|
).option("--skill <name>", "Skill name (for single-shot mode)").action(async (positional, opts) => {
|
|
9980
10175
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
9981
10176
|
await loadDeclaredPlugins(projectDir);
|
|
9982
|
-
const
|
|
10177
|
+
const cliHarness = foldDriverFlag(opts).harness;
|
|
9983
10178
|
const dryRun = opts.dryRun ?? false;
|
|
9984
10179
|
const agentDefinition = opts.agentDefinition?.trim() || void 0;
|
|
9985
10180
|
const instanceId2 = opts.instance?.trim() || void 0;
|
|
@@ -9991,9 +10186,11 @@ function makeRunCommand() {
|
|
|
9991
10186
|
}
|
|
9992
10187
|
let flowId = positional[0];
|
|
9993
10188
|
if (!flowId) {
|
|
9994
|
-
const flows =
|
|
10189
|
+
const flows = discoverProjectFlows(projectDir);
|
|
9995
10190
|
if (flows.length === 0) {
|
|
9996
|
-
logErr(
|
|
10191
|
+
logErr(
|
|
10192
|
+
"No flows available in this project. Add one with `skaile add flow:@<publisher>/<name>`."
|
|
10193
|
+
);
|
|
9997
10194
|
process.exit(1);
|
|
9998
10195
|
}
|
|
9999
10196
|
const selected = await p4.select({
|
|
@@ -10011,12 +10208,17 @@ function makeRunCommand() {
|
|
|
10011
10208
|
flowId = selected;
|
|
10012
10209
|
}
|
|
10013
10210
|
const config = await resolveSettings(projectDir, {
|
|
10014
|
-
|
|
10211
|
+
harness: cliHarness,
|
|
10015
10212
|
model: opts.model
|
|
10016
10213
|
});
|
|
10017
|
-
const
|
|
10214
|
+
const harness = config.harness ?? DEFAULT_HARNESS_ID;
|
|
10018
10215
|
const model = config.model;
|
|
10019
|
-
const
|
|
10216
|
+
const unknownHarness = unknownHarnessMessage(harness);
|
|
10217
|
+
if (unknownHarness) {
|
|
10218
|
+
logErr(unknownHarness);
|
|
10219
|
+
process.exit(1);
|
|
10220
|
+
}
|
|
10221
|
+
const providerRefusal = checkModelProvider(harness, {
|
|
10020
10222
|
registry: loadRegistryView({ projectDir }).merged,
|
|
10021
10223
|
model
|
|
10022
10224
|
});
|
|
@@ -10024,11 +10226,7 @@ function makeRunCommand() {
|
|
|
10024
10226
|
logErr(providerRefusal);
|
|
10025
10227
|
process.exit(1);
|
|
10026
10228
|
}
|
|
10027
|
-
const flowPath =
|
|
10028
|
-
flowId,
|
|
10029
|
-
projectAiAssetsRoots(projectDir),
|
|
10030
|
-
projectDir
|
|
10031
|
-
);
|
|
10229
|
+
const flowPath = findProjectFlowFile(flowId, projectDir);
|
|
10032
10230
|
if (flowPath && agentDefinition) {
|
|
10033
10231
|
logErr(
|
|
10034
10232
|
`--agent-definition cannot be combined with flow "${flowId}": a flow runs on the project's session agent. Drop --agent-definition, or run a single-shot prompt instead.`
|
|
@@ -10046,7 +10244,13 @@ function makeRunCommand() {
|
|
|
10046
10244
|
const promptOnlyOption = agentDefinition !== void 0 || instanceId2 !== void 0 || opts.skill !== void 0;
|
|
10047
10245
|
if (!textPrompt.trim() || positional.length === 1 && !/\s/.test(flowId) && !promptOnlyOption) {
|
|
10048
10246
|
logErr(`Flow not found: ${flowId}`);
|
|
10049
|
-
const
|
|
10247
|
+
const inLibrary = await findLibraryFlow(flowId);
|
|
10248
|
+
if (inLibrary) {
|
|
10249
|
+
console.log(
|
|
10250
|
+
` The library "${inLibrary.library}" has it, but this project does not: run ${S.cmd(`skaile add ${inLibrary.ref}`)} first.`
|
|
10251
|
+
);
|
|
10252
|
+
}
|
|
10253
|
+
const available = discoverProjectFlows(projectDir).map((f) => f.id);
|
|
10050
10254
|
const near = available.filter((id) => isNearFlowId(flowId, id));
|
|
10051
10255
|
const listed = near.length > 0 ? near : available;
|
|
10052
10256
|
if (listed.length > 0) {
|
|
@@ -10062,7 +10266,7 @@ function makeRunCommand() {
|
|
|
10062
10266
|
try {
|
|
10063
10267
|
const agentDir = instanceId2 ? resolveInstanceAgentDir(projectDir, resolveSkWorkspaceConfig(projectDir), instanceId2) : resolveSingleShotAgentDir(projectDir, agentDefinition);
|
|
10064
10268
|
if (dryRun) {
|
|
10065
|
-
await printCompositionDryRun(projectDir, agentDir,
|
|
10269
|
+
await printCompositionDryRun(projectDir, agentDir, harness, model, instanceId2);
|
|
10066
10270
|
if (opts.skill && !await printSkillDryRun(projectDir, opts.skill)) {
|
|
10067
10271
|
process.exit(1);
|
|
10068
10272
|
}
|
|
@@ -10074,7 +10278,7 @@ function makeRunCommand() {
|
|
|
10074
10278
|
projectDir,
|
|
10075
10279
|
...agentDir ? { agentDir } : {},
|
|
10076
10280
|
...instanceId2 ? { instanceId: instanceId2 } : {},
|
|
10077
|
-
|
|
10281
|
+
harness: config.harness,
|
|
10078
10282
|
model: instanceModel ?? config.model,
|
|
10079
10283
|
...instanceModel ? { modelRef: instanceModel } : {},
|
|
10080
10284
|
...overrides.maxTurns !== void 0 ? { maxTurns: overrides.maxTurns } : {},
|
|
@@ -10087,12 +10291,12 @@ function makeRunCommand() {
|
|
|
10087
10291
|
logErr(`${err.code}: ${err.message}`);
|
|
10088
10292
|
process.exit(1);
|
|
10089
10293
|
}
|
|
10090
|
-
const friendly =
|
|
10294
|
+
const friendly = friendlyHarnessError(err);
|
|
10091
10295
|
if (friendly) {
|
|
10092
10296
|
logErr(friendly);
|
|
10093
10297
|
} else {
|
|
10094
10298
|
logErr(err instanceof Error ? err.message : String(err));
|
|
10095
|
-
for (const note of
|
|
10299
|
+
for (const note of harnessErrorNotes(err)) console.error(` ${S.dim(note)}`);
|
|
10096
10300
|
}
|
|
10097
10301
|
process.exit(1);
|
|
10098
10302
|
}
|
|
@@ -10110,7 +10314,7 @@ function makeRunCommand() {
|
|
|
10110
10314
|
console.log();
|
|
10111
10315
|
console.log(` ${S.label("Flow:")} ${S.heading(flow.name)}`);
|
|
10112
10316
|
console.log(` ${S.label("Project dir:")} ${projectDir}`);
|
|
10113
|
-
console.log(` ${S.label("
|
|
10317
|
+
console.log(` ${S.label("Harness:")} ${harness}${model ? S.dim(` / ${model}`) : ""}`);
|
|
10114
10318
|
if (opts.label) console.log(` ${S.label("Label:")} ${opts.label}`);
|
|
10115
10319
|
if (dryRun) console.log(` ${S.warn("(dry run \u2014 no agent will be started)")}`);
|
|
10116
10320
|
console.log();
|
|
@@ -10118,7 +10322,7 @@ function makeRunCommand() {
|
|
|
10118
10322
|
await runFlow({
|
|
10119
10323
|
projectDir,
|
|
10120
10324
|
flowPath,
|
|
10121
|
-
|
|
10325
|
+
harness,
|
|
10122
10326
|
model,
|
|
10123
10327
|
sessionLabel: opts.label,
|
|
10124
10328
|
dryRun,
|
|
@@ -10126,7 +10330,7 @@ function makeRunCommand() {
|
|
|
10126
10330
|
onLog: (line) => console.log(line)
|
|
10127
10331
|
});
|
|
10128
10332
|
} catch (err) {
|
|
10129
|
-
const friendly =
|
|
10333
|
+
const friendly = friendlyHarnessError(err);
|
|
10130
10334
|
logErr(friendly ?? (err instanceof Error ? err.message : String(err)));
|
|
10131
10335
|
process.exit(1);
|
|
10132
10336
|
}
|
|
@@ -10170,7 +10374,7 @@ function makeResumeCommand() {
|
|
|
10170
10374
|
onLog: (line) => console.log(line)
|
|
10171
10375
|
});
|
|
10172
10376
|
} catch (err) {
|
|
10173
|
-
const friendly =
|
|
10377
|
+
const friendly = friendlyHarnessError(err);
|
|
10174
10378
|
logErr(friendly ?? (err instanceof Error ? err.message : String(err)));
|
|
10175
10379
|
process.exit(1);
|
|
10176
10380
|
}
|
|
@@ -10194,7 +10398,7 @@ function makeStatusCommand() {
|
|
|
10194
10398
|
console.log(` ${S.label("Status:")} ${statusColor(session.status ?? "unknown")}`);
|
|
10195
10399
|
if (session.error) console.log(` ${S.label("Error:")} ${session.error}`);
|
|
10196
10400
|
console.log(
|
|
10197
|
-
` ${S.label("
|
|
10401
|
+
` ${S.label("Harness:")} ${session.harness}${session.model ? S.dim(` / ${session.model}`) : ""}`
|
|
10198
10402
|
);
|
|
10199
10403
|
console.log(` ${S.label("Updated:")} ${session.updatedAt} ${S.dim(`(${age}s ago)`)}`);
|
|
10200
10404
|
console.log(
|
|
@@ -10211,19 +10415,19 @@ function makeClearCommand() {
|
|
|
10211
10415
|
});
|
|
10212
10416
|
}
|
|
10213
10417
|
function makeReplCommand() {
|
|
10214
|
-
return new Command("repl").description("Start an interactive agent session").option("--project-dir <path>", "Project directory").option("--
|
|
10418
|
+
return new Command("repl").description("Start an interactive agent session").option("--project-dir <path>", "Project directory").option("--harness <name>", harnessOptionDescription()).addOption(driverAliasOption()).option("--model <name>", "Model override").option("--resume", "Resume last session").option("--resume-session <id>", "Resume specific session").option(
|
|
10215
10419
|
"--instance <id>",
|
|
10216
10420
|
"Run the skaile.yaml `agents:` instance <id> (`default` is the primary `agent:`) with its overrides"
|
|
10217
10421
|
).action(async (opts) => {
|
|
10218
|
-
const { findWorkspaceRoot } = await import('../core/index.js');
|
|
10422
|
+
const { findWorkspaceRoot: findWorkspaceRoot2 } = await import('../core/index.js');
|
|
10219
10423
|
const { startRepl } = await import('../tui/index.js');
|
|
10220
10424
|
const os2 = await import('os');
|
|
10221
10425
|
const userCwd = path18__default.resolve(opts.projectDir ?? process.cwd());
|
|
10222
|
-
const workspaceRoot =
|
|
10426
|
+
const workspaceRoot = findWorkspaceRoot2(userCwd);
|
|
10223
10427
|
const instanceId2 = opts.instance?.trim() || void 0;
|
|
10224
10428
|
let projectDir;
|
|
10225
10429
|
let agentCwd;
|
|
10226
|
-
let
|
|
10430
|
+
let harnessOverride = foldDriverFlag(opts).harness;
|
|
10227
10431
|
if (workspaceRoot) {
|
|
10228
10432
|
projectDir = workspaceRoot;
|
|
10229
10433
|
agentCwd = userCwd;
|
|
@@ -10247,17 +10451,17 @@ function makeReplCommand() {
|
|
|
10247
10451
|
p4.cancel("Cancelled.");
|
|
10248
10452
|
process.exit(0);
|
|
10249
10453
|
}
|
|
10250
|
-
const tmpDir =
|
|
10454
|
+
const tmpDir = fs8__default.mkdtempSync(path18__default.join(os2.tmpdir(), "skaile-repl-"));
|
|
10251
10455
|
projectDir = tmpDir;
|
|
10252
10456
|
agentCwd = userCwd;
|
|
10253
10457
|
logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
|
|
10254
|
-
if (!
|
|
10458
|
+
if (!harnessOverride) {
|
|
10255
10459
|
const claudeDir = path18__default.join(os2.homedir(), ".claude");
|
|
10256
|
-
if (
|
|
10257
|
-
|
|
10460
|
+
if (fs8__default.existsSync(claudeDir)) {
|
|
10461
|
+
harnessOverride = "claude-sdk";
|
|
10258
10462
|
logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} harness`);
|
|
10259
10463
|
} else {
|
|
10260
|
-
|
|
10464
|
+
harnessOverride = "omp";
|
|
10261
10465
|
logInfo(`Using ${S.cmd("omp")} harness`);
|
|
10262
10466
|
}
|
|
10263
10467
|
}
|
|
@@ -10265,7 +10469,7 @@ function makeReplCommand() {
|
|
|
10265
10469
|
}
|
|
10266
10470
|
await loadDeclaredPlugins(projectDir);
|
|
10267
10471
|
const effective = await resolveSettings(projectDir, {
|
|
10268
|
-
|
|
10472
|
+
harness: harnessOverride,
|
|
10269
10473
|
model: opts.model
|
|
10270
10474
|
});
|
|
10271
10475
|
let effectiveModel = effective.model;
|
|
@@ -10275,7 +10479,7 @@ function makeReplCommand() {
|
|
|
10275
10479
|
} catch {
|
|
10276
10480
|
}
|
|
10277
10481
|
}
|
|
10278
|
-
const providerRefusal = checkModelProvider(effective.
|
|
10482
|
+
const providerRefusal = checkModelProvider(effective.harness ?? DEFAULT_HARNESS_ID, {
|
|
10279
10483
|
registry: loadRegistryView({ projectDir }).merged,
|
|
10280
10484
|
model: effectiveModel
|
|
10281
10485
|
});
|
|
@@ -10287,14 +10491,14 @@ function makeReplCommand() {
|
|
|
10287
10491
|
await startRepl({
|
|
10288
10492
|
projectDir,
|
|
10289
10493
|
cwd: agentCwd !== projectDir ? agentCwd : void 0,
|
|
10290
|
-
|
|
10494
|
+
harness: harnessOverride,
|
|
10291
10495
|
model: opts.model,
|
|
10292
10496
|
resume: opts.resume,
|
|
10293
10497
|
resumeSessionId: opts.resumeSession,
|
|
10294
10498
|
...instanceId2 ? { instanceId: instanceId2 } : {}
|
|
10295
10499
|
});
|
|
10296
10500
|
} catch (err) {
|
|
10297
|
-
logErr(
|
|
10501
|
+
logErr(friendlyHarnessError(err) ?? (err instanceof Error ? err.message : String(err)));
|
|
10298
10502
|
process.exit(1);
|
|
10299
10503
|
}
|
|
10300
10504
|
});
|
|
@@ -10351,12 +10555,12 @@ function makeServeCommand() {
|
|
|
10351
10555
|
).option("--project-dir <path>", "Project directory", process.cwd()).option(
|
|
10352
10556
|
"--managed-codex-config <path>",
|
|
10353
10557
|
"Explicit private host configuration for managed Codex"
|
|
10354
|
-
).option("--
|
|
10558
|
+
).option("--harness <name>", "Override harness").addOption(driverAliasOption()).option("--model <name>", "Override model").option("--provider <name>", "Override provider").option(
|
|
10355
10559
|
"--session-id <id>",
|
|
10356
10560
|
"Label for the session; does not restore the conversation (use --resume-session-id)"
|
|
10357
10561
|
).option(
|
|
10358
10562
|
"--resume-session-id <id>",
|
|
10359
|
-
"
|
|
10563
|
+
"harnessSessionId of an earlier session (from its session_info event); restores that conversation"
|
|
10360
10564
|
).option(
|
|
10361
10565
|
"--providers <ids>",
|
|
10362
10566
|
"Restrict the AI provider registry to these entry ids (comma-separated)"
|
|
@@ -10367,7 +10571,8 @@ function makeServeCommand() {
|
|
|
10367
10571
|
"--with-codex",
|
|
10368
10572
|
"Include the Codex harness in the compiled binary (used with --compile-test)"
|
|
10369
10573
|
).action(
|
|
10370
|
-
async (
|
|
10574
|
+
async (rawOpts) => {
|
|
10575
|
+
const opts = foldDriverFlag(rawOpts);
|
|
10371
10576
|
if (opts.compileTest && opts.managedCodexConfig)
|
|
10372
10577
|
throw new Error("Managed Codex configuration is unsupported with --compile-test");
|
|
10373
10578
|
if (opts.compileTest) {
|
|
@@ -10392,7 +10597,18 @@ function makeServeCommand() {
|
|
|
10392
10597
|
process.exitCode = 1;
|
|
10393
10598
|
return;
|
|
10394
10599
|
}
|
|
10395
|
-
|
|
10600
|
+
let managedCodex;
|
|
10601
|
+
if (opts.managedCodexConfig) {
|
|
10602
|
+
try {
|
|
10603
|
+
managedCodex = loadManagedCodexHostConfig(opts.managedCodexConfig, opts.projectDir);
|
|
10604
|
+
} catch {
|
|
10605
|
+
logErr(
|
|
10606
|
+
`--managed-codex-config: '${opts.managedCodexConfig}' is missing or invalid. Give the absolute path of a private host configuration file (readable by its owner only, outside the project).`
|
|
10607
|
+
);
|
|
10608
|
+
process.exitCode = 1;
|
|
10609
|
+
return;
|
|
10610
|
+
}
|
|
10611
|
+
}
|
|
10396
10612
|
if (managedCodex) {
|
|
10397
10613
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
10398
10614
|
if (resolveSkWorkspaceConfig2(opts.projectDir).plugins?.length)
|
|
@@ -10402,10 +10618,10 @@ function makeServeCommand() {
|
|
|
10402
10618
|
}
|
|
10403
10619
|
const providers = parseProviderIds(opts.providers);
|
|
10404
10620
|
const modelEndpoint = parseModelEndpointFlag(opts.modelEndpoint);
|
|
10405
|
-
const {
|
|
10406
|
-
const
|
|
10407
|
-
if (
|
|
10408
|
-
logErr(
|
|
10621
|
+
const { checkHarnessSdk, checkModelEndpointPeer, checkServeModel } = await import('../serve-preflight-L4POEHNQ.js');
|
|
10622
|
+
const harnessProblem = managedCodex ? null : await checkHarnessSdk(opts.projectDir, opts.harness);
|
|
10623
|
+
if (harnessProblem) {
|
|
10624
|
+
logErr(harnessProblem);
|
|
10409
10625
|
process.exitCode = 1;
|
|
10410
10626
|
return;
|
|
10411
10627
|
}
|
|
@@ -10415,6 +10631,16 @@ function makeServeCommand() {
|
|
|
10415
10631
|
process.exitCode = 1;
|
|
10416
10632
|
return;
|
|
10417
10633
|
}
|
|
10634
|
+
const modelProblem = managedCodex ? null : await checkServeModel(opts.projectDir, {
|
|
10635
|
+
harness: opts.harness,
|
|
10636
|
+
model: opts.model,
|
|
10637
|
+
providers
|
|
10638
|
+
});
|
|
10639
|
+
if (modelProblem) {
|
|
10640
|
+
logErr(modelProblem);
|
|
10641
|
+
process.exitCode = 1;
|
|
10642
|
+
return;
|
|
10643
|
+
}
|
|
10418
10644
|
try {
|
|
10419
10645
|
await startAgentServer({
|
|
10420
10646
|
port,
|
|
@@ -10435,7 +10661,7 @@ function makeServeCommand() {
|
|
|
10435
10661
|
// `nix` deploy targets set it for children meant to outlive them.
|
|
10436
10662
|
exitOnBrokenPipe: process.env.SKAILE_SERVE_EXIT_ON_BROKEN_STDOUT !== "0",
|
|
10437
10663
|
projectDir: opts.projectDir,
|
|
10438
|
-
|
|
10664
|
+
harness: opts.harness,
|
|
10439
10665
|
model: opts.model,
|
|
10440
10666
|
provider: opts.provider,
|
|
10441
10667
|
sessionId: opts.sessionId,
|
|
@@ -10453,12 +10679,12 @@ function makeServeCommand() {
|
|
|
10453
10679
|
);
|
|
10454
10680
|
}
|
|
10455
10681
|
async function ensurePluginsLoadedForServe(projectDir) {
|
|
10456
|
-
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-
|
|
10682
|
+
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-DE53KG3E.js');
|
|
10457
10683
|
try {
|
|
10458
10684
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
10459
10685
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
10460
10686
|
if (!config.plugins || config.plugins.length === 0) return;
|
|
10461
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
10687
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-MSH6GK6T.js');
|
|
10462
10688
|
const { pluginRegistry } = await import('../plugin-registry/index.js');
|
|
10463
10689
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
10464
10690
|
if (result.loaded.length > 0) {
|
|
@@ -10472,14 +10698,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
|
|
|
10472
10698
|
}
|
|
10473
10699
|
}
|
|
10474
10700
|
async function runCompileTest(opts) {
|
|
10475
|
-
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-
|
|
10701
|
+
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-DE53KG3E.js');
|
|
10476
10702
|
const { tmpdir } = await import('os');
|
|
10477
10703
|
const { dirname: dirname3, join: join6, resolve: resolve4 } = await import('path');
|
|
10478
10704
|
const { fileURLToPath: fileURLToPath2 } = await import('url');
|
|
10479
10705
|
const { unlinkSync, existsSync: existsSync22 } = await import('fs');
|
|
10480
10706
|
const { spawn } = await import('child_process');
|
|
10481
10707
|
const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
|
|
10482
|
-
const { MONOREPO_ROOT } = await import('../paths-
|
|
10708
|
+
const { MONOREPO_ROOT } = await import('../paths-QAV4C3KX.js');
|
|
10483
10709
|
if (MONOREPO_ROOT === null) {
|
|
10484
10710
|
logErr2("--compile-test is only available inside the skaile-dev workspace.");
|
|
10485
10711
|
logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
|
|
@@ -10523,7 +10749,7 @@ async function runCompileTest(opts) {
|
|
|
10523
10749
|
}
|
|
10524
10750
|
logOk2(`Binary built (${S2.dim(outfile)})`);
|
|
10525
10751
|
const serveArgs = [outfile, "serve", "--port", opts.port, "--project-dir", opts.projectDir];
|
|
10526
|
-
if (opts.
|
|
10752
|
+
if (opts.harness) serveArgs.push("--harness", opts.harness);
|
|
10527
10753
|
if (opts.model) serveArgs.push("--model", opts.model);
|
|
10528
10754
|
if (opts.provider) serveArgs.push("--provider", opts.provider);
|
|
10529
10755
|
if (opts.sessionId) serveArgs.push("--session-id", opts.sessionId);
|
|
@@ -11292,12 +11518,12 @@ async function showAsset(am2, kind, name) {
|
|
|
11292
11518
|
logErr(err instanceof Error ? err.message : String(err));
|
|
11293
11519
|
process.exit(1);
|
|
11294
11520
|
}
|
|
11295
|
-
if (entry?.source &&
|
|
11521
|
+
if (entry?.source && fs8__default.existsSync(entry.source)) {
|
|
11296
11522
|
console.log();
|
|
11297
11523
|
console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
|
|
11298
11524
|
console.log(` ${S.rule(40)}`);
|
|
11299
11525
|
console.log();
|
|
11300
|
-
console.log(
|
|
11526
|
+
console.log(fs8__default.readFileSync(entry.source, "utf-8"));
|
|
11301
11527
|
return;
|
|
11302
11528
|
}
|
|
11303
11529
|
logErr(`Asset not found: ${kind}:${name}`);
|
|
@@ -11309,7 +11535,7 @@ function makeShowCommand() {
|
|
|
11309
11535
|
const am2 = new AssetManager({
|
|
11310
11536
|
registry: getKindRegistry(),
|
|
11311
11537
|
projectDir: path18__default.resolve(opts.projectDir),
|
|
11312
|
-
|
|
11538
|
+
harness: opts.target
|
|
11313
11539
|
});
|
|
11314
11540
|
if (!kind) {
|
|
11315
11541
|
showOverview(am2);
|
|
@@ -11418,8 +11644,8 @@ function makeStoreCommand() {
|
|
|
11418
11644
|
"--all",
|
|
11419
11645
|
`List every match (default: ${STORE_ROW_LIMIT} rows, only what \`skaile add\` can install)`
|
|
11420
11646
|
).option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
|
|
11421
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
11422
|
-
const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-
|
|
11647
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-RJGJIW5H.js');
|
|
11648
|
+
const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-3QS3J7KO.js');
|
|
11423
11649
|
const projectDir = path18__default.resolve(opts.projectDir);
|
|
11424
11650
|
if (opts.kind && !getKnownKinds2().has(opts.kind)) {
|
|
11425
11651
|
logErr(
|
|
@@ -11477,8 +11703,8 @@ function makeStoreCommand() {
|
|
|
11477
11703
|
}
|
|
11478
11704
|
});
|
|
11479
11705
|
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) => {
|
|
11480
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-
|
|
11481
|
-
const { supportsInstallManifest: supportsInstallManifest2 } = await import('../project-
|
|
11706
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-RJGJIW5H.js');
|
|
11707
|
+
const { supportsInstallManifest: supportsInstallManifest2 } = await import('../project-HZW2MZPA.js');
|
|
11482
11708
|
try {
|
|
11483
11709
|
parseAssetRef(ref);
|
|
11484
11710
|
} catch (e) {
|
|
@@ -11740,6 +11966,7 @@ function makeUpdateCommand() {
|
|
|
11740
11966
|
reportReplaced(result.replaced);
|
|
11741
11967
|
reportRelocked(result.relocked);
|
|
11742
11968
|
reportMoved(result.moved);
|
|
11969
|
+
await pinComposedAgents(projectDir);
|
|
11743
11970
|
const changed = result.deployed.length > 0 || result.removed.length > 0 || !!result.replaced?.length || !!result.moved?.length || !!result.relocked?.length;
|
|
11744
11971
|
if (result.lockWritten) {
|
|
11745
11972
|
logInfo(`Lock file written: ${S.dim("skaile.lock.yaml")}`);
|
|
@@ -11871,6 +12098,7 @@ async function updateOne(am2, projectDir, target) {
|
|
|
11871
12098
|
return;
|
|
11872
12099
|
}
|
|
11873
12100
|
spinner.stop(process.exitCode === 1 ? "Failed" : "Done");
|
|
12101
|
+
await pinComposedAgents(projectDir);
|
|
11874
12102
|
for (const d of deployed) logOk(`Updated ${d}`);
|
|
11875
12103
|
if (deployed.length > 0) return;
|
|
11876
12104
|
if (readText2(lockPath) !== before) logInfo(`Re-locked ${target.ref}`);
|
|
@@ -12178,8 +12406,8 @@ Execution:
|
|
|
12178
12406
|
resume Resume last session
|
|
12179
12407
|
serve [--compile-test] Start WebSocket agent server
|
|
12180
12408
|
mcp-server Start workspace MCP server (for .mcp.json)
|
|
12181
|
-
integration install [--
|
|
12182
|
-
integration uninstall [--
|
|
12409
|
+
integration install [--harness all] Install agent integration (claude-code | omp | codex)
|
|
12410
|
+
integration uninstall [--harness all] Uninstall agent integration
|
|
12183
12411
|
integration enable Enable integration (claude-code only)
|
|
12184
12412
|
integration disable Disable integration (claude-code only)
|
|
12185
12413
|
integration status Show install / enable state across harnesses
|
|
@@ -12243,10 +12471,10 @@ Advanced:
|
|
|
12243
12471
|
`;
|
|
12244
12472
|
}
|
|
12245
12473
|
});
|
|
12246
|
-
var
|
|
12247
|
-
"claude-code": {
|
|
12248
|
-
omp: {
|
|
12249
|
-
codex: {
|
|
12474
|
+
var INIT_HARNESS_DEFAULTS = {
|
|
12475
|
+
"claude-code": { harness: "claude-sdk" },
|
|
12476
|
+
omp: { harness: "omp" },
|
|
12477
|
+
codex: { harness: "codex" }
|
|
12250
12478
|
};
|
|
12251
12479
|
program.command("init [project-dir]").description("Initialize a project directory (defaults to current directory)").option("--harness <name>", "Coding-agent harness (claude-code | omp | codex)", "claude-code").option("--no-git", "Skip git init and .gitignore").action(
|
|
12252
12480
|
(projectDir, opts) => runInit(projectDir, opts)
|
|
@@ -12254,10 +12482,10 @@ program.command("init [project-dir]").description("Initialize a project director
|
|
|
12254
12482
|
async function runInit(projectDir, opts) {
|
|
12255
12483
|
const { mkdirSync: mkdirSync5, writeFileSync: writeFileSync7 } = await import('fs');
|
|
12256
12484
|
const { stringify: stringify2 } = await import('yaml');
|
|
12257
|
-
const {
|
|
12485
|
+
const { HARNESS_TARGETS: HARNESS_TARGETS2, SUPPORTED_HARNESSES: SUPPORTED_HARNESSES2 } = await import('../core/index.js');
|
|
12258
12486
|
const harness = opts.harness;
|
|
12259
|
-
if (!
|
|
12260
|
-
logErr(`Unknown harness "${opts.harness}". Supported: ${
|
|
12487
|
+
if (!SUPPORTED_HARNESSES2.includes(harness)) {
|
|
12488
|
+
logErr(`Unknown harness "${opts.harness}". Supported: ${SUPPORTED_HARNESSES2.join(", ")}`);
|
|
12261
12489
|
process.exitCode = 1;
|
|
12262
12490
|
return;
|
|
12263
12491
|
}
|
|
@@ -12284,7 +12512,7 @@ async function runInit(projectDir, opts) {
|
|
|
12284
12512
|
writeFileSync7(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
|
|
12285
12513
|
created.push("skaile.yaml");
|
|
12286
12514
|
}
|
|
12287
|
-
for (const dir of new Set(Object.values(
|
|
12515
|
+
for (const dir of new Set(Object.values(HARNESS_TARGETS2[harness].local))) {
|
|
12288
12516
|
const full = path18__default.join(resolved, dir);
|
|
12289
12517
|
if (!existsSync22(full)) {
|
|
12290
12518
|
mkdirSync5(full, { recursive: true });
|
|
@@ -12299,7 +12527,7 @@ async function runInit(projectDir, opts) {
|
|
|
12299
12527
|
printInitSummary(resolved, projectDir, created);
|
|
12300
12528
|
}
|
|
12301
12529
|
function buildInitWorkspaceConfig(projectName, harness) {
|
|
12302
|
-
const harnessDefaults =
|
|
12530
|
+
const harnessDefaults = INIT_HARNESS_DEFAULTS[harness];
|
|
12303
12531
|
return {
|
|
12304
12532
|
name: projectName,
|
|
12305
12533
|
description: `${projectName} AI skill dependencies`,
|
|
@@ -12308,7 +12536,7 @@ function buildInitWorkspaceConfig(projectName, harness) {
|
|
|
12308
12536
|
agent: harness,
|
|
12309
12537
|
// model is omitted unless a harness fixes it (none do today).
|
|
12310
12538
|
...harnessDefaults.model ? { model: harnessDefaults.model } : {},
|
|
12311
|
-
|
|
12539
|
+
harness: harnessDefaults.harness,
|
|
12312
12540
|
max_turns: 200
|
|
12313
12541
|
}
|
|
12314
12542
|
}
|
|
@@ -12345,6 +12573,9 @@ async function initGitScaffold(resolved, created) {
|
|
|
12345
12573
|
// extension: it is committed, so it is not listed here.
|
|
12346
12574
|
".codex/config.toml",
|
|
12347
12575
|
".skaile/plugin-state.json",
|
|
12576
|
+
// `.mcp.json` and `.skaile/assets/` are committed on purpose, so they are not listed: the
|
|
12577
|
+
// entries use `.` for the project root and secrets are only `${NAME}` references, so the
|
|
12578
|
+
// files read the same in every clone (p1294).
|
|
12348
12579
|
"*.log",
|
|
12349
12580
|
".env",
|
|
12350
12581
|
".env.local"
|
|
@@ -12370,10 +12601,10 @@ async function initGitScaffold(resolved, created) {
|
|
|
12370
12601
|
}
|
|
12371
12602
|
async function bootstrapUserConfig() {
|
|
12372
12603
|
try {
|
|
12373
|
-
const
|
|
12604
|
+
const fs11 = await import('fs');
|
|
12374
12605
|
const { userConfigPath: userConfigPath3, saveConfig, getConfigDefaults } = await import('../library/index.js');
|
|
12375
12606
|
const userCfgPath = userConfigPath3();
|
|
12376
|
-
if (!
|
|
12607
|
+
if (!fs11.existsSync(userCfgPath)) {
|
|
12377
12608
|
const defaults = getConfigDefaults();
|
|
12378
12609
|
saveConfig(userCfgPath, {
|
|
12379
12610
|
catalog: { url: defaults.catalog.url, cache_ttl: defaults.catalog.cache_ttl }
|
|
@@ -12388,7 +12619,7 @@ async function bootstrapUserConfig() {
|
|
|
12388
12619
|
}
|
|
12389
12620
|
async function hydrateInitSources(resolved, created) {
|
|
12390
12621
|
try {
|
|
12391
|
-
const { ensureSourcesCloned } = await import('../ensure-sources-
|
|
12622
|
+
const { ensureSourcesCloned } = await import('../ensure-sources-UPTHZKGF.js');
|
|
12392
12623
|
const hydrate = ensureSourcesCloned(resolved, { quiet: true });
|
|
12393
12624
|
for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
|
|
12394
12625
|
if (hydrate.failed.length > 0) {
|
|
@@ -12428,7 +12659,7 @@ function printInitSummary(resolved, projectDir, created) {
|
|
|
12428
12659
|
console.log();
|
|
12429
12660
|
}
|
|
12430
12661
|
program.command("setup").description("Interactive provider setup wizard").action(async () => {
|
|
12431
|
-
const { cmdSetup } = await import('../setup-
|
|
12662
|
+
const { cmdSetup } = await import('../setup-AGYB4PKR.js');
|
|
12432
12663
|
await cmdSetup([], { projectDir: process.cwd() });
|
|
12433
12664
|
});
|
|
12434
12665
|
program.addCommand(makeInstallCommand());
|
|
@@ -12502,6 +12733,20 @@ program.command("path").description("Show resolved paths (honours SKAILE_HOME an
|
|
|
12502
12733
|
console.log();
|
|
12503
12734
|
});
|
|
12504
12735
|
program.addCommand(makeCompleteCommand(program));
|
|
12736
|
+
program.hook("postAction", async (_thisCommand, actionCommand) => {
|
|
12737
|
+
if (actionCommand.parent !== program) return;
|
|
12738
|
+
if (!["add", "remove", "install", "update"].includes(actionCommand.name())) return;
|
|
12739
|
+
const opts = actionCommand.opts();
|
|
12740
|
+
if (opts.global || opts.dryRun) return;
|
|
12741
|
+
const projectDir = path18__default.resolve(opts.projectDir ?? process.cwd());
|
|
12742
|
+
const { refreshPluginSkills } = await import('../claude-code-VJGYBXQR.js');
|
|
12743
|
+
try {
|
|
12744
|
+
if (await refreshPluginSkills(projectDir)) {
|
|
12745
|
+
logInfo(`Updated ${S.cmd(".claude/plugins/skaile/skills")} (the --full plugin copy)`);
|
|
12746
|
+
}
|
|
12747
|
+
} catch {
|
|
12748
|
+
}
|
|
12749
|
+
});
|
|
12505
12750
|
process.stdout.on("error", (err) => {
|
|
12506
12751
|
if (err.code === "EPIPE") process.exit(0);
|
|
12507
12752
|
throw err;
|
|
@@ -12521,7 +12766,7 @@ try {
|
|
|
12521
12766
|
process.exit(1);
|
|
12522
12767
|
}
|
|
12523
12768
|
const { LibrarySyncError } = await import('../library/index.js');
|
|
12524
|
-
if (!(err instanceof LibrarySyncError || err instanceof LibraryEntryError || err instanceof SourceEntryError))
|
|
12769
|
+
if (!(err instanceof LibrarySyncError || err instanceof LibraryEntryError || err instanceof SourceEntryError || err instanceof LegacyKeyError))
|
|
12525
12770
|
throw err;
|
|
12526
12771
|
logErr(err.message);
|
|
12527
12772
|
process.exit(1);
|