@skaile/workspaces 0.17.1 → 0.19.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{asset-feeds-CQU46DYQ.js → asset-feeds-OFMOTPTX.js} +4 -4
  3. package/dist/{asset-feeds-CQU46DYQ.js.map → asset-feeds-OFMOTPTX.js.map} +1 -1
  4. package/dist/asset-manager/index.js +1 -1
  5. package/dist/base-assets/connectors/deploy.js +1 -1
  6. package/dist/base-assets/connectors/devserver.js +1 -1
  7. package/dist/base-assets/connectors/flow/adapter.js +1 -1
  8. package/dist/base-assets/connectors/flow/run-flow.js +2 -2
  9. package/dist/base-assets/connectors/flow.js +1 -1
  10. package/dist/base-assets/connectors/git/driver.d.ts +6 -2
  11. package/dist/base-assets/connectors/git/driver.d.ts.map +1 -1
  12. package/dist/base-assets/connectors/git.js +1 -1
  13. package/dist/base-assets/connectors/gmail.js +1 -1
  14. package/dist/base-assets/connectors/googledrive.js +1 -1
  15. package/dist/base-assets/connectors/local.js +1 -1
  16. package/dist/base-assets/connectors/mattermost.js +1 -1
  17. package/dist/base-assets/connectors/memory.js +1 -1
  18. package/dist/base-assets/connectors/minio.js +1 -1
  19. package/dist/base-assets/connectors/postgres.js +1 -1
  20. package/dist/base-assets/connectors/redis.js +1 -1
  21. package/dist/base-assets/connectors/s3.js +1 -1
  22. package/dist/base-assets/connectors/sharepoint.js +1 -1
  23. package/dist/base-assets/connectors/sqlite.js +1 -1
  24. package/dist/base-assets/connectors/static-server.js +1 -1
  25. package/dist/base-assets/connectors/tunnel.js +1 -1
  26. package/dist/base-assets/connectors/webdav.js +1 -1
  27. package/dist/base-assets/connectors/xstate-store.js +1 -1
  28. package/dist/base-assets/connectors/xstate.js +1 -1
  29. package/dist/base-assets/connectors/yjs.js +1 -1
  30. package/dist/{chunk-2GX7BE7Q.js → chunk-4S4TZDCD.js} +50 -11
  31. package/dist/chunk-4S4TZDCD.js.map +1 -0
  32. package/dist/{chunk-D6GE2WA2.js → chunk-63Y7YN33.js} +2 -2
  33. package/dist/{chunk-D6GE2WA2.js.map → chunk-63Y7YN33.js.map} +1 -1
  34. package/dist/{chunk-B3XHLXGD.js → chunk-BSY56QS7.js} +9 -5
  35. package/dist/chunk-BSY56QS7.js.map +1 -0
  36. package/dist/{chunk-RVPZOFSQ.js → chunk-GVBPAIGF.js} +4 -4
  37. package/dist/{chunk-RVPZOFSQ.js.map → chunk-GVBPAIGF.js.map} +1 -1
  38. package/dist/{chunk-G5E44VG7.js → chunk-HS2FNSCF.js} +3 -3
  39. package/dist/{chunk-G5E44VG7.js.map → chunk-HS2FNSCF.js.map} +1 -1
  40. package/dist/{chunk-JMB6VR3I.js → chunk-I7HGX4ZE.js} +71 -4
  41. package/dist/chunk-I7HGX4ZE.js.map +1 -0
  42. package/dist/{chunk-PBBGKI3L.js → chunk-NCUTHLRV.js} +4 -4
  43. package/dist/{chunk-PBBGKI3L.js.map → chunk-NCUTHLRV.js.map} +1 -1
  44. package/dist/{chunk-F6RXWVRE.js → chunk-YVX66WNQ.js} +2 -2
  45. package/dist/{chunk-F6RXWVRE.js.map → chunk-YVX66WNQ.js.map} +1 -1
  46. package/dist/cli/index.js +50 -52
  47. package/dist/cli/index.js.map +1 -1
  48. package/dist/cli/src/commands/source.d.ts.map +1 -1
  49. package/dist/connectors/index.js +1 -1
  50. package/dist/connectors/src/fleet-utils.d.ts +6 -9
  51. package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
  52. package/dist/discovery/index.js +1 -1
  53. package/dist/discovery/src/discover-manifest.d.ts +1 -1
  54. package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
  55. package/dist/discovery/src/discover.d.ts +8 -0
  56. package/dist/discovery/src/discover.d.ts.map +1 -1
  57. package/dist/discovery/src/index.d.ts +1 -1
  58. package/dist/discovery/src/index.d.ts.map +1 -1
  59. package/dist/discovery/src/source-config.d.ts +16 -0
  60. package/dist/discovery/src/source-config.d.ts.map +1 -1
  61. package/dist/discovery/src/tree-entries.d.ts +7 -0
  62. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  63. package/dist/{ensure-sources-HA6L3FBS.js → ensure-sources-EU45HFKA.js} +4 -4
  64. package/dist/{ensure-sources-HA6L3FBS.js.map → ensure-sources-EU45HFKA.js.map} +1 -1
  65. package/dist/library/index.js +2 -2
  66. package/dist/library/src/local/local-catalog-source.d.ts +6 -1
  67. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  68. package/dist/{open-library-ICKZYC5K.js → open-library-IOYWFK7M.js} +5 -5
  69. package/dist/{open-library-ICKZYC5K.js.map → open-library-IOYWFK7M.js.map} +1 -1
  70. package/dist/runner/index.js +3 -3
  71. package/dist/sdk/asset-manager.js +1 -1
  72. package/dist/sdk/index.js +3 -3
  73. package/dist/sdk/runner.js +3 -3
  74. package/dist/tui/index.js +3 -3
  75. package/dist/workspace-plugin/index.js +1 -1
  76. package/package.json +1 -1
  77. package/dist/chunk-2GX7BE7Q.js.map +0 -1
  78. package/dist/chunk-B3XHLXGD.js.map +0 -1
  79. package/dist/chunk-JMB6VR3I.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import { openCatalogSource, openLibrary, createFullRegistry, openLibraryManager } from '../chunk-PBBGKI3L.js';
2
+ import { openCatalogSource, openLibrary, createFullRegistry, openLibraryManager } from '../chunk-NCUTHLRV.js';
3
3
  import { logErr, S, logOk, colorRef, logInfo, logWarn, kindColorPad, kindColor, formatRelativeTime } from '../chunk-4NDWKA64.js';
4
4
  import { getStoreConfig, storeFetch, saveStoreTokens, clearStoreTokens, isStoreAuthenticated } from '../chunk-FVWBLAXL.js';
5
5
  import { AI_RESOURCES } from '../chunk-2M3XTMOL.js';
6
6
  import { LocalSecretsProvider } from '../chunk-JDX54X4Y.js';
7
- import { resolveLibraryDir, LocalCatalogSource, skaileHomeDir } from '../chunk-B3XHLXGD.js';
7
+ import { resolveLibraryDir, LocalCatalogSource, skaileHomeDir } from '../chunk-BSY56QS7.js';
8
8
  import '../chunk-R7FOF242.js';
9
- import '../chunk-2GX7BE7Q.js';
9
+ import '../chunk-4S4TZDCD.js';
10
10
  import '../chunk-OKRUTSG7.js';
11
- import { runFlow, resumeFlow } from '../chunk-G5E44VG7.js';
11
+ import { runFlow, resumeFlow } from '../chunk-HS2FNSCF.js';
12
12
  import '../chunk-GCJXPUHG.js';
13
13
  import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-IPUYL6TD.js';
14
- import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-RVPZOFSQ.js';
15
- import { buildClaudePluginFiles } from '../chunk-D6GE2WA2.js';
14
+ import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-GVBPAIGF.js';
15
+ import { buildClaudePluginFiles } from '../chunk-63Y7YN33.js';
16
16
  import '../chunk-X5YPJV4N.js';
17
17
  import '../chunk-O7SG5PC2.js';
18
18
  import '../chunk-W2O5LWYU.js';
@@ -25,14 +25,14 @@ import '../chunk-DQWREFRQ.js';
25
25
  import '../chunk-KOVLSBXK.js';
26
26
  import '../chunk-RRVQAE5D.js';
27
27
  import '../chunk-4ACWI5YT.js';
28
- import '../chunk-JMB6VR3I.js';
28
+ import '../chunk-I7HGX4ZE.js';
29
29
  import '../chunk-VMUQAISH.js';
30
30
  import '../chunk-6MB7CRME.js';
31
31
  import '../chunk-QAVZOJCV.js';
32
32
  import { loadAllFlows } from '../chunk-ICS76R4T.js';
33
33
  import '../chunk-GZWJGNNN.js';
34
34
  import '../chunk-FVTV7M76.js';
35
- import { AssetManager } from '../chunk-F6RXWVRE.js';
35
+ import { AssetManager } from '../chunk-YVX66WNQ.js';
36
36
  import '../chunk-KIGZYGCM.js';
37
37
  import { readLock, resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor } from '../chunk-ATTIX7H2.js';
38
38
  import '../chunk-JKNWJ64A.js';
@@ -470,7 +470,7 @@ function makeCatalogCommand() {
470
470
  const cfg = resolveConfig({ projectDir });
471
471
  const baseUrl = opts.url ?? cfg.catalog.url;
472
472
  if (isLocalCatalogUrl(baseUrl)) {
473
- const { resolveCatalogSource } = await import('../open-library-ICKZYC5K.js');
473
+ const { resolveCatalogSource } = await import('../open-library-IOYWFK7M.js');
474
474
  let resolved;
475
475
  try {
476
476
  resolved = await resolveCatalogSource({ projectDir: opts.projectDir });
@@ -2136,7 +2136,7 @@ function actOnHeader(row, action) {
2136
2136
  return false;
2137
2137
  }
2138
2138
  async function loadAssets() {
2139
- const { gatherAssetFeeds } = await import('../asset-feeds-CQU46DYQ.js');
2139
+ const { gatherAssetFeeds } = await import('../asset-feeds-OFMOTPTX.js');
2140
2140
  const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
2141
2141
  if (notes.length > 0) {
2142
2142
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -2193,7 +2193,7 @@ async function loadAssets() {
2193
2193
  async function loadSourcesAndLibraries() {
2194
2194
  try {
2195
2195
  const [{ openLibraryManager: openLibraryManager2 }, { skaileHomeDir: skaileHomeDir2 }] = await Promise.all([
2196
- import('../open-library-ICKZYC5K.js'),
2196
+ import('../open-library-IOYWFK7M.js'),
2197
2197
  import('../library/index.js')
2198
2198
  ]);
2199
2199
  const { manager, library, close } = await openLibraryManager2();
@@ -3677,7 +3677,7 @@ function makeInstallCommand() {
3677
3677
  const spinner6 = p5.spinner();
3678
3678
  spinner6.start(`Installing ${ref}`);
3679
3679
  try {
3680
- const { openCatalogSource: openCatalogSource2, openLibrary: openLibrary2 } = await import('../open-library-ICKZYC5K.js');
3680
+ const { openCatalogSource: openCatalogSource2, openLibrary: openLibrary2 } = await import('../open-library-IOYWFK7M.js');
3681
3681
  const catalog = await openCatalogSource2({ projectDir: path15__default.resolve(opts.projectDir) });
3682
3682
  if (!supportsInstallManifest(catalog)) {
3683
3683
  throw new Error(
@@ -3709,7 +3709,7 @@ function makeInstallCommand() {
3709
3709
  }
3710
3710
  const projectDir = path15__default.resolve(opts.projectDir);
3711
3711
  try {
3712
- const { ensureSourcesCloned } = await import('../ensure-sources-HA6L3FBS.js');
3712
+ const { ensureSourcesCloned } = await import('../ensure-sources-EU45HFKA.js');
3713
3713
  const hydrate = ensureSourcesCloned(projectDir, { quiet: true });
3714
3714
  if (hydrate.cloned.length > 0) {
3715
3715
  logOk(`Cloned source(s): ${hydrate.cloned.join(", ")}`);
@@ -5044,7 +5044,7 @@ function ensureClone(entry, opts = {}) {
5044
5044
  }
5045
5045
  return true;
5046
5046
  }
5047
- async function refreshManifestCache(entry) {
5047
+ async function refreshManifestCache(entry, includeDev = false) {
5048
5048
  const { manager, library, close } = await openLibraryManager();
5049
5049
  try {
5050
5050
  const dest = sourceClonePath(entry.name);
@@ -5057,7 +5057,7 @@ async function refreshManifestCache(entry) {
5057
5057
  ownership: "reader"
5058
5058
  });
5059
5059
  const catalog = new LocalCatalogSource(library, lib.id, dest, createFullRegistry());
5060
- const result = await catalog.sync();
5060
+ const result = await catalog.sync({ includeDev });
5061
5061
  await library.syncSource(lib.id);
5062
5062
  return result;
5063
5063
  } finally {
@@ -5083,38 +5083,38 @@ function makeSourceCommand() {
5083
5083
  const cmd = new Command("source").description(
5084
5084
  "Manage github sources for the current project (recorded in skaile.yaml)"
5085
5085
  );
5086
- cmd.command("add <git-url>").description("Clone a github repo and register it in this project's skaile.yaml").option("--name <slug>", "Override the derived slug").option("--branch <branch>", "Branch to track (default: main)").option("--force", "Remove an existing clone and re-clone", false).action(async (url, opts) => {
5087
- const yamlPath = requireProjectYamlPath();
5088
- const slug = opts.name ?? deriveSlug(url);
5089
- const entry = { name: slug, url };
5090
- if (opts.branch) entry.branch = opts.branch;
5091
- const editor = WorkspaceYamlEditor.load(yamlPath);
5092
- const existing = editor.getSources().find((s) => s.name === slug);
5093
- if (existing && existing.url !== url) {
5094
- logErr(
5095
- `A source named "${slug}" already exists in ${yamlPath} with a different url (${existing.url}). Pass --name to use a different slug.`
5096
- );
5097
- process.exit(1);
5098
- }
5099
- editor.setSource(entry);
5100
- editor.save();
5101
- const dest = sourceClonePath(slug);
5102
- const preexisting = existsSync(dest);
5103
- const cloned = ensureClone(entry, { force: opts.force });
5104
- if (!cloned) {
5105
- logOk(`Reusing cached clone at ${dest}`);
5106
- } else if (preexisting) {
5107
- logOk(`Re-cloned ${url} \u2192 ${dest}`);
5108
- } else {
5109
- logOk(`Cloned ${url} \u2192 ${dest}`);
5086
+ cmd.command("add <git-url>").description("Clone a github repo and register it in this project's skaile.yaml").option("--name <slug>", "Override the derived slug").option("--branch <branch>", "Branch to track (default: main)").option("--force", "Remove an existing clone and re-clone", false).option("--dev", "Also index dev-only assets under the source's dev_paths", false).action(
5087
+ async (url, opts) => {
5088
+ const yamlPath = requireProjectYamlPath();
5089
+ const slug = opts.name ?? deriveSlug(url);
5090
+ const entry = { name: slug, url };
5091
+ if (opts.branch) entry.branch = opts.branch;
5092
+ const editor = WorkspaceYamlEditor.load(yamlPath);
5093
+ const existing = editor.getSources().find((s) => s.name === slug);
5094
+ if (existing && existing.url !== url) {
5095
+ logErr(
5096
+ `A source named "${slug}" already exists in ${yamlPath} with a different url (${existing.url}). Pass --name to use a different slug.`
5097
+ );
5098
+ process.exit(1);
5099
+ }
5100
+ editor.setSource(entry);
5101
+ editor.save();
5102
+ const dest = sourceClonePath(slug);
5103
+ const preexisting = existsSync(dest);
5104
+ const cloned = ensureClone(entry, { force: opts.force });
5105
+ if (!cloned) {
5106
+ logOk(`Reusing cached clone at ${dest}`);
5107
+ } else if (preexisting) {
5108
+ logOk(`Re-cloned ${url} \u2192 ${dest}`);
5109
+ } else {
5110
+ logOk(`Cloned ${url} \u2192 ${dest}`);
5111
+ }
5112
+ const result = await refreshManifestCache(entry, opts.dev);
5113
+ logOk(`Indexed ${result.assetsUpdated} of ${result.assetsFound} asset(s) from "${slug}".`);
5114
+ for (const err of result.errors) logWarn(err);
5115
+ logOk(`Source "${slug}" registered in ${path15.relative(process.cwd(), yamlPath)}.`);
5110
5116
  }
5111
- const result = await refreshManifestCache(entry);
5112
- logOk(
5113
- `Indexed ${result.assetsUpdated} of ${result.assetsFound} asset(s) from "${slug}".`
5114
- );
5115
- for (const err of result.errors) logWarn(err);
5116
- logOk(`Source "${slug}" registered in ${path15.relative(process.cwd(), yamlPath)}.`);
5117
- });
5117
+ );
5118
5118
  cmd.command("list").description("List sources registered in this project's skaile.yaml").option("--json", "Output as JSON").action(async (opts) => {
5119
5119
  const yamlPath = requireProjectYamlPath();
5120
5120
  const sources = readProjectSources(yamlPath);
@@ -5166,7 +5166,7 @@ function makeSourceCommand() {
5166
5166
  opts.purge ? `Removed source "${name}" and purged its clone.` : `Removed source "${name}" from skaile.yaml (clone left in ~/.skaile/sources/).`
5167
5167
  );
5168
5168
  });
5169
- cmd.command("sync [name]").description("Pull upstream changes and refresh the manifest cache").action(async (name) => {
5169
+ cmd.command("sync [name]").description("Pull upstream changes and refresh the manifest cache").option("--dev", "Also index dev-only assets under each source's dev_paths", false).action(async (name, opts) => {
5170
5170
  const yamlPath = requireProjectYamlPath();
5171
5171
  const all = readProjectSources(yamlPath);
5172
5172
  const targets = name ? all.filter((s) => s.name === name) : all;
@@ -5186,10 +5186,8 @@ function makeSourceCommand() {
5186
5186
  continue;
5187
5187
  }
5188
5188
  }
5189
- const result = await refreshManifestCache(entry);
5190
- logOk(
5191
- `${entry.name}: indexed ${result.assetsUpdated} of ${result.assetsFound} asset(s).`
5192
- );
5189
+ const result = await refreshManifestCache(entry, opts.dev);
5190
+ logOk(`${entry.name}: indexed ${result.assetsUpdated} of ${result.assetsFound} asset(s).`);
5193
5191
  for (const err of result.errors) logWarn(`${entry.name}: ${err}`);
5194
5192
  }
5195
5193
  });
@@ -6051,7 +6049,7 @@ program.command("init [project-dir]").description("Initialize a project director
6051
6049
  );
6052
6050
  }
6053
6051
  try {
6054
- const { ensureSourcesCloned } = await import('../ensure-sources-HA6L3FBS.js');
6052
+ const { ensureSourcesCloned } = await import('../ensure-sources-EU45HFKA.js');
6055
6053
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
6056
6054
  for (const n of hydrate.cloned) created.push(`~/.skaile/sources/${n}/`);
6057
6055
  if (hydrate.failed.length > 0) {