@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102
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/dist/_virtual/rolldown_runtime.js +22 -1
- package/dist/adapters/ai.js +82 -1
- package/dist/adapters/factory.js +36 -1
- package/dist/adapters/fs.js +118 -1
- package/dist/adapters/git.js +54 -1
- package/dist/adapters/index.js +7 -1
- package/dist/adapters/logger.js +80 -1
- package/dist/adapters/watcher.js +69 -1
- package/dist/adapters/workspace.js +190 -2
- package/dist/ai/agents/claude-code-agent.js +146 -9
- package/dist/ai/agents/cursor-agent.js +286 -17
- package/dist/ai/agents/index.js +5 -1
- package/dist/ai/agents/openai-codex-agent.js +140 -8
- package/dist/ai/agents/orchestrator.js +142 -1
- package/dist/ai/agents/simple-agent.js +80 -4
- package/dist/ai/client.js +162 -1
- package/dist/ai/index.js +27 -1
- package/dist/ai/prompts/code-generation.js +55 -13
- package/dist/ai/prompts/index.js +12 -1
- package/dist/ai/prompts/spec-creation.js +61 -20
- package/dist/ai/providers.js +40 -1
- package/dist/formatters/index.js +18 -1
- package/dist/formatters/json.js +71 -1
- package/dist/formatters/sarif.js +163 -1
- package/dist/formatters/text.js +208 -2
- package/dist/index.js +81 -1
- package/dist/libs/ai-providers/dist/factory.js +154 -1
- package/dist/libs/ai-providers/dist/index.js +4 -1
- package/dist/libs/ai-providers/dist/legacy.js +72 -1
- package/dist/libs/ai-providers/dist/models.js +287 -1
- package/dist/libs/ai-providers/dist/validation.js +1 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/libs/contracts/dist/client/index.js +5 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
- package/dist/libs/contracts/dist/client/react/index.js +4 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/libs/contracts/dist/docs/index.js +29 -1
- package/dist/libs/contracts/dist/docs/presentations.js +71 -1
- package/dist/libs/contracts/dist/docs/registry.js +44 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/libs/contracts/dist/events.js +8 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/libs/contracts/dist/index.js +72 -1
- package/dist/libs/contracts/dist/install.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
- package/dist/libs/contracts/dist/integrations/index.js +18 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/libs/contracts/dist/jsonschema.js +24 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/libs/contracts/dist/knowledge/index.js +7 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/libs/contracts/dist/llm/exporters.js +352 -4
- package/dist/libs/contracts/dist/llm/index.js +2 -1
- package/dist/libs/contracts/dist/llm/prompts.js +143 -7
- package/dist/libs/contracts/dist/onboarding-base.js +196 -1
- package/dist/libs/contracts/dist/openapi.js +75 -1
- package/dist/libs/contracts/dist/ownership.js +21 -1
- package/dist/libs/contracts/dist/presentations.js +1 -1
- package/dist/libs/contracts/dist/presentations.v2.js +11 -1
- package/dist/libs/contracts/dist/prompt.js +1 -1
- package/dist/libs/contracts/dist/promptRegistry.js +1 -1
- package/dist/libs/contracts/dist/regenerator/index.js +2 -1
- package/dist/libs/contracts/dist/regenerator/service.js +92 -1
- package/dist/libs/contracts/dist/regenerator/utils.js +51 -1
- package/dist/libs/contracts/dist/registry.js +208 -1
- package/dist/libs/contracts/dist/resources.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/libs/contracts/dist/server/index.js +8 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/libs/contracts/dist/server/rest-express.js +1 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/libs/contracts/dist/spec.js +35 -1
- package/dist/libs/contracts/dist/telemetry/index.js +1 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/libs/contracts/dist/tests/index.js +1 -1
- package/dist/libs/contracts/dist/tests/runner.js +150 -1
- package/dist/libs/contracts/dist/workflow/index.js +1 -1
- package/dist/libs/contracts/dist/workflow/runner.js +1 -1
- package/dist/libs/contracts-transformers/dist/common/utils.js +47 -1
- package/dist/libs/contracts-transformers/dist/openapi/exporter.js +1 -1
- package/dist/libs/contracts-transformers/dist/openapi/importer.js +255 -2
- package/dist/libs/contracts-transformers/dist/openapi/index.js +4 -1
- package/dist/libs/contracts-transformers/dist/openapi/parser.js +231 -1
- package/dist/libs/contracts-transformers/dist/openapi/schema-converter.js +201 -4
- package/dist/modules/contractspec-workspace/dist/ai/code-generation.js +50 -13
- package/dist/modules/contractspec-workspace/dist/ai/spec-creation.js +50 -18
- package/dist/modules/contractspec-workspace/dist/analysis/deps/graph.js +84 -2
- package/dist/modules/contractspec-workspace/dist/analysis/deps/parse-imports.js +30 -1
- package/dist/modules/contractspec-workspace/dist/analysis/diff/semantic.js +96 -1
- package/dist/modules/contractspec-workspace/dist/analysis/feature-scan.js +151 -1
- package/dist/modules/contractspec-workspace/dist/analysis/spec-scan.js +344 -1
- package/dist/modules/contractspec-workspace/dist/analysis/validate/spec-structure.js +122 -1
- package/dist/modules/contractspec-workspace/dist/templates/app-config.js +100 -28
- package/dist/modules/contractspec-workspace/dist/templates/data-view.js +41 -27
- package/dist/modules/contractspec-workspace/dist/templates/event.js +28 -14
- package/dist/modules/contractspec-workspace/dist/templates/experiment.js +76 -51
- package/dist/modules/contractspec-workspace/dist/templates/handler.js +49 -17
- package/dist/modules/contractspec-workspace/dist/templates/integration-utils.js +97 -26
- package/dist/modules/contractspec-workspace/dist/templates/integration.js +46 -23
- package/dist/modules/contractspec-workspace/dist/templates/knowledge.js +59 -19
- package/dist/modules/contractspec-workspace/dist/templates/migration.js +49 -26
- package/dist/modules/contractspec-workspace/dist/templates/operation.js +40 -28
- package/dist/modules/contractspec-workspace/dist/templates/presentation.js +45 -20
- package/dist/modules/contractspec-workspace/dist/templates/telemetry.js +73 -53
- package/dist/modules/contractspec-workspace/dist/templates/utils.js +38 -1
- package/dist/modules/contractspec-workspace/dist/templates/workflow-runner.js +12 -6
- package/dist/modules/contractspec-workspace/dist/templates/workflow.js +50 -24
- package/dist/modules/contractspec-workspace/dist/types/generation-types.js +20 -1
- package/dist/services/agent-guide/adapters/claude-code.js +144 -3
- package/dist/services/agent-guide/adapters/cursor-cli.js +135 -3
- package/dist/services/agent-guide/adapters/generic-mcp.js +159 -3
- package/dist/services/agent-guide/adapters/index.js +30 -1
- package/dist/services/agent-guide/agent-guide-service.js +148 -1
- package/dist/services/agent-guide/index.js +5 -1
- package/dist/services/build.js +140 -1
- package/dist/services/ci-check/ci-check-service.js +393 -1
- package/dist/services/ci-check/index.js +2 -1
- package/dist/services/ci-check/types.js +28 -1
- package/dist/services/clean.js +71 -1
- package/dist/services/config.js +76 -1
- package/dist/services/deps.js +62 -1
- package/dist/services/diff.js +33 -1
- package/dist/services/doctor/checks/ai.js +118 -2
- package/dist/services/doctor/checks/cli.js +146 -1
- package/dist/services/doctor/checks/config.js +170 -1
- package/dist/services/doctor/checks/deps.js +180 -1
- package/dist/services/doctor/checks/index.js +6 -1
- package/dist/services/doctor/checks/mcp.js +144 -1
- package/dist/services/doctor/checks/workspace.js +243 -1
- package/dist/services/doctor/doctor-service.js +115 -2
- package/dist/services/doctor/index.js +2 -1
- package/dist/services/doctor/types.js +26 -1
- package/dist/services/implementation/discovery.js +143 -2
- package/dist/services/implementation/index.js +2 -1
- package/dist/services/implementation/resolver.js +223 -1
- package/dist/services/index.js +53 -1
- package/dist/services/integrity-diagram.js +274 -6
- package/dist/services/integrity.js +272 -1
- package/dist/services/list.js +35 -1
- package/dist/services/openapi/export-service.js +51 -2
- package/dist/services/openapi/import-service.js +75 -1
- package/dist/services/openapi/index.js +4 -1
- package/dist/services/openapi/sync-service.js +121 -1
- package/dist/services/openapi/validate-service.js +130 -1
- package/dist/services/regenerator.js +23 -1
- package/dist/services/registry.js +73 -1
- package/dist/services/setup/config-generators.js +113 -26
- package/dist/services/setup/file-merger.js +60 -2
- package/dist/services/setup/index.js +4 -1
- package/dist/services/setup/setup-service.js +95 -1
- package/dist/services/setup/targets/agents-md.js +46 -1
- package/dist/services/setup/targets/cli-config.js +59 -1
- package/dist/services/setup/targets/cursor-rules.js +47 -1
- package/dist/services/setup/targets/mcp-claude.js +59 -1
- package/dist/services/setup/targets/mcp-cursor.js +58 -1
- package/dist/services/setup/targets/vscode-settings.js +62 -1
- package/dist/services/setup/types.js +26 -1
- package/dist/services/sync.js +62 -1
- package/dist/services/test.js +30 -1
- package/dist/services/validate-implementation.js +69 -1
- package/dist/services/validate.js +47 -1
- package/dist/services/verification-cache/adapters/filesystem.js +121 -1
- package/dist/services/verification-cache/adapters/in-memory.js +45 -1
- package/dist/services/verification-cache/adapters/index.js +3 -1
- package/dist/services/verification-cache/adapters/workspace-state.js +90 -1
- package/dist/services/verification-cache/cache-service.js +255 -1
- package/dist/services/verification-cache/index.js +6 -1
- package/dist/services/verification-cache/types.js +15 -1
- package/dist/services/verify/ai-verifier.js +336 -9
- package/dist/services/verify/behavior-verifier.js +185 -1
- package/dist/services/verify/index.js +4 -1
- package/dist/services/verify/structure-verifier.js +195 -2
- package/dist/services/verify/verify-service.js +203 -3
- package/dist/services/watch.js +31 -1
- package/dist/services/workspace-info.js +102 -2
- package/dist/templates/app-config.template.js +101 -28
- package/dist/templates/data-view.template.js +42 -27
- package/dist/templates/event.template.js +29 -14
- package/dist/templates/experiment.template.js +77 -51
- package/dist/templates/handler.template.js +53 -17
- package/dist/templates/index.js +36 -1
- package/dist/templates/integration.template.js +134 -50
- package/dist/templates/knowledge.template.js +62 -21
- package/dist/templates/migration.template.js +50 -26
- package/dist/templates/operation.template.js +44 -28
- package/dist/templates/presentation.template.js +46 -20
- package/dist/templates/telemetry.template.js +74 -53
- package/dist/templates/workflow-runner.template.js +12 -6
- package/dist/templates/workflow.template.js +51 -24
- package/package.json +13 -9
|
@@ -1,14 +1,70 @@
|
|
|
1
|
-
import{openai
|
|
1
|
+
import { openai } from "@ai-sdk/openai";
|
|
2
|
+
import { generateText } from "ai";
|
|
3
|
+
|
|
4
|
+
//#region src/ai/agents/openai-codex-agent.ts
|
|
5
|
+
/**
|
|
6
|
+
* OpenAI Codex Agent - Uses OpenAI's code-optimized models
|
|
7
|
+
* Supports GPT-4o and o1 reasoning models for complex code generation
|
|
8
|
+
*/
|
|
9
|
+
var OpenAICodexAgent = class {
|
|
10
|
+
name = "openai-codex";
|
|
11
|
+
apiKey;
|
|
12
|
+
constructor() {
|
|
13
|
+
this.apiKey = process.env.OPENAI_API_KEY;
|
|
14
|
+
}
|
|
15
|
+
canHandle(task) {
|
|
16
|
+
return !!this.apiKey;
|
|
17
|
+
}
|
|
18
|
+
async generate(task) {
|
|
19
|
+
if (!this.apiKey) return {
|
|
20
|
+
success: false,
|
|
21
|
+
errors: ["OPENAI_API_KEY not set. OpenAI Codex agent requires API access."]
|
|
22
|
+
};
|
|
23
|
+
try {
|
|
24
|
+
const modelName = this.isComplexTask(task) ? "o1" : "gpt-4o";
|
|
25
|
+
const model = openai(modelName);
|
|
26
|
+
const systemPrompt = this.buildSystemPrompt(task);
|
|
27
|
+
const result = await generateText({
|
|
28
|
+
model,
|
|
29
|
+
prompt: this.buildUserPrompt(task),
|
|
30
|
+
system: systemPrompt,
|
|
31
|
+
temperature: .2
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
success: true,
|
|
35
|
+
code: this.extractCode(result.text),
|
|
36
|
+
metadata: {
|
|
37
|
+
model: modelName,
|
|
38
|
+
agentMode: "openai-codex",
|
|
39
|
+
usage: result.usage
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return {
|
|
44
|
+
success: false,
|
|
45
|
+
errors: [error instanceof Error ? error.message : String(error)]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async validate(task) {
|
|
50
|
+
if (!this.apiKey) return {
|
|
51
|
+
success: false,
|
|
52
|
+
errors: ["OPENAI_API_KEY not set"]
|
|
53
|
+
};
|
|
54
|
+
try {
|
|
55
|
+
const result = await generateText({
|
|
56
|
+
model: openai("gpt-4o"),
|
|
57
|
+
prompt: `
|
|
2
58
|
Review this code implementation against its specification.
|
|
3
59
|
|
|
4
60
|
SPECIFICATION:
|
|
5
61
|
\`\`\`typescript
|
|
6
|
-
${
|
|
62
|
+
${task.specCode}
|
|
7
63
|
\`\`\`
|
|
8
64
|
|
|
9
65
|
IMPLEMENTATION:
|
|
10
66
|
\`\`\`typescript
|
|
11
|
-
${
|
|
67
|
+
${task.existingCode || "// No implementation"}
|
|
12
68
|
\`\`\`
|
|
13
69
|
|
|
14
70
|
Provide a detailed validation report including:
|
|
@@ -18,7 +74,42 @@ Provide a detailed validation report including:
|
|
|
18
74
|
4. Recommendations for improvement
|
|
19
75
|
|
|
20
76
|
Format as a structured report.
|
|
21
|
-
`,
|
|
77
|
+
`,
|
|
78
|
+
system: "You are a senior software engineer performing thorough code review.",
|
|
79
|
+
temperature: .3
|
|
80
|
+
});
|
|
81
|
+
const hasIssues = this.detectIssues(result.text);
|
|
82
|
+
return {
|
|
83
|
+
success: !hasIssues,
|
|
84
|
+
code: result.text,
|
|
85
|
+
errors: hasIssues ? this.extractErrors(result.text) : [],
|
|
86
|
+
warnings: this.extractWarnings(result.text),
|
|
87
|
+
metadata: {
|
|
88
|
+
agentMode: "openai-codex",
|
|
89
|
+
validationType: "ai-review"
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
} catch (error) {
|
|
93
|
+
return {
|
|
94
|
+
success: false,
|
|
95
|
+
errors: [error instanceof Error ? error.message : String(error)]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
isComplexTask(task) {
|
|
100
|
+
const complexIndicators = [
|
|
101
|
+
"algorithm",
|
|
102
|
+
"optimization",
|
|
103
|
+
"complex logic",
|
|
104
|
+
"state management",
|
|
105
|
+
"concurrent",
|
|
106
|
+
"distributed"
|
|
107
|
+
];
|
|
108
|
+
const taskStr = (task.specCode + (task.existingCode || "")).toLowerCase();
|
|
109
|
+
return complexIndicators.some((indicator) => taskStr.includes(indicator));
|
|
110
|
+
}
|
|
111
|
+
buildSystemPrompt(task) {
|
|
112
|
+
const basePrompt = `You are an expert TypeScript/JavaScript developer.
|
|
22
113
|
|
|
23
114
|
Generate production-quality code that is:
|
|
24
115
|
- Type-safe and well-typed
|
|
@@ -27,8 +118,49 @@ Generate production-quality code that is:
|
|
|
27
118
|
- Properly handling errors and edge cases
|
|
28
119
|
- Testable and maintainable
|
|
29
120
|
|
|
30
|
-
Output only the code without explanations unless specifically asked.`;
|
|
121
|
+
Output only the code without explanations unless specifically asked.`;
|
|
122
|
+
if (task.type === "test") return basePrompt + "\n\nGenerate comprehensive test suites using Vitest.";
|
|
123
|
+
return basePrompt;
|
|
124
|
+
}
|
|
125
|
+
buildUserPrompt(task) {
|
|
126
|
+
switch (task.type) {
|
|
127
|
+
case "generate": return `Implement this specification:\n\n${task.specCode}\n\nProvide complete, production-ready TypeScript code.`;
|
|
128
|
+
case "test": return `Create comprehensive tests:\n\nSpec:\n${task.specCode}\n\nImplementation:\n${task.existingCode}\n\nGenerate complete Vitest test suite.`;
|
|
129
|
+
case "refactor": return `Refactor this code while maintaining functionality:\n\n${task.existingCode}\n\nSpec:\n${task.specCode}`;
|
|
130
|
+
default: return task.specCode;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
extractCode(text) {
|
|
134
|
+
const match = text.match(/```(?:typescript|ts|tsx|javascript|js)?\n([\s\S]*?)\n```/);
|
|
135
|
+
return match && match[1] ? match[1] : text;
|
|
136
|
+
}
|
|
137
|
+
detectIssues(text) {
|
|
138
|
+
const issueKeywords = [
|
|
139
|
+
"issue",
|
|
140
|
+
"problem",
|
|
141
|
+
"bug",
|
|
142
|
+
"error",
|
|
143
|
+
"incorrect",
|
|
144
|
+
"missing",
|
|
145
|
+
"fails",
|
|
146
|
+
"violation"
|
|
147
|
+
];
|
|
148
|
+
const lower = text.toLowerCase();
|
|
149
|
+
return issueKeywords.some((keyword) => lower.includes(keyword));
|
|
150
|
+
}
|
|
151
|
+
extractErrors(text) {
|
|
152
|
+
const errors = [];
|
|
153
|
+
const lines = text.split("\n");
|
|
154
|
+
for (const line of lines) if (line.toLowerCase().includes("error") || line.toLowerCase().includes("bug") || line.toLowerCase().includes("fails")) errors.push(line.trim());
|
|
155
|
+
return errors;
|
|
156
|
+
}
|
|
157
|
+
extractWarnings(text) {
|
|
158
|
+
const warnings = [];
|
|
159
|
+
const lines = text.split("\n");
|
|
160
|
+
for (const line of lines) if (line.toLowerCase().includes("warning") || line.toLowerCase().includes("should") || line.toLowerCase().includes("consider")) warnings.push(line.trim());
|
|
161
|
+
return warnings;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
31
164
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`);for(let e of n)(e.toLowerCase().includes(`warning`)||e.toLowerCase().includes(`should`)||e.toLowerCase().includes(`consider`))&&t.push(e.trim());return t}};export{n as OpenAICodexAgent};
|
|
165
|
+
//#endregion
|
|
166
|
+
export { OpenAICodexAgent };
|
|
@@ -1 +1,142 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SimpleAgent } from "./simple-agent.js";
|
|
2
|
+
import { CursorAgent } from "./cursor-agent.js";
|
|
3
|
+
import { ClaudeCodeAgent } from "./claude-code-agent.js";
|
|
4
|
+
import { OpenAICodexAgent } from "./openai-codex-agent.js";
|
|
5
|
+
import chalk from "chalk";
|
|
6
|
+
import ora from "ora";
|
|
7
|
+
|
|
8
|
+
//#region src/ai/agents/orchestrator.ts
|
|
9
|
+
/**
|
|
10
|
+
* Agent Orchestrator - Coordinates between different AI agents
|
|
11
|
+
* Selects the appropriate agent based on config and task requirements
|
|
12
|
+
*/
|
|
13
|
+
var AgentOrchestrator = class {
|
|
14
|
+
agents;
|
|
15
|
+
defaultAgent;
|
|
16
|
+
constructor(config) {
|
|
17
|
+
this.config = config;
|
|
18
|
+
this.agents = /* @__PURE__ */ new Map();
|
|
19
|
+
const simpleAgent = new SimpleAgent(config);
|
|
20
|
+
const cursorAgent = new CursorAgent();
|
|
21
|
+
const claudeAgent = new ClaudeCodeAgent();
|
|
22
|
+
const openaiAgent = new OpenAICodexAgent();
|
|
23
|
+
this.agents.set("simple", simpleAgent);
|
|
24
|
+
this.agents.set("cursor", cursorAgent);
|
|
25
|
+
this.agents.set("claude-code", claudeAgent);
|
|
26
|
+
this.agents.set("openai-codex", openaiAgent);
|
|
27
|
+
this.defaultAgent = simpleAgent;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Execute a task using the configured agent with fallback support
|
|
31
|
+
*/
|
|
32
|
+
async executeTask(task) {
|
|
33
|
+
const agentMode = this.getAgentMode();
|
|
34
|
+
const agent = this.agents.get(agentMode);
|
|
35
|
+
if (!agent) {
|
|
36
|
+
console.log(chalk.yellow(`⚠️ Agent '${agentMode}' not found, using simple agent`));
|
|
37
|
+
return this.defaultAgent.generate(task);
|
|
38
|
+
}
|
|
39
|
+
if (!agent.canHandle(task)) {
|
|
40
|
+
console.log(chalk.yellow(`⚠️ Agent '${agentMode}' cannot handle this task, falling back to simple agent`));
|
|
41
|
+
return this.defaultAgent.generate(task);
|
|
42
|
+
}
|
|
43
|
+
const spinner = ora(`Executing with ${agentMode} agent...`).start();
|
|
44
|
+
try {
|
|
45
|
+
const result = task.type === "validate" ? await agent.validate(task) : await agent.generate(task);
|
|
46
|
+
if (result.success) {
|
|
47
|
+
spinner.succeed(chalk.green(`${agentMode} agent completed successfully`));
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
spinner.warn(chalk.yellow(`${agentMode} agent failed, trying fallback...`));
|
|
51
|
+
const fallbackMode = this.getFallbackMode(agentMode);
|
|
52
|
+
if (fallbackMode && fallbackMode !== agentMode) {
|
|
53
|
+
const fallbackAgent = this.agents.get(fallbackMode);
|
|
54
|
+
if (fallbackAgent && fallbackAgent.canHandle(task)) return task.type === "validate" ? await fallbackAgent.validate(task) : await fallbackAgent.generate(task);
|
|
55
|
+
}
|
|
56
|
+
spinner.info(chalk.gray("Using simple agent as ultimate fallback"));
|
|
57
|
+
return task.type === "validate" ? await this.defaultAgent.validate(task) : await this.defaultAgent.generate(task);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
spinner.fail(chalk.red("Agent execution failed"));
|
|
60
|
+
console.log(chalk.gray("Falling back to simple agent..."));
|
|
61
|
+
return task.type === "validate" ? await this.defaultAgent.validate(task) : await this.defaultAgent.generate(task);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Generate code from specification
|
|
66
|
+
*/
|
|
67
|
+
async generate(specCode, targetPath) {
|
|
68
|
+
return this.executeTask({
|
|
69
|
+
type: "generate",
|
|
70
|
+
specCode,
|
|
71
|
+
targetPath
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Generate tests for implementation
|
|
76
|
+
*/
|
|
77
|
+
async generateTests(specCode, implementationCode) {
|
|
78
|
+
return this.executeTask({
|
|
79
|
+
type: "test",
|
|
80
|
+
specCode,
|
|
81
|
+
existingCode: implementationCode
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Validate implementation against specification
|
|
86
|
+
*/
|
|
87
|
+
async validate(specCode, implementationCode) {
|
|
88
|
+
return this.executeTask({
|
|
89
|
+
type: "validate",
|
|
90
|
+
specCode,
|
|
91
|
+
existingCode: implementationCode
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Refactor existing code
|
|
96
|
+
*/
|
|
97
|
+
async refactor(specCode, existingCode) {
|
|
98
|
+
return this.executeTask({
|
|
99
|
+
type: "refactor",
|
|
100
|
+
specCode,
|
|
101
|
+
existingCode
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* List available agents and their status
|
|
106
|
+
*/
|
|
107
|
+
async getAvailableAgents() {
|
|
108
|
+
const results = [];
|
|
109
|
+
for (const [mode, agent] of this.agents) {
|
|
110
|
+
const canHandle = agent.canHandle({
|
|
111
|
+
type: "generate",
|
|
112
|
+
specCode: "test"
|
|
113
|
+
});
|
|
114
|
+
results.push({
|
|
115
|
+
mode,
|
|
116
|
+
available: canHandle,
|
|
117
|
+
reason: canHandle ? void 0 : "Not configured or dependencies missing"
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return results;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Get the configured agent mode
|
|
124
|
+
*/
|
|
125
|
+
getAgentMode() {
|
|
126
|
+
return this.config.agentMode || "simple";
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get fallback mode for an agent
|
|
130
|
+
*/
|
|
131
|
+
getFallbackMode(mode) {
|
|
132
|
+
return {
|
|
133
|
+
cursor: "claude-code",
|
|
134
|
+
"claude-code": "openai-codex",
|
|
135
|
+
"openai-codex": "simple",
|
|
136
|
+
simple: "simple"
|
|
137
|
+
}[mode];
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
export { AgentOrchestrator };
|
|
@@ -1,15 +1,91 @@
|
|
|
1
|
-
import{getAIProvider
|
|
1
|
+
import { getAIProvider } from "../providers.js";
|
|
2
|
+
import { buildComponentPrompt, buildFormPrompt, buildHandlerPrompt, buildTestPrompt, getCodeGenSystemPrompt } from "../prompts/code-generation.js";
|
|
3
|
+
import { generateText } from "ai";
|
|
4
|
+
|
|
5
|
+
//#region src/ai/agents/simple-agent.ts
|
|
6
|
+
/**
|
|
7
|
+
* Simple LLM-based agent using direct API calls
|
|
8
|
+
* This is the default fallback for basic code generation
|
|
9
|
+
*/
|
|
10
|
+
var SimpleAgent = class {
|
|
11
|
+
name = "simple";
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this.config = config;
|
|
14
|
+
}
|
|
15
|
+
canHandle(task) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
async generate(task) {
|
|
19
|
+
try {
|
|
20
|
+
const result = await generateText({
|
|
21
|
+
model: getAIProvider(this.config),
|
|
22
|
+
prompt: this.buildPrompt(task),
|
|
23
|
+
system: getCodeGenSystemPrompt()
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
success: true,
|
|
27
|
+
code: result.text,
|
|
28
|
+
metadata: {
|
|
29
|
+
model: this.config.aiModel,
|
|
30
|
+
provider: this.config.aiProvider,
|
|
31
|
+
tokens: result.usage
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return {
|
|
36
|
+
success: false,
|
|
37
|
+
errors: [error instanceof Error ? error.message : String(error)]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async validate(task) {
|
|
42
|
+
try {
|
|
43
|
+
const result = await generateText({
|
|
44
|
+
model: getAIProvider(this.config),
|
|
45
|
+
prompt: `
|
|
2
46
|
Review the following implementation against its specification.
|
|
3
47
|
|
|
4
48
|
Specification:
|
|
5
|
-
${
|
|
49
|
+
${task.specCode}
|
|
6
50
|
|
|
7
51
|
Implementation:
|
|
8
|
-
${
|
|
52
|
+
${task.existingCode || "// No implementation provided"}
|
|
9
53
|
|
|
10
54
|
Provide a detailed validation report:
|
|
11
55
|
1. Does the implementation match the spec?
|
|
12
56
|
2. Are there any missing features?
|
|
13
57
|
3. Are there any bugs or issues?
|
|
14
58
|
4. Suggestions for improvement
|
|
15
|
-
`,
|
|
59
|
+
`,
|
|
60
|
+
system: "You are a code review expert. Provide thorough, constructive feedback."
|
|
61
|
+
});
|
|
62
|
+
const hasErrors = result.text.toLowerCase().includes("error") || result.text.toLowerCase().includes("missing") || result.text.toLowerCase().includes("incorrect");
|
|
63
|
+
return {
|
|
64
|
+
success: !hasErrors,
|
|
65
|
+
code: result.text,
|
|
66
|
+
warnings: hasErrors ? ["Implementation may not match specification"] : [],
|
|
67
|
+
metadata: { validationType: "simple-llm" }
|
|
68
|
+
};
|
|
69
|
+
} catch (error) {
|
|
70
|
+
return {
|
|
71
|
+
success: false,
|
|
72
|
+
errors: [error instanceof Error ? error.message : String(error)]
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
buildPrompt(task) {
|
|
77
|
+
switch (task.type) {
|
|
78
|
+
case "generate":
|
|
79
|
+
if (task.specCode.includes(".contracts.") || task.specCode.includes("kind:")) return buildHandlerPrompt(task.specCode);
|
|
80
|
+
else if (task.specCode.includes(".presentation.")) return buildComponentPrompt(task.specCode);
|
|
81
|
+
else if (task.specCode.includes(".form.")) return buildFormPrompt(task.specCode);
|
|
82
|
+
return `Generate implementation for:\n${task.specCode}`;
|
|
83
|
+
case "test": return buildTestPrompt(task.specCode, task.existingCode || "", "handler");
|
|
84
|
+
case "validate": return `Validate this implementation:\n${task.existingCode}`;
|
|
85
|
+
default: return task.specCode;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
export { SimpleAgent };
|
package/dist/ai/client.js
CHANGED
|
@@ -1 +1,162 @@
|
|
|
1
|
-
import{getAIProvider
|
|
1
|
+
import { getAIProvider } from "./providers.js";
|
|
2
|
+
import { buildEventSpecPrompt, buildOperationSpecPrompt, buildPresentationSpecPrompt, getSystemPrompt } from "./prompts/spec-creation.js";
|
|
3
|
+
import { buildComponentPrompt, buildFormPrompt, buildHandlerPrompt, buildTestPrompt, getCodeGenSystemPrompt } from "./prompts/code-generation.js";
|
|
4
|
+
import { generateObject, generateText, streamText } from "ai";
|
|
5
|
+
import * as z$1 from "zod";
|
|
6
|
+
|
|
7
|
+
//#region src/ai/client.ts
|
|
8
|
+
/**
|
|
9
|
+
* AI Client for spec creation and code generation
|
|
10
|
+
*/
|
|
11
|
+
var AIClient = class {
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this.config = config;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Generate operation spec from natural language description
|
|
17
|
+
*/
|
|
18
|
+
async generateOperationSpec(description, kind) {
|
|
19
|
+
return (await generateObject({
|
|
20
|
+
model: getAIProvider(this.config),
|
|
21
|
+
schema: z$1.object({
|
|
22
|
+
name: z$1.string().describe("Dot notation name like \"domain.operation\""),
|
|
23
|
+
version: z$1.number().int().positive().default(1),
|
|
24
|
+
description: z$1.string().describe("Clear, concise summary"),
|
|
25
|
+
goal: z$1.string().describe("Business purpose"),
|
|
26
|
+
context: z$1.string().describe("Background and constraints"),
|
|
27
|
+
stability: z$1.enum([
|
|
28
|
+
"experimental",
|
|
29
|
+
"beta",
|
|
30
|
+
"stable",
|
|
31
|
+
"deprecated"
|
|
32
|
+
]).default("beta"),
|
|
33
|
+
owners: z$1.array(z$1.string()).describe("Team/person owners with @ prefix"),
|
|
34
|
+
tags: z$1.array(z$1.string()).describe("Categorization tags"),
|
|
35
|
+
auth: z$1.enum([
|
|
36
|
+
"anonymous",
|
|
37
|
+
"user",
|
|
38
|
+
"admin"
|
|
39
|
+
]).describe("Required auth level"),
|
|
40
|
+
inputShape: z$1.string().describe("Description of input structure"),
|
|
41
|
+
outputShape: z$1.string().describe("Description of output structure"),
|
|
42
|
+
flags: z$1.array(z$1.string()).describe("Feature flags").default([]),
|
|
43
|
+
possibleEvents: z$1.array(z$1.string()).describe("Events this may emit").default([]),
|
|
44
|
+
analytics: z$1.array(z$1.string()).describe("Analytics events to track").default([])
|
|
45
|
+
}),
|
|
46
|
+
prompt: buildOperationSpecPrompt(description, kind),
|
|
47
|
+
system: getSystemPrompt()
|
|
48
|
+
})).object;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Generate event spec from description
|
|
52
|
+
*/
|
|
53
|
+
async generateEventSpec(description) {
|
|
54
|
+
return (await generateObject({
|
|
55
|
+
model: getAIProvider(this.config),
|
|
56
|
+
schema: z$1.object({
|
|
57
|
+
name: z$1.string().describe("Dot notation name like \"domain.event_name\""),
|
|
58
|
+
version: z$1.number().int().positive().default(1),
|
|
59
|
+
description: z$1.string().describe("When this event is emitted"),
|
|
60
|
+
stability: z$1.enum([
|
|
61
|
+
"experimental",
|
|
62
|
+
"beta",
|
|
63
|
+
"stable",
|
|
64
|
+
"deprecated"
|
|
65
|
+
]).default("beta"),
|
|
66
|
+
owners: z$1.array(z$1.string()).default([]),
|
|
67
|
+
tags: z$1.array(z$1.string()).default([]),
|
|
68
|
+
payloadShape: z$1.string().describe("Description of event payload"),
|
|
69
|
+
piiFields: z$1.array(z$1.string()).describe("PII field paths").default([])
|
|
70
|
+
}),
|
|
71
|
+
prompt: buildEventSpecPrompt(description),
|
|
72
|
+
system: getSystemPrompt()
|
|
73
|
+
})).object;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Generate presentation spec from description
|
|
77
|
+
*/
|
|
78
|
+
async generatePresentationSpec(description, kind) {
|
|
79
|
+
return (await generateObject({
|
|
80
|
+
model: getAIProvider(this.config),
|
|
81
|
+
schema: z$1.object({
|
|
82
|
+
name: z$1.string(),
|
|
83
|
+
version: z$1.number().int().positive().default(1),
|
|
84
|
+
description: z$1.string(),
|
|
85
|
+
stability: z$1.enum([
|
|
86
|
+
"experimental",
|
|
87
|
+
"beta",
|
|
88
|
+
"stable",
|
|
89
|
+
"deprecated"
|
|
90
|
+
]).default("beta"),
|
|
91
|
+
owners: z$1.array(z$1.string()).default([]),
|
|
92
|
+
tags: z$1.array(z$1.string()).default([]),
|
|
93
|
+
componentKey: z$1.string().optional(),
|
|
94
|
+
propsShape: z$1.string().optional(),
|
|
95
|
+
content: z$1.string().optional(),
|
|
96
|
+
mimeType: z$1.string().optional(),
|
|
97
|
+
dataShape: z$1.string().optional()
|
|
98
|
+
}),
|
|
99
|
+
prompt: buildPresentationSpecPrompt(description, kind),
|
|
100
|
+
system: getSystemPrompt()
|
|
101
|
+
})).object;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Generate handler implementation from spec
|
|
105
|
+
*/
|
|
106
|
+
async generateHandler(specCode) {
|
|
107
|
+
return (await generateText({
|
|
108
|
+
model: getAIProvider(this.config),
|
|
109
|
+
prompt: buildHandlerPrompt(specCode),
|
|
110
|
+
system: getCodeGenSystemPrompt()
|
|
111
|
+
})).text;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Generate React component from presentation spec
|
|
115
|
+
*/
|
|
116
|
+
async generateComponent(specCode) {
|
|
117
|
+
return (await generateText({
|
|
118
|
+
model: getAIProvider(this.config),
|
|
119
|
+
prompt: buildComponentPrompt(specCode),
|
|
120
|
+
system: getCodeGenSystemPrompt()
|
|
121
|
+
})).text;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Generate form component from form spec
|
|
125
|
+
*/
|
|
126
|
+
async generateForm(specCode) {
|
|
127
|
+
return (await generateText({
|
|
128
|
+
model: getAIProvider(this.config),
|
|
129
|
+
prompt: buildFormPrompt(specCode),
|
|
130
|
+
system: getCodeGenSystemPrompt()
|
|
131
|
+
})).text;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Generate tests for implementation
|
|
135
|
+
*/
|
|
136
|
+
async generateTests(specCode, implementationCode, testType) {
|
|
137
|
+
return (await generateText({
|
|
138
|
+
model: getAIProvider(this.config),
|
|
139
|
+
prompt: buildTestPrompt(specCode, implementationCode, testType),
|
|
140
|
+
system: getCodeGenSystemPrompt()
|
|
141
|
+
})).text;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Stream code generation for better UX
|
|
145
|
+
*/
|
|
146
|
+
async streamCodeGeneration(prompt, onChunk) {
|
|
147
|
+
const result = await streamText({
|
|
148
|
+
model: getAIProvider(this.config),
|
|
149
|
+
prompt,
|
|
150
|
+
system: getCodeGenSystemPrompt()
|
|
151
|
+
});
|
|
152
|
+
let fullText = "";
|
|
153
|
+
for await (const chunk of result.textStream) {
|
|
154
|
+
fullText += chunk;
|
|
155
|
+
onChunk(chunk);
|
|
156
|
+
}
|
|
157
|
+
return fullText;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
//#endregion
|
|
162
|
+
export { AIClient };
|
package/dist/ai/index.js
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
import{__export
|
|
1
|
+
import { __export } from "../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { getAIProvider, getRecommendedModels, validateProvider } from "./providers.js";
|
|
3
|
+
import { AIClient } from "./client.js";
|
|
4
|
+
import { SimpleAgent } from "./agents/simple-agent.js";
|
|
5
|
+
import { CursorAgent } from "./agents/cursor-agent.js";
|
|
6
|
+
import { ClaudeCodeAgent } from "./agents/claude-code-agent.js";
|
|
7
|
+
import { OpenAICodexAgent } from "./agents/openai-codex-agent.js";
|
|
8
|
+
import { AgentOrchestrator } from "./agents/orchestrator.js";
|
|
9
|
+
import "./agents/index.js";
|
|
10
|
+
import { prompts_exports } from "./prompts/index.js";
|
|
11
|
+
|
|
12
|
+
//#region src/ai/index.ts
|
|
13
|
+
var ai_exports = /* @__PURE__ */ __export({
|
|
14
|
+
AIClient: () => AIClient,
|
|
15
|
+
AgentOrchestrator: () => AgentOrchestrator,
|
|
16
|
+
ClaudeCodeAgent: () => ClaudeCodeAgent,
|
|
17
|
+
CursorAgent: () => CursorAgent,
|
|
18
|
+
OpenAICodexAgent: () => OpenAICodexAgent,
|
|
19
|
+
SimpleAgent: () => SimpleAgent,
|
|
20
|
+
getAIProvider: () => getAIProvider,
|
|
21
|
+
getRecommendedModels: () => getRecommendedModels,
|
|
22
|
+
prompts: () => prompts_exports,
|
|
23
|
+
validateProvider: () => validateProvider
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ai_exports };
|