Build workspace agent, capability graph, and versioned cutovers

This commit is contained in:
2026-09-05 12:33:52 -07:00
parent c4d42a0ac5
commit ce793cc54f
55 changed files with 5600 additions and 2529 deletions
+30
View File
@@ -0,0 +1,30 @@
import assert from "node:assert/strict";
import { spawnSync } from "node:child_process";
import { resolve } from "node:path";
import { test } from "node:test";
const cli = resolve(process.cwd(), "dist/src/capability-language/cli.js");
const runResourceCheck = (source: string) => spawnSync(
process.execPath,
[cli, "--resource", "--check", "-"],
{ input: source, encoding: "utf8" },
);
test("capability CLI checks a standalone interface resource", () => {
const result = runResourceCheck(`interface WeatherBase id "interface:weather-base" revision "interface:weather-base@1" {
value temperature id "member:weather:temperature" : double {
get id "operation:weather:temperature:get";
}
}\n`);
assert.equal(result.status, 0, result.stderr);
assert.equal(result.stdout, "");
});
test("capability CLI reports invalid standalone interface members", () => {
const result = runResourceCheck(`interface WeatherBase id "interface:weather-base" revision "interface:weather-base@1" {
value temperature : definitely-not-a-type;
}\n`);
assert.notEqual(result.status, 0);
assert.match(result.stderr, /syntax-error/);
});