@skaile/workspaces 1.4.0 → 1.5.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 +273 -0
- package/dist/app-sdk/index.js +241 -55
- package/dist/app-sdk/index.js.map +1 -1
- package/dist/app-sdk/src/app.d.ts +55 -4
- package/dist/app-sdk/src/app.d.ts.map +1 -1
- package/dist/app-sdk/src/connection-params.d.ts +117 -0
- package/dist/app-sdk/src/connection-params.d.ts.map +1 -0
- package/dist/app-sdk/src/index.d.ts +3 -2
- package/dist/app-sdk/src/index.d.ts.map +1 -1
- package/dist/app-sdk/src/transport.d.ts +9 -0
- package/dist/app-sdk/src/transport.d.ts.map +1 -1
- package/dist/app-sdk/src/ws-transport.d.ts +18 -2
- package/dist/app-sdk/src/ws-transport.d.ts.map +1 -1
- package/dist/{asset-feeds-NG5TKB3V.js → asset-feeds-T35ELX2O.js} +9 -9
- package/dist/{asset-feeds-NG5TKB3V.js.map → asset-feeds-T35ELX2O.js.map} +1 -1
- package/dist/asset-manager/index.js +11 -6
- package/dist/asset-manager/installer.js +5 -5
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/{chunk-BE5KTS2L.js → chunk-2DWXGUZA.js} +2 -2
- package/dist/{chunk-BE5KTS2L.js.map → chunk-2DWXGUZA.js.map} +1 -1
- package/dist/{chunk-XBG2YDQQ.js → chunk-2ZMO4CFG.js} +3 -3
- package/dist/{chunk-XBG2YDQQ.js.map → chunk-2ZMO4CFG.js.map} +1 -1
- package/dist/{chunk-X57AMTAH.js → chunk-3CHARYD4.js} +16 -7
- package/dist/chunk-3CHARYD4.js.map +1 -0
- package/dist/{chunk-LCTRCWBK.js → chunk-6NR2BEIY.js} +4 -4
- package/dist/{chunk-LCTRCWBK.js.map → chunk-6NR2BEIY.js.map} +1 -1
- package/dist/{chunk-AAGD2J4H.js → chunk-BGIC25VK.js} +11 -9
- package/dist/chunk-BGIC25VK.js.map +1 -0
- package/dist/{chunk-JZPEEMIM.js → chunk-CNSNN7N6.js} +5 -5
- package/dist/{chunk-JZPEEMIM.js.map → chunk-CNSNN7N6.js.map} +1 -1
- package/dist/{chunk-GWDZW44L.js → chunk-DMG6NJH7.js} +4 -4
- package/dist/{chunk-GWDZW44L.js.map → chunk-DMG6NJH7.js.map} +1 -1
- package/dist/{chunk-HWTQ6HPO.js → chunk-FDE7XRQA.js} +56 -8
- package/dist/chunk-FDE7XRQA.js.map +1 -0
- package/dist/{chunk-26YCXWCU.js → chunk-HY33RMEA.js} +3 -3
- package/dist/{chunk-26YCXWCU.js.map → chunk-HY33RMEA.js.map} +1 -1
- package/dist/chunk-J5TI55E7.js +203 -0
- package/dist/chunk-J5TI55E7.js.map +1 -0
- package/dist/chunk-JIDKX7GC.js +122 -0
- package/dist/chunk-JIDKX7GC.js.map +1 -0
- package/dist/{chunk-BDUANIAR.js → chunk-KEQ4GLVM.js} +3 -3
- package/dist/{chunk-BDUANIAR.js.map → chunk-KEQ4GLVM.js.map} +1 -1
- package/dist/{chunk-DNFIKRO6.js → chunk-KMY7HVQ6.js} +3 -3
- package/dist/{chunk-DNFIKRO6.js.map → chunk-KMY7HVQ6.js.map} +1 -1
- package/dist/{chunk-B6SSXVF2.js → chunk-MZV6WCF3.js} +81 -49
- package/dist/chunk-MZV6WCF3.js.map +1 -0
- package/dist/{chunk-DZCK7GRW.js → chunk-P4VHQA4N.js} +22 -6
- package/dist/chunk-P4VHQA4N.js.map +1 -0
- package/dist/{chunk-OSCJRUKM.js → chunk-RDYOU6N6.js} +2 -2
- package/dist/{chunk-OSCJRUKM.js.map → chunk-RDYOU6N6.js.map} +1 -1
- package/dist/{chunk-77OXU44H.js → chunk-RSYV7XEN.js} +13 -7
- package/dist/chunk-RSYV7XEN.js.map +1 -0
- package/dist/{chunk-OUWNTFDG.js → chunk-UQKYT4V6.js} +38 -6
- package/dist/chunk-UQKYT4V6.js.map +1 -0
- package/dist/chunk-WYGXYGJH.js +688 -0
- package/dist/chunk-WYGXYGJH.js.map +1 -0
- package/dist/{chunk-TJRWGMD2.js → chunk-ZBZQC5R7.js} +3 -3
- package/dist/{chunk-TJRWGMD2.js.map → chunk-ZBZQC5R7.js.map} +1 -1
- package/dist/cli/index.js +259 -192
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +18 -0
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts +2 -2
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts +53 -0
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -0
- package/dist/cli/src/commands/preset-cmd.d.ts +6 -0
- package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-export.d.ts +10 -1
- package/dist/cli/src/commands/preset-export.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/publish-core.d.ts +75 -0
- package/dist/cli/src/commands/publish-core.d.ts.map +1 -0
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/source-manifest-publish.d.ts +82 -0
- package/dist/cli/src/commands/source-manifest-publish.d.ts.map +1 -0
- package/dist/cli/src/commands/source-manifest.d.ts +65 -6
- package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +13 -0
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/store.d.ts.map +1 -1
- package/dist/cli/src/driver-error.d.ts +12 -0
- package/dist/cli/src/driver-error.d.ts.map +1 -0
- package/dist/cli/src/open-library.d.ts +4 -0
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/cli/src/store-auth.d.ts +42 -0
- package/dist/cli/src/store-auth.d.ts.map +1 -0
- package/dist/cli/src/store-client.d.ts +20 -22
- package/dist/cli/src/store-client.d.ts.map +1 -1
- package/dist/cli/src/store-publisher.d.ts +91 -0
- package/dist/cli/src/store-publisher.d.ts.map +1 -0
- package/dist/connectors/config.js +5 -5
- package/dist/connectors/index.js +6 -6
- package/dist/core/index.js +4 -4
- package/dist/core/publish-manifest.js +1 -1
- package/dist/core/runtime-assets.js +3 -3
- package/dist/core/src/cache-paths.d.ts +17 -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/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +13 -2
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts +10 -0
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/workspace-config.js +2 -2
- package/dist/deploy/index.js +4 -4
- package/dist/discovery/index.js +2 -2
- package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
- package/dist/discovery/src/discover.d.ts +17 -4
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/index.d.ts +1 -1
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/reference-lint.d.ts +7 -0
- package/dist/discovery/src/reference-lint.d.ts.map +1 -1
- package/dist/discovery/src/source-config.d.ts +28 -0
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-CHC7X7AJ.js → ensure-sources-QDVFUIUP.js} +14 -9
- package/dist/ensure-sources-QDVFUIUP.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +6 -6
- package/dist/factory-assets/connectors/deploy.js +6 -6
- package/dist/factory-assets/connectors/devserver.js +6 -6
- package/dist/factory-assets/connectors/flow/adapter.js +6 -6
- package/dist/factory-assets/connectors/flow/engine.js +4 -4
- package/dist/factory-assets/connectors/flow/run-flow.js +7 -7
- package/dist/factory-assets/connectors/flow.js +6 -6
- package/dist/factory-assets/connectors/git.js +6 -6
- package/dist/factory-assets/connectors/gmail.js +6 -6
- package/dist/factory-assets/connectors/googledrive.js +6 -6
- package/dist/factory-assets/connectors/local.js +6 -6
- package/dist/factory-assets/connectors/mattermost.js +6 -6
- package/dist/factory-assets/connectors/memory.js +6 -6
- package/dist/factory-assets/connectors/minio.js +6 -6
- package/dist/factory-assets/connectors/postgres.js +6 -6
- package/dist/factory-assets/connectors/s3.js +6 -6
- package/dist/factory-assets/connectors/sharepoint.js +6 -6
- package/dist/factory-assets/connectors/sqlite.js +6 -6
- package/dist/factory-assets/connectors/static-server.js +6 -6
- package/dist/factory-assets/connectors/tunnel.js +6 -6
- package/dist/factory-assets/connectors/webdav.js +6 -6
- package/dist/factory-assets/connectors/xstate-store.js +6 -6
- package/dist/factory-assets/connectors/xstate.js +6 -6
- package/dist/{flows-CGOCUNO6.js → flows-MRVXTYWC.js} +3 -3
- package/dist/{flows-CGOCUNO6.js.map → flows-MRVXTYWC.js.map} +1 -1
- package/dist/{helpers-GWG4CYYC.js → helpers-TF7GCBRQ.js} +14 -9
- package/dist/{helpers-GWG4CYYC.js.map → helpers-TF7GCBRQ.js.map} +1 -1
- package/dist/library/index.js +6 -6
- 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/local/local-catalog-source.d.ts +12 -1
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/sync/manifest-writeback.d.ts +36 -0
- package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
- package/dist/library-publish-K5IBE44D.js +249 -0
- package/dist/library-publish-K5IBE44D.js.map +1 -0
- package/dist/{open-library-37PXN6MK.js → open-library-4HMIDK3N.js} +13 -13
- package/dist/{open-library-37PXN6MK.js.map → open-library-4HMIDK3N.js.map} +1 -1
- package/dist/{paths-UVOHWUPY.js → paths-P3DWFUPS.js} +7 -7
- package/dist/{paths-UVOHWUPY.js.map → paths-P3DWFUPS.js.map} +1 -1
- package/dist/{plugin-store-EIMVEH3O.js → plugin-store-S7OMGI7N.js} +6 -6
- package/dist/{plugin-store-EIMVEH3O.js.map → plugin-store-S7OMGI7N.js.map} +1 -1
- package/dist/runner/index.js +8 -8
- package/dist/runner/src/agent.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +11 -6
- package/dist/sdk/core.js +4 -4
- package/dist/sdk/flow.js +4 -4
- package/dist/sdk/index.js +8 -8
- package/dist/sdk/runner.js +8 -8
- package/dist/{setup-DINVR6ZQ.js → setup-2CCS63L6.js} +6 -6
- package/dist/{setup-DINVR6ZQ.js.map → setup-2CCS63L6.js.map} +1 -1
- package/dist/source-LOAM7IIQ.js +30 -0
- package/dist/{source-RXAHIGMD.js.map → source-LOAM7IIQ.js.map} +1 -1
- package/dist/source-manifest-publish-TGVZ6KMC.js +228 -0
- package/dist/source-manifest-publish-TGVZ6KMC.js.map +1 -0
- package/dist/tui/index.js +8 -8
- package/dist/workspace-plugin/adapters/mcp.js +1 -1
- package/dist/workspace-plugin/adapters/omp.js +3 -3
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-77OXU44H.js.map +0 -1
- package/dist/chunk-AAGD2J4H.js.map +0 -1
- package/dist/chunk-B6SSXVF2.js.map +0 -1
- package/dist/chunk-BJHZHNKR.js +0 -93
- package/dist/chunk-BJHZHNKR.js.map +0 -1
- package/dist/chunk-DZCK7GRW.js.map +0 -1
- package/dist/chunk-HWTQ6HPO.js.map +0 -1
- package/dist/chunk-OUWNTFDG.js.map +0 -1
- package/dist/chunk-QM2TT2PJ.js +0 -385
- package/dist/chunk-QM2TT2PJ.js.map +0 -1
- package/dist/chunk-X57AMTAH.js.map +0 -1
- package/dist/ensure-sources-CHC7X7AJ.js.map +0 -1
- package/dist/source-RXAHIGMD.js +0 -30
- package/dist/store-client-T3F663YG.js +0 -15
- package/dist/store-client-T3F663YG.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AssetKindRegistryFrozenError, AssetKindConflictError, AssetKindPatternConflictError, AssetKindPathAmbiguityError } from './chunk-JXT46QFC.js';
|
|
2
|
-
import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-
|
|
2
|
+
import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-P4VHQA4N.js';
|
|
3
3
|
import { parseFrontmatter } from './chunk-BQCGFPHW.js';
|
|
4
4
|
import { isValidAssetName } from './chunk-GEEW6SY2.js';
|
|
5
5
|
import { validatePersona, validateRuleset, validateSkill, validateAgent, validateConnector, validateMcpServer, validateContract, validatePrompt, validatePreset } from './chunk-IRORTHGA.js';
|
|
@@ -656,6 +656,9 @@ function collectWarnings(config) {
|
|
|
656
656
|
}
|
|
657
657
|
return warnings;
|
|
658
658
|
}
|
|
659
|
+
function barePublisher(publisher) {
|
|
660
|
+
return publisher.startsWith("@") ? publisher.slice(1) : publisher;
|
|
661
|
+
}
|
|
659
662
|
function atPublisher(publisher) {
|
|
660
663
|
return publisher.startsWith("@") ? publisher : `@${publisher}`;
|
|
661
664
|
}
|
|
@@ -768,13 +771,19 @@ function mergeSourceConfigs(base, overlay) {
|
|
|
768
771
|
return merged;
|
|
769
772
|
}
|
|
770
773
|
function loadMergedSourceConfig(rootPath, sidecarPath) {
|
|
774
|
+
return loadMergedSourceConfigFromFile(
|
|
775
|
+
rootPath,
|
|
776
|
+
sidecarPath ? path.join(sidecarPath, SKAILE_MANIFEST_FILENAME) : void 0
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
function loadMergedSourceConfigFromFile(rootPath, overlayManifestFile) {
|
|
771
780
|
const baseResult = loadSourceConfigFromDir(rootPath);
|
|
772
781
|
if (baseResult && !baseResult.ok) return baseResult;
|
|
773
782
|
const base = baseResult?.ok ? baseResult.config : void 0;
|
|
774
783
|
let overlay;
|
|
775
784
|
const overlayWarnings = [];
|
|
776
|
-
if (
|
|
777
|
-
const overlayResult =
|
|
785
|
+
if (overlayManifestFile) {
|
|
786
|
+
const overlayResult = loadSourceConfigFromFile(overlayManifestFile);
|
|
778
787
|
if (overlayResult && !overlayResult.ok) return overlayResult;
|
|
779
788
|
if (overlayResult?.ok) {
|
|
780
789
|
overlay = overlayResult.config;
|
|
@@ -799,7 +808,9 @@ function loadMergedSourceConfig(rootPath, sidecarPath) {
|
|
|
799
808
|
return warnings.length > 0 ? { ok: true, config: merged, warnings } : { ok: true, config: merged };
|
|
800
809
|
}
|
|
801
810
|
function loadSourceConfigFromDir(dir) {
|
|
802
|
-
|
|
811
|
+
return loadSourceConfigFromFile(path.join(dir, SKAILE_MANIFEST_FILENAME));
|
|
812
|
+
}
|
|
813
|
+
function loadSourceConfigFromFile(filePath) {
|
|
803
814
|
if (!fs.existsSync(filePath)) return void 0;
|
|
804
815
|
try {
|
|
805
816
|
const text = fs.readFileSync(filePath, "utf-8");
|
|
@@ -821,12 +832,14 @@ function loadSourceConfigFromDir(dir) {
|
|
|
821
832
|
function discoverFromManifest(rootPath, sourceConfig, registry, includeDev = false) {
|
|
822
833
|
const assets = [];
|
|
823
834
|
const errors = [];
|
|
835
|
+
const warnings = [];
|
|
824
836
|
const allEdges = [];
|
|
825
837
|
const devPaths = sourceConfig.dev_paths ?? [];
|
|
826
838
|
const sortedEntries = [...sourceConfig.assets].sort((a, b) => a.path < b.path ? -1 : 1);
|
|
827
839
|
for (const entry of sortedEntries) {
|
|
828
840
|
if (!includeDev && isExcludedDevPath(entry.path, devPaths)) continue;
|
|
829
841
|
const result = processEntry(rootPath, entry, registry);
|
|
842
|
+
warnings.push(...result.warnings);
|
|
830
843
|
if (result.errors.length > 0) {
|
|
831
844
|
errors.push(...result.errors);
|
|
832
845
|
if (!result.asset) continue;
|
|
@@ -837,10 +850,11 @@ function discoverFromManifest(rootPath, sourceConfig, registry, includeDev = fal
|
|
|
837
850
|
}
|
|
838
851
|
}
|
|
839
852
|
const graph = buildRequiresGraph(allEdges);
|
|
840
|
-
return { assets, graph, errors, warnings
|
|
853
|
+
return { assets, graph, errors, warnings };
|
|
841
854
|
}
|
|
842
855
|
function processEntry(rootPath, entry, registry) {
|
|
843
856
|
const errors = [];
|
|
857
|
+
const warnings = [];
|
|
844
858
|
const assetRoot = path.resolve(rootPath, entry.path);
|
|
845
859
|
const assetRootRelative = entry.path;
|
|
846
860
|
const files = entry.files ?? expandRootFiles(assetRoot);
|
|
@@ -849,7 +863,7 @@ function processEntry(rootPath, entry, registry) {
|
|
|
849
863
|
path: assetRootRelative,
|
|
850
864
|
error: `ManifestFileMissing: root "${entry.root ?? entry.path}" contains no files`
|
|
851
865
|
});
|
|
852
|
-
return { asset: null, errors };
|
|
866
|
+
return { asset: null, errors, warnings };
|
|
853
867
|
}
|
|
854
868
|
const manifestFileRel = pickManifestFile(entry.path, files, entry.kind, registry);
|
|
855
869
|
const manifestAbsPath = path.join(assetRoot, manifestFileRel);
|
|
@@ -864,7 +878,7 @@ function processEntry(rootPath, entry, registry) {
|
|
|
864
878
|
path: assetRootRelative,
|
|
865
879
|
error: `ManifestFileMissing: ${missing.join(", ")}`
|
|
866
880
|
});
|
|
867
|
-
return { asset: null, errors };
|
|
881
|
+
return { asset: null, errors, warnings };
|
|
868
882
|
}
|
|
869
883
|
const manifest = parseManifest(manifestAbsPath);
|
|
870
884
|
if (!manifest) {
|
|
@@ -872,12 +886,12 @@ function processEntry(rootPath, entry, registry) {
|
|
|
872
886
|
path: assetRootRelative,
|
|
873
887
|
error: `ManifestSchemaError: failed to parse manifest file ${manifestFileRel}`
|
|
874
888
|
});
|
|
875
|
-
return { asset: null, errors };
|
|
889
|
+
return { asset: null, errors, warnings };
|
|
876
890
|
}
|
|
877
891
|
if (!registry.getProvider(entry.kind)) {
|
|
878
|
-
|
|
892
|
+
warnings.push({
|
|
879
893
|
path: assetRootRelative,
|
|
880
|
-
|
|
894
|
+
warning: `Unknown asset kind "${entry.kind}" \u2014 ghost-installing without provider validation`
|
|
881
895
|
});
|
|
882
896
|
}
|
|
883
897
|
const requiresErrors = validateRequiresSyntax(entry.requires);
|
|
@@ -886,7 +900,7 @@ function processEntry(rootPath, entry, registry) {
|
|
|
886
900
|
path: assetRootRelative,
|
|
887
901
|
error: `ManifestRequiresError: ${requiresErrors.join("; ")}`
|
|
888
902
|
});
|
|
889
|
-
return { asset: null, errors };
|
|
903
|
+
return { asset: null, errors, warnings };
|
|
890
904
|
}
|
|
891
905
|
const { sha256: computedHash, missing: hashMissing } = computeDeterministicHashDetailed(
|
|
892
906
|
assetRoot,
|
|
@@ -897,22 +911,24 @@ function processEntry(rootPath, entry, registry) {
|
|
|
897
911
|
path: assetRootRelative,
|
|
898
912
|
error: `ManifestFileMissing: ${hashMissing.join(", ")} (became unreadable during hashing)`
|
|
899
913
|
});
|
|
900
|
-
return { asset: null, errors };
|
|
914
|
+
return { asset: null, errors, warnings };
|
|
901
915
|
}
|
|
902
916
|
if (entry.sha256 && entry.sha256 !== computedHash) {
|
|
903
917
|
errors.push({
|
|
904
918
|
path: assetRootRelative,
|
|
905
919
|
error: `ManifestHashMismatch: declared ${entry.sha256}, computed ${computedHash}`
|
|
906
920
|
});
|
|
907
|
-
return { asset: null, errors };
|
|
921
|
+
return { asset: null, errors, warnings };
|
|
908
922
|
}
|
|
909
923
|
if (!entry.sha256) {
|
|
910
|
-
|
|
924
|
+
warnings.push({
|
|
911
925
|
path: assetRootRelative,
|
|
912
|
-
|
|
926
|
+
warning: "Missing sha256 \u2014 auto-computed locally (only needed for store publish).",
|
|
927
|
+
code: "missing_sha256"
|
|
913
928
|
});
|
|
914
929
|
}
|
|
915
|
-
const
|
|
930
|
+
const publisher = barePublisher(entry.publisher);
|
|
931
|
+
const ref = `@${publisher}/${entry.name}@${entry.version}`;
|
|
916
932
|
const requires = entry.requires.map((to) => ({
|
|
917
933
|
from: ref,
|
|
918
934
|
to,
|
|
@@ -925,7 +941,7 @@ function processEntry(rootPath, entry, registry) {
|
|
|
925
941
|
const asset = {
|
|
926
942
|
ref,
|
|
927
943
|
kind: entry.kind,
|
|
928
|
-
publisher
|
|
944
|
+
publisher,
|
|
929
945
|
name: entry.name,
|
|
930
946
|
version: entry.version,
|
|
931
947
|
manifest: mergedManifest,
|
|
@@ -938,7 +954,7 @@ function processEntry(rootPath, entry, registry) {
|
|
|
938
954
|
sha256: computedHash,
|
|
939
955
|
requires
|
|
940
956
|
};
|
|
941
|
-
return { asset, errors };
|
|
957
|
+
return { asset, errors, warnings };
|
|
942
958
|
}
|
|
943
959
|
var MANIFEST_FILENAMES = /* @__PURE__ */ new Set([
|
|
944
960
|
"SKILL.md",
|
|
@@ -1461,13 +1477,15 @@ function normalizeDiscoveryArgs(rootPath, optionsOrSourceConfig) {
|
|
|
1461
1477
|
let sourceConfig;
|
|
1462
1478
|
let registry;
|
|
1463
1479
|
let sidecarPath;
|
|
1480
|
+
let sidecarManifestFile;
|
|
1464
1481
|
let includeDev = false;
|
|
1465
1482
|
let domainFiles;
|
|
1466
1483
|
let atomization = DEFAULT_ATOMIZATION_POLICY;
|
|
1467
|
-
if (optionsOrSourceConfig && ("registry" in optionsOrSourceConfig || "sourceConfig" in optionsOrSourceConfig || "sidecarPath" in optionsOrSourceConfig || "domainFiles" in optionsOrSourceConfig || "atomization" in optionsOrSourceConfig || "includeDev" in optionsOrSourceConfig)) {
|
|
1484
|
+
if (optionsOrSourceConfig && ("registry" in optionsOrSourceConfig || "sourceConfig" in optionsOrSourceConfig || "sidecarPath" in optionsOrSourceConfig || "sidecarManifestFile" in optionsOrSourceConfig || "domainFiles" in optionsOrSourceConfig || "atomization" in optionsOrSourceConfig || "includeDev" in optionsOrSourceConfig)) {
|
|
1468
1485
|
sourceConfig = optionsOrSourceConfig.sourceConfig;
|
|
1469
1486
|
registry = optionsOrSourceConfig.registry;
|
|
1470
1487
|
sidecarPath = optionsOrSourceConfig.sidecarPath;
|
|
1488
|
+
sidecarManifestFile = optionsOrSourceConfig.sidecarManifestFile;
|
|
1471
1489
|
includeDev = optionsOrSourceConfig.includeDev ?? false;
|
|
1472
1490
|
domainFiles = optionsOrSourceConfig.domainFiles;
|
|
1473
1491
|
atomization = optionsOrSourceConfig.atomization ?? DEFAULT_ATOMIZATION_POLICY;
|
|
@@ -1477,13 +1495,21 @@ function normalizeDiscoveryArgs(rootPath, optionsOrSourceConfig) {
|
|
|
1477
1495
|
if (!registry) {
|
|
1478
1496
|
registry = createDefaultRegistry();
|
|
1479
1497
|
}
|
|
1480
|
-
if (!sourceConfig && sidecarPath) {
|
|
1481
|
-
const merged = loadMergedSourceConfig(rootPath, sidecarPath);
|
|
1498
|
+
if (!sourceConfig && (sidecarManifestFile || sidecarPath)) {
|
|
1499
|
+
const merged = sidecarManifestFile ? loadMergedSourceConfigFromFile(rootPath, sidecarManifestFile) : loadMergedSourceConfig(rootPath, sidecarPath);
|
|
1482
1500
|
if (merged.ok) {
|
|
1483
1501
|
sourceConfig = merged.config;
|
|
1484
1502
|
}
|
|
1485
1503
|
}
|
|
1486
|
-
return {
|
|
1504
|
+
return {
|
|
1505
|
+
sourceConfig,
|
|
1506
|
+
registry,
|
|
1507
|
+
includeDev,
|
|
1508
|
+
sidecarPath,
|
|
1509
|
+
sidecarManifestFile,
|
|
1510
|
+
domainFiles,
|
|
1511
|
+
atomization
|
|
1512
|
+
};
|
|
1487
1513
|
}
|
|
1488
1514
|
function processDiscoveredEntry(entry, ctx, acc) {
|
|
1489
1515
|
const { absPath, relativePath, kind } = entry;
|
|
@@ -1497,7 +1523,7 @@ function processDiscoveredEntry(entry, ctx, acc) {
|
|
|
1497
1523
|
const publisher = resolvePublisher(relativePath, sourceConfig);
|
|
1498
1524
|
const name = deriveName(relativePath, kind, manifest);
|
|
1499
1525
|
const version = coerceVersion(manifest);
|
|
1500
|
-
const ref =
|
|
1526
|
+
const ref = `@${publisher}/${name}@${version}`;
|
|
1501
1527
|
const fileFilter = registry.defaultFileFilter(kind, absPath) ?? {
|
|
1502
1528
|
assetRoot: path.dirname(absPath),
|
|
1503
1529
|
files: [path.basename(absPath)]
|
|
@@ -1630,19 +1656,19 @@ function parseManifest2(absPath) {
|
|
|
1630
1656
|
function resolvePublisher(relativePath, sourceConfig) {
|
|
1631
1657
|
if (!sourceConfig) {
|
|
1632
1658
|
const domain = relativePath.split("/")[0] ?? "unknown";
|
|
1633
|
-
return
|
|
1659
|
+
return domain;
|
|
1634
1660
|
}
|
|
1635
1661
|
for (const override of sourceConfig.publisher_overrides) {
|
|
1636
1662
|
if (relativePath.startsWith(override.path)) {
|
|
1637
|
-
return override.publisher;
|
|
1663
|
+
return barePublisher(override.publisher);
|
|
1638
1664
|
}
|
|
1639
1665
|
}
|
|
1640
1666
|
const template = sourceConfig.publisher_default;
|
|
1641
1667
|
if (template.includes("<domain>")) {
|
|
1642
1668
|
const domain = relativePath.split("/")[0] ?? "unknown";
|
|
1643
|
-
return template.replace("<domain>", domain);
|
|
1669
|
+
return barePublisher(template.replace("<domain>", domain));
|
|
1644
1670
|
}
|
|
1645
|
-
return template;
|
|
1671
|
+
return barePublisher(template);
|
|
1646
1672
|
}
|
|
1647
1673
|
function coerceVersion(manifest) {
|
|
1648
1674
|
const scalar = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : null;
|
|
@@ -1813,7 +1839,7 @@ async function buildAssetFromBlob(relativePath, kind, blobByPath, fetchBlob, res
|
|
|
1813
1839
|
const publisher = resolvePublisher2(relativePath, resolvedSourceConfig);
|
|
1814
1840
|
const name = deriveName2(relativePath, kind, manifest);
|
|
1815
1841
|
const version = coerceVersion2(manifest);
|
|
1816
|
-
const ref =
|
|
1842
|
+
const ref = `@${publisher}/${name}@${version}`;
|
|
1817
1843
|
const fileFilter = computeFileFilter(kind, relativePath, blobByPath);
|
|
1818
1844
|
warnings.push(
|
|
1819
1845
|
...await applyAtomizationPolicyTree(
|
|
@@ -1878,19 +1904,19 @@ function parseManifestText(relativePath, text) {
|
|
|
1878
1904
|
function resolvePublisher2(relativePath, sourceConfig) {
|
|
1879
1905
|
if (!sourceConfig) {
|
|
1880
1906
|
const domain = relativePath.split("/")[0] ?? "unknown";
|
|
1881
|
-
return
|
|
1907
|
+
return domain;
|
|
1882
1908
|
}
|
|
1883
1909
|
for (const override of sourceConfig.publisher_overrides) {
|
|
1884
1910
|
if (relativePath.startsWith(override.path)) {
|
|
1885
|
-
return override.publisher;
|
|
1911
|
+
return barePublisher(override.publisher);
|
|
1886
1912
|
}
|
|
1887
1913
|
}
|
|
1888
1914
|
const template = sourceConfig.publisher_default;
|
|
1889
1915
|
if (template.includes("<domain>")) {
|
|
1890
1916
|
const domain = relativePath.split("/")[0] ?? "unknown";
|
|
1891
|
-
return template.replace("<domain>", domain);
|
|
1917
|
+
return barePublisher(template.replace("<domain>", domain));
|
|
1892
1918
|
}
|
|
1893
|
-
return template;
|
|
1919
|
+
return barePublisher(template);
|
|
1894
1920
|
}
|
|
1895
1921
|
function coerceVersion2(manifest) {
|
|
1896
1922
|
const scalar = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : null;
|
|
@@ -2156,12 +2182,14 @@ async function resolveSourceConfigFromTree(explicit, blobByPath, fetchBlob) {
|
|
|
2156
2182
|
async function discoverFromManifestTree(sourceConfig, blobByPath, fetchBlob, registry, includeDev = false) {
|
|
2157
2183
|
const assets = [];
|
|
2158
2184
|
const errors = [];
|
|
2185
|
+
const warnings = [];
|
|
2159
2186
|
const allEdges = [];
|
|
2160
2187
|
const devPaths = sourceConfig.dev_paths ?? [];
|
|
2161
2188
|
const sortedEntries = [...sourceConfig.assets].sort((a, b) => a.path < b.path ? -1 : 1);
|
|
2162
2189
|
for (const entry of sortedEntries) {
|
|
2163
2190
|
if (!includeDev && isExcludedDevPath(entry.path, devPaths)) continue;
|
|
2164
2191
|
const result = await processManifestEntryTree(entry, blobByPath, fetchBlob, registry);
|
|
2192
|
+
warnings.push(...result.warnings);
|
|
2165
2193
|
if (result.errors.length > 0) {
|
|
2166
2194
|
errors.push(...result.errors);
|
|
2167
2195
|
if (!result.asset) continue;
|
|
@@ -2172,13 +2200,14 @@ async function discoverFromManifestTree(sourceConfig, blobByPath, fetchBlob, reg
|
|
|
2172
2200
|
}
|
|
2173
2201
|
}
|
|
2174
2202
|
const graph = buildRequiresGraph(allEdges);
|
|
2175
|
-
return { assets, graph, errors, warnings
|
|
2203
|
+
return { assets, graph, errors, warnings };
|
|
2176
2204
|
}
|
|
2177
2205
|
async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry) {
|
|
2178
2206
|
const errors = [];
|
|
2207
|
+
const warnings = [];
|
|
2179
2208
|
const assetRootRelative = entry.path;
|
|
2180
2209
|
const files = resolveEntryFilesTree(entry, blobByPath, errors);
|
|
2181
|
-
if (!files) return { asset: null, errors };
|
|
2210
|
+
if (!files) return { asset: null, errors, warnings };
|
|
2182
2211
|
const manifestFileRel = pickManifestFileTree(entry.path, files, entry.kind, registry);
|
|
2183
2212
|
const manifestFull = joinPosix(entry.path, manifestFileRel);
|
|
2184
2213
|
const manifest = await fetchAndParseManifestTree(
|
|
@@ -2189,11 +2218,11 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
|
|
|
2189
2218
|
fetchBlob,
|
|
2190
2219
|
errors
|
|
2191
2220
|
);
|
|
2192
|
-
if (!manifest) return { asset: null, errors };
|
|
2221
|
+
if (!manifest) return { asset: null, errors, warnings };
|
|
2193
2222
|
if (!registry.getProvider(entry.kind)) {
|
|
2194
|
-
|
|
2223
|
+
warnings.push({
|
|
2195
2224
|
path: assetRootRelative,
|
|
2196
|
-
|
|
2225
|
+
warning: `Unknown asset kind "${entry.kind}" \u2014 ghost-installing without provider validation`
|
|
2197
2226
|
});
|
|
2198
2227
|
}
|
|
2199
2228
|
const requiresErrors = validateRequiresSyntax2(entry.requires);
|
|
@@ -2202,7 +2231,7 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
|
|
|
2202
2231
|
path: assetRootRelative,
|
|
2203
2232
|
error: `ManifestRequiresError: ${requiresErrors.join("; ")}`
|
|
2204
2233
|
});
|
|
2205
|
-
return { asset: null, errors };
|
|
2234
|
+
return { asset: null, errors, warnings };
|
|
2206
2235
|
}
|
|
2207
2236
|
const computedHash = await computeAndVerifyHashTree(
|
|
2208
2237
|
entry,
|
|
@@ -2210,10 +2239,12 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
|
|
|
2210
2239
|
assetRootRelative,
|
|
2211
2240
|
blobByPath,
|
|
2212
2241
|
fetchBlob,
|
|
2213
|
-
errors
|
|
2242
|
+
errors,
|
|
2243
|
+
warnings
|
|
2214
2244
|
);
|
|
2215
|
-
if (computedHash === null) return { asset: null, errors };
|
|
2216
|
-
const
|
|
2245
|
+
if (computedHash === null) return { asset: null, errors, warnings };
|
|
2246
|
+
const publisher = barePublisher(entry.publisher);
|
|
2247
|
+
const ref = `@${publisher}/${entry.name}@${entry.version}`;
|
|
2217
2248
|
const requires = entry.requires.map((to) => ({
|
|
2218
2249
|
from: ref,
|
|
2219
2250
|
to,
|
|
@@ -2226,7 +2257,7 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
|
|
|
2226
2257
|
const asset = {
|
|
2227
2258
|
ref,
|
|
2228
2259
|
kind: entry.kind,
|
|
2229
|
-
publisher
|
|
2260
|
+
publisher,
|
|
2230
2261
|
name: entry.name,
|
|
2231
2262
|
version: entry.version,
|
|
2232
2263
|
manifest: mergedManifest,
|
|
@@ -2239,7 +2270,7 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
|
|
|
2239
2270
|
sha256: computedHash,
|
|
2240
2271
|
requires
|
|
2241
2272
|
};
|
|
2242
|
-
return { asset, errors };
|
|
2273
|
+
return { asset, errors, warnings };
|
|
2243
2274
|
}
|
|
2244
2275
|
function resolveEntryFilesTree(entry, blobByPath, errors) {
|
|
2245
2276
|
const assetRootRelative = entry.path;
|
|
@@ -2294,7 +2325,7 @@ async function fetchAndParseManifestTree(manifestFull, manifestFileRel, assetRoo
|
|
|
2294
2325
|
}
|
|
2295
2326
|
return manifest;
|
|
2296
2327
|
}
|
|
2297
|
-
async function computeAndVerifyHashTree(entry, files, assetRootRelative, blobByPath, fetchBlob, errors) {
|
|
2328
|
+
async function computeAndVerifyHashTree(entry, files, assetRootRelative, blobByPath, fetchBlob, errors, warnings) {
|
|
2298
2329
|
let computedHash;
|
|
2299
2330
|
try {
|
|
2300
2331
|
computedHash = await computeManifestHashTree(entry.path, files, blobByPath, fetchBlob);
|
|
@@ -2313,9 +2344,10 @@ async function computeAndVerifyHashTree(entry, files, assetRootRelative, blobByP
|
|
|
2313
2344
|
return null;
|
|
2314
2345
|
}
|
|
2315
2346
|
if (!entry.sha256) {
|
|
2316
|
-
|
|
2347
|
+
warnings.push({
|
|
2317
2348
|
path: assetRootRelative,
|
|
2318
|
-
|
|
2349
|
+
warning: "Missing sha256 \u2014 auto-computed locally (only needed for store publish).",
|
|
2350
|
+
code: "missing_sha256"
|
|
2319
2351
|
});
|
|
2320
2352
|
}
|
|
2321
2353
|
return computedHash;
|
|
@@ -2385,6 +2417,6 @@ function validateRequiresSyntax2(requires) {
|
|
|
2385
2417
|
// discovery/src/index.ts
|
|
2386
2418
|
var VERSION = "0.0.0";
|
|
2387
2419
|
|
|
2388
|
-
export { AGENT_COMPANION_DIRS, AssetKindRegistry, BUILTIN_PROVIDERS, DEFAULT_ATOMIZATION_POLICY, DOMAIN_MD_FILENAME, SEMVER_RE, SKILL_COMPANION_DIRS, SourceConfigSchema, VERSION, agentProvider, assignDomain, buildDomainIndex, buildRequiresGraph, closeOverReferences, computeDeterministicHash, computeDeterministicHashDetailed, connectorProvider, contractProvider, createDefaultRegistry, createNodeAssetFs, decodeManifestSourceConfig, detectCycles, discoverAssetsInTree, discoverAssetsInTreeEntries, discoverFromManifest, extractPathCandidates, extractRequires, extractSlashCommands, isDomainMdPath, isExcludedDevPath, isManifestMode, lintUncoveredReferences, loadMergedSourceConfig, loadSourceConfig, manifestToSourceConfig, mcpServerProvider, mergeSourceConfigs, parseDomainMd, parseSourceConfig, personaProvider, presetProvider, promptProvider, readManifestSourceConfig, rulesetProvider, scanAssetReferences, scanSlashCommandNames, skillProvider, validateDomains, validateSourceConfig };
|
|
2389
|
-
//# sourceMappingURL=chunk-
|
|
2390
|
-
//# sourceMappingURL=chunk-
|
|
2420
|
+
export { AGENT_COMPANION_DIRS, AssetKindRegistry, BUILTIN_PROVIDERS, DEFAULT_ATOMIZATION_POLICY, DOMAIN_MD_FILENAME, SEMVER_RE, SKILL_COMPANION_DIRS, SourceConfigSchema, VERSION, agentProvider, assignDomain, barePublisher, buildDomainIndex, buildRequiresGraph, closeOverReferences, computeDeterministicHash, computeDeterministicHashDetailed, connectorProvider, contractProvider, createDefaultRegistry, createNodeAssetFs, decodeManifestSourceConfig, detectCycles, discoverAssetsInTree, discoverAssetsInTreeEntries, discoverFromManifest, extractPathCandidates, extractRequires, extractSlashCommands, isDomainMdPath, isExcludedDevPath, isManifestMode, lintUncoveredReferences, loadMergedSourceConfig, loadMergedSourceConfigFromFile, loadSourceConfig, manifestToSourceConfig, mcpServerProvider, mergeSourceConfigs, parseDomainMd, parseSourceConfig, personaProvider, presetProvider, promptProvider, readManifestSourceConfig, rulesetProvider, scanAssetReferences, scanSlashCommandNames, skillProvider, validateDomains, validateSourceConfig };
|
|
2421
|
+
//# sourceMappingURL=chunk-MZV6WCF3.js.map
|
|
2422
|
+
//# sourceMappingURL=chunk-MZV6WCF3.js.map
|