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
11 changes: 11 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"semi": false,
"singleQuote": false,
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 80,
"experimentalSortImports": {},
"experimentalSortPackageJson": true,
"ignorePatterns": []
}
44 changes: 44 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"eslint",
"typescript",
"unicorn",
"oxc",
"import",
"jsdoc",
"node",
"promise",
"vitest"
],
"globals": {},
"settings": {},
"categories": {
"correctness": "error",
"perf": "warn",
"suspicious": "warn",
"pedantic": "off"
},
"rules": {
"curly": "error",
"no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"typescript/no-explicit-any": "error",
"typescript/no-misused-promises": "warn",
"typescript/restrict-template-expressions": "warn"
},
"overrides": [
{
"files": ["**/*.test.ts"],
"rules": {
"typescript/no-explicit-any": "off"
}
}
]
}
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"recommendations": ["oxc.oxc-vscode"]
}
40 changes: 6 additions & 34 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,15 @@
{
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[mdx]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},

"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
"source.fixAll": "always"
},
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,

"eslint.useFlatConfig": true,

"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,

"oxc.enable": true,
"oxc.fixKind": "safe_fix_or_suggestion",
"oxc.typeAware": true,
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "node_modules/typescript/lib",

"eslint.workingDirectories": [
{
"mode": "auto"
}
]
"typescript.tsdk": "node_modules/typescript/lib"
}
13 changes: 4 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Changes to a leaf package require rebuilding everything above it. Turbo handles
- **`tools/`** - Internal workspace packages (not published):
- `api-utils` - Hono API helpers, middleware, JWT validation
- `cli-tools` - Demo CLI utilities
- `eslint-config` - Shared ESLint flat config
- `typescript-config` - Shared tsconfig bases
- **`docs/`** - Mintlify documentation site (`pnpm dev:docs`)

Expand Down Expand Up @@ -92,22 +91,18 @@ Vitest with individual `vitest.config.ts` per package.

## Code Style

### Formatting (Prettier)
### Formatting (oxfmt)

- No semicolons
- Double quotes
- Trailing commas
- 2-space indentation
- Import sorting handled by oxfmt

### Imports

- Sorting handled by `@ianvs/prettier-plugin-sort-imports` (via Prettier, not ESLint)
- Enforced `import type { ... }` via ESLint `consistent-type-imports` rule

### Linting
### Linting (oxlint)

- Unused vars: warning with `^_` prefix ignore pattern
- CSpell spell checking integrated into ESLint (config: `cspell.config.yaml`)
- Config: `.oxlintrc.json` at repo root, run from root (not per-package)

## Demos

Expand Down
22 changes: 0 additions & 22 deletions cspell.config.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions demos/e2e/eslint.config.js

This file was deleted.

13 changes: 5 additions & 8 deletions demos/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@
"private": true,
"homepage": "https://github.com/agentcommercekit/ack#readme",
"bugs": "https://github.com/agentcommercekit/ack/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/agentcommercekit/ack.git",
"directory": "demos/e2e"
},
"license": "MIT",
"author": {
"name": "Catena Labs",
"url": "https://catenalabs.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/agentcommercekit/ack.git",
"directory": "demos/e2e"
},
"type": "module",
"main": "./src/index.ts",
"scripts": {
"check:types": "tsc --noEmit",
"clean": "git clean -fdX .turbo",
"demo": "tsx ./src/index.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest"
},
"dependencies": {
Expand All @@ -31,7 +29,6 @@
"viem": "catalog:"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*"
}
}
4 changes: 3 additions & 1 deletion demos/e2e/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ import {
type Keypair,
type PaymentRequest,
} from "agentcommercekit"

import type { CredentialVerifier } from "./credential-verifier"
import { PaymentRequiredError } from "./payment-required-error"
import type { ReceiptVerifier } from "./receipt-verifier"

import { PaymentRequiredError } from "./payment-required-error"
import { publicKeyToAddress } from "./utils/evm-address"
import { verifyAgentIdentityWithCredential } from "./verification"

Expand Down
1 change: 1 addition & 0 deletions demos/e2e/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
type Keypair,
type PaymentRequest,
} from "agentcommercekit"

import { Agent } from "./agent"
import { CredentialIssuer } from "./credential-issuer"
import { CredentialVerifier } from "./credential-verifier"
Expand Down
1 change: 1 addition & 0 deletions demos/e2e/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
type JwtSigner,
type Keypair,
} from "agentcommercekit"

import { publicKeyToAddress } from "./utils/evm-address"

interface ConstructorParams {
Expand Down
1 change: 1 addition & 0 deletions demos/e2e/src/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
type DidResolver,
type JwtString,
} from "agentcommercekit"

import type { CredentialVerifier } from "./credential-verifier"

/**
Expand Down
1 change: 0 additions & 1 deletion demos/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@repo/typescript-config/typescript-library.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
Expand Down
7 changes: 0 additions & 7 deletions demos/identity-a2a/eslint.config.js

This file was deleted.

13 changes: 5 additions & 8 deletions demos/identity-a2a/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@
"private": true,
"homepage": "https://github.com/agentcommercekit/ack#readme",
"bugs": "https://github.com/agentcommercekit/ack/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/agentcommercekit/ack.git",
"directory": "demos/identity-a2a"
},
"license": "MIT",
"author": {
"name": "Catena Labs",
"url": "https://catenalabs.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/agentcommercekit/ack.git",
"directory": "demos/identity-a2a"
},
"type": "module",
"scripts": {
"check:types": "tsc --noEmit",
"clean": "git clean -fdX .turbo",
"demo": "tsx ./src/run-demo.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest"
},
"dependencies": {
Expand All @@ -34,7 +32,6 @@
"valibot": "catalog:"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/express": "5.0.3"
}
Expand Down
3 changes: 2 additions & 1 deletion demos/identity-a2a/src/agent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/require-await */
/**
* Agent base class with DID-first architecture
*
Expand All @@ -16,6 +15,7 @@ import type {
Message,
RequestContext,
} from "@a2a-js/sdk"

import { colors } from "@repo/cli-tools"
import {
createDidDocumentFromKeypair,
Expand All @@ -32,6 +32,7 @@ import {
} from "agentcommercekit"
import { createAgentCardServiceEndpoint } from "agentcommercekit/a2a"
import { v4 } from "uuid"

import { issueCredential } from "./issuer"

type AgentConfig = {
Expand Down
4 changes: 2 additions & 2 deletions demos/identity-a2a/src/bank-client-agent.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-unnecessary-condition */

import type { Server } from "node:http"

import {
A2AClient,
type AgentCard,
Expand All @@ -23,6 +22,7 @@ import {
import { messageSchema } from "agentcommercekit/a2a/schemas/valibot"
import { v4 } from "uuid"
import * as v from "valibot"

import { Agent } from "./agent"
import { didResolverWithIssuer, issuerDid } from "./issuer"
import { fetchUrlFromAgentCardUrl } from "./utils/fetch-agent-card"
Expand Down
1 change: 1 addition & 0 deletions demos/identity-a2a/src/bank-teller-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
verifyA2ASignedMessage,
} from "agentcommercekit/a2a"
import { v4 } from "uuid"

import { Agent } from "./agent"
import { didResolverWithIssuer, issuerDid } from "./issuer"
import { startAgentServer } from "./utils/server-utils"
Expand Down
1 change: 1 addition & 0 deletions demos/identity-a2a/src/run-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { colors, waitForEnter } from "@repo/cli-tools"

import { getClientAgent } from "./bank-client-agent"
import { startTellerServer } from "./bank-teller-agent"

Expand Down
1 change: 1 addition & 0 deletions demos/identity-a2a/src/utils/server-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
} from "@a2a-js/sdk"
import { colors, createLogger, type Logger } from "@repo/cli-tools"
import express from "express"

import type { Agent } from "../agent"

type Options = {
Expand Down
1 change: 0 additions & 1 deletion demos/identity-a2a/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@repo/typescript-config/typescript-library.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
Expand Down
7 changes: 0 additions & 7 deletions demos/identity/eslint.config.js

This file was deleted.

Loading