feat(gstack2): add unified execution result contract

This commit is contained in:
Sinabina
2026-07-20 16:22:28 -07:00
parent d6ef673e4d
commit 9b5ae4071d
19 changed files with 738 additions and 4 deletions
+3
View File
@@ -62,8 +62,11 @@ describe('GStack 2 canonical skill UX', () => {
const runtime = fs.readFileSync(path.join(ROOT, 'skills', tree, 'references', 'RUNTIME.md'), 'utf8');
const bootstrap = fs.readFileSync(path.join(ROOT, 'skills', tree, 'references', 'support', 'runtime-bootstrap.mjs'));
const contract = JSON.parse(fs.readFileSync(path.join(ROOT, 'skills', tree, 'references', 'support', 'runtime-contract.json'), 'utf8'));
const resultContract = JSON.parse(fs.readFileSync(path.join(ROOT, 'skills', tree, 'references', 'support', 'execution-result-contract.json'), 'utf8'));
expect(bootstrap, tree).toEqual(source);
expect(contract, tree).toEqual({ schemaVersion: 1, runtimeVersion: '2.0.0', skillApi: '2.0' });
expect(resultContract.properties.status.enum, tree).toEqual(['success', 'degraded', 'unsupported', 'failed']);
expect(resultContract.allOf[0].then.properties.evidence.minItems, tree).toBe(1);
expect(runtime, tree).toContain('preview --capability <name>');
expect(runtime, tree).toContain('It never downloads components or mutates runtime state.');
expect(runtime, tree).toContain('install --capability <name> --yes');