@skaile/workspaces 6.9.1 → 6.10.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 +24 -0
- package/dist/ai-sdk.js +8 -8
- package/dist/{asset-feeds-PANNQPEE.js → asset-feeds-UG3PG423.js} +22 -22
- package/dist/{asset-feeds-PANNQPEE.js.map → asset-feeds-UG3PG423.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +8 -8
- package/dist/asset-manager/history.js +8 -8
- package/dist/asset-manager/index.js +14 -14
- package/dist/asset-manager/installer.js +9 -9
- package/dist/asset-manager/renderers.js +8 -8
- package/dist/asset-manager/src/harness-switch-state.d.ts +30 -0
- package/dist/asset-manager/src/harness-switch-state.d.ts.map +1 -0
- package/dist/asset-manager/src/index.d.ts +49 -12
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/mcp-config.d.ts +6 -0
- package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
- package/dist/bridge/codex-app-server.js +1 -2
- package/dist/bridge/harnesses/claude-sdk.js +11 -11
- package/dist/bridge/harnesses/codex.js +15 -1926
- package/dist/bridge/harnesses/codex.js.map +1 -1
- package/dist/bridge/harnesses/continue.js +11 -11
- package/dist/bridge/harnesses/echo.js +3 -3
- package/dist/bridge/harnesses/gemini.js +6 -6
- package/dist/bridge/harnesses/goose.js +11 -11
- package/dist/bridge/harnesses/omp.js +26 -9
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +11 -11
- package/dist/bridge/harnesses/qwen.js +6 -6
- package/dist/bridge/index.js +17 -16
- package/dist/bridge/src/harness-model-check.d.ts +5 -4
- package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/codex.d.ts +13 -0
- package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/omp.d.ts +11 -0
- package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
- package/dist/bridge/src/index.d.ts +1 -0
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/{chunk-SME3PK4L.js → chunk-2D6HZAO5.js} +8 -8
- package/dist/{chunk-SME3PK4L.js.map → chunk-2D6HZAO5.js.map} +1 -1
- package/dist/chunk-2MUUPRIG.js +688 -0
- package/dist/chunk-2MUUPRIG.js.map +1 -0
- package/dist/{chunk-TMQFOJ6F.js → chunk-2PVYDAFN.js} +3 -3
- package/dist/{chunk-TMQFOJ6F.js.map → chunk-2PVYDAFN.js.map} +1 -1
- package/dist/{chunk-S47KU4YB.js → chunk-2U67XYZM.js} +3 -3
- package/dist/{chunk-S47KU4YB.js.map → chunk-2U67XYZM.js.map} +1 -1
- package/dist/{chunk-PLVM6OIV.js → chunk-375HN3FD.js} +18 -14
- package/dist/chunk-375HN3FD.js.map +1 -0
- package/dist/{chunk-VEIWFS7Z.js → chunk-4I4SBOCS.js} +345 -88
- package/dist/chunk-4I4SBOCS.js.map +1 -0
- package/dist/{chunk-PBEDRYHP.js → chunk-4Z4RULWQ.js} +48 -28
- package/dist/{chunk-PBEDRYHP.js.map → chunk-4Z4RULWQ.js.map} +1 -1
- package/dist/{chunk-MPO5CQUZ.js → chunk-5JBMYZNA.js} +3 -3
- package/dist/{chunk-MPO5CQUZ.js.map → chunk-5JBMYZNA.js.map} +1 -1
- package/dist/{chunk-EMSU6L7K.js → chunk-5KQFR4D7.js} +6 -6
- package/dist/{chunk-EMSU6L7K.js.map → chunk-5KQFR4D7.js.map} +1 -1
- package/dist/{chunk-KNY356I3.js → chunk-5KSGZP3E.js} +11 -4
- package/dist/chunk-5KSGZP3E.js.map +1 -0
- package/dist/{chunk-IISEBVMA.js → chunk-5P7LTPBR.js} +5 -5
- package/dist/{chunk-IISEBVMA.js.map → chunk-5P7LTPBR.js.map} +1 -1
- package/dist/{chunk-2UKNI2HJ.js → chunk-6O7VDKX3.js} +2 -2
- package/dist/{chunk-2UKNI2HJ.js.map → chunk-6O7VDKX3.js.map} +1 -1
- package/dist/{chunk-FZTHL6SK.js → chunk-7DUOKE73.js} +27 -33
- package/dist/chunk-7DUOKE73.js.map +1 -0
- package/dist/{chunk-V5KG6CCV.js → chunk-7HRZACI4.js} +7 -2
- package/dist/chunk-7HRZACI4.js.map +1 -0
- package/dist/{chunk-U3FI4DVT.js → chunk-7K73MCI6.js} +7 -5
- package/dist/chunk-7K73MCI6.js.map +1 -0
- package/dist/{chunk-BDAXHJC5.js → chunk-BCID52M5.js} +6 -6
- package/dist/{chunk-BDAXHJC5.js.map → chunk-BCID52M5.js.map} +1 -1
- package/dist/{chunk-FZO64PLQ.js → chunk-BNLXZXZN.js} +81 -8
- package/dist/chunk-BNLXZXZN.js.map +1 -0
- package/dist/{chunk-ZUROGXJM.js → chunk-C5UKYTTD.js} +13 -23
- package/dist/chunk-C5UKYTTD.js.map +1 -0
- package/dist/{chunk-LYVLDGML.js → chunk-CG63XGVV.js} +3 -3
- package/dist/{chunk-LYVLDGML.js.map → chunk-CG63XGVV.js.map} +1 -1
- package/dist/{chunk-4ROXSQEG.js → chunk-CJO3XKO7.js} +4 -4
- package/dist/{chunk-4ROXSQEG.js.map → chunk-CJO3XKO7.js.map} +1 -1
- package/dist/{chunk-OSABUEWA.js → chunk-CVUMZTNO.js} +4 -4
- package/dist/{chunk-OSABUEWA.js.map → chunk-CVUMZTNO.js.map} +1 -1
- package/dist/{chunk-E675QKFG.js → chunk-DOMRBOJZ.js} +5 -5
- package/dist/{chunk-E675QKFG.js.map → chunk-DOMRBOJZ.js.map} +1 -1
- package/dist/{chunk-GTAHU4N4.js → chunk-EB2LKPI6.js} +4 -4
- package/dist/{chunk-GTAHU4N4.js.map → chunk-EB2LKPI6.js.map} +1 -1
- package/dist/{chunk-GZL6RN4Z.js → chunk-FXBKBOI5.js} +169 -49
- package/dist/chunk-FXBKBOI5.js.map +1 -0
- package/dist/{chunk-J45JCYS4.js → chunk-GA4GUDTL.js} +4 -4
- package/dist/{chunk-J45JCYS4.js.map → chunk-GA4GUDTL.js.map} +1 -1
- package/dist/{chunk-RZRJTCP2.js → chunk-HE3TZYNG.js} +4 -4
- package/dist/{chunk-RZRJTCP2.js.map → chunk-HE3TZYNG.js.map} +1 -1
- package/dist/chunk-HLFLET7S.js +2443 -0
- package/dist/chunk-HLFLET7S.js.map +1 -0
- package/dist/{chunk-WEPTGUR4.js → chunk-HQUF6O4B.js} +27 -56
- package/dist/chunk-HQUF6O4B.js.map +1 -0
- package/dist/{chunk-QIV7H3GJ.js → chunk-IMO4EHND.js} +5 -5
- package/dist/{chunk-QIV7H3GJ.js.map → chunk-IMO4EHND.js.map} +1 -1
- package/dist/{chunk-TUOHA6BM.js → chunk-IOXFT5D7.js} +3 -3
- package/dist/{chunk-TUOHA6BM.js.map → chunk-IOXFT5D7.js.map} +1 -1
- package/dist/{chunk-CPMLMNI5.js → chunk-JDZUQFN7.js} +4 -4
- package/dist/{chunk-CPMLMNI5.js.map → chunk-JDZUQFN7.js.map} +1 -1
- package/dist/{chunk-7TF5MNFK.js → chunk-KE5HDORU.js} +2 -2
- package/dist/{chunk-7TF5MNFK.js.map → chunk-KE5HDORU.js.map} +1 -1
- package/dist/{chunk-PTJTOPE5.js → chunk-KOI7QFDH.js} +3 -3
- package/dist/{chunk-PTJTOPE5.js.map → chunk-KOI7QFDH.js.map} +1 -1
- package/dist/{chunk-NDBHEOIA.js → chunk-KRL53RZB.js} +8 -8
- package/dist/{chunk-NDBHEOIA.js.map → chunk-KRL53RZB.js.map} +1 -1
- package/dist/{chunk-7QYBKUAS.js → chunk-LKBRBVVS.js} +3 -3
- package/dist/{chunk-7QYBKUAS.js.map → chunk-LKBRBVVS.js.map} +1 -1
- package/dist/{chunk-USSP43U3.js → chunk-LQWOU7S2.js} +3 -3
- package/dist/{chunk-USSP43U3.js.map → chunk-LQWOU7S2.js.map} +1 -1
- package/dist/{chunk-4KPQ6ILH.js → chunk-MEU2HHGV.js} +18 -9
- package/dist/chunk-MEU2HHGV.js.map +1 -0
- package/dist/{chunk-QC5BYUED.js → chunk-MS2IXLTC.js} +4 -4
- package/dist/{chunk-QC5BYUED.js.map → chunk-MS2IXLTC.js.map} +1 -1
- package/dist/{chunk-Q5SSRVD5.js → chunk-NCJSYU6A.js} +16 -14
- package/dist/chunk-NCJSYU6A.js.map +1 -0
- package/dist/{chunk-5J6N6LHL.js → chunk-NFFBYG2W.js} +3 -3
- package/dist/{chunk-5J6N6LHL.js.map → chunk-NFFBYG2W.js.map} +1 -1
- package/dist/{chunk-7UCPGQCW.js → chunk-NTFP2XF4.js} +10 -10
- package/dist/chunk-NTFP2XF4.js.map +1 -0
- package/dist/{chunk-KVTV4LT2.js → chunk-PSPFWTJI.js} +4 -4
- package/dist/{chunk-KVTV4LT2.js.map → chunk-PSPFWTJI.js.map} +1 -1
- package/dist/{chunk-YPTDPN2B.js → chunk-PTXQMTCG.js} +3 -3
- package/dist/{chunk-YPTDPN2B.js.map → chunk-PTXQMTCG.js.map} +1 -1
- package/dist/{chunk-X5SGUBUV.js → chunk-QBJQ426X.js} +3 -3
- package/dist/{chunk-X5SGUBUV.js.map → chunk-QBJQ426X.js.map} +1 -1
- package/dist/{chunk-QBUJTVMY.js → chunk-R3ZNAPBV.js} +3 -3
- package/dist/{chunk-QBUJTVMY.js.map → chunk-R3ZNAPBV.js.map} +1 -1
- package/dist/{chunk-RP3ML3QD.js → chunk-RTFH2QR2.js} +3 -3
- package/dist/{chunk-RP3ML3QD.js.map → chunk-RTFH2QR2.js.map} +1 -1
- package/dist/{chunk-5KWQMCH7.js → chunk-RZ5R6GDJ.js} +5 -5
- package/dist/{chunk-5KWQMCH7.js.map → chunk-RZ5R6GDJ.js.map} +1 -1
- package/dist/{chunk-MDCI4RSG.js → chunk-RZL4TOK3.js} +20 -6
- package/dist/chunk-RZL4TOK3.js.map +1 -0
- package/dist/{chunk-LMADWO4Q.js → chunk-SBAUZ7XH.js} +4 -4
- package/dist/{chunk-LMADWO4Q.js.map → chunk-SBAUZ7XH.js.map} +1 -1
- package/dist/{chunk-AQTAULXT.js → chunk-SKG6G4HO.js} +108 -44
- package/dist/chunk-SKG6G4HO.js.map +1 -0
- package/dist/{chunk-HQAPUPBE.js → chunk-V2VDTQ7A.js} +3 -3
- package/dist/{chunk-HQAPUPBE.js.map → chunk-V2VDTQ7A.js.map} +1 -1
- package/dist/{chunk-GNUA7XT2.js → chunk-VS6XC5JE.js} +3 -3
- package/dist/{chunk-GNUA7XT2.js.map → chunk-VS6XC5JE.js.map} +1 -1
- package/dist/{chunk-5J6JWGY4.js → chunk-WDG5IVEA.js} +3 -3
- package/dist/{chunk-5J6JWGY4.js.map → chunk-WDG5IVEA.js.map} +1 -1
- package/dist/{chunk-XB4XHGIE.js → chunk-XWCV2A2F.js} +4 -4
- package/dist/{chunk-XB4XHGIE.js.map → chunk-XWCV2A2F.js.map} +1 -1
- package/dist/{chunk-UWD7YBDR.js → chunk-ZLDAPZIX.js} +4 -4
- package/dist/{chunk-UWD7YBDR.js.map → chunk-ZLDAPZIX.js.map} +1 -1
- package/dist/{claude-code-ILZ46SLO.js → claude-code-CMFGCDMX.js} +5 -5
- package/dist/{claude-code-ILZ46SLO.js.map → claude-code-CMFGCDMX.js.map} +1 -1
- package/dist/cli/index.js +322 -196
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/connector.d.ts.map +1 -1
- package/dist/cli/src/commands/harness-preflight.d.ts +3 -1
- package/dist/cli/src/commands/harness-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/harness.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +3 -3
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-files.d.ts +8 -0
- package/dist/cli/src/commands/migrate-files.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-providers.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/serve-preflight.d.ts +7 -5
- package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/config-checks.d.ts +50 -12
- package/dist/cli/src/config-checks.d.ts.map +1 -1
- package/dist/cli/src/ensure-sources.d.ts.map +1 -1
- package/dist/cli/src/harness-error.d.ts +7 -0
- package/dist/cli/src/harness-error.d.ts.map +1 -1
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/connectors/config.js +5 -5
- package/dist/connectors/index.js +20 -19
- package/dist/connectors/src/index.d.ts +1 -1
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors/src/managed-gitconfig.d.ts +12 -0
- package/dist/connectors/src/managed-gitconfig.d.ts.map +1 -1
- package/dist/{connectors-KTRUUKWG.js → connectors-P5M2D4MH.js} +23 -22
- package/dist/{connectors-KTRUUKWG.js.map → connectors-P5M2D4MH.js.map} +1 -1
- package/dist/core/index.js +7 -7
- package/dist/core/logging.js +1 -1
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +3 -3
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +5 -5
- package/dist/core/src/index.d.ts +2 -2
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +7 -1
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +28 -0
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/run-state-ignore.d.ts +5 -3
- package/dist/core/src/run-state-ignore.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +4 -4
- package/dist/deploy/index.js +7 -7
- package/dist/discovery/index.js +4 -4
- package/dist/{ensure-sources-5QWKUIUD.js → ensure-sources-MOGLBEUF.js} +31 -29
- package/dist/ensure-sources-MOGLBEUF.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +20 -19
- package/dist/factory-assets/connectors/deploy.js +20 -19
- package/dist/factory-assets/connectors/devserver.js +20 -19
- package/dist/factory-assets/connectors/flow/adapter.js +20 -19
- package/dist/factory-assets/connectors/flow/engine.js +8 -8
- package/dist/factory-assets/connectors/flow/run-flow.js +22 -21
- package/dist/factory-assets/connectors/flow.js +20 -19
- package/dist/factory-assets/connectors/git/exec.d.ts +7 -0
- package/dist/factory-assets/connectors/git/exec.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git/repo.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +20 -19
- package/dist/factory-assets/connectors/gmail/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/gmail.js +20 -19
- package/dist/factory-assets/connectors/googledrive.js +20 -19
- package/dist/factory-assets/connectors/local.js +20 -19
- package/dist/factory-assets/connectors/mattermost.js +20 -19
- package/dist/factory-assets/connectors/memory.js +20 -19
- package/dist/factory-assets/connectors/minio/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/minio.js +20 -19
- package/dist/factory-assets/connectors/postgres/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/postgres.js +20 -19
- package/dist/factory-assets/connectors/s3/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/s3.js +20 -19
- package/dist/factory-assets/connectors/sharepoint.js +20 -19
- package/dist/factory-assets/connectors/sqlite/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/sqlite.js +20 -19
- package/dist/factory-assets/connectors/static-server.js +20 -19
- package/dist/factory-assets/connectors/tunnel.js +20 -19
- package/dist/factory-assets/connectors/webdav.js +20 -19
- package/dist/factory-assets/connectors/xstate-store.js +20 -19
- package/dist/factory-assets/connectors/xstate.js +20 -19
- package/dist/{flows-UCP6ZUYS.js → flows-J64L5MGJ.js} +12 -12
- package/dist/{flows-UCP6ZUYS.js.map → flows-J64L5MGJ.js.map} +1 -1
- package/dist/{helpers-INS4B7OQ.js → helpers-JL5AEGDT.js} +28 -26
- package/dist/{helpers-INS4B7OQ.js.map → helpers-JL5AEGDT.js.map} +1 -1
- package/dist/library/index.js +10 -10
- package/dist/library/install.js +4 -4
- package/dist/library/src/index.d.ts +2 -2
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/library.d.ts +6 -2
- package/dist/library/src/library.d.ts.map +1 -1
- package/dist/library/src/local/db.d.ts.map +1 -1
- package/dist/library/src/local/library.d.ts +10 -3
- package/dist/library/src/local/library.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +0 -9
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/local/schema.d.ts +27 -20
- package/dist/library/src/local/schema.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/src/remote/index.d.ts +1 -1
- package/dist/library/src/remote/index.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +6 -0
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/{library-publish-AZTYRASL.js → library-publish-DZNNZNMB.js} +49 -50
- package/dist/library-publish-DZNNZNMB.js.map +1 -0
- package/dist/model-endpoint/index.js +10 -10
- package/dist/open-library-OJREQ22B.js +61 -0
- package/dist/{open-library-3HMXYGUF.js.map → open-library-OJREQ22B.js.map} +1 -1
- package/dist/{open-registry-BHBHQMBA.js → open-registry-OEU6QUK2.js} +14 -14
- package/dist/{open-registry-BHBHQMBA.js.map → open-registry-OEU6QUK2.js.map} +1 -1
- package/dist/paths-PXBWY532.js +22 -0
- package/dist/{paths-77PXOXZY.js.map → paths-PXBWY532.js.map} +1 -1
- package/dist/{plugin-store-XQP2CRYH.js → plugin-store-ZC3EGZ3D.js} +10 -10
- package/dist/{plugin-store-XQP2CRYH.js.map → plugin-store-ZC3EGZ3D.js.map} +1 -1
- package/dist/{project-HVNPK2ZF.js → project-52UABBD5.js} +45 -46
- package/dist/{project-HVNPK2ZF.js.map → project-52UABBD5.js.map} +1 -1
- package/dist/resolver/index.js +8 -8
- package/dist/runner/index.js +35 -35
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +14 -14
- package/dist/sdk/bridge.js +17 -16
- package/dist/sdk/core.js +7 -7
- package/dist/sdk/flow.js +8 -8
- package/dist/sdk/index.js +35 -35
- package/dist/sdk/resolver.js +8 -8
- package/dist/sdk/runner.js +35 -35
- package/dist/sdk/transport/ws/server.js +8 -8
- package/dist/sdk/transport/ws.js +8 -8
- package/dist/sdk/transport.js +8 -8
- package/dist/{serve-preflight-NHZOKHIC.js → serve-preflight-HOQ7CGYR.js} +30 -30
- package/dist/{serve-preflight-NHZOKHIC.js.map → serve-preflight-HOQ7CGYR.js.map} +1 -1
- package/dist/{setup-EX7Z7XRN.js → setup-JIDZ372C.js} +29 -27
- package/dist/setup-JIDZ372C.js.map +1 -0
- package/dist/{skills-DE2BDQ6G.js → skills-5D4KDVPJ.js} +13 -13
- package/dist/{skills-DE2BDQ6G.js.map → skills-5D4KDVPJ.js.map} +1 -1
- package/dist/{source-URRPRGMZ.js → source-P6ZFSSZZ.js} +47 -46
- package/dist/{source-URRPRGMZ.js.map → source-P6ZFSSZZ.js.map} +1 -1
- package/dist/{source-manifest-publish-ZWRYRJ2U.js → source-manifest-publish-Y36FHVDS.js} +49 -48
- package/dist/source-manifest-publish-Y36FHVDS.js.map +1 -0
- package/dist/transport/index.js +8 -8
- package/dist/transport/src/ws/server.d.ts.map +1 -1
- package/dist/transport/ws/server.js +8 -8
- package/dist/transport/ws.js +8 -8
- package/dist/tui/index.js +35 -35
- package/dist/workspace-plugin/adapters/mcp.js +27 -26
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-4KPQ6ILH.js.map +0 -1
- package/dist/chunk-7UCPGQCW.js.map +0 -1
- package/dist/chunk-AQTAULXT.js.map +0 -1
- package/dist/chunk-BLBXOG5Q.js +0 -299
- package/dist/chunk-BLBXOG5Q.js.map +0 -1
- package/dist/chunk-C324IAXI.js +0 -160
- package/dist/chunk-C324IAXI.js.map +0 -1
- package/dist/chunk-DJSGQW2Q.js +0 -334
- package/dist/chunk-DJSGQW2Q.js.map +0 -1
- package/dist/chunk-FZO64PLQ.js.map +0 -1
- package/dist/chunk-FZTHL6SK.js.map +0 -1
- package/dist/chunk-GYPPVANR.js +0 -357
- package/dist/chunk-GYPPVANR.js.map +0 -1
- package/dist/chunk-GZL6RN4Z.js.map +0 -1
- package/dist/chunk-KNY356I3.js.map +0 -1
- package/dist/chunk-LOO5CB5M.js +0 -12
- package/dist/chunk-LOO5CB5M.js.map +0 -1
- package/dist/chunk-MDCI4RSG.js.map +0 -1
- package/dist/chunk-PLVM6OIV.js.map +0 -1
- package/dist/chunk-Q5SSRVD5.js.map +0 -1
- package/dist/chunk-U3FI4DVT.js.map +0 -1
- package/dist/chunk-V5KG6CCV.js.map +0 -1
- package/dist/chunk-VEIWFS7Z.js.map +0 -1
- package/dist/chunk-WEPTGUR4.js.map +0 -1
- package/dist/chunk-ZUROGXJM.js.map +0 -1
- package/dist/ensure-sources-5QWKUIUD.js.map +0 -1
- package/dist/library-publish-AZTYRASL.js.map +0 -1
- package/dist/open-library-3HMXYGUF.js +0 -59
- package/dist/paths-77PXOXZY.js +0 -22
- package/dist/setup-EX7Z7XRN.js.map +0 -1
- package/dist/source-manifest-publish-ZWRYRJ2U.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-
|
|
1
|
+
import { processStoreProbe, unregisteredLibraryNames, libraryDirMissing, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, lastLibraryName, filesEntryPaths } from './chunk-FXBKBOI5.js';
|
|
2
|
+
import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-RZ5R6GDJ.js';
|
|
3
3
|
import { parseFlowDefinition } from './chunk-JRN5QF4C.js';
|
|
4
|
-
import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, entriesNeedingDeploy, resetMissingParentWarnings, assertNoLibrarySymlinks, composedDriftRefs, deployAll, removeAsset, sourceComposedFiles, cachedComposedFiles, createScaffold, composedAgentNamesOf, installAgent } from './chunk-
|
|
5
|
-
import { appendHistory, getRecentHistory, clearHistory } from './chunk-
|
|
4
|
+
import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, entriesNeedingDeploy, resetMissingParentWarnings, assertNoLibrarySymlinks, composedDriftRefs, deployAll, removeAsset, sourceComposedFiles, cachedComposedFiles, createScaffold, composedAgentNamesOf, installAgent } from './chunk-KRL53RZB.js';
|
|
5
|
+
import { appendHistory, getRecentHistory, clearHistory } from './chunk-LKBRBVVS.js';
|
|
6
6
|
import { commitChanges } from './chunk-UQ6LFBPZ.js';
|
|
7
|
-
import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-
|
|
7
|
+
import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-R3ZNAPBV.js';
|
|
8
8
|
import { isScaffoldBody, isScaffoldDescription } from './chunk-WS3BOCAT.js';
|
|
9
|
-
import { resolveConfiguredHarnessName, computeHash, FACTORY_SOURCE_URL, isFactoryMemorySource, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, LockParseError, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-
|
|
10
|
-
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-
|
|
9
|
+
import { resolveConfiguredHarnessName, computeHash, FACTORY_SOURCE_URL, isFactoryMemorySource, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, cloneBackedSources, readLock, LockParseError, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-MEU2HHGV.js';
|
|
10
|
+
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-CJO3XKO7.js';
|
|
11
11
|
import { deployedBase, deployedPaths, deployedDir, isDeployed } from './chunk-5KRMNUL4.js';
|
|
12
|
-
import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, isSourceCloned, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveSourcePublisher, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, cloneOriginMismatch, DEFAULT_AGENT_INSTANCE_ID, MAX_PRESET_DEPTH, PresetDepthError } from './chunk-
|
|
12
|
+
import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, isSourceCloned, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveSourcePublisher, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, unpublishedCommitAdvice, resolveAsset, cloneOriginMismatch, cloneIsOnPin, missingPinMessage, DEFAULT_AGENT_INSTANCE_ID, MAX_PRESET_DEPTH, PresetDepthError } from './chunk-BNLXZXZN.js';
|
|
13
13
|
import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-L5VSIPQD.js';
|
|
14
14
|
import { HARNESS_TARGETS, SUPPORTED_HARNESSES } from './chunk-VTETQCR6.js';
|
|
15
|
-
import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, isNonAssetDir, isNonAssetFile } from './chunk-
|
|
16
|
-
import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-
|
|
17
|
-
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-
|
|
18
|
-
import { ensureRunStateIgnored } from './chunk-
|
|
15
|
+
import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, compositeSha256, isNonAssetDir, isNonAssetFile } from './chunk-MS2IXLTC.js';
|
|
16
|
+
import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-VS6XC5JE.js';
|
|
17
|
+
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-7HRZACI4.js';
|
|
18
|
+
import { ensureRunStateIgnored } from './chunk-RZL4TOK3.js';
|
|
19
19
|
import { spawnSync } from 'child_process';
|
|
20
|
-
import { existsSync, rmSync, readFileSync, writeFileSync, readdirSync, lstatSync, statSync, realpathSync, unlinkSync
|
|
20
|
+
import { existsSync, rmSync, readFileSync, mkdirSync, writeFileSync, readdirSync, lstatSync, statSync, realpathSync, unlinkSync } from 'fs';
|
|
21
21
|
import { homedir } from 'os';
|
|
22
22
|
import path, { resolve, dirname, sep, join, relative, isAbsolute, posix } from 'path';
|
|
23
23
|
import { gt } from 'semver';
|
|
@@ -70,9 +70,10 @@ function instancesBoundToAgent(projectDir, name, publisher) {
|
|
|
70
70
|
} catch {
|
|
71
71
|
return [];
|
|
72
72
|
}
|
|
73
|
+
const want = publisher?.replace(/^@/, "");
|
|
73
74
|
return Object.entries(instances).filter(([, instance]) => {
|
|
74
75
|
const bound = agentOfRef(instance.ref);
|
|
75
|
-
return bound !== void 0 && bound.name === name && (
|
|
76
|
+
return bound !== void 0 && bound.name === name && (!want || !bound.publisher || bound.publisher === want);
|
|
76
77
|
}).map(([id]) => id);
|
|
77
78
|
}
|
|
78
79
|
function boundAgentNames(projectDir) {
|
|
@@ -273,6 +274,54 @@ function installAgentInstances(opts) {
|
|
|
273
274
|
}
|
|
274
275
|
return result;
|
|
275
276
|
}
|
|
277
|
+
function harnessSwitchStateFile(projectDir) {
|
|
278
|
+
return join(projectDir, ".skaile", "harness-switch-hashes.json");
|
|
279
|
+
}
|
|
280
|
+
function harnessSwitchKeptKey(projectDir, path2) {
|
|
281
|
+
return relative(resolve(projectDir), resolve(path2)).split(sep).join("/");
|
|
282
|
+
}
|
|
283
|
+
function stringMap(value) {
|
|
284
|
+
const out = /* @__PURE__ */ new Map();
|
|
285
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
286
|
+
for (const [k, v] of Object.entries(value)) if (typeof v === "string") out.set(k, v);
|
|
287
|
+
}
|
|
288
|
+
return out;
|
|
289
|
+
}
|
|
290
|
+
function readHarnessSwitchState(projectDir) {
|
|
291
|
+
const state = { hashes: /* @__PURE__ */ new Map(), kept: /* @__PURE__ */ new Set() };
|
|
292
|
+
try {
|
|
293
|
+
const parsed = JSON.parse(readFileSync(harnessSwitchStateFile(projectDir), "utf-8"));
|
|
294
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return state;
|
|
295
|
+
const record = parsed;
|
|
296
|
+
if (Array.isArray(record.kept) || record.hashes && typeof record.hashes === "object") {
|
|
297
|
+
state.hashes = stringMap(record.hashes);
|
|
298
|
+
for (const k of Array.isArray(record.kept) ? record.kept : []) {
|
|
299
|
+
if (typeof k === "string") state.kept.add(k);
|
|
300
|
+
}
|
|
301
|
+
} else {
|
|
302
|
+
state.hashes = stringMap(record);
|
|
303
|
+
}
|
|
304
|
+
} catch {
|
|
305
|
+
}
|
|
306
|
+
return state;
|
|
307
|
+
}
|
|
308
|
+
function writeHarnessSwitchState(projectDir, state) {
|
|
309
|
+
const file = harnessSwitchStateFile(projectDir);
|
|
310
|
+
try {
|
|
311
|
+
if (state.hashes.size === 0 && state.kept.size === 0) {
|
|
312
|
+
rmSync(file, { force: true });
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
316
|
+
const body = {
|
|
317
|
+
hashes: Object.fromEntries(state.hashes),
|
|
318
|
+
kept: [...state.kept].sort()
|
|
319
|
+
};
|
|
320
|
+
writeFileSync(file, `${JSON.stringify(body, null, 2)}
|
|
321
|
+
`);
|
|
322
|
+
} catch {
|
|
323
|
+
}
|
|
324
|
+
}
|
|
276
325
|
var TARGET_MCP_CONFIG = {
|
|
277
326
|
"claude-code": ".mcp.json"
|
|
278
327
|
};
|
|
@@ -553,16 +602,19 @@ async function removeEmptyLedger(projectDir) {
|
|
|
553
602
|
} catch {
|
|
554
603
|
}
|
|
555
604
|
}
|
|
556
|
-
function mergeServers(existing, renderable, managedIds, warn, configLabel) {
|
|
605
|
+
function mergeServers(existing, renderable, managedIds, warn, configLabel, keep = /* @__PURE__ */ new Set()) {
|
|
557
606
|
const next = { ...existing };
|
|
558
607
|
const managed = new Set(managedIds);
|
|
559
608
|
const owned = [];
|
|
560
609
|
const removed = [];
|
|
561
610
|
for (const id of managed) {
|
|
562
|
-
if (
|
|
563
|
-
|
|
564
|
-
|
|
611
|
+
if (renderable.has(id) || !Object.hasOwn(next, id)) continue;
|
|
612
|
+
if (keep.has(id)) {
|
|
613
|
+
owned.push(id);
|
|
614
|
+
continue;
|
|
565
615
|
}
|
|
616
|
+
delete next[id];
|
|
617
|
+
removed.push(id);
|
|
566
618
|
}
|
|
567
619
|
for (const [id, entry] of renderable) {
|
|
568
620
|
if (Object.hasOwn(next, id) && !managed.has(id)) {
|
|
@@ -776,7 +828,8 @@ async function renderMcpServerConfig(projectDir, harnessTarget, opts) {
|
|
|
776
828
|
renderable,
|
|
777
829
|
managedIds,
|
|
778
830
|
warn,
|
|
779
|
-
relConfig
|
|
831
|
+
relConfig,
|
|
832
|
+
opts?.keep
|
|
780
833
|
);
|
|
781
834
|
for (const id of removed) await removePayloadDir(projectDir, id);
|
|
782
835
|
for (const decl of declarations) {
|
|
@@ -784,7 +837,12 @@ async function renderMcpServerConfig(projectDir, harnessTarget, opts) {
|
|
|
784
837
|
const unset = unsetRequiredFields(decl);
|
|
785
838
|
if (unset.length > 0) warn(`MCP server "${decl.id}" ${requiredFieldsAdvice(decl.id, unset)}`);
|
|
786
839
|
}
|
|
787
|
-
const rendered = Object.fromEntries(
|
|
840
|
+
const rendered = Object.fromEntries(
|
|
841
|
+
owned.map((id) => [
|
|
842
|
+
id,
|
|
843
|
+
renderable.has(id) ? entryHash(next[id]) : ledger.rendered[id] ?? entryHash(next[id])
|
|
844
|
+
])
|
|
845
|
+
);
|
|
788
846
|
const ledgerStale = JSON.stringify(owned) !== JSON.stringify(managedIds) || canonicalJson(rendered) !== canonicalJson(ledger.rendered);
|
|
789
847
|
if (ledgerStale) await writeManaged(projectDir, harnessTarget, { ids: owned, rendered });
|
|
790
848
|
if (Object.keys(next).length === 0 && !existingFile) {
|
|
@@ -884,8 +942,20 @@ function lockedAssetFiles(kind, files) {
|
|
|
884
942
|
const manifestDir = posix.dirname(manifestRel);
|
|
885
943
|
return files.flatMap((f) => {
|
|
886
944
|
const rel = posix.relative(manifestDir, f.path);
|
|
887
|
-
return rel === "" || rel.startsWith("..") ? [] : [{ rel, sha256: f.sha256 }];
|
|
945
|
+
return rel === "" || rel.startsWith("..") ? [] : [{ rel, path: f.path, sha256: f.sha256 }];
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
function lockRecordsOtherHash(entry, kind, deployed) {
|
|
949
|
+
if (deployed.size === 0) return [];
|
|
950
|
+
const byPath = new Map(lockedAssetFiles(kind, entry.files).map((f) => [f.path, f.rel]));
|
|
951
|
+
const replaced = entry.files.map((f) => {
|
|
952
|
+
const rel = byPath.get(f.path);
|
|
953
|
+
return {
|
|
954
|
+
path: f.path,
|
|
955
|
+
sha256: (rel === void 0 ? void 0 : deployed.get(rel)) ?? f.sha256
|
|
956
|
+
};
|
|
888
957
|
});
|
|
958
|
+
return compositeSha256(replaced) === entry.sha256 ? [...deployed.keys()] : [];
|
|
889
959
|
}
|
|
890
960
|
var GITHUB_REPO_URL = /github\.com[/:]/i;
|
|
891
961
|
function isBundledFactoryEntry(entry) {
|
|
@@ -1394,6 +1464,22 @@ var MissingManifestError = class extends Error {
|
|
|
1394
1464
|
}
|
|
1395
1465
|
projectDir;
|
|
1396
1466
|
};
|
|
1467
|
+
function swapNameInPath(rel, name, id) {
|
|
1468
|
+
return rel.split("/").map(
|
|
1469
|
+
(seg) => seg === name ? id : seg.startsWith(`${name}.`) ? id + seg.slice(name.length) : seg
|
|
1470
|
+
).join("/");
|
|
1471
|
+
}
|
|
1472
|
+
function sameRenderUnderName(assetFile, instanceFile, id, name) {
|
|
1473
|
+
try {
|
|
1474
|
+
const word = new RegExp(
|
|
1475
|
+
`(?<![\\w-])${id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![\\w-])`,
|
|
1476
|
+
"g"
|
|
1477
|
+
);
|
|
1478
|
+
return readFileSync(instanceFile, "utf8").replace(word, name) === readFileSync(assetFile, "utf8");
|
|
1479
|
+
} catch {
|
|
1480
|
+
return false;
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1397
1483
|
function unlistedAssetMessage(ref, library, libPath, ownership) {
|
|
1398
1484
|
const head = `${ref} is in library "${library}" but not listed in its skaile.manifest.yaml, so only part of its files would be deployed.`;
|
|
1399
1485
|
return isReadOnlyLibrary(libPath, ownership) ? `${head} "${library}" is a read-only source clone: add it to skaile.manifest.yaml in the source repo and push, then run \`skaile source sync\`.` : `${head} Run \`skaile library index ${library}\`, then add it again.`;
|
|
@@ -1522,8 +1608,8 @@ var AssetManager = class {
|
|
|
1522
1608
|
verboseCollisions;
|
|
1523
1609
|
/** Store URLs whose failed version lookup was already reported (one warning per URL). */
|
|
1524
1610
|
warnedStoreVersionLookups = /* @__PURE__ */ new Set();
|
|
1525
|
-
/** Whether each store answers: one
|
|
1526
|
-
storeProbe =
|
|
1611
|
+
/** Whether each store answers: one process asks a dead store once (`processStoreProbe`). */
|
|
1612
|
+
storeProbe = processStoreProbe;
|
|
1527
1613
|
/** Stores a lookup could not reach (store URL -> one line why); `add` reports them instead of "not found". */
|
|
1528
1614
|
storeFailures = /* @__PURE__ */ new Map();
|
|
1529
1615
|
/** The agent `add` is about to bind to an instance: its deploy writes no file named after the asset. */
|
|
@@ -2046,7 +2132,15 @@ var AssetManager = class {
|
|
|
2046
2132
|
if (this.global) return [];
|
|
2047
2133
|
const before = await this.mcpDriftRows();
|
|
2048
2134
|
try {
|
|
2049
|
-
await
|
|
2135
|
+
const declared = new Set((await loadMcpServerDeclarations(this.projectDir)).map((d) => d.id));
|
|
2136
|
+
const lock = this.tryReadLock();
|
|
2137
|
+
const wanted = new Set(
|
|
2138
|
+
lock ? [...await this.declaredLockKeys(lock, this.loadConfig().dependencies)].map(parseCanonicalLockKey).filter((id) => id.kind === "mcp-server" && id.name).map((id) => id.name) : []
|
|
2139
|
+
);
|
|
2140
|
+
const keep = new Set(
|
|
2141
|
+
[...this.lockedMcpNames()].filter((name) => !declared.has(name) && wanted.has(name))
|
|
2142
|
+
);
|
|
2143
|
+
await renderMcpServerConfig(this.projectDir, this.harness, { keep });
|
|
2050
2144
|
} catch (err) {
|
|
2051
2145
|
console.warn(
|
|
2052
2146
|
`skaile: could not render MCP config for ${this.harness}: ${err instanceof Error ? err.message : String(err)}`
|
|
@@ -2073,61 +2167,142 @@ var AssetManager = class {
|
|
|
2073
2167
|
return restored;
|
|
2074
2168
|
}
|
|
2075
2169
|
/**
|
|
2076
|
-
*
|
|
2077
|
-
*
|
|
2078
|
-
*
|
|
2079
|
-
* still equal what the lock recorded, and that no instance of the ledger claims is removed;
|
|
2080
|
-
* an edited one stays (it is the user's now) and is named. The old lock entry is rewritten
|
|
2081
|
-
* by the same install, so the lock never keeps a path that is gone.
|
|
2082
|
-
*
|
|
2083
|
-
* @returns The project-relative paths removed.
|
|
2170
|
+
* Whether a project-relative path is a file an agent instance renders (the ledger's files). An
|
|
2171
|
+
* instance claims files and folders (omp renders a folder): a file under a claimed folder is
|
|
2172
|
+
* claimed too.
|
|
2084
2173
|
*/
|
|
2085
|
-
|
|
2174
|
+
instanceClaims() {
|
|
2175
|
+
const claimedPaths = renderedInstanceFiles(this.projectDir, this.harness).flatMap(
|
|
2176
|
+
(i) => i.files
|
|
2177
|
+
);
|
|
2178
|
+
return (rel) => claimedPaths.some((c) => rel === c || rel.startsWith(`${c}/`));
|
|
2179
|
+
}
|
|
2180
|
+
/**
|
|
2181
|
+
* Whether the path `rel` that the lock lists under `rendered:` for the agent `name` is a file
|
|
2182
|
+
* named after the asset that an instance's file (or the `binding: run` role) stands for now.
|
|
2183
|
+
* Such a path is no part of the rendering the lock expects any more: a lock of 5.13.0 and older
|
|
2184
|
+
* still lists it, `install` drops it at the next lock write, and until then it is neither a
|
|
2185
|
+
* missing nor an edited copy. Always `false` in global mode.
|
|
2186
|
+
*/
|
|
2187
|
+
supersededRendering() {
|
|
2188
|
+
if (this.global || !harnessTargetSupportsAgents(this.harness)) return () => false;
|
|
2189
|
+
const bound = boundAgentNames(this.projectDir);
|
|
2190
|
+
const runRoles = runRoleAgentNames(this.projectDir);
|
|
2191
|
+
const claimed = this.instanceClaims();
|
|
2192
|
+
const standsFor = /* @__PURE__ */ new Map();
|
|
2193
|
+
const relOf = (abs) => relative(this.projectDir, abs).split(sep).join("/");
|
|
2194
|
+
return (name, rel) => {
|
|
2195
|
+
if (claimed(rel)) return false;
|
|
2196
|
+
let stands = standsFor.get(name);
|
|
2197
|
+
if (stands === void 0) {
|
|
2198
|
+
stands = runRoles.has(name) || bound.has(name) && isAgentInstanceRendered(this.projectDir, this.harness, name);
|
|
2199
|
+
standsFor.set(name, stands);
|
|
2200
|
+
}
|
|
2201
|
+
if (!stands) return false;
|
|
2202
|
+
const own = [
|
|
2203
|
+
...deployedPaths("agent", name, this.harness, false, this.projectDir),
|
|
2204
|
+
join(
|
|
2205
|
+
dirname(deployedBase("agent", this.harness, false, this.projectDir)),
|
|
2206
|
+
CODEX_IDENTITY_DIR,
|
|
2207
|
+
`${name}.md`
|
|
2208
|
+
)
|
|
2209
|
+
].map(relOf);
|
|
2210
|
+
return own.some((o) => rel === o || rel.startsWith(`${o}/`));
|
|
2211
|
+
};
|
|
2212
|
+
}
|
|
2213
|
+
/**
|
|
2214
|
+
* The files named after an agent asset that an earlier CLI rendered and this one does not: the
|
|
2215
|
+
* agent is bound by an instance (its rendering is the instance's file), or it only runs as a
|
|
2216
|
+
* `binding: run` role. A file counts when no instance of the ledger claims it and either the
|
|
2217
|
+
* lock lists it for the agent (`edited` when its bytes differ from the recorded ones), or the
|
|
2218
|
+
* lock records no rendering for the agent at all (5.11.0 and older) and the file is the
|
|
2219
|
+
* instance's render under the asset's name. A file of the second kind that differs from that
|
|
2220
|
+
* render may be the user's own and is not listed. Project mode only.
|
|
2221
|
+
*/
|
|
2222
|
+
leftoverAgentFiles() {
|
|
2086
2223
|
const lock = this.tryReadLock();
|
|
2087
2224
|
if (this.global || !lock || !harnessTargetSupportsAgents(this.harness)) return [];
|
|
2088
2225
|
const bound = boundAgentNames(this.projectDir);
|
|
2089
2226
|
const runRoles = runRoleAgentNames(this.projectDir);
|
|
2090
|
-
const
|
|
2091
|
-
|
|
2092
|
-
);
|
|
2093
|
-
const claimed = (rel) => claimedPaths.some((c) => rel === c || rel.startsWith(`${c}/`));
|
|
2094
|
-
const agentDir = resolve(deployedBase("agent", this.harness, false, this.projectDir));
|
|
2095
|
-
const removed = [];
|
|
2227
|
+
const claimed = this.instanceClaims();
|
|
2228
|
+
const found = [];
|
|
2096
2229
|
for (const [key, entry] of Object.entries(lock.assets)) {
|
|
2097
|
-
const { kind, name } = parseCanonicalLockKey(key);
|
|
2098
|
-
if (!kind || !name || this.installTarget(kind) !== "agent"
|
|
2099
|
-
continue;
|
|
2100
|
-
}
|
|
2230
|
+
const { kind, name, publisher } = parseCanonicalLockKey(key);
|
|
2231
|
+
if (!kind || !name || this.installTarget(kind) !== "agent") continue;
|
|
2101
2232
|
if (!bound.has(name) && !runRoles.has(name)) continue;
|
|
2102
2233
|
if (!runRoles.has(name) && !isAgentInstanceRendered(this.projectDir, this.harness, name)) {
|
|
2103
2234
|
continue;
|
|
2104
2235
|
}
|
|
2105
|
-
const named =
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
intact =
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
);
|
|
2119
|
-
continue;
|
|
2120
|
-
}
|
|
2121
|
-
rmSync(abs, { force: true });
|
|
2122
|
-
removed.push(f.path);
|
|
2123
|
-
for (let dir = dirname(abs); dir.startsWith(agentDir + sep); dir = dirname(dir)) {
|
|
2124
|
-
if (readdirSync(dir).length > 0) break;
|
|
2125
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2236
|
+
const named = this.renderedAgentFiles(name).map((f) => f.path);
|
|
2237
|
+
const ids = instancesBoundToAgent(this.projectDir, name, publisher);
|
|
2238
|
+
if (entry.rendered?.length) {
|
|
2239
|
+
for (const f of entry.rendered) {
|
|
2240
|
+
if (!named.includes(f.path) || claimed(f.path)) continue;
|
|
2241
|
+
const abs = join(this.projectDir, f.path);
|
|
2242
|
+
if (!existsSync(abs)) continue;
|
|
2243
|
+
let intact = false;
|
|
2244
|
+
try {
|
|
2245
|
+
intact = computeHash(abs) === f.sha256;
|
|
2246
|
+
} catch {
|
|
2247
|
+
}
|
|
2248
|
+
found.push({ agent: name, path: f.path, ids, edited: !intact });
|
|
2126
2249
|
}
|
|
2250
|
+
continue;
|
|
2251
|
+
}
|
|
2252
|
+
for (const rel of named) {
|
|
2253
|
+
if (claimed(rel)) continue;
|
|
2254
|
+
const same = ids.some(
|
|
2255
|
+
(id) => sameRenderUnderName(
|
|
2256
|
+
join(this.projectDir, rel),
|
|
2257
|
+
join(this.projectDir, swapNameInPath(rel, name, id)),
|
|
2258
|
+
id,
|
|
2259
|
+
name
|
|
2260
|
+
)
|
|
2261
|
+
);
|
|
2262
|
+
if (same) found.push({ agent: name, path: rel, ids, edited: false });
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
return found;
|
|
2266
|
+
}
|
|
2267
|
+
/**
|
|
2268
|
+
* Remove the leftover files {@link leftoverAgentFiles} lists. A file edited since the lock
|
|
2269
|
+
* stays (it is the user's now) and is named. The old lock entry is rewritten by the same
|
|
2270
|
+
* install, so the lock never keeps a path that is gone; `install --locked` leaves the lock,
|
|
2271
|
+
* which `check` does not read for a file that is gone.
|
|
2272
|
+
*
|
|
2273
|
+
* @returns The project-relative paths removed.
|
|
2274
|
+
*/
|
|
2275
|
+
pruneAssetNamedAgentFiles() {
|
|
2276
|
+
const agentDir = resolve(deployedBase("agent", this.harness, false, this.projectDir));
|
|
2277
|
+
const removed = [];
|
|
2278
|
+
for (const f of this.leftoverAgentFiles()) {
|
|
2279
|
+
if (f.edited) {
|
|
2280
|
+
console.warn(
|
|
2281
|
+
`skaile: ${f.path} is no longer written for ${f.agent} (an instance renders it); it was edited, so it stays`
|
|
2282
|
+
);
|
|
2283
|
+
continue;
|
|
2284
|
+
}
|
|
2285
|
+
const abs = join(this.projectDir, f.path);
|
|
2286
|
+
rmSync(abs, { force: true });
|
|
2287
|
+
removed.push(f.path);
|
|
2288
|
+
for (let dir = dirname(abs); dir.startsWith(agentDir + sep); dir = dirname(dir)) {
|
|
2289
|
+
if (readdirSync(dir).length > 0) break;
|
|
2290
|
+
rmSync(dir, { recursive: true, force: true });
|
|
2127
2291
|
}
|
|
2128
2292
|
}
|
|
2129
2293
|
return removed;
|
|
2130
2294
|
}
|
|
2295
|
+
/**
|
|
2296
|
+
* The `check`, `doctor` and `outdated` lines for the files {@link leftoverAgentFiles} lists: an
|
|
2297
|
+
* untouched one is removed by the next `install` (and by `install --locked`), an edited one
|
|
2298
|
+
* stays. Empty in global mode and when nothing is left over.
|
|
2299
|
+
*/
|
|
2300
|
+
leftoverAgentFileNotices() {
|
|
2301
|
+
return this.leftoverAgentFiles().map((f) => {
|
|
2302
|
+
const by = f.ids.length > 0 ? ` (${f.ids.join(", ")} renders it)` : "";
|
|
2303
|
+
return f.edited ? `${f.path} is no longer written for agent ${f.agent}${by}; it was edited, so it stays: delete it by hand` : `${f.path} is left over from an older skaile${by}: skaile install removes it`;
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2131
2306
|
/**
|
|
2132
2307
|
* Render every agent instance of `skaile.yaml` into the harness target's native
|
|
2133
2308
|
* agent files (`.claude/agents/<id>.md`, …) and prune the renderings of
|
|
@@ -2137,7 +2312,7 @@ var AssetManager = class {
|
|
|
2137
2312
|
*
|
|
2138
2313
|
* @param opts.prune - Also remove the files named after the agent assets that an earlier CLI
|
|
2139
2314
|
* rendered and an instance renders now ({@link pruneAssetNamedAgentFiles}). Set by the
|
|
2140
|
-
* commands that
|
|
2315
|
+
* commands that deploy or re-lock; the lock is left as it is by `install --locked`.
|
|
2141
2316
|
*/
|
|
2142
2317
|
async renderAgentInstances(opts) {
|
|
2143
2318
|
if (this.global) return {};
|
|
@@ -2310,7 +2485,8 @@ var AssetManager = class {
|
|
|
2310
2485
|
sourceUrl: declared?.url ?? url,
|
|
2311
2486
|
commit: entry.source.commit,
|
|
2312
2487
|
files: entry.files,
|
|
2313
|
-
sha256: entry.sha256
|
|
2488
|
+
sha256: entry.sha256,
|
|
2489
|
+
...entry.origin === "store" && entry.store ? { storeUrl: entry.store } : {}
|
|
2314
2490
|
};
|
|
2315
2491
|
}
|
|
2316
2492
|
/**
|
|
@@ -2499,8 +2675,9 @@ var AssetManager = class {
|
|
|
2499
2675
|
/**
|
|
2500
2676
|
* Every ref that more than one registered library holds, with one row per holder
|
|
2501
2677
|
* (all libraries, all versions) in the order `add` prefers them: the first row is
|
|
2502
|
-
* the one `add <ref>` deploys.
|
|
2503
|
-
*
|
|
2678
|
+
* the one `add <ref>` deploys. `search` reads this to group the index rows of a ref
|
|
2679
|
+
* (one per library) and mark the copy `add` deploys; the versions come from the files
|
|
2680
|
+
* themselves, which the index follows only after the next `skaile library index`.
|
|
2504
2681
|
*
|
|
2505
2682
|
* @returns `kind:@publisher/name` → holders; refs held by one library are absent.
|
|
2506
2683
|
*/
|
|
@@ -2525,8 +2702,8 @@ var AssetManager = class {
|
|
|
2525
2702
|
}
|
|
2526
2703
|
/**
|
|
2527
2704
|
* Every asset a registered library holds, read from the library directories themselves
|
|
2528
|
-
* (not the local index, which
|
|
2529
|
-
*
|
|
2705
|
+
* (not the local index, which lags behind them until the next `skaile library index`).
|
|
2706
|
+
* One row per holder, all versions.
|
|
2530
2707
|
*
|
|
2531
2708
|
* @returns `[]` when no library holds an asset. Never warns.
|
|
2532
2709
|
*/
|
|
@@ -2920,6 +3097,7 @@ var AssetManager = class {
|
|
|
2920
3097
|
const links = readLinks(this.projectDir);
|
|
2921
3098
|
const checked = /* @__PURE__ */ new Set();
|
|
2922
3099
|
for (const c of resolved) {
|
|
3100
|
+
if (c.storeUrl) continue;
|
|
2923
3101
|
if (!c.commit || /^0+$/.test(c.commit) || checked.has(`${c.sourceUrl}@${c.commit}`)) continue;
|
|
2924
3102
|
checked.add(`${c.sourceUrl}@${c.commit}`);
|
|
2925
3103
|
const hit = Object.entries(repositories).find(
|
|
@@ -3681,10 +3859,15 @@ var AssetManager = class {
|
|
|
3681
3859
|
if (byName.state === "ok") return byName;
|
|
3682
3860
|
if (origin.url) {
|
|
3683
3861
|
const wanted = normalizeRepoUrl(origin.url);
|
|
3684
|
-
const
|
|
3862
|
+
const sameRemote = (snap?.libraries ?? []).filter((l) => {
|
|
3685
3863
|
const url = libraryRemoteUrl(l);
|
|
3686
3864
|
return l.name !== name && url !== void 0 && normalizeRepoUrl(url) === wanted && existsSync(l.path);
|
|
3687
3865
|
});
|
|
3866
|
+
const byUrl = (asset && origin.sha256 ? sameRemote.find(
|
|
3867
|
+
(l) => libraryDiskHashes(l.path, /* @__PURE__ */ new Map(), this.registry).get(
|
|
3868
|
+
`${asset.kind}:${asset.name}`
|
|
3869
|
+
) === origin.sha256
|
|
3870
|
+
) : void 0) ?? sameRemote[0];
|
|
3688
3871
|
if (byUrl) return { state: "ok", path: byUrl.path, name: byUrl.name };
|
|
3689
3872
|
}
|
|
3690
3873
|
const holder = asset && origin.sha256 ? this.libraryHoldingLockedBytes(origin.sha256, asset, snap) : void 0;
|
|
@@ -4264,6 +4447,32 @@ var AssetManager = class {
|
|
|
4264
4447
|
}
|
|
4265
4448
|
return entries;
|
|
4266
4449
|
}
|
|
4450
|
+
/**
|
|
4451
|
+
* The tail of a `hash mismatch for <file>: expected <lock>, got <fetched>` failure of a locked
|
|
4452
|
+
* restore when the deployed copy already holds the fetched bytes: the lock records another
|
|
4453
|
+
* hash for the file, and `install` (not `install --locked`) writes the right one. Empty for
|
|
4454
|
+
* any other failure, and when the copy is missing or differs from the fetched bytes.
|
|
4455
|
+
*/
|
|
4456
|
+
wrongLockHashHint(candidates, reason) {
|
|
4457
|
+
const m = /hash mismatch for (.+): expected [0-9a-f]{64}, got ([0-9a-f]{64})/.exec(reason);
|
|
4458
|
+
if (!m) return "";
|
|
4459
|
+
const [, file, got] = m;
|
|
4460
|
+
for (const c of candidates) {
|
|
4461
|
+
const component = this.installTarget(c.kind);
|
|
4462
|
+
if (!component || component === "agent" || !c.files) continue;
|
|
4463
|
+
const locked = lockedAssetFiles(c.kind, c.files).find((f) => f.path === file);
|
|
4464
|
+
if (!locked) continue;
|
|
4465
|
+
try {
|
|
4466
|
+
const dest = deployedDir(component, c.name, this.harness, this.global, this.projectDir);
|
|
4467
|
+
if (computeHash(join(dest, locked.rel)) !== got) return "";
|
|
4468
|
+
} catch {
|
|
4469
|
+
return "";
|
|
4470
|
+
}
|
|
4471
|
+
return `
|
|
4472
|
+
the lock records another hash for ${file} (the deployed copy holds the bytes the store returns): run \`skaile install\` to re-lock it`;
|
|
4473
|
+
}
|
|
4474
|
+
return "";
|
|
4475
|
+
}
|
|
4267
4476
|
/**
|
|
4268
4477
|
* Fetch + SHA-verify the bytes of every store-resolved candidate that needs
|
|
4269
4478
|
* bytes on disk into `.skaile/cache/store/`, reusing the same verified-fetch
|
|
@@ -4396,6 +4605,7 @@ var AssetManager = class {
|
|
|
4396
4605
|
*/
|
|
4397
4606
|
candidateHasLocalBytes(c, repositories) {
|
|
4398
4607
|
if (!c.sourceUrl) return false;
|
|
4608
|
+
if (c.storeUrl) return false;
|
|
4399
4609
|
const rel = this.primaryManifestRel(c);
|
|
4400
4610
|
for (const [slug, decl] of Object.entries(repositories)) {
|
|
4401
4611
|
if (decl.url === void 0 || decl.url !== c.sourceUrl) continue;
|
|
@@ -4913,7 +5123,7 @@ Fix the asset, then run \`skaile library index ${origin}\` and install again.`
|
|
|
4913
5123
|
ensureSourceClones(repositories, sources, lock) {
|
|
4914
5124
|
const pinBySlug = pinsBySlug(sources);
|
|
4915
5125
|
const lockedCommit = /* @__PURE__ */ new Map();
|
|
4916
|
-
for (const s of lock
|
|
5126
|
+
for (const s of lock ? cloneBackedSources(lock) : []) {
|
|
4917
5127
|
if (!/^0*$/.test(s.commit)) lockedCommit.set(sourceCacheKey(s.url), s.commit);
|
|
4918
5128
|
}
|
|
4919
5129
|
for (const [name, decl] of Object.entries(repositories)) {
|
|
@@ -5448,7 +5658,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
|
|
|
5448
5658
|
const factoryDecl = Object.values(repositories).find((d) => d.factory);
|
|
5449
5659
|
const factoryDir = factoryDecl?.path ?? null;
|
|
5450
5660
|
const unavailable = [];
|
|
5451
|
-
for (const src of lock
|
|
5661
|
+
for (const src of cloneBackedSources(lock)) {
|
|
5452
5662
|
if (factoryDir !== null && isFactoryMemorySource(src)) continue;
|
|
5453
5663
|
const slug = sourceCacheKey(src.url);
|
|
5454
5664
|
const declared = declBySlug.get(slug);
|
|
@@ -5507,8 +5717,10 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
|
|
|
5507
5717
|
resolved = await this.buildCatalogEntries(candidates, repositories);
|
|
5508
5718
|
} catch (err) {
|
|
5509
5719
|
const reason = err instanceof Error ? err.message : String(err);
|
|
5510
|
-
throw new Error(
|
|
5511
|
-
|
|
5720
|
+
throw new Error(
|
|
5721
|
+
`Lock file verification failed:
|
|
5722
|
+
${reason}${this.wrongLockHashHint(candidates, reason)}`
|
|
5723
|
+
);
|
|
5512
5724
|
}
|
|
5513
5725
|
const library = await this.restoreLibraryLockEntries(lock, { storeFallback: true });
|
|
5514
5726
|
assertFlowsLoad([...resolved, ...library.entries], "installed");
|
|
@@ -5591,7 +5803,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
|
|
|
5591
5803
|
];
|
|
5592
5804
|
this.sweepLegacyOmpCopies([...resolved, ...library.entries]);
|
|
5593
5805
|
const mcpRestored = await this.renderHarnessMcpConfig();
|
|
5594
|
-
const agentRender = await this.renderAgentInstances();
|
|
5806
|
+
const agentRender = await this.renderAgentInstances({ prune: true });
|
|
5595
5807
|
const { rewritten, restored: restoredRenderings } = this.changedRenderings(unrecordedRenderings);
|
|
5596
5808
|
const restored = [
|
|
5597
5809
|
...this.restoredCopies(copyDrift, deployed, missingCopies),
|
|
@@ -5825,7 +6037,8 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
|
|
|
5825
6037
|
const plain = err.message.endsWith(advice) ? err.message.slice(0, -advice.length) : err.message;
|
|
5826
6038
|
if (plain.startsWith("publisher required")) {
|
|
5827
6039
|
const matches = await this.resolvableMatches(ref, repositories, sources);
|
|
5828
|
-
const
|
|
6040
|
+
const query = ref.trim().replace(/^[^:@/#\s]+:/, "").replace(/#.*$/, "");
|
|
6041
|
+
const hint = matches.length === 0 ? query === "" ? "" : ` Find the publisher with \`skaile store search ${query}\`.` : matches.length === 1 ? ` Did you mean ${matches[0]}?` : ` Did you mean one of: ${matches.join(", ")}?`;
|
|
5829
6042
|
throw new Error(`${plain}${hint}`);
|
|
5830
6043
|
}
|
|
5831
6044
|
const pinned = /^(.*\/[^@#/]+)@([^@#/]+)$/.exec(ref.trim());
|
|
@@ -7040,6 +7253,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7040
7253
|
*/
|
|
7041
7254
|
listStaleHarnessCopies(opts = {}) {
|
|
7042
7255
|
if (this.global) return [];
|
|
7256
|
+
const keptCopies = readHarnessSwitchState(this.projectDir).kept;
|
|
7043
7257
|
const recordedHashes = new Map([
|
|
7044
7258
|
...this.lockedRenderedHashes(),
|
|
7045
7259
|
...opts.renderedBefore ?? []
|
|
@@ -7096,6 +7310,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7096
7310
|
}
|
|
7097
7311
|
const twin = join(activeBase, relative(otherBase, p));
|
|
7098
7312
|
const skaileWrote = k === "agent" ? locked && matchesRecordedHashes(p, recordedHashes) : !relative(otherBase, p).startsWith("..") && sameBytes(p, twin);
|
|
7313
|
+
if (keptCopies.has(harnessSwitchKeptKey(this.projectDir, p))) continue;
|
|
7099
7314
|
out.push({ harness: other, kind, name, path: p, skaileWrote });
|
|
7100
7315
|
}
|
|
7101
7316
|
}
|
|
@@ -7709,12 +7924,17 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7709
7924
|
if (touching !== null) behind = touching;
|
|
7710
7925
|
}
|
|
7711
7926
|
if (behind <= 0) continue;
|
|
7927
|
+
const advice = (status.ahead ?? 0) > 0 ? unpublishedCommitAdvice(clone, status.remoteRef) : "";
|
|
7712
7928
|
result.push({
|
|
7713
7929
|
kind,
|
|
7714
7930
|
name,
|
|
7715
7931
|
publisher: publisher ?? sourceShortName(src.url),
|
|
7716
7932
|
currentVersion: version ?? "",
|
|
7717
|
-
behind
|
|
7933
|
+
behind,
|
|
7934
|
+
...advice ? {
|
|
7935
|
+
problem: `${behind} commit(s) behind${advice.replace(/^ - /, ", but the ")}`,
|
|
7936
|
+
manualFix: true
|
|
7937
|
+
} : {}
|
|
7718
7938
|
});
|
|
7719
7939
|
}
|
|
7720
7940
|
}
|
|
@@ -8666,11 +8886,12 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
8666
8886
|
const parts = [
|
|
8667
8887
|
...d.modified.map((f) => {
|
|
8668
8888
|
const instance = d.instanceOf?.get(f);
|
|
8669
|
-
return instance ? `${f}, the file of agent instance "${instance}", was edited` : d.unrecorded ? `${f} differs from the library's content now (the lock keeps no per-file record: it may be a library change, not your edit)` : `${f} was edited`;
|
|
8889
|
+
return instance ? `${f}, the file of agent instance "${instance}", was edited` : d.lockWrong?.includes(f) ? `the lock records another hash for ${f}` : d.unrecorded ? `${f} differs from the library's content now (the lock keeps no per-file record: it may be a library change, not your edit)` : `${f} was edited`;
|
|
8670
8890
|
}),
|
|
8671
8891
|
...d.extra.map((f) => `${f} is not part of the asset`)
|
|
8672
8892
|
];
|
|
8673
|
-
const
|
|
8893
|
+
const onlyLockWrong = d.extra.length === 0 && d.modified.every((f) => d.lockWrong?.includes(f));
|
|
8894
|
+
const reason = onlyLockWrong ? `is locked, but ${parts.join("; ")} (the deployed copy is not edited) \u2014 run \`skaile install\` to re-lock it` : d.libraryChanged ? `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 the library holds other content now: copy your edit away, then run \`skaile update --force\` to replace it` : `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 run \`skaile install --locked\` to restore it`;
|
|
8674
8895
|
gaps.push({ type: "modified", ref: d.ref, reason, message: `${d.ref} ${reason}` });
|
|
8675
8896
|
named.add(gapIdentity(d.ref));
|
|
8676
8897
|
}
|
|
@@ -8722,6 +8943,22 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
8722
8943
|
unreadableSource: true
|
|
8723
8944
|
});
|
|
8724
8945
|
}
|
|
8946
|
+
for (const entry of this.loadConfig().sources) {
|
|
8947
|
+
if (!entry.pin) continue;
|
|
8948
|
+
const dest = join(getGlobalCacheDir(), sourceCacheKey(entry.url));
|
|
8949
|
+
if (existsSync(dest) && cloneIsOnPin(dest, entry.pin)) continue;
|
|
8950
|
+
const missing = missingPinMessage(entry.url, entry.pin);
|
|
8951
|
+
if (!missing) continue;
|
|
8952
|
+
const reason = `is skipped: ${missing} - fix the pin in skaile.yaml`;
|
|
8953
|
+
gaps.push({
|
|
8954
|
+
type: "source",
|
|
8955
|
+
ref: entry.url,
|
|
8956
|
+
reason,
|
|
8957
|
+
message: `source ${sourceShortName(entry.url)} ${reason}`,
|
|
8958
|
+
manualFix: true,
|
|
8959
|
+
unreadableSource: true
|
|
8960
|
+
});
|
|
8961
|
+
}
|
|
8725
8962
|
for (const u of unboundAgentInstances(this.projectDir, this.harness)) {
|
|
8726
8963
|
const reason = u.ref.startsWith("agent:") ? await this.unboundAgentReason(u.id, u.ref) : `is bound by agent instance "${u.id}" but resolves to no agent.yaml \u2014 fix the path, or drop the binding from skaile.yaml`;
|
|
8727
8964
|
gaps.push({
|
|
@@ -9618,15 +9855,21 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
9618
9855
|
}
|
|
9619
9856
|
const modified = [];
|
|
9620
9857
|
const locked = lockedAssetFiles(kind, entry.files);
|
|
9858
|
+
const deployedHashes = /* @__PURE__ */ new Map();
|
|
9621
9859
|
for (const f of locked) {
|
|
9622
9860
|
const deployedFile = join(dest, f.rel);
|
|
9623
9861
|
if (!existsSync(deployedFile)) continue;
|
|
9624
9862
|
try {
|
|
9625
|
-
|
|
9863
|
+
const actual = computeHash(deployedFile);
|
|
9864
|
+
if (actual !== f.sha256) {
|
|
9865
|
+
modified.push(f.rel);
|
|
9866
|
+
deployedHashes.set(f.rel, actual);
|
|
9867
|
+
}
|
|
9626
9868
|
} catch {
|
|
9627
9869
|
modified.push(f.rel);
|
|
9628
9870
|
}
|
|
9629
9871
|
}
|
|
9872
|
+
const lockWrong = deployedHashes.size === modified.length ? lockRecordsOtherHash(entry, kind, deployedHashes) : [];
|
|
9630
9873
|
const covered = new Set(locked.map((f) => f.rel));
|
|
9631
9874
|
let extra = [];
|
|
9632
9875
|
try {
|
|
@@ -9634,14 +9877,25 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
9634
9877
|
} catch {
|
|
9635
9878
|
}
|
|
9636
9879
|
if (modified.length > 0 || extra.length > 0)
|
|
9637
|
-
out.push({
|
|
9880
|
+
out.push({
|
|
9881
|
+
ref: refOf(key),
|
|
9882
|
+
key,
|
|
9883
|
+
modified,
|
|
9884
|
+
extra,
|
|
9885
|
+
library: false,
|
|
9886
|
+
...lockWrong.length > 0 ? { lockWrong } : {}
|
|
9887
|
+
});
|
|
9638
9888
|
}
|
|
9639
9889
|
let snapForAgents;
|
|
9890
|
+
const superseded = this.supersededRendering();
|
|
9640
9891
|
for (const [key, entry] of Object.entries(lock.assets)) {
|
|
9641
|
-
const recorded = [...entry.rendered ?? [], ...entry.composed ?? []];
|
|
9642
|
-
if (recorded.length === 0 || entry.library?.installed) continue;
|
|
9643
9892
|
const { kind, name } = parseCanonicalLockKey(key);
|
|
9644
9893
|
if (!kind || !name || this.installTarget(kind) !== "agent") continue;
|
|
9894
|
+
const recorded = [
|
|
9895
|
+
...(entry.rendered ?? []).filter((f) => !superseded(name, f.path)),
|
|
9896
|
+
...entry.composed ?? []
|
|
9897
|
+
];
|
|
9898
|
+
if (recorded.length === 0 || entry.library?.installed) continue;
|
|
9645
9899
|
if (patches[`${kind}:${name}`]) continue;
|
|
9646
9900
|
const modified = [];
|
|
9647
9901
|
for (const f of recorded) {
|
|
@@ -9692,13 +9946,16 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
9692
9946
|
*/
|
|
9693
9947
|
async undeployedLockGaps(lock, named) {
|
|
9694
9948
|
const gaps = [];
|
|
9949
|
+
const superseded = this.supersededRendering();
|
|
9695
9950
|
for (const [key, entry] of Object.entries(lock?.assets ?? {})) {
|
|
9696
9951
|
if (entry.library?.installed) continue;
|
|
9697
9952
|
const { publisher, kind, name } = parseCanonicalLockKey(key);
|
|
9698
9953
|
const component = kind ? this.installTarget(kind) : void 0;
|
|
9699
9954
|
if (!kind || !name || !component || named.has(`${kind}:${name}`)) continue;
|
|
9700
9955
|
if (isAssetDeployed(component, name, this.harness, this.global, this.projectDir)) {
|
|
9701
|
-
const renderedGone = component === "agent" && !this.global && (entry.rendered ?? []).some(
|
|
9956
|
+
const renderedGone = component === "agent" && !this.global && (entry.rendered ?? []).some(
|
|
9957
|
+
(f) => !superseded(name, f.path) && !existsSync(join(this.projectDir, f.path))
|
|
9958
|
+
);
|
|
9702
9959
|
if (!renderedGone) continue;
|
|
9703
9960
|
}
|
|
9704
9961
|
const ref = publisher ? `${kind}:@${publisher}/${name}` : `${kind}:${name}`;
|
|
@@ -10362,6 +10619,6 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
10362
10619
|
}
|
|
10363
10620
|
};
|
|
10364
10621
|
|
|
10365
|
-
export { AssetManager, LibraryEntryError, MissingManifestError, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName };
|
|
10366
|
-
//# sourceMappingURL=chunk-
|
|
10367
|
-
//# sourceMappingURL=chunk-
|
|
10622
|
+
export { AssetManager, LibraryEntryError, MissingManifestError, harnessSwitchKeptKey, harnessSwitchStateFile, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, readHarnessSwitchState, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName, writeHarnessSwitchState };
|
|
10623
|
+
//# sourceMappingURL=chunk-4I4SBOCS.js.map
|
|
10624
|
+
//# sourceMappingURL=chunk-4I4SBOCS.js.map
|