Skip to content

espennilsen/pi / extensions/pi-a2a

pi-a2a

Flagged

FileKindSize
AGENTS.mdmarkdown12.0 KB
CHANGELOG.mdmarkdown1.3 KB
README.mdmarkdown11.0 KB
SKILL.mdskill md9.7 KB
agent-card-auth.test.tsscript1.7 KB
agent-card.tsscript6.1 KB
agent-executor.tsscript38.7 KB
auth-integration.test.tsscript4.6 KB
auth-selector.test.tsscript4.0 KB
auth-selector.tsscript2.6 KB
auth-types.tsscript3.7 KB
client.test.tsscript3.1 KB
client.tsscript14.9 KB
config-auth.test.tsscript4.0 KB
config.tsscript9.1 KB
cost.test.tsscript1.8 KB
hub.test.tsscript6.2 KB
hub.tsscript39.5 KB
inbound-auth.test.tsscript2.6 KB
inbound-auth.tsscript4.4 KB
index.tsscript136.5 KB
logger.tsscript1.5 KB
long-running-task-store.tsscript6.3 KB
outbound-auth.test.tsscript1.5 KB
outbound-auth.tsscript1.6 KB
package-lock.jsonmanifest149.9 KB
package.jsonmanifest1.5 KB
peer-metadata.test.tsscript3.7 KB
peer-metadata.tsscript4.6 KB
port-finder.tsscript742 B
server.tsscript12.6 KB
static-agents.tsscript5.8 KB
supervisor.test.tsscript6.1 KB
supervisor.tsscript8.4 KB
task-store.tsscript12.5 KB
token-provider.test.tsscript5.3 KB
token-provider.tsscript7.7 KB
tool-telemetry.test.tsscript2.8 KB
tool-telemetry.tsscript1.7 KB
tsconfig.jsonconfig274 B
types.tsscript11.3 KB

agent-card-auth.test.ts

View on GitHub
import assert from "node:assert/strict";
import { test } from "node:test";
import { buildAgentCard } from "./agent-card.ts";
import type { A2AConfig } from "./types.ts";

test("security reflects runtime-supported modes without leaking configuration secrets", () => {
	const legacy = buildAgentCard({ local: { apiKey: "secret", auth: { supportedAuthModes: ["legacy-api-key"] } } }, "http://x", ["legacy-api-key"]) as any;
	assert.deepEqual(Object.keys(legacy.securitySchemes), ["bearerAuth"]);
	const config: A2AConfig = {
		local: { apiKey: "secret", auth: {
			supportedAuthModes: ["legacy-api-key", "oauth2", "oauth2+mtls"],
			oauth2: {
				clientSecret: "nope",
				authorizationServer: "https://issuer.example/token",
				trustedTokenEndpointOrigins: ["https://issuer.example"],
			},
			mtls: { keyPath: "nope" },
		} },

	};
	const mixed = buildAgentCard(config, "http://x", ["legacy-api-key", "oauth2", "oauth2+mtls"]) as any;
	assert.deepEqual(Object.keys(mixed.securitySchemes).sort(), ["bearerAuth", "oauth2", "mutualTLS"].sort());
	assert.deepEqual(mixed.security, [{ bearerAuth: [] }, { oauth2: [] }, { oauth2: [], mutualTLS: [] }]);
	assert.equal(JSON.stringify(mixed).includes("secret"), false);
	assert.equal(JSON.stringify(mixed).includes("nope"), false);
	assert.equal(mixed.securitySchemes.oauth2.flows.clientCredentials.tokenUrl, "https://issuer.example/token");
});

test("does not advertise OAuth without a pinned HTTPS token endpoint", () => {
	const card = buildAgentCard(
		{ local: { auth: { supportedAuthModes: ["oauth2"], oauth2: { authorizationServer: "https://issuer.example/token" } } } },
		"https://agent.example",
		["oauth2"],
	) as any;
	assert.equal(card.securitySchemes, undefined);
	assert.equal(card.security, undefined);
});
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall