Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ node dist/cli.js --help

Windows is not supported in v1.

## Official package attribution

`@agentcommunity/cli` is the official umbrella command-line client published by [Agent Community](https://agentcommunity.org/developers) from [github.com/agentcommunity/cli](https://github.com/agentcommunity/cli). It is a CLI application and does not expose a public JavaScript SDK. For code-level agent discovery, use the AID SDKs listed on the [Agent Community developer resources page](https://agentcommunity.org/developers).

## Commands

```text
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"name": "@agentcommunity/cli",
"version": "0.1.2",
"description": "Official command-line client for Agent Community public data and user-claimed authorization",
"version": "0.1.3",
"description": "Official Agent Community CLI for public MCP, content, NLWeb, batch, and user-claimed authorization interfaces",
"keywords": [
"agentcommunity",
"agent-community",
"cli",
"ai-agents",
"mcp",
"model-context-protocol"
],
"type": "module",
"bin": {
"agentcommunity": "dist/cli.js"
Expand Down
22 changes: 22 additions & 0 deletions scripts/audit-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ import { normalizeNpmPackResult } from "./npm-pack-result.js";

const expectedFiles = ["LICENSE", "README.md", "SECURITY.md", "dist/cli.js", "package.json"];
const expectedBin = { agentcommunity: "dist/cli.js" };
const expectedKeywords = [
"agentcommunity",
"agent-community",
"cli",
"ai-agents",
"mcp",
"model-context-protocol",
];
const expectedDescription =
"Official Agent Community CLI for public MCP, content, NLWeb, batch, and user-claimed authorization interfaces";
const installedBinRelativePath = "node_modules/.bin/agentcommunity";
const secretPatterns = [
/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/,
Expand Down Expand Up @@ -40,6 +50,12 @@ async function main(): Promise<void> {
const repositoryRoot = new URL("../", import.meta.url).pathname;
const packageJson = JSON.parse(await readFile(join(repositoryRoot, "package.json"), "utf8"));
assertExactBin(packageJson, "Source");
if (packageJson.description !== expectedDescription) {
throw new Error("Official CLI description drift detected.");
}
if (JSON.stringify(packageJson.keywords) !== JSON.stringify(expectedKeywords)) {
throw new Error("Official CLI keyword drift detected.");
}
if (packageJson.name !== "@agentcommunity/cli" || packageJson.exports !== undefined) {
throw new Error("Package metadata is outside the CLI-only boundary.");
}
Expand All @@ -58,6 +74,12 @@ async function main(): Promise<void> {
if (JSON.stringify(inventory) !== JSON.stringify(expectedFiles)) throw new Error(`Unexpected package inventory: ${inventory.join(", ")}`);
const tarballPath = join(destination, basename(result.filename));
const packedManifest = JSON.parse(command("tar", ["-xOf", tarballPath, "package/package.json"], repositoryRoot));
if (packedManifest.description !== expectedDescription) {
throw new Error("Packed CLI description drift detected.");
}
if (JSON.stringify(packedManifest.keywords) !== JSON.stringify(expectedKeywords)) {
throw new Error("Packed CLI keyword drift detected.");
}
assertExactBin(packedManifest, "Packed tarball");
const tarball = await readFile(tarballPath);
const tarballSha256 = createHash("sha256").update(tarball).digest("hex");
Expand Down
13 changes: 12 additions & 1 deletion src/__tests__/package-boundary.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { spawnSync } from "node:child_process";
import { readFileSync } from "node:fs";
import { chmod, lstat, mkdir, mkdtemp, readFile, realpath, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { basename, join } from "node:path";
import { fileURLToPath } from "node:url";
import { describe, expect, test } from "vitest";
import { describe, expect, it, test } from "vitest";

import { normalizeNpmPackResult } from "../../scripts/npm-pack-result.js";

Expand All @@ -17,6 +18,16 @@ function command(commandName: string, args: Array<string>, cwd: string): string
}

describe("package and CI boundaries", () => {
it("states official ownership and keeps the CLI distinct from SDK packages", function () {
const readme = readFileSync(new URL("../../README.md", import.meta.url), "utf8");

expect(readme).toContain("Official package attribution");
expect(readme).toContain("@agentcommunity/cli");
expect(readme).toContain("https://github.com/agentcommunity/cli");
expect(readme).toContain("https://agentcommunity.org/developers");
expect(readme).toContain("does not expose a public JavaScript SDK");
});

test("declares a CLI-only package for the maintained Node and OS matrix", async () => {
const packageJson = JSON.parse(await readFile(new URL("package.json", root), "utf8"));
expect(packageJson).toMatchObject({
Expand Down
Loading