@vini-ds/agent 0.1.0-alpha.4 → 0.1.0-alpha.5
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/SETUP.md +5 -3
- package/SKILL.md +3 -3
- package/context/current.json +6 -6
- package/mcp.mjs +2 -2
- package/package.json +3 -3
- package/updates.mjs +65 -11
package/SETUP.md
CHANGED
|
@@ -47,13 +47,15 @@ The package's `mcp.mjs` is a read-only local STDIO MCP server. It requires Node
|
|
|
47
47
|
|
|
48
48
|
Call `check_updates` to inspect installed VINi package manifests and, on explicit request, read public npm metadata for the current CLI and its exact package set. The call never installs or executes registry code; an unavailable registry is reported as unavailable, not as an absence of updates. Review the exact CLI version's `update --plan`, then explicitly run `update`. Registry metadata does not verify installed tarball bytes or replace the product's build and checks.
|
|
49
49
|
|
|
50
|
+
When an exact target has already been selected, optionally pass `target` to `check_updates` as `{ "version": "…", "ui": "…", "tokens": "…", "agent": "…" }` with the exact version and published names. Its comparisons with installed packages, receipt, context and registry latest are separate; the supplied target itself is not independently authenticated. Without a target, the tool does not choose one for the user.
|
|
51
|
+
|
|
50
52
|
An update changes installed packages, but a running server or an already connected MCP client may still serve the previous version. Complete these checks separately:
|
|
51
53
|
|
|
52
54
|
1. Identify the server and project serving the user's existing application URL. Where the server is safely identifiable and its restart is authorized, refresh or restart that specific dev or preview server with its existing settings, reload the original URL, and exercise the affected component. A new temporary server does not verify the original page. Do not terminate an unknown process; if the server cannot be safely identified or controlled, state the action the owner needs to take and leave the page check pending.
|
|
53
|
-
2. Reconnect VINi MCP in the actual client being used. Through that
|
|
55
|
+
2. Reconnect the project's VINi MCP in the actual client being used. Through that same connection, read `vini://system/current`, call `get_component_contract` for the affected component and call `check_updates`. Compare all three responses with the exact chosen release and the installed package names, versions and receipt; a newer registry `latest` is not automatically the chosen target. If any read is unavailable or differs, leave MCP verification pending and state the next action. If reconnecting is unavailable or has already failed to replace the old context, restart the client and repeat all three reads. A separate STDIO process only verifies that process.
|
|
54
56
|
|
|
55
|
-
After a package-name migration, the already published alpha.3 MCP may report a package/receipt mismatch because its running code still looks for the older import paths.
|
|
57
|
+
After a package-name migration, the already published alpha.3 MCP may report a package/receipt mismatch because its running code still looks for the older import paths. Independently inspect the installed packages and receipt using the selected release's CLI. If they match, reconnect the project MCP and repeat the checks instead of reinstalling; if they differ, investigate the installation. The newer behavior does not change the already published alpha.3 process.
|
|
56
58
|
|
|
57
|
-
Report package installation, the original page check, and the current client's MCP check independently. A successful build or
|
|
59
|
+
Report package installation, the original page check, and the current client's MCP check independently. Call the update fully verified only when the installed set matches the chosen release, the original page and affected interaction have been checked, and all three MCP reads through the current client agree with that set. A successful build or standalone MCP check does not establish the others.
|
|
58
60
|
|
|
59
61
|
Install or update the matching component, token and agent package versions together. The application's own build, tests and review remain necessary after an update. The agent context does not certify the installed dependency graph or silently change it.
|
package/SKILL.md
CHANGED
|
@@ -13,9 +13,9 @@ For an update request, call the read-only `check_updates` tool. Report the insta
|
|
|
13
13
|
|
|
14
14
|
After the packages are updated, identify the dev or preview server that serves the user's existing application URL and the project it runs from. If its process is safely identifiable and the authorized workflow permits it, refresh or restart that specific server using its original project and settings; do not stop an unknown process or substitute a different temporary server. Reload the same URL and exercise the affected component. If the server cannot be identified or restarted safely, explain the exact action needed and leave the original page unverified.
|
|
15
15
|
|
|
16
|
-
Separately reconnect the VINi MCP in the client the user actually uses, then read `vini://system/current`, the affected component contract with `get_component_contract`, and `check_updates` through that
|
|
16
|
+
Separately reconnect the project's VINi MCP in the client the user actually uses, then read `vini://system/current`, the affected component contract with `get_component_contract`, and `check_updates` through that same connection. Compare all three with the exact chosen release and installed package names, versions and receipt; registry `latest` is a separate fact, not necessarily the chosen target. A separate STDIO probe or a prepared configuration does not verify the existing client session. If a read is unavailable or versions disagree, report MCP verification as pending and state the next action. Restart the client and repeat the three reads only if reconnecting is unavailable or already failed to replace the old context.
|
|
17
17
|
|
|
18
|
-
After a package-name migration, an already published alpha.3 MCP may report a package/receipt mismatch because it still looks for the older import paths.
|
|
18
|
+
After a package-name migration, an already published alpha.3 MCP may report a package/receipt mismatch because it still looks for the older import paths. Independently inspect the installed packages and receipt with the selected release's CLI. If they match, reconnect the project MCP instead of reinstalling; if they differ, investigate the installation. The new server cannot change an already running old process.
|
|
19
19
|
|
|
20
20
|
Use `search_ds` and `get_component_contract` for components and their public exports, props, slots, limitations and type declarations. `get_package_profile` describes the supported React DOM setup. Use `get_token` or `resolve_token` for existing Foundation values; explicit token modes are required where the contract says so. Other native renderers are outside this package's scope.
|
|
21
21
|
|
|
@@ -23,4 +23,4 @@ Compose product screens through public props and slots. Keep shared component ap
|
|
|
23
23
|
|
|
24
24
|
Keep existing app providers. Load the published font, theme, typography and UI styles once, and use `ThemeBrandProvider` with a supported theme/colorway and typography scope. Use a single React instance. Refer to setup for actual imports and examples.
|
|
25
25
|
|
|
26
|
-
Run the product's build and the checks relevant to the changed interaction. Preview through its HTTP development or preview server, verify styles and font assets and exercise the changed control. Report package installation, verification of the original application page, and verification through the current client MCP as separate results; mark any unperformed step as pending.
|
|
26
|
+
Run the product's build and the checks relevant to the changed interaction. Preview through its HTTP development or preview server, verify styles and font assets and exercise the changed control. Report package installation, verification of the original application page, and verification through the current client MCP as separate results; mark any unperformed step as pending. Only report the update fully verified when the installed set matches the chosen release, the original page and affected interaction have been checked, and all three reads through the current client's connection agree with that set.
|
package/context/current.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vini-ds/agent",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"packages": {
|
|
5
5
|
"ui": {
|
|
6
6
|
"name": "@vini-ds/ui",
|
|
7
7
|
"importName": "@vini-ds/ui",
|
|
8
|
-
"version": "0.1.0-alpha.
|
|
8
|
+
"version": "0.1.0-alpha.5"
|
|
9
9
|
},
|
|
10
10
|
"tokens": {
|
|
11
11
|
"name": "@vini-ds/tokens",
|
|
12
12
|
"importName": "@vini-ds/tokens",
|
|
13
|
-
"version": "0.1.0-alpha.
|
|
13
|
+
"version": "0.1.0-alpha.5"
|
|
14
14
|
},
|
|
15
15
|
"agent": {
|
|
16
16
|
"name": "@vini-ds/agent",
|
|
17
17
|
"importName": "@vini-ds/agent",
|
|
18
|
-
"version": "0.1.0-alpha.
|
|
18
|
+
"version": "0.1.0-alpha.5"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"baseline": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"packageManifestSha256": "sha256:44fc4d1f985ebe9d66344ec2cdb45640023eab886028dc7bb8e0be07f8c989e7"
|
|
38
38
|
},
|
|
39
39
|
"changes": {
|
|
40
|
-
"fromVersion": "0.1.0-alpha.
|
|
41
|
-
"summary": "
|
|
40
|
+
"fromVersion": "0.1.0-alpha.4",
|
|
41
|
+
"summary": "Проверка выбранной версии, установленной связки и устаревшего MCP; отдельные результаты страницы и клиента.",
|
|
42
42
|
"components": []
|
|
43
43
|
}
|
|
44
44
|
},
|
package/mcp.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export const toolDefinitions = [
|
|
|
20
20
|
{ name: 'get_platform_status', description: 'Read the scope of the public React DOM distribution; other renderers are explicitly unsupported.', inputSchema: schema({ id: string }, ['id']) },
|
|
21
21
|
{ name: 'get_token', description: 'Read a Foundation token and its available modes.', inputSchema: schema({ id: string }, ['id']) },
|
|
22
22
|
{ name: 'resolve_token', description: 'Resolve an existing token with explicitly selected Foundation modes; follows aliases and checked sums.', inputSchema: schema({ id: string, modeByCollection: { type: 'object', additionalProperties: { type: 'string' } } }, ['id', 'modeByCollection']) },
|
|
23
|
-
{ name: 'check_updates', description: 'Read installed VINi npm package versions and verify available release metadata from the public npm registry. Does not install or execute packages. A registry failure is not evidence that no update exists.', inputSchema: schema({}) },
|
|
23
|
+
{ name: 'check_updates', description: 'Read installed VINi npm package versions and verify available latest release metadata from the public npm registry. Optionally compare a caller-selected exact target separately from latest. Does not install or execute packages. A registry failure is not evidence that no update exists.', inputSchema: schema({ target: schema({ version: string, ui: string, tokens: string, agent: string }, ['version', 'ui', 'tokens', 'agent']) }) },
|
|
24
24
|
].map((tool) => ({ ...tool, annotations: tool.name === 'check_updates' ? { ...annotations, openWorldHint: true } : annotations }));
|
|
25
25
|
|
|
26
26
|
function requiredString(value, label) {
|
|
@@ -96,7 +96,7 @@ export async function createPublicService() {
|
|
|
96
96
|
const definition = toolDefinitions.find((tool) => tool.name === name);
|
|
97
97
|
if (!definition) throw new Error(`Unknown tool ${name}`);
|
|
98
98
|
validateArguments(definition, args);
|
|
99
|
-
if (name === 'check_updates') return checkUpdates(metadata);
|
|
99
|
+
if (name === 'check_updates') return checkUpdates(metadata, { target: args.target });
|
|
100
100
|
if (name === 'get_component_contract') return envelope({ component: contract(args.id, args.platform) });
|
|
101
101
|
if (name === 'get_package_profile') {
|
|
102
102
|
if (args.id !== 'react-dom-reference') throw new Error('Only react-dom-reference is available in this public package');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vini-ds/agent",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"description": "Public VINi React DOM component and token context with a local read-only MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"packageManifestSha256": "sha256:44fc4d1f985ebe9d66344ec2cdb45640023eab886028dc7bb8e0be07f8c989e7"
|
|
35
35
|
},
|
|
36
36
|
"changes": {
|
|
37
|
-
"fromVersion": "0.1.0-alpha.
|
|
38
|
-
"summary": "
|
|
37
|
+
"fromVersion": "0.1.0-alpha.4",
|
|
38
|
+
"summary": "Проверка выбранной версии, установленной связки и устаревшего MCP; отдельные результаты страницы и клиента.",
|
|
39
39
|
"components": []
|
|
40
40
|
}
|
|
41
41
|
}
|
package/updates.mjs
CHANGED
|
@@ -10,6 +10,9 @@ const packageName = /^@[a-z0-9][a-z0-9-]*\/[a-z0-9][a-z0-9-]*$/u;
|
|
|
10
10
|
const keys = ['ui', 'tokens', 'agent'];
|
|
11
11
|
const hash = /^sha256:[a-f0-9]{64}$/u;
|
|
12
12
|
const runFile = promisify(execFile);
|
|
13
|
+
const legacyNames = { ui: '@timelex/vini-ui', tokens: '@timelex/vini-tokens', agent: '@timelex/vini-agent' };
|
|
14
|
+
const viniNames = { ui: '@vini/ui', tokens: '@vini/tokens', agent: '@vini/agent' };
|
|
15
|
+
const directNames = { ui: '@vini-ds/ui', tokens: '@vini-ds/tokens', agent: '@vini-ds/agent' };
|
|
13
16
|
function compareVersions(a, b) {
|
|
14
17
|
function parse(version) {
|
|
15
18
|
const match = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([a-z0-9-]+(?:\.[a-z0-9-]+)*))?$/u.exec(version);
|
|
@@ -32,6 +35,33 @@ function compareVersions(a, b) {
|
|
|
32
35
|
}
|
|
33
36
|
return 0;
|
|
34
37
|
}
|
|
38
|
+
function sameNames(left, right) { return keys.every(key => left?.[key] === right?.[key]); }
|
|
39
|
+
function contextDistribution(metadata) {
|
|
40
|
+
return { version: metadata.version, ...Object.fromEntries(keys.map(key => [key, metadata.packages?.[key]?.name])) };
|
|
41
|
+
}
|
|
42
|
+
function contextIsConsistent(metadata) {
|
|
43
|
+
if (!exactVersion.test(metadata?.version ?? '') || !keys.every(key => typeof metadata.packages?.[key]?.name === 'string' && packageName.test(metadata.packages[key].name) && metadata.packages[key].version === metadata.version) ||
|
|
44
|
+
new Set(keys.map(key => metadata.packages[key].name)).size !== keys.length) return false;
|
|
45
|
+
try { compareVersions(metadata.version, metadata.version); return true; } catch { return false; }
|
|
46
|
+
}
|
|
47
|
+
function targetFamily(reference, target) {
|
|
48
|
+
if (!exactVersion.test(reference?.version ?? '') || !keys.every(key => packageName.test(reference[key] ?? ''))) throw new Error('installed or context package set cannot be verified');
|
|
49
|
+
if (sameNames(reference, target)) return 'same-family';
|
|
50
|
+
if (compareVersions(reference.version, target.version) < 0) {
|
|
51
|
+
if (sameNames(reference, legacyNames) && sameNames(target, viniNames)) return 'legacy-to-native';
|
|
52
|
+
if ((sameNames(reference, legacyNames) || sameNames(reference, viniNames)) && sameNames(target, directNames)) return 'manual-import-migration';
|
|
53
|
+
}
|
|
54
|
+
throw new Error('latest CLI does not describe a compatible exact package set');
|
|
55
|
+
}
|
|
56
|
+
function validateSelectedTarget(value) {
|
|
57
|
+
if (!value || typeof value !== 'object' || Array.isArray(value) ||
|
|
58
|
+
Object.keys(value).length !== 4 || !['version', ...keys].every(key => Object.hasOwn(value, key)) ||
|
|
59
|
+
typeof value.version !== 'string' || value.version.length > 100 || !exactVersion.test(value.version) || !keys.every(key => typeof value[key] === 'string' && value[key].length <= 214 && packageName.test(value[key])) ||
|
|
60
|
+
new Set(keys.map(key => value[key])).size !== keys.length) throw new Error('target must contain an exact version and three distinct scoped package names');
|
|
61
|
+
compareVersions(value.version, value.version);
|
|
62
|
+
return { version: value.version, ui: value.ui, tokens: value.tokens, agent: value.agent };
|
|
63
|
+
}
|
|
64
|
+
function equalsRelease(left, right) { return left?.version === right?.version && sameNames(left, right); }
|
|
35
65
|
function validRelease(value) {
|
|
36
66
|
try {
|
|
37
67
|
const url = new URL(value.atlas.url);
|
|
@@ -102,12 +132,13 @@ async function installedStatus(projectRoot, metadata) {
|
|
|
102
132
|
catch { return [key, { error: 'not-installed-or-unreadable' }]; }
|
|
103
133
|
})));
|
|
104
134
|
const matchesReceipt = keys.every((key) => packages[key].name === expected[key] && packages[key].version === expected.version);
|
|
105
|
-
const
|
|
135
|
+
const contextKnown = contextIsConsistent(metadata);
|
|
136
|
+
const matchesContext = contextKnown && keys.every((key) => packages[key].name === metadata.packages[key].name && packages[key].version === metadata.version);
|
|
106
137
|
return { status: matchesReceipt && matchesContext ? 'matched' : 'mismatch', packages,
|
|
107
138
|
receipt: { version: expected.version, ui: expected.ui, tokens: expected.tokens, agent: expected.agent },
|
|
108
|
-
context: {
|
|
139
|
+
context: { ...contextDistribution(metadata), metadataStatus: contextKnown ? 'consistent' : 'incomplete-or-inconsistent', baseline: metadata.baseline, ...(metadata.viniRelease ? { viniRelease: metadata.viniRelease } : {}) },
|
|
109
140
|
matchesReceipt, matchesContext,
|
|
110
|
-
...(matchesReceipt && matchesContext ? {} : { mismatchKind: matchesReceipt ? 'mcp-context' : '
|
|
141
|
+
...(matchesReceipt && matchesContext ? {} : { mismatchKind: !matchesReceipt ? 'package-receipt' : contextKnown ? 'mcp-context' : 'context-unverified' }) };
|
|
111
142
|
} catch { return { status: 'unknown', reason: 'Installed package manifests or receipt could not be verified' }; }
|
|
112
143
|
}
|
|
113
144
|
|
|
@@ -128,15 +159,21 @@ async function registryJson(name, version) {
|
|
|
128
159
|
}
|
|
129
160
|
|
|
130
161
|
// Optional fetchJson is a test seam; the installed server always uses npm HTTPS.
|
|
131
|
-
export async function checkUpdates(metadata, { projectRoot = process.cwd(), fetchJson = registryJson } = {}) {
|
|
162
|
+
export async function checkUpdates(metadata, { projectRoot = process.cwd(), fetchJson = registryJson, target } = {}) {
|
|
163
|
+
const selected = target === undefined ? null : validateSelectedTarget(target);
|
|
132
164
|
const installed = await installedStatus(projectRoot, metadata);
|
|
133
165
|
let available;
|
|
134
166
|
try {
|
|
135
167
|
const cli = await fetchJson('vini-ds', 'latest'), distribution = cli.viniDistribution;
|
|
136
168
|
if (cli.name !== 'vini-ds' || !exactVersion.test(cli.version ?? '') || !/^sha512-[A-Za-z0-9+/]+={0,2}$/u.test(cli.dist?.integrity ?? '') || !distribution || distribution.version !== cli.version ||
|
|
137
|
-
!keys.every((key) => packageName.test(distribution[key] ?? '')
|
|
169
|
+
!keys.every((key) => packageName.test(distribution[key] ?? ''))) {
|
|
138
170
|
throw new Error('latest CLI does not describe a compatible exact package set');
|
|
139
171
|
}
|
|
172
|
+
// A consistent installation and receipt identify the project even when
|
|
173
|
+
// this server's context is stale. Otherwise use only this server's context
|
|
174
|
+
// as the family reference; never treat a broken receipt as authoritative.
|
|
175
|
+
const reference = installed.matchesReceipt ? installed.receipt : contextDistribution(metadata);
|
|
176
|
+
const familyTransition = targetFamily(reference, distribution);
|
|
140
177
|
const manifests = Object.fromEntries(await Promise.all(keys.map(async (key) => [key, await fetchJson(distribution[key], distribution.version)])));
|
|
141
178
|
const dsFamily = keys.every(key => distribution[key] === `@vini-ds/${key}`);
|
|
142
179
|
if (!dsFamily && keys.some(key => distribution[key] === `@vini-ds/${key}`)) throw new Error('mixed VINi package families');
|
|
@@ -167,25 +204,42 @@ export async function checkUpdates(metadata, { projectRoot = process.cwd(), fetc
|
|
|
167
204
|
: tokenDependency !== `npm:${distribution.tokens}@${distribution.version}` || (tokenPeer !== undefined && tokenPeer !== distribution.version))) {
|
|
168
205
|
throw new Error('UI package does not select the matching token package');
|
|
169
206
|
}
|
|
170
|
-
const fromVersion = installed.
|
|
207
|
+
const fromVersion = installed.matchesReceipt ? installed.receipt.version : null;
|
|
171
208
|
const changes = cli.viniRelease?.changes;
|
|
172
209
|
const comparison = fromVersion === null ? null : compareVersions(fromVersion, distribution.version);
|
|
173
210
|
available = { status: 'verified-metadata', registry, version: distribution.version, packages: distribution, cliIntegrity: cli.dist.integrity,
|
|
174
211
|
integrity: Object.fromEntries(keys.map((key) => [key, manifests[key].dist.integrity])),
|
|
212
|
+
familyTransition,
|
|
213
|
+
matchesInstalled: installed.matchesReceipt ? comparison === 0 && sameNames(installed.receipt, distribution) : null,
|
|
214
|
+
matchesContext: contextIsConsistent(metadata) ? equalsRelease(contextDistribution(metadata), distribution) : null,
|
|
175
215
|
...(cli.viniRelease ? { viniRelease: cli.viniRelease } : {}),
|
|
176
216
|
changes: changes?.fromVersion === fromVersion ? changes : { status: 'not-available-for-installed-version' },
|
|
177
217
|
relation: comparison === null ? 'unknown' : comparison === 0 ? 'same' : comparison < 0 ? 'newer' : 'older' };
|
|
178
218
|
} catch (error) { available = { status: 'unavailable-or-unverified', registry, reason: error.message }; }
|
|
219
|
+
const installedKnown = installed.packages && keys.every(key => typeof installed.packages[key]?.name === 'string' && typeof installed.packages[key]?.version === 'string');
|
|
220
|
+
const selectedTarget = selected ? { status: 'provided', ...selected,
|
|
221
|
+
matchesInstalled: installedKnown ? keys.every(key => installed.packages[key].name === selected[key] && installed.packages[key].version === selected.version) : null,
|
|
222
|
+
matchesReceipt: installed.receipt ? equalsRelease(installed.receipt, selected) : null,
|
|
223
|
+
matchesContext: contextIsConsistent(metadata) ? equalsRelease(contextDistribution(metadata), selected) : null,
|
|
224
|
+
matchesLatest: available.status === 'verified-metadata' ? equalsRelease(available.packages, selected) : null,
|
|
225
|
+
verification: 'caller-supplied-not-independently-verified' } : { status: 'not-provided' };
|
|
179
226
|
const nextStep = installed.mismatchKind === 'mcp-context' ?
|
|
180
|
-
'Installed packages match the receipt, but this MCP context does not match them. Reconnect the project VINi MCP in this client,
|
|
181
|
-
installed.
|
|
227
|
+
'Installed packages match the receipt, but this MCP context does not match them. Reconnect the project VINi MCP once in this client. If reconnect is unavailable or was already attempted and the context remains stale, fully quit and reopen this specific client. Then read vini://system/current and the affected component contract and run check_updates again through the same client. Do not repair packages based on the old context alone.' :
|
|
228
|
+
installed.mismatchKind === 'context-unverified' ?
|
|
229
|
+
'Installed packages match the receipt, but this MCP context metadata is incomplete or inconsistent. Reconnect the project VINi MCP once in this client. If reconnect is unavailable or was already attempted and the context remains unverified, fully quit and reopen this specific client. Then read vini://system/current and the affected component contract and run check_updates again through the same client. Do not repair packages based on this context alone.' :
|
|
230
|
+
installed.status === 'mismatch' ? 'Inspect the installed package names, versions and receipt before changing the setup; the mismatch alone does not establish which is wrong.' :
|
|
231
|
+
selected && installed.status === 'matched' && selectedTarget.matchesInstalled && selectedTarget.matchesContext ?
|
|
232
|
+
'Installed package manifests and this MCP context match the caller-selected target. Verify vini://system/current, the affected component contract and check_updates through the same client; a standalone STDIO check does not establish client verification. Registry latest is a separate result, and an unavailable registry does not mean there is no update.' :
|
|
233
|
+
selected && installed.status === 'matched' && !selectedTarget.matchesInstalled ?
|
|
234
|
+
'The caller-selected target differs from the installed package set. Verify the exact target and review the applicable update plan before any change; registry latest is a separate result.' :
|
|
182
235
|
available.status !== 'verified-metadata' ? 'Registry metadata could not be verified; retry later. This does not mean there is no update.' :
|
|
183
236
|
installed.status !== 'matched' ? 'Check the project npm setup before selecting an update.' :
|
|
184
237
|
available.relation === 'same' ? 'The installed package set matches this CLI release.' :
|
|
185
238
|
available.relation === 'older' ? 'The installed package set is newer than the latest CLI release; no downgrade is proposed.' :
|
|
186
|
-
`Review npx vini-ds@${available.version} update --plan
|
|
239
|
+
available.familyTransition === 'manual-import-migration' ? `Review npx vini-ds@${available.version} update --plan and migrate the project imports and configuration before explicitly updating; then reconnect the project MCP in the current client.` :
|
|
240
|
+
`Review npx vini-ds@${available.version} update --plan, then run the exact update and reconnect the project MCP in the current client.`;
|
|
187
241
|
const status = installed.status === 'not-configured' ? 'not-installed' : installed.status === 'mismatch' ? 'mismatch' :
|
|
188
242
|
installed.status !== 'matched' || available.status !== 'verified-metadata' ? 'unknown' : available.relation === 'same' ? 'current' : available.relation === 'older' ? 'ahead-of-latest' : 'update-available';
|
|
189
|
-
return { status, installed, available, nextStep, readOnly: true, installationChanged: false,
|
|
190
|
-
limitations: ['npm metadata discovery does not verify tarball bytes or product behavior', '
|
|
243
|
+
return { status, statusScope: 'package-context-and-registry-latest', installed, available, target: selectedTarget, nextStep, readOnly: true, installationChanged: false,
|
|
244
|
+
limitations: ['npm metadata discovery does not verify tarball bytes or product behavior', 'client-session verification requires current, the affected component contract, and check_updates in that same client; standalone STDIO does not verify it'] };
|
|
191
245
|
}
|