@skaile/workspaces 0.31.0 → 0.33.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 (148) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/{asset-feeds-6HZDZEIT.js → asset-feeds-DX5JPM76.js} +7 -7
  3. package/dist/{asset-feeds-6HZDZEIT.js.map → asset-feeds-DX5JPM76.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 +8 -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.map +1 -1
  18. package/dist/{chunk-QF6LBS2C.js → chunk-362QBS57.js} +277 -61
  19. package/dist/chunk-362QBS57.js.map +1 -0
  20. package/dist/{chunk-ZM7UOJR2.js → chunk-4ZVS6KV4.js} +2 -2
  21. package/dist/{chunk-ZM7UOJR2.js.map → chunk-4ZVS6KV4.js.map} +1 -1
  22. package/dist/{chunk-NGE6PALH.js → chunk-67AXL4OK.js} +3 -3
  23. package/dist/{chunk-NGE6PALH.js.map → chunk-67AXL4OK.js.map} +1 -1
  24. package/dist/{chunk-DKAV43NI.js → chunk-AZODLVKH.js} +9 -16
  25. package/dist/chunk-AZODLVKH.js.map +1 -0
  26. package/dist/{chunk-MWAEOCU7.js → chunk-BUMDC3R2.js} +5 -5
  27. package/dist/{chunk-MWAEOCU7.js.map → chunk-BUMDC3R2.js.map} +1 -1
  28. package/dist/{chunk-OEXA7BBK.js → chunk-CIFTUSBV.js} +2 -2
  29. package/dist/{chunk-OEXA7BBK.js.map → chunk-CIFTUSBV.js.map} +1 -1
  30. package/dist/{chunk-BRBOC53X.js → chunk-EJZFQCQG.js} +2 -2
  31. package/dist/{chunk-BRBOC53X.js.map → chunk-EJZFQCQG.js.map} +1 -1
  32. package/dist/{chunk-7KOBITAP.js → chunk-KKERAIPQ.js} +3 -3
  33. package/dist/{chunk-7KOBITAP.js.map → chunk-KKERAIPQ.js.map} +1 -1
  34. package/dist/{chunk-VO7QQ76S.js → chunk-LRFZNLB2.js} +10 -7
  35. package/dist/chunk-LRFZNLB2.js.map +1 -0
  36. package/dist/{chunk-WDMH4UMD.js → chunk-N74UQJPN.js} +45 -3
  37. package/dist/chunk-N74UQJPN.js.map +1 -0
  38. package/dist/{chunk-7FLLPKX3.js → chunk-NSVAJWWQ.js} +3 -3
  39. package/dist/{chunk-7FLLPKX3.js.map → chunk-NSVAJWWQ.js.map} +1 -1
  40. package/dist/{chunk-G247J4MC.js → chunk-PKPUVQJP.js} +3 -3
  41. package/dist/{chunk-G247J4MC.js.map → chunk-PKPUVQJP.js.map} +1 -1
  42. package/dist/{chunk-4CRKROS5.js → chunk-PTDVTMQL.js} +4 -4
  43. package/dist/{chunk-4CRKROS5.js.map → chunk-PTDVTMQL.js.map} +1 -1
  44. package/dist/{chunk-LA2YSXEE.js → chunk-PWXN2KHV.js} +3 -3
  45. package/dist/{chunk-LA2YSXEE.js.map → chunk-PWXN2KHV.js.map} +1 -1
  46. package/dist/{chunk-NQC7ZUXE.js → chunk-QUWXW2N3.js} +3 -3
  47. package/dist/{chunk-NQC7ZUXE.js.map → chunk-QUWXW2N3.js.map} +1 -1
  48. package/dist/{chunk-IENYMRZ6.js → chunk-R2I7RHT7.js} +49 -19
  49. package/dist/chunk-R2I7RHT7.js.map +1 -0
  50. package/dist/{chunk-CBIPUBUS.js → chunk-RQG5TXIR.js} +3 -3
  51. package/dist/{chunk-CBIPUBUS.js.map → chunk-RQG5TXIR.js.map} +1 -1
  52. package/dist/{chunk-P72K36PU.js → chunk-TV2OU2EZ.js} +4 -4
  53. package/dist/{chunk-P72K36PU.js.map → chunk-TV2OU2EZ.js.map} +1 -1
  54. package/dist/{chunk-HH62ECJ7.js → chunk-VXW2K4YH.js} +3 -3
  55. package/dist/{chunk-HH62ECJ7.js.map → chunk-VXW2K4YH.js.map} +1 -1
  56. package/dist/{chunk-45RKEHPX.js → chunk-XQRAXAL5.js} +6 -6
  57. package/dist/{chunk-45RKEHPX.js.map → chunk-XQRAXAL5.js.map} +1 -1
  58. package/dist/{chunk-74UKG2LA.js → chunk-XT6AZWK3.js} +40 -5
  59. package/dist/chunk-XT6AZWK3.js.map +1 -0
  60. package/dist/cli/index.js +33 -33
  61. package/dist/connectors/config.js +4 -4
  62. package/dist/connectors/index.js +6 -6
  63. package/dist/connectors/rclone.js +1 -1
  64. package/dist/connectors/src/config.d.ts +30 -3
  65. package/dist/connectors/src/config.d.ts.map +1 -1
  66. package/dist/connectors/src/connector-types.d.ts +8 -0
  67. package/dist/connectors/src/connector-types.d.ts.map +1 -1
  68. package/dist/connectors/src/index.d.ts +5 -2
  69. package/dist/connectors/src/index.d.ts.map +1 -1
  70. package/dist/connectors/src/rclone-process-manager.d.ts +24 -0
  71. package/dist/connectors/src/rclone-process-manager.d.ts.map +1 -1
  72. package/dist/connectors/src/rclone-token-refresh.d.ts +84 -0
  73. package/dist/connectors/src/rclone-token-refresh.d.ts.map +1 -0
  74. package/dist/core/index.js +3 -3
  75. package/dist/core/runtime-assets.js +2 -2
  76. package/dist/core/src/workspace-config.d.ts +15 -6
  77. package/dist/core/src/workspace-config.d.ts.map +1 -1
  78. package/dist/core/workspace-config.js +1 -1
  79. package/dist/deploy/index.js +3 -3
  80. package/dist/{ensure-sources-JWBUVDW6.js → ensure-sources-O6RMWP6C.js} +7 -7
  81. package/dist/{ensure-sources-JWBUVDW6.js.map → ensure-sources-O6RMWP6C.js.map} +1 -1
  82. package/dist/factory-assets/connectors/deploy.js +6 -6
  83. package/dist/factory-assets/connectors/devserver.js +6 -6
  84. package/dist/factory-assets/connectors/flow/adapter.js +6 -6
  85. package/dist/factory-assets/connectors/flow/engine.js +3 -3
  86. package/dist/factory-assets/connectors/flow/run-flow.js +7 -7
  87. package/dist/factory-assets/connectors/flow.js +6 -6
  88. package/dist/factory-assets/connectors/git/driver.d.ts +54 -0
  89. package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
  90. package/dist/factory-assets/connectors/git.js +6 -6
  91. package/dist/factory-assets/connectors/gmail.js +6 -6
  92. package/dist/factory-assets/connectors/googledrive.js +6 -6
  93. package/dist/factory-assets/connectors/local.js +6 -6
  94. package/dist/factory-assets/connectors/mattermost.js +6 -6
  95. package/dist/factory-assets/connectors/memory.js +6 -6
  96. package/dist/factory-assets/connectors/minio.js +6 -6
  97. package/dist/factory-assets/connectors/postgres.js +6 -6
  98. package/dist/factory-assets/connectors/s3.js +6 -6
  99. package/dist/factory-assets/connectors/sharepoint/driver.d.ts.map +1 -1
  100. package/dist/factory-assets/connectors/sharepoint.js +6 -6
  101. package/dist/factory-assets/connectors/sqlite.js +6 -6
  102. package/dist/factory-assets/connectors/static-server.js +6 -6
  103. package/dist/factory-assets/connectors/tunnel.js +6 -6
  104. package/dist/factory-assets/connectors/webdav/driver.d.ts.map +1 -1
  105. package/dist/factory-assets/connectors/webdav.js +6 -6
  106. package/dist/factory-assets/connectors/xstate-store.js +6 -6
  107. package/dist/factory-assets/connectors/xstate.js +6 -6
  108. package/dist/{flows-T6RCRKCX.js → flows-QWYIUDA2.js} +3 -3
  109. package/dist/{flows-T6RCRKCX.js.map → flows-QWYIUDA2.js.map} +1 -1
  110. package/dist/library/index.js +5 -5
  111. package/dist/library/install.js +4 -4
  112. package/dist/library/src/install/index.d.ts +1 -1
  113. package/dist/library/src/install/index.d.ts.map +1 -1
  114. package/dist/library/src/install/install-from-manifest.d.ts +25 -1
  115. package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
  116. package/dist/{open-library-ZXTSUPBJ.js → open-library-B7BLYXYK.js} +8 -8
  117. package/dist/{open-library-ZXTSUPBJ.js.map → open-library-B7BLYXYK.js.map} +1 -1
  118. package/dist/{paths-F7RHQUFL.js → paths-5IUR235S.js} +6 -6
  119. package/dist/{paths-F7RHQUFL.js.map → paths-5IUR235S.js.map} +1 -1
  120. package/dist/{plugin-store-BC3I36HA.js → plugin-store-WWOJXWG7.js} +5 -5
  121. package/dist/{plugin-store-BC3I36HA.js.map → plugin-store-WWOJXWG7.js.map} +1 -1
  122. package/dist/runner/index.js +10 -10
  123. package/dist/runner/src/lifecycle-handler.d.ts +17 -0
  124. package/dist/runner/src/lifecycle-handler.d.ts.map +1 -0
  125. package/dist/runner/src/runner-capabilities.d.ts +1 -1
  126. package/dist/runner/src/runner-capabilities.d.ts.map +1 -1
  127. package/dist/runner/src/serve.d.ts.map +1 -1
  128. package/dist/sdk/asset-manager.js +5 -5
  129. package/dist/sdk/bridge.js +2 -2
  130. package/dist/sdk/core.js +3 -3
  131. package/dist/sdk/flow.js +3 -3
  132. package/dist/sdk/index.js +10 -10
  133. package/dist/sdk/runner.js +10 -10
  134. package/dist/{setup-FQ3DE6J6.js → setup-2RD6EDBZ.js} +7 -7
  135. package/dist/{setup-FQ3DE6J6.js.map → setup-2RD6EDBZ.js.map} +1 -1
  136. package/dist/{store-client-27YYEWMM.js → store-client-XQQRHYDW.js} +6 -6
  137. package/dist/{store-client-27YYEWMM.js.map → store-client-XQQRHYDW.js.map} +1 -1
  138. package/dist/tui/index.js +10 -10
  139. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  140. package/dist/workspace-plugin/adapters/omp.js +3 -3
  141. package/dist/workspace-plugin/index.js +1 -1
  142. package/package.json +1 -1
  143. package/dist/chunk-74UKG2LA.js.map +0 -1
  144. package/dist/chunk-DKAV43NI.js.map +0 -1
  145. package/dist/chunk-IENYMRZ6.js.map +0 -1
  146. package/dist/chunk-QF6LBS2C.js.map +0 -1
  147. package/dist/chunk-VO7QQ76S.js.map +0 -1
  148. package/dist/chunk-WDMH4UMD.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#133](https://github.com/skaile-ai/workspaces/pull/133) [`c8cae51`](https://github.com/skaile-ai/workspaces/commit/c8cae51e909f1d1bc98cc8eab646083a5d29e9c5) Thanks [@peteralbert](https://github.com/peteralbert)! - Retire the `SKAILE_STRICT_YAML` flag — strict asset loading is now the only
8
+ behavior. The runner activates ONLY `skaile.yaml`-declared assets;
9
+ materialized-but-undeclared on-disk MCP servers and skills ("ghosts") are never
10
+ picked up. Previously this was opt-in (default off) but production agent
11
+ containers always set the flag, so production behavior is unchanged — this just
12
+ makes the canonical-contract invariant hold unconditionally and removes the last
13
+ Sprint-1 loose end.
14
+
15
+ - `loadMcpServerDeclarations` no longer reads `process.env.SKAILE_STRICT_YAML`;
16
+ `upsertMaterializedMcpDecls` always filters by the declared set.
17
+ - `stageMaterializedSkills`'s `opts.strict` boolean is dropped — filtering is now
18
+ driven by the presence of `opts.declared` (when omitted, the scan stages all,
19
+ for non-runner utility callers). The runner (`serve.ts`) always passes the
20
+ declared skill set.
21
+
22
+ See `MIGRATION.md`. No action for the platform (it already writes the full
23
+ effective set and set the flag).
24
+
25
+ - [#133](https://github.com/skaile-ai/workspaces/pull/133) [`c8cae51`](https://github.com/skaile-ai/workspaces/commit/c8cae51e909f1d1bc98cc8eab646083a5d29e9c5) Thanks [@peteralbert](https://github.com/peteralbert)! - Align the `runner.lifecycle` capability with the platform's wire shape and wire
26
+ its handler to real operations. The cap previously declared
27
+ `{ action: 'hibernate' | 'close' | 'shutdown' }` but the platform invokes it with
28
+ `{ phase: 'compact' | 'hibernate' | 'close' }` — so every lifecycle invoke
29
+ Zod-rejected (key `action`≠`phase`, value `compact` ∉ enum) and, even had it
30
+ parsed, the handler was an unimplemented stub. Hibernate/compact signaling to
31
+ connectors therefore never fired (silently, since the platform sites are
32
+ non-fatal).
33
+
34
+ The canonical contract is now `{ phase: 'hibernate' | 'close' | 'compact' }`
35
+ (`shutdown` was never sent and is dropped). The handler is wired via the new
36
+ `buildLifecycleHandler` factory: `compact` runs the compaction orchestrator
37
+ (`trigger: 'manual'`), `hibernate` runs `ConnectorManager.hibernateAll()`
38
+ (`onHibernate` persistence), `close` runs `ConnectorManager.closeAll()`
39
+ (`onSessionClose` finalization). A runner-side contract test pins the schema to
40
+ the platform payloads so the two halves can't re-drift.
41
+
42
+ No consumer action: the platform already sends the `{ phase }` shape, so shipping
43
+ this runner build simply makes lifecycle signaling work instead of failing
44
+ silently.
45
+
46
+ ### Patch Changes
47
+
48
+ - [#130](https://github.com/skaile-ai/workspaces/pull/130) [`3fb8f8e`](https://github.com/skaile-ai/workspaces/commit/3fb8f8ea7fd7bc6b68d36bf11764f6786e178f7a) Thanks [@peteralbert](https://github.com/peteralbert)! - Fix: claude-sdk driver now authenticates API-key provider configs.
49
+
50
+ The `claude-sdk` bridge driver passed a resolved Anthropic API key to the Claude
51
+ Agent SDK as the top-level `query({ apiKey })` argument, which the SDK ignores —
52
+ it authenticates only via the `ANTHROPIC_API_KEY` environment variable or an
53
+ OAuth credentials file. As a result, any cloud session backed by an `ApiToken`
54
+ AI-provider config silently fell back to OAuth login mode and failed with
55
+ "Not logged in" (no creds file) or "401 Invalid authentication credentials"
56
+ (stale creds file) — the provisioned key was never used.
57
+
58
+ `startQuery()` now injects the resolved key into the SDK child-process env
59
+ (`options.env.ANTHROPIC_API_KEY`, spread over the current env so PATH/HOME are
60
+ preserved) whenever an API key is configured. The OAuth path is unchanged: when
61
+ no key is resolved, no env key is set and the SDK uses `~/.claude/.credentials.json`
62
+ via `settingSources: ["user"]`.
63
+
64
+ - [#128](https://github.com/skaile-ai/workspaces/pull/128) [`ea2c155`](https://github.com/skaile-ai/workspaces/commit/ea2c15590a22c15ace392b5e06d1ec133a3d49ab) Thanks [@peteralbert](https://github.com/peteralbert)! - Proactive + reactive OAuth token refresh for rclone-backed mounts (sharepoint / onedrive / webdav).
65
+
66
+ rclone-backed mount drivers baked a single access token into the rclone INI at `connect()` and never refreshed it. For Skaile-managed Entra links the backend strips the `client_secret` so rclone cannot self-refresh, so the access token expired ~1h after spawn and every read/write failed with `EIO` (`invalid_client`). Git mounts and AI credentials already had a refresh mechanism; this brings rclone mounts to parity.
67
+
68
+ `@skaile/workspaces/connectors` gains `createRcloneTokenRefresh` — a per-mount controller that arms a proactive timer firing `marginMs` (5 min) before token expiry, re-mints through the backend `TokenMediator`, re-renders the INI, and recycles the rclone process via the new `RcloneProcessManager.reconfigure(handle, config)`. A reactive `onAuthError()` hook — fed by rclone's own auth-failure log lines (`invalid_client` / `couldn't fetch token` / `InvalidAuthenticationToken`), detected in `_routeRcloneLogLine` via the new `RcloneSpawnConfig.onAuthError` — is the safety net, guarded by an in-flight lock + cooldown. New `resolveMountCredential(declaration, secrets, tokenMediator, reason)` returns `{ token, expiresAt }`; `resolveMountCredentialString` now delegates to it. Standalone `env:`/inline auth (no mediator, no expiry) stays static — no refresh armed.
69
+
70
+ ## 0.32.0
71
+
72
+ ### Minor Changes
73
+
74
+ - [#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.
75
+
76
+ 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.
77
+
3
78
  ## 0.31.0
4
79
 
5
80
  ### Minor Changes
@@ -1,6 +1,6 @@
1
- import './chunk-G247J4MC.js';
2
- import './chunk-CBIPUBUS.js';
3
- import { scanRepo } from './chunk-DKAV43NI.js';
1
+ import './chunk-PKPUVQJP.js';
2
+ import './chunk-RQG5TXIR.js';
3
+ import { scanRepo } from './chunk-AZODLVKH.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-ZXTSUPBJ.js'),
20
+ import('./open-library-B7BLYXYK.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-ZXTSUPBJ.js');
49
+ const { resolveCatalogSource } = await import('./open-library-B7BLYXYK.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-6HZDZEIT.js.map
98
- //# sourceMappingURL=asset-feeds-6HZDZEIT.js.map
97
+ //# sourceMappingURL=asset-feeds-DX5JPM76.js.map
98
+ //# sourceMappingURL=asset-feeds-DX5JPM76.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,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,EAAE,kBAAA,E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ACF;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-6HZDZEIT.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
+ {"version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AG;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-DX5JPM76.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-45RKEHPX.js';
2
- export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-4CRKROS5.js';
3
- import '../chunk-G247J4MC.js';
4
- import '../chunk-CBIPUBUS.js';
5
- import '../chunk-DKAV43NI.js';
1
+ export { AssetManager, parseCanonicalLockKey } from '../chunk-XQRAXAL5.js';
2
+ export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-PTDVTMQL.js';
3
+ import '../chunk-PKPUVQJP.js';
4
+ import '../chunk-RQG5TXIR.js';
5
+ import '../chunk-AZODLVKH.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-4CRKROS5.js';
2
- import '../chunk-G247J4MC.js';
3
- import '../chunk-CBIPUBUS.js';
4
- import '../chunk-DKAV43NI.js';
1
+ export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-PTDVTMQL.js';
2
+ import '../chunk-PKPUVQJP.js';
3
+ import '../chunk-RQG5TXIR.js';
4
+ import '../chunk-AZODLVKH.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-OEXA7BBK.js';
4
+ import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger } from '../../chunk-CIFTUSBV.js';
5
5
  import '../../chunk-6E6PKKAD.js';
6
6
  import '../../chunk-JB35MVBN.js';
7
7
  import '../../chunk-NSBPE2FW.js';
@@ -636,6 +636,13 @@ var ClaudeSdkDriver = class extends AgentDriver {
636
636
  model: this.config.model || "default",
637
637
  session: this.config.resumeSessionId || this.sessionId || this.config.sessionId || "new"
638
638
  });
639
+ if (apiKey) {
640
+ const baseEnv = {};
641
+ for (const [k, v] of Object.entries(process.env)) {
642
+ if (v !== void 0) baseEnv[k] = v;
643
+ }
644
+ options.env = { ...baseEnv, ...this.config.env ?? {}, ANTHROPIC_API_KEY: apiKey };
645
+ }
639
646
  const { query } = this.sdk;
640
647
  const queryArgs = {
641
648
  prompt: message,