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:
@@ -30,8 +30,8 @@ const {
|
||||
PLANNING_PATH_PATTERN,
|
||||
PLANNING_GUARD_REASON,
|
||||
evaluateBeforeTool,
|
||||
clineGsdPlugin,
|
||||
} = require('../gsd-core/bin/lib/host-integration-adapters/cline-sdk-binding.cjs');
|
||||
clineMsdPlugin,
|
||||
} = require('../msd-core/bin/lib/host-integration-adapters/cline-sdk-binding.cjs');
|
||||
|
||||
// -- upgrade 1: write-class detection ---------------------------------------
|
||||
|
||||
@@ -130,14 +130,14 @@ test('evaluateBeforeTool fails OPEN on a tool with no name', () => {
|
||||
|
||||
// -- upgrade 1: the AgentPlugin wrapper shape -------------------------------
|
||||
|
||||
test('clineGsdPlugin is an AgentPlugin with a beforeTool hook', () => {
|
||||
assert.equal(typeof clineGsdPlugin, 'object');
|
||||
assert.equal(clineGsdPlugin.name, 'gsd-planning-guard');
|
||||
assert.equal(typeof clineGsdPlugin.setup, 'function');
|
||||
test('clineMsdPlugin is an AgentPlugin with a beforeTool hook', () => {
|
||||
assert.equal(typeof clineMsdPlugin, 'object');
|
||||
assert.equal(clineMsdPlugin.name, 'msd-planning-guard');
|
||||
assert.equal(typeof clineMsdPlugin.setup, 'function');
|
||||
});
|
||||
|
||||
test('clineGsdPlugin.setup returns hooks.beforeTool that maps skip→{skip,reason}', () => {
|
||||
const { hooks } = clineGsdPlugin.setup({ agentId: 'test-agent' });
|
||||
test('clineMsdPlugin.setup returns hooks.beforeTool that maps skip→{skip,reason}', () => {
|
||||
const { hooks } = clineMsdPlugin.setup({ agentId: 'test-agent' });
|
||||
assert.equal(typeof hooks.beforeTool, 'function');
|
||||
// planning write → { skip: true, reason }
|
||||
const blocked = hooks.beforeTool({
|
||||
@@ -147,8 +147,8 @@ test('clineGsdPlugin.setup returns hooks.beforeTool that maps skip→{skip,reaso
|
||||
assert.deepEqual(blocked, { skip: true, reason: PLANNING_GUARD_REASON });
|
||||
});
|
||||
|
||||
test('clineGsdPlugin.beforeTool returns undefined for allowed calls (SDK contract)', () => {
|
||||
const { hooks } = clineGsdPlugin.setup({ agentId: 'test-agent' });
|
||||
test('clineMsdPlugin.beforeTool returns undefined for allowed calls (SDK contract)', () => {
|
||||
const { hooks } = clineMsdPlugin.setup({ agentId: 'test-agent' });
|
||||
const allowed = hooks.beforeTool({
|
||||
tool: { name: 'write_to_file' },
|
||||
input: { path: 'src/foo.ts' },
|
||||
@@ -159,7 +159,7 @@ test('clineGsdPlugin.beforeTool returns undefined for allowed calls (SDK contrac
|
||||
// -- upgrade 1: parity with the existing PreToolUse script semantics --------
|
||||
|
||||
test('the guard reason matches the PreToolUse script errorMessage contract', () => {
|
||||
// The file-convention hook wrote { cancel:true, errorMessage:'GSD: ...' }.
|
||||
// The file-convention hook wrote { cancel:true, errorMessage:'MSD: ...' }.
|
||||
// The SDK plugin maps cancel→skip and errorMessage→reason. The user-visible
|
||||
// message text is preserved so the guard behaves identically to the user.
|
||||
assert.ok(typeof PLANNING_GUARD_REASON === 'string' && PLANNING_GUARD_REASON.length > 0);
|
||||
|
||||
Reference in New Issue
Block a user