Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3c6aed5
Implement Netlify deployment integration and payment templates
Jackson57279 Jan 19, 2026
7fce9be
Enhance deployment and OAuth functionalities
Jackson57279 Jan 19, 2026
0f7bb53
Improve database setup and theming options
Jackson57279 Jan 19, 2026
b6719d1
Refactor deployment tracking and enhance OAuth handling
Jackson57279 Jan 20, 2026
8fce888
Update README and enhance SEO metadata
Jackson57279 Jan 20, 2026
7edc4ea
Update dependencies and agent code
Jackson57279 Jan 20, 2026
3b4f2c3
commit
Jackson57279 Jan 24, 2026
a94bf75
Refactor error handling and enhance agent configurations
Jackson57279 Jan 24, 2026
0f9de18
Remove outdated migration and changelog files for Clerk Billing and p…
Jackson57279 Jan 25, 2026
af5114f
Update dependencies, enhance robots.txt, and add blog to sitemap
Jackson57279 Jan 25, 2026
cc03915
Enhance sitemap and SEO metadata for improved content visibility
Jackson57279 Jan 26, 2026
ba5d1ee
Update package dependencies, enhance sandbox path validation, and imp…
Jackson57279 Jan 26, 2026
ae78f07
Add Inngest integration for real-time event handling in agent execution
Jackson57279 Jan 26, 2026
8daedbe
feat(convex): add skills and skillInstallations schema with CRUD oper…
Jackson57279 Jan 27, 2026
fb7537d
feat(trpc): add skills router with CRUD procedures
Jackson57279 Jan 27, 2026
6fb5988
feat(agents): add skill content loader with token budgeting
Jackson57279 Jan 27, 2026
96b8342
feat(agents): inject skill content into agent system prompts
Jackson57279 Jan 27, 2026
397af8b
feat(scripts): add PrebuiltUI GitHub scraper and component parser
Jackson57279 Jan 27, 2026
ceec889
feat(scripts): add skill seeding script with skill.yaml parser
Jackson57279 Jan 27, 2026
1928eda
feat(data): bake core skill content as static fallback
Jackson57279 Jan 27, 2026
3d68a14
feat(webcontainer): add singleton provider, hook, and scoped COOP/COE…
Jackson57279 Jan 27, 2026
b754af6
feat(webcontainer): add file mounting, process spawning, and build va…
Jackson57279 Jan 27, 2026
c27ee20
feat: complete skill system and WebContainer integration
Jackson57279 Jan 27, 2026
4cda54d
change
Jackson57279 Jan 28, 2026
1dcdea3
Fixing things
Jackson57279 Jan 28, 2026
523d6c4
Changes;2;13~
Jackson57279 Jan 29, 2026
eeaeb0b
Local testing
Jackson57279 Feb 2, 2026
f18b061
Cange
Jackson57279 Feb 6, 2026
794dfc7
Cjamges
Jackson57279 Feb 6, 2026
7b02873
Changes
Jackson57279 Feb 7, 2026
0157da3
Trying to fucking fix this shit
Jackson57279 Feb 11, 2026
4f09712
fixing build error then merge
Jackson57279 Feb 13, 2026
a06eb16
Changes
Jackson57279 Feb 14, 2026
a50e05f
Refactor skill queries to be public for server-side access and update…
Jackson57279 Feb 14, 2026
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
---
name: Add Inngest as Agent Orchestration Layer
overview: Integrate Inngest as a middleware orchestration layer for the existing agent system. The agent logic (`runCodeAgent`) remains unchanged, but execution will be routed through Inngest functions for better observability, retry handling, and workflow management.
todos:
- id: install-inngest
content: "Install Inngest packages: inngest and @inngest/realtime"
status: completed
- id: create-client
content: Create src/inngest/client.ts with Inngest client and realtime middleware
status: completed
- id: create-types
content: Create src/inngest/types.ts with event type definitions
status: completed
- id: create-function
content: Create src/inngest/functions/code-agent.ts that wraps runCodeAgent
status: completed
- id: create-api-route
content: Create src/app/api/inngest/route.ts to serve Inngest functions
status: completed
- id: modify-agent-route
content: Modify src/app/api/agent/run/route.ts to trigger Inngest and stream events
status: completed
isProject: false
---

# Add Inngest as Agent Orchestration Layer

## Overview

Add Inngest as a middleware orchestration layer between the API route and the agent system. The existing `runCodeAgent` function remains unchanged - Inngest will wrap it to provide workflow orchestration, retry logic, and observability.

## Architecture

```
Frontend → /api/agent/run (SSE) → Inngest Function → runCodeAgent() → Stream Events
```

The API route will trigger an Inngest event, and the Inngest function will execute the agent while streaming events back through Inngest's realtime system.

## Implementation Steps

### 1. Install Inngest Dependencies

**File**: `package.json`

Add Inngest packages:

- `inngest` - Core Inngest SDK
- `@inngest/realtime` - Real-time streaming support (for SSE events)

### 2. Create Inngest Client

**File**: `src/inngest/client.ts` (NEW)

Create Inngest client with realtime middleware:

- Initialize Inngest client with `INNGEST_EVENT_KEY` and `INNGEST_SIGNING_KEY`
- Add `realtimeMiddleware` from `@inngest/realtime` for streaming support
- Export configured client

### 3. Create Inngest Function for Agent Execution

**File**: `src/inngest/functions/code-agent.ts` (NEW)

Create Inngest function that wraps `runCodeAgent`:

- Function name: `code-agent/run`
- Event trigger: `code-agent/run.requested`
- Function will:

1. Accept `projectId`, `value`, `model` from event data
2. Call `runCodeAgent()` with these parameters
3. Stream events using Inngest's `sendEvent` for realtime updates
4. Handle errors and retries via Inngest's built-in retry
5. Emit completion event with final results

**Key considerations**:

- Inngest functions are async and don't directly return SSE streams
- Use Inngest's `sendEvent` to emit progress events
- Store final results in Convex (already done by `runCodeAgent`)
- Use Inngest's retry configuration for transient failures

### 4. Create Inngest API Route Handler

**File**: `src/app/api/inngest/route.ts` (NEW)

Create Inngest serve handler:

- Export handler that serves Inngest functions
- Register the `code-agent/run` function
- This endpoint is called by Inngest Cloud/Dev Server to execute functions

### 5. Modify Agent Run API Route

**File**: `src/app/api/agent/run/route.ts`

Update to use Inngest:

- Instead of calling `runCodeAgent()` directly, trigger Inngest event
- Use Inngest's realtime streaming to forward events as SSE
- Maintain same SSE format for frontend compatibility
- Handle Inngest event triggering and stream consumption

**Two approaches for streaming**:

**Option A (Recommended)**: Use Inngest Realtime

- Trigger Inngest event with `runId`
- Subscribe to Inngest realtime events for that `runId`
- Forward events as SSE to frontend
- This requires `@inngest/realtime` middleware

**Option B**: Hybrid approach

- Trigger Inngest event (non-blocking)
- Inngest function calls `runCodeAgent()` and stores events
- API route polls/streams from storage or uses webhooks
- Less real-time but simpler

**Recommendation**: Start with Option A using Inngest Realtime for true streaming.

### 6. Environment Variables

**File**: `.env.example` (update if exists) or document in README

Add required Inngest variables:

- `INNGEST_EVENT_KEY` - Inngest event key
- `INNGEST_SIGNING_KEY` - Inngest signing key
- `INNGEST_APP_URL` - App URL for Inngest to call back (optional, auto-detected)

### 7. Type Definitions

**File**: `src/inngest/types.ts` (NEW)

Define Inngest event types:

- `code-agent/run.requested` event data structure
- `code-agent/run.progress` event structure
- `code-agent/run.complete` event structure
- `code-agent/run.error` event structure

### 8. Update Frontend (if needed)

**File**: `src/modules/projects/ui/components/message-form.tsx`

The frontend should continue working as-is since we're maintaining SSE format. However, we may need to:

- Add handling for Inngest-specific event types if any
- Ensure compatibility with the streaming format

## Key Files to Create/Modify

### New Files

1. `src/inngest/client.ts` - Inngest client configuration
2. `src/inngest/functions/code-agent.ts` - Agent execution function
3. `src/inngest/types.ts` - Event type definitions
4. `src/app/api/inngest/route.ts` - Inngest serve handler

### Modified Files

1. `package.json` - Add Inngest dependencies
2. `src/app/api/agent/run/route.ts` - Trigger Inngest instead of direct call

## Implementation Details

### Inngest Function Structure

```typescript
export const runCodeAgentFunction = inngest.createFunction(
{
id: "code-agent-run",
name: "Code Agent Run",
retries: 3, // Use Inngest retries
},
{ event: "code-agent/run.requested" },
async ({ event, step }) => {
// Call runCodeAgent and stream events
// Emit progress events via sendEvent
// Handle completion/errors
}
);
```

### API Route Changes

The route will:

1. Generate a unique `runId`
2. Trigger Inngest event with `runId`
3. Subscribe to Inngest realtime events for that `runId`
4. Forward events as SSE to maintain frontend compatibility

## Testing Considerations

- Test Inngest function execution locally with Inngest Dev Server
- Verify SSE streaming still works with frontend
- Test retry logic via Inngest
- Verify error handling and event emission

## Migration Notes

- The agent system (`runCodeAgent`) remains completely unchanged
- Frontend continues to work with SSE format
- Inngest adds orchestration layer without breaking existing functionality
- Can be deployed incrementally (test with Inngest, fallback to direct if needed)
2 changes: 1 addition & 1 deletion .cursor/rules/convex_rules.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const listWithExtraArg = query({
handler: async (ctx, args) => {
return await ctx.db
.query("messages")
.filter((q) => q.eq(q.field("author"), args.author))
.withIndex("by_author", (q) => q.eq("author", args.author))
.order("desc")
.paginate(args.paginationOpts);
},
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/claude-code-review.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/claude.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .sisyphus/boulder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"active_plan": "/home/dih/zapdev-no-pr/zapdev/.sisyphus/plans/export-to-polaris.md",
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 11, 2026

Choose a reason for hiding this comment

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

P2: Avoid committing absolute filesystem paths; they break portability and violate the repository’s anti-pattern guidance. Store a repo-relative path instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .sisyphus/boulder.json, line 2:

<comment>Avoid committing absolute filesystem paths; they break portability and violate the repository’s anti-pattern guidance. Store a repo-relative path instead.</comment>

<file context>
@@ -0,0 +1,6 @@
+{
+  "active_plan": "/home/dih/zapdev-no-pr/zapdev/.sisyphus/plans/export-to-polaris.md",
+  "started_at": "2026-02-08T06:29:01.522Z",
+  "session_ids": ["ses_3c433fc21ffeFQz5bAH7YbQBMr"],
</file context>
Fix with Cubic

"started_at": "2026-02-08T06:29:01.522Z",
"session_ids": ["ses_3c433fc21ffeFQz5bAH7YbQBMr"],
"plan_name": "export-to-polaris"
}
Comment on lines +1 to +6
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if .gitignore already has sisyphus entries
echo "=== .gitignore contents related to sisyphus ==="
rg -n "sisyphus" .gitignore 2>/dev/null || echo "No sisyphus entries in .gitignore (or .gitignore not found)"

echo ""
echo "=== Other .sisyphus files in the repo ==="
fd . .sisyphus --type f 2>/dev/null

echo ""
echo "=== Full .gitignore content ==="
cat .gitignore 2>/dev/null || echo ".gitignore not found"

Repository: Jackson57279/zapdev

Length of output: 1167


🏁 Script executed:

#!/bin/bash
# Check if boulder.json is tracked in git
echo "=== Is .sisyphus/boulder.json tracked by git? ==="
git ls-files .sisyphus/boulder.json && echo "YES - boulder.json is committed to the repository" || echo "NO - boulder.json is not tracked"

echo ""
echo "=== Current git status ==="
git status .sisyphus/boulder.json 2>/dev/null || echo "File status check result shown above"

Repository: Jackson57279/zapdev

Length of output: 279


Use a relative path and add .sisyphus/boulder.json to .gitignore.

The active_plan contains the absolute path /home/dih/zapdev-no-pr/zapdev/.sisyphus/plans/... which is specific to one developer's machine and will not resolve for anyone else. Additionally, this file is ephemeral Sisyphus session state (session IDs, timestamps) and should not be committed to the repository.

Change to a relative path:

Proposed fix
 {
-  "active_plan": "/home/dih/zapdev-no-pr/zapdev/.sisyphus/plans/export-to-polaris.md",
+  "active_plan": ".sisyphus/plans/export-to-polaris.md",
   "started_at": "2026-02-08T06:29:01.522Z",
   "session_ids": ["ses_3c433fc21ffeFQz5bAH7YbQBMr"],
   "plan_name": "export-to-polaris"
 }

Also add .sisyphus/boulder.json to .gitignore since this is transient local state.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"active_plan": "/home/dih/zapdev-no-pr/zapdev/.sisyphus/plans/export-to-polaris.md",
"started_at": "2026-02-08T06:29:01.522Z",
"session_ids": ["ses_3c433fc21ffeFQz5bAH7YbQBMr"],
"plan_name": "export-to-polaris"
}
{
"active_plan": ".sisyphus/plans/export-to-polaris.md",
"started_at": "2026-02-08T06:29:01.522Z",
"session_ids": ["ses_3c433fc21ffeFQz5bAH7YbQBMr"],
"plan_name": "export-to-polaris"
}
🤖 Prompt for AI Agents
In @.sisyphus/boulder.json around lines 1 - 6, The .sisyphus/boulder.json
currently contains an absolute path in the "active_plan" field and should not be
committed; change the "active_plan" value to a relative path (e.g.,
".sisyphus/plans/export-to-polaris.md") in .sisyphus/boulder.json and add the
filename .sisyphus/boulder.json to .gitignore so the transient session state
(session_ids, started_at) is not tracked; update the file and commit the
.gitignore change.

Loading