Files
AgentCompany/tests/unit/capability-registry.test.ts
T
ZacharyZhang-NY b772e1c758 Build the current workspace snapshot on native CI runners
This branch snapshots the in-progress desktop workspace so GitHub-hosted Windows and Linux runners can package the same source tree that already passes local verification on macOS.

Constraint: Local Apple Silicon Docker/Wine packaging crashes before Windows artifacts are produced
Rejected: Publish from the incomplete base repo state | remote typecheck failed because current source additions were missing
Confidence: medium
Scope-risk: broad
Directive: Treat this branch as a build snapshot only; do not merge it without reviewing the unrelated workspace changes it contains
Tested: local typecheck, lint, workspace typecheck, unit tests, integration tests, e2e smoke, macOS signed release upload
Not-tested: Native Windows/Linux artifacts before this CI run
2026-04-04 03:28:14 -04:00

45 lines
1.6 KiB
TypeScript

import { describe, expect, it } from "vitest";
import { buildCapabilityRegistrySection } from "@main/prompt-builder/capability-registry";
describe("buildCapabilityRegistrySection", () => {
it("renders a company-wide capability summary for delegation decisions", () => {
const section = buildCapabilityRegistrySection({
companySkillCatalog: [
{ name: "React Standards", slug: "react-standards", description: "Use when building React UI" },
],
companyWorkspaces: [
{ name: "Primary", localPath: "/tmp/workspace" },
],
allConnectors: [
{ id: "codex_local", label: "Codex", status: "ready", enabledModels: ["gpt-5.4"] },
],
companyDocuments: [
{
id: "doc-1",
companyId: "company-1",
title: "Architecture Decision",
type: "architecture_decision",
content: "",
status: "approved",
authorAgentId: null,
reviewerAgentId: null,
projectId: null,
goalId: null,
parentDocId: null,
version: 1,
tagsJson: "[]",
latestRevisionId: null,
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
},
],
});
expect(section).toContain("# Company Capability Registry");
expect(section).toContain("React Standards (`react-standards`)");
expect(section).toContain("Primary: /tmp/workspace");
expect(section).toContain("Codex (`codex_local`) — models: gpt-5.4");
expect(section).toContain("architecture_decision");
});
});