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
12 changes: 12 additions & 0 deletions .depcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ignores": [
"dotenv",
"@types/jest",
"ts-jest",
"eslint",
"jest",
"prettier",
"tsx",
"typescript"
]
}
51 changes: 15 additions & 36 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: CI/CD Pipeline
on:
push:
branches: [main, develop]
tags:
- 'v*'
pull_request:
branches: [main]

Expand All @@ -12,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [20.x]
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI/CD workflow now only tests on Node 20.x, removing Node 18.x from the test matrix. Since the package.json specifies "node": ">=18.0.0" in engines, this creates a mismatch where the minimum supported version is not being tested. Consider either updating the engines field or keeping Node 18.x in the test matrix.

Suggested change
node-version: [20.x]
node-version: [18.x, 20.x]

Copilot uses AI. Check for mistakes.

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -48,12 +50,12 @@ jobs:
run: npm audit --audit-level moderate

- name: Check dependencies
run: npx depcheck
run: npx depcheck --config=.depcheckrc

publish:
needs: [test, security]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
if: startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v4
Expand All @@ -70,40 +72,17 @@ jobs:
- name: Build project
run: npm run build

- name: Validate version
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
PKG_VERSION=$(node -p "require('./package.json').version")
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
echo "Tag version ($TAG_VERSION) != package.json ($PKG_VERSION)"
exit 1
fi
echo "Version validated!"

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy-staging:
needs: [test, security]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'

steps:
- uses: actions/checkout@v4

- name: Deploy to Vercel (Staging)
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./

deploy-production:
needs: [test, security]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'

steps:
- uses: actions/checkout@v4

- name: Deploy to Vercel (Production)
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
working-directory: ./
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

#### CLI Tool

- **superagent create**: Create new agent projects
- **superagent configure**: Environment setup
- **superagent run**: Local development server
- **superagent status**: Check agent status
- **superagent status**: Agent monitoring
- **superdapp create**: Create new agent projects
- **superdapp configure**: Environment setup
- **superdapp run**: Local development server
- **superdapp status**: Check agent status
- **superdapp status**: Agent monitoring

#### Runtime Support

Expand Down
26 changes: 13 additions & 13 deletions COMPLETION_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The SuperDapp JavaScript/TypeScript SDK has been successfully implemented and is
- ✅ **ES Module & CommonJS** - Dual module support for compatibility
sonn

### 2. **CLI Tool (superagent)**
### 2. **CLI Tool (superdapp)**

- ✅ **Project Creation** - `superagent create` creates new projects
- ✅ **Configuration Management** - `superagent configure` for API keys
- ✅ **Local Development** - `superagent run` for testing
- ✅ **Status** - `superagent status` to check agent status
- ✅ **Status Monitoring** - `superagent status` for health checks
- ✅ **Project Creation** - `superdapp create` creates new projects
- ✅ **Configuration Management** - `superdapp configure` for API keys
- ✅ **Local Development** - `superdapp run` for testing
- ✅ **Status** - `superdapp status` to check agent status
- ✅ **Status Monitoring** - `superdapp status` for health checks

### 3. **Project Templates**

Expand Down Expand Up @@ -102,11 +102,11 @@ The SuperDapp JS SDK is **immediately ready** for:

```bash
npm install -g @superdapp/agents
superagent create my-agent
superdapp create my-agent
cd my-agent
npm install
superagent configure
superagent run
superdapp configure
superdapp run
```

### SDK Usage
Expand All @@ -124,11 +124,11 @@ await agent.initialize();
### CLI Commands

```bash
superagent create my-bot # Create new project
superagent configure --api-key YOUR_KEY # Set up credentials
superagent run --port 3000 # Run locally
superdapp create my-bot # Create new project
superdapp configure --api-key YOUR_KEY # Set up credentials
superdapp run --port 3000 # Run locally
wrangler deploy # Deploy to Cloudflare
superagent status # Check agent status
superdapp status # Check agent status
```

## 🏆 ACHIEVEMENT SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ When you create a new project with the CLI and want to use the local version:

```bash
# Create a new project
superagent create my-test-project --yes
superdapp create my-test-project --yes

# Navigate to the project
cd my-test-project
Expand Down
2 changes: 1 addition & 1 deletion PROJECT_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- [x] Extensible architecture for custom logic
- [x] Event-driven message processing

### 🛠️ CLI Tool (superagent)
### 🛠️ CLI Tool (superdapp)

- [x] **init** - Project scaffolding with templates
- [x] **configure** - Environment setup and validation
Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,30 @@ A professional-grade Node.js/TypeScript SDK and CLI for building AI agents on th
You can now use a positional argument for the project directory:

```bash
superagent create my-awesome-agent
superdapp create my-awesome-agent
```

### Example

```bash
superagent create my-agent
superdapp create my-agent
cd my-agent
npm install
superagent configure
superagent run
superdapp configure
superdapp run
```

---

## 🧑‍💻 CLI Commands

- `superagent create [directory]` – Create a new agent project (supports positional or --name)
- `superagent configure` – Configure API keys and environment variables
- `superagent run` – Run the agent locally for testing (supports multiple environment file formats)
- `superdapp create [directory]` – Create a new agent project (supports positional or --name)
- `superdapp configure` – Configure API keys and environment variables
- `superdapp run` – Run the agent locally for testing (supports multiple environment file formats)

### Environment File Support

The `superagent run` command automatically detects your runtime and supports multiple environment file formats:
The `superdapp run` command automatically detects your runtime and supports multiple environment file formats:

- **Node.js**: `.env` files
- **AWS Lambda**: `env.json` files
Expand Down Expand Up @@ -128,7 +128,7 @@ For comprehensive documentation, visit our **[Documentation Hub](./docs/README.m
- **[CLI Guide](./docs/cli-guide.md)** - Complete command-line interface documentation
- **[API Reference](./docs/api-reference.md)** - Complete SDK reference
- **[Deployment Guide](./docs/deployment.md)** - Deploy to production
- **[Tunneling (ngrok)](./docs/tunneling.md)** - Expose your local webhook
- **[Tunneling (ngrok)](./docs/tunneling.md)** - Expose your local webhook

## 🔧 Advanced Usage

Expand Down Expand Up @@ -174,7 +174,11 @@ import type {
ApiResponse,
} from '@superdapp/agents';

const handleCommand: CommandHandler = async ({ message, replyMessage, roomId }) => {
const handleCommand: CommandHandler = async ({
message,
replyMessage,
roomId,
}) => {
// Fully typed message object
const messageText = (message.body as any)?.m?.body;
// ... handler logic
Expand All @@ -191,7 +195,7 @@ try {
await agent.processRequest(webhookBody);
} catch (error) {
if (error.message.includes('API_TOKEN')) {
console.error('Invalid API token. Run: superagent configure');
console.error('Invalid API token. Run: superdapp configure');
} else {
console.error('Request processing failed:', error);
}
Expand Down
13 changes: 8 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ The SuperDapp Agents SDK provides a modern, webhook-based architecture for build

```bash
# Initialize a new project
superagent create my-agent
superdapp create my-agent

# Configure environment
superagent configure
superdapp configure

# Run locally
superagent run
superdapp run

# Check status
superagent status
superdapp status
```

## 📦 Installation
Expand All @@ -79,7 +79,10 @@ npm install @superdapp/agents
```typescript
import { SuperDappAgent } from '@superdapp/agents';

const agent = new SuperDappAgent({ apiToken: process.env.API_TOKEN!, baseUrl: process.env.API_BASE_URL });
const agent = new SuperDappAgent({
apiToken: process.env.API_TOKEN!,
baseUrl: process.env.API_BASE_URL,
});

agent.addCommand('/start', async ({ roomId }) => {
await agent.sendConnectionMessage(roomId, 'Hello!');
Expand Down
Loading
Loading