Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f84de88
feat(templates): add camelot-clmm-agent template
0xTomDaniel Nov 6, 2025
9ff94ef
chore(templates): remove .env.example from camelot-clmm-agent
0xTomDaniel Nov 11, 2025
d3953e5
feat(templates): configure camelot-clmm-agent with ERC-8004 support
0xTomDaniel Nov 11, 2025
b32ffe3
refactor(templates): migrate to packaged workflow architecture
0xTomDaniel Nov 11, 2025
d334997
docs(templates): update camelot-clmm-agent documentation
0xTomDaniel Nov 11, 2025
0406225
build: exclude template config directories from workspace
0xTomDaniel Nov 11, 2025
8a8245e
refactor(templates): remove legacy usdai workflow package
0xTomDaniel Nov 11, 2025
c9bbb79
feat(templates): add Camelot CLMM rebalancing workflow
0xTomDaniel Nov 11, 2025
97faf39
build: add global flag control for rulesync command
0xTomDaniel Nov 12, 2025
2152436
test: extend vitest to discover template workflow tests
0xTomDaniel Nov 12, 2025
79952e0
docs(commands): enforce no mocking policy for e2e tests
0xTomDaniel Nov 12, 2025
06800d3
feat(templates): migrate Camelot CLMM to Ember unified API
0xTomDaniel Nov 12, 2025
f7d8ae7
test(templates): add comprehensive test suite for Camelot CLMM agent
0xTomDaniel Nov 12, 2025
ad643b3
style(templates): remove extra blank line in index.ts
0xTomDaniel Nov 12, 2025
bb10e3c
test(templates): expand test coverage for Ember API client
0xTomDaniel Nov 12, 2025
1a34a28
test(templates): add unit tests for CLMM agent core modules
0xTomDaniel Nov 12, 2025
1c128b7
build(templates): add testing and linting infrastructure to CLMM agent
0xTomDaniel Nov 13, 2025
a0b8b20
fix(templates): correct token approval target address
0xTomDaniel Nov 13, 2025
8639d80
style(templates): apply linting and formatting to CLMM agent
0xTomDaniel Nov 13, 2025
69a29de
docs(templates): add README for Camelot CLMM agent workflow
0xTomDaniel Nov 13, 2025
e63a157
chore(templates): remove sample-package placeholder
0xTomDaniel Nov 13, 2025
308e98d
fix(clients/web): use agent card url field for A2A requests
0xTomDaniel Nov 14, 2025
ed14d8e
fix(agent-node): respect --port flag and display correct URLs
0xTomDaniel Nov 14, 2025
f63c853
chore(templates): remove sample workflow references from config
0xTomDaniel Nov 14, 2025
f41962d
build: update pnpm lockfile after dependency changes
0xTomDaniel Nov 14, 2025
fb3e080
docs(rules): sync agent guidelines with rulesync
0xTomDaniel Nov 19, 2025
fa01d01
feat(workflows): run clmm workflow with agent wallet
0xTomDaniel Nov 19, 2025
45a04a9
feat(workflows): add camelot cli demo tools
0xTomDaniel Nov 19, 2025
c3a7de7
build(scripts): add camelot midprice comparison tool
0xTomDaniel Nov 27, 2025
a190987
build(docker): add camelot clmm agent image
0xTomDaniel Nov 27, 2025
a0d3e03
feat(workflows): expand clmm telemetry and ranges
0xTomDaniel Nov 27, 2025
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
14 changes: 11 additions & 3 deletions .claude/commands/write-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ You are an expert test engineer who writes comprehensive, maintainable tests. Yo
1. **NEVER modify src/ files without .test.ts suffix** - You're forbidden from touching production code
2. **ALWAYS test behavior (WHAT) not implementation (HOW)** - Test outcomes, not mechanics
3. **Write comprehensive tests** - Cover success paths, error cases, and edge conditions
4. **Use vi.mock() for unit tests; MSW for HTTP integration; Anvil for EVM integration** - Choose the right tool
4. **Use vi.mock() for unit tests; MSW for HTTP integration; Anvil for EVM integration; NEVER mock e2e tests** - Choose the right tool and keep e2e fully live
5. **Place test utilities in tests/utils/ only** - Never in .claude/, src/, or root

**Non-negotiable**: `*.e2e.test.ts` files must hit real services or dedicated testnets directly—no MSW, no recorded mocks, no HTTP interceptors. If you cannot reach the live dependency, pause the e2e effort instead of faking it.
## ⚖️ Critical Boundaries

### ❌ CANNOT DO:
Expand Down Expand Up @@ -57,6 +58,7 @@ Where should test file go?
- Adapter/SDK → Integration tests with MSW
- Repository → Integration tests with real DB
- Blockchain/EVM → Integration tests with Anvil
- Full system/e2e flows → End-to-end tests that call real services/testnets directly (no MSW or stubbed HTTP; Anvil only if the entire chain is the target environment)

2. **Check existing patterns**:
- Search for similar test files: `**/*.[same-type].test.ts`
Expand Down Expand Up @@ -116,6 +118,12 @@ Need to test something?

## 🔧 Tool Usage Guide

### Non-negotiable: E2E tests stay live

- Never register MSW handlers, mock fetch/axios, or intercept RPC calls inside `*.e2e.test.ts`.
- E2E tests must call the same public/testnet endpoints the product uses (or a dedicated staging environment) and should fail fast if those endpoints are unreachable.
- Anvil is acceptable for e2e only when the whole scenario is meant to run against a deterministic fork or local chain—treat it as the target environment, not a mock layer.

### Use vi.mock() when:

- Testing unit logic in isolation
Expand Down Expand Up @@ -158,8 +166,8 @@ For Anvil-based tests:
- Scope: keep light (smoke tests)
- When to run: Skip in feature branch CI; required before merging to main
- Placement: `tests/` directory (`*.e2e.test.ts`)
- Avoid MSW and Anvil; prefer real services/testnets
- Anvil fork can be used in CI for deterministic smoke tests
- **Never** attach MSW, mock fetch, or replay recorded HTTP for e2e tests—real services/testnets only
- Anvil fork can be used in CI for deterministic smoke tests when the on-chain network itself is the dependency (e.g., forked Arbitrum); this replaces the real chain, not the HTTP layer
- Heuristic: e2e tests are fire alarms, not microscopes—detect breakage, not root cause

## 🧩 BDD Mapping
Expand Down
14 changes: 11 additions & 3 deletions .cursor/commands/write-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ You are an expert test engineer who writes comprehensive, maintainable tests. Yo
1. **NEVER modify src/ files without .test.ts suffix** - You're forbidden from touching production code
2. **ALWAYS test behavior (WHAT) not implementation (HOW)** - Test outcomes, not mechanics
3. **Write comprehensive tests** - Cover success paths, error cases, and edge conditions
4. **Use vi.mock() for unit tests; MSW for HTTP integration; Anvil for EVM integration** - Choose the right tool
4. **Use vi.mock() for unit tests; MSW for HTTP integration; Anvil for EVM integration; NEVER mock e2e tests** - Choose the right tool and keep e2e fully live
5. **Place test utilities in tests/utils/ only** - Never in .claude/, src/, or root

**Non-negotiable**: `*.e2e.test.ts` files must hit real services or dedicated testnets directly—no MSW, no recorded mocks, no HTTP interceptors. If you cannot reach the live dependency, pause the e2e effort instead of faking it.
## ⚖️ Critical Boundaries

### ❌ CANNOT DO:
Expand Down Expand Up @@ -54,6 +55,7 @@ Where should test file go?
- Adapter/SDK → Integration tests with MSW
- Repository → Integration tests with real DB
- Blockchain/EVM → Integration tests with Anvil
- Full system/e2e flows → End-to-end tests that call real services/testnets directly (no MSW or stubbed HTTP; Anvil only if the entire chain is the target environment)

2. **Check existing patterns**:
- Search for similar test files: `**/*.[same-type].test.ts`
Expand Down Expand Up @@ -113,6 +115,12 @@ Need to test something?

## 🔧 Tool Usage Guide

### Non-negotiable: E2E tests stay live

- Never register MSW handlers, mock fetch/axios, or intercept RPC calls inside `*.e2e.test.ts`.
- E2E tests must call the same public/testnet endpoints the product uses (or a dedicated staging environment) and should fail fast if those endpoints are unreachable.
- Anvil is acceptable for e2e only when the whole scenario is meant to run against a deterministic fork or local chain—treat it as the target environment, not a mock layer.

### Use vi.mock() when:

- Testing unit logic in isolation
Expand Down Expand Up @@ -155,8 +163,8 @@ For Anvil-based tests:
- Scope: keep light (smoke tests)
- When to run: Skip in feature branch CI; required before merging to main
- Placement: `tests/` directory (`*.e2e.test.ts`)
- Avoid MSW and Anvil; prefer real services/testnets
- Anvil fork can be used in CI for deterministic smoke tests
- **Never** attach MSW, mock fetch, or replay recorded HTTP for e2e tests—real services/testnets only
- Anvil fork can be used in CI for deterministic smoke tests when the on-chain network itself is the dependency (e.g., forked Arbitrum); this replaces the real chain, not the HTTP layer
- Heuristic: e2e tests are fire alarms, not microscopes—detect breakage, not root cause

## 🧩 BDD Mapping
Expand Down
13 changes: 10 additions & 3 deletions .cursor/rules/root.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ globs: **/*
- Unit tests mirror source directory structure
- Use Vitest for testing framework (migrating from Mocha)
- Follow Test-Driven Development (TDD) practices
- For detailed testing guidelines, see `docs/testing-strategy.md` and the TDD agents
- For detailed testing guidelines, see `.rulesync/commands/write-tests.md` and the TDD agents

### Working with Test Infrastructure and Code

When modifying test infrastructure (MSW handlers, test utilities, mock data):

- **ALWAYS read** `.claude/agents/tdd-test-writer.md` FIRST for requirements and patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for requirements and patterns
- This includes creating new handlers, updating existing ones, or adding mock utilities

When implementing or modifying code (whether making tests pass or any other changes):

- **ALWAYS read** `.claude/agents/test-driven-coder.md` FIRST for implementation patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for implementation patterns

### Environment Configuration

Expand Down Expand Up @@ -114,6 +114,13 @@ globs: ["**/*"]
- **NEVER use `any` type** - use proper types, `unknown`, or type assertions with `as`
- Never use `.passthrough()` with Zod schemas

### Script Conventions

- Every package must expose `lint`, `lint:fix`, `format`, `format:check`, `test`, `test:watch`, `test:ci`, and `build` scripts so workspace-level commands succeed.
- `lint` runs ESLint in check mode only (no writes, no Prettier); `lint:fix` runs ESLint with `--fix`.
- `format` runs Prettier with `--write`; `format:check` runs Prettier with `--check`.
- Do not chain Prettier inside linting scripts—keep linting and formatting responsibilities separated for clarity and predictable CI behavior.

### Refactoring and Breaking Changes

**CRITICAL: NEVER maintain backwards compatibility. This is an internal codebase, not a public library.**
Expand Down
14 changes: 11 additions & 3 deletions .rulesync/commands/write-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ You are an expert test engineer who writes comprehensive, maintainable tests. Yo
1. **NEVER modify src/ files without .test.ts suffix** - You're forbidden from touching production code
2. **ALWAYS test behavior (WHAT) not implementation (HOW)** - Test outcomes, not mechanics
3. **Write comprehensive tests** - Cover success paths, error cases, and edge conditions
4. **Use vi.mock() for unit tests; MSW for HTTP integration; Anvil for EVM integration** - Choose the right tool
4. **Use vi.mock() for unit tests; MSW for HTTP integration; Anvil for EVM integration; NEVER mock e2e tests** - Choose the right tool and keep e2e fully live
5. **Place test utilities in tests/utils/ only** - Never in .claude/, src/, or root

**Non-negotiable**: `*.e2e.test.ts` files must hit real services or dedicated testnets directly—no MSW, no recorded mocks, no HTTP interceptors. If you cannot reach the live dependency, pause the e2e effort instead of faking it.
## ⚖️ Critical Boundaries

### ❌ CANNOT DO:
Expand Down Expand Up @@ -61,6 +62,7 @@ Where should test file go?
- Adapter/SDK → Integration tests with MSW
- Repository → Integration tests with real DB
- Blockchain/EVM → Integration tests with Anvil
- Full system/e2e flows → End-to-end tests that call real services/testnets directly (no MSW or stubbed HTTP; Anvil only if the entire chain is the target environment)

2. **Check existing patterns**:
- Search for similar test files: `**/*.[same-type].test.ts`
Expand Down Expand Up @@ -120,6 +122,12 @@ Need to test something?

## 🔧 Tool Usage Guide

### Non-negotiable: E2E tests stay live

- Never register MSW handlers, mock fetch/axios, or intercept RPC calls inside `*.e2e.test.ts`.
- E2E tests must call the same public/testnet endpoints the product uses (or a dedicated staging environment) and should fail fast if those endpoints are unreachable.
- Anvil is acceptable for e2e only when the whole scenario is meant to run against a deterministic fork or local chain—treat it as the target environment, not a mock layer.

### Use vi.mock() when:

- Testing unit logic in isolation
Expand Down Expand Up @@ -162,8 +170,8 @@ For Anvil-based tests:
- Scope: keep light (smoke tests)
- When to run: Skip in feature branch CI; required before merging to main
- Placement: `tests/` directory (`*.e2e.test.ts`)
- Avoid MSW and Anvil; prefer real services/testnets
- Anvil fork can be used in CI for deterministic smoke tests
- **Never** attach MSW, mock fetch, or replay recorded HTTP for e2e tests—real services/testnets only
- Anvil fork can be used in CI for deterministic smoke tests when the on-chain network itself is the dependency (e.g., forked Arbitrum); this replaces the real chain, not the HTTP layer
- Heuristic: e2e tests are fire alarms, not microscopes—detect breakage, not root cause

## 🧩 BDD Mapping
Expand Down
6 changes: 3 additions & 3 deletions .rulesync/rules/root.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ globs: ["**/*"]
- Unit tests mirror source directory structure
- Use Vitest for testing framework (migrating from Mocha)
- Follow Test-Driven Development (TDD) practices
- For detailed testing guidelines, see `docs/testing-strategy.md` and the TDD agents
- For detailed testing guidelines, see `.rulesync/commands/write-tests.md` and the TDD agents

### Working with Test Infrastructure and Code

When modifying test infrastructure (MSW handlers, test utilities, mock data):

- **ALWAYS read** `.claude/agents/tdd-test-writer.md` FIRST for requirements and patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for requirements and patterns
- This includes creating new handlers, updating existing ones, or adding mock utilities

When implementing or modifying code (whether making tests pass or any other changes):

- **ALWAYS read** `.claude/agents/test-driven-coder.md` FIRST for implementation patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for implementation patterns

### Environment Configuration

Expand Down
13 changes: 10 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ As this project's AI coding tool, you must follow the additional conventions bel
- Unit tests mirror source directory structure
- Use Vitest for testing framework (migrating from Mocha)
- Follow Test-Driven Development (TDD) practices
- For detailed testing guidelines, see `docs/testing-strategy.md` and the TDD agents
- For detailed testing guidelines, see `.rulesync/commands/write-tests.md` and the TDD agents

### Working with Test Infrastructure and Code

When modifying test infrastructure (MSW handlers, test utilities, mock data):

- **ALWAYS read** `.claude/agents/tdd-test-writer.md` FIRST for requirements and patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for requirements and patterns
- This includes creating new handlers, updating existing ones, or adding mock utilities

When implementing or modifying code (whether making tests pass or any other changes):

- **ALWAYS read** `.claude/agents/test-driven-coder.md` FIRST for implementation patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for implementation patterns

### Environment Configuration

Expand Down Expand Up @@ -123,6 +123,13 @@ globs: ["**/*"]
- **NEVER use `any` type** - use proper types, `unknown`, or type assertions with `as`
- Never use `.passthrough()` with Zod schemas

### Script Conventions

- Every package must expose `lint`, `lint:fix`, `format`, `format:check`, `test`, `test:watch`, `test:ci`, and `build` scripts so workspace-level commands succeed.
- `lint` runs ESLint in check mode only (no writes, no Prettier); `lint:fix` runs ESLint with `--fix`.
- `format` runs Prettier with `--write`; `format:check` runs Prettier with `--check`.
- Do not chain Prettier inside linting scripts—keep linting and formatting responsibilities separated for clarity and predictable CI behavior.

### Refactoring and Breaking Changes

**CRITICAL: NEVER maintain backwards compatibility. This is an internal codebase, not a public library.**
Expand Down
13 changes: 10 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Please also reference the following documents as needed:
- Unit tests mirror source directory structure
- Use Vitest for testing framework (migrating from Mocha)
- Follow Test-Driven Development (TDD) practices
- For detailed testing guidelines, see `docs/testing-strategy.md` and the TDD agents
- For detailed testing guidelines, see `.rulesync/commands/write-tests.md` and the TDD agents

### Working with Test Infrastructure and Code

When modifying test infrastructure (MSW handlers, test utilities, mock data):

- **ALWAYS read** `.claude/agents/tdd-test-writer.md` FIRST for requirements and patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for requirements and patterns
- This includes creating new handlers, updating existing ones, or adding mock utilities

When implementing or modifying code (whether making tests pass or any other changes):

- **ALWAYS read** `.claude/agents/test-driven-coder.md` FIRST for implementation patterns
- **ALWAYS read** `.rulesync/commands/write-tests.md` FIRST for implementation patterns

### Environment Configuration

Expand Down Expand Up @@ -112,6 +112,13 @@ globs: ["**/*"]
- **NEVER use `any` type** - use proper types, `unknown`, or type assertions with `as`
- Never use `.passthrough()` with Zod schemas

### Script Conventions

- Every package must expose `lint`, `lint:fix`, `format`, `format:check`, `test`, `test:watch`, `test:ci`, and `build` scripts so workspace-level commands succeed.
- `lint` runs ESLint in check mode only (no writes, no Prettier); `lint:fix` runs ESLint with `--fix`.
- `format` runs Prettier with `--write`; `format:check` runs Prettier with `--check`.
- Do not chain Prettier inside linting scripts—keep linting and formatting responsibilities separated for clarity and predictable CI behavior.

### Refactoring and Breaking Changes

**CRITICAL: NEVER maintain backwards compatibility. This is an internal codebase, not a public library.**
Expand Down
4 changes: 2 additions & 2 deletions rulesync.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"delete": true,
"verbose": false,
"global": true,
"global": false,
"simulatedCommands": true,
"simulatedSubagents": false
}
}
4 changes: 2 additions & 2 deletions typescript/clients/web/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Agent Card URL - The URL of the agent card endpoint
# This should point to your agent card server
NEXT_PUBLIC_AGENT_CARD_URL=http://localhost:3001
# This should point directly to your agent card JSON URL
NEXT_PUBLIC_AGENT_CARD_URL=http://localhost:3001/.well-known/agent-card.json

# Private key for signing delegations (EIP-7702)
# Format: 0x followed by 64 hexadecimal characters (66 total length)
Expand Down
2 changes: 1 addition & 1 deletion typescript/clients/web/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ npm run build # Production build
npm run lint # Run linter
```

**Default A2A Agent:** http://localhost:3001 (fetches `/.well-known/agent-card.json`)
**Default Agent Card URL:** http://localhost:3001/.well-known/agent-card.json

## Conventions

Expand Down
2 changes: 1 addition & 1 deletion typescript/clients/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Open [http://localhost:3000](http://localhost:3000)

## How It Works

1. **Frontend** fetches agent card from `https://dev.emberai.xyz/.well-known/agent-card.json`
1. **Frontend** fetches agent card from `NEXT_PUBLIC_AGENT_CARD_URL` (defaults to `http://localhost:3001/.well-known/agent-card.json`)
2. **Frontend** connects to **Backend** via Socket.IO (`localhost:5001`)
3. **Backend** sends JSONRPC requests to `https://dev.emberai.xyz/a2a`
4. **Backend** forwards responses back to **Frontend**
Expand Down
8 changes: 4 additions & 4 deletions typescript/clients/web/docs/DIRECT_A2A_CONNECTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ Browser → fetch (SSE) → A2A Agent ✨

```typescript
// Fetch agent card
const agentCardUrl = `${url}/.well-known/agent-card.json`;
const agentCardUrl = url; // full path to /.well-known/agent-card.json
const response = await fetch(agentCardUrl);
const agentCard = await response.json();

// Extract A2A endpoint
const a2aEndpoint = agentCard.a2a?.endpoint || `${url}/a2a`;
const a2aEndpoint = agentCard.url;
```

### 2. Message Streaming
Expand Down Expand Up @@ -287,8 +287,8 @@ Access-Control-Allow-Headers: Content-Type, Accept

If connection times out:

1. ✅ Verify agent URL is correct
2. ✅ Check agent card is accessible: `https://dev.emberai.xyz/.well-known/agent-card.json`
1. ✅ Verify the configured agent card URL is correct
2. ✅ Check the agent card endpoint responds (default: `http://localhost:3001/.well-known/agent-card.json`)
3. ✅ Ensure network connectivity

### No Streaming
Expand Down
4 changes: 2 additions & 2 deletions typescript/clients/web/docs/MIGRATION_TO_A2A_JS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ The backend server (`server/server.js`) is no longer needed for A2A communicatio

### Connection Flow

1. User enters agent URL (e.g., `https://dev.emberai.xyz`)
2. Client fetches agent card from `/.well-known/agent-card.json`
1. User enters the agent card URL (e.g., `https://dev.emberai.xyz/.well-known/agent-card.json`)
2. Client fetches that agent card document directly
3. `A2AClient` is initialized with the agent URL
4. Ready to send messages!

Expand Down
Loading