@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229
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 +21 -0
- package/dist/adapters/ai.d.ts +7 -8
- package/dist/adapters/ai.d.ts.map +1 -0
- package/dist/adapters/factory.d.ts +20 -21
- package/dist/adapters/factory.d.ts.map +1 -0
- package/dist/adapters/fs.d.ts +6 -7
- package/dist/adapters/fs.d.ts.map +1 -0
- package/dist/adapters/git.d.ts +6 -7
- package/dist/adapters/git.d.ts.map +1 -0
- package/dist/adapters/index.d.ts +11 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/logger.d.ts +9 -8
- package/dist/adapters/logger.d.ts.map +1 -0
- package/dist/adapters/watcher.d.ts +6 -7
- package/dist/adapters/watcher.d.ts.map +1 -0
- package/dist/adapters/workspace.d.ts +37 -39
- package/dist/adapters/workspace.d.ts.map +1 -0
- package/dist/ai/agents/claude-code-agent.d.ts +20 -20
- package/dist/ai/agents/claude-code-agent.d.ts.map +1 -0
- package/dist/ai/agents/cursor-agent.d.ts +66 -66
- package/dist/ai/agents/cursor-agent.d.ts.map +1 -0
- package/dist/ai/agents/index.d.ts +10 -0
- package/dist/ai/agents/index.d.ts.map +1 -0
- package/dist/ai/agents/openai-codex-agent.d.ts +20 -20
- package/dist/ai/agents/openai-codex-agent.d.ts.map +1 -0
- package/dist/ai/agents/orchestrator.d.ts +48 -48
- package/dist/ai/agents/orchestrator.d.ts.map +1 -0
- package/dist/ai/agents/simple-agent.d.ts +15 -15
- package/dist/ai/agents/simple-agent.d.ts.map +1 -0
- package/dist/ai/agents/types.d.ts +26 -28
- package/dist/ai/agents/types.d.ts.map +1 -0
- package/dist/ai/client.d.ts +74 -78
- package/dist/ai/client.d.ts.map +1 -0
- package/dist/ai/index.d.ts +8 -16
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/prompts/code-generation.d.ts +6 -10
- package/dist/ai/prompts/code-generation.d.ts.map +1 -0
- package/dist/ai/prompts/index.d.ts +6 -9
- package/dist/ai/prompts/index.d.ts.map +1 -0
- package/dist/ai/prompts/spec-creation.d.ts +7 -13
- package/dist/ai/prompts/spec-creation.d.ts.map +1 -0
- package/dist/ai/providers.d.ts +13 -12
- package/dist/ai/providers.d.ts.map +1 -0
- package/dist/formatters/index.d.ts +7 -10
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/json.d.ts +65 -63
- package/dist/formatters/json.d.ts.map +1 -0
- package/dist/formatters/sarif.d.ts +77 -72
- package/dist/formatters/sarif.d.ts.map +1 -0
- package/dist/formatters/text.d.ts +21 -19
- package/dist/formatters/text.d.ts.map +1 -0
- package/dist/index.d.ts +14 -66
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4531 -81
- package/dist/ports/ai.d.ts +41 -38
- package/dist/ports/ai.d.ts.map +1 -0
- package/dist/ports/fs.d.ts +63 -65
- package/dist/ports/fs.d.ts.map +1 -0
- package/dist/ports/git.d.ts +19 -21
- package/dist/ports/git.d.ts.map +1 -0
- package/dist/ports/index.d.ts +10 -0
- package/dist/ports/index.d.ts.map +1 -0
- package/dist/ports/logger.d.ts +58 -65
- package/dist/ports/logger.d.ts.map +1 -0
- package/dist/ports/watcher.d.ts +24 -26
- package/dist/ports/watcher.d.ts.map +1 -0
- package/dist/services/agent-guide/adapters/claude-code.d.ts +30 -28
- package/dist/services/agent-guide/adapters/claude-code.d.ts.map +1 -0
- package/dist/services/agent-guide/adapters/cursor-cli.d.ts +34 -32
- package/dist/services/agent-guide/adapters/cursor-cli.d.ts.map +1 -0
- package/dist/services/agent-guide/adapters/generic-mcp.d.ts +47 -45
- package/dist/services/agent-guide/adapters/generic-mcp.d.ts.map +1 -0
- package/dist/services/agent-guide/adapters/index.d.ts +15 -13
- package/dist/services/agent-guide/adapters/index.d.ts.map +1 -0
- package/dist/services/agent-guide/agent-guide-service.d.ts +48 -45
- package/dist/services/agent-guide/agent-guide-service.d.ts.map +1 -0
- package/dist/services/agent-guide/index.d.ts +12 -0
- package/dist/services/agent-guide/index.d.ts.map +1 -0
- package/dist/services/agent-guide/types.d.ts +46 -47
- package/dist/services/agent-guide/types.d.ts.map +1 -0
- package/dist/services/build.d.ts +41 -39
- package/dist/services/build.d.ts.map +1 -0
- package/dist/services/ci-check/ci-check-service.d.ts +13 -11
- package/dist/services/ci-check/ci-check-service.d.ts.map +1 -0
- package/dist/services/ci-check/index.d.ts +6 -0
- package/dist/services/ci-check/index.d.ts.map +1 -0
- package/dist/services/ci-check/types.d.ts +100 -102
- package/dist/services/ci-check/types.d.ts.map +1 -0
- package/dist/services/clean.d.ts +38 -37
- package/dist/services/clean.d.ts.map +1 -0
- package/dist/services/config.d.ts +14 -15
- package/dist/services/config.d.ts.map +1 -0
- package/dist/services/deps.d.ts +29 -30
- package/dist/services/deps.d.ts.map +1 -0
- package/dist/services/diff.d.ts +20 -21
- package/dist/services/diff.d.ts.map +1 -0
- package/dist/services/doctor/checks/ai.d.ts +10 -0
- package/dist/services/doctor/checks/ai.d.ts.map +1 -0
- package/dist/services/doctor/checks/cli.d.ts +10 -0
- package/dist/services/doctor/checks/cli.d.ts.map +1 -0
- package/dist/services/doctor/checks/config.d.ts +10 -0
- package/dist/services/doctor/checks/config.d.ts.map +1 -0
- package/dist/services/doctor/checks/deps.d.ts +10 -0
- package/dist/services/doctor/checks/deps.d.ts.map +1 -0
- package/dist/services/doctor/checks/index.d.ts +10 -0
- package/dist/services/doctor/checks/index.d.ts.map +1 -0
- package/dist/services/doctor/checks/mcp.d.ts +10 -0
- package/dist/services/doctor/checks/mcp.d.ts.map +1 -0
- package/dist/services/doctor/checks/workspace.d.ts +12 -0
- package/dist/services/doctor/checks/workspace.d.ts.map +1 -0
- package/dist/services/doctor/doctor-service.d.ts +14 -13
- package/dist/services/doctor/doctor-service.d.ts.map +1 -0
- package/dist/services/doctor/index.d.ts +8 -0
- package/dist/services/doctor/index.d.ts.map +1 -0
- package/dist/services/doctor/types.d.ts +70 -72
- package/dist/services/doctor/types.d.ts.map +1 -0
- package/dist/services/implementation/discovery.d.ts +16 -14
- package/dist/services/implementation/discovery.d.ts.map +1 -0
- package/dist/services/implementation/index.d.ts +7 -0
- package/dist/services/implementation/index.d.ts.map +1 -0
- package/dist/services/implementation/resolver.d.ts +31 -27
- package/dist/services/implementation/resolver.d.ts.map +1 -0
- package/dist/services/implementation/types.d.ts +55 -56
- package/dist/services/implementation/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +28 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/integrity-diagram.d.ts +29 -25
- package/dist/services/integrity-diagram.d.ts.map +1 -0
- package/dist/services/integrity.d.ts +100 -96
- package/dist/services/integrity.d.ts.map +1 -0
- package/dist/services/list.d.ts +18 -19
- package/dist/services/list.d.ts.map +1 -0
- package/dist/services/openapi/export-service.d.ts +39 -40
- package/dist/services/openapi/export-service.d.ts.map +1 -0
- package/dist/services/openapi/import-service.d.ts +10 -11
- package/dist/services/openapi/import-service.d.ts.map +1 -0
- package/dist/services/openapi/index.d.ts +10 -0
- package/dist/services/openapi/index.d.ts.map +1 -0
- package/dist/services/openapi/sync-service.d.ts +12 -13
- package/dist/services/openapi/sync-service.d.ts.map +1 -0
- package/dist/services/openapi/types.d.ts +141 -143
- package/dist/services/openapi/types.d.ts.map +1 -0
- package/dist/services/openapi/validate-service.d.ts +10 -11
- package/dist/services/openapi/validate-service.d.ts.map +1 -0
- package/dist/services/regenerator.d.ts +18 -16
- package/dist/services/regenerator.d.ts.map +1 -0
- package/dist/services/registry.d.ts +25 -26
- package/dist/services/registry.d.ts.map +1 -0
- package/dist/services/setup/config-generators.d.ts +14 -13
- package/dist/services/setup/config-generators.d.ts.map +1 -0
- package/dist/services/setup/file-merger.d.ts +5 -7
- package/dist/services/setup/file-merger.d.ts.map +1 -0
- package/dist/services/setup/index.d.ts +10 -0
- package/dist/services/setup/index.d.ts.map +1 -0
- package/dist/services/setup/setup-service.d.ts +10 -8
- package/dist/services/setup/setup-service.d.ts.map +1 -0
- package/dist/services/setup/targets/agents-md.d.ts +12 -0
- package/dist/services/setup/targets/agents-md.d.ts.map +1 -0
- package/dist/services/setup/targets/cli-config.d.ts +12 -0
- package/dist/services/setup/targets/cli-config.d.ts.map +1 -0
- package/dist/services/setup/targets/cursor-rules.d.ts +10 -0
- package/dist/services/setup/targets/cursor-rules.d.ts.map +1 -0
- package/dist/services/setup/targets/index.d.ts +10 -0
- package/dist/services/setup/targets/index.d.ts.map +1 -0
- package/dist/services/setup/targets/mcp-claude.d.ts +11 -0
- package/dist/services/setup/targets/mcp-claude.d.ts.map +1 -0
- package/dist/services/setup/targets/mcp-cursor.d.ts +10 -0
- package/dist/services/setup/targets/mcp-cursor.d.ts.map +1 -0
- package/dist/services/setup/targets/vscode-settings.d.ts +13 -0
- package/dist/services/setup/targets/vscode-settings.d.ts.map +1 -0
- package/dist/services/setup/types.d.ts +51 -53
- package/dist/services/setup/types.d.ts.map +1 -0
- package/dist/services/sync.d.ts +37 -35
- package/dist/services/sync.d.ts.map +1 -0
- package/dist/services/test.d.ts +15 -13
- package/dist/services/test.d.ts.map +1 -0
- package/dist/services/validate-implementation.d.ts +30 -28
- package/dist/services/validate-implementation.d.ts.map +1 -0
- package/dist/services/validate.d.ts +23 -24
- package/dist/services/validate.d.ts.map +1 -0
- package/dist/services/verification-cache/adapters/filesystem.d.ts +40 -38
- package/dist/services/verification-cache/adapters/filesystem.d.ts.map +1 -0
- package/dist/services/verification-cache/adapters/in-memory.d.ts +21 -19
- package/dist/services/verification-cache/adapters/in-memory.d.ts.map +1 -0
- package/dist/services/verification-cache/adapters/index.d.ts +7 -0
- package/dist/services/verification-cache/adapters/index.d.ts.map +1 -0
- package/dist/services/verification-cache/adapters/workspace-state.d.ts +39 -37
- package/dist/services/verification-cache/adapters/workspace-state.d.ts.map +1 -0
- package/dist/services/verification-cache/cache-service.d.ts +55 -53
- package/dist/services/verification-cache/cache-service.d.ts.map +1 -0
- package/dist/services/verification-cache/index.d.ts +7 -0
- package/dist/services/verification-cache/index.d.ts.map +1 -0
- package/dist/services/verification-cache/types.d.ts +84 -85
- package/dist/services/verification-cache/types.d.ts.map +1 -0
- package/dist/services/verify/ai-verifier.d.ts +13 -11
- package/dist/services/verify/ai-verifier.d.ts.map +1 -0
- package/dist/services/verify/behavior-verifier.d.ts +10 -8
- package/dist/services/verify/behavior-verifier.d.ts.map +1 -0
- package/dist/services/verify/index.d.ts +18 -0
- package/dist/services/verify/index.d.ts.map +1 -0
- package/dist/services/verify/structure-verifier.d.ts +12 -8
- package/dist/services/verify/structure-verifier.d.ts.map +1 -0
- package/dist/services/verify/types.d.ts +114 -115
- package/dist/services/verify/types.d.ts.map +1 -0
- package/dist/services/verify/verify-service.d.ts +51 -49
- package/dist/services/verify/verify-service.d.ts.map +1 -0
- package/dist/services/watch.d.ts +22 -21
- package/dist/services/watch.d.ts.map +1 -0
- package/dist/services/workspace-info.d.ts +40 -37
- package/dist/services/workspace-info.d.ts.map +1 -0
- package/dist/templates/app-config.template.d.ts +3 -6
- package/dist/templates/app-config.template.d.ts.map +1 -0
- package/dist/templates/data-view.template.d.ts +3 -6
- package/dist/templates/data-view.template.d.ts.map +1 -0
- package/dist/templates/event.template.d.ts +3 -7
- package/dist/templates/event.template.d.ts.map +1 -0
- package/dist/templates/experiment.template.d.ts +3 -6
- package/dist/templates/experiment.template.d.ts.map +1 -0
- package/dist/templates/handler.template.d.ts +4 -6
- package/dist/templates/handler.template.d.ts.map +1 -0
- package/dist/templates/index.d.ts +17 -20
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/integration.template.d.ts +3 -6
- package/dist/templates/integration.template.d.ts.map +1 -0
- package/dist/templates/knowledge.template.d.ts +3 -6
- package/dist/templates/knowledge.template.d.ts.map +1 -0
- package/dist/templates/migration.template.d.ts +3 -6
- package/dist/templates/migration.template.d.ts.map +1 -0
- package/dist/templates/operation.template.d.ts +3 -7
- package/dist/templates/operation.template.d.ts.map +1 -0
- package/dist/templates/operation.template.test.d.ts +2 -0
- package/dist/templates/operation.template.test.d.ts.map +1 -0
- package/dist/templates/presentation.template.d.ts +3 -7
- package/dist/templates/presentation.template.d.ts.map +1 -0
- package/dist/templates/telemetry.template.d.ts +3 -6
- package/dist/templates/telemetry.template.d.ts.map +1 -0
- package/dist/templates/workflow-runner.template.d.ts +7 -13
- package/dist/templates/workflow-runner.template.d.ts.map +1 -0
- package/dist/templates/workflow.template.d.ts +3 -6
- package/dist/templates/workflow.template.d.ts.map +1 -0
- package/dist/types/config.d.ts +18 -20
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types.d.ts +338 -311
- package/dist/types.d.ts.map +1 -0
- package/package.json +16 -15
- package/dist/_virtual/rolldown_runtime.js +0 -22
- package/dist/adapters/ai.js +0 -82
- package/dist/adapters/factory.js +0 -36
- package/dist/adapters/fs.js +0 -118
- package/dist/adapters/git.js +0 -54
- package/dist/adapters/index.js +0 -7
- package/dist/adapters/logger.js +0 -80
- package/dist/adapters/watcher.js +0 -69
- package/dist/adapters/workspace.js +0 -190
- package/dist/ai/agents/claude-code-agent.js +0 -181
- package/dist/ai/agents/cursor-agent.js +0 -437
- package/dist/ai/agents/index.js +0 -5
- package/dist/ai/agents/openai-codex-agent.js +0 -166
- package/dist/ai/agents/orchestrator.js +0 -142
- package/dist/ai/agents/simple-agent.js +0 -91
- package/dist/ai/client.js +0 -162
- package/dist/ai/index.js +0 -27
- package/dist/ai/prompts/code-generation.js +0 -142
- package/dist/ai/prompts/index.js +0 -12
- package/dist/ai/prompts/spec-creation.js +0 -110
- package/dist/ai/providers.js +0 -40
- package/dist/formatters/index.js +0 -18
- package/dist/formatters/json.js +0 -71
- package/dist/formatters/sarif.js +0 -163
- package/dist/formatters/text.js +0 -208
- package/dist/libs/ai-providers/dist/factory.js +0 -154
- package/dist/libs/ai-providers/dist/index.js +0 -4
- package/dist/libs/ai-providers/dist/legacy.js +0 -72
- package/dist/libs/ai-providers/dist/models.js +0 -287
- package/dist/libs/ai-providers/dist/validation.js +0 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -88
- package/dist/libs/contracts/dist/client/index.js +0 -5
- package/dist/libs/contracts/dist/client/react/feature-render.js +0 -2
- package/dist/libs/contracts/dist/client/react/form-render.js +0 -4
- package/dist/libs/contracts/dist/client/react/index.js +0 -4
- package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -60
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/index.js +0 -29
- package/dist/libs/contracts/dist/docs/presentations.js +0 -71
- package/dist/libs/contracts/dist/docs/registry.js +0 -44
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
- package/dist/libs/contracts/dist/events.js +0 -8
- package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
- package/dist/libs/contracts/dist/index.js +0 -72
- package/dist/libs/contracts/dist/install.js +0 -2
- package/dist/libs/contracts/dist/integrations/contracts.js +0 -377
- package/dist/libs/contracts/dist/integrations/index.js +0 -18
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -242
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -13
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
- package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
- package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
- package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
- package/dist/libs/contracts/dist/jsonschema.js +0 -24
- package/dist/libs/contracts/dist/knowledge/contracts.js +0 -306
- package/dist/libs/contracts/dist/knowledge/index.js +0 -7
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -34
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -34
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -37
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
- package/dist/libs/contracts/dist/llm/exporters.js +0 -352
- package/dist/libs/contracts/dist/llm/index.js +0 -2
- package/dist/libs/contracts/dist/llm/prompts.js +0 -211
- package/dist/libs/contracts/dist/onboarding-base.js +0 -196
- package/dist/libs/contracts/dist/openapi.js +0 -75
- package/dist/libs/contracts/dist/ownership.js +0 -21
- package/dist/libs/contracts/dist/presentations.js +0 -1
- package/dist/libs/contracts/dist/presentations.v2.js +0 -11
- package/dist/libs/contracts/dist/prompt.js +0 -1
- package/dist/libs/contracts/dist/promptRegistry.js +0 -1
- package/dist/libs/contracts/dist/regenerator/index.js +0 -2
- package/dist/libs/contracts/dist/regenerator/service.js +0 -92
- package/dist/libs/contracts/dist/regenerator/utils.js +0 -51
- package/dist/libs/contracts/dist/registry.js +0 -208
- package/dist/libs/contracts/dist/resources.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
- package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
- package/dist/libs/contracts/dist/server/index.js +0 -8
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -2
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
- package/dist/libs/contracts/dist/server/rest-express.js +0 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
- package/dist/libs/contracts/dist/spec.js +0 -35
- package/dist/libs/contracts/dist/telemetry/index.js +0 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
- package/dist/libs/contracts/dist/tests/index.js +0 -1
- package/dist/libs/contracts/dist/tests/runner.js +0 -150
- package/dist/libs/contracts/dist/workflow/index.js +0 -1
- package/dist/libs/contracts/dist/workflow/runner.js +0 -1
- package/dist/libs/contracts-transformers/dist/common/utils.js +0 -47
- package/dist/libs/contracts-transformers/dist/openapi/exporter.js +0 -1
- package/dist/libs/contracts-transformers/dist/openapi/importer.js +0 -255
- package/dist/libs/contracts-transformers/dist/openapi/index.js +0 -4
- package/dist/libs/contracts-transformers/dist/openapi/parser.js +0 -231
- package/dist/libs/contracts-transformers/dist/openapi/schema-converter.js +0 -201
- package/dist/modules/contractspec-workspace/dist/ai/code-generation.js +0 -137
- package/dist/modules/contractspec-workspace/dist/ai/spec-creation.js +0 -101
- package/dist/modules/contractspec-workspace/dist/analysis/deps/graph.js +0 -84
- package/dist/modules/contractspec-workspace/dist/analysis/deps/parse-imports.js +0 -30
- package/dist/modules/contractspec-workspace/dist/analysis/diff/semantic.js +0 -96
- package/dist/modules/contractspec-workspace/dist/analysis/feature-scan.js +0 -151
- package/dist/modules/contractspec-workspace/dist/analysis/spec-scan.js +0 -344
- package/dist/modules/contractspec-workspace/dist/analysis/validate/spec-structure.js +0 -122
- package/dist/modules/contractspec-workspace/dist/templates/app-config.js +0 -105
- package/dist/modules/contractspec-workspace/dist/templates/data-view.js +0 -68
- package/dist/modules/contractspec-workspace/dist/templates/event.js +0 -38
- package/dist/modules/contractspec-workspace/dist/templates/experiment.js +0 -87
- package/dist/modules/contractspec-workspace/dist/templates/handler.js +0 -95
- package/dist/modules/contractspec-workspace/dist/templates/integration-utils.js +0 -104
- package/dist/modules/contractspec-workspace/dist/templates/integration.js +0 -62
- package/dist/modules/contractspec-workspace/dist/templates/knowledge.js +0 -68
- package/dist/modules/contractspec-workspace/dist/templates/migration.js +0 -60
- package/dist/modules/contractspec-workspace/dist/templates/operation.js +0 -100
- package/dist/modules/contractspec-workspace/dist/templates/presentation.js +0 -78
- package/dist/modules/contractspec-workspace/dist/templates/telemetry.js +0 -89
- package/dist/modules/contractspec-workspace/dist/templates/utils.js +0 -38
- package/dist/modules/contractspec-workspace/dist/templates/workflow-runner.js +0 -48
- package/dist/modules/contractspec-workspace/dist/templates/workflow.js +0 -67
- package/dist/modules/contractspec-workspace/dist/types/generation-types.js +0 -20
- package/dist/services/agent-guide/adapters/claude-code.js +0 -144
- package/dist/services/agent-guide/adapters/cursor-cli.js +0 -135
- package/dist/services/agent-guide/adapters/generic-mcp.js +0 -159
- package/dist/services/agent-guide/adapters/index.js +0 -30
- package/dist/services/agent-guide/agent-guide-service.js +0 -148
- package/dist/services/agent-guide/index.js +0 -5
- package/dist/services/build.js +0 -140
- package/dist/services/ci-check/ci-check-service.js +0 -393
- package/dist/services/ci-check/index.js +0 -2
- package/dist/services/ci-check/types.js +0 -28
- package/dist/services/clean.js +0 -71
- package/dist/services/config.js +0 -76
- package/dist/services/deps.js +0 -62
- package/dist/services/diff.js +0 -33
- package/dist/services/doctor/checks/ai.js +0 -118
- package/dist/services/doctor/checks/cli.js +0 -146
- package/dist/services/doctor/checks/config.js +0 -170
- package/dist/services/doctor/checks/deps.js +0 -180
- package/dist/services/doctor/checks/index.js +0 -6
- package/dist/services/doctor/checks/mcp.js +0 -144
- package/dist/services/doctor/checks/workspace.js +0 -243
- package/dist/services/doctor/doctor-service.js +0 -115
- package/dist/services/doctor/index.js +0 -2
- package/dist/services/doctor/types.js +0 -26
- package/dist/services/implementation/discovery.js +0 -143
- package/dist/services/implementation/index.js +0 -2
- package/dist/services/implementation/resolver.js +0 -223
- package/dist/services/index.js +0 -53
- package/dist/services/integrity-diagram.js +0 -274
- package/dist/services/integrity.js +0 -272
- package/dist/services/list.js +0 -35
- package/dist/services/openapi/export-service.js +0 -51
- package/dist/services/openapi/import-service.js +0 -75
- package/dist/services/openapi/index.js +0 -4
- package/dist/services/openapi/sync-service.js +0 -121
- package/dist/services/openapi/validate-service.js +0 -130
- package/dist/services/regenerator.js +0 -23
- package/dist/services/registry.js +0 -73
- package/dist/services/setup/config-generators.js +0 -237
- package/dist/services/setup/file-merger.js +0 -60
- package/dist/services/setup/index.js +0 -4
- package/dist/services/setup/setup-service.js +0 -95
- package/dist/services/setup/targets/agents-md.js +0 -46
- package/dist/services/setup/targets/cli-config.js +0 -59
- package/dist/services/setup/targets/cursor-rules.js +0 -47
- package/dist/services/setup/targets/mcp-claude.js +0 -59
- package/dist/services/setup/targets/mcp-cursor.js +0 -58
- package/dist/services/setup/targets/vscode-settings.js +0 -62
- package/dist/services/setup/types.js +0 -26
- package/dist/services/sync.js +0 -62
- package/dist/services/test.js +0 -30
- package/dist/services/validate-implementation.js +0 -69
- package/dist/services/validate.js +0 -47
- package/dist/services/verification-cache/adapters/filesystem.js +0 -121
- package/dist/services/verification-cache/adapters/in-memory.js +0 -45
- package/dist/services/verification-cache/adapters/index.js +0 -3
- package/dist/services/verification-cache/adapters/workspace-state.js +0 -90
- package/dist/services/verification-cache/cache-service.js +0 -255
- package/dist/services/verification-cache/index.js +0 -6
- package/dist/services/verification-cache/types.js +0 -15
- package/dist/services/verify/ai-verifier.js +0 -403
- package/dist/services/verify/behavior-verifier.js +0 -185
- package/dist/services/verify/index.js +0 -4
- package/dist/services/verify/structure-verifier.js +0 -195
- package/dist/services/verify/verify-service.js +0 -203
- package/dist/services/watch.js +0 -31
- package/dist/services/workspace-info.js +0 -102
- package/dist/templates/app-config.template.js +0 -106
- package/dist/templates/data-view.template.js +0 -69
- package/dist/templates/event.template.js +0 -39
- package/dist/templates/experiment.template.js +0 -88
- package/dist/templates/handler.template.js +0 -99
- package/dist/templates/index.js +0 -36
- package/dist/templates/integration.template.js +0 -159
- package/dist/templates/knowledge.template.js +0 -74
- package/dist/templates/migration.template.js +0 -61
- package/dist/templates/operation.template.js +0 -104
- package/dist/templates/presentation.template.js +0 -79
- package/dist/templates/telemetry.template.js +0 -90
- package/dist/templates/workflow-runner.template.js +0 -49
- package/dist/templates/workflow.template.js +0 -68
|
@@ -1,142 +0,0 @@
|
|
|
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,91 +0,0 @@
|
|
|
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: `
|
|
46
|
-
Review the following implementation against its specification.
|
|
47
|
-
|
|
48
|
-
Specification:
|
|
49
|
-
${task.specCode}
|
|
50
|
-
|
|
51
|
-
Implementation:
|
|
52
|
-
${task.existingCode || "// No implementation provided"}
|
|
53
|
-
|
|
54
|
-
Provide a detailed validation report:
|
|
55
|
-
1. Does the implementation match the spec?
|
|
56
|
-
2. Are there any missing features?
|
|
57
|
-
3. Are there any bugs or issues?
|
|
58
|
-
4. Suggestions for improvement
|
|
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
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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 };
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { __export } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
-
|
|
3
|
-
//#region src/ai/prompts/code-generation.ts
|
|
4
|
-
var code_generation_exports = /* @__PURE__ */ __export({
|
|
5
|
-
buildComponentPrompt: () => buildComponentPrompt,
|
|
6
|
-
buildFormPrompt: () => buildFormPrompt,
|
|
7
|
-
buildHandlerPrompt: () => buildHandlerPrompt,
|
|
8
|
-
buildTestPrompt: () => buildTestPrompt,
|
|
9
|
-
getCodeGenSystemPrompt: () => getCodeGenSystemPrompt
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* Build prompt for generating handler implementation
|
|
13
|
-
*/
|
|
14
|
-
function buildHandlerPrompt(specCode) {
|
|
15
|
-
return `You are a senior TypeScript developer implementing a handler for a contract specification.
|
|
16
|
-
|
|
17
|
-
Here is the contract spec:
|
|
18
|
-
|
|
19
|
-
\`\`\`typescript
|
|
20
|
-
${specCode}
|
|
21
|
-
\`\`\`
|
|
22
|
-
|
|
23
|
-
Generate a complete handler implementation that:
|
|
24
|
-
|
|
25
|
-
1. **Matches the spec signature**: Input/output types from the spec
|
|
26
|
-
2. **Handles errors**: Implement error cases defined in spec.io.errors
|
|
27
|
-
3. **Emits events**: Use the events declared in spec.sideEffects.emits
|
|
28
|
-
4. **Validates input**: Use zod validation from the schema
|
|
29
|
-
5. **Follows best practices**: Clean, type-safe TypeScript
|
|
30
|
-
6. **Includes comments**: Explain business logic
|
|
31
|
-
|
|
32
|
-
The handler should be production-ready with proper error handling, logging points, and clear structure.
|
|
33
|
-
|
|
34
|
-
Return only the TypeScript code for the handler function.`;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Build prompt for generating React component from presentation spec
|
|
38
|
-
*/
|
|
39
|
-
function buildComponentPrompt(specCode) {
|
|
40
|
-
return `You are a senior React developer creating a component for a presentation specification.
|
|
41
|
-
|
|
42
|
-
Here is the presentation spec:
|
|
43
|
-
|
|
44
|
-
\`\`\`typescript
|
|
45
|
-
${specCode}
|
|
46
|
-
\`\`\`
|
|
47
|
-
|
|
48
|
-
Generate a complete React component that:
|
|
49
|
-
|
|
50
|
-
1. **Props interface**: Typed props from the spec
|
|
51
|
-
2. **Accessibility**: Proper ARIA labels, roles, keyboard navigation
|
|
52
|
-
3. **Mobile-first**: Optimized for small screens and touch
|
|
53
|
-
4. **Clean UI**: Simple, intuitive interface
|
|
54
|
-
5. **Type-safe**: Full TypeScript with no 'any' types
|
|
55
|
-
6. **Best practices**: React hooks, proper state management
|
|
56
|
-
|
|
57
|
-
The component should follow Atomic Design principles and be reusable.
|
|
58
|
-
|
|
59
|
-
Return only the TypeScript/TSX code for the component.`;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Build prompt for generating form component
|
|
63
|
-
*/
|
|
64
|
-
function buildFormPrompt(specCode) {
|
|
65
|
-
return `You are a senior React developer creating a form component from a form specification.
|
|
66
|
-
|
|
67
|
-
Here is the form spec:
|
|
68
|
-
|
|
69
|
-
\`\`\`typescript
|
|
70
|
-
${specCode}
|
|
71
|
-
\`\`\`
|
|
72
|
-
|
|
73
|
-
Generate a complete form component using react-hook-form that:
|
|
74
|
-
|
|
75
|
-
1. **Form validation**: Use zod schema for validation
|
|
76
|
-
2. **Field types**: Proper inputs for each field type
|
|
77
|
-
3. **Conditional logic**: Support visibleWhen, enabledWhen, requiredWhen predicates
|
|
78
|
-
4. **Error handling**: Clear, user-friendly error messages
|
|
79
|
-
5. **Accessibility**: Labels, hints, ARIA attributes
|
|
80
|
-
6. **Mobile-optimized**: Touch-friendly, appropriate input types
|
|
81
|
-
7. **Type-safe**: Full TypeScript
|
|
82
|
-
|
|
83
|
-
The form should provide excellent UX with real-time validation and helpful feedback.
|
|
84
|
-
|
|
85
|
-
Return only the TypeScript/TSX code for the form component.`;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Build prompt for generating tests
|
|
89
|
-
*/
|
|
90
|
-
function buildTestPrompt(specCode, implementationCode, testType) {
|
|
91
|
-
return `You are a senior developer writing comprehensive tests.
|
|
92
|
-
|
|
93
|
-
Spec:
|
|
94
|
-
\`\`\`typescript
|
|
95
|
-
${specCode}
|
|
96
|
-
\`\`\`
|
|
97
|
-
|
|
98
|
-
Implementation:
|
|
99
|
-
\`\`\`typescript
|
|
100
|
-
${implementationCode}
|
|
101
|
-
\`\`\`
|
|
102
|
-
|
|
103
|
-
Generate complete test suite using Vitest that:
|
|
104
|
-
${testType === "handler" ? `
|
|
105
|
-
- Test all acceptance scenarios from the spec
|
|
106
|
-
- Test error cases defined in spec.io.errors
|
|
107
|
-
- Verify events are emitted correctly
|
|
108
|
-
- Test input validation
|
|
109
|
-
- Test happy path and edge cases` : `
|
|
110
|
-
- Test rendering with various props
|
|
111
|
-
- Test user interactions
|
|
112
|
-
- Test accessibility (a11y)
|
|
113
|
-
- Test responsive behavior
|
|
114
|
-
- Test error states`}
|
|
115
|
-
|
|
116
|
-
Use clear test descriptions and follow AAA pattern (Arrange, Act, Assert).
|
|
117
|
-
|
|
118
|
-
Return only the TypeScript test code.`;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* System prompt for code generation
|
|
122
|
-
*/
|
|
123
|
-
function getCodeGenSystemPrompt() {
|
|
124
|
-
return `You are an expert TypeScript developer with deep knowledge of:
|
|
125
|
-
- Type-safe API design
|
|
126
|
-
- React and modern hooks
|
|
127
|
-
- Test-driven development
|
|
128
|
-
- Accessibility best practices
|
|
129
|
-
- Clean code principles
|
|
130
|
-
|
|
131
|
-
Generate production-ready code that is:
|
|
132
|
-
- Fully typed (no 'any' or type assertions unless absolutely necessary)
|
|
133
|
-
- Well-documented with TSDoc comments
|
|
134
|
-
- Following project conventions
|
|
135
|
-
- Defensive and error-safe
|
|
136
|
-
- Easy to maintain and extend
|
|
137
|
-
|
|
138
|
-
Always prioritize code quality, safety, and user experience.`;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
//#endregion
|
|
142
|
-
export { buildComponentPrompt, buildFormPrompt, buildHandlerPrompt, buildTestPrompt, code_generation_exports, getCodeGenSystemPrompt };
|
package/dist/ai/prompts/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __export } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { spec_creation_exports } from "./spec-creation.js";
|
|
3
|
-
import { code_generation_exports } from "./code-generation.js";
|
|
4
|
-
|
|
5
|
-
//#region src/ai/prompts/index.ts
|
|
6
|
-
var prompts_exports = /* @__PURE__ */ __export({
|
|
7
|
-
codeGeneration: () => code_generation_exports,
|
|
8
|
-
specCreation: () => spec_creation_exports
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
export { prompts_exports };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { __export } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
-
|
|
3
|
-
//#region src/ai/prompts/spec-creation.ts
|
|
4
|
-
var spec_creation_exports = /* @__PURE__ */ __export({
|
|
5
|
-
addExampleContext: () => addExampleContext,
|
|
6
|
-
buildEventSpecPrompt: () => buildEventSpecPrompt,
|
|
7
|
-
buildOperationSpecPrompt: () => buildOperationSpecPrompt,
|
|
8
|
-
buildPresentationSpecPrompt: () => buildPresentationSpecPrompt,
|
|
9
|
-
getSystemPrompt: () => getSystemPrompt
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* Build prompt for creating operation spec from description
|
|
13
|
-
*/
|
|
14
|
-
function buildOperationSpecPrompt(description, kind) {
|
|
15
|
-
return `You are a senior software architect creating a contract specification for an operation.
|
|
16
|
-
|
|
17
|
-
The operation is a ${kind} (${kind === "command" ? "changes state, has side effects" : "read-only, idempotent"}).
|
|
18
|
-
|
|
19
|
-
User description: ${description}
|
|
20
|
-
|
|
21
|
-
Create a complete contract specification following these guidelines:
|
|
22
|
-
|
|
23
|
-
1. **Name**: Use dot notation like "domain.operationName" (e.g., "user.signup", "payment.charge")
|
|
24
|
-
2. **Version**: Start at 1
|
|
25
|
-
3. **Description**: Clear, concise summary (1-2 sentences)
|
|
26
|
-
4. **Goal**: Business purpose - why this operation exists
|
|
27
|
-
5. **Context**: Background, constraints, scope (what it does and doesn't do)
|
|
28
|
-
6. **Input/Output**: Describe the shape (we'll create schemas separately)
|
|
29
|
-
7. **Auth**: Who can call this - anonymous, user, or admin
|
|
30
|
-
8. **Feature Flags**: Any flags that gate this operation
|
|
31
|
-
9. **Side Effects**: What events might be emitted, analytics to track
|
|
32
|
-
|
|
33
|
-
Respond with a structured spec.`;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Build prompt for creating event spec from description
|
|
37
|
-
*/
|
|
38
|
-
function buildEventSpecPrompt(description) {
|
|
39
|
-
return `You are a senior software architect creating an event specification.
|
|
40
|
-
|
|
41
|
-
User description: ${description}
|
|
42
|
-
|
|
43
|
-
Create a complete event specification following these guidelines:
|
|
44
|
-
|
|
45
|
-
1. **Name**: Use dot notation like "domain.event_name" (e.g., "user.signup_completed", "payment.charged")
|
|
46
|
-
2. **Version**: Start at 1
|
|
47
|
-
3. **Description**: Clear description of when this event is emitted
|
|
48
|
-
4. **Payload**: Describe what data the event carries
|
|
49
|
-
5. **PII Fields**: List any personally identifiable information fields (e.g., ["email", "name"])
|
|
50
|
-
|
|
51
|
-
Events represent things that have already happened and should use past tense.
|
|
52
|
-
|
|
53
|
-
Respond with a structured spec.`;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Build prompt for creating presentation spec from description
|
|
57
|
-
*/
|
|
58
|
-
function buildPresentationSpecPrompt(description, kind) {
|
|
59
|
-
return `You are a senior software architect creating a presentation specification.
|
|
60
|
-
|
|
61
|
-
This is a ${kind} presentation - ${{
|
|
62
|
-
web_component: "a React component with props schema",
|
|
63
|
-
markdown: "markdown/MDX documentation or guide",
|
|
64
|
-
data: "structured data export (JSON/XML)"
|
|
65
|
-
}[kind]}.
|
|
66
|
-
|
|
67
|
-
User description: ${description}
|
|
68
|
-
|
|
69
|
-
Create a complete presentation specification following these guidelines:
|
|
70
|
-
|
|
71
|
-
1. **Name**: Use dot notation like "domain.presentation_name" (e.g., "user.profile_card", "docs.api_guide")
|
|
72
|
-
2. **Version**: Start at 1
|
|
73
|
-
3. **Description**: What this presentation shows/provides
|
|
74
|
-
4. **Kind-specific details**:
|
|
75
|
-
${kind === "web_component" ? "- Component key (symbolic, resolved by host app)\n - Props structure\n - Analytics events to track" : kind === "markdown" ? "- Content or resource URI\n - Target audience" : "- MIME type (e.g., application/json)\n - Data structure description"}
|
|
76
|
-
|
|
77
|
-
Respond with a structured spec.`;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Build system prompt for all spec generation
|
|
81
|
-
*/
|
|
82
|
-
function getSystemPrompt() {
|
|
83
|
-
return `You are an expert software architect specializing in API design and contract-driven development.
|
|
84
|
-
|
|
85
|
-
You create clear, well-documented specifications that serve as the single source of truth for operations, events, and presentations.
|
|
86
|
-
|
|
87
|
-
Your specs are:
|
|
88
|
-
- Precise and unambiguous
|
|
89
|
-
- Following TypeScript conventions
|
|
90
|
-
- Business-oriented (capturing the "why" not just "what")
|
|
91
|
-
- Designed for both humans and AI agents to understand
|
|
92
|
-
|
|
93
|
-
Always use proper dot notation for names and ensure all metadata is meaningful and accurate.`;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Create example-based prompt for better results
|
|
97
|
-
*/
|
|
98
|
-
function addExampleContext(basePrompt, examples) {
|
|
99
|
-
if (examples.length === 0) return basePrompt;
|
|
100
|
-
return `${basePrompt}
|
|
101
|
-
|
|
102
|
-
Here are some good examples for reference:
|
|
103
|
-
|
|
104
|
-
${examples.join("\n\n")}
|
|
105
|
-
|
|
106
|
-
Follow this structure and quality level.`;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
export { buildEventSpecPrompt, buildOperationSpecPrompt, buildPresentationSpecPrompt, getSystemPrompt, spec_creation_exports };
|