@supaku/create-agentfactory-app 0.4.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Supaku
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * create-agentfactory-app
4
+ *
5
+ * Scaffolds a new AgentFactory app — a Next.js webhook server + worker
6
+ * that processes Linear issues with coding agents.
7
+ *
8
+ * Usage:
9
+ * npx @supaku/create-agentfactory-app my-agent
10
+ * npx @supaku/create-agentfactory-app my-agent --team MY
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG"}
@@ -0,0 +1,151 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * create-agentfactory-app
4
+ *
5
+ * Scaffolds a new AgentFactory app — a Next.js webhook server + worker
6
+ * that processes Linear issues with coding agents.
7
+ *
8
+ * Usage:
9
+ * npx @supaku/create-agentfactory-app my-agent
10
+ * npx @supaku/create-agentfactory-app my-agent --team MY
11
+ */
12
+ import fs from 'node:fs';
13
+ import path from 'node:path';
14
+ import { execSync } from 'node:child_process';
15
+ import readline from 'node:readline';
16
+ import { getTemplates } from './templates/index.js';
17
+ // ── Argument parsing ────────────────────────────────────────────────
18
+ const args = process.argv.slice(2);
19
+ const flags = {};
20
+ let projectName = '';
21
+ for (let i = 0; i < args.length; i++) {
22
+ const arg = args[i];
23
+ if (arg === '--help' || arg === '-h') {
24
+ printHelp();
25
+ process.exit(0);
26
+ }
27
+ if (arg.startsWith('--')) {
28
+ const key = arg.slice(2);
29
+ flags[key] = args[++i] ?? '';
30
+ }
31
+ else if (!projectName) {
32
+ projectName = arg;
33
+ }
34
+ }
35
+ // ── Interactive prompts ─────────────────────────────────────────────
36
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
37
+ function ask(question, defaultValue) {
38
+ const suffix = defaultValue ? ` (${defaultValue})` : '';
39
+ return new Promise((resolve) => {
40
+ rl.question(` ${question}${suffix}: `, (answer) => {
41
+ resolve(answer.trim() || defaultValue || '');
42
+ });
43
+ });
44
+ }
45
+ function confirm(question, defaultYes = true) {
46
+ const hint = defaultYes ? '[Y/n]' : '[y/N]';
47
+ return new Promise((resolve) => {
48
+ rl.question(` ${question} ${hint}: `, (answer) => {
49
+ const a = answer.trim().toLowerCase();
50
+ if (!a)
51
+ return resolve(defaultYes);
52
+ resolve(a === 'y' || a === 'yes');
53
+ });
54
+ });
55
+ }
56
+ // ── Main ────────────────────────────────────────────────────────────
57
+ async function main() {
58
+ console.log();
59
+ console.log(' create-agentfactory-app');
60
+ console.log();
61
+ // Project name
62
+ if (!projectName) {
63
+ projectName = await ask('Project name', 'my-agent');
64
+ }
65
+ if (!projectName) {
66
+ console.error(' Error: Project name is required');
67
+ process.exit(1);
68
+ }
69
+ // Validate project name
70
+ if (!/^[a-z0-9][a-z0-9._-]*$/.test(projectName)) {
71
+ console.error(' Error: Project name must be lowercase, start with a letter or number');
72
+ process.exit(1);
73
+ }
74
+ const projectDir = path.resolve(process.cwd(), projectName);
75
+ if (fs.existsSync(projectDir)) {
76
+ console.error(` Error: Directory "${projectName}" already exists`);
77
+ process.exit(1);
78
+ }
79
+ // Gather options
80
+ const teamKey = flags['team'] || await ask('Linear team key (e.g., MY)', 'MY');
81
+ const includeDashboard = flags['no-dashboard'] ? false : await confirm('Include dashboard UI?');
82
+ const includeCli = flags['no-cli'] ? false : await confirm('Include CLI tools (worker, orchestrator)?');
83
+ const useRedis = flags['no-redis'] ? false : await confirm('Include Redis for distributed workers?');
84
+ console.log();
85
+ console.log(` Creating ${projectName}...`);
86
+ console.log();
87
+ // Generate files from templates
88
+ const templates = getTemplates({
89
+ projectName,
90
+ teamKey,
91
+ includeDashboard,
92
+ includeCli,
93
+ useRedis,
94
+ });
95
+ // Create directories and write files
96
+ let fileCount = 0;
97
+ for (const [filePath, content] of Object.entries(templates)) {
98
+ const fullPath = path.join(projectDir, filePath);
99
+ fs.mkdirSync(path.dirname(fullPath), { recursive: true });
100
+ fs.writeFileSync(fullPath, content);
101
+ fileCount++;
102
+ }
103
+ console.log(` Created ${fileCount} files`);
104
+ console.log();
105
+ // Initialize git repo
106
+ try {
107
+ execSync('git init', { cwd: projectDir, stdio: 'pipe' });
108
+ console.log(' Initialized git repository');
109
+ }
110
+ catch {
111
+ // Git not available — skip silently
112
+ }
113
+ // Print next steps
114
+ console.log();
115
+ console.log(' Next steps:');
116
+ console.log();
117
+ console.log(` cd ${projectName}`);
118
+ console.log(' cp .env.example .env.local');
119
+ console.log(' # Fill in LINEAR_ACCESS_TOKEN and other secrets');
120
+ console.log(' pnpm install');
121
+ console.log(' pnpm dev # Start webhook server');
122
+ if (includeCli) {
123
+ console.log(' pnpm worker # Start a local worker (in another terminal)');
124
+ }
125
+ console.log();
126
+ console.log(' Documentation: https://github.com/supaku/agentfactory');
127
+ console.log();
128
+ rl.close();
129
+ }
130
+ function printHelp() {
131
+ console.log(`
132
+ Usage: npx @supaku/create-agentfactory-app [project-name] [options]
133
+
134
+ Options:
135
+ --team <KEY> Linear team key (default: MY)
136
+ --no-dashboard Skip dashboard UI
137
+ --no-cli Skip CLI tools (worker, orchestrator)
138
+ --no-redis Skip Redis/distributed worker setup
139
+ -h, --help Show this help message
140
+
141
+ Examples:
142
+ npx @supaku/create-agentfactory-app my-agent
143
+ npx @supaku/create-agentfactory-app my-agent --team ENG
144
+ npx @supaku/create-agentfactory-app my-agent --no-dashboard --no-redis
145
+ `);
146
+ }
147
+ main().catch((err) => {
148
+ console.error('Error:', err.message);
149
+ process.exit(1);
150
+ });
151
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,uEAAuE;AAEvE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAClC,MAAM,KAAK,GAA2B,EAAE,CAAA;AACxC,IAAI,WAAW,GAAG,EAAE,CAAA;AAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,IAAI,GA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AA;IACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Template generator for create-agentfactory-app
3
+ *
4
+ * Returns a map of file paths → file contents.
5
+ */
6
+ export interface TemplateOptions {
7
+ projectName: string;
8
+ teamKey: string;
9
+ includeDashboard: boolean;
10
+ includeCli: boolean;
11
+ useRedis: boolean;
12
+ }
13
+ export declare function getTemplates(opts: TemplateOptions): Record<string, string>;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4E1E"}
@@ -0,0 +1,424 @@
1
+ /**
2
+ * Template generator for create-agentfactory-app
3
+ *
4
+ * Returns a map of file paths → file contents.
5
+ */
6
+ export function getTemplates(opts) {
7
+ const files = {};
8
+ // ── Root config files ──────────────────────────────────────────
9
+ files['package.json'] = packageJson(opts);
10
+ files['tsconfig.json'] = tsconfig();
11
+ files['next.config.ts'] = nextConfig();
12
+ files['.env.example'] = envExample(opts);
13
+ files['.gitignore'] = gitignore();
14
+ // ── Core app files ─────────────────────────────────────────────
15
+ files['src/lib/config.ts'] = configTs();
16
+ files['src/middleware.ts'] = middlewareTs();
17
+ // ── Route re-exports ───────────────────────────────────────────
18
+ files['src/app/webhook/route.ts'] = routeReexport('routes.webhook.POST', 'routes.webhook.GET');
19
+ files['src/app/callback/route.ts'] = routeReexport(null, 'routes.oauth.callback.GET');
20
+ // Worker routes
21
+ files['src/app/api/workers/register/route.ts'] = routeReexport('routes.workers.register.POST');
22
+ files['src/app/api/workers/route.ts'] = routeReexport(null, 'routes.workers.list.GET');
23
+ files['src/app/api/workers/[id]/route.ts'] = routeReexport(null, 'routes.workers.detail.GET', 'routes.workers.detail.DELETE');
24
+ files['src/app/api/workers/[id]/heartbeat/route.ts'] = routeReexport('routes.workers.heartbeat.POST');
25
+ files['src/app/api/workers/[id]/poll/route.ts'] = routeReexport(null, 'routes.workers.poll.GET');
26
+ // Session routes
27
+ files['src/app/api/sessions/route.ts'] = routeReexport(null, 'routes.sessions.list.GET');
28
+ files['src/app/api/sessions/[id]/route.ts'] = routeReexport(null, 'routes.sessions.detail.GET');
29
+ files['src/app/api/sessions/[id]/claim/route.ts'] = routeReexport('routes.sessions.claim.POST');
30
+ files['src/app/api/sessions/[id]/status/route.ts'] = routeReexport('routes.sessions.status.POST', 'routes.sessions.status.GET');
31
+ files['src/app/api/sessions/[id]/lock-refresh/route.ts'] = routeReexport('routes.sessions.lockRefresh.POST');
32
+ files['src/app/api/sessions/[id]/prompts/route.ts'] = routeReexport('routes.sessions.prompts.POST', 'routes.sessions.prompts.GET');
33
+ files['src/app/api/sessions/[id]/transfer-ownership/route.ts'] = routeReexport('routes.sessions.transferOwnership.POST');
34
+ files['src/app/api/sessions/[id]/activity/route.ts'] = routeReexport('routes.sessions.activity.POST');
35
+ files['src/app/api/sessions/[id]/completion/route.ts'] = routeReexport('routes.sessions.completion.POST');
36
+ files['src/app/api/sessions/[id]/external-urls/route.ts'] = routeReexport('routes.sessions.externalUrls.POST');
37
+ files['src/app/api/sessions/[id]/progress/route.ts'] = routeReexport('routes.sessions.progress.POST');
38
+ files['src/app/api/sessions/[id]/tool-error/route.ts'] = routeReexport('routes.sessions.toolError.POST');
39
+ // Public routes
40
+ files['src/app/api/public/stats/route.ts'] = routeReexport(null, 'routes.public.stats.GET');
41
+ files['src/app/api/public/sessions/route.ts'] = routeReexport(null, 'routes.public.sessions.GET');
42
+ files['src/app/api/public/sessions/[id]/route.ts'] = routeReexport(null, 'routes.public.sessionDetail.GET');
43
+ // Cleanup route
44
+ files['src/app/api/cleanup/route.ts'] = routeReexport('routes.cleanup.POST', 'routes.cleanup.GET');
45
+ // ── Dashboard ──────────────────────────────────────────────────
46
+ if (opts.includeDashboard) {
47
+ files['src/app/layout.tsx'] = layoutTsx(opts);
48
+ files['src/app/page.tsx'] = dashboardPageTsx();
49
+ files['src/app/globals.css'] = globalsCss();
50
+ }
51
+ else {
52
+ files['src/app/layout.tsx'] = layoutTsx(opts);
53
+ files['src/app/page.tsx'] = minimalPageTsx();
54
+ files['src/app/globals.css'] = globalsCss();
55
+ }
56
+ // ── CLI tools ──────────────────────────────────────────────────
57
+ if (opts.includeCli) {
58
+ files['cli/worker.ts'] = cliWorker();
59
+ files['cli/orchestrator.ts'] = cliOrchestrator();
60
+ files['cli/worker-fleet.ts'] = cliWorkerFleet();
61
+ files['cli/cleanup.ts'] = cliCleanup();
62
+ }
63
+ // ── Agent definitions ──────────────────────────────────────────
64
+ files['.claude/agents/developer.md'] = agentDefinitionDeveloper();
65
+ return files;
66
+ }
67
+ // ── Template helpers ───────────────────────────────────────────────
68
+ function routeReexport(post, get, del) {
69
+ const lines = [`import { routes } from '@/lib/config'`];
70
+ if (post)
71
+ lines.push(`export const POST = ${post}`);
72
+ if (get)
73
+ lines.push(`export const GET = ${get}`);
74
+ if (del)
75
+ lines.push(`export const DELETE = ${del}`);
76
+ return lines.join('\n') + '\n';
77
+ }
78
+ // ── Individual templates ───────────────────────────────────────────
79
+ function packageJson(opts) {
80
+ const deps = {
81
+ '@supaku/agentfactory': '^0.4.0',
82
+ '@supaku/agentfactory-linear': '^0.4.0',
83
+ '@supaku/agentfactory-nextjs': '^0.4.0',
84
+ '@supaku/agentfactory-server': '^0.4.0',
85
+ 'next': '^15.3.0',
86
+ 'react': '^19.0.0',
87
+ 'react-dom': '^19.0.0',
88
+ };
89
+ const devDeps = {
90
+ '@types/node': '^22',
91
+ '@types/react': '^19',
92
+ 'typescript': '^5',
93
+ };
94
+ const scripts = {
95
+ 'dev': 'next dev',
96
+ 'build': 'next build',
97
+ 'start': 'next start',
98
+ 'typecheck': 'tsc --noEmit',
99
+ };
100
+ if (opts.includeCli) {
101
+ deps['@supaku/agentfactory-cli'] = '^0.4.0';
102
+ scripts['worker'] = 'tsx cli/worker.ts';
103
+ scripts['orchestrator'] = 'tsx cli/orchestrator.ts';
104
+ scripts['worker-fleet'] = 'tsx cli/worker-fleet.ts';
105
+ scripts['cleanup'] = 'tsx cli/cleanup.ts';
106
+ devDeps['tsx'] = '^4';
107
+ devDeps['dotenv'] = '^16';
108
+ }
109
+ const pkg = {
110
+ name: opts.projectName,
111
+ version: '0.1.0',
112
+ private: true,
113
+ scripts,
114
+ dependencies: deps,
115
+ devDependencies: devDeps,
116
+ };
117
+ return JSON.stringify(pkg, null, 2) + '\n';
118
+ }
119
+ function tsconfig() {
120
+ return JSON.stringify({
121
+ compilerOptions: {
122
+ target: 'ES2017',
123
+ lib: ['dom', 'dom.iterable', 'esnext'],
124
+ allowJs: true,
125
+ skipLibCheck: true,
126
+ strict: true,
127
+ noEmit: true,
128
+ esModuleInterop: true,
129
+ module: 'esnext',
130
+ moduleResolution: 'bundler',
131
+ resolveJsonModule: true,
132
+ isolatedModules: true,
133
+ jsx: 'react-jsx',
134
+ incremental: true,
135
+ baseUrl: '.',
136
+ paths: { '@/*': ['./src/*'] },
137
+ plugins: [{ name: 'next' }],
138
+ },
139
+ include: ['next-env.d.ts', '**/*.ts', '**/*.tsx', '.next/types/**/*.ts'],
140
+ exclude: ['node_modules'],
141
+ }, null, 2) + '\n';
142
+ }
143
+ function nextConfig() {
144
+ return `import type { NextConfig } from 'next'
145
+
146
+ const nextConfig: NextConfig = {}
147
+
148
+ export default nextConfig
149
+ `;
150
+ }
151
+ function envExample(opts) {
152
+ const lines = [
153
+ '# Linear API Access',
154
+ '# Create at: Settings > API > Personal API Keys',
155
+ 'LINEAR_ACCESS_TOKEN=lin_api_...',
156
+ '',
157
+ '# Linear Webhook Verification',
158
+ '# Create at: Settings > API > Webhooks',
159
+ 'LINEAR_WEBHOOK_SECRET=',
160
+ '',
161
+ '# Linear OAuth App (optional — for multi-workspace)',
162
+ '# LINEAR_CLIENT_ID=',
163
+ '# LINEAR_CLIENT_SECRET=',
164
+ '',
165
+ '# App URL (for OAuth redirect)',
166
+ `NEXT_PUBLIC_APP_URL=http://localhost:3000`,
167
+ '',
168
+ ];
169
+ if (opts.useRedis) {
170
+ lines.push('# Redis (required for distributed workers)', '# Format: redis://[:password@]host[:port][/db]', 'REDIS_URL=redis://localhost:6379', '');
171
+ }
172
+ if (opts.includeCli) {
173
+ lines.push('# Worker Configuration', '# WORKER_API_URL=https://your-app.vercel.app', '# WORKER_API_KEY=', '');
174
+ }
175
+ lines.push('# Agent Provider (default: claude)', '# Options: claude, codex, amp', '# AGENT_PROVIDER=claude', '', '# Auto-trigger Configuration', '# ENABLE_AUTO_QA=false', '# ENABLE_AUTO_ACCEPTANCE=false');
176
+ return lines.join('\n') + '\n';
177
+ }
178
+ function gitignore() {
179
+ return `node_modules/
180
+ .next/
181
+ dist/
182
+ .env.local
183
+ .env*.local
184
+ .worktrees/
185
+ .agent/
186
+ *.tsbuildinfo
187
+ `;
188
+ }
189
+ function configTs() {
190
+ return `/**
191
+ * AgentFactory Configuration
192
+ *
193
+ * Central route wiring — connects your callbacks to the route factories.
194
+ * Customize generatePrompt and other hooks to match your workflow.
195
+ */
196
+
197
+ import { createAllRoutes, createDefaultLinearClientResolver } from '@supaku/agentfactory-nextjs'
198
+
199
+ export const routes = createAllRoutes({
200
+ linearClient: createDefaultLinearClientResolver(),
201
+ // Uncomment and customize as needed:
202
+ // generatePrompt: (identifier, workType, mentionContext) => {
203
+ // return \`Work on issue \${identifier} (type: \${workType})\`
204
+ // },
205
+ // autoTrigger: {
206
+ // enableAutoQA: true,
207
+ // enableAutoAcceptance: false,
208
+ // autoQARequireAgentWorked: true,
209
+ // autoAcceptanceRequireAgentWorked: true,
210
+ // autoQAProjects: [],
211
+ // autoAcceptanceProjects: [],
212
+ // autoQAExcludeLabels: [],
213
+ // autoAcceptanceExcludeLabels: [],
214
+ // },
215
+ })
216
+ `;
217
+ }
218
+ function middlewareTs() {
219
+ return `import { createAgentFactoryMiddleware } from '@supaku/agentfactory-nextjs'
220
+
221
+ const { middleware } = createAgentFactoryMiddleware()
222
+
223
+ export { middleware }
224
+
225
+ // Must be a static object literal for Next.js build analysis
226
+ export const config = {
227
+ matcher: [
228
+ '/api/:path*',
229
+ '/webhook',
230
+ '/dashboard',
231
+ '/sessions/:path*',
232
+ '/',
233
+ ],
234
+ }
235
+ `;
236
+ }
237
+ function layoutTsx(opts) {
238
+ return `import type { Metadata } from 'next'
239
+ import './globals.css'
240
+
241
+ export const metadata: Metadata = {
242
+ title: '${opts.projectName} — AgentFactory',
243
+ description: 'AI agent fleet management',
244
+ }
245
+
246
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
247
+ return (
248
+ <html lang="en">
249
+ <body>{children}</body>
250
+ </html>
251
+ )
252
+ }
253
+ `;
254
+ }
255
+ function globalsCss() {
256
+ return `@tailwind base;
257
+ @tailwind components;
258
+ @tailwind utilities;
259
+ `;
260
+ }
261
+ function dashboardPageTsx() {
262
+ return `export default function DashboardPage() {
263
+ return (
264
+ <main className="min-h-screen bg-gray-950 text-white p-8">
265
+ <h1 className="text-3xl font-bold mb-2">AgentFactory</h1>
266
+ <p className="text-gray-400 mb-8">Your AI agent fleet is running.</p>
267
+
268
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
269
+ <div className="bg-gray-900 rounded-lg p-6 border border-gray-800">
270
+ <h2 className="text-sm font-medium text-gray-400 mb-1">Status</h2>
271
+ <p className="text-2xl font-bold text-green-400">Active</p>
272
+ </div>
273
+ <div className="bg-gray-900 rounded-lg p-6 border border-gray-800">
274
+ <h2 className="text-sm font-medium text-gray-400 mb-1">Webhook</h2>
275
+ <p className="text-sm text-gray-300 font-mono">/webhook</p>
276
+ </div>
277
+ <div className="bg-gray-900 rounded-lg p-6 border border-gray-800">
278
+ <h2 className="text-sm font-medium text-gray-400 mb-1">Public API</h2>
279
+ <p className="text-sm text-gray-300 font-mono">/api/public/stats</p>
280
+ </div>
281
+ </div>
282
+
283
+ <div className="mt-8 text-sm text-gray-500">
284
+ <p>Configure your Linear webhook to point to <code className="text-gray-400">/webhook</code></p>
285
+ <p className="mt-1">View agent sessions at <code className="text-gray-400">/api/public/sessions</code></p>
286
+ </div>
287
+ </main>
288
+ )
289
+ }
290
+ `;
291
+ }
292
+ function minimalPageTsx() {
293
+ return `export default function HomePage() {
294
+ return (
295
+ <main style={{ padding: '2rem', fontFamily: 'system-ui' }}>
296
+ <h1>AgentFactory</h1>
297
+ <p>Webhook server is running. Configure your Linear webhook to point to <code>/webhook</code>.</p>
298
+ </main>
299
+ )
300
+ }
301
+ `;
302
+ }
303
+ function cliWorker() {
304
+ return `#!/usr/bin/env tsx
305
+ import path from 'path'
306
+ import { config } from 'dotenv'
307
+
308
+ // Load environment from .env.local
309
+ config({ path: path.resolve(import.meta.dirname, '..', '.env.local') })
310
+
311
+ import { runWorker } from '@supaku/agentfactory-cli/worker'
312
+
313
+ const apiUrl = process.env.WORKER_API_URL
314
+ const apiKey = process.env.WORKER_API_KEY
315
+
316
+ if (!apiUrl || !apiKey) {
317
+ console.error('Missing WORKER_API_URL or WORKER_API_KEY in .env.local')
318
+ process.exit(1)
319
+ }
320
+
321
+ runWorker({
322
+ apiUrl,
323
+ apiKey,
324
+ capacity: 3,
325
+ }).catch((err) => {
326
+ console.error('Worker failed:', err)
327
+ process.exit(1)
328
+ })
329
+ `;
330
+ }
331
+ function cliOrchestrator() {
332
+ return `#!/usr/bin/env tsx
333
+ import path from 'path'
334
+ import { config } from 'dotenv'
335
+
336
+ // Load environment from .env.local
337
+ config({ path: path.resolve(import.meta.dirname, '..', '.env.local') })
338
+
339
+ import { runOrchestrator } from '@supaku/agentfactory-cli/orchestrator'
340
+
341
+ const project = process.argv.find((_, i, a) => a[i - 1] === '--project') ?? undefined
342
+ const single = process.argv.find((_, i, a) => a[i - 1] === '--single') ?? undefined
343
+ const dryRun = process.argv.includes('--dry-run')
344
+ const max = Number(process.argv.find((_, i, a) => a[i - 1] === '--max')) || 3
345
+
346
+ runOrchestrator({
347
+ project,
348
+ single,
349
+ dryRun,
350
+ max,
351
+ }).catch((err) => {
352
+ console.error('Orchestrator failed:', err)
353
+ process.exit(1)
354
+ })
355
+ `;
356
+ }
357
+ function cliWorkerFleet() {
358
+ return `#!/usr/bin/env tsx
359
+ import path from 'path'
360
+ import { config } from 'dotenv'
361
+
362
+ // Load environment from .env.local
363
+ config({ path: path.resolve(import.meta.dirname, '..', '.env.local') })
364
+
365
+ import { runWorkerFleet } from '@supaku/agentfactory-cli/worker-fleet'
366
+
367
+ const apiUrl = process.env.WORKER_API_URL
368
+ const apiKey = process.env.WORKER_API_KEY
369
+
370
+ if (!apiUrl || !apiKey) {
371
+ console.error('Missing WORKER_API_URL or WORKER_API_KEY in .env.local')
372
+ process.exit(1)
373
+ }
374
+
375
+ runWorkerFleet({
376
+ apiUrl,
377
+ apiKey,
378
+ }).catch((err) => {
379
+ console.error('Worker fleet failed:', err)
380
+ process.exit(1)
381
+ })
382
+ `;
383
+ }
384
+ function cliCleanup() {
385
+ return `#!/usr/bin/env tsx
386
+ import path from 'path'
387
+ import { config } from 'dotenv'
388
+
389
+ // Load environment from .env.local
390
+ config({ path: path.resolve(import.meta.dirname, '..', '.env.local') })
391
+
392
+ import { runCleanup } from '@supaku/agentfactory-cli/cleanup'
393
+
394
+ const dryRun = process.argv.includes('--dry-run')
395
+
396
+ runCleanup({ dryRun }).catch((err) => {
397
+ console.error('Cleanup failed:', err)
398
+ process.exit(1)
399
+ })
400
+ `;
401
+ }
402
+ function agentDefinitionDeveloper() {
403
+ return `# Developer Agent
404
+
405
+ You are a coding agent working on issues from the project backlog.
406
+
407
+ ## Workflow
408
+
409
+ 1. Read the issue requirements carefully
410
+ 2. Explore the existing codebase to understand patterns
411
+ 3. Implement the feature or fix
412
+ 4. Write tests if the project has a test framework
413
+ 5. Run \`pnpm test\` and \`pnpm typecheck\` to verify
414
+ 6. Create a PR with a clear description
415
+
416
+ ## Guidelines
417
+
418
+ - Follow existing code patterns and conventions
419
+ - Keep changes focused on the issue requirements
420
+ - Don't refactor unrelated code
421
+ - Write clear commit messages
422
+ `;
423
+ }
424
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,MAAM,UAAU,YAAY,CAAC,IAAqB;IAChD,MAAM,KAAK,GAA2B,EAAE,CAAA;IAExC,kEAAkE;IAElE,KAAK,CAAC,cAAc,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAA;IACzC,KAAK,CAAC,eAAe,CAAC,GAAG,QAAQ,EAAE,CAAA;IACnC,KAAK,CAAC,gBAAgB,CAAC,GAAG,UAAU,EAAE,CAAA;IACtC,KAAK,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IACxC,KAAK,CAAC,YAAY,CAAC,GAAG,SAAS,EAAE,CAAA;IAEjC,kEAAkE;IAElE,KAAK,CAAC,mBAAmB,CAAC,GAAG,QAAQ,EAAE,CAAA;IACvC,KAAK,CAAC,mBAAmB,CAAC,GAAG,YAAY,EAAE,CAAA;IAE3C,kEAAkE;IAElE,KAAK,CAAC,0BAA0B,CAAC,GAAG,aAAa,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,CAAA;IAC9F,KAAK,CAAC,2BAA2B,CAAC,GAAG,aAAa,CAAC,IAAI,EAAE,2BAA2B,CAAC,CAAA;IAErF,gBAAgB;IAChB,KAAK,CAAC,uCAAuC,CAAC,GAAG,aAAa,CAAC,8BAA8B,CAAC,CAAA;IAC9F,KAAK,CAAC,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AAS,cAAc;IACrB,OAAO;;;;;;;;CAQR,CAAA;AACD,CAAC;AAED,SAAS,SAAS;IAChB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;CAyBR,CAAA;AACD,CAAC;AAED,SAAS,eAAe;IACtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBR,CAAA;AACD,CAAC;AAED,SAAS,cAAc;IACrB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAA;AACD,CAAC;AAED,SAAS,UAAU;IACjB,OAAO;;;;;;;;;;;;;;;CAeR,CAAA;AACD,CAAC;AAED,SAAS,wBAAwB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;CAmBR,CAAA;AACD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@supaku/create-agentfactory-app",
3
+ "version": "0.4.0",
4
+ "type": "module",
5
+ "description": "Create an AgentFactory app — multi-agent fleet management for coding agents",
6
+ "author": "Supaku (https://supaku.com)",
7
+ "license": "MIT",
8
+ "engines": {
9
+ "node": ">=22.0.0"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/supaku/agentfactory",
14
+ "directory": "packages/create-app"
15
+ },
16
+ "homepage": "https://github.com/supaku/agentfactory",
17
+ "bugs": {
18
+ "url": "https://github.com/supaku/agentfactory/issues"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "keywords": [
24
+ "create",
25
+ "agentfactory",
26
+ "ai-agents",
27
+ "coding-agents",
28
+ "linear",
29
+ "scaffolding"
30
+ ],
31
+ "bin": {
32
+ "create-agentfactory-app": "./dist/src/index.js"
33
+ },
34
+ "main": "./dist/src/index.js",
35
+ "files": [
36
+ "dist",
37
+ "README.md",
38
+ "LICENSE"
39
+ ],
40
+ "dependencies": {},
41
+ "devDependencies": {
42
+ "@types/node": "^22.5.4",
43
+ "typescript": "^5.7.3"
44
+ },
45
+ "scripts": {
46
+ "build": "tsc",
47
+ "typecheck": "tsc --noEmit",
48
+ "clean": "rm -rf dist"
49
+ }
50
+ }