mirror of
https://github.com/saltbo/agent-kanban.git
synced 2026-09-19 09:01:47 +08:00
a2fa54a729
Replace the v1 Agent/Machine runtime and CLI architecture with the v2 Resource Server, AMA-backed projections, task lifecycle, session observation, BDD specifications, and a single-package layered codebase. BREAKING CHANGE: remove the v1 CLI, internal Agent/Machine runtime entities, workspace layout, and legacy runtime coordination APIs.
27 lines
1.2 KiB
TypeScript
27 lines
1.2 KiB
TypeScript
// @vitest-environment node
|
|
|
|
import { access, readFile } from "node:fs/promises";
|
|
import path from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const root = path.resolve(import.meta.dirname, "../..");
|
|
|
|
describe("single-package repository structure", () => {
|
|
it("has no workspace, video application, or legacy CLI surface", async () => {
|
|
for (const removed of ["apps", "packages", "pnpm-workspace.yaml", "public/cli", "scripts/install-cli.sh"]) {
|
|
await expect(access(path.join(root, removed))).rejects.toThrow();
|
|
}
|
|
const packageJson = JSON.parse(await readFile(path.join(root, "package.json"), "utf8")) as { workspaces?: unknown };
|
|
expect(packageJson).not.toHaveProperty("workspaces");
|
|
});
|
|
|
|
it("keeps a single root lockfile importer without AMA SDK or workspace links", async () => {
|
|
const lockfile = await readFile(path.join(root, "pnpm-lock.yaml"), "utf8");
|
|
const importers = lockfile.slice(lockfile.indexOf("importers:"), lockfile.indexOf("packages:"));
|
|
const importerKeys = [...importers.matchAll(/^ {2}([^\s].*):$/gm)].map((match) => match[1]);
|
|
|
|
expect(importerKeys).toEqual(["."]);
|
|
expect(lockfile).not.toMatch(/(?:ama-sdk|@ama\/|workspace:|\blink:)/i);
|
|
});
|
|
});
|