@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217062139 → 0.0.0-canary-20251217060834

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.
Files changed (191) hide show
  1. package/dist/adapters/ai.js +1 -1
  2. package/dist/adapters/index.d.ts +7 -0
  3. package/dist/ai/agents/claude-code-agent.js +1 -1
  4. package/dist/ai/agents/openai-codex-agent.js +1 -1
  5. package/dist/ai/agents/orchestrator.js +1 -1
  6. package/dist/ai/providers.js +1 -1
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.js +1 -1
  9. package/dist/ports/index.d.ts +5 -0
  10. package/dist/services/agent-guide/adapters/claude-code.js +1 -1
  11. package/dist/services/agent-guide/adapters/cursor-cli.js +2 -2
  12. package/dist/services/agent-guide/adapters/generic-mcp.js +1 -1
  13. package/dist/services/agent-guide/agent-guide-service.js +1 -1
  14. package/dist/services/agent-guide/index.d.ts +6 -0
  15. package/dist/services/build.js +1 -1
  16. package/dist/services/ci-check/ci-check-service.js +1 -1
  17. package/dist/services/ci-check/index.d.ts +2 -0
  18. package/dist/services/config.js +1 -1
  19. package/dist/services/deps.js +1 -1
  20. package/dist/services/diff.js +1 -1
  21. package/dist/services/doctor/index.d.ts +2 -0
  22. package/dist/services/implementation/index.d.ts +3 -0
  23. package/dist/services/implementation/resolver.js +1 -1
  24. package/dist/services/index.d.ts +56 -0
  25. package/dist/services/integrity.js +1 -1
  26. package/dist/services/list.js +1 -1
  27. package/dist/services/openapi/export-service.js +1 -1
  28. package/dist/services/openapi/import-service.js +1 -1
  29. package/dist/services/openapi/index.d.ts +5 -0
  30. package/dist/services/openapi/sync-service.js +1 -1
  31. package/dist/services/openapi/validate-service.js +1 -1
  32. package/dist/services/regenerator.js +1 -1
  33. package/dist/services/test.js +1 -1
  34. package/dist/services/validate-implementation.js +1 -1
  35. package/dist/services/validate.js +1 -1
  36. package/dist/services/verification-cache/adapters/index.d.ts +3 -0
  37. package/dist/services/verification-cache/index.d.ts +6 -0
  38. package/dist/services/verify/ai-verifier.js +6 -6
  39. package/dist/services/verify/behavior-verifier.js +1 -1
  40. package/dist/services/verify/index.d.ts +5 -0
  41. package/dist/services/verify/structure-verifier.js +1 -1
  42. package/package.json +9 -9
  43. package/dist/libs/ai-providers/dist/factory.js +0 -1
  44. package/dist/libs/ai-providers/dist/index.js +0 -1
  45. package/dist/libs/ai-providers/dist/legacy.js +0 -1
  46. package/dist/libs/ai-providers/dist/models.js +0 -1
  47. package/dist/libs/ai-providers/dist/validation.js +0 -1
  48. package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -1
  49. package/dist/libs/contracts/dist/client/index.js +0 -1
  50. package/dist/libs/contracts/dist/client/react/feature-render.js +0 -1
  51. package/dist/libs/contracts/dist/client/react/form-render.js +0 -1
  52. package/dist/libs/contracts/dist/client/react/index.js +0 -1
  53. package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
  54. package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -1
  55. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -76
  56. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -350
  57. package/dist/libs/contracts/dist/docs/index.js +0 -1
  58. package/dist/libs/contracts/dist/docs/presentations.js +0 -1
  59. package/dist/libs/contracts/dist/docs/registry.js +0 -1
  60. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -383
  61. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -68
  62. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -140
  63. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -86
  64. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -1
  65. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -58
  66. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -38
  67. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -213
  68. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -289
  69. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -1
  70. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -1
  71. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -262
  72. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -1
  73. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -57
  74. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -63
  75. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -36
  76. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -1
  77. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -20
  78. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -65
  79. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -1
  80. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -41
  81. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -122
  82. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -1
  83. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -68
  84. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -1
  85. package/dist/libs/contracts/dist/events.js +0 -1
  86. package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
  87. package/dist/libs/contracts/dist/index.js +0 -1
  88. package/dist/libs/contracts/dist/install.js +0 -1
  89. package/dist/libs/contracts/dist/integrations/contracts.js +0 -1
  90. package/dist/libs/contracts/dist/integrations/index.js +0 -1
  91. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -1
  92. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -1
  93. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -1
  94. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -1
  95. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -1
  96. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -1
  97. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -1
  98. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -1
  99. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -1
  100. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -1
  101. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -1
  102. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -1
  103. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -1
  104. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -1
  105. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -1
  106. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -1
  107. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -1
  108. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -1
  109. package/dist/libs/contracts/dist/jsonschema.js +0 -1
  110. package/dist/libs/contracts/dist/knowledge/contracts.js +0 -1
  111. package/dist/libs/contracts/dist/knowledge/index.js +0 -1
  112. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -1
  113. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -1
  114. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -1
  115. package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -1
  116. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -1
  117. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -1
  118. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -1
  119. package/dist/libs/contracts/dist/llm/exporters.js +0 -4
  120. package/dist/libs/contracts/dist/llm/index.js +0 -1
  121. package/dist/libs/contracts/dist/llm/prompts.js +0 -75
  122. package/dist/libs/contracts/dist/onboarding-base.js +0 -1
  123. package/dist/libs/contracts/dist/openapi.js +0 -1
  124. package/dist/libs/contracts/dist/ownership.js +0 -1
  125. package/dist/libs/contracts/dist/presentations.js +0 -1
  126. package/dist/libs/contracts/dist/presentations.v2.js +0 -1
  127. package/dist/libs/contracts/dist/prompt.js +0 -1
  128. package/dist/libs/contracts/dist/promptRegistry.js +0 -1
  129. package/dist/libs/contracts/dist/regenerator/index.js +0 -1
  130. package/dist/libs/contracts/dist/regenerator/service.js +0 -1
  131. package/dist/libs/contracts/dist/regenerator/utils.js +0 -1
  132. package/dist/libs/contracts/dist/registry.js +0 -1
  133. package/dist/libs/contracts/dist/resources.js +0 -1
  134. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -1
  135. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -1
  136. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -1
  137. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -1
  138. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  139. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -1
  140. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  141. package/dist/libs/contracts/dist/schema/dist/index.js +0 -1
  142. package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -1
  143. package/dist/libs/contracts/dist/server/index.js +0 -1
  144. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -1
  145. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -1
  146. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
  147. package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -1
  148. package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
  149. package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
  150. package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
  151. package/dist/libs/contracts/dist/server/rest-express.js +0 -1
  152. package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
  153. package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
  154. package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
  155. package/dist/libs/contracts/dist/spec.js +0 -1
  156. package/dist/libs/contracts/dist/telemetry/index.js +0 -1
  157. package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
  158. package/dist/libs/contracts/dist/tests/index.js +0 -1
  159. package/dist/libs/contracts/dist/tests/runner.js +0 -1
  160. package/dist/libs/contracts/dist/workflow/index.js +0 -1
  161. package/dist/libs/contracts/dist/workflow/runner.js +0 -1
  162. package/dist/libs/contracts-transformers/dist/common/utils.js +0 -1
  163. package/dist/libs/contracts-transformers/dist/openapi/exporter.js +0 -1
  164. package/dist/libs/contracts-transformers/dist/openapi/importer.js +0 -2
  165. package/dist/libs/contracts-transformers/dist/openapi/index.js +0 -1
  166. package/dist/libs/contracts-transformers/dist/openapi/parser.js +0 -1
  167. package/dist/libs/contracts-transformers/dist/openapi/schema-converter.js +0 -4
  168. package/dist/modules/contractspec-workspace/dist/ai/code-generation.js +0 -100
  169. package/dist/modules/contractspec-workspace/dist/ai/spec-creation.js +0 -69
  170. package/dist/modules/contractspec-workspace/dist/analysis/deps/graph.js +0 -2
  171. package/dist/modules/contractspec-workspace/dist/analysis/deps/parse-imports.js +0 -1
  172. package/dist/modules/contractspec-workspace/dist/analysis/diff/semantic.js +0 -1
  173. package/dist/modules/contractspec-workspace/dist/analysis/feature-scan.js +0 -1
  174. package/dist/modules/contractspec-workspace/dist/analysis/spec-scan.js +0 -1
  175. package/dist/modules/contractspec-workspace/dist/analysis/validate/spec-structure.js +0 -1
  176. package/dist/modules/contractspec-workspace/dist/templates/app-config.js +0 -33
  177. package/dist/modules/contractspec-workspace/dist/templates/data-view.js +0 -54
  178. package/dist/modules/contractspec-workspace/dist/templates/event.js +0 -24
  179. package/dist/modules/contractspec-workspace/dist/templates/experiment.js +0 -62
  180. package/dist/modules/contractspec-workspace/dist/templates/handler.js +0 -63
  181. package/dist/modules/contractspec-workspace/dist/templates/integration-utils.js +0 -33
  182. package/dist/modules/contractspec-workspace/dist/templates/integration.js +0 -39
  183. package/dist/modules/contractspec-workspace/dist/templates/knowledge.js +0 -28
  184. package/dist/modules/contractspec-workspace/dist/templates/migration.js +0 -37
  185. package/dist/modules/contractspec-workspace/dist/templates/operation.js +0 -88
  186. package/dist/modules/contractspec-workspace/dist/templates/presentation.js +0 -53
  187. package/dist/modules/contractspec-workspace/dist/templates/telemetry.js +0 -69
  188. package/dist/modules/contractspec-workspace/dist/templates/utils.js +0 -1
  189. package/dist/modules/contractspec-workspace/dist/templates/workflow-runner.js +0 -42
  190. package/dist/modules/contractspec-workspace/dist/templates/workflow.js +0 -41
  191. package/dist/modules/contractspec-workspace/dist/types/generation-types.js +0 -1
@@ -1,33 +0,0 @@
1
- function e(e){let t=e.filter(e=>e.required);return` schema: {
2
- type: 'object',
3
- ${t.length>0?` required: [${t.map(e=>`'${e.key}'`).join(`, `)}],
4
- `:``} properties: {
5
- ${(e.length?e.map(e=>{let t=e.description?`, description: '${u(e.description)}'`:``;return` ${e.key}: { type: '${o(e.type)}'${t} }`}).join(`,
6
- `):``)||` `}
7
- },
8
- },\n`}function t(e){let t=e.filter(e=>e.required);return` schema: {
9
- type: 'object',
10
- ${t.length>0?` required: [${t.map(e=>`'${e.key}'`).join(`, `)}],
11
- `:``} properties: {
12
- ${(e.length?e.map(e=>{let t=e.description?`, description: '${u(e.description)}'`:``;return` ${e.key}: { type: 'string'${t} }`}).join(`,
13
- `):``)||` `}
14
- },
15
- },\n`}function n(e){return e.length===0?`{}`:`{
16
- ${e.map(e=>{switch(e.type){case`number`:return` ${e.key}: 0`;case`boolean`:return` ${e.key}: true`;case`string`:default:return` ${e.key}: '${e.key.toUpperCase()}_VALUE'`}}).join(`,
17
- `)}
18
- }`}function r(e){return e.length===0?`{}`:`{
19
- ${e.map(e=>` ${e.key}: '${e.key.toUpperCase()}_SECRET'`).join(`,
20
- `)}
21
- }`}function i(e,t){if(e==null&&t==null)return``;let n=[];return e!=null&&n.push(` rpm: ${e}`),t!=null&&n.push(` rph: ${t}`),` constraints: {
22
- rateLimit: {
23
- ${n.join(`,
24
- `)}
25
- },
26
- },
27
- `}function a(e,t,n){if(!e.includes(`byok`))return``;let r=t?` setupInstructions: '${u(t)}',\n`:``,i=n&&n.length?` requiredScopes: [${n.map(e=>`'${u(e)}'`).join(`, `)}],\n`:``;return!r&&!i?``:` byokSetup: {
28
- ${r}${i} },
29
- `}function o(e){switch(e){case`number`:return`number`;case`boolean`:return`boolean`;case`string`:default:return`string`}}function s(e){switch(e){case`beta`:return`Beta`;case`stable`:return`Stable`;case`deprecated`:return`Deprecated`;case`experimental`:default:return`Experimental`}}function c(e){return e.capabilitiesProvided.map(e=>` { key: '${e.key}', version: ${e.version} }`).join(`,
30
- `)}function l(e){return e.capabilitiesRequired.length===0?``:` requires: [
31
- ${e.capabilitiesRequired.map(e=>{let t=typeof e.version==`number`?`, version: ${e.version}`:``,n=e.optional?`, optional: true`:``,r=e.reason?`, reason: '${u(e.reason)}'`:``;return` { key: '${e.key}'${t}${n}${r} }`}).join(`,
32
- `)}
33
- ],`}function u(e){return e.replace(/`/g,"\\`").replace(/'/g,`\\'`)}export{a,c,e,i,l,n,r,s,t,u};
@@ -1,39 +0,0 @@
1
- import{t as e}from"./utils.js";import{a as t,c as n,e as r,i,l as a,n as o,r as s,s as c,t as l,u}from"./integration-utils.js";function d(d){let f=e(d.name.split(`.`).pop()??`Integration`),p=`${f}IntegrationSpec`,m=`register${f}Integration`,h=d.supportedModes.length?d.supportedModes:[`managed`],g=h.map(e=>`'${e}'`).join(`, `),_=n(d),v=a(d),y=r(d.configFields),b=o(d.configFields),x=l(d.secretFields),S=s(d.secretFields),C=d.docsUrl?` docsUrl: '${u(d.docsUrl)}',\n`:``,w=i(d.rateLimitRpm,d.rateLimitRph),T=t(h,d.byokSetupInstructions,d.byokRequiredScopes);return`import { StabilityEnum } from '@lssm/lib.contracts/ownership';
2
- import type { IntegrationSpec } from '@lssm/lib.contracts/integrations/spec';
3
- import type { IntegrationSpecRegistry } from '@lssm/lib.contracts/integrations/spec';
4
-
5
- export const ${p}: IntegrationSpec = {
6
- meta: {
7
- key: '${u(d.name)}',
8
- version: ${d.version},
9
- category: '${d.category}',
10
- displayName: '${u(d.displayName)}',
11
- title: '${u(d.title)}',
12
- description: '${u(d.description)}',
13
- domain: '${u(d.domain)}',
14
- owners: [${d.owners.map(e=>`'${u(e)}'`).join(`, `)}],
15
- tags: [${d.tags.map(e=>`'${u(e)}'`).join(`, `)}],
16
- stability: StabilityEnum.${c(d.stability)},
17
- },
18
- supportedModes: [${g}],
19
- capabilities: {
20
- provides: [
21
- ${_}
22
- ],
23
- ${v.length>0?`${v}\n`:``} },
24
- configSchema: {
25
- ${y} example: ${b},
26
- },
27
- secretSchema: {
28
- ${x} example: ${S},
29
- },
30
- ${C}${w}${T} healthCheck: {
31
- method: '${d.healthCheckMethod}',
32
- timeoutMs: ${d.healthCheckTimeoutMs??5e3},
33
- },
34
- };
35
-
36
- export function ${m}(registry: IntegrationSpecRegistry): IntegrationSpecRegistry {
37
- return registry.register(${p});
38
- }
39
- `}export{d};
@@ -1,28 +0,0 @@
1
- import{i as e,t}from"./utils.js";function n(n){let c=t(n.name.split(`.`).pop()??`KnowledgeSpace`),l=`${c}KnowledgeSpace`,u=`register${c}KnowledgeSpace`,d=r(n),f=i(n),p=a(n),m=n.policyName&&!n.policyVersion?` // defaults to latest version`:``;return`import { StabilityEnum } from '@lssm/lib.contracts/ownership';
2
- import type { KnowledgeSpaceSpec } from '@lssm/lib.contracts/knowledge/spec';
3
- import type { KnowledgeSpaceRegistry } from '@lssm/lib.contracts/knowledge/spec';
4
-
5
- export const ${l}: KnowledgeSpaceSpec = {
6
- meta: {
7
- key: '${e(n.name)}',
8
- version: ${n.version},
9
- category: '${n.category}',
10
- displayName: '${s(n.displayName)}',
11
- title: '${s(n.title)}',
12
- description: '${s(n.description)}',
13
- domain: '${s(n.domain)}',
14
- owners: [${n.owners.map(t=>`'${e(t)}'`).join(`, `)}],
15
- tags: [${n.tags.map(t=>`'${e(t)}'`).join(`, `)}],
16
- stability: StabilityEnum.${o(n.stability)},
17
- },
18
- retention: ${d},
19
- access: {
20
- ${f}${n.policyName?` policy: { name: '${e(n.policyName)}',${n.policyVersion?` version: ${n.policyVersion}`:``} },${m}\n`:``} },
21
- ${p} description: '${s(n.description||n.displayName)}',
22
- };
23
-
24
- export function ${u}(registry: KnowledgeSpaceRegistry): KnowledgeSpaceRegistry {
25
- return registry.register(${l});
26
- }
27
- `}function r(e){return`{ ttlDays: ${e.retention.ttlDays===null?`null`:typeof e.retention.ttlDays==`number`?String(e.retention.ttlDays):`null`}${typeof e.retention.archiveAfterDays==`number`?`, archiveAfterDays: ${e.retention.archiveAfterDays}`:``} }`}function i(e){return`${` trustLevel: '${e.trustLevel}',\n`}${` automationWritable: ${e.automationWritable},\n`}`}function a(e){let t=[];return e.embeddingModel&&t.push(` embeddingModel: '${s(e.embeddingModel)}'`),typeof e.chunkSize==`number`&&t.push(` chunkSize: ${e.chunkSize}`),e.vectorDbIntegration&&t.push(` vectorDbIntegration: '${s(e.vectorDbIntegration)}'`),t.length===0?``:` indexing: {\n${t.join(`,
28
- `)}\n },\n`}function o(e){switch(e){case`beta`:return`Beta`;case`stable`:return`Stable`;case`deprecated`:return`Deprecated`;case`experimental`:default:return`Experimental`}}function s(e){return e.replace(/`/g,"\\`").replace(/'/g,`\\'`)}export{n};
@@ -1,37 +0,0 @@
1
- import{i as e,t}from"./utils.js";function n(n){let a=`${t(n.name.split(`.`).pop()??`Migration`)}Migration`,o=n.dependencies.length>0?`dependencies: [${n.dependencies.map(t=>`'${e(t)}'`).join(`, `)}],`:``;return`import type { MigrationSpec } from '@lssm/lib.contracts/migrations';
2
-
3
- export const ${a}: MigrationSpec = {
4
- meta: {
5
- name: '${e(n.name)}',
6
- version: ${n.version},
7
- title: '${i(n.title)}',
8
- description: '${i(n.description??``)}',
9
- domain: '${i(n.domain)}',
10
- owners: [${n.owners.map(t=>`'${e(t)}'`).join(`, `)}],
11
- tags: [${n.tags.map(t=>`'${e(t)}'`).join(`, `)}],
12
- stability: '${n.stability}',
13
- },
14
- plan: {
15
- up: [
16
- ${r(n.up)}
17
- ],${n.down&&n.down.length?`
18
- down: [
19
- ${r(n.down)}
20
- ],`:``}
21
- },
22
- ${o}
23
- };
24
- `}function r(e){return e.map(e=>{let t=e.description?`description: '${i(e.description)}',`:``;switch(e.kind){case`schema`:return` {
25
- kind: 'schema',
26
- ${t}
27
- sql: \`${i(e.sql??``)}\`,
28
- }`;case`data`:return` {
29
- kind: 'data',
30
- ${t}
31
- script: \`${i(e.script??``)}\`,
32
- }`;case`validation`:default:return` {
33
- kind: 'validation',
34
- ${t}
35
- assertion: \`${i(e.assertion??``)}\`,
36
- }`}}).join(`,
37
- `)}function i(e){return e.replace(/`/g,"\\`").replace(/'/g,`\\'`)}export{n};
@@ -1,88 +0,0 @@
1
- import{r as e,t}from"./utils.js";function n(n){let{name:r,version:i,kind:a,description:o,goal:s,context:c,stability:l,owners:u,tags:d,auth:f,flags:p}=n,m=t(r.split(`.`).pop()??`Unknown`)+`Spec`,h=m.replace(`Spec`,`Input`),g=m.replace(`Spec`,`Output`);return`import { define${e(a)} } from '@lssm/lib.contracts';
2
- import { ScalarTypeEnum, SchemaModel } from '@lssm/lib.schema';
3
-
4
- // TODO: Define input schema
5
- export const ${h} = new SchemaModel({
6
- name: '${h}',
7
- description: 'Input for ${r}',
8
- fields: {
9
- // Add your fields here
10
- // example: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
- },
12
- });
13
-
14
- // TODO: Define output schema
15
- export const ${g} = new SchemaModel({
16
- name: '${g}',
17
- description: 'Output for ${r}',
18
- fields: {
19
- // Add your fields here
20
- ok: { type: ScalarTypeEnum.Boolean(), isOptional: false },
21
- },
22
- });
23
-
24
- export const ${m} = define${e(a)}({
25
- meta: {
26
- name: '${r}',
27
- version: ${i},
28
- stability: '${l}',
29
- owners: [${u.map(e=>`'${e}'`).join(`, `)}],
30
- tags: [${d.map(e=>`'${e}'`).join(`, `)}],
31
- description: '${o}',
32
- goal: '${s}',
33
- context: '${c}',
34
- },
35
-
36
- io: {
37
- input: ${h},
38
- output: ${g},
39
- errors: {
40
- // Define possible errors
41
- // EXAMPLE_ERROR: {
42
- // description: 'Example error description',
43
- // http: 400,
44
- // when: 'When this error occurs',
45
- // },
46
- },
47
- },
48
-
49
- policy: {
50
- auth: '${f}',
51
- ${p.length>0?`flags: [${p.map(e=>`'${e}'`).join(`, `)}],`:`// flags: [],`}
52
- },
53
-
54
- sideEffects: {
55
- ${n.emitsEvents?`emits: [
56
- // Define events to emit
57
- // { ref: SomeEventSpec, when: 'always' }
58
- ],`:`// emits: [],`}
59
- analytics: [
60
- // Define analytics events
61
- ],
62
- },
63
-
64
- transport: {
65
- rest: { method: '${a===`command`?`POST`:`GET`}' },
66
- gql: { field: '${r.replace(/\./g,`_`)}' },
67
- mcp: { toolName: '${r}.v${i}' },
68
- },
69
-
70
- acceptance: {
71
- scenarios: [
72
- {
73
- name: 'Happy path',
74
- given: ['preconditions'],
75
- when: ['action taken'],
76
- then: ['expected outcome'],
77
- },
78
- ],
79
- examples: [
80
- {
81
- name: 'Example usage',
82
- input: { /* example input */ },
83
- output: { ok: true },
84
- },
85
- ],
86
- },
87
- });
88
- `}export{n};
@@ -1,53 +0,0 @@
1
- import{t as e}from"./utils.js";function t(t){let{name:n,version:r,description:i,stability:a,owners:o,tags:s,presentationKind:c}=t,l=e(n.replace(/\./g,`_`))+`Presentation`,u=``;switch(c){case`web_component`:u=` content: {
2
- kind: 'web_component',
3
- framework: 'react',
4
- componentKey: '${n.replace(/\./g,`_`)}',
5
- props: new SchemaModel({
6
- name: '${l}Props',
7
- description: 'Props for ${n}',
8
- fields: {
9
- // TODO: Define component props
10
- },
11
- }),
12
- analytics: [
13
- // TODO: Define analytics events
14
- ],
15
- },`;break;case`markdown`:u=` content: {
16
- kind: 'markdown',
17
- content: \`
18
- # ${i}
19
-
20
- TODO: Add markdown content here
21
- \`,
22
- // Or use resourceUri: 'feature://${n}/guide.md'
23
- },`;break;case`data`:u=` content: {
24
- kind: 'data',
25
- mimeType: 'application/json',
26
- model: new SchemaModel({
27
- name: '${l}Data',
28
- description: 'Data structure for ${n}',
29
- fields: {
30
- // TODO: Define data structure
31
- },
32
- }),
33
- },`;break}return`import type { PresentationSpec } from '@lssm/lib.contracts/presentations';
34
- import { SchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';
35
-
36
- export const ${l}: PresentationSpec = {
37
- meta: {
38
- name: '${n}',
39
- version: ${r},
40
- stability: '${a}',
41
- owners: [${o.map(e=>`'${e}'`).join(`, `)}],
42
- tags: [${s.map(e=>`'${e}'`).join(`, `)}],
43
- description: '${i}',
44
- },
45
-
46
- policy: {
47
- // flags: [],
48
- // pii: [],
49
- },
50
-
51
- ${u}
52
- };
53
- `}export{t};
@@ -1,69 +0,0 @@
1
- import{t as e}from"./utils.js";function t(t){let i=e(t.name.split(`.`).pop()??`Telemetry`)+`Telemetry`,a=t.providers?.length?`providers: [
2
- ${t.providers.map(e=>` {
3
- type: '${e.type}',
4
- config: ${r(e.config)},
5
- }`).join(`,
6
- `)}
7
- ],`:``,o=t.events.map(e=>{let t=e.properties.map(e=>` '${e.name}': {
8
- type: '${e.type}',
9
- ${e.required?`required: true,`:``}
10
- ${e.pii?`pii: true,`:``}
11
- ${e.redact?`redact: true,`:``}
12
- ${e.description?`description: '${n(e.description)}',`:``}
13
- }`).join(`,
14
- `),r=e.anomalyRules?.length?` anomalyDetection: {
15
- enabled: true,
16
- ${typeof e.anomalyMinimumSample==`number`?`minimumSample: ${e.anomalyMinimumSample},`:``}
17
- thresholds: [
18
- ${e.anomalyRules.map(e=>` {
19
- metric: '${n(e.metric)}',
20
- ${typeof e.min==`number`?`min: ${e.min},`:``}
21
- ${typeof e.max==`number`?`max: ${e.max},`:``}
22
- }`).join(`,
23
- `)}
24
- ],
25
- actions: [${(e.anomalyActions??[]).map(e=>`'${e}'`).join(`, `)}],
26
- },`:e.anomalyEnabled?` anomalyDetection: {
27
- enabled: true,
28
- ${typeof e.anomalyMinimumSample==`number`?`minimumSample: ${e.anomalyMinimumSample},`:``}
29
- },`:``;return` {
30
- name: '${n(e.name)}',
31
- version: ${e.version},
32
- semantics: {
33
- what: '${n(e.what)}',
34
- ${e.who?`who: '${n(e.who)}',`:``}
35
- ${e.why?`why: '${n(e.why)}',`:``}
36
- },
37
- privacy: '${e.privacy}',
38
- properties: {
39
- ${t}
40
- },
41
- ${typeof e.retentionDays==`number`?`retention: { days: ${e.retentionDays}, ${e.retentionPolicy?`policy: '${e.retentionPolicy}'`:``} },`:``}
42
- ${typeof e.samplingRate==`number`?`sampling: { rate: ${e.samplingRate}${e.samplingConditions?`, conditions: ['${n(e.samplingConditions)}']`:``} },`:``}
43
- ${r}
44
- ${e.tags?.length?`tags: [${e.tags.map(e=>`'${n(e)}'`).join(`, `)}],`:``}
45
- }`}).join(`,
46
- `);return`import type { TelemetrySpec } from '@lssm/lib.contracts/telemetry';
47
-
48
- export const ${i}: TelemetrySpec = {
49
- meta: {
50
- name: '${n(t.name)}',
51
- version: ${t.version},
52
- title: '${n(t.name)} telemetry',
53
- description: '${n(t.description||`Describe the purpose of this telemetry spec.`)}',
54
- domain: '${n(t.domain)}',
55
- owners: [${t.owners.map(e=>`'${n(e)}'`).join(`, `)}],
56
- tags: [${t.tags.map(e=>`'${n(e)}'`).join(`, `)}],
57
- stability: '${t.stability}',
58
- },
59
- config: {
60
- ${typeof t.defaultRetentionDays==`number`?`defaultRetentionDays: ${t.defaultRetentionDays},`:``}
61
- ${typeof t.defaultSamplingRate==`number`?`defaultSamplingRate: ${t.defaultSamplingRate},`:``}
62
- ${t.anomalyEnabled?`anomalyDetection: { enabled: true${typeof t.anomalyCheckIntervalMs==`number`?`, checkIntervalMs: ${t.anomalyCheckIntervalMs}`:``} },`:``}
63
- ${a}
64
- },
65
- events: [
66
- ${o}
67
- ],
68
- };
69
- `}function n(e){return e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}function r(e){let t=e.trim();return t?t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`)?t:`'${n(t)}'`:`{}`}export{t};
@@ -1 +0,0 @@
1
- function e(e){let n=t(e);return n.charAt(0).toLowerCase()+n.slice(1)}function t(e){return e.split(/[-_.]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function n(e){return e.replace(/\./g,`-`).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function i(e){return e.replace(/'/g,`\\'`)}export{e,i,n,r,t};
@@ -1,42 +0,0 @@
1
- function e({exportName:e,specImportPath:t,runnerName:n,workflowName:r}){return`import {
2
- InMemoryStateStore,
3
- WorkflowRegistry,
4
- WorkflowRunner,
5
- } from '@lssm/lib.contracts/workflow';
6
- import { ${e} } from '${t}';
7
-
8
- /**
9
- * Runner wiring for ${r}.
10
- *
11
- * TODO:
12
- * - Replace the in-memory state store with a persistent adapter if needed.
13
- * - Implement opExecutor to invoke the correct contract handlers.
14
- * - Wire eventEmitter to telemetry sinks.
15
- */
16
- const registry = new WorkflowRegistry();
17
- registry.register(${e});
18
-
19
- const stateStore = new InMemoryStateStore();
20
-
21
- export const ${n} = new WorkflowRunner({
22
- registry,
23
- stateStore,
24
- opExecutor: async (operation, input, ctx) => {
25
- // TODO: route to the appropriate contract handler
26
- // Example: return contractRegistry.execute(operation.name, operation.version, input, ctx);
27
- throw new Error(
28
- \`opExecutor for \${operation.name}.v\${operation.version} is not implemented\`
29
- );
30
- },
31
- // appConfigProvider: async (state) => {
32
- // // TODO: return the ResolvedAppConfig for this workflow run (tenant/environment)
33
- // return undefined;
34
- // },
35
- // enforceCapabilities: async (operation, context) => {
36
- // // TODO: ensure required capabilities are satisfied using context.integrations/context.resolvedAppConfig
37
- // },
38
- eventEmitter: (_event, _payload) => {
39
- // TODO: forward workflow events to telemetry or logging sinks
40
- },
41
- });
42
- `}export{e};
@@ -1,41 +0,0 @@
1
- import{i as e,t}from"./utils.js";function n(n){let i=t(n.name.split(`.`).pop()??`Workflow`)+`Workflow`,a=n.steps.map(e=>r(e)).join(`,
2
- `),o=n.transitions.map(t=>` {
3
- from: '${t.from}',
4
- to: '${t.to}',
5
- ${t.condition?` condition: '${e(t.condition)}',`:``}
6
- }`).join(`,
7
- `);return`import type { WorkflowSpec } from '@lssm/lib.contracts/workflow';
8
-
9
- /**
10
- * Workflow generated via contractspec CLI.
11
- * TODO:
12
- * - Review step definitions and descriptions.
13
- * - Wire automation steps to actual operations.
14
- * - Provide form renderers for human steps.
15
- * - Add guards/conditions as needed.
16
- */
17
- export const ${i}: WorkflowSpec = {
18
- meta: {
19
- name: '${n.name}',
20
- version: ${n.version},
21
- title: '${e(n.title)}',
22
- description: '${e(n.description)}',
23
- domain: '${e(n.domain)}',
24
- stability: '${n.stability}',
25
- owners: [${n.owners.map(e=>`'${e}'`).join(`, `)}],
26
- tags: [${n.tags.map(e=>`'${e}'`).join(`, `)}],
27
- },
28
- definition: {
29
- ${n.entryStepId?` entryStepId: '${n.entryStepId}',\n`:``} steps: [
30
- ${a}
31
- ],
32
- transitions: [
33
- ${o}
34
- ],
35
- },
36
- ${n.policyFlags.length>0?`policy: {
37
- flags: [${n.policyFlags.map(e=>`'${e}'`).join(`, `)}],
38
- },`:`// policy: { flags: [] },`}
39
- };
40
- `}function r(t){let n=[` {`,` id: '${t.id}',`,` type: '${t.type}',`,` label: '${e(t.label)}',`];t.description&&n.push(` description: '${e(t.description)}',`);let r=[];return t.operation&&r.push(`operation: { name: '${t.operation.name}', version: ${t.operation.version} }`),t.form&&r.push(`form: { key: '${t.form.key}', version: ${t.form.version} }`),r.length&&n.push(` action: { ${r.join(`, `)} },`),n.push(` }`),n.join(`
41
- `)}export{n};
@@ -1 +0,0 @@
1
- const e={aiProvider:`claude`,agentMode:`simple`,outputDir:`./src`,conventions:{operations:`interactions/commands|queries`,events:`events`,presentations:`presentations`,forms:`forms`},defaultOwners:[],defaultTags:[]};export{e};