@lssm/example.marketplace 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102

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 (189) hide show
  1. package/dist/docs/index.js +1 -1
  2. package/dist/docs/marketplace.docblock.js +61 -5
  3. package/dist/entities/index.d.ts +296 -296
  4. package/dist/entities/index.js +45 -1
  5. package/dist/entities/order.d.ts +78 -78
  6. package/dist/entities/order.js +173 -1
  7. package/dist/entities/payout.d.ts +65 -65
  8. package/dist/entities/payout.js +162 -1
  9. package/dist/entities/product.d.ts +70 -70
  10. package/dist/entities/product.js +161 -1
  11. package/dist/entities/review.d.ts +56 -56
  12. package/dist/entities/review.js +152 -1
  13. package/dist/entities/store.d.ts +41 -41
  14. package/dist/entities/store.js +110 -1
  15. package/dist/example.js +50 -1
  16. package/dist/index.js +27 -1
  17. package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
  18. package/dist/libs/contracts/dist/client/index.js +5 -1
  19. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
  20. package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
  21. package/dist/libs/contracts/dist/client/react/index.js +4 -1
  22. package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
  23. package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
  24. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  25. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  26. package/dist/libs/contracts/dist/docs/index.js +29 -1
  27. package/dist/libs/contracts/dist/docs/presentations.js +71 -1
  28. package/dist/libs/contracts/dist/docs/registry.js +44 -1
  29. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  30. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  31. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  32. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  33. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  34. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  35. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  36. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  37. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  38. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  39. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  40. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  41. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  42. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  43. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  44. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  45. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  46. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  47. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  48. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  49. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  50. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  51. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  52. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  53. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  54. package/dist/libs/contracts/dist/events.js +10 -1
  55. package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
  56. package/dist/libs/contracts/dist/index.js +71 -1
  57. package/dist/libs/contracts/dist/install.js +2 -1
  58. package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
  59. package/dist/libs/contracts/dist/integrations/index.js +18 -1
  60. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
  61. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
  62. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
  63. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
  64. package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
  65. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
  66. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
  67. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
  68. package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
  69. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
  70. package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
  71. package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
  72. package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
  73. package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
  74. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
  75. package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
  76. package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
  77. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
  78. package/dist/libs/contracts/dist/jsonschema.js +1 -1
  79. package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
  80. package/dist/libs/contracts/dist/knowledge/index.js +7 -1
  81. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
  82. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
  83. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
  84. package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
  85. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
  86. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
  87. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
  88. package/dist/libs/contracts/dist/llm/exporters.js +19 -1
  89. package/dist/libs/contracts/dist/llm/index.js +2 -1
  90. package/dist/libs/contracts/dist/llm/prompts.js +1 -1
  91. package/dist/libs/contracts/dist/onboarding-base.js +196 -1
  92. package/dist/libs/contracts/dist/openapi.js +1 -1
  93. package/dist/libs/contracts/dist/ownership.js +21 -1
  94. package/dist/libs/contracts/dist/presentations.js +1 -1
  95. package/dist/libs/contracts/dist/presentations.v2.js +11 -1
  96. package/dist/libs/contracts/dist/prompt.js +1 -1
  97. package/dist/libs/contracts/dist/promptRegistry.js +1 -1
  98. package/dist/libs/contracts/dist/regenerator/index.js +1 -1
  99. package/dist/libs/contracts/dist/regenerator/service.js +6 -1
  100. package/dist/libs/contracts/dist/registry.js +2 -1
  101. package/dist/libs/contracts/dist/resources.js +1 -1
  102. package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
  103. package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
  104. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
  105. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -1
  106. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
  107. package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
  108. package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
  109. package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
  110. package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
  111. package/dist/libs/contracts/dist/server/index.js +8 -1
  112. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
  113. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
  114. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
  115. package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
  116. package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
  117. package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
  118. package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
  119. package/dist/libs/contracts/dist/server/rest-express.js +1 -1
  120. package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
  121. package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
  122. package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
  123. package/dist/libs/contracts/dist/spec.js +34 -1
  124. package/dist/libs/contracts/dist/telemetry/index.js +1 -1
  125. package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
  126. package/dist/libs/contracts/dist/tests/index.js +1 -1
  127. package/dist/libs/contracts/dist/tests/runner.js +2 -1
  128. package/dist/libs/contracts/dist/workflow/index.js +1 -1
  129. package/dist/libs/contracts/dist/workflow/runner.js +1 -1
  130. package/dist/libs/schema/dist/EnumType.js +56 -1
  131. package/dist/libs/schema/dist/FieldType.js +49 -1
  132. package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
  133. package/dist/libs/schema/dist/SchemaModel.js +39 -1
  134. package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
  135. package/dist/libs/schema/dist/entity/index.js +2 -1
  136. package/dist/libs/schema/dist/entity/types.js +1 -1
  137. package/dist/libs/schema/dist/index.js +6 -1
  138. package/dist/marketplace.feature.js +308 -1
  139. package/dist/order/index.js +6 -1
  140. package/dist/order/order.contracts.d.ts +90 -90
  141. package/dist/order/order.contracts.js +74 -1
  142. package/dist/order/order.enum.d.ts +2 -2
  143. package/dist/order/order.enum.js +22 -1
  144. package/dist/order/order.event.d.ts +39 -39
  145. package/dist/order/order.event.js +193 -1
  146. package/dist/order/order.presentation.js +72 -1
  147. package/dist/order/order.schema.d.ts +39 -39
  148. package/dist/order/order.schema.js +156 -1
  149. package/dist/payout/index.js +6 -1
  150. package/dist/payout/payout.contracts.d.ts +24 -24
  151. package/dist/payout/payout.contracts.js +32 -1
  152. package/dist/payout/payout.enum.d.ts +2 -2
  153. package/dist/payout/payout.enum.js +17 -1
  154. package/dist/payout/payout.event.d.ts +17 -17
  155. package/dist/payout/payout.event.js +84 -1
  156. package/dist/payout/payout.presentation.js +50 -1
  157. package/dist/payout/payout.schema.d.ts +37 -37
  158. package/dist/payout/payout.schema.js +117 -1
  159. package/dist/product/index.js +6 -1
  160. package/dist/product/product.contracts.d.ts +68 -68
  161. package/dist/product/product.contracts.js +65 -1
  162. package/dist/product/product.enum.d.ts +2 -2
  163. package/dist/product/product.enum.js +18 -1
  164. package/dist/product/product.event.d.ts +20 -20
  165. package/dist/product/product.event.js +103 -1
  166. package/dist/product/product.presentation.js +72 -1
  167. package/dist/product/product.schema.d.ts +52 -52
  168. package/dist/product/product.schema.js +177 -1
  169. package/dist/review/index.js +6 -1
  170. package/dist/review/review.contracts.d.ts +59 -59
  171. package/dist/review/review.contracts.js +65 -1
  172. package/dist/review/review.enum.d.ts +2 -2
  173. package/dist/review/review.enum.js +16 -1
  174. package/dist/review/review.event.d.ts +15 -15
  175. package/dist/review/review.event.js +76 -1
  176. package/dist/review/review.presentation.js +50 -1
  177. package/dist/review/review.schema.d.ts +45 -45
  178. package/dist/review/review.schema.js +157 -1
  179. package/dist/store/index.js +6 -1
  180. package/dist/store/store.contracts.d.ts +33 -33
  181. package/dist/store/store.contracts.js +41 -1
  182. package/dist/store/store.enum.d.ts +2 -2
  183. package/dist/store/store.enum.js +16 -1
  184. package/dist/store/store.event.d.ts +14 -14
  185. package/dist/store/store.event.js +72 -1
  186. package/dist/store/store.presentation.js +50 -1
  187. package/dist/store/store.schema.d.ts +20 -20
  188. package/dist/store/store.schema.js +94 -1
  189. package/package.json +12 -12
@@ -1,4 +1,21 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.studio.team-invitations`,title:`Studio Teams & Invitations`,summary:`Admin-only team management and email invitation flow to join an organization and optionally a team.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/team-invitations`,tags:[`studio`,`teams`,`invitations`,`access-control`,`onboarding`],body:`# Studio Teams & Invitations
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js
4
+ const tech_studio_team_invitations_DocBlocks = [{
5
+ id: "docs.tech.studio.team-invitations",
6
+ title: "Studio Teams & Invitations",
7
+ summary: "Admin-only team management and email invitation flow to join an organization and optionally a team.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/studio/team-invitations",
11
+ tags: [
12
+ "studio",
13
+ "teams",
14
+ "invitations",
15
+ "access-control",
16
+ "onboarding"
17
+ ],
18
+ body: `# Studio Teams & Invitations
2
19
 
3
20
  Studio uses **organization membership** as the base access model. Teams are optional and used to refine access to projects.
4
21
 
@@ -8,58 +25,45 @@ Studio uses **organization membership** as the base access model. Teams are opti
8
25
 
9
26
  ## Invitation data model
10
27
 
11
- - \`Invitation\` rows are stored under an organization and target an **email** address.
12
-
28
+ - \`Invitation\` rows are stored under an organization and target an **email** address.\n
13
29
  - An invitation can optionally target a \`teamId\`, which will grant the user membership in that team upon acceptance.
14
30
 
15
31
  Key fields:
16
- - \`email\`: invited address (must match the accepting user's account email)
17
-
18
- - \`status\`: \`pending | accepted | declined | expired\`
19
-
20
- - \`teamId?\`: optional team to join
21
-
32
+ - \`email\`: invited address (must match the accepting user's account email)\n
33
+ - \`status\`: \`pending | accepted | declined | expired\`\n
34
+ - \`teamId?\`: optional team to join\n
22
35
  - \`inviterId\`: user who issued the invitation
23
36
 
24
37
  ## GraphQL surfaces
25
38
 
26
- - Team CRUD (admin-only):
27
-
28
- - \`createTeam(name)\`
29
-
30
- - \`renameTeam(teamId, name)\`
31
-
32
- - \`deleteTeam(teamId)\`
33
-
34
-
35
- - Invitations (admin-only):
36
-
37
- - \`organizationInvitations\`
39
+ - Team CRUD (admin-only):\n
40
+ - \`createTeam(name)\`\n
41
+ - \`renameTeam(teamId, name)\`\n
42
+ - \`deleteTeam(teamId)\`\n
38
43
 
44
+ - Invitations (admin-only):\n
45
+ - \`organizationInvitations\`\n
39
46
  - \`inviteToOrganization(email, role?, teamId?)\` → returns \`inviteUrl\` and whether an email was sent
40
47
 
41
48
  ## Accepting an invitation
42
49
 
43
- The invite link is served as:
44
-
50
+ The invite link is served as:\n
45
51
  - \`/invite/{invitationId}\`
46
52
 
47
53
  Acceptance rules:
48
- - The user must be authenticated.
49
-
50
- - The authenticated user’s email must match \`Invitation.email\`.
51
-
52
- - If not already a member, create \`Member(userId, organizationId, role)\`.
53
-
54
- - If \`teamId\` is present, ensure \`TeamMember(teamId, userId)\`.
55
-
56
- - Mark invitation \`status='accepted'\` and set \`acceptedAt\`.
57
-
54
+ - The user must be authenticated.\n
55
+ - The authenticated user’s email must match \`Invitation.email\`.\n
56
+ - If not already a member, create \`Member(userId, organizationId, role)\`.\n
57
+ - If \`teamId\` is present, ensure \`TeamMember(teamId, userId)\`.\n
58
+ - Mark invitation \`status='accepted'\` and set \`acceptedAt\`.\n
58
59
  - Set \`activeOrganizationId\` for the session so \`/studio/*\` routes work immediately.
59
60
 
60
61
  ## Email delivery
61
62
 
62
- - If \`RESEND_API_KEY\` is set, the system attempts to send an email.
63
-
63
+ - If \`RESEND_API_KEY\` is set, the system attempts to send an email.\n
64
64
  - Otherwise, the UI uses the returned \`inviteUrl\` for manual copy/share.
65
- `}]);
65
+ `
66
+ }];
67
+ registerDocBlocks(tech_studio_team_invitations_DocBlocks);
68
+
69
+ //#endregion
@@ -1 +1,47 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.studio.workspace_ops`,title:`Workspace ops (repo-linked): list / validate / deps / diff`,summary:`Read-only repo operations used by Studio to inspect and validate a linked ContractSpec workspace.`,kind:`reference`,visibility:`mixed`,route:`/docs/tech/studio/workspace-ops`,tags:[`studio`,`repo`,`workspace`,`validate`,`diff`],body:"## API surface (api-contractspec)\n\nBase: `/api/workspace-ops`\n\nThese endpoints are **read-only** in v1 and never push to git:\n\n- `GET /api/workspace-ops/:integrationId/config?organizationId=`\n- `GET /api/workspace-ops/:integrationId/specs?organizationId=`\n- `POST /api/workspace-ops/:integrationId/validate` (body: organizationId, files?, pattern?)\n- `POST /api/workspace-ops/:integrationId/deps` (body: organizationId, pattern?)\n- `POST /api/workspace-ops/:integrationId/diff` (body: organizationId, specPath, baseline?, breakingOnly?)\n\n## Repo resolution\n\n- The repo root is resolved from the Studio Integration (`IntegrationProvider.GITHUB`) config:\n - `config.repoCachePath` (preferred) or `config.localPath`\n- Resolution is constrained to `CONTRACTSPEC_REPO_CACHE_DIR` (default: `/tmp/contractspec-repos`)\n\n## Intended UX\n\n- Studio Assistant can run these checks and present results as suggestions.\n- Users can copy equivalent CLI commands for local runs:\n - `contractspec validate`\n - `contractspec deps`\n - `contractspec diff --baseline <ref>`\n"}]);
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js
4
+ const tech_studio_workspace_ops_DocBlocks = [{
5
+ id: "docs.tech.studio.workspace_ops",
6
+ title: "Workspace ops (repo-linked): list / validate / deps / diff",
7
+ summary: "Read-only repo operations used by Studio to inspect and validate a linked ContractSpec workspace.",
8
+ kind: "reference",
9
+ visibility: "mixed",
10
+ route: "/docs/tech/studio/workspace-ops",
11
+ tags: [
12
+ "studio",
13
+ "repo",
14
+ "workspace",
15
+ "validate",
16
+ "diff"
17
+ ],
18
+ body: `## API surface (api-contractspec)
19
+
20
+ Base: \`/api/workspace-ops\`
21
+
22
+ These endpoints are **read-only** in v1 and never push to git:
23
+
24
+ - \`GET /api/workspace-ops/:integrationId/config?organizationId=\`
25
+ - \`GET /api/workspace-ops/:integrationId/specs?organizationId=\`
26
+ - \`POST /api/workspace-ops/:integrationId/validate\` (body: organizationId, files?, pattern?)
27
+ - \`POST /api/workspace-ops/:integrationId/deps\` (body: organizationId, pattern?)
28
+ - \`POST /api/workspace-ops/:integrationId/diff\` (body: organizationId, specPath, baseline?, breakingOnly?)
29
+
30
+ ## Repo resolution
31
+
32
+ - The repo root is resolved from the Studio Integration (\`IntegrationProvider.GITHUB\`) config:
33
+ - \`config.repoCachePath\` (preferred) or \`config.localPath\`
34
+ - Resolution is constrained to \`CONTRACTSPEC_REPO_CACHE_DIR\` (default: \`/tmp/contractspec-repos\`)
35
+
36
+ ## Intended UX
37
+
38
+ - Studio Assistant can run these checks and present results as suggestions.
39
+ - Users can copy equivalent CLI commands for local runs:
40
+ - \`contractspec validate\`
41
+ - \`contractspec deps\`
42
+ - \`contractspec diff --baseline <ref>\`
43
+ `
44
+ }];
45
+ registerDocBlocks(tech_studio_workspace_ops_DocBlocks);
46
+
47
+ //#endregion
@@ -1,4 +1,21 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.studio.workspaces`,title:`Studio projects, teams, environments`,summary:`Organization-first Studio: projects live under an organization; teams refine access; projects deploy to multiple environments.`,kind:`reference`,visibility:`mixed`,route:`/docs/tech/studio/workspaces`,tags:[`studio`,`projects`,`teams`,`rbac`,`environments`],body:`## Concepts
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/studio/workspaces.docblock.js
4
+ const tech_studio_workspaces_DocBlocks = [{
5
+ id: "docs.tech.studio.workspaces",
6
+ title: "Studio projects, teams, environments",
7
+ summary: "Organization-first Studio: projects live under an organization; teams refine access; projects deploy to multiple environments.",
8
+ kind: "reference",
9
+ visibility: "mixed",
10
+ route: "/docs/tech/studio/workspaces",
11
+ tags: [
12
+ "studio",
13
+ "projects",
14
+ "teams",
15
+ "rbac",
16
+ "environments"
17
+ ],
18
+ body: `## Concepts
2
19
 
3
20
  - **Organization**: the primary grouping boundary for Studio projects.
4
21
  - **Project**: one application (specs, overlays, deployments, integrations, evolution, learning).
@@ -38,4 +55,8 @@ Studio and Sandbox both use a shared shell:
38
55
  - \`/studio/projects\`: create/select/delete projects (organization-first).
39
56
  - \`/studio/{projectSlug}/*\`: project modules (canvas/specs/deploy/integrations/evolution/learning).
40
57
  - \`/studio/learning\`: learning hub without selecting a project.
41
- `}]);
58
+ `
59
+ }];
60
+ registerDocBlocks(tech_studio_workspaces_DocBlocks);
61
+
62
+ //#endregion
@@ -1,4 +1,20 @@
1
- import{a as e}from"../registry.js";e([{id:`docs.tech.telemetry.ingest`,title:`Telemetry Ingest Endpoint`,summary:`Server-side telemetry ingestion for ContractSpec clients (VS Code extension, CLI, etc.).`,kind:`reference`,visibility:`internal`,route:`/docs/tech/telemetry/ingest`,tags:[`telemetry`,`api`,`posthog`,`analytics`],body:`# Telemetry Ingest Endpoint
1
+ import { registerDocBlocks } from "../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js
4
+ const tech_telemetry_ingest_DocBlocks = [{
5
+ id: "docs.tech.telemetry.ingest",
6
+ title: "Telemetry Ingest Endpoint",
7
+ summary: "Server-side telemetry ingestion for ContractSpec clients (VS Code extension, CLI, etc.).",
8
+ kind: "reference",
9
+ visibility: "internal",
10
+ route: "/docs/tech/telemetry/ingest",
11
+ tags: [
12
+ "telemetry",
13
+ "api",
14
+ "posthog",
15
+ "analytics"
16
+ ],
17
+ body: `# Telemetry Ingest Endpoint
2
18
 
3
19
  The ContractSpec API provides a telemetry ingest endpoint for clients to send product analytics events.
4
20
 
@@ -76,7 +92,20 @@ The endpoint requires \`POSTHOG_PROJECT_KEY\` environment variable to be set. If
76
92
  | Event | Description | Properties |
77
93
  |-------|-------------|------------|
78
94
  | \`contractspec.api.mcp_request\` | MCP request processed | \`endpoint\`, \`method\`, \`success\`, \`duration_ms\` |
79
- `},{id:`docs.tech.telemetry.hybrid`,title:`Hybrid Telemetry Model`,summary:`How ContractSpec clients choose between direct PostHog and API-routed telemetry.`,kind:`usage`,visibility:`internal`,route:`/docs/tech/telemetry/hybrid`,tags:[`telemetry`,`architecture`,`posthog`],body:`# Hybrid Telemetry Model
95
+ `
96
+ }, {
97
+ id: "docs.tech.telemetry.hybrid",
98
+ title: "Hybrid Telemetry Model",
99
+ summary: "How ContractSpec clients choose between direct PostHog and API-routed telemetry.",
100
+ kind: "usage",
101
+ visibility: "internal",
102
+ route: "/docs/tech/telemetry/hybrid",
103
+ tags: [
104
+ "telemetry",
105
+ "architecture",
106
+ "posthog"
107
+ ],
108
+ body: `# Hybrid Telemetry Model
80
109
 
81
110
  ContractSpec uses a hybrid telemetry model where clients can send events either directly to PostHog or via the API server.
82
111
 
@@ -119,4 +148,8 @@ interface TelemetryClient {
119
148
  \`\`\`
120
149
 
121
150
  This allows future migration without changing client code.
122
- `}]);
151
+ `
152
+ }];
153
+ registerDocBlocks(tech_telemetry_ingest_DocBlocks);
154
+
155
+ //#endregion
@@ -1 +1,20 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.templates.runtime`,title:`ContractSpec Template Runtime (Phase 9)`,summary:`Phase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.`,kind:`reference`,visibility:`public`,route:`/docs/tech/templates/runtime`,tags:[`tech`,`templates`,`runtime`],body:"## ContractSpec Template Runtime (Phase 9)\n\nPhase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.\n\n### Building Blocks\n\n- **Local database** – `@lssm/lib.runtime-local` wraps `sql.js` (SQLite WASM) and `IndexedDB` so we can seed demo data, run migrations, and persist state between sessions. Tests point the runtime to `node_modules/sql.js/dist` so CI doesn’t need a browser.\n- **Local GraphQL** – `LocalGraphQLClient` wires Apollo Client + SchemaLink to resolvers for tasks, messaging, and i18n recipes. All `/templates`, `/studio`, and `/sandbox` previews use those resolvers so we never call remote APIs during demos.\n- **Template registry + installer** – `.../templates/registry.ts` stores the catalog (todos, messaging, recipes). `TemplateInstaller` can seed the runtime (`install`) or export a base64 snapshot via the new `saveTemplateToStudio` mutation.\n- **TemplateShell** – Shared UI wrapper that creates a `TemplateRuntimeProvider`, shows `LocalDataIndicator`, and (optionally) surfaces the new `SaveToStudioButton`.\n\n### Runtime Flows\n\n1. `/templates` now opens a modal that renders `TemplateShell` for each template. Users can explore without leaving the marketing site.\n2. `/studio` switches to a tabbed mini-app (Projects, Canvas, Specs, Deploy) to showcase Studio surfaces with mock data. Visitors see a **preview** shell, while authenticated users (Better Auth via Sigil) unlock full persistence, versioning, and deployment controls.\n3. `/sandbox` lets visitors pick a template and mode (Playground, Spec Editor, Visual Builder). The console at the bottom streams runtime events for transparency.\n\n### GraphQL Mutations\n\n- `saveTemplateToStudio(input: SaveTemplateInput!): SaveTemplateResult!` writes a placeholder project + spec so that templates installed from the sandbox appear in Studio. The mutation is intentionally simple right now: it records which template was imported, stores metadata, and returns `{ projectId, status: 'QUEUED' }` for the UI.\n- `saveCanvasDraft(input: SaveCanvasDraftInput!): CanvasVersion!` snapshots the current Visual Builder nodes to a draft version tied to a canvas overlay. Inputs include `canvasId`, arbitrary `nodes` JSON, and an optional `label`. The resolver enforces org/org access before calling `CanvasVersionManager`.\n- `deployCanvasVersion(input: DeployCanvasVersionInput!): CanvasVersion!` promotes a previously saved draft (`versionId`) to the deployed state. The returned object includes `status`, `nodes`, `createdAt`, and `createdBy` for UI timelines.\n- `undoCanvasVersion(input: UndoCanvasInput!): CanvasVersion` rewinds the visual builder to the prior snapshot (returns `null` when history is empty) so Studio’s toolbar can surface “Undo” without shelling out to local storage.\n\n### Studio GraphQL endpoint\n\n- The landing app exposes the Studio schema at `/api/studio/graphql` via Yoga so React Query hooks (`useStudioProjects`, `useCreateStudioProject`, `useDeployStudioProject`, etc.) can talk to the bundle without spinning up a separate server.\n\n### Spec Editor typing\n\n- Studio’s spec editor now preloads Monaco with ambient declarations for `@lssm/lib.contracts` and `zod`, so snippets receive autocomplete and inline errors even before the spec ships to the backend. The helper lives in `presentation/components/studio/organisms/monaco-spec-types.ts` and registers the extra libs once per browser session via `monaco.languages.typescript.typescriptDefaults.addExtraLib`.\n- Compiler options are aligned with our frontend toolchain (ES2020 + React JSX) which means drafts written in the editor behave like the compiled artifacts that flow through Studio pipelines.\n\n### Spec templates\n\n- Selecting a spec type now injects a ready-to-edit scaffold (capability, workflow, policy, dataview, component) so authors start from a canonical layout instead of a blank file. Templates live alongside `SpecEditor.tsx`, and we only overwrite the content when the previous value is empty or when the author explicitly switches types via the dropdown.\n\n### Spec preview\n\n- The validation side panel now embeds a `SpecPreview` widget that shows validation errors alongside transport artifacts (GraphQL schema, REST endpoints, component summaries) once a preview run completes. Tabs let authors toggle between “Validation” and “Artifacts,” mirroring the UX described in the Studio plan.\n\n### Testing\n\n- `src/templates/__tests__/runtime.test.ts` covers todos CRUD, messaging delivery, and recipe locale switching through the local GraphQL API.\n- Studio infrastructure tests live in `src/__tests__/e2e/project-lifecycle.test.ts` and continue to exercise project creation + deploy flows.\n\n### Next Steps\n\nFuture templates can register their React components via `registerTemplateComponents(templateId, components)` so TemplateShell can render them automatically. When new templates are added, remember to:\n\n1. Update the registry entry (schema + tags).\n2. Register components inside `presentation/components/templates`.\n3. Document the template under `docs/templates/`.\n\n\n\n\n\n"}]);
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/templates/runtime.docblock.js
4
+ const tech_templates_runtime_DocBlocks = [{
5
+ id: "docs.tech.templates.runtime",
6
+ title: "ContractSpec Template Runtime (Phase 9)",
7
+ summary: "Phase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/templates/runtime",
11
+ tags: [
12
+ "tech",
13
+ "templates",
14
+ "runtime"
15
+ ],
16
+ body: "## ContractSpec Template Runtime (Phase 9)\n\nPhase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.\n\n### Building Blocks\n\n- **Local database** – `@lssm/lib.runtime-local` wraps `sql.js` (SQLite WASM) and `IndexedDB` so we can seed demo data, run migrations, and persist state between sessions. Tests point the runtime to `node_modules/sql.js/dist` so CI doesn’t need a browser.\n- **Local GraphQL** – `LocalGraphQLClient` wires Apollo Client + SchemaLink to resolvers for tasks, messaging, and i18n recipes. All `/templates`, `/studio`, and `/sandbox` previews use those resolvers so we never call remote APIs during demos.\n- **Template registry + installer** – `.../templates/registry.ts` stores the catalog (todos, messaging, recipes). `TemplateInstaller` can seed the runtime (`install`) or export a base64 snapshot via the new `saveTemplateToStudio` mutation.\n- **TemplateShell** – Shared UI wrapper that creates a `TemplateRuntimeProvider`, shows `LocalDataIndicator`, and (optionally) surfaces the new `SaveToStudioButton`.\n\n### Runtime Flows\n\n1. `/templates` now opens a modal that renders `TemplateShell` for each template. Users can explore without leaving the marketing site.\n2. `/studio` switches to a tabbed mini-app (Projects, Canvas, Specs, Deploy) to showcase Studio surfaces with mock data. Visitors see a **preview** shell, while authenticated users (Better Auth via Sigil) unlock full persistence, versioning, and deployment controls.\n3. `/sandbox` lets visitors pick a template and mode (Playground, Spec Editor, Visual Builder). The console at the bottom streams runtime events for transparency.\n\n### GraphQL Mutations\n\n- `saveTemplateToStudio(input: SaveTemplateInput!): SaveTemplateResult!` writes a placeholder project + spec so that templates installed from the sandbox appear in Studio. The mutation is intentionally simple right now: it records which template was imported, stores metadata, and returns `{ projectId, status: 'QUEUED' }` for the UI.\n- `saveCanvasDraft(input: SaveCanvasDraftInput!): CanvasVersion!` snapshots the current Visual Builder nodes to a draft version tied to a canvas overlay. Inputs include `canvasId`, arbitrary `nodes` JSON, and an optional `label`. The resolver enforces org/org access before calling `CanvasVersionManager`.\n- `deployCanvasVersion(input: DeployCanvasVersionInput!): CanvasVersion!` promotes a previously saved draft (`versionId`) to the deployed state. The returned object includes `status`, `nodes`, `createdAt`, and `createdBy` for UI timelines.\n- `undoCanvasVersion(input: UndoCanvasInput!): CanvasVersion` rewinds the visual builder to the prior snapshot (returns `null` when history is empty) so Studio’s toolbar can surface “Undo” without shelling out to local storage.\n\n### Studio GraphQL endpoint\n\n- The landing app exposes the Studio schema at `/api/studio/graphql` via Yoga so React Query hooks (`useStudioProjects`, `useCreateStudioProject`, `useDeployStudioProject`, etc.) can talk to the bundle without spinning up a separate server.\n\n### Spec Editor typing\n\n- Studio’s spec editor now preloads Monaco with ambient declarations for `@lssm/lib.contracts` and `zod`, so snippets receive autocomplete and inline errors even before the spec ships to the backend. The helper lives in `presentation/components/studio/organisms/monaco-spec-types.ts` and registers the extra libs once per browser session via `monaco.languages.typescript.typescriptDefaults.addExtraLib`.\n- Compiler options are aligned with our frontend toolchain (ES2020 + React JSX) which means drafts written in the editor behave like the compiled artifacts that flow through Studio pipelines.\n\n### Spec templates\n\n- Selecting a spec type now injects a ready-to-edit scaffold (capability, workflow, policy, dataview, component) so authors start from a canonical layout instead of a blank file. Templates live alongside `SpecEditor.tsx`, and we only overwrite the content when the previous value is empty or when the author explicitly switches types via the dropdown.\n\n### Spec preview\n\n- The validation side panel now embeds a `SpecPreview` widget that shows validation errors alongside transport artifacts (GraphQL schema, REST endpoints, component summaries) once a preview run completes. Tabs let authors toggle between “Validation” and “Artifacts,” mirroring the UX described in the Studio plan.\n\n### Testing\n\n- `src/templates/__tests__/runtime.test.ts` covers todos CRUD, messaging delivery, and recipe locale switching through the local GraphQL API.\n- Studio infrastructure tests live in `src/__tests__/e2e/project-lifecycle.test.ts` and continue to exercise project creation + deploy flows.\n\n### Next Steps\n\nFuture templates can register their React components via `registerTemplateComponents(templateId, components)` so TemplateShell can render them automatically. When new templates are added, remember to:\n\n1. Update the registry entry (schema + tags).\n2. Register components inside `presentation/components/templates`.\n3. Document the template under `docs/templates/`.\n\n\n\n\n\n"
17
+ }];
18
+ registerDocBlocks(tech_templates_runtime_DocBlocks);
19
+
20
+ //#endregion
@@ -1,4 +1,20 @@
1
- import{a as e}from"../registry.js";e([{id:`docs.tech.vscode.extension`,title:`ContractSpec VS Code Extension`,summary:`VS Code extension for spec-first development with validation, scaffolding, and MCP integration.`,kind:`reference`,visibility:`public`,route:`/docs/tech/vscode/extension`,tags:[`vscode`,`extension`,`tooling`,`dx`],body:`# ContractSpec VS Code Extension
1
+ import { registerDocBlocks } from "../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/vscode-extension.docblock.js
4
+ const tech_vscode_extension_DocBlocks = [{
5
+ id: "docs.tech.vscode.extension",
6
+ title: "ContractSpec VS Code Extension",
7
+ summary: "VS Code extension for spec-first development with validation, scaffolding, and MCP integration.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/vscode/extension",
11
+ tags: [
12
+ "vscode",
13
+ "extension",
14
+ "tooling",
15
+ "dx"
16
+ ],
17
+ body: `# ContractSpec VS Code Extension
2
18
 
3
19
  The ContractSpec VS Code extension provides spec-first development tooling directly in your editor.
4
20
 
@@ -47,7 +63,20 @@ The extension uses a hybrid telemetry approach:
47
63
  2. Otherwise → send directly to PostHog (if project key configured)
48
64
 
49
65
  Telemetry respects VS Code's telemetry settings. No file paths, source code, or PII is collected.
50
- `},{id:`docs.tech.vscode.snippets`,title:`ContractSpec Snippets`,summary:`Code snippets for common ContractSpec patterns in VS Code.`,kind:`reference`,visibility:`public`,route:`/docs/tech/vscode/snippets`,tags:[`vscode`,`snippets`,`dx`],body:`# ContractSpec Snippets
66
+ `
67
+ }, {
68
+ id: "docs.tech.vscode.snippets",
69
+ title: "ContractSpec Snippets",
70
+ summary: "Code snippets for common ContractSpec patterns in VS Code.",
71
+ kind: "reference",
72
+ visibility: "public",
73
+ route: "/docs/tech/vscode/snippets",
74
+ tags: [
75
+ "vscode",
76
+ "snippets",
77
+ "dx"
78
+ ],
79
+ body: `# ContractSpec Snippets
51
80
 
52
81
  The VS Code extension includes snippets for common ContractSpec patterns.
53
82
 
@@ -65,4 +94,8 @@ The VS Code extension includes snippets for common ContractSpec patterns.
65
94
  ## Usage
66
95
 
67
96
  Type the prefix in a TypeScript file and press Tab to expand the snippet. Tab through the placeholders to fill in your values.
68
- `}]);
97
+ `
98
+ }];
99
+ registerDocBlocks(tech_vscode_extension_DocBlocks);
100
+
101
+ //#endregion
@@ -1 +1,20 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.workflows.overview`,title:`WorkflowSpec Overview`,summary:"WorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.",kind:`reference`,visibility:`public`,route:`/docs/tech/workflows/overview`,tags:[`tech`,`workflows`,`overview`],body:"# WorkflowSpec Overview\n\n## Purpose\n\nWorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.\n\n## Core Types\n\n- `WorkflowMeta`: ownership metadata (`title`, `domain`, `owners`, `tags`, `stability`) plus `name` and `version`.\n- `WorkflowDefinition`:\n - `entryStepId?`: optional explicit entry point (defaults to first step).\n - `steps[]`: ordered list of `Step` descriptors.\n - `transitions[]`: directed edges between steps with optional expressions.\n - `sla?`: aggregated timing hints for the overall flow or per-step budgets.\n - `compensation?`: fallback operations executed when a workflow is rolled back or fails.\n- `Step`:\n - `type`: `human`, `automation`, or `decision`.\n - `action`: references either a `ContractSpec` (`operation`) or `FormSpec` (`form`).\n - Optional `guard`, `timeoutMs`, and retry policy (`maxAttempts`, `backoff`, `delayMs`, `maxDelayMs?`).\n - `requiredIntegrations?`: integration slot ids that must be bound before the step may execute.\n - `requiredCapabilities?`: `CapabilityRef[]` that must be enabled in the resolved app config.\n- `Transition`: `from` → `to` with optional `condition` string (simple data expressions).\n\n## Registry & Validation\n\n- `WorkflowRegistry` (`src/workflow/spec.ts`) stores specs by key `<name>.v<version>` and exposes `register`, `list`, and `get`.\n- `validateWorkflowSpec()` (`src/workflow/validation.ts`) checks:\n - Duplicate step IDs.\n - Unknown `from`/`to` transitions.\n - Empty guards/conditions.\n - Reachability from the entry step.\n - Cycles in the graph.\n - Operation/Form references against provided registries.\n- `assertWorkflowSpecValid()` wraps validation and throws `WorkflowValidationError` when errors remain.\n\n## Runtime\n\n- `WorkflowRunner` (`src/workflow/runner.ts`) executes workflows and coordinates steps.\n - `start(name, version?, initialData?)` returns a `workflowId`.\n - `executeStep(workflowId, input?)` runs the current step (automation or human).\n - `getState(workflowId)` retrieves the latest state snapshot.\n - `cancel(workflowId)` marks the workflow as cancelled.\n - `preFlightCheck(name, version?, resolvedConfig?)` evaluates integration/capability requirements before the workflow starts.\n - Throws `WorkflowPreFlightError` if required integration slots are unbound or required capabilities are disabled.\n- `StateStore` (`src/workflow/state.ts`) abstracts persistence. V1 ships with:\n - `InMemoryStateStore` (`src/workflow/adapters/memory-store.ts`) for tests/dev.\n - Placeholder factories for file/database adapters (`adapters/file-adapter.ts`, `adapters/db-adapter.ts`).\n- Guard evaluation: expression guards run through `evaluateExpression()` (`src/workflow/expression.ts`); custom policy guards can be provided via `guardEvaluator`.\n- Events: the runner emits `workflow.started`, `workflow.step_completed`, `workflow.step_failed`, and `workflow.cancelled` through the optional `eventEmitter`.\n- React bindings (`@lssm/lib.presentation-runtime-react`):\n - `useWorkflow` hook (polls state, exposes `executeStep`, `cancel`, `refresh`).\n - `WorkflowStepper` progress indicator using design-system Stepper.\n - `WorkflowStepRenderer` helper to render human/automation/decision steps with sensible fallbacks.\n\n## Authoring Checklist\n\n1. Reuse existing operations/forms; create new specs when missing.\n2. Prefer explicit `entryStepId` for clarity (especially with decision branches).\n3. Give automation steps an `operation` and human steps a `form` (warnings surface otherwise).\n4. Use short, meaningful step IDs (`submit`, `review`, `finalize`) to simplify analytics.\n5. Keep guard expressions deterministic; complex policy logic should move to PolicySpec (Phase 2).\n\n## Testing\n\n- Add unit tests for new workflows via `assertWorkflowSpecValid`.\n- Use the new Vitest suites (`validation.test.ts`, `expression.test.ts`, `runner.test.ts`) as examples.\n- CLI support will arrive in Phase 1 PR 3 (`contractspec create --type workflow`).\n\n## Tooling\n\n- `contractspec create --type workflow` scaffolds a WorkflowSpec with interactive prompts.\n- `contractspec build <spec.workflow.ts>` generates a runner scaffold (`.runner.ts`) wired to `WorkflowRunner` and the in-memory store.\n- `contractspec validate` understands `.workflow.ts` files and checks core structure (meta, steps, transitions).\n\n## Next Steps (Non-MVP)\n\n- Persistence adapters (database/file) for workflow state (Phase 2).\n- React bindings (`useWorkflow`, `WorkflowStepper`) and presentation-runtime integration (PR 3).\n- Policy engine integration (`guard.type === 'policy'` validated against PolicySpec).\n- Telemetry hooks for step execution metrics.\n\n"}]);
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/workflows/overview.docblock.js
4
+ const tech_workflows_overview_DocBlocks = [{
5
+ id: "docs.tech.workflows.overview",
6
+ title: "WorkflowSpec Overview",
7
+ summary: "WorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/workflows/overview",
11
+ tags: [
12
+ "tech",
13
+ "workflows",
14
+ "overview"
15
+ ],
16
+ body: "# WorkflowSpec Overview\n\n## Purpose\n\nWorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.\n\n## Core Types\n\n- `WorkflowMeta`: ownership metadata (`title`, `domain`, `owners`, `tags`, `stability`) plus `name` and `version`.\n- `WorkflowDefinition`:\n - `entryStepId?`: optional explicit entry point (defaults to first step).\n - `steps[]`: ordered list of `Step` descriptors.\n - `transitions[]`: directed edges between steps with optional expressions.\n - `sla?`: aggregated timing hints for the overall flow or per-step budgets.\n - `compensation?`: fallback operations executed when a workflow is rolled back or fails.\n- `Step`:\n - `type`: `human`, `automation`, or `decision`.\n - `action`: references either a `ContractSpec` (`operation`) or `FormSpec` (`form`).\n - Optional `guard`, `timeoutMs`, and retry policy (`maxAttempts`, `backoff`, `delayMs`, `maxDelayMs?`).\n - `requiredIntegrations?`: integration slot ids that must be bound before the step may execute.\n - `requiredCapabilities?`: `CapabilityRef[]` that must be enabled in the resolved app config.\n- `Transition`: `from` → `to` with optional `condition` string (simple data expressions).\n\n## Registry & Validation\n\n- `WorkflowRegistry` (`src/workflow/spec.ts`) stores specs by key `<name>.v<version>` and exposes `register`, `list`, and `get`.\n- `validateWorkflowSpec()` (`src/workflow/validation.ts`) checks:\n - Duplicate step IDs.\n - Unknown `from`/`to` transitions.\n - Empty guards/conditions.\n - Reachability from the entry step.\n - Cycles in the graph.\n - Operation/Form references against provided registries.\n- `assertWorkflowSpecValid()` wraps validation and throws `WorkflowValidationError` when errors remain.\n\n## Runtime\n\n- `WorkflowRunner` (`src/workflow/runner.ts`) executes workflows and coordinates steps.\n - `start(name, version?, initialData?)` returns a `workflowId`.\n - `executeStep(workflowId, input?)` runs the current step (automation or human).\n - `getState(workflowId)` retrieves the latest state snapshot.\n - `cancel(workflowId)` marks the workflow as cancelled.\n - `preFlightCheck(name, version?, resolvedConfig?)` evaluates integration/capability requirements before the workflow starts.\n - Throws `WorkflowPreFlightError` if required integration slots are unbound or required capabilities are disabled.\n- `StateStore` (`src/workflow/state.ts`) abstracts persistence. V1 ships with:\n - `InMemoryStateStore` (`src/workflow/adapters/memory-store.ts`) for tests/dev.\n - Placeholder factories for file/database adapters (`adapters/file-adapter.ts`, `adapters/db-adapter.ts`).\n- Guard evaluation: expression guards run through `evaluateExpression()` (`src/workflow/expression.ts`); custom policy guards can be provided via `guardEvaluator`.\n- Events: the runner emits `workflow.started`, `workflow.step_completed`, `workflow.step_failed`, and `workflow.cancelled` through the optional `eventEmitter`.\n- React bindings (`@lssm/lib.presentation-runtime-react`):\n - `useWorkflow` hook (polls state, exposes `executeStep`, `cancel`, `refresh`).\n - `WorkflowStepper` progress indicator using design-system Stepper.\n - `WorkflowStepRenderer` helper to render human/automation/decision steps with sensible fallbacks.\n\n## Authoring Checklist\n\n1. Reuse existing operations/forms; create new specs when missing.\n2. Prefer explicit `entryStepId` for clarity (especially with decision branches).\n3. Give automation steps an `operation` and human steps a `form` (warnings surface otherwise).\n4. Use short, meaningful step IDs (`submit`, `review`, `finalize`) to simplify analytics.\n5. Keep guard expressions deterministic; complex policy logic should move to PolicySpec (Phase 2).\n\n## Testing\n\n- Add unit tests for new workflows via `assertWorkflowSpecValid`.\n- Use the new Vitest suites (`validation.test.ts`, `expression.test.ts`, `runner.test.ts`) as examples.\n- CLI support will arrive in Phase 1 PR 3 (`contractspec create --type workflow`).\n\n## Tooling\n\n- `contractspec create --type workflow` scaffolds a WorkflowSpec with interactive prompts.\n- `contractspec build <spec.workflow.ts>` generates a runner scaffold (`.runner.ts`) wired to `WorkflowRunner` and the in-memory store.\n- `contractspec validate` understands `.workflow.ts` files and checks core structure (meta, steps, transitions).\n\n## Next Steps (Non-MVP)\n\n- Persistence adapters (database/file) for workflow state (Phase 2).\n- React bindings (`useWorkflow`, `WorkflowStepper`) and presentation-runtime integration (PR 3).\n- Policy engine integration (`guard.type === 'policy'` validated against PolicySpec).\n- Telemetry hooks for step execution metrics.\n\n"
17
+ }];
18
+ registerDocBlocks(tech_workflows_overview_DocBlocks);
19
+
20
+ //#endregion
@@ -1 +1,10 @@
1
- import"./schema/dist/index.js";function e(e){return e}export{e};
1
+ import "./schema/dist/index.js";
2
+
3
+ //#region ../../libs/contracts/dist/events.js
4
+ /** Identity function to keep type inference when declaring events. */
5
+ function defineEvent(e) {
6
+ return e;
7
+ }
8
+
9
+ //#endregion
10
+ export { defineEvent };
@@ -1 +1 @@
1
- import"node:crypto";
1
+ import "node:crypto";
@@ -1 +1,71 @@
1
- import{n as e,t}from"./spec.js";import"./schema/dist/SchemaModel.js";import"./schema/dist/index.js";import{e as n}from"./events.js";import"./presentations.v2.js";import"./client/react/feature-render.js";import"./client/react/form-render.js";import"./client/index.js";import"./jsonschema.js";import"./server/graphql-pothos.js";import"./presentations.js";import"./server/mcp/createMcpServer.js";import"./server/rest-generic.js";import"./server/rest-elysia.js";import"./server/rest-express.js";import"./server/rest-next-app.js";import"./server/rest-next-pages.js";import"./server/index.js";import{a as r,i,o as a}from"./docs/presentations.js";import{a as o,i as s,n as c}from"./docs/registry.js";import"./registry.js";import{e as l,r as u,t as d}from"./ownership.js";import{i as f,n as p,r as m}from"./contract-registry/schemas.js";import"./contract-registry/index.js";import"./install.js";import"./openapi.js";import"./prompt.js";import"./promptRegistry.js";import"./resources.js";import{d as h,l as g,m as _,o as v,p as y,s as b}from"./onboarding-base.js";import"./capabilities/openbanking.js";import"./telemetry/tracker.js";import"./telemetry/index.js";import"./tests/runner.js";import"./tests/index.js";import"./experiments/evaluator.js";import"./integrations/providers/stripe.js";import"./integrations/providers/postmark.js";import"./integrations/providers/qdrant.js";import"./integrations/providers/mistral.js";import"./integrations/providers/elevenlabs.js";import"./integrations/providers/gmail.js";import"./integrations/providers/google-calendar.js";import"./integrations/providers/twilio-sms.js";import"./integrations/providers/gcs-storage.js";import"./integrations/providers/powens.js";import"./integrations/providers/registry.js";import{i as x,n as S,r as C}from"./integrations/openbanking/models.js";import{t as w}from"./integrations/openbanking/telemetry.js";import{d as T,f as E,p as D}from"./integrations/openbanking/contracts/accounts.js";import{d as O,u as k}from"./integrations/openbanking/contracts/transactions.js";import{d as A,u as j}from"./integrations/openbanking/contracts/balances.js";import"./integrations/openbanking/contracts/index.js";import"./integrations/index.js";import"./knowledge/spaces/product-canon.js";import"./knowledge/spaces/support-faq.js";import"./knowledge/spaces/email-threads.js";import"./knowledge/spaces/uploaded-docs.js";import"./knowledge/spaces/financial-docs.js";import"./knowledge/spaces/financial-overview.js";import"./knowledge/index.js";import{_ as M,g as N,h as P,m as F,p as I}from"./integrations/contracts.js";import{_ as L,g as R,h as z,m as B,v as V}from"./knowledge/contracts.js";import"./regenerator/service.js";import"./regenerator/index.js";import"./workflow/runner.js";import"./workflow/index.js";import"./docs/index.js";import"./llm/exporters.js";import"./llm/prompts.js";import"./llm/index.js";
1
+ import { defineCommand, defineQuery } from "./spec.js";
2
+ import "./schema/dist/SchemaModel.js";
3
+ import "./schema/dist/index.js";
4
+ import { defineEvent } from "./events.js";
5
+ import "./presentations.v2.js";
6
+ import "./client/react/feature-render.js";
7
+ import "./client/react/form-render.js";
8
+ import "./client/index.js";
9
+ import "./jsonschema.js";
10
+ import "./server/graphql-pothos.js";
11
+ import "./presentations.js";
12
+ import "./server/mcp/createMcpServer.js";
13
+ import "./server/rest-generic.js";
14
+ import "./server/rest-elysia.js";
15
+ import "./server/rest-express.js";
16
+ import "./server/rest-next-app.js";
17
+ import "./server/rest-next-pages.js";
18
+ import "./server/index.js";
19
+ import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes } from "./docs/presentations.js";
20
+ import { DocRegistry, defaultDocRegistry, registerDocBlocks } from "./docs/registry.js";
21
+ import "./registry.js";
22
+ import { OwnersEnum, StabilityEnum } from "./ownership.js";
23
+ import { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema } from "./contract-registry/schemas.js";
24
+ import "./contract-registry/index.js";
25
+ import "./install.js";
26
+ import "./openapi.js";
27
+ import "./prompt.js";
28
+ import "./promptRegistry.js";
29
+ import "./resources.js";
30
+ import { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, DeleteOnboardingDraftOutput, GetOnboardingDraftOutput, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from "./onboarding-base.js";
31
+ import "./capabilities/openbanking.js";
32
+ import "./telemetry/tracker.js";
33
+ import "./telemetry/index.js";
34
+ import "./tests/runner.js";
35
+ import "./tests/index.js";
36
+ import "./experiments/evaluator.js";
37
+ import "./integrations/providers/stripe.js";
38
+ import "./integrations/providers/postmark.js";
39
+ import "./integrations/providers/qdrant.js";
40
+ import "./integrations/providers/mistral.js";
41
+ import "./integrations/providers/elevenlabs.js";
42
+ import "./integrations/providers/gmail.js";
43
+ import "./integrations/providers/google-calendar.js";
44
+ import "./integrations/providers/twilio-sms.js";
45
+ import "./integrations/providers/gcs-storage.js";
46
+ import "./integrations/providers/powens.js";
47
+ import "./integrations/providers/registry.js";
48
+ import { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord } from "./integrations/openbanking/models.js";
49
+ import { OPENBANKING_TELEMETRY_EVENTS } from "./integrations/openbanking/telemetry.js";
50
+ import "./integrations/openbanking/contracts/accounts.js";
51
+ import "./integrations/openbanking/contracts/transactions.js";
52
+ import "./integrations/openbanking/contracts/balances.js";
53
+ import "./integrations/openbanking/contracts/index.js";
54
+ import "./integrations/index.js";
55
+ import "./knowledge/spaces/product-canon.js";
56
+ import "./knowledge/spaces/support-faq.js";
57
+ import "./knowledge/spaces/email-threads.js";
58
+ import "./knowledge/spaces/uploaded-docs.js";
59
+ import "./knowledge/spaces/financial-docs.js";
60
+ import "./knowledge/spaces/financial-overview.js";
61
+ import "./knowledge/index.js";
62
+ import "./integrations/contracts.js";
63
+ import "./knowledge/contracts.js";
64
+ import "./regenerator/service.js";
65
+ import "./regenerator/index.js";
66
+ import "./workflow/runner.js";
67
+ import "./workflow/index.js";
68
+ import "./docs/index.js";
69
+ import "./llm/exporters.js";
70
+ import "./llm/prompts.js";
71
+ import "./llm/index.js";
@@ -1 +1,2 @@
1
- import"./registry.js";import"zod";
1
+ import "./registry.js";
2
+ import "zod";