Skip to content

Commit bec99f7

Browse files
committed
chore: initial Agos monorepo
0 parents  commit bec99f7

250 files changed

Lines changed: 1045 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# ── Chain config ──────────────────────────────
2+
CHAIN_ID=84532
3+
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
4+
BASE_RPC_URL=https://mainnet.base.org
5+
6+
# ── Contracts (filled after deploy) ───────────
7+
AGENT_WALLET_FACTORY=0x...
8+
POLICY_ENGINE=0x...
9+
DELEGATION_REGISTRY=0x...
10+
ESCROW_VAULT=0x...
11+
12+
# ── Facilitator ───────────────────────────────
13+
DATABASE_URL=postgresql://agos:agos_dev@localhost:5432/agos
14+
REDIS_URL=redis://localhost:6379
15+
FACILITATOR_PRIVATE_KEY=0x...
16+
JWT_SECRET=changeme
17+
18+
# ── Dashboard ─────────────────────────────────
19+
NEXT_PUBLIC_FACILITATOR_URL=http://localhost:3001
20+
NEXT_PUBLIC_CHAIN_ID=84532
21+
NEXTAUTH_SECRET=changeme
22+
23+
# ── Monitoring ────────────────────────────────
24+
SENTRY_DSN=
25+
POSTHOG_KEY=

.github/CODEOWNERS

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Agos Codeowners
2+
# Format: pattern @github-username
3+
4+
# Global fallback
5+
* @agos-core
6+
7+
# Smart contracts — blockchain engineer only
8+
/packages/contracts/ @agos-blockchain
9+
10+
# SDK — agentic engineer
11+
/packages/sdk/ @agos-agentic
12+
/packages/sdk-python/ @agos-agentic
13+
14+
# Protocol shared package
15+
/packages/protocol/ @agos-blockchain @agos-agentic
16+
17+
# Facilitator + indexer — backend
18+
/apps/facilitator/ @agos-backend
19+
/apps/indexer/ @agos-backend
20+
21+
# Dashboard — frontend
22+
/apps/dashboard/ @agos-frontend
23+
24+
# Infra — devops
25+
/infra/ @agos-devops
26+
/.github/ @agos-devops

.github/ISSUE_TEMPLATE/bug_report.md

.github/ISSUE_TEMPLATE/feature_request.md

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
# ── TypeScript: lint, typecheck, test ───────
11+
ts-ci:
12+
name: TypeScript CI
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
17+
with: { version: 9 }
18+
- uses: actions/setup-node@v4
19+
with: { node-version: 22, cache: pnpm }
20+
- run: pnpm install --frozen-lockfile
21+
- run: pnpm turbo run lint typecheck build test
22+
23+
# ── Solidity: forge tests + Slither ─────────
24+
contracts-ci:
25+
name: Contracts CI
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
with: { submodules: recursive }
30+
- uses: foundry-rs/foundry-toolchain@v1
31+
- name: Run forge tests
32+
working-directory: packages/contracts
33+
run: forge test --gas-report -vvv
34+
- name: Run Slither
35+
uses: crytic/slither-action@v0.4.0
36+
with:
37+
target: packages/contracts/src
38+
39+
# ── SDK publish dry-run ──────────────────────
40+
sdk-publish-check:
41+
name: SDK publish check
42+
runs-on: ubuntu-latest
43+
needs: [ts-ci]
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: pnpm/action-setup@v4
47+
with: { version: 9 }
48+
- uses: actions/setup-node@v4
49+
with: { node-version: 22, cache: pnpm }
50+
- run: pnpm install --frozen-lockfile
51+
- run: cd packages/sdk && pnpm build
52+
- run: cd packages/sdk && pnpm publish --dry-run --no-git-checks
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy Contracts
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
network:
7+
description: 'Target network'
8+
required: true
9+
default: 'base-sepolia'
10+
type: choice
11+
options: [base-sepolia, base]
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
environment: ${{ inputs.network }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
with: { submodules: recursive }
20+
- uses: foundry-rs/foundry-toolchain@v1
21+
- name: Deploy
22+
working-directory: packages/contracts
23+
run: |
24+
forge script script/DeployTestnet.s.sol \
25+
--rpc-url ${{ inputs.network }} \
26+
--broadcast --verify -vvv
27+
env:
28+
PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
29+
BASESCAN_API_KEY: ${{ secrets.BASESCAN_API_KEY }}
30+
BASE_SEPOLIA_RPC_URL: ${{ secrets.BASE_SEPOLIA_RPC_URL }}
31+
BASE_RPC_URL: ${{ secrets.BASE_RPC_URL }}

.github/workflows/publish-sdk.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish SDK
2+
3+
on:
4+
push:
5+
tags: ["sdk-v*"]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v4
16+
with: { version: 9 }
17+
- uses: actions/setup-node@v4
18+
with: { node-version: 22, registry-url: "https://registry.npmjs.org", cache: pnpm }
19+
- run: pnpm install --frozen-lockfile
20+
- run: cd packages/sdk && pnpm build
21+
- run: cd packages/sdk && pnpm publish --access public --no-git-checks
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/security.yml

Whitespace-only changes.

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# dependencies
2+
node_modules
3+
.pnpm-store
4+
5+
# build outputs
6+
dist
7+
out
8+
.next
9+
build
10+
cache
11+
12+
# foundry
13+
packages/contracts/out
14+
packages/contracts/cache
15+
packages/contracts/broadcast
16+
17+
# env files
18+
.env
19+
.env.local
20+
.env.production
21+
22+
# keys & secrets
23+
*.pem
24+
*.key
25+
keystore/
26+
27+
# logs
28+
*.log
29+
logs/
30+
31+
# os
32+
.DS_Store
33+
Thumbs.db
34+
35+
# IDEs
36+
.vscode/settings.json
37+
.idea
38+
39+
# turbo
40+
.turbo
41+
42+
# coverage
43+
coverage/
44+
lcov.info

0 commit comments

Comments
 (0)