@skaile/workspaces 0.30.1 → 0.32.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 (133) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/{asset-feeds-IWOBYROH.js → asset-feeds-2LQIGNUF.js} +7 -7
  3. package/dist/{asset-feeds-IWOBYROH.js.map → asset-feeds-2LQIGNUF.js.map} +1 -1
  4. package/dist/asset-manager/index.js +5 -5
  5. package/dist/asset-manager/installer.js +4 -4
  6. package/dist/bridge/drivers/claude-sdk.js +33 -1
  7. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  8. package/dist/bridge/drivers/codex.js +1 -1
  9. package/dist/bridge/drivers/continue.js +2 -2
  10. package/dist/bridge/drivers/echo.js +1 -1
  11. package/dist/bridge/drivers/gemini.js +3 -3
  12. package/dist/bridge/drivers/goose.js +2 -2
  13. package/dist/bridge/drivers/omp.js +1 -1
  14. package/dist/bridge/drivers/opencode.js +2 -2
  15. package/dist/bridge/drivers/qwen.js +3 -3
  16. package/dist/bridge/index.js +2 -2
  17. package/dist/bridge/src/drivers/claude-sdk.d.ts +4 -0
  18. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  19. package/dist/{chunk-DAI754GK.js → chunk-2RQ3KLY3.js} +3 -3
  20. package/dist/{chunk-DAI754GK.js.map → chunk-2RQ3KLY3.js.map} +1 -1
  21. package/dist/{chunk-5XAQDOMU.js → chunk-7FLLPKX3.js} +3 -3
  22. package/dist/{chunk-5XAQDOMU.js.map → chunk-7FLLPKX3.js.map} +1 -1
  23. package/dist/{chunk-YBJLYT4S.js → chunk-7WHBI3I6.js} +3 -3
  24. package/dist/{chunk-YBJLYT4S.js.map → chunk-7WHBI3I6.js.map} +1 -1
  25. package/dist/{chunk-AKYEI3D6.js → chunk-AOWKMINN.js} +5 -5
  26. package/dist/{chunk-AKYEI3D6.js.map → chunk-AOWKMINN.js.map} +1 -1
  27. package/dist/{chunk-ZME3JDA6.js → chunk-BR7RPEHW.js} +3 -3
  28. package/dist/{chunk-ZME3JDA6.js.map → chunk-BR7RPEHW.js.map} +1 -1
  29. package/dist/{chunk-VGFYUD3T.js → chunk-CPYXJJOD.js} +6 -6
  30. package/dist/{chunk-VGFYUD3T.js.map → chunk-CPYXJJOD.js.map} +1 -1
  31. package/dist/{chunk-5DQOZFWJ.js → chunk-DTJNHYFE.js} +18 -5
  32. package/dist/chunk-DTJNHYFE.js.map +1 -0
  33. package/dist/{chunk-FRRTUVUM.js → chunk-GXHJDQ37.js} +78 -24
  34. package/dist/chunk-GXHJDQ37.js.map +1 -0
  35. package/dist/{chunk-6TCOYFVJ.js → chunk-LO7QEIHT.js} +4 -4
  36. package/dist/{chunk-6TCOYFVJ.js.map → chunk-LO7QEIHT.js.map} +1 -1
  37. package/dist/{chunk-5MJJYIL4.js → chunk-MA7HSL5S.js} +2 -2
  38. package/dist/{chunk-5MJJYIL4.js.map → chunk-MA7HSL5S.js.map} +1 -1
  39. package/dist/{chunk-LIK75OJ5.js → chunk-MG4KFVGV.js} +3 -3
  40. package/dist/{chunk-LIK75OJ5.js.map → chunk-MG4KFVGV.js.map} +1 -1
  41. package/dist/{chunk-WDMH4UMD.js → chunk-N74UQJPN.js} +45 -3
  42. package/dist/chunk-N74UQJPN.js.map +1 -0
  43. package/dist/{chunk-PVMAIVNL.js → chunk-NGE6PALH.js} +3 -3
  44. package/dist/{chunk-PVMAIVNL.js.map → chunk-NGE6PALH.js.map} +1 -1
  45. package/dist/{chunk-KHZI44SS.js → chunk-NZJDQYNB.js} +2 -2
  46. package/dist/{chunk-KHZI44SS.js.map → chunk-NZJDQYNB.js.map} +1 -1
  47. package/dist/{chunk-IZIFMNTI.js → chunk-OEXA7BBK.js} +2 -2
  48. package/dist/{chunk-IZIFMNTI.js.map → chunk-OEXA7BBK.js.map} +1 -1
  49. package/dist/{chunk-SCJD3FMO.js → chunk-P72K36PU.js} +4 -4
  50. package/dist/{chunk-SCJD3FMO.js.map → chunk-P72K36PU.js.map} +1 -1
  51. package/dist/{chunk-LA2YSXEE.js → chunk-PWXN2KHV.js} +3 -3
  52. package/dist/{chunk-LA2YSXEE.js.map → chunk-PWXN2KHV.js.map} +1 -1
  53. package/dist/{chunk-XOAF5QAE.js → chunk-SIW5I47F.js} +78 -57
  54. package/dist/chunk-SIW5I47F.js.map +1 -0
  55. package/dist/{chunk-2VKVWN5E.js → chunk-SN2RWSB3.js} +3 -3
  56. package/dist/{chunk-2VKVWN5E.js.map → chunk-SN2RWSB3.js.map} +1 -1
  57. package/dist/{chunk-TU4VZULO.js → chunk-YHGJBGFU.js} +3 -3
  58. package/dist/{chunk-TU4VZULO.js.map → chunk-YHGJBGFU.js.map} +1 -1
  59. package/dist/cli/index.js +32 -32
  60. package/dist/connectors/config.js +4 -4
  61. package/dist/connectors/index.js +5 -5
  62. package/dist/connectors/src/connector-types.d.ts +8 -0
  63. package/dist/connectors/src/connector-types.d.ts.map +1 -1
  64. package/dist/core/index.js +3 -3
  65. package/dist/core/runtime-assets.js +2 -2
  66. package/dist/core/src/workspace-config.d.ts +16 -0
  67. package/dist/core/src/workspace-config.d.ts.map +1 -1
  68. package/dist/core/workspace-config.js +1 -1
  69. package/dist/deploy/index.js +3 -3
  70. package/dist/{ensure-sources-6GW6UBXY.js → ensure-sources-CRUZDVPG.js} +7 -7
  71. package/dist/{ensure-sources-6GW6UBXY.js.map → ensure-sources-CRUZDVPG.js.map} +1 -1
  72. package/dist/factory-assets/connectors/deploy.js +5 -5
  73. package/dist/factory-assets/connectors/devserver.js +5 -5
  74. package/dist/factory-assets/connectors/flow/adapter.js +5 -5
  75. package/dist/factory-assets/connectors/flow/engine.js +3 -3
  76. package/dist/factory-assets/connectors/flow/run-flow.js +6 -6
  77. package/dist/factory-assets/connectors/flow.js +5 -5
  78. package/dist/factory-assets/connectors/git/driver.d.ts +54 -0
  79. package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
  80. package/dist/factory-assets/connectors/git.js +5 -5
  81. package/dist/factory-assets/connectors/gmail.js +5 -5
  82. package/dist/factory-assets/connectors/googledrive.js +5 -5
  83. package/dist/factory-assets/connectors/local.js +5 -5
  84. package/dist/factory-assets/connectors/mattermost.js +5 -5
  85. package/dist/factory-assets/connectors/memory.js +5 -5
  86. package/dist/factory-assets/connectors/minio.js +5 -5
  87. package/dist/factory-assets/connectors/postgres.js +5 -5
  88. package/dist/factory-assets/connectors/s3.js +5 -5
  89. package/dist/factory-assets/connectors/sharepoint.js +5 -5
  90. package/dist/factory-assets/connectors/sqlite.js +5 -5
  91. package/dist/factory-assets/connectors/static-server.js +5 -5
  92. package/dist/factory-assets/connectors/tunnel.js +5 -5
  93. package/dist/factory-assets/connectors/webdav.js +5 -5
  94. package/dist/factory-assets/connectors/xstate-store.js +5 -5
  95. package/dist/factory-assets/connectors/xstate.js +5 -5
  96. package/dist/{flows-JXO3KGC2.js → flows-W7L2576K.js} +3 -3
  97. package/dist/{flows-JXO3KGC2.js.map → flows-W7L2576K.js.map} +1 -1
  98. package/dist/library/index.js +5 -5
  99. package/dist/library/install.js +4 -4
  100. package/dist/library/src/config.d.ts +2 -2
  101. package/dist/library/src/install/index.d.ts +1 -1
  102. package/dist/library/src/install/index.d.ts.map +1 -1
  103. package/dist/library/src/install/install-from-manifest.d.ts +25 -1
  104. package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
  105. package/dist/{open-library-SH6NCJM2.js → open-library-XZZXXVBP.js} +8 -8
  106. package/dist/{open-library-SH6NCJM2.js.map → open-library-XZZXXVBP.js.map} +1 -1
  107. package/dist/{paths-YSXGJ7TO.js → paths-RH5CIFX2.js} +6 -6
  108. package/dist/{paths-YSXGJ7TO.js.map → paths-RH5CIFX2.js.map} +1 -1
  109. package/dist/{plugin-store-2KMDUF7R.js → plugin-store-2UZGNS6M.js} +5 -5
  110. package/dist/{plugin-store-2KMDUF7R.js.map → plugin-store-2UZGNS6M.js.map} +1 -1
  111. package/dist/runner/index.js +9 -9
  112. package/dist/runner/src/external-mcp.d.ts.map +1 -1
  113. package/dist/runner/src/recipe-resolver.d.ts +32 -0
  114. package/dist/runner/src/recipe-resolver.d.ts.map +1 -1
  115. package/dist/sdk/asset-manager.js +5 -5
  116. package/dist/sdk/bridge.js +2 -2
  117. package/dist/sdk/core.js +3 -3
  118. package/dist/sdk/flow.js +3 -3
  119. package/dist/sdk/index.js +9 -9
  120. package/dist/sdk/runner.js +9 -9
  121. package/dist/{setup-6MQ6QWML.js → setup-G5UATRCX.js} +7 -7
  122. package/dist/{setup-6MQ6QWML.js.map → setup-G5UATRCX.js.map} +1 -1
  123. package/dist/{store-client-LDYF4TK4.js → store-client-TUC7VSOU.js} +6 -6
  124. package/dist/{store-client-LDYF4TK4.js.map → store-client-TUC7VSOU.js.map} +1 -1
  125. package/dist/tui/index.js +9 -9
  126. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  127. package/dist/workspace-plugin/adapters/omp.js +3 -3
  128. package/dist/workspace-plugin/index.js +1 -1
  129. package/package.json +1 -1
  130. package/dist/chunk-5DQOZFWJ.js.map +0 -1
  131. package/dist/chunk-FRRTUVUM.js.map +0 -1
  132. package/dist/chunk-WDMH4UMD.js.map +0 -1
  133. package/dist/chunk-XOAF5QAE.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#126](https://github.com/skaile-ai/workspaces/pull/126) [`edda854`](https://github.com/skaile-ai/workspaces/commit/edda85442624bae0443216cd242b3227e577c295) Thanks [@peteralbert](https://github.com/peteralbert)! - First-class connector mode (agent|sync) in skaile.yaml + git driver derives session/sync/lifecycle defaults.
8
+
9
+ Adds an optional flat-layout mode to `installFromManifest` (`@skaile/workspaces/install`): pass `targetDir` and install-core reproduces the platform pointer-installer's behavior — strips the longest-common-dir prefix, per-file sha256-verifies, and writes the stripped paths as immediate children of `targetDir`, with no ref parse and no composite verify. This makes install-core the single canonical installer so the platform can retire its duplicated `installPointer`. Omitting `targetDir` is unchanged: the existing ref-derived `@<pub>/name/version/<path>` layout + composite verify remains the default. Also exports a `longestCommonDirPrefix` helper.
10
+
11
+ ## 0.31.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#124](https://github.com/skaile-ai/workspaces/pull/124) [`a1afc6a`](https://github.com/skaile-ai/workspaces/commit/a1afc6a8e4a5f347619f5c75d80a29f38994563a) Thanks [@peteralbert](https://github.com/peteralbert)! - MCP launcher is now a pluggable, named strategy.
16
+
17
+ `runner`'s `recipe-resolver` is generalized behind a `RecipeProducer` seam — a content-addressed store-path map (`MapRecipeProducer`) and a nix builder (`NixRecipeProducer`) are now two producers behind one interface (`resolveViaProducers`); nix is one producer of the map, not the only resolution path. `resolveRecipePath` is unchanged for existing callers (thin back-compat wrapper).
18
+
19
+ `McpServerDeclaration` (`@skaile/workspaces/core`) gains an optional `launcher: "recipe" | "package-runner" | "path"`. Only `recipe` carries resolution logic (the producer seam); `package-runner` (npx/uvx/pip) and `path` are documented command-shapes the stdio transport already spawns as-is. `launcher: "recipe"` without a `recipe` binding is a logged drop; an unknown `launcher` value is stripped with an `unknown_launcher` diagnostic. No wire/transport changes — remote (sse/http) MCP is unaffected.
20
+
21
+ ### Patch Changes
22
+
23
+ - [#123](https://github.com/skaile-ai/workspaces/pull/123) [`2c7fe23`](https://github.com/skaile-ai/workspaces/commit/2c7fe23e751bd9efd6ad0af11033f2489deeb2d3) Thanks [@peteralbert](https://github.com/peteralbert)! - Fix: claude-sdk driver no longer leaks a recovered 401 to the user. Claude Code
24
+ renders an upstream `authentication_error` as a standalone assistant text
25
+ message ("Failed to authenticate. API Error: 401 ...") just before failing the
26
+ turn. The existing error-event deferral only suppressed the structured `error`
27
+ agent-event, so that assistant text still flowed through the normal message
28
+ channel and was persisted/shown even when the self-heal retry recovered
29
+ cleanly. The driver now suppresses a text-only assistant message that
30
+ classifies as `auth` while a self-heal is still available (`onAuthError` wired
31
+ and the auth budget unspent); the retried attempt re-emits the real content.
32
+ Turns that genuinely succeed and messages carrying tool calls are unaffected.
33
+
3
34
  ## 0.30.1
4
35
 
5
36
  ### Patch Changes
@@ -1,6 +1,6 @@
1
- import './chunk-YBJLYT4S.js';
2
- import './chunk-2VKVWN5E.js';
3
- import { scanRepo } from './chunk-5DQOZFWJ.js';
1
+ import './chunk-7WHBI3I6.js';
2
+ import './chunk-SN2RWSB3.js';
3
+ import { scanRepo } from './chunk-DTJNHYFE.js';
4
4
  import './chunk-H5YXL4KI.js';
5
5
  import './chunk-4AGIEU7V.js';
6
6
  import './chunk-LFDZYCEO.js';
@@ -17,7 +17,7 @@ async function libraryAssets() {
17
17
  const notes = [];
18
18
  try {
19
19
  const [{ openLibraryManager }, { skaileHomeDir }] = await Promise.all([
20
- import('./open-library-SH6NCJM2.js'),
20
+ import('./open-library-XZZXXVBP.js'),
21
21
  import('./library/index.js')
22
22
  ]);
23
23
  const { manager, close } = await openLibraryManager();
@@ -46,7 +46,7 @@ async function libraryAssets() {
46
46
  async function storeAssets(projectDir) {
47
47
  const notes = [];
48
48
  try {
49
- const { resolveCatalogSource } = await import('./open-library-SH6NCJM2.js');
49
+ const { resolveCatalogSource } = await import('./open-library-XZZXXVBP.js');
50
50
  const { source, close } = await resolveCatalogSource({ projectDir });
51
51
  try {
52
52
  const assets = await source.listAssets();
@@ -94,5 +94,5 @@ async function gatherAssetFeeds(am, projectDir) {
94
94
  }
95
95
 
96
96
  export { gatherAssetFeeds };
97
- //# sourceMappingURL=asset-feeds-IWOBYROH.js.map
98
- //# sourceMappingURL=asset-feeds-IWOBYROH.js.map
97
+ //# sourceMappingURL=asset-feeds-2LQIGNUF.js.map
98
+ //# sourceMappingURL=asset-feeds-2LQIGNUF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmDA,eAAe,aAAA,GAAyE;AACtF,EAAA,MAAM,QAAoB,EAAC;AAC3B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OAAA,EAAS,EAAC,EAAG,KAAA,EAAM;AAAA,EAC9B;AACF;AAQA,SAAS,aAAa,EAAA,EAAsD;AAC1E,EAAA,OAAO,GAAG,MAAA,EAAO;AACnB;AAGA,SAAS,GAAA,CAAI,QAAqB,OAAA,EAAwC;AACxE,EAAA,OAAO,QAAQ,GAAA,CAAI,CAAC,WAAW,EAAE,MAAA,EAAQ,OAAM,CAAE,CAAA;AACnD;AAQA,eAAsB,gBAAA,CACpB,IACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,aAAA,EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA,CAAI,QAAA,EAAU,YAAA,CAAa,EAAE,CAAC,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,SAAA,EAAW,IAAA,CAAK,OAAO,CAAA;AAAA,MAC9B,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,OAAO,CAAC,GAAG,KAAK,KAAA,EAAO,GAAG,MAAM,KAAK;AAAA,GACvC;AACF","file":"asset-feeds-IWOBYROH.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Three feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex` (filesystem\n * scan of each library's `path`).\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport { existsSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport { type AssetKind, type CatalogEntry, scanRepo } from \"@skaile/workspaces/core\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n notes: FeedNote[];\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/sources/` cache). Each\n * library's `path` is scanned with `scanRepo` and tagged with\n * `repository = \"library:<name>\"` so the manage TUI groups them into their\n * own headers.\n */\nasync function libraryAssets(): Promise<{ entries: CatalogEntry[]; notes: FeedNote[] }> {\n const notes: FeedNote[] = [];\n try {\n const [{ openLibraryManager }, { skaileHomeDir }] = await Promise.all([\n import(\"./open-library.ts\"),\n import(\"@skaile/workspaces/library\"),\n ]);\n const { manager, close } = await openLibraryManager();\n try {\n const sourcesDir = path.join(skaileHomeDir(), \"sources\");\n const libs = (await manager.listLibraries()).filter((l) => !l.path.startsWith(sourcesDir));\n const entries: CatalogEntry[] = [];\n for (const lib of libs) {\n if (!existsSync(lib.path)) continue;\n for (const e of scanRepo(lib.path, `library:${lib.name}`)) {\n entries.push(e);\n }\n }\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n const assets = await source.listAssets();\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n domainSlug: a.domainSlug,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], notes };\n }\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which now merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Provided as a\n * function rather than an inline call so the caller can supply a fresh\n * `AssetManager` instance.\n */\nfunction sourceAssets(am: { search: () => CatalogEntry[] }): CatalogEntry[] {\n return am.search();\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all three feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk.\n */\nexport async function gatherAssetFeeds(\n am: { search: () => CatalogEntry[] },\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n return {\n entries: [\n ...tag(\"source\", sourceAssets(am)),\n ...tag(\"library\", libs.entries),\n ...tag(\"store\", store.entries),\n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AAI,CAAC,QAAA,CAAS,IAAA,CAAK,GAAG,CAAA,EAAG;AACvB,MAAA,KAAA,CAAM,KAAK,EAAE,IAAA,EAAM,OAAA,EAAS,OAAA,EAAS,KAAK,CAAA;AAAA,IAC5C;AACA,IAAA,OAAO,EAAE,OAAA,EAAS,EAAC,EAAG,KAAA,EAAM;AAAA,EAC9B;AACF;AAQA,SAAS,aAAa,EAAA,EAAsD;AAC1E,EAAA,OAAO,GAAG,MAAA,EAAO;AACnB;AAGA,SAAS,GAAA,CAAI,QAAqB,OAAA,EAAwC;AACxE,EAAA,OAAO,QAAQ,GAAA,CAAI,CAAC,WAAW,EAAE,MAAA,EAAQ,OAAM,CAAE,CAAA;AACnD;AAQA,eAAsB,gBAAA,CACpB,IACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,aAAA,EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA,CAAI,QAAA,EAAU,YAAA,CAAa,EAAE,CAAC,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,SAAA,EAAW,IAAA,CAAK,OAAO,CAAA;AAAA,MAC9B,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,OAAO,CAAC,GAAG,KAAK,KAAA,EAAO,GAAG,MAAM,KAAK;AAAA,GACvC;AACF","file":"asset-feeds-2LQIGNUF.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Three feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex` (filesystem\n * scan of each library's `path`).\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport { existsSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport { type AssetKind, type CatalogEntry, scanRepo } from \"@skaile/workspaces/core\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n notes: FeedNote[];\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/sources/` cache). Each\n * library's `path` is scanned with `scanRepo` and tagged with\n * `repository = \"library:<name>\"` so the manage TUI groups them into their\n * own headers.\n */\nasync function libraryAssets(): Promise<{ entries: CatalogEntry[]; notes: FeedNote[] }> {\n const notes: FeedNote[] = [];\n try {\n const [{ openLibraryManager }, { skaileHomeDir }] = await Promise.all([\n import(\"./open-library.ts\"),\n import(\"@skaile/workspaces/library\"),\n ]);\n const { manager, close } = await openLibraryManager();\n try {\n const sourcesDir = path.join(skaileHomeDir(), \"sources\");\n const libs = (await manager.listLibraries()).filter((l) => !l.path.startsWith(sourcesDir));\n const entries: CatalogEntry[] = [];\n for (const lib of libs) {\n if (!existsSync(lib.path)) continue;\n for (const e of scanRepo(lib.path, `library:${lib.name}`)) {\n entries.push(e);\n }\n }\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n const assets = await source.listAssets();\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n domainSlug: a.domainSlug,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], notes };\n }\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which now merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Provided as a\n * function rather than an inline call so the caller can supply a fresh\n * `AssetManager` instance.\n */\nfunction sourceAssets(am: { search: () => CatalogEntry[] }): CatalogEntry[] {\n return am.search();\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all three feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk.\n */\nexport async function gatherAssetFeeds(\n am: { search: () => CatalogEntry[] },\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n return {\n entries: [\n ...tag(\"source\", sourceAssets(am)),\n ...tag(\"library\", libs.entries),\n ...tag(\"store\", store.entries),\n ],\n notes: [...libs.notes, ...store.notes],\n };\n}\n"]}
@@ -1,8 +1,8 @@
1
- export { AssetManager, parseCanonicalLockKey } from '../chunk-VGFYUD3T.js';
2
- export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-6TCOYFVJ.js';
3
- import '../chunk-YBJLYT4S.js';
4
- import '../chunk-2VKVWN5E.js';
5
- import '../chunk-5DQOZFWJ.js';
1
+ export { AssetManager, parseCanonicalLockKey } from '../chunk-CPYXJJOD.js';
2
+ export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-LO7QEIHT.js';
3
+ import '../chunk-7WHBI3I6.js';
4
+ import '../chunk-SN2RWSB3.js';
5
+ import '../chunk-DTJNHYFE.js';
6
6
  import '../chunk-H5YXL4KI.js';
7
7
  import '../chunk-4AGIEU7V.js';
8
8
  import '../chunk-LFDZYCEO.js';
@@ -1,7 +1,7 @@
1
- export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-6TCOYFVJ.js';
2
- import '../chunk-YBJLYT4S.js';
3
- import '../chunk-2VKVWN5E.js';
4
- import '../chunk-5DQOZFWJ.js';
1
+ export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-LO7QEIHT.js';
2
+ import '../chunk-7WHBI3I6.js';
3
+ import '../chunk-SN2RWSB3.js';
4
+ import '../chunk-DTJNHYFE.js';
5
5
  import '../chunk-H5YXL4KI.js';
6
6
  import '../chunk-4AGIEU7V.js';
7
7
  import '../chunk-LFDZYCEO.js';
@@ -1,7 +1,7 @@
1
1
  import { dispatchCapability } from '../../chunk-RRVQAE5D.js';
2
2
  import { fetchProviderModels } from '../../chunk-BMQKMOQY.js';
3
3
  import { AuthError, classifyClaudeSdkError } from '../../chunk-NGJ6E344.js';
4
- import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger } from '../../chunk-IZIFMNTI.js';
4
+ import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger } from '../../chunk-OEXA7BBK.js';
5
5
  import '../../chunk-6E6PKKAD.js';
6
6
  import '../../chunk-JB35MVBN.js';
7
7
  import '../../chunk-NSBPE2FW.js';
@@ -235,6 +235,8 @@ var ClaudeSdkDriver = class extends AgentDriver {
235
235
  sdk = null;
236
236
  toolIdToName = /* @__PURE__ */ new Map();
237
237
  prevText = "";
238
+ /** Set once the streaming text of the current message classifies as a self-healable auth render. */
239
+ suppressingAuthStream = false;
238
240
  /** Active query — may stay alive between turns if streamInput works. */
239
241
  query = null;
240
242
  /** Resolves when the current turn completes. */
@@ -336,6 +338,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
336
338
  if (isFirstAttempt) this._lastTokens = null;
337
339
  this.running = true;
338
340
  this.prevText = "";
341
+ this.suppressingAuthStream = false;
339
342
  this.turnCompleted = false;
340
343
  const turnPromise = new Promise((resolve, reject) => {
341
344
  this.turnResolve = resolve;
@@ -914,6 +917,12 @@ var ClaudeSdkDriver = class extends AgentDriver {
914
917
  }
915
918
  handleAssistantMessage(msg) {
916
919
  const agentMsg = this.mapAssistantMessage(msg);
920
+ if (this.isSuppressibleAuthRender(agentMsg)) {
921
+ this.log.info("suppressing SDK auth-error assistant text; self-heal will retry");
922
+ this.prevText = "";
923
+ this.suppressingAuthStream = false;
924
+ return;
925
+ }
917
926
  this.emit("agent-event", { type: "message_start", message: agentMsg });
918
927
  if (agentMsg.toolCalls) {
919
928
  for (const tc of agentMsg.toolCalls) {
@@ -926,13 +935,36 @@ var ClaudeSdkDriver = class extends AgentDriver {
926
935
  }
927
936
  }
928
937
  this.prevText = "";
938
+ this.suppressingAuthStream = false;
929
939
  this.emit("agent-event", { type: "message_end", message: agentMsg });
930
940
  }
941
+ // True when this assistant text is the SDK's render of a 401 about to be self-healed.
942
+ isSuppressibleAuthRender(msg) {
943
+ if (this.authSelfHealUsed || this.config.onAuthError == null) return false;
944
+ if (msg.toolCalls && msg.toolCalls.length > 0) return false;
945
+ const text = typeof msg.content === "string" ? msg.content : msg.content.filter((b) => b.type === "text" && typeof b.text === "string").map((b) => b.text).join("");
946
+ return this.textIsAuthRender(text);
947
+ }
948
+ // Cheap substring pre-filter keeps the full classifier off the hot path of
949
+ // every assistant message / stream delta; only auth-shaped text pays for it.
950
+ textIsAuthRender(text) {
951
+ const lower = text.trim().toLowerCase();
952
+ if (!lower) return false;
953
+ if (!lower.includes("auth") && !lower.includes("401") && !lower.includes("login")) {
954
+ return false;
955
+ }
956
+ return classifyClaudeSdkError({ errors: [text], oauthCredential: this.usingOauthCredential }).category === "auth";
957
+ }
931
958
  handleStreamEvent(msg) {
932
959
  const event = msg.event;
933
960
  if (event?.type === "content_block_delta" && event.delta?.type === "text_delta" && event.delta.text) {
934
961
  const delta = event.delta.text;
935
962
  this.prevText += delta;
963
+ if (!this.suppressingAuthStream && this.textIsAuthRender(this.prevText)) {
964
+ this.suppressingAuthStream = true;
965
+ this.log.info("suppressing SDK auth-error stream; self-heal will retry");
966
+ }
967
+ if (this.suppressingAuthStream) return;
936
968
  const agentMsg = {
937
969
  role: "assistant",
938
970
  content: [{ type: "text", text: this.prevText }]