@contractspec/lib.contracts 0.0.0-canary-20260113162409
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/README.md +109 -0
- package/dist/_virtual/rolldown_runtime.js +37 -0
- package/dist/app-config/app-config.capability.d.ts +7 -0
- package/dist/app-config/app-config.capability.js +23 -0
- package/dist/app-config/app-config.feature.d.ts +11 -0
- package/dist/app-config/app-config.feature.js +61 -0
- package/dist/app-config/branding.d.ts +55 -0
- package/dist/app-config/branding.js +0 -0
- package/dist/app-config/contracts.d.ts +245 -0
- package/dist/app-config/contracts.js +395 -0
- package/dist/app-config/docs/app-config.docblock.d.ts +6 -0
- package/dist/app-config/docs/app-config.docblock.js +21 -0
- package/dist/app-config/events.d.ts +122 -0
- package/dist/app-config/events.js +174 -0
- package/dist/app-config/index.d.ts +10 -0
- package/dist/app-config/index.js +9 -0
- package/dist/app-config/lifecycle-contracts.d.ts +273 -0
- package/dist/app-config/lifecycle-contracts.js +440 -0
- package/dist/app-config/lifecycle.d.ts +27 -0
- package/dist/app-config/lifecycle.js +0 -0
- package/dist/app-config/runtime.d.ts +120 -0
- package/dist/app-config/runtime.js +617 -0
- package/dist/app-config/spec.d.ts +175 -0
- package/dist/app-config/spec.js +19 -0
- package/dist/app-config/validation.d.ts +49 -0
- package/dist/app-config/validation.js +538 -0
- package/dist/capabilities/capabilities.d.ts +41 -0
- package/dist/capabilities/capabilities.js +48 -0
- package/dist/capabilities/docs/capabilities.docblock.d.ts +6 -0
- package/dist/capabilities/docs/capabilities.docblock.js +21 -0
- package/dist/capabilities/index.d.ts +3 -0
- package/dist/capabilities/index.js +4 -0
- package/dist/capabilities/openbanking.d.ts +10 -0
- package/dist/capabilities/openbanking.js +92 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.js +9 -0
- package/dist/client/react/drivers/rn-reusables.d.ts +22 -0
- package/dist/client/react/drivers/rn-reusables.js +21 -0
- package/dist/client/react/drivers/shadcn.d.ts +12 -0
- package/dist/client/react/drivers/shadcn.js +11 -0
- package/dist/client/react/feature-render.d.ts +23 -0
- package/dist/client/react/feature-render.js +44 -0
- package/dist/client/react/form-render.d.ts +92 -0
- package/dist/client/react/form-render.js +301 -0
- package/dist/client/react/index.d.ts +5 -0
- package/dist/client/react/index.js +8 -0
- package/dist/contract-registry/index.d.ts +3 -0
- package/dist/contract-registry/index.js +3 -0
- package/dist/contract-registry/schemas.d.ts +124 -0
- package/dist/contract-registry/schemas.js +61 -0
- package/dist/contract-registry/types.d.ts +46 -0
- package/dist/contract-registry/types.js +0 -0
- package/dist/data-views/data-views.d.ts +5 -0
- package/dist/data-views/data-views.js +5 -0
- package/dist/data-views/docs/data-views.docblock.d.ts +6 -0
- package/dist/data-views/docs/data-views.docblock.js +21 -0
- package/dist/data-views/index.d.ts +4 -0
- package/dist/data-views/index.js +4 -0
- package/dist/data-views/query-generator.d.ts +40 -0
- package/dist/data-views/query-generator.js +48 -0
- package/dist/data-views/registry.d.ts +17 -0
- package/dist/data-views/registry.js +20 -0
- package/dist/data-views/runtime.d.ts +32 -0
- package/dist/data-views/runtime.js +68 -0
- package/dist/data-views/spec.d.ts +32 -0
- package/dist/data-views/spec.js +10 -0
- package/dist/data-views/types.d.ts +157 -0
- package/dist/data-views/types.js +0 -0
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.d.ts +6 -0
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
- package/dist/docs/index.d.ts +6 -0
- package/dist/docs/index.js +30 -0
- package/dist/docs/meta.docs.d.ts +6 -0
- package/dist/docs/meta.docs.js +29 -0
- package/dist/docs/presentations.d.ts +31 -0
- package/dist/docs/presentations.js +57 -0
- package/dist/docs/registry.d.ts +23 -0
- package/dist/docs/registry.js +51 -0
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.d.ts +6 -0
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
- package/dist/docs/tech/cli.docblock.d.ts +6 -0
- package/dist/docs/tech/cli.docblock.js +138 -0
- package/dist/docs/tech/contracts/README.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/README.docblock.js +21 -0
- package/dist/docs/tech/contracts/migrations.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/migrations.docblock.js +21 -0
- package/dist/docs/tech/contracts/openapi-export.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
- package/dist/docs/tech/contracts/openapi-import.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/openapi-import.docblock.js +65 -0
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +21 -0
- package/dist/docs/tech/contracts/overlays.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/overlays.docblock.js +21 -0
- package/dist/docs/tech/contracts/tests.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/tests.docblock.js +21 -0
- package/dist/docs/tech/contracts/themes.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/themes.docblock.js +21 -0
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +126 -0
- package/dist/docs/tech/lifecycle-stage-system.docblock.d.ts +6 -0
- package/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
- package/dist/docs/tech/llm/llm-integration.docblock.d.ts +7 -0
- package/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
- package/dist/docs/tech/mcp-endpoints.docblock.d.ts +6 -0
- package/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
- package/dist/docs/tech/presentation-runtime.docblock.d.ts +6 -0
- package/dist/docs/tech/presentation-runtime.docblock.js +17 -0
- package/dist/docs/tech/schema/README.docblock.d.ts +6 -0
- package/dist/docs/tech/schema/README.docblock.js +21 -0
- package/dist/docs/tech/studio/learning-events.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-events.docblock.js +49 -0
- package/dist/docs/tech/studio/learning-journeys.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
- package/dist/docs/tech/studio/platform-admin-panel.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
- package/dist/docs/tech/studio/project-access-teams.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-access-teams.docblock.js +48 -0
- package/dist/docs/tech/studio/project-routing.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-routing.docblock.js +68 -0
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
- package/dist/docs/tech/studio/team-invitations.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
- package/dist/docs/tech/studio/workspace-ops.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
- package/dist/docs/tech/studio/workspaces.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspaces.docblock.js +63 -0
- package/dist/docs/tech/telemetry-ingest.docblock.d.ts +6 -0
- package/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
- package/dist/docs/tech/vscode-extension.docblock.d.ts +6 -0
- package/dist/docs/tech/vscode-extension.docblock.js +102 -0
- package/dist/docs/tech-contracts.docs.d.ts +6 -0
- package/dist/docs/tech-contracts.docs.js +96 -0
- package/dist/docs/types.d.ts +41 -0
- package/dist/docs/types.js +0 -0
- package/dist/events.d.ts +47 -0
- package/dist/events.js +19 -0
- package/dist/examples/docs/examples.docblock.d.ts +6 -0
- package/dist/examples/docs/examples.docblock.js +165 -0
- package/dist/examples/index.d.ts +13 -0
- package/dist/examples/index.js +13 -0
- package/dist/examples/registry.d.ts +43 -0
- package/dist/examples/registry.js +88 -0
- package/dist/examples/schema.d.ts +282 -0
- package/dist/examples/schema.js +125 -0
- package/dist/examples/types.d.ts +167 -0
- package/dist/examples/types.js +43 -0
- package/dist/examples/validation.d.ts +65 -0
- package/dist/examples/validation.js +144 -0
- package/dist/experiments/docs/experiments.docblock.d.ts +6 -0
- package/dist/experiments/docs/experiments.docblock.js +21 -0
- package/dist/experiments/evaluator.d.ts +37 -0
- package/dist/experiments/evaluator.js +101 -0
- package/dist/experiments/spec-resolver.d.ts +17 -0
- package/dist/experiments/spec-resolver.js +0 -0
- package/dist/experiments/spec.d.ts +80 -0
- package/dist/experiments/spec.js +15 -0
- package/dist/features/index.d.ts +13 -0
- package/dist/features/index.js +12 -0
- package/dist/features/install.d.ts +22 -0
- package/dist/features/install.js +36 -0
- package/dist/features/registry.d.ts +26 -0
- package/dist/features/registry.js +49 -0
- package/dist/features/types.d.ts +88 -0
- package/dist/features/types.js +0 -0
- package/dist/features/validation.d.ts +8 -0
- package/dist/features/validation.js +14 -0
- package/dist/forms/docs/forms.docblock.d.ts +6 -0
- package/dist/forms/docs/forms.docblock.js +21 -0
- package/dist/forms/forms.d.ts +266 -0
- package/dist/forms/forms.js +143 -0
- package/dist/forms/index.d.ts +2 -0
- package/dist/forms/index.js +3 -0
- package/dist/index.d.ts +154 -0
- package/dist/index.js +132 -0
- package/dist/install.d.ts +77 -0
- package/dist/install.js +40 -0
- package/dist/integrations/binding.d.ts +17 -0
- package/dist/integrations/binding.js +0 -0
- package/dist/integrations/connection.d.ts +51 -0
- package/dist/integrations/connection.js +0 -0
- package/dist/integrations/docs/integrations.docblock.d.ts +6 -0
- package/dist/integrations/docs/integrations.docblock.js +94 -0
- package/dist/integrations/health.d.ts +21 -0
- package/dist/integrations/health.js +69 -0
- package/dist/integrations/index.d.ts +34 -0
- package/dist/integrations/index.js +23 -0
- package/dist/integrations/integrations.capability.d.ts +7 -0
- package/dist/integrations/integrations.capability.js +17 -0
- package/dist/integrations/integrations.feature.d.ts +11 -0
- package/dist/integrations/integrations.feature.js +67 -0
- package/dist/integrations/openbanking/contracts/accounts.d.ts +289 -0
- package/dist/integrations/openbanking/contracts/accounts.js +236 -0
- package/dist/integrations/openbanking/contracts/balances.d.ts +165 -0
- package/dist/integrations/openbanking/contracts/balances.js +166 -0
- package/dist/integrations/openbanking/contracts/index.d.ts +10 -0
- package/dist/integrations/openbanking/contracts/index.js +12 -0
- package/dist/integrations/openbanking/contracts/transactions.d.ts +213 -0
- package/dist/integrations/openbanking/contracts/transactions.js +217 -0
- package/dist/integrations/openbanking/guards.d.ts +12 -0
- package/dist/integrations/openbanking/guards.js +33 -0
- package/dist/integrations/openbanking/models.d.ts +228 -0
- package/dist/integrations/openbanking/models.js +240 -0
- package/dist/integrations/openbanking/openbanking.capability.d.ts +7 -0
- package/dist/integrations/openbanking/openbanking.capability.js +21 -0
- package/dist/integrations/openbanking/openbanking.feature.d.ts +11 -0
- package/dist/integrations/openbanking/openbanking.feature.js +76 -0
- package/dist/integrations/openbanking/telemetry.d.ts +15 -0
- package/dist/integrations/openbanking/telemetry.js +39 -0
- package/dist/integrations/operations.d.ts +437 -0
- package/dist/integrations/operations.js +392 -0
- package/dist/integrations/providers/calendar.d.ts +78 -0
- package/dist/integrations/providers/calendar.js +0 -0
- package/dist/integrations/providers/elevenlabs.d.ts +8 -0
- package/dist/integrations/providers/elevenlabs.js +56 -0
- package/dist/integrations/providers/email.d.ts +86 -0
- package/dist/integrations/providers/email.js +0 -0
- package/dist/integrations/providers/embedding.d.ts +24 -0
- package/dist/integrations/providers/embedding.js +0 -0
- package/dist/integrations/providers/gcs-storage.d.ts +8 -0
- package/dist/integrations/providers/gcs-storage.js +79 -0
- package/dist/integrations/providers/gmail.d.ts +8 -0
- package/dist/integrations/providers/gmail.js +91 -0
- package/dist/integrations/providers/google-calendar.d.ts +8 -0
- package/dist/integrations/providers/google-calendar.js +70 -0
- package/dist/integrations/providers/impls/elevenlabs-voice.d.ts +20 -0
- package/dist/integrations/providers/impls/elevenlabs-voice.js +95 -0
- package/dist/integrations/providers/impls/gcs-storage.d.ts +24 -0
- package/dist/integrations/providers/impls/gcs-storage.js +88 -0
- package/dist/integrations/providers/impls/gmail-inbound.d.ts +26 -0
- package/dist/integrations/providers/impls/gmail-inbound.js +200 -0
- package/dist/integrations/providers/impls/gmail-outbound.d.ts +18 -0
- package/dist/integrations/providers/impls/gmail-outbound.js +105 -0
- package/dist/integrations/providers/impls/google-calendar.d.ts +23 -0
- package/dist/integrations/providers/impls/google-calendar.js +154 -0
- package/dist/integrations/providers/impls/index.d.ts +15 -0
- package/dist/integrations/providers/impls/index.js +16 -0
- package/dist/integrations/providers/impls/mistral-embedding.d.ts +23 -0
- package/dist/integrations/providers/impls/mistral-embedding.js +41 -0
- package/dist/integrations/providers/impls/mistral-llm.d.ts +31 -0
- package/dist/integrations/providers/impls/mistral-llm.js +247 -0
- package/dist/integrations/providers/impls/postmark-email.d.ts +19 -0
- package/dist/integrations/providers/impls/postmark-email.js +55 -0
- package/dist/integrations/providers/impls/powens-client.d.ts +124 -0
- package/dist/integrations/providers/impls/powens-client.js +171 -0
- package/dist/integrations/providers/impls/powens-openbanking.d.ts +27 -0
- package/dist/integrations/providers/impls/powens-openbanking.js +218 -0
- package/dist/integrations/providers/impls/provider-factory.d.ts +26 -0
- package/dist/integrations/providers/impls/provider-factory.js +146 -0
- package/dist/integrations/providers/impls/qdrant-vector.d.ts +24 -0
- package/dist/integrations/providers/impls/qdrant-vector.js +69 -0
- package/dist/integrations/providers/impls/stripe-payments.d.ts +28 -0
- package/dist/integrations/providers/impls/stripe-payments.js +202 -0
- package/dist/integrations/providers/impls/twilio-sms.d.ts +20 -0
- package/dist/integrations/providers/impls/twilio-sms.js +58 -0
- package/dist/integrations/providers/index.d.ts +22 -0
- package/dist/integrations/providers/index.js +13 -0
- package/dist/integrations/providers/llm.d.ts +82 -0
- package/dist/integrations/providers/llm.js +0 -0
- package/dist/integrations/providers/mistral.d.ts +8 -0
- package/dist/integrations/providers/mistral.js +72 -0
- package/dist/integrations/providers/openbanking.d.ts +128 -0
- package/dist/integrations/providers/openbanking.js +0 -0
- package/dist/integrations/providers/payments.d.ts +109 -0
- package/dist/integrations/providers/payments.js +0 -0
- package/dist/integrations/providers/postmark.d.ts +8 -0
- package/dist/integrations/providers/postmark.js +72 -0
- package/dist/integrations/providers/powens.d.ts +8 -0
- package/dist/integrations/providers/powens.js +120 -0
- package/dist/integrations/providers/qdrant.d.ts +8 -0
- package/dist/integrations/providers/qdrant.js +77 -0
- package/dist/integrations/providers/registry.d.ts +11 -0
- package/dist/integrations/providers/registry.js +34 -0
- package/dist/integrations/providers/sms.d.ts +34 -0
- package/dist/integrations/providers/sms.js +0 -0
- package/dist/integrations/providers/storage.d.ts +60 -0
- package/dist/integrations/providers/storage.js +0 -0
- package/dist/integrations/providers/stripe.d.ts +8 -0
- package/dist/integrations/providers/stripe.js +87 -0
- package/dist/integrations/providers/twilio-sms.d.ts +8 -0
- package/dist/integrations/providers/twilio-sms.js +65 -0
- package/dist/integrations/providers/vector-store.d.ts +43 -0
- package/dist/integrations/providers/vector-store.js +0 -0
- package/dist/integrations/providers/voice.d.ts +34 -0
- package/dist/integrations/providers/voice.js +0 -0
- package/dist/integrations/runtime.d.ts +99 -0
- package/dist/integrations/runtime.js +186 -0
- package/dist/integrations/secrets/aws-secret-manager.d.ts +31 -0
- package/dist/integrations/secrets/aws-secret-manager.js +231 -0
- package/dist/integrations/secrets/env-secret-provider.d.ts +31 -0
- package/dist/integrations/secrets/env-secret-provider.js +81 -0
- package/dist/integrations/secrets/gcp-secret-manager.d.ts +32 -0
- package/dist/integrations/secrets/gcp-secret-manager.js +229 -0
- package/dist/integrations/secrets/index.d.ts +7 -0
- package/dist/integrations/secrets/index.js +8 -0
- package/dist/integrations/secrets/manager.d.ts +47 -0
- package/dist/integrations/secrets/manager.js +103 -0
- package/dist/integrations/secrets/provider.d.ts +52 -0
- package/dist/integrations/secrets/provider.js +58 -0
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts +38 -0
- package/dist/integrations/secrets/scaleway-secret-manager.js +247 -0
- package/dist/integrations/secrets-types.d.ts +17 -0
- package/dist/integrations/secrets-types.js +0 -0
- package/dist/integrations/spec.d.ts +77 -0
- package/dist/integrations/spec.js +22 -0
- package/dist/jobs/define-job.d.ts +18 -0
- package/dist/jobs/define-job.js +16 -0
- package/dist/jobs/gcp-cloud-tasks.d.ts +41 -0
- package/dist/jobs/gcp-cloud-tasks.js +53 -0
- package/dist/jobs/gcp-pubsub.d.ts +25 -0
- package/dist/jobs/gcp-pubsub.js +39 -0
- package/dist/jobs/handlers/gmail-sync-handler.d.ts +9 -0
- package/dist/jobs/handlers/gmail-sync-handler.js +9 -0
- package/dist/jobs/handlers/index.d.ts +9 -0
- package/dist/jobs/handlers/index.js +12 -0
- package/dist/jobs/handlers/ping-handler.d.ts +10 -0
- package/dist/jobs/handlers/ping-handler.js +15 -0
- package/dist/jobs/handlers/storage-document-handler.d.ts +12 -0
- package/dist/jobs/handlers/storage-document-handler.js +14 -0
- package/dist/jobs/index.d.ts +3 -0
- package/dist/jobs/index.js +4 -0
- package/dist/jobs/memory-queue.d.ts +18 -0
- package/dist/jobs/memory-queue.js +71 -0
- package/dist/jobs/queue.d.ts +131 -0
- package/dist/jobs/queue.js +33 -0
- package/dist/jobs/scaleway-sqs-queue.d.ts +30 -0
- package/dist/jobs/scaleway-sqs-queue.js +153 -0
- package/dist/jsonschema.d.ts +42 -0
- package/dist/jsonschema.js +51 -0
- package/dist/knowledge/binding.d.ts +25 -0
- package/dist/knowledge/binding.js +0 -0
- package/dist/knowledge/docs/knowledge.docblock.d.ts +6 -0
- package/dist/knowledge/docs/knowledge.docblock.js +21 -0
- package/dist/knowledge/index.d.ts +11 -0
- package/dist/knowledge/index.js +10 -0
- package/dist/knowledge/ingestion/document-processor.d.ts +24 -0
- package/dist/knowledge/ingestion/document-processor.js +54 -0
- package/dist/knowledge/ingestion/embedding-service.d.ts +12 -0
- package/dist/knowledge/ingestion/embedding-service.js +25 -0
- package/dist/knowledge/ingestion/gmail-adapter.d.ts +18 -0
- package/dist/knowledge/ingestion/gmail-adapter.js +51 -0
- package/dist/knowledge/ingestion/index.d.ts +6 -0
- package/dist/knowledge/ingestion/index.js +7 -0
- package/dist/knowledge/ingestion/storage-adapter.d.ts +15 -0
- package/dist/knowledge/ingestion/storage-adapter.js +26 -0
- package/dist/knowledge/ingestion/vector-indexer.d.ts +18 -0
- package/dist/knowledge/ingestion/vector-indexer.js +32 -0
- package/dist/knowledge/knowledge.capability.d.ts +7 -0
- package/dist/knowledge/knowledge.capability.js +21 -0
- package/dist/knowledge/knowledge.feature.d.ts +11 -0
- package/dist/knowledge/knowledge.feature.js +68 -0
- package/dist/knowledge/operations.d.ts +318 -0
- package/dist/knowledge/operations.js +321 -0
- package/dist/knowledge/query/index.d.ts +2 -0
- package/dist/knowledge/query/index.js +3 -0
- package/dist/knowledge/query/service.d.ts +29 -0
- package/dist/knowledge/query/service.js +65 -0
- package/dist/knowledge/runtime.d.ts +32 -0
- package/dist/knowledge/runtime.js +49 -0
- package/dist/knowledge/source.d.ts +32 -0
- package/dist/knowledge/source.js +0 -0
- package/dist/knowledge/spaces/email-threads.d.ts +7 -0
- package/dist/knowledge/spaces/email-threads.js +37 -0
- package/dist/knowledge/spaces/financial-docs.d.ts +7 -0
- package/dist/knowledge/spaces/financial-docs.js +37 -0
- package/dist/knowledge/spaces/financial-overview.d.ts +7 -0
- package/dist/knowledge/spaces/financial-overview.js +41 -0
- package/dist/knowledge/spaces/index.d.ts +7 -0
- package/dist/knowledge/spaces/index.js +8 -0
- package/dist/knowledge/spaces/product-canon.d.ts +7 -0
- package/dist/knowledge/spaces/product-canon.js +37 -0
- package/dist/knowledge/spaces/support-faq.d.ts +7 -0
- package/dist/knowledge/spaces/support-faq.js +40 -0
- package/dist/knowledge/spaces/uploaded-docs.d.ts +7 -0
- package/dist/knowledge/spaces/uploaded-docs.js +37 -0
- package/dist/knowledge/spec.d.ts +46 -0
- package/dist/knowledge/spec.js +17 -0
- package/dist/llm/exporters.d.ts +70 -0
- package/dist/llm/exporters.js +542 -0
- package/dist/llm/index.d.ts +4 -0
- package/dist/llm/index.js +4 -0
- package/dist/llm/prompts.d.ts +52 -0
- package/dist/llm/prompts.js +410 -0
- package/dist/llm/types.d.ts +215 -0
- package/dist/llm/types.js +0 -0
- package/dist/markdown.d.ts +22 -0
- package/dist/markdown.js +119 -0
- package/dist/migrations.d.ts +52 -0
- package/dist/migrations.js +31 -0
- package/dist/model-registry.d.ts +13 -0
- package/dist/model-registry.js +33 -0
- package/dist/onboarding-base.d.ts +138 -0
- package/dist/onboarding-base.js +195 -0
- package/dist/openapi.d.ts +31 -0
- package/dist/openapi.js +82 -0
- package/dist/operations/index.d.ts +3 -0
- package/dist/operations/index.js +4 -0
- package/dist/operations/operation.d.ts +186 -0
- package/dist/operations/operation.js +35 -0
- package/dist/operations/registry.d.ts +54 -0
- package/dist/operations/registry.js +176 -0
- package/dist/ownership.d.ts +84 -0
- package/dist/ownership.js +38 -0
- package/dist/policy/docs/policy.docblock.d.ts +6 -0
- package/dist/policy/docs/policy.docblock.js +21 -0
- package/dist/policy/engine.d.ts +40 -0
- package/dist/policy/engine.js +225 -0
- package/dist/policy/index.d.ts +5 -0
- package/dist/policy/index.js +5 -0
- package/dist/policy/opa-adapter.d.ts +45 -0
- package/dist/policy/opa-adapter.js +71 -0
- package/dist/policy/registry.d.ts +9 -0
- package/dist/policy/registry.js +11 -0
- package/dist/policy/spec.d.ts +103 -0
- package/dist/policy/spec.js +0 -0
- package/dist/presentations/docs/presentations-conventions.docblock.d.ts +6 -0
- package/dist/presentations/docs/presentations-conventions.docblock.js +21 -0
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +5 -0
- package/dist/presentations/presentations.d.ts +50 -0
- package/dist/presentations/presentations.js +7 -0
- package/dist/presentations/registry.d.ts +10 -0
- package/dist/presentations/registry.js +12 -0
- package/dist/presentations/transform-engine.d.ts +66 -0
- package/dist/presentations/transform-engine.js +282 -0
- package/dist/prompt.d.ts +53 -0
- package/dist/prompt.js +10 -0
- package/dist/promptRegistry.d.ts +15 -0
- package/dist/promptRegistry.js +31 -0
- package/dist/regenerator/adapters.d.ts +19 -0
- package/dist/regenerator/adapters.js +0 -0
- package/dist/regenerator/docs/regenerator.docblock.d.ts +6 -0
- package/dist/regenerator/docs/regenerator.docblock.js +21 -0
- package/dist/regenerator/executor.d.ts +70 -0
- package/dist/regenerator/executor.js +86 -0
- package/dist/regenerator/index.d.ts +7 -0
- package/dist/regenerator/index.js +6 -0
- package/dist/regenerator/service.d.ts +33 -0
- package/dist/regenerator/service.js +93 -0
- package/dist/regenerator/sinks.d.ts +26 -0
- package/dist/regenerator/sinks.js +32 -0
- package/dist/regenerator/types.d.ts +107 -0
- package/dist/regenerator/types.js +0 -0
- package/dist/regenerator/utils.d.ts +9 -0
- package/dist/regenerator/utils.js +51 -0
- package/dist/registry-utils.d.ts +106 -0
- package/dist/registry-utils.js +122 -0
- package/dist/registry.d.ts +32 -0
- package/dist/registry.js +61 -0
- package/dist/resources.d.ts +64 -0
- package/dist/resources.js +50 -0
- package/dist/schema-to-markdown.d.ts +54 -0
- package/dist/schema-to-markdown.js +217 -0
- package/dist/server/contracts-adapter-hydration.d.ts +15 -0
- package/dist/server/contracts-adapter-hydration.js +41 -0
- package/dist/server/contracts-adapter-input.d.ts +9 -0
- package/dist/server/contracts-adapter-input.js +83 -0
- package/dist/server/graphql-pothos.d.ts +31 -0
- package/dist/server/graphql-pothos.js +134 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +10 -0
- package/dist/server/mcp/createMcpServer.d.ts +15 -0
- package/dist/server/mcp/createMcpServer.js +27 -0
- package/dist/server/mcp/mcpTypes.d.ts +27 -0
- package/dist/server/mcp/mcpTypes.js +0 -0
- package/dist/server/mcp/registerPresentations.d.ts +7 -0
- package/dist/server/mcp/registerPresentations.js +54 -0
- package/dist/server/mcp/registerPrompts.d.ts +8 -0
- package/dist/server/mcp/registerPrompts.js +41 -0
- package/dist/server/mcp/registerResources.d.ts +8 -0
- package/dist/server/mcp/registerResources.js +35 -0
- package/dist/server/mcp/registerTools.d.ts +8 -0
- package/dist/server/mcp/registerTools.js +22 -0
- package/dist/server/provider-mcp.d.ts +2 -0
- package/dist/server/provider-mcp.js +3 -0
- package/dist/server/rest-elysia.d.ts +40 -0
- package/dist/server/rest-elysia.js +20 -0
- package/dist/server/rest-express.d.ts +16 -0
- package/dist/server/rest-express.js +36 -0
- package/dist/server/rest-generic.d.ts +32 -0
- package/dist/server/rest-generic.js +124 -0
- package/dist/server/rest-next-app.d.ts +35 -0
- package/dist/server/rest-next-app.js +38 -0
- package/dist/server/rest-next-mcp.d.ts +11 -0
- package/dist/server/rest-next-mcp.js +45 -0
- package/dist/server/rest-next-pages.d.ts +9 -0
- package/dist/server/rest-next-pages.js +22 -0
- package/dist/telemetry/anomaly.d.ts +27 -0
- package/dist/telemetry/anomaly.js +48 -0
- package/dist/telemetry/docs/telemetry.docblock.d.ts +6 -0
- package/dist/telemetry/docs/telemetry.docblock.js +21 -0
- package/dist/telemetry/index.d.ts +4 -0
- package/dist/telemetry/index.js +5 -0
- package/dist/telemetry/spec.d.ts +91 -0
- package/dist/telemetry/spec.js +42 -0
- package/dist/telemetry/tracker.d.ts +51 -0
- package/dist/telemetry/tracker.js +76 -0
- package/dist/tests/index.d.ts +3 -0
- package/dist/tests/index.js +4 -0
- package/dist/tests/runner.d.ts +43 -0
- package/dist/tests/runner.js +150 -0
- package/dist/tests/spec.d.ts +82 -0
- package/dist/tests/spec.js +34 -0
- package/dist/themes.d.ts +51 -0
- package/dist/themes.js +17 -0
- package/dist/translations/catalog.d.ts +28 -0
- package/dist/translations/catalog.js +0 -0
- package/dist/translations/tenant.d.ts +15 -0
- package/dist/translations/tenant.js +0 -0
- package/dist/types.d.ts +92 -0
- package/dist/types.js +0 -0
- package/dist/versioning/index.d.ts +3 -0
- package/dist/versioning/index.js +4 -0
- package/dist/versioning/types.d.ts +127 -0
- package/dist/versioning/types.js +24 -0
- package/dist/versioning/utils.d.ts +95 -0
- package/dist/versioning/utils.js +180 -0
- package/dist/workflow/adapters/db-adapter.d.ts +46 -0
- package/dist/workflow/adapters/db-adapter.js +83 -0
- package/dist/workflow/adapters/file-adapter.d.ts +14 -0
- package/dist/workflow/adapters/file-adapter.js +11 -0
- package/dist/workflow/adapters/index.d.ts +4 -0
- package/dist/workflow/adapters/index.js +5 -0
- package/dist/workflow/adapters/memory-store.d.ts +18 -0
- package/dist/workflow/adapters/memory-store.js +58 -0
- package/dist/workflow/expression.d.ts +9 -0
- package/dist/workflow/expression.js +99 -0
- package/dist/workflow/index.d.ts +17 -0
- package/dist/workflow/index.js +16 -0
- package/dist/workflow/overview.docblock.d.ts +6 -0
- package/dist/workflow/overview.docblock.js +21 -0
- package/dist/workflow/runner.d.ts +77 -0
- package/dist/workflow/runner.js +337 -0
- package/dist/workflow/sla-monitor.d.ts +20 -0
- package/dist/workflow/sla-monitor.js +47 -0
- package/dist/workflow/spec.d.ts +93 -0
- package/dist/workflow/spec.js +11 -0
- package/dist/workflow/state.d.ts +35 -0
- package/dist/workflow/state.js +0 -0
- package/dist/workflow/validation.d.ts +29 -0
- package/dist/workflow/validation.js +176 -0
- package/dist/workspace-config/contractsrc-schema.d.ts +1162 -0
- package/dist/workspace-config/contractsrc-schema.js +421 -0
- package/dist/workspace-config/index.d.ts +2 -0
- package/dist/workspace-config/index.js +3 -0
- package/dist/workspace-config/workspace-config.docblock.d.ts +6 -0
- package/dist/workspace-config/workspace-config.docblock.js +45 -0
- package/package.json +618 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import * as z$2 from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/workspace-config/contractsrc-schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* ContractSpec configuration schema definitions.
|
|
6
|
+
*
|
|
7
|
+
* These schemas define the structure of .contractsrc.json files
|
|
8
|
+
* and are shared across CLI tools and libraries.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Schema output format for code generation.
|
|
12
|
+
* Controls how imported/generated schemas are written.
|
|
13
|
+
*/
|
|
14
|
+
const SchemaFormatSchema = z$2.enum([
|
|
15
|
+
"contractspec",
|
|
16
|
+
"zod",
|
|
17
|
+
"json-schema",
|
|
18
|
+
"graphql"
|
|
19
|
+
]);
|
|
20
|
+
/**
|
|
21
|
+
* OpenAPI source configuration for import/sync/validate operations.
|
|
22
|
+
*/
|
|
23
|
+
const OpenApiSourceConfigSchema = z$2.object({
|
|
24
|
+
name: z$2.string(),
|
|
25
|
+
url: z$2.url().optional(),
|
|
26
|
+
file: z$2.string().optional(),
|
|
27
|
+
syncMode: z$2.enum([
|
|
28
|
+
"import",
|
|
29
|
+
"sync",
|
|
30
|
+
"validate"
|
|
31
|
+
]).default("validate"),
|
|
32
|
+
tags: z$2.array(z$2.string()).optional(),
|
|
33
|
+
exclude: z$2.array(z$2.string()).optional(),
|
|
34
|
+
include: z$2.array(z$2.string()).optional(),
|
|
35
|
+
prefix: z$2.string().optional(),
|
|
36
|
+
defaultStability: z$2.enum([
|
|
37
|
+
"experimental",
|
|
38
|
+
"beta",
|
|
39
|
+
"stable",
|
|
40
|
+
"deprecated"
|
|
41
|
+
]).optional(),
|
|
42
|
+
defaultAuth: z$2.enum([
|
|
43
|
+
"anonymous",
|
|
44
|
+
"user",
|
|
45
|
+
"admin"
|
|
46
|
+
]).optional(),
|
|
47
|
+
defaultOwners: z$2.array(z$2.string()).optional(),
|
|
48
|
+
schemaFormat: SchemaFormatSchema.default("contractspec")
|
|
49
|
+
});
|
|
50
|
+
const OpenApiExportConfigSchema = z$2.object({
|
|
51
|
+
outputPath: z$2.string().default("./openapi.json"),
|
|
52
|
+
format: z$2.enum(["json", "yaml"]).default("json"),
|
|
53
|
+
title: z$2.string().optional(),
|
|
54
|
+
version: z$2.string().optional(),
|
|
55
|
+
description: z$2.string().optional(),
|
|
56
|
+
servers: z$2.array(z$2.object({
|
|
57
|
+
url: z$2.string(),
|
|
58
|
+
description: z$2.string().optional()
|
|
59
|
+
})).optional()
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* OpenAPI configuration section.
|
|
63
|
+
*/
|
|
64
|
+
const OpenApiConfigSchema = z$2.object({
|
|
65
|
+
sources: z$2.array(OpenApiSourceConfigSchema).optional(),
|
|
66
|
+
export: OpenApiExportConfigSchema.optional()
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Grouping strategy for organizing specs.
|
|
70
|
+
*/
|
|
71
|
+
const GroupingStrategySchema = z$2.enum([
|
|
72
|
+
"by-tag",
|
|
73
|
+
"by-owner",
|
|
74
|
+
"by-domain",
|
|
75
|
+
"by-url-path-single",
|
|
76
|
+
"by-url-path-multi",
|
|
77
|
+
"by-feature",
|
|
78
|
+
"none"
|
|
79
|
+
]);
|
|
80
|
+
/**
|
|
81
|
+
* Grouping rule configuration.
|
|
82
|
+
*/
|
|
83
|
+
const GroupingRuleSchema = z$2.object({
|
|
84
|
+
strategy: GroupingStrategySchema,
|
|
85
|
+
urlPathLevel: z$2.number().optional(),
|
|
86
|
+
pattern: z$2.string().optional()
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Output directory conventions for generated specs.
|
|
90
|
+
*/
|
|
91
|
+
const FolderConventionsSchema = z$2.object({
|
|
92
|
+
models: z$2.string().default("models"),
|
|
93
|
+
operations: z$2.string().default("operations/commands|queries"),
|
|
94
|
+
events: z$2.string().default("events"),
|
|
95
|
+
presentations: z$2.string().default("presentations"),
|
|
96
|
+
forms: z$2.string().default("forms"),
|
|
97
|
+
groupByFeature: z$2.boolean().default(true),
|
|
98
|
+
operationsGrouping: GroupingRuleSchema.optional(),
|
|
99
|
+
modelsGrouping: GroupingRuleSchema.optional(),
|
|
100
|
+
eventsGrouping: GroupingRuleSchema.optional()
|
|
101
|
+
});
|
|
102
|
+
/**
|
|
103
|
+
* PR comment configuration for CI/CD.
|
|
104
|
+
*/
|
|
105
|
+
const PrCommentConfigSchema = z$2.object({
|
|
106
|
+
enabled: z$2.boolean().default(true),
|
|
107
|
+
template: z$2.enum(["minimal", "detailed"]).default("detailed"),
|
|
108
|
+
updateExisting: z$2.boolean().default(true)
|
|
109
|
+
});
|
|
110
|
+
/**
|
|
111
|
+
* GitHub check run configuration for CI/CD.
|
|
112
|
+
*/
|
|
113
|
+
const CheckRunConfigSchema = z$2.object({
|
|
114
|
+
enabled: z$2.boolean().default(true),
|
|
115
|
+
name: z$2.string().default("ContractSpec Impact"),
|
|
116
|
+
failOnBreaking: z$2.boolean().default(true),
|
|
117
|
+
failOnChanges: z$2.boolean().default(false)
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* Impact detection configuration for CI/CD.
|
|
121
|
+
*/
|
|
122
|
+
const ImpactConfigSchema = z$2.object({
|
|
123
|
+
baseline: z$2.string().default("default-branch"),
|
|
124
|
+
include: z$2.array(z$2.string()).optional(),
|
|
125
|
+
exclude: z$2.array(z$2.string()).optional()
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* CI/CD configuration section.
|
|
129
|
+
*/
|
|
130
|
+
const CiConfigSchema = z$2.object({
|
|
131
|
+
checks: z$2.array(z$2.string()).default([
|
|
132
|
+
"structure",
|
|
133
|
+
"integrity",
|
|
134
|
+
"deps"
|
|
135
|
+
]),
|
|
136
|
+
skipChecks: z$2.array(z$2.string()).optional(),
|
|
137
|
+
failOnWarnings: z$2.boolean().default(false),
|
|
138
|
+
uploadSarif: z$2.boolean().default(true),
|
|
139
|
+
prComment: PrCommentConfigSchema.optional(),
|
|
140
|
+
checkRun: CheckRunConfigSchema.optional(),
|
|
141
|
+
impact: ImpactConfigSchema.optional()
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* External workspace reference for cross-workspace dependencies in meta-repos.
|
|
145
|
+
*/
|
|
146
|
+
const ExternalWorkspaceSchema = z$2.object({
|
|
147
|
+
alias: z$2.string(),
|
|
148
|
+
submodule: z$2.string(),
|
|
149
|
+
packages: z$2.array(z$2.string()).optional(),
|
|
150
|
+
autoResolve: z$2.boolean().default(true)
|
|
151
|
+
});
|
|
152
|
+
/**
|
|
153
|
+
* Meta-repo configuration section.
|
|
154
|
+
*/
|
|
155
|
+
const MetaRepoConfigSchema = z$2.object({
|
|
156
|
+
activeScope: z$2.string().optional(),
|
|
157
|
+
externalWorkspaces: z$2.array(ExternalWorkspaceSchema).optional(),
|
|
158
|
+
crossWorkspaceSearch: z$2.boolean().default(false)
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* Supported formatter tools.
|
|
162
|
+
*/
|
|
163
|
+
const FormatterTypeSchema = z$2.enum([
|
|
164
|
+
"prettier",
|
|
165
|
+
"eslint",
|
|
166
|
+
"biome",
|
|
167
|
+
"dprint",
|
|
168
|
+
"custom"
|
|
169
|
+
]);
|
|
170
|
+
/**
|
|
171
|
+
* Formatter configuration for code generation.
|
|
172
|
+
*/
|
|
173
|
+
const FormatterConfigSchema = z$2.object({
|
|
174
|
+
enabled: z$2.boolean().default(true),
|
|
175
|
+
type: FormatterTypeSchema.optional(),
|
|
176
|
+
command: z$2.string().optional(),
|
|
177
|
+
args: z$2.array(z$2.string()).optional(),
|
|
178
|
+
timeout: z$2.number().default(3e4)
|
|
179
|
+
});
|
|
180
|
+
/**
|
|
181
|
+
* Bump strategy for version management.
|
|
182
|
+
*/
|
|
183
|
+
const BumpStrategySchema = z$2.enum(["impact", "conventional"]);
|
|
184
|
+
/**
|
|
185
|
+
* Changelog format template.
|
|
186
|
+
*/
|
|
187
|
+
const ChangelogFormatSchema = z$2.enum([
|
|
188
|
+
"keep-a-changelog",
|
|
189
|
+
"conventional",
|
|
190
|
+
"custom"
|
|
191
|
+
]);
|
|
192
|
+
/**
|
|
193
|
+
* Changelog tier configuration.
|
|
194
|
+
*/
|
|
195
|
+
const ChangelogTierSchema = z$2.enum([
|
|
196
|
+
"spec",
|
|
197
|
+
"library",
|
|
198
|
+
"monorepo"
|
|
199
|
+
]);
|
|
200
|
+
/**
|
|
201
|
+
* Versioning configuration for changelog and version management.
|
|
202
|
+
*/
|
|
203
|
+
const VersioningConfigSchema = z$2.object({
|
|
204
|
+
autoBump: z$2.boolean().default(false),
|
|
205
|
+
bumpStrategy: BumpStrategySchema.default("impact"),
|
|
206
|
+
integrateWithChangesets: z$2.boolean().default(false),
|
|
207
|
+
changelogTiers: z$2.array(ChangelogTierSchema).default([
|
|
208
|
+
"spec",
|
|
209
|
+
"library",
|
|
210
|
+
"monorepo"
|
|
211
|
+
]),
|
|
212
|
+
format: ChangelogFormatSchema.default("keep-a-changelog"),
|
|
213
|
+
commitChanges: z$2.boolean().default(false),
|
|
214
|
+
commitMessage: z$2.string().default("chore: bump spec versions"),
|
|
215
|
+
createTags: z$2.boolean().default(false),
|
|
216
|
+
tagPrefix: z$2.string().default("v"),
|
|
217
|
+
include: z$2.array(z$2.string()).optional(),
|
|
218
|
+
exclude: z$2.array(z$2.string()).optional()
|
|
219
|
+
});
|
|
220
|
+
/**
|
|
221
|
+
* Supported rule synchronization targets.
|
|
222
|
+
*/
|
|
223
|
+
const RuleSyncTargetSchema = z$2.enum([
|
|
224
|
+
"cursor",
|
|
225
|
+
"windsurf",
|
|
226
|
+
"cline",
|
|
227
|
+
"claude-code",
|
|
228
|
+
"copilot",
|
|
229
|
+
"subagent",
|
|
230
|
+
"skill"
|
|
231
|
+
]);
|
|
232
|
+
/**
|
|
233
|
+
* Configuration for AI agent rules synchronization (rulesync).
|
|
234
|
+
*/
|
|
235
|
+
const RuleSyncConfigSchema = z$2.object({
|
|
236
|
+
enabled: z$2.boolean().default(false),
|
|
237
|
+
rulesDir: z$2.string().default("./.rules"),
|
|
238
|
+
rules: z$2.array(z$2.string()).default(["**/*.rule.md"]),
|
|
239
|
+
targets: z$2.array(RuleSyncTargetSchema).default(["cursor", "windsurf"]),
|
|
240
|
+
autoSync: z$2.boolean().default(true),
|
|
241
|
+
ejectMode: z$2.boolean().default(false)
|
|
242
|
+
});
|
|
243
|
+
/**
|
|
244
|
+
* Claude Agent SDK configuration.
|
|
245
|
+
*/
|
|
246
|
+
const ClaudeAgentSDKConfigSchema = z$2.object({
|
|
247
|
+
enabled: z$2.boolean().default(false),
|
|
248
|
+
apiKey: z$2.string().optional(),
|
|
249
|
+
model: z$2.string().default("claude-sonnet-4-20250514"),
|
|
250
|
+
computerUse: z$2.boolean().default(false),
|
|
251
|
+
extendedThinking: z$2.boolean().default(false)
|
|
252
|
+
});
|
|
253
|
+
/**
|
|
254
|
+
* OpenCode SDK configuration.
|
|
255
|
+
*/
|
|
256
|
+
const OpenCodeSDKConfigSchema = z$2.object({
|
|
257
|
+
enabled: z$2.boolean().default(false),
|
|
258
|
+
serverUrl: z$2.string().optional(),
|
|
259
|
+
port: z$2.number().optional(),
|
|
260
|
+
agentType: z$2.enum([
|
|
261
|
+
"build",
|
|
262
|
+
"plan",
|
|
263
|
+
"general",
|
|
264
|
+
"explore"
|
|
265
|
+
]).default("general"),
|
|
266
|
+
model: z$2.string().optional()
|
|
267
|
+
});
|
|
268
|
+
/**
|
|
269
|
+
* External agent SDK configuration section.
|
|
270
|
+
*/
|
|
271
|
+
const ExternalAgentsConfigSchema = z$2.object({
|
|
272
|
+
claudeAgent: ClaudeAgentSDKConfigSchema.optional(),
|
|
273
|
+
openCode: OpenCodeSDKConfigSchema.optional()
|
|
274
|
+
});
|
|
275
|
+
/**
|
|
276
|
+
* Rule severity levels (inspired by ESLint).
|
|
277
|
+
*/
|
|
278
|
+
const RuleSeveritySchema = z$2.enum([
|
|
279
|
+
"off",
|
|
280
|
+
"warn",
|
|
281
|
+
"error"
|
|
282
|
+
]);
|
|
283
|
+
/**
|
|
284
|
+
* Contract kinds for per-kind rule overrides.
|
|
285
|
+
*/
|
|
286
|
+
const SpecKindSchema = z$2.enum([
|
|
287
|
+
"operation",
|
|
288
|
+
"event",
|
|
289
|
+
"presentation",
|
|
290
|
+
"feature",
|
|
291
|
+
"workflow",
|
|
292
|
+
"data-view",
|
|
293
|
+
"migration",
|
|
294
|
+
"telemetry",
|
|
295
|
+
"experiment",
|
|
296
|
+
"app-config"
|
|
297
|
+
]);
|
|
298
|
+
/**
|
|
299
|
+
* Available lint rules with their severity.
|
|
300
|
+
*/
|
|
301
|
+
const LintRulesSchema = z$2.object({
|
|
302
|
+
"require-acceptance": RuleSeveritySchema.optional(),
|
|
303
|
+
"require-examples": RuleSeveritySchema.optional(),
|
|
304
|
+
"require-stability": RuleSeveritySchema.optional(),
|
|
305
|
+
"require-owners-format": RuleSeveritySchema.optional(),
|
|
306
|
+
"event-past-tense": RuleSeveritySchema.optional(),
|
|
307
|
+
"no-todo": RuleSeveritySchema.optional(),
|
|
308
|
+
"workflow-transitions": RuleSeveritySchema.optional(),
|
|
309
|
+
"telemetry-privacy": RuleSeveritySchema.optional(),
|
|
310
|
+
"experiment-allocation": RuleSeveritySchema.optional(),
|
|
311
|
+
"app-config-appid": RuleSeveritySchema.optional(),
|
|
312
|
+
"app-config-capabilities": RuleSeveritySchema.optional(),
|
|
313
|
+
"data-view-fields": RuleSeveritySchema.optional()
|
|
314
|
+
});
|
|
315
|
+
/**
|
|
316
|
+
* Test linking strategy for discovering test coverage.
|
|
317
|
+
*/
|
|
318
|
+
const TestLinkingStrategySchema = z$2.enum([
|
|
319
|
+
"target-first",
|
|
320
|
+
"convention-only",
|
|
321
|
+
"both"
|
|
322
|
+
]);
|
|
323
|
+
/**
|
|
324
|
+
* Test linking configuration for contract-first test discovery.
|
|
325
|
+
*/
|
|
326
|
+
const TestLinkingConfigSchema = z$2.object({
|
|
327
|
+
strategy: TestLinkingStrategySchema.default("both"),
|
|
328
|
+
warnOnConvention: z$2.boolean().default(false)
|
|
329
|
+
});
|
|
330
|
+
/**
|
|
331
|
+
* Testing configuration section.
|
|
332
|
+
*/
|
|
333
|
+
const TestingConfigSchema = z$2.object({
|
|
334
|
+
runner: z$2.enum([
|
|
335
|
+
"internal",
|
|
336
|
+
"jest",
|
|
337
|
+
"vitest",
|
|
338
|
+
"bun"
|
|
339
|
+
]).default("internal"),
|
|
340
|
+
testMatch: z$2.array(z$2.string()).default(["**/*.{test,spec}.{ts,js}"]),
|
|
341
|
+
autoGenerate: z$2.boolean().default(false),
|
|
342
|
+
integrity: z$2.object({
|
|
343
|
+
requireTestsFor: z$2.array(SpecKindSchema).optional(),
|
|
344
|
+
minCoverage: z$2.number().optional()
|
|
345
|
+
}).optional(),
|
|
346
|
+
testLinking: TestLinkingConfigSchema.optional()
|
|
347
|
+
});
|
|
348
|
+
/**
|
|
349
|
+
* Full rules configuration with global defaults and per-kind overrides.
|
|
350
|
+
*/
|
|
351
|
+
const RulesConfigSchema = z$2.object({
|
|
352
|
+
defaults: LintRulesSchema.optional(),
|
|
353
|
+
overrides: z$2.record(SpecKindSchema, LintRulesSchema).optional()
|
|
354
|
+
});
|
|
355
|
+
/**
|
|
356
|
+
* Git hooks configuration.
|
|
357
|
+
* Maps hook names (e.g., "pre-commit") to a list of commands or checks to run.
|
|
358
|
+
*/
|
|
359
|
+
const HooksConfigSchema = z$2.record(z$2.string(), z$2.array(z$2.string()));
|
|
360
|
+
/**
|
|
361
|
+
* Full ContractSpec configuration schema (.contractsrc.json).
|
|
362
|
+
*/
|
|
363
|
+
const ContractsrcSchema = z$2.object({
|
|
364
|
+
aiProvider: z$2.enum([
|
|
365
|
+
"claude",
|
|
366
|
+
"openai",
|
|
367
|
+
"ollama",
|
|
368
|
+
"custom"
|
|
369
|
+
]).default("claude"),
|
|
370
|
+
aiModel: z$2.string().optional(),
|
|
371
|
+
agentMode: z$2.enum([
|
|
372
|
+
"simple",
|
|
373
|
+
"cursor",
|
|
374
|
+
"claude-code",
|
|
375
|
+
"openai-codex",
|
|
376
|
+
"claude-agent-sdk",
|
|
377
|
+
"opencode-sdk"
|
|
378
|
+
]).default("simple"),
|
|
379
|
+
customEndpoint: z$2.url().nullable().optional(),
|
|
380
|
+
customApiKey: z$2.string().nullable().optional(),
|
|
381
|
+
outputDir: z$2.string().default("./src"),
|
|
382
|
+
conventions: FolderConventionsSchema,
|
|
383
|
+
defaultOwners: z$2.array(z$2.string()).default([]),
|
|
384
|
+
defaultTags: z$2.array(z$2.string()).default([]),
|
|
385
|
+
packages: z$2.array(z$2.string()).optional(),
|
|
386
|
+
excludePackages: z$2.array(z$2.string()).optional(),
|
|
387
|
+
recursive: z$2.boolean().optional(),
|
|
388
|
+
openapi: OpenApiConfigSchema.optional(),
|
|
389
|
+
ci: CiConfigSchema.optional(),
|
|
390
|
+
metaRepo: MetaRepoConfigSchema.optional(),
|
|
391
|
+
rules: RulesConfigSchema.optional(),
|
|
392
|
+
testing: TestingConfigSchema.optional(),
|
|
393
|
+
hooks: HooksConfigSchema.optional(),
|
|
394
|
+
schemaFormat: SchemaFormatSchema.default("contractspec"),
|
|
395
|
+
formatter: FormatterConfigSchema.optional(),
|
|
396
|
+
versioning: VersioningConfigSchema.optional(),
|
|
397
|
+
ruleSync: RuleSyncConfigSchema.optional(),
|
|
398
|
+
externalAgents: ExternalAgentsConfigSchema.optional()
|
|
399
|
+
});
|
|
400
|
+
/**
|
|
401
|
+
* Default configuration values.
|
|
402
|
+
*/
|
|
403
|
+
const DEFAULT_CONTRACTSRC = {
|
|
404
|
+
aiProvider: "claude",
|
|
405
|
+
agentMode: "simple",
|
|
406
|
+
outputDir: "./src",
|
|
407
|
+
conventions: {
|
|
408
|
+
models: "models",
|
|
409
|
+
operations: "interactions/commands|queries",
|
|
410
|
+
events: "events",
|
|
411
|
+
presentations: "presentations",
|
|
412
|
+
forms: "forms",
|
|
413
|
+
groupByFeature: true
|
|
414
|
+
},
|
|
415
|
+
defaultOwners: [],
|
|
416
|
+
defaultTags: [],
|
|
417
|
+
schemaFormat: "contractspec"
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
//#endregion
|
|
421
|
+
export { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, CheckRunConfigSchema, CiConfigSchema, ClaudeAgentSDKConfigSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, ExternalAgentsConfigSchema, ExternalWorkspaceSchema, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, GroupingRuleSchema, GroupingStrategySchema, HooksConfigSchema, ImpactConfigSchema, LintRulesSchema, MetaRepoConfigSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, OpenCodeSDKConfigSchema, PrCommentConfigSchema, RuleSeveritySchema, RuleSyncConfigSchema, RuleSyncTargetSchema, RulesConfigSchema, SchemaFormatSchema, SpecKindSchema, TestLinkingConfigSchema, TestLinkingStrategySchema, TestingConfigSchema, VersioningConfigSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { BumpStrategy, BumpStrategySchema, ChangelogFormat, ChangelogFormatSchema, ChangelogTier, ChangelogTierSchema, ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, FormatterConfig, FormatterConfigSchema, FormatterType, FormatterTypeSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema, RuleSyncConfig, RuleSyncConfigSchema, RuleSyncTarget, RuleSyncTargetSchema, SchemaFormat, SchemaFormatSchema, VersioningConfig, VersioningConfigSchema } from "./contractsrc-schema.js";
|
|
2
|
+
export { type BumpStrategy, BumpStrategySchema, type ChangelogFormat, ChangelogFormatSchema, type ChangelogTier, ChangelogTierSchema, type ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, type FolderConventions, FolderConventionsSchema, type FormatterConfig, FormatterConfigSchema, type FormatterType, FormatterTypeSchema, type OpenApiConfig, OpenApiConfigSchema, type OpenApiExportConfig, OpenApiExportConfigSchema, type OpenApiSourceConfig, OpenApiSourceConfigSchema, type RuleSyncConfig, RuleSyncConfigSchema, type RuleSyncTarget, RuleSyncTargetSchema, type SchemaFormat, SchemaFormatSchema, type VersioningConfig, VersioningConfigSchema };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, RuleSyncConfigSchema, RuleSyncTargetSchema, SchemaFormatSchema, VersioningConfigSchema } from "./contractsrc-schema.js";
|
|
2
|
+
|
|
3
|
+
export { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, RuleSyncConfigSchema, RuleSyncTargetSchema, SchemaFormatSchema, VersioningConfigSchema };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { registerDocBlocks } from "../docs/registry.js";
|
|
2
|
+
|
|
3
|
+
//#region src/workspace-config/workspace-config.docblock.ts
|
|
4
|
+
const tech_workspace_config_DocBlocks = [{
|
|
5
|
+
id: "docs.tech.contracts.workspace-config",
|
|
6
|
+
title: "Workspace Configuration (.contractsrc)",
|
|
7
|
+
summary: "Configuration-as-code conventions for ContractSpec workspaces (`.contractsrc.json`).",
|
|
8
|
+
kind: "reference",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/tech/contracts/workspace-config",
|
|
11
|
+
tags: [
|
|
12
|
+
"tech",
|
|
13
|
+
"contracts",
|
|
14
|
+
"config"
|
|
15
|
+
],
|
|
16
|
+
body: `## Workspace Configuration (.contractsrc)
|
|
17
|
+
|
|
18
|
+
ContractSpec uses a hierarchical configuration system anchored by \`.contractsrc.json\` files. Configuration loader supports standard rc-file discovery (cosmiconfig).
|
|
19
|
+
|
|
20
|
+
### Schema Formats
|
|
21
|
+
|
|
22
|
+
The \`schemaFormat\` option controls the output format of schema generation commands (like \`contractspec openapi import\`).
|
|
23
|
+
|
|
24
|
+
Supported formats:
|
|
25
|
+
- \`contractspec\` (default): Generates standard \`defineSchemaModel\` code.
|
|
26
|
+
- \`zod\`: Generates raw Zod schemas using \`z.object({...})\`.
|
|
27
|
+
- \`json-schema\`: Generates JSON Schema definitions.
|
|
28
|
+
- \`graphql\`: Generates GraphQL SDL type definitions.
|
|
29
|
+
|
|
30
|
+
### Config Interface
|
|
31
|
+
|
|
32
|
+
\`\`\`ts
|
|
33
|
+
export interface ContractsrcConfig {
|
|
34
|
+
// ... existing fields ...
|
|
35
|
+
schemaFormat?: 'contractspec' | 'zod' | 'json-schema' | 'graphql';
|
|
36
|
+
}
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
Defined in \`@contractspec/lib.contracts/workspace-config\`.
|
|
40
|
+
`
|
|
41
|
+
}];
|
|
42
|
+
registerDocBlocks(tech_workspace_config_DocBlocks);
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { tech_workspace_config_DocBlocks };
|