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:
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* cursor hook-bus UPGRADE — ADR-1239 / #2089 AC4a.
|
||||
*
|
||||
* Proves the expanded hook-bus coverage: GSD registers for subagentStart,
|
||||
* Proves the expanded hook-bus coverage: MSD registers for subagentStart,
|
||||
* subagentStop, preToolUse, and stop IN ADDITION to the baseline sessionStart
|
||||
* and postToolUse. Cite: https://cursor.com/docs/hooks
|
||||
*
|
||||
@@ -22,15 +22,15 @@ const {
|
||||
CURSOR_EVENT_SCRIPT_MAP,
|
||||
resolveManagedHookEvents,
|
||||
resolveHookScripts,
|
||||
} = require('../gsd-core/bin/lib/host-integration-adapters/imperative-hook-bus.cjs');
|
||||
} = require('../msd-core/bin/lib/host-integration-adapters/imperative-hook-bus.cjs');
|
||||
|
||||
const {
|
||||
GSD_CURSOR_HOOK_MARKER,
|
||||
MSD_CURSOR_HOOK_MARKER,
|
||||
} = require('../bin/install.js');
|
||||
|
||||
const {
|
||||
reconcileCursorHooksJson,
|
||||
} = require('../gsd-core/bin/lib/runtime-hooks-surface.cjs');
|
||||
} = require('../msd-core/bin/lib/runtime-hooks-surface.cjs');
|
||||
|
||||
const { cleanup } = require('./helpers.cjs');
|
||||
|
||||
@@ -96,8 +96,8 @@ test('resolveHookScripts returns a script for every managed event', () => {
|
||||
const scripts = resolveHookScripts(EXPECTED_EVENTS);
|
||||
assert.equal(scripts.length, 6);
|
||||
for (const s of scripts) {
|
||||
assert.ok(s.startsWith('gsd-cursor-') && s.endsWith('.js'),
|
||||
`script must follow gsd-cursor-*.js convention: ${s}`);
|
||||
assert.ok(s.startsWith('msd-cursor-') && s.endsWith('.js'),
|
||||
`script must follow msd-cursor-*.js convention: ${s}`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ test('all 6 hook scripts exist under hooks/', () => {
|
||||
// -- AC4a: reconcile generates hooks.json with all 6 events ------------------
|
||||
|
||||
test('reconcileCursorHooksJson writes all 6 managed events into hooks.json', (t) => {
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-cursor-hook-bus-'));
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-cursor-hook-bus-'));
|
||||
t.after(() => cleanup(tmpDir));
|
||||
const hooksJsonPath = path.join(tmpDir, 'hooks.json');
|
||||
const managedEntries = {};
|
||||
@@ -123,7 +123,7 @@ test('reconcileCursorHooksJson writes all 6 managed events into hooks.json', (t)
|
||||
managedEntries[ev] = {
|
||||
type: 'command',
|
||||
command: `node /fake/${ev}.js`,
|
||||
[GSD_CURSOR_HOOK_MARKER]: true,
|
||||
[MSD_CURSOR_HOOK_MARKER]: true,
|
||||
};
|
||||
}
|
||||
const result = reconcileCursorHooksJson(hooksJsonPath, managedEntries);
|
||||
@@ -137,13 +137,13 @@ test('reconcileCursorHooksJson writes all 6 managed events into hooks.json', (t)
|
||||
`hooks.json must have a ${ev} array`);
|
||||
assert.equal(hookTable[ev].length, 1,
|
||||
`${ev} must have exactly 1 managed entry`);
|
||||
assert.equal(hookTable[ev][0][GSD_CURSOR_HOOK_MARKER], true,
|
||||
`${ev} entry must carry the GSD managed marker`);
|
||||
assert.equal(hookTable[ev][0][MSD_CURSOR_HOOK_MARKER], true,
|
||||
`${ev} entry must carry the MSD managed marker`);
|
||||
}
|
||||
});
|
||||
|
||||
test('reconcileCursorHooksJson preserves user entries across all 6 events', (t) => {
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-cursor-hook-bus-'));
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-cursor-hook-bus-'));
|
||||
t.after(() => cleanup(tmpDir));
|
||||
const hooksJsonPath = path.join(tmpDir, 'hooks.json');
|
||||
// Seed with user-owned entries in two events.
|
||||
@@ -160,8 +160,8 @@ test('reconcileCursorHooksJson preserves user entries across all 6 events', (t)
|
||||
for (const ev of EXPECTED_EVENTS) {
|
||||
managedEntries[ev] = {
|
||||
type: 'command',
|
||||
command: `node /gsd/${ev}.js`,
|
||||
[GSD_CURSOR_HOOK_MARKER]: true,
|
||||
command: `node /msd/${ev}.js`,
|
||||
[MSD_CURSOR_HOOK_MARKER]: true,
|
||||
};
|
||||
}
|
||||
reconcileCursorHooksJson(hooksJsonPath, managedEntries);
|
||||
|
||||
Reference in New Issue
Block a user