@antseed/cli 0.1.111 → 0.1.112

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.
@@ -1 +1 @@
1
- {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/config/validation.ts"],"names":[],"mappings":"AAOA,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AACxD,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAEtC,SAAS,mBAAmB,CAC1B,IAAY,EACZ,KAAgC,EAChC,MAAgB;IAEhB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,kBAAkB,GAAG,CAAC,EAAE,CAAC;QAC/E,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,0DAA0D,CAAC,CAAC;IACjF,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,KAAK,CAAC,mBAAmB,GAAG,CAAC,EAAE,CAAC;QACjF,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,2DAA2D,CAAC,CAAC;IAClF,CAAC;IACD,IAAI,KAAK,CAAC,wBAAwB,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI,KAAK,CAAC,wBAAwB,GAAG,CAAC,CAAC,EAAE,CAAC;QACvI,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,gEAAgE,CAAC,CAAC;IACvF,CAAC;AACH,CAAC;AAED,SAAS,2BAA2B,CAClC,IAAY,EACZ,OAAkC,EAClC,MAAgB;IAEhB,mBAAmB,CAAC,GAAG,IAAI,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,oBAAoB,CAC3B,IAAY,EACZ,IAA0B,EAC1B,MAAgB;IAEhB,IAAI,CAAC,IAAI;QAAE,OAAO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ChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEhC,MAAM,IAAI,KAAK,CAAC,sBAAsB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Plugin drift detection and auto-refresh.
3
+ *
4
+ * Background
5
+ * ----------
6
+ * The CLI ships with a known-good copy of `@antseed/provider-core` (and other
7
+ * shared packages) inside its own `node_modules`. Each installed plugin in
8
+ * `~/.antseed/plugins/node_modules/<pkg>/` has its OWN pinned version of
9
+ * `@antseed/provider-core` (because plugin `package.json`s use `workspace:*`
10
+ * during development, which pnpm/npm publish rewrites to an exact version).
11
+ *
12
+ * When a user runs `npm i -g @antseed/cli@latest`, the CLI's bundled
13
+ * `provider-core` updates — but the plugins in `~/.antseed/plugins/` do NOT.
14
+ * They keep their original pin, so plugin code keeps importing the OLD
15
+ * `provider-core` even though the CLI itself has the new one.
16
+ *
17
+ * This caused real production damage: a fix to the seller-side request
18
+ * relay (`stream_options.include_usage` injection) shipped in
19
+ * `@antseed/provider-core@0.2.49`, but sellers running the upgraded CLI
20
+ * were still importing `provider-core@0.2.48` from their plugins dir. The
21
+ * fix never took effect for them.
22
+ *
23
+ * What this module does
24
+ * ---------------------
25
+ * 1. Read the version of each `@antseed/*` core package the CLI itself
26
+ * bundles (the "expected" version).
27
+ * 2. Read the version each installed trusted plugin has pinned in its own
28
+ * `package.json` `dependencies` map (the "actual" version).
29
+ * 3. If any plugin pins a stale core version, run `npm install <plugin>@latest`
30
+ * in `~/.antseed/plugins/` for each affected plugin. That naturally pulls
31
+ * in the matching core version because workspace pinning is exact.
32
+ *
33
+ * The check is best-effort: any failure (network down, registry 5xx, npm
34
+ * timeout, permission denied) logs a warning and lets startup continue with
35
+ * the existing (possibly stale) plugins. We never block startup on registry
36
+ * health.
37
+ */
38
+ /** Core packages whose drift between CLI-bundled and plugin-pinned versions matters. */
39
+ declare const TRACKED_CORE_PACKAGES: readonly ["@antseed/provider-core", "@antseed/node", "@antseed/router-core", "@antseed/api-adapter"];
40
+ export interface PluginDrift {
41
+ /** Plugin package name, e.g. `@antseed/provider-openai`. */
42
+ plugin: string;
43
+ /** Core packages on which this plugin pins a stale version. */
44
+ staleCorePackages: Array<{
45
+ pkg: string;
46
+ pluginPinnedVersion: string;
47
+ cliBundledVersion: string;
48
+ }>;
49
+ }
50
+ export interface DriftReport {
51
+ /** Plugins whose pinned core deps lag behind what the CLI itself bundles. */
52
+ driftedPlugins: PluginDrift[];
53
+ /** Plugins that were requested but are not installed in the plugins dir. */
54
+ missingPlugins: string[];
55
+ }
56
+ export interface RefreshResult {
57
+ /** Plugins that were successfully reinstalled at @latest. */
58
+ refreshed: string[];
59
+ /** Plugins where `npm install` failed; arr of `{plugin, reason}`. */
60
+ failed: Array<{
61
+ plugin: string;
62
+ reason: string;
63
+ }>;
64
+ }
65
+ /**
66
+ * Read the version of a package as bundled inside the CLI's own
67
+ * `node_modules`. For `@antseed/*` packages, this is the version the CLI
68
+ * was built against and the "source of truth" we want plugins to match.
69
+ *
70
+ * Resolution starts from this module's URL and walks up via Node's module
71
+ * resolution, so it always finds the CLI's own bundled copy (not a hoisted
72
+ * copy from elsewhere).
73
+ *
74
+ * Implementation note: many modern packages (e.g. chalk) declare `"exports"`
75
+ * fields that block direct resolution of `<pkg>/package.json`. To handle
76
+ * those, we first try `require.resolve('<pkg>/package.json')`, and on failure
77
+ * fall back to resolving the package's main entry and walking up its parent
78
+ * directories until we find a `package.json` whose `name` matches.
79
+ *
80
+ * Returns `null` if the package is not bundled with the CLI (which would be
81
+ * a build-time error for `@antseed/*` deps, but we don't want to crash the
82
+ * CLI over it at runtime).
83
+ */
84
+ export declare function getCliBundledVersion(pkgName: string): string | null;
85
+ /**
86
+ * Read the version a given plugin pins for a given core package, by reading
87
+ * the plugin's own `package.json` `dependencies` map.
88
+ *
89
+ * We deliberately do NOT use Node's module resolution here, because we want
90
+ * the EXPECTED dependency version (what the plugin was built against) — not
91
+ * the resolved/hoisted version (which may already be newer if another
92
+ * plugin pulled it up). If the resolved version is newer than what this
93
+ * plugin pins, the plugin is still effectively running on a newer core, but
94
+ * it's a fragile state — the next reinstall could re-pin everything to a
95
+ * mismatched version. So we treat "plugin's declared dep mismatches CLI
96
+ * bundle" as drift even if the resolved version happens to match today.
97
+ *
98
+ * Returns `null` if the plugin is not installed, or if the plugin doesn't
99
+ * declare this core package as a dependency at all (in which case there's
100
+ * nothing to be drifted against).
101
+ */
102
+ export declare function getPluginPinnedCoreVersion(pluginPackage: string, corePackage: string, pluginsDir?: string): string | null;
103
+ /**
104
+ * Compare plugin-pinned core versions against CLI-bundled core versions and
105
+ * report any drift.
106
+ *
107
+ * `pluginPackages` should be the set of plugins the seller/buyer is about to
108
+ * load. We don't check plugins that aren't being used.
109
+ *
110
+ * "Drift" here means: the plugin's `dependencies[corePkg]` is a value that
111
+ * is not equal to the CLI-bundled version of `corePkg`. We treat any
112
+ * mismatch as drift — including, deliberately, the case where the plugin's
113
+ * pinned version is NEWER than the CLI's bundled version. That's also a
114
+ * fragile state (the plugin's importable surface may rely on APIs the CLI
115
+ * doesn't yet provide), and the user should know.
116
+ *
117
+ * We compare strings exactly, not via semver. plugins published from this
118
+ * monorepo have `workspace:*` deps rewritten to exact versions on publish,
119
+ * so the dep value is always a bare version like `0.2.48`. Range deps
120
+ * (`^0.2.0`, `~0.2.5`) are treated as drift unless they happen to literally
121
+ * equal the bundled version string — that's by design, because we can't
122
+ * tell from a range whether the resolved version is what we want, and
123
+ * forcing a re-resolve via `npm install` is the safe default.
124
+ */
125
+ export declare function detectPluginDrift(pluginPackages: string[], pluginsDir?: string, bundledVersions?: Record<string, string | null>): DriftReport;
126
+ /**
127
+ * Reinstall the given plugins at `@latest` to pull in fresh transitive deps
128
+ * (notably the right `@antseed/provider-core` pin).
129
+ *
130
+ * Best-effort: each plugin is installed independently; one failure does not
131
+ * abort the others. Each install has a 60-second timeout.
132
+ *
133
+ * SECURITY: only call this with plugins from the trusted-plugins registry
134
+ * (or otherwise known-safe). We don't validate that here because the
135
+ * caller is in a better position to enforce it; the typical caller is
136
+ * `ensurePluginsUpToDate` below, which DOES enforce the trust list.
137
+ */
138
+ export declare function refreshPlugins(plugins: string[]): Promise<RefreshResult>;
139
+ /**
140
+ * Top-level helper: detect drift, log a summary, and (unless skipped) refresh
141
+ * the drifted plugins.
142
+ *
143
+ * Designed to be called once at startup of `seller start` / `buyer start`,
144
+ * BEFORE any plugin is dynamically imported. (Once imported, refreshing on
145
+ * disk has no effect on the running process — Node has already cached the
146
+ * old module.)
147
+ *
148
+ * Called with `pluginPackages = []` is a no-op.
149
+ *
150
+ * Env vars honored:
151
+ * - `ANTSEED_SKIP_PLUGIN_UPDATE_CHECK=1`: skip the entire drift check.
152
+ * Use this in air-gapped environments or CI where plugins are pre-baked.
153
+ *
154
+ * The function never throws on its own; refresh failures are logged and
155
+ * swallowed. The only way it errors is if the `pluginPackages` list itself
156
+ * triggers an internal logic bug.
157
+ */
158
+ export declare function ensurePluginsUpToDate(pluginPackages: string[], opts?: {
159
+ /** Override for tests. Defaults to console.log/console.warn. */
160
+ log?: (msg: string) => void;
161
+ warn?: (msg: string) => void;
162
+ /** Override for tests. Defaults to `getPluginsDir()`. */
163
+ pluginsDir?: string;
164
+ /** Override for tests so we don't actually shell out. */
165
+ refresh?: (plugins: string[]) => Promise<RefreshResult>;
166
+ /** Override for tests so we don't read real CLI bundled versions. */
167
+ bundledVersions?: Record<string, string | null>;
168
+ /** Override env var lookup for tests. */
169
+ env?: NodeJS.ProcessEnv;
170
+ }): Promise<void>;
171
+ export { TRACKED_CORE_PACKAGES };
172
+ //# sourceMappingURL=drift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift.d.ts","sourceR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AsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAqB9E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,qBAAqB,CACzC,cAAc,EAAE,MAAM,EAAE,EACxB,IAAI,GAAE;IACJ,gEAAgE;IAChE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;IACvD,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IAC/C,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CACnB,GACL,OAAO,CAAC,IAAI,CAAC,CAgEf;AASD,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -0,0 +1,338 @@
1
+ /**
2
+ * Plugin drift detection and auto-refresh.
3
+ *
4
+ * Background
5
+ * ----------
6
+ * The CLI ships with a known-good copy of `@antseed/provider-core` (and other
7
+ * shared packages) inside its own `node_modules`. Each installed plugin in
8
+ * `~/.antseed/plugins/node_modules/<pkg>/` has its OWN pinned version of
9
+ * `@antseed/provider-core` (because plugin `package.json`s use `workspace:*`
10
+ * during development, which pnpm/npm publish rewrites to an exact version).
11
+ *
12
+ * When a user runs `npm i -g @antseed/cli@latest`, the CLI's bundled
13
+ * `provider-core` updates — but the plugins in `~/.antseed/plugins/` do NOT.
14
+ * They keep their original pin, so plugin code keeps importing the OLD
15
+ * `provider-core` even though the CLI itself has the new one.
16
+ *
17
+ * This caused real production damage: a fix to the seller-side request
18
+ * relay (`stream_options.include_usage` injection) shipped in
19
+ * `@antseed/provider-core@0.2.49`, but sellers running the upgraded CLI
20
+ * were still importing `provider-core@0.2.48` from their plugins dir. The
21
+ * fix never took effect for them.
22
+ *
23
+ * What this module does
24
+ * ---------------------
25
+ * 1. Read the version of each `@antseed/*` core package the CLI itself
26
+ * bundles (the "expected" version).
27
+ * 2. Read the version each installed trusted plugin has pinned in its own
28
+ * `package.json` `dependencies` map (the "actual" version).
29
+ * 3. If any plugin pins a stale core version, run `npm install <plugin>@latest`
30
+ * in `~/.antseed/plugins/` for each affected plugin. That naturally pulls
31
+ * in the matching core version because workspace pinning is exact.
32
+ *
33
+ * The check is best-effort: any failure (network down, registry 5xx, npm
34
+ * timeout, permission denied) logs a warning and lets startup continue with
35
+ * the existing (possibly stale) plugins. We never block startup on registry
36
+ * health.
37
+ */
38
+ import { execFile } from 'node:child_process';
39
+ import { promisify } from 'node:util';
40
+ import { existsSync, readFileSync } from 'node:fs';
41
+ import { createRequire } from 'node:module';
42
+ import { join, resolve } from 'node:path';
43
+ import chalk from 'chalk';
44
+ import { getPluginsDir } from './manager.js';
45
+ import { TRUSTED_PLUGINS } from './registry.js';
46
+ const execFileAsync = promisify(execFile);
47
+ /** Core packages whose drift between CLI-bundled and plugin-pinned versions matters. */
48
+ const TRACKED_CORE_PACKAGES = [
49
+ '@antseed/provider-core',
50
+ '@antseed/node',
51
+ '@antseed/router-core',
52
+ '@antseed/api-adapter',
53
+ ];
54
+ /** Hard timeout for a single `npm install` invocation during auto-refresh. */
55
+ const NPM_INSTALL_TIMEOUT_MS = 60_000;
56
+ const requireFromHere = createRequire(import.meta.url);
57
+ /**
58
+ * Read the version of a package as bundled inside the CLI's own
59
+ * `node_modules`. For `@antseed/*` packages, this is the version the CLI
60
+ * was built against and the "source of truth" we want plugins to match.
61
+ *
62
+ * Resolution starts from this module's URL and walks up via Node's module
63
+ * resolution, so it always finds the CLI's own bundled copy (not a hoisted
64
+ * copy from elsewhere).
65
+ *
66
+ * Implementation note: many modern packages (e.g. chalk) declare `"exports"`
67
+ * fields that block direct resolution of `<pkg>/package.json`. To handle
68
+ * those, we first try `require.resolve('<pkg>/package.json')`, and on failure
69
+ * fall back to resolving the package's main entry and walking up its parent
70
+ * directories until we find a `package.json` whose `name` matches.
71
+ *
72
+ * Returns `null` if the package is not bundled with the CLI (which would be
73
+ * a build-time error for `@antseed/*` deps, but we don't want to crash the
74
+ * CLI over it at runtime).
75
+ */
76
+ export function getCliBundledVersion(pkgName) {
77
+ // Fast path: works for any package whose `exports` allows reading
78
+ // `package.json` directly (most packages, including all `@antseed/*` ones).
79
+ try {
80
+ const pkgJsonPath = requireFromHere.resolve(`${pkgName}/package.json`);
81
+ return readVersionFromPackageJson(pkgJsonPath);
82
+ }
83
+ catch {
84
+ // Fall through to the entry-point resolution path.
85
+ }
86
+ // Second fallback: search the standard Node `node_modules` lookup paths
87
+ // directly for `<lookupPath>/<pkgName>/package.json`. This handles
88
+ // workspace packages that have an `exports` field WITHOUT a default
89
+ // resolvable entry (like @antseed/node, which only exposes named
90
+ // subpaths) — those fail BOTH `resolve('<pkg>/package.json')` AND
91
+ // `resolve('<pkg>')`, but the package.json is still on disk.
92
+ const lookupPaths = (requireFromHere.resolve.paths(pkgName) ?? []);
93
+ for (const dir of lookupPaths) {
94
+ const candidate = join(dir, ...pkgName.split('/'), 'package.json');
95
+ if (!existsSync(candidate))
96
+ continue;
97
+ const v = readVersionFromPackageJson(candidate);
98
+ if (v)
99
+ return v;
100
+ }
101
+ // Third fallback: resolve the package's main entry and walk up to its
102
+ // package.json. Last resort for unusual layouts.
103
+ let entry;
104
+ try {
105
+ entry = requireFromHere.resolve(pkgName);
106
+ }
107
+ catch {
108
+ return null;
109
+ }
110
+ let cur = entry;
111
+ for (let i = 0; i < 16; i += 1) {
112
+ const parent = resolve(cur, '..');
113
+ if (parent === cur)
114
+ break;
115
+ cur = parent;
116
+ const candidate = join(cur, 'package.json');
117
+ if (!existsSync(candidate))
118
+ continue;
119
+ try {
120
+ const parsed = JSON.parse(readFileSync(candidate, 'utf-8'));
121
+ if (parsed.name === pkgName && typeof parsed.version === 'string') {
122
+ return parsed.version;
123
+ }
124
+ }
125
+ catch {
126
+ // try next ancestor
127
+ }
128
+ }
129
+ return null;
130
+ }
131
+ function readVersionFromPackageJson(pkgJsonPath) {
132
+ try {
133
+ const raw = readFileSync(pkgJsonPath, 'utf-8');
134
+ const parsed = JSON.parse(raw);
135
+ return typeof parsed.version === 'string' ? parsed.version : null;
136
+ }
137
+ catch {
138
+ return null;
139
+ }
140
+ }
141
+ /**
142
+ * Read the version a given plugin pins for a given core package, by reading
143
+ * the plugin's own `package.json` `dependencies` map.
144
+ *
145
+ * We deliberately do NOT use Node's module resolution here, because we want
146
+ * the EXPECTED dependency version (what the plugin was built against) — not
147
+ * the resolved/hoisted version (which may already be newer if another
148
+ * plugin pulled it up). If the resolved version is newer than what this
149
+ * plugin pins, the plugin is still effectively running on a newer core, but
150
+ * it's a fragile state — the next reinstall could re-pin everything to a
151
+ * mismatched version. So we treat "plugin's declared dep mismatches CLI
152
+ * bundle" as drift even if the resolved version happens to match today.
153
+ *
154
+ * Returns `null` if the plugin is not installed, or if the plugin doesn't
155
+ * declare this core package as a dependency at all (in which case there's
156
+ * nothing to be drifted against).
157
+ */
158
+ export function getPluginPinnedCoreVersion(pluginPackage, corePackage, pluginsDir = getPluginsDir()) {
159
+ const pluginPkgJsonPath = resolve(join(pluginsDir, 'node_modules', ...pluginPackage.split('/'), 'package.json'));
160
+ if (!existsSync(pluginPkgJsonPath))
161
+ return null;
162
+ // Defense in depth: refuse to read outside the plugins dir even if a
163
+ // mischievous plugin name contains `..`. This mirrors the same check
164
+ // loader.ts performs before importing plugin code.
165
+ if (!pluginPkgJsonPath.startsWith(resolve(pluginsDir)))
166
+ return null;
167
+ try {
168
+ const raw = readFileSync(pluginPkgJsonPath, 'utf-8');
169
+ const parsed = JSON.parse(raw);
170
+ const dep = parsed.dependencies?.[corePackage];
171
+ if (typeof dep !== 'string' || dep.length === 0)
172
+ return null;
173
+ return dep;
174
+ }
175
+ catch {
176
+ return null;
177
+ }
178
+ }
179
+ /**
180
+ * Compare plugin-pinned core versions against CLI-bundled core versions and
181
+ * report any drift.
182
+ *
183
+ * `pluginPackages` should be the set of plugins the seller/buyer is about to
184
+ * load. We don't check plugins that aren't being used.
185
+ *
186
+ * "Drift" here means: the plugin's `dependencies[corePkg]` is a value that
187
+ * is not equal to the CLI-bundled version of `corePkg`. We treat any
188
+ * mismatch as drift — including, deliberately, the case where the plugin's
189
+ * pinned version is NEWER than the CLI's bundled version. That's also a
190
+ * fragile state (the plugin's importable surface may rely on APIs the CLI
191
+ * doesn't yet provide), and the user should know.
192
+ *
193
+ * We compare strings exactly, not via semver. plugins published from this
194
+ * monorepo have `workspace:*` deps rewritten to exact versions on publish,
195
+ * so the dep value is always a bare version like `0.2.48`. Range deps
196
+ * (`^0.2.0`, `~0.2.5`) are treated as drift unless they happen to literally
197
+ * equal the bundled version string — that's by design, because we can't
198
+ * tell from a range whether the resolved version is what we want, and
199
+ * forcing a re-resolve via `npm install` is the safe default.
200
+ */
201
+ export function detectPluginDrift(pluginPackages, pluginsDir = getPluginsDir(), bundledVersions = computeBundledVersions()) {
202
+ const driftedPlugins = [];
203
+ const missingPlugins = [];
204
+ for (const plugin of pluginPackages) {
205
+ const pluginPkgJsonPath = resolve(join(pluginsDir, 'node_modules', ...plugin.split('/'), 'package.json'));
206
+ if (!existsSync(pluginPkgJsonPath)) {
207
+ missingPlugins.push(plugin);
208
+ continue;
209
+ }
210
+ const stale = [];
211
+ for (const corePkg of TRACKED_CORE_PACKAGES) {
212
+ const cliVersion = bundledVersions[corePkg];
213
+ if (!cliVersion)
214
+ continue;
215
+ const pluginPin = getPluginPinnedCoreVersion(plugin, corePkg, pluginsDir);
216
+ if (pluginPin == null)
217
+ continue;
218
+ if (pluginPin !== cliVersion) {
219
+ stale.push({ pkg: corePkg, pluginPinnedVersion: pluginPin, cliBundledVersion: cliVersion });
220
+ }
221
+ }
222
+ if (stale.length > 0) {
223
+ driftedPlugins.push({ plugin, staleCorePackages: stale });
224
+ }
225
+ }
226
+ return { driftedPlugins, missingPlugins };
227
+ }
228
+ function computeBundledVersions() {
229
+ const out = {};
230
+ for (const pkg of TRACKED_CORE_PACKAGES) {
231
+ out[pkg] = getCliBundledVersion(pkg);
232
+ }
233
+ return out;
234
+ }
235
+ /**
236
+ * Reinstall the given plugins at `@latest` to pull in fresh transitive deps
237
+ * (notably the right `@antseed/provider-core` pin).
238
+ *
239
+ * Best-effort: each plugin is installed independently; one failure does not
240
+ * abort the others. Each install has a 60-second timeout.
241
+ *
242
+ * SECURITY: only call this with plugins from the trusted-plugins registry
243
+ * (or otherwise known-safe). We don't validate that here because the
244
+ * caller is in a better position to enforce it; the typical caller is
245
+ * `ensurePluginsUpToDate` below, which DOES enforce the trust list.
246
+ */
247
+ export async function refreshPlugins(plugins) {
248
+ const refreshed = [];
249
+ const failed = [];
250
+ for (const plugin of plugins) {
251
+ try {
252
+ await execFileAsync('npm', ['install', '--ignore-scripts', `${plugin}@latest`], { cwd: getPluginsDir(), timeout: NPM_INSTALL_TIMEOUT_MS });
253
+ refreshed.push(plugin);
254
+ }
255
+ catch (err) {
256
+ const reason = err instanceof Error
257
+ ? (err.message.split('\n').slice(0, 3).join(' / ') || err.name)
258
+ : String(err);
259
+ failed.push({ plugin, reason });
260
+ }
261
+ }
262
+ return { refreshed, failed };
263
+ }
264
+ /**
265
+ * Top-level helper: detect drift, log a summary, and (unless skipped) refresh
266
+ * the drifted plugins.
267
+ *
268
+ * Designed to be called once at startup of `seller start` / `buyer start`,
269
+ * BEFORE any plugin is dynamically imported. (Once imported, refreshing on
270
+ * disk has no effect on the running process — Node has already cached the
271
+ * old module.)
272
+ *
273
+ * Called with `pluginPackages = []` is a no-op.
274
+ *
275
+ * Env vars honored:
276
+ * - `ANTSEED_SKIP_PLUGIN_UPDATE_CHECK=1`: skip the entire drift check.
277
+ * Use this in air-gapped environments or CI where plugins are pre-baked.
278
+ *
279
+ * The function never throws on its own; refresh failures are logged and
280
+ * swallowed. The only way it errors is if the `pluginPackages` list itself
281
+ * triggers an internal logic bug.
282
+ */
283
+ export async function ensurePluginsUpToDate(pluginPackages, opts = {}) {
284
+ const log = opts.log ?? ((m) => console.log(m));
285
+ const warn = opts.warn ?? ((m) => console.warn(m));
286
+ const env = opts.env ?? process.env;
287
+ if (pluginPackages.length === 0)
288
+ return;
289
+ if (isTruthy(env['ANTSEED_SKIP_PLUGIN_UPDATE_CHECK']))
290
+ return;
291
+ // Restrict to the trusted plugin set. We do NOT auto-update third-party
292
+ // plugins — those should be managed manually because their release
293
+ // cadence and trust model are out of our hands.
294
+ const trustedPackages = new Set(TRUSTED_PLUGINS.map((p) => p.package));
295
+ const eligible = pluginPackages.filter((p) => trustedPackages.has(p));
296
+ const skippedThirdParty = pluginPackages.filter((p) => !trustedPackages.has(p));
297
+ if (skippedThirdParty.length > 0) {
298
+ log(chalk.dim(`Skipping plugin drift check for non-trusted package(s): ${skippedThirdParty.join(', ')}`));
299
+ }
300
+ if (eligible.length === 0)
301
+ return;
302
+ const report = detectPluginDrift(eligible, opts.pluginsDir ?? getPluginsDir(), opts.bundledVersions ?? computeBundledVersions());
303
+ if (report.driftedPlugins.length === 0) {
304
+ // Quiet on the happy path — the existing "Package versions:" log line
305
+ // already surfaces what's installed.
306
+ return;
307
+ }
308
+ log(chalk.yellow('⚠ Detected stale plugin core dependencies:'));
309
+ for (const drift of report.driftedPlugins) {
310
+ log(chalk.yellow(` ${drift.plugin}:`));
311
+ for (const stale of drift.staleCorePackages) {
312
+ log(chalk.yellow(` ${stale.pkg}: plugin pins ${stale.pluginPinnedVersion}, CLI bundles ${stale.cliBundledVersion}`));
313
+ }
314
+ }
315
+ log(chalk.dim(' Refreshing affected plugin(s) from npm…'));
316
+ const refresh = opts.refresh ?? refreshPlugins;
317
+ const driftedPluginNames = report.driftedPlugins.map((d) => d.plugin);
318
+ const result = await refresh(driftedPluginNames);
319
+ if (result.refreshed.length > 0) {
320
+ log(chalk.green(`✓ Refreshed plugin(s): ${result.refreshed.join(', ')}`));
321
+ }
322
+ if (result.failed.length > 0) {
323
+ for (const f of result.failed) {
324
+ warn(chalk.yellow(` Failed to refresh ${f.plugin}: ${f.reason}`));
325
+ }
326
+ warn(chalk.yellow(` Continuing startup with the previously-installed plugin version(s).`));
327
+ warn(chalk.dim(` To retry manually: cd ${getPluginsDir()} && npm install ${result.failed.map((f) => `${f.plugin}@latest`).join(' ')}`));
328
+ }
329
+ }
330
+ function isTruthy(value) {
331
+ if (!value)
332
+ return false;
333
+ const v = value.trim().toLowerCase();
334
+ return v === '1' || v === 'true' || v === 'yes' || v === 'on';
335
+ }
336
+ // Exported for tests / startup logging.
337
+ export { TRACKED_CORE_PACKAGES };
338
+ //# sourceMappingURL=drift.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift.js","sourceRoot":"","sources":["../../src/plugins/drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAEzC,wFAAwF;AACxF,MAAM,qBAAqB,GAAG;IAC5B,wBAAwB;IACxB,eAAe;IACf,sBAAsB;IACtB,sBAAsB;CACd,CAAA;AAEV,8EA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AC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACpC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,CAAA;AAC/D,CAAC;AAED,wCAAwC;AACxC,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=drift.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift.test.d.ts","sourceRoot":"","sources":["../../src/plugins/drift.test.ts"],"names":[],"mappings":""}