@getmarrow/install 0.1.56 → 0.1.57
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 +5 -1
- package/package.json +1 -1
- package/src/installer.js +37 -12
package/README.md
CHANGED
|
@@ -101,7 +101,11 @@ npx @getmarrow/install controller stop
|
|
|
101
101
|
|
|
102
102
|
Persistent controller lifecycle is currently Linux-only. On macOS or Windows, activation still writes supported configuration and verifies one server-side install self-test without certifying that hooks continuously ran; run `npx @getmarrow/install sidecar` under an owner-managed service and pass `--no-controller`. The controller does not silently upgrade packages, change governance policy, rotate credentials, or modify unrelated project configuration.
|
|
103
103
|
|
|
104
|
-
## What's New in v0.1.
|
|
104
|
+
## What's New in v0.1.57
|
|
105
|
+
|
|
106
|
+
v0.1.57 pins the npm-verified MCP `3.9.88` and SDK `3.7.63` packages. Doctor now recognizes an installed and lockfile-verified SDK `3.7.63` instead of suggesting `3.7.62`. If a workspace has a newer stable SDK version, doctor preserves it and asks for official registry verification before replacement. The generated MCP setup, hooks, and update instructions target `3.9.88`; restart the owning harness and run `npx @getmarrow/install@latest doctor --self-test` after activation.
|
|
107
|
+
|
|
108
|
+
## Previous: v0.1.56
|
|
105
109
|
|
|
106
110
|
v0.1.56 pins the officially verified MCP `3.9.80` release from source `ee1eda3f201965a6530256accbdf175660dd8ad6` with registry integrity `sha512-uou3X18pESV39EMmddDrYN7yd6MrZzosrnQ1eRtvK5j3yuBLAlupj5kQVrrKEWAL6xwuLebXq2isivK2O/2WrA==`; SDK remains `3.7.62`. Doctor now directs stale, mixed, or version-unknown MCP installations through one `npx -y @getmarrow/install@latest update`, followed by one owning-harness restart and one `doctor --self-test` verification. The update resolves one official target and applies it consistently across detected Marrow-managed instructions, MCP launch configuration, and supported native hooks without claiming that already-running processes changed.
|
|
107
111
|
|
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -10,11 +10,11 @@ const { evidence: localControlEvidence } = require('./control-state');
|
|
|
10
10
|
const DEFAULT_BASE_URL = 'https://api.getmarrow.ai';
|
|
11
11
|
const MARROW_BLOCK_START = '<!-- marrow:passive-start -->';
|
|
12
12
|
const MARROW_BLOCK_END = '<!-- marrow:passive-end -->';
|
|
13
|
-
const MCP_ADAPTER_VERSION = '3.9.
|
|
14
|
-
const MCP_ADAPTER_SOURCE_SHA = '
|
|
15
|
-
const MCP_ADAPTER_INTEGRITY = 'sha512-
|
|
16
|
-
const SDK_ADAPTER_VERSION = '3.7.
|
|
17
|
-
const SDK_ADAPTER_INTEGRITY = 'sha512-
|
|
13
|
+
const MCP_ADAPTER_VERSION = '3.9.88';
|
|
14
|
+
const MCP_ADAPTER_SOURCE_SHA = '2385f0554dd9455e6a7d2c0396058710ab56611a';
|
|
15
|
+
const MCP_ADAPTER_INTEGRITY = 'sha512-1WQtVU8oT1XLGFa9aINm9Ypn/xhNh/mPLpK2bziPIxRURsAGrs8TAfb23JL7HXDcmpXFgMLd8R6gmltVbBbHIg==';
|
|
16
|
+
const SDK_ADAPTER_VERSION = '3.7.63';
|
|
17
|
+
const SDK_ADAPTER_INTEGRITY = 'sha512-5BiV1P0J1NMVdgjqxqULfM+zGrTjHBuWm1amKZWba4yW6C3t10VlhIlj/A+4YKbKqvyZe8gXgUwW+VrYDbVQrQ==';
|
|
18
18
|
const SDK_ADAPTER_TARBALL = `https://registry.npmjs.org/@getmarrow/sdk/-/sdk-${SDK_ADAPTER_VERSION}.tgz`;
|
|
19
19
|
const MCP_PACKAGE_SPEC = `@getmarrow/mcp@${MCP_ADAPTER_VERSION}`;
|
|
20
20
|
const ADAPTER_PROVENANCE = Object.freeze({
|
|
@@ -23,7 +23,7 @@ const ADAPTER_PROVENANCE = Object.freeze({
|
|
|
23
23
|
version: MCP_ADAPTER_VERSION,
|
|
24
24
|
source_sha: MCP_ADAPTER_SOURCE_SHA,
|
|
25
25
|
integrity: MCP_ADAPTER_INTEGRITY,
|
|
26
|
-
integrity_state: '
|
|
26
|
+
integrity_state: 'verified_npm_registry_metadata',
|
|
27
27
|
}),
|
|
28
28
|
sdk: Object.freeze({
|
|
29
29
|
package: '@getmarrow/sdk',
|
|
@@ -68,6 +68,13 @@ function compareMcpVersions(left, right) {
|
|
|
68
68
|
return 0;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
function declaredStableSdkLowerBound(spec) {
|
|
72
|
+
if (typeof spec !== 'string') return null;
|
|
73
|
+
const match = spec.trim().match(/^(v|\^|~|>=|>)?(\d{1,6}\.\d{1,6}\.\d{1,9})$/);
|
|
74
|
+
if (!match || !parsedStableMcpVersion(match[2])) return null;
|
|
75
|
+
return { version: match[2], exclusive: match[1] === '>' };
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
function compatibleMcpTargetVersion(value) {
|
|
72
79
|
const candidate = parsedStableMcpVersion(value);
|
|
73
80
|
const sealed = parsedStableMcpVersion(MCP_ADAPTER_VERSION);
|
|
@@ -2031,7 +2038,9 @@ function activationProfile(detection, plan, changes, client) {
|
|
|
2031
2038
|
? 'Restart Grok, inspect the installed global hooks with /hooks, and confirm they are enabled. Configuration remains client-self-reported and does not verify observed coverage.'
|
|
2032
2039
|
: null
|
|
2033
2040
|
: capabilityLevel === 'sdk_passive_runtime' && !sdkDependency.present
|
|
2034
|
-
?
|
|
2041
|
+
? sdkDependency.install_command
|
|
2042
|
+
? `${sdkDependency.install_command} && npx @getmarrow/install --repair`
|
|
2043
|
+
: sdkDependency.warning
|
|
2035
2044
|
: capabilityLevel === 'governed_wrapper'
|
|
2036
2045
|
? `npx @getmarrow/install run --agent <agent-id> -- ${client}`
|
|
2037
2046
|
: client === 'cline' && clineConflicts.length > 0
|
|
@@ -2150,10 +2159,12 @@ function inspectSdkDependency(detection) {
|
|
|
2150
2159
|
|| objectTargetsSdk(packageJson.resolutions)
|
|
2151
2160
|
|| objectTargetsSdk(packageJson.pnpm?.overrides);
|
|
2152
2161
|
let lockVerified = false;
|
|
2162
|
+
let lockedVersion = null;
|
|
2153
2163
|
try {
|
|
2154
2164
|
const lock = JSON.parse(safeRead(path.join(detection.root, 'package-lock.json')) || '{}');
|
|
2155
2165
|
const rootLock = lock?.packages?.[''];
|
|
2156
2166
|
const lockedSdk = lock?.packages?.['node_modules/@getmarrow/sdk'];
|
|
2167
|
+
lockedVersion = typeof lockedSdk?.version === 'string' ? lockedSdk.version : null;
|
|
2157
2168
|
const lockedDeclaration = [
|
|
2158
2169
|
rootLock?.dependencies,
|
|
2159
2170
|
rootLock?.devDependencies,
|
|
@@ -2183,9 +2194,16 @@ function inspectSdkDependency(detection) {
|
|
|
2183
2194
|
installedVersion = null;
|
|
2184
2195
|
installedName = null;
|
|
2185
2196
|
}
|
|
2186
|
-
const
|
|
2187
|
-
|
|
2188
|
-
|
|
2197
|
+
const declaredLowerBound = declaredStableSdkLowerBound(declaredSpec);
|
|
2198
|
+
const declarationTrusted = declaredLowerBound !== null;
|
|
2199
|
+
const unsupportedDeclaration = declaredSpec !== null && !declarationTrusted;
|
|
2200
|
+
const declaredComparison = declaredLowerBound
|
|
2201
|
+
? compareMcpVersions(declaredLowerBound.version, SDK_ADAPTER_VERSION) : null;
|
|
2202
|
+
const declaredAhead = declaredComparison !== null
|
|
2203
|
+
&& (declaredComparison > 0 || (declaredLowerBound.exclusive && declaredComparison === 0));
|
|
2204
|
+
const aheadVersions = [installedVersion, lockedVersion]
|
|
2205
|
+
.filter((version) => compareMcpVersions(version, SDK_ADAPTER_VERSION) > 0);
|
|
2206
|
+
const aheadUnverified = aheadVersions.length > 0 || declaredAhead;
|
|
2189
2207
|
const present = declarationTrusted
|
|
2190
2208
|
&& !overrideDetected
|
|
2191
2209
|
&& lockVerified
|
|
@@ -2201,8 +2219,15 @@ function inspectSdkDependency(detection) {
|
|
|
2201
2219
|
lock_verified: lockVerified,
|
|
2202
2220
|
installed_name: installedName,
|
|
2203
2221
|
installed_version: installedVersion,
|
|
2222
|
+
ahead_unverified: aheadUnverified,
|
|
2204
2223
|
expected_version: SDK_ADAPTER_VERSION,
|
|
2205
|
-
install_command: present
|
|
2224
|
+
install_command: present || aheadUnverified || unsupportedDeclaration
|
|
2225
|
+
? null : `npm install @getmarrow/sdk@${SDK_ADAPTER_VERSION}`,
|
|
2226
|
+
...(aheadUnverified ? {
|
|
2227
|
+
warning: 'A newer SDK version is configured or installed. Preserve it and verify its exact version and integrity against the official npm registry before changing it.',
|
|
2228
|
+
} : unsupportedDeclaration ? {
|
|
2229
|
+
warning: 'The configured SDK version range is unsupported or ambiguous. Preserve it and verify the intended version against the official npm registry before changing it.',
|
|
2230
|
+
} : {}),
|
|
2206
2231
|
};
|
|
2207
2232
|
}
|
|
2208
2233
|
|
|
@@ -3145,7 +3170,7 @@ function printReport(report) {
|
|
|
3145
3170
|
|
|
3146
3171
|
if (report.sdkDependency?.required) {
|
|
3147
3172
|
process.stdout.write('\nSDK dependency:\n');
|
|
3148
|
-
process.stdout.write(`- @getmarrow/sdk: ${report.sdkDependency.present ? 'present' : 'missing'}\n`);
|
|
3173
|
+
process.stdout.write(`- @getmarrow/sdk: ${report.sdkDependency.present ? 'present' : report.sdkDependency.ahead_unverified ? 'newer version requires verification' : 'missing'}\n`);
|
|
3149
3174
|
if (report.sdkDependency.install_command) process.stdout.write(`- exact fix: ${report.sdkDependency.install_command}\n`);
|
|
3150
3175
|
if (report.sdkDependency.warning) process.stdout.write(`- warning: ${report.sdkDependency.warning}\n`);
|
|
3151
3176
|
}
|