@skaile/workspaces 0.14.0 → 0.15.1
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 +111 -0
- package/dist/asset-manager/index.js +2 -2
- package/dist/asset-manager/installer.js +1 -1
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/base-assets/connectors/flow/run-flow.js +1 -1
- package/dist/{chunk-OIFGKFZY.js → chunk-67TJEQJE.js} +2 -2
- package/dist/{chunk-OIFGKFZY.js.map → chunk-67TJEQJE.js.map} +1 -1
- package/dist/{chunk-7R4WLTZW.js → chunk-DEZVZSBN.js} +11 -16
- package/dist/chunk-DEZVZSBN.js.map +1 -0
- package/dist/{chunk-4GEVGRWB.js → chunk-ERCOCLW5.js} +9 -11
- package/dist/chunk-ERCOCLW5.js.map +1 -0
- package/dist/{chunk-42OQF7UU.js → chunk-FNCYNUGS.js} +304 -227
- package/dist/chunk-FNCYNUGS.js.map +1 -0
- package/dist/{chunk-DN5476SV.js → chunk-HJV7MHG5.js} +17 -10
- package/dist/chunk-HJV7MHG5.js.map +1 -0
- package/dist/{chunk-VAJB2UJ5.js → chunk-IY4X7PZN.js} +13 -13
- package/dist/chunk-IY4X7PZN.js.map +1 -0
- package/dist/cli/index.js +807 -601
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts +4 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts +6 -4
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +31 -20
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +2 -2
- package/dist/cli/src/commands/source-manifest.d.ts +19 -0
- package/dist/cli/src/commands/source-manifest.d.ts.map +1 -0
- package/dist/cli/src/commands/source.d.ts +6 -2
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/store.d.ts.map +1 -1
- package/dist/cli/src/open-library.d.ts +18 -18
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/library/index.js +1 -1
- package/dist/library/src/config.d.ts +12 -3
- package/dist/library/src/config.d.ts.map +1 -1
- package/dist/library/src/index.d.ts +7 -8
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/library.d.ts +24 -77
- package/dist/library/src/library.d.ts.map +1 -1
- package/dist/library/src/local/db.d.ts +3 -2
- package/dist/library/src/local/db.d.ts.map +1 -1
- package/dist/library/src/local/{user-library-manager.d.ts → library-manager.d.ts} +15 -16
- package/dist/library/src/local/library-manager.d.ts.map +1 -0
- package/dist/library/src/local/library.d.ts +27 -23
- package/dist/library/src/local/library.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +5 -5
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/local/sidecar-paths.d.ts +3 -3
- package/dist/library/src/local/store-paths.d.ts +42 -0
- package/dist/library/src/local/store-paths.d.ts.map +1 -0
- package/dist/library/src/preset/apply.d.ts +2 -2
- package/dist/library/src/preset/apply.d.ts.map +1 -1
- package/dist/library/src/preset/placeholders.d.ts +3 -3
- package/dist/library/src/preset/placeholders.d.ts.map +1 -1
- package/dist/library/src/preset/resolve-item.d.ts +3 -3
- package/dist/library/src/preset/resolve-item.d.ts.map +1 -1
- package/dist/library/src/sync/driver.d.ts +6 -6
- package/dist/library/src/sync/driver.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts +6 -6
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/library/src/sync/local-driver.d.ts +6 -6
- package/dist/library/src/sync/local-driver.d.ts.map +1 -1
- package/dist/library/src/user-library.d.ts +12 -17
- package/dist/library/src/user-library.d.ts.map +1 -1
- package/dist/{open-library-S6FK4N4S.js → open-library-T6RXQJTQ.js} +4 -4
- package/dist/{open-library-S6FK4N4S.js.map → open-library-T6RXQJTQ.js.map} +1 -1
- package/dist/runner/index.js +1 -1
- package/dist/runner/src/composition/resolve.d.ts +3 -3
- package/dist/runner/src/composition/resolve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +2 -2
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/runner.js +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/types/src/install-manifest.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-42OQF7UU.js.map +0 -1
- package/dist/chunk-4GEVGRWB.js.map +0 -1
- package/dist/chunk-7R4WLTZW.js.map +0 -1
- package/dist/chunk-DN5476SV.js.map +0 -1
- package/dist/chunk-VAJB2UJ5.js.map +0 -1
- package/dist/cli/src/commands/library-status.d.ts +0 -19
- package/dist/cli/src/commands/library-status.d.ts.map +0 -1
- package/dist/cli/src/commands/source-sidecar.d.ts +0 -6
- package/dist/cli/src/commands/source-sidecar.d.ts.map +0 -1
- package/dist/library/src/local/user-library-manager.d.ts.map +0 -1
- package/dist/library/src/sync/store-driver.d.ts +0 -21
- package/dist/library/src/sync/store-driver.d.ts.map +0 -1
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
* install <ref> install an asset from a library into a workspace
|
|
7
7
|
* list list installed/available assets
|
|
8
8
|
* show <ref> inspect an asset by canonical ref
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
|
+
* The former `asset publish` stub has moved to `library publish` so the push
|
|
11
|
+
* + register flow is atomic with the underlying git push. Asset creation
|
|
12
|
+
* lives under `library create <kind> <name>`.
|
|
10
13
|
*
|
|
11
14
|
* @docLink cli/commands/asset
|
|
12
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/asset-cmd.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asset-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/asset-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,gBAAgB,IAAI,OAAO,CA8M1C"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* skaile library — manage user-facing libraries (
|
|
2
|
+
* skaile library — manage user-facing libraries (authoring places for AI
|
|
3
|
+
* assets, backed by `local` or `git`).
|
|
3
4
|
*
|
|
4
|
-
* Lifecycle subcommands: list, status, show, init,
|
|
5
|
-
* set, remove.
|
|
6
|
-
*
|
|
5
|
+
* Lifecycle subcommands: list, status, show, init, link, create, default,
|
|
6
|
+
* rename, set, remove. Git verbs (commit, pull, push, propose, git, sync)
|
|
7
|
+
* apply to git-backed libraries. Publish/register/yank are scaffolded stubs
|
|
8
|
+
* that will land when the store publish endpoint is finalised.
|
|
7
9
|
*
|
|
8
10
|
* @docLink cli/commands/library
|
|
9
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/library-cmd.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"library-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/library-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAiB5C,wBAAgB,kBAAkB,IAAI,OAAO,CAub5C"}
|
|
@@ -1,59 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Interactive TUI for managing AI assets.
|
|
3
3
|
*
|
|
4
|
-
* Tabs: [
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Tabs: [Assets] [Sources] [Libraries] [Pending] [Sync]
|
|
5
|
+
*
|
|
6
|
+
* - Assets — browse and queue install/remove for assets, grouped by source.
|
|
7
|
+
* - Sources — third-party github repos registered via `skaile source add`.
|
|
8
|
+
* - Libraries — user authoring places registered via `skaile library init`.
|
|
9
|
+
* - Pending — staged adds/removes (rich rendering deferred to AF-LIB-TUI-RICH).
|
|
10
|
+
* - Sync — bulk sync sources + libraries (deferred to AF-LIB-TUI-RICH).
|
|
11
|
+
*
|
|
12
|
+
* Keys: ↑↓/jk navigate, ←/→ collapse/expand, space/+/- select, a/Enter apply,
|
|
13
|
+
* s sync, i info, Tab switch view, q/Esc quit
|
|
7
14
|
*
|
|
8
15
|
* NOTE: rich rendering (status glyphs, behind/ahead counters, in-line sync) for
|
|
9
|
-
* the Libraries/Pending/Sync tabs is deferred to AF-LIB-TUI-RICH (see
|
|
16
|
+
* the Sources/Libraries/Pending/Sync tabs is deferred to AF-LIB-TUI-RICH (see
|
|
10
17
|
* workspaces/issues.md). The current implementation is a minimal scaffold.
|
|
11
18
|
*/
|
|
12
19
|
import type { CatalogEntry } from "@skaile/workspaces/core";
|
|
13
20
|
import { Command } from "commander";
|
|
14
21
|
/**
|
|
15
|
-
* A single row in the manage TUI asset list, representing a
|
|
22
|
+
* A single row in the manage TUI asset list, representing a source header,
|
|
16
23
|
* a domain header, or an individual asset entry.
|
|
17
24
|
*
|
|
25
|
+
* The `source` field holds the name of the originating github repo
|
|
26
|
+
* (`CatalogEntry.repository`) — i.e. the **source** in the three-noun model.
|
|
27
|
+
*
|
|
18
28
|
* @docLink cli/commands/manage#make-manage-command
|
|
19
29
|
*/
|
|
20
30
|
export interface AssetRow {
|
|
21
|
-
type: "
|
|
22
|
-
|
|
31
|
+
type: "source-header" | "header" | "asset";
|
|
32
|
+
source?: string;
|
|
23
33
|
domain?: string;
|
|
24
34
|
entry?: CatalogEntry;
|
|
25
|
-
|
|
35
|
+
installed?: boolean;
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
28
38
|
* Filter the full asset row list to only rows that should be visible given the
|
|
29
|
-
* current collapsed
|
|
39
|
+
* current collapsed source and domain sets.
|
|
30
40
|
*
|
|
31
41
|
* @param rows - Complete flat list of asset rows.
|
|
32
|
-
* @param
|
|
33
|
-
* @param collapsedDomains - Set of `"
|
|
42
|
+
* @param collapsedSources - Set of source names whose children are hidden.
|
|
43
|
+
* @param collapsedDomains - Set of `"source:domain"` keys whose children are hidden.
|
|
34
44
|
* @returns Filtered array of visible rows.
|
|
35
45
|
* @docLink cli/commands/manage#make-manage-command
|
|
36
46
|
*/
|
|
37
|
-
export declare function buildVisibleRows(rows: AssetRow[],
|
|
47
|
+
export declare function buildVisibleRows(rows: AssetRow[], collapsedSources: Set<string>, collapsedDomains: Set<string>): AssetRow[];
|
|
38
48
|
/**
|
|
39
|
-
* Return `kind:name` refs for all asset rows belonging to a specific
|
|
49
|
+
* Return `kind:name` refs for all asset rows belonging to a specific source and domain.
|
|
40
50
|
*
|
|
41
51
|
* @docLink cli/commands/manage#make-manage-command
|
|
42
52
|
*/
|
|
43
|
-
export declare function domainAssetRefs(rows: AssetRow[],
|
|
53
|
+
export declare function domainAssetRefs(rows: AssetRow[], source: string, domain: string): string[];
|
|
44
54
|
/**
|
|
45
|
-
* Return `kind:name` refs for all asset rows belonging to a specific
|
|
55
|
+
* Return `kind:name` refs for all asset rows belonging to a specific source.
|
|
46
56
|
*
|
|
47
57
|
* @docLink cli/commands/manage#make-manage-command
|
|
48
58
|
*/
|
|
49
|
-
export declare function
|
|
59
|
+
export declare function sourceAssetRefs(rows: AssetRow[], source: string): string[];
|
|
50
60
|
/**
|
|
51
61
|
* Creates the `skaile manage` command.
|
|
52
62
|
*
|
|
53
|
-
* Opens an interactive terminal TUI (
|
|
54
|
-
* Sync) for browsing, installing, and removing assets. CRUD for
|
|
55
|
-
* remains in the shell (`skaile
|
|
56
|
-
*
|
|
63
|
+
* Opens an interactive terminal TUI (five tabs: Assets, Sources, Libraries,
|
|
64
|
+
* Pending, Sync) for browsing, installing, and removing assets. CRUD for
|
|
65
|
+
* sources and libraries remains in the shell (`skaile source …` /
|
|
66
|
+
* `skaile library …`) — the Sources and Libraries tabs are read-only
|
|
67
|
+
* scaffolds pending AF-LIB-TUI-RICH.
|
|
57
68
|
*
|
|
58
69
|
* @returns Configured {@link Command} ready for `program.addCommand()`.
|
|
59
70
|
* @docLink cli/commands/manage#make-manage-command
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/manage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/manage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;;;;;;;GAQG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AA6ED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,EAAE,EAChB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC5B,QAAQ,EAAE,CAQZ;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAI1F;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAE1E;AAqzBD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAO3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npx.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/npx.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"npx.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/npx.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,OAAO,CA2FxC"}
|
|
@@ -21,7 +21,7 @@ export interface InstallManifestSource {
|
|
|
21
21
|
export declare function supportsInstallManifest(source: unknown): source is InstallManifestSource;
|
|
22
22
|
/**
|
|
23
23
|
* Minimal library surface the pointer-only install path needs.
|
|
24
|
-
* `
|
|
24
|
+
* `LocalIndex` satisfies this.
|
|
25
25
|
*/
|
|
26
26
|
export interface InstallLibrary {
|
|
27
27
|
install(manifest: InstallManifest): Promise<{
|
|
@@ -49,7 +49,7 @@ export interface PointerOnlyInstallResult {
|
|
|
49
49
|
*
|
|
50
50
|
* Both dependencies are injected so the function is unit-testable without a
|
|
51
51
|
* network round-trip. In production the CLI passes a `RemoteCatalogSource`
|
|
52
|
-
* and a `
|
|
52
|
+
* and a `LocalIndex`.
|
|
53
53
|
*
|
|
54
54
|
* @param ref - Asset ref (`<publisher>/<name>@<version>`, optional leading `@`).
|
|
55
55
|
* @param deps - Injected catalog source + library.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `skaile source manifest …` — sidecar manifest lifecycle, refactored under
|
|
3
|
+
* the `source` noun (was `source sidecar …`).
|
|
4
|
+
*
|
|
5
|
+
* The verbs are stubs for now — the real wiring lands when the publish path
|
|
6
|
+
* through `POST /sources/<id>/manifest` is finalised on the store backend.
|
|
7
|
+
* Each subcommand exits with code 2 plus a clear "not yet wired" hint so
|
|
8
|
+
* smoke tests can verify the surface without depending on the server.
|
|
9
|
+
*
|
|
10
|
+
* @docLink cli/commands/source#manifest
|
|
11
|
+
*/
|
|
12
|
+
import type { Command } from "commander";
|
|
13
|
+
/**
|
|
14
|
+
* Append the `manifest` sub-tree to a `source` command.
|
|
15
|
+
*
|
|
16
|
+
* Called from `makeSourceCommand()` in `source.ts`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function addSourceManifestCommands(src: Command): void;
|
|
19
|
+
//# sourceMappingURL=source-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-manifest.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAwC5D"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* skaile source —
|
|
2
|
+
* `skaile source …` — manage github sources (third-party repos of AI assets).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* A *source* is a read-mostly clone of a github repo under `~/.skaile/sources/`.
|
|
5
|
+
* Bytes always live here. Manifest catalog entries (formerly "sidecars") live
|
|
6
|
+
* separately at `~/.skaile/store/manifests/<slug>.yaml`.
|
|
7
|
+
*
|
|
8
|
+
* @docLink cli/commands/source
|
|
5
9
|
*/
|
|
6
10
|
import { Command } from "commander";
|
|
7
11
|
export declare function makeSourceCommand(): Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,wBAAgB,iBAAiB,IAAI,OAAO,CAoJ3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAqO1C"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* open-library.ts — shared helpers to open the
|
|
2
|
+
* open-library.ts — shared helpers to open the LocalIndex and the configured
|
|
3
3
|
* Catalog source.
|
|
4
4
|
*
|
|
5
5
|
* Lazy-loads the `@skaile/workspaces/library` subpath and returns the
|
|
6
|
-
*
|
|
6
|
+
* LocalIndex instance (backed by `@libsql/client`; runs on Node and Bun).
|
|
7
7
|
* The catalog-source helper reads
|
|
8
8
|
* `~/.skaile/config.yaml` (and project-level overlay if `projectDir` is given)
|
|
9
9
|
* to decide between {@link RemoteCatalogSource} (default — points at
|
|
10
10
|
* `https://skaile.store`) and a {@link LocalCatalogSource} bound to the most
|
|
11
|
-
* recent local
|
|
11
|
+
* recent local library registered via `skaile source add`.
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
|
-
* Open the
|
|
14
|
+
* Open the LocalIndex with the full kind registry. Exits with code 1
|
|
15
15
|
* if the library directory cannot be created.
|
|
16
16
|
*
|
|
17
|
-
* @returns A `
|
|
17
|
+
* @returns A `LocalIndex` instance ready for use.
|
|
18
18
|
* @docLink cli/dev-guide#open-library
|
|
19
19
|
*/
|
|
20
|
-
export declare function openLibrary(): Promise<import("@skaile/workspaces/library").
|
|
20
|
+
export declare function openLibrary(): Promise<import("@skaile/workspaces/library").LocalIndex>;
|
|
21
21
|
/**
|
|
22
22
|
* Resolve the configured **remote** Catalog source for the CLI.
|
|
23
23
|
*
|
|
@@ -45,7 +45,7 @@ export declare function openCatalogSource(opts?: {
|
|
|
45
45
|
}): Promise<import("@skaile/workspaces/library").RemoteCatalogSource | import("@skaile/workspaces/library").RestCatalogSource>;
|
|
46
46
|
/**
|
|
47
47
|
* Resolved catalog source plus a close handle for releasing any underlying
|
|
48
|
-
* resources (e.g. the `
|
|
48
|
+
* resources (e.g. the `LocalIndex` SQLite connection in local mode).
|
|
49
49
|
*
|
|
50
50
|
* Callers MUST invoke `close()` when done — typically in a `finally` block.
|
|
51
51
|
* For remote-mode sources `close()` is a no-op, but the contract is uniform
|
|
@@ -64,20 +64,20 @@ export interface ResolvedCatalogSource {
|
|
|
64
64
|
* `~/.skaile/config.yaml`.
|
|
65
65
|
*
|
|
66
66
|
* Dispatch:
|
|
67
|
-
* - `catalog.url: local` → opens {@link
|
|
68
|
-
* registered local
|
|
69
|
-
* {@link LocalCatalogSource} bound to that
|
|
70
|
-
*
|
|
67
|
+
* - `catalog.url: local` → opens {@link LocalIndex}, picks the most recently
|
|
68
|
+
* registered local library whose `path` still exists on disk, and returns a
|
|
69
|
+
* {@link LocalCatalogSource} bound to that library. Throws if no usable
|
|
70
|
+
* local library is registered.
|
|
71
71
|
* - any URL → returns {@link RemoteCatalogSource} (same as
|
|
72
72
|
* {@link openCatalogSource}).
|
|
73
73
|
*
|
|
74
|
-
* The returned `close()` releases the underlying `
|
|
74
|
+
* The returned `close()` releases the underlying `LocalIndex` SQLite handle
|
|
75
75
|
* in local mode (no-op in remote mode). Callers MUST invoke it — typically in
|
|
76
76
|
* a `finally` block — to satisfy `library/CLAUDE.md` § "Notes for Consumers".
|
|
77
77
|
*
|
|
78
78
|
* @param opts - Project directory (overlays project config) and explicit overrides.
|
|
79
79
|
* @returns A `ResolvedCatalogSource` carrying the source and a close handle.
|
|
80
|
-
* @throws When `local` is configured but no usable local
|
|
80
|
+
* @throws When `local` is configured but no usable local library is registered.
|
|
81
81
|
* @docLink cli/dev-guide#open-library
|
|
82
82
|
*/
|
|
83
83
|
export declare function resolveCatalogSource(opts?: {
|
|
@@ -87,15 +87,15 @@ export declare function resolveCatalogSource(opts?: {
|
|
|
87
87
|
userConfigFile?: string;
|
|
88
88
|
}): Promise<ResolvedCatalogSource>;
|
|
89
89
|
/**
|
|
90
|
-
* Open the
|
|
90
|
+
* Open the LibraryManager bound to the active LocalIndex.
|
|
91
91
|
* Caller owns lifetime — must call `close()` (returned helper closes the
|
|
92
|
-
* underlying
|
|
92
|
+
* underlying LocalIndex).
|
|
93
93
|
*
|
|
94
94
|
* @docLink cli/dev-guide#open-library
|
|
95
95
|
*/
|
|
96
|
-
export declare function
|
|
97
|
-
manager: import("@skaile/workspaces/library").
|
|
98
|
-
library: import("@skaile/workspaces/library").
|
|
96
|
+
export declare function openLibraryManager(): Promise<{
|
|
97
|
+
manager: import("@skaile/workspaces/library").LibraryManager;
|
|
98
|
+
library: import("@skaile/workspaces/library").LocalIndex;
|
|
99
99
|
close: () => void;
|
|
100
100
|
}>;
|
|
101
101
|
//# sourceMappingURL=open-library.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-library.d.ts","sourceRoot":"","sources":["../../../cli/src/open-library.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH;;;;;;GAMG;AACH,wBAAsB,WAAW
|
|
1
|
+
{"version":3,"file":"open-library.d.ts","sourceRoot":"","sources":["../../../cli/src/open-library.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH;;;;;;GAMG;AACH,wBAAsB,WAAW,6DAQhC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,CAAC,EAAE;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CACP,OAAO,4BAA4B,EAAE,mBAAmB,GACxD,OAAO,4BAA4B,EAAE,iBAAiB,CACzD,CAqBA;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,gDAAgD;IAChD,MAAM,EAAE,OAAO,4BAA4B,EAAE,cAAc,CAAC;IAC5D,sEAAsE;IACtE,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,CAAC,EAAE;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAmEjC;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC;IAClD,OAAO,EAAE,OAAO,4BAA4B,EAAE,cAAc,CAAC;IAC7D,OAAO,EAAE,OAAO,4BAA4B,EAAE,UAAU,CAAC;IACzD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC,CAKD"}
|
package/dist/library/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateLibraryNameError, DuplicateSubscriptionError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KNOWN_ASSET_KINDS, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LIBRARY_STRUCTURES, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource,
|
|
1
|
+
export { CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateLibraryNameError, DuplicateSubscriptionError, 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, LockFileSchema, LockSubscriptionSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, SubscriptionNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, classifyRef, createEmptyLockFile, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, installFromManifest, 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-FNCYNUGS.js';
|
|
2
2
|
export { GITHUB_PAT_ENV, fetchAssetFilesFromGitHub } from '../chunk-R7FOF242.js';
|
|
3
3
|
import '../chunk-GKIA2PU5.js';
|
|
4
4
|
import '../chunk-OKRUTSG7.js';
|
|
@@ -125,15 +125,24 @@ export interface ResolvedSkaileConfig {
|
|
|
125
125
|
pin_policy: "exact" | "minor-track" | "latest";
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
+
/** Root of the per-user skaile data directory (`~/.skaile`). */
|
|
129
|
+
export declare function skaileHomeDir(): string;
|
|
128
130
|
/**
|
|
129
|
-
* Resolve the active library directory
|
|
131
|
+
* Resolve the active library checkouts directory.
|
|
130
132
|
*
|
|
131
|
-
*
|
|
132
|
-
* warning) > defaultLibraryDir().
|
|
133
|
+
* `SKAILE_LIBRARIES_DIR` overrides the default `~/.skaile/libraries`.
|
|
133
134
|
*
|
|
134
135
|
* @docLink packages/library/api-reference#config
|
|
135
136
|
*/
|
|
136
137
|
export declare function resolveLibraryDir(): string;
|
|
138
|
+
/**
|
|
139
|
+
* Resolve the absolute path to the local index SQLite file.
|
|
140
|
+
*
|
|
141
|
+
* `SKAILE_INDEX_PATH` overrides the default `~/.skaile/index.db`.
|
|
142
|
+
*
|
|
143
|
+
* @docLink packages/library/api-reference#config
|
|
144
|
+
*/
|
|
145
|
+
export declare function resolveIndexPath(): string;
|
|
137
146
|
/**
|
|
138
147
|
* Return the built-in default configuration values.
|
|
139
148
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../library/src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAWzB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAG,OAAgB,CAAC;AAElD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,OAAO,iBAAiB,CAE9E;AAED;;;;;;;;;;GAUG;AACH,eAAO,MA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;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,oBAAoB,GAAG,oBAAoB,CAiC/E;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAMhF"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
export { type IAssetIndex, type
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
1
|
+
export { type IAssetIndex, type AssetKind, type KnownAssetKind, KNOWN_ASSET_KINDS, type PinPolicy, PIN_POLICIES, type SyncResult, type AssetDefinition, type AssetFilter, type Instance, type CreateInstanceInput, type UpdateInstanceInput, type InstanceFilter, type Subscription, LibraryError, SourceNotFoundError, InstanceNotFoundError, SubscriptionNotFoundError, DuplicateSubscriptionError, InstanceHasConsumersError, } from "./library.js";
|
|
2
|
+
export { LocalIndex } from "./local/library.js";
|
|
3
|
+
export type { LocalIndexOptions } from "./local/library.js";
|
|
4
|
+
export { getStoreRoot, getStoreManifestsDir, migrateSidecarsToStoreIfNeeded, } from "./local/store-paths.js";
|
|
5
|
+
export { LibraryManager } from "./local/library-manager.js";
|
|
6
6
|
export { LocalSyncDriver } from "./sync/local-driver.js";
|
|
7
7
|
export { GitSyncDriver } from "./sync/git-driver.js";
|
|
8
|
-
export { StoreSyncDriver } from "./sync/store-driver.js";
|
|
9
8
|
export type { LibrarySyncDriver } from "./sync/driver.js";
|
|
10
|
-
export { type
|
|
9
|
+
export { type Library, type AddLibraryInput, type UpdateLibraryInput, type LibraryBackend, type LibraryOwnership, type LibraryStructure, type BackendConfig, type LocalBackendConfig, type GitBackendConfig, type SyncStatus, type LocalChanges, type RemoteChanges, type ConflictDescriptor, type PullResult, type PushResult, type ProposeOpts, type ProposeResult, type PublishOpts, type PublishResult, type PullOpts, type PushOpts, type AssetRef, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LIBRARY_STRUCTURES, LibrarySyncError, OperationNotPermittedError, DuplicateLibraryNameError, UserLibraryNotFoundError, } from "./user-library.js";
|
|
11
10
|
export { getSidecarRoot, resolveSidecarPaths, deriveSlug, listSidecarSlugsOnDisk, } from "./local/sidecar-paths.js";
|
|
12
11
|
export type { SidecarPaths } from "./local/sidecar-paths.js";
|
|
13
12
|
export { SidecarGit } from "./local/sidecar-git.js";
|
|
14
13
|
export type { GitInvocationResult, SidecarCommitOptions } from "./local/sidecar-git.js";
|
|
15
14
|
export { PinPolicySchema, LibrarySectionSchema, LibraryInstanceRefSchema, PresetAppliedSchema, WorkspaceConfigV2Schema, LockFileSchema, LockSubscriptionSchema, RequiresEdgeSchema, PresetExpandedSchema, type LibrarySection, type LibraryInstanceRef, type PresetApplied, type WorkspaceConfigV2, type LockSubscription, type LockFile, parseWorkspaceV2, loadWorkspaceV2, saveWorkspaceV2, loadLockFile, saveLockFile, createEmptyLockFile, detectWorkspaceVersion, } from "./workspace-config.js";
|
|
16
|
-
export { CatalogConfigSchema, LibraryConfigSchema, SkaileConfigSchema, LOCAL_CATALOG_URL, isLocalCatalogUrl, type CatalogConfig, type LibraryConfig, type SkaileConfig, type ResolvedSkaileConfig, type ResolveConfigOptions, getConfigDefaults, userConfigPath, projectConfigPath, resolveConfig, resolveLibraryDir, saveConfig, } from "./config.js";
|
|
15
|
+
export { CatalogConfigSchema, LibraryConfigSchema, SkaileConfigSchema, LOCAL_CATALOG_URL, isLocalCatalogUrl, type CatalogConfig, type LibraryConfig, type SkaileConfig, type ResolvedSkaileConfig, type ResolveConfigOptions, getConfigDefaults, userConfigPath, projectConfigPath, resolveConfig, resolveIndexPath, resolveLibraryDir, skaileHomeDir, saveConfig, } from "./config.js";
|
|
17
16
|
export { writeManifestIfMissing } from "./sync/manifest-writeback.js";
|
|
18
17
|
export type { WriteManifestInput, WriteManifestResult } from "./sync/manifest-writeback.js";
|
|
19
18
|
export { migrateWorkspaceConfig, type MigrationResult } from "./migration.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../library/src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../library/src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,iBAAiB,EACjB,KAAK,SAAS,EACd,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAk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,EACxB,WAAW,EACX,eAAe,EAEf,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EAEnB,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAElB,WAAW,EACX,mBAAmB,EAEnB,aAAa,EACb,eAAe,EACf,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,EACZ,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* IAssetIndex — single-interface contract for the asset cache layer.
|
|
3
3
|
*
|
|
4
4
|
* Two implementations:
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
5
|
+
* - LocalIndex (SQLite at ~/.skaile/index.db, Phase 1)
|
|
6
|
+
* - PlatformIndex (Postgres, Phase 3)
|
|
7
7
|
*
|
|
8
|
-
* @docLink packages/library/concepts#i-
|
|
8
|
+
* @docLink packages/library/concepts#i-asset-index
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* All known asset kinds shipped with the framework (9 core + 2 initial
|
|
@@ -44,64 +44,13 @@ export declare const PIN_POLICIES: readonly ["exact", "minor-track", "latest"];
|
|
|
44
44
|
*/
|
|
45
45
|
export type PinPolicy = (typeof PIN_POLICIES)[number];
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
48
|
-
* table after the 2026-05-13 schema change. Kept for backward compat; new
|
|
49
|
-
* code should reference `UserLibrary` from `user-library.ts`.
|
|
50
|
-
*/
|
|
51
|
-
export type SourceType = "local" | "git" | "store";
|
|
52
|
-
/**
|
|
53
|
-
* A registered asset source — a row in the `libraries` table.
|
|
54
|
-
*
|
|
55
|
-
* @docLink packages/library/concepts#source
|
|
56
|
-
*/
|
|
57
|
-
export interface Source {
|
|
58
|
-
id: string;
|
|
59
|
-
/** Backend kind (renamed from `type`). */
|
|
60
|
-
type: SourceType;
|
|
61
|
-
/** User-visible handle (NEW). */
|
|
62
|
-
name: string;
|
|
63
|
-
/** Absolute on-disk root. */
|
|
64
|
-
path: string;
|
|
65
|
-
/** Ownership level (NEW). */
|
|
66
|
-
ownership: "owner" | "contributor" | "reader";
|
|
67
|
-
/** True iff this is the auto-target for `asset migrate`. */
|
|
68
|
-
isDefault: boolean;
|
|
69
|
-
/** Backend-specific config — parsed from JSON. */
|
|
70
|
-
backendConfig: Record<string, unknown>;
|
|
71
|
-
/** Detected layout. */
|
|
72
|
-
structure?: "flat" | "domain";
|
|
73
|
-
/** True iff CLI generated the on-disk `.skaile-source.yaml`. */
|
|
74
|
-
manifestGenerated: boolean;
|
|
75
|
-
/** Last sync timestamp. */
|
|
76
|
-
lastSyncedAt?: Date;
|
|
77
|
-
createdAt: Date;
|
|
78
|
-
updatedAt: Date;
|
|
79
|
-
/** @deprecated For migration compat; now mirrors `backendConfig.url`. */
|
|
80
|
-
url?: string;
|
|
81
|
-
/** @deprecated For migration compat; mirrors `backendConfig.branch`. */
|
|
82
|
-
ref?: string;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Input shape for {@link LocalLibrary.addSource}.
|
|
86
|
-
*
|
|
87
|
-
* @docLink packages/library/concepts#source
|
|
88
|
-
*/
|
|
89
|
-
export interface AddSourceInput {
|
|
90
|
-
type: SourceType;
|
|
91
|
-
name: string;
|
|
92
|
-
path: string;
|
|
93
|
-
ownership?: "owner" | "contributor" | "reader";
|
|
94
|
-
backendConfig?: Record<string, unknown>;
|
|
95
|
-
isDefault?: boolean;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Result returned by {@link ILibrary.syncSource}.
|
|
47
|
+
* Result returned by {@link IAssetIndex.syncLibrary}.
|
|
99
48
|
*
|
|
100
|
-
* @docLink packages/library/concepts#
|
|
49
|
+
* @docLink packages/library/concepts#library
|
|
101
50
|
*/
|
|
102
51
|
export interface SyncResult {
|
|
103
|
-
/** The
|
|
104
|
-
|
|
52
|
+
/** The library ID that was synced. */
|
|
53
|
+
libraryId: string;
|
|
105
54
|
/** Total number of assets discovered in the tree. */
|
|
106
55
|
assetsFound: number;
|
|
107
56
|
/** Number of asset definitions created or updated in the cache. */
|
|
@@ -137,8 +86,8 @@ export interface AssetDefinition {
|
|
|
137
86
|
category?: string;
|
|
138
87
|
/** Full parsed manifest as JSON-safe object. */
|
|
139
88
|
manifest: Record<string, unknown>;
|
|
140
|
-
/**
|
|
141
|
-
|
|
89
|
+
/** Library that provided this definition (null when library was removed). */
|
|
90
|
+
libraryId?: string;
|
|
142
91
|
/**
|
|
143
92
|
* Version of the IAssetKindProvider that produced this cached entry.
|
|
144
93
|
* Independent of the asset's own version — tracks schema/logic evolution.
|
|
@@ -152,7 +101,7 @@ export interface AssetDefinition {
|
|
|
152
101
|
updatedAt: Date;
|
|
153
102
|
}
|
|
154
103
|
/**
|
|
155
|
-
* Filter options for {@link
|
|
104
|
+
* Filter options for {@link IAssetIndex.listAssetDefs}.
|
|
156
105
|
*
|
|
157
106
|
* @docLink packages/library/concepts#asset-definition
|
|
158
107
|
*/
|
|
@@ -163,8 +112,8 @@ export interface AssetFilter {
|
|
|
163
112
|
publisher?: string;
|
|
164
113
|
/** Prefix match on the full `<publisher>/<name>` ref. */
|
|
165
114
|
prefix?: string;
|
|
166
|
-
/** Filter to assets from a specific
|
|
167
|
-
|
|
115
|
+
/** Filter to assets from a specific library. */
|
|
116
|
+
libraryId?: string;
|
|
168
117
|
/** Maximum number of results to return. */
|
|
169
118
|
limit?: number;
|
|
170
119
|
/** Number of results to skip (for pagination). */
|
|
@@ -198,12 +147,12 @@ export interface Instance {
|
|
|
198
147
|
/**
|
|
199
148
|
* Immutable upstream git commit SHA the asset bytes were installed from
|
|
200
149
|
* (pointer-only install path). Absent for instances created via
|
|
201
|
-
* {@link
|
|
150
|
+
* {@link IAssetIndex.createInstance} or preset apply.
|
|
202
151
|
*/
|
|
203
152
|
sourceCommitSha?: string;
|
|
204
153
|
}
|
|
205
154
|
/**
|
|
206
|
-
* Input shape for {@link
|
|
155
|
+
* Input shape for {@link IAssetIndex.createInstance}.
|
|
207
156
|
*
|
|
208
157
|
* @docLink packages/library/concepts#instance
|
|
209
158
|
*/
|
|
@@ -220,7 +169,7 @@ export interface CreateInstanceInput {
|
|
|
220
169
|
createdBy?: string;
|
|
221
170
|
}
|
|
222
171
|
/**
|
|
223
|
-
* Partial update shape for {@link
|
|
172
|
+
* Partial update shape for {@link IAssetIndex.updateInstance}.
|
|
224
173
|
*
|
|
225
174
|
* @docLink packages/library/concepts#instance
|
|
226
175
|
*/
|
|
@@ -233,7 +182,7 @@ export interface UpdateInstanceInput {
|
|
|
233
182
|
defPin?: PinPolicy;
|
|
234
183
|
}
|
|
235
184
|
/**
|
|
236
|
-
* Filter options for {@link
|
|
185
|
+
* Filter options for {@link IAssetIndex.listInstances}.
|
|
237
186
|
*
|
|
238
187
|
* @docLink packages/library/concepts#instance
|
|
239
188
|
*/
|
|
@@ -280,8 +229,8 @@ export declare class LibraryError extends Error {
|
|
|
280
229
|
constructor(message: string, code: string);
|
|
281
230
|
}
|
|
282
231
|
/**
|
|
283
|
-
* Thrown
|
|
284
|
-
*
|
|
232
|
+
* Thrown when a referenced library ID does not exist (e.g. by
|
|
233
|
+
* {@link IAssetIndex.removeSource} / {@link IAssetIndex.syncSource}).
|
|
285
234
|
*
|
|
286
235
|
* @docLink packages/library/concepts#errors
|
|
287
236
|
*/
|
|
@@ -289,8 +238,8 @@ export declare class SourceNotFoundError extends LibraryError {
|
|
|
289
238
|
constructor(id: string);
|
|
290
239
|
}
|
|
291
240
|
/**
|
|
292
|
-
* Thrown by {@link
|
|
293
|
-
* and {@link
|
|
241
|
+
* Thrown by {@link IAssetIndex.getInstance}, {@link IAssetIndex.updateInstance},
|
|
242
|
+
* and {@link IAssetIndex.deleteInstance} when the given instance ID does not exist.
|
|
294
243
|
*
|
|
295
244
|
* @docLink packages/library/concepts#errors
|
|
296
245
|
*/
|
|
@@ -298,7 +247,7 @@ export declare class InstanceNotFoundError extends LibraryError {
|
|
|
298
247
|
constructor(id: string);
|
|
299
248
|
}
|
|
300
249
|
/**
|
|
301
|
-
* Thrown by {@link
|
|
250
|
+
* Thrown by {@link IAssetIndex.unsubscribe} when the given subscription ID does not exist.
|
|
302
251
|
*
|
|
303
252
|
* @docLink packages/library/concepts#errors
|
|
304
253
|
*/
|
|
@@ -306,7 +255,7 @@ export declare class SubscriptionNotFoundError extends LibraryError {
|
|
|
306
255
|
constructor(id: string);
|
|
307
256
|
}
|
|
308
257
|
/**
|
|
309
|
-
* Thrown by {@link
|
|
258
|
+
* Thrown by {@link IAssetIndex.subscribe} when the workspace already has an active
|
|
310
259
|
* subscription to the same Instance.
|
|
311
260
|
*
|
|
312
261
|
* @docLink packages/library/concepts#errors
|
|
@@ -315,7 +264,7 @@ export declare class DuplicateSubscriptionError extends LibraryError {
|
|
|
315
264
|
constructor(workspaceId: string, instanceId: string);
|
|
316
265
|
}
|
|
317
266
|
/**
|
|
318
|
-
* Thrown by {@link
|
|
267
|
+
* Thrown by {@link IAssetIndex.deleteInstance} when the Instance has active
|
|
319
268
|
* Subscriptions and `{ cascade: true }` was not passed.
|
|
320
269
|
*
|
|
321
270
|
* @docLink packages/library/concepts#errors
|
|
@@ -345,6 +294,4 @@ export interface IAssetIndex {
|
|
|
345
294
|
listSubscriptions(workspaceId: string): Promise<Subscription[]>;
|
|
346
295
|
getConsumptionGraph(instanceId: string): Promise<Subscription[]>;
|
|
347
296
|
}
|
|
348
|
-
/** @deprecated Use `IAssetIndex`. Removed in next major. */
|
|
349
|
-
export type ILibrary = IAssetIndex;
|
|
350
297
|
//# sourceMappingURL=library.d.ts.map
|