@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217083314 → 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,89 +0,0 @@
|
|
|
1
|
-
import { toPascalCase } from "./utils.js";
|
|
2
|
-
|
|
3
|
-
//#region ../../modules/contractspec-workspace/dist/templates/telemetry.js
|
|
4
|
-
function generateTelemetrySpec(data) {
|
|
5
|
-
const specVar = toPascalCase(data.name.split(".").pop() ?? "Telemetry") + "Telemetry";
|
|
6
|
-
const providers = data.providers?.length ? `providers: [
|
|
7
|
-
${data.providers.map((provider) => ` {
|
|
8
|
-
type: '${provider.type}',
|
|
9
|
-
config: ${formatConfigValue(provider.config)},
|
|
10
|
-
}`).join(",\n")}
|
|
11
|
-
],` : "";
|
|
12
|
-
const events = data.events.map((event) => {
|
|
13
|
-
const properties = event.properties.map((prop) => ` '${prop.name}': {
|
|
14
|
-
type: '${prop.type}',
|
|
15
|
-
${prop.required ? "required: true," : ""}
|
|
16
|
-
${prop.pii ? "pii: true," : ""}
|
|
17
|
-
${prop.redact ? "redact: true," : ""}
|
|
18
|
-
${prop.description ? `description: '${escapeString(prop.description)}',` : ""}
|
|
19
|
-
}`).join(",\n");
|
|
20
|
-
const anomalyRules = event.anomalyRules?.length ? ` anomalyDetection: {
|
|
21
|
-
enabled: true,
|
|
22
|
-
${typeof event.anomalyMinimumSample === "number" ? `minimumSample: ${event.anomalyMinimumSample},` : ""}
|
|
23
|
-
thresholds: [
|
|
24
|
-
${event.anomalyRules.map((rule) => ` {
|
|
25
|
-
metric: '${escapeString(rule.metric)}',
|
|
26
|
-
${typeof rule.min === "number" ? `min: ${rule.min},` : ""}
|
|
27
|
-
${typeof rule.max === "number" ? `max: ${rule.max},` : ""}
|
|
28
|
-
}`).join(",\n")}
|
|
29
|
-
],
|
|
30
|
-
actions: [${(event.anomalyActions ?? []).map((action) => `'${action}'`).join(", ")}],
|
|
31
|
-
},` : event.anomalyEnabled ? ` anomalyDetection: {
|
|
32
|
-
enabled: true,
|
|
33
|
-
${typeof event.anomalyMinimumSample === "number" ? `minimumSample: ${event.anomalyMinimumSample},` : ""}
|
|
34
|
-
},` : "";
|
|
35
|
-
return ` {
|
|
36
|
-
name: '${escapeString(event.name)}',
|
|
37
|
-
version: ${event.version},
|
|
38
|
-
semantics: {
|
|
39
|
-
what: '${escapeString(event.what)}',
|
|
40
|
-
${event.who ? `who: '${escapeString(event.who)}',` : ""}
|
|
41
|
-
${event.why ? `why: '${escapeString(event.why)}',` : ""}
|
|
42
|
-
},
|
|
43
|
-
privacy: '${event.privacy}',
|
|
44
|
-
properties: {
|
|
45
|
-
${properties}
|
|
46
|
-
},
|
|
47
|
-
${typeof event.retentionDays === "number" ? `retention: { days: ${event.retentionDays}, ${event.retentionPolicy ? `policy: '${event.retentionPolicy}'` : ""} },` : ""}
|
|
48
|
-
${typeof event.samplingRate === "number" ? `sampling: { rate: ${event.samplingRate}${event.samplingConditions ? `, conditions: ['${escapeString(event.samplingConditions)}']` : ""} },` : ""}
|
|
49
|
-
${anomalyRules}
|
|
50
|
-
${event.tags?.length ? `tags: [${event.tags.map((tag) => `'${escapeString(tag)}'`).join(", ")}],` : ""}
|
|
51
|
-
}`;
|
|
52
|
-
}).join(",\n");
|
|
53
|
-
return `import type { TelemetrySpec } from '@lssm/lib.contracts/telemetry';
|
|
54
|
-
|
|
55
|
-
export const ${specVar}: TelemetrySpec = {
|
|
56
|
-
meta: {
|
|
57
|
-
name: '${escapeString(data.name)}',
|
|
58
|
-
version: ${data.version},
|
|
59
|
-
title: '${escapeString(data.name)} telemetry',
|
|
60
|
-
description: '${escapeString(data.description || "Describe the purpose of this telemetry spec.")}',
|
|
61
|
-
domain: '${escapeString(data.domain)}',
|
|
62
|
-
owners: [${data.owners.map((owner) => `'${escapeString(owner)}'`).join(", ")}],
|
|
63
|
-
tags: [${data.tags.map((tag) => `'${escapeString(tag)}'`).join(", ")}],
|
|
64
|
-
stability: '${data.stability}',
|
|
65
|
-
},
|
|
66
|
-
config: {
|
|
67
|
-
${typeof data.defaultRetentionDays === "number" ? `defaultRetentionDays: ${data.defaultRetentionDays},` : ""}
|
|
68
|
-
${typeof data.defaultSamplingRate === "number" ? `defaultSamplingRate: ${data.defaultSamplingRate},` : ""}
|
|
69
|
-
${data.anomalyEnabled ? `anomalyDetection: { enabled: true${typeof data.anomalyCheckIntervalMs === "number" ? `, checkIntervalMs: ${data.anomalyCheckIntervalMs}` : ""} },` : ""}
|
|
70
|
-
${providers}
|
|
71
|
-
},
|
|
72
|
-
events: [
|
|
73
|
-
${events}
|
|
74
|
-
],
|
|
75
|
-
};
|
|
76
|
-
`;
|
|
77
|
-
}
|
|
78
|
-
function escapeString(value) {
|
|
79
|
-
return value.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
80
|
-
}
|
|
81
|
-
function formatConfigValue(value) {
|
|
82
|
-
const trimmed = value.trim();
|
|
83
|
-
if (!trimmed) return "{}";
|
|
84
|
-
if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) return trimmed;
|
|
85
|
-
return `'${escapeString(trimmed)}'`;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
//#endregion
|
|
89
|
-
export { generateTelemetrySpec };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
//#region ../../modules/contractspec-workspace/dist/templates/utils.js
|
|
2
|
-
/**
|
|
3
|
-
* Utility functions for template generation.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Convert string to camelCase.
|
|
7
|
-
*/
|
|
8
|
-
function toCamelCase(str) {
|
|
9
|
-
const pascal = toPascalCase(str);
|
|
10
|
-
return pascal.charAt(0).toLowerCase() + pascal.slice(1);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Convert string to PascalCase.
|
|
14
|
-
*/
|
|
15
|
-
function toPascalCase(str) {
|
|
16
|
-
return str.split(/[-_.]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Convert string to kebab-case.
|
|
20
|
-
*/
|
|
21
|
-
function toKebabCase(str) {
|
|
22
|
-
return str.replace(/\./g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Capitalize first letter.
|
|
26
|
-
*/
|
|
27
|
-
function capitalize(str) {
|
|
28
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Escape single quotes in string.
|
|
32
|
-
*/
|
|
33
|
-
function escapeString(value) {
|
|
34
|
-
return value.replace(/'/g, "\\'");
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
export { capitalize, escapeString, toCamelCase, toKebabCase, toPascalCase };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
//#region ../../modules/contractspec-workspace/dist/templates/workflow-runner.js
|
|
2
|
-
function generateWorkflowRunnerTemplate({ exportName, specImportPath, runnerName, workflowName }) {
|
|
3
|
-
return `import {
|
|
4
|
-
InMemoryStateStore,
|
|
5
|
-
WorkflowRegistry,
|
|
6
|
-
WorkflowRunner,
|
|
7
|
-
} from '@lssm/lib.contracts/workflow';
|
|
8
|
-
import { ${exportName} } from '${specImportPath}';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Runner wiring for ${workflowName}.
|
|
12
|
-
*
|
|
13
|
-
* TODO:
|
|
14
|
-
* - Replace the in-memory state store with a persistent adapter if needed.
|
|
15
|
-
* - Implement opExecutor to invoke the correct contract handlers.
|
|
16
|
-
* - Wire eventEmitter to telemetry sinks.
|
|
17
|
-
*/
|
|
18
|
-
const registry = new WorkflowRegistry();
|
|
19
|
-
registry.register(${exportName});
|
|
20
|
-
|
|
21
|
-
const stateStore = new InMemoryStateStore();
|
|
22
|
-
|
|
23
|
-
export const ${runnerName} = new WorkflowRunner({
|
|
24
|
-
registry,
|
|
25
|
-
stateStore,
|
|
26
|
-
opExecutor: async (operation, input, ctx) => {
|
|
27
|
-
// TODO: route to the appropriate contract handler
|
|
28
|
-
// Example: return contractRegistry.execute(operation.name, operation.version, input, ctx);
|
|
29
|
-
throw new Error(
|
|
30
|
-
\`opExecutor for \${operation.name}.v\${operation.version} is not implemented\`
|
|
31
|
-
);
|
|
32
|
-
},
|
|
33
|
-
// appConfigProvider: async (state) => {
|
|
34
|
-
// // TODO: return the ResolvedAppConfig for this workflow run (tenant/environment)
|
|
35
|
-
// return undefined;
|
|
36
|
-
// },
|
|
37
|
-
// enforceCapabilities: async (operation, context) => {
|
|
38
|
-
// // TODO: ensure required capabilities are satisfied using context.integrations/context.resolvedAppConfig
|
|
39
|
-
// },
|
|
40
|
-
eventEmitter: (_event, _payload) => {
|
|
41
|
-
// TODO: forward workflow events to telemetry or logging sinks
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
export { generateWorkflowRunnerTemplate };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { escapeString, toPascalCase } from "./utils.js";
|
|
2
|
-
|
|
3
|
-
//#region ../../modules/contractspec-workspace/dist/templates/workflow.js
|
|
4
|
-
/**
|
|
5
|
-
* Generate workflow spec TypeScript code.
|
|
6
|
-
*/
|
|
7
|
-
function generateWorkflowSpec(data) {
|
|
8
|
-
const specVarName = toPascalCase(data.name.split(".").pop() ?? "Workflow") + "Workflow";
|
|
9
|
-
const stepsCode = data.steps.map((step) => formatStep(step)).join(",\n");
|
|
10
|
-
const transitionsCode = data.transitions.map((transition) => ` {
|
|
11
|
-
from: '${transition.from}',
|
|
12
|
-
to: '${transition.to}',
|
|
13
|
-
${transition.condition ? ` condition: '${escapeString(transition.condition)}',` : ""}
|
|
14
|
-
}`).join(",\n");
|
|
15
|
-
return `import type { WorkflowSpec } from '@lssm/lib.contracts/workflow';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Workflow generated via contractspec CLI.
|
|
19
|
-
* TODO:
|
|
20
|
-
* - Review step definitions and descriptions.
|
|
21
|
-
* - Wire automation steps to actual operations.
|
|
22
|
-
* - Provide form renderers for human steps.
|
|
23
|
-
* - Add guards/conditions as needed.
|
|
24
|
-
*/
|
|
25
|
-
export const ${specVarName}: WorkflowSpec = {
|
|
26
|
-
meta: {
|
|
27
|
-
name: '${data.name}',
|
|
28
|
-
version: ${data.version},
|
|
29
|
-
title: '${escapeString(data.title)}',
|
|
30
|
-
description: '${escapeString(data.description)}',
|
|
31
|
-
domain: '${escapeString(data.domain)}',
|
|
32
|
-
stability: '${data.stability}',
|
|
33
|
-
owners: [${data.owners.map((owner) => `'${owner}'`).join(", ")}],
|
|
34
|
-
tags: [${data.tags.map((tag) => `'${tag}'`).join(", ")}],
|
|
35
|
-
},
|
|
36
|
-
definition: {
|
|
37
|
-
${data.entryStepId ? ` entryStepId: '${data.entryStepId}',\n` : ""} steps: [
|
|
38
|
-
${stepsCode}
|
|
39
|
-
],
|
|
40
|
-
transitions: [
|
|
41
|
-
${transitionsCode}
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
${data.policyFlags.length > 0 ? `policy: {
|
|
45
|
-
flags: [${data.policyFlags.map((flag) => `'${flag}'`).join(", ")}],
|
|
46
|
-
},` : "// policy: { flags: [] },"}
|
|
47
|
-
};
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
function formatStep(step) {
|
|
51
|
-
const lines = [
|
|
52
|
-
` {`,
|
|
53
|
-
` id: '${step.id}',`,
|
|
54
|
-
` type: '${step.type}',`,
|
|
55
|
-
` label: '${escapeString(step.label)}',`
|
|
56
|
-
];
|
|
57
|
-
if (step.description) lines.push(` description: '${escapeString(step.description)}',`);
|
|
58
|
-
const actionLines = [];
|
|
59
|
-
if (step.operation) actionLines.push(`operation: { name: '${step.operation.name}', version: ${step.operation.version} }`);
|
|
60
|
-
if (step.form) actionLines.push(`form: { key: '${step.form.key}', version: ${step.form.version} }`);
|
|
61
|
-
if (actionLines.length) lines.push(` action: { ${actionLines.join(", ")} },`);
|
|
62
|
-
lines.push(` }`);
|
|
63
|
-
return lines.join("\n");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
//#endregion
|
|
67
|
-
export { generateWorkflowSpec };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region ../../modules/contractspec-workspace/dist/types/generation-types.js
|
|
2
|
-
/**
|
|
3
|
-
* Default workspace configuration.
|
|
4
|
-
*/
|
|
5
|
-
const DEFAULT_WORKSPACE_CONFIG = {
|
|
6
|
-
aiProvider: "claude",
|
|
7
|
-
agentMode: "simple",
|
|
8
|
-
outputDir: "./src",
|
|
9
|
-
conventions: {
|
|
10
|
-
operations: "interactions/commands|queries",
|
|
11
|
-
events: "events",
|
|
12
|
-
presentations: "presentations",
|
|
13
|
-
forms: "forms"
|
|
14
|
-
},
|
|
15
|
-
defaultOwners: [],
|
|
16
|
-
defaultTags: []
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { DEFAULT_WORKSPACE_CONFIG };
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { AGENT_SYSTEM_PROMPTS } from "../../../libs/contracts/dist/llm/prompts.js";
|
|
2
|
-
import "../../../libs/contracts/dist/llm/index.js";
|
|
3
|
-
|
|
4
|
-
//#region src/services/agent-guide/adapters/claude-code.ts
|
|
5
|
-
/**
|
|
6
|
-
* Claude Code adapter implementation.
|
|
7
|
-
* Optimized for Claude's extended thinking and code generation capabilities.
|
|
8
|
-
*/
|
|
9
|
-
var ClaudeCodeAdapter = class {
|
|
10
|
-
agentType = "claude-code";
|
|
11
|
-
/**
|
|
12
|
-
* Format an implementation plan for Claude Code.
|
|
13
|
-
* Uses structured markdown with clear sections and checklists.
|
|
14
|
-
*/
|
|
15
|
-
formatPlan(plan) {
|
|
16
|
-
const lines = [];
|
|
17
|
-
lines.push(`# Implement: ${plan.target.name}.v${plan.target.version}`);
|
|
18
|
-
lines.push("");
|
|
19
|
-
lines.push("## Context");
|
|
20
|
-
lines.push("");
|
|
21
|
-
lines.push(`**Goal:** ${plan.context.goal}`);
|
|
22
|
-
lines.push("");
|
|
23
|
-
lines.push(`**Description:** ${plan.context.description}`);
|
|
24
|
-
lines.push("");
|
|
25
|
-
if (plan.context.background) {
|
|
26
|
-
lines.push(`**Background:**`);
|
|
27
|
-
lines.push(plan.context.background);
|
|
28
|
-
lines.push("");
|
|
29
|
-
}
|
|
30
|
-
lines.push("## Specification");
|
|
31
|
-
lines.push("");
|
|
32
|
-
lines.push(plan.specMarkdown);
|
|
33
|
-
lines.push("");
|
|
34
|
-
if (plan.fileStructure.length > 0) {
|
|
35
|
-
lines.push("## Files to Create/Modify");
|
|
36
|
-
lines.push("");
|
|
37
|
-
for (const file of plan.fileStructure) {
|
|
38
|
-
const icon = file.type === "create" ? "📝" : "✏️";
|
|
39
|
-
lines.push(`${icon} \`${file.path}\``);
|
|
40
|
-
lines.push(` ${file.purpose}`);
|
|
41
|
-
lines.push("");
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
lines.push("## Implementation Steps");
|
|
45
|
-
lines.push("");
|
|
46
|
-
for (const step of plan.steps) {
|
|
47
|
-
lines.push(`### ${step.order}. ${step.title}`);
|
|
48
|
-
lines.push("");
|
|
49
|
-
lines.push(step.description);
|
|
50
|
-
lines.push("");
|
|
51
|
-
lines.push("**Acceptance Criteria:**");
|
|
52
|
-
for (const criteria of step.acceptanceCriteria) lines.push(`- [ ] ${criteria}`);
|
|
53
|
-
lines.push("");
|
|
54
|
-
}
|
|
55
|
-
if (plan.constraints.policy.length > 0 || plan.constraints.security.length > 0 || plan.constraints.pii.length > 0) {
|
|
56
|
-
lines.push("## Constraints");
|
|
57
|
-
lines.push("");
|
|
58
|
-
if (plan.constraints.policy.length > 0) {
|
|
59
|
-
lines.push("### Policy");
|
|
60
|
-
for (const p of plan.constraints.policy) lines.push(`- ${p}`);
|
|
61
|
-
lines.push("");
|
|
62
|
-
}
|
|
63
|
-
if (plan.constraints.security.length > 0) {
|
|
64
|
-
lines.push("### Security");
|
|
65
|
-
for (const s of plan.constraints.security) lines.push(`- ⚠️ ${s}`);
|
|
66
|
-
lines.push("");
|
|
67
|
-
}
|
|
68
|
-
if (plan.constraints.pii.length > 0) {
|
|
69
|
-
lines.push("### PII Handling");
|
|
70
|
-
lines.push("The following fields contain personally identifiable information:");
|
|
71
|
-
for (const pii of plan.constraints.pii) lines.push(`- \`${pii}\``);
|
|
72
|
-
lines.push("");
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
lines.push("## Verification Checklist");
|
|
76
|
-
lines.push("");
|
|
77
|
-
lines.push("Before submitting, verify:");
|
|
78
|
-
for (const check of plan.verificationChecklist) lines.push(`- [ ] ${check}`);
|
|
79
|
-
lines.push("");
|
|
80
|
-
lines.push("## Instructions");
|
|
81
|
-
lines.push("");
|
|
82
|
-
lines.push("1. Implement each step in order");
|
|
83
|
-
lines.push("2. Use TypeScript with strict typing (no `any`)");
|
|
84
|
-
lines.push("3. Include JSDoc comments for public APIs");
|
|
85
|
-
lines.push("4. Handle all error cases defined in the spec");
|
|
86
|
-
lines.push("5. Emit events as specified");
|
|
87
|
-
lines.push("6. Mark checklist items as you complete them");
|
|
88
|
-
lines.push("");
|
|
89
|
-
return {
|
|
90
|
-
agent: "claude-code",
|
|
91
|
-
systemPrompt: AGENT_SYSTEM_PROMPTS["claude-code"],
|
|
92
|
-
taskPrompt: lines.join("\n")
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Generate agent-specific configuration.
|
|
97
|
-
* For Claude Code, this generates a prompt that can be used as context.
|
|
98
|
-
*/
|
|
99
|
-
generateConfig(spec) {
|
|
100
|
-
const lines = [];
|
|
101
|
-
lines.push("# ContractSpec Implementation Context");
|
|
102
|
-
lines.push("");
|
|
103
|
-
lines.push("This codebase uses ContractSpec for spec-first development.");
|
|
104
|
-
lines.push("");
|
|
105
|
-
lines.push("## Spec Details");
|
|
106
|
-
lines.push("");
|
|
107
|
-
lines.push(`- **Name:** ${spec.meta.name}`);
|
|
108
|
-
lines.push(`- **Version:** ${spec.meta.version}`);
|
|
109
|
-
lines.push(`- **Kind:** ${spec.meta.kind}`);
|
|
110
|
-
lines.push(`- **Stability:** ${spec.meta.stability}`);
|
|
111
|
-
lines.push("");
|
|
112
|
-
lines.push("## Implementation Requirements");
|
|
113
|
-
lines.push("");
|
|
114
|
-
lines.push("1. Match input/output types exactly");
|
|
115
|
-
lines.push("2. Handle all defined error cases");
|
|
116
|
-
lines.push("3. Emit events as specified");
|
|
117
|
-
lines.push("4. Respect policy constraints");
|
|
118
|
-
lines.push("");
|
|
119
|
-
return lines.join("\n");
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Parse Claude Code output to extract generated code.
|
|
123
|
-
*/
|
|
124
|
-
parseOutput(output) {
|
|
125
|
-
const codeBlockMatch = output.match(/```(?:typescript|ts|tsx)?\n([\s\S]*?)\n```/);
|
|
126
|
-
if (codeBlockMatch?.[1]) return { code: codeBlockMatch[1] };
|
|
127
|
-
const errors = [];
|
|
128
|
-
for (const pattern of [
|
|
129
|
-
/error:\s*(.+)/gi,
|
|
130
|
-
/failed:\s*(.+)/gi,
|
|
131
|
-
/cannot\s+(.+)/gi
|
|
132
|
-
]) {
|
|
133
|
-
const matches = output.matchAll(pattern);
|
|
134
|
-
for (const match of matches) if (match[1]) errors.push(match[1]);
|
|
135
|
-
}
|
|
136
|
-
if (errors.length > 0) return { errors };
|
|
137
|
-
return { code: output };
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
/** Singleton instance */
|
|
141
|
-
const claudeCodeAdapter = new ClaudeCodeAdapter();
|
|
142
|
-
|
|
143
|
-
//#endregion
|
|
144
|
-
export { ClaudeCodeAdapter, claudeCodeAdapter };
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { AGENT_SYSTEM_PROMPTS } from "../../../libs/contracts/dist/llm/prompts.js";
|
|
2
|
-
import "../../../libs/contracts/dist/llm/index.js";
|
|
3
|
-
|
|
4
|
-
//#region src/services/agent-guide/adapters/cursor-cli.ts
|
|
5
|
-
/**
|
|
6
|
-
* Cursor CLI adapter implementation.
|
|
7
|
-
* Optimized for Cursor's background/composer mode.
|
|
8
|
-
*/
|
|
9
|
-
var CursorCLIAdapter = class {
|
|
10
|
-
agentType = "cursor-cli";
|
|
11
|
-
/**
|
|
12
|
-
* Format an implementation plan for Cursor CLI.
|
|
13
|
-
* Uses concise format optimized for Cursor's context window.
|
|
14
|
-
*/
|
|
15
|
-
formatPlan(plan) {
|
|
16
|
-
const lines = [];
|
|
17
|
-
lines.push(`# ${plan.target.name}.v${plan.target.version}`);
|
|
18
|
-
lines.push("");
|
|
19
|
-
lines.push(`> ${plan.context.goal}`);
|
|
20
|
-
lines.push("");
|
|
21
|
-
if (plan.fileStructure.length > 0) {
|
|
22
|
-
lines.push("## Files");
|
|
23
|
-
lines.push("");
|
|
24
|
-
for (const file of plan.fileStructure) lines.push(`- ${file.type}: \`${file.path}\` - ${file.purpose}`);
|
|
25
|
-
lines.push("");
|
|
26
|
-
}
|
|
27
|
-
lines.push("## Spec");
|
|
28
|
-
lines.push("");
|
|
29
|
-
lines.push(plan.specMarkdown);
|
|
30
|
-
lines.push("");
|
|
31
|
-
lines.push("## Steps");
|
|
32
|
-
lines.push("");
|
|
33
|
-
for (const step of plan.steps) lines.push(`${step.order}. **${step.title}**: ${step.description}`);
|
|
34
|
-
lines.push("");
|
|
35
|
-
const constraints = [...plan.constraints.policy, ...plan.constraints.security.map((s) => `⚠️ ${s}`)];
|
|
36
|
-
if (constraints.length > 0) {
|
|
37
|
-
lines.push("## Constraints");
|
|
38
|
-
lines.push("");
|
|
39
|
-
for (const c of constraints) lines.push(`- ${c}`);
|
|
40
|
-
lines.push("");
|
|
41
|
-
}
|
|
42
|
-
if (plan.constraints.pii.length > 0) {
|
|
43
|
-
lines.push("## PII Fields");
|
|
44
|
-
lines.push("");
|
|
45
|
-
lines.push(`Handle carefully: ${plan.constraints.pii.map((p) => `\`${p}\``).join(", ")}`);
|
|
46
|
-
lines.push("");
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
agent: "cursor-cli",
|
|
50
|
-
systemPrompt: AGENT_SYSTEM_PROMPTS["cursor-cli"],
|
|
51
|
-
taskPrompt: lines.join("\n")
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Generate Cursor rules (.mdc format) for a spec.
|
|
56
|
-
* Can be saved to .cursor/rules/ to provide persistent context.
|
|
57
|
-
*/
|
|
58
|
-
generateConfig(spec) {
|
|
59
|
-
const m = spec.meta;
|
|
60
|
-
const lines = [];
|
|
61
|
-
lines.push("---");
|
|
62
|
-
lines.push(`description: Implementation rules for ${m.name}.v${m.version}`);
|
|
63
|
-
lines.push(`globs: ["**/${m.name.replace(/\./g, "/")}/**"]`);
|
|
64
|
-
lines.push("alwaysApply: false");
|
|
65
|
-
lines.push("---");
|
|
66
|
-
lines.push("");
|
|
67
|
-
lines.push(`# ${m.name} Implementation Rules`);
|
|
68
|
-
lines.push("");
|
|
69
|
-
lines.push(`This ${m.kind} operation must follow the ContractSpec specification.`);
|
|
70
|
-
lines.push("");
|
|
71
|
-
lines.push("## Goal");
|
|
72
|
-
lines.push("");
|
|
73
|
-
lines.push(m.goal);
|
|
74
|
-
lines.push("");
|
|
75
|
-
lines.push("## Requirements");
|
|
76
|
-
lines.push("");
|
|
77
|
-
lines.push("1. Input/output types MUST match the spec schema exactly");
|
|
78
|
-
lines.push("2. All error cases MUST be handled");
|
|
79
|
-
if (spec.sideEffects?.emits?.length) lines.push("3. Events MUST be emitted as specified");
|
|
80
|
-
lines.push(`4. Auth level: ${spec.policy.auth}`);
|
|
81
|
-
if (spec.policy.idempotent !== void 0) lines.push(`5. Idempotency: ${spec.policy.idempotent}`);
|
|
82
|
-
lines.push("");
|
|
83
|
-
if (spec.io.errors && Object.keys(spec.io.errors).length > 0) {
|
|
84
|
-
lines.push("## Error Cases");
|
|
85
|
-
lines.push("");
|
|
86
|
-
for (const [code, err] of Object.entries(spec.io.errors)) lines.push(`- \`${code}\` (HTTP ${err.http ?? 400}): ${err.when}`);
|
|
87
|
-
lines.push("");
|
|
88
|
-
}
|
|
89
|
-
if (spec.sideEffects?.emits?.length) {
|
|
90
|
-
lines.push("## Events to Emit");
|
|
91
|
-
lines.push("");
|
|
92
|
-
for (const e of spec.sideEffects.emits) if ("ref" in e) lines.push(`- \`${e.ref.name}.v${e.ref.version}\`: ${e.when}`);
|
|
93
|
-
else lines.push(`- \`${e.name}.v${e.version}\`: ${e.when}`);
|
|
94
|
-
lines.push("");
|
|
95
|
-
}
|
|
96
|
-
if (spec.policy.pii?.length) {
|
|
97
|
-
lines.push("## PII Handling");
|
|
98
|
-
lines.push("");
|
|
99
|
-
lines.push("These fields contain PII and must be handled with care:");
|
|
100
|
-
for (const field of spec.policy.pii) lines.push(`- \`${field}\``);
|
|
101
|
-
lines.push("");
|
|
102
|
-
}
|
|
103
|
-
if (spec.acceptance?.scenarios?.length) {
|
|
104
|
-
lines.push("## Acceptance Scenarios");
|
|
105
|
-
lines.push("");
|
|
106
|
-
for (const s of spec.acceptance.scenarios) {
|
|
107
|
-
lines.push(`### ${s.name}`);
|
|
108
|
-
lines.push(`- Given: ${s.given.join("; ")}`);
|
|
109
|
-
lines.push(`- When: ${s.when.join("; ")}`);
|
|
110
|
-
lines.push(`- Then: ${s.then.join("; ")}`);
|
|
111
|
-
lines.push("");
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return lines.join("\n");
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Generate a cursor rules file path for a spec.
|
|
118
|
-
*/
|
|
119
|
-
getCursorRulesPath(spec) {
|
|
120
|
-
return `.cursor/rules/${spec.meta.name.replace(/\./g, "-")}.mdc`;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Parse Cursor output to extract generated code.
|
|
124
|
-
*/
|
|
125
|
-
parseOutput(output) {
|
|
126
|
-
const codeBlockMatch = output.match(/```(?:typescript|ts|tsx|javascript|js)?\n([\s\S]*?)\n```/);
|
|
127
|
-
if (codeBlockMatch?.[1]) return { code: codeBlockMatch[1] };
|
|
128
|
-
return { code: output };
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
/** Singleton instance */
|
|
132
|
-
const cursorCLIAdapter = new CursorCLIAdapter();
|
|
133
|
-
|
|
134
|
-
//#endregion
|
|
135
|
-
export { CursorCLIAdapter, cursorCLIAdapter };
|