@skaile/workspaces 5.2.0 → 5.4.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 +72 -0
- package/README.md +9 -2
- package/dist/{asset-feeds-WDIB3E6H.js → asset-feeds-3MVRNS5U.js} +12 -12
- package/dist/{asset-feeds-WDIB3E6H.js.map → asset-feeds-3MVRNS5U.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +9 -9
- package/dist/asset-manager/index.js +13 -13
- package/dist/asset-manager/installer.js +9 -9
- package/dist/asset-manager/src/index.d.ts +22 -3
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +9 -1
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +11 -11
- package/dist/bridge/drivers/codex.js +10 -10
- package/dist/bridge/drivers/continue.js +12 -12
- package/dist/bridge/drivers/echo.js +1 -1
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +12 -12
- package/dist/bridge/drivers/omp.js +2 -2
- package/dist/bridge/drivers/opencode.js +12 -12
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +12 -12
- package/dist/{chunk-WMEPS6S4.js → chunk-2XXAVTTO.js} +3 -3
- package/dist/{chunk-WMEPS6S4.js.map → chunk-2XXAVTTO.js.map} +1 -1
- package/dist/{chunk-KGGT6MUM.js → chunk-37DN45RR.js} +19 -7
- package/dist/chunk-37DN45RR.js.map +1 -0
- package/dist/chunk-5NH3U6N5.js +15 -0
- package/dist/{chunk-BZXR6SW5.js.map → chunk-5NH3U6N5.js.map} +1 -1
- package/dist/{chunk-P2EM6FNQ.js → chunk-6IGFSUTE.js} +23 -36
- package/dist/chunk-6IGFSUTE.js.map +1 -0
- package/dist/{chunk-EOGNW74K.js → chunk-7KITVWXK.js} +25 -23
- package/dist/chunk-7KITVWXK.js.map +1 -0
- package/dist/{chunk-S6KNDUAU.js → chunk-A67BHJCH.js} +5 -5
- package/dist/{chunk-S6KNDUAU.js.map → chunk-A67BHJCH.js.map} +1 -1
- package/dist/{chunk-3E2TIPBZ.js → chunk-AE42DHSH.js} +2 -2
- package/dist/{chunk-3E2TIPBZ.js.map → chunk-AE42DHSH.js.map} +1 -1
- package/dist/{chunk-L257BENF.js → chunk-BATL2CWI.js} +128 -32
- package/dist/chunk-BATL2CWI.js.map +1 -0
- package/dist/{chunk-2MEMXBLC.js → chunk-BHUHGLNS.js} +5 -5
- package/dist/{chunk-2MEMXBLC.js.map → chunk-BHUHGLNS.js.map} +1 -1
- package/dist/{chunk-XIYXBHLN.js → chunk-DTV7HL5R.js} +2 -2
- package/dist/{chunk-XIYXBHLN.js.map → chunk-DTV7HL5R.js.map} +1 -1
- package/dist/{chunk-BJQUSAGB.js → chunk-GCYD4EGY.js} +4 -4
- package/dist/{chunk-BJQUSAGB.js.map → chunk-GCYD4EGY.js.map} +1 -1
- package/dist/{chunk-EB6OPURC.js → chunk-HTKZ4AOW.js} +3 -3
- package/dist/{chunk-EB6OPURC.js.map → chunk-HTKZ4AOW.js.map} +1 -1
- package/dist/{chunk-OFNXRI4L.js → chunk-IDUGP4V7.js} +3 -3
- package/dist/{chunk-OFNXRI4L.js.map → chunk-IDUGP4V7.js.map} +1 -1
- package/dist/{chunk-ANWHAGM7.js → chunk-JAJG4G5E.js} +3 -3
- package/dist/{chunk-ANWHAGM7.js.map → chunk-JAJG4G5E.js.map} +1 -1
- package/dist/{chunk-PU5VY7KF.js → chunk-JCATNLY3.js} +4 -4
- package/dist/{chunk-PU5VY7KF.js.map → chunk-JCATNLY3.js.map} +1 -1
- package/dist/{chunk-77GKEZ2R.js → chunk-JEA32KB6.js} +3 -3
- package/dist/{chunk-77GKEZ2R.js.map → chunk-JEA32KB6.js.map} +1 -1
- package/dist/{chunk-7Y43UXKA.js → chunk-JELTQ4H7.js} +3 -3
- package/dist/{chunk-7Y43UXKA.js.map → chunk-JELTQ4H7.js.map} +1 -1
- package/dist/{chunk-R3QW7CA5.js → chunk-JF26V3BC.js} +7 -7
- package/dist/chunk-JF26V3BC.js.map +1 -0
- package/dist/{chunk-XOTJVCJB.js → chunk-JKWU6ULI.js} +3 -3
- package/dist/{chunk-XOTJVCJB.js.map → chunk-JKWU6ULI.js.map} +1 -1
- package/dist/{chunk-ARUJBGAH.js → chunk-KXTO7HON.js} +3 -3
- package/dist/{chunk-ARUJBGAH.js.map → chunk-KXTO7HON.js.map} +1 -1
- package/dist/{chunk-2QZG5VJQ.js → chunk-LAI7X6I2.js} +3 -3
- package/dist/{chunk-2QZG5VJQ.js.map → chunk-LAI7X6I2.js.map} +1 -1
- package/dist/{chunk-YANDJSMN.js → chunk-LFMX2UEF.js} +3 -3
- package/dist/{chunk-YANDJSMN.js.map → chunk-LFMX2UEF.js.map} +1 -1
- package/dist/{chunk-BUNBKRJZ.js → chunk-LUBS5DXY.js} +3 -3
- package/dist/{chunk-BUNBKRJZ.js.map → chunk-LUBS5DXY.js.map} +1 -1
- package/dist/{chunk-TLKM4M47.js → chunk-MFHKHXDE.js} +6 -3
- package/dist/chunk-MFHKHXDE.js.map +1 -0
- package/dist/chunk-NESV47MF.js +20 -0
- package/dist/chunk-NESV47MF.js.map +1 -0
- package/dist/{chunk-6OWIEFZ2.js → chunk-OANSNVCP.js} +5 -5
- package/dist/{chunk-6OWIEFZ2.js.map → chunk-OANSNVCP.js.map} +1 -1
- package/dist/{chunk-MGHUSFYQ.js → chunk-ONWTPXVU.js} +8 -8
- package/dist/{chunk-MGHUSFYQ.js.map → chunk-ONWTPXVU.js.map} +1 -1
- package/dist/{chunk-DD3OZLRD.js → chunk-OXE5A6H6.js} +3 -3
- package/dist/{chunk-DD3OZLRD.js.map → chunk-OXE5A6H6.js.map} +1 -1
- package/dist/{chunk-BIMEKYOE.js → chunk-QEXEHXX5.js} +15 -18
- package/dist/chunk-QEXEHXX5.js.map +1 -0
- package/dist/{chunk-TVJBJLXR.js → chunk-QK756IRJ.js} +13 -13
- package/dist/{chunk-TVJBJLXR.js.map → chunk-QK756IRJ.js.map} +1 -1
- package/dist/{chunk-UDBN3LZU.js → chunk-RD6GE4HU.js} +4 -4
- package/dist/{chunk-UDBN3LZU.js.map → chunk-RD6GE4HU.js.map} +1 -1
- package/dist/{chunk-IOUIC2ZD.js → chunk-SQBPE66C.js} +8 -8
- package/dist/{chunk-IOUIC2ZD.js.map → chunk-SQBPE66C.js.map} +1 -1
- package/dist/{chunk-YRF5CYHR.js → chunk-SR4RFKHM.js} +36 -5
- package/dist/chunk-SR4RFKHM.js.map +1 -0
- package/dist/{chunk-BWOLP6KQ.js → chunk-U6ORGQHZ.js} +3 -3
- package/dist/{chunk-BWOLP6KQ.js.map → chunk-U6ORGQHZ.js.map} +1 -1
- package/dist/{chunk-RXPC4KBW.js → chunk-UAAAERXI.js} +3 -3
- package/dist/{chunk-RXPC4KBW.js.map → chunk-UAAAERXI.js.map} +1 -1
- package/dist/chunk-UKDFOOEG.js +22 -0
- package/dist/chunk-UKDFOOEG.js.map +1 -0
- package/dist/{chunk-6ZCVROWW.js → chunk-UNRZCQD4.js} +6 -6
- package/dist/{chunk-6ZCVROWW.js.map → chunk-UNRZCQD4.js.map} +1 -1
- package/dist/{chunk-ZSFTCMZL.js → chunk-VETH6MDG.js} +19 -19
- package/dist/{chunk-ZSFTCMZL.js.map → chunk-VETH6MDG.js.map} +1 -1
- package/dist/{chunk-4YE7OYTB.js → chunk-VKSA2CDJ.js} +5 -6
- package/dist/chunk-VKSA2CDJ.js.map +1 -0
- package/dist/{chunk-OABIGSUY.js → chunk-WX74MVNA.js} +2 -2
- package/dist/chunk-WX74MVNA.js.map +1 -0
- package/dist/{chunk-U6K3I3AX.js → chunk-XGIS325V.js} +3 -3
- package/dist/{chunk-U6K3I3AX.js.map → chunk-XGIS325V.js.map} +1 -1
- package/dist/{chunk-FJTC5YFO.js → chunk-XMQAV6T3.js} +3 -3
- package/dist/{chunk-FJTC5YFO.js.map → chunk-XMQAV6T3.js.map} +1 -1
- package/dist/{chunk-B4J4RGNY.js → chunk-Y5OCUOXF.js} +34 -19
- package/dist/chunk-Y5OCUOXF.js.map +1 -0
- package/dist/{chunk-LZ5RH6LD.js → chunk-Y7UBRRKG.js} +89 -128
- package/dist/chunk-Y7UBRRKG.js.map +1 -0
- package/dist/{chunk-PHKFFJ4I.js → chunk-ZIYYMR6Y.js} +3 -3
- package/dist/{chunk-PHKFFJ4I.js.map → chunk-ZIYYMR6Y.js.map} +1 -1
- package/dist/{chunk-JPR7EPIM.js → chunk-ZUZ5LLZ2.js} +4 -4
- package/dist/{chunk-JPR7EPIM.js.map → chunk-ZUZ5LLZ2.js.map} +1 -1
- package/dist/cli/index.js +796 -583
- 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-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +33 -3
- package/dist/cli/src/commands/catalog.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 +57 -1
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts +3 -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/skailify-lib.d.ts +3 -2
- package/dist/cli/src/commands/skailify-lib.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/setup.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +21 -0
- package/dist/cli/src/skill-checks.d.ts.map +1 -0
- package/dist/cli/src/spinner.d.ts +24 -0
- package/dist/cli/src/spinner.d.ts.map +1 -0
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +15 -15
- package/dist/{connectors-GUN4MRWR.js → connectors-OB3OAZTK.js} +18 -18
- package/dist/{connectors-GUN4MRWR.js.map → connectors-OB3OAZTK.js.map} +1 -1
- package/dist/core/index.js +8 -8
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +6 -6
- package/dist/core/src/asset-roots.d.ts +8 -0
- package/dist/core/src/asset-roots.d.ts.map +1 -1
- package/dist/core/src/cache-paths.d.ts +6 -0
- package/dist/core/src/cache-paths.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/core/src/models.d.ts +7 -0
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/publish-manifest.d.ts +26 -2
- package/dist/core/src/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +5 -5
- package/dist/deploy/index.js +8 -8
- package/dist/discovery/index.js +4 -4
- 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/hash.d.ts +45 -23
- package/dist/discovery/src/hash.d.ts.map +1 -1
- package/dist/discovery/src/index.d.ts +2 -0
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/parse-manifest.d.ts +27 -0
- package/dist/discovery/src/parse-manifest.d.ts.map +1 -0
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-VCPA762L.js → ensure-sources-Z3KKLEM6.js} +16 -16
- package/dist/{ensure-sources-VCPA762L.js.map → ensure-sources-Z3KKLEM6.js.map} +1 -1
- package/dist/factory-assets/README.md +2 -2
- package/dist/factory-assets/connectors/box.js +15 -15
- package/dist/factory-assets/connectors/deploy.js +15 -15
- package/dist/factory-assets/connectors/devserver.js +15 -15
- package/dist/factory-assets/connectors/flow/adapter.js +15 -15
- package/dist/factory-assets/connectors/flow/engine.js +9 -9
- package/dist/factory-assets/connectors/flow/run-flow.js +17 -17
- package/dist/factory-assets/connectors/flow.js +15 -15
- package/dist/factory-assets/connectors/git.js +15 -15
- package/dist/factory-assets/connectors/gmail.js +15 -15
- package/dist/factory-assets/connectors/googledrive.js +15 -15
- package/dist/factory-assets/connectors/local.js +15 -15
- package/dist/factory-assets/connectors/mattermost.js +15 -15
- package/dist/factory-assets/connectors/memory.js +15 -15
- package/dist/factory-assets/connectors/minio.js +15 -15
- package/dist/factory-assets/connectors/postgres.js +15 -15
- package/dist/factory-assets/connectors/s3.js +15 -15
- package/dist/factory-assets/connectors/sharepoint.js +15 -15
- package/dist/factory-assets/connectors/sqlite.js +15 -15
- package/dist/factory-assets/connectors/static-server.js +15 -15
- package/dist/factory-assets/connectors/tunnel.js +15 -15
- package/dist/factory-assets/connectors/webdav.js +15 -15
- package/dist/factory-assets/connectors/xstate-store.js +15 -15
- package/dist/factory-assets/connectors/xstate.js +15 -15
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +17 -15
- package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +20 -17
- package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +82 -71
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +17 -11
- package/dist/factory-assets/skills/skailify/SKILL.md +8 -4
- package/dist/{flows-BOB5YA5R.js → flows-DTADYIXH.js} +13 -13
- package/dist/{flows-BOB5YA5R.js.map → flows-DTADYIXH.js.map} +1 -1
- package/dist/{helpers-ZGK4R5MZ.js → helpers-F2RFRT5D.js} +16 -16
- package/dist/{helpers-ZGK4R5MZ.js.map → helpers-F2RFRT5D.js.map} +1 -1
- package/dist/library/index.js +11 -11
- package/dist/library/install.js +3 -2
- package/dist/library/src/config.d.ts +5 -4
- package/dist/library/src/config.d.ts.map +1 -1
- package/dist/library/src/index.d.ts +1 -1
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
- package/dist/library/src/local/install-library-asset.d.ts +3 -2
- package/dist/library/src/local/install-library-asset.d.ts.map +1 -1
- package/dist/library/src/local/library.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts +6 -0
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts +8 -0
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/{library-publish-RIP6NBYA.js → library-publish-62RFU74A.js} +47 -26
- package/dist/library-publish-62RFU74A.js.map +1 -0
- package/dist/{open-library-4IJTBVTR.js → open-library-NVG3CZUO.js} +19 -19
- package/dist/{open-library-4IJTBVTR.js.map → open-library-NVG3CZUO.js.map} +1 -1
- package/dist/open-registry-IYH6W6CN.js +32 -0
- package/dist/{open-registry-G5DI4RPU.js.map → open-registry-IYH6W6CN.js.map} +1 -1
- package/dist/paths-STQO4FYF.js +22 -0
- package/dist/{paths-L5XLUC3D.js.map → paths-STQO4FYF.js.map} +1 -1
- package/dist/{plugin-store-QENDYZ63.js → plugin-store-2DTEIJTG.js} +10 -10
- package/dist/{plugin-store-QENDYZ63.js.map → plugin-store-2DTEIJTG.js.map} +1 -1
- package/dist/{project-4INCIIZI.js → project-44LM6SRV.js} +18 -17
- package/dist/{project-4INCIIZI.js.map → project-44LM6SRV.js.map} +1 -1
- package/dist/resolver/index.js +9 -9
- package/dist/runner/index.js +25 -25
- package/dist/sdk/asset-manager.js +13 -13
- package/dist/sdk/bridge.js +12 -12
- package/dist/sdk/core.js +8 -8
- package/dist/sdk/flow.js +9 -9
- package/dist/sdk/index.js +25 -25
- package/dist/sdk/resolver.js +9 -9
- package/dist/sdk/runner.js +25 -25
- package/dist/secrets/index.js +2 -2
- package/dist/{setup-RG4PJJUW.js → setup-4BV5ZWOZ.js} +24 -23
- package/dist/setup-4BV5ZWOZ.js.map +1 -0
- package/dist/skills-M7OU3WMP.js +26 -0
- package/dist/{skills-CL45F7AG.js.map → skills-M7OU3WMP.js.map} +1 -1
- package/dist/{source-LJOI5AXU.js → source-HTT6CXUP.js} +20 -20
- package/dist/{source-LJOI5AXU.js.map → source-HTT6CXUP.js.map} +1 -1
- package/dist/{source-manifest-publish-QEJML4VS.js → source-manifest-publish-CPXUX3CL.js} +22 -22
- package/dist/{source-manifest-publish-QEJML4VS.js.map → source-manifest-publish-CPXUX3CL.js.map} +1 -1
- package/dist/tui/index.js +25 -25
- package/dist/workspace-plugin/adapters/mcp.js +22 -22
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4YE7OYTB.js.map +0 -1
- package/dist/chunk-B4J4RGNY.js.map +0 -1
- package/dist/chunk-BIMEKYOE.js.map +0 -1
- package/dist/chunk-BZXR6SW5.js +0 -15
- package/dist/chunk-EOGNW74K.js.map +0 -1
- package/dist/chunk-KGGT6MUM.js.map +0 -1
- package/dist/chunk-L257BENF.js.map +0 -1
- package/dist/chunk-LZ5RH6LD.js.map +0 -1
- package/dist/chunk-OABIGSUY.js.map +0 -1
- package/dist/chunk-P2EM6FNQ.js.map +0 -1
- package/dist/chunk-R3QW7CA5.js.map +0 -1
- package/dist/chunk-TLKM4M47.js.map +0 -1
- package/dist/chunk-YRF5CYHR.js.map +0 -1
- package/dist/library-publish-RIP6NBYA.js.map +0 -1
- package/dist/open-registry-G5DI4RPU.js +0 -32
- package/dist/paths-L5XLUC3D.js +0 -22
- package/dist/setup-RG4PJJUW.js.map +0 -1
- package/dist/skills-CL45F7AG.js +0 -26
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AssetKindRegistryFrozenError, AssetKindConflictError, AssetKindPatternConflictError, AssetKindPathAmbiguityError } from './chunk-ZDKJHQY2.js';
|
|
2
|
-
import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-
|
|
2
|
+
import { sha256Hex, decodeSkaileManifest, SKAILE_MANIFEST_FILENAME, compositeSha256 } from './chunk-SR4RFKHM.js';
|
|
3
3
|
import { readPluginGroupings } from './chunk-RVRB27AN.js';
|
|
4
|
-
import { parseFrontmatter } from './chunk-
|
|
5
|
-
import { isValidAssetName } from './chunk-
|
|
4
|
+
import { parseFrontmatter } from './chunk-LFMX2UEF.js';
|
|
5
|
+
import { isValidAssetName } from './chunk-WX74MVNA.js';
|
|
6
6
|
import { validatePersona, validateRuleset, validateSkill, validateAgent, validateConnector, validateMcpServer, validateContract, validatePrompt, validatePreset } from './chunk-5CYEWBPB.js';
|
|
7
7
|
import * as fs from 'fs';
|
|
8
8
|
import * as path from 'path';
|
|
9
9
|
import * as yaml from 'js-yaml';
|
|
10
|
-
import * as crypto from 'crypto';
|
|
11
10
|
import * as z from 'zod';
|
|
12
11
|
|
|
13
12
|
// discovery/src/asset-kind-registry.ts
|
|
@@ -509,43 +508,66 @@ var BUILTIN_PROVIDERS = [
|
|
|
509
508
|
// Composition entity (discoverable, not in AssetKind enum)
|
|
510
509
|
presetProvider
|
|
511
510
|
];
|
|
512
|
-
function
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
try {
|
|
518
|
-
hash.update(file);
|
|
519
|
-
hash.update("\0");
|
|
520
|
-
const content = fs.readFileSync(fullPath);
|
|
521
|
-
hash.update(content);
|
|
522
|
-
hash.update("\0");
|
|
523
|
-
} catch {
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return hash.digest("hex");
|
|
511
|
+
function repoRelativePath(assetRootRelative, file) {
|
|
512
|
+
return path.posix.join(assetRootRelative.replace(/\\/g, "/"), file.replace(/\\/g, "/"));
|
|
513
|
+
}
|
|
514
|
+
function hashRows(rows) {
|
|
515
|
+
return compositeSha256(rows);
|
|
527
516
|
}
|
|
528
|
-
function computeDeterministicHashDetailed(assetRoot, files) {
|
|
529
|
-
const
|
|
530
|
-
const sorted = [...files].sort();
|
|
517
|
+
function computeDeterministicHashDetailed(assetRoot, files, assetRootRelative = "") {
|
|
518
|
+
const rows = [];
|
|
531
519
|
const present = [];
|
|
532
520
|
const missing = [];
|
|
533
|
-
for (const file of
|
|
534
|
-
|
|
535
|
-
let content = null;
|
|
521
|
+
for (const file of [...files].sort()) {
|
|
522
|
+
let content;
|
|
536
523
|
try {
|
|
537
|
-
content = fs.readFileSync(
|
|
524
|
+
content = fs.readFileSync(path.join(assetRoot, file));
|
|
538
525
|
} catch {
|
|
539
526
|
missing.push(file);
|
|
540
527
|
continue;
|
|
541
528
|
}
|
|
542
|
-
|
|
543
|
-
hash.update("\0");
|
|
544
|
-
hash.update(content);
|
|
545
|
-
hash.update("\0");
|
|
529
|
+
rows.push({ path: repoRelativePath(assetRootRelative, file), sha256: sha256Hex(content) });
|
|
546
530
|
present.push(file);
|
|
547
531
|
}
|
|
548
|
-
return { sha256:
|
|
532
|
+
return { sha256: hashRows(rows), present, missing };
|
|
533
|
+
}
|
|
534
|
+
function computeDeterministicHash(assetRoot, files, assetRootRelative = "") {
|
|
535
|
+
return computeDeterministicHashDetailed(assetRoot, files, assetRootRelative).sha256;
|
|
536
|
+
}
|
|
537
|
+
function parseManifestFile(relativePath, text) {
|
|
538
|
+
try {
|
|
539
|
+
if (relativePath.endsWith(".md")) {
|
|
540
|
+
const { data } = parseFrontmatter(text);
|
|
541
|
+
if (!data || Object.keys(data).length === 0) {
|
|
542
|
+
return {
|
|
543
|
+
ok: false,
|
|
544
|
+
reason: "no parsable YAML frontmatter (expected a `---` block with at least one key)"
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
return { ok: true, data };
|
|
548
|
+
}
|
|
549
|
+
if (relativePath.endsWith(".yaml") || relativePath.endsWith(".yml")) {
|
|
550
|
+
const parsed = yaml.load(text);
|
|
551
|
+
if (typeof parsed === "object" && parsed !== null) {
|
|
552
|
+
return { ok: true, data: parsed };
|
|
553
|
+
}
|
|
554
|
+
return { ok: false, reason: "not a YAML mapping" };
|
|
555
|
+
}
|
|
556
|
+
if (relativePath.endsWith(".json")) {
|
|
557
|
+
const parsed = JSON.parse(text);
|
|
558
|
+
if (typeof parsed === "object" && parsed !== null) {
|
|
559
|
+
return { ok: true, data: parsed };
|
|
560
|
+
}
|
|
561
|
+
return { ok: false, reason: "not a JSON object" };
|
|
562
|
+
}
|
|
563
|
+
return { ok: false, reason: "unsupported manifest file type" };
|
|
564
|
+
} catch (e) {
|
|
565
|
+
return { ok: false, reason: e instanceof Error ? e.message : String(e) };
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
function parseManifestText(relativePath, text) {
|
|
569
|
+
const res = parseManifestFile(relativePath, text);
|
|
570
|
+
return res.ok ? res.data : null;
|
|
549
571
|
}
|
|
550
572
|
var SEMVER_RE = /^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?(?:\+[a-zA-Z0-9.-]+)?$/;
|
|
551
573
|
var PublisherOverrideSchema = z.object({
|
|
@@ -929,7 +951,8 @@ function processEntry(rootPath, entry, registry) {
|
|
|
929
951
|
}
|
|
930
952
|
const { sha256: computedHash, missing: hashMissing } = computeDeterministicHashDetailed(
|
|
931
953
|
assetRoot,
|
|
932
|
-
files
|
|
954
|
+
files,
|
|
955
|
+
assetRootRelative
|
|
933
956
|
);
|
|
934
957
|
if (hashMissing.length > 0) {
|
|
935
958
|
errors.push({
|
|
@@ -1042,23 +1065,7 @@ function expandRootFiles(assetRoot) {
|
|
|
1042
1065
|
}
|
|
1043
1066
|
function parseManifest(absPath) {
|
|
1044
1067
|
try {
|
|
1045
|
-
|
|
1046
|
-
if (absPath.endsWith(".md")) {
|
|
1047
|
-
const { data } = parseFrontmatter(content);
|
|
1048
|
-
if (!data || Object.keys(data).length === 0) return null;
|
|
1049
|
-
return data;
|
|
1050
|
-
}
|
|
1051
|
-
if (absPath.endsWith(".yaml") || absPath.endsWith(".yml")) {
|
|
1052
|
-
const parsed = yaml.load(content);
|
|
1053
|
-
if (typeof parsed === "object" && parsed !== null) {
|
|
1054
|
-
return parsed;
|
|
1055
|
-
}
|
|
1056
|
-
return null;
|
|
1057
|
-
}
|
|
1058
|
-
if (absPath.endsWith(".json")) {
|
|
1059
|
-
return JSON.parse(content);
|
|
1060
|
-
}
|
|
1061
|
-
return null;
|
|
1068
|
+
return parseManifestText(absPath, fs.readFileSync(absPath, "utf-8"));
|
|
1062
1069
|
} catch {
|
|
1063
1070
|
return null;
|
|
1064
1071
|
}
|
|
@@ -1303,7 +1310,7 @@ function discoverAssetsInTree(rootPath, optionsOrSourceConfig) {
|
|
|
1303
1310
|
seen.add(dedupKey);
|
|
1304
1311
|
processDiscoveredEntry(
|
|
1305
1312
|
{ absPath, relativePath, kind },
|
|
1306
|
-
{ registry, sourceConfig, atomization, fallbackPublisher },
|
|
1313
|
+
{ registry, sourceConfig, atomization, fallbackPublisher, rootPath },
|
|
1307
1314
|
{ assets, errors, warnings, allEdges }
|
|
1308
1315
|
);
|
|
1309
1316
|
}
|
|
@@ -1365,7 +1372,10 @@ function processDiscoveredEntry(entry, ctx, acc) {
|
|
|
1365
1372
|
try {
|
|
1366
1373
|
const manifest = parseManifest2(absPath);
|
|
1367
1374
|
if (!manifest) {
|
|
1368
|
-
acc.errors.push({
|
|
1375
|
+
acc.errors.push({
|
|
1376
|
+
path: relativePath,
|
|
1377
|
+
error: `ManifestSchemaError: failed to parse manifest file ${relativePath}`
|
|
1378
|
+
});
|
|
1369
1379
|
return;
|
|
1370
1380
|
}
|
|
1371
1381
|
const publisher = resolvePublisher(relativePath, sourceConfig, ctx.fallbackPublisher);
|
|
@@ -1377,7 +1387,11 @@ function processDiscoveredEntry(entry, ctx, acc) {
|
|
|
1377
1387
|
files: [path.basename(absPath)]
|
|
1378
1388
|
};
|
|
1379
1389
|
applyAtomizationPolicy(atomization, relativePath, fileFilter, registry, acc.warnings);
|
|
1380
|
-
const sha256 = computeDeterministicHash(
|
|
1390
|
+
const sha256 = computeDeterministicHash(
|
|
1391
|
+
fileFilter.assetRoot,
|
|
1392
|
+
fileFilter.files,
|
|
1393
|
+
path.relative(ctx.rootPath, fileFilter.assetRoot)
|
|
1394
|
+
);
|
|
1381
1395
|
const requires = registry.extractRequires(kind, ref, manifest);
|
|
1382
1396
|
acc.allEdges.push(...requires);
|
|
1383
1397
|
acc.assets.push({
|
|
@@ -1480,23 +1494,7 @@ function* walkTree(rootDir) {
|
|
|
1480
1494
|
}
|
|
1481
1495
|
function parseManifest2(absPath) {
|
|
1482
1496
|
try {
|
|
1483
|
-
|
|
1484
|
-
if (absPath.endsWith(".md")) {
|
|
1485
|
-
const { data } = parseFrontmatter(content);
|
|
1486
|
-
if (!data || Object.keys(data).length === 0) return null;
|
|
1487
|
-
return data;
|
|
1488
|
-
}
|
|
1489
|
-
if (absPath.endsWith(".yaml") || absPath.endsWith(".yml")) {
|
|
1490
|
-
const parsed = yaml.load(content);
|
|
1491
|
-
if (typeof parsed === "object" && parsed !== null) {
|
|
1492
|
-
return parsed;
|
|
1493
|
-
}
|
|
1494
|
-
return null;
|
|
1495
|
-
}
|
|
1496
|
-
if (absPath.endsWith(".json")) {
|
|
1497
|
-
return JSON.parse(content);
|
|
1498
|
-
}
|
|
1499
|
-
return null;
|
|
1497
|
+
return parseManifestText(absPath, fs.readFileSync(absPath, "utf-8"));
|
|
1500
1498
|
} catch {
|
|
1501
1499
|
return null;
|
|
1502
1500
|
}
|
|
@@ -1649,7 +1647,10 @@ async function buildAssetFromBlob(relativePath, kind, blobByPath, fetchBlob, res
|
|
|
1649
1647
|
const manifestText = manifestBytes.toString("utf-8");
|
|
1650
1648
|
const manifest = parseManifestText(relativePath, manifestText);
|
|
1651
1649
|
if (!manifest) {
|
|
1652
|
-
errors.push({
|
|
1650
|
+
errors.push({
|
|
1651
|
+
path: relativePath,
|
|
1652
|
+
error: `ManifestSchemaError: failed to parse manifest file ${relativePath}`
|
|
1653
|
+
});
|
|
1653
1654
|
return null;
|
|
1654
1655
|
}
|
|
1655
1656
|
const publisher = resolvePublisher2(relativePath, resolvedSourceConfig, fallbackPublisher);
|
|
@@ -1669,7 +1670,12 @@ async function buildAssetFromBlob(relativePath, kind, blobByPath, fetchBlob, res
|
|
|
1669
1670
|
);
|
|
1670
1671
|
let sha256;
|
|
1671
1672
|
try {
|
|
1672
|
-
sha256 = await computeDeterministicHashFromTree(
|
|
1673
|
+
sha256 = await computeDeterministicHashFromTree(
|
|
1674
|
+
fileFilter.assetRoot,
|
|
1675
|
+
fileFilter.files,
|
|
1676
|
+
blobByPath,
|
|
1677
|
+
fetchBlob
|
|
1678
|
+
);
|
|
1673
1679
|
} catch (err) {
|
|
1674
1680
|
errors.push({
|
|
1675
1681
|
path: relativePath,
|
|
@@ -1695,28 +1701,6 @@ async function buildAssetFromBlob(relativePath, kind, blobByPath, fetchBlob, res
|
|
|
1695
1701
|
requires
|
|
1696
1702
|
};
|
|
1697
1703
|
}
|
|
1698
|
-
function parseManifestText(relativePath, text) {
|
|
1699
|
-
try {
|
|
1700
|
-
if (relativePath.endsWith(".md")) {
|
|
1701
|
-
const { data } = parseFrontmatter(text);
|
|
1702
|
-
if (!data || Object.keys(data).length === 0) return null;
|
|
1703
|
-
return data;
|
|
1704
|
-
}
|
|
1705
|
-
if (relativePath.endsWith(".yaml") || relativePath.endsWith(".yml")) {
|
|
1706
|
-
const parsed = yaml.load(text);
|
|
1707
|
-
if (typeof parsed === "object" && parsed !== null) {
|
|
1708
|
-
return parsed;
|
|
1709
|
-
}
|
|
1710
|
-
return null;
|
|
1711
|
-
}
|
|
1712
|
-
if (relativePath.endsWith(".json")) {
|
|
1713
|
-
return JSON.parse(text);
|
|
1714
|
-
}
|
|
1715
|
-
return null;
|
|
1716
|
-
} catch {
|
|
1717
|
-
return null;
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
1704
|
function resolvePublisher2(relativePath, sourceConfig, fallbackPublisher) {
|
|
1721
1705
|
if (sourceConfig) {
|
|
1722
1706
|
for (const override of sourceConfig.publisher_overrides) {
|
|
@@ -1829,25 +1813,17 @@ function connectorFilterVirtual(dir, manifestName, blobByPath) {
|
|
|
1829
1813
|
if (blobByPath.has(joinPosix(dir, "adapter.ts"))) files.add("adapter.ts");
|
|
1830
1814
|
return { assetRoot: dir, files: [...files].sort() };
|
|
1831
1815
|
}
|
|
1832
|
-
async function computeDeterministicHashFromTree(
|
|
1833
|
-
const
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1836
|
-
const fullPath = joinPosix(fileFilter.assetRoot, file);
|
|
1816
|
+
async function computeDeterministicHashFromTree(assetRoot, files, blobByPath, fetchBlob) {
|
|
1817
|
+
const rows = [];
|
|
1818
|
+
for (const file of [...files].sort()) {
|
|
1819
|
+
const fullPath = joinPosix(assetRoot, file);
|
|
1837
1820
|
const entry = blobByPath.get(fullPath);
|
|
1838
1821
|
if (!entry) continue;
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
try {
|
|
1843
|
-
bytes = await fetchAsBuffer(fetchBlob, entry.sha);
|
|
1844
|
-
} catch {
|
|
1845
|
-
bytes = null;
|
|
1846
|
-
}
|
|
1847
|
-
if (bytes) hash.update(bytes);
|
|
1848
|
-
hash.update("\0");
|
|
1822
|
+
const bytes = await fetchAsBuffer(fetchBlob, entry.sha);
|
|
1823
|
+
if (!bytes) throw new Error(`blob for ${fullPath} could not be fetched`);
|
|
1824
|
+
rows.push({ path: path.posix.normalize(fullPath), sha256: sha256Hex(bytes) });
|
|
1849
1825
|
}
|
|
1850
|
-
return
|
|
1826
|
+
return hashRows(rows);
|
|
1851
1827
|
}
|
|
1852
1828
|
var TREE_SCANNABLE_EXT = /* @__PURE__ */ new Set([".md", ".mdx", ".markdown", ".txt"]);
|
|
1853
1829
|
async function prefetchAssetText(assetRoot, blobByPath, fetchBlob) {
|
|
@@ -2138,7 +2114,7 @@ async function fetchAndParseManifestTree(manifestFull, manifestFileRel, assetRoo
|
|
|
2138
2114
|
async function computeAndVerifyHashTree(entry, files, assetRootRelative, blobByPath, fetchBlob, errors, warnings) {
|
|
2139
2115
|
let computedHash;
|
|
2140
2116
|
try {
|
|
2141
|
-
computedHash = await
|
|
2117
|
+
computedHash = await computeDeterministicHashFromTree(entry.path, files, blobByPath, fetchBlob);
|
|
2142
2118
|
} catch (err) {
|
|
2143
2119
|
errors.push({
|
|
2144
2120
|
path: assetRootRelative,
|
|
@@ -2200,21 +2176,6 @@ function expandRootFilesTree(assetPath, blobByPath) {
|
|
|
2200
2176
|
}
|
|
2201
2177
|
return out.sort();
|
|
2202
2178
|
}
|
|
2203
|
-
async function computeManifestHashTree(assetPath, files, blobByPath, fetchBlob) {
|
|
2204
|
-
const hash = crypto.createHash("sha256");
|
|
2205
|
-
const sorted = [...files].sort();
|
|
2206
|
-
for (const file of sorted) {
|
|
2207
|
-
const full = joinPosix(assetPath, file);
|
|
2208
|
-
const blob = blobByPath.get(full);
|
|
2209
|
-
if (!blob) continue;
|
|
2210
|
-
hash.update(file);
|
|
2211
|
-
hash.update("\0");
|
|
2212
|
-
const bytes = await fetchAsBuffer(fetchBlob, blob.sha);
|
|
2213
|
-
if (bytes) hash.update(bytes);
|
|
2214
|
-
hash.update("\0");
|
|
2215
|
-
}
|
|
2216
|
-
return hash.digest("hex");
|
|
2217
|
-
}
|
|
2218
2179
|
function validateRequiresSyntax2(requires) {
|
|
2219
2180
|
const errors = [];
|
|
2220
2181
|
const RE = /^@[\w-]+\/[\w.-]+(?:@.+)?$/;
|
|
@@ -2227,6 +2188,6 @@ function validateRequiresSyntax2(requires) {
|
|
|
2227
2188
|
// discovery/src/index.ts
|
|
2228
2189
|
var VERSION = "0.0.0";
|
|
2229
2190
|
|
|
2230
|
-
export { AGENT_COMPANION_DIRS, AssetKindRegistry, BUILTIN_PROVIDERS, DEFAULT_ATOMIZATION_POLICY, SEMVER_RE, SKILL_COMPANION_DIRS, SourceConfigSchema, VERSION, agentProvider, barePublisher, buildRequiresGraph, closeOverReferences, computeDeterministicHash, computeDeterministicHashDetailed, connectorProvider, contractProvider, createDefaultRegistry, createNodeAssetFs, decodeManifestSourceConfig, detectCycles, discoverAssetsInTree, discoverAssetsInTreeEntries, discoverFromManifest, extractPathCandidates, extractRequires, extractSlashCommands, isExcludedDevPath, isManifestMode, lintUncoveredReferences, loadMergedSourceConfig, loadMergedSourceConfigFromFile, loadSourceConfig, manifestToSourceConfig, mcpServerProvider, mergeSourceConfigs, parseSourceConfig, personaProvider, presetProvider, promptProvider, readManifestSourceConfig, rulesetProvider, scanAssetReferences, scanSlashCommandNames, sharesItsFolder, skillProvider, validateSourceConfig };
|
|
2231
|
-
//# sourceMappingURL=chunk-
|
|
2232
|
-
//# sourceMappingURL=chunk-
|
|
2191
|
+
export { AGENT_COMPANION_DIRS, AssetKindRegistry, BUILTIN_PROVIDERS, DEFAULT_ATOMIZATION_POLICY, SEMVER_RE, SKILL_COMPANION_DIRS, SourceConfigSchema, VERSION, agentProvider, barePublisher, buildRequiresGraph, closeOverReferences, computeDeterministicHash, computeDeterministicHashDetailed, connectorProvider, contractProvider, createDefaultRegistry, createNodeAssetFs, decodeManifestSourceConfig, detectCycles, discoverAssetsInTree, discoverAssetsInTreeEntries, discoverFromManifest, extractPathCandidates, extractRequires, extractSlashCommands, isExcludedDevPath, isManifestMode, lintUncoveredReferences, loadMergedSourceConfig, loadMergedSourceConfigFromFile, loadSourceConfig, manifestToSourceConfig, mcpServerProvider, mergeSourceConfigs, parseManifestFile, parseSourceConfig, personaProvider, presetProvider, promptProvider, readManifestSourceConfig, rulesetProvider, scanAssetReferences, scanSlashCommandNames, sharesItsFolder, skillProvider, validateSourceConfig };
|
|
2192
|
+
//# sourceMappingURL=chunk-Y7UBRRKG.js.map
|
|
2193
|
+
//# sourceMappingURL=chunk-Y7UBRRKG.js.map
|