@skaile/workspaces 0.32.0 → 0.34.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 +103 -0
- package/dist/{asset-feeds-2LQIGNUF.js → asset-feeds-6R2C2NHB.js} +7 -7
- package/dist/{asset-feeds-2LQIGNUF.js.map → asset-feeds-6R2C2NHB.js.map} +1 -1
- package/dist/asset-manager/index.js +5 -5
- package/dist/asset-manager/installer.js +4 -4
- package/dist/bridge/drivers/claude-sdk.js +8 -1
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +1 -1
- package/dist/bridge/drivers/continue.js +2 -2
- package/dist/bridge/drivers/echo.js +1 -1
- package/dist/bridge/drivers/gemini.js +3 -3
- package/dist/bridge/drivers/goose.js +2 -2
- package/dist/bridge/drivers/omp.js +1 -1
- package/dist/bridge/drivers/opencode.js +2 -2
- package/dist/bridge/drivers/qwen.js +3 -3
- package/dist/bridge/index.js +2 -2
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/{chunk-SN2RWSB3.js → chunk-2VM62DX7.js} +3 -3
- package/dist/{chunk-SN2RWSB3.js.map → chunk-2VM62DX7.js.map} +1 -1
- package/dist/{chunk-SIW5I47F.js → chunk-4RSCLQYX.js} +231 -33
- package/dist/chunk-4RSCLQYX.js.map +1 -0
- package/dist/{chunk-YHGJBGFU.js → chunk-5JAQVXPV.js} +2 -2
- package/dist/{chunk-YHGJBGFU.js.map → chunk-5JAQVXPV.js.map} +1 -1
- package/dist/{chunk-NGE6PALH.js → chunk-67AXL4OK.js} +3 -3
- package/dist/{chunk-NGE6PALH.js.map → chunk-67AXL4OK.js.map} +1 -1
- package/dist/{chunk-CPYXJJOD.js → chunk-BKE2E5AC.js} +6 -6
- package/dist/{chunk-CPYXJJOD.js.map → chunk-BKE2E5AC.js.map} +1 -1
- package/dist/{chunk-OEXA7BBK.js → chunk-CIFTUSBV.js} +2 -2
- package/dist/{chunk-OEXA7BBK.js.map → chunk-CIFTUSBV.js.map} +1 -1
- package/dist/{chunk-LO7QEIHT.js → chunk-DHN6VW4B.js} +4 -4
- package/dist/{chunk-LO7QEIHT.js.map → chunk-DHN6VW4B.js.map} +1 -1
- package/dist/{chunk-7WHBI3I6.js → chunk-DVIIYYD5.js} +3 -3
- package/dist/{chunk-7WHBI3I6.js.map → chunk-DVIIYYD5.js.map} +1 -1
- package/dist/{chunk-DTJNHYFE.js → chunk-E5VRPYUX.js} +9 -16
- package/dist/chunk-E5VRPYUX.js.map +1 -0
- package/dist/{chunk-NZJDQYNB.js → chunk-FM2BJYX4.js} +2 -2
- package/dist/{chunk-NZJDQYNB.js.map → chunk-FM2BJYX4.js.map} +1 -1
- package/dist/{chunk-AOWKMINN.js → chunk-JLSK6HR4.js} +5 -5
- package/dist/{chunk-AOWKMINN.js.map → chunk-JLSK6HR4.js.map} +1 -1
- package/dist/{chunk-7FLLPKX3.js → chunk-NSVAJWWQ.js} +3 -3
- package/dist/{chunk-7FLLPKX3.js.map → chunk-NSVAJWWQ.js.map} +1 -1
- package/dist/{chunk-MA7HSL5S.js → chunk-QLHOORR7.js} +2 -2
- package/dist/{chunk-MA7HSL5S.js.map → chunk-QLHOORR7.js.map} +1 -1
- package/dist/{chunk-P72K36PU.js → chunk-TV2OU2EZ.js} +4 -4
- package/dist/{chunk-P72K36PU.js.map → chunk-TV2OU2EZ.js.map} +1 -1
- package/dist/{chunk-2RQ3KLY3.js → chunk-UQ5JY2GQ.js} +10 -7
- package/dist/chunk-UQ5JY2GQ.js.map +1 -0
- package/dist/{chunk-MG4KFVGV.js → chunk-VSLSRDQZ.js} +3 -3
- package/dist/{chunk-MG4KFVGV.js.map → chunk-VSLSRDQZ.js.map} +1 -1
- package/dist/{chunk-BR7RPEHW.js → chunk-W6TLIJG3.js} +3 -3
- package/dist/{chunk-BR7RPEHW.js.map → chunk-W6TLIJG3.js.map} +1 -1
- package/dist/{chunk-GXHJDQ37.js → chunk-WQRDLR3K.js} +410 -48
- package/dist/chunk-WQRDLR3K.js.map +1 -0
- package/dist/{chunk-74UKG2LA.js → chunk-XT6AZWK3.js} +40 -5
- package/dist/chunk-XT6AZWK3.js.map +1 -0
- package/dist/cli/index.js +31 -31
- package/dist/connectors/config.js +4 -4
- package/dist/connectors/index.js +6 -6
- package/dist/connectors/rclone.js +1 -1
- package/dist/connectors/src/config.d.ts +30 -3
- package/dist/connectors/src/config.d.ts.map +1 -1
- package/dist/connectors/src/connector-manager.d.ts +56 -3
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/fleet-health-gate.d.ts +86 -0
- package/dist/connectors/src/fleet-health-gate.d.ts.map +1 -0
- package/dist/connectors/src/fleet-utils.d.ts +16 -0
- package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +9 -3
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors/src/rclone-process-manager.d.ts +24 -0
- package/dist/connectors/src/rclone-process-manager.d.ts.map +1 -1
- package/dist/connectors/src/rclone-token-refresh.d.ts +84 -0
- package/dist/connectors/src/rclone-token-refresh.d.ts.map +1 -0
- package/dist/core/index.js +3 -3
- package/dist/core/runtime-assets.js +2 -2
- package/dist/core/src/workspace-config.d.ts +20 -6
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +1 -1
- package/dist/deploy/index.js +3 -3
- package/dist/{ensure-sources-CRUZDVPG.js → ensure-sources-GYEQ65ET.js} +5 -5
- package/dist/{ensure-sources-CRUZDVPG.js.map → ensure-sources-GYEQ65ET.js.map} +1 -1
- package/dist/factory-assets/connectors/deploy.js +6 -6
- package/dist/factory-assets/connectors/devserver.js +6 -6
- package/dist/factory-assets/connectors/flow/adapter.js +6 -6
- package/dist/factory-assets/connectors/flow/engine.js +3 -3
- package/dist/factory-assets/connectors/flow/run-flow.js +7 -7
- package/dist/factory-assets/connectors/flow.js +6 -6
- package/dist/factory-assets/connectors/git.js +6 -6
- package/dist/factory-assets/connectors/gmail.js +6 -6
- package/dist/factory-assets/connectors/googledrive.js +6 -6
- package/dist/factory-assets/connectors/local.js +6 -6
- package/dist/factory-assets/connectors/mattermost.js +6 -6
- package/dist/factory-assets/connectors/memory.js +6 -6
- package/dist/factory-assets/connectors/minio.js +6 -6
- package/dist/factory-assets/connectors/postgres.js +6 -6
- package/dist/factory-assets/connectors/s3.js +6 -6
- package/dist/factory-assets/connectors/sharepoint/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/sharepoint.js +6 -6
- package/dist/factory-assets/connectors/sqlite.js +6 -6
- package/dist/factory-assets/connectors/static-server.js +6 -6
- package/dist/factory-assets/connectors/tunnel.js +6 -6
- package/dist/factory-assets/connectors/webdav/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/webdav.js +6 -6
- package/dist/factory-assets/connectors/xstate-store.js +6 -6
- package/dist/factory-assets/connectors/xstate.js +6 -6
- package/dist/{flows-W7L2576K.js → flows-TJUVSMRR.js} +3 -3
- package/dist/{flows-W7L2576K.js.map → flows-TJUVSMRR.js.map} +1 -1
- package/dist/library/index.js +3 -3
- package/dist/library/install.js +3 -3
- package/dist/{open-library-XZZXXVBP.js → open-library-GPZUB7N3.js} +6 -6
- package/dist/{open-library-XZZXXVBP.js.map → open-library-GPZUB7N3.js.map} +1 -1
- package/dist/{paths-RH5CIFX2.js → paths-R6WA7PKV.js} +6 -6
- package/dist/{paths-RH5CIFX2.js.map → paths-R6WA7PKV.js.map} +1 -1
- package/dist/{plugin-store-2UZGNS6M.js → plugin-store-TF7GECYJ.js} +5 -5
- package/dist/{plugin-store-2UZGNS6M.js.map → plugin-store-TF7GECYJ.js.map} +1 -1
- package/dist/runner/index.js +10 -10
- package/dist/runner/src/external-mcp.d.ts +45 -4
- package/dist/runner/src/external-mcp.d.ts.map +1 -1
- package/dist/runner/src/fleet-health-flag-dispatcher.d.ts +40 -0
- package/dist/runner/src/fleet-health-flag-dispatcher.d.ts.map +1 -0
- package/dist/runner/src/lifecycle-handler.d.ts +17 -0
- package/dist/runner/src/lifecycle-handler.d.ts.map +1 -0
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/runner-capabilities.d.ts +1 -1
- package/dist/runner/src/runner-capabilities.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +5 -5
- package/dist/sdk/bridge.js +2 -2
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/flow.js +3 -3
- package/dist/sdk/index.js +10 -10
- package/dist/sdk/runner.js +10 -10
- package/dist/{setup-G5UATRCX.js → setup-YKL43RQJ.js} +7 -7
- package/dist/{setup-G5UATRCX.js.map → setup-YKL43RQJ.js.map} +1 -1
- package/dist/{store-client-TUC7VSOU.js → store-client-H7MHTZVU.js} +6 -6
- package/dist/{store-client-TUC7VSOU.js.map → store-client-H7MHTZVU.js.map} +1 -1
- package/dist/tui/index.js +10 -10
- package/dist/workspace-plugin/adapters/mcp.js +1 -1
- package/dist/workspace-plugin/adapters/omp.js +3 -3
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2RQ3KLY3.js.map +0 -1
- package/dist/chunk-74UKG2LA.js.map +0 -1
- package/dist/chunk-DTJNHYFE.js.map +0 -1
- package/dist/chunk-GXHJDQ37.js.map +0 -1
- package/dist/chunk-SIW5I47F.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,108 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.34.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#134](https://github.com/skaile-ai/workspaces/pull/134) [`4dc5050`](https://github.com/skaile-ai/workspaces/commit/4dc5050eeafa3ea0e28c857a732df57d6a7bad2d) Thanks [@peteralbert](https://github.com/peteralbert)! - Add a health-aware read-only gate for fleet-managed mounts (B-180). A fleet
|
|
8
|
+
mount is bound live by the host fleet rclone and so is excluded from the
|
|
9
|
+
boot-time no-phantom-workspace barrier; that exclusion is only safe while the
|
|
10
|
+
fleet rclone is healthy. When it wedges (`EIO`, or a silently-empty-but-writable
|
|
11
|
+
degradation), `FleetHealthGate` now dynamically establishes the same
|
|
12
|
+
`MountPlaceholderBarrier` over the live target until the mount recovers,
|
|
13
|
+
closing the window where a wedged fleet mount would let the agent write a
|
|
14
|
+
divergent phantom workspace.
|
|
15
|
+
|
|
16
|
+
Two detectors feed one debounced, fail-closed gate: a self-contained local
|
|
17
|
+
`stat`/`readdir` probe (catches EIO / dead-bind) and a platform health signal
|
|
18
|
+
consumed from `<workspace>/.skaile/fleet-health/<id>` via the new
|
|
19
|
+
`ConnectorManager.reportFleetHealth(id, verdict)` (catches silent degradation).
|
|
20
|
+
Healthy fleet mounts stay writable exactly as before. Poll interval is
|
|
21
|
+
`SKAILE_FLEET_HEALTH_POLL_MS` (default 5000; 0 disables the local probe). See
|
|
22
|
+
`MIGRATION.md` for the optional platform emit-side contract.
|
|
23
|
+
|
|
24
|
+
- [#135](https://github.com/skaile-ai/workspaces/pull/135) [`6cc1a07`](https://github.com/skaile-ai/workspaces/commit/6cc1a073f73a56ae0ed5128ecc294f95b312bd6d) Thanks [@peteralbert](https://github.com/peteralbert)! - Runner-managed remote MCP servers now recover from a mid-session 401. When a
|
|
25
|
+
tool call (or the initial connect) on an `auth: backend` http/sse MCP server is
|
|
26
|
+
rejected with a 401, `ExternalMcpManager` re-mints the bearer through the
|
|
27
|
+
platform mediator (`host.refresh_credential { kind: 'mcp-server', reason:
|
|
28
|
+
'retry-401' }`), rewrites the provisioned `MCP__<id>__AUTH` secret, rebuilds the
|
|
29
|
+
transport, and reconnects the client in place — then retries the call once.
|
|
30
|
+
Concurrent 401s for the same server share one re-mint round-trip (per-server
|
|
31
|
+
in-flight gate), and capability registrations stay stable across the swap.
|
|
32
|
+
|
|
33
|
+
`McpServerDeclaration` gains two optional fields — `auth` and `providerLinkId` —
|
|
34
|
+
modelling the remote-server credential metadata the platform already writes into
|
|
35
|
+
`mcp_servers` entries (additive; existing declarations are unaffected).
|
|
36
|
+
|
|
37
|
+
Pairs with the platform's real remote-MCP OAuth token-endpoint refresh.
|
|
38
|
+
|
|
39
|
+
## 0.33.0
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- [#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
|
|
44
|
+
behavior. The runner activates ONLY `skaile.yaml`-declared assets;
|
|
45
|
+
materialized-but-undeclared on-disk MCP servers and skills ("ghosts") are never
|
|
46
|
+
picked up. Previously this was opt-in (default off) but production agent
|
|
47
|
+
containers always set the flag, so production behavior is unchanged — this just
|
|
48
|
+
makes the canonical-contract invariant hold unconditionally and removes the last
|
|
49
|
+
Sprint-1 loose end.
|
|
50
|
+
|
|
51
|
+
- `loadMcpServerDeclarations` no longer reads `process.env.SKAILE_STRICT_YAML`;
|
|
52
|
+
`upsertMaterializedMcpDecls` always filters by the declared set.
|
|
53
|
+
- `stageMaterializedSkills`'s `opts.strict` boolean is dropped — filtering is now
|
|
54
|
+
driven by the presence of `opts.declared` (when omitted, the scan stages all,
|
|
55
|
+
for non-runner utility callers). The runner (`serve.ts`) always passes the
|
|
56
|
+
declared skill set.
|
|
57
|
+
|
|
58
|
+
See `MIGRATION.md`. No action for the platform (it already writes the full
|
|
59
|
+
effective set and set the flag).
|
|
60
|
+
|
|
61
|
+
- [#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
|
|
62
|
+
its handler to real operations. The cap previously declared
|
|
63
|
+
`{ action: 'hibernate' | 'close' | 'shutdown' }` but the platform invokes it with
|
|
64
|
+
`{ phase: 'compact' | 'hibernate' | 'close' }` — so every lifecycle invoke
|
|
65
|
+
Zod-rejected (key `action`≠`phase`, value `compact` ∉ enum) and, even had it
|
|
66
|
+
parsed, the handler was an unimplemented stub. Hibernate/compact signaling to
|
|
67
|
+
connectors therefore never fired (silently, since the platform sites are
|
|
68
|
+
non-fatal).
|
|
69
|
+
|
|
70
|
+
The canonical contract is now `{ phase: 'hibernate' | 'close' | 'compact' }`
|
|
71
|
+
(`shutdown` was never sent and is dropped). The handler is wired via the new
|
|
72
|
+
`buildLifecycleHandler` factory: `compact` runs the compaction orchestrator
|
|
73
|
+
(`trigger: 'manual'`), `hibernate` runs `ConnectorManager.hibernateAll()`
|
|
74
|
+
(`onHibernate` persistence), `close` runs `ConnectorManager.closeAll()`
|
|
75
|
+
(`onSessionClose` finalization). A runner-side contract test pins the schema to
|
|
76
|
+
the platform payloads so the two halves can't re-drift.
|
|
77
|
+
|
|
78
|
+
No consumer action: the platform already sends the `{ phase }` shape, so shipping
|
|
79
|
+
this runner build simply makes lifecycle signaling work instead of failing
|
|
80
|
+
silently.
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- [#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.
|
|
85
|
+
|
|
86
|
+
The `claude-sdk` bridge driver passed a resolved Anthropic API key to the Claude
|
|
87
|
+
Agent SDK as the top-level `query({ apiKey })` argument, which the SDK ignores —
|
|
88
|
+
it authenticates only via the `ANTHROPIC_API_KEY` environment variable or an
|
|
89
|
+
OAuth credentials file. As a result, any cloud session backed by an `ApiToken`
|
|
90
|
+
AI-provider config silently fell back to OAuth login mode and failed with
|
|
91
|
+
"Not logged in" (no creds file) or "401 Invalid authentication credentials"
|
|
92
|
+
(stale creds file) — the provisioned key was never used.
|
|
93
|
+
|
|
94
|
+
`startQuery()` now injects the resolved key into the SDK child-process env
|
|
95
|
+
(`options.env.ANTHROPIC_API_KEY`, spread over the current env so PATH/HOME are
|
|
96
|
+
preserved) whenever an API key is configured. The OAuth path is unchanged: when
|
|
97
|
+
no key is resolved, no env key is set and the SDK uses `~/.claude/.credentials.json`
|
|
98
|
+
via `settingSources: ["user"]`.
|
|
99
|
+
|
|
100
|
+
- [#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).
|
|
101
|
+
|
|
102
|
+
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.
|
|
103
|
+
|
|
104
|
+
`@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.
|
|
105
|
+
|
|
3
106
|
## 0.32.0
|
|
4
107
|
|
|
5
108
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { scanRepo } from './chunk-
|
|
1
|
+
import './chunk-DVIIYYD5.js';
|
|
2
|
+
import './chunk-2VM62DX7.js';
|
|
3
|
+
import { scanRepo } from './chunk-E5VRPYUX.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-
|
|
20
|
+
import('./open-library-GPZUB7N3.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-
|
|
49
|
+
const { resolveCatalogSource } = await import('./open-library-GPZUB7N3.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-
|
|
98
|
-
//# sourceMappingURL=asset-feeds-
|
|
97
|
+
//# sourceMappingURL=asset-feeds-6R2C2NHB.js.map
|
|
98
|
+
//# sourceMappingURL=asset-feeds-6R2C2NHB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;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I,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-6R2C2NHB.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-
|
|
2
|
-
export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { AssetManager, parseCanonicalLockKey } from '../chunk-BKE2E5AC.js';
|
|
2
|
+
export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-DHN6VW4B.js';
|
|
3
|
+
import '../chunk-DVIIYYD5.js';
|
|
4
|
+
import '../chunk-2VM62DX7.js';
|
|
5
|
+
import '../chunk-E5VRPYUX.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-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-DHN6VW4B.js';
|
|
2
|
+
import '../chunk-DVIIYYD5.js';
|
|
3
|
+
import '../chunk-2VM62DX7.js';
|
|
4
|
+
import '../chunk-E5VRPYUX.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-
|
|
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,
|