@skaile/workspaces 0.33.0 → 0.35.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 +62 -0
- package/dist/{asset-feeds-DX5JPM76.js → asset-feeds-PCLTE2W5.js} +20 -12
- package/dist/asset-feeds-PCLTE2W5.js.map +1 -0
- package/dist/asset-manager/index.js +8 -8
- package/dist/asset-manager/installer.js +7 -7
- package/dist/{chunk-PKPUVQJP.js → chunk-2Q6OY3SU.js} +3 -3
- package/dist/{chunk-PKPUVQJP.js.map → chunk-2Q6OY3SU.js.map} +1 -1
- package/dist/{chunk-LRFZNLB2.js → chunk-52HINMW4.js} +3 -3
- package/dist/{chunk-LRFZNLB2.js.map → chunk-52HINMW4.js.map} +1 -1
- package/dist/{chunk-AZODLVKH.js → chunk-56YT6CWS.js} +5 -5
- package/dist/{chunk-AZODLVKH.js.map → chunk-56YT6CWS.js.map} +1 -1
- package/dist/{chunk-RQG5TXIR.js → chunk-5DPQ766L.js} +4 -4
- package/dist/{chunk-RQG5TXIR.js.map → chunk-5DPQ766L.js.map} +1 -1
- package/dist/{chunk-BUMDC3R2.js → chunk-6422UOMQ.js} +5 -5
- package/dist/{chunk-BUMDC3R2.js.map → chunk-6422UOMQ.js.map} +1 -1
- package/dist/{chunk-XQRAXAL5.js → chunk-7B3CL5JT.js} +7 -7
- package/dist/{chunk-XQRAXAL5.js.map → chunk-7B3CL5JT.js.map} +1 -1
- package/dist/{chunk-LFDZYCEO.js → chunk-BM7XANVN.js} +2 -2
- package/dist/chunk-BM7XANVN.js.map +1 -0
- package/dist/{chunk-QUWXW2N3.js → chunk-EOCKR5TN.js} +3 -3
- package/dist/{chunk-QUWXW2N3.js.map → chunk-EOCKR5TN.js.map} +1 -1
- package/dist/{chunk-EJZFQCQG.js → chunk-I3TERDTR.js} +2 -2
- package/dist/{chunk-EJZFQCQG.js.map → chunk-I3TERDTR.js.map} +1 -1
- package/dist/{chunk-N74UQJPN.js → chunk-KYC6JH75.js} +3 -3
- package/dist/{chunk-N74UQJPN.js.map → chunk-KYC6JH75.js.map} +1 -1
- package/dist/{chunk-4AGIEU7V.js → chunk-MAPRKFBD.js} +3 -3
- package/dist/{chunk-4AGIEU7V.js.map → chunk-MAPRKFBD.js.map} +1 -1
- package/dist/{chunk-362QBS57.js → chunk-NAMD4AIK.js} +235 -13
- package/dist/chunk-NAMD4AIK.js.map +1 -0
- package/dist/{chunk-KKERAIPQ.js → chunk-O2OHGE4S.js} +4 -4
- package/dist/{chunk-KKERAIPQ.js.map → chunk-O2OHGE4S.js.map} +1 -1
- package/dist/{chunk-7MANNJ3U.js → chunk-O4PANZI2.js} +5 -5
- package/dist/{chunk-7MANNJ3U.js.map → chunk-O4PANZI2.js.map} +1 -1
- package/dist/{chunk-H5YXL4KI.js → chunk-SAXDHVJZ.js} +3 -3
- package/dist/{chunk-H5YXL4KI.js.map → chunk-SAXDHVJZ.js.map} +1 -1
- package/dist/{chunk-R2I7RHT7.js → chunk-SKVUDDHE.js} +191 -23
- package/dist/chunk-SKVUDDHE.js.map +1 -0
- package/dist/{chunk-PWXN2KHV.js → chunk-UAYAK7N4.js} +5 -5
- package/dist/{chunk-PWXN2KHV.js.map → chunk-UAYAK7N4.js.map} +1 -1
- package/dist/{chunk-PTDVTMQL.js → chunk-WEQN6EWW.js} +4 -4
- package/dist/{chunk-PTDVTMQL.js.map → chunk-WEQN6EWW.js.map} +1 -1
- package/dist/{chunk-VXW2K4YH.js → chunk-XOBPOVFT.js} +3 -3
- package/dist/{chunk-VXW2K4YH.js.map → chunk-XOBPOVFT.js.map} +1 -1
- package/dist/{chunk-4ZVS6KV4.js → chunk-ZGJE4ZDP.js} +2 -2
- package/dist/{chunk-4ZVS6KV4.js.map → chunk-ZGJE4ZDP.js.map} +1 -1
- package/dist/cli/index.js +196 -101
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts +8 -1
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +33 -22
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/connectors/config.js +7 -7
- package/dist/connectors/index.js +8 -8
- package/dist/connectors/src/connector-manager.d.ts +56 -3
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/fleet-health-gate.d.ts +86 -0
- package/dist/connectors/src/fleet-health-gate.d.ts.map +1 -0
- package/dist/connectors/src/fleet-utils.d.ts +16 -0
- package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +4 -1
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors/src/mount-placeholder.d.ts +8 -0
- package/dist/connectors/src/mount-placeholder.d.ts.map +1 -1
- package/dist/core/index.js +6 -6
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/runtime-assets.js +5 -5
- package/dist/core/src/index.d.ts +1 -1
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +28 -0
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +13 -0
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +4 -4
- package/dist/deploy/index.js +6 -6
- package/dist/discovery/index.js +4 -4
- package/dist/{ensure-sources-O6RMWP6C.js → ensure-sources-HMMEQEZC.js} +11 -11
- package/dist/{ensure-sources-O6RMWP6C.js.map → ensure-sources-HMMEQEZC.js.map} +1 -1
- package/dist/factory-assets/connectors/deploy.js +8 -8
- package/dist/factory-assets/connectors/devserver.js +8 -8
- package/dist/factory-assets/connectors/flow/adapter.js +8 -8
- package/dist/factory-assets/connectors/flow/engine.js +6 -6
- package/dist/factory-assets/connectors/flow/run-flow.js +9 -9
- package/dist/factory-assets/connectors/flow.js +8 -8
- package/dist/factory-assets/connectors/git.js +8 -8
- package/dist/factory-assets/connectors/gmail.js +8 -8
- package/dist/factory-assets/connectors/googledrive.js +8 -8
- package/dist/factory-assets/connectors/local.js +8 -8
- package/dist/factory-assets/connectors/mattermost.js +8 -8
- package/dist/factory-assets/connectors/memory.js +8 -8
- package/dist/factory-assets/connectors/minio.js +8 -8
- package/dist/factory-assets/connectors/postgres.js +8 -8
- package/dist/factory-assets/connectors/s3.js +8 -8
- package/dist/factory-assets/connectors/sharepoint.js +8 -8
- package/dist/factory-assets/connectors/sqlite.js +8 -8
- package/dist/factory-assets/connectors/static-server.js +8 -8
- package/dist/factory-assets/connectors/tunnel.js +8 -8
- package/dist/factory-assets/connectors/webdav.js +8 -8
- package/dist/factory-assets/connectors/xstate-store.js +8 -8
- package/dist/factory-assets/connectors/xstate.js +8 -8
- package/dist/{flows-QWYIUDA2.js → flows-O7OXGFIY.js} +3 -3
- package/dist/{flows-QWYIUDA2.js.map → flows-O7OXGFIY.js.map} +1 -1
- package/dist/library/index.js +9 -9
- package/dist/library/install.js +7 -7
- package/dist/open-library-5WWTBHQD.js +23 -0
- package/dist/{open-library-B7BLYXYK.js.map → open-library-5WWTBHQD.js.map} +1 -1
- package/dist/paths-UC3ZHLKC.js +15 -0
- package/dist/{paths-5IUR235S.js.map → paths-UC3ZHLKC.js.map} +1 -1
- package/dist/{plugin-store-WWOJXWG7.js → plugin-store-R2WLXRT3.js} +8 -8
- package/dist/{plugin-store-WWOJXWG7.js.map → plugin-store-R2WLXRT3.js.map} +1 -1
- package/dist/runner/index.js +10 -10
- package/dist/runner/src/external-mcp.d.ts +45 -4
- package/dist/runner/src/external-mcp.d.ts.map +1 -1
- package/dist/runner/src/fleet-health-flag-dispatcher.d.ts +40 -0
- package/dist/runner/src/fleet-health-flag-dispatcher.d.ts.map +1 -0
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +8 -8
- package/dist/sdk/core.js +6 -6
- package/dist/sdk/flow.js +6 -6
- package/dist/sdk/index.js +10 -10
- package/dist/sdk/runner.js +10 -10
- package/dist/{setup-2RD6EDBZ.js → setup-BSDHVMR6.js} +8 -8
- package/dist/{setup-2RD6EDBZ.js.map → setup-BSDHVMR6.js.map} +1 -1
- package/dist/store-client-4GKV4LOD.js +15 -0
- package/dist/{store-client-XQQRHYDW.js.map → store-client-4GKV4LOD.js.map} +1 -1
- package/dist/tui/index.js +10 -10
- package/dist/workspace-plugin/adapters/mcp.js +1 -1
- package/dist/workspace-plugin/adapters/omp.js +3 -3
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/asset-feeds-DX5JPM76.js.map +0 -1
- package/dist/chunk-362QBS57.js.map +0 -1
- package/dist/chunk-LFDZYCEO.js.map +0 -1
- package/dist/chunk-R2I7RHT7.js.map +0 -1
- package/dist/open-library-B7BLYXYK.js +0 -23
- package/dist/paths-5IUR235S.js +0 -15
- package/dist/store-client-XQQRHYDW.js +0 -15
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - **Remote store** — the configured catalog source when `catalog.url` is
|
|
12
12
|
* not `local`. Failures are non-fatal — they surface as notes.
|
|
13
13
|
*/
|
|
14
|
-
import { type CatalogEntry } from "@skaile/workspaces/core";
|
|
14
|
+
import { type CatalogDomain, type CatalogEntry } from "@skaile/workspaces/core";
|
|
15
15
|
/** One non-fatal note returned to the caller for surfacing in the UI. */
|
|
16
16
|
export interface FeedNote {
|
|
17
17
|
feed: "sources" | "libraries" | "store";
|
|
@@ -32,6 +32,13 @@ export interface OriginEntry {
|
|
|
32
32
|
}
|
|
33
33
|
export interface AssetFeedResult {
|
|
34
34
|
entries: OriginEntry[];
|
|
35
|
+
/**
|
|
36
|
+
* Display-only domain metadata, keyed (by the consumer) on `slug`. Populated
|
|
37
|
+
* from the store's `catalog.listDomains` when the connected catalog source
|
|
38
|
+
* exposes it; empty otherwise. The manage TUI joins `entry.domainSlug` → a
|
|
39
|
+
* domain for grouping headers, descriptions, and relation badges.
|
|
40
|
+
*/
|
|
41
|
+
domains: CatalogDomain[];
|
|
35
42
|
notes: FeedNote[];
|
|
36
43
|
}
|
|
37
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-feeds.d.ts","sourceRoot":"","sources":["../../../cli/src/asset-feeds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"asset-feeds.d.ts","sourceRoot":"","sources":["../../../cli/src/asset-feeds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,YAAY,EAElB,MAAM,yBAAyB,CAAC;AAEjC,yEAAyE;AACzE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzD,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB;;;;;OAKG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAoHD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,YAAY,EAAE,CAAA;CAAE,EACpC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAW1B"}
|
|
@@ -4,16 +4,18 @@
|
|
|
4
4
|
* Tabs: [Assets] [Sources] [Libraries] [Pending] [Sync]
|
|
5
5
|
*
|
|
6
6
|
* - Assets — browse and queue install/remove for assets, grouped in a
|
|
7
|
-
* `origin → publisher →
|
|
7
|
+
* `origin → publisher → domain → asset` tree. `origin` is the feed
|
|
8
8
|
* the asset came from (Library / Sources / Store), the outermost
|
|
9
9
|
* collapsible band so it's clear where each skill comes from.
|
|
10
|
+
* `domain` is the sidecar `DOMAIN.md` grouping (display-only).
|
|
10
11
|
* - Sources — third-party github repos registered via `skaile source add`.
|
|
11
12
|
* - Libraries — user authoring places registered via `skaile library init`.
|
|
12
13
|
* - Pending — staged adds/removes (rich rendering deferred to AF-LIB-TUI-RICH).
|
|
13
14
|
* - Sync — bulk sync sources + libraries (deferred to AF-LIB-TUI-RICH).
|
|
14
15
|
*
|
|
15
16
|
* Keys: ↑↓/jk navigate, ←/→ collapse/expand, space/+/- select, a/Enter apply,
|
|
16
|
-
* 1/2/3 filter to one origin · 0 clear, s sync, i info,
|
|
17
|
+
* d domain info, 1/2/3 filter to one origin · 0 clear, s sync, i info,
|
|
18
|
+
* Tab switch, q/Esc quit
|
|
17
19
|
*
|
|
18
20
|
* NOTE: rich rendering (status glyphs, behind/ahead counters, in-line sync) for
|
|
19
21
|
* the Sources/Libraries/Pending/Sync tabs is deferred to AF-LIB-TUI-RICH (see
|
|
@@ -24,32 +26,38 @@ import { Command } from "commander";
|
|
|
24
26
|
import type { AssetOrigin } from "../asset-feeds.ts";
|
|
25
27
|
/**
|
|
26
28
|
* A single row in the manage TUI asset list: an origin header, a publisher
|
|
27
|
-
* header, a
|
|
29
|
+
* header, a domain header, a domain info line, or an individual asset entry.
|
|
28
30
|
*
|
|
29
|
-
* The tree is `origin → publisher →
|
|
30
|
-
* was gathered from — store / source / library) is the outermost band and
|
|
31
|
-
* carried on **every** row, because the same `publisher` can appear under
|
|
32
|
-
* than one origin and must not collapse together. `source` holds the
|
|
33
|
-
* **publisher** namespace (`CatalogEntry.publisher`). `
|
|
34
|
-
* `"
|
|
35
|
-
*
|
|
36
|
-
*
|
|
31
|
+
* The tree is `origin → publisher → domain → asset`. `origin` (the feed the
|
|
32
|
+
* asset was gathered from — store / source / library) is the outermost band and
|
|
33
|
+
* is carried on **every** row, because the same `publisher` can appear under
|
|
34
|
+
* more than one origin and must not collapse together. `source` holds the
|
|
35
|
+
* **publisher** namespace (`CatalogEntry.publisher`). `domainSlug` is the
|
|
36
|
+
* navigational group from a sidecar `DOMAIN.md` (`""` = the synthetic "no
|
|
37
|
+
* domain" group). A `repo` (`"<org>/<repo>"`) is no longer a grouping axis —
|
|
38
|
+
* it rides on the asset row as a dim provenance badge only.
|
|
39
|
+
*
|
|
40
|
+
* A `domain-header` is **navigational**: it collapses/expands and toggles its
|
|
41
|
+
* info region, but never bulk-installs (unlike origin/publisher headers).
|
|
37
42
|
*
|
|
38
43
|
* @docLink cli/commands/manage#make-manage-command
|
|
39
44
|
*/
|
|
40
45
|
export interface AssetRow {
|
|
41
|
-
type: "origin-header" | "publisher-header" | "
|
|
46
|
+
type: "origin-header" | "publisher-header" | "domain-header" | "domain-info" | "asset";
|
|
42
47
|
origin?: AssetOrigin;
|
|
43
48
|
source?: string;
|
|
49
|
+
domainSlug?: string;
|
|
44
50
|
repo?: string;
|
|
45
51
|
entry?: CatalogEntry;
|
|
46
52
|
installed?: boolean;
|
|
53
|
+
underDomain?: boolean;
|
|
54
|
+
seq?: number;
|
|
47
55
|
}
|
|
48
56
|
/**
|
|
49
57
|
* Filter the full asset row list to only rows that should be visible given the
|
|
50
|
-
* current collapsed origin / publisher /
|
|
51
|
-
* The tree is flat
|
|
52
|
-
*
|
|
58
|
+
* current collapsed origin / publisher / domain sets, the per-domain info-expand
|
|
59
|
+
* set, and the active origin filter. The tree is flat (`origin → publisher →
|
|
60
|
+
* domain → asset`, domain slugs not nested), so collapse checks are exact set
|
|
53
61
|
* membership — no prefix walking. Collapse keys are origin-namespaced so the
|
|
54
62
|
* same publisher under two origins collapses independently.
|
|
55
63
|
*
|
|
@@ -57,20 +65,23 @@ export interface AssetRow {
|
|
|
57
65
|
* doesn't match it.
|
|
58
66
|
* - An `origin-header` is otherwise always visible.
|
|
59
67
|
* - A `publisher-header` is hidden when its origin is collapsed.
|
|
60
|
-
* - A `
|
|
68
|
+
* - A `domain-header` is hidden when its origin or its `"origin:publisher"` key
|
|
61
69
|
* is collapsed.
|
|
62
|
-
* -
|
|
63
|
-
*
|
|
70
|
+
* - A `domain-info` line follows the same rule as the domain's assets (shown
|
|
71
|
+
* when the band is open). The `[d]` toggle changes only how it *renders*
|
|
72
|
+
* (truncated ↔ full), not whether it shows.
|
|
73
|
+
* - An asset under a real domain is hidden when that `"…:dom:<slug>"` key is
|
|
74
|
+
* collapsed; a "no domain" asset only depends on its origin + publisher.
|
|
64
75
|
*
|
|
65
76
|
* @param rows - Complete flat list of asset rows.
|
|
66
77
|
* @param collapsedOrigins - Set of origins whose children are hidden.
|
|
67
78
|
* @param collapsedSources - Set of `"origin:publisher"` keys whose children are hidden.
|
|
68
|
-
* @param
|
|
79
|
+
* @param collapsedDomains - Set of `"origin:publisher:dom:<slug>"` keys whose assets are hidden.
|
|
69
80
|
* @param originFilter - When set, only rows of this origin are kept.
|
|
70
81
|
* @returns Filtered array of visible rows.
|
|
71
82
|
* @docLink cli/commands/manage#make-manage-command
|
|
72
83
|
*/
|
|
73
|
-
export declare function buildVisibleRows(rows: AssetRow[], collapsedOrigins: Set<AssetOrigin>, collapsedSources: Set<string>,
|
|
84
|
+
export declare function buildVisibleRows(rows: AssetRow[], collapsedOrigins: Set<AssetOrigin>, collapsedSources: Set<string>, collapsedDomains: Set<string>, originFilter?: AssetOrigin | null): AssetRow[];
|
|
74
85
|
/**
|
|
75
86
|
* Return `kind:name` refs for all asset rows belonging to a specific origin.
|
|
76
87
|
*
|
|
@@ -79,11 +90,11 @@ export declare function buildVisibleRows(rows: AssetRow[], collapsedOrigins: Set
|
|
|
79
90
|
export declare function originAssetRefs(rows: AssetRow[], origin: AssetOrigin): string[];
|
|
80
91
|
/**
|
|
81
92
|
* Return `kind:name` refs for all asset rows belonging to a specific
|
|
82
|
-
* origin + publisher +
|
|
93
|
+
* origin + publisher + domain slug (`""` = the "no domain" group).
|
|
83
94
|
*
|
|
84
95
|
* @docLink cli/commands/manage#make-manage-command
|
|
85
96
|
*/
|
|
86
|
-
export declare function
|
|
97
|
+
export declare function domainAssetRefs(rows: AssetRow[], origin: AssetOrigin, publisher: string, slug: string): string[];
|
|
87
98
|
/**
|
|
88
99
|
* Return `kind:name` refs for all asset rows belonging to a specific
|
|
89
100
|
* origin + publisher (across its repos).
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,eAAe,GAAG,kBAAkB,GAAG,eAAe,GAAG,aAAa,GAAG,OAAO,CAAC;IACvF,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AA8ID;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,EAAE,EAChB,gBAAgB,EAAE,GAAG,CAAC,WAAW,CAAC,EAClC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,YAAY,GAAE,WAAW,GAAG,IAAW,GACtC,QAAQ,EAAE,CAmBZ;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE,CAE/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,EAAE,EAChB,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,MAAM,EAAE,CAEV;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAE/F;AA+nCD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAO3C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { LegacyAuthGrammarError, MountTokenMediatorError, createCliSecretProviderChain, createForgeSecretProviderChain, loadConnectorDeclarations, resolveAuth, resolveAuthRef, resolveBackendAuthFor, resolveMountCredential, resolveMountCredentialString } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
export { LegacyAuthGrammarError, MountTokenMediatorError, createCliSecretProviderChain, createForgeSecretProviderChain, loadConnectorDeclarations, resolveAuth, resolveAuthRef, resolveBackendAuthFor, resolveMountCredential, resolveMountCredentialString } from '../chunk-52HINMW4.js';
|
|
2
|
+
import '../chunk-2Q6OY3SU.js';
|
|
3
|
+
import '../chunk-5DPQ766L.js';
|
|
4
|
+
import '../chunk-56YT6CWS.js';
|
|
5
|
+
import '../chunk-SAXDHVJZ.js';
|
|
6
|
+
import '../chunk-MAPRKFBD.js';
|
|
7
|
+
import '../chunk-BM7XANVN.js';
|
|
8
8
|
import '../chunk-XGCXFX7X.js';
|
|
9
9
|
import '../chunk-O4JH3KUE.js';
|
|
10
10
|
import '../chunk-K5GBV4SA.js';
|
package/dist/connectors/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, ConnectorFieldMissingError, ConnectorManager, ConnectorStartupError, DEFAULT_REACTIVE_COOLDOWN_MS, FlowAdapter, LogBuffer, ManagedGitconfigCollisionError, NOT_READY_SENTINEL, PROACTIVE_RCLONE_REFRESH_MARGIN_MS, RoMountPlaceholderBarrier, atomicReplaceCredential, buildConnectorPromptSection, buildSdkConnectorTools, createRcloneTokenRefresh, createWorktree, defaultMountPlaceholderBarrier, defaultSpawn, ensureFleetMounted, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, registerBuiltinConnectors, removeMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock } from '../chunk-
|
|
1
|
+
export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, ConnectorFieldMissingError, ConnectorManager, ConnectorStartupError, DEFAULT_REACTIVE_COOLDOWN_MS, FleetHealthGate, FlowAdapter, LogBuffer, ManagedGitconfigCollisionError, NOT_READY_SENTINEL, PROACTIVE_RCLONE_REFRESH_MARGIN_MS, RoMountPlaceholderBarrier, atomicReplaceCredential, buildConnectorPromptSection, buildSdkConnectorTools, createRcloneTokenRefresh, createWorktree, defaultMountPlaceholderBarrier, defaultSpawn, ensureFleetMounted, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, probeFleetHealth, registerBuiltinConnectors, removeMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock } from '../chunk-NAMD4AIK.js';
|
|
2
2
|
export { renderGoogleDriveConfig, renderOneDriveConfig, renderWebDAVConfig } from '../chunk-OVRSNIKJ.js';
|
|
3
|
-
export { EnvSecretProvider, ForgeSecretProvider, InMemorySecretProvider, LegacyAuthGrammarError, LockedSecretProvider, MountTokenMediatorError, OAuthRequiredError, PreMintedSecretProvider, SecretProviderChain, createCliSecretProviderChain, createForgeSecretProviderChain, loadConnectorDeclarations, resolveAuth, resolveAuthRef, resolveBackendAuthFor, resolveMountCredential, resolveMountCredentialString } from '../chunk-
|
|
3
|
+
export { EnvSecretProvider, ForgeSecretProvider, InMemorySecretProvider, LegacyAuthGrammarError, LockedSecretProvider, MountTokenMediatorError, OAuthRequiredError, PreMintedSecretProvider, SecretProviderChain, createCliSecretProviderChain, createForgeSecretProviderChain, loadConnectorDeclarations, resolveAuth, resolveAuthRef, resolveBackendAuthFor, resolveMountCredential, resolveMountCredentialString } from '../chunk-52HINMW4.js';
|
|
4
4
|
export { PortPool, RcloneProcessManager, createFsWatcher, ensureDirMode } from '../chunk-XT6AZWK3.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-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-2Q6OY3SU.js';
|
|
10
|
+
import '../chunk-5DPQ766L.js';
|
|
11
|
+
import '../chunk-56YT6CWS.js';
|
|
12
|
+
import '../chunk-SAXDHVJZ.js';
|
|
13
|
+
import '../chunk-MAPRKFBD.js';
|
|
14
|
+
import '../chunk-BM7XANVN.js';
|
|
15
15
|
import '../chunk-XGCXFX7X.js';
|
|
16
16
|
import '../chunk-O4JH3KUE.js';
|
|
17
17
|
import '../chunk-K5GBV4SA.js';
|
|
@@ -10,6 +10,8 @@ import type { CatalogEntry } from "@skaile/workspaces/core";
|
|
|
10
10
|
import type { TelemetryProvider, Trace } from "@skaile/workspaces/telemetry";
|
|
11
11
|
import type { ConnectorStatusEvent } from "@skaile/workspaces/types";
|
|
12
12
|
import type { Connector, ConnectorChangeEvent, ConnectorDeclaration, ConnectorHandle, ConnectorStartupReport, RuntimeSkillDescriptor, TokenMediator } from "./connector-types.js";
|
|
13
|
+
import { FleetHealthGate } from "./fleet-health-gate.js";
|
|
14
|
+
import { type FleetHealthVerdict } from "./fleet-utils.js";
|
|
13
15
|
import { type MountPlaceholderBarrier } from "./mount-placeholder.js";
|
|
14
16
|
import type { PreMintedSecretProvider, SecretProvider, SecretProviderChain } from "./secrets.js";
|
|
15
17
|
import type { ConnectorContent, ConnectorEntry, ListOptions, OperationDescriptor, SearchOptions, SearchResult, SyncOptions, SyncResult, WatchHandle, WatchOptions } from "./shared-types.js";
|
|
@@ -27,6 +29,14 @@ interface ActiveConnector {
|
|
|
27
29
|
* when the connector is disconnected.
|
|
28
30
|
*/
|
|
29
31
|
placeholderTarget?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Set for a fleet-managed deferred mount. Unlike `placeholderTarget` (a static
|
|
34
|
+
* boot-time barrier), this gate dynamically establishes/removes the barrier as
|
|
35
|
+
* the fleet mount's health flips — closing the window where a wedged fleet
|
|
36
|
+
* mount stays writable. Removed on teardown after the connector is gone.
|
|
37
|
+
*/
|
|
38
|
+
fleetHealthTarget?: string;
|
|
39
|
+
fleetHealthGate?: FleetHealthGate;
|
|
30
40
|
}
|
|
31
41
|
interface LifecycleResult {
|
|
32
42
|
id: string;
|
|
@@ -39,6 +49,14 @@ export interface SyncConnectorResult {
|
|
|
39
49
|
ok: boolean;
|
|
40
50
|
error?: string;
|
|
41
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the local fleet-health probe interval from `SKAILE_FLEET_HEALTH_POLL_MS`.
|
|
54
|
+
* A finite non-negative number is honoured (`0` disables the probe). Anything
|
|
55
|
+
* unparseable (`Number("disabled") → NaN`) or negative falls back to the default,
|
|
56
|
+
* so an invalid value never produces a `NaN` interval — `setInterval(fn, NaN)` is
|
|
57
|
+
* treated as `setInterval(fn, 0)` and would saturate the event loop.
|
|
58
|
+
*/
|
|
59
|
+
export declare function parseFleetHealthPollMs(raw?: string | undefined): number;
|
|
42
60
|
/**
|
|
43
61
|
* Options for the unified `ConnectorManager`. Pass as the second argument to the constructor.
|
|
44
62
|
*
|
|
@@ -84,6 +102,14 @@ export interface ConnectorManagerOptions {
|
|
|
84
102
|
* tests inject a hermetic implementation. See `mount-placeholder.ts`.
|
|
85
103
|
*/
|
|
86
104
|
placeholderBarrier?: MountPlaceholderBarrier;
|
|
105
|
+
/**
|
|
106
|
+
* Local fleet-health poll interval (ms) for the read-only health gate on
|
|
107
|
+
* fleet-managed mounts. `0` disables the local probe (health is then driven
|
|
108
|
+
* solely by `reportFleetHealth` / the platform signal). Defaults to the
|
|
109
|
+
* `SKAILE_FLEET_HEALTH_POLL_MS` env var, else 5000. Tests pass a small value
|
|
110
|
+
* (or 0 + manual `reportFleetHealth`) to stay hermetic.
|
|
111
|
+
*/
|
|
112
|
+
fleetHealthPollMs?: number;
|
|
87
113
|
}
|
|
88
114
|
/**
|
|
89
115
|
* `ConnectorManager` — manages the full lifecycle of all connectors declared
|
|
@@ -112,6 +138,10 @@ export declare class ConnectorManager {
|
|
|
112
138
|
private readonly disposeController;
|
|
113
139
|
/** Tracks the background task driving deferred (rclone-backed) mounts. */
|
|
114
140
|
private deferredConnect?;
|
|
141
|
+
/** Periodic local fleet-health probe; runs only while a fleet gate is active. */
|
|
142
|
+
private fleetHealthTimer?;
|
|
143
|
+
/** Local fleet-health poll interval (ms). 0 disables the local probe. */
|
|
144
|
+
private readonly fleetHealthPollMs;
|
|
115
145
|
/**
|
|
116
146
|
* @param workspaceDir - Absolute (or relative) working directory. Filesystem-face
|
|
117
147
|
* connectors mount into `<workspaceDir>/.mounts/<id>/` by default.
|
|
@@ -197,11 +227,34 @@ export declare class ConnectorManager {
|
|
|
197
227
|
* prompt before the background mount completes.
|
|
198
228
|
*
|
|
199
229
|
* Before exposing the target, a read-only barrier is established so the agent
|
|
200
|
-
* cannot write a phantom workspace into a not-yet-mounted remote.
|
|
201
|
-
*
|
|
202
|
-
*
|
|
230
|
+
* cannot write a phantom workspace into a not-yet-mounted remote.
|
|
231
|
+
*
|
|
232
|
+
* Fleet-managed mounts skip the *static* boot-time barrier (the host already
|
|
233
|
+
* bound the live share at the target — a static barrier would shadow real
|
|
234
|
+
* content) but instead get a *dynamic* health gate: while the host fleet rclone
|
|
235
|
+
* is healthy the target stays writable exactly as before; when it wedges, the
|
|
236
|
+
* gate establishes the same read-only barrier until the mount recovers.
|
|
203
237
|
*/
|
|
204
238
|
private preRegisterDeferred;
|
|
239
|
+
/**
|
|
240
|
+
* Start the periodic local fleet-health probe if it is not already running and
|
|
241
|
+
* the poll interval is enabled. Each tick `stat`+`readdir`s every fleet target
|
|
242
|
+
* and feeds the verdict to its gate (hysteresis lives in the gate). The probe
|
|
243
|
+
* only catches directly-detectable failures (EIO / dead bind); silent
|
|
244
|
+
* degradation is covered by the platform signal via `reportFleetHealth`.
|
|
245
|
+
*/
|
|
246
|
+
private ensureFleetHealthPoll;
|
|
247
|
+
private runFleetHealthProbe;
|
|
248
|
+
/**
|
|
249
|
+
* Feed an externally-derived fleet-health verdict for a connector into its gate.
|
|
250
|
+
*
|
|
251
|
+
* This is the consume side of the platform fleet-health signal: the host fleet
|
|
252
|
+
* health poll knows `core/stats.errors` and can detect a *silently-empty-but-
|
|
253
|
+
* writable* degraded mount that the local probe cannot. The runner watches the
|
|
254
|
+
* `<workspace>/.skaile/fleet-health/<connectorId>` flag and forwards its verdict
|
|
255
|
+
* here. Unknown / non-fleet ids are ignored.
|
|
256
|
+
*/
|
|
257
|
+
reportFleetHealth(connectorId: string, verdict: FleetHealthVerdict): Promise<void>;
|
|
205
258
|
/** Drive all deferred mounts concurrently; resolves when every one settles. */
|
|
206
259
|
private connectDeferred;
|
|
207
260
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector-manager.d.ts","sourceRoot":"","sources":["../../../connectors/src/connector-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAU,MAAM,0BAA0B,CAAC;AAG7E,OAAO,KAAK,EAEV,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EAEpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EAEd,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"connector-manager.d.ts","sourceRoot":"","sources":["../../../connectors/src/connector-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAU,MAAM,0BAA0B,CAAC;AAG7E,OAAO,KAAK,EAEV,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EAEpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EAEd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,kBAAkB,EAAoC,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,KA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Aa,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAmBzF;;;;;OAKG;IACG,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IA4B9F;;;OAGG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,EAAE;IAOhD;;;OAGG;IACH,UAAU,IAAI,sBAAsB,EAAE;IAStC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,UAAO,GAAG,MAAM;CAUlD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FleetHealthGate — health-aware read-only gating for a single fleet-managed mount.
|
|
3
|
+
*
|
|
4
|
+
* Why this exists: a fleet-managed mount is bound live by the host fleet rclone,
|
|
5
|
+
* so it is excluded from the boot-time no-phantom-workspace barrier (the host
|
|
6
|
+
* already put real content at the target — a static barrier would shadow it).
|
|
7
|
+
* That exclusion is only safe while the fleet rclone is healthy. When it wedges —
|
|
8
|
+
* returning `EIO`, or degrading to an empty-but-writable view — the agent cannot
|
|
9
|
+
* tell "empty because broken" from "empty workspace" and writes a phantom
|
|
10
|
+
* workspace that diverges from the remote (the 2026-06-04 incident, except fleet
|
|
11
|
+
* mounts sit outside the barrier).
|
|
12
|
+
*
|
|
13
|
+
* This gate closes that window. It dynamically drives a `MountPlaceholderBarrier`
|
|
14
|
+
* over the *live* fleet target:
|
|
15
|
+
* - gate = `establish(target)` — read-only tmpfs shadows the bind, blocking
|
|
16
|
+
* writes for every uid (the agent runs as uid 1001 and could chmod a
|
|
17
|
+
* bit back; a `ro` mount it cannot).
|
|
18
|
+
* - ungate = `remove(target)` — unmounts the tmpfs, restoring the live bind.
|
|
19
|
+
*
|
|
20
|
+
* Invariants:
|
|
21
|
+
* - FAIL-CLOSED: if `establish` throws, the mount is treated as gated. A known-
|
|
22
|
+
* unhealthy fleet mount is never left writable.
|
|
23
|
+
* - HYSTERESIS: gate trips only after `unhealthyThreshold` consecutive unhealthy
|
|
24
|
+
* observations and lifts only after `healthyThreshold` consecutive healthy
|
|
25
|
+
* ones, so a single transient stat blip does not flap `ro ↔ rw`.
|
|
26
|
+
* - IDEMPOTENT: establish/remove fire only on an actual state change, so steady-
|
|
27
|
+
* state polling does no mount work.
|
|
28
|
+
*/
|
|
29
|
+
import type { Logger } from "@skaile/workspaces/types";
|
|
30
|
+
import type { FleetHealthVerdict } from "./fleet-utils.js";
|
|
31
|
+
import type { MountPlaceholderBarrier } from "./mount-placeholder.js";
|
|
32
|
+
export interface FleetHealthGateOptions {
|
|
33
|
+
/** Consecutive unhealthy observations required to gate (default 2). */
|
|
34
|
+
unhealthyThreshold?: number;
|
|
35
|
+
/** Consecutive healthy observations required to ungate (default 2). */
|
|
36
|
+
healthyThreshold?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Per-target health gate. Construct one per fleet-managed mount target; feed it
|
|
40
|
+
* verdicts via `observe()`; tear it down with `dispose()` (removes the gate if
|
|
41
|
+
* currently established, so teardown leaves nothing un-writable that should not
|
|
42
|
+
* be — caller controls ordering relative to connector disconnect).
|
|
43
|
+
*/
|
|
44
|
+
export declare class FleetHealthGate {
|
|
45
|
+
private readonly target;
|
|
46
|
+
private readonly barrier;
|
|
47
|
+
private readonly log?;
|
|
48
|
+
private readonly unhealthyThreshold;
|
|
49
|
+
private readonly healthyThreshold;
|
|
50
|
+
/** True while the read-only barrier is established over the target. */
|
|
51
|
+
private gated;
|
|
52
|
+
/**
|
|
53
|
+
* The gate state that the most recently *enqueued* transition will settle on.
|
|
54
|
+
* Hysteresis is measured against this, not `gated`, so that verdicts arriving
|
|
55
|
+
* while a (slow, async) establish/remove is still in flight are counted toward
|
|
56
|
+
* the post-transition state rather than the stale pre-transition one. Without
|
|
57
|
+
* this, fast healthy verdicts arriving during a slow `establish()` could meet
|
|
58
|
+
* `healthyThreshold` before the gate finished tripping, ungating it on the
|
|
59
|
+
* first healthy verdict afterwards and defeating the threshold.
|
|
60
|
+
*/
|
|
61
|
+
private pendingGated;
|
|
62
|
+
/** Consecutive same-verdict run length, signed by the *current* run's verdict. */
|
|
63
|
+
private unhealthyRun;
|
|
64
|
+
private healthyRun;
|
|
65
|
+
/** Serialises establish/remove so overlapping observe() calls can't race. */
|
|
66
|
+
private transition;
|
|
67
|
+
constructor(target: string, barrier: MountPlaceholderBarrier, log?: Logger | undefined, opts?: FleetHealthGateOptions);
|
|
68
|
+
/** True while the read-only barrier is established (test/observability hook). */
|
|
69
|
+
get isGated(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Feed one health verdict. Applies hysteresis, then establishes or removes the
|
|
72
|
+
* barrier on a state change. Resolves once the (possibly no-op) transition is
|
|
73
|
+
* applied. Never throws — a failed establish is treated as gated (fail-closed).
|
|
74
|
+
*/
|
|
75
|
+
observe(verdict: FleetHealthVerdict): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Tear the gate down. If currently gated, removes the barrier so a leftover
|
|
78
|
+
* read-only tmpfs is not leaked. Call only after the connector above the target
|
|
79
|
+
* is disconnected (top-down, no leaked mount).
|
|
80
|
+
*/
|
|
81
|
+
dispose(): Promise<void>;
|
|
82
|
+
private enqueue;
|
|
83
|
+
private gate;
|
|
84
|
+
private ungate;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=fleet-health-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet-health-gate.d.ts","sourceRoot":"","sources":["../../../connectors/src/fleet-health-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,WAAW,sBAAsB;IACrC,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,qBAAa,eAAe;IAuBxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;IAxBvB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAC5C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAE1C,uEAAuE;IACvE,OAAO,CAAC,KAAK,CAAS;IACtB;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY,CAAS;IAC7B,kFAAkF;IAClF,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAAK;IACvB,6EAA6E;IAC7E,OAAO,CAAC,UAAU,CAAoC;gBAGnC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,EAChC,GAAG,CAAC,EAAE,MAAM,YAAA,EAC7B,IAAI,CAAC,EAAE,sBAAsB;IAM/B,iFAAiF;IACjF,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBnD;;;;OAIG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAUxB,OAAO,CAAC,OAAO;YAKD,IAAI;YAwBJ,MAAM;CAkBrB"}
|
|
@@ -29,4 +29,20 @@ export declare function ensureFleetMounted(dir: string, log: {
|
|
|
29
29
|
timeoutMs?: number;
|
|
30
30
|
pollIntervalMs?: number;
|
|
31
31
|
}): Promise<void>;
|
|
32
|
+
/** Local health verdict for a fleet mount target. */
|
|
33
|
+
export type FleetHealthVerdict = "healthy" | "error";
|
|
34
|
+
/**
|
|
35
|
+
* Locally probe a fleet mount target's health without any host signal.
|
|
36
|
+
*
|
|
37
|
+
* `stat` + `readdir` directly surface a wedged FUSE bind: `EIO`, `ENOTCONN`
|
|
38
|
+
* ("transport endpoint not connected" — the host rclone died after bind), or a
|
|
39
|
+
* non-directory target all read as `"error"`. This catches the directly-
|
|
40
|
+
* detectable degradation (the Getec / EIO case) entirely in-container.
|
|
41
|
+
*
|
|
42
|
+
* It does NOT catch a *silently-empty-but-writable* degraded mount — an empty
|
|
43
|
+
* `readdir` is indistinguishable from a legitimately empty workspace, so that
|
|
44
|
+
* case is left to the platform health signal (`reportFleetHealth`). A `"healthy"`
|
|
45
|
+
* verdict here therefore means only "readable", not "has content".
|
|
46
|
+
*/
|
|
47
|
+
export declare function probeFleetHealth(dir: string): Promise<FleetHealthVerdict>;
|
|
32
48
|
//# sourceMappingURL=fleet-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet-utils.d.ts","sourceRoot":"","sources":["../../../connectors/src/fleet-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAQ3D;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,EACnD,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,GACxD,OAAO,CAAC,IAAI,CAAC,CAwBf"}
|
|
1
|
+
{"version":3,"file":"fleet-utils.d.ts","sourceRoot":"","sources":["../../../connectors/src/fleet-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAQ3D;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,EACnD,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,GACxD,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,qDAAqD;AACrD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAS/E"}
|
|
@@ -27,7 +27,10 @@ export type { ConnectContext, Connector, ConnectorChangeEvent, ConnectorDeclarat
|
|
|
27
27
|
export { ConnectorFieldMissingError, ConnectorStartupError } from "./connector-types.js";
|
|
28
28
|
export type { RenderHelperOpts } from "./credential-helper-script.js";
|
|
29
29
|
export { renderCredentialHelperScript } from "./credential-helper-script.js";
|
|
30
|
-
export {
|
|
30
|
+
export type { FleetHealthGateOptions } from "./fleet-health-gate.js";
|
|
31
|
+
export { FleetHealthGate } from "./fleet-health-gate.js";
|
|
32
|
+
export type { FleetHealthVerdict } from "./fleet-utils.js";
|
|
33
|
+
export { ensureFleetMounted, isFleetManaged, probeFleetHealth } from "./fleet-utils.js";
|
|
31
34
|
export { ensureDirMode } from "./fs-utils.js";
|
|
32
35
|
export { LogBuffer } from "./log-buffer.js";
|
|
33
36
|
export type { AtomicReplaceCredentialOptions, RemoveMountBlockOptions, WriteMountBlockOptions, } from "./managed-gitconfig.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../connectors/src/index.ts"],"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B,EACnC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,GACnC,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -45,6 +45,12 @@ export interface MountPlaceholderBarrier {
|
|
|
45
45
|
}
|
|
46
46
|
/** Runs an external command, rejecting on non-zero exit or spawn error. */
|
|
47
47
|
export type CommandRunner = (cmd: string, args: string[]) => Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates the target directory. Injectable so tests can simulate a live/broken
|
|
50
|
+
* FUSE mountpoint (EEXIST / ENOTCONN) deterministically; defaults to a recursive
|
|
51
|
+
* `mkdir`.
|
|
52
|
+
*/
|
|
53
|
+
export type MkdirFn = (target: string) => Promise<void>;
|
|
48
54
|
/**
|
|
49
55
|
* Default barrier: a read-only tmpfs over the target, with a `chmod 0o555`
|
|
50
56
|
* fallback when mounting is unavailable. The tmpfs root is left mode 0o755
|
|
@@ -54,9 +60,11 @@ export type CommandRunner = (cmd: string, args: string[]) => Promise<void>;
|
|
|
54
60
|
*/
|
|
55
61
|
export declare class RoMountPlaceholderBarrier implements MountPlaceholderBarrier {
|
|
56
62
|
private readonly run;
|
|
63
|
+
private readonly mkdirFn;
|
|
57
64
|
private readonly modes;
|
|
58
65
|
constructor(opts?: {
|
|
59
66
|
run?: CommandRunner;
|
|
67
|
+
mkdirFn?: MkdirFn;
|
|
60
68
|
});
|
|
61
69
|
establish(target: string, log?: Logger): Promise<void>;
|
|
62
70
|
onMountLive(target: string, log?: Logger): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount-placeholder.d.ts","sourceRoot":"","sources":["../../../connectors/src/mount-placeholder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"mount-placeholder.d.ts","sourceRoot":"","sources":["../../../connectors/src/mount-placeholder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AA2BhE;;;GAGG;AACH,MAAM,WAAW,uBA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eAAO,MAAM,8BAA8B,EAAE,uBACZ,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
2
|
-
export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-
|
|
3
|
-
export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeSkWorkspaceConfigs, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, writeLinks } from '../chunk-
|
|
4
|
-
export { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, encodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-
|
|
5
|
-
export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromMcpServerMd, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir } from '../chunk-
|
|
6
|
-
export { ASSET_KINDS, ASSET_NAME_HINT, INDIVIDUAL_KINDS, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw } from '../chunk-
|
|
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-2Q6OY3SU.js';
|
|
2
|
+
export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-5DPQ766L.js';
|
|
3
|
+
export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeSkWorkspaceConfigs, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, writeLinks } from '../chunk-56YT6CWS.js';
|
|
4
|
+
export { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, encodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-SAXDHVJZ.js';
|
|
5
|
+
export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromMcpServerMd, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir } from '../chunk-MAPRKFBD.js';
|
|
6
|
+
export { ASSET_KINDS, ASSET_NAME_HINT, INDIVIDUAL_KINDS, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw } from '../chunk-BM7XANVN.js';
|
|
7
7
|
export { deployedBase, deployedDir, isDeployed } from '../chunk-XGCXFX7X.js';
|
|
8
8
|
export { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS } from '../chunk-O4JH3KUE.js';
|
|
9
9
|
export { DRIVER_DEFAULTS, resolveDriverPaths } from '../chunk-K5GBV4SA.js';
|
package/dist/core/manifest.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromKnowledgeYaml, fromMcpServerMd, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromKnowledgeYaml, fromMcpServerMd, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir } from '../chunk-MAPRKFBD.js';
|
|
2
|
+
import '../chunk-BM7XANVN.js';
|
|
3
3
|
import '../chunk-NSBPE2FW.js';
|
|
4
4
|
//# sourceMappingURL=manifest.js.map
|
|
5
5
|
//# sourceMappingURL=manifest.js.map
|
package/dist/core/models.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ASSET_KINDS, ASSET_NAME_HINT, INDIVIDUAL_KINDS, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw } from '../chunk-
|
|
1
|
+
export { ASSET_KINDS, ASSET_NAME_HINT, INDIVIDUAL_KINDS, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw } from '../chunk-BM7XANVN.js';
|
|
2
2
|
import '../chunk-NSBPE2FW.js';
|
|
3
3
|
//# sourceMappingURL=models.js.map
|
|
4
4
|
//# sourceMappingURL=models.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, encodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, encodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-SAXDHVJZ.js';
|
|
2
|
+
import '../chunk-BM7XANVN.js';
|
|
3
3
|
import '../chunk-NSBPE2FW.js';
|
|
4
4
|
//# sourceMappingURL=publish-manifest.js.map
|
|
5
5
|
//# sourceMappingURL=publish-manifest.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-5DPQ766L.js';
|
|
2
|
+
import '../chunk-56YT6CWS.js';
|
|
3
|
+
import '../chunk-SAXDHVJZ.js';
|
|
4
|
+
import '../chunk-MAPRKFBD.js';
|
|
5
|
+
import '../chunk-BM7XANVN.js';
|
|
6
6
|
import '../chunk-NSBPE2FW.js';
|
|
7
7
|
//# sourceMappingURL=runtime-assets.js.map
|
|
8
8
|
//# sourceMappingURL=runtime-assets.js.map
|
package/dist/core/src/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export * from "./logging/index.js";
|
|
|
21
21
|
export type { FrontmatterResult } from "./manifest.js";
|
|
22
22
|
export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromMcpServerMd, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir, } from "./manifest.js";
|
|
23
23
|
export { ManifestYamlEditor } from "./manifest-yaml-editor.js";
|
|
24
|
-
export type { AgentManifest, AssetKind, AssetRef, CatalogEntry, Dependency, LockEntry, LockFile, LockFileEntry, LockPluginEntry, LockSourceEntry, Repository, } from "./models.js";
|
|
24
|
+
export type { AgentManifest, AssetKind, AssetRef, CatalogDomain, CatalogEntry, Dependency, DomainRelation, LockEntry, LockFile, LockFileEntry, LockPluginEntry, LockSourceEntry, Repository, } from "./models.js";
|
|
25
25
|
export { ASSET_KINDS, ASSET_NAME_HINT, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, INDIVIDUAL_KINDS, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw, } from "./models.js";
|
|
26
26
|
export { applyPatch, extractForPatch, generatePatch, listPatches, readPatch, savePatch, } from "./patch.js";
|
|
27
27
|
export type { AssetEntry, ManifestDecodeResult, ManifestFileEntry, ManifestProvenance, ManifestSource, SkPublishManifest, } from "./publish-manifest.js";
|