agent-enderun 1.10.2 → 1.11.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/README.md +34 -44
- package/dist/framework-mcp/src/constants.d.ts +47 -0
- package/dist/framework-mcp/src/constants.js +65 -0
- package/dist/framework-mcp/src/constants.js.map +1 -0
- package/dist/framework-mcp/src/index.js +26 -5
- package/dist/framework-mcp/src/index.js.map +1 -1
- package/dist/framework-mcp/src/tools/control_plane/locking.d.ts +3 -9
- package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -1
- package/dist/framework-mcp/src/tools/control_plane/registry.d.ts +2 -8
- package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -1
- package/dist/framework-mcp/src/tools/dashboard/start_dashboard.d.ts +2 -2
- package/dist/framework-mcp/src/tools/dashboard/start_dashboard.js.map +1 -1
- package/dist/framework-mcp/src/tools/definitions.js +30 -0
- package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.d.ts +2 -2
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js +12 -4
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +2 -2
- package/dist/framework-mcp/src/tools/file_system/patch_file.js +6 -2
- package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/read_file.d.ts +2 -2
- package/dist/framework-mcp/src/tools/file_system/read_file.js +43 -26
- package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +2 -2
- package/dist/framework-mcp/src/tools/file_system/replace_text.js +7 -3
- package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +2 -2
- package/dist/framework-mcp/src/tools/file_system/write_file.js +27 -15
- package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/get_status.d.ts +2 -2
- package/dist/framework-mcp/src/tools/framework/get_status.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/orchestrate.d.ts +2 -2
- package/dist/framework-mcp/src/tools/framework/orchestrate.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/run_tests.d.ts +2 -2
- package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/update_contract_hash.d.ts +2 -2
- package/dist/framework-mcp/src/tools/framework/update_contract_hash.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/update_memory.d.ts +2 -2
- package/dist/framework-mcp/src/tools/framework/update_memory.js +1 -1
- package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -1
- package/dist/framework-mcp/src/tools/index.d.ts +1 -2
- package/dist/framework-mcp/src/tools/index.js +33 -25
- package/dist/framework-mcp/src/tools/index.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/log_action.d.ts +2 -2
- package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/send_message.d.ts +2 -2
- package/dist/framework-mcp/src/tools/messaging/send_message.js +14 -1
- package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
- package/dist/framework-mcp/src/tools/observability/check_ports.d.ts +2 -2
- package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -1
- package/dist/framework-mcp/src/tools/quality/check_lint.d.ts +5 -0
- package/dist/framework-mcp/src/tools/quality/check_lint.js +29 -0
- package/dist/framework-mcp/src/tools/quality/check_lint.js.map +1 -0
- package/dist/framework-mcp/src/tools/search/get_gaps.d.ts +2 -2
- package/dist/framework-mcp/src/tools/search/get_gaps.js.map +1 -1
- package/dist/framework-mcp/src/tools/search/get_map.d.ts +2 -2
- package/dist/framework-mcp/src/tools/search/get_map.js +1 -1
- package/dist/framework-mcp/src/tools/search/get_map.js.map +1 -1
- package/dist/framework-mcp/src/tools/search/grep_search.d.ts +2 -2
- package/dist/framework-mcp/src/tools/search/grep_search.js +45 -28
- package/dist/framework-mcp/src/tools/search/grep_search.js.map +1 -1
- package/dist/framework-mcp/src/tools/search/list_dir.d.ts +2 -2
- package/dist/framework-mcp/src/tools/search/list_dir.js.map +1 -1
- package/dist/framework-mcp/src/tools/shell/run_command.d.ts +2 -0
- package/dist/framework-mcp/src/tools/shell/run_command.js +47 -0
- package/dist/framework-mcp/src/tools/shell/run_command.js.map +1 -0
- package/dist/framework-mcp/src/tools/types.d.ts +95 -28
- package/dist/framework-mcp/src/utils/metrics.d.ts +20 -0
- package/dist/framework-mcp/src/utils/metrics.js +24 -6
- package/dist/framework-mcp/src/utils/metrics.js.map +1 -1
- package/dist/framework-mcp/src/utils/security.d.ts +1 -3
- package/dist/framework-mcp/src/utils/security.js +21 -18
- package/dist/framework-mcp/src/utils/security.js.map +1 -1
- package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js +19 -14
- package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -1
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +1 -1
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -1
- package/dist/framework-mcp/tests/tools/quality/check_lint.test.d.ts +1 -0
- package/dist/framework-mcp/tests/tools/quality/check_lint.test.js +36 -0
- package/dist/framework-mcp/tests/tools/quality/check_lint.test.js.map +1 -0
- package/dist/framework-mcp/tests/tools/shell/run_command.test.d.ts +1 -0
- package/dist/framework-mcp/tests/tools/shell/run_command.test.js +43 -0
- package/dist/framework-mcp/tests/tools/shell/run_command.test.js.map +1 -0
- package/dist/src/cli/adapters/core.d.ts +1 -1
- package/dist/src/cli/adapters/core.js +4 -0
- package/dist/src/cli/adapters/core.js.map +1 -1
- package/dist/src/cli/adapters/index.d.ts +1 -0
- package/dist/src/cli/adapters/index.js +1 -0
- package/dist/src/cli/adapters/index.js.map +1 -1
- package/dist/src/cli/adapters/paths.d.ts +15 -0
- package/dist/src/cli/adapters/paths.js +101 -0
- package/dist/src/cli/adapters/paths.js.map +1 -0
- package/dist/src/cli/adapters/scaffold.d.ts +1 -1
- package/dist/src/cli/adapters/scaffold.js +10 -7
- package/dist/src/cli/adapters/scaffold.js.map +1 -1
- package/dist/src/cli/commands/check.js +15 -36
- package/dist/src/cli/commands/check.js.map +1 -1
- package/dist/src/cli/commands/dashboard/data-service.d.ts +8 -0
- package/dist/src/cli/commands/dashboard/data-service.js +37 -0
- package/dist/src/cli/commands/dashboard/data-service.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-core.d.ts +5 -2
- package/dist/src/cli/commands/init/scaffold-core.js +28 -6
- package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-standards.js +6 -1
- package/dist/src/cli/commands/init/scaffold-standards.js.map +1 -1
- package/dist/src/cli/commands/init.js +30 -6
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/orchestrate.d.ts +11 -6
- package/dist/src/cli/commands/orchestrate.js +148 -128
- package/dist/src/cli/commands/orchestrate.js.map +1 -1
- package/dist/src/cli/commands/plan.d.ts +3 -1
- package/dist/src/cli/commands/plan.js +79 -22
- package/dist/src/cli/commands/plan.js.map +1 -1
- package/dist/src/cli/index.js +11 -15
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/utils/compliance.js +0 -1
- package/dist/src/cli/utils/compliance.js.map +1 -1
- package/dist/src/cli/utils/config-schema.d.ts +7 -7
- package/dist/src/cli/utils/fs.js +1 -1
- package/dist/src/cli/utils/fs.js.map +1 -1
- package/dist/src/cli/utils/memory.d.ts +1 -1
- package/dist/src/cli/utils/memory.js +28 -8
- package/dist/src/cli/utils/memory.js.map +1 -1
- package/dist/src/cli/utils/pkg.d.ts +19 -0
- package/dist/src/cli/utils/pkg.js +29 -5
- package/dist/src/cli/utils/pkg.js.map +1 -1
- package/dist/src/modules/adapters/definitions.js +3 -3
- package/dist/src/modules/adapters/definitions.js.map +1 -1
- package/dist/src/modules/agents/definitions.js +2 -1
- package/dist/src/modules/agents/definitions.js.map +1 -1
- package/dist/src/modules/agents/registry/analyst.js +1 -1
- package/dist/src/modules/agents/registry/analyst.js.map +1 -1
- package/dist/src/modules/agents/registry/architect.js +1 -0
- package/dist/src/modules/agents/registry/architect.js.map +1 -1
- package/dist/src/modules/agents/registry/backend.js +7 -6
- package/dist/src/modules/agents/registry/backend.js.map +1 -1
- package/dist/src/modules/agents/registry/database.js +4 -3
- package/dist/src/modules/agents/registry/database.js.map +1 -1
- package/dist/src/modules/agents/registry/devops.js +1 -1
- package/dist/src/modules/agents/registry/devops.js.map +1 -1
- package/dist/src/modules/agents/registry/git.js +1 -1
- package/dist/src/modules/agents/registry/git.js.map +1 -1
- package/dist/src/modules/agents/registry/manager.js +3 -2
- package/dist/src/modules/agents/registry/manager.js.map +1 -1
- package/dist/src/modules/agents/registry/native.js +1 -1
- package/dist/src/modules/agents/registry/native.js.map +1 -1
- package/dist/src/modules/agents/registry/quality.js +1 -0
- package/dist/src/modules/agents/registry/quality.js.map +1 -1
- package/dist/src/modules/agents/registry/security.js +1 -0
- package/dist/src/modules/agents/registry/security.js.map +1 -1
- package/dist/src/shared/constants.d.ts +113 -0
- package/dist/src/shared/constants.js +178 -0
- package/dist/src/shared/constants.js.map +1 -0
- package/dist/tests/adapters/paths.test.d.ts +1 -0
- package/dist/tests/adapters/paths.test.js +63 -0
- package/dist/tests/adapters/paths.test.js.map +1 -0
- package/dist/tests/approve.test.js +5 -9
- package/dist/tests/approve.test.js.map +1 -1
- package/dist/tests/cli/init/unified_init.test.d.ts +1 -0
- package/dist/tests/cli/init/unified_init.test.js +47 -0
- package/dist/tests/cli/init/unified_init.test.js.map +1 -0
- package/dist/tests/fs-utils.test.js +1 -1
- package/dist/tests/fs-utils.test.js.map +1 -1
- package/dist/tests/memory-utils.test.js +1 -1
- package/dist/tests/memory-utils.test.js.map +1 -1
- package/dist/tests/shared/constants.test.d.ts +1 -0
- package/dist/tests/shared/constants.test.js +17 -0
- package/dist/tests/shared/constants.test.js.map +1 -0
- package/dist/tests/trace.test.js +2 -2
- package/dist/tests/trace.test.js.map +1 -1
- package/framework-mcp/dist/constants.js +64 -0
- package/framework-mcp/dist/index.js +109 -0
- package/framework-mcp/dist/tools/control_plane/locking.js +64 -0
- package/framework-mcp/dist/tools/control_plane/registry.js +34 -0
- package/framework-mcp/dist/tools/dashboard/start_dashboard.js +29 -0
- package/framework-mcp/dist/tools/definitions.js +300 -0
- package/framework-mcp/dist/tools/file_system/batch_surgical_edit.js +59 -0
- package/framework-mcp/dist/tools/file_system/patch_file.js +25 -0
- package/framework-mcp/dist/tools/file_system/read_file.js +51 -0
- package/framework-mcp/dist/tools/file_system/replace_text.js +43 -0
- package/framework-mcp/dist/tools/file_system/write_file.js +38 -0
- package/framework-mcp/dist/tools/framework/audit_deps.js +41 -0
- package/framework-mcp/dist/tools/framework/get_status.js +5 -0
- package/framework-mcp/dist/tools/framework/orchestrate.js +5 -0
- package/framework-mcp/dist/tools/framework/run_tests.js +25 -0
- package/framework-mcp/dist/tools/framework/update_contract_hash.js +5 -0
- package/framework-mcp/dist/tools/framework/update_memory.js +8 -0
- package/framework-mcp/dist/tools/index.js +62 -0
- package/framework-mcp/dist/tools/memory/get_insights.js +34 -0
- package/framework-mcp/dist/tools/memory/read_memory.js +28 -0
- package/framework-mcp/dist/tools/messaging/log_action.js +22 -0
- package/framework-mcp/dist/tools/messaging/send_message.js +87 -0
- package/framework-mcp/dist/tools/observability/check_ports.js +26 -0
- package/framework-mcp/dist/tools/observability/get_health.js +19 -0
- package/framework-mcp/dist/tools/quality/check_lint.js +28 -0
- package/framework-mcp/dist/tools/search/get_gaps.js +48 -0
- package/framework-mcp/dist/tools/search/get_map.js +43 -0
- package/framework-mcp/dist/tools/search/grep_search.js +76 -0
- package/framework-mcp/dist/tools/search/list_dir.js +28 -0
- package/framework-mcp/dist/tools/shell/run_command.js +46 -0
- package/framework-mcp/dist/tools/types.js +1 -0
- package/framework-mcp/dist/utils/cli.js +20 -0
- package/framework-mcp/dist/utils/compliance.js +29 -0
- package/framework-mcp/dist/utils/fs.js +44 -0
- package/framework-mcp/dist/utils/metrics.js +56 -0
- package/framework-mcp/dist/utils/security.js +60 -0
- package/framework-mcp/package.json +19 -0
- package/framework-mcp/src/constants.ts +78 -0
- package/framework-mcp/src/declarations.d.ts +17 -0
- package/framework-mcp/src/index.ts +132 -0
- package/framework-mcp/src/tools/control_plane/locking.ts +71 -0
- package/framework-mcp/src/tools/control_plane/registry.ts +38 -0
- package/framework-mcp/src/tools/dashboard/start_dashboard.ts +33 -0
- package/framework-mcp/src/tools/definitions.ts +302 -0
- package/framework-mcp/src/tools/file_system/batch_surgical_edit.ts +79 -0
- package/framework-mcp/src/tools/file_system/patch_file.ts +33 -0
- package/framework-mcp/src/tools/file_system/read_file.ts +58 -0
- package/framework-mcp/src/tools/file_system/replace_text.ts +52 -0
- package/framework-mcp/src/tools/file_system/write_file.ts +45 -0
- package/framework-mcp/src/tools/framework/audit_deps.ts +49 -0
- package/framework-mcp/src/tools/framework/get_status.ts +7 -0
- package/framework-mcp/src/tools/framework/orchestrate.ts +7 -0
- package/framework-mcp/src/tools/framework/run_tests.ts +28 -0
- package/framework-mcp/src/tools/framework/update_contract_hash.ts +7 -0
- package/framework-mcp/src/tools/framework/update_memory.ts +10 -0
- package/framework-mcp/src/tools/index.ts +66 -0
- package/framework-mcp/src/tools/memory/get_insights.ts +41 -0
- package/framework-mcp/src/tools/memory/read_memory.ts +31 -0
- package/framework-mcp/src/tools/messaging/log_action.ts +28 -0
- package/framework-mcp/src/tools/messaging/send_message.ts +89 -0
- package/framework-mcp/src/tools/observability/check_ports.ts +30 -0
- package/framework-mcp/src/tools/observability/get_health.ts +24 -0
- package/framework-mcp/src/tools/quality/check_lint.ts +33 -0
- package/framework-mcp/src/tools/search/get_gaps.ts +54 -0
- package/framework-mcp/src/tools/search/get_map.ts +48 -0
- package/framework-mcp/src/tools/search/grep_search.ts +76 -0
- package/framework-mcp/src/tools/search/list_dir.ts +34 -0
- package/framework-mcp/src/tools/shell/run_command.ts +56 -0
- package/framework-mcp/src/tools/types.ts +89 -0
- package/framework-mcp/src/utils/cli.ts +20 -0
- package/framework-mcp/src/utils/compliance.ts +37 -0
- package/framework-mcp/src/utils/fs.ts +45 -0
- package/framework-mcp/src/utils/metrics.ts +73 -0
- package/framework-mcp/src/utils/security.ts +66 -0
- package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +212 -0
- package/framework-mcp/tests/tools/messaging/send_message.test.ts +136 -0
- package/framework-mcp/tests/tools/quality/check_lint.test.ts +46 -0
- package/framework-mcp/tests/tools/shell/run_command.test.ts +55 -0
- package/framework-mcp/tsconfig.json +14 -0
- package/package.json +9 -7
- package/src/cli/adapters/core.ts +7 -1
- package/src/cli/adapters/index.ts +1 -0
- package/src/cli/adapters/paths.ts +134 -0
- package/src/cli/adapters/scaffold.ts +17 -7
- package/src/cli/commands/check.ts +16 -38
- package/src/cli/commands/dashboard/data-service.ts +48 -0
- package/src/cli/commands/init/scaffold-core.ts +45 -6
- package/src/cli/commands/init/scaffold-standards.ts +6 -1
- package/src/cli/commands/init.ts +32 -6
- package/src/cli/commands/orchestrate.ts +151 -127
- package/src/cli/commands/plan.ts +89 -23
- package/src/cli/index.ts +14 -19
- package/src/cli/utils/compliance.ts +8 -9
- package/src/cli/utils/fs.ts +1 -1
- package/src/cli/utils/memory.ts +32 -7
- package/src/cli/utils/pkg.ts +42 -13
- package/src/modules/adapters/definitions.ts +4 -3
- package/src/modules/agents/definitions.ts +2 -1
- package/src/modules/agents/registry/analyst.ts +1 -1
- package/src/modules/agents/registry/architect.ts +1 -0
- package/src/modules/agents/registry/backend.ts +7 -6
- package/src/modules/agents/registry/database.ts +4 -3
- package/src/modules/agents/registry/devops.ts +1 -1
- package/src/modules/agents/registry/git.ts +1 -1
- package/src/modules/agents/registry/manager.ts +3 -2
- package/src/modules/agents/registry/native.ts +1 -1
- package/src/modules/agents/registry/quality.ts +1 -0
- package/src/modules/agents/registry/security.ts +1 -0
- package/src/shared/constants.ts +212 -0
- package/templates/prompts/bug-fix-recipe.md +20 -0
- package/templates/prompts/contract-design-recipe.md +21 -0
- package/templates/prompts/db-management-recipe.md +25 -0
- package/templates/prompts/deployment-recipe.md +23 -0
- package/templates/prompts/new-feature-recipe.md +19 -0
- package/templates/prompts/performance-optimization-recipe.md +23 -0
- package/templates/prompts/pull-request-template.md +21 -0
- package/templates/prompts/refactoring-recipe.md +21 -0
- package/templates/prompts/security-audit-recipe.md +20 -0
- package/templates/standards/architecture-standards.md +23 -0
- package/templates/standards/auth-standards.md +125 -0
- package/templates/standards/crud-governance.md +21 -0
- package/templates/standards/deployment-standards.md +21 -0
- package/templates/standards/frontend-standards.md +37 -0
- package/templates/standards/github-actions-standards.md +43 -0
- package/templates/standards/i18n-standards.md +17 -0
- package/templates/standards/kysely-standards.md +47 -0
- package/templates/standards/llm-governance.md +15 -0
- package/templates/standards/logging-and-secrets.md +34 -0
- package/templates/standards/mobile-standards.md +23 -0
- package/templates/standards/observability-standards.md +15 -0
- package/templates/standards/performance-standards.md +15 -0
- package/templates/standards/pino-standards.md +46 -0
- package/templates/standards/playwright-standards.md +54 -0
- package/templates/standards/quality-standards.md +31 -0
- package/templates/standards/react-query-standards.md +72 -0
- package/templates/standards/react-router-standards.md +62 -0
- package/templates/standards/security-audit-standards.md +16 -0
- package/templates/standards/security-standards.md +21 -0
- package/templates/standards/swagger-standards.md +50 -0
- package/templates/standards/tailwind-standards.md +20 -0
- package/templates/standards/testing-standards.md +31 -0
- package/templates/standards/typeorm-standards.md +49 -0
- package/templates/standards/vitest-standards.md +110 -0
- package/bin/validate-agent-army.js +0 -148
- package/src/cli/commands/app.ts +0 -56
- package/src/cli/utils/app-backend.ts +0 -257
- package/src/cli/utils/app-docs.ts +0 -83
- package/src/cli/utils/app-frontend.ts +0 -263
- package/src/cli/utils/app-inferrer.ts +0 -63
- package/src/cli/utils/app-mobile.ts +0 -113
- package/src/cli/utils/app-types.ts +0 -248
- package/src/cli/utils/app.ts +0 -6
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { ensureDir, writeTextFile } from "./fs.js";
|
|
4
|
-
import { getConfiguredPaths, getMemoryPath, updateProjectMemory } from "./memory.js";
|
|
5
|
-
import type { AppSpec } from "./app-inferrer.js";
|
|
6
|
-
|
|
7
|
-
const targetDir = process.cwd();
|
|
8
|
-
|
|
9
|
-
export function updateProjectDocs(spec: AppSpec): void {
|
|
10
|
-
const pathsMap = getConfiguredPaths();
|
|
11
|
-
const docsDir = path.join(targetDir, pathsMap.docs);
|
|
12
|
-
const apiDir = path.join(docsDir, "api");
|
|
13
|
-
ensureDir(apiDir);
|
|
14
|
-
|
|
15
|
-
const architecture = [];
|
|
16
|
-
if (spec.platform === "full-stack" || spec.platform === "backend") {
|
|
17
|
-
architecture.push(`- \`${pathsMap.backend}\`: Fastify API`);
|
|
18
|
-
architecture.push(`- \`${pathsMap.backend}/src/types\`: Contract-first backend TypeScript types`);
|
|
19
|
-
}
|
|
20
|
-
if (spec.platform === "full-stack" || spec.platform === "web") {
|
|
21
|
-
architecture.push(`- \`${pathsMap.frontend}\`: React dashboard`);
|
|
22
|
-
}
|
|
23
|
-
if (spec.platform === "mobile") {
|
|
24
|
-
architecture.push(`- \`${pathsMap.mobile || "apps/mobile"}\`: Expo / React Native App`);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
writeTextFile(path.join(docsDir, "project-docs.md"), [
|
|
28
|
-
`# ${spec.title} Requirements`,
|
|
29
|
-
"",
|
|
30
|
-
"## Request",
|
|
31
|
-
"",
|
|
32
|
-
spec.rawDescription,
|
|
33
|
-
"",
|
|
34
|
-
"## Generated Scope",
|
|
35
|
-
"",
|
|
36
|
-
`- Platform: ${spec.platform}`,
|
|
37
|
-
`- Domain: ${spec.domain}`,
|
|
38
|
-
`- Auth: ${spec.modules.auth ? "yes" : "no"}`,
|
|
39
|
-
`- Users: ${spec.modules.users ? "yes" : "no"}`,
|
|
40
|
-
`- Roles: ${spec.modules.roles ? "yes" : "no"}`,
|
|
41
|
-
`- Reports: ${spec.modules.reports ? "yes" : "no"}`,
|
|
42
|
-
"",
|
|
43
|
-
"## Architecture",
|
|
44
|
-
"",
|
|
45
|
-
...architecture,
|
|
46
|
-
].join("\n"));
|
|
47
|
-
|
|
48
|
-
writeTextFile(path.join(apiDir, "README.md"), [
|
|
49
|
-
"# API Registry",
|
|
50
|
-
"",
|
|
51
|
-
"- `POST /api/v1/auth/login`",
|
|
52
|
-
"- `GET /api/v1/dashboard`",
|
|
53
|
-
"- `GET /api/v1/users`",
|
|
54
|
-
"- `GET /api/v1/roles`",
|
|
55
|
-
"- `GET /api/v1/customers`",
|
|
56
|
-
"- `GET /api/v1/reports`",
|
|
57
|
-
].join("\n"));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function updateMemoryForGeneratedApp(spec: AppSpec, traceId: string): void {
|
|
61
|
-
const memoryPath = getMemoryPath();
|
|
62
|
-
if (!fs.existsSync(memoryPath)) return;
|
|
63
|
-
|
|
64
|
-
const pathsMap = getConfiguredPaths();
|
|
65
|
-
const today = new Date().toISOString().split("T")[0];
|
|
66
|
-
|
|
67
|
-
const impactedFiles = [];
|
|
68
|
-
if (spec.platform === "full-stack" || spec.platform === "backend") impactedFiles.push(pathsMap.backend);
|
|
69
|
-
if (spec.platform === "full-stack" || spec.platform === "web") impactedFiles.push(pathsMap.frontend);
|
|
70
|
-
if (spec.platform === "mobile") impactedFiles.push(pathsMap.mobile || "apps/mobile");
|
|
71
|
-
impactedFiles.push("project docs");
|
|
72
|
-
|
|
73
|
-
const history = [
|
|
74
|
-
`### ${today} — Generated ${spec.title}`,
|
|
75
|
-
"",
|
|
76
|
-
"- **Agent:** @manager",
|
|
77
|
-
`- **Trace ID:** ${traceId}`,
|
|
78
|
-
`- **Action:** Created ${spec.platform} starter from natural language request.`,
|
|
79
|
-
`- **Files:** ${impactedFiles.join(", ")}`,
|
|
80
|
-
].join("\n");
|
|
81
|
-
|
|
82
|
-
updateProjectMemory("HISTORY", history);
|
|
83
|
-
}
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import type { AppSpec } from "./app-inferrer.js";
|
|
3
|
-
import { createBaseTypeFiles } from "./app-types.js";
|
|
4
|
-
import { writeJsonFile, writeTextFile } from "./fs.js";
|
|
5
|
-
import { getConfiguredPaths } from "./memory.js";
|
|
6
|
-
import { getDependencyVersions } from "./pkg.js";
|
|
7
|
-
|
|
8
|
-
const targetDir = process.cwd();
|
|
9
|
-
|
|
10
|
-
export function createWebFiles(spec: AppSpec): void {
|
|
11
|
-
const pathsMap = getConfiguredPaths();
|
|
12
|
-
const frontendDir = pathsMap.frontend;
|
|
13
|
-
const { "@vitejs/plugin-react": vitePluginReact, vite, react, "react-dom": reactDom, "lucide-react": lucideReact, "@types/react": typesReact, "@types/react-dom": typesReactDom, typescript, "vitest-frontend": vitest } = getDependencyVersions();
|
|
14
|
-
|
|
15
|
-
createBaseTypeFiles(path.join(targetDir, frontendDir, "src"));
|
|
16
|
-
writeJsonFile(path.join(targetDir, frontendDir, "package.json"), {
|
|
17
|
-
name: "@agent-enderun/web",
|
|
18
|
-
version: "0.1.0",
|
|
19
|
-
private: true,
|
|
20
|
-
type: "module",
|
|
21
|
-
scripts: {
|
|
22
|
-
dev: "vite --host 0.0.0.0",
|
|
23
|
-
build: "tsc -p tsconfig.json && vite build",
|
|
24
|
-
preview: "vite preview",
|
|
25
|
-
test: "vitest run",
|
|
26
|
-
},
|
|
27
|
-
dependencies: {
|
|
28
|
-
"@vitejs/plugin-react": vitePluginReact,
|
|
29
|
-
vite: vite,
|
|
30
|
-
react: react,
|
|
31
|
-
"react-dom": reactDom,
|
|
32
|
-
"lucide-react": lucideReact,
|
|
33
|
-
},
|
|
34
|
-
devDependencies: {
|
|
35
|
-
"@types/react": typesReact,
|
|
36
|
-
"@types/react-dom": typesReactDom,
|
|
37
|
-
typescript: typescript,
|
|
38
|
-
vitest: vitest,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
writeJsonFile(path.join(targetDir, frontendDir, "tsconfig.json"), {
|
|
43
|
-
extends: "../../tsconfig.json",
|
|
44
|
-
compilerOptions: {
|
|
45
|
-
jsx: "react-jsx",
|
|
46
|
-
module: "NodeNext",
|
|
47
|
-
moduleResolution: "NodeNext",
|
|
48
|
-
target: "ES2022",
|
|
49
|
-
strict: true,
|
|
50
|
-
skipLibCheck: true,
|
|
51
|
-
},
|
|
52
|
-
include: ["src/**/*.ts", "src/**/*.tsx"],
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
writeTextFile(path.join(targetDir, frontendDir, "index.html"), [
|
|
56
|
-
"<div id=\"root\"></div>",
|
|
57
|
-
"<script type=\"module\" src=\"/src/main.tsx\"></script>",
|
|
58
|
-
].join("\n"));
|
|
59
|
-
|
|
60
|
-
writeTextFile(path.join(targetDir, frontendDir, "src/main.tsx"), [
|
|
61
|
-
"import React from \"react\";",
|
|
62
|
-
"import { createRoot } from \"react-dom/client\";",
|
|
63
|
-
"import { App } from \"./App.js\";",
|
|
64
|
-
"import \"./styles.css\";",
|
|
65
|
-
"",
|
|
66
|
-
"createRoot(document.getElementById(\"root\") as HTMLElement).render(",
|
|
67
|
-
" <React.StrictMode>",
|
|
68
|
-
" <App />",
|
|
69
|
-
" </React.StrictMode>,",
|
|
70
|
-
");",
|
|
71
|
-
].join("\n"));
|
|
72
|
-
|
|
73
|
-
writeTextFile(path.join(targetDir, frontendDir, "src/App.tsx"), [
|
|
74
|
-
"import { BarChart3, ShieldCheck, UsersRound } from \"lucide-react\";",
|
|
75
|
-
"",
|
|
76
|
-
"const metrics = [",
|
|
77
|
-
" { label: \"Pipeline\", value: \"$261K\", tone: \"green\" },",
|
|
78
|
-
" { label: \"Active customers\", value: \"18\", tone: \"blue\" },",
|
|
79
|
-
" { label: \"At risk\", value: \"3\", tone: \"red\" },",
|
|
80
|
-
"];",
|
|
81
|
-
"",
|
|
82
|
-
"const customers = [",
|
|
83
|
-
" { name: \"Northwind\", status: \"Active\", owner: \"Sales Manager\", value: \"$125K\" },",
|
|
84
|
-
" { name: \"Acme Corp\", status: \"Lead\", owner: \"Sales Manager\", value: \"$82K\" },",
|
|
85
|
-
" { name: \"Globex\", status: \"At risk\", owner: \"Admin User\", value: \"$54K\" },",
|
|
86
|
-
"];",
|
|
87
|
-
"",
|
|
88
|
-
"export function App() {",
|
|
89
|
-
" return (",
|
|
90
|
-
" <main className=\"shell\">",
|
|
91
|
-
" <aside className=\"sidebar\" aria-label=\"Primary navigation\">",
|
|
92
|
-
" <div className=\"brand\">AE</div>",
|
|
93
|
-
" <nav>",
|
|
94
|
-
" <a className=\"active\" href=\"#dashboard\"><BarChart3 size={18} /> Dashboard</a>",
|
|
95
|
-
" <a href=\"#users\"><UsersRound size={18} /> Users</a>",
|
|
96
|
-
" <a href=\"#roles\"><ShieldCheck size={18} /> Roles</a>",
|
|
97
|
-
" </nav>",
|
|
98
|
-
" </aside>",
|
|
99
|
-
"",
|
|
100
|
-
" <section className=\"workspace\">",
|
|
101
|
-
" <header className=\"topbar\">",
|
|
102
|
-
" <div>",
|
|
103
|
-
" <p>{spec.domain}</p>",
|
|
104
|
-
" <h1>{spec.title}</h1>",
|
|
105
|
-
" </div>",
|
|
106
|
-
" <button type=\"button\">New customer</button>",
|
|
107
|
-
" </header>",
|
|
108
|
-
"",
|
|
109
|
-
" <section className=\"metrics\" aria-label=\"Report metrics\">",
|
|
110
|
-
" {metrics.map((metric) => (",
|
|
111
|
-
" <article className={`metric ${metric.tone}`} key={metric.label}>",
|
|
112
|
-
" <span>{metric.label}</span>",
|
|
113
|
-
" <strong>{metric.value}</strong>",
|
|
114
|
-
" </article>",
|
|
115
|
-
" ))}",
|
|
116
|
-
" </section>",
|
|
117
|
-
"",
|
|
118
|
-
" <section className=\"panel\">",
|
|
119
|
-
" <div>",
|
|
120
|
-
" <h2>Customers</h2>",
|
|
121
|
-
" <p>Ownership, value and status at a glance.</p>",
|
|
122
|
-
" </div>",
|
|
123
|
-
" <div className=\"table\">",
|
|
124
|
-
" {customers.map((customer) => (",
|
|
125
|
-
" <div className=\"row\" key={customer.name}>",
|
|
126
|
-
" <strong>{customer.name}</strong>",
|
|
127
|
-
" <span>{customer.status}</span>",
|
|
128
|
-
" <span>{customer.owner}</span>",
|
|
129
|
-
" <b>{customer.value}</b>",
|
|
130
|
-
" </div>",
|
|
131
|
-
" ))}",
|
|
132
|
-
" </div>",
|
|
133
|
-
" </section>",
|
|
134
|
-
" </section>",
|
|
135
|
-
" </main>",
|
|
136
|
-
" );",
|
|
137
|
-
"}",
|
|
138
|
-
].join("\n"));
|
|
139
|
-
|
|
140
|
-
writeTextFile(path.join(targetDir, frontendDir, "src/styles.css"), [
|
|
141
|
-
":root {",
|
|
142
|
-
" color: #172026;",
|
|
143
|
-
" background: #f4f7f6;",
|
|
144
|
-
" font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;",
|
|
145
|
-
"}",
|
|
146
|
-
"",
|
|
147
|
-
"* { box-sizing: border-box; }",
|
|
148
|
-
"body { margin: 0; }",
|
|
149
|
-
"button { font: inherit; }",
|
|
150
|
-
"",
|
|
151
|
-
".shell {",
|
|
152
|
-
" min-height: 100vh;",
|
|
153
|
-
" display: grid;",
|
|
154
|
-
" grid-template-columns: 240px 1fr;",
|
|
155
|
-
"}",
|
|
156
|
-
"",
|
|
157
|
-
".sidebar {",
|
|
158
|
-
" background: #102022;",
|
|
159
|
-
" color: #eef6f2;",
|
|
160
|
-
" padding: 24px;",
|
|
161
|
-
"}",
|
|
162
|
-
"",
|
|
163
|
-
".brand {",
|
|
164
|
-
" width: 40px;",
|
|
165
|
-
" height: 40px;",
|
|
166
|
-
" display: grid;",
|
|
167
|
-
" place-items: center;",
|
|
168
|
-
" background: #d8f36a;",
|
|
169
|
-
" color: #102022;",
|
|
170
|
-
" font-weight: 800;",
|
|
171
|
-
" border-radius: 8px;",
|
|
172
|
-
" margin-bottom: 32px;",
|
|
173
|
-
"}",
|
|
174
|
-
"",
|
|
175
|
-
"nav { display: grid; gap: 8px; }",
|
|
176
|
-
"nav a {",
|
|
177
|
-
" color: inherit;",
|
|
178
|
-
" text-decoration: none;",
|
|
179
|
-
" display: flex;",
|
|
180
|
-
" gap: 10px;",
|
|
181
|
-
" align-items: center;",
|
|
182
|
-
" padding: 10px 12px;",
|
|
183
|
-
" border-radius: 8px;",
|
|
184
|
-
"}",
|
|
185
|
-
"nav a.active, nav a:hover { background: rgba(255,255,255,0.12); }",
|
|
186
|
-
"",
|
|
187
|
-
".workspace { padding: 32px; }",
|
|
188
|
-
".topbar {",
|
|
189
|
-
" display: flex;",
|
|
190
|
-
" justify-content: space-between;",
|
|
191
|
-
" align-items: center;",
|
|
192
|
-
" gap: 24px;",
|
|
193
|
-
" margin-bottom: 24px;",
|
|
194
|
-
"}",
|
|
195
|
-
".topbar p { margin: 0 0 4px; color: #58666a; font-size: 14px; }",
|
|
196
|
-
".topbar h1 { margin: 0; font-size: 32px; letter-spacing: 0; }",
|
|
197
|
-
".topbar button {",
|
|
198
|
-
" border: 0;",
|
|
199
|
-
" border-radius: 8px;",
|
|
200
|
-
" background: #176b5d;",
|
|
201
|
-
" color: white;",
|
|
202
|
-
" padding: 10px 14px;",
|
|
203
|
-
"}",
|
|
204
|
-
"",
|
|
205
|
-
".metrics {",
|
|
206
|
-
" display: grid;",
|
|
207
|
-
" grid-template-columns: repeat(3, minmax(0, 1fr));",
|
|
208
|
-
" gap: 16px;",
|
|
209
|
-
" margin-bottom: 24px;",
|
|
210
|
-
"}",
|
|
211
|
-
".metric, .panel {",
|
|
212
|
-
" background: white;",
|
|
213
|
-
" border: 1px solid #d9e3e0;",
|
|
214
|
-
" border-radius: 8px;",
|
|
215
|
-
"}",
|
|
216
|
-
".metric { padding: 18px; }",
|
|
217
|
-
".metric span { display: block; color: #58666a; margin-bottom: 8px; }",
|
|
218
|
-
".metric strong { font-size: 28px; }",
|
|
219
|
-
".metric.green { border-top: 4px solid #49a078; }",
|
|
220
|
-
".metric.blue { border-top: 4px solid #3f7cac; }",
|
|
221
|
-
".metric.red { border-top: 4px solid #d95d39; }",
|
|
222
|
-
"",
|
|
223
|
-
".panel { padding: 20px; }",
|
|
224
|
-
".panel h2 { margin: 0 0 4px; font-size: 20px; }",
|
|
225
|
-
".panel p { margin: 0 0 18px; color: #58666a; }",
|
|
226
|
-
".table { display: grid; gap: 8px; }",
|
|
227
|
-
".row {",
|
|
228
|
-
" display: grid;",
|
|
229
|
-
" grid-template-columns: 1.4fr 0.8fr 1fr 0.6fr;",
|
|
230
|
-
" gap: 16px;",
|
|
231
|
-
" align-items: center;",
|
|
232
|
-
" padding: 12px;",
|
|
233
|
-
" border-radius: 8px;",
|
|
234
|
-
" background: #f7faf9;",
|
|
235
|
-
"}",
|
|
236
|
-
"",
|
|
237
|
-
"@media (max-width: 760px) {",
|
|
238
|
-
" .shell { grid-template-columns: 1fr; }",
|
|
239
|
-
" .sidebar { position: static; }",
|
|
240
|
-
" .metrics { grid-template-columns: 1fr; }",
|
|
241
|
-
" .topbar { align-items: flex-start; flex-direction: column; }",
|
|
242
|
-
" .row { grid-template-columns: 1fr; }",
|
|
243
|
-
"}",
|
|
244
|
-
].join("\n"));
|
|
245
|
-
|
|
246
|
-
writeTextFile(path.join(targetDir, frontendDir, ".env.example"), [
|
|
247
|
-
"# Agent Enderun - Web Environment Variables",
|
|
248
|
-
"VITE_API_URL=http://localhost:4000/api/v1",
|
|
249
|
-
"VITE_APP_TITLE=" + spec.title,
|
|
250
|
-
].join("\n"));
|
|
251
|
-
|
|
252
|
-
writeTextFile(path.join(targetDir, frontendDir, "README.md"), [
|
|
253
|
-
`# ${spec.title} Web`,
|
|
254
|
-
"",
|
|
255
|
-
"React dashboard generated by Agent Enderun.",
|
|
256
|
-
"",
|
|
257
|
-
"## Commands",
|
|
258
|
-
"",
|
|
259
|
-
"- `npm run dev` strings",
|
|
260
|
-
"- `npm run build` strings",
|
|
261
|
-
"- `npm run test` strings",
|
|
262
|
-
].join("\n"));
|
|
263
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { slugifyName, titleCase } from "./string.js";
|
|
2
|
-
|
|
3
|
-
export interface AppSpec {
|
|
4
|
-
rawDescription: string;
|
|
5
|
-
appName: string;
|
|
6
|
-
title: string;
|
|
7
|
-
domain: string;
|
|
8
|
-
platform: "web" | "mobile" | "backend" | "full-stack";
|
|
9
|
-
modules: {
|
|
10
|
-
auth: boolean;
|
|
11
|
-
users: boolean;
|
|
12
|
-
roles: boolean;
|
|
13
|
-
reports: boolean;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function inferAppSpec(description: string): AppSpec {
|
|
18
|
-
const normalized = String(description || "").toLowerCase();
|
|
19
|
-
const isCrm = /\bcrm\b|customer|musteri|müşteri/.test(normalized);
|
|
20
|
-
const hasAuth = /auth|login|giris|giriş|signin|sign in|user|kullanici|kullanıcı|role|rol/.test(normalized);
|
|
21
|
-
const hasRoles = /role|rol|permission|yetki|admin/.test(normalized);
|
|
22
|
-
const hasReports = /report|rapor|analytics|dashboard|chart|metric/.test(normalized);
|
|
23
|
-
const isMobile = /mobile|ios|android|react native|expo/.test(normalized);
|
|
24
|
-
const isBackend = /backend|api|server|fastify|express/.test(normalized);
|
|
25
|
-
const isWeb = /web|frontend|react|vite/.test(normalized);
|
|
26
|
-
const appName = isCrm ? "crm-dashboard" : slugifyName(description).split("-").slice(0, 4).join("-");
|
|
27
|
-
|
|
28
|
-
let platform: AppSpec["platform"] = "full-stack";
|
|
29
|
-
if (isMobile) platform = "mobile";
|
|
30
|
-
else if (isBackend && !isWeb) platform = "backend";
|
|
31
|
-
else if (isWeb && !isBackend) platform = "web";
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
rawDescription: description,
|
|
35
|
-
appName,
|
|
36
|
-
title: isCrm ? "CRM Dashboard" : titleCase(appName),
|
|
37
|
-
domain: isCrm ? "CRM" : "Business",
|
|
38
|
-
platform,
|
|
39
|
-
modules: {
|
|
40
|
-
auth: hasAuth || isCrm,
|
|
41
|
-
users: hasAuth || hasRoles || isCrm,
|
|
42
|
-
roles: hasRoles || isCrm,
|
|
43
|
-
reports: hasReports || isCrm,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export async function collectCreateAppDescription(args: string[]): Promise<string> {
|
|
49
|
-
const initial = args.join(" ").trim();
|
|
50
|
-
if (initial) return initial;
|
|
51
|
-
|
|
52
|
-
const readline = await import("readline/promises");
|
|
53
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
54
|
-
try {
|
|
55
|
-
const idea = await rl.question("What do you want to build? ");
|
|
56
|
-
const platform = await rl.question("Platform? (full-stack/web/backend/mobile) ");
|
|
57
|
-
const auth = await rl.question("Auth and roles? (yes/no) ");
|
|
58
|
-
const reports = await rl.question("Reports/dashboard? (yes/no) ");
|
|
59
|
-
return [idea, platform, auth.includes("y") ? "with auth and roles" : "", reports.includes("y") ? "with reports dashboard" : ""].filter(Boolean).join(" ");
|
|
60
|
-
} finally {
|
|
61
|
-
rl.close();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import type { AppSpec } from "./app-inferrer.js";
|
|
3
|
-
import { createBaseTypeFiles } from "./app-types.js";
|
|
4
|
-
import { writeJsonFile, writeTextFile } from "./fs.js";
|
|
5
|
-
import { getConfiguredPaths } from "./memory.js";
|
|
6
|
-
|
|
7
|
-
const targetDir = process.cwd();
|
|
8
|
-
|
|
9
|
-
export function createMobileFiles(spec: AppSpec): void {
|
|
10
|
-
const pathsMap = getConfiguredPaths();
|
|
11
|
-
// Defaulting mobile to apps/mobile if not configured
|
|
12
|
-
const mobileDir = pathsMap.mobile || "apps/mobile";
|
|
13
|
-
|
|
14
|
-
createBaseTypeFiles(path.join(targetDir, mobileDir, "src"));
|
|
15
|
-
|
|
16
|
-
writeJsonFile(path.join(targetDir, mobileDir, "package.json"), {
|
|
17
|
-
name: "@agent-enderun/mobile",
|
|
18
|
-
version: "0.1.0",
|
|
19
|
-
private: true,
|
|
20
|
-
scripts: {
|
|
21
|
-
"start": "expo start",
|
|
22
|
-
"android": "expo start --android",
|
|
23
|
-
"ios": "expo start --ios",
|
|
24
|
-
"web": "expo start --web"
|
|
25
|
-
},
|
|
26
|
-
dependencies: {
|
|
27
|
-
"expo": "~52.0.0",
|
|
28
|
-
"expo-status-bar": "~2.0.0",
|
|
29
|
-
"react": "18.3.1",
|
|
30
|
-
"react-native": "0.76.0",
|
|
31
|
-
"lucide-react-native": "^0.468.0"
|
|
32
|
-
},
|
|
33
|
-
devDependencies: {
|
|
34
|
-
"@babel/core": "^7.25.2",
|
|
35
|
-
"@types/react": "~18.3.12",
|
|
36
|
-
"typescript": "^5.3.3"
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
writeTextFile(path.join(targetDir, mobileDir, "App.tsx"), [
|
|
41
|
-
"import React from 'react';",
|
|
42
|
-
"import { StyleSheet, Text, View, SafeAreaView, ScrollView } from 'react-native';",
|
|
43
|
-
"import { StatusBar } from 'expo-status-bar';",
|
|
44
|
-
"import { BarChart3, Users, Shield } from 'lucide-react-native';",
|
|
45
|
-
"",
|
|
46
|
-
"export default function App() {",
|
|
47
|
-
" return (",
|
|
48
|
-
" <SafeAreaView style={styles.container}>",
|
|
49
|
-
" <StatusBar style=\"auto\" />",
|
|
50
|
-
" <View style={styles.header}>",
|
|
51
|
-
" <Text style={styles.subtitle}>{'" + spec.domain + "'}</Text>",
|
|
52
|
-
" <Text style={styles.title}>{'" + spec.title + "'}</Text>",
|
|
53
|
-
" </View>",
|
|
54
|
-
" <ScrollView style={styles.content}>",
|
|
55
|
-
" <View style={styles.metricRow}>",
|
|
56
|
-
" <View style={[styles.card, { borderLeftColor: '#49a078' }]}>",
|
|
57
|
-
" <BarChart3 color=\"#49a078\" size={20} />",
|
|
58
|
-
" <Text style={styles.cardLabel}>Pipeline</Text>",
|
|
59
|
-
" <Text style={styles.cardValue}>$261K</Text>",
|
|
60
|
-
" </View>",
|
|
61
|
-
" <View style={[styles.card, { borderLeftColor: '#3f7cac' }]}>",
|
|
62
|
-
" <Users color=\"#3f7cac\" size={20} />",
|
|
63
|
-
" <Text style={styles.cardLabel}>Customers</Text>",
|
|
64
|
-
" <Text style={styles.cardValue}>18</Text>",
|
|
65
|
-
" </View>",
|
|
66
|
-
" </View>",
|
|
67
|
-
" <View style={styles.panel}>",
|
|
68
|
-
" <Text style={styles.panelTitle}>Recent Activity</Text>",
|
|
69
|
-
" <View style={styles.row}>",
|
|
70
|
-
" <Text style={styles.rowText}>Northwind updated by Manager</Text>",
|
|
71
|
-
" </View>",
|
|
72
|
-
" <View style={styles.row}>",
|
|
73
|
-
" <Text style={styles.rowText}>Acme Corp status changed to Lead</Text>",
|
|
74
|
-
" </View>",
|
|
75
|
-
" </View>",
|
|
76
|
-
" </ScrollView>",
|
|
77
|
-
" </SafeAreaView>",
|
|
78
|
-
" );",
|
|
79
|
-
"}",
|
|
80
|
-
"",
|
|
81
|
-
"const styles = StyleSheet.create({",
|
|
82
|
-
" container: { flex: 1, backgroundColor: '#f4f7f6' },",
|
|
83
|
-
" header: { padding: 24, backgroundColor: '#fff', borderBottomWidth: 1, borderBottomColor: '#d9e3e0' },",
|
|
84
|
-
" subtitle: { fontSize: 14, color: '#58666a', marginBottom: 4 },",
|
|
85
|
-
" title: { fontSize: 28, fontWeight: '800', color: '#172026' },",
|
|
86
|
-
" content: { flex: 1, padding: 16 },",
|
|
87
|
-
" metricRow: { flexDirection: 'row', gap: 12, marginBottom: 16 },",
|
|
88
|
-
" card: { flex: 1, backgroundColor: '#fff', padding: 16, borderRadius: 12, borderLeftWidth: 4, elevation: 2, shadowColor: '#000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.1, shadowRadius: 2 },",
|
|
89
|
-
" cardLabel: { fontSize: 12, color: '#58666a', marginVertical: 4 },",
|
|
90
|
-
" cardValue: { fontSize: 20, fontWeight: '700', color: '#172026' },",
|
|
91
|
-
" panel: { backgroundColor: '#fff', padding: 16, borderRadius: 12, borderWidth: 1, borderColor: '#d9e3e0' },",
|
|
92
|
-
" panelTitle: { fontSize: 18, fontWeight: '700', color: '#172026', marginBottom: 12 },",
|
|
93
|
-
" row: { paddingVertical: 12, borderBottomWidth: 1, borderBottomColor: '#f0f4f3' },",
|
|
94
|
-
" rowText: { color: '#58666a' }",
|
|
95
|
-
"});"
|
|
96
|
-
].join("\n"));
|
|
97
|
-
|
|
98
|
-
writeTextFile(path.join(targetDir, mobileDir, ".env.example"), [
|
|
99
|
-
"# Agent Enderun - Mobile Environment Variables",
|
|
100
|
-
"EXPO_PUBLIC_API_URL=http://localhost:4000/api/v1",
|
|
101
|
-
"EXPO_PUBLIC_APP_VARIANT=development",
|
|
102
|
-
].join("\n"));
|
|
103
|
-
|
|
104
|
-
writeTextFile(path.join(targetDir, mobileDir, "README.md"), [
|
|
105
|
-
`# ${spec.title} Mobile`,
|
|
106
|
-
"",
|
|
107
|
-
"Expo / React Native app generated by Agent Enderun.",
|
|
108
|
-
"",
|
|
109
|
-
"## Commands",
|
|
110
|
-
"",
|
|
111
|
-
"- `npx expo start`",
|
|
112
|
-
].join("\n"));
|
|
113
|
-
}
|