@stigmer/plugin-package 3.17.0 → 3.18.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.
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The sources every client lists without being told: Stigmer's official
3
+ * catalogue and the three vendors' public ones.
4
+ *
5
+ * The product's promise is "bring your Cursor, Claude Code or Codex
6
+ * plugin", so the catalogues those vendors publish are on offer from the
7
+ * first screen, in the console's Marketplace and in `stigmer marketplace
8
+ * list`, without a user having to know a repository slug. They are code,
9
+ * not stored state: a client's remembered sources hold only what the user
10
+ * added, so the two clients cannot drift from each other and a vendor
11
+ * moving its repository is one release, not a migration. The names are
12
+ * reserved the way the official one is; a user can neither add nor remove
13
+ * them.
14
+ *
15
+ * Each vendor keeps its marketplace file at the repository root in its own
16
+ * location, all four of which `readMarketplace` reads (`.cursor-plugin/`,
17
+ * `.claude-plugin/`, `.agents/plugins/`). Measured on 2026-09-18 through
18
+ * the GitHub Trees API: 1,168, 1,594 and 7,746 entries respectively, none
19
+ * truncated, all under the console's 20,000-entry listing cap; Codex's
20
+ * catalogue names its entries as `{source: "local", path}` objects, which
21
+ * the reader accepts, and three of its 65 as remote sources, which it
22
+ * drops with its own sentence.
23
+ */
24
+ import type { GitHubMarketplaceSource } from "./refs.js";
25
+ /** A source a client ships with: named, described for a section heading, and either the official catalogue or a public GitHub tree. */
26
+ export interface BuiltInMarketplace {
27
+ readonly name: string;
28
+ /** One sentence for the Marketplace's section heading and `marketplace list`. */
29
+ readonly description: string;
30
+ readonly source: {
31
+ readonly type: "official";
32
+ } | GitHubMarketplaceSource;
33
+ }
34
+ /** In listing order: the official catalogue first, then the vendors in the order the product names them. */
35
+ export declare const BUILT_IN_MARKETPLACES: readonly BuiltInMarketplace[];
36
+ /** Whether `name` is one a user may neither add nor remove. */
37
+ export declare function isBuiltInMarketplaceName(name: string): boolean;
38
+ /** The one sentence every client refuses with when a user tries to add over or remove a built-in source. */
39
+ export declare function builtInSourceRefusal(name: string, act: "add" | "remove"): string;
40
+ //# sourceMappingURL=builtin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin.d.ts","sourceRoot":"","sources":["../../src/client/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAGzD,uIAAuI;AACvI,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;KAAE,GAAG,uBAAuB,CAAC;CAC1E;AAED,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAqB9D,CAAC;AAIF,+DAA+D;AAC/D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,4GAA4G;AAC5G,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAWhF"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The sources every client lists without being told: Stigmer's official
3
+ * catalogue and the three vendors' public ones.
4
+ *
5
+ * The product's promise is "bring your Cursor, Claude Code or Codex
6
+ * plugin", so the catalogues those vendors publish are on offer from the
7
+ * first screen, in the console's Marketplace and in `stigmer marketplace
8
+ * list`, without a user having to know a repository slug. They are code,
9
+ * not stored state: a client's remembered sources hold only what the user
10
+ * added, so the two clients cannot drift from each other and a vendor
11
+ * moving its repository is one release, not a migration. The names are
12
+ * reserved the way the official one is; a user can neither add nor remove
13
+ * them.
14
+ *
15
+ * Each vendor keeps its marketplace file at the repository root in its own
16
+ * location, all four of which `readMarketplace` reads (`.cursor-plugin/`,
17
+ * `.claude-plugin/`, `.agents/plugins/`). Measured on 2026-09-18 through
18
+ * the GitHub Trees API: 1,168, 1,594 and 7,746 entries respectively, none
19
+ * truncated, all under the console's 20,000-entry listing cap; Codex's
20
+ * catalogue names its entries as `{source: "local", path}` objects, which
21
+ * the reader accepts, and three of its 65 as remote sources, which it
22
+ * drops with its own sentence.
23
+ */
24
+ import { OFFICIAL_MARKETPLACE_NAME } from "./refs.js";
25
+ /** In listing order: the official catalogue first, then the vendors in the order the product names them. */
26
+ export const BUILT_IN_MARKETPLACES = [
27
+ {
28
+ name: OFFICIAL_MARKETPLACE_NAME,
29
+ description: "Stigmer's official catalogue, published with each release.",
30
+ source: { type: "official" },
31
+ },
32
+ {
33
+ name: "cursor-plugins",
34
+ description: "Cursor's public plugin catalogue.",
35
+ source: { type: "github", repo: "cursor/plugins" },
36
+ },
37
+ {
38
+ name: "claude-code-plugins",
39
+ description: "Claude Code's public plugin catalogue.",
40
+ source: { type: "github", repo: "anthropics/claude-code" },
41
+ },
42
+ {
43
+ name: "codex-plugins",
44
+ description: "Codex's public plugin catalogue.",
45
+ source: { type: "github", repo: "openai/plugins" },
46
+ },
47
+ ];
48
+ const BUILT_IN_NAMES = new Set(BUILT_IN_MARKETPLACES.map((entry) => entry.name));
49
+ /** Whether `name` is one a user may neither add nor remove. */
50
+ export function isBuiltInMarketplaceName(name) {
51
+ return BUILT_IN_NAMES.has(name);
52
+ }
53
+ /** The one sentence every client refuses with when a user tries to add over or remove a built-in source. */
54
+ export function builtInSourceRefusal(name, act) {
55
+ switch (act) {
56
+ case "add":
57
+ return `'${name}' is a built-in source and cannot be added or replaced; choose another name`;
58
+ case "remove":
59
+ return `'${name}' is a built-in source and cannot be removed`;
60
+ default: {
61
+ const exhaustive = act;
62
+ return exhaustive;
63
+ }
64
+ }
65
+ }
66
+ //# sourceMappingURL=builtin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../src/client/builtin.ts"],"names":[],"mappings":"AAAA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U,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * The preparation every client runs once it holds a tree: select the files
3
+ * a push carries, read the package and refuse what the reader refuses,
4
+ * archive, digest.
5
+ *
6
+ * Three clients arrive here with three kinds of tree: the CLI with a
7
+ * directory on disk, the console with a marketplace host's file listing,
8
+ * and the console again with a folder or a zip the user picked. What they
9
+ * do after selection is identical, and it is where the plugin's identity
10
+ * is made (the archive's bytes are `status.digest`), so it is written once.
11
+ * A parity test proves that one function reached three ways yields one
12
+ * digest for one tree; before this module each client carried its own copy
13
+ * of the chain and the test proved a coincidence.
14
+ *
15
+ * `preparePluginFromTree` is the lazy form for a tree whose bytes cost
16
+ * something to obtain (a fetch per file, a `File.arrayBuffer()`): it reads
17
+ * the two root ignore files, selects, refuses an over-cap selection before
18
+ * another byte moves, then reads only the files the archive will carry. A
19
+ * plugin folder holding a `node_modules/` costs its ignore file and its
20
+ * manifest, wherever the tree lives. The CLI keeps its own walk (a
21
+ * filesystem lets it skip a directory before listing it, which a flat tree
22
+ * cannot) and joins at `preparePluginArchive`.
23
+ *
24
+ * Refusals are returned, not thrown: each client renders the reader's
25
+ * findings in its own voice (the CLI's `pluginRefusal`, the console's
26
+ * `PluginReadRefusal`) and adds its own provenance around the result.
27
+ */
28
+ import type { PluginFiles } from "../files.js";
29
+ import type { PluginFinding } from "../outcome.js";
30
+ import type { PluginPackage } from "../types.js";
31
+ import { type CandidateFile, type SelectPluginFilesOptions, type SelectionStats } from "./select.js";
32
+ /** What a client holds after preparation: the package as read, the bytes a push sends, and their identity. */
33
+ export interface PreparedPlugin {
34
+ readonly plugin: PluginPackage;
35
+ readonly warnings: readonly PluginFinding[];
36
+ /** The selected files, for the client that lists them (`push --dry-run`). */
37
+ readonly files: PluginFiles;
38
+ readonly stats: SelectionStats;
39
+ /** The exact bytes a push sends. */
40
+ readonly archive: Uint8Array;
41
+ /**
42
+ * SHA-256 of `archive`, lowercase hex: the identity the server records as
43
+ * `status.digest` (its digest is over the bytes it receives, and these are
44
+ * those bytes), so a client knows "already installed" without pushing.
45
+ */
46
+ readonly digest: string;
47
+ }
48
+ /** What an already-selected tree can come to: a prepared plugin, or the reader's refusal. */
49
+ export type PrepareArchiveOutcome = {
50
+ readonly ok: true;
51
+ readonly prepared: PreparedPlugin;
52
+ }
53
+ /** The reader refused the package; `errors` are its sentences, as `stigmer validate -f` prints them. */
54
+ | {
55
+ readonly ok: false;
56
+ readonly kind: "refused";
57
+ readonly errors: readonly PluginFinding[];
58
+ readonly warnings: readonly PluginFinding[];
59
+ };
60
+ /** What a lazily-read tree can come to: the above, or a refusal on size before its bytes were read. */
61
+ export type PreparePluginOutcome = PrepareArchiveOutcome
62
+ /** The selected files exceed the caller's `maxBytes`; nothing beyond the ignore files was read. */
63
+ | {
64
+ readonly ok: false;
65
+ readonly kind: "too-large";
66
+ readonly selectedBytes: number;
67
+ readonly maxBytes: number;
68
+ };
69
+ /** A tree the client can list now and read later: a candidate with the promise of its bytes. */
70
+ export interface LazyCandidate extends CandidateFile {
71
+ read(): Promise<Uint8Array>;
72
+ }
73
+ export interface PrepareFromTreeOptions extends SelectPluginFilesOptions {
74
+ /**
75
+ * The most bytes the SELECTED files may total, refused before they are
76
+ * read. A client states its own budget (the console's is the archive cap
77
+ * a browser will hold in memory); omitted, nothing is refused here and
78
+ * the server's zip gate is the only limit.
79
+ */
80
+ readonly maxBytes?: number;
81
+ }
82
+ /**
83
+ * Read, refuse, archive and digest an already-selected tree. `selection`
84
+ * is what `selectPluginFiles` returns or what the CLI's walk builds in the
85
+ * same shape; its `files.read` must answer synchronously for every listed
86
+ * entry by now.
87
+ */
88
+ export declare function preparePluginArchive(selection: {
89
+ readonly files: PluginFiles;
90
+ readonly stats: SelectionStats;
91
+ }): Promise<PrepareArchiveOutcome>;
92
+ /**
93
+ * Prepare a tree whose bytes are obtained on demand. A byte is read only
94
+ * for a file that will be in the archive (plus the two root ignore files
95
+ * that decide which those are), and an over-cap selection is refused
96
+ * before any of them.
97
+ */
98
+ export declare function preparePluginFromTree(candidates: readonly LazyCandidate[], options: PrepareFromTreeOptions): Promise<PreparePluginOutcome>;
99
+ //# sourceMappingURL=prepare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../src/client/prepare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAGpB,MAAM,aAAa,CAAC;AAErB,8GAA8G;AAC9G,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,oCAAoC;IACpC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,6FAA6F;AAC7F,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;CAAE;AAC1D,wGAAwG;GACtG;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;CAC7C,CAAC;AAEN,uGAAuG;AACvG,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB;AACvB,mGAAmG;GACjG;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAElH,gGAAgG;AAChG,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAuB,SAAQ,wBAAwB;IACtE;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,SAAS,EAAE;IACpD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAiBjC;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,SAAS,aAAa,EAAE,EACpC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAgC/B"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * The preparation every client runs once it holds a tree: select the files
3
+ * a push carries, read the package and refuse what the reader refuses,
4
+ * archive, digest.
5
+ *
6
+ * Three clients arrive here with three kinds of tree: the CLI with a
7
+ * directory on disk, the console with a marketplace host's file listing,
8
+ * and the console again with a folder or a zip the user picked. What they
9
+ * do after selection is identical, and it is where the plugin's identity
10
+ * is made (the archive's bytes are `status.digest`), so it is written once.
11
+ * A parity test proves that one function reached three ways yields one
12
+ * digest for one tree; before this module each client carried its own copy
13
+ * of the chain and the test proved a coincidence.
14
+ *
15
+ * `preparePluginFromTree` is the lazy form for a tree whose bytes cost
16
+ * something to obtain (a fetch per file, a `File.arrayBuffer()`): it reads
17
+ * the two root ignore files, selects, refuses an over-cap selection before
18
+ * another byte moves, then reads only the files the archive will carry. A
19
+ * plugin folder holding a `node_modules/` costs its ignore file and its
20
+ * manifest, wherever the tree lives. The CLI keeps its own walk (a
21
+ * filesystem lets it skip a directory before listing it, which a flat tree
22
+ * cannot) and joins at `preparePluginArchive`.
23
+ *
24
+ * Refusals are returned, not thrown: each client renders the reader's
25
+ * findings in its own voice (the CLI's `pluginRefusal`, the console's
26
+ * `PluginReadRefusal`) and adds its own provenance around the result.
27
+ */
28
+ import { readPluginPackage } from "../read-plugin-package.js";
29
+ import { archivePlugin, digestArchive } from "./archive.js";
30
+ import { IGNORE_FILE_NAMES, selectPluginFiles, } from "./select.js";
31
+ /**
32
+ * Read, refuse, archive and digest an already-selected tree. `selection`
33
+ * is what `selectPluginFiles` returns or what the CLI's walk builds in the
34
+ * same shape; its `files.read` must answer synchronously for every listed
35
+ * entry by now.
36
+ */
37
+ export async function preparePluginArchive(selection) {
38
+ const outcome = readPluginPackage(selection.files);
39
+ if (!outcome.ok) {
40
+ return { ok: false, kind: "refused", errors: outcome.errors, warnings: outcome.warnings };
41
+ }
42
+ const archive = archivePlugin(selection.files);
43
+ return {
44
+ ok: true,
45
+ prepared: {
46
+ plugin: outcome.plugin,
47
+ warnings: outcome.warnings,
48
+ files: selection.files,
49
+ stats: selection.stats,
50
+ archive,
51
+ digest: await digestArchive(archive),
52
+ },
53
+ };
54
+ }
55
+ /**
56
+ * Prepare a tree whose bytes are obtained on demand. A byte is read only
57
+ * for a file that will be in the archive (plus the two root ignore files
58
+ * that decide which those are), and an over-cap selection is refused
59
+ * before any of them.
60
+ */
61
+ export async function preparePluginFromTree(candidates, options) {
62
+ const byPath = new Map(candidates.map((candidate) => [candidate.path, candidate]));
63
+ const contents = new Map();
64
+ const fetchInto = async (path) => {
65
+ const candidate = byPath.get(path);
66
+ if (candidate === undefined)
67
+ throw new Error(`plugin file '${path}' is not listed`);
68
+ contents.set(path, await candidate.read());
69
+ };
70
+ const read = (path) => {
71
+ const bytes = contents.get(path);
72
+ if (bytes === undefined)
73
+ throw new Error(`plugin file '${path}' was not read before selection asked for it`);
74
+ return bytes;
75
+ };
76
+ // Phase 1: only the two files that shape the selection.
77
+ await Promise.all([IGNORE_FILE_NAMES.gitignore, IGNORE_FILE_NAMES.stigmerignore]
78
+ .filter((name) => byPath.has(name))
79
+ .map((name) => fetchInto(name)));
80
+ const { maxBytes, ...selectOptions } = options;
81
+ const selection = selectPluginFiles(candidates, read, selectOptions);
82
+ if (maxBytes !== undefined && selection.stats.totalSize > maxBytes) {
83
+ return { ok: false, kind: "too-large", selectedBytes: selection.stats.totalSize, maxBytes };
84
+ }
85
+ // Phase 2: exactly the files the archive carries.
86
+ await Promise.all(selection.files.entries.filter((entry) => !contents.has(entry.path)).map((entry) => fetchInto(entry.path)));
87
+ return preparePluginArchive(selection);
88
+ }
89
+ //# sourceMappingURL=prepare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../src/client/prepare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAIL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAmDrB;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,SAG1C;IACC,MAAM,OAAO,GAAG,iBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnD,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QAChB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OA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8CAA8C,CAAC,CAAC;QAC7G,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,wDAAwD;IACxD,MAAM,OAAO,CAAC,GAAG,CACf,CAAC,iBAAiB,CAAC,SAAS,EAAE,iBAAiB,CAAC,aAAa,CAAC;SAC3D,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAClC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAClC,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC;IAC/C,MAAM,SAAS,GAAG,iBAAiB,CAAC,UAAU,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;IAErE,IAAI,QAAQ,KAAK,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,EAAE,CAAC;QACnE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC;IAC9F,CAAC;IAED,kDAAkD;IAClD,MAAM,OAAO,CAAC,GAAG,CACf,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAC3G,CAAC;IACF,OAAO,oBAAoB,CAAC,SAAS,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Whether a version string names a release the lockstep publish covers.
3
+ *
4
+ * The official catalogue (`@stigmer/plugins`) and the runtime packages are
5
+ * published at every release version and at every pre-release the release
6
+ * lane cuts (`X.Y.Z-rc.1` under the `next` tag), never for a source build
7
+ * (`dev`, `0.0.0-dev`) or a dev-channel stamp (`X.Y.Z-dev.<stamp>`). Two
8
+ * clients used to answer this with two different tests: the console
9
+ * accepted only `X.Y.Z` and called an `rc` server a development build; the
10
+ * CLI accepted anything without `-dev` and would have tried to acquire
11
+ * packages for the bare `dev` an unbundled server reports. One predicate,
12
+ * five cases pinned, no third opinion.
13
+ */
14
+ /** True for `3.17.0` and `3.17.0-rc.1`; false for `dev`, `0.0.0-dev` and `3.17.0-dev.20260918120000`. */
15
+ export declare function isReleaseVersion(version: string): boolean;
16
+ //# sourceMappingURL=release.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/client/release.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,yGAAyG;AACzG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Whether a version string names a release the lockstep publish covers.
3
+ *
4
+ * The official catalogue (`@stigmer/plugins`) and the runtime packages are
5
+ * published at every release version and at every pre-release the release
6
+ * lane cuts (`X.Y.Z-rc.1` under the `next` tag), never for a source build
7
+ * (`dev`, `0.0.0-dev`) or a dev-channel stamp (`X.Y.Z-dev.<stamp>`). Two
8
+ * clients used to answer this with two different tests: the console
9
+ * accepted only `X.Y.Z` and called an `rc` server a development build; the
10
+ * CLI accepted anything without `-dev` and would have tried to acquire
11
+ * packages for the bare `dev` an unbundled server reports. One predicate,
12
+ * five cases pinned, no third opinion.
13
+ */
14
+ /**
15
+ * A semver core, optionally followed by a pre-release whose first
16
+ * identifier is not `dev`. Build metadata (`+…`) is not accepted: nothing
17
+ * publishes with it.
18
+ */
19
+ const RELEASE_PATTERN = /^\d+\.\d+\.\d+(?:-(?!dev(?:[.-]|$))[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
20
+ /** True for `3.17.0` and `3.17.0-rc.1`; false for `dev`, `0.0.0-dev` and `3.17.0-dev.20260918120000`. */
21
+ export function isReleaseVersion(version) {
22
+ return RELEASE_PATTERN.test(version);
23
+ }
24
+ //# sourceMappingURL=release.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/client/release.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,eAAe,GAAG,yEAAyE,CAAC;AAElG,yGAAyG;AACzG,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The one directory a zipped folder wraps itself in, so the archive reads
3
+ * as the folder.
4
+ *
5
+ * `zip -r plugin.zip my-plugin/`, a Finder "Compress", and a browser's
6
+ * download of a repository all produce an archive whose every path begins
7
+ * with the folder's own name; the manifest a reader looks for at the root
8
+ * is then one level down. This decides, from the paths alone, whether that
9
+ * is the case: it is when every path shares exactly one leading directory
10
+ * and nothing sits beside it. A tree with a root file, or two top-level
11
+ * directories, is taken as it is; a reader that then finds no manifest says
12
+ * so in its own words.
13
+ *
14
+ * Pure over paths; the caller strips the prefix. Kept out of `select.ts`,
15
+ * which reasons about a tree that already has its root.
16
+ */
17
+ /** The shared leading directory of `paths`, or `null` when the tree is already rooted. */
18
+ export declare function rerootSingleDirectory(paths: readonly string[]): string | null;
19
+ /** `paths` with `prefix/` removed from each; the caller has established every path carries it. */
20
+ export declare function stripDirectoryPrefix(paths: readonly string[], prefix: string): string[];
21
+ //# sourceMappingURL=reroot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reroot.d.ts","sourceRoot":"","sources":["../../src/client/reroot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,0FAA0F;AAC1F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAU7E;AAED,kGAAkG;AAClG,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvF"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The one directory a zipped folder wraps itself in, so the archive reads
3
+ * as the folder.
4
+ *
5
+ * `zip -r plugin.zip my-plugin/`, a Finder "Compress", and a browser's
6
+ * download of a repository all produce an archive whose every path begins
7
+ * with the folder's own name; the manifest a reader looks for at the root
8
+ * is then one level down. This decides, from the paths alone, whether that
9
+ * is the case: it is when every path shares exactly one leading directory
10
+ * and nothing sits beside it. A tree with a root file, or two top-level
11
+ * directories, is taken as it is; a reader that then finds no manifest says
12
+ * so in its own words.
13
+ *
14
+ * Pure over paths; the caller strips the prefix. Kept out of `select.ts`,
15
+ * which reasons about a tree that already has its root.
16
+ */
17
+ /** The shared leading directory of `paths`, or `null` when the tree is already rooted. */
18
+ export function rerootSingleDirectory(paths) {
19
+ let prefix = null;
20
+ for (const path of paths) {
21
+ const slash = path.indexOf("/");
22
+ if (slash <= 0)
23
+ return null;
24
+ const head = path.slice(0, slash);
25
+ if (prefix === null)
26
+ prefix = head;
27
+ else if (prefix !== head)
28
+ return null;
29
+ }
30
+ return prefix;
31
+ }
32
+ /** `paths` with `prefix/` removed from each; the caller has established every path carries it. */
33
+ export function stripDirectoryPrefix(paths, prefix) {
34
+ const cut = prefix.length + 1;
35
+ return paths.map((path) => path.slice(cut));
36
+ }
37
+ //# sourceMappingURL=reroot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reroot.js","sourceRoot":"","sources":["../../src/client/reroot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,0FAA0F;AAC1F,MAAM,UAAU,qBAAqB,CAAC,KAAwB;IAC5D,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,KAAK,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,IAAI;YAAE,MAAM,GAAG,IAAI,CAAC;aAC9B,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;IACxC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,oBAAoB,CAAC,KAAwB,EAAE,MAAc;IAC3E,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9C,CAAC"}
package/client.d.ts CHANGED
@@ -15,13 +15,20 @@
15
15
  * order the CLI's original walk produced them;
16
16
  * - the archive and its digest (`archive.ts`): the deterministic zip and
17
17
  * the SHA-256 the server records;
18
+ * - the preparation (`prepare.ts`): select, read, refuse, archive, digest,
19
+ * once, for a tree on disk, on a host, or in a browser's memory;
18
20
  * - the grammars (`refs.ts`): an install ref and a GitHub marketplace
19
21
  * source, with their refusal sentences;
22
+ * - the built-in sources (`builtin.ts`): the official catalogue and the
23
+ * three vendors', listed by every client without configuration;
24
+ * - the release predicate (`release.ts`): which server versions the
25
+ * catalogue is published for;
26
+ * - the re-rooting rule (`reroot.ts`): a zipped folder reads as the folder;
20
27
  * - the vocabulary (`vocabulary.ts`): the labels both surfaces print.
21
28
  *
22
29
  * Nothing here touches the filesystem, the network or any `node:*` module.
23
- * A client's edge (a directory walk, a fetch) produces the candidates and
24
- * the bytes; this entry decides what becomes of them.
30
+ * A client's edge (a directory walk, a fetch, a file pick) produces the
31
+ * candidates and the bytes; this entry decides what becomes of them.
25
32
  */
26
33
  export { DEFAULT_PATTERNS } from "./client/ignore/defaults.js";
27
34
  export { matchName } from "./client/ignore/match.js";
@@ -29,6 +36,10 @@ export { type IgnoreSources, type MatchReason, Matcher, Reason, REASON_TEXT, SOU
29
36
  export { MatchResult, type Pattern, parsePattern } from "./client/ignore/pattern.js";
30
37
  export { type CandidateFile, type PluginSelection, type SelectPluginFilesOptions, type SelectionStats, IGNORE_FILE_NAMES, compareWalkOrder, selectPluginFiles, } from "./client/select.js";
31
38
  export { DETERMINISTIC_ZIP_MTIME, archivePlugin, digestArchive } from "./client/archive.js";
39
+ export { type LazyCandidate, type PrepareArchiveOutcome, type PrepareFromTreeOptions, type PreparePluginOutcome, type PreparedPlugin, preparePluginArchive, preparePluginFromTree, } from "./client/prepare.js";
40
+ export { type BuiltInMarketplace, BUILT_IN_MARKETPLACES, builtInSourceRefusal, isBuiltInMarketplaceName, } from "./client/builtin.js";
41
+ export { isReleaseVersion } from "./client/release.js";
42
+ export { rerootSingleDirectory, stripDirectoryPrefix } from "./client/reroot.js";
32
43
  export { type GitHubMarketplaceSource, type GitHubSourceOutcome, type InstallRef, type InstallRefOutcome, GITHUB_SOURCE_SHAPE, INSTALL_REF_SHAPE, OFFICIAL_MARKETPLACE_NAME, describeGitHubSource, formatInstallRef, isOwnerRepo, looksLikePath, parseGitHubSource, parseInstallRef, } from "./client/refs.js";
33
44
  export { DIALECT_LABELS } from "./client/vocabulary.js";
34
45
  //# sourceMappingURL=client.d.ts.map
package/client.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EACL,KAAK,aAAa,E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K,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,kBAAkB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
package/client.js CHANGED
@@ -15,13 +15,20 @@
15
15
  * order the CLI's original walk produced them;
16
16
  * - the archive and its digest (`archive.ts`): the deterministic zip and
17
17
  * the SHA-256 the server records;
18
+ * - the preparation (`prepare.ts`): select, read, refuse, archive, digest,
19
+ * once, for a tree on disk, on a host, or in a browser's memory;
18
20
  * - the grammars (`refs.ts`): an install ref and a GitHub marketplace
19
21
  * source, with their refusal sentences;
22
+ * - the built-in sources (`builtin.ts`): the official catalogue and the
23
+ * three vendors', listed by every client without configuration;
24
+ * - the release predicate (`release.ts`): which server versions the
25
+ * catalogue is published for;
26
+ * - the re-rooting rule (`reroot.ts`): a zipped folder reads as the folder;
20
27
  * - the vocabulary (`vocabulary.ts`): the labels both surfaces print.
21
28
  *
22
29
  * Nothing here touches the filesystem, the network or any `node:*` module.
23
- * A client's edge (a directory walk, a fetch) produces the candidates and
24
- * the bytes; this entry decides what becomes of them.
30
+ * A client's edge (a directory walk, a fetch, a file pick) produces the
31
+ * candidates and the bytes; this entry decides what becomes of them.
25
32
  */
26
33
  export { DEFAULT_PATTERNS } from "./client/ignore/defaults.js";
27
34
  export { matchName } from "./client/ignore/match.js";
@@ -29,6 +36,10 @@ export { Matcher, Reason, REASON_TEXT, SOURCE_CLI, SOURCE_DEFAULTS, SOURCE_GITIG
29
36
  export { MatchResult, parsePattern } from "./client/ignore/pattern.js";
30
37
  export { IGNORE_FILE_NAMES, compareWalkOrder, selectPluginFiles, } from "./client/select.js";
31
38
  export { DETERMINISTIC_ZIP_MTIME, archivePlugin, digestArchive } from "./client/archive.js";
39
+ export { preparePluginArchive, preparePluginFromTree, } from "./client/prepare.js";
40
+ export { BUILT_IN_MARKETPLACES, builtInSourceRefusal, isBuiltInMarketplaceName, } from "./client/builtin.js";
41
+ export { isReleaseVersion } from "./client/release.js";
42
+ export { rerootSingleDirectory, stripDirectoryPrefix } from "./client/reroot.js";
32
43
  export { GITHUB_SOURCE_SHAPE, INSTALL_REF_SHAPE, OFFICIAL_MARKETPLACE_NAME, describeGitHubSource, formatInstallRef, isOwnerRepo, looksLikePath, parseGitHubSource, parseInstallRef, } from "./client/refs.js";
33
44
  export { DIALECT_LABELS } from "./client/vocabulary.js";
34
45
  //# sourceMappingURL=client.js.map
package/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D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B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAKL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
package/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export { PLACEHOLDER_PATTERN, VARIABLE_NAME_PATTERN } from "./placeholders.js";
18
18
  export type { Finding, FindingContext, PluginErrorKind, PluginFinding, PluginFindingKind, PluginReadOutcome, PluginWarningKind, } from "./outcome.js";
19
19
  export { MARKETPLACE_LOCATIONS } from "./marketplace/messages.js";
20
20
  export type { Marketplace, MarketplaceDialect, MarketplaceEntry, MarketplaceErrorKind, MarketplaceFinding, MarketplaceFindingKind, MarketplaceOwner, MarketplaceReadOutcome, MarketplaceWarningKind, } from "./marketplace/outcome.js";
21
- export { hasMarketplaceFile, readMarketplace } from "./marketplace/read-marketplace.js";
21
+ export { hasMarketplaceFile, readMarketplace, readMarketplaceFile } from "./marketplace/read-marketplace.js";
22
22
  export { readPluginPackage } from "./read-plugin-package.js";
23
23
  export type { IgnoredComponent, IgnoredComponentKind, ModelAlias, ModelHint, OverlayDocument, OverlayNamedDocument, OverlayServerDocument, PluginAuthor, PluginDialect, PluginMcpServer, PluginPackage, PluginSkill, PluginSubAgent, PluginVariable, StigmerOverlay, } from "./types.js";
24
24
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src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EACrB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
package/index.js CHANGED
@@ -16,6 +16,6 @@ export { AGENT_PLUGINS_MANIFEST_SCHEMA, AGENT_PLUGINS_MCP_SCHEMA, errorMessage,
16
16
  export { SUB_AGENT_INSTRUCTIONS_MIN, classifyModel } from "./normalise/sub-agents.js";
17
17
  export { PLACEHOLDER_PATTERN, VARIABLE_NAME_PATTERN } from "./placeholders.js";
18
18
  export { MARKETPLACE_LOCATIONS } from "./marketplace/messages.js";
19
- export { hasMarketplaceFile, readMarketplace } from "./marketplace/read-marketplace.js";
19
+ export { hasMarketplaceFile, readMarketplace, readMarketplaceFile } from "./marketplace/read-marketplace.js";
20
20
  export { readPluginPackage } from "./read-plugin-package.js";
21
21
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,GAKpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAU/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAYlE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,GAKpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAU/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAYlE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -25,10 +25,23 @@
25
25
  * `readPluginPackage`; a consumer that wants to install it hands the same
26
26
  * directory to the walker it already uses. Keeping the two reads apart is
27
27
  * what lets a catalogue of eighty entries be listed without eighty reads.
28
+ *
29
+ * `readMarketplaceFile` is the same read without the tree: what the file
30
+ * declares, for a client that holds the file alone and asks only "does this
31
+ * source offer a plugin called X" before it pays for the tree (the CLI's
32
+ * bare-name search across GitHub sources fetches one small file per source
33
+ * instead of a zipball each). Whether the tree holds an entry is still
34
+ * `readMarketplace`'s to say, on the tree, before anything is installed.
28
35
  */
29
36
  import { type PluginFiles } from "../files.js";
30
37
  import type { MarketplaceReadOutcome } from "./outcome.js";
31
38
  /** True when the tree holds any of the four marketplace files; the CLI's routing test. */
32
39
  export declare function hasMarketplaceFile(paths: Iterable<string>): boolean;
33
40
  export declare function readMarketplace(files: PluginFiles): MarketplaceReadOutcome;
41
+ /**
42
+ * The marketplace file as declared, the tree unverified: every entry with a
43
+ * readable source is offered, whether or not `files` holds its directory.
44
+ * For a client that has fetched the file alone; never for an install.
45
+ */
46
+ export declare function readMarketplaceFile(files: PluginFiles): MarketplaceReadOutcome;
34
47
  //# sourceMappingURL=read-marketplace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"read-marketplace.d.ts","sourceRoot":"","sources":["../../src/marketplace/read-marketplace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,EAAwE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAErH,OAAO,KAAK,EAAuE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAQhI,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,CAInE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,sBAAsB,CAiC1E"}
1
+ {"version":3,"file":"read-marketplace.d.ts","sourceRoot":"","sources":["../../src/marketplace/read-marketplace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAIH,OAAO,EAAwE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAErH,OAAO,KAAK,EAAuE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAQhI,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,CAInE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,sBAAsB,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,sBAAsB,CAE9E"}