@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,102 +0,0 @@
|
|
|
1
|
-
import { detectPackageManager, findPackageRoot, findWorkspaceRoot, getWorkspaceInfo } from "../adapters/workspace.js";
|
|
2
|
-
|
|
3
|
-
//#region src/services/workspace-info.ts
|
|
4
|
-
/**
|
|
5
|
-
* Workspace info service.
|
|
6
|
-
*
|
|
7
|
-
* Provides workspace detection and configuration loading
|
|
8
|
-
* with support for monorepos.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Get extended workspace information including config paths.
|
|
12
|
-
*/
|
|
13
|
-
async function getExtendedWorkspaceInfo(fs, startDir) {
|
|
14
|
-
const baseInfo = getWorkspaceInfo(startDir);
|
|
15
|
-
const workspaceConfigPath = fs.join(baseInfo.workspaceRoot, ".contractsrc.json");
|
|
16
|
-
const packageConfigPath = fs.join(baseInfo.packageRoot, ".contractsrc.json");
|
|
17
|
-
const hasWorkspaceConfig = await fs.exists(workspaceConfigPath);
|
|
18
|
-
const hasPackageConfig = baseInfo.workspaceRoot !== baseInfo.packageRoot ? await fs.exists(packageConfigPath) : false;
|
|
19
|
-
let monorepoConfig;
|
|
20
|
-
if (hasWorkspaceConfig) try {
|
|
21
|
-
const content = await fs.readFile(workspaceConfigPath);
|
|
22
|
-
const config = JSON.parse(content);
|
|
23
|
-
if (config.packages || config.excludePackages || config.recursive) monorepoConfig = {
|
|
24
|
-
packages: config.packages,
|
|
25
|
-
excludePackages: config.excludePackages,
|
|
26
|
-
recursive: config.recursive
|
|
27
|
-
};
|
|
28
|
-
} catch {}
|
|
29
|
-
return {
|
|
30
|
-
...baseInfo,
|
|
31
|
-
monorepoConfig,
|
|
32
|
-
workspaceConfigPath: hasWorkspaceConfig ? workspaceConfigPath : void 0,
|
|
33
|
-
packageConfigPath: hasPackageConfig ? packageConfigPath : void 0
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Find all .contractsrc.json files in a monorepo.
|
|
38
|
-
*
|
|
39
|
-
* Returns paths in order of priority (workspace first, then packages).
|
|
40
|
-
*/
|
|
41
|
-
async function findAllConfigFiles(fs, workspaceRoot) {
|
|
42
|
-
const configFiles = [];
|
|
43
|
-
const rootConfig = fs.join(workspaceRoot, ".contractsrc.json");
|
|
44
|
-
if (await fs.exists(rootConfig)) configFiles.push(rootConfig);
|
|
45
|
-
const packageConfigs = await fs.glob({
|
|
46
|
-
pattern: "**/.contractsrc.json",
|
|
47
|
-
ignore: ["node_modules/**", ".git/**"]
|
|
48
|
-
});
|
|
49
|
-
for (const config of packageConfigs) if (config !== rootConfig) configFiles.push(config);
|
|
50
|
-
return configFiles;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Merge workspace and package configurations.
|
|
54
|
-
*
|
|
55
|
-
* Package config overrides workspace config.
|
|
56
|
-
*/
|
|
57
|
-
async function mergeMonorepoConfigs(fs, workspaceConfigPath, packageConfigPath) {
|
|
58
|
-
let merged = {};
|
|
59
|
-
if (workspaceConfigPath && await fs.exists(workspaceConfigPath)) try {
|
|
60
|
-
const content = await fs.readFile(workspaceConfigPath);
|
|
61
|
-
merged = JSON.parse(content);
|
|
62
|
-
} catch {}
|
|
63
|
-
if (packageConfigPath && await fs.exists(packageConfigPath)) try {
|
|
64
|
-
const content = await fs.readFile(packageConfigPath);
|
|
65
|
-
const packageConfig = JSON.parse(content);
|
|
66
|
-
merged = deepMerge(merged, packageConfig);
|
|
67
|
-
} catch {}
|
|
68
|
-
return merged;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Deep merge two objects.
|
|
72
|
-
*/
|
|
73
|
-
function deepMerge(base, override) {
|
|
74
|
-
const result = { ...base };
|
|
75
|
-
for (const key of Object.keys(override)) {
|
|
76
|
-
const baseValue = base[key];
|
|
77
|
-
const overrideValue = override[key];
|
|
78
|
-
if (typeof baseValue === "object" && baseValue !== null && !Array.isArray(baseValue) && typeof overrideValue === "object" && overrideValue !== null && !Array.isArray(overrideValue)) result[key] = deepMerge(baseValue, overrideValue);
|
|
79
|
-
else result[key] = overrideValue;
|
|
80
|
-
}
|
|
81
|
-
return result;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Format workspace info for display.
|
|
85
|
-
*/
|
|
86
|
-
function formatWorkspaceInfo(info) {
|
|
87
|
-
const lines = [];
|
|
88
|
-
lines.push(`Package Manager: ${info.packageManager}`);
|
|
89
|
-
lines.push(`Workspace Root: ${info.workspaceRoot}`);
|
|
90
|
-
if (info.isMonorepo) {
|
|
91
|
-
lines.push(`Monorepo: Yes`);
|
|
92
|
-
lines.push(`Package Root: ${info.packageRoot}`);
|
|
93
|
-
if (info.packageName) lines.push(`Current Package: ${info.packageName}`);
|
|
94
|
-
if (info.packages && info.packages.length > 0) lines.push(`Package Patterns: ${info.packages.join(", ")}`);
|
|
95
|
-
} else lines.push(`Monorepo: No`);
|
|
96
|
-
if (info.workspaceConfigPath) lines.push(`Workspace Config: ${info.workspaceConfigPath}`);
|
|
97
|
-
if (info.packageConfigPath) lines.push(`Package Config: ${info.packageConfigPath}`);
|
|
98
|
-
return lines.join("\n");
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
//#endregion
|
|
102
|
-
export { findAllConfigFiles, formatWorkspaceInfo, getExtendedWorkspaceInfo, mergeMonorepoConfigs };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
//#region src/templates/app-config.template.ts
|
|
2
|
-
function generateAppBlueprintSpec(data) {
|
|
3
|
-
const exportName = toPascalCase(data.name.split(".").pop() ?? "App") + "AppConfig";
|
|
4
|
-
const capabilitiesSection = buildCapabilitiesSection(data);
|
|
5
|
-
const featuresSection = buildFeaturesSection(data);
|
|
6
|
-
const dataViewsSection = buildMappingSection("dataViews", data.dataViews);
|
|
7
|
-
const workflowsSection = buildMappingSection("workflows", data.workflows);
|
|
8
|
-
const policiesSection = buildPolicySection(data);
|
|
9
|
-
const themeSection = buildThemeSection(data);
|
|
10
|
-
const telemetrySection = buildTelemetrySection(data);
|
|
11
|
-
const experimentsSection = buildExperimentsSection(data);
|
|
12
|
-
const flagsSection = buildFeatureFlagsSection(data);
|
|
13
|
-
const routesSection = buildRoutesSection(data);
|
|
14
|
-
const notesSection = data.notes ? ` notes: '${escapeString(data.notes)}',\n` : "";
|
|
15
|
-
return `import type { AppBlueprintSpec } from '@lssm/lib.contracts/app-config';
|
|
16
|
-
|
|
17
|
-
export const ${exportName}: AppBlueprintSpec = {
|
|
18
|
-
meta: {
|
|
19
|
-
name: '${escapeString(data.name)}',
|
|
20
|
-
version: ${data.version},
|
|
21
|
-
title: '${escapeString(data.title)}',
|
|
22
|
-
description: '${escapeString(data.description)}',
|
|
23
|
-
domain: '${escapeString(data.domain)}',
|
|
24
|
-
owners: [${data.owners.map((owner) => `'${escapeString(owner)}'`).join(", ")}],
|
|
25
|
-
tags: [${data.tags.map((tag) => `'${escapeString(tag)}'`).join(", ")}],
|
|
26
|
-
stability: '${data.stability}',
|
|
27
|
-
appId: '${escapeString(data.appId)}',
|
|
28
|
-
},
|
|
29
|
-
${capabilitiesSection}${featuresSection}${dataViewsSection}${workflowsSection}${policiesSection}${themeSection}${telemetrySection}${experimentsSection}${flagsSection}${routesSection}${notesSection}};\n`;
|
|
30
|
-
}
|
|
31
|
-
function buildCapabilitiesSection(data) {
|
|
32
|
-
if (data.capabilitiesEnabled.length === 0 && data.capabilitiesDisabled.length === 0) return "";
|
|
33
|
-
return ` capabilities: {\n${data.capabilitiesEnabled.length > 0 ? ` enabled: [${data.capabilitiesEnabled.map((key) => formatCapabilityRef(key)).join(", ")}],\n` : ""}${data.capabilitiesDisabled.length > 0 ? ` disabled: [${data.capabilitiesDisabled.map((key) => formatCapabilityRef(key)).join(", ")}],\n` : ""} },\n`;
|
|
34
|
-
}
|
|
35
|
-
function buildFeaturesSection(data) {
|
|
36
|
-
if (data.featureIncludes.length === 0 && data.featureExcludes.length === 0) return "";
|
|
37
|
-
return ` features: {\n${data.featureIncludes.length > 0 ? ` include: [${data.featureIncludes.map((key) => `{ key: '${escapeString(key)}' }`).join(", ")}],\n` : ""}${data.featureExcludes.length > 0 ? ` exclude: [${data.featureExcludes.map((key) => `{ key: '${escapeString(key)}' }`).join(", ")}],\n` : ""} },\n`;
|
|
38
|
-
}
|
|
39
|
-
function buildMappingSection(prop, mappings) {
|
|
40
|
-
if (mappings.length === 0) return "";
|
|
41
|
-
return ` ${prop}: {\n${mappings.map((mapping) => ` ${mapping.slot}: {
|
|
42
|
-
name: '${escapeString(mapping.name)}',
|
|
43
|
-
${typeof mapping.version === "number" ? `version: ${mapping.version},` : ""}
|
|
44
|
-
}`).join(",\n")}\n },\n`;
|
|
45
|
-
}
|
|
46
|
-
function buildPolicySection(data) {
|
|
47
|
-
if (data.policyRefs.length === 0) return "";
|
|
48
|
-
return ` policies: [\n${data.policyRefs.map((policy) => ` {
|
|
49
|
-
name: '${escapeString(policy.name)}'${typeof policy.version === "number" ? `,\n version: ${policy.version}` : ""}
|
|
50
|
-
}`).join(",\n")}\n ],\n`;
|
|
51
|
-
}
|
|
52
|
-
function buildThemeSection(data) {
|
|
53
|
-
if (!data.theme) return "";
|
|
54
|
-
return ` theme: {\n${` primary: { name: '${escapeString(data.theme.name)}', version: ${data.theme.version} },\n`}${data.themeFallbacks.length > 0 ? ` fallbacks: [${data.themeFallbacks.map((theme) => `{ name: '${escapeString(theme.name)}', version: ${theme.version} }`).join(", ")}],\n` : ""} },\n`;
|
|
55
|
-
}
|
|
56
|
-
function buildTelemetrySection(data) {
|
|
57
|
-
if (!data.telemetry) return "";
|
|
58
|
-
return ` telemetry: {
|
|
59
|
-
spec: {
|
|
60
|
-
name: '${escapeString(data.telemetry.name)}'${typeof data.telemetry.version === "number" ? `,\n version: ${data.telemetry.version}` : ""}
|
|
61
|
-
},
|
|
62
|
-
},\n`;
|
|
63
|
-
}
|
|
64
|
-
function buildExperimentsSection(data) {
|
|
65
|
-
if (data.activeExperiments.length === 0 && data.pausedExperiments.length === 0) return "";
|
|
66
|
-
return ` experiments: {\n${data.activeExperiments.length > 0 ? ` active: [${data.activeExperiments.map((exp) => formatExperimentRef(exp)).join(", ")}],\n` : ""}${data.pausedExperiments.length > 0 ? ` paused: [${data.pausedExperiments.map((exp) => formatExperimentRef(exp)).join(", ")}],\n` : ""} },\n`;
|
|
67
|
-
}
|
|
68
|
-
function buildFeatureFlagsSection(data) {
|
|
69
|
-
if (data.featureFlags.length === 0) return "";
|
|
70
|
-
return ` featureFlags: [\n${data.featureFlags.map((flag) => ` {
|
|
71
|
-
key: '${escapeString(flag.key)}',
|
|
72
|
-
enabled: ${flag.enabled},
|
|
73
|
-
${flag.variant ? `variant: '${escapeString(flag.variant)}',` : ""}
|
|
74
|
-
${flag.description ? `description: '${escapeString(flag.description)}',` : ""}
|
|
75
|
-
}`).join(",\n")}\n ],\n`;
|
|
76
|
-
}
|
|
77
|
-
function buildRoutesSection(data) {
|
|
78
|
-
if (data.routes.length === 0) return "";
|
|
79
|
-
return ` routes: [\n${data.routes.map((route) => {
|
|
80
|
-
return ` { ${[
|
|
81
|
-
`path: '${escapeString(route.path)}'`,
|
|
82
|
-
route.label ? `label: '${escapeString(route.label)}'` : null,
|
|
83
|
-
route.dataView ? `dataView: '${escapeString(route.dataView)}'` : null,
|
|
84
|
-
route.workflow ? `workflow: '${escapeString(route.workflow)}'` : null,
|
|
85
|
-
route.guardName ? `guard: { name: '${escapeString(route.guardName)}'${typeof route.guardVersion === "number" ? `, version: ${route.guardVersion}` : ""} }` : null,
|
|
86
|
-
route.featureFlag ? `featureFlag: '${escapeString(route.featureFlag)}'` : null,
|
|
87
|
-
route.experimentName ? `experiment: { name: '${escapeString(route.experimentName)}'${typeof route.experimentVersion === "number" ? `, version: ${route.experimentVersion}` : ""} }` : null
|
|
88
|
-
].filter(Boolean).join(", ")} }`;
|
|
89
|
-
}).join(",\n")}\n ],\n`;
|
|
90
|
-
}
|
|
91
|
-
function formatCapabilityRef(key) {
|
|
92
|
-
return `{ key: '${escapeString(key)}' }`;
|
|
93
|
-
}
|
|
94
|
-
function formatExperimentRef(exp) {
|
|
95
|
-
const version = typeof exp.version === "number" ? `, version: ${exp.version}` : "";
|
|
96
|
-
return `{ name: '${escapeString(exp.name)}'${version} }`;
|
|
97
|
-
}
|
|
98
|
-
function toPascalCase(value) {
|
|
99
|
-
return value.split(/[-_.]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
100
|
-
}
|
|
101
|
-
function escapeString(value) {
|
|
102
|
-
return value.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
//#endregion
|
|
106
|
-
export { generateAppBlueprintSpec };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
//#region src/templates/data-view.template.ts
|
|
2
|
-
function generateDataViewSpec(data) {
|
|
3
|
-
const viewVarName = toPascalCase(data.name.split(".").pop() ?? "DataView") + "DataView";
|
|
4
|
-
const fields = data.fields.map((field) => ` {
|
|
5
|
-
key: '${field.key}',
|
|
6
|
-
label: '${escape(field.label)}',
|
|
7
|
-
dataPath: '${field.dataPath}',
|
|
8
|
-
${field.format ? `format: '${field.format}',` : ""}
|
|
9
|
-
${field.sortable ? "sortable: true," : ""}
|
|
10
|
-
${field.filterable ? "filterable: true," : ""}
|
|
11
|
-
}`).join(",\n");
|
|
12
|
-
const secondaryFields = data.secondaryFields?.length ? `secondaryFields: [${data.secondaryFields.map((key) => `'${key}'`).join(", ")}],` : "";
|
|
13
|
-
const itemOperation = data.itemOperation ? `item: { name: '${data.itemOperation.name}', version: ${data.itemOperation.version} },` : "";
|
|
14
|
-
return `import type { DataViewSpec } from '@lssm/lib.contracts/data-views';
|
|
15
|
-
|
|
16
|
-
export const ${viewVarName}: DataViewSpec = {
|
|
17
|
-
meta: {
|
|
18
|
-
name: '${data.name}',
|
|
19
|
-
version: ${data.version},
|
|
20
|
-
entity: '${data.entity}',
|
|
21
|
-
title: '${escape(data.title)}',
|
|
22
|
-
description: '${escape(data.description || "Describe the purpose of this data view.")}',
|
|
23
|
-
domain: '${escape(data.domain || data.entity)}',
|
|
24
|
-
owners: [${data.owners.map((owner) => `'${owner}'`).join(", ")}],
|
|
25
|
-
tags: [${data.tags.map((tag) => `'${tag}'`).join(", ")}],
|
|
26
|
-
stability: '${data.stability}',
|
|
27
|
-
},
|
|
28
|
-
source: {
|
|
29
|
-
primary: {
|
|
30
|
-
name: '${data.primaryOperation.name}',
|
|
31
|
-
version: ${data.primaryOperation.version},
|
|
32
|
-
},
|
|
33
|
-
${itemOperation}
|
|
34
|
-
refreshEvents: [
|
|
35
|
-
// { name: 'entity.updated', version: 1 },
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
view: {
|
|
39
|
-
kind: '${data.kind}',
|
|
40
|
-
fields: [
|
|
41
|
-
${fields}
|
|
42
|
-
],
|
|
43
|
-
${data.primaryField ? `primaryField: '${data.primaryField}',` : ""}
|
|
44
|
-
${secondaryFields}
|
|
45
|
-
filters: [
|
|
46
|
-
// Example filter:
|
|
47
|
-
// { key: 'search', label: 'Search', field: 'fullName', type: 'search' },
|
|
48
|
-
],
|
|
49
|
-
actions: [
|
|
50
|
-
// Example action:
|
|
51
|
-
// { key: 'open', label: 'Open', kind: 'navigation' },
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
states: {
|
|
55
|
-
// empty: { name: 'app.data.empty', version: 1 },
|
|
56
|
-
// error: { name: 'app.data.error', version: 1 },
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
`;
|
|
60
|
-
}
|
|
61
|
-
function toPascalCase(value) {
|
|
62
|
-
return value.split(/[-_.]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
63
|
-
}
|
|
64
|
-
function escape(value) {
|
|
65
|
-
return value.replace(/'/g, "\\'");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
//#endregion
|
|
69
|
-
export { generateDataViewSpec };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
//#region src/templates/event.template.ts
|
|
2
|
-
/**
|
|
3
|
-
* Generate event spec TypeScript code
|
|
4
|
-
*/
|
|
5
|
-
function generateEventSpec(data) {
|
|
6
|
-
const { name, version, description, stability, owners, tags, piiFields } = data;
|
|
7
|
-
const eventVarName = toPascalCase(name.replace(/\./g, "_")) + "V" + version;
|
|
8
|
-
const payloadSchemaName = eventVarName + "Payload";
|
|
9
|
-
return `import { defineEvent } from '@lssm/lib.contracts';
|
|
10
|
-
import { ScalarTypeEnum, SchemaModel } from '@lssm/lib.schema';
|
|
11
|
-
|
|
12
|
-
// TODO: Define event payload schema
|
|
13
|
-
export const ${payloadSchemaName} = new SchemaModel({
|
|
14
|
-
name: '${payloadSchemaName}',
|
|
15
|
-
description: 'Payload for ${name}',
|
|
16
|
-
fields: {
|
|
17
|
-
// Add your payload fields here
|
|
18
|
-
// example: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const ${eventVarName} = defineEvent({
|
|
23
|
-
name: '${name}',
|
|
24
|
-
version: ${version},
|
|
25
|
-
description: '${description}',
|
|
26
|
-
stability: '${stability}',
|
|
27
|
-
owners: [${owners.map((o) => `'${o}'`).join(", ")}],
|
|
28
|
-
tags: [${tags.map((t) => `'${t}'`).join(", ")}],
|
|
29
|
-
${piiFields.length > 0 ? `pii: [${piiFields.map((f) => `'${f}'`).join(", ")}],` : "// pii: [],"}
|
|
30
|
-
payload: ${payloadSchemaName},
|
|
31
|
-
});
|
|
32
|
-
`;
|
|
33
|
-
}
|
|
34
|
-
function toPascalCase(str) {
|
|
35
|
-
return str.split(/[-_.]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
export { generateEventSpec };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
//#region src/templates/experiment.template.ts
|
|
2
|
-
function generateExperimentSpec(data) {
|
|
3
|
-
const specVar = toPascalCase(data.name.split(".").pop() ?? "Experiment") + "Experiment";
|
|
4
|
-
const variants = data.variants.map((variant) => {
|
|
5
|
-
const overrides = variant.overrides?.length ? ` overrides: [
|
|
6
|
-
${variant.overrides.map((override) => ` {
|
|
7
|
-
type: '${override.type}',
|
|
8
|
-
target: '${escapeString(override.target)}',
|
|
9
|
-
${typeof override.version === "number" ? `version: ${override.version},` : ""}
|
|
10
|
-
}`).join(",\n")}
|
|
11
|
-
],` : "";
|
|
12
|
-
return ` {
|
|
13
|
-
id: '${escapeString(variant.id)}',
|
|
14
|
-
name: '${escapeString(variant.name)}',
|
|
15
|
-
${variant.description ? `description: '${escapeString(variant.description)}',` : ""}
|
|
16
|
-
${typeof variant.weight === "number" ? `weight: ${variant.weight},` : ""}
|
|
17
|
-
${overrides}
|
|
18
|
-
}`;
|
|
19
|
-
}).join(",\n");
|
|
20
|
-
const allocation = renderAllocation(data.allocation);
|
|
21
|
-
const metrics = data.successMetrics?.length ? ` successMetrics: [
|
|
22
|
-
${data.successMetrics.map((metric) => ` {
|
|
23
|
-
name: '${escapeString(metric.name)}',
|
|
24
|
-
telemetryEvent: { name: '${escapeString(metric.eventName)}', version: ${metric.eventVersion} },
|
|
25
|
-
aggregation: '${metric.aggregation}',
|
|
26
|
-
${typeof metric.target === "number" ? `target: ${metric.target},` : ""}
|
|
27
|
-
}`).join(",\n")}
|
|
28
|
-
],` : "";
|
|
29
|
-
return `import type { ExperimentSpec } from '@lssm/lib.contracts/experiments';
|
|
30
|
-
|
|
31
|
-
export const ${specVar}: ExperimentSpec = {
|
|
32
|
-
meta: {
|
|
33
|
-
name: '${escapeString(data.name)}',
|
|
34
|
-
version: ${data.version},
|
|
35
|
-
title: '${escapeString(data.name)} experiment',
|
|
36
|
-
description: '${escapeString(data.description || "Describe the experiment goal.")}',
|
|
37
|
-
domain: '${escapeString(data.domain)}',
|
|
38
|
-
owners: [${data.owners.map((owner) => `'${escapeString(owner)}'`).join(", ")}],
|
|
39
|
-
tags: [${data.tags.map((tag) => `'${escapeString(tag)}'`).join(", ")}],
|
|
40
|
-
stability: '${data.stability}',
|
|
41
|
-
},
|
|
42
|
-
controlVariant: '${escapeString(data.controlVariant)}',
|
|
43
|
-
variants: [
|
|
44
|
-
${variants}
|
|
45
|
-
],
|
|
46
|
-
allocation: ${allocation},
|
|
47
|
-
${metrics}
|
|
48
|
-
};
|
|
49
|
-
`;
|
|
50
|
-
}
|
|
51
|
-
function renderAllocation(allocation) {
|
|
52
|
-
switch (allocation.type) {
|
|
53
|
-
case "random": return `{
|
|
54
|
-
type: 'random',
|
|
55
|
-
${allocation.salt ? `salt: '${escapeString(allocation.salt)}',` : ""}
|
|
56
|
-
}`;
|
|
57
|
-
case "sticky": return `{
|
|
58
|
-
type: 'sticky',
|
|
59
|
-
attribute: '${allocation.attribute}',
|
|
60
|
-
${allocation.salt ? `salt: '${escapeString(allocation.salt)}',` : ""}
|
|
61
|
-
}`;
|
|
62
|
-
case "targeted": return `{
|
|
63
|
-
type: 'targeted',
|
|
64
|
-
rules: [
|
|
65
|
-
${allocation.rules.map((rule) => ` {
|
|
66
|
-
variantId: '${escapeString(rule.variantId)}',
|
|
67
|
-
${typeof rule.percentage === "number" ? `percentage: ${rule.percentage},` : ""}
|
|
68
|
-
${rule.policy ? `policy: { name: '${escapeString(rule.policy.name)}'${typeof rule.policy.version === "number" ? `, version: ${rule.policy.version}` : ""} },` : ""}
|
|
69
|
-
${rule.expression ? `expression: '${escapeString(rule.expression)}',` : ""}
|
|
70
|
-
}`).join(",\n")}
|
|
71
|
-
],
|
|
72
|
-
fallback: '${allocation.fallback ?? "control"}',
|
|
73
|
-
}`;
|
|
74
|
-
default: return renderUnsupportedAllocation(allocation);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
function toPascalCase(value) {
|
|
78
|
-
return value.split(/[-_.]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
79
|
-
}
|
|
80
|
-
function escapeString(value) {
|
|
81
|
-
return value.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
82
|
-
}
|
|
83
|
-
function renderUnsupportedAllocation(allocation) {
|
|
84
|
-
throw new Error(`Unsupported allocation type ${allocation}`);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
//#endregion
|
|
88
|
-
export { generateExperimentSpec };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
//#region src/templates/handler.template.ts
|
|
2
|
-
/**
|
|
3
|
-
* Generate handler implementation template
|
|
4
|
-
*/
|
|
5
|
-
function generateHandlerTemplate(specName, kind) {
|
|
6
|
-
const handlerName = toCamelCase(specName.split(".").pop() || "unknown") + "Handler";
|
|
7
|
-
const specVarName = toPascalCase(specName.split(".").pop() || "Unknown") + "Spec";
|
|
8
|
-
return `import type { ContractHandler } from '@lssm/lib.contracts';
|
|
9
|
-
import { ${specVarName} } from '../contracts/${toKebabCase(specName)}.contracts';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Handler for ${specName}
|
|
13
|
-
*/
|
|
14
|
-
export const ${handlerName}: ContractHandler<typeof ${specVarName}> = async (
|
|
15
|
-
input,
|
|
16
|
-
context
|
|
17
|
-
) => {
|
|
18
|
-
// TODO: Implement ${kind} logic
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
// 1. Validate prerequisites
|
|
22
|
-
// 2. Perform business logic
|
|
23
|
-
// 3. Emit events if needed
|
|
24
|
-
// 4. Return result
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
ok: true,
|
|
28
|
-
};
|
|
29
|
-
} catch (error) {
|
|
30
|
-
// Handle and map errors to spec.io.errors
|
|
31
|
-
throw error;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Generate component template
|
|
38
|
-
*/
|
|
39
|
-
function generateComponentTemplate(componentName, description) {
|
|
40
|
-
const pascalName = toPascalCase(componentName);
|
|
41
|
-
return `import React from 'react';
|
|
42
|
-
|
|
43
|
-
interface ${pascalName}Props {
|
|
44
|
-
// TODO: Define props based on presentation spec
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* ${description}
|
|
49
|
-
*/
|
|
50
|
-
export const ${pascalName}: React.FC<${pascalName}Props> = (props) => {
|
|
51
|
-
return (
|
|
52
|
-
<div>
|
|
53
|
-
{/* TODO: Implement component UI */}
|
|
54
|
-
<p>Component: ${pascalName}</p>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
`;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Generate test template
|
|
62
|
-
*/
|
|
63
|
-
function generateTestTemplate(targetName, type) {
|
|
64
|
-
const importPath = type === "handler" ? "../handlers" : "../components";
|
|
65
|
-
const testName = toPascalCase(targetName);
|
|
66
|
-
return `import { describe, it, expect } from 'bun:test';
|
|
67
|
-
import { ${testName} } from '${importPath}/${toKebabCase(targetName)}';
|
|
68
|
-
|
|
69
|
-
describe('${testName}', () => {
|
|
70
|
-
it('should ${type === "handler" ? "handle valid input" : "render correctly"}', async () => {
|
|
71
|
-
// TODO: Implement test
|
|
72
|
-
expect(true).toBe(true);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it('should handle edge cases', async () => {
|
|
76
|
-
// TODO: Test edge cases
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
${type === "handler" ? `it('should handle errors appropriately', async () => {
|
|
80
|
-
// TODO: Test error scenarios
|
|
81
|
-
});` : `it('should be accessible', async () => {
|
|
82
|
-
// TODO: Test accessibility
|
|
83
|
-
});`}
|
|
84
|
-
});
|
|
85
|
-
`;
|
|
86
|
-
}
|
|
87
|
-
function toCamelCase(str) {
|
|
88
|
-
const pascal = toPascalCase(str);
|
|
89
|
-
return pascal.charAt(0).toLowerCase() + pascal.slice(1);
|
|
90
|
-
}
|
|
91
|
-
function toPascalCase(str) {
|
|
92
|
-
return str.split(/[-_.]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
93
|
-
}
|
|
94
|
-
function toKebabCase(str) {
|
|
95
|
-
return str.replace(/\./g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
//#endregion
|
|
99
|
-
export { generateComponentTemplate, generateHandlerTemplate, generateTestTemplate };
|
package/dist/templates/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { __export } from "../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { generateOperationSpec } from "./operation.template.js";
|
|
3
|
-
import { generateEventSpec } from "./event.template.js";
|
|
4
|
-
import { generatePresentationSpec } from "./presentation.template.js";
|
|
5
|
-
import { generateWorkflowSpec } from "./workflow.template.js";
|
|
6
|
-
import { generateMigrationSpec } from "./migration.template.js";
|
|
7
|
-
import { generateTelemetrySpec } from "./telemetry.template.js";
|
|
8
|
-
import { generateExperimentSpec } from "./experiment.template.js";
|
|
9
|
-
import { generateAppBlueprintSpec } from "./app-config.template.js";
|
|
10
|
-
import { generateDataViewSpec } from "./data-view.template.js";
|
|
11
|
-
import { generateIntegrationSpec } from "./integration.template.js";
|
|
12
|
-
import { generateKnowledgeSpaceSpec } from "./knowledge.template.js";
|
|
13
|
-
import { generateComponentTemplate, generateHandlerTemplate, generateTestTemplate } from "./handler.template.js";
|
|
14
|
-
import { generateWorkflowRunnerTemplate } from "./workflow-runner.template.js";
|
|
15
|
-
|
|
16
|
-
//#region src/templates/index.ts
|
|
17
|
-
var templates_exports = /* @__PURE__ */ __export({
|
|
18
|
-
generateAppBlueprintSpec: () => generateAppBlueprintSpec,
|
|
19
|
-
generateComponentTemplate: () => generateComponentTemplate,
|
|
20
|
-
generateDataViewSpec: () => generateDataViewSpec,
|
|
21
|
-
generateEventSpec: () => generateEventSpec,
|
|
22
|
-
generateExperimentSpec: () => generateExperimentSpec,
|
|
23
|
-
generateHandlerTemplate: () => generateHandlerTemplate,
|
|
24
|
-
generateIntegrationSpec: () => generateIntegrationSpec,
|
|
25
|
-
generateKnowledgeSpaceSpec: () => generateKnowledgeSpaceSpec,
|
|
26
|
-
generateMigrationSpec: () => generateMigrationSpec,
|
|
27
|
-
generateOperationSpec: () => generateOperationSpec,
|
|
28
|
-
generatePresentationSpec: () => generatePresentationSpec,
|
|
29
|
-
generateTelemetrySpec: () => generateTelemetrySpec,
|
|
30
|
-
generateTestTemplate: () => generateTestTemplate,
|
|
31
|
-
generateWorkflowRunnerTemplate: () => generateWorkflowRunnerTemplate,
|
|
32
|
-
generateWorkflowSpec: () => generateWorkflowSpec
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { templates_exports };
|