@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
package/dist/ai/providers.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { getRecommendedModels } from "../libs/ai-providers/dist/models.js";
|
|
2
|
-
import { getAIProvider, validateProvider } from "../libs/ai-providers/dist/legacy.js";
|
|
3
|
-
import "../libs/ai-providers/dist/index.js";
|
|
4
|
-
|
|
5
|
-
//#region src/ai/providers.ts
|
|
6
|
-
/**
|
|
7
|
-
* Initialize AI provider based on configuration
|
|
8
|
-
*
|
|
9
|
-
* @deprecated Use createProvider() from @lssm/lib.ai-providers instead
|
|
10
|
-
*/
|
|
11
|
-
function getAIProvider$1(config) {
|
|
12
|
-
return getAIProvider({
|
|
13
|
-
aiProvider: config.aiProvider,
|
|
14
|
-
aiModel: config.aiModel || void 0,
|
|
15
|
-
customEndpoint: config.customEndpoint || void 0
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Validate that the provider is accessible and working
|
|
20
|
-
*
|
|
21
|
-
* @deprecated Use validateProvider() from @lssm/lib.ai-providers instead
|
|
22
|
-
*/
|
|
23
|
-
async function validateProvider$1(config) {
|
|
24
|
-
return await validateProvider({
|
|
25
|
-
aiProvider: config.aiProvider,
|
|
26
|
-
aiModel: config.aiModel || void 0,
|
|
27
|
-
customEndpoint: config.customEndpoint || void 0
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Get recommended models for each provider
|
|
32
|
-
*
|
|
33
|
-
* @deprecated Use getModelsForProvider() from @lssm/lib.ai-providers instead
|
|
34
|
-
*/
|
|
35
|
-
function getRecommendedModels$1(provider) {
|
|
36
|
-
return getRecommendedModels(provider);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
export { getAIProvider$1 as getAIProvider, getRecommendedModels$1 as getRecommendedModels, validateProvider$1 as validateProvider };
|
package/dist/formatters/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { __export } from "../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { formatAsSarif, sarifToJson } from "./sarif.js";
|
|
3
|
-
import { formatAsJson, formatAsJsonCompact, formatAsJsonFull } from "./json.js";
|
|
4
|
-
import { formatAsText, formatAsTextLines } from "./text.js";
|
|
5
|
-
|
|
6
|
-
//#region src/formatters/index.ts
|
|
7
|
-
var formatters_exports = /* @__PURE__ */ __export({
|
|
8
|
-
formatAsJson: () => formatAsJson,
|
|
9
|
-
formatAsJsonCompact: () => formatAsJsonCompact,
|
|
10
|
-
formatAsJsonFull: () => formatAsJsonFull,
|
|
11
|
-
formatAsSarif: () => formatAsSarif,
|
|
12
|
-
formatAsText: () => formatAsText,
|
|
13
|
-
formatAsTextLines: () => formatAsTextLines,
|
|
14
|
-
sarifToJson: () => sarifToJson
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
export { formatters_exports };
|
package/dist/formatters/json.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
//#region src/formatters/json.ts
|
|
2
|
-
/**
|
|
3
|
-
* Format CI check results as compact JSON.
|
|
4
|
-
*/
|
|
5
|
-
function formatAsJsonCompact(result) {
|
|
6
|
-
return {
|
|
7
|
-
success: result.success,
|
|
8
|
-
errors: result.totalErrors,
|
|
9
|
-
warnings: result.totalWarnings,
|
|
10
|
-
duration: result.durationMs,
|
|
11
|
-
timestamp: result.timestamp,
|
|
12
|
-
commit: result.commitSha,
|
|
13
|
-
branch: result.branch,
|
|
14
|
-
issues: result.issues.map((issue) => ({
|
|
15
|
-
rule: issue.ruleId,
|
|
16
|
-
severity: issue.severity,
|
|
17
|
-
message: issue.message,
|
|
18
|
-
file: issue.file,
|
|
19
|
-
line: issue.line
|
|
20
|
-
}))
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Format CI check results as full JSON with all details.
|
|
25
|
-
*/
|
|
26
|
-
function formatAsJsonFull(result) {
|
|
27
|
-
return {
|
|
28
|
-
success: result.success,
|
|
29
|
-
summary: {
|
|
30
|
-
totalErrors: result.totalErrors,
|
|
31
|
-
totalWarnings: result.totalWarnings,
|
|
32
|
-
totalNotes: result.totalNotes,
|
|
33
|
-
durationMs: result.durationMs,
|
|
34
|
-
timestamp: result.timestamp,
|
|
35
|
-
commitSha: result.commitSha,
|
|
36
|
-
branch: result.branch
|
|
37
|
-
},
|
|
38
|
-
categories: result.categories.map((cat) => ({
|
|
39
|
-
category: cat.category,
|
|
40
|
-
label: cat.label,
|
|
41
|
-
passed: cat.passed,
|
|
42
|
-
errors: cat.errors,
|
|
43
|
-
warnings: cat.warnings,
|
|
44
|
-
notes: cat.notes,
|
|
45
|
-
durationMs: cat.durationMs
|
|
46
|
-
})),
|
|
47
|
-
issues: result.issues.map((issue) => ({
|
|
48
|
-
ruleId: issue.ruleId,
|
|
49
|
-
severity: issue.severity,
|
|
50
|
-
message: issue.message,
|
|
51
|
-
category: issue.category,
|
|
52
|
-
file: issue.file,
|
|
53
|
-
line: issue.line,
|
|
54
|
-
column: issue.column,
|
|
55
|
-
endLine: issue.endLine,
|
|
56
|
-
endColumn: issue.endColumn,
|
|
57
|
-
context: issue.context
|
|
58
|
-
}))
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Format CI check results as JSON.
|
|
63
|
-
*/
|
|
64
|
-
function formatAsJson(result, options = {}) {
|
|
65
|
-
const { pretty = true, includeDetails = true } = options;
|
|
66
|
-
const output = includeDetails ? formatAsJsonFull(result) : formatAsJsonCompact(result);
|
|
67
|
-
return pretty ? JSON.stringify(output, null, 2) : JSON.stringify(output);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
export { formatAsJson, formatAsJsonCompact, formatAsJsonFull };
|
package/dist/formatters/sarif.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
//#region src/formatters/sarif.ts
|
|
2
|
-
/**
|
|
3
|
-
* Map of rule IDs to their metadata.
|
|
4
|
-
*/
|
|
5
|
-
const RULE_METADATA = {
|
|
6
|
-
"spec-structure-error": {
|
|
7
|
-
name: "Spec Structure Error",
|
|
8
|
-
description: "Contract specification is missing required structure elements"
|
|
9
|
-
},
|
|
10
|
-
"spec-structure-warning": {
|
|
11
|
-
name: "Spec Structure Warning",
|
|
12
|
-
description: "Contract specification has recommended but missing elements"
|
|
13
|
-
},
|
|
14
|
-
"integrity-orphaned": {
|
|
15
|
-
name: "Orphaned Spec",
|
|
16
|
-
description: "Contract specification is not linked to any feature"
|
|
17
|
-
},
|
|
18
|
-
"integrity-unresolved-ref": {
|
|
19
|
-
name: "Unresolved Reference",
|
|
20
|
-
description: "Contract specification references a non-existent spec"
|
|
21
|
-
},
|
|
22
|
-
"integrity-missing-feature": {
|
|
23
|
-
name: "Missing Feature",
|
|
24
|
-
description: "Feature referenced by spec does not exist"
|
|
25
|
-
},
|
|
26
|
-
"integrity-broken-link": {
|
|
27
|
-
name: "Broken Link",
|
|
28
|
-
description: "Link between specs is broken"
|
|
29
|
-
},
|
|
30
|
-
"deps-circular": {
|
|
31
|
-
name: "Circular Dependency",
|
|
32
|
-
description: "Circular dependency detected between contracts"
|
|
33
|
-
},
|
|
34
|
-
"deps-missing": {
|
|
35
|
-
name: "Missing Dependency",
|
|
36
|
-
description: "Contract depends on a non-existent contract"
|
|
37
|
-
},
|
|
38
|
-
"handler-missing": {
|
|
39
|
-
name: "Missing Handler",
|
|
40
|
-
description: "Handler implementation file does not exist for this contract"
|
|
41
|
-
},
|
|
42
|
-
"handler-warning": {
|
|
43
|
-
name: "Handler Warning",
|
|
44
|
-
description: "Handler implementation has potential issues"
|
|
45
|
-
},
|
|
46
|
-
"test-missing": {
|
|
47
|
-
name: "Missing Test",
|
|
48
|
-
description: "Test file does not exist for this contract"
|
|
49
|
-
},
|
|
50
|
-
"test-warning": {
|
|
51
|
-
name: "Test Warning",
|
|
52
|
-
description: "Test implementation has potential issues"
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Format CI check results as SARIF.
|
|
57
|
-
*/
|
|
58
|
-
function formatAsSarif(result, options = {}) {
|
|
59
|
-
const { toolName = "ContractSpec", toolVersion = "1.0.0", toolUri = "https://contractspec.dev", repositoryUri, workingDirectory } = options;
|
|
60
|
-
const ruleMap = /* @__PURE__ */ new Map();
|
|
61
|
-
const ruleIndexMap = /* @__PURE__ */ new Map();
|
|
62
|
-
for (const issue of result.issues) if (!ruleMap.has(issue.ruleId)) {
|
|
63
|
-
const metadata = RULE_METADATA[issue.ruleId] ?? {
|
|
64
|
-
name: issue.ruleId,
|
|
65
|
-
description: `Rule: ${issue.ruleId}`
|
|
66
|
-
};
|
|
67
|
-
const rule = {
|
|
68
|
-
id: issue.ruleId,
|
|
69
|
-
name: metadata.name,
|
|
70
|
-
shortDescription: { text: metadata.description },
|
|
71
|
-
defaultConfiguration: { level: mapSeverityToLevel(issue.severity) }
|
|
72
|
-
};
|
|
73
|
-
if (metadata.helpUri) rule.helpUri = metadata.helpUri;
|
|
74
|
-
ruleIndexMap.set(issue.ruleId, ruleMap.size);
|
|
75
|
-
ruleMap.set(issue.ruleId, rule);
|
|
76
|
-
}
|
|
77
|
-
const results = result.issues.map((issue) => {
|
|
78
|
-
const sarifResult = {
|
|
79
|
-
ruleId: issue.ruleId,
|
|
80
|
-
ruleIndex: ruleIndexMap.get(issue.ruleId) ?? 0,
|
|
81
|
-
level: mapSeverityToLevel(issue.severity),
|
|
82
|
-
message: { text: issue.message }
|
|
83
|
-
};
|
|
84
|
-
if (issue.file) {
|
|
85
|
-
const location = { physicalLocation: { artifactLocation: {
|
|
86
|
-
uri: normalizeUri(issue.file),
|
|
87
|
-
uriBaseId: "%SRCROOT%"
|
|
88
|
-
} } };
|
|
89
|
-
if (issue.line !== void 0) location.physicalLocation.region = {
|
|
90
|
-
startLine: issue.line,
|
|
91
|
-
startColumn: issue.column ?? 1,
|
|
92
|
-
endLine: issue.endLine ?? issue.line,
|
|
93
|
-
endColumn: issue.endColumn
|
|
94
|
-
};
|
|
95
|
-
sarifResult.locations = [location];
|
|
96
|
-
}
|
|
97
|
-
sarifResult.partialFingerprints = { primaryLocationLineHash: createFingerprint(issue) };
|
|
98
|
-
return sarifResult;
|
|
99
|
-
});
|
|
100
|
-
const versionControlProvenance = [];
|
|
101
|
-
if (repositoryUri || result.commitSha || result.branch) versionControlProvenance.push({
|
|
102
|
-
repositoryUri,
|
|
103
|
-
revisionId: result.commitSha,
|
|
104
|
-
branch: result.branch
|
|
105
|
-
});
|
|
106
|
-
const run = {
|
|
107
|
-
tool: { driver: {
|
|
108
|
-
name: toolName,
|
|
109
|
-
version: toolVersion,
|
|
110
|
-
informationUri: toolUri,
|
|
111
|
-
rules: Array.from(ruleMap.values())
|
|
112
|
-
} },
|
|
113
|
-
results,
|
|
114
|
-
invocations: [{
|
|
115
|
-
executionSuccessful: result.success,
|
|
116
|
-
endTimeUtc: result.timestamp,
|
|
117
|
-
...workingDirectory && { workingDirectory: { uri: workingDirectory } }
|
|
118
|
-
}]
|
|
119
|
-
};
|
|
120
|
-
if (versionControlProvenance.length > 0) run.versionControlProvenance = versionControlProvenance;
|
|
121
|
-
return {
|
|
122
|
-
$schema: "https://json.schemastore.org/sarif-2.1.0.json",
|
|
123
|
-
version: "2.1.0",
|
|
124
|
-
runs: [run]
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Map CI severity to SARIF level.
|
|
129
|
-
*/
|
|
130
|
-
function mapSeverityToLevel(severity) {
|
|
131
|
-
switch (severity) {
|
|
132
|
-
case "error": return "error";
|
|
133
|
-
case "warning": return "warning";
|
|
134
|
-
case "note": return "note";
|
|
135
|
-
default: return "warning";
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Normalize file path to SARIF URI format.
|
|
140
|
-
*/
|
|
141
|
-
function normalizeUri(filePath) {
|
|
142
|
-
return filePath.replace(/^\.\//, "").replace(/\\/g, "/");
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Create a fingerprint for issue deduplication.
|
|
146
|
-
*/
|
|
147
|
-
function createFingerprint(issue) {
|
|
148
|
-
const parts = [
|
|
149
|
-
issue.ruleId,
|
|
150
|
-
issue.file ?? "",
|
|
151
|
-
issue.message
|
|
152
|
-
];
|
|
153
|
-
return Buffer.from(parts.join("|")).toString("base64").slice(0, 16);
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Serialize SARIF output to JSON string.
|
|
157
|
-
*/
|
|
158
|
-
function sarifToJson(sarif) {
|
|
159
|
-
return JSON.stringify(sarif, null, 2);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
//#endregion
|
|
163
|
-
export { formatAsSarif, sarifToJson };
|
package/dist/formatters/text.js
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
//#region src/formatters/text.ts
|
|
2
|
-
/**
|
|
3
|
-
* Format CI check results as text lines.
|
|
4
|
-
* Returns structured lines that can be styled by the CLI.
|
|
5
|
-
*/
|
|
6
|
-
function formatAsTextLines(result, options = {}) {
|
|
7
|
-
const lines = [];
|
|
8
|
-
const { verbose = false, showTiming = true, groupByFile = false } = options;
|
|
9
|
-
lines.push({
|
|
10
|
-
text: "",
|
|
11
|
-
style: "normal"
|
|
12
|
-
});
|
|
13
|
-
lines.push({
|
|
14
|
-
text: "📋 ContractSpec CI Check Results",
|
|
15
|
-
style: "bold"
|
|
16
|
-
});
|
|
17
|
-
lines.push({
|
|
18
|
-
text: "",
|
|
19
|
-
style: "normal"
|
|
20
|
-
});
|
|
21
|
-
if (result.commitSha || result.branch) {
|
|
22
|
-
const gitInfo = [result.branch ? `branch: ${result.branch}` : null, result.commitSha ? `commit: ${result.commitSha.slice(0, 7)}` : null].filter(Boolean).join(", ");
|
|
23
|
-
lines.push({
|
|
24
|
-
text: `Git: ${gitInfo}`,
|
|
25
|
-
style: "muted"
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
lines.push({
|
|
29
|
-
text: "",
|
|
30
|
-
style: "normal"
|
|
31
|
-
});
|
|
32
|
-
lines.push({
|
|
33
|
-
text: "Check Results:",
|
|
34
|
-
style: "bold"
|
|
35
|
-
});
|
|
36
|
-
for (const category of result.categories) {
|
|
37
|
-
const icon = category.passed ? "✓" : "✗";
|
|
38
|
-
const style = category.passed ? "success" : "error";
|
|
39
|
-
const stats = formatCategoryStats(category);
|
|
40
|
-
const timing = showTiming ? ` (${category.durationMs}ms)` : "";
|
|
41
|
-
lines.push({
|
|
42
|
-
text: ` ${icon} ${category.label}: ${stats}${timing}`,
|
|
43
|
-
style
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
if (result.issues.length > 0) {
|
|
47
|
-
lines.push({
|
|
48
|
-
text: "",
|
|
49
|
-
style: "normal"
|
|
50
|
-
});
|
|
51
|
-
lines.push({
|
|
52
|
-
text: "Issues:",
|
|
53
|
-
style: "bold"
|
|
54
|
-
});
|
|
55
|
-
if (groupByFile) {
|
|
56
|
-
const byFile = groupIssuesByFile(result.issues);
|
|
57
|
-
for (const [file, issues] of byFile) {
|
|
58
|
-
lines.push({
|
|
59
|
-
text: "",
|
|
60
|
-
style: "normal"
|
|
61
|
-
});
|
|
62
|
-
lines.push({
|
|
63
|
-
text: ` ${file || "(no file)"}`,
|
|
64
|
-
style: "bold",
|
|
65
|
-
indent: 1
|
|
66
|
-
});
|
|
67
|
-
for (const issue of issues) lines.push(...formatIssueLines(issue, verbose, 2));
|
|
68
|
-
}
|
|
69
|
-
} else {
|
|
70
|
-
const errors = result.issues.filter((i) => i.severity === "error");
|
|
71
|
-
const warnings = result.issues.filter((i) => i.severity === "warning");
|
|
72
|
-
const notes = result.issues.filter((i) => i.severity === "note");
|
|
73
|
-
if (errors.length > 0) {
|
|
74
|
-
lines.push({
|
|
75
|
-
text: "",
|
|
76
|
-
style: "normal"
|
|
77
|
-
});
|
|
78
|
-
lines.push({
|
|
79
|
-
text: " Errors:",
|
|
80
|
-
style: "error",
|
|
81
|
-
indent: 1
|
|
82
|
-
});
|
|
83
|
-
for (const issue of errors) lines.push(...formatIssueLines(issue, verbose, 2));
|
|
84
|
-
}
|
|
85
|
-
if (warnings.length > 0) {
|
|
86
|
-
lines.push({
|
|
87
|
-
text: "",
|
|
88
|
-
style: "normal"
|
|
89
|
-
});
|
|
90
|
-
lines.push({
|
|
91
|
-
text: " Warnings:",
|
|
92
|
-
style: "warning",
|
|
93
|
-
indent: 1
|
|
94
|
-
});
|
|
95
|
-
for (const issue of warnings) lines.push(...formatIssueLines(issue, verbose, 2));
|
|
96
|
-
}
|
|
97
|
-
if (notes.length > 0 && verbose) {
|
|
98
|
-
lines.push({
|
|
99
|
-
text: "",
|
|
100
|
-
style: "normal"
|
|
101
|
-
});
|
|
102
|
-
lines.push({
|
|
103
|
-
text: " Notes:",
|
|
104
|
-
style: "muted",
|
|
105
|
-
indent: 1
|
|
106
|
-
});
|
|
107
|
-
for (const issue of notes) lines.push(...formatIssueLines(issue, verbose, 2));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
lines.push({
|
|
112
|
-
text: "",
|
|
113
|
-
style: "normal"
|
|
114
|
-
});
|
|
115
|
-
lines.push({
|
|
116
|
-
text: "─".repeat(50),
|
|
117
|
-
style: "muted"
|
|
118
|
-
});
|
|
119
|
-
const summaryParts = [
|
|
120
|
-
result.totalErrors > 0 ? `${result.totalErrors} error(s)` : null,
|
|
121
|
-
result.totalWarnings > 0 ? `${result.totalWarnings} warning(s)` : null,
|
|
122
|
-
result.totalNotes > 0 && verbose ? `${result.totalNotes} note(s)` : null
|
|
123
|
-
].filter(Boolean);
|
|
124
|
-
if (summaryParts.length > 0) lines.push({
|
|
125
|
-
text: `Found: ${summaryParts.join(", ")}`,
|
|
126
|
-
style: result.success ? "warning" : "error"
|
|
127
|
-
});
|
|
128
|
-
if (showTiming) lines.push({
|
|
129
|
-
text: `Duration: ${result.durationMs}ms`,
|
|
130
|
-
style: "muted"
|
|
131
|
-
});
|
|
132
|
-
lines.push({
|
|
133
|
-
text: "",
|
|
134
|
-
style: "normal"
|
|
135
|
-
});
|
|
136
|
-
if (result.success) lines.push({
|
|
137
|
-
text: "✅ All CI checks passed!",
|
|
138
|
-
style: "success"
|
|
139
|
-
});
|
|
140
|
-
else lines.push({
|
|
141
|
-
text: "❌ CI checks failed",
|
|
142
|
-
style: "error"
|
|
143
|
-
});
|
|
144
|
-
lines.push({
|
|
145
|
-
text: "",
|
|
146
|
-
style: "normal"
|
|
147
|
-
});
|
|
148
|
-
return lines;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Format CI check results as plain text string.
|
|
152
|
-
*/
|
|
153
|
-
function formatAsText(result, options = {}) {
|
|
154
|
-
return formatAsTextLines(result, options).map((line) => " ".repeat(line.indent ?? 0) + line.text).join("\n");
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Format category stats.
|
|
158
|
-
*/
|
|
159
|
-
function formatCategoryStats(category) {
|
|
160
|
-
const parts = [];
|
|
161
|
-
if (category.errors > 0) parts.push(`${category.errors} error(s)`);
|
|
162
|
-
if (category.warnings > 0) parts.push(`${category.warnings} warning(s)`);
|
|
163
|
-
if (parts.length === 0) return "passed";
|
|
164
|
-
return parts.join(", ");
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Format a single issue as text lines.
|
|
168
|
-
*/
|
|
169
|
-
function formatIssueLines(issue, verbose, baseIndent) {
|
|
170
|
-
const lines = [];
|
|
171
|
-
const icon = issue.severity === "error" ? "✗" : issue.severity === "warning" ? "⚠" : "○";
|
|
172
|
-
const style = issue.severity === "error" ? "error" : issue.severity === "warning" ? "warning" : "muted";
|
|
173
|
-
let mainLine = `${icon} ${issue.message}`;
|
|
174
|
-
if (issue.file) {
|
|
175
|
-
const location = issue.line ? `:${issue.line}` : "";
|
|
176
|
-
mainLine += ` (${issue.file}${location})`;
|
|
177
|
-
}
|
|
178
|
-
lines.push({
|
|
179
|
-
text: mainLine,
|
|
180
|
-
style,
|
|
181
|
-
indent: baseIndent
|
|
182
|
-
});
|
|
183
|
-
if (verbose && issue.context) {
|
|
184
|
-
const contextStr = JSON.stringify(issue.context);
|
|
185
|
-
if (contextStr !== "{}") lines.push({
|
|
186
|
-
text: `Context: ${contextStr}`,
|
|
187
|
-
style: "muted",
|
|
188
|
-
indent: baseIndent + 1
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
return lines;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Group issues by file.
|
|
195
|
-
*/
|
|
196
|
-
function groupIssuesByFile(issues) {
|
|
197
|
-
const byFile = /* @__PURE__ */ new Map();
|
|
198
|
-
for (const issue of issues) {
|
|
199
|
-
const file = issue.file ?? "";
|
|
200
|
-
if (!byFile.has(file)) byFile.set(file, []);
|
|
201
|
-
const fileIssues = byFile.get(file);
|
|
202
|
-
if (fileIssues) fileIssues.push(issue);
|
|
203
|
-
}
|
|
204
|
-
return new Map([...byFile.entries()].sort(([a], [b]) => a.localeCompare(b)));
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
//#endregion
|
|
208
|
-
export { formatAsText, formatAsTextLines };
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_MODELS, getModelsForProvider } from "./models.js";
|
|
2
|
-
import { anthropic } from "@ai-sdk/anthropic";
|
|
3
|
-
import { openai } from "@ai-sdk/openai";
|
|
4
|
-
import { ollama } from "ollama-ai-provider";
|
|
5
|
-
import { google } from "@ai-sdk/google";
|
|
6
|
-
import { mistral } from "@ai-sdk/mistral";
|
|
7
|
-
|
|
8
|
-
//#region ../../libs/ai-providers/dist/factory.js
|
|
9
|
-
/**
|
|
10
|
-
* Base provider implementation
|
|
11
|
-
*/
|
|
12
|
-
var BaseProvider = class {
|
|
13
|
-
name;
|
|
14
|
-
model;
|
|
15
|
-
mode;
|
|
16
|
-
config;
|
|
17
|
-
cachedModel = null;
|
|
18
|
-
constructor(config) {
|
|
19
|
-
this.name = config.provider;
|
|
20
|
-
this.model = config.model ?? DEFAULT_MODELS[config.provider];
|
|
21
|
-
this.mode = this.determineMode(config);
|
|
22
|
-
this.config = config;
|
|
23
|
-
}
|
|
24
|
-
determineMode(config) {
|
|
25
|
-
if (config.provider === "ollama") return "local";
|
|
26
|
-
if (config.apiKey) return "byok";
|
|
27
|
-
return "managed";
|
|
28
|
-
}
|
|
29
|
-
getModel() {
|
|
30
|
-
if (!this.cachedModel) this.cachedModel = this.createModel();
|
|
31
|
-
return this.cachedModel;
|
|
32
|
-
}
|
|
33
|
-
createModel() {
|
|
34
|
-
const { apiKey, baseUrl, proxyUrl, organizationId } = this.config;
|
|
35
|
-
switch (this.name) {
|
|
36
|
-
case "ollama": {
|
|
37
|
-
const originalBaseUrl = process.env.OLLAMA_BASE_URL;
|
|
38
|
-
if (baseUrl && baseUrl !== "http://localhost:11434") process.env.OLLAMA_BASE_URL = baseUrl;
|
|
39
|
-
const ollamaModel = ollama(this.model);
|
|
40
|
-
if (originalBaseUrl !== void 0) process.env.OLLAMA_BASE_URL = originalBaseUrl;
|
|
41
|
-
else if (baseUrl && baseUrl !== "http://localhost:11434") delete process.env.OLLAMA_BASE_URL;
|
|
42
|
-
return ollamaModel;
|
|
43
|
-
}
|
|
44
|
-
case "openai":
|
|
45
|
-
if (this.mode === "managed") {
|
|
46
|
-
const originalBaseUrl = process.env.OPENAI_BASE_URL;
|
|
47
|
-
if (proxyUrl) process.env.OPENAI_BASE_URL = proxyUrl;
|
|
48
|
-
const model = openai(this.model);
|
|
49
|
-
if (originalBaseUrl !== void 0) process.env.OPENAI_BASE_URL = originalBaseUrl;
|
|
50
|
-
else if (proxyUrl) delete process.env.OPENAI_BASE_URL;
|
|
51
|
-
return model;
|
|
52
|
-
}
|
|
53
|
-
return openai(this.model);
|
|
54
|
-
case "anthropic":
|
|
55
|
-
if (this.mode === "managed") {
|
|
56
|
-
const originalBaseUrl = process.env.OPENAI_BASE_URL;
|
|
57
|
-
if (proxyUrl) process.env.OPENAI_BASE_URL = proxyUrl;
|
|
58
|
-
const model = openai(this.model);
|
|
59
|
-
if (originalBaseUrl !== void 0) process.env.OPENAI_BASE_URL = originalBaseUrl;
|
|
60
|
-
else if (proxyUrl) delete process.env.OPENAI_BASE_URL;
|
|
61
|
-
return model;
|
|
62
|
-
}
|
|
63
|
-
return anthropic(this.model);
|
|
64
|
-
case "mistral":
|
|
65
|
-
if (this.mode === "managed") {
|
|
66
|
-
const originalBaseUrl = process.env.OPENAI_BASE_URL;
|
|
67
|
-
if (proxyUrl) process.env.OPENAI_BASE_URL = proxyUrl;
|
|
68
|
-
const model = openai(this.model);
|
|
69
|
-
if (originalBaseUrl !== void 0) process.env.OPENAI_BASE_URL = originalBaseUrl;
|
|
70
|
-
else if (proxyUrl) delete process.env.OPENAI_BASE_URL;
|
|
71
|
-
return model;
|
|
72
|
-
}
|
|
73
|
-
return mistral(this.model);
|
|
74
|
-
case "gemini":
|
|
75
|
-
if (this.mode === "managed") {
|
|
76
|
-
const originalBaseUrl = process.env.OPENAI_BASE_URL;
|
|
77
|
-
if (proxyUrl) process.env.OPENAI_BASE_URL = proxyUrl;
|
|
78
|
-
const model = openai(this.model);
|
|
79
|
-
if (originalBaseUrl !== void 0) process.env.OPENAI_BASE_URL = originalBaseUrl;
|
|
80
|
-
else if (proxyUrl) delete process.env.OPENAI_BASE_URL;
|
|
81
|
-
return model;
|
|
82
|
-
}
|
|
83
|
-
return google(this.model);
|
|
84
|
-
default: throw new Error(`Unknown provider: ${this.name}`);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async listModels() {
|
|
88
|
-
if (this.name === "ollama") return this.listOllamaModels();
|
|
89
|
-
return getModelsForProvider(this.name);
|
|
90
|
-
}
|
|
91
|
-
async listOllamaModels() {
|
|
92
|
-
try {
|
|
93
|
-
const baseUrl = this.config.baseUrl ?? "http://localhost:11434";
|
|
94
|
-
const response = await fetch(`${baseUrl}/api/tags`);
|
|
95
|
-
if (!response.ok) return getModelsForProvider("ollama");
|
|
96
|
-
return ((await response.json()).models ?? []).map((m) => ({
|
|
97
|
-
id: m.name,
|
|
98
|
-
name: m.name,
|
|
99
|
-
provider: "ollama",
|
|
100
|
-
contextWindow: 8e3,
|
|
101
|
-
capabilities: {
|
|
102
|
-
vision: false,
|
|
103
|
-
tools: false,
|
|
104
|
-
reasoning: false,
|
|
105
|
-
streaming: true
|
|
106
|
-
}
|
|
107
|
-
}));
|
|
108
|
-
} catch {
|
|
109
|
-
return getModelsForProvider("ollama");
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
async validate() {
|
|
113
|
-
if (this.name === "ollama") return this.validateOllama();
|
|
114
|
-
if (this.mode === "byok" && !this.config.apiKey) return {
|
|
115
|
-
valid: false,
|
|
116
|
-
error: `API key required for ${this.name}`
|
|
117
|
-
};
|
|
118
|
-
if (this.mode === "managed" && !this.config.proxyUrl && !this.config.organizationId) return {
|
|
119
|
-
valid: false,
|
|
120
|
-
error: "Managed mode requires proxyUrl or organizationId"
|
|
121
|
-
};
|
|
122
|
-
return { valid: true };
|
|
123
|
-
}
|
|
124
|
-
async validateOllama() {
|
|
125
|
-
try {
|
|
126
|
-
const baseUrl = this.config.baseUrl ?? "http://localhost:11434";
|
|
127
|
-
const response = await fetch(`${baseUrl}/api/tags`);
|
|
128
|
-
if (!response.ok) return {
|
|
129
|
-
valid: false,
|
|
130
|
-
error: `Ollama server returned ${response.status}`
|
|
131
|
-
};
|
|
132
|
-
const models = (await response.json()).models ?? [];
|
|
133
|
-
if (!models.some((m) => m.name === this.model)) return {
|
|
134
|
-
valid: false,
|
|
135
|
-
error: `Model "${this.model}" not found. Available: ${models.map((m) => m.name).join(", ")}`
|
|
136
|
-
};
|
|
137
|
-
return { valid: true };
|
|
138
|
-
} catch (error) {
|
|
139
|
-
return {
|
|
140
|
-
valid: false,
|
|
141
|
-
error: `Cannot connect to Ollama at ${this.config.baseUrl ?? "http://localhost:11434"}: ${error instanceof Error ? error.message : String(error)}`
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* Create a provider from configuration
|
|
148
|
-
*/
|
|
149
|
-
function createProvider(config) {
|
|
150
|
-
return new BaseProvider(config);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
//#endregion
|
|
154
|
-
export { createProvider };
|