@ai-primitives-hub/cli 0.2.0 → 0.2.2-next.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/README.md +26 -1
- package/dist/commands/bundle-build.d.ts +1 -0
- package/dist/commands/bundle-build.d.ts.map +1 -1
- package/dist/commands/bundle-build.js +23 -4
- package/dist/commands/bundle-build.js.map +1 -1
- package/dist/commands/collection-affected.d.ts.map +1 -1
- package/dist/commands/collection-affected.js +1 -34
- package/dist/commands/collection-affected.js.map +1 -1
- package/dist/commands/collection-validate.d.ts +15 -2
- package/dist/commands/collection-validate.d.ts.map +1 -1
- package/dist/commands/collection-validate.js +42 -4
- package/dist/commands/collection-validate.js.map +1 -1
- package/dist/commands/doctor.d.ts +4 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +37 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/explain.d.ts.map +1 -1
- package/dist/commands/explain.js +54 -4
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/hub-replicate.d.ts +1 -0
- package/dist/commands/hub-replicate.d.ts.map +1 -1
- package/dist/commands/hub-replicate.js +16 -5
- package/dist/commands/hub-replicate.js.map +1 -1
- package/dist/commands/hub-scoped-governance.d.ts +21 -0
- package/dist/commands/hub-scoped-governance.d.ts.map +1 -0
- package/dist/commands/hub-scoped-governance.js +74 -0
- package/dist/commands/hub-scoped-governance.js.map +1 -0
- package/dist/commands/hub.d.ts +6 -0
- package/dist/commands/hub.d.ts.map +1 -1
- package/dist/commands/hub.js +68 -0
- package/dist/commands/hub.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -10
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +18 -10
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +472 -253
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/plugin-create.d.ts.map +1 -1
- package/dist/commands/plugin-create.js +72 -43
- package/dist/commands/plugin-create.js.map +1 -1
- package/dist/commands/profile.d.ts +42 -4
- package/dist/commands/profile.d.ts.map +1 -1
- package/dist/commands/profile.js +739 -144
- package/dist/commands/profile.js.map +1 -1
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/registry.js +5 -0
- package/dist/commands/registry.js.map +1 -1
- package/dist/commands/security-rate.d.ts +26 -0
- package/dist/commands/security-rate.d.ts.map +1 -0
- package/dist/commands/security-rate.js +281 -0
- package/dist/commands/security-rate.js.map +1 -0
- package/dist/commands/security-scan.d.ts +40 -0
- package/dist/commands/security-scan.d.ts.map +1 -0
- package/dist/commands/security-scan.js +395 -0
- package/dist/commands/security-scan.js.map +1 -0
- package/dist/commands/status.d.ts +18 -11
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +42 -33
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/uninstall.d.ts +2 -9
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +413 -147
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +1 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +379 -56
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validation-governance.d.ts +27 -0
- package/dist/commands/validation-governance.d.ts.map +1 -0
- package/dist/commands/validation-governance.js +92 -0
- package/dist/commands/validation-governance.js.map +1 -0
- package/dist/doctor/diagnostics.d.ts +72 -5
- package/dist/doctor/diagnostics.d.ts.map +1 -1
- package/dist/doctor/diagnostics.js +95 -40
- package/dist/doctor/diagnostics.js.map +1 -1
- package/dist/doctor/primitive-driver.d.ts +24 -0
- package/dist/doctor/primitive-driver.d.ts.map +1 -0
- package/dist/doctor/primitive-driver.js +162 -0
- package/dist/doctor/primitive-driver.js.map +1 -0
- package/dist/doctor/primitives-text.d.ts +27 -0
- package/dist/doctor/primitives-text.d.ts.map +1 -0
- package/dist/doctor/primitives-text.js +131 -0
- package/dist/doctor/primitives-text.js.map +1 -0
- package/dist/doctor/primitives.d.ts +24 -0
- package/dist/doctor/primitives.d.ts.map +1 -0
- package/dist/doctor/primitives.js +101 -0
- package/dist/doctor/primitives.js.map +1 -0
- package/dist/framework/error.d.ts +19 -18
- package/dist/framework/error.d.ts.map +1 -1
- package/dist/framework/error.js +78 -22
- package/dist/framework/error.js.map +1 -1
- package/dist/framework/index.d.ts +3 -1
- package/dist/framework/index.d.ts.map +1 -1
- package/dist/framework/index.js +42 -1
- package/dist/framework/index.js.map +1 -1
- package/dist/framework/install-record.d.ts +555 -0
- package/dist/framework/install-record.d.ts.map +1 -0
- package/dist/framework/install-record.js +968 -0
- package/dist/framework/install-record.js.map +1 -0
- package/dist/framework/target.d.ts +9 -12
- package/dist/framework/target.d.ts.map +1 -1
- package/dist/framework/target.js +9 -12
- package/dist/framework/target.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -1
- package/dist/main.js.map +1 -1
- package/dist/version.d.ts +7 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +15 -0
- package/dist/version.js.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
import { type InstallRecordService, type InstallRecordServices, type Lockfile, type LockfileSourceEntry, type MigrationReport, type RecordHubInput, type RecordInstallInput, type RecordInstallResult, type RecordSelection, type RecordSourceInput, type RecordStore, type StatusRow } from '@ai-primitives-hub/app';
|
|
2
|
+
import { type InstallationScope, type RecordedMcpServer, type RecordFs, type RecordLevel, type RecordLocation, RegistryError, type RegistrySource, type RepositoryExclusion, type Target, type TargetLayoutsConfig, type TokenProvider } from '@ai-primitives-hub/core';
|
|
3
|
+
import { FileSystemLayoutConfigLoader } from '@ai-primitives-hub/infra';
|
|
4
|
+
import type { Context } from './context';
|
|
5
|
+
import type { TargetOverrides } from './target';
|
|
6
|
+
/** Writer stamp for records written by the CLI. */
|
|
7
|
+
export declare const CLI_RECORD_GENERATED_BY: string;
|
|
8
|
+
/**
|
|
9
|
+
* The env a target writer expands `~` against: at user scope `HOME` is the
|
|
10
|
+
* user level's home, so it matches the pre-write folder check.
|
|
11
|
+
* @param env - CLI environment.
|
|
12
|
+
* @param scope - Effective scope of the target.
|
|
13
|
+
*/
|
|
14
|
+
export declare const writerEnv: (env: Record<string, string | undefined>, scope: InstallationScope) => Record<string, string | undefined>;
|
|
15
|
+
/** A repository install whose record files were loaded and checked before writing. */
|
|
16
|
+
export interface PreparedRepositoryRecord {
|
|
17
|
+
/** The file the install is recorded in, from the commit mode. */
|
|
18
|
+
location: RecordLocation;
|
|
19
|
+
service: InstallRecordService;
|
|
20
|
+
/** Workspace root the writer installs into (where merged MCP config files sit). */
|
|
21
|
+
workspaceRoot: string;
|
|
22
|
+
/** `info/exclude` section for local-only files; absent at user level. */
|
|
23
|
+
exclusion?: RepositoryExclusion;
|
|
24
|
+
/** What the migration run before this action did; absent when there was nothing to migrate. */
|
|
25
|
+
migration?: MigrationReport;
|
|
26
|
+
/** Layout layers, built-in first, for the tool's MCP file; the built-in layout alone when absent. */
|
|
27
|
+
layers?: TargetLayoutsConfig[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The text lines of a migration report, printed before the `Record:` line.
|
|
31
|
+
* @param report - The command's migration report, if one ran.
|
|
32
|
+
*/
|
|
33
|
+
export declare const renderMigration: (report: MigrationReport | undefined) => string;
|
|
34
|
+
/** What `recordRepositoryInstall` records. */
|
|
35
|
+
export interface RepositoryInstallToRecord {
|
|
36
|
+
bundleId: string;
|
|
37
|
+
version: string;
|
|
38
|
+
/** The target's type. */
|
|
39
|
+
tool: string;
|
|
40
|
+
source: RecordSourceInput;
|
|
41
|
+
/** The hub named by `source.hubId`. */
|
|
42
|
+
hub?: RecordHubInput;
|
|
43
|
+
/** The writer's `written` list, absolute paths. */
|
|
44
|
+
writtenPaths: readonly string[];
|
|
45
|
+
/** The installed bundle: its manifest id, recorded as the bundle name, and its files, for `integrity` and `sourcePath`. */
|
|
46
|
+
bundle?: InstalledBundleContent;
|
|
47
|
+
/** The bundle's MCP servers, written into the tool's MCP file and recorded; absent keeps the servers already recorded. */
|
|
48
|
+
mcp?: BundleMcpServers;
|
|
49
|
+
}
|
|
50
|
+
/** A bundle's MCP servers, from its deployment manifest, and what names them. */
|
|
51
|
+
export interface BundleMcpServers {
|
|
52
|
+
/** The deployment manifest's `mcpServers`. */
|
|
53
|
+
servers: Readonly<Record<string, unknown>> | undefined;
|
|
54
|
+
manifestId: string;
|
|
55
|
+
/** The deployment manifest's `repository`. */
|
|
56
|
+
manifestRepository?: string;
|
|
57
|
+
/** Repository of the source the bundle came from. */
|
|
58
|
+
sourceRepository?: string;
|
|
59
|
+
/** Environment, for the home and the VS Code user folder. */
|
|
60
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The MCP servers a deployment manifest declares, and what names them.
|
|
64
|
+
* @param manifest - Validated deployment manifest.
|
|
65
|
+
* @param manifest.id
|
|
66
|
+
* @param env - Environment.
|
|
67
|
+
* @param sourceRepository - Repository of the source the bundle came from.
|
|
68
|
+
*/
|
|
69
|
+
export declare const bundleMcpOf: (manifest: {
|
|
70
|
+
id: string;
|
|
71
|
+
}, env: Readonly<Record<string, string | undefined>>, sourceRepository?: string) => BundleMcpServers;
|
|
72
|
+
/** What {@link writeBundleMcpServers} and {@link checkBundleMcpServers} write: tool, workspace root, bundle and its servers. */
|
|
73
|
+
export interface BundleMcpInstall {
|
|
74
|
+
/** The target's type. */
|
|
75
|
+
tool: string;
|
|
76
|
+
/** Workspace root; `${bundlePath}` at repository level. */
|
|
77
|
+
workspaceRoot: string;
|
|
78
|
+
bundleId: string;
|
|
79
|
+
/** Installed version. */
|
|
80
|
+
version: string;
|
|
81
|
+
mcp: BundleMcpServers;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Check that a bundle's MCP servers can be written, writing nothing; run before the bundle's files are written.
|
|
85
|
+
* @param service - Record service.
|
|
86
|
+
* @param location - Record file the install is recorded in.
|
|
87
|
+
* @param install - Tool, workspace root, bundle and its servers.
|
|
88
|
+
* @param layers - Layout layers, built-in first.
|
|
89
|
+
* @throws {RegistryError} `RECORD.MCP_CONFLICT`, `RECORD.MCP_CONFIG_UNREADABLE` or `RECORD.PATH_OUTSIDE_ROOT`.
|
|
90
|
+
*/
|
|
91
|
+
export declare const checkBundleMcpServers: (service: InstallRecordService, location: RecordLocation, install: BundleMcpInstall, layers: TargetLayoutsConfig[]) => Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Write a bundle's MCP servers into the tool's MCP file at the record's level.
|
|
94
|
+
* A tool with no MCP file there gets none, with a warning.
|
|
95
|
+
* @param service - Record service.
|
|
96
|
+
* @param location - Record file the install is recorded in.
|
|
97
|
+
* @param install - Tool, workspace root, bundle and its servers.
|
|
98
|
+
* @param layers - Layout layers, built-in first.
|
|
99
|
+
* @returns The servers to record, and warnings.
|
|
100
|
+
* @throws {RegistryError} `RECORD.MCP_CONFLICT`, `RECORD.MCP_CONFIG_UNREADABLE` or `RECORD.PATH_OUTSIDE_ROOT`.
|
|
101
|
+
*/
|
|
102
|
+
export declare const writeBundleMcpServers: (service: InstallRecordService, location: RecordLocation, install: BundleMcpInstall, layers: TargetLayoutsConfig[]) => Promise<{
|
|
103
|
+
mcpServers: RecordedMcpServer[];
|
|
104
|
+
warnings: string[];
|
|
105
|
+
}>;
|
|
106
|
+
/**
|
|
107
|
+
* Layout layers for a command: built-in, user and project, as the payload writer uses them.
|
|
108
|
+
* @param ctx - CLI context.
|
|
109
|
+
*/
|
|
110
|
+
export declare const loadLayoutLayers: (ctx: Context) => Promise<TargetLayoutsConfig[]>;
|
|
111
|
+
/** What was installed, as the record describes it: the manifest id and the bundle's files by bundle path. */
|
|
112
|
+
export interface InstalledBundleContent {
|
|
113
|
+
name: string;
|
|
114
|
+
files: ReadonlyMap<string, Uint8Array>;
|
|
115
|
+
}
|
|
116
|
+
/** Outcome of `recordRepositoryInstall`. */
|
|
117
|
+
export interface RecordedRepositoryInstall {
|
|
118
|
+
/** Absolute path of the record file written. */
|
|
119
|
+
lockfile: string;
|
|
120
|
+
/** Root-relative superseded files that were removed. */
|
|
121
|
+
deleted: string[];
|
|
122
|
+
/** Non-fatal problems: exclude-file updates and skipped deletions. */
|
|
123
|
+
warnings: string[];
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Re-raise a record error with the command name and its file in the message; code, hint and context are kept.
|
|
127
|
+
* @param command - Message prefix.
|
|
128
|
+
* @param error - A `RECORD.*` error.
|
|
129
|
+
* @param written - Files already written, for an install that failed after the write.
|
|
130
|
+
*/
|
|
131
|
+
export declare const toCommandRecordError: (command: string, error: RegistryError, written?: readonly string[]) => RegistryError;
|
|
132
|
+
/**
|
|
133
|
+
* Re-raise a record error for `install`, with its file in the message.
|
|
134
|
+
* @param error - A `RECORD.*` error.
|
|
135
|
+
* @param written - Files already written, for a failure after the write.
|
|
136
|
+
*/
|
|
137
|
+
export declare const toInstallRecordError: (error: RegistryError, written?: readonly string[]) => RegistryError;
|
|
138
|
+
/**
|
|
139
|
+
* Record store and service for one CLI command.
|
|
140
|
+
* @param fs - Filesystem port.
|
|
141
|
+
*/
|
|
142
|
+
export declare const createRecordServices: (fs?: RecordFs) => InstallRecordServices;
|
|
143
|
+
/**
|
|
144
|
+
* The shared user record location, rooted at home.
|
|
145
|
+
* @param store - Record store.
|
|
146
|
+
* @param env - Environment for the home and XDG folders.
|
|
147
|
+
*/
|
|
148
|
+
export declare const userRecordLocation: (store: RecordStore, env: Record<string, string | undefined>) => RecordLocation;
|
|
149
|
+
/**
|
|
150
|
+
* The layout config loader the CLI writers and record checks use.
|
|
151
|
+
* @param ctx - CLI context.
|
|
152
|
+
*/
|
|
153
|
+
export declare const createLayoutLoader: (ctx: Context) => FileSystemLayoutConfigLoader;
|
|
154
|
+
/**
|
|
155
|
+
* Whether a target's installs are kept in an install record (repository or user scope).
|
|
156
|
+
* @param target - Effective target.
|
|
157
|
+
*/
|
|
158
|
+
export declare const usesInstallRecord: (target: Target) => boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Load and check both repository record files, then migrate the old
|
|
161
|
+
* `prompt-registry.*` files at the git root, before anything is written.
|
|
162
|
+
* @param ctx - CLI context.
|
|
163
|
+
* @param target - Repository-scope target.
|
|
164
|
+
* @param fs - Filesystem port.
|
|
165
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file; nothing was written.
|
|
166
|
+
*/
|
|
167
|
+
export declare const prepareRepositoryRecord: (ctx: Context, target: Target, fs?: RecordFs) => Promise<PreparedRepositoryRecord>;
|
|
168
|
+
/**
|
|
169
|
+
* Load and check the shared user record and refuse a target folder outside
|
|
170
|
+
* home before anything is written, then import the old user lockfile once.
|
|
171
|
+
* @param ctx - CLI context.
|
|
172
|
+
* @param target - User-scope target.
|
|
173
|
+
* @param fs - Filesystem port.
|
|
174
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file or folder; nothing was written.
|
|
175
|
+
*/
|
|
176
|
+
export declare const prepareUserRecord: (ctx: Context, target: Target, fs?: RecordFs) => Promise<PreparedRepositoryRecord>;
|
|
177
|
+
/**
|
|
178
|
+
* Record a repository install, then remove the files it superseded. On failure
|
|
179
|
+
* the written files stay and the error lists them.
|
|
180
|
+
* @param prepared - From {@link prepareRepositoryRecord}.
|
|
181
|
+
* @param install - What was installed.
|
|
182
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file and the written files.
|
|
183
|
+
*/
|
|
184
|
+
export declare const recordRepositoryInstall: (prepared: PreparedRepositoryRecord, install: RepositoryInstallToRecord) => Promise<RecordedRepositoryInstall>;
|
|
185
|
+
/**
|
|
186
|
+
* Refuse an install whose MCP servers cannot be written, before the bundle's files are written.
|
|
187
|
+
* @param prepared - From {@link prepareRecordForTarget}; `undefined` for a target that keeps the old lockfile.
|
|
188
|
+
* @param install - Bundle, version, tool and its servers.
|
|
189
|
+
* @param install.bundleId - Bundle id.
|
|
190
|
+
* @param install.version - Version to install.
|
|
191
|
+
* @param install.tool - The target's type.
|
|
192
|
+
* @param install.mcp - The bundle's servers.
|
|
193
|
+
* @throws {RegistryError} `RECORD.MCP_CONFLICT`, `RECORD.MCP_CONFIG_UNREADABLE` or `RECORD.PATH_OUTSIDE_ROOT`, as `install` reports it.
|
|
194
|
+
*/
|
|
195
|
+
export declare const checkRepositoryInstallMcp: (prepared: PreparedRepositoryRecord | undefined, install: {
|
|
196
|
+
bundleId: string;
|
|
197
|
+
version: string;
|
|
198
|
+
tool: string;
|
|
199
|
+
mcp: BundleMcpServers;
|
|
200
|
+
}) => Promise<void>;
|
|
201
|
+
/** Both repository record files, loaded and checked for an uninstall. */
|
|
202
|
+
export interface PreparedRepositoryUninstall {
|
|
203
|
+
/** The file named by the commit mode; `recordUninstall` reads both files from its root. */
|
|
204
|
+
location: RecordLocation;
|
|
205
|
+
/** Every record file of the level the uninstall reads. */
|
|
206
|
+
locations: readonly RecordLocation[];
|
|
207
|
+
service: InstallRecordService;
|
|
208
|
+
/** The target's type. */
|
|
209
|
+
tool: string;
|
|
210
|
+
/** `info/exclude` section local-only files are listed in; absent at user level. */
|
|
211
|
+
exclusion?: RepositoryExclusion;
|
|
212
|
+
/** Bundles with an entry for `tool` in either file, sorted, with their recorded paths. */
|
|
213
|
+
entries: Map<string, string[]>;
|
|
214
|
+
/** User level only: per bundle, paths the old user lockfile still lists; kept on uninstall until it is imported. */
|
|
215
|
+
keepPaths?: ReadonlyMap<string, ReadonlySet<string>>;
|
|
216
|
+
/** Bundles whose only entry at the level is `unknown`; a plain uninstall removes it and keeps its files. */
|
|
217
|
+
loneUnknown?: ReadonlySet<string>;
|
|
218
|
+
/** `true` at user level once the old user lockfile was imported: the old store is not read. */
|
|
219
|
+
ignoresOldStore?: boolean;
|
|
220
|
+
/** What the migration run before this action did; absent when there was nothing to migrate. */
|
|
221
|
+
migration?: MigrationReport;
|
|
222
|
+
}
|
|
223
|
+
/** Outcome of `recordRepositoryUninstall`. */
|
|
224
|
+
export interface RecordedRepositoryUninstall {
|
|
225
|
+
/** Absolute path of the record file the entry was removed from (it may now be deleted). */
|
|
226
|
+
lockfile: string;
|
|
227
|
+
/** Root-relative files that were removed. */
|
|
228
|
+
removed: string[];
|
|
229
|
+
/** Root-relative files kept: another entry still lists them, or they were changed or missing since the install. */
|
|
230
|
+
kept: string[];
|
|
231
|
+
/** Names of the MCP servers removed from the tool's MCP file. */
|
|
232
|
+
mcpServersRemoved: string[];
|
|
233
|
+
/** Non-fatal problems: skipped deletions or a record file that could not be removed. */
|
|
234
|
+
warnings: string[];
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Load, check and migrate the repository record files before anything is removed.
|
|
238
|
+
* Bundles not in `entries` fall back to the old store.
|
|
239
|
+
* @param ctx - CLI context.
|
|
240
|
+
* @param target - Repository-scope target.
|
|
241
|
+
* @param options - Record files already selected (`uninstall --lockfile`) and the preview flag.
|
|
242
|
+
* @param options.locations - The selected record files.
|
|
243
|
+
* @param options.dryRun - `true` for `--dry-run`, which never migrates.
|
|
244
|
+
* @param fs - Filesystem port.
|
|
245
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file; nothing was removed.
|
|
246
|
+
*/
|
|
247
|
+
export declare const prepareRepositoryUninstall: (ctx: Context, target: Target, options?: {
|
|
248
|
+
locations?: readonly RecordLocation[];
|
|
249
|
+
dryRun?: boolean;
|
|
250
|
+
}, fs?: RecordFs) => Promise<PreparedRepositoryUninstall>;
|
|
251
|
+
/**
|
|
252
|
+
* Load and check the shared user record and import the old user lockfile
|
|
253
|
+
* once before anything is removed. Bundles not recorded there fall back to
|
|
254
|
+
* the old user lockfile.
|
|
255
|
+
* @param ctx - CLI context.
|
|
256
|
+
* @param target - User-scope target.
|
|
257
|
+
* @param options - Preview flag.
|
|
258
|
+
* @param options.dryRun - `true` for `--dry-run`, which never migrates.
|
|
259
|
+
* @param fs - Filesystem port.
|
|
260
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file; nothing was removed.
|
|
261
|
+
*/
|
|
262
|
+
export declare const prepareUserUninstall: (ctx: Context, target: Target, options?: {
|
|
263
|
+
dryRun?: boolean;
|
|
264
|
+
}, fs?: RecordFs) => Promise<PreparedRepositoryUninstall>;
|
|
265
|
+
/**
|
|
266
|
+
* Load and check the install record a target installs into, before anything is written.
|
|
267
|
+
* @param ctx - CLI context.
|
|
268
|
+
* @param target - Effective target.
|
|
269
|
+
* @returns The prepared record; `undefined` for a target that keeps the old lockfile.
|
|
270
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file or folder; nothing was written.
|
|
271
|
+
*/
|
|
272
|
+
export declare const prepareRecordForTarget: (ctx: Context, target: Target) => Promise<PreparedRepositoryRecord | undefined>;
|
|
273
|
+
/**
|
|
274
|
+
* Refuse, before any file is written, a source the record holds from another hub.
|
|
275
|
+
* @param prepared - From {@link prepareRecordForTarget}; nothing is checked without it.
|
|
276
|
+
* @param source - Source to record.
|
|
277
|
+
* @param hub - The hub named by `source.hubId`.
|
|
278
|
+
* @throws {RegistryError} `RECORD.HUB_CONFLICT`, or any `RECORD.*` load error.
|
|
279
|
+
*/
|
|
280
|
+
export declare const checkRecordSourceHub: (prepared: PreparedRepositoryRecord | undefined, source: RecordSourceInput, hub: RecordHubInput | undefined) => Promise<void>;
|
|
281
|
+
/**
|
|
282
|
+
* Load and check the install record a target uninstalls from, before anything is removed.
|
|
283
|
+
* @param ctx - CLI context.
|
|
284
|
+
* @param target - Effective target.
|
|
285
|
+
* @param options - Selected files and the preview flag.
|
|
286
|
+
* @param options.locations - Repository level only: record files selected by `--lockfile`.
|
|
287
|
+
* @param options.dryRun - `true` for `--dry-run`, which never migrates.
|
|
288
|
+
* @returns The prepared record; `undefined` for a target that keeps the old lockfile.
|
|
289
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file; nothing was removed.
|
|
290
|
+
*/
|
|
291
|
+
export declare const prepareUninstallForTarget: (ctx: Context, target: Target, options?: {
|
|
292
|
+
locations?: readonly RecordLocation[];
|
|
293
|
+
dryRun?: boolean;
|
|
294
|
+
}) => Promise<PreparedRepositoryUninstall | undefined>;
|
|
295
|
+
/**
|
|
296
|
+
* The tool's other keys of the bundle's identity, such as an older versioned key a merge left next to it.
|
|
297
|
+
* @param prepared - The level's record files, loaded and checked.
|
|
298
|
+
* @param bundleId - Recorded key being uninstalled.
|
|
299
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file.
|
|
300
|
+
*/
|
|
301
|
+
export declare const otherKeysOfIdentity: (prepared: PreparedRepositoryUninstall, bundleId: string) => Promise<string[]>;
|
|
302
|
+
/**
|
|
303
|
+
* Remove one bundle's entry for the target's type, then delete its files except
|
|
304
|
+
* those another entry lists or that changed since the install (each kept with a warning).
|
|
305
|
+
* @param prepared - From {@link prepareRepositoryUninstall}.
|
|
306
|
+
* @param bundleId - Bundle to uninstall.
|
|
307
|
+
* @throws {RegistryError} `RECORD.ENTRY_NOT_FOUND` or another `RECORD.*` error naming the file.
|
|
308
|
+
*/
|
|
309
|
+
export declare const recordRepositoryUninstall: (prepared: PreparedRepositoryUninstall, bundleId: string) => Promise<RecordedRepositoryUninstall>;
|
|
310
|
+
/**
|
|
311
|
+
* Remove a bundle's lone `unknown` entry and keep every file it listed.
|
|
312
|
+
* @param prepared - Result of {@link prepareRepositoryUninstall} or {@link prepareUserUninstall}.
|
|
313
|
+
* @param bundleId - Bundle whose only entry is `unknown`.
|
|
314
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file.
|
|
315
|
+
*/
|
|
316
|
+
export declare const recordUnknownUninstall: (prepared: PreparedRepositoryUninstall, bundleId: string) => Promise<RecordedRepositoryUninstall>;
|
|
317
|
+
/** What a command was given that fixes the record level. */
|
|
318
|
+
export interface RecordSelectionInput {
|
|
319
|
+
/** Command name, the prefix of a `RECORD.*` error message. */
|
|
320
|
+
command: string;
|
|
321
|
+
/** `--lockfile <path>` as typed. */
|
|
322
|
+
lockfile?: string;
|
|
323
|
+
scope?: InstallationScope;
|
|
324
|
+
/** `true` for an action that changes the record (update, replay): its level is migrated first. */
|
|
325
|
+
write?: boolean;
|
|
326
|
+
}
|
|
327
|
+
/** A selected record with the store and service to act on it. */
|
|
328
|
+
export interface PreparedRecordSelection {
|
|
329
|
+
selection: RecordSelection;
|
|
330
|
+
store: RecordStore;
|
|
331
|
+
service: InstallRecordService;
|
|
332
|
+
fs: RecordFs;
|
|
333
|
+
/** `info/exclude` section at the repository record's root, for the writers; absent at user level. */
|
|
334
|
+
exclusion?: RepositoryExclusion;
|
|
335
|
+
/** What the migration run for a `write` selection did; absent when nothing was migrated. */
|
|
336
|
+
migration?: MigrationReport;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Select the record a command acts on and load every selected file before
|
|
340
|
+
* anything is written. With `input.write`, a level with a new record file is
|
|
341
|
+
* migrated first and selected again.
|
|
342
|
+
* @param ctx - CLI context.
|
|
343
|
+
* @param input - Command name, `--lockfile`, `--scope` and `write`.
|
|
344
|
+
* @param target - Resolved target, when the command has one.
|
|
345
|
+
* @param fs - Filesystem port.
|
|
346
|
+
* @throws {RegistryError} A `RECORD.*` error naming the command and the file; nothing was written.
|
|
347
|
+
*/
|
|
348
|
+
export declare const prepareRecordSelection: (ctx: Context, input: RecordSelectionInput, target?: Target, fs?: RecordFs) => Promise<PreparedRecordSelection>;
|
|
349
|
+
/**
|
|
350
|
+
* A record selection with its entries, for `update` and `uninstall <bundle-id>`;
|
|
351
|
+
* with no target, the record decides which tools act.
|
|
352
|
+
*/
|
|
353
|
+
export interface RecordDecision {
|
|
354
|
+
/** The typed `--lockfile` / `--scope`. */
|
|
355
|
+
input: Omit<RecordSelectionInput, 'write'>;
|
|
356
|
+
/** The target the selection was made for, when there is one. */
|
|
357
|
+
target?: Target;
|
|
358
|
+
/** The selection: `--lockfile`, then `--scope`, then the target or the default rule. */
|
|
359
|
+
prepared: PreparedRecordSelection;
|
|
360
|
+
/** Every (bundle, tool) entry of the selected 3.0.0 record files. */
|
|
361
|
+
rows: StatusRow[];
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Select the record and list its entries; `options.write` migrates the level first.
|
|
365
|
+
* @param ctx - CLI context.
|
|
366
|
+
* @param input - Command name and the typed `--lockfile` / `--scope`.
|
|
367
|
+
* @param options - Selection options.
|
|
368
|
+
* @param options.write - `true` to migrate before selecting.
|
|
369
|
+
* @param options.target - Effective target the level is selected for, when there is one.
|
|
370
|
+
* @throws {RegistryError} A `RECORD.*` error naming the command and the file.
|
|
371
|
+
*/
|
|
372
|
+
export declare const prepareRecordDecision: (ctx: Context, input: Omit<RecordSelectionInput, "write">, options?: {
|
|
373
|
+
write?: boolean;
|
|
374
|
+
target?: Target;
|
|
375
|
+
}) => Promise<RecordDecision>;
|
|
376
|
+
/**
|
|
377
|
+
* The decision a real run acts on: selected again with `write`, so the level is migrated; a dry run keeps `decision`.
|
|
378
|
+
* @param ctx - CLI context.
|
|
379
|
+
* @param decision - The read-only decision.
|
|
380
|
+
* @param options - Preview options.
|
|
381
|
+
* @param options.dryRun - `true` for `--dry-run`.
|
|
382
|
+
* @throws {RegistryError} A `RECORD.*` error naming the command and the file.
|
|
383
|
+
*/
|
|
384
|
+
export declare const migrateDecision: (ctx: Context, decision: RecordDecision, options?: {
|
|
385
|
+
dryRun?: boolean;
|
|
386
|
+
}) => Promise<RecordDecision>;
|
|
387
|
+
/**
|
|
388
|
+
* The distinct tools a bundle has entries for, in row order.
|
|
389
|
+
* @param rows - Rows of a {@link RecordDecision}.
|
|
390
|
+
* @param bundleId - Bundle id.
|
|
391
|
+
*/
|
|
392
|
+
export declare const recordedTools: (rows: readonly StatusRow[], bundleId: string) => string[];
|
|
393
|
+
/** Outcome of {@link prepareUnknownUninstall}. */
|
|
394
|
+
export type PreparedUnknownUninstall =
|
|
395
|
+
/** Still a lone `unknown` entry: remove it with {@link recordUnknownUninstall}. */
|
|
396
|
+
{
|
|
397
|
+
uninstall: PreparedRepositoryUninstall;
|
|
398
|
+
}
|
|
399
|
+
/** The migration changed the bundle's entries: decide again on this selection. */
|
|
400
|
+
| {
|
|
401
|
+
changed: RecordDecision;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* Prepare `uninstall <bundle-id>` of a lone `unknown` entry with no target; the level is migrated first unless `--dry-run`.
|
|
405
|
+
* @param ctx - CLI context.
|
|
406
|
+
* @param decision - The read-only decision that found the entry.
|
|
407
|
+
* @param bundleId - Bundle to uninstall.
|
|
408
|
+
* @param options - Preview options.
|
|
409
|
+
* @param options.dryRun - `true` for `--dry-run`, which never migrates.
|
|
410
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file; nothing was removed.
|
|
411
|
+
*/
|
|
412
|
+
export declare const prepareUnknownUninstall: (ctx: Context, decision: RecordDecision, bundleId: string, options?: {
|
|
413
|
+
dryRun?: boolean;
|
|
414
|
+
}) => Promise<PreparedUnknownUninstall>;
|
|
415
|
+
/**
|
|
416
|
+
* Configured sources by id for the source trust gate, in `orderConfiguredSources`
|
|
417
|
+
* order. A hub that cannot be read contributes no source.
|
|
418
|
+
* @param ctx - CLI context.
|
|
419
|
+
*/
|
|
420
|
+
export declare const configuredSources: (ctx: Context) => Promise<Map<string, RegistrySource>>;
|
|
421
|
+
/** Configured sources and hubs for a record replay or update. */
|
|
422
|
+
export interface ConfiguredRecordSources {
|
|
423
|
+
/** Configured sources by id, in `orderConfiguredSources` order. */
|
|
424
|
+
configured: Map<string, RegistrySource>;
|
|
425
|
+
/** Every configured source, of any hub. */
|
|
426
|
+
candidates: RegistrySource[];
|
|
427
|
+
/** Shareable configured hubs by id. */
|
|
428
|
+
hubs: Map<string, RecordHubInput>;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Configured sources by id, every configured source and the shareable hubs.
|
|
432
|
+
* A hub that cannot be read contributes no source.
|
|
433
|
+
* @param ctx - CLI context.
|
|
434
|
+
*/
|
|
435
|
+
export declare const configuredRecordSources: (ctx: Context) => Promise<ConfiguredRecordSources>;
|
|
436
|
+
/**
|
|
437
|
+
* The shareable hub a configured source came from, from the CLI hub store.
|
|
438
|
+
* @param ctx - CLI context.
|
|
439
|
+
* @param source - Configured source.
|
|
440
|
+
*/
|
|
441
|
+
export declare const recordHubOf: (ctx: Context, source: RegistrySource | undefined) => Promise<RecordHubInput | undefined>;
|
|
442
|
+
/**
|
|
443
|
+
* The token provider for a planned entry: none for a source taken from the record.
|
|
444
|
+
* @param tokens - The command's token provider.
|
|
445
|
+
* @param fromRecordOnly - `true` when no configured source has the entry's id.
|
|
446
|
+
*/
|
|
447
|
+
export declare const tokensForRecordSource: (tokens: TokenProvider, fromRecordOnly: boolean) => TokenProvider;
|
|
448
|
+
/** A planned (bundle, tool) entry, as {@link recordPlannedInstall} re-records it. */
|
|
449
|
+
export interface PlannedRecordInstall {
|
|
450
|
+
bundleId: string;
|
|
451
|
+
tool: string;
|
|
452
|
+
/** The file that holds the entry. */
|
|
453
|
+
location: RecordLocation;
|
|
454
|
+
sourceId: string;
|
|
455
|
+
/** Source decided by the trust gate, in the legacy lockfile shape. */
|
|
456
|
+
source: LockfileSourceEntry;
|
|
457
|
+
sourceType: string;
|
|
458
|
+
/** The source's recorded hub id. */
|
|
459
|
+
hubId?: string;
|
|
460
|
+
/** The hub named by `hubId`, from the configured hubs. */
|
|
461
|
+
hub?: RecordHubInput;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Refuse a planned entry whose MCP servers cannot be written, before its writer runs.
|
|
465
|
+
* @param service - Record service.
|
|
466
|
+
* @param item - The planned entry.
|
|
467
|
+
* @param target - Effective target that will write it.
|
|
468
|
+
* @param ctx - CLI context.
|
|
469
|
+
* @param version - Version to write.
|
|
470
|
+
* @param mcp - The bundle's servers.
|
|
471
|
+
* @throws {RegistryError} `RECORD.MCP_CONFLICT`, `RECORD.MCP_CONFIG_UNREADABLE` or `RECORD.PATH_OUTSIDE_ROOT`.
|
|
472
|
+
*/
|
|
473
|
+
export declare const checkPlannedInstallMcp: (service: InstallRecordService, item: Pick<PlannedRecordInstall, "bundleId" | "tool" | "location">, target: Target, ctx: Context, version: string, mcp: BundleMcpServers) => Promise<void>;
|
|
474
|
+
/**
|
|
475
|
+
* Re-record a planned entry after its writer ran; {@link finishRecordRun} deletes superseded files.
|
|
476
|
+
* @param service - Record service.
|
|
477
|
+
* @param item - The planned entry.
|
|
478
|
+
* @param target - Effective target that wrote it.
|
|
479
|
+
* @param ctx - CLI context.
|
|
480
|
+
* @param version - Version written.
|
|
481
|
+
* @param written - The writer's `written` list.
|
|
482
|
+
* @param syncSiblings - Which sibling entries to sync.
|
|
483
|
+
* @param bundle - The installed bundle's manifest id and files.
|
|
484
|
+
* @param mcp
|
|
485
|
+
* @throws {RegistryError} A `RECORD.*` error naming the file.
|
|
486
|
+
*/
|
|
487
|
+
export declare const recordPlannedInstall: (service: InstallRecordService, item: PlannedRecordInstall, target: Target, ctx: Context, version: string, written: readonly string[], syncSiblings: RecordInstallInput["syncSiblings"], bundle?: InstalledBundleContent, mcp?: BundleMcpServers) => Promise<RecordInstallResult & {
|
|
488
|
+
mcpWarnings: string[];
|
|
489
|
+
}>;
|
|
490
|
+
/**
|
|
491
|
+
* End a replay or update run: remove superseded files after every save, keeping still-listed ones.
|
|
492
|
+
* @param service - Record service.
|
|
493
|
+
* @param changes - Every record change of the run.
|
|
494
|
+
* @returns The warnings of the saves and of the removal.
|
|
495
|
+
*/
|
|
496
|
+
export declare const finishRecordRun: (service: InstallRecordService, changes: readonly (RecordInstallResult & {
|
|
497
|
+
mcpWarnings?: string[];
|
|
498
|
+
})[]) => Promise<string[]>;
|
|
499
|
+
/** The selected level's old `prompt-registry.*` file and the bundles only it has. */
|
|
500
|
+
export interface OldFileOnlyBundles {
|
|
501
|
+
lockPath: string;
|
|
502
|
+
lock: Lockfile;
|
|
503
|
+
/** Ids of the old file's bundles the record does not have at any version, in file order. */
|
|
504
|
+
bundleIds: string[];
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* The bundles only the old file has; the old code handles them, and the record wins for the others.
|
|
508
|
+
* @param ctx - CLI context.
|
|
509
|
+
* @param prepared - The command's record selection.
|
|
510
|
+
* @returns `undefined` when there is no readable old file.
|
|
511
|
+
*/
|
|
512
|
+
export declare const oldFileOnlyBundles: (ctx: Context, prepared: PreparedRecordSelection) => Promise<OldFileOnlyBundles | undefined>;
|
|
513
|
+
/** How {@link prepareOldFileOnly} finds the target that writes the old-file-only bundles. */
|
|
514
|
+
export interface OldFileTargetInput {
|
|
515
|
+
/** Command name, for the target errors. */
|
|
516
|
+
command: string;
|
|
517
|
+
/** Effective target to write with, used as is. */
|
|
518
|
+
target?: Target;
|
|
519
|
+
/** `--scope` / `--commit-mode` applied to an inferred target. */
|
|
520
|
+
overrides?: TargetOverrides;
|
|
521
|
+
}
|
|
522
|
+
/** Old-file-only bundles with the target that writes them, or why no target could be found. */
|
|
523
|
+
export type OldFileOnlyPlan = OldFileOnlyBundles & ({
|
|
524
|
+
target: Target;
|
|
525
|
+
} | {
|
|
526
|
+
reason: string;
|
|
527
|
+
});
|
|
528
|
+
/**
|
|
529
|
+
* The old-file-only bundles and their target: the given one, else the only
|
|
530
|
+
* configured one, with the overrides applied; else the missing-target reason.
|
|
531
|
+
* @param ctx - CLI context.
|
|
532
|
+
* @param prepared - The command's record selection.
|
|
533
|
+
* @param resolve - Command name, the given target and the overrides.
|
|
534
|
+
* @returns `undefined` when no bundle is only in the old file.
|
|
535
|
+
*/
|
|
536
|
+
export declare const prepareOldFileOnly: (ctx: Context, prepared: PreparedRecordSelection, resolve: OldFileTargetInput) => Promise<OldFileOnlyPlan | undefined>;
|
|
537
|
+
/** The `level` and `records` fields every record command reports. */
|
|
538
|
+
export interface RecordOutputFields {
|
|
539
|
+
level: RecordLevel;
|
|
540
|
+
/** Absolute paths of the record files the command read or wrote. */
|
|
541
|
+
records: string[];
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* The `level` and `records` JSON fields: the record files that exist, or the old file.
|
|
545
|
+
* @param selection - The command's record selection.
|
|
546
|
+
* @param fs - Filesystem port.
|
|
547
|
+
* @param oldFileRead - The old file, when the command also read it.
|
|
548
|
+
*/
|
|
549
|
+
export declare const recordOutputFields: (selection: RecordSelection, fs: RecordFs, oldFileRead?: string) => Promise<RecordOutputFields>;
|
|
550
|
+
/**
|
|
551
|
+
* The `Record: <level> <path>` text line; several files are comma-separated.
|
|
552
|
+
* @param fields - Output fields.
|
|
553
|
+
*/
|
|
554
|
+
export declare const renderRecordLine: (fields: RecordOutputFields) => string;
|
|
555
|
+
//# sourceMappingURL=install-record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-record.d.ts","sourceRoot":"","sources":["../../src/framework/install-record.ts"],"names":[],"mappings":"AASA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,QAAQ,EACb,KAAK,mBAAmB,EAIxB,KAAK,eAAe,EAIpB,KAAK,cAAc,EAGnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAOhB,KAAK,SAAS,EAGf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,KAAK,iBAAiB,EAGtB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAExB,KAAK,MAAM,EAEX,KAAK,mBAAmB,EAExB,KAAK,aAAa,EAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,4BAA4B,EAM7B,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EACV,OAAO,EACR,MAAM,WAAW,CAAC;AAOnB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,UAAU,CAAC;AAElB,mDAAmD;AACnD,eAAO,MAAM,uBAAuB,QAAyC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,CAA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