@skaile/workspaces 0.44.0 → 0.46.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 +141 -0
- package/dist/{asset-feeds-EGSG4FUB.js → asset-feeds-DLRQWELS.js} +7 -7
- package/dist/{asset-feeds-EGSG4FUB.js.map → asset-feeds-DLRQWELS.js.map} +1 -1
- package/dist/asset-manager/index.js +7 -7
- package/dist/asset-manager/installer.js +6 -6
- package/dist/asset-manager/renderers.js +2 -2
- package/dist/asset-manager/src/index.d.ts +47 -0
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/{chunk-VPXV2Z5E.js → chunk-3VBQJZYL.js} +6 -6
- package/dist/chunk-3VBQJZYL.js.map +1 -0
- package/dist/{chunk-LMRO2QNF.js → chunk-3VT2I7IA.js} +72 -5
- package/dist/chunk-3VT2I7IA.js.map +1 -0
- package/dist/{chunk-CVWA4RIK.js → chunk-4VPRAG35.js} +5 -5
- package/dist/{chunk-CVWA4RIK.js.map → chunk-4VPRAG35.js.map} +1 -1
- package/dist/{chunk-JUZLVRI4.js → chunk-CNP2FHRM.js} +84 -19
- package/dist/chunk-CNP2FHRM.js.map +1 -0
- package/dist/{chunk-RGPBEGP2.js → chunk-CU5Z7GH3.js} +6 -2
- package/dist/chunk-CU5Z7GH3.js.map +1 -0
- package/dist/{chunk-CBZEIFU4.js → chunk-DDR4OSSM.js} +3 -3
- package/dist/{chunk-CBZEIFU4.js.map → chunk-DDR4OSSM.js.map} +1 -1
- package/dist/{chunk-PCXU2CVW.js → chunk-FAALG3QN.js} +4 -4
- package/dist/{chunk-PCXU2CVW.js.map → chunk-FAALG3QN.js.map} +1 -1
- package/dist/{chunk-5LHPKVGR.js → chunk-FX4BDEUN.js} +126 -9
- package/dist/chunk-FX4BDEUN.js.map +1 -0
- package/dist/{chunk-BLGHFVXE.js → chunk-G3GODNHM.js} +66 -4
- package/dist/chunk-G3GODNHM.js.map +1 -0
- package/dist/{chunk-ETDXTGDF.js → chunk-HOEP5CJQ.js} +3 -3
- package/dist/{chunk-ETDXTGDF.js.map → chunk-HOEP5CJQ.js.map} +1 -1
- package/dist/{chunk-5FVJXQDP.js → chunk-JXHULIOA.js} +3 -3
- package/dist/{chunk-5FVJXQDP.js.map → chunk-JXHULIOA.js.map} +1 -1
- package/dist/{chunk-ZAEJ33Y6.js → chunk-LLOXWWB6.js} +5 -5
- package/dist/{chunk-ZAEJ33Y6.js.map → chunk-LLOXWWB6.js.map} +1 -1
- package/dist/{chunk-GM3BV6JK.js → chunk-P6HRQPXC.js} +2 -2
- package/dist/{chunk-GM3BV6JK.js.map → chunk-P6HRQPXC.js.map} +1 -1
- package/dist/{chunk-NHLXS2CH.js → chunk-PPSRBFYE.js} +2 -2
- package/dist/{chunk-NHLXS2CH.js.map → chunk-PPSRBFYE.js.map} +1 -1
- package/dist/{chunk-7NQXVBCQ.js → chunk-TKTXIAG5.js} +5 -5
- package/dist/{chunk-7NQXVBCQ.js.map → chunk-TKTXIAG5.js.map} +1 -1
- package/dist/{chunk-XUXVH3JK.js → chunk-WRBF34YE.js} +3 -3
- package/dist/{chunk-XUXVH3JK.js.map → chunk-WRBF34YE.js.map} +1 -1
- package/dist/{chunk-COSTF7QW.js → chunk-WTFJFW7F.js} +50 -12
- package/dist/chunk-WTFJFW7F.js.map +1 -0
- package/dist/{chunk-XF2BBX6P.js → chunk-Z3ZRI2AE.js} +3 -3
- package/dist/{chunk-XF2BBX6P.js.map → chunk-Z3ZRI2AE.js.map} +1 -1
- package/dist/cli/index.js +1039 -704
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +11 -4
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/skailify-lib.d.ts +108 -0
- package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -0
- package/dist/cli/src/commands/source.d.ts +17 -4
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/ensure-sources.d.ts.map +1 -1
- package/dist/connectors/config.js +4 -4
- package/dist/connectors/index.js +5 -5
- package/dist/core/index.js +3 -3
- package/dist/core/runtime-assets.js +2 -2
- package/dist/core/src/conformance.d.ts +33 -0
- package/dist/core/src/conformance.d.ts.map +1 -0
- package/dist/core/src/index.d.ts +3 -2
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +24 -0
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/runtime-assets.d.ts.map +1 -1
- 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/discovery/index.js +2 -2
- package/dist/{ensure-sources-NSDMTAWN.js → ensure-sources-KLCGXVE6.js} +12 -13
- package/dist/ensure-sources-KLCGXVE6.js.map +1 -0
- package/dist/factory-assets/connectors/deploy.js +5 -5
- package/dist/factory-assets/connectors/devserver.js +5 -5
- package/dist/factory-assets/connectors/flow/adapter.js +5 -5
- package/dist/factory-assets/connectors/flow/engine.js +3 -3
- package/dist/factory-assets/connectors/flow/run-flow.js +6 -6
- package/dist/factory-assets/connectors/flow.js +5 -5
- package/dist/factory-assets/connectors/git/CONNECTOR.md +8 -0
- package/dist/factory-assets/connectors/git/driver.d.ts +33 -1
- package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +5 -5
- package/dist/factory-assets/connectors/gmail.js +5 -5
- package/dist/factory-assets/connectors/googledrive.js +5 -5
- package/dist/factory-assets/connectors/local.js +5 -5
- package/dist/factory-assets/connectors/mattermost.js +5 -5
- package/dist/factory-assets/connectors/memory.js +5 -5
- package/dist/factory-assets/connectors/minio.js +5 -5
- package/dist/factory-assets/connectors/postgres.js +5 -5
- package/dist/factory-assets/connectors/s3.js +5 -5
- package/dist/factory-assets/connectors/sharepoint.js +5 -5
- package/dist/factory-assets/connectors/sqlite.js +5 -5
- package/dist/factory-assets/connectors/static-server.js +5 -5
- package/dist/factory-assets/connectors/tunnel.js +5 -5
- package/dist/factory-assets/connectors/webdav.js +5 -5
- package/dist/factory-assets/connectors/xstate-store.js +5 -5
- package/dist/factory-assets/connectors/xstate.js +5 -5
- package/dist/factory-assets/skaile.manifest.yaml +3 -0
- package/dist/factory-assets/skills/skailify/SKILL.md +84 -0
- package/dist/{flows-WELXQ7IG.js → flows-PNDUCOJR.js} +3 -3
- package/dist/{flows-WELXQ7IG.js.map → flows-PNDUCOJR.js.map} +1 -1
- package/dist/library/index.js +6 -6
- package/dist/library/install.js +3 -3
- package/dist/{open-library-362BZ6OW.js → open-library-COHFCT4N.js} +9 -9
- package/dist/{open-library-362BZ6OW.js.map → open-library-COHFCT4N.js.map} +1 -1
- package/dist/{paths-4SSFMX5Z.js → paths-2SYXGTZJ.js} +6 -6
- package/dist/{paths-4SSFMX5Z.js.map → paths-2SYXGTZJ.js.map} +1 -1
- package/dist/{plugin-store-RBCDBO7K.js → plugin-store-UNENLB56.js} +5 -5
- package/dist/{plugin-store-RBCDBO7K.js.map → plugin-store-UNENLB56.js.map} +1 -1
- package/dist/runner/index.js +7 -7
- package/dist/runner/src/file-changed-coalescer.d.ts +48 -0
- package/dist/runner/src/file-changed-coalescer.d.ts.map +1 -0
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +7 -7
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/flow.js +3 -3
- package/dist/sdk/index.js +7 -7
- package/dist/sdk/runner.js +7 -7
- package/dist/{setup-VGZTFQ32.js → setup-AYH6SR4U.js} +5 -5
- package/dist/{setup-VGZTFQ32.js.map → setup-AYH6SR4U.js.map} +1 -1
- package/dist/{store-client-XFZFKY3W.js → store-client-U4FMAIWX.js} +6 -6
- package/dist/{store-client-XFZFKY3W.js.map → store-client-U4FMAIWX.js.map} +1 -1
- package/dist/tui/index.js +7 -7
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/manifests/skill.d.ts +1 -0
- package/dist/types/src/manifests/skill.d.ts.map +1 -1
- 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-5LHPKVGR.js.map +0 -1
- package/dist/chunk-BLGHFVXE.js.map +0 -1
- package/dist/chunk-COSTF7QW.js.map +0 -1
- package/dist/chunk-JUZLVRI4.js.map +0 -1
- package/dist/chunk-LMRO2QNF.js.map +0 -1
- package/dist/chunk-RGPBEGP2.js.map +0 -1
- package/dist/chunk-VPXV2Z5E.js.map +0 -1
- package/dist/ensure-sources-NSDMTAWN.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { XStateConnector, createConnector18 as createConnector } from '../../chunk-
|
|
1
|
+
export { XStateConnector, createConnector18 as createConnector } from '../../chunk-3VT2I7IA.js';
|
|
2
2
|
import '../../chunk-OVRSNIKJ.js';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-DDR4OSSM.js';
|
|
4
4
|
import '../../chunk-FYLIR4AV.js';
|
|
5
5
|
import '../../chunk-6E6PKKAD.js';
|
|
6
6
|
import '../../chunk-X46FY45B.js';
|
|
7
7
|
import '../../chunk-DEYYRFQU.js';
|
|
8
8
|
import '../../chunk-IFGTRL2I.js';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-G3GODNHM.js';
|
|
10
10
|
import '../../chunk-ZAP2BDHG.js';
|
|
11
|
-
import '../../chunk-
|
|
12
|
-
import '../../chunk-
|
|
11
|
+
import '../../chunk-3VBQJZYL.js';
|
|
12
|
+
import '../../chunk-WTFJFW7F.js';
|
|
13
13
|
import '../../chunk-DZCK7GRW.js';
|
|
14
14
|
import '../../chunk-6IDBWPK2.js';
|
|
15
15
|
import '../../chunk-GEEW6SY2.js';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skailify
|
|
3
|
+
description: "Use when a user wants to move an existing coding-agent skill (a Claude Code skill under ~/.claude/skills/, or any SKILL.md directory) into a skaile library so it can be versioned, placed in a domain, and published. Trigger phrases: 'skailify my skill', 'import this Claude skill into my library', 'move my ~/.claude skill into skaile', 'turn my CC skill into a skaile asset', 'add my local skill to the library'. Drives `skaile asset import` + `skaile library domain` and verifies with `skaile validate`."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "0.1.0"
|
|
6
|
+
source: AUTHORED
|
|
7
|
+
stage: alpha
|
|
8
|
+
tags:
|
|
9
|
+
- skaile
|
|
10
|
+
- library
|
|
11
|
+
- import
|
|
12
|
+
- migrate
|
|
13
|
+
- claude-code
|
|
14
|
+
- skill
|
|
15
|
+
- domain
|
|
16
|
+
- manifest
|
|
17
|
+
requires:
|
|
18
|
+
- "skill:skaile-author-asset"
|
|
19
|
+
- "skill:manifest-compliance"
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Skailify a skill
|
|
23
|
+
|
|
24
|
+
Move an existing coding-agent skill into a **skaile library** — frontmatter
|
|
25
|
+
normalized to the skaile schema, placed under a domain, and wired into
|
|
26
|
+
`skaile.manifest.yaml` — in one `skaile asset import` call. For the
|
|
27
|
+
source/library/store model and publish lifecycle read **[skaile-author-asset]**;
|
|
28
|
+
for naming rules read **[manifest-compliance]**.
|
|
29
|
+
|
|
30
|
+
## What `import` does that a copy doesn't
|
|
31
|
+
|
|
32
|
+
A Claude Code `SKILL.md` carries only `name` + `description`. A skaile asset
|
|
33
|
+
additionally needs a `metadata:` block (`version`, `stage`, `tags`) and a
|
|
34
|
+
canonical lowercase-kebab name. `skaile asset import` performs that transform,
|
|
35
|
+
scaffolds the domain on demand, and auto-appends the `skaile.manifest.yaml`
|
|
36
|
+
entry. The low-level `skaile asset migrate` only copies bytes — use `import`.
|
|
37
|
+
|
|
38
|
+
## The flow
|
|
39
|
+
|
|
40
|
+
1. **Confirm a library exists.** `skaile library list`. If none:
|
|
41
|
+
`skaile library init personal` (add `--git <url>` to make it publishable).
|
|
42
|
+
2. **Pick a domain.** A domain is the first-level dir and the publisher
|
|
43
|
+
namespace (`@<domain>/<name>`). List with `skaile library domain list`.
|
|
44
|
+
Create one if needed — `import --domain` will also scaffold it:
|
|
45
|
+
```bash
|
|
46
|
+
skaile library domain create docs # → docs/DOMAIN.md, publisher @docs
|
|
47
|
+
```
|
|
48
|
+
3. **Import.** By bare name (resolved from `~/.claude/skills/`) or by path:
|
|
49
|
+
```bash
|
|
50
|
+
skaile asset import starlight-docs --domain docs
|
|
51
|
+
skaile asset import ./path/to/my-skill --domain docs --version 1.0.0
|
|
52
|
+
```
|
|
53
|
+
Companion files in the skill dir (e.g. `file-loader.ts`, `references/`) are
|
|
54
|
+
copied along. A non-kebab name is slugified and reported.
|
|
55
|
+
4. **Verify.** `skaile validate <library-path>` — must report all manifest(s)
|
|
56
|
+
valid before you publish.
|
|
57
|
+
|
|
58
|
+
## Options that matter
|
|
59
|
+
|
|
60
|
+
| Flag | Use |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `--domain <name>` | Place + scaffold the domain. Omit → library root, repo-level publisher. |
|
|
63
|
+
| `--version <semver>` | Stamp when the skill ships none (default `0.1.0`). |
|
|
64
|
+
| `--stage <stage>` | `alpha` (default) \| `beta` \| `stable`. |
|
|
65
|
+
| `--to <library>` | Target a non-default library. |
|
|
66
|
+
| `--no-normalize` | Copy frontmatter verbatim (rare — only if already skaile-shaped). |
|
|
67
|
+
| `--commit` | Auto-commit in a git-backed library. |
|
|
68
|
+
|
|
69
|
+
## After import
|
|
70
|
+
|
|
71
|
+
- Edit the stamped `metadata.tags` if `import` left them empty.
|
|
72
|
+
- To publish: `skaile library publish <kind>:@<publisher>/<name>@<version>`
|
|
73
|
+
(needs a git-linked library — see [skaile-author-asset]).
|
|
74
|
+
- Re-running `import` for the same `(kind, name)` updates its manifest entry in
|
|
75
|
+
place rather than duplicating it.
|
|
76
|
+
|
|
77
|
+
## Common mistakes
|
|
78
|
+
|
|
79
|
+
| Mistake | Fix |
|
|
80
|
+
|---|---|
|
|
81
|
+
| Using `asset migrate` then hand-editing frontmatter | Use `asset import` — it normalizes + wires the manifest. |
|
|
82
|
+
| `domain create` / `domain list` errors "no default library" | One library is used automatically; with several pass `--library`. |
|
|
83
|
+
| Skipping `skaile validate` | Always validate before publish — catches non-canonical names. |
|
|
84
|
+
| Expecting `~/.claude/skills` bytes to stay in sync | `import` copies; future edits to the library copy don't reach `~/.claude`. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { flowFindFlowForSession, flowGetSession, flowList, flowListSessions, flowShow } from './chunk-
|
|
1
|
+
export { flowFindFlowForSession, flowGetSession, flowList, flowListSessions, flowShow } from './chunk-P6HRQPXC.js';
|
|
2
2
|
import './chunk-R6O6YWU7.js';
|
|
3
3
|
import './chunk-XCBG2KDC.js';
|
|
4
4
|
import './chunk-X5YPJV4N.js';
|
|
5
5
|
import './chunk-NSBPE2FW.js';
|
|
6
|
-
//# sourceMappingURL=flows-
|
|
7
|
-
//# sourceMappingURL=flows-
|
|
6
|
+
//# sourceMappingURL=flows-PNDUCOJR.js.map
|
|
7
|
+
//# sourceMappingURL=flows-PNDUCOJR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"flows-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"flows-PNDUCOJR.js"}
|
package/dist/library/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KNOWN_ASSET_KINDS, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LIBRARY_STRUCTURES, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, classifyRef, createEmptyLockFile, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, interpolate, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolveLibraryDir, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, sha256Hex, skaileHomeDir, storeSecrets, trpcGetUrl, userConfigPath, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeManifestIfMissing } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KNOWN_ASSET_KINDS, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LIBRARY_STRUCTURES, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, classifyRef, createEmptyLockFile, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, interpolate, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolveLibraryDir, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, sha256Hex, skaileHomeDir, storeSecrets, trpcGetUrl, userConfigPath, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeManifestIfMissing } from '../chunk-LLOXWWB6.js';
|
|
2
|
+
import '../chunk-JXHULIOA.js';
|
|
3
3
|
import '../chunk-JXT46QFC.js';
|
|
4
4
|
export { installFromManifest } from '../chunk-UKJMQZV6.js';
|
|
5
5
|
export { GITHUB_PAT_ENV, fetchAssetFilesFromGitHub } from '../chunk-R7FOF242.js';
|
|
6
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-G3GODNHM.js';
|
|
7
7
|
import '../chunk-ZAP2BDHG.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-3VBQJZYL.js';
|
|
9
|
+
import '../chunk-WTFJFW7F.js';
|
|
10
10
|
import '../chunk-DZCK7GRW.js';
|
|
11
11
|
import '../chunk-6IDBWPK2.js';
|
|
12
12
|
import '../chunk-GEEW6SY2.js';
|
|
@@ -14,7 +14,7 @@ import '../chunk-XGCXFX7X.js';
|
|
|
14
14
|
import '../chunk-O4JH3KUE.js';
|
|
15
15
|
import '../chunk-K5GBV4SA.js';
|
|
16
16
|
import '../chunk-JB35MVBN.js';
|
|
17
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-CU5Z7GH3.js';
|
|
18
18
|
import '../chunk-NSBPE2FW.js';
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
package/dist/library/install.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { installFromManifest, longestCommonDirPrefix } from '../chunk-UKJMQZV6.js';
|
|
2
2
|
export { GITHUB_PAT_ENV, fetchAssetFilesFromGitHub } from '../chunk-R7FOF242.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-G3GODNHM.js';
|
|
4
4
|
import '../chunk-ZAP2BDHG.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-3VBQJZYL.js';
|
|
6
|
+
import '../chunk-WTFJFW7F.js';
|
|
7
7
|
import '../chunk-DZCK7GRW.js';
|
|
8
8
|
import '../chunk-6IDBWPK2.js';
|
|
9
9
|
import '../chunk-GEEW6SY2.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-
|
|
1
|
+
export { openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-FAALG3QN.js';
|
|
2
2
|
import './chunk-GYPA2Q7F.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-LLOXWWB6.js';
|
|
4
|
+
import './chunk-JXHULIOA.js';
|
|
5
5
|
import './chunk-JXT46QFC.js';
|
|
6
6
|
import './chunk-UKJMQZV6.js';
|
|
7
7
|
import './chunk-R7FOF242.js';
|
|
8
8
|
import './chunk-X46FY45B.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-G3GODNHM.js';
|
|
10
10
|
import './chunk-ZAP2BDHG.js';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import './chunk-3VBQJZYL.js';
|
|
12
|
+
import './chunk-WTFJFW7F.js';
|
|
13
13
|
import './chunk-DZCK7GRW.js';
|
|
14
14
|
import './chunk-6IDBWPK2.js';
|
|
15
15
|
import './chunk-GEEW6SY2.js';
|
|
@@ -17,7 +17,7 @@ import './chunk-XGCXFX7X.js';
|
|
|
17
17
|
import './chunk-O4JH3KUE.js';
|
|
18
18
|
import './chunk-K5GBV4SA.js';
|
|
19
19
|
import './chunk-JB35MVBN.js';
|
|
20
|
-
import './chunk-
|
|
20
|
+
import './chunk-CU5Z7GH3.js';
|
|
21
21
|
import './chunk-NSBPE2FW.js';
|
|
22
|
-
//# sourceMappingURL=open-library-
|
|
23
|
-
//# sourceMappingURL=open-library-
|
|
22
|
+
//# sourceMappingURL=open-library-COHFCT4N.js.map
|
|
23
|
+
//# sourceMappingURL=open-library-COHFCT4N.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-COHFCT4N.js"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AI_RESOURCES, MONOREPO_ROOT, aiResourceRoots } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { AI_RESOURCES, MONOREPO_ROOT, aiResourceRoots } from './chunk-HOEP5CJQ.js';
|
|
2
|
+
import './chunk-G3GODNHM.js';
|
|
3
3
|
import './chunk-ZAP2BDHG.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-3VBQJZYL.js';
|
|
5
|
+
import './chunk-WTFJFW7F.js';
|
|
6
6
|
import './chunk-DZCK7GRW.js';
|
|
7
7
|
import './chunk-6IDBWPK2.js';
|
|
8
8
|
import './chunk-GEEW6SY2.js';
|
|
@@ -11,5 +11,5 @@ import './chunk-O4JH3KUE.js';
|
|
|
11
11
|
import './chunk-K5GBV4SA.js';
|
|
12
12
|
import './chunk-JB35MVBN.js';
|
|
13
13
|
import './chunk-NSBPE2FW.js';
|
|
14
|
-
//# sourceMappingURL=paths-
|
|
15
|
-
//# sourceMappingURL=paths-
|
|
14
|
+
//# sourceMappingURL=paths-2SYXGTZJ.js.map
|
|
15
|
+
//# sourceMappingURL=paths-2SYXGTZJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"paths-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"paths-2SYXGTZJ.js"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { pluginRegistry } from './chunk-6E6PKKAD.js';
|
|
2
|
-
import { readPluginsLockSlice } from './chunk-
|
|
2
|
+
import { readPluginsLockSlice } from './chunk-G3GODNHM.js';
|
|
3
3
|
import './chunk-ZAP2BDHG.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-3VBQJZYL.js';
|
|
5
|
+
import './chunk-WTFJFW7F.js';
|
|
6
6
|
import './chunk-DZCK7GRW.js';
|
|
7
7
|
import './chunk-6IDBWPK2.js';
|
|
8
8
|
import './chunk-GEEW6SY2.js';
|
|
@@ -138,5 +138,5 @@ async function ensurePluginsLoaded(projectDir, plugins, registry = pluginRegistr
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
export { ensurePluginsLoaded, loadPlugins, reconcilePlugins, specName };
|
|
141
|
-
//# sourceMappingURL=plugin-store-
|
|
142
|
-
//# sourceMappingURL=plugin-store-
|
|
141
|
+
//# sourceMappingURL=plugin-store-UNENLB56.js.map
|
|
142
|
+
//# sourceMappingURL=plugin-store-UNENLB56.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/plugin-store/paths.ts","../cli/src/plugin-store/spec.ts","../cli/src/plugin-store/load.ts","../cli/src/plugin-store/reconcile.ts","../cli/src/plugin-store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,UAAA,EAA4B;AACrD,EAAA,OAAO,IAAA,CAAK,UAAA,EAAY,SAAA,EAAW,SAAS,CAAA;AAC9C;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,kBAAkB,UAAA,EAA4B;AAC5D,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,iBAAiB,CAAA;AACvD;AAOO,SAAS,kBAAA,CAAmB,YAAoB,OAAA,EAAyB;AAC9E,EAAA,OAAO,IAAA,CAAK,cAAA,CAAe,UAAU,CAAA,EAAG,OAAO,CAAA;AACjD;;;ACbO,SAAS,UAAU,IAAA,EAA0B;AAClD,EAAA,MAAM,OAAA,GAAU,KAAK,IAAA,EAAK;AAC1B,EAAA,IAAI,CAAC,OAAA,EAAS,MAAM,IAAI,MAAM,4BAA4B,CAAA;AAI1D,EAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,WAAA,CAAY,GAAG,CAAA;AAClC,EAAA,IAAI,MAAM,CA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EAAA,MAAM,gBAAA,CAAiB,UAAA,EAAY,OAAA,EAAS,IAAI,CAAA;AAChD,EAAA,OAAO,WAAA,CAAY,YAAY,OAAA,EAAS,QAAA,EAAU,EAAE,GAAA,EAAK,IAAA,CAAK,KAAK,CAAA;AACrE","file":"plugin-store-RBCDBO7K.js","sourcesContent":["/**\n * Pure path helpers for the project-local plugin store.\n *\n * The store is a self-contained npm workspace owned by the CLI under\n * `<projectDir>/.skaile/plugins/`. Nothing here touches the filesystem.\n */\n\nimport { join } from \"node:path\";\n\n/** `<projectDir>/.skaile/plugins` — the store root. */\nexport function pluginsDir(projectDir: string): string {\n return join(projectDir, \".skaile\", \"plugins\");\n}\n\n/** `<store>/package.json` — generated, never user-edited. */\nexport function pluginsPkgJson(projectDir: string): string {\n return join(pluginsDir(projectDir), \"package.json\");\n}\n\n/** `<store>/node_modules` — where reconciled plugin packages land. */\nexport function nodeModulesDir(projectDir: string): string {\n return join(pluginsDir(projectDir), \"node_modules\");\n}\n\n/** `<store>/.reconcile-hash` — SHA of plugins-list + lock slice; skip reinstall when unchanged. */\nexport function reconcileHashFile(projectDir: string): string {\n return join(pluginsDir(projectDir), \".reconcile-hash\");\n}\n\n/**\n * Absolute path to a plugin package's entry directory under the store's\n * `node_modules`. Dynamic `import()` against this absolute path works inside\n * compiled binaries via `pathToFileURL`.\n */\nexport function resolvePluginEntry(projectDir: string, pkgName: string): string {\n return join(nodeModulesDir(projectDir), pkgName);\n}\n","/**\n * Parse npm package specifiers from the `plugins:` list into name + range.\n *\n * The leading `@` of a scope is NOT a separator: only the last `@` at a\n * non-zero index splits the package name from its semver range.\n * \"@skaile/provider-fly@^0.1.0\" → { name: \"@skaile/provider-fly\", range: \"^0.1.0\" }\n * \"@skaile/connector-redis\" → { name: \"@skaile/connector-redis\", range: \"*\" }\n * \"lodash@^4\" → { name: \"lodash\", range: \"^4\" }\n */\n\n/** A parsed plugin specifier: package name plus a semver range (`\"*\"` when omitted). */\nexport interface PluginSpec {\n name: string;\n range: string;\n}\n\n/**\n * Parse a single plugin specifier into `{ name, range }`.\n *\n * @param spec - An npm specifier, e.g. `\"@skaile/provider-fly@^0.1.0\"` or `\"lodash\"`.\n * @returns The package name and semver range (range defaults to `\"*\"`).\n * @throws Error when the specifier is empty.\n */\nexport function parseSpec(spec: string): PluginSpec {\n const trimmed = spec.trim();\n if (!trimmed) throw new Error(\"parseSpec: empty specifier\");\n\n // Find the version-separating `@` — the last one that is not the scope `@`\n // at index 0. A bare `@scope/name` has its only `@` at index 0 (no range).\n const at = trimmed.lastIndexOf(\"@\");\n if (at <= 0) {\n return { name: trimmed, range: \"*\" };\n }\n const name = trimmed.slice(0, at);\n const range = trimmed.slice(at + 1);\n return { name, range: range.length > 0 ? range : \"*\" };\n}\n\n/** Convenience: just the package name of a specifier. */\nexport function specName(spec: string): string {\n return parseSpec(spec).name;\n}\n","/**\n * Runtime plugin loader: dynamic-import each reconciled plugin and let it\n * self-register into the `pluginRegistry`.\n *\n * Each plugin specifier resolves to an absolute path under the store's\n * `node_modules`; we import it via a `file://` URL so the import works inside\n * `bun --compile` binaries (which bundle only the literal-string switches, but\n * can still execute a `file://` import against the unpacked store on disk).\n * Failures are caught per-plugin so one broken plugin never aborts the rest.\n */\n\nimport { pathToFileURL } from \"node:url\";\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { resolvePluginEntry } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/** Options for {@link loadPlugins}. */\nexport interface LoadOptions {\n log?: Logger;\n}\n\n/** Result of a load pass: which specs registered and which failed. */\nexport interface LoadResult {\n loaded: string[];\n failed: { spec: string; error: string }[];\n}\n\n/** The self-registration entrypoint a plugin module is expected to export. */\ntype PluginModule = { register?: (registry: PluginRegistry) => void };\n\n/**\n * Load and register each plugin in `plugins` into `registry`.\n *\n * @param projectDir - Project root holding `.skaile/plugins/node_modules`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param registry - Registry to register into. Defaults to the process-wide `pluginRegistry`.\n * @param opts - Optional logger.\n * @returns Loaded specs + per-plugin failures (never throws).\n */\nexport async function loadPlugins(\n projectDir: string,\n plugins: string[],\n registry: PluginRegistry = pluginRegistry,\n opts: LoadOptions = {},\n): Promise<LoadResult> {\n const loaded: string[] = [];\n const failed: { spec: string; error: string }[] = [];\n\n for (const spec of plugins) {\n try {\n const { name } = parseSpec(spec);\n const entry = resolvePluginEntry(projectDir, name);\n const mod = (await import(pathToFileURL(entry).href)) as PluginModule;\n if (typeof mod.register !== \"function\") {\n throw new Error(`plugin \"${name}\" does not export a register() function`);\n }\n mod.register(registry);\n loaded.push(spec);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n failed.push({ spec, error: `failed to load plugin \"${spec}\": ${message}` });\n opts.log?.warn(`plugin load failed: ${spec}`, { error: message });\n }\n }\n\n return { loaded, failed };\n}\n","/**\n * Reconcile the project-local plugin store (`<projectDir>/.skaile/plugins/`).\n *\n * The reconciler is hash-skipped: it computes a SHA-256 over the sorted plugin\n * list plus the lock file's `plugins` slice and compares it to the stored\n * `.reconcile-hash`. On a match it returns with zero further I/O; otherwise it\n * regenerates the store's `package.json` and runs `bun install` against it.\n *\n * The install step is injectable (`InstallFn`) so tests stay hermetic — they\n * pass a fake installer that records calls and writes a stub `node_modules`.\n */\n\nimport { createHash } from \"node:crypto\";\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { readPluginsLockSlice } from \"@skaile/workspaces/core\";\nimport { pluginsDir, pluginsPkgJson, reconcileHashFile } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/**\n * Installs the store's dependencies. Returns `ok: false` (never throws) on a\n * failed install so the reconciler can surface the captured `output`.\n */\nexport type InstallFn = (pluginsDir: string) => Promise<{ ok: boolean; output: string }>;\n\n/** Options for {@link reconcilePlugins}. */\nexport interface ReconcileOptions {\n /** Injectable installer. Defaults to a real `bun install` of the store. */\n runInstall?: InstallFn;\n /**\n * Lock slice to fold into the reconcile-hash. Defaults to\n * `readPluginsLockSlice(projectDir)` so a lock edit invalidates the hash.\n */\n lockSlice?: unknown;\n}\n\n/** Result of a reconcile pass. */\nexport interface ReconcileResult {\n changed: boolean;\n reason: \"no-plugins\" | \"up-to-date\" | \"reconciled\";\n}\n\n/**\n * The default real installer: `bun install` inside the store directory.\n * Frozen on subsequent runs (a `bun.lock`/`bun.lockb` already exists), and\n * non-frozen on the first run so a lock can be generated.\n */\nexport const defaultInstall: InstallFn = async (dir) => {\n const { portableSpawn } = await import(\"@skaile/workspaces/core\");\n const hasLock =\n existsSync(`${dir}/bun.lock`) ||\n existsSync(`${dir}/bun.lockb`) ||\n existsSync(`${dir}/package-lock.json`);\n const args = hasLock ? [\"bun\", \"install\", \"--frozen-lockfile\"] : [\"bun\", \"install\"];\n const proc = portableSpawn(args, { cwd: dir });\n const chunks: string[] = [];\n const decoder = new TextDecoder();\n const pump = async (stream: ReadableStream<Uint8Array>) => {\n const reader = stream.getReader();\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value) chunks.push(decoder.decode(value, { stream: true }));\n }\n };\n await Promise.all([pump(proc.stdout), pump(proc.stderr)]);\n const code = await proc.exited;\n return { ok: code === 0, output: chunks.join(\"\") };\n};\n\n/** Generate the store's `package.json` from the plugin specs. */\nfunction writePackageJson(projectDir: string, plugins: string[]): void {\n const dependencies: Record<string, string> = {};\n for (const spec of plugins) {\n const { name, range } = parseSpec(spec);\n dependencies[name] = range;\n }\n const pkg = {\n name: \"skaile-project-plugins\",\n private: true,\n dependencies,\n };\n mkdirSync(pluginsDir(projectDir), { recursive: true });\n writeFileSync(pluginsPkgJson(projectDir), `${JSON.stringify(pkg, null, 2)}\\n`);\n}\n\n/**\n * Reconcile the plugin store for a project.\n *\n * @param projectDir - Project root containing `skaile.yaml` / `skaile.lock.yaml`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param opts - Optional injectable installer + lock slice override.\n * @returns Whether the store changed and why.\n */\nexport async function reconcilePlugins(\n projectDir: string,\n plugins: string[],\n opts: ReconcileOptions = {},\n): Promise<ReconcileResult> {\n if (plugins.length === 0) {\n return { changed: false, reason: \"no-plugins\" };\n }\n\n const lockSlice = opts.lockSlice ?? readPluginsLockSlice(projectDir);\n const wantHash = createHash(\"sha256\")\n .update(JSON.stringify({ plugins: [...plugins].sort(), lock: lockSlice }))\n .digest(\"hex\");\n\n const hashFile = reconcileHashFile(projectDir);\n if (existsSync(hashFile)) {\n const have = readFileSync(hashFile, \"utf8\").trim();\n if (have === wantHash) {\n return { changed: false, reason: \"up-to-date\" };\n }\n }\n\n writePackageJson(projectDir, plugins);\n\n const install = opts.runInstall ?? defaultInstall;\n const result = await install(pluginsDir(projectDir));\n if (!result.ok) {\n throw new Error(`plugin install failed:\\n${result.output}`);\n }\n\n writeFileSync(hashFile, wantHash);\n return { changed: true, reason: \"reconciled\" };\n}\n","/**\n * The project-local plugin store: reconcile (`<projectDir>/.skaile/plugins/`)\n * then load the reconciled plugins into the `pluginRegistry`.\n *\n * `ensurePluginsLoaded` is the single entrypoint commands wire in. It is a\n * guarded no-op when `plugins` is empty/undefined — zero overhead for the\n * common case where no project declares `plugins:` in `skaile.yaml`.\n */\n\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { type LoadResult, loadPlugins } from \"./load.js\";\nimport { type ReconcileOptions, reconcilePlugins } from \"./reconcile.js\";\n\nexport type { LoadResult } from \"./load.js\";\nexport { loadPlugins } from \"./load.js\";\nexport type { ReconcileOptions } from \"./reconcile.js\";\nexport { reconcilePlugins } from \"./reconcile.js\";\nexport { specName } from \"./spec.js\";\n\n/** Options for {@link ensurePluginsLoaded}. */\nexport interface EnsurePluginsOptions extends ReconcileOptions {\n log?: Logger;\n}\n\n/**\n * Reconcile the plugin store then load each plugin into `registry`.\n *\n * No-op (returns immediately) when `plugins` is empty/undefined, so the common\n * no-plugins path costs nothing.\n *\n * @param projectDir - Project root.\n * @param plugins - The `skaile.yaml` `plugins:` list (may be undefined).\n * @param registry - Registry to register into. Defaults to `pluginRegistry`.\n * @param opts - Injectable installer / lock slice + optional logger.\n * @returns The load result, or an empty result when there are no plugins.\n */\nexport async function ensurePluginsLoaded(\n projectDir: string,\n plugins: string[] | undefined,\n registry: PluginRegistry = pluginRegistry,\n opts: EnsurePluginsOptions = {},\n): Promise<LoadResult> {\n if (!plugins || plugins.length === 0) {\n return { loaded: [], failed: [] };\n }\n await reconcilePlugins(projectDir, plugins, opts);\n return loadPlugins(projectDir, plugins, registry, { log: opts.log });\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../cli/src/plugin-store/paths.ts","../cli/src/plugin-store/spec.ts","../cli/src/plugin-store/load.ts","../cli/src/plugin-store/reconcile.ts","../cli/src/plugin-store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,UAAA,EAA4B;AACrD,EAAA,OAAO,IAAA,CAAK,UAAA,EAAY,SAAA,EAAW,SAAS,CAAA;AAC9C;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,kBAAkB,UAAA,EAA4B;AAC5D,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,iBAAiB,CAAA;AACvD;AAOO,SAAS,kBAAA,CAAmB,YAAoB,OAAA,EAAyB;AAC9E,EAAA,OAAO,IAAA,CAAK,cAAA,CAAe,UAAU,CAAA,EAAG,OAAO,CAAA;AACjD;;;ACbO,SAAS,UAAU,IAAA,EAA0B;AAClD,EAAA,MAAM,OAAA,GAA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A,GAA6B,EAAC,EACT;AACrB,EAAA,IAAI,CAAC,OAAA,IAAW,OAAA,CAAQ,MAAA,KAAW,CAAA,EAAG;AACpC,IAAA,OAAO,EAAE,MAAA,EAAQ,EAAC,EAAG,MAAA,EAAQ,EAAC,EAAE;AAAA,EAClC;AACA,EAAA,MAAM,gBAAA,CAAiB,UAAA,EAAY,OAAA,EAAS,IAAI,CAAA;AAChD,EAAA,OAAO,WAAA,CAAY,YAAY,OAAA,EAAS,QAAA,EAAU,EAAE,GAAA,EAAK,IAAA,CAAK,KAAK,CAAA;AACrE","file":"plugin-store-UNENLB56.js","sourcesContent":["/**\n * Pure path helpers for the project-local plugin store.\n *\n * The store is a self-contained npm workspace owned by the CLI under\n * `<projectDir>/.skaile/plugins/`. Nothing here touches the filesystem.\n */\n\nimport { join } from \"node:path\";\n\n/** `<projectDir>/.skaile/plugins` — the store root. */\nexport function pluginsDir(projectDir: string): string {\n return join(projectDir, \".skaile\", \"plugins\");\n}\n\n/** `<store>/package.json` — generated, never user-edited. */\nexport function pluginsPkgJson(projectDir: string): string {\n return join(pluginsDir(projectDir), \"package.json\");\n}\n\n/** `<store>/node_modules` — where reconciled plugin packages land. */\nexport function nodeModulesDir(projectDir: string): string {\n return join(pluginsDir(projectDir), \"node_modules\");\n}\n\n/** `<store>/.reconcile-hash` — SHA of plugins-list + lock slice; skip reinstall when unchanged. */\nexport function reconcileHashFile(projectDir: string): string {\n return join(pluginsDir(projectDir), \".reconcile-hash\");\n}\n\n/**\n * Absolute path to a plugin package's entry directory under the store's\n * `node_modules`. Dynamic `import()` against this absolute path works inside\n * compiled binaries via `pathToFileURL`.\n */\nexport function resolvePluginEntry(projectDir: string, pkgName: string): string {\n return join(nodeModulesDir(projectDir), pkgName);\n}\n","/**\n * Parse npm package specifiers from the `plugins:` list into name + range.\n *\n * The leading `@` of a scope is NOT a separator: only the last `@` at a\n * non-zero index splits the package name from its semver range.\n * \"@skaile/provider-fly@^0.1.0\" → { name: \"@skaile/provider-fly\", range: \"^0.1.0\" }\n * \"@skaile/connector-redis\" → { name: \"@skaile/connector-redis\", range: \"*\" }\n * \"lodash@^4\" → { name: \"lodash\", range: \"^4\" }\n */\n\n/** A parsed plugin specifier: package name plus a semver range (`\"*\"` when omitted). */\nexport interface PluginSpec {\n name: string;\n range: string;\n}\n\n/**\n * Parse a single plugin specifier into `{ name, range }`.\n *\n * @param spec - An npm specifier, e.g. `\"@skaile/provider-fly@^0.1.0\"` or `\"lodash\"`.\n * @returns The package name and semver range (range defaults to `\"*\"`).\n * @throws Error when the specifier is empty.\n */\nexport function parseSpec(spec: string): PluginSpec {\n const trimmed = spec.trim();\n if (!trimmed) throw new Error(\"parseSpec: empty specifier\");\n\n // Find the version-separating `@` — the last one that is not the scope `@`\n // at index 0. A bare `@scope/name` has its only `@` at index 0 (no range).\n const at = trimmed.lastIndexOf(\"@\");\n if (at <= 0) {\n return { name: trimmed, range: \"*\" };\n }\n const name = trimmed.slice(0, at);\n const range = trimmed.slice(at + 1);\n return { name, range: range.length > 0 ? range : \"*\" };\n}\n\n/** Convenience: just the package name of a specifier. */\nexport function specName(spec: string): string {\n return parseSpec(spec).name;\n}\n","/**\n * Runtime plugin loader: dynamic-import each reconciled plugin and let it\n * self-register into the `pluginRegistry`.\n *\n * Each plugin specifier resolves to an absolute path under the store's\n * `node_modules`; we import it via a `file://` URL so the import works inside\n * `bun --compile` binaries (which bundle only the literal-string switches, but\n * can still execute a `file://` import against the unpacked store on disk).\n * Failures are caught per-plugin so one broken plugin never aborts the rest.\n */\n\nimport { pathToFileURL } from \"node:url\";\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { resolvePluginEntry } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/** Options for {@link loadPlugins}. */\nexport interface LoadOptions {\n log?: Logger;\n}\n\n/** Result of a load pass: which specs registered and which failed. */\nexport interface LoadResult {\n loaded: string[];\n failed: { spec: string; error: string }[];\n}\n\n/** The self-registration entrypoint a plugin module is expected to export. */\ntype PluginModule = { register?: (registry: PluginRegistry) => void };\n\n/**\n * Load and register each plugin in `plugins` into `registry`.\n *\n * @param projectDir - Project root holding `.skaile/plugins/node_modules`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param registry - Registry to register into. Defaults to the process-wide `pluginRegistry`.\n * @param opts - Optional logger.\n * @returns Loaded specs + per-plugin failures (never throws).\n */\nexport async function loadPlugins(\n projectDir: string,\n plugins: string[],\n registry: PluginRegistry = pluginRegistry,\n opts: LoadOptions = {},\n): Promise<LoadResult> {\n const loaded: string[] = [];\n const failed: { spec: string; error: string }[] = [];\n\n for (const spec of plugins) {\n try {\n const { name } = parseSpec(spec);\n const entry = resolvePluginEntry(projectDir, name);\n const mod = (await import(pathToFileURL(entry).href)) as PluginModule;\n if (typeof mod.register !== \"function\") {\n throw new Error(`plugin \"${name}\" does not export a register() function`);\n }\n mod.register(registry);\n loaded.push(spec);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n failed.push({ spec, error: `failed to load plugin \"${spec}\": ${message}` });\n opts.log?.warn(`plugin load failed: ${spec}`, { error: message });\n }\n }\n\n return { loaded, failed };\n}\n","/**\n * Reconcile the project-local plugin store (`<projectDir>/.skaile/plugins/`).\n *\n * The reconciler is hash-skipped: it computes a SHA-256 over the sorted plugin\n * list plus the lock file's `plugins` slice and compares it to the stored\n * `.reconcile-hash`. On a match it returns with zero further I/O; otherwise it\n * regenerates the store's `package.json` and runs `bun install` against it.\n *\n * The install step is injectable (`InstallFn`) so tests stay hermetic — they\n * pass a fake installer that records calls and writes a stub `node_modules`.\n */\n\nimport { createHash } from \"node:crypto\";\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { readPluginsLockSlice } from \"@skaile/workspaces/core\";\nimport { pluginsDir, pluginsPkgJson, reconcileHashFile } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/**\n * Installs the store's dependencies. Returns `ok: false` (never throws) on a\n * failed install so the reconciler can surface the captured `output`.\n */\nexport type InstallFn = (pluginsDir: string) => Promise<{ ok: boolean; output: string }>;\n\n/** Options for {@link reconcilePlugins}. */\nexport interface ReconcileOptions {\n /** Injectable installer. Defaults to a real `bun install` of the store. */\n runInstall?: InstallFn;\n /**\n * Lock slice to fold into the reconcile-hash. Defaults to\n * `readPluginsLockSlice(projectDir)` so a lock edit invalidates the hash.\n */\n lockSlice?: unknown;\n}\n\n/** Result of a reconcile pass. */\nexport interface ReconcileResult {\n changed: boolean;\n reason: \"no-plugins\" | \"up-to-date\" | \"reconciled\";\n}\n\n/**\n * The default real installer: `bun install` inside the store directory.\n * Frozen on subsequent runs (a `bun.lock`/`bun.lockb` already exists), and\n * non-frozen on the first run so a lock can be generated.\n */\nexport const defaultInstall: InstallFn = async (dir) => {\n const { portableSpawn } = await import(\"@skaile/workspaces/core\");\n const hasLock =\n existsSync(`${dir}/bun.lock`) ||\n existsSync(`${dir}/bun.lockb`) ||\n existsSync(`${dir}/package-lock.json`);\n const args = hasLock ? [\"bun\", \"install\", \"--frozen-lockfile\"] : [\"bun\", \"install\"];\n const proc = portableSpawn(args, { cwd: dir });\n const chunks: string[] = [];\n const decoder = new TextDecoder();\n const pump = async (stream: ReadableStream<Uint8Array>) => {\n const reader = stream.getReader();\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value) chunks.push(decoder.decode(value, { stream: true }));\n }\n };\n await Promise.all([pump(proc.stdout), pump(proc.stderr)]);\n const code = await proc.exited;\n return { ok: code === 0, output: chunks.join(\"\") };\n};\n\n/** Generate the store's `package.json` from the plugin specs. */\nfunction writePackageJson(projectDir: string, plugins: string[]): void {\n const dependencies: Record<string, string> = {};\n for (const spec of plugins) {\n const { name, range } = parseSpec(spec);\n dependencies[name] = range;\n }\n const pkg = {\n name: \"skaile-project-plugins\",\n private: true,\n dependencies,\n };\n mkdirSync(pluginsDir(projectDir), { recursive: true });\n writeFileSync(pluginsPkgJson(projectDir), `${JSON.stringify(pkg, null, 2)}\\n`);\n}\n\n/**\n * Reconcile the plugin store for a project.\n *\n * @param projectDir - Project root containing `skaile.yaml` / `skaile.lock.yaml`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param opts - Optional injectable installer + lock slice override.\n * @returns Whether the store changed and why.\n */\nexport async function reconcilePlugins(\n projectDir: string,\n plugins: string[],\n opts: ReconcileOptions = {},\n): Promise<ReconcileResult> {\n if (plugins.length === 0) {\n return { changed: false, reason: \"no-plugins\" };\n }\n\n const lockSlice = opts.lockSlice ?? readPluginsLockSlice(projectDir);\n const wantHash = createHash(\"sha256\")\n .update(JSON.stringify({ plugins: [...plugins].sort(), lock: lockSlice }))\n .digest(\"hex\");\n\n const hashFile = reconcileHashFile(projectDir);\n if (existsSync(hashFile)) {\n const have = readFileSync(hashFile, \"utf8\").trim();\n if (have === wantHash) {\n return { changed: false, reason: \"up-to-date\" };\n }\n }\n\n writePackageJson(projectDir, plugins);\n\n const install = opts.runInstall ?? defaultInstall;\n const result = await install(pluginsDir(projectDir));\n if (!result.ok) {\n throw new Error(`plugin install failed:\\n${result.output}`);\n }\n\n writeFileSync(hashFile, wantHash);\n return { changed: true, reason: \"reconciled\" };\n}\n","/**\n * The project-local plugin store: reconcile (`<projectDir>/.skaile/plugins/`)\n * then load the reconciled plugins into the `pluginRegistry`.\n *\n * `ensurePluginsLoaded` is the single entrypoint commands wire in. It is a\n * guarded no-op when `plugins` is empty/undefined — zero overhead for the\n * common case where no project declares `plugins:` in `skaile.yaml`.\n */\n\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { type LoadResult, loadPlugins } from \"./load.js\";\nimport { type ReconcileOptions, reconcilePlugins } from \"./reconcile.js\";\n\nexport type { LoadResult } from \"./load.js\";\nexport { loadPlugins } from \"./load.js\";\nexport type { ReconcileOptions } from \"./reconcile.js\";\nexport { reconcilePlugins } from \"./reconcile.js\";\nexport { specName } from \"./spec.js\";\n\n/** Options for {@link ensurePluginsLoaded}. */\nexport interface EnsurePluginsOptions extends ReconcileOptions {\n log?: Logger;\n}\n\n/**\n * Reconcile the plugin store then load each plugin into `registry`.\n *\n * No-op (returns immediately) when `plugins` is empty/undefined, so the common\n * no-plugins path costs nothing.\n *\n * @param projectDir - Project root.\n * @param plugins - The `skaile.yaml` `plugins:` list (may be undefined).\n * @param registry - Registry to register into. Defaults to `pluginRegistry`.\n * @param opts - Injectable installer / lock slice + optional logger.\n * @returns The load result, or an empty result when there are no plugins.\n */\nexport async function ensurePluginsLoaded(\n projectDir: string,\n plugins: string[] | undefined,\n registry: PluginRegistry = pluginRegistry,\n opts: EnsurePluginsOptions = {},\n): Promise<LoadResult> {\n if (!plugins || plugins.length === 0) {\n return { loaded: [], failed: [] };\n }\n await reconcilePlugins(projectDir, plugins, opts);\n return loadPlugins(projectDir, plugins, registry, { log: opts.log });\n}\n"]}
|
package/dist/runner/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-FX4BDEUN.js';
|
|
2
|
+
import '../chunk-PPSRBFYE.js';
|
|
3
3
|
import '../chunk-X5YPJV4N.js';
|
|
4
4
|
import '../chunk-O7SG5PC2.js';
|
|
5
5
|
import '../chunk-7QBNJTTQ.js';
|
|
@@ -14,18 +14,18 @@ import '../chunk-BMQKMOQY.js';
|
|
|
14
14
|
import '../chunk-GAH4YRCI.js';
|
|
15
15
|
import '../chunk-OCAQH66V.js';
|
|
16
16
|
import '../chunk-LV2HPH3C.js';
|
|
17
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-3VT2I7IA.js';
|
|
18
18
|
import '../chunk-OVRSNIKJ.js';
|
|
19
|
-
import '../chunk-
|
|
19
|
+
import '../chunk-DDR4OSSM.js';
|
|
20
20
|
import '../chunk-FYLIR4AV.js';
|
|
21
21
|
import '../chunk-6E6PKKAD.js';
|
|
22
22
|
import '../chunk-X46FY45B.js';
|
|
23
23
|
import '../chunk-DEYYRFQU.js';
|
|
24
24
|
import '../chunk-IFGTRL2I.js';
|
|
25
|
-
export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-
|
|
25
|
+
export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-G3GODNHM.js';
|
|
26
26
|
import '../chunk-ZAP2BDHG.js';
|
|
27
|
-
import '../chunk-
|
|
28
|
-
import '../chunk-
|
|
27
|
+
import '../chunk-3VBQJZYL.js';
|
|
28
|
+
import '../chunk-WTFJFW7F.js';
|
|
29
29
|
import '../chunk-DZCK7GRW.js';
|
|
30
30
|
import '../chunk-6IDBWPK2.js';
|
|
31
31
|
import '../chunk-GEEW6SY2.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ConnectorChangeEvent } from "@skaile/workspaces/connectors";
|
|
2
|
+
/** Tuning for {@link FileChangedCoalescer}. */
|
|
3
|
+
export interface CoalesceOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Burst window in ms. Events within this gap of each other (per mount) are
|
|
6
|
+
* considered part of the same burst. Default: 1000.
|
|
7
|
+
*/
|
|
8
|
+
windowMs?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of events within a window that flips a mount into "burst mode".
|
|
11
|
+
* At/under this count events pass through individually; above it the rest of
|
|
12
|
+
* the burst is coalesced by directory. Default: 50.
|
|
13
|
+
*/
|
|
14
|
+
threshold?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Cap on the number of per-directory representative events emitted per burst.
|
|
17
|
+
* If a burst touches more distinct directories than this, the representatives
|
|
18
|
+
* for the first `maxDirs` directories are emitted plus a single root-level
|
|
19
|
+
* fallback event so nothing is silently missed. Default: 256.
|
|
20
|
+
*/
|
|
21
|
+
maxDirs?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Per-mount burst detector. Feed it watcher events via {@link push}; it calls
|
|
25
|
+
* `emit` either with the original event (normal traffic) or with one
|
|
26
|
+
* representative event per affected directory (when a burst is detected).
|
|
27
|
+
* Quiescence is detected with a timer so representatives fire shortly after the
|
|
28
|
+
* last file in the burst settles.
|
|
29
|
+
*
|
|
30
|
+
* Stateful and not thread-safe — one instance per `startWatching` lifetime.
|
|
31
|
+
*/
|
|
32
|
+
export declare class FileChangedCoalescer {
|
|
33
|
+
private readonly windowMs;
|
|
34
|
+
private readonly threshold;
|
|
35
|
+
private readonly maxDirs;
|
|
36
|
+
private readonly emit;
|
|
37
|
+
private readonly now;
|
|
38
|
+
private readonly log;
|
|
39
|
+
private readonly states;
|
|
40
|
+
constructor(emit: (mountId: string, event: ConnectorChangeEvent) => void, options?: CoalesceOptions, now?: () => number, log?: (msg: string) => void);
|
|
41
|
+
push(mountId: string, event: ConnectorChangeEvent): void;
|
|
42
|
+
/** Cancel timers and emit any pending representatives. Call on watcher teardown. */
|
|
43
|
+
dispose(): void;
|
|
44
|
+
private recordDir;
|
|
45
|
+
private armFlush;
|
|
46
|
+
private flush;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=file-changed-coalescer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-changed-coalescer.d.ts","sourceRoot":"","sources":["../../../runner/src/file-changed-coalescer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B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AE,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACxE;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC3E,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC3D;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC/B,KAAK,CAAC,EAAE,sBAAsB,EAC9B,cAAc,CAAC,EAAE,OAAO,EACxB,WAAW,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EACvE,aAAa,CAAC,EAAE,aAAa,EAC7B,gBAAgB,CAAC,EAAE,uBAAuB,EAC1C,qBAAqB,CAAC,EAAE,OAAO,EAC/B,kBAAkB,CAAC,EAAE,kBAAkB,GACtC,OAAO,CAAC,oBAAoB,CAAC,CA4O/B;AAsLD,6GAA6G;AAC7G,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { AssetManager, NON_DEPLOYABLE_KINDS, parseCanonicalLockKey } from '../chunk-
|
|
2
|
-
export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { AssetManager, MissingManifestError, NON_DEPLOYABLE_KINDS, parseCanonicalLockKey } from '../chunk-CNP2FHRM.js';
|
|
2
|
+
export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-4VPRAG35.js';
|
|
3
|
+
import '../chunk-G3GODNHM.js';
|
|
4
4
|
import '../chunk-ZAP2BDHG.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-3VBQJZYL.js';
|
|
6
|
+
import '../chunk-WTFJFW7F.js';
|
|
7
7
|
import '../chunk-DZCK7GRW.js';
|
|
8
8
|
import '../chunk-6IDBWPK2.js';
|
|
9
9
|
import '../chunk-GEEW6SY2.js';
|
|
@@ -13,8 +13,8 @@ import '../chunk-K5GBV4SA.js';
|
|
|
13
13
|
import '../chunk-JB35MVBN.js';
|
|
14
14
|
export { appendHistory, clearHistory, getRecentHistory, loadHistory } from '../chunk-KTBKW2FI.js';
|
|
15
15
|
import '../chunk-UQ6LFBPZ.js';
|
|
16
|
-
export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, driverTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-
|
|
17
|
-
import '../chunk-
|
|
16
|
+
export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, driverTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-WRBF34YE.js';
|
|
17
|
+
import '../chunk-CU5Z7GH3.js';
|
|
18
18
|
export { BUILT_IN_FRAGMENTS, loadPromptExtensions, resolveFragments } from '../chunk-CGYEHQOX.js';
|
|
19
19
|
import '../chunk-NSBPE2FW.js';
|
|
20
20
|
//# sourceMappingURL=asset-manager.js.map
|
package/dist/sdk/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ALL_PROVIDERS, ManifestYamlEditor, SETTINGS_DEFAULTS, WorkspaceYamlEditor, applyPatch, buildLockFile, computeHash, detectEnvApiKeys, extractForPatch, generatePatch, globalSettingsPath, listPatches, loadSettings, mapLegacyFields, maskApiKey, migrateSettings, portableSpawn, portableSpawnSync, projectSettingsPath, providerEnvKey, readLock, readPatch, readPluginsLockSlice, resolveAllKeys, resolveApiKey, resolveSettings, savePatch, saveSettings, verifyLock, walkForSettings, writeLock, writePluginsLockSlice } from '../chunk-
|
|
1
|
+
export { ALL_PROVIDERS, ManifestYamlEditor, SETTINGS_DEFAULTS, WorkspaceYamlEditor, applyPatch, buildLockFile, checkAgentSkillConformance, computeHash, detectEnvApiKeys, extractForPatch, generatePatch, globalSettingsPath, listPatches, loadSettings, mapLegacyFields, maskApiKey, migrateSettings, portableSpawn, portableSpawnSync, projectSettingsPath, providerEnvKey, readLock, readPatch, readPluginsLockSlice, resolveAllKeys, resolveApiKey, resolveSettings, savePatch, saveSettings, verifyLock, walkForSettings, writeLock, writePluginsLockSlice } from '../chunk-G3GODNHM.js';
|
|
2
2
|
export { ASSET_KIND_DIRS, assetSearchDirs, detectAiResources, detectDomains, detectMonorepoRoot } from '../chunk-ZAP2BDHG.js';
|
|
3
|
-
export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-
|
|
4
|
-
export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, __resetCacheMigrationMemo, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, globalCacheRoot, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeLegacyEntriesInto, mergeSkWorkspaceConfigs, migrateLegacyDir, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, writeLinks } from '../chunk-
|
|
3
|
+
export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-3VBQJZYL.js';
|
|
4
|
+
export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SKAILE_YAML_DEFAULT, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, __resetCacheMigrationMemo, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, globalCacheRoot, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeLegacyEntriesInto, mergeSkWorkspaceConfigs, migrateLegacyDir, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, sourceCacheKey, sourceShortName, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, writeLinks } from '../chunk-WTFJFW7F.js';
|
|
5
5
|
export { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, encodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-DZCK7GRW.js';
|
|
6
6
|
export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromMcpServerMd, fromMcpServerMdContent, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir } from '../chunk-6IDBWPK2.js';
|
|
7
7
|
export { ASSET_KINDS, ASSET_NAME_HINT, INDIVIDUAL_KINDS, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw, slugifyAssetName } from '../chunk-GEEW6SY2.js';
|
package/dist/sdk/flow.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { FlowManifestSchema, computeFlowState, computeFlowStateFromSnapshots, computeSkippable, flowKindProvider, isBlocking, loadAllFlows, loadFlow, loadFlowsFromDir, resolveNextNodes, validateFlow } from '../chunk-X46FY45B.js';
|
|
2
|
-
import '../chunk-
|
|
2
|
+
import '../chunk-G3GODNHM.js';
|
|
3
3
|
import '../chunk-ZAP2BDHG.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-3VBQJZYL.js';
|
|
5
|
+
import '../chunk-WTFJFW7F.js';
|
|
6
6
|
import '../chunk-DZCK7GRW.js';
|
|
7
7
|
import '../chunk-6IDBWPK2.js';
|
|
8
8
|
import '../chunk-GEEW6SY2.js';
|
package/dist/sdk/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentClient } from '../chunk-SZ3SIVZQ.js';
|
|
2
|
-
import { startAgentServer } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
import { startAgentServer } from '../chunk-FX4BDEUN.js';
|
|
3
|
+
import '../chunk-PPSRBFYE.js';
|
|
4
4
|
import '../chunk-X5YPJV4N.js';
|
|
5
5
|
import '../chunk-O7SG5PC2.js';
|
|
6
6
|
import '../chunk-7QBNJTTQ.js';
|
|
@@ -15,18 +15,18 @@ import '../chunk-BMQKMOQY.js';
|
|
|
15
15
|
import '../chunk-GAH4YRCI.js';
|
|
16
16
|
import '../chunk-OCAQH66V.js';
|
|
17
17
|
import '../chunk-LV2HPH3C.js';
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-3VT2I7IA.js';
|
|
19
19
|
import '../chunk-OVRSNIKJ.js';
|
|
20
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-DDR4OSSM.js';
|
|
21
21
|
import '../chunk-FYLIR4AV.js';
|
|
22
22
|
import '../chunk-6E6PKKAD.js';
|
|
23
23
|
import '../chunk-X46FY45B.js';
|
|
24
24
|
import '../chunk-DEYYRFQU.js';
|
|
25
25
|
import '../chunk-IFGTRL2I.js';
|
|
26
|
-
import '../chunk-
|
|
26
|
+
import '../chunk-G3GODNHM.js';
|
|
27
27
|
import '../chunk-ZAP2BDHG.js';
|
|
28
|
-
import '../chunk-
|
|
29
|
-
import '../chunk-
|
|
28
|
+
import '../chunk-3VBQJZYL.js';
|
|
29
|
+
import '../chunk-WTFJFW7F.js';
|
|
30
30
|
import '../chunk-DZCK7GRW.js';
|
|
31
31
|
import '../chunk-6IDBWPK2.js';
|
|
32
32
|
import '../chunk-GEEW6SY2.js';
|
package/dist/sdk/runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-FX4BDEUN.js';
|
|
2
|
+
import '../chunk-PPSRBFYE.js';
|
|
3
3
|
import '../chunk-X5YPJV4N.js';
|
|
4
4
|
import '../chunk-O7SG5PC2.js';
|
|
5
5
|
import '../chunk-7QBNJTTQ.js';
|
|
@@ -14,18 +14,18 @@ import '../chunk-BMQKMOQY.js';
|
|
|
14
14
|
import '../chunk-GAH4YRCI.js';
|
|
15
15
|
import '../chunk-OCAQH66V.js';
|
|
16
16
|
import '../chunk-LV2HPH3C.js';
|
|
17
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-3VT2I7IA.js';
|
|
18
18
|
import '../chunk-OVRSNIKJ.js';
|
|
19
|
-
import '../chunk-
|
|
19
|
+
import '../chunk-DDR4OSSM.js';
|
|
20
20
|
import '../chunk-FYLIR4AV.js';
|
|
21
21
|
import '../chunk-6E6PKKAD.js';
|
|
22
22
|
import '../chunk-X46FY45B.js';
|
|
23
23
|
import '../chunk-DEYYRFQU.js';
|
|
24
24
|
import '../chunk-IFGTRL2I.js';
|
|
25
|
-
export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-
|
|
25
|
+
export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-G3GODNHM.js';
|
|
26
26
|
import '../chunk-ZAP2BDHG.js';
|
|
27
|
-
import '../chunk-
|
|
28
|
-
import '../chunk-
|
|
27
|
+
import '../chunk-3VBQJZYL.js';
|
|
28
|
+
import '../chunk-WTFJFW7F.js';
|
|
29
29
|
import '../chunk-DZCK7GRW.js';
|
|
30
30
|
import '../chunk-6IDBWPK2.js';
|
|
31
31
|
import '../chunk-GEEW6SY2.js';
|
|
@@ -4,10 +4,10 @@ import { getModels } from './chunk-BMQKMOQY.js';
|
|
|
4
4
|
import './chunk-GAH4YRCI.js';
|
|
5
5
|
import './chunk-OCAQH66V.js';
|
|
6
6
|
import './chunk-6E6PKKAD.js';
|
|
7
|
-
import { ALL_PROVIDERS, detectEnvApiKeys, resolveSettings, maskApiKey, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, providerEnvKey } from './chunk-
|
|
7
|
+
import { ALL_PROVIDERS, detectEnvApiKeys, resolveSettings, maskApiKey, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, providerEnvKey } from './chunk-G3GODNHM.js';
|
|
8
8
|
import './chunk-ZAP2BDHG.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
import './chunk-3VBQJZYL.js';
|
|
10
|
+
import './chunk-WTFJFW7F.js';
|
|
11
11
|
import './chunk-DZCK7GRW.js';
|
|
12
12
|
import './chunk-6IDBWPK2.js';
|
|
13
13
|
import './chunk-GEEW6SY2.js';
|
|
@@ -509,5 +509,5 @@ async function cmdSetup(_args, opts) {
|
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
export { cmdSetup };
|
|
512
|
-
//# sourceMappingURL=setup-
|
|
513
|
-
//# sourceMappingURL=setup-
|
|
512
|
+
//# sourceMappingURL=setup-AYH6SR4U.js.map
|
|
513
|
+
//# sourceMappingURL=setup-AYH6SR4U.js.map
|