refactor: hard-fork GSD -> MSD (Make Software Done)

Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD
across contents and paths, upstream package/repo coordinates -> @golem15/msd-core
and golem15com/msd-core. Deep links into upstream history, sibling upstream
packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is.

Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line,
package/plugin identity, regenerated lockfile, install-tree fixtures, derived
registries and benchmark baseline; migration checksum baseline re-locked
(MSD keeps its own install state, so no install had applied the old sums);
sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
Jakub Zych
2026-10-06 01:47:40 +02:00
parent fe069b2a56
commit a9a7a328e6
2763 changed files with 78465 additions and 78434 deletions

View File

@@ -5,7 +5,7 @@
*
* Completes the IDE profile: proves the Phase-3 engine seams (active model,
* engine-owned hook bus, sandboxed-storage stateIO, imperative adapter) compose
* for VS Code end-to-end (#1933 AC: "run GSD inside the VS Code IDE host through
* for VS Code end-to-end (#1933 AC: "run MSD inside the VS Code IDE host through
* its palette/chat command surface, with engine-owned hook bus + active model +
* sandboxed stateIO (no child_process) handled by the adapters").
*
@@ -18,9 +18,9 @@
const { test } = require('node:test');
const assert = require('node:assert/strict');
const { profileOf, negotiateHostCapabilities } = require('../gsd-core/bin/lib/host-integration.cjs');
const bindGsdToVscode = require('./fixtures/vscode-host-binding.cjs');
const registry = require('../gsd-core/bin/lib/capability-registry.cjs');
const { profileOf, negotiateHostCapabilities } = require('../msd-core/bin/lib/host-integration.cjs');
const bindMsdToVscode = require('./fixtures/vscode-host-binding.cjs');
const registry = require('../msd-core/bin/lib/capability-registry.cjs');
test('VS Code IDE axes classify as the ide profile', () => {
// ide baseline (host-integration.cts PROFILE_BASELINES): imperative + sandboxed-web.
@@ -28,7 +28,7 @@ test('VS Code IDE axes classify as the ide profile', () => {
assert.notEqual(profileOf({ embeddingMode: 'imperative', runtime: 'node' }), 'ide');
});
test('bindGsdToVscode composes the full IDE profile (active model + engine bus + sandboxed state + imperative adapter)', async () => {
test('bindMsdToVscode composes the full IDE profile (active model + engine bus + sandboxed state + imperative adapter)', async () => {
// Real API: vscode.lm.selectChatModels() (async → LanguageModelChat[]); the
// SELECTED MODEL has .sendRequest, NOT vscode.lm itself (#2103 correction —
// there is no vscode.lm.sendRequest).
@@ -46,7 +46,7 @@ test('bindGsdToVscode composes the full IDE profile (active model + engine bus +
write: (p, c) => { storageWrites.push([p, c]); },
};
const host = bindGsdToVscode(vscode, hostStorage);
const host = bindMsdToVscode(vscode, hostStorage);
assert.equal(host.runtime, 'vscode');
// Active model routes through vscode.lm.selectChatModels() → model.sendRequest
@@ -73,14 +73,14 @@ test('bindGsdToVscode composes the full IDE profile (active model + engine bus +
assert.equal(host.adapter.runtime, 'vscode');
// Command surface (palette/chat).
assert.ok(host.commands['gsd.invoke'], 'palette/chat command surface present');
assert.ok(host.commands['msd.invoke'], 'palette/chat command surface present');
});
// #2103: proves the binding actually COMPOSES (does not throw) against a
// realistic desktop VS Code `vscode.lm` shape — the whole point of the guard
// fix: a real host has `selectChatModels`, never `sendRequest` directly, and
// the binding must succeed, not silently fail-open at the extension.js layer.
test('#2103: bindGsdToVscode composes successfully against a REALISTIC vscode.lm (selectChatModels only, no vscode.lm.sendRequest)', async () => {
test('#2103: bindMsdToVscode composes successfully against a REALISTIC vscode.lm (selectChatModels only, no vscode.lm.sendRequest)', async () => {
const vscode = {
lm: {
selectChatModels: async () => [{ sendRequest: (req) => Promise.resolve({ echoed: req }) }],
@@ -90,29 +90,29 @@ test('#2103: bindGsdToVscode composes successfully against a REALISTIC vscode.lm
const hostStorage = { read: () => '', write: () => {} };
let host;
assert.doesNotThrow(() => { host = bindGsdToVscode(vscode, hostStorage); },
'bindGsdToVscode must succeed on a realistic host (selectChatModels-only vscode.lm)');
assert.doesNotThrow(() => { host = bindMsdToVscode(vscode, hostStorage); },
'bindMsdToVscode must succeed on a realistic host (selectChatModels-only vscode.lm)');
assert.equal(host.model.mode, 'active');
const response = await host.model.sendRequest({ prompt: 'hello' });
assert.deepEqual(response, { echoed: { prompt: 'hello' } });
});
test('bindGsdToVscode is fail-closed without vscode.lm or hostStorage', () => {
test('bindMsdToVscode is fail-closed without vscode.lm or hostStorage', () => {
const okStorage = { read() {}, write() {} };
const okVscode = { lm: { selectChatModels: async () => [] } };
// vscode.lm missing or incomplete → vscode.lm error
assert.throws(() => bindGsdToVscode({}, okStorage), /vscode\.lm/);
assert.throws(() => bindGsdToVscode({ lm: {} }, okStorage), /vscode\.lm/);
assert.throws(() => bindMsdToVscode({}, okStorage), /vscode\.lm/);
assert.throws(() => bindMsdToVscode({ lm: {} }, okStorage), /vscode\.lm/);
// valid vscode.lm but missing/incomplete hostStorage → hostStorage error
assert.throws(() => bindGsdToVscode(okVscode, null), /hostStorage/);
assert.throws(() => bindGsdToVscode(okVscode, { read() {} }), /hostStorage/);
assert.throws(() => bindMsdToVscode(okVscode, null), /hostStorage/);
assert.throws(() => bindMsdToVscode(okVscode, { read() {} }), /hostStorage/);
});
test('#2103: bindGsdToVscode still throws when vscode.lm.selectChatModels is ABSENT (a vscode.lm.sendRequest-only mock, matching the OLD incorrect API assumption, must be rejected)', () => {
test('#2103: bindMsdToVscode still throws when vscode.lm.selectChatModels is ABSENT (a vscode.lm.sendRequest-only mock, matching the OLD incorrect API assumption, must be rejected)', () => {
const okStorage = { read() {}, write() {} };
// The pre-#2103 (wrong) shape: sendRequest directly on vscode.lm, no selectChatModels.
const staleShapeVscode = { lm: { sendRequest: () => 'stale' } };
assert.throws(() => bindGsdToVscode(staleShapeVscode, okStorage), /selectChatModels/);
assert.throws(() => bindMsdToVscode(staleShapeVscode, okStorage), /selectChatModels/);
});
// ── #2103: negotiate fail-closed for an UNDECLARED vscode axis ──────────────
@@ -127,7 +127,7 @@ test('#2103: bindGsdToVscode still throws when vscode.lm.selectChatModels is ABS
// #2103 FIX (adversarial review, MINOR): strengthened from a weak
// `!== undefined` check to a STRICT equality against the actual
// most-restrictive value negotiateHostCapabilities produces — the fail-closed
// floor pinned as `SAFE_DEFAULTS` in gsd-core/bin/lib/host-integration.cjs
// floor pinned as `SAFE_DEFAULTS` in msd-core/bin/lib/host-integration.cjs
// (not exported, so the values are pinned here verbatim, verified via node -e
// against the real negotiation output before writing this test — see the PR
// report). A `!== undefined` check would pass even if negotiation regressed