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:
@@ -8,10 +8,10 @@
|
||||
* upgrades) for pi's three additive upgrades:
|
||||
* 1. EXTENSION_EVENT_SURFACES.pi — the full ~30-event ExtensionAPI surface
|
||||
* (was a single-event ['tool_call'] placeholder).
|
||||
* 2. Event bindings — pi/gsd.cjs actually binds session_start,
|
||||
* 2. Event bindings — pi/msd.cjs actually binds session_start,
|
||||
* before_agent_start, session_before_compact (+ tool_call) via pi.on(),
|
||||
* not just declaring the surface in host-integration.cts.
|
||||
* 3. Active-model steering — before_provider_request resolves GSD's
|
||||
* 3. Active-model steering — before_provider_request resolves MSD's
|
||||
* tier→model via the model-catalog's pi entries (populated this stage)
|
||||
* and returns a bare anthropic model id pi's built-in models accept;
|
||||
* fails open (returns undefined) when resolution comes back null.
|
||||
@@ -31,10 +31,10 @@ const {
|
||||
extensionEventSurfaceFor,
|
||||
negotiateHostCapabilities,
|
||||
UNDOCUMENTED,
|
||||
} = require('../gsd-core/bin/lib/host-integration.cjs');
|
||||
} = require('../msd-core/bin/lib/host-integration.cjs');
|
||||
|
||||
const gsdPiExtension = require('../pi/gsd.cjs');
|
||||
const { _internals } = require('../pi/gsd.cjs');
|
||||
const msdPiExtension = require('../pi/msd.cjs');
|
||||
const { _internals } = require('../pi/msd.cjs');
|
||||
|
||||
const PI_CAP = JSON.parse(
|
||||
fs.readFileSync(path.join(__dirname, '..', 'capabilities', 'pi', 'capability.json'), 'utf8'),
|
||||
@@ -47,7 +47,7 @@ function mockPi() {
|
||||
registerCommand(name, def) { recorded.commands[name] = def; },
|
||||
registerTool(def) { if (def && def.name) recorded.tools[def.name] = def; },
|
||||
registerProvider() {
|
||||
throw new Error('gsdPiExtension must NOT call registerProvider — GSD steers pi\'s existing anthropic models, it does not add a new provider');
|
||||
throw new Error('msdPiExtension must NOT call registerProvider — MSD steers pi\'s existing anthropic models, it does not add a new provider');
|
||||
},
|
||||
on(event, handler) { (recorded.events[event] = recorded.events[event] || []).push(handler); },
|
||||
_recorded: recorded,
|
||||
@@ -80,25 +80,25 @@ test('pi extension-event surface declares all 30 documented ExtensionAPI events
|
||||
// -- (2) the binding actually binds session_start/before_agent_start/ -------
|
||||
// session_before_compact (not just declared in host-integration.cts)
|
||||
|
||||
test('gsdPiExtension binds session_start, before_agent_start, session_before_compact, tool_call, before_provider_request', () => {
|
||||
test('msdPiExtension binds session_start, before_agent_start, session_before_compact, tool_call, before_provider_request', () => {
|
||||
const pi = mockPi();
|
||||
gsdPiExtension(pi);
|
||||
msdPiExtension(pi);
|
||||
for (const ev of ['session_start', 'before_agent_start', 'session_before_compact', 'tool_call', 'before_provider_request']) {
|
||||
assert.ok(Array.isArray(pi._recorded.events[ev]) && pi._recorded.events[ev].length > 0,
|
||||
`expected gsdPiExtension to bind pi.on("${ev}", ...)`);
|
||||
`expected msdPiExtension to bind pi.on("${ev}", ...)`);
|
||||
}
|
||||
});
|
||||
|
||||
test('gsdPiExtension does NOT call registerProvider (GSD steers pi\'s existing anthropic models, not a new provider)', () => {
|
||||
test('msdPiExtension does NOT call registerProvider (MSD steers pi\'s existing anthropic models, not a new provider)', () => {
|
||||
const pi = mockPi();
|
||||
// If gsdPiExtension called registerProvider, mockPi's registerProvider throws.
|
||||
assert.doesNotThrow(() => gsdPiExtension(pi));
|
||||
// If msdPiExtension called registerProvider, mockPi's registerProvider throws.
|
||||
assert.doesNotThrow(() => msdPiExtension(pi));
|
||||
});
|
||||
|
||||
// Finding #3 (adversarial review): the tests below previously only exercised
|
||||
// buildBeforeProviderRequestHandler() directly (the builder), never the
|
||||
// handler ACTUALLY REGISTERED via pi.on('before_provider_request', ...) in
|
||||
// gsdPiExtension. This ties the bound handler (default tier = 'sonnet') to
|
||||
// msdPiExtension. This ties the bound handler (default tier = 'sonnet') to
|
||||
// the real model-catalog steering end-to-end.
|
||||
//
|
||||
// #2460: the bound handler now FAILS-OPENS when no explicit
|
||||
@@ -108,7 +108,7 @@ test('gsdPiExtension does NOT call registerProvider (GSD steers pi\'s existing a
|
||||
// asserts the fail-open contract for the no-override case.
|
||||
test('the ACTUALLY-REGISTERED before_provider_request handler fail-opens when no model_profile_overrides is configured (#2460)', async () => {
|
||||
const pi = mockPi();
|
||||
gsdPiExtension(pi);
|
||||
msdPiExtension(pi);
|
||||
const boundHandler = pi._recorded.events['before_provider_request'][0];
|
||||
assert.equal(typeof boundHandler, 'function');
|
||||
|
||||
@@ -225,7 +225,7 @@ test('pi axes negotiate modelMode:"active" (the active-model steering axis)', ()
|
||||
//
|
||||
// (@earendil-works/pi-coding-agent, packages/coding-agent/src/core/extensions/
|
||||
// loader.ts — verified upstream 2026-07-20.) A dest filename outside that set
|
||||
// is skipped SILENTLY: no /gsd command, no error, no log line. pi loads the
|
||||
// is skipped SILENTLY: no /msd command, no error, no log line. pi loads the
|
||||
// accepted file through jiti, which handles CommonJS and ESM alike, so the
|
||||
// extension's module format is irrelevant to discovery — only the suffix is.
|
||||
//
|
||||
@@ -244,7 +244,7 @@ test('pi capability declares a native-extension dest filename pi will auto-disco
|
||||
assert.ok(
|
||||
piIsExtensionFile(np.file),
|
||||
`pi's installed extension "${np.file}" must end in .ts or .js — pi's isExtensionFile() ` +
|
||||
'auto-discovery filter silently skips every other suffix, so /gsd never registers (#2470)',
|
||||
'auto-discovery filter silently skips every other suffix, so /msd never registers (#2470)',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user