@skaile/workspaces 1.1.0 → 1.2.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 +46 -0
- package/dist/{asset-feeds-NIAABO6U.js → asset-feeds-OBPWVUDL.js} +4 -4
- package/dist/{asset-feeds-NIAABO6U.js.map → asset-feeds-OBPWVUDL.js.map} +1 -1
- package/dist/asset-manager/index.js +1 -1
- package/dist/{chunk-7X53KHQ4.js → chunk-4OVPB7SI.js} +4 -2
- package/dist/chunk-4OVPB7SI.js.map +1 -0
- package/dist/{chunk-DMHVL5MC.js → chunk-CLUJLV7Z.js} +4 -4
- package/dist/{chunk-DMHVL5MC.js.map → chunk-CLUJLV7Z.js.map} +1 -1
- package/dist/{chunk-INUQVXUE.js → chunk-EPLYVB3L.js} +2 -2
- package/dist/{chunk-INUQVXUE.js.map → chunk-EPLYVB3L.js.map} +1 -1
- package/dist/{chunk-L3SLC3S4.js → chunk-KAWKKMU4.js} +2 -2
- package/dist/{chunk-L3SLC3S4.js.map → chunk-KAWKKMU4.js.map} +1 -1
- package/dist/{chunk-SHOKXRL4.js → chunk-MQEZE6TU.js} +8 -4
- package/dist/chunk-MQEZE6TU.js.map +1 -0
- package/dist/{chunk-VYIK5IE5.js → chunk-NUS5L5ZJ.js} +21 -2
- package/dist/chunk-NUS5L5ZJ.js.map +1 -0
- package/dist/{chunk-EE4NL25D.js → chunk-TTTLCSEQ.js} +7 -12
- package/dist/chunk-TTTLCSEQ.js.map +1 -0
- package/dist/{chunk-B4IOSXRZ.js → chunk-VCBLXF7D.js} +17 -6
- package/dist/chunk-VCBLXF7D.js.map +1 -0
- package/dist/{chunk-G2X3THJV.js → chunk-W65IK4MH.js} +3 -3
- package/dist/{chunk-G2X3THJV.js.map → chunk-W65IK4MH.js.map} +1 -1
- package/dist/{chunk-Z4EJOBEL.js → chunk-XWLVIEWD.js} +5 -5
- package/dist/{chunk-Z4EJOBEL.js.map → chunk-XWLVIEWD.js.map} +1 -1
- package/dist/cli/index.js +82 -41
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +20 -0
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +9 -0
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/helpers.d.ts +10 -0
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/connectors/index.js +1 -1
- package/dist/{ensure-sources-MJYHZ77Y.js → ensure-sources-BQI2TOZZ.js} +4 -4
- package/dist/{ensure-sources-MJYHZ77Y.js.map → ensure-sources-BQI2TOZZ.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +1 -1
- package/dist/factory-assets/connectors/deploy.js +1 -1
- package/dist/factory-assets/connectors/devserver.js +1 -1
- package/dist/factory-assets/connectors/flow/adapter.js +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +2 -2
- package/dist/factory-assets/connectors/flow.js +1 -1
- package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +1 -1
- package/dist/factory-assets/connectors/gmail.js +1 -1
- package/dist/factory-assets/connectors/googledrive.js +1 -1
- package/dist/factory-assets/connectors/local.js +1 -1
- package/dist/factory-assets/connectors/mattermost.js +1 -1
- package/dist/factory-assets/connectors/memory.js +1 -1
- package/dist/factory-assets/connectors/minio.js +1 -1
- package/dist/factory-assets/connectors/postgres.js +1 -1
- package/dist/factory-assets/connectors/s3.js +1 -1
- package/dist/factory-assets/connectors/sharepoint.js +1 -1
- package/dist/factory-assets/connectors/sqlite.js +1 -1
- package/dist/factory-assets/connectors/static-server.js +1 -1
- package/dist/factory-assets/connectors/tunnel.js +1 -1
- package/dist/factory-assets/connectors/webdav.js +1 -1
- package/dist/factory-assets/connectors/xstate-store.js +1 -1
- package/dist/factory-assets/connectors/xstate.js +1 -1
- package/dist/{helpers-7KOVCMHW.js → helpers-SC4PWN2F.js} +4 -4
- package/dist/{helpers-7KOVCMHW.js.map → helpers-SC4PWN2F.js.map} +1 -1
- package/dist/library/index.js +1 -1
- package/dist/{open-library-PGTL332T.js → open-library-ZNYIND7N.js} +6 -6
- package/dist/{open-library-PGTL332T.js.map → open-library-ZNYIND7N.js.map} +1 -1
- package/dist/plugins/src/catalog-source.d.ts +7 -0
- package/dist/plugins/src/catalog-source.d.ts.map +1 -1
- package/dist/runner/index.js +3 -3
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/runner.js +3 -3
- package/dist/sdk/store.js +1 -1
- package/dist/{source-FJXRQ2NU.js → source-SBFVULTG.js} +7 -7
- package/dist/{source-FJXRQ2NU.js.map → source-SBFVULTG.js.map} +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/src/store.d.ts.map +1 -1
- package/dist/tui/index.js +3 -3
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-7X53KHQ4.js.map +0 -1
- package/dist/chunk-B4IOSXRZ.js.map +0 -1
- package/dist/chunk-EE4NL25D.js.map +0 -1
- package/dist/chunk-SHOKXRL4.js.map +0 -1
- package/dist/chunk-VYIK5IE5.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { softDepName } from './chunk-
|
|
1
|
+
import { softDepName } from './chunk-KAWKKMU4.js';
|
|
2
2
|
import pc from 'picocolors';
|
|
3
3
|
|
|
4
4
|
var S = {
|
|
@@ -63,6 +63,10 @@ function logInfo(msg) {
|
|
|
63
63
|
function bareSoftDepName(ref) {
|
|
64
64
|
return softDepName(ref);
|
|
65
65
|
}
|
|
66
|
+
function formatSoftDepHint(edge) {
|
|
67
|
+
const suffix = edge.toRef ? ` \u2014 run \`skaile add ${edge.toRef}\` to include it.` : "";
|
|
68
|
+
return `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${suffix}`;
|
|
69
|
+
}
|
|
66
70
|
function formatSoftDepSection(targets) {
|
|
67
71
|
if (targets.length === 0) return [];
|
|
68
72
|
const out = [` ${S.label("Soft dependencies (inferred)")}:`];
|
|
@@ -89,6 +93,6 @@ function formatRelativeTime(date) {
|
|
|
89
93
|
return `${days}d ago`;
|
|
90
94
|
}
|
|
91
95
|
|
|
92
|
-
export { KIND_COL_WIDTH, S, bareSoftDepName, colorRef, fitWidth, formatRelativeTime, formatSoftDepAddPreview, formatSoftDepRemovePreview, formatSoftDepSection, kindColor, kindColorPad, logErr, logInfo, logOk, logWarn };
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
96
|
+
export { KIND_COL_WIDTH, S, bareSoftDepName, colorRef, fitWidth, formatRelativeTime, formatSoftDepAddPreview, formatSoftDepHint, formatSoftDepRemovePreview, formatSoftDepSection, kindColor, kindColorPad, logErr, logInfo, logOk, logWarn };
|
|
97
|
+
//# sourceMappingURL=chunk-MQEZE6TU.js.map
|
|
98
|
+
//# sourceMappingURL=chunk-MQEZE6TU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../cli/src/helpers.ts"],"names":[],"mappings":";;;AAQO,IAAM,CAAA,GAAI;AAAA,EACf,KAAA,EAAO,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,EAAA,CAAG,IAAA,CAAK,CAAC,CAAC,CAAA;AAAA,EACxC,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EAC7B,OAAA,EAAS,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EACjC,IAAA,EAAM,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EAC9B,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,IAAI,CAAC,CAAA;AAAA,EAC5B,EAAA,EAAI,CAAC,CAAA,KAAc,EAAA,CAAG,MAAM,CAAC,CAAA;AAA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,CAAQ,MAAA,KAAW,CAAA,EAAG,OAAO,EAAA;AACjC,EAAA,OAAO,CAAA,CAAE,IAAI,CAAA,SAAA,EAAY,IAAI,iBAAiB,OAAA,CAAQ,IAAA,CAAK,IAAI,CAAC,CAAA,WAAA,CAAa,CAAA;AAC/E;AAGO,SAAS,mBAAmB,IAAA,EAAoB;AACrD,EAAA,MAAM,IAAA,GAAO,IAAA,CAAK,GAAA,EAAI,GAAI,KAAK,OAAA,EAAQ;AACvC,EAAA,MAAM,OAAA,GAAU,IAAA,CAAK,KAAA,CAAM,IAAA,GAAO,GAAI,CAAA;AACtC,EAAA,IAAI,OAAA,GAAU,IAAI,OAAO,UAAA;AACzB,EAAA,MAAM,OAAA,GAAU,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAA;AACvC,EAAA,IAAI,OAAA,GAAU,EAAA,EAAI,OAAO,CAAA,EAAG,OAAO,CAAA,KAAA,CAAA;AACnC,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAA;AACrC,EAAA,IAAI,KAAA,GAAQ,EAAA,EAAI,OAAO,CAAA,EAAG,KAAK,CAAA,KAAA,CAAA;AAC/B,EAAA,MAAM,IAAA,GAAO,IAAA,CAAK,KAAA,CAAM,KAAA,GAAQ,EAAE,CAAA;AAClC,EAAA,OAAO,GAAG,IAAI,CAAA,KAAA,CAAA;AAChB","file":"chunk-MQEZE6TU.js","sourcesContent":["import { softDepName } from \"@skaile/workspaces/asset-manager\";\nimport pc from \"picocolors\";\n\n/**\n * Terminal styling helpers used across all CLI commands.\n *\n * @docLink cli/dev-guide#helpers\n */\nexport const S = {\n brand: (s: string) => pc.cyan(pc.bold(s)),\n cmd: (s: string) => pc.cyan(s),\n heading: (s: string) => pc.bold(s),\n bold: (s: string) => pc.bold(s),\n dim: (s: string) => pc.dim(s),\n ok: (s: string) => pc.green(s),\n warn: (s: string) => pc.yellow(s),\n err: (s: string) => pc.red(s),\n label: (s: string) => pc.dim(s),\n rule: (w = 40) => pc.dim(\"─\".repeat(w)),\n};\n\nconst KIND_COLORS: Record<string, (s: string) => string> = {\n skill: pc.blue,\n agent: pc.magenta,\n prompt: pc.yellow,\n flow: pc.green,\n bundle: pc.cyan,\n contract: pc.red,\n connector: pc.green,\n mount: pc.green,\n knowledge: pc.cyan,\n persona: pc.cyan,\n ruleset: pc.cyan,\n \"mcp-server\": pc.magenta,\n};\n\n/**\n * Fit a plain (ANSI-free) string into exactly `width` columns: truncate with a\n * trailing `…` when too long, pad with spaces when too short. Keeps fixed-width\n * columns from overflowing the row when a value (e.g. an asset name) is wider\n * than its budget.\n */\nexport function fitWidth(s: string, width: number): string {\n if (width <= 0) return \"\";\n if (s.length > width) return width === 1 ? \"…\" : `${s.slice(0, width - 1)}…`;\n return s.padEnd(width);\n}\n\n/** Color-code an asset kind string. */\nexport function kindColor(kind: string): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(kind);\n}\n\n/**\n * Widest kind label (`mcp-server`); the default kind-column width fits it so\n * long kinds don't shove the rest of the row out of alignment.\n */\nexport const KIND_COL_WIDTH = 10;\n\n/**\n * Color-code an asset kind string fit to exactly `width` columns — pads short\n * kinds, truncates over-long ones (via {@link fitWidth}) so the column can never\n * overflow and break row alignment.\n */\nexport function kindColorPad(kind: string, width = KIND_COL_WIDTH): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(fitWidth(kind, width));\n}\n\n/** Color-code a \"kind:name\" reference string. */\nexport function colorRef(ref: string): string {\n const colonIdx = ref.indexOf(\":\");\n if (colonIdx === -1) return ref;\n const kind = ref.slice(0, colonIdx);\n const rest = ref.slice(colonIdx);\n return `${kindColor(kind)}${rest}`;\n}\n\n/**\n * Print a success line prefixed with a green check mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logOk(msg: string) {\n console.log(` ${pc.green(\"✓\")} ${msg}`);\n}\n/**\n * Print an error line prefixed with a red cross to stderr.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logErr(msg: string) {\n console.error(` ${pc.red(\"✗\")} ${msg}`);\n}\n/**\n * Print a warning line prefixed with a yellow exclamation mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logWarn(msg: string) {\n console.log(` ${pc.yellow(\"!\")} ${msg}`);\n}\n/**\n * Print an info line prefixed with a dim dot.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logInfo(msg: string) {\n console.log(` ${pc.dim(\"·\")} ${msg}`);\n}\n\n/**\n * Bare asset name of a canonical soft-dep target ref (`@pub/name@ver` → `name`),\n * for compact rendering in `info` / `tree` / `why`. Delegates to the asset-manager\n * parser (the soft-dep read surface) so the two never diverge.\n */\nexport function bareSoftDepName(ref: string): string {\n return softDepName(ref);\n}\n\n/**\n * The report-only soft-dep hint line shared by the `add` no-TTY branch and the\n * `install` surface, so the two user-facing wordings can't drift. Appends a\n * runnable `skaile add` suffix only when the target has a parseable ref.\n */\nexport function formatSoftDepHint(edge: { from: string; to: string; toRef?: string }): string {\n const suffix = edge.toRef ? ` — run \\`skaile add ${edge.toRef}\\` to include it.` : \"\";\n return `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${suffix}`;\n}\n\n/**\n * Build the \"Soft dependencies (inferred)\" section for `skaile info`. Returns one\n * header line plus one line per soft-dep target, each marked `(soft)` to read\n * differently from a typed `requires`. Empty array when there are no soft deps,\n * so the caller prints nothing.\n */\nexport function formatSoftDepSection(targets: string[]): string[] {\n if (targets.length === 0) return [];\n const out = [` ${S.label(\"Soft dependencies (inferred)\")}:`];\n for (const t of targets) out.push(` ${S.dim(\"·\")} ${t} ${S.dim(\"(soft)\")}`);\n return out;\n}\n\n/**\n * Footer line previewing the soft deps that *adding* the highlighted asset would\n * reference (manage TUI). \"references\" + \"not auto-added\" makes clear the pull is\n * report-only. Empty string when there are no targets, so the caller clears.\n */\nexport function formatSoftDepAddPreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`${name} references ${targets.join(\", \")} (soft dep, not auto-added)`);\n}\n\n/**\n * Footer line previewing the soft deps that *removing* the highlighted asset\n * would orphan (manage TUI) — symmetric with {@link formatSoftDepAddPreview}.\n * Empty string when nothing would be orphaned, so the caller clears.\n */\nexport function formatSoftDepRemovePreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`removing ${name} would orphan ${targets.join(\", \")} (soft dep)`);\n}\n\n/** Format a Date as a human-readable relative time string (e.g. \"5m ago\"). */\nexport function formatRelativeTime(date: Date): string {\n const diff = Date.now() - date.getTime();\n const seconds = Math.floor(diff / 1000);\n if (seconds < 60) return \"just now\";\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.floor(hours / 24);\n return `${days}d ago`;\n}\n"]}
|
|
@@ -3308,8 +3308,18 @@ function normalizeCatalogAsset(raw) {
|
|
|
3308
3308
|
if (repo) asset.repo = repo;
|
|
3309
3309
|
const domainSlug = pickString(r, "domainSlug");
|
|
3310
3310
|
if (domainSlug) asset.domainSlug = domainSlug;
|
|
3311
|
+
const softDeps = pickRefs(r, "softDepsJson");
|
|
3312
|
+
if (softDeps.length > 0) asset.softDeps = softDeps;
|
|
3311
3313
|
return asset;
|
|
3312
3314
|
}
|
|
3315
|
+
function pickRefs(r, key) {
|
|
3316
|
+
const v = r[key];
|
|
3317
|
+
if (Array.isArray(v)) return v.filter((x) => typeof x === "string");
|
|
3318
|
+
if (v && typeof v === "object" && Array.isArray(v.refs)) {
|
|
3319
|
+
return v.refs.filter((x) => typeof x === "string");
|
|
3320
|
+
}
|
|
3321
|
+
return [];
|
|
3322
|
+
}
|
|
3313
3323
|
function pickString(r, key) {
|
|
3314
3324
|
const v = r[key];
|
|
3315
3325
|
return typeof v === "string" ? v : void 0;
|
|
@@ -3660,8 +3670,17 @@ function normalizeRestAsset(raw) {
|
|
|
3660
3670
|
if (category) asset.category = category;
|
|
3661
3671
|
const domainSlug = pickString2(r, "domainSlug");
|
|
3662
3672
|
if (domainSlug) asset.domainSlug = domainSlug;
|
|
3673
|
+
const softDeps = refsFrom(tryParseJson(pickString2(r, "softDepsJson")));
|
|
3674
|
+
if (softDeps.length > 0) asset.softDeps = softDeps;
|
|
3663
3675
|
return asset;
|
|
3664
3676
|
}
|
|
3677
|
+
function refsFrom(v) {
|
|
3678
|
+
if (Array.isArray(v)) return v.filter((x) => typeof x === "string");
|
|
3679
|
+
if (v && typeof v === "object" && Array.isArray(v.refs)) {
|
|
3680
|
+
return v.refs.filter((x) => typeof x === "string");
|
|
3681
|
+
}
|
|
3682
|
+
return [];
|
|
3683
|
+
}
|
|
3665
3684
|
function pickString2(r, key) {
|
|
3666
3685
|
const v = r[key];
|
|
3667
3686
|
return typeof v === "string" ? v : void 0;
|
|
@@ -3841,5 +3860,5 @@ function detectWorkspaceVersion(dir, filename = "skaile.yaml") {
|
|
|
3841
3860
|
}
|
|
3842
3861
|
|
|
3843
3862
|
export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KNOWN_ASSET_KINDS, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LIBRARY_STRUCTURES, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, classifyRef, createEmptyLockFile, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, interpolate, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolveLibraryDir, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, sha256Hex, skaileHomeDir, storeSecrets, trpcGetUrl, userConfigPath, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeManifestIfMissing };
|
|
3844
|
-
//# sourceMappingURL=chunk-
|
|
3845
|
-
//# sourceMappingURL=chunk-
|
|
3863
|
+
//# sourceMappingURL=chunk-NUS5L5ZJ.js.map
|
|
3864
|
+
//# sourceMappingURL=chunk-NUS5L5ZJ.js.map
|