@lssm/example.learning-journey-registry 0.0.0-canary-20251217080011 → 1.41.0

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 (143) hide show
  1. package/.turbo/turbo-build.log +53 -55
  2. package/dist/api.js +1 -170
  3. package/dist/docs/index.js +1 -1
  4. package/dist/docs/learning-journey-registry.docblock.js +1 -38
  5. package/dist/example.js +1 -34
  6. package/dist/index.js +1 -13
  7. package/dist/learning-journey-registry.feature.js +1 -66
  8. package/dist/libs/contracts/src/docs/PUBLISHING.docblock.js +76 -0
  9. package/dist/libs/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.js +350 -0
  10. package/dist/libs/contracts/src/docs/index.js +1 -0
  11. package/dist/libs/contracts/src/docs/presentations.js +1 -0
  12. package/dist/libs/contracts/src/docs/registry.js +1 -0
  13. package/dist/libs/contracts/src/docs/tech/PHASE_1_QUICKSTART.docblock.js +383 -0
  14. package/dist/libs/contracts/src/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +68 -0
  15. package/dist/libs/contracts/src/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +140 -0
  16. package/dist/libs/contracts/src/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +86 -0
  17. package/dist/libs/contracts/src/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +1 -0
  18. package/dist/libs/contracts/{dist → src}/docs/tech/auth/better-auth-nextjs.docblock.js +2 -24
  19. package/dist/libs/contracts/{dist → src}/docs/tech/contracts/openapi-export.docblock.js +2 -21
  20. package/dist/libs/contracts/src/docs/tech/lifecycle-stage-system.docblock.js +213 -0
  21. package/dist/libs/contracts/{dist → src}/docs/tech/llm/llm-integration.docblock.js +5 -73
  22. package/dist/libs/contracts/src/docs/tech/mcp-endpoints.docblock.js +1 -0
  23. package/dist/libs/contracts/src/docs/tech/presentation-runtime.docblock.js +1 -0
  24. package/dist/libs/contracts/src/docs/tech/schema/README.docblock.js +262 -0
  25. package/dist/libs/contracts/src/docs/tech/studio/learning-events.docblock.js +1 -0
  26. package/dist/libs/contracts/{dist → src}/docs/tech/studio/learning-journeys.docblock.js +2 -24
  27. package/dist/libs/contracts/{dist → src}/docs/tech/studio/platform-admin-panel.docblock.js +2 -23
  28. package/dist/libs/contracts/src/docs/tech/studio/project-access-teams.docblock.js +36 -0
  29. package/dist/libs/contracts/src/docs/tech/studio/project-routing.docblock.js +1 -0
  30. package/dist/libs/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.js +20 -0
  31. package/dist/libs/contracts/{dist → src}/docs/tech/studio/team-invitations.docblock.js +36 -40
  32. package/dist/libs/contracts/src/docs/tech/studio/workspace-ops.docblock.js +1 -0
  33. package/dist/libs/contracts/{dist → src}/docs/tech/studio/workspaces.docblock.js +2 -23
  34. package/dist/libs/contracts/{dist → src}/docs/tech/telemetry-ingest.docblock.js +3 -36
  35. package/dist/libs/contracts/src/docs/tech/templates/runtime.docblock.js +1 -0
  36. package/dist/libs/contracts/{dist → src}/docs/tech/vscode-extension.docblock.js +3 -36
  37. package/dist/libs/contracts/src/docs/tech/workflows/overview.docblock.js +1 -0
  38. package/dist/presentations/index.js +1 -64
  39. package/dist/progress-store.js +1 -30
  40. package/dist/tracks.js +1 -47
  41. package/dist/ui/LearningMiniApp.js +1 -82
  42. package/dist/ui/index.js +1 -3
  43. package/package.json +26 -30
  44. package/tsconfig.tsbuildinfo +1 -1
  45. package/.turbo/turbo-build$colon$bundle.log +0 -410
  46. package/CHANGELOG.md +0 -24
  47. package/dist/api-types.d.ts +0 -40
  48. package/dist/api.d.ts +0 -12
  49. package/dist/docs/index.d.ts +0 -1
  50. package/dist/docs/learning-journey-registry.docblock.d.ts +0 -1
  51. package/dist/example.d.ts +0 -32
  52. package/dist/examples/learning-journey-ambient-coach/src/track.js +0 -41
  53. package/dist/examples/learning-journey-crm-onboarding/dist/track.js +0 -98
  54. package/dist/examples/learning-journey-duo-drills/src/track.js +0 -65
  55. package/dist/examples/learning-journey-platform-tour/dist/track.js +0 -105
  56. package/dist/examples/learning-journey-quest-challenges/src/track.js +0 -35
  57. package/dist/examples/learning-journey-studio-onboarding/dist/track.js +0 -90
  58. package/dist/examples/learning-journey-ui-coaching/src/CoachingMiniApp.js +0 -64
  59. package/dist/examples/learning-journey-ui-coaching/src/components/EngagementMeter.js +0 -107
  60. package/dist/examples/learning-journey-ui-coaching/src/components/TipCard.js +0 -75
  61. package/dist/examples/learning-journey-ui-coaching/src/components/TipFeed.js +0 -65
  62. package/dist/examples/learning-journey-ui-coaching/src/components/index.js +0 -3
  63. package/dist/examples/learning-journey-ui-coaching/src/docs/index.js +0 -1
  64. package/dist/examples/learning-journey-ui-coaching/src/docs/learning-journey-ui-coaching.docblock.js +0 -20
  65. package/dist/examples/learning-journey-ui-coaching/src/index.js +0 -11
  66. package/dist/examples/learning-journey-ui-coaching/src/views/Overview.js +0 -152
  67. package/dist/examples/learning-journey-ui-coaching/src/views/Progress.js +0 -117
  68. package/dist/examples/learning-journey-ui-coaching/src/views/Steps.js +0 -68
  69. package/dist/examples/learning-journey-ui-coaching/src/views/Timeline.js +0 -112
  70. package/dist/examples/learning-journey-ui-coaching/src/views/index.js +0 -4
  71. package/dist/examples/learning-journey-ui-gamified/src/GamifiedMiniApp.js +0 -64
  72. package/dist/examples/learning-journey-ui-gamified/src/components/DayCalendar.js +0 -32
  73. package/dist/examples/learning-journey-ui-gamified/src/components/FlashCard.js +0 -79
  74. package/dist/examples/learning-journey-ui-gamified/src/components/MasteryRing.js +0 -81
  75. package/dist/examples/learning-journey-ui-gamified/src/components/index.js +0 -3
  76. package/dist/examples/learning-journey-ui-gamified/src/docs/index.js +0 -1
  77. package/dist/examples/learning-journey-ui-gamified/src/docs/learning-journey-ui-gamified.docblock.js +0 -20
  78. package/dist/examples/learning-journey-ui-gamified/src/index.js +0 -11
  79. package/dist/examples/learning-journey-ui-gamified/src/views/Overview.js +0 -163
  80. package/dist/examples/learning-journey-ui-gamified/src/views/Progress.js +0 -144
  81. package/dist/examples/learning-journey-ui-gamified/src/views/Steps.js +0 -55
  82. package/dist/examples/learning-journey-ui-gamified/src/views/Timeline.js +0 -132
  83. package/dist/examples/learning-journey-ui-gamified/src/views/index.js +0 -4
  84. package/dist/examples/learning-journey-ui-onboarding/src/OnboardingMiniApp.js +0 -64
  85. package/dist/examples/learning-journey-ui-onboarding/src/components/CodeSnippet.js +0 -4
  86. package/dist/examples/learning-journey-ui-onboarding/src/components/JourneyMap.js +0 -48
  87. package/dist/examples/learning-journey-ui-onboarding/src/components/StepChecklist.js +0 -79
  88. package/dist/examples/learning-journey-ui-onboarding/src/components/index.js +0 -3
  89. package/dist/examples/learning-journey-ui-onboarding/src/docs/index.js +0 -1
  90. package/dist/examples/learning-journey-ui-onboarding/src/docs/learning-journey-ui-onboarding.docblock.js +0 -20
  91. package/dist/examples/learning-journey-ui-onboarding/src/index.js +0 -10
  92. package/dist/examples/learning-journey-ui-onboarding/src/views/Overview.js +0 -180
  93. package/dist/examples/learning-journey-ui-onboarding/src/views/Progress.js +0 -162
  94. package/dist/examples/learning-journey-ui-onboarding/src/views/Steps.js +0 -91
  95. package/dist/examples/learning-journey-ui-onboarding/src/views/Timeline.js +0 -97
  96. package/dist/examples/learning-journey-ui-onboarding/src/views/index.js +0 -4
  97. package/dist/examples/learning-journey-ui-shared/src/components/BadgeDisplay.js +0 -44
  98. package/dist/examples/learning-journey-ui-shared/src/components/StreakCounter.js +0 -45
  99. package/dist/examples/learning-journey-ui-shared/src/components/ViewTabs.js +0 -48
  100. package/dist/examples/learning-journey-ui-shared/src/components/XpBar.js +0 -46
  101. package/dist/examples/learning-journey-ui-shared/src/components/index.js +0 -4
  102. package/dist/examples/learning-journey-ui-shared/src/docs/index.js +0 -1
  103. package/dist/examples/learning-journey-ui-shared/src/docs/learning-journey-ui-shared.docblock.js +0 -20
  104. package/dist/examples/learning-journey-ui-shared/src/hooks/index.js +0 -1
  105. package/dist/examples/learning-journey-ui-shared/src/hooks/useLearningProgress.js +0 -73
  106. package/dist/examples/learning-journey-ui-shared/src/index.js +0 -8
  107. package/dist/index.d.ts +0 -8
  108. package/dist/learning-journey-registry.feature.d.ts +0 -11
  109. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  110. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  111. package/dist/libs/contracts/dist/docs/index.js +0 -29
  112. package/dist/libs/contracts/dist/docs/presentations.js +0 -71
  113. package/dist/libs/contracts/dist/docs/registry.js +0 -44
  114. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  115. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  116. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  117. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  118. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  119. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  120. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  121. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  122. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  123. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  124. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  125. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  126. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  127. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  128. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  129. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  130. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +0 -5
  131. package/dist/libs/design-system/dist/components/atoms/Button.js +0 -33
  132. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +0 -55
  133. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -13
  134. package/dist/libs/ui-kit-core/dist/utils.js +0 -10
  135. package/dist/libs/ui-kit-web/dist/ui/card.js +0 -36
  136. package/dist/libs/ui-kit-web/dist/ui/progress.js +0 -23
  137. package/dist/libs/ui-kit-web/dist/ui/utils.js +0 -10
  138. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -10
  139. package/dist/presentations/index.d.ts +0 -9
  140. package/dist/progress-store.d.ts +0 -10
  141. package/dist/tracks.d.ts +0 -39
  142. package/dist/ui/LearningMiniApp.d.ts +0 -22
  143. package/dist/ui/index.d.ts +0 -2
@@ -1,67 +0,0 @@
1
- import { registerDocBlocks } from "../../registry.js";
2
-
3
- //#region ../../libs/contracts/dist/docs/tech/studio/project-routing.docblock.js
4
- const tech_studio_project_routing_DocBlocks = [{
5
- id: "docs.tech.studio.project-routing",
6
- title: "Studio Project Routing",
7
- summary: "Studio uses slugged, project-first routes: /studio/{projectSlug}/* with canonical slug redirects and soft-deleted projects hidden.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/tech/studio/project-routing",
11
- tags: [
12
- "studio",
13
- "routing",
14
- "projects",
15
- "slug",
16
- "redirects"
17
- ],
18
- body: `# Studio Project Routing
19
-
20
- ContractSpec Studio uses a **project-first URL scheme**:
21
-
22
- - \`/studio/projects\` — create, select, and delete projects.
23
- - \`/studio/{projectSlug}/*\` — project modules (canvas/specs/deploy/integrations/evolution/learning).
24
- - \`/studio/learning\` — learning hub that does not require selecting a project.
25
-
26
- ## Studio layout shell
27
-
28
- Studio routes are wrapped in a dedicated **Studio app shell** (header + footer) that provides in-app navigation (Projects/Learning/Teams), organization switching, and account actions.
29
-
30
- Project module routes (\`/studio/{projectSlug}/*\`) render their own module shell (\`WorkspaceProjectShellLayout\`). When combined with the global Studio header, the project shell uses a **sticky header offset** to avoid overlapping sticky headers.
31
-
32
- ## Slug behavior (rename-safe)
33
-
34
- - Each project has a \`slug\` stored in the database (\`StudioProject.slug\`).
35
- - When a project name changes, Studio **updates the slug** and stores the previous slug as an alias (\`StudioProjectSlugAlias\`).
36
- - Requests to an alias slug are **redirected to the canonical slug**.
37
-
38
- GraphQL entrypoint:
39
-
40
- - \`studioProjectBySlug(slug: String!)\` returns:
41
- - \`project\`
42
- - \`canonicalSlug\`
43
- - \`wasRedirect\`
44
-
45
- ## Deletion behavior (soft delete)
46
-
47
- Projects are **soft-deleted**:
48
-
49
- - \`deleteStudioProject(id: String!)\` sets \`StudioProject.deletedAt\`.
50
- - All listings and access checks filter \`deletedAt = null\`.
51
- - Soft-deleted projects are treated as “not found” in Studio routes and GraphQL access checks.
52
-
53
- ## Available modules for a selected project
54
-
55
- The following project modules are expected under \`/studio/{projectSlug}\`:
56
-
57
- - \`/canvas\` — Visual builder canvas (stored via overlays and canvas versions).
58
- - \`/specs\` — Spec editor (stored as \`StudioSpec\`).
59
- - \`/deploy\` — Deployments history + triggers (stored as \`StudioDeployment\`).
60
- - \`/integrations\` — Integrations scoped to project (stored as \`StudioIntegration\`).
61
- - \`/evolution\` — Evolution sessions (stored as \`EvolutionSession\`).
62
- - \`/learning\` — Project learning activity.
63
- `
64
- }];
65
- registerDocBlocks(tech_studio_project_routing_DocBlocks);
66
-
67
- //#endregion
@@ -1,40 +0,0 @@
1
- import { registerDocBlocks } from "../../registry.js";
2
-
3
- //#region ../../libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js
4
- const tech_studio_sandbox_unlogged_DocBlocks = [{
5
- id: "docs.tech.studio.sandbox.unlogged",
6
- title: "Sandbox (unlogged) vs Studio (authenticated)",
7
- summary: "The sandbox is a lightweight, unlogged surface that mirrors Studio navigation without auth or analytics.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/tech/studio/sandbox-unlogged",
11
- tags: [
12
- "studio",
13
- "sandbox",
14
- "privacy",
15
- "analytics"
16
- ],
17
- body: `## Sandbox guarantees
18
-
19
- - Route: \`/sandbox\`
20
- - **No auth requirement**
21
- - **No PostHog init**
22
- - **No Vercel Analytics**
23
- - Local-only state (in-browser runtime + localStorage where needed)
24
-
25
- ## What Sandbox is for
26
-
27
- - Try templates and feature modules safely
28
- - Preview specs/builder/evolution/learning
29
- - Produce copyable CLI commands (no side effects)
30
-
31
- ## What Sandbox is *not* for
32
-
33
- - Persisted projects/workspaces
34
- - Real deployments
35
- - Organization-scoped integrations (unless explicitly enabled later)
36
- `
37
- }];
38
- registerDocBlocks(tech_studio_sandbox_unlogged_DocBlocks);
39
-
40
- //#endregion
@@ -1,47 +0,0 @@
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,20 +0,0 @@
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,20 +0,0 @@
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,5 +0,0 @@
1
- //#region ../../libs/design-system/dist/_virtual/rolldown_runtime.js
2
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
3
-
4
- //#endregion
5
- export { __esmMin };
@@ -1,33 +0,0 @@
1
- import { Button } from "../../ui-kit-web/dist/ui/button.js";
2
- import "react";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { Loader2 } from "lucide-react";
5
-
6
- //#region ../../libs/design-system/dist/components/atoms/Button.js
7
- function Button$1({ children, loading, spinnerPlacement = "start", onPress, onPressIn, onPressOut, onLongPress, onTouchStart, onTouchEnd, onTouchCancel, onMouseDown, onMouseUp, onClick, className, disabled, ...rest }) {
8
- const isDisabled = Boolean(disabled || loading);
9
- const content = !rest.asChild ? /* @__PURE__ */ jsxs(Fragment, { children: [
10
- loading && spinnerPlacement === "start" ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : null,
11
- children,
12
- loading && spinnerPlacement === "end" ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : null
13
- ] }) : children;
14
- return /* @__PURE__ */ jsx(Button, {
15
- ...rest,
16
- className,
17
- disabled: isDisabled,
18
- "aria-busy": loading ? true : void 0,
19
- "aria-disabled": isDisabled ? true : void 0,
20
- onPress: onPress || onClick,
21
- onClick: onPress || onClick,
22
- onMouseDown: onMouseDown || onPressIn,
23
- onMouseUp: onMouseUp || onPressOut,
24
- onTouchStart,
25
- onTouchEnd: onTouchEnd || onPressOut,
26
- onTouchCancel: onTouchCancel || onPressOut,
27
- type: rest?.type ?? "button",
28
- children: content
29
- });
30
- }
31
-
32
- //#endregion
33
- export { Button$1 };
@@ -1,55 +0,0 @@
1
- import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
2
- import * as React$1 from "react";
3
- import { jsx } from "react/jsx-runtime";
4
- import { cva } from "class-variance-authority";
5
- import { Slot } from "@radix-ui/react-slot";
6
-
7
- //#region ../../libs/design-system/dist/ui-kit-web/dist/ui/button.js
8
- init_utils();
9
- const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-hidden focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
10
- variants: {
11
- variant: {
12
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
13
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
14
- outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
15
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
16
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
17
- link: "text-primary underline-offset-4 hover:underline"
18
- },
19
- size: {
20
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
21
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
22
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
23
- icon: "size-9"
24
- }
25
- },
26
- defaultVariants: {
27
- variant: "default",
28
- size: "default"
29
- }
30
- });
31
- const Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
32
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
33
- "data-slot": "button",
34
- className: cn(buttonVariants({
35
- variant,
36
- size,
37
- className
38
- })),
39
- ...props
40
- });
41
- return /* @__PURE__ */ jsx("button", {
42
- ref,
43
- "data-slot": "button",
44
- className: cn(buttonVariants({
45
- variant,
46
- size,
47
- className
48
- })),
49
- ...props
50
- });
51
- });
52
- Button.displayName = "Button";
53
-
54
- //#endregion
55
- export { Button };
@@ -1,13 +0,0 @@
1
- import { __esmMin } from "../../../../_virtual/rolldown_runtime.js";
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
-
5
- //#region ../../libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js
6
- function cn(...inputs) {
7
- return twMerge(clsx(inputs));
8
- }
9
- var init_utils = __esmMin((() => {}));
10
- init_utils();
11
-
12
- //#endregion
13
- export { cn, init_utils };
@@ -1,10 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- //#region ../../libs/ui-kit-core/dist/utils.js
5
- function cn(...inputs) {
6
- return twMerge(clsx(inputs));
7
- }
8
-
9
- //#endregion
10
- export { cn };
@@ -1,36 +0,0 @@
1
- import { cn } from "../ui-kit-core/dist/utils.js";
2
- import "react";
3
- import { jsx } from "react/jsx-runtime";
4
-
5
- //#region ../../libs/ui-kit-web/dist/ui/card.js
6
- function Card({ className, ...props }) {
7
- return /* @__PURE__ */ jsx("div", {
8
- "data-slot": "card",
9
- className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-2xs", className),
10
- ...props
11
- });
12
- }
13
- function CardHeader({ className, ...props }) {
14
- return /* @__PURE__ */ jsx("div", {
15
- "data-slot": "card-header",
16
- className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
17
- ...props
18
- });
19
- }
20
- function CardTitle({ className, ...props }) {
21
- return /* @__PURE__ */ jsx("div", {
22
- "data-slot": "card-title",
23
- className: cn("leading-none font-semibold", className),
24
- ...props
25
- });
26
- }
27
- function CardContent({ className, ...props }) {
28
- return /* @__PURE__ */ jsx("div", {
29
- "data-slot": "card-content",
30
- className: cn("px-6", className),
31
- ...props
32
- });
33
- }
34
-
35
- //#endregion
36
- export { Card, CardContent, CardHeader, CardTitle };
@@ -1,23 +0,0 @@
1
- 'use client';
2
-
3
- import { cn } from "../ui-kit-core/dist/utils.js";
4
- import "react";
5
- import { jsx } from "react/jsx-runtime";
6
- import * as ProgressPrimitive from "@radix-ui/react-progress";
7
-
8
- //#region ../../libs/ui-kit-web/dist/ui/progress.js
9
- function Progress({ className, value, ...props }) {
10
- return /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
11
- "data-slot": "progress",
12
- className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
13
- ...props,
14
- children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
15
- "data-slot": "progress-indicator",
16
- className: "bg-primary h-full w-full flex-1 transition-all",
17
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
18
- })
19
- });
20
- }
21
-
22
- //#endregion
23
- export { Progress };
@@ -1,10 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- //#region ../../libs/ui-kit-web/dist/ui/utils.js
5
- function cn(...inputs) {
6
- return twMerge(clsx(inputs));
7
- }
8
-
9
- //#endregion
10
- export { cn };
@@ -1,10 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- //#region ../../libs/ui-kit-web/dist/ui-kit-core/dist/utils.js
5
- function cn(...inputs) {
6
- return twMerge(clsx(inputs));
7
- }
8
-
9
- //#endregion
10
- export { cn };
@@ -1,9 +0,0 @@
1
- import { PresentationDescriptorV2 } from "@lssm/lib.contracts";
2
-
3
- //#region src/presentations/index.d.ts
4
- declare const LearningTrackListPresentation: PresentationDescriptorV2;
5
- declare const LearningTrackDetailPresentation: PresentationDescriptorV2;
6
- declare const LearningTrackProgressWidgetPresentation: PresentationDescriptorV2;
7
- declare const learningJourneyPresentations: PresentationDescriptorV2[];
8
- //#endregion
9
- export { LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, learningJourneyPresentations };
@@ -1,10 +0,0 @@
1
- import { TrackProgress } from "./api-types.js";
2
- import { LearningJourneyTrackSpec } from "@lssm/module.learning-journey/track-spec";
3
-
4
- //#region src/progress-store.d.ts
5
- declare const progressStore: Map<string, Map<string, TrackProgress>>;
6
- declare const getTrackResolver: (tracks: LearningJourneyTrackSpec[]) => (trackId: string) => LearningJourneyTrackSpec | undefined;
7
- declare const getLearnerTracks: (learnerId: string) => Map<string, TrackProgress>;
8
- declare const initProgress: (learnerId: string, track: LearningJourneyTrackSpec) => TrackProgress;
9
- //#endregion
10
- export { getLearnerTracks, getTrackResolver, initProgress, progressStore };
package/dist/tracks.d.ts DELETED
@@ -1,39 +0,0 @@
1
- import { LearningJourneyStepSpec, LearningJourneyTrackSpec, StepAvailabilitySpec, StepCompletionConditionSpec } from "@lssm/module.learning-journey/track-spec";
2
- import { crmLearningTracks } from "@lssm/example.learning-journey-crm-onboarding/track";
3
- import { platformLearningTracks } from "@lssm/example.learning-journey-platform-tour/track";
4
- import { studioLearningTracks } from "@lssm/example.learning-journey-studio-onboarding/track";
5
-
6
- //#region src/tracks.d.ts
7
- interface OnboardingStepDto {
8
- id: string;
9
- title: string;
10
- description?: string;
11
- completionEvent: string;
12
- completionCondition?: StepCompletionConditionSpec;
13
- xpReward?: number;
14
- isRequired?: boolean;
15
- canSkip?: boolean;
16
- actionUrl?: string;
17
- actionLabel?: string;
18
- availability?: StepAvailabilitySpec;
19
- metadata?: Record<string, unknown>;
20
- }
21
- interface OnboardingTrackDto {
22
- id: string;
23
- name: string;
24
- description?: string;
25
- productId?: string;
26
- targetUserSegment?: string;
27
- targetRole?: string;
28
- totalXp?: number;
29
- streakRule?: LearningJourneyTrackSpec['streakRule'];
30
- completionRewards?: LearningJourneyTrackSpec['completionRewards'];
31
- steps: OnboardingStepDto[];
32
- metadata?: Record<string, unknown>;
33
- }
34
- declare const mapStep: (step: LearningJourneyStepSpec) => OnboardingStepDto;
35
- declare const mapTrackSpecToDto: (track: LearningJourneyTrackSpec) => OnboardingTrackDto;
36
- declare const learningJourneyTracks: LearningJourneyTrackSpec[];
37
- declare const onboardingTrackCatalog: OnboardingTrackDto[];
38
- //#endregion
39
- export { OnboardingStepDto, OnboardingTrackDto, crmLearningTracks, learningJourneyTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, studioLearningTracks };
@@ -1,22 +0,0 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
-
3
- //#region src/ui/LearningMiniApp.d.ts
4
- /** Template IDs that map to learning journey tracks */
5
- type LearningTemplateId = 'learning-journey-duo-drills' | 'learning-journey-quest-challenges' | 'learning-journey-studio-onboarding' | 'learning-journey-platform-tour' | 'learning-journey-ambient-coach' | 'learning-journey-crm-onboarding';
6
- interface LearningMiniAppProps {
7
- templateId: string;
8
- initialView?: LearningView;
9
- onViewChange?: (view: LearningView) => void;
10
- }
11
- /** Router component that picks the correct mini-app based on template ID */
12
- declare function LearningMiniApp({
13
- templateId,
14
- initialView,
15
- onViewChange
16
- }: LearningMiniAppProps): react_jsx_runtime0.JSX.Element;
17
- /** Check if a template ID is a learning journey template */
18
- declare function isLearningTemplate(templateId: string): templateId is LearningTemplateId;
19
- /** Get all learning template IDs */
20
- declare function getLearningTemplateIds(): LearningTemplateId[];
21
- //#endregion
22
- export { LearningMiniApp, getLearningTemplateIds, isLearningTemplate };
@@ -1,2 +0,0 @@
1
- import { LearningMiniApp, getLearningTemplateIds, isLearningTemplate } from "./LearningMiniApp.js";
2
- export { LearningMiniApp, getLearningTemplateIds, isLearningTemplate };