@contractspec/example.learning-journey-platform-tour 3.7.19 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +47 -46
- package/CHANGELOG.md +31 -0
- package/dist/browser/docs/index.js +1 -1
- package/dist/browser/docs/platform-tour.docblock.js +1 -1
- package/dist/browser/example.js +1 -1
- package/dist/browser/handlers/demo.handlers.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/learning-journey-platform-tour.feature.js +1 -1
- package/dist/browser/operations/index.js +1 -1
- package/dist/browser/presentations/index.js +1 -1
- package/dist/browser/track.js +1 -1
- package/dist/docs/index.js +1 -1
- package/dist/docs/platform-tour.docblock.js +1 -1
- package/dist/example.d.ts +3 -2
- package/dist/example.js +1 -1
- package/dist/handlers/demo.handlers.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/learning-journey-platform-tour.feature.js +1 -1
- package/dist/node/docs/index.js +1 -1
- package/dist/node/docs/platform-tour.docblock.js +1 -1
- package/dist/node/example.js +1 -1
- package/dist/node/handlers/demo.handlers.js +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/learning-journey-platform-tour.feature.js +1 -1
- package/dist/node/operations/index.js +1 -1
- package/dist/node/presentations/index.js +1 -1
- package/dist/node/track.js +1 -1
- package/dist/operations/index.d.ts +443 -38
- package/dist/operations/index.js +1 -1
- package/dist/presentations/index.js +1 -1
- package/dist/track.d.ts +3 -3
- package/dist/track.js +1 -1
- package/package.json +4 -4
- package/src/docs/platform-tour.docblock.ts +4 -4
- package/src/example.ts +15 -20
- package/src/index.ts +1 -0
- package/src/learning-journey-platform-tour.feature.ts +1 -1
- package/src/operations/index.ts +3 -43
- package/src/presentations/index.ts +2 -2
- package/src/track.ts +10 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build prebuild[0m
|
|
3
|
+
[0m[2m[35m$[0m [2m[1mbun run build:bundle && bun run build:types[0m
|
|
4
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build transpile[0m
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=10 noBundle=false
|
|
6
|
+
[32mBundled 10 modules in 29ms[0m
|
|
7
|
+
|
|
8
|
+
[34mdocs/index.js[0m 1.43 KB [2m(entry point)[0m
|
|
9
|
+
[34mtests/operations.test-spec.js[0m 0.66 KB [2m(entry point)[0m
|
|
10
|
+
[34m./index.js[0m 9.17 KB [2m(entry point)[0m
|
|
11
|
+
[34mdocs/platform-tour.docblock.js[0m 1.43 KB [2m(entry point)[0m
|
|
12
|
+
[34m./example.js[0m 0.72 KB [2m(entry point)[0m
|
|
13
|
+
[34mhandlers/demo.handlers.js[0m 2.95 KB [2m(entry point)[0m
|
|
14
|
+
[34m./learning-journey-platform-tour.feature.js[0m 1.21 KB [2m(entry point)[0m
|
|
15
|
+
[34mpresentations/index.js[0m 5.29 KB [2m(entry point)[0m
|
|
16
|
+
[34moperations/index.js[0m 4.44 KB [2m(entry point)[0m
|
|
17
|
+
[34m./track.js[0m 2.62 KB [2m(entry point)[0m
|
|
18
|
+
|
|
19
|
+
[contractspec-bun-build] transpile target=node root=src entries=10 noBundle=false
|
|
20
|
+
[32mBundled 10 modules in 19ms[0m
|
|
21
|
+
|
|
22
|
+
[34mdocs/index.js[0m 1.40 KB [2m(entry point)[0m
|
|
23
|
+
[34mtests/operations.test-spec.js[0m 0.66 KB [2m(entry point)[0m
|
|
24
|
+
[34m./index.js[0m 9.13 KB [2m(entry point)[0m
|
|
25
|
+
[34mdocs/platform-tour.docblock.js[0m 1.40 KB [2m(entry point)[0m
|
|
26
|
+
[34m./example.js[0m 0.71 KB [2m(entry point)[0m
|
|
27
|
+
[34mhandlers/demo.handlers.js[0m 2.94 KB [2m(entry point)[0m
|
|
28
|
+
[34m./learning-journey-platform-tour.feature.js[0m 1.20 KB [2m(entry point)[0m
|
|
29
|
+
[34mpresentations/index.js[0m 5.28 KB [2m(entry point)[0m
|
|
30
|
+
[34moperations/index.js[0m 4.43 KB [2m(entry point)[0m
|
|
31
|
+
[34m./track.js[0m 2.62 KB [2m(entry point)[0m
|
|
32
|
+
|
|
33
|
+
[contractspec-bun-build] transpile target=browser root=src entries=10 noBundle=false
|
|
34
|
+
[32mBundled 10 modules in 15ms[0m
|
|
35
|
+
|
|
36
|
+
[34mdocs/index.js[0m 1.40 KB [2m(entry point)[0m
|
|
37
|
+
[34mtests/operations.test-spec.js[0m 0.66 KB [2m(entry point)[0m
|
|
38
|
+
[34m./index.js[0m 9.13 KB [2m(entry point)[0m
|
|
39
|
+
[34mdocs/platform-tour.docblock.js[0m 1.40 KB [2m(entry point)[0m
|
|
40
|
+
[34m./example.js[0m 0.71 KB [2m(entry point)[0m
|
|
41
|
+
[34mhandlers/demo.handlers.js[0m 2.94 KB [2m(entry point)[0m
|
|
42
|
+
[34m./learning-journey-platform-tour.feature.js[0m 1.20 KB [2m(entry point)[0m
|
|
43
|
+
[34mpresentations/index.js[0m 5.28 KB [2m(entry point)[0m
|
|
44
|
+
[34moperations/index.js[0m 4.43 KB [2m(entry point)[0m
|
|
45
|
+
[34m./track.js[0m 2.62 KB [2m(entry point)[0m
|
|
46
|
+
|
|
47
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build types[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @contractspec/example.learning-journey-platform-tour
|
|
2
2
|
|
|
3
|
+
## 4.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: auto-bump internal dependents
|
|
8
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
9
|
+
- Updated dependencies because of Add FormSpec layout hints, semantic field rendering, and portable text/textarea input-group addons.
|
|
10
|
+
- Updated dependencies because of Add ThemeSpec light/dark modes and a design-system Tailwind bridge for CSS variables, presets, CSS text, and OKLCH color pass-through.
|
|
11
|
+
- Updated dependencies because of Add a canonical typed result system for ContractSpec success and failure propagation across operations, workflows, jobs, server adapters, MCP, GraphQL, and React clients.
|
|
12
|
+
- @contractspec/module.learning-journey@4.0.1
|
|
13
|
+
- @contractspec/lib.contracts-spec@5.5.0
|
|
14
|
+
- @contractspec/lib.schema@3.7.14
|
|
15
|
+
|
|
16
|
+
## 4.0.0
|
|
17
|
+
|
|
18
|
+
### Major Changes
|
|
19
|
+
|
|
20
|
+
- Redesign the learning system around the adaptive journey runtime and repair shared learning sandbox presentation wiring.
|
|
21
|
+
- Packages: @contractspec/module.learning-journey (major), @contractspec/module.examples (patch), @contractspec/example.learning-journey-ambient-coach (major), @contractspec/example.learning-journey-crm-onboarding (major), @contractspec/example.learning-journey-duo-drills (major), @contractspec/example.learning-journey-platform-tour (major), @contractspec/example.learning-journey-quest-challenges (major), @contractspec/example.learning-journey-registry (major), @contractspec/example.learning-journey-studio-onboarding (major), @contractspec/example.learning-journey-ui-coaching (major), @contractspec/example.learning-journey-ui-gamified (major), @contractspec/example.learning-journey-ui-onboarding (major), @contractspec/example.learning-journey-ui-shared (major), @contractspec/example.learning-patterns (major)
|
|
22
|
+
- Migration: Replace the old onboarding-centric learning contracts and local example progress logic with the canonical adaptive `learning.journey.*` runtime.; Use the shared learning registry mapping/data helpers so supported learning sandbox templates resolve the shared presentation set consistently.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies because of Add a family-aware ContractSpec Adoption Engine, expand contract authoring targets across CLI and VS Code tooling, and refresh release-facing schema and policy artifacts for downstream workspaces.
|
|
27
|
+
- Updated dependencies because of Improve app-config, theme, and feature authoring with explicit validation APIs, first-class theme discovery and scaffolding, and key-based app-config generation across contracts, workspace tooling, and the CLI.
|
|
28
|
+
- Updated dependencies because of Refresh root, package, website, and LLM-facing docs so Connect, Builder, release capsules, and the current contracts-spec export surface stay aligned.
|
|
29
|
+
- Updated dependencies because of Persist canonical knowledge payload text during indexing and align the retrieval/query docs with the corrected behavior.
|
|
30
|
+
- Updated dependencies because of Redesign the learning system around the adaptive journey runtime and repair shared learning sandbox presentation wiring.
|
|
31
|
+
- @contractspec/lib.contracts-spec@5.4.0
|
|
32
|
+
- @contractspec/module.learning-journey@4.0.0
|
|
33
|
+
|
|
3
34
|
## 3.7.19
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use
|
|
1
|
+
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];h(j);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use
|
|
1
|
+
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];h(j);
|
package/dist/browser/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey Platform Tour",description:"Learning journey track covering ContractSpec platform primitives.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-platform-tour"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-platform-tour"}}),j=c;export{j as default,c as ExamplesLearningJourneyPlatformTourExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var r={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{
|
|
1
|
+
var r={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},s=[r];var d=["org.member.added","audit_log.created","notification.sent","job.completed","flag.toggled","attachment.attached","usage.recorded"],c=(e,{learnerId:t,occurredAt:a=new Date,payload:i},o)=>{let n={learnerId:t,name:e,occurredAt:a,payload:i,trackId:r.id};return o?o(n):n},m=(e,t)=>d.map((a)=>c(a,e,t));export{d as platformTourEvents,c as emitPlatformTourEvent,m as emitAllPlatformTourEvents};
|
package/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDocBlocks as
|
|
1
|
+
import{registerDocBlocks as u}from"@contractspec/lib.contracts-spec/docs";var g=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];u(g);import{defineExample as f}from"@contractspec/lib.contracts-spec/examples";var v=f({meta:{key:"examples.learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey Platform Tour",description:"Learning journey track covering ContractSpec platform primitives.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-platform-tour"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-platform-tour"}}),_=v;var e={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},K=[e];var b=["org.member.added","audit_log.created","notification.sent","job.completed","flag.toggled","attachment.attached","usage.recorded"],w=(i,{learnerId:r,occurredAt:d=new Date,payload:m},n)=>{let s={learnerId:r,name:i,occurredAt:d,payload:m,trackId:e.id};return n?n(s):s},D=(i,r)=>b.map((d)=>w(d,i,r));import{defineFeature as I}from"@contractspec/lib.contracts-spec/features";var Z=I({meta:{key:"learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey: Platform Tour",description:"Platform primitives tour journey for exploring ContractSpec core features",domain:"learning-journey",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour","journey"],stability:"experimental"},operations:[{key:"learningJourney.platformTour.recordEvent",version:"1.0.0"},{key:"learningJourney.platformTour.getTrack",version:"1.0.0"}],events:[],presentations:[{key:"learning.journey.platform.track",version:"1.0.0"},{key:"learning.journey.platform.widget",version:"1.0.0"}],opToPresentation:[{op:{key:"learningJourney.platformTour.getTrack",version:"1.0.0"},pres:{key:"learning.journey.platform.track",version:"1.0.0"}}],presentationsTargets:[{key:"learning.journey.platform.track",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"learning.journey.platform.widget",version:"1.0.0",targets:["react"]}],capabilities:{requires:[{key:"identity",version:"1.0.0"}]},docs:["docs.learning-journey.platform-tour"]});import{defineCommand as h,defineQuery as x}from"@contractspec/lib.contracts-spec";import{defineSchemaModel as a,ScalarTypeEnum as t}from"@contractspec/lib.schema";import{JourneyTrackModel as R}from"@contractspec/module.learning-journey/contracts/journey";var c=["examples.learning-journey.platform-tour"],o=R,y=a({name:"PlatformTourTrackResponse",description:"Response wrapper for platform tour track",fields:{track:{type:o,isOptional:!1}}}),k=a({name:"PlatformTourRecordEventInput",description:"Emit a demo event to advance platform tour steps",fields:{learnerId:{type:t.String_unsecure(),isOptional:!1},eventName:{type:t.String_unsecure(),isOptional:!1},payload:{type:t.JSON(),isOptional:!0},occurredAt:{type:t.DateTime(),isOptional:!0}}}),j=a({name:"PlatformTourSuccess",description:"Generic success response",fields:{success:{type:t.Boolean(),isOptional:!1}}}),q=x({meta:{key:"learningJourney.platformTour.getTrack",version:"1.0.0",stability:"experimental",owners:[...c],tags:["learning","platform","tour"],description:"Fetch platform primitives tour track definition.",goal:"Expose track metadata to UIs and templates.",context:"Called by Studio/Playground to render journey steps."},io:{input:a({name:"PlatformTourTrackInput",description:"Track input",fields:{}}),output:y},policy:{auth:"user"}}),N=h({meta:{key:"learningJourney.platformTour.recordEvent",version:"1.0.0",stability:"experimental",owners:[...c],tags:["learning","platform","tour"],description:"Record an event to advance platform tour progress.",goal:"Advance steps via domain events in demo/sandbox contexts.",context:"Called by handlers or demo scripts to emit step completion events."},io:{input:k,output:j},policy:{auth:"user"}}),O={GetPlatformTourTrack:q,RecordPlatformTourEvent:N,track:e};import{definePresentation as p,StabilityEnum as A}from"@contractspec/lib.contracts-spec";var l={domain:"learning-journey",title:"Platform Tour",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour"],stability:A.Experimental,goal:"Visualize platform tour progress",context:"Used in platform tour dashboard and widgets"},E=p({meta:{key:"learning.journey.platform.track",version:"1.0.0",description:"Platform primitives tour track detail",...l},source:{type:"component",framework:"react",componentKey:"LearningTrackDetail",props:o},targets:["react","markdown","application/json"]}),C=p({meta:{key:"learning.journey.platform.widget",version:"1.0.0",description:"Compact widget for platform tour progress",...l},source:{type:"component",framework:"react",componentKey:"LearningTrackProgressWidget"},targets:["react"]}),S=[E,C];export{S as platformTourPresentations,b as platformTourEvents,O as platformTourContracts,e as platformPrimitivesTourTrack,K as platformLearningTracks,_ as example,w as emitPlatformTourEvent,D as emitAllPlatformTourEvents,N as RecordPlatformTourEvent,C as PlatformTourWidgetPresentation,E as PlatformTourTrackPresentation,o as PlatformJourneyTrackModel,Z as LearningJourneyPlatformTourFeature,q as GetPlatformTourTrack,v as ExamplesLearningJourneyPlatformTourExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey: Platform Tour",description:"Platform primitives tour journey for exploring ContractSpec core features",domain:"learning-journey",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour","journey"],stability:"experimental"},operations:[{key:"learningJourney.platformTour.recordEvent",version:"1.0.0"},{key:"learningJourney.platformTour.getTrack",version:"1.0.0"}],events:[],presentations:[{key:"learning.journey.platform.track",version:"1.0.0"},{key:"learning.journey.platform.widget",version:"1.0.0"}],opToPresentation:[{op:{key:"learningJourney.platformTour.getTrack",version:"1.0.0"},pres:{key:"learning.journey.platform.track",version:"1.0.0"}}],presentationsTargets:[{key:"learning.journey.platform.track",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"learning.journey.platform.widget",version:"1.0.0",targets:["react"]}],capabilities:{requires:[{key:"identity",version:"1.0.0"}]},docs:["docs.learning-journey.platform-tour"]});export{j as LearningJourneyPlatformTourFeature};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey: Platform Tour",description:"Platform primitives tour journey for exploring ContractSpec core features",domain:"learning-journey",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour","journey"],stability:"experimental"},operations:[{key:"learningJourney.platformTour.recordEvent",version:"1.0.0"},{key:"learningJourney.platformTour.getTrack",version:"1.0.0"}],events:[],presentations:[{key:"learning.journey.platform.track",version:"1.0.0"},{key:"learning.journey.platform.widget",version:"1.0.0"}],opToPresentation:[{op:{key:"learningJourney.platformTour.getTrack",version:"1.0.0"},pres:{key:"learning.journey.platform.track",version:"1.0.0"}}],presentationsTargets:[{key:"learning.journey.platform.track",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"learning.journey.platform.widget",version:"1.0.0",targets:["react"]}],capabilities:{requires:[{key:"identity",version:"1.0.0"}]},docs:["docs.learning-journey.platform-tour"]});export{j as LearningJourneyPlatformTourFeature};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},m=[a];import{defineCommand as r,defineQuery as o}from"@contractspec/lib.contracts-spec";import{defineSchemaModel as t,ScalarTypeEnum as e}from"@contractspec/lib.schema";import{JourneyTrackModel as d}from"@contractspec/module.learning-journey/contracts/journey";var i=["examples.learning-journey.platform-tour"],s=d,n=t({name:"PlatformTourTrackResponse",description:"Response wrapper for platform tour track",fields:{track:{type:s,isOptional:!1}}}),c=t({name:"PlatformTourRecordEventInput",description:"Emit a demo event to advance platform tour steps",fields:{learnerId:{type:e.String_unsecure(),isOptional:!1},eventName:{type:e.String_unsecure(),isOptional:!1},payload:{type:e.JSON(),isOptional:!0},occurredAt:{type:e.DateTime(),isOptional:!0}}}),p=t({name:"PlatformTourSuccess",description:"Generic success response",fields:{success:{type:e.Boolean(),isOptional:!1}}}),l=o({meta:{key:"learningJourney.platformTour.getTrack",version:"1.0.0",stability:"experimental",owners:[...i],tags:["learning","platform","tour"],description:"Fetch platform primitives tour track definition.",goal:"Expose track metadata to UIs and templates.",context:"Called by Studio/Playground to render journey steps."},io:{input:t({name:"PlatformTourTrackInput",description:"Track input",fields:{}}),output:n},policy:{auth:"user"}}),u=r({meta:{key:"learningJourney.platformTour.recordEvent",version:"1.0.0",stability:"experimental",owners:[...i],tags:["learning","platform","tour"],description:"Record an event to advance platform tour progress.",goal:"Advance steps via domain events in demo/sandbox contexts.",context:"Called by handlers or demo scripts to emit step completion events."},io:{input:c,output:p},policy:{auth:"user"}}),x={GetPlatformTourTrack:l,RecordPlatformTourEvent:u,track:a};export{x as platformTourContracts,u as RecordPlatformTourEvent,s as PlatformJourneyTrackModel,l as GetPlatformTourTrack};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},v=[a];import{defineCommand as s,defineQuery as n}from"@contractspec/lib.contracts-spec";import{defineSchemaModel as t,ScalarTypeEnum as e}from"@contractspec/lib.schema";import{JourneyTrackModel as c}from"@contractspec/module.learning-journey/contracts/journey";var r=["examples.learning-journey.platform-tour"],i=c,p=t({name:"PlatformTourTrackResponse",description:"Response wrapper for platform tour track",fields:{track:{type:i,isOptional:!1}}}),l=t({name:"PlatformTourRecordEventInput",description:"Emit a demo event to advance platform tour steps",fields:{learnerId:{type:e.String_unsecure(),isOptional:!1},eventName:{type:e.String_unsecure(),isOptional:!1},payload:{type:e.JSON(),isOptional:!0},occurredAt:{type:e.DateTime(),isOptional:!0}}}),u=t({name:"PlatformTourSuccess",description:"Generic success response",fields:{success:{type:e.Boolean(),isOptional:!1}}}),m=n({meta:{key:"learningJourney.platformTour.getTrack",version:"1.0.0",stability:"experimental",owners:[...r],tags:["learning","platform","tour"],description:"Fetch platform primitives tour track definition.",goal:"Expose track metadata to UIs and templates.",context:"Called by Studio/Playground to render journey steps."},io:{input:t({name:"PlatformTourTrackInput",description:"Track input",fields:{}}),output:p},policy:{auth:"user"}}),g=s({meta:{key:"learningJourney.platformTour.recordEvent",version:"1.0.0",stability:"experimental",owners:[...r],tags:["learning","platform","tour"],description:"Record an event to advance platform tour progress.",goal:"Advance steps via domain events in demo/sandbox contexts.",context:"Called by handlers or demo scripts to emit step completion events."},io:{input:l,output:u},policy:{auth:"user"}}),q={GetPlatformTourTrack:m,RecordPlatformTourEvent:g,track:a};import{definePresentation as d,StabilityEnum as f}from"@contractspec/lib.contracts-spec";var o={domain:"learning-journey",title:"Platform Tour",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour"],stability:f.Experimental,goal:"Visualize platform tour progress",context:"Used in platform tour dashboard and widgets"},_=d({meta:{key:"learning.journey.platform.track",version:"1.0.0",description:"Platform primitives tour track detail",...o},source:{type:"component",framework:"react",componentKey:"LearningTrackDetail",props:i},targets:["react","markdown","application/json"]}),b=d({meta:{key:"learning.journey.platform.widget",version:"1.0.0",description:"Compact widget for platform tour progress",...o},source:{type:"component",framework:"react",componentKey:"LearningTrackProgressWidget"},targets:["react"]}),y=[_,b];export{y as platformTourPresentations,b as PlatformTourWidgetPresentation,_ as PlatformTourTrackPresentation};
|
package/dist/browser/track.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{
|
|
1
|
+
var e={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},t=[e];export{e as platformPrimitivesTourTrack,t as platformLearningTracks};
|
package/dist/docs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey \u2014 Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` \u2192 `org.member.added`\n2) `event_bus_audit` \u2192 `audit_log.created`\n3) `notifications` \u2192 `notification.sent`\n4) `jobs_scheduler` \u2192 `job.completed`\n5) `feature_flags` \u2192 `flag.toggled`\n6) `files_attachments` \u2192 `attachment.attached`\n7) `usage_metering` \u2192 `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use
|
|
2
|
+
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey \u2014 Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` \u2192 `org.member.added`\n2) `event_bus_audit` \u2192 `audit_log.created`\n3) `notifications` \u2192 `notification.sent`\n4) `jobs_scheduler` \u2192 `job.completed`\n5) `feature_flags` \u2192 `flag.toggled`\n6) `files_attachments` \u2192 `attachment.attached`\n7) `usage_metering` \u2192 `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];h(j);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey \u2014 Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` \u2192 `org.member.added`\n2) `event_bus_audit` \u2192 `audit_log.created`\n3) `notifications` \u2192 `notification.sent`\n4) `jobs_scheduler` \u2192 `job.completed`\n5) `feature_flags` \u2192 `flag.toggled`\n6) `files_attachments` \u2192 `attachment.attached`\n7) `usage_metering` \u2192 `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use
|
|
2
|
+
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey \u2014 Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` \u2192 `org.member.added`\n2) `event_bus_audit` \u2192 `audit_log.created`\n3) `notifications` \u2192 `notification.sent`\n4) `jobs_scheduler` \u2192 `job.completed`\n5) `feature_flags` \u2192 `flag.toggled`\n6) `files_attachments` \u2192 `attachment.attached`\n7) `usage_metering` \u2192 `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];h(j);
|
package/dist/example.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const ExamplesLearningJourneyPlatformTourExample: import("@contractspec/lib.contracts-spec").ExampleSpec;
|
|
2
|
+
export default ExamplesLearningJourneyPlatformTourExample;
|
|
3
|
+
export { ExamplesLearningJourneyPlatformTourExample };
|
package/dist/example.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineExample as
|
|
2
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey Platform Tour",description:"Learning journey track covering ContractSpec platform primitives.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-platform-tour"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-platform-tour"}}),j=c;export{j as default,c as ExamplesLearningJourneyPlatformTourExample};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var r={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{
|
|
2
|
+
var r={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},s=[r];var d=["org.member.added","audit_log.created","notification.sent","job.completed","flag.toggled","attachment.attached","usage.recorded"],c=(e,{learnerId:t,occurredAt:a=new Date,payload:i},o)=>{let n={learnerId:t,name:e,occurredAt:a,payload:i,trackId:r.id};return o?o(n):n},m=(e,t)=>d.map((a)=>c(a,e,t));export{d as platformTourEvents,c as emitPlatformTourEvent,m as emitAllPlatformTourEvents};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{registerDocBlocks as
|
|
2
|
+
import{registerDocBlocks as u}from"@contractspec/lib.contracts-spec/docs";var g=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey \u2014 Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` \u2192 `org.member.added`\n2) `event_bus_audit` \u2192 `audit_log.created`\n3) `notifications` \u2192 `notification.sent`\n4) `jobs_scheduler` \u2192 `job.completed`\n5) `feature_flags` \u2192 `flag.toggled`\n6) `files_attachments` \u2192 `attachment.attached`\n7) `usage_metering` \u2192 `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];u(g);import{defineExample as f}from"@contractspec/lib.contracts-spec/examples";var v=f({meta:{key:"examples.learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey Platform Tour",description:"Learning journey track covering ContractSpec platform primitives.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-platform-tour"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-platform-tour"}}),_=v;var e={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},K=[e];var b=["org.member.added","audit_log.created","notification.sent","job.completed","flag.toggled","attachment.attached","usage.recorded"],w=(i,{learnerId:r,occurredAt:d=new Date,payload:m},n)=>{let s={learnerId:r,name:i,occurredAt:d,payload:m,trackId:e.id};return n?n(s):s},D=(i,r)=>b.map((d)=>w(d,i,r));import{defineFeature as I}from"@contractspec/lib.contracts-spec/features";var Z=I({meta:{key:"learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey: Platform Tour",description:"Platform primitives tour journey for exploring ContractSpec core features",domain:"learning-journey",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour","journey"],stability:"experimental"},operations:[{key:"learningJourney.platformTour.recordEvent",version:"1.0.0"},{key:"learningJourney.platformTour.getTrack",version:"1.0.0"}],events:[],presentations:[{key:"learning.journey.platform.track",version:"1.0.0"},{key:"learning.journey.platform.widget",version:"1.0.0"}],opToPresentation:[{op:{key:"learningJourney.platformTour.getTrack",version:"1.0.0"},pres:{key:"learning.journey.platform.track",version:"1.0.0"}}],presentationsTargets:[{key:"learning.journey.platform.track",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"learning.journey.platform.widget",version:"1.0.0",targets:["react"]}],capabilities:{requires:[{key:"identity",version:"1.0.0"}]},docs:["docs.learning-journey.platform-tour"]});import{defineCommand as h,defineQuery as x}from"@contractspec/lib.contracts-spec";import{defineSchemaModel as a,ScalarTypeEnum as t}from"@contractspec/lib.schema";import{JourneyTrackModel as R}from"@contractspec/module.learning-journey/contracts/journey";var c=["examples.learning-journey.platform-tour"],o=R,y=a({name:"PlatformTourTrackResponse",description:"Response wrapper for platform tour track",fields:{track:{type:o,isOptional:!1}}}),k=a({name:"PlatformTourRecordEventInput",description:"Emit a demo event to advance platform tour steps",fields:{learnerId:{type:t.String_unsecure(),isOptional:!1},eventName:{type:t.String_unsecure(),isOptional:!1},payload:{type:t.JSON(),isOptional:!0},occurredAt:{type:t.DateTime(),isOptional:!0}}}),j=a({name:"PlatformTourSuccess",description:"Generic success response",fields:{success:{type:t.Boolean(),isOptional:!1}}}),q=x({meta:{key:"learningJourney.platformTour.getTrack",version:"1.0.0",stability:"experimental",owners:[...c],tags:["learning","platform","tour"],description:"Fetch platform primitives tour track definition.",goal:"Expose track metadata to UIs and templates.",context:"Called by Studio/Playground to render journey steps."},io:{input:a({name:"PlatformTourTrackInput",description:"Track input",fields:{}}),output:y},policy:{auth:"user"}}),N=h({meta:{key:"learningJourney.platformTour.recordEvent",version:"1.0.0",stability:"experimental",owners:[...c],tags:["learning","platform","tour"],description:"Record an event to advance platform tour progress.",goal:"Advance steps via domain events in demo/sandbox contexts.",context:"Called by handlers or demo scripts to emit step completion events."},io:{input:k,output:j},policy:{auth:"user"}}),O={GetPlatformTourTrack:q,RecordPlatformTourEvent:N,track:e};import{definePresentation as p,StabilityEnum as A}from"@contractspec/lib.contracts-spec";var l={domain:"learning-journey",title:"Platform Tour",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour"],stability:A.Experimental,goal:"Visualize platform tour progress",context:"Used in platform tour dashboard and widgets"},E=p({meta:{key:"learning.journey.platform.track",version:"1.0.0",description:"Platform primitives tour track detail",...l},source:{type:"component",framework:"react",componentKey:"LearningTrackDetail",props:o},targets:["react","markdown","application/json"]}),C=p({meta:{key:"learning.journey.platform.widget",version:"1.0.0",description:"Compact widget for platform tour progress",...l},source:{type:"component",framework:"react",componentKey:"LearningTrackProgressWidget"},targets:["react"]}),S=[E,C];export{S as platformTourPresentations,b as platformTourEvents,O as platformTourContracts,e as platformPrimitivesTourTrack,K as platformLearningTracks,_ as example,w as emitPlatformTourEvent,D as emitAllPlatformTourEvents,N as RecordPlatformTourEvent,C as PlatformTourWidgetPresentation,E as PlatformTourTrackPresentation,o as PlatformJourneyTrackModel,Z as LearningJourneyPlatformTourFeature,q as GetPlatformTourTrack,v as ExamplesLearningJourneyPlatformTourExample};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey: Platform Tour",description:"Platform primitives tour journey for exploring ContractSpec core features",domain:"learning-journey",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour","journey"],stability:"experimental"},operations:[{key:"learningJourney.platformTour.recordEvent",version:"1.0.0"},{key:"learningJourney.platformTour.getTrack",version:"1.0.0"}],events:[],presentations:[{key:"learning.journey.platform.track",version:"1.0.0"},{key:"learning.journey.platform.widget",version:"1.0.0"}],opToPresentation:[{op:{key:"learningJourney.platformTour.getTrack",version:"1.0.0"},pres:{key:"learning.journey.platform.track",version:"1.0.0"}}],presentationsTargets:[{key:"learning.journey.platform.track",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"learning.journey.platform.widget",version:"1.0.0",targets:["react"]}],capabilities:{requires:[{key:"identity",version:"1.0.0"}]},docs:["docs.learning-journey.platform-tour"]});export{j as LearningJourneyPlatformTourFeature};
|
|
2
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey: Platform Tour",description:"Platform primitives tour journey for exploring ContractSpec core features",domain:"learning-journey",owners:["@examples.learning-journey.platform-tour"],tags:["learning","platform","tour","journey"],stability:"experimental"},operations:[{key:"learningJourney.platformTour.recordEvent",version:"1.0.0"},{key:"learningJourney.platformTour.getTrack",version:"1.0.0"}],events:[],presentations:[{key:"learning.journey.platform.track",version:"1.0.0"},{key:"learning.journey.platform.widget",version:"1.0.0"}],opToPresentation:[{op:{key:"learningJourney.platformTour.getTrack",version:"1.0.0"},pres:{key:"learning.journey.platform.track",version:"1.0.0"}}],presentationsTargets:[{key:"learning.journey.platform.track",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"learning.journey.platform.widget",version:"1.0.0",targets:["react"]}],capabilities:{requires:[{key:"identity",version:"1.0.0"}]},docs:["docs.learning-journey.platform-tour"]});export{j as LearningJourneyPlatformTourFeature};
|
package/dist/node/docs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use
|
|
1
|
+
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];h(j);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use
|
|
1
|
+
import{registerDocBlocks as h}from"@contractspec/lib.contracts-spec/docs";var j=[{id:"docs.learning-journey.platform-tour",title:"Learning Journey — Platform Primitives Tour",summary:"Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",kind:"reference",visibility:"public",route:"/docs/learning-journey/platform-tour",tags:["learning","platform","onboarding"],body:"## Track\n- **Key**: `platform_primitives_tour`\n- **Persona**: platform developer exploring primitives\n- **Goal**: Touch each cross-cutting module once, event-driven completion\n\n## Steps & Events\n1) `identity_rbac` → `org.member.added`\n2) `event_bus_audit` → `audit_log.created`\n3) `notifications` → `notification.sent`\n4) `jobs_scheduler` → `job.completed`\n5) `feature_flags` → `flag.toggled`\n6) `files_attachments` → `attachment.attached`\n7) `usage_metering` → `usage.recorded`\n\nXP: 20 per step, 20 bonus XP upon completion.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-platform-tour/track`.\n- Use adaptive journey API to surface progress:\n - `learning.journey.listTracks`\n - `learning.journey.getProgress`\n - `learning.journey.recordEvent` wired from each module's event bus handlers.\n- Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering."}];h(j);
|
package/dist/node/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey Platform Tour",description:"Learning journey track covering ContractSpec platform primitives.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-platform-tour"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-platform-tour"}}),j=c;export{j as default,c as ExamplesLearningJourneyPlatformTourExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var r={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{
|
|
1
|
+
var r={id:"platform_primitives_tour",productId:"contractspec-platform",name:"Platform Primitives Tour",description:"Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",targetUserSegment:"platform_developer",targetRole:"developer",totalXp:140,completionRewards:{xp:20,badgeKey:"platform_primitives"},steps:[{id:"identity_rbac",title:"Create org and member",description:"Create an org and add at least one member.",order:1,completion:{eventName:"org.member.added",sourceModule:"@contractspec/lib.identity-rbac"},xpReward:20,metadata:{surface:"identity"}},{id:"event_bus_audit",title:"Emit an auditable event",description:"Emit an event that lands in the audit log.",order:2,prerequisites:[{kind:"step_completed",stepId:"identity_rbac"}],completion:{eventName:"audit_log.created",sourceModule:"@contractspec/module.audit-trail"},xpReward:20,metadata:{surface:"bus+audit"}},{id:"notifications",title:"Send a notification",description:"Send yourself a notification and verify delivery.",order:3,prerequisites:[{kind:"step_completed",stepId:"event_bus_audit"}],completion:{eventName:"notification.sent",sourceModule:"@contractspec/module.notifications"},xpReward:20,metadata:{surface:"notifications"}},{id:"jobs_scheduler",title:"Schedule and run a job",description:"Schedule a background job and let it run once.",order:4,prerequisites:[{kind:"step_completed",stepId:"notifications"}],completion:{eventName:"job.completed",sourceModule:"@contractspec/lib.jobs"},xpReward:20,metadata:{surface:"jobs"}},{id:"feature_flags",title:"Create and toggle a feature flag",description:"Create a feature flag and toggle it at least once.",order:5,prerequisites:[{kind:"step_completed",stepId:"jobs_scheduler"}],completion:{eventName:"flag.toggled",sourceModule:"@contractspec/lib.feature-flags"},xpReward:20,metadata:{surface:"feature-flags"}},{id:"files_attachments",title:"Attach a file",description:"Upload and attach a file to any entity.",order:6,prerequisites:[{kind:"step_completed",stepId:"feature_flags"}],completion:{eventName:"attachment.attached",sourceModule:"@contractspec/lib.files"},xpReward:20,metadata:{surface:"files"}},{id:"usage_metering",title:"Record usage",description:"Emit a usage metric (regeneration, agent run, or similar).",order:7,prerequisites:[{kind:"step_completed",stepId:"files_attachments"}],completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},s=[r];var d=["org.member.added","audit_log.created","notification.sent","job.completed","flag.toggled","attachment.attached","usage.recorded"],c=(e,{learnerId:t,occurredAt:a=new Date,payload:i},o)=>{let n={learnerId:t,name:e,occurredAt:a,payload:i,trackId:r.id};return o?o(n):n},m=(e,t)=>d.map((a)=>c(a,e,t));export{d as platformTourEvents,c as emitPlatformTourEvent,m as emitAllPlatformTourEvents};
|