diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38d87dc..cf45f48 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,13 @@ on: workflow_dispatch: push: branches: [main] + paths: + - "packages/agents/**" + - ".changeset/**" + - ".releaserc.json" + - "package.json" + - "pnpm-lock.yaml" + - "scripts/publish-github-package.mjs" permissions: contents: write diff --git a/.gitignore b/.gitignore index c9656c0..3fa88ff 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ node_modules/ apps/docs/.next/ apps/docs/.source/ apps/docs/tsconfig.tsbuildinfo +apps/docs/AGENTS.md +apps/docs/CLAUDE.md dist/ coverage/ .pnpm-store/ @@ -50,3 +52,4 @@ env/ # Temporary verification sandboxes agent-compat-*/ release/ +.vercel diff --git a/.knip.json b/.knip.json index 452326c..e8ba768 100644 --- a/.knip.json +++ b/.knip.json @@ -6,6 +6,7 @@ "@semantic-release/release-notes-generator", "@trpc/client", "@trpc/server", - "zod" + "zod", + "portless" ] } diff --git a/README.md b/README.md index 554d586..6dc5589 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ Contributions are welcome — especially new adapters. ### Adding an Adapter 1. Fork the repository -2. Add an adapter definition to `packages/agents/src/adapters/index.js`: +2. Add an adapter definition to `packages/agents/src/adapters/index.ts`: ```js const myToolAdapter = { diff --git a/apps/docs/app/docs/[[...slug]]/page.tsx b/apps/docs/app/docs/[[...slug]]/page.tsx index c9a787b..1cbc6ee 100644 --- a/apps/docs/app/docs/[[...slug]]/page.tsx +++ b/apps/docs/app/docs/[[...slug]]/page.tsx @@ -4,6 +4,7 @@ import { DocsPage, DocsTitle, } from "fumadocs-ui/page"; +import mdxComponents from "fumadocs-ui/mdx"; import { notFound } from "next/navigation"; import { source } from "@/lib/source"; @@ -20,7 +21,7 @@ export default async function Page(props: PageProps) { {page.data.title} {page.data.description} - + ); diff --git a/apps/docs/app/globals.css b/apps/docs/app/globals.css new file mode 100644 index 0000000..dbcc721 --- /dev/null +++ b/apps/docs/app/globals.css @@ -0,0 +1,3 @@ +@import "tailwindcss"; +@import "fumadocs-ui/css/neutral.css"; +@import "fumadocs-ui/css/preset.css"; diff --git a/apps/docs/app/layout.tsx b/apps/docs/app/layout.tsx index a940d3b..81f4ecd 100644 --- a/apps/docs/app/layout.tsx +++ b/apps/docs/app/layout.tsx @@ -1,7 +1,7 @@ import type { Metadata } from "next"; +import { Analytics } from "@vercel/analytics/next"; import { RootProvider } from "fumadocs-ui/provider/next"; -import "fumadocs-ui/css/neutral.css"; -import "fumadocs-ui/css/preset.css"; +import "./globals.css"; export const metadata: Metadata = { metadataBase: new URL("https://agents-compat.jstn.site"), @@ -20,8 +20,15 @@ export default function RootLayout({ }) { return ( - + + + Skip to content + {children} + ); diff --git a/apps/docs/content/docs/adapters.mdx b/apps/docs/content/docs/adapters.mdx new file mode 100644 index 0000000..d399c56 --- /dev/null +++ b/apps/docs/content/docs/adapters.mdx @@ -0,0 +1,54 @@ +--- +title: Custom adapters +description: Extend the registry without coupling your tool to Meta-Architect. +--- + +Adapters describe a concrete product surface. Registering one changes the +current process registry only; it does not install a vendor runtime. + +```ts +import { Agents } from "@jstn-sdk/agents"; + +Agents.register({ + id: "my-tool", + vendor: "my-company", + product: "my-tool", + surface: "cli", + support: "portable", + verification: { contract: "verified", runtime: "unverified" }, + signals: [{ type: "file", path: "MY-TOOL.md" }], + outputs: [{ path: "MY-TOOL.md", format: "document" }], + capabilities: { + instructions: true, + skills: false, + mcp: false, + }, +}); +``` + +## Adapter contract + +| Field | Purpose | +| --- | --- | +| `id` | Unique surface identifier used by `targets`. | +| `vendor`, `product`, `surface` | Human-readable taxonomy metadata. | +| `signals` | Repository files or directories used for detection. | +| `outputs` | Relative files generated and validated for the surface. | +| `skillRoot` | Optional directory for generated `SKILL.md` files. | +| `capabilities` | Declared native or portable feature support. | +| `support` | `native`, `portable`, or `experimental`. | +| `verification` | Contract and runtime evidence boundary. | + +Every output path is resolved inside the compile root. Unsafe traversal and +symlinked writes are rejected. + +## Registry helpers + +```ts +Agents.list(); +Agents.get("cursor"); +Agents.reset(); +``` + +Use `reset()` in isolated tests when you need to restore the built-in registry +before registering test adapters. diff --git a/apps/docs/content/docs/agents.mdx b/apps/docs/content/docs/agents.mdx new file mode 100644 index 0000000..d8a3881 --- /dev/null +++ b/apps/docs/content/docs/agents.mdx @@ -0,0 +1,130 @@ +--- +title: Agent registry +description: The 55-target registry planned for the next SDK release. +--- + +The next registry release defines **55 agent targets**, representing **54 +vendors** and **53 vendor families**. `universal` is a fallback target, not a +vendor. `trae` and `trae-cn` share one vendor skill directory. + +This page is the next-release catalog. The currently published package remains +covered by the [current support matrix](/docs/support-matrix) until these target +IDs are included in the runtime registry and pass conformance checks. + +## Registry layers + +| Layer | Count | Contract | +| --- | ---: | --- | +| Universal targets | 15 | Read `.agents/skills` directly. | +| Non-universal targets | 40 | Receive skill fanout into the target directory. | +| Total target entries | 55 | Includes the `universal` fallback. | +| Distinct vendors | 54 | Excludes the `universal` pseudo-target. | +| Vendor families | 53 | `trae` and `trae-cn` share a directory. | + +## Universal targets + +These targets consume the canonical `.agents/skills` directory directly: + +```text +codex +opencode +cursor +amp +cline +gemini-cli +github-copilot +antigravity +deepagents +dexto +firebender +kimi-cli +warp +replit +universal +``` + +## Non-universal targets + +These targets require symlink or copy fanout into their native skill directory: + +```text +claude-code +windsurf +goose +augment +aider-desk +continue +roo +kiro-cli +junie +devin +openhands +cortex +crush +forgecode +bob +codebuddy +codemaker +codestudio +command-code +codearts-agent +droid +hermes-agent +iflow-cli +kilo +kode +mcpjam +mistral-vibe +mux +neovate +openclaw +pi +pochi +adal +qoder +qwen-code +rovodev +tabnine-cli +trae +trae-cn +zencoder +``` + +## MCP boundary + +Only four targets receive native MCP configuration injection through the +Universal Plugin Broker: + +```text +claude-code +antigravity +cursor +codex +``` + +All other targets receive the `.agents/skills` context payload layer. This +distinction is intentional: skill fanout is portable, while MCP configuration +is host-specific and must not be claimed where the native contract is absent. + +## Support guarantee + +Each next-release target must provide: + +- Detection with a stable target ID. +- Canonical manifest compilation. +- Portable `.agents/skills` output or native skill fanout. +- A capability report that identifies MCP support. +- Filesystem conformance validation. +- Explicit unsupported-feature warnings. + +The registry count is not a claim that every target has identical native +features. Native MCP support is limited to the four targets above; all other +targets use the portable context payload until their native contract is +verified. + +## Release gate + +The next registry becomes a shipped support claim only when the target IDs are +present in the runtime registry, the support matrix is regenerated, and the +conformance suite passes for all 55 entries. Until then, use the current +published [41-adapter matrix](/docs/support-matrix) for release evidence. diff --git a/apps/docs/content/docs/api.mdx b/apps/docs/content/docs/api.mdx index 748ff47..bb8ed0d 100644 --- a/apps/docs/content/docs/api.mdx +++ b/apps/docs/content/docs/api.mdx @@ -11,6 +11,10 @@ Returns detected adapter surfaces ordered by confidence. const environments = await Agents.detect('./project'); ``` +When no environment signal is found, detection returns the portable `generic` +adapter with low confidence. Detection is repository-based and does not require +vendor binaries. + ## `Agents.compile(manifest, options)` Compiles the canonical manifest for selected adapter IDs and writes native or portable artifacts. @@ -23,7 +27,10 @@ const result = await Agents.compile(manifest, { }); ``` -The result includes generated files, warnings, and target-specific errors. +With no `targets`, the SDK compiles for adapters detected under `output`. +`dryRun: true` returns the planned files without writing. The result includes +`targets`, generated files, `created`, `updated`, `skipped`, warnings, and +target-specific errors. ## `Agents.validate(root)` @@ -34,6 +41,9 @@ const report = await Agents.validate('./project'); if (!report.valid) throw new Error('Agent artifacts need attention'); ``` +Pass `{ targets: ['cursor'] }` to validate only selected adapters. Without +targets, validation uses detected adapters. + ## Adapter registry Register a custom adapter without importing Meta-Architect: @@ -42,3 +52,6 @@ Register a custom adapter without importing Meta-Architect: Agents.register(myAdapter); const adapters = Agents.list(); ``` + +Use `Agents.get(id)` to inspect one adapter and `Agents.reset()` to restore the +built-in registry in a test process. diff --git a/apps/docs/content/docs/ci.mdx b/apps/docs/content/docs/ci.mdx new file mode 100644 index 0000000..7362d99 --- /dev/null +++ b/apps/docs/content/docs/ci.mdx @@ -0,0 +1,44 @@ +--- +title: CI and release checks +description: Add deterministic SDK and documentation checks to automation. +--- + +The repository's production checks are intentionally deterministic: + +```bash +pnpm install --frozen-lockfile +pnpm check +pnpm lint +``` + +The SDK package checks can be run independently: + +```bash +pnpm --filter @jstn-sdk/agents build +pnpm --filter @jstn-sdk/agents typecheck +pnpm --filter @jstn-sdk/agents test +pnpm --filter @jstn-sdk/agents verify +``` + +## Validate a project in CI + +```ts +import { Agents } from "@jstn-sdk/agents"; + +const report = await Agents.validate(process.cwd()); +if (!report.valid) { + console.error(JSON.stringify(report, null, 2)); + process.exit(1); +} +``` + +## What the checks prove + +- `typecheck` proves the public declarations remain internally consistent. +- `test` covers API behavior and safety regressions. +- `verify` runs compile/write/read/validate conformance in temporary projects. +- `matrix:check` prevents the support matrix from drifting from the registry. +- `docs:build` proves the official documentation site can be deployed. + +Filesystem conformance is separate from live vendor runtime verification. See +the [support matrix](/docs/support-matrix) for the current evidence boundary. diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx index 1ef8cfb..0cfc13e 100644 --- a/apps/docs/content/docs/index.mdx +++ b/apps/docs/content/docs/index.mdx @@ -11,6 +11,9 @@ import { Cards, Card } from 'fumadocs-ui/components/card'; + + + diff --git a/apps/docs/content/docs/installation.mdx b/apps/docs/content/docs/installation.mdx new file mode 100644 index 0000000..dc05dfa --- /dev/null +++ b/apps/docs/content/docs/installation.mdx @@ -0,0 +1,52 @@ +--- +title: Installation +description: Install the standalone SDK in Node.js and TypeScript projects. +--- + +## Requirements + +- Node.js 18 or newer +- npm, pnpm, yarn, or bun + +## npm + +```bash +npm install @jstn-sdk/agents +``` + +The package is a library and does not install a CLI or start an agent runtime. + +## pnpm + +```bash +pnpm add @jstn-sdk/agents +``` + +## GitHub Packages mirror + +The owner-scoped GitHub Packages alias is available for authenticated GitHub +package consumers. npm remains the canonical package and name: + +```bash +npm login --registry=https://npm.pkg.github.com +npm install @JustineDevs/agents --registry=https://npm.pkg.github.com +``` + +## Module format + +The package is ESM-only and includes TypeScript declarations: + +```ts +import { Agents } from "@jstn-sdk/agents"; +``` + +## Verify the installation + +```ts +import { Agents } from "@jstn-sdk/agents"; + +console.log(Agents.list().length); +``` + +The returned count is the number of built-in adapter surfaces registered by +that package version. diff --git a/apps/docs/content/docs/manifest.mdx b/apps/docs/content/docs/manifest.mdx new file mode 100644 index 0000000..071f474 --- /dev/null +++ b/apps/docs/content/docs/manifest.mdx @@ -0,0 +1,57 @@ +--- +title: Manifest reference +description: Define the canonical project contract consumed by the SDK. +--- + +The manifest is a JavaScript or TypeScript object. The SDK does not parse YAML; +load YAML in your application and pass the resulting object to `compile()`. + +```ts +import type { Manifest } from "@jstn-sdk/agents"; + +const manifest: Manifest = { + version: 1, + project: { + name: "my-app", + description: "A TypeScript service", + stack: ["typescript", "node"], + }, + instructions: [ + "Read docs/architecture before cross-module changes", + "Run type checks and tests before completion", + ], + skills: { + architecture-review: { + description: "Review architecture boundaries", + triggers: ["architecture", "refactor"], + instructions: ["Check dependency direction"], + tools: ["git"], + }, + }, + workflows: { + implementation: { + steps: ["inspect", "plan", "implement", "validate"], + }, + }, +}; +``` + +## Fields + +| Field | Required | Purpose | +| --- | --- | --- | +| `version` | yes | Manifest schema version. Current value is `1`. | +| `project` | no | Project name, description, and stack metadata. | +| `instructions` | no | Portable project instructions. | +| `skills` | no | Named reusable skills and their instructions. | +| `workflows` | no | Workflow metadata preserved in generated documents. | +| `roles` | no | Role metadata preserved in generated documents. | +| `targets` | no | Application-level target metadata preserved in generated documents. It does not select compile targets. | + +Empty optional collections are normalized safely. Skill names must be safe +directory names because adapters may write them below a target skill root. + +## One source of truth + +Keep the manifest in your repository and treat generated files as artifacts. +Changing a generated file directly will be overwritten on the next compile. diff --git a/apps/docs/content/docs/meta.json b/apps/docs/content/docs/meta.json index cb09032..0c4e9c4 100644 --- a/apps/docs/content/docs/meta.json +++ b/apps/docs/content/docs/meta.json @@ -1,5 +1,17 @@ { "title": "Agent Compat", "description": "Cross-agent environment compatibility SDK", - "root": true + "root": true, + "pages": [ + "index", + "quickstart", + "installation", + "manifest", + "agents", + "api", + "validation", + "adapters", + "ci", + "support-matrix" + ] } diff --git a/apps/docs/content/docs/quickstart.mdx b/apps/docs/content/docs/quickstart.mdx index e54f766..82db667 100644 --- a/apps/docs/content/docs/quickstart.mdx +++ b/apps/docs/content/docs/quickstart.mdx @@ -22,6 +22,10 @@ const manifest: Manifest = { }; ``` +Install the package first with `npm install @jstn-sdk/agents`. The SDK accepts +objects; if your source is YAML, parse it in your application before calling +the API. + ## 2. Detect environments ```ts @@ -44,3 +48,14 @@ const report = await Agents.validate('./my-project'); ``` Use `dryRun: true` to preview writes. Managed blocks are updated without replacing unrelated user content. + +## 4. Make validation a gate + +```ts +if (!report.valid) { + console.error(report.summary); + process.exitCode = 1; +} +``` + +For the complete field reference, see [Manifest reference](/docs/manifest). diff --git a/apps/docs/content/docs/support-matrix.mdx b/apps/docs/content/docs/support-matrix.mdx index e9a84f0..5bd398e 100644 --- a/apps/docs/content/docs/support-matrix.mdx +++ b/apps/docs/content/docs/support-matrix.mdx @@ -13,6 +13,10 @@ The release registry currently contains **41 adapter surfaces across 26 vendor l The repository keeps the complete machine-checked matrix in [`docs/support-matrix.md`](https://github.com/JustineDevs/agent-compat/blob/main/docs/support-matrix.md). The conformance suite currently verifies every registered adapter. +The expanded **55-target next-release catalog** is documented in the [Agent +registry](/docs/agents). It is intentionally separate from this shipped +matrix until those target IDs are implemented and pass the release gate. + ## Release evidence - [npm package](https://www.npmjs.com/package/@jstn-sdk/agents) diff --git a/apps/docs/content/docs/validation.mdx b/apps/docs/content/docs/validation.mdx new file mode 100644 index 0000000..3ed3dac --- /dev/null +++ b/apps/docs/content/docs/validation.mdx @@ -0,0 +1,41 @@ +--- +title: Validation and drift +description: Read validation reports and keep generated artifacts correct. +--- + +`validate()` checks the files that actually exist under a project root. It does +not report what a compiler intended to write. + +```ts +const report = await Agents.validate("./my-project", { + targets: ["cursor", "codex-cli"], +}); + +for (const [id, result] of Object.entries(report.results)) { + console.log(id, result.status, result.score, result.issues); +} + +if (!report.valid) process.exitCode = 1; +``` + +## Statuses + +| Status | Meaning | +| --- | --- | +| `valid` | All declared outputs pass their adapter checks. | +| `partial` | Output exists but has a managed-block or contract warning. | +| `invalid` | An output is missing, malformed, unsafe, or over its limit. | +| `unknown` | Validation could not complete. | + +The report includes `targets`, `results`, and a `summary` with counts for each +status. Each target result includes a score, issues, and capability values. + +## Drift workflow + +1. Keep the canonical manifest under version control. +2. Run `compile()` after changing the manifest. +3. Run `validate()` in CI against the checked-out project. +4. Fail the job when `report.valid` is false. + +Validation is filesystem conformance. It does not prove that a proprietary +desktop, cloud, or hosted agent is installed or executing a prompt. diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs index 53f5495..4309901 100644 --- a/apps/docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -2,6 +2,4 @@ import { createMDX } from "fumadocs-mdx/next"; const withMDX = createMDX(); -export default withMDX({ - output: "standalone", -}); +export default withMDX({}); diff --git a/apps/docs/package.json b/apps/docs/package.json index 93cc843..49b2774 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -2,13 +2,14 @@ "name": "agent-compat-docs", "private": true, "scripts": { - "dev": "next dev", - "build": "next build", + "dev": "next dev --webpack", + "build": "next build --webpack", "start": "next start", "content": "fumadocs-mdx", "typecheck": "tsc --noEmit" }, "dependencies": { + "@vercel/analytics": "^2.0.1", "fumadocs-core": "latest", "fumadocs-mdx": "latest", "fumadocs-ui": "latest", @@ -17,9 +18,12 @@ "react-dom": "latest" }, "devDependencies": { + "@tailwindcss/postcss": "^4.3.3", "@types/node": "26.2.0", "@types/react": "latest", "@types/react-dom": "latest", + "postcss": "^8.5.26", + "tailwindcss": "^4.3.3", "typescript": "latest" } } diff --git a/apps/docs/postcss.config.cjs b/apps/docs/postcss.config.cjs new file mode 100644 index 0000000..483f378 --- /dev/null +++ b/apps/docs/postcss.config.cjs @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + "@tailwindcss/postcss": {}, + }, +}; diff --git a/biome.json b/biome.json index 9a60037..475e4f4 100644 --- a/biome.json +++ b/biome.json @@ -9,6 +9,7 @@ "!**/coverage", "!**/.next", "!**/.source", + "!**/.vercel", "!**/tsconfig.tsbuildinfo" ] }, diff --git a/docs/branch-strategy.md b/docs/branch-strategy.md new file mode 100644 index 0000000..4c6783f --- /dev/null +++ b/docs/branch-strategy.md @@ -0,0 +1,9 @@ +# Branch strategy + +- `main` is production and is used for released SDK and documentation changes. +- `dev` is the persistent preview branch and is the default development target. +- Changes land on `main` through reviewed pull requests from `dev`. + +The Vercel project is named `agents`. Connect its preview branch to `dev` and +its production branch to `main`; domain and DNS configuration remain managed +in Vercel. diff --git a/package.json b/package.json index 6720737..079f7c3 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "changeset": "changeset", "workspace": "nx graph", "docs": "fumadocs-mdx", - "dev": "portless agents pnpm --filter @jstn-sdk/agents test", + "dev": "pnpm docs:dev", "release": "semantic-release", "docs:dev": "pnpm --filter agent-compat-docs dev", "docs:build": "pnpm --filter agent-compat-docs build", diff --git a/packages/agents/package.json b/packages/agents/package.json index fa92c4f..eec6d24 100644 --- a/packages/agents/package.json +++ b/packages/agents/package.json @@ -17,31 +17,34 @@ "access": "public", "registry": "https://registry.npmjs.org/" }, - "main": "./src/index.js", - "types": "./src/index.d.ts", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { ".": { - "types": "./src/index.d.ts", - "import": "./src/index.js" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" }, "./testing": { - "types": "./src/testing/index.d.ts", - "import": "./src/testing/index.js" + "types": "./dist/testing/index.d.ts", + "import": "./dist/testing/index.js" }, "./package.json": "./package.json" }, "files": [ - "src", + "dist", "README.md", "LICENSE" ], "scripts": { - "build": "node --check src/index.js", + "build": "tsc -p tsconfig.json", "typecheck": "tsc --noEmit -p tsconfig.json", - "test": "node --test", - "verify": "node --test test/conformance.test.js" + "test": "pnpm build && node --test", + "verify": "pnpm build && node --test test/conformance.test.js" }, "engines": { "node": ">=18" + }, + "devDependencies": { + "@types/node": "^26.0.0" } } diff --git a/packages/agents/src/adapters/base.js b/packages/agents/src/adapters/base.ts similarity index 100% rename from packages/agents/src/adapters/base.js rename to packages/agents/src/adapters/base.ts diff --git a/packages/agents/src/adapters/index.js b/packages/agents/src/adapters/index.ts similarity index 98% rename from packages/agents/src/adapters/index.js rename to packages/agents/src/adapters/index.ts index 1741ff7..bc35af2 100644 --- a/packages/agents/src/adapters/index.js +++ b/packages/agents/src/adapters/index.ts @@ -1,6 +1,6 @@ import { createAdapter, directory, file, portableProfile } from "./base.js"; -const documentOutput = (path = "AGENTS.md", maxBytes) => ({ +const documentOutput = (path = "AGENTS.md", maxBytes?: number) => ({ path, format: "document", ...(maxBytes ? { maxBytes } : {}), diff --git a/packages/agents/src/agents.js b/packages/agents/src/agents.ts similarity index 100% rename from packages/agents/src/agents.js rename to packages/agents/src/agents.ts diff --git a/packages/agents/src/compile.js b/packages/agents/src/compile.ts similarity index 94% rename from packages/agents/src/compile.js rename to packages/agents/src/compile.ts index 09dd8eb..c1ef903 100644 --- a/packages/agents/src/compile.js +++ b/packages/agents/src/compile.ts @@ -8,6 +8,7 @@ import { } from "./shared.js"; import { getTargetAdapters } from "./registry.js"; import { detect } from "./detect.js"; +import type { CompileOptions, Manifest } from "./types.js"; function dedupeFiles(files) { const byPath = new Map(); @@ -32,7 +33,10 @@ function dedupeFiles(files) { }; } -export async function compile(manifest, options = {}) { +export async function compile( + manifest: Manifest, + options: CompileOptions = {}, +) { const normalized = normalizeManifest(manifest); const root = path.resolve(options.output ?? "."); const requestedTargets = @@ -65,8 +69,8 @@ export async function compile(manifest, options = {}) { ); const plannedFiles = deduped.files; - const files = []; - const errors = []; + const files: any[] = []; + const errors: any[] = []; const warnings = deduped.collisions.map( ({ path: file, targets }) => `Output collision at ${file}; selected ${targets.join(" over ")}`, diff --git a/packages/agents/src/detect.js b/packages/agents/src/detect.ts similarity index 96% rename from packages/agents/src/detect.js rename to packages/agents/src/detect.ts index 58f5765..c042505 100644 --- a/packages/agents/src/detect.js +++ b/packages/agents/src/detect.ts @@ -15,11 +15,11 @@ async function signalExists(root, signal) { export async function detect(root = ".") { const absoluteRoot = normalizeRoot(root); - const results = []; + const results: any[] = []; for (const adapter of listAdapters()) { if (adapter.id === "generic") continue; - const signals = []; + const signals: any[] = []; for (const signal of adapter.signals ?? []) { if (await signalExists(absoluteRoot, signal)) signals.push(signal); } diff --git a/packages/agents/src/index.d.ts b/packages/agents/src/index.d.ts deleted file mode 100644 index 6605aff..0000000 --- a/packages/agents/src/index.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -export type Surface = "cli" | "ide" | "desktop" | "cloud" | "sdk" | "generic"; -export type SupportLevel = "native" | "portable" | "experimental"; -export type ValidationStatus = "valid" | "partial" | "invalid" | "unknown"; -export type RuntimeVerification = "verified" | "unverified" | "not-applicable"; - -export interface Manifest { - version: 1; - project?: { name?: string; description?: string; stack?: string[] }; - instructions?: string[]; - skills?: Record; - workflows?: Record; - roles?: Record; - targets?: Record; -} - -export interface Skill { - description?: string; - instructions?: string[]; - triggers?: string[]; - tools?: string[]; -} - -export interface Adapter { - id: string; - vendor?: string; - product?: string; - surface?: Surface; - description?: string; - support?: SupportLevel; - verification?: { - contract: "verified" | "unverified"; - runtime: RuntimeVerification; - }; - signals?: Array<{ type: string; path: string }>; - outputs: Array; - skillRoot?: string; - priority?: number; - capabilities?: Record; -} - -export interface DetectionResult { - id: string; - confidence: number; - description?: string; - signals: Array<{ type: string; path: string }>; -} - -export interface CompileOptions { - targets?: string[]; - output?: string; - dryRun?: boolean; -} - -export interface CompileResult { - success: boolean; - targets: string[]; - files: Array>; - errors: Array>; - warnings: string[]; - created: string[]; - updated: string[]; - skipped: string[]; -} - -export interface ValidateOptions { - targets?: string[]; -} - -export interface ValidationResult { - status: ValidationStatus; - score: number; - issues: Array<{ severity: string; message: string }>; - capabilities: Record; -} - -export interface ValidationReport { - valid: boolean; - targets: string[]; - results: Record; - summary: { - total: number; - valid: number; - partial: number; - invalid: number; - unknown: number; - }; - [key: string]: unknown; -} - -export const Agents: { - detect(root?: string): Promise; - compile(manifest: Manifest, options?: CompileOptions): Promise; - validate(root?: string, options?: ValidateOptions): Promise; - register(adapter: Adapter): Adapter; - list(): Adapter[]; - get(id: string): Adapter | undefined; - reset(): void; -}; - -export function register(adapter: Adapter): Adapter; -export function listAdapters(): Adapter[]; -export function getAdapter(id: string): Adapter | undefined; -export function resetRegistry(): void; diff --git a/packages/agents/src/index.js b/packages/agents/src/index.ts similarity index 81% rename from packages/agents/src/index.js rename to packages/agents/src/index.ts index b6b843a..9f50f83 100644 --- a/packages/agents/src/index.js +++ b/packages/agents/src/index.ts @@ -1,4 +1,5 @@ export { Agents } from "./agents.js"; +export type * from "./types.js"; export { registerAdapter as register, listAdapters, diff --git a/packages/agents/src/registry.js b/packages/agents/src/registry.ts similarity index 100% rename from packages/agents/src/registry.js rename to packages/agents/src/registry.ts diff --git a/packages/agents/src/shared.js b/packages/agents/src/shared.ts similarity index 95% rename from packages/agents/src/shared.js rename to packages/agents/src/shared.ts index f8f2a25..e0444b9 100644 --- a/packages/agents/src/shared.js +++ b/packages/agents/src/shared.ts @@ -1,6 +1,7 @@ import fs from "node:fs/promises"; import { constants as fsConstants } from "node:fs"; import path from "node:path"; +import type { Adapter, Manifest, Skill } from "./types.js"; const MANAGED_BEGIN = ""; const MANAGED_END = ""; @@ -30,7 +31,7 @@ export async function assertSafeWritePath(root, relativePath) { throw new Error(`Refusing symlink path: ${root}`); } } catch (error) { - if (error?.code !== "ENOENT") throw error; + if ((error as NodeJS.ErrnoException)?.code !== "ENOENT") throw error; } const relative = path.relative(absoluteRoot, absolutePath); for (const segment of relative ? relative.split(path.sep) : []) { @@ -40,7 +41,7 @@ export async function assertSafeWritePath(root, relativePath) { throw new Error(`Refusing symlink path: ${relativePath}`); } } catch (error) { - if (error?.code === "ENOENT") break; + if ((error as NodeJS.ErrnoException)?.code === "ENOENT") break; throw error; } } @@ -166,7 +167,9 @@ export function renderManifestDocument( } if (manifest.skills && typeof manifest.skills === "object") { - const skillEntries = Object.entries(manifest.skills); + const skillEntries = Object.entries(manifest.skills) as Array< + [string, Skill] + >; if (skillEntries.length > 0) { lines.push("", "## Skills"); for (const [name, skill] of skillEntries) { @@ -194,7 +197,9 @@ export function renderManifestDocument( } if (manifest.workflows && typeof manifest.workflows === "object") { - const workflowEntries = Object.entries(manifest.workflows); + const workflowEntries = Object.entries(manifest.workflows) as Array< + [string, Record] + >; if (workflowEntries.length > 0) { lines.push("", "## Workflows"); for (const [name, workflow] of workflowEntries) { @@ -216,7 +221,9 @@ export function renderManifestDocument( } if (manifest.roles && typeof manifest.roles === "object") { - const roleEntries = Object.entries(manifest.roles); + const roleEntries = Object.entries(manifest.roles) as Array< + [string, Record] + >; if (roleEntries.length > 0) { lines.push("", "## Roles"); for (const [name, role] of roleEntries) { @@ -304,7 +311,7 @@ export function renderSkillDocument(skillName, skill, target) { } export function normalizeManifest(manifest) { - const isRecord = (value) => + const isRecord = (value: unknown): value is Record => value !== null && typeof value === "object" && !Array.isArray(value); const strings = (value, label) => { if (value === undefined) return []; diff --git a/packages/agents/src/testing/conformance.js b/packages/agents/src/testing/conformance.ts similarity index 88% rename from packages/agents/src/testing/conformance.js rename to packages/agents/src/testing/conformance.ts index a4fffb3..dd6a184 100644 --- a/packages/agents/src/testing/conformance.js +++ b/packages/agents/src/testing/conformance.ts @@ -8,7 +8,9 @@ export async function verifyAdapter(adapter, { root, manifest }) { }); const report = await validate(root, { targets: [adapter.id] }); const validation = report.results[adapter.id]; - const missing = compiled.files.filter((file) => file.status !== "created"); + const missing = (compiled.files as any[]).filter( + (file) => file.status !== "created", + ); return { adapter: adapter.id, diff --git a/packages/agents/src/testing/index.d.ts b/packages/agents/src/testing/index.d.ts deleted file mode 100644 index dd7b0ae..0000000 --- a/packages/agents/src/testing/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Adapter, Manifest } from "../index.d.ts"; - -export interface ConformanceResult { - adapter: string; - vendor?: string; - compile: boolean; - validation: "valid" | "partial" | "invalid" | "unknown"; - files: string[]; - missing: string[]; - passed: boolean; -} - -export function verifyAdapter( - adapter: Adapter, - options: { root: string; manifest: Manifest }, -): Promise; diff --git a/packages/agents/src/testing/index.js b/packages/agents/src/testing/index.ts similarity index 100% rename from packages/agents/src/testing/index.js rename to packages/agents/src/testing/index.ts diff --git a/packages/agents/src/types.ts b/packages/agents/src/types.ts new file mode 100644 index 0000000..5a7b3a5 --- /dev/null +++ b/packages/agents/src/types.ts @@ -0,0 +1,68 @@ +export type Surface = "cli" | "ide" | "desktop" | "cloud" | "sdk" | "generic"; +export type SupportLevel = "native" | "portable" | "experimental"; +export type ValidationStatus = "valid" | "partial" | "invalid" | "unknown"; + +export interface Manifest { + version: 1; + project?: { name?: string; description?: string; stack?: string[] }; + instructions?: string[]; + skills?: Record; + workflows?: Record; + roles?: Record; + targets?: Targets; +} + +export interface Skill { + description?: string; + instructions?: string[]; + triggers?: string[]; + tools?: string[]; +} + +export interface Workflow { + description?: string; + steps?: string[]; + gates?: string[]; +} + +export interface Role { + description?: string; + permissions?: string[]; +} + +export interface Targets { + auto?: boolean; + enabled?: string[]; + disabled?: string[]; +} + +export interface CompileOptions { + targets?: string[]; + output?: string; + dryRun?: boolean; +} + +export interface AdapterOutput { + path: string; + format?: string; + maxBytes?: number; +} + +export interface Adapter { + id: string; + vendor?: string; + product?: string; + surface?: Surface; + description?: string; + support?: SupportLevel; + verification?: { contract: "verified" | "unverified"; runtime: string }; + signals?: Array<{ type: string; path: string }>; + outputs: Array; + skillRoot?: string; + priority?: number; + capabilities?: Record; +} + +export interface ValidationOptions { + targets?: string[]; +} diff --git a/packages/agents/src/validate.js b/packages/agents/src/validate.ts similarity index 95% rename from packages/agents/src/validate.js rename to packages/agents/src/validate.ts index a54e982..f044770 100644 --- a/packages/agents/src/validate.js +++ b/packages/agents/src/validate.ts @@ -8,12 +8,13 @@ import { readTextIfExists, resolveWithinRoot, } from "./shared.js"; +import type { ValidationOptions } from "./types.js"; function parseFrontmatter(content) { if (!content?.startsWith("---\n")) return null; const end = content.indexOf("\n---\n", 4); if (end < 0) return null; - const values = {}; + const values: Record = {}; for (const line of content.slice(4, end).split("\n")) { const separator = line.indexOf(":"); if (separator <= 0) return null; @@ -29,7 +30,7 @@ function parseFrontmatter(content) { return values; } -function checkOutput(content, output) { +function checkOutput(content: string | null, output: any) { if (content == null) return { status: "invalid", score: 0, issue: `Missing ${output.path}` }; if (!isManagedDocument(content)) @@ -83,7 +84,7 @@ function checkOutput(content, output) { return { status: "valid", score: 100 }; } -export async function validate(root = ".", options = {}) { +export async function validate(root = ".", options: ValidationOptions = {}) { const absoluteRoot = path.resolve(root); const report = {}; const results = {}; @@ -95,7 +96,7 @@ export async function validate(root = ".", options = {}) { const adapters = getTargetAdapters(requestedTargets); for (const adapter of adapters) { - const checks = []; + const checks: any[] = []; for (const output of adapter.outputs) { try { checks.push( diff --git a/packages/agents/test/conformance.test.js b/packages/agents/test/conformance.test.js index 7189b28..9ce1475 100644 --- a/packages/agents/test/conformance.test.js +++ b/packages/agents/test/conformance.test.js @@ -3,8 +3,8 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { test } from "node:test"; -import { Agents } from "../src/index.js"; -import { verifyAdapter } from "../src/testing/index.js"; +import { Agents } from "../dist/index.js"; +import { verifyAdapter } from "../dist/testing/index.js"; test("every registered adapter passes compile/write/read/validate conformance", async (t) => { const manifest = { diff --git a/packages/agents/test/smoke.test.js b/packages/agents/test/smoke.test.js index 9c13480..095431d 100644 --- a/packages/agents/test/smoke.test.js +++ b/packages/agents/test/smoke.test.js @@ -3,7 +3,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import test from "node:test"; -import { Agents } from "../src/index.js"; +import { Agents } from "../dist/index.js"; test("detect, compile, validate", async () => { const root = await fs.mkdtemp(path.join(os.tmpdir(), "agents-")); diff --git a/packages/agents/tsconfig.json b/packages/agents/tsconfig.json index e23aafa..82065f0 100644 --- a/packages/agents/tsconfig.json +++ b/packages/agents/tsconfig.json @@ -1,9 +1,20 @@ { "compilerOptions": { - "allowJs": false, + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": "src", + "outDir": "dist", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "types": ["node"], + "typeRoots": ["./node_modules/@types", "../../node_modules/@types"], "strict": true, - "noEmit": true, - "skipLibCheck": true + "noImplicitAny": false, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true }, - "include": ["src/index.d.ts"] + "include": ["src/**/*.ts"], + "exclude": ["src/**/*.d.ts"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0d500db..5bf417e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,6 +74,9 @@ importers: apps/docs: dependencies: + '@vercel/analytics': + specifier: ^2.0.1 + version: 2.0.1(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react@19.2.8) fumadocs-core: specifier: latest version: 16.15.0(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.5)(@types/mdast@4.0.4)(@types/react@19.2.18)(lucide-react@1.33.0(react@19.2.8))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(zod@4.4.3) @@ -82,7 +85,7 @@ importers: version: 15.3.1(@types/mdast@4.0.4)(@types/mdx@2.0.14)(@types/react@19.2.18)(fumadocs-core@16.15.0(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.5)(@types/mdast@4.0.4)(@types/react@19.2.18)(lucide-react@1.33.0(react@19.2.8))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(zod@4.4.3))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react@19.2.8) fumadocs-ui: specifier: latest - version: 16.15.0(@types/mdx@2.0.14)(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(fumadocs-core@16.15.0(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.5)(@types/mdast@4.0.4)(@types/react@19.2.18)(lucide-react@1.33.0(react@19.2.8))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(zod@4.4.3))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + version: 16.15.0(@types/mdx@2.0.14)(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(fumadocs-core@16.15.0(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.5)(@types/mdast@4.0.4)(@types/react@19.2.18)(lucide-react@1.33.0(react@19.2.8))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(zod@4.4.3))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(tailwindcss@4.3.3) next: specifier: latest version: 16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) @@ -93,6 +96,9 @@ importers: specifier: latest version: 19.2.8(react@19.2.8) devDependencies: + '@tailwindcss/postcss': + specifier: ^4.3.3 + version: 4.3.3 '@types/node': specifier: 26.2.0 version: 26.2.0 @@ -102,11 +108,21 @@ importers: '@types/react-dom': specifier: latest version: 19.2.4(@types/react@19.2.18) + postcss: + specifier: ^8.5.26 + version: 8.5.26 + tailwindcss: + specifier: ^4.3.3 + version: 4.3.3 typescript: specifier: latest version: 7.0.2 - packages/agents: {} + packages/agents: + devDependencies: + '@types/node': + specifier: ^26.0.0 + version: 26.2.0 packages: @@ -122,6 +138,10 @@ packages: '@actions/io@3.0.2': resolution: {integrity: sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==} + '@alloc/quick-lru@5.2.0': + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + '@babel/code-frame@7.29.7': resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} engines: {node: '>=6.9.0'} @@ -616,9 +636,22 @@ packages: resolution: {integrity: sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@manypkg/find-root@3.1.0': resolution: {integrity: sha512-BcSqCyKhBVZ5YkSzOiheMCV41kqAFptW6xGqYSTjkVTl9XQpr+pqHhwgGCOHQtjDCv7Is6EFyA14Sm5GVbVABA==} engines: {node: '>=20.0.0'} @@ -1463,6 +1496,94 @@ packages: '@swc/helpers@0.5.23': resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} + '@tailwindcss/node@4.3.3': + resolution: {integrity: sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==} + + '@tailwindcss/oxide-android-arm64@4.3.3': + resolution: {integrity: sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.3.3': + resolution: {integrity: sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.3.3': + resolution: {integrity: sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==} + engines: {node: '>= 20'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.3.3': + resolution: {integrity: sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==} + engines: {node: '>= 20'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': + resolution: {integrity: sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==} + engines: {node: '>= 20'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': + resolution: {integrity: sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-musl@4.3.3': + resolution: {integrity: sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-gnu@4.3.3': + resolution: {integrity: sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-musl@4.3.3': + resolution: {integrity: sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-wasm32-wasi@4.3.3': + resolution: {integrity: sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': + resolution: {integrity: sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.3.3': + resolution: {integrity: sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==} + engines: {node: '>= 20'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.3.3': + resolution: {integrity: sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==} + engines: {node: '>= 20'} + + '@tailwindcss/postcss@4.3.3': + resolution: {integrity: sha512-JTSZZGQi1AyKirbLN3azmjVzef92tcX7h+iSqPdaeStyFpGpDlKvvpxeOE8njhbUanbRwr3z8DyzhICWnMtQeg==} + '@trpc/client@11.18.0': resolution: {integrity: sha512-wOqeg3Fvl25V1ZisQhUD3K8G60ZJDlSGJNSyeXrLH24xAo5w6GSR2Kzb1cSNY9Y+IQ2YZvYGZstBU+V/ulo/ow==} hasBin: true @@ -1646,6 +1767,35 @@ packages: '@ungap/structured-clone@1.3.3': resolution: {integrity: sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==} + '@vercel/analytics@2.0.1': + resolution: {integrity: sha512-MTQG6V9qQrt1tsDeF+2Uoo5aPjqbVPys1xvnIftXSJYG2SrwXRHnqEvVoYID7BTruDz4lCd2Z7rM1BdkUehk2g==} + peerDependencies: + '@remix-run/react': ^2 + '@sveltejs/kit': ^1 || ^2 + next: '>= 13' + nuxt: '>= 3' + react: ^18 || ^19 || ^19.0.0-rc + svelte: '>= 4' + vue: ^3 + vue-router: ^4 + peerDependenciesMeta: + '@remix-run/react': + optional: true + '@sveltejs/kit': + optional: true + next: + optional: true + nuxt: + optional: true + react: + optional: true + svelte: + optional: true + vue: + optional: true + vue-router: + optional: true + '@yarnpkg/lockfile@1.1.0': resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} @@ -2101,6 +2251,10 @@ packages: end-of-stream@1.4.5: resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + enhanced-resolve@5.24.5: + resolution: {integrity: sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==} + engines: {node: '>=10.13.0'} + enquirer@2.3.6: resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} engines: {node: '>=8.6'} @@ -2711,6 +2865,76 @@ packages: launch-editor@2.14.1: resolution: {integrity: sha512-QWBrQsMpH7gPr965dsKD/3cKWiNoTjpATQf++Xq63N6sKRGMwlVXz41O1IZTMfZQgBctD/K5Zt06+/I6pP6+HA==} + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -2763,6 +2987,9 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.2.2: resolution: {integrity: sha512-veT/+7iXrXzT39XnEN4lOxtNl72dMgJ8Lp+5Bd6YcMSWpb0n0MjBM8Uuooi6jgJr8dhUW2swQgBmoZVMni5SVg==} @@ -3315,6 +3542,10 @@ packages: resolution: {integrity: sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.26: + resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} + engines: {node: ^10 || ^12 || >=14} + pretty-ms@9.3.0: resolution: {integrity: sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==} engines: {node: '>=18'} @@ -3695,6 +3926,13 @@ packages: resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} engines: {node: '>=20'} + tailwindcss@4.3.3: + resolution: {integrity: sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} @@ -4001,6 +4239,8 @@ snapshots: '@actions/io@3.0.2': {} + '@alloc/quick-lru@5.2.0': {} + '@babel/code-frame@7.29.7': dependencies: '@babel/helper-validator-identifier': 7.29.7 @@ -4294,7 +4534,9 @@ snapshots: optionalDependencies: '@types/react': 19.2.18 - '@fumadocs/tailwind@0.1.1': {} + '@fumadocs/tailwind@0.1.1(tailwindcss@4.3.3)': + optionalDependencies: + tailwindcss: 4.3.3 '@fumari/image-size@0.1.0': {} @@ -4407,8 +4649,25 @@ snapshots: '@jest/diff-sequences@30.0.1': {} + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/sourcemap-codec@1.5.5': {} + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + '@manypkg/find-root@3.1.0': dependencies: '@manypkg/tools': 2.1.2 @@ -5201,6 +5460,75 @@ snapshots: dependencies: tslib: 2.8.1 + '@tailwindcss/node@4.3.3': + dependencies: + '@jridgewell/remapping': 2.3.5 + enhanced-resolve: 5.24.5 + jiti: 2.7.0 + lightningcss: 1.32.0 + magic-string: 0.30.21 + source-map-js: 1.2.1 + tailwindcss: 4.3.3 + + '@tailwindcss/oxide-android-arm64@4.3.3': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.3.3': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.3.3': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.3.3': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.3.3': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.3.3': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.3.3': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.3.3': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.3.3': + optional: true + + '@tailwindcss/oxide@4.3.3': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.3.3 + '@tailwindcss/oxide-darwin-arm64': 4.3.3 + '@tailwindcss/oxide-darwin-x64': 4.3.3 + '@tailwindcss/oxide-freebsd-x64': 4.3.3 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.3 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.3 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.3 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.3 + '@tailwindcss/oxide-linux-x64-musl': 4.3.3 + '@tailwindcss/oxide-wasm32-wasi': 4.3.3 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.3 + + '@tailwindcss/postcss@4.3.3': + dependencies: + '@alloc/quick-lru': 5.2.0 + '@tailwindcss/node': 4.3.3 + '@tailwindcss/oxide': 4.3.3 + postcss: 8.5.26 + tailwindcss: 4.3.3 + '@trpc/client@11.18.0(@trpc/server@11.18.0(typescript@7.0.2))(typescript@7.0.2)': dependencies: '@trpc/server': 11.18.0(typescript@7.0.2) @@ -5321,6 +5649,11 @@ snapshots: '@ungap/structured-clone@1.3.3': {} + '@vercel/analytics@2.0.1(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react@19.2.8)': + optionalDependencies: + next: 16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + react: 19.2.8 + '@yarnpkg/lockfile@1.1.0': {} '@yuku-analyzer/binding-android-arm64@0.8.7': @@ -5667,8 +6000,7 @@ snapshots: dequal@2.0.3: {} - detect-libc@2.1.2: - optional: true + detect-libc@2.1.2: {} detect-node-es@1.1.0: {} @@ -5712,6 +6044,11 @@ snapshots: dependencies: once: 1.4.0 + enhanced-resolve@5.24.5: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + enquirer@2.3.6: dependencies: ansi-colors: 4.1.3 @@ -6007,10 +6344,10 @@ snapshots: transitivePeerDependencies: - supports-color - fumadocs-ui@16.15.0(@types/mdx@2.0.14)(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(fumadocs-core@16.15.0(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.5)(@types/mdast@4.0.4)(@types/react@19.2.18)(lucide-react@1.33.0(react@19.2.8))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(zod@4.4.3))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8): + fumadocs-ui@16.15.0(@types/mdx@2.0.14)(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(fumadocs-core@16.15.0(@mdx-js/mdx@3.1.1)(@types/estree-jsx@1.0.5)(@types/hast@3.0.5)(@types/mdast@4.0.4)(@types/react@19.2.18)(lucide-react@1.33.0(react@19.2.8))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(zod@4.4.3))(next@16.3.2(@types/node@26.2.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(tailwindcss@4.3.3): dependencies: '@fuma-translate/react': 1.0.2(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) - '@fumadocs/tailwind': 0.1.1 + '@fumadocs/tailwind': 0.1.1(tailwindcss@4.3.3) '@radix-ui/react-accordion': 1.2.20(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@radix-ui/react-collapsible': 1.1.20(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@radix-ui/react-dialog': 1.1.23(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) @@ -6406,6 +6743,55 @@ snapshots: picocolors: 1.1.1 shell-quote: 1.10.0 + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + lines-and-columns@1.2.4: {} lines-and-columns@2.0.3: {} @@ -6449,6 +6835,10 @@ snapshots: dependencies: react: 19.2.8 + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + magic-string@1.2.2: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -7352,6 +7742,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + postcss@8.5.26: + dependencies: + nanoid: 3.3.18 + picocolors: 1.1.1 + source-map-js: 1.2.1 + pretty-ms@9.3.0: dependencies: parse-ms: 4.0.0 @@ -7816,6 +8212,10 @@ snapshots: tagged-tag@1.0.0: {} + tailwindcss@4.3.3: {} + + tapable@2.3.3: {} + tar-stream@2.2.0: dependencies: bl: 4.1.0 diff --git a/public/assets/flow.png b/public/assets/flow.png new file mode 100644 index 0000000..5e7ea72 Binary files /dev/null and b/public/assets/flow.png differ diff --git a/scripts/check-support-matrix.mjs b/scripts/check-support-matrix.mjs index f012ce2..d4b3444 100644 --- a/scripts/check-support-matrix.mjs +++ b/scripts/check-support-matrix.mjs @@ -1,5 +1,5 @@ import { readFile } from "node:fs/promises"; -import { Agents } from "../packages/agents/src/index.js"; +import { Agents } from "../packages/agents/dist/index.js"; const matrix = await readFile("docs/support-matrix.md", "utf8"); const adapters = Agents.list(); diff --git a/scripts/live-smoke.mjs b/scripts/live-smoke.mjs index 8e1c486..f904148 100644 --- a/scripts/live-smoke.mjs +++ b/scripts/live-smoke.mjs @@ -3,7 +3,7 @@ import { tmpdir } from "node:os"; import path from "node:path"; import { execFile } from "node:child_process"; import { promisify } from "node:util"; -import { Agents } from "../packages/agents/src/index.js"; +import { Agents } from "../packages/agents/dist/index.js"; const run = promisify(execFile); const manifest = { diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..f4ed155 --- /dev/null +++ b/vercel.json @@ -0,0 +1,6 @@ +{ + "framework": "nextjs", + "installCommand": "pnpm install --frozen-lockfile", + "buildCommand": "pnpm build", + "devCommand": "pnpm dev" +}