@sparkysolutions/agentrail 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +249 -146
- package/dist/cli/mcp-stdio.d.ts +8 -0
- package/dist/cli/mcp-stdio.js +454 -0
- package/dist/cli/pipeline.d.ts +40 -0
- package/dist/cli/pipeline.js +114 -0
- package/dist/cli/sandbox.d.ts +15 -1
- package/dist/cli/sandbox.js +30 -5
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/lib/agent-badge-issuer.d.ts +36 -0
- package/dist/lib/agent-badge-issuer.js +166 -0
- package/dist/lib/agent-registry.d.ts +136 -0
- package/dist/lib/agent-registry.js +124 -0
- package/dist/lib/agenthustle-pipeline.d.ts +68 -0
- package/dist/lib/agenthustle-pipeline.js +143 -0
- package/dist/lib/agentpass-pipeline.d.ts +44 -0
- package/dist/lib/agentpass-pipeline.js +84 -0
- package/dist/lib/audit-trail-provider.d.ts +24 -0
- package/dist/lib/audit-trail-provider.js +60 -0
- package/dist/lib/axis-clob-provider.d.ts +50 -0
- package/dist/lib/axis-clob-provider.js +150 -0
- package/dist/lib/circuit-breaker.d.ts +60 -0
- package/dist/lib/circuit-breaker.js +136 -0
- package/dist/lib/conditional-escrow.d.ts +42 -0
- package/dist/lib/conditional-escrow.js +126 -0
- package/dist/lib/mcp-server.d.ts +29 -0
- package/dist/lib/mcp-server.js +165 -0
- package/dist/lib/receipts.d.ts +153 -0
- package/dist/lib/receipts.js +173 -0
- package/dist/lib/reflector-oracle-adapter.d.ts +44 -0
- package/dist/lib/reflector-oracle-adapter.js +173 -0
- package/dist/lib/scoped-allowance.d.ts +4 -0
- package/dist/lib/scoped-allowance.js +22 -1
- package/dist/lib/universal-adapters.d.ts +42 -0
- package/dist/lib/universal-adapters.js +69 -0
- package/dist/lib/x402-gateway.d.ts +86 -0
- package/dist/lib/x402-gateway.js +128 -0
- package/dist/lib/x402-pipeline.d.ts +51 -0
- package/dist/lib/x402-pipeline.js +105 -0
- package/dist/types.d.ts +109 -0
- package/glama.json +12 -0
- package/package.json +56 -40
- package/smithery.json +43 -0
- package/smithery.yaml +29 -0
- package/.github/ISSUE_TEMPLATE/drips_wave_task.md +0 -33
- package/.github/workflows/auto-merge.yml +0 -119
- package/.github/workflows/ci.yml +0 -35
- package/BENCHMARKS.md +0 -67
- package/CONTRIBUTING.md +0 -40
- package/DRIPS_WAVE.md +0 -81
- package/FUNDING.json +0 -7
- package/ISSUES_PIPELINE.json +0 -106
- package/RUNBOOK.md +0 -95
- package/SCF_ACTIVATION_PROPOSAL.md +0 -137
- package/assets/sorobanagents_avatar.jpg +0 -0
- package/assets/sorobanagents_avatar.png +0 -0
- package/assets/sorobanagents_avatar_elite.png +0 -0
- package/contracts/agentrail/Cargo.lock +0 -1895
- package/contracts/agentrail/Cargo.toml +0 -25
- package/contracts/agentrail/src/lib.rs +0 -296
- package/contracts/agentrail/src/test.rs +0 -442
- package/contracts/agentrail/test_snapshots/test/test_circuit_breaker_pause_and_unpause.1.json +0 -195
- package/contracts/agentrail/test_snapshots/test/test_double_initialize_fails.1.json +0 -123
- package/contracts/agentrail/test_snapshots/test/test_execute_spend_deducts_and_accumulates.1.json +0 -347
- package/contracts/agentrail/test_snapshots/test/test_get_allowance_returns_none_for_unregistered.1.json +0 -61
- package/contracts/agentrail/test_snapshots/test/test_get_version_matches_cargo_toml.1.json +0 -61
- package/contracts/agentrail/test_snapshots/test/test_grant_allowance_negative_amount_fails.1.json +0 -123
- package/contracts/agentrail/test_snapshots/test/test_grant_allowance_success.1.json +0 -250
- package/contracts/agentrail/test_snapshots/test/test_grant_allowance_zero_amount_fails.1.json +0 -123
- package/contracts/agentrail/test_snapshots/test/test_initialize_and_protocol_fee.1.json +0 -154
- package/contracts/agentrail/test_snapshots/test/test_initialize_success.1.json +0 -124
- package/contracts/agentrail/test_snapshots/test/test_initialize_with_excessive_fee_fails.1.json +0 -61
- package/contracts/agentrail/test_snapshots/test/test_max_protocol_fee_spend_boundary.1.json +0 -298
- package/contracts/agentrail/test_snapshots/test/test_multi_agent_allowance_isolation.1.json +0 -426
- package/contracts/agentrail/test_snapshots/test/test_multi_owner_isolation.1.json +0 -426
- package/contracts/agentrail/test_snapshots/test/test_regrant_allowance_updates_limits.1.json +0 -346
- package/contracts/agentrail/test_snapshots/test/test_revoke_allowance_freezes_spending.1.json +0 -292
- package/contracts/agentrail/test_snapshots/test/test_set_protocol_fee_by_admin.1.json +0 -165
- package/contracts/agentrail/test_snapshots/test/test_spend_after_expiry_fails.1.json +0 -250
- package/contracts/agentrail/test_snapshots/test/test_spend_exact_allowance_boundary.1.json +0 -298
- package/contracts/agentrail/test_snapshots/test/test_spend_exceeding_allowance_fails.1.json +0 -250
- package/contracts/agentrail/test_snapshots/test/test_spend_fails_when_circuit_breaker_tripped.1.json +0 -285
- package/contracts/agentrail/test_snapshots/test/test_spend_negative_amount_fails.1.json +0 -250
- package/contracts/agentrail/test_snapshots/test/test_spend_non_existent_allowance_fails.1.json +0 -123
- package/contracts/agentrail/test_snapshots/test/test_spend_on_revoked_allowance_fails.1.json +0 -292
- package/contracts/agentrail/test_snapshots/test/test_spend_with_protocol_fee.1.json +0 -286
- package/contracts/agentrail/test_snapshots/test/test_spend_zero_amount_fails.1.json +0 -250
- package/contracts/agentrail/test_snapshots/test/test_unpause_restores_spend_operations.1.json +0 -370
- package/contracts/agentrail/test_snapshots/test/test_zero_protocol_fee_spend.1.json +0 -298
- package/deployment.testnet.json +0 -15
- package/docs/assets/favicon.png +0 -0
- package/docs/assets/logo.png +0 -0
- package/docs/index.html +0 -840
- package/scripts/demo-agent.ts +0 -52
- package/scripts/deploy-testnet.ts +0 -228
- package/scripts/security-audit.mjs +0 -159
- package/src/cli/sandbox.ts +0 -127
- package/src/index.ts +0 -11
- package/src/lib/micro-stream.ts +0 -52
- package/src/lib/proof-of-task.ts +0 -39
- package/src/lib/scoped-allowance.ts +0 -112
- package/src/lib/ttl-keeper.ts +0 -44
- package/src/sdk/agent-client.ts +0 -66
- package/src/types.ts +0 -78
- package/tests/agent-client.test.ts +0 -62
- package/tests/cli.test.ts +0 -68
- package/tests/micro-stream.test.ts +0 -38
- package/tests/proof-of-task.test.ts +0 -78
- package/tests/scoped-allowance.test.ts +0 -135
- package/tests/security-audit.test.ts +0 -76
- package/tests/ttl-keeper.test.ts +0 -36
- package/tsconfig.json +0 -16
- package/vitest.config.ts +0 -8
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
name: ⚡ Auto Merge PR Gatekeeper
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_run:
|
|
5
|
-
workflows: ["CI"]
|
|
6
|
-
types:
|
|
7
|
-
- completed
|
|
8
|
-
pull_request_target:
|
|
9
|
-
types: [opened, synchronize, reopened, labeled]
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
contents: write
|
|
13
|
-
pull-requests: write
|
|
14
|
-
issues: write
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
auto-merge:
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
if: >
|
|
20
|
-
github.event_name == 'pull_request_target' ||
|
|
21
|
-
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
|
22
|
-
steps:
|
|
23
|
-
- name: Checkout repository
|
|
24
|
-
uses: actions/checkout@v4
|
|
25
|
-
|
|
26
|
-
- name: Evaluate & Execute Auto-Merge
|
|
27
|
-
uses: actions/github-script@v7
|
|
28
|
-
with:
|
|
29
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
-
script: |
|
|
31
|
-
let prNumber = null;
|
|
32
|
-
|
|
33
|
-
if (context.eventName === 'pull_request_target') {
|
|
34
|
-
prNumber = context.payload.pull_request.number;
|
|
35
|
-
} else if (context.eventName === 'workflow_run') {
|
|
36
|
-
const prs = context.payload.workflow_run.pull_requests;
|
|
37
|
-
if (prs && prs.length > 0) {
|
|
38
|
-
prNumber = prs[0].number;
|
|
39
|
-
} else {
|
|
40
|
-
const headBranch = context.payload.workflow_run.head_branch;
|
|
41
|
-
const { data: pullRequests } = await github.rest.pulls.list({
|
|
42
|
-
owner: context.repo.owner,
|
|
43
|
-
repo: context.repo.repo,
|
|
44
|
-
state: 'open'
|
|
45
|
-
});
|
|
46
|
-
const matching = pullRequests.find(p => p.head.ref === headBranch);
|
|
47
|
-
if (matching) {
|
|
48
|
-
prNumber = matching.number;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (!prNumber) {
|
|
54
|
-
console.log('No matching open pull request found for this workflow event.');
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const { data: pr } = await github.rest.pulls.get({
|
|
59
|
-
owner: context.repo.owner,
|
|
60
|
-
repo: context.repo.repo,
|
|
61
|
-
pull_number: prNumber
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
if (pr.merged || pr.state !== 'open') {
|
|
65
|
-
console.log(`PR #${prNumber} is already closed/merged.`);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
console.log(`Auditing PR #${prNumber} by ${pr.user.login} for auto-merge...`);
|
|
70
|
-
|
|
71
|
-
// Fetch combined commit status / check runs
|
|
72
|
-
const { data: checks } = await github.rest.checks.listForRef({
|
|
73
|
-
owner: context.repo.owner,
|
|
74
|
-
repo: context.repo.repo,
|
|
75
|
-
ref: pr.head.sha
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const ciChecks = checks.check_runs.filter(c => c.name.toLowerCase().includes('ci') || c.name.toLowerCase().includes('test'));
|
|
79
|
-
const anyFailed = ciChecks.some(c => c.conclusion === 'failure' || c.conclusion === 'cancelled');
|
|
80
|
-
|
|
81
|
-
if (anyFailed) {
|
|
82
|
-
console.log(`🛑 Cannot auto-merge: One or more CI / Security checks failed.`);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Security Gatekeeper Rule:
|
|
87
|
-
// 1. Maintainer (sparkysolutions10-pixel / OWNER) PRs: Auto-merge instantly on green CI!
|
|
88
|
-
// 2. External contributor PRs: Require either 'automerge' label or maintainer review.
|
|
89
|
-
// This prevents an external attacker from maliciously modifying tests or workflows.
|
|
90
|
-
const isMaintainer = pr.user.login === 'sparkysolutions10-pixel' || pr.author_association === 'OWNER';
|
|
91
|
-
const hasAutomergeLabel = pr.labels && pr.labels.some(l => l.name === 'automerge');
|
|
92
|
-
|
|
93
|
-
if (!isMaintainer && !hasAutomergeLabel) {
|
|
94
|
-
console.log(`PR #${prNumber} is by external contributor ${pr.user.login}. Awaiting maintainer review or 'automerge' label.`);
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// Execute Squash Auto-Merge
|
|
99
|
-
try {
|
|
100
|
-
await github.rest.pulls.merge({
|
|
101
|
-
owner: context.repo.owner,
|
|
102
|
-
repo: context.repo.repo,
|
|
103
|
-
pull_number: prNumber,
|
|
104
|
-
merge_method: 'squash',
|
|
105
|
-
commit_title: `${pr.title} (#${prNumber})`,
|
|
106
|
-
commit_message: `Auto-merged by SorobanAgents Autonomous CI Gatekeeper.\n\n- Verified: 100% CI Green\n- Anti-Drainer Security Audit: PASSED (0 violations)\n- Unit & Invariant Tests: 23/23 PASSED`
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
await github.rest.issues.createComment({
|
|
110
|
-
owner: context.repo.owner,
|
|
111
|
-
repo: context.repo.repo,
|
|
112
|
-
issue_number: prNumber,
|
|
113
|
-
body: `### 🚀 AgentRail Autonomous Auto-Merge\n\n✅ **100% CI Green Passed**\n✅ **Anti-Drainer Security Guard: Verified Clean**\n✅ **Cryptographic Invariants & Tests: 23/23 Passing**\n\n🎉 This pull request has been automatically verified and merged into \`main\`! Thank you for your contribution to the Stellar Drips Wave.`
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
console.log(`🎉 Successfully auto-merged PR #${prNumber}!`);
|
|
117
|
-
} catch (err) {
|
|
118
|
-
console.log(`Notice: Auto-merge pending CI checks completion or mergeable state: ${err.message}`);
|
|
119
|
-
}
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build-and-test:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
|
|
16
|
-
- name: Setup Node.js
|
|
17
|
-
uses: actions/setup-node@v4
|
|
18
|
-
with:
|
|
19
|
-
node-version: 20
|
|
20
|
-
cache: "npm"
|
|
21
|
-
|
|
22
|
-
- name: Install dependencies
|
|
23
|
-
run: npm ci || npm install
|
|
24
|
-
|
|
25
|
-
- name: Type check (TypeScript strict)
|
|
26
|
-
run: npm run lint
|
|
27
|
-
|
|
28
|
-
- name: 🛡️ Autonomous Anti-Drainer Security Guard
|
|
29
|
-
run: npm run security:check
|
|
30
|
-
|
|
31
|
-
- name: Run test suite
|
|
32
|
-
run: npm test
|
|
33
|
-
|
|
34
|
-
- name: Build dist
|
|
35
|
-
run: npm run build
|
package/BENCHMARKS.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# ⚡ AgentRail Gas Metering & Resource Benchmarks
|
|
2
|
-
|
|
3
|
-
This report details empirical Soroban resource consumption, ledger footprint, and network fee benchmarks for the **AgentRail Smart Contract Protocol** on Stellar.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 📊 Summary: Protocol Efficiency Overview
|
|
8
|
-
|
|
9
|
-
| Metric | Measured Value | Soroban Max Network Limit | % Budget Consumed | Status |
|
|
10
|
-
| :--- | :--- | :--- | :--- | :---: |
|
|
11
|
-
| **CPU Instructions** | `42,180` | `100,000,000` | **`0.042%`** | 🟢 Minimal |
|
|
12
|
-
| **Memory Footprint** | `18,432 bytes` (18 KB) | `41,943,040 bytes` (40 MB) | **`0.044%`** | 🟢 Minimal |
|
|
13
|
-
| **Compiled WASM Size** | `20,910 bytes` (20.9 KB) | `65,536 bytes` (Direct Deploy) | **`31.9%`** | 🟢 Optimized |
|
|
14
|
-
| **Transaction Base Fee** | `29,010 Stroops` | `100,000 Stroops` (Cap) | **`29.0%`** | 🟢 Ultra-Low |
|
|
15
|
-
| **Effective USD Fee** | **`$0.000003 USD`** | — | — | 🟢 **10,000x Cheaper than L1** |
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 🌐 Cross-Chain AI Agent Transaction Cost Comparison
|
|
20
|
-
|
|
21
|
-
AI Agents require sub-second, micro-transaction settlements (e.g. paying \$0.001 per API call or streaming \$0.0001 per token). High gas fees completely break autonomous agent loops on legacy chains:
|
|
22
|
-
|
|
23
|
-
| Blockchain Rail | Typical Micro-Payment Fee | Feasibility for Autonomous Agent Swarms | Latency to Finality |
|
|
24
|
-
| :--- | :---: | :---: | :---: |
|
|
25
|
-
| **Ethereum L1** | **`$2.50 - $15.00`** | ❌ **Completely Unviable** (Fee exceeds payment amount) | 12 - 15 minutes |
|
|
26
|
-
| **Base L2 (EVM)** | **`$0.02 - $0.08`** | ⚠️ **Marginal** (Accumulates high overhead over 10k calls) | 2 - 4 seconds |
|
|
27
|
-
| **Solana** | **`$0.0015 - $0.004`** | ⚠️ **Moderate** (Subject to priority fee spikes & congestion) | 400 - 800 ms |
|
|
28
|
-
| **Stellar Soroban (AgentRail)** | **`$0.000003`** (29k Stroops) | 🟢 **100% Native Sweet Spot** (Zero priority fee spikes) | **3 - 5 seconds deterministic** |
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 🔬 Micro-Operation Profiling on Soroban Ledger
|
|
33
|
-
|
|
34
|
-
Empirically captured from live Stellar Testnet transaction `#88855f18c6e25268bd98fd9d32ee68d82d0c82381b9e3aa82c824f5857d01951` and offline test harnesses:
|
|
35
|
-
|
|
36
|
-
### 1. `initialize(admin, token, treasury, fee_bps)`
|
|
37
|
-
* **CPU Instructions:** `38,420`
|
|
38
|
-
* **RAM Allocated:** `14.2 KB`
|
|
39
|
-
* **Ledger Entries Created:** `5` (Admin, Token, Treasury, ProtocolFeeBps, Paused)
|
|
40
|
-
* **Fee Charged:** `29,010 Stroops`
|
|
41
|
-
|
|
42
|
-
### 2. `grant_allowance(owner, agent, max_amount, valid_until)`
|
|
43
|
-
* **CPU Instructions:** `44,110`
|
|
44
|
-
* **RAM Allocated:** `16.8 KB`
|
|
45
|
-
* **Ledger Storage:** `Persistent(Allowance(owner, agent))` with 30-day TTL lease
|
|
46
|
-
* **Fee Charged:** `31,240 Stroops`
|
|
47
|
-
|
|
48
|
-
### 3. `execute_spend(owner, agent, amount, destination)`
|
|
49
|
-
* **CPU Instructions:** `49,850`
|
|
50
|
-
* **RAM Allocated:** `18.4 KB`
|
|
51
|
-
* **Fee Calculation:** Deterministic math `(amount * fee_bps) / 10000` with zero floating point drift
|
|
52
|
-
* **Event Emitted:** `(SPEND_EVENT, exec)` + `(FEE_EVENT, route)`
|
|
53
|
-
* **Fee Charged:** `34,100 Stroops`
|
|
54
|
-
|
|
55
|
-
### 4. `pause()` / `unpause()` (Emergency Circuit Breaker)
|
|
56
|
-
* **CPU Instructions:** `28,100`
|
|
57
|
-
* **RAM Allocated:** `11.0 KB`
|
|
58
|
-
* **Access Control:** `admin.require_auth()` enforced at kernel level
|
|
59
|
-
* **Fee Charged:** `24,500 Stroops`
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 🚀 Throughput & Scalability Projections
|
|
64
|
-
|
|
65
|
-
Under Stellar Protocol 29 and Soroban ledger limits:
|
|
66
|
-
* **Max Sustained Operations:** ~500 - 1,000 agent micro-settlements per ledger close (every 5 seconds).
|
|
67
|
-
* **Monthly Treasury Throughput Capacity:** Up to **100,000,000 micro-transactions** with zero state bloat due to Soroban's automated Storage Lease TTL recycling.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Contributing to AgentRail
|
|
2
|
-
|
|
3
|
-
Welcome to **AgentRail** — the open-source Autonomous AI Agent Scoped-Allowance & Micro-Settlement Protocol on Stellar & Soroban.
|
|
4
|
-
|
|
5
|
-
## Coding Standards
|
|
6
|
-
|
|
7
|
-
- **TypeScript `strict` mode:** The entire codebase compiles with `strict: true`. No implicit any, unchecked index accesses, or unhandled nulls.
|
|
8
|
-
- **Pure & Mockable:** All Stellar Horizon and Soroban RPC interactions must reside in dedicated service boundaries and be fully mockable in tests without requiring live network access or funded testnet accounts.
|
|
9
|
-
- **Zod Schema Validation:** Every public parameter, payload, and configuration input must be validated via Zod schemas before processing.
|
|
10
|
-
- **Security-First Invariants:** Never accept raw private keys. Autonomous agent authorizations must be scoped via session keypairs, expiration epochs, and maximum spending limits.
|
|
11
|
-
|
|
12
|
-
## Drips Wave Contributors
|
|
13
|
-
|
|
14
|
-
This repository participates in the **Stellar Drips Wave Program**.
|
|
15
|
-
|
|
16
|
-
1. **Find an Issue:** Browse open issues tagged `drips-wave` and one of `complexity: trivial | medium | high`.
|
|
17
|
-
2. **Claim Publicly:** Comment on the issue requesting assignment before you start work so contributors do not duplicate effort.
|
|
18
|
-
3. **Single Issue PRs:** Every pull request must address a single issue and include `Closes #<issue-number>` in the description.
|
|
19
|
-
4. **Reward Allocation:** Points are awarded upon maintainer review and merge based on the issue complexity:
|
|
20
|
-
- `complexity: trivial` — 100 Points
|
|
21
|
-
- `complexity: medium` — 150 Points
|
|
22
|
-
- `complexity: high` — 200 Points
|
|
23
|
-
|
|
24
|
-
## Development Setup
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
git clone https://github.com/SorobanAgents/agentrail.git
|
|
28
|
-
cd agentrail
|
|
29
|
-
npm install
|
|
30
|
-
npm test
|
|
31
|
-
npm run build
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Pull Request Checklist
|
|
35
|
-
|
|
36
|
-
- [ ] Linked to target issue (`Closes #NN`)
|
|
37
|
-
- [ ] `npm run lint` passes with zero TypeScript warnings or errors
|
|
38
|
-
- [ ] `npm test` passes with 100% test coverage for new functionality
|
|
39
|
-
- [ ] `npm run build` succeeds cleanly
|
|
40
|
-
- [ ] Documentation and comments preserved
|
package/DRIPS_WAVE.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# 🌊 Stellar Drips Wave — Contributor & Maintainer Blueprint
|
|
2
|
-
|
|
3
|
-
Welcome to the **AgentRail** Drips Wave portal! AgentRail is an open-source protocol built for the **Stellar & Soroban Ecosystem**, sponsored through the Stellar Development Foundation (SDF) Drips Wave program.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 💎 Program Overview
|
|
8
|
-
|
|
9
|
-
- **Project:** AgentRail Protocol
|
|
10
|
-
- **Organization:** [SorobanAgents](https://github.com/SorobanAgents)
|
|
11
|
-
- **Flagship Repository:** [SorobanAgents/agentrail](https://github.com/SorobanAgents/agentrail)
|
|
12
|
-
- **Settlement Token:** Circle USDC on Stellar & Soroban
|
|
13
|
-
- **Maintainer Wallet:** `GDDJH64X5VEXI7UWZMJA3YUG7ANYHKRRRFHLD2SF5OWEETNFBVYMRXZT`
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## 🎯 Task Complexity & Points Matrix
|
|
18
|
-
|
|
19
|
-
Every merged Pull Request meeting acceptance criteria awards points tracked through the Stellar Drips Wave indexer:
|
|
20
|
-
|
|
21
|
-
| Complexity Tag | Definition & Scope | Points per PR |
|
|
22
|
-
| :--- | :--- | :---: |
|
|
23
|
-
| `complexity: high` / `security` | Major architectural component, smart contract logic, or cryptographic security | **200 Points** |
|
|
24
|
-
| `complexity: medium` | Feature adapter, tool integration, or RPC client module | **150 – 200 Points** |
|
|
25
|
-
| `complexity: trivial` | Documentation, type schemas, or localized helper utilities | **50 – 100 Points** |
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## 🗺️ 32-Issue Master Roadmap Index
|
|
30
|
-
|
|
31
|
-
### Phase 1: Soroban Rust Contracts & Storage
|
|
32
|
-
- **[Issue #1](https://github.com/SorobanAgents/agentrail/issues/1):** `[CRITICAL/SECURITY]` Re-entrancy & Signature Replay Defense (200 pts)
|
|
33
|
-
- **[Issue #2](https://github.com/SorobanAgents/agentrail/issues/2):** `[CRITICAL]` Automated Soroban State TTL Rent-Bumping Keeper Engine (200 pts)
|
|
34
|
-
- **[Issue #3](https://github.com/SorobanAgents/agentrail/issues/3):** `[CRITICAL]` Proof-of-Task Cryptographic Verification & Escrow Release (200 pts)
|
|
35
|
-
- **[Issue #4](https://github.com/SorobanAgents/agentrail/issues/4):** `[HIGH/SECURITY]` Scoped Allowance Expiration & Spending Cap Verification (200 pts)
|
|
36
|
-
- **[Issue #9](https://github.com/SorobanAgents/agentrail/issues/9):** `[CRITICAL/SOROBAN]` Rust Smart Contract: Scoped Allowance Escrow Core (200 pts)
|
|
37
|
-
- **[Issue #17](https://github.com/SorobanAgents/agentrail/issues/17):** `[CRITICAL/SOROBAN]` Comprehensive Contract Unit Test Suite (`soroban-sdk::testutils`) (200 pts)
|
|
38
|
-
- **[Issue #18](https://github.com/SorobanAgents/agentrail/issues/18):** `[CRITICAL/SOROBAN]` Time-Locked Multi-Sig Emergency Pause & Drain Circuit Breaker (200 pts)
|
|
39
|
-
- **[Issue #19](https://github.com/SorobanAgents/agentrail/issues/19):** `[HIGH/SOROBAN]` Optimized Soroban Ledger Storage Tiering (200 pts)
|
|
40
|
-
|
|
41
|
-
### Phase 2: Cryptographic Security & Multi-Agent Swarms
|
|
42
|
-
- **[Issue #7](https://github.com/SorobanAgents/agentrail/issues/7):** `[MEDIUM]` Anomaly Spending Detection and Circuit Breaker Module (150 pts)
|
|
43
|
-
- **[Issue #10](https://github.com/SorobanAgents/agentrail/issues/10):** `[CRITICAL/SECURITY]` Cryptographic Multi-Party Threshold Signature Verification (200 pts)
|
|
44
|
-
- **[Issue #15](https://github.com/SorobanAgents/agentrail/issues/15):** `[MEDIUM]` Gas Metering Optimizer & Stroop-to-Compute Benchmarking Suite (150 pts)
|
|
45
|
-
- **[Issue #16](https://github.com/SorobanAgents/agentrail/issues/16):** `[MEDIUM]` Soroban Contract Error Code Matrix & Trait Mappings (150 pts)
|
|
46
|
-
- **[Issue #30](https://github.com/SorobanAgents/agentrail/issues/30):** `[HIGH/SECURITY]` Ed25519 Hardware Security Module (HSM) & KMS Signer Provider (200 pts)
|
|
47
|
-
|
|
48
|
-
### Phase 3: Modern AI Framework Adapters
|
|
49
|
-
- **[Issue #5](https://github.com/SorobanAgents/agentrail/issues/5):** `[MEDIUM]` Real-Time Micro-Streaming Payment Calculator for LLM Token Fees (150 pts)
|
|
50
|
-
- **[Issue #12](https://github.com/SorobanAgents/agentrail/issues/12):** `[HIGH]` LangChain & LlamaIndex AgentTool Integration Module (200 pts)
|
|
51
|
-
- **[Issue #13](https://github.com/SorobanAgents/agentrail/issues/13):** `[HIGH]` CrewAI & ElizaOS Multi-Agent Swarm Payment Adapter (200 pts)
|
|
52
|
-
- **[Issue #23](https://github.com/SorobanAgents/agentrail/issues/23):** `[CRITICAL/AI]` Vercel AI SDK Core Tool Provider for Agentic Micropayments (200 pts)
|
|
53
|
-
- **[Issue #24](https://github.com/SorobanAgents/agentrail/issues/24):** `[HIGH/AI]` AutoGen Multi-Agent Conversational Settlement Adapter (200 pts)
|
|
54
|
-
- **[Issue #25](https://github.com/SorobanAgents/agentrail/issues/25):** `[HIGH/AI]` ElizaOS (ai16z) Autonomous Twitter/Discord Agent Rail Plugin (200 pts)
|
|
55
|
-
- **[Issue #26](https://github.com/SorobanAgents/agentrail/issues/26):** `[MEDIUM/AI]` Semantic Kernel (Microsoft) Payment Connector for Soroban (150 pts)
|
|
56
|
-
|
|
57
|
-
### Phase 4: Stellar Ecosystem Proposals (SEPs) & Identity
|
|
58
|
-
- **[Issue #6](https://github.com/SorobanAgents/agentrail/issues/6):** `[MEDIUM]` SEP-10 Authentication Challenge Middleware for AI Agent Sessions (150 pts)
|
|
59
|
-
- **[Issue #20](https://github.com/SorobanAgents/agentrail/issues/20):** `[HIGH/SEP]` SEP-38 Anchor RFQ Price Quote Integration for Real-Time Currency Swaps (200 pts)
|
|
60
|
-
- **[Issue #21](https://github.com/SorobanAgents/agentrail/issues/21):** `[HIGH/SEP]` SEP-24 Interactive Deposit & Withdrawal Flow Bridge (200 pts)
|
|
61
|
-
- **[Issue #22](https://github.com/SorobanAgents/agentrail/issues/22):** `[MEDIUM/SEP]` SEP-01 stellar.toml Specification & Validator Discovery Host (150 pts)
|
|
62
|
-
|
|
63
|
-
### Phase 5: Infrastructure, Observability & DevEx
|
|
64
|
-
- **[Issue #8](https://github.com/SorobanAgents/agentrail/issues/8):** `[TRIVIAL]` Export Reusable Zod Schemas for Agent Protocol Request & Response Payloads (100 pts)
|
|
65
|
-
- **[Issue #11](https://github.com/SorobanAgents/agentrail/issues/11):** `[HIGH]` Soroban RPC Event Poller & WebSocket Real-Time Stream Engine (200 pts)
|
|
66
|
-
- **[Issue #14](https://github.com/SorobanAgents/agentrail/issues/14):** `[MEDIUM]` CLI Runner: AgentRail Local Sandbox & Testnet Faucet Provisioner (150 pts)
|
|
67
|
-
- **[Issue #27](https://github.com/SorobanAgents/agentrail/issues/27):** `[HIGH/INFRA]` Real-Time Soroban RPC Transaction Receipt Poller with Exponential Jitter (200 pts)
|
|
68
|
-
- **[Issue #28](https://github.com/SorobanAgents/agentrail/issues/28):** `[MEDIUM/INFRA]` Prometheus & OpenTelemetry Metrics Exporter for Agent Settlement Latency (150 pts)
|
|
69
|
-
- **[Issue #29](https://github.com/SorobanAgents/agentrail/issues/29):** `[MEDIUM/INFRA]` Local Standalone Mock Soroban RPC Server for Offline Unit Testing (150 pts)
|
|
70
|
-
- **[Issue #31](https://github.com/SorobanAgents/agentrail/issues/31):** `[MEDIUM/DEVEX]` Interactive Web Playground & Visual Transaction Flow Simulator (150 pts)
|
|
71
|
-
- **[Issue #32](https://github.com/SorobanAgents/agentrail/issues/32):** `[MEDIUM/DEVEX]` Comprehensive API Reference Documentation Generator with TypeDoc (150 pts)
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## 🛡️ Autonomous CI Quality & Anti-Drainer Security Guard
|
|
76
|
-
|
|
77
|
-
All contributions are automatically audited by the **AgentRail CI Guard**:
|
|
78
|
-
- **Strict TypeScript:** `npm run lint` (`tsc --noEmit`)
|
|
79
|
-
- **Anti-Drainer Static Analysis:** `npm run security:check` (0 dynamic code execution, 0 shell injections, 0 webhook exfiltration)
|
|
80
|
-
- **Unit & Invariant Verification:** `npm test` (100% Vitest passing)
|
|
81
|
-
- **Production Build:** `npm run build`
|
package/FUNDING.json
DELETED
package/ISSUES_PIPELINE.json
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"protocol": "AgentRail",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"totalPipelineCount": 137,
|
|
5
|
-
"stagingStatus": "READY_FOR_WAVE_11_DISPATCH",
|
|
6
|
-
"targetMaintainer": "sparkysolutions10-pixel",
|
|
7
|
-
"pillars": [
|
|
8
|
-
{
|
|
9
|
-
"name": "Pillar 1: Soroban Smart Contract & Fuzzing Invariants",
|
|
10
|
-
"count": 25,
|
|
11
|
-
"prefix": "contracts",
|
|
12
|
-
"plannedIssues": [
|
|
13
|
-
"feat(contracts): implement granular sub-cent allowance division for fractional stroops",
|
|
14
|
-
"test(contracts): fuzz test fractional stroop divisions against rounding precision bugs",
|
|
15
|
-
"feat(contracts): add multi-token settlement routing for native XLM and Circle EURC",
|
|
16
|
-
"test(contracts): verify multi-token isolation and non-reentrancy on asset swaps",
|
|
17
|
-
"feat(contracts): add time-locked owner allowance increase buffer for high-value limits",
|
|
18
|
-
"test(contracts): verify time-lock enforcement before large allowance cap expansions",
|
|
19
|
-
"feat(contracts): implement contract storage TTL automatic extension helper on spend",
|
|
20
|
-
"test(contracts): simulate TTL rent exhaustion and auto-bump recovery in Rust",
|
|
21
|
-
"feat(contracts): emit granular Mercury indexer events for all state transitions",
|
|
22
|
-
"test(contracts): verify topic and data schema conformance for Zephyr/Mercury indexing"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "Pillar 2: AI Multi-Agent Mesh & Framework Adapters",
|
|
27
|
-
"count": 25,
|
|
28
|
-
"prefix": "ai",
|
|
29
|
-
"plannedIssues": [
|
|
30
|
-
"feat(ai): AutoGen conversant agent settlement bridge with dynamic budget negotiation",
|
|
31
|
-
"test(ai): test AutoGen two-agent negotiation and escrow lock in Vitest",
|
|
32
|
-
"feat(ai): CrewAI task delegation micropayment adapter for agent-to-agent task hires",
|
|
33
|
-
"test(ai): mock CrewAI hierarchical process and milestone settlement releases",
|
|
34
|
-
"feat(ai): OpenAI Assistants API function calling schema definitions for AgentRail",
|
|
35
|
-
"test(ai): verify OpenAI tool response parsing and transaction status returns",
|
|
36
|
-
"feat(ai): Anthropic Claude tool use JSON schema provider with sub-agent permissions",
|
|
37
|
-
"test(ai): test Claude tool calls and signature authorization validation",
|
|
38
|
-
"feat(ai): Semantic Kernel (Microsoft) connector for Soroban smart allowances",
|
|
39
|
-
"test(ai): unit test Semantic Kernel kernel function invocation and spend deduction"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "Pillar 3: Stellar SEP Standards & Anchors",
|
|
44
|
-
"count": 20,
|
|
45
|
-
"prefix": "sep",
|
|
46
|
-
"plannedIssues": [
|
|
47
|
-
"feat(sep): implement SEP-01 stellar.toml automated generation and verification server",
|
|
48
|
-
"test(sep): validate generated stellar.toml against Stellar Foundation official parser",
|
|
49
|
-
"feat(sep): implement SEP-07 pay-link QR and URI generator for agent wallet onboarding",
|
|
50
|
-
"test(sep): test SEP-07 URI parsing and transaction payload reconstruction",
|
|
51
|
-
"feat(sep): build SEP-24 interactive deposit webview bridge for human masters",
|
|
52
|
-
"test(sep): mock SEP-24 anchor flow and automated allowance top-up confirmation"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"name": "Pillar 4: Proof-of-Task Cryptographic Escrow",
|
|
57
|
-
"count": 20,
|
|
58
|
-
"prefix": "escrow",
|
|
59
|
-
"plannedIssues": [
|
|
60
|
-
"feat(escrow): implement zero-knowledge SHA-256 task output hash commitment",
|
|
61
|
-
"test(escrow): verify task output commitment verification and tamper rejection",
|
|
62
|
-
"feat(escrow): build arbiter dispute resolution multisig workflow",
|
|
63
|
-
"test(escrow): test 2-of-3 arbiter dispute resolution and split refund payout",
|
|
64
|
-
"feat(escrow): add automated task timeout refund executor on ledger expiration",
|
|
65
|
-
"test(escrow): verify refund execution after timeout window passes"
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"name": "Pillar 5: Infrastructure & State TTL Rent Keepers",
|
|
70
|
-
"count": 20,
|
|
71
|
-
"prefix": "infra",
|
|
72
|
-
"plannedIssues": [
|
|
73
|
-
"feat(infra): build autonomous cron daemon for state TTL rent extension monitoring",
|
|
74
|
-
"test(infra): simulate ledger progression and automated rent bump triggering",
|
|
75
|
-
"feat(infra): implement WebSocket event streaming client with auto-reconnect",
|
|
76
|
-
"test(infra): test WebSocket reconnection and missed event backfill replay",
|
|
77
|
-
"feat(infra): build Prometheus metrics exporter for transaction latency and fees",
|
|
78
|
-
"test(infra): verify Prometheus metric endpoints and scrape conformance"
|
|
79
|
-
]
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"name": "Pillar 6: Hardware Signers & Enterprise Security",
|
|
83
|
-
"count": 15,
|
|
84
|
-
"prefix": "security",
|
|
85
|
-
"plannedIssues": [
|
|
86
|
-
"feat(security): AWS KMS Ed25519 cloud hardware signer provider implementation",
|
|
87
|
-
"test(security): mock AWS KMS sign operation and public key derivation",
|
|
88
|
-
"feat(security): Google Cloud KMS Ed25519 signer provider implementation",
|
|
89
|
-
"test(security): mock Google Cloud KMS sign operation and signature formatting",
|
|
90
|
-
"feat(security): HashiCorp Vault transit engine integration for enterprise keys",
|
|
91
|
-
"test(security): mock Vault transit sign endpoint and error handling"
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"name": "Pillar 7: Developer Experience & Web Playground",
|
|
96
|
-
"count": 12,
|
|
97
|
-
"prefix": "devex",
|
|
98
|
-
"plannedIssues": [
|
|
99
|
-
"feat(devex): build interactive Web Playground for visual allowance simulation",
|
|
100
|
-
"test(devex): component tests for allowance configuration card and spend graph",
|
|
101
|
-
"feat(devex): automated TypeDoc API reference website build and GitHub Pages deploy",
|
|
102
|
-
"feat(devex): Docker Compose full-stack sandbox with local standalone Soroban RPC"
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
}
|
package/RUNBOOK.md
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# 📖 AgentRail Production Operational Runbook
|
|
2
|
-
|
|
3
|
-
This document defines standard operating procedures (SOP), emergency protocols, and monitoring guidelines for maintainers and infrastructure operators running the **AgentRail Protocol** on Stellar and Soroban.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🏛️ Core Protocol Reference
|
|
8
|
-
|
|
9
|
-
| Parameter | Production Value | Network |
|
|
10
|
-
| :--- | :--- | :--- |
|
|
11
|
-
| **Contract ID** | `CBSWWN2CLUPW4VLYTGVJTT4XWXKF6LLJFQXEC7KK2KTAW3A26WIBZIN6` | Stellar Testnet |
|
|
12
|
-
| **Admin Key** | `GDQZK73NVQCDJTTUMOOLF7IZ55IY4GS2TF6SNE7P7DVJ7XWICYAGJJA5` | Soroban Core |
|
|
13
|
-
| **Treasury Address** | `GDDJH64X5VEXI7UWZMJA3YUG7ANYHKRRRFHLD2SF5OWEETNFBVYMRXZT` | Trust Wallet (Self-Custody) |
|
|
14
|
-
| **Monetization Fee** | `20 basis points` (0.20%) | Automatic On-Chain Routing |
|
|
15
|
-
| **Settlement Token** | `USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5` | Circle Native Testnet |
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 🚨 Incident Response & Severity Matrix
|
|
20
|
-
|
|
21
|
-
| Severity | Definition | Target SLA | Immediate Action |
|
|
22
|
-
| :--- | :--- | :--- | :--- |
|
|
23
|
-
| **P0 (Critical)** | Exploit attempt, unauthorized allowance drain, or abnormal velocity anomaly. | **< 15 minutes** | Trip Emergency Circuit Breaker (`pause()`). Freeze all outgoing spends. |
|
|
24
|
-
| **P1 (High)** | RPC provider outage, Horizon rate limiting, or persistent transaction backlog. | **< 1 hour** | Failover to secondary Soroban RPC node. Inspect mempool health. |
|
|
25
|
-
| **P2 (Medium)** | Contract Storage TTL lease approaching minimum retention threshold (< 10,000 ledgers). | **< 24 hours** | Invoke `env.storage().instance().extend_ttl()` via automated keeper. |
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## 🔒 Emergency Circuit Breaker Procedures
|
|
30
|
-
|
|
31
|
-
### 1. Activating the Emergency Freeze (`pause`)
|
|
32
|
-
If any anomalous behavior, price oracle divergence, or unauthorized drain pattern is detected:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Execute using Stellar CLI with Admin credentials:
|
|
36
|
-
stellar contract invoke \
|
|
37
|
-
--id CBSWWN2CLUPW4VLYTGVJTT4XWXKF6LLJFQXEC7KK2KTAW3A26WIBZIN6 \
|
|
38
|
-
--source-account <ADMIN_SECRET_KEY> \
|
|
39
|
-
--network testnet \
|
|
40
|
-
-- pause
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
* **Effect:** All agent spend calls immediately revert with `Error::ContractPaused (code: 4)`.
|
|
44
|
-
* **Funds Safety:** Locked in vault. Zero stroops can move until explicit unpause.
|
|
45
|
-
|
|
46
|
-
### 2. Resuming Operations (`unpause`)
|
|
47
|
-
Once the root cause is resolved and verified:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
stellar contract invoke \
|
|
51
|
-
--id CBSWWN2CLUPW4VLYTGVJTT4XWXKF6LLJFQXEC7KK2KTAW3A26WIBZIN6 \
|
|
52
|
-
--source-account <ADMIN_SECRET_KEY> \
|
|
53
|
-
--network testnet \
|
|
54
|
-
-- unpause
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 💰 Treasury & Royalty Monitoring
|
|
60
|
-
|
|
61
|
-
1. **Protocol Fee Capture:**
|
|
62
|
-
Every spend emits a topic event `(FEE_EVENT, symbol_short!("route"))` with `(treasury, fee_amount)`.
|
|
63
|
-
2. **Ledger Invariant Verification:**
|
|
64
|
-
Confirm gross spend equals `net_amount + fee_amount`. Treasury balance in Trust Wallet (`GDDJH...`) must increase monotonically with every transaction.
|
|
65
|
-
3. **Fee Adjustment:**
|
|
66
|
-
If protocol governance votes to adjust fee bps:
|
|
67
|
-
```bash
|
|
68
|
-
stellar contract invoke \
|
|
69
|
-
--id CBSWWN2CLUPW4VLYTGVJTT4XWXKF6LLJFQXEC7KK2KTAW3A26WIBZIN6 \
|
|
70
|
-
--source-account <ADMIN_SECRET_KEY> \
|
|
71
|
-
--network testnet \
|
|
72
|
-
-- set_protocol_fee \
|
|
73
|
-
--treasury GDDJH64X5VEXI7UWZMJA3YUG7ANYHKRRRFHLD2SF5OWEETNFBVYMRXZT \
|
|
74
|
-
--fee_bps 20
|
|
75
|
-
```
|
|
76
|
-
*(Note: Contract strictly bounds fee to `<= 1000 bps` / 10% maximum to protect agent users).*
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## 🛠️ Health & Diagnostic Checks
|
|
81
|
-
|
|
82
|
-
### Automated Test Suite Execution:
|
|
83
|
-
```bash
|
|
84
|
-
# Run Vitest SDK and CLI integration tests
|
|
85
|
-
npm test
|
|
86
|
-
|
|
87
|
-
# Run offline deep Rust invariant contract tests
|
|
88
|
-
cd contracts/agentrail && cargo test --offline
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Quick Diagnostic Inspection:
|
|
92
|
-
```bash
|
|
93
|
-
# Run interactive agent sandbox session
|
|
94
|
-
npm run demo
|
|
95
|
-
```
|