@aion0/forge 0.4.15 → 0.5.0
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/CLAUDE.md +1 -1
- package/README.md +2 -2
- package/RELEASE_NOTES.md +170 -13
- package/app/api/agents/route.ts +17 -0
- package/app/api/delivery/[id]/route.ts +62 -0
- package/app/api/delivery/route.ts +40 -0
- package/app/api/mobile-chat/route.ts +13 -7
- package/app/api/monitor/route.ts +10 -6
- package/app/api/pipelines/[id]/route.ts +16 -3
- package/app/api/tasks/route.ts +2 -1
- package/app/api/workspace/[id]/agents/route.ts +35 -0
- package/app/api/workspace/[id]/memory/route.ts +23 -0
- package/app/api/workspace/[id]/smith/route.ts +22 -0
- package/app/api/workspace/[id]/stream/route.ts +28 -0
- package/app/api/workspace/route.ts +100 -0
- package/app/global-error.tsx +10 -4
- package/app/icon.ico +0 -0
- package/app/layout.tsx +2 -2
- package/app/login/LoginForm.tsx +96 -0
- package/app/login/page.tsx +7 -98
- package/app/page.tsx +2 -2
- package/bin/forge-server.mjs +23 -4
- package/check-forge-status.sh +9 -0
- package/cli/mw.ts +2 -2
- package/components/ConversationEditor.tsx +411 -0
- package/components/ConversationGraphView.tsx +347 -0
- package/components/ConversationTerminalView.tsx +303 -0
- package/components/Dashboard.tsx +36 -39
- package/components/DashboardWrapper.tsx +9 -0
- package/components/DeliveryFlowEditor.tsx +491 -0
- package/components/DeliveryList.tsx +230 -0
- package/components/DeliveryWorkspace.tsx +589 -0
- package/components/DocTerminal.tsx +12 -4
- package/components/DocsViewer.tsx +10 -2
- package/components/HelpTerminal.tsx +13 -8
- package/components/InlinePipelineView.tsx +111 -0
- package/components/MobileView.tsx +20 -0
- package/components/MonitorPanel.tsx +9 -4
- package/components/NewTaskModal.tsx +32 -0
- package/components/PipelineEditor.tsx +49 -6
- package/components/PipelineView.tsx +482 -64
- package/components/ProjectDetail.tsx +314 -56
- package/components/ProjectManager.tsx +49 -4
- package/components/SessionView.tsx +27 -13
- package/components/SettingsModal.tsx +790 -124
- package/components/SkillsPanel.tsx +34 -8
- package/components/TaskBoard.tsx +3 -0
- package/components/WebTerminal.tsx +259 -45
- package/components/WorkspaceTree.tsx +221 -0
- package/components/WorkspaceView.tsx +2224 -0
- package/docs/LOCAL-DEPLOY.md +15 -15
- package/install.sh +2 -2
- package/lib/agents/claude-adapter.ts +104 -0
- package/lib/agents/generic-adapter.ts +64 -0
- package/lib/agents/index.ts +242 -0
- package/lib/agents/types.ts +70 -0
- package/lib/artifacts.ts +106 -0
- package/lib/cloudflared.ts +1 -1
- package/lib/delivery.ts +787 -0
- package/lib/forge-skills/forge-inbox.md +37 -0
- package/lib/forge-skills/forge-send.md +40 -0
- package/lib/forge-skills/forge-status.md +32 -0
- package/lib/forge-skills/forge-workspace-sync.md +37 -0
- package/lib/help-docs/00-overview.md +8 -2
- package/lib/help-docs/01-settings.md +159 -2
- package/lib/help-docs/05-pipelines.md +95 -6
- package/lib/help-docs/07-projects.md +35 -1
- package/lib/help-docs/11-workspace.md +204 -0
- package/lib/help-docs/CLAUDE.md +5 -2
- package/lib/init.ts +62 -12
- package/lib/pipeline.ts +537 -1
- package/lib/settings.ts +115 -22
- package/lib/skills.ts +249 -372
- package/lib/task-manager.ts +113 -33
- package/lib/telegram-bot.ts +33 -1
- package/lib/telegram-standalone.ts +1 -1
- package/lib/terminal-server.ts +2 -2
- package/lib/terminal-standalone.ts +1 -1
- package/lib/workspace/__tests__/state-machine.test.ts +388 -0
- package/lib/workspace/__tests__/workspace.test.ts +311 -0
- package/lib/workspace/agent-bus.ts +416 -0
- package/lib/workspace/agent-worker.ts +667 -0
- package/lib/workspace/backends/api-backend.ts +262 -0
- package/lib/workspace/backends/cli-backend.ts +479 -0
- package/lib/workspace/index.ts +82 -0
- package/lib/workspace/manager.ts +136 -0
- package/lib/workspace/orchestrator.ts +1804 -0
- package/lib/workspace/persistence.ts +310 -0
- package/lib/workspace/presets.ts +170 -0
- package/lib/workspace/skill-installer.ts +188 -0
- package/lib/workspace/smith-memory.ts +498 -0
- package/lib/workspace/types.ts +231 -0
- package/lib/workspace/watch-manager.ts +288 -0
- package/lib/workspace-standalone.ts +790 -0
- package/middleware.ts +1 -0
- package/next-env.d.ts +1 -1
- package/package.json +5 -2
- package/src/config/index.ts +13 -2
- package/src/core/db/database.ts +1 -0
- package/start.sh +10 -0
package/middleware.ts
CHANGED
|
@@ -8,6 +8,7 @@ export function middleware(req: NextRequest) {
|
|
|
8
8
|
pathname.startsWith('/login') ||
|
|
9
9
|
pathname.startsWith('/api/auth') ||
|
|
10
10
|
pathname.startsWith('/api/telegram') ||
|
|
11
|
+
(pathname.startsWith('/api/workspace') && (pathname.includes('/smith') || pathname === '/api/workspace')) ||
|
|
11
12
|
pathname.startsWith('/_next') ||
|
|
12
13
|
pathname === '/favicon.ico' ||
|
|
13
14
|
pathname === '/icon.png'
|
package/next-env.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="next" />
|
|
2
2
|
/// <reference types="next/image-types/global" />
|
|
3
|
-
import "./.next/
|
|
3
|
+
import "./.next/types/routes.d.ts";
|
|
4
4
|
|
|
5
5
|
// NOTE: This file should not be edited
|
|
6
6
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aion0/forge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Unified AI workflow platform — multi-model task orchestration, persistent sessions, web terminal, remote access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -33,11 +33,14 @@
|
|
|
33
33
|
"@ai-sdk/openai": "^3.0.41",
|
|
34
34
|
"@auth/core": "^0.34.3",
|
|
35
35
|
"@xterm/addon-fit": "^0.11.0",
|
|
36
|
+
"@xterm/addon-search": "^0.16.0",
|
|
37
|
+
"@xterm/addon-unicode11": "^0.9.0",
|
|
38
|
+
"@xterm/addon-webgl": "^0.19.0",
|
|
36
39
|
"@xterm/xterm": "^6.0.0",
|
|
37
40
|
"@xyflow/react": "^12.10.1",
|
|
38
41
|
"ai": "^6.0.116",
|
|
39
42
|
"better-sqlite3": "^12.6.2",
|
|
40
|
-
"next": "^16.1
|
|
43
|
+
"next": "^16.2.1",
|
|
41
44
|
"next-auth": "5.0.0-beta.30",
|
|
42
45
|
"node-pty": "1.0.0",
|
|
43
46
|
"react": "^19.2.4",
|
package/src/config/index.ts
CHANGED
|
@@ -102,12 +102,23 @@ function getDefaultConfig(): AppConfig {
|
|
|
102
102
|
},
|
|
103
103
|
server: {
|
|
104
104
|
host: '0.0.0.0',
|
|
105
|
-
port:
|
|
105
|
+
port: 8403,
|
|
106
106
|
},
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
export function getProviderApiKey(provider: ProviderName): string | undefined {
|
|
110
|
+
export function getProviderApiKey(provider: ProviderName, profileApiKey?: string): string | undefined {
|
|
111
|
+
// Priority: profile-level key > settings provider key > env var
|
|
112
|
+
if (profileApiKey) return profileApiKey;
|
|
113
|
+
|
|
114
|
+
try {
|
|
115
|
+
const { loadSettings } = require('@/lib/settings');
|
|
116
|
+
const settings = loadSettings();
|
|
117
|
+
if (settings.providers?.[provider]?.apiKey) {
|
|
118
|
+
return settings.providers[provider].apiKey;
|
|
119
|
+
}
|
|
120
|
+
} catch {}
|
|
121
|
+
|
|
111
122
|
const envMap: Record<ProviderName, string> = {
|
|
112
123
|
anthropic: 'ANTHROPIC_API_KEY',
|
|
113
124
|
google: 'GOOGLE_GENERATIVE_AI_API_KEY',
|
package/src/core/db/database.ts
CHANGED
|
@@ -36,6 +36,7 @@ function initSchema(db: Database.Database) {
|
|
|
36
36
|
migrate('ALTER TABLE skills ADD COLUMN deleted_remotely INTEGER NOT NULL DEFAULT 0');
|
|
37
37
|
migrate('ALTER TABLE project_pipelines ADD COLUMN last_run_at TEXT');
|
|
38
38
|
migrate('ALTER TABLE pipeline_runs ADD COLUMN dedup_key TEXT');
|
|
39
|
+
migrate("ALTER TABLE tasks ADD COLUMN agent TEXT DEFAULT 'claude'");
|
|
39
40
|
// Recreate token_usage with day column (drop old version if schema changed)
|
|
40
41
|
try { db.exec("SELECT day FROM token_usage LIMIT 1"); } catch { try { db.exec("DROP TABLE IF EXISTS token_usage"); db.exec("DROP TABLE IF EXISTS usage_scan_state"); } catch {} }
|
|
41
42
|
// Unique index for dedup (only applies when dedup_key is NOT NULL)
|
package/start.sh
CHANGED
|
@@ -8,12 +8,22 @@
|
|
|
8
8
|
# Kill all old forge processes
|
|
9
9
|
pkill -f 'telegram-standalone' 2>/dev/null
|
|
10
10
|
pkill -f 'terminal-standalone' 2>/dev/null
|
|
11
|
+
pkill -f 'workspace-standalone' 2>/dev/null
|
|
11
12
|
pkill -f 'cloudflared tunnel' 2>/dev/null
|
|
13
|
+
# Wait for workspace daemon port to be released
|
|
14
|
+
for i in 1 2 3; do
|
|
15
|
+
lsof -ti:${WORKSPACE_PORT:-8405} >/dev/null 2>&1 || break
|
|
16
|
+
sleep 1
|
|
17
|
+
done
|
|
12
18
|
pkill -f 'next-server' 2>/dev/null
|
|
13
19
|
pkill -f 'next start' 2>/dev/null
|
|
14
20
|
pkill -f 'next dev' 2>/dev/null
|
|
15
21
|
sleep 1
|
|
16
22
|
|
|
23
|
+
export PORT=${PORT:-8403}
|
|
24
|
+
export TERMINAL_PORT=${TERMINAL_PORT:-8404}
|
|
25
|
+
export WORKSPACE_PORT=${WORKSPACE_PORT:-8405}
|
|
26
|
+
|
|
17
27
|
if [ "$1" = "dev" ]; then
|
|
18
28
|
pnpm dev
|
|
19
29
|
else
|