@skaile/workspaces 0.22.0-beta.1 → 0.22.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 +380 -0
- package/dist/{asset-feeds-QXCSAJRN.js → asset-feeds-Y2CDCM3W.js} +13 -14
- package/dist/asset-feeds-Y2CDCM3W.js.map +1 -0
- package/dist/asset-manager/index.js +7 -7
- package/dist/asset-manager/installer.js +6 -6
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/base-assets/connectors/deploy.js +7 -7
- package/dist/base-assets/connectors/devserver.js +7 -7
- package/dist/base-assets/connectors/flow/adapter.js +7 -7
- package/dist/base-assets/connectors/flow/run-flow.js +8 -8
- package/dist/base-assets/connectors/flow.js +7 -7
- package/dist/base-assets/connectors/git/driver.d.ts.map +1 -1
- package/dist/base-assets/connectors/git.js +7 -7
- package/dist/base-assets/connectors/gmail.js +7 -7
- package/dist/base-assets/connectors/googledrive.js +7 -7
- package/dist/base-assets/connectors/local.js +7 -7
- package/dist/base-assets/connectors/mattermost.js +7 -7
- package/dist/base-assets/connectors/memory.js +7 -7
- package/dist/base-assets/connectors/minio.js +7 -7
- package/dist/base-assets/connectors/postgres.js +7 -7
- package/dist/base-assets/connectors/s3.js +7 -7
- package/dist/base-assets/connectors/sharepoint.js +7 -7
- package/dist/base-assets/connectors/sqlite.js +7 -7
- package/dist/base-assets/connectors/static-server.js +7 -7
- package/dist/base-assets/connectors/tunnel.js +7 -7
- package/dist/base-assets/connectors/webdav.js +7 -7
- package/dist/base-assets/connectors/xstate-store.js +7 -7
- package/dist/base-assets/connectors/xstate.js +7 -7
- package/dist/{chunk-PTIHB2TV.js → chunk-2RYQERIT.js} +4 -4
- package/dist/{chunk-PTIHB2TV.js.map → chunk-2RYQERIT.js.map} +1 -1
- package/dist/chunk-32NA4TVC.js +30 -0
- package/dist/chunk-32NA4TVC.js.map +1 -0
- package/dist/{chunk-DKGDOALM.js → chunk-53UNDY6K.js} +5 -5
- package/dist/{chunk-DKGDOALM.js.map → chunk-53UNDY6K.js.map} +1 -1
- package/dist/{chunk-VCYXVP2S.js → chunk-7HSXUKNB.js} +24 -13
- package/dist/chunk-7HSXUKNB.js.map +1 -0
- package/dist/chunk-7QBNJTTQ.js +3 -0
- package/dist/{chunk-W2O5LWYU.js.map → chunk-7QBNJTTQ.js.map} +1 -1
- package/dist/{chunk-UMOENHVH.js → chunk-ETMUGBHF.js} +3 -3
- package/dist/{chunk-UMOENHVH.js.map → chunk-ETMUGBHF.js.map} +1 -1
- package/dist/{chunk-7PTP3SQJ.js → chunk-GTS2FODO.js} +32 -7
- package/dist/chunk-GTS2FODO.js.map +1 -0
- package/dist/{chunk-D7K72XEY.js → chunk-JN2CUVSU.js} +3 -3
- package/dist/{chunk-D7K72XEY.js.map → chunk-JN2CUVSU.js.map} +1 -1
- package/dist/{chunk-3ECS5PFD.js → chunk-K2HDYSAM.js} +4 -4
- package/dist/{chunk-3ECS5PFD.js.map → chunk-K2HDYSAM.js.map} +1 -1
- package/dist/{chunk-4AZKT2BU.js → chunk-K7WPR77X.js} +33 -50
- package/dist/chunk-K7WPR77X.js.map +1 -0
- package/dist/{chunk-JHF66MCK.js → chunk-MNAHNDUI.js} +5 -3
- package/dist/chunk-MNAHNDUI.js.map +1 -0
- package/dist/{chunk-APAOQLPT.js → chunk-NBJ5TOEC.js} +3 -3
- package/dist/{chunk-APAOQLPT.js.map → chunk-NBJ5TOEC.js.map} +1 -1
- package/dist/{chunk-NJLHHZIW.js → chunk-NDD5VMN5.js} +2 -2
- package/dist/{chunk-NJLHHZIW.js.map → chunk-NDD5VMN5.js.map} +1 -1
- package/dist/{chunk-LT4DLEYE.js → chunk-OJN25VJO.js} +24 -8
- package/dist/chunk-OJN25VJO.js.map +1 -0
- package/dist/{chunk-GFNW72LW.js → chunk-PFOXL4SH.js} +4 -4
- package/dist/{chunk-GFNW72LW.js.map → chunk-PFOXL4SH.js.map} +1 -1
- package/dist/{chunk-V3QMSM5I.js → chunk-SKXCTV55.js} +13 -14
- package/dist/chunk-SKXCTV55.js.map +1 -0
- package/dist/{chunk-J3VKAEQP.js → chunk-V5TBKO5Q.js} +64 -14
- package/dist/chunk-V5TBKO5Q.js.map +1 -0
- package/dist/{chunk-I3UEM3FX.js → chunk-VUCPJBAG.js} +9 -4
- package/dist/chunk-VUCPJBAG.js.map +1 -0
- package/dist/{chunk-XIHFJVOD.js → chunk-WH2EB2SF.js} +3 -3
- package/dist/{chunk-XIHFJVOD.js.map → chunk-WH2EB2SF.js.map} +1 -1
- package/dist/{chunk-PBWMV5GM.js → chunk-WQ7DE5UC.js} +18 -4
- package/dist/chunk-WQ7DE5UC.js.map +1 -0
- package/dist/cli/index.js +199 -200
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +23 -32
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts +5 -3
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +7 -0
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +7 -7
- package/dist/core/index.js +5 -5
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/runtime-assets.js +4 -4
- package/dist/core/src/index.d.ts +2 -2
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +16 -0
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +8 -2
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +17 -2
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts +4 -0
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +14 -0
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +3 -3
- package/dist/deploy/index.js +138 -42
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/src/index.d.ts +4 -3
- package/dist/deploy/src/index.d.ts.map +1 -1
- package/dist/deploy/src/targets/container-runtime.d.ts.map +1 -1
- package/dist/deploy/src/targets/local.d.ts.map +1 -1
- package/dist/deploy/src/targets/nix.d.ts +36 -0
- package/dist/deploy/src/targets/nix.d.ts.map +1 -0
- package/dist/deploy/src/targets/process-handle.d.ts +34 -0
- package/dist/deploy/src/targets/process-handle.d.ts.map +1 -0
- package/dist/discovery/index.js +3 -3
- package/dist/{ensure-sources-SL2S4UEX.js → ensure-sources-REWWBH2K.js} +9 -9
- package/dist/{ensure-sources-SL2S4UEX.js.map → ensure-sources-REWWBH2K.js.map} +1 -1
- package/dist/library/index.js +4 -4
- package/dist/open-library-CT4VVESU.js +13 -0
- package/dist/{open-library-M4DB3D3J.js.map → open-library-CT4VVESU.js.map} +1 -1
- package/dist/plugin-registry/src/context.d.ts +30 -1
- package/dist/plugin-registry/src/context.d.ts.map +1 -1
- package/dist/plugin-registry/src/index.d.ts +1 -1
- package/dist/plugin-registry/src/index.d.ts.map +1 -1
- package/dist/{plugin-store-AJ3FGXIC.js → plugin-store-QS7TC5HY.js} +7 -7
- package/dist/{plugin-store-AJ3FGXIC.js.map → plugin-store-QS7TC5HY.js.map} +1 -1
- package/dist/plugins/src/catalog-source.d.ts +5 -0
- package/dist/plugins/src/catalog-source.d.ts.map +1 -1
- package/dist/runner/index.js +13 -12
- package/dist/runner/src/serve.d.ts +7 -0
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +7 -7
- package/dist/sdk/core.js +5 -5
- package/dist/sdk/index.js +13 -12
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runner.js +13 -12
- package/dist/sdk/transport/ws/client.js +2 -1
- package/dist/sdk/transport/ws/server.js +2 -1
- package/dist/sdk/transport/ws.js +4 -3
- package/dist/sdk/transport.js +4 -3
- package/dist/{setup-GBSQX7JF.js → setup-F6DGKL7J.js} +7 -7
- package/dist/{setup-GBSQX7JF.js.map → setup-F6DGKL7J.js.map} +1 -1
- package/dist/store-client-JP642EEI.js +14 -0
- package/dist/{store-client-5WBRUC5U.js.map → store-client-JP642EEI.js.map} +1 -1
- package/dist/transport/index.js +4 -3
- package/dist/transport/src/ws/auth.d.ts +34 -0
- package/dist/transport/src/ws/auth.d.ts.map +1 -0
- package/dist/transport/src/ws/client.d.ts +4 -0
- package/dist/transport/src/ws/client.d.ts.map +1 -1
- package/dist/transport/src/ws/index.d.ts +3 -2
- package/dist/transport/src/ws/index.d.ts.map +1 -1
- package/dist/transport/src/ws/server.d.ts +5 -0
- package/dist/transport/src/ws/server.d.ts.map +1 -1
- package/dist/transport/ws/client.js +2 -1
- package/dist/transport/ws/server.js +2 -1
- package/dist/transport/ws.js +4 -3
- package/dist/tui/index.js +13 -12
- package/dist/tui/index.js.map +1 -1
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/asset-feeds-QXCSAJRN.js.map +0 -1
- package/dist/chunk-4AZKT2BU.js.map +0 -1
- package/dist/chunk-7PTP3SQJ.js.map +0 -1
- package/dist/chunk-I3UEM3FX.js.map +0 -1
- package/dist/chunk-J3VKAEQP.js.map +0 -1
- package/dist/chunk-JHF66MCK.js.map +0 -1
- package/dist/chunk-LT4DLEYE.js.map +0 -1
- package/dist/chunk-PBWMV5GM.js.map +0 -1
- package/dist/chunk-V3QMSM5I.js.map +0 -1
- package/dist/chunk-VCYXVP2S.js.map +0 -1
- package/dist/chunk-W2O5LWYU.js +0 -3
- package/dist/open-library-M4DB3D3J.js +0 -13
- package/dist/store-client-5WBRUC5U.js +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { scanDirectory, parseFrontmatter, fromMcpServerMd } from './chunk-
|
|
2
|
-
import { parseAssetRef } from './chunk-
|
|
1
|
+
import { scanDirectory, parseFrontmatter, bundleDepRefs, fromMcpServerMd } from './chunk-K7WPR77X.js';
|
|
2
|
+
import { parseAssetRef } from './chunk-VUCPJBAG.js';
|
|
3
3
|
import { mkdirSync, existsSync, readFileSync, writeFileSync, lstatSync, symlinkSync, rmSync, readdirSync, statSync } from 'fs';
|
|
4
4
|
import { homedir } from 'os';
|
|
5
5
|
import { join, resolve, relative, parse as parse$1, dirname } from 'path';
|
|
@@ -120,9 +120,14 @@ function ensureRepo(decl, name, reposDir, opts) {
|
|
|
120
120
|
if (decl.path) {
|
|
121
121
|
const projectDir = opts?.projectDir ?? resolve(reposDir, "..");
|
|
122
122
|
const resolved = resolve(projectDir, decl.path);
|
|
123
|
-
if (
|
|
123
|
+
if (existsSync(resolved)) return resolved;
|
|
124
|
+
if (!decl.url) {
|
|
124
125
|
throw new Error(`Local repository path not found: ${decl.path} (resolved: ${resolved})`);
|
|
125
126
|
}
|
|
127
|
+
if (!cloneRepo(decl.url, decl.branch ?? "main", resolved)) {
|
|
128
|
+
throw new Error(`Failed to clone ${decl.url} into ${resolved}`);
|
|
129
|
+
}
|
|
130
|
+
if (opts?.pin) checkoutPin(resolved, opts.pin);
|
|
126
131
|
return resolved;
|
|
127
132
|
}
|
|
128
133
|
if (decl.url) {
|
|
@@ -160,8 +165,20 @@ function ensureRepo(decl, name, reposDir, opts) {
|
|
|
160
165
|
}
|
|
161
166
|
throw new Error(`Repository "${name}" has neither url nor path`);
|
|
162
167
|
}
|
|
168
|
+
function repoSlugFromGitRemote(rootDir) {
|
|
169
|
+
const r = spawnSync("git", ["-C", rootDir, "config", "--get", "remote.origin.url"], {
|
|
170
|
+
encoding: "utf8",
|
|
171
|
+
stdio: "pipe",
|
|
172
|
+
env: GIT_ENV
|
|
173
|
+
});
|
|
174
|
+
if (r.status !== 0) return void 0;
|
|
175
|
+
const m = /github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/.exec(r.stdout.trim());
|
|
176
|
+
return m ? `${m[1]}/${m[2]}` : void 0;
|
|
177
|
+
}
|
|
163
178
|
function scanRepo(repoDir, repoName) {
|
|
164
|
-
|
|
179
|
+
const repo = repoSlugFromGitRemote(repoDir);
|
|
180
|
+
const entries = scanDirectory(repoDir, repoName);
|
|
181
|
+
return repo ? entries.map((e) => ({ ...e, repo })) : entries;
|
|
165
182
|
}
|
|
166
183
|
function resolveAsset(ref, repositories, reposDir, opts) {
|
|
167
184
|
let repoNames;
|
|
@@ -233,6 +250,13 @@ var CanonicalRefConflictError = class extends Error {
|
|
|
233
250
|
depChain;
|
|
234
251
|
};
|
|
235
252
|
var SHA_PIN_RE = /^[0-9a-f]{40}$/i;
|
|
253
|
+
function qualifyPublisher(ref, fallback) {
|
|
254
|
+
const hashIdx = ref.indexOf("#");
|
|
255
|
+
const head = hashIdx === -1 ? ref : ref.slice(0, hashIdx);
|
|
256
|
+
if (head.includes("@")) return ref;
|
|
257
|
+
const pin = hashIdx === -1 ? "" : ref.slice(hashIdx);
|
|
258
|
+
return `${head}@${fallback}${pin}`;
|
|
259
|
+
}
|
|
236
260
|
async function resolveAll(deps, opts) {
|
|
237
261
|
const resolved = [];
|
|
238
262
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -321,6 +345,9 @@ async function resolveAll(deps, opts) {
|
|
|
321
345
|
}
|
|
322
346
|
resolved.push(chosen);
|
|
323
347
|
resolvedBy.set(key, parent);
|
|
348
|
+
for (const depRef of chosen.deps ?? []) {
|
|
349
|
+
await visit(qualifyPublisher(depRef, chosen.publisher), key, [...depChain, refStr]);
|
|
350
|
+
}
|
|
324
351
|
}
|
|
325
352
|
for (const dep of deps) {
|
|
326
353
|
await visit(dep, "direct", []);
|
|
@@ -474,7 +501,8 @@ function walkWithManifest(clone, yamlPath, index) {
|
|
|
474
501
|
commit: clone.commit,
|
|
475
502
|
files,
|
|
476
503
|
sha256: compositeSha256(files),
|
|
477
|
-
metadata
|
|
504
|
+
metadata,
|
|
505
|
+
deps: bundleDeps(clone.localPath, files, a.kind)
|
|
478
506
|
};
|
|
479
507
|
push(index, `${assetPublisher}/${a.kind}:${a.name}`, candidate);
|
|
480
508
|
}
|
|
@@ -532,7 +560,8 @@ function walkFilenameConvention(clone, index, publisherOverride, versionOverride
|
|
|
532
560
|
commit: clone.commit,
|
|
533
561
|
files,
|
|
534
562
|
sha256: compositeSha256(files),
|
|
535
|
-
metadata
|
|
563
|
+
metadata,
|
|
564
|
+
deps: bundleDeps(clone.localPath, files, kind)
|
|
536
565
|
};
|
|
537
566
|
push(index, `${publisher}/${kind}:${entry.name}`, candidate);
|
|
538
567
|
}
|
|
@@ -558,6 +587,11 @@ function readMetadata(repoRoot, files, kind) {
|
|
|
558
587
|
const { data } = parseFrontmatter(readFileSync(join(repoRoot, mcpMd.path), "utf8"));
|
|
559
588
|
return data;
|
|
560
589
|
}
|
|
590
|
+
function bundleDeps(repoRoot, files, kind) {
|
|
591
|
+
if (kind !== "bundle") return void 0;
|
|
592
|
+
const bf = files.find((f) => f.path.endsWith(".bundle.yaml") || f.path.endsWith("BUNDLE.md"));
|
|
593
|
+
return bf ? bundleDepRefs(join(repoRoot, bf.path)) : void 0;
|
|
594
|
+
}
|
|
561
595
|
function push(index, key, candidate) {
|
|
562
596
|
const arr = index.get(key) ?? [];
|
|
563
597
|
arr.push(candidate);
|
|
@@ -598,6 +632,7 @@ function validateAssetRecipeAttr(attr) {
|
|
|
598
632
|
);
|
|
599
633
|
}
|
|
600
634
|
}
|
|
635
|
+
var KNOWN_NETWORK_MODES = ["open", "off", "allowlist"];
|
|
601
636
|
var COMPACTION_DEFAULTS = {
|
|
602
637
|
enabled: true,
|
|
603
638
|
thresholdPercent: 80,
|
|
@@ -898,9 +933,7 @@ function normalizeConfigInternal(raw) {
|
|
|
898
933
|
const entry = { kind, name };
|
|
899
934
|
if (typeof a.root === "string") entry.root = a.root;
|
|
900
935
|
if (Array.isArray(a.files)) {
|
|
901
|
-
entry.files = a.files.filter(
|
|
902
|
-
(f) => typeof f === "string"
|
|
903
|
-
);
|
|
936
|
+
entry.files = a.files.filter((f) => typeof f === "string");
|
|
904
937
|
}
|
|
905
938
|
if (typeof a.version === "string") entry.version = a.version;
|
|
906
939
|
if (typeof a.publisher === "string") entry.publisher = a.publisher;
|
|
@@ -933,9 +966,7 @@ function normalizeConfigInternal(raw) {
|
|
|
933
966
|
);
|
|
934
967
|
}
|
|
935
968
|
if (o.reason.trim().length === 0) {
|
|
936
|
-
throw new Error(
|
|
937
|
-
`skaile.yaml: overrides[] entry for ${ref}: reason must not be empty.`
|
|
938
|
-
);
|
|
969
|
+
throw new Error(`skaile.yaml: overrides[] entry for ${ref}: reason must not be empty.`);
|
|
939
970
|
}
|
|
940
971
|
entries.push({ ref, source, reason: o.reason });
|
|
941
972
|
}
|
|
@@ -1073,6 +1104,25 @@ function validateConfigValues(config, diagnostics) {
|
|
|
1073
1104
|
};
|
|
1074
1105
|
for (const c of config.connectors ?? []) checkAccess(c.access, `connectors.${c.id}.access`);
|
|
1075
1106
|
for (const m of config.mounts ?? []) checkAccess(m.access, `mounts.${m.id}.access`);
|
|
1107
|
+
const network = config.agent?.permissions?.network;
|
|
1108
|
+
if (network) {
|
|
1109
|
+
if (network.mode && !KNOWN_NETWORK_MODES.includes(network.mode)) {
|
|
1110
|
+
diagnostics.push({
|
|
1111
|
+
code: "unknown_network_mode",
|
|
1112
|
+
severity: "warning",
|
|
1113
|
+
message: `Unknown network mode "${network.mode}" \u2014 expected one of: ${KNOWN_NETWORK_MODES.join(", ")}.`,
|
|
1114
|
+
path: "agent.permissions.network.mode"
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
if (network.allowlist && network.allowlist.length > 0 && network.mode !== "allowlist") {
|
|
1118
|
+
diagnostics.push({
|
|
1119
|
+
code: "unexpected_network_allowlist",
|
|
1120
|
+
severity: "warning",
|
|
1121
|
+
message: `network.allowlist is set but mode is "${network.mode}" \u2014 the allowlist is ignored unless mode is "allowlist".`,
|
|
1122
|
+
path: "agent.permissions.network.allowlist"
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1076
1126
|
}
|
|
1077
1127
|
var CANONICAL_KEY_ORDER = [
|
|
1078
1128
|
"name",
|
|
@@ -1376,5 +1426,5 @@ function resolveAgentDir(projectDir) {
|
|
|
1376
1426
|
}
|
|
1377
1427
|
|
|
1378
1428
|
export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SKAILE_YAML_DEFAULT, SKAILE_YAML_SUFFIX, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, isWorkspaceConfigFilename, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeSkWorkspaceConfigs, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, workspaceNameFromFilename, writeLinks };
|
|
1379
|
-
//# sourceMappingURL=chunk-
|
|
1380
|
-
//# sourceMappingURL=chunk-
|
|
1429
|
+
//# sourceMappingURL=chunk-V5TBKO5Q.js.map
|
|
1430
|
+
//# sourceMappingURL=chunk-V5TBKO5Q.js.map
|