fix(cli): clarify skill scope and stabilize Node 22 tests

Require the bootstrap agent to ask whether the skill should be installed locally or globally, and suppress only SQLite’s ExperimentalWarning in CLI test processes.
This commit is contained in:
tommy0103
2026-07-16 20:51:58 +08:00
parent 0d3797b55d
commit cc01df9fec
7 changed files with 68 additions and 8 deletions
+18
View File
@@ -30,6 +30,24 @@ test('obelisk --version reports the installed CLI package version', () => {
assert.equal(result.stderr, '');
});
test('CLI test process suppresses only Node ExperimentalWarning output', () => {
const home = mkdtempSync(join(tmpdir(), 'obelisk-cli-warning-'));
const preload = join(home, 'warnings.cjs');
writeFileSync(preload, `
process.emitWarning('simulated SQLite warning', 'ExperimentalWarning');
process.emitWarning('ordinary warning stays visible', 'ObeliskTestWarning');
`);
const result = runCli(['--version'], {
home,
env: { NODE_OPTIONS: `--require=${preload}` },
});
assert.equal(result.status, 0, result.stderr || result.stdout);
assert.doesNotMatch(result.stderr, /simulated SQLite warning/);
assert.match(result.stderr, /ordinary warning stays visible/);
});
test('obelisk install delegates official skill installation to the skills CLI', () => {
const home = mkdtempSync(join(tmpdir(), 'obelisk-cli-install-'));
const fakeBin = join(home, 'bin');