@contractspec/example.learning-journey-platform-tour 3.7.17 → 3.7.19

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 (33) hide show
  1. package/.turbo/turbo-build.log +33 -33
  2. package/CHANGELOG.md +20 -0
  3. package/dist/browser/docs/index.js +1 -37
  4. package/dist/browser/docs/platform-tour.docblock.js +1 -37
  5. package/dist/browser/example.js +1 -34
  6. package/dist/browser/handlers/demo.handlers.js +1 -130
  7. package/dist/browser/index.js +1 -416
  8. package/dist/browser/learning-journey-platform-tour.feature.js +1 -48
  9. package/dist/browser/operations/index.js +1 -221
  10. package/dist/browser/presentations/index.js +1 -268
  11. package/dist/browser/tests/operations.test-spec.js +1 -34
  12. package/dist/browser/track.js +1 -107
  13. package/dist/docs/index.js +1 -37
  14. package/dist/docs/platform-tour.docblock.js +1 -37
  15. package/dist/example.js +1 -34
  16. package/dist/handlers/demo.handlers.js +1 -130
  17. package/dist/index.js +1 -416
  18. package/dist/learning-journey-platform-tour.feature.js +1 -48
  19. package/dist/node/docs/index.js +1 -37
  20. package/dist/node/docs/platform-tour.docblock.js +1 -37
  21. package/dist/node/example.js +1 -34
  22. package/dist/node/handlers/demo.handlers.js +1 -130
  23. package/dist/node/index.js +1 -416
  24. package/dist/node/learning-journey-platform-tour.feature.js +1 -48
  25. package/dist/node/operations/index.js +1 -221
  26. package/dist/node/presentations/index.js +1 -268
  27. package/dist/node/tests/operations.test-spec.js +1 -34
  28. package/dist/node/track.js +1 -107
  29. package/dist/operations/index.js +1 -221
  30. package/dist/presentations/index.js +1 -268
  31. package/dist/tests/operations.test-spec.js +1 -34
  32. package/dist/track.js +1 -107
  33. package/package.json +6 -6
@@ -1,38 +1,2 @@
1
1
  // @bun
2
- // src/docs/platform-tour.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var platformTourDocBlocks = [
5
- {
6
- id: "docs.learning-journey.platform-tour",
7
- title: "Learning Journey \u2014 Platform Primitives Tour",
8
- summary: "Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/learning-journey/platform-tour",
12
- tags: ["learning", "platform", "onboarding"],
13
- body: `## Track
14
- - **Key**: \`platform_primitives_tour\`
15
- - **Persona**: platform developer exploring primitives
16
- - **Goal**: Touch each cross-cutting module once, event-driven completion
17
-
18
- ## Steps & Events
19
- 1) \`identity_rbac\` \u2192 \`org.member.added\`
20
- 2) \`event_bus_audit\` \u2192 \`audit_log.created\`
21
- 3) \`notifications\` \u2192 \`notification.sent\`
22
- 4) \`jobs_scheduler\` \u2192 \`job.completed\`
23
- 5) \`feature_flags\` \u2192 \`flag.toggled\`
24
- 6) \`files_attachments\` \u2192 \`attachment.attached\`
25
- 7) \`usage_metering\` \u2192 \`usage.recorded\`
26
-
27
- XP: 20 per step, 20 bonus XP upon completion.
28
-
29
- ## Wiring
30
- - Tracks export from \`@contractspec/example.learning-journey-platform-tour/track\`.
31
- - Use onboarding API to surface progress:
32
- - \`learning.onboarding.listTracks\`
33
- - \`learning.onboarding.getProgress\`
34
- - \`learning.onboarding.recordEvent\` wired from each module's event bus handlers.
35
- - Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering.`
36
- }
37
- ];
38
- registerDocBlocks(platformTourDocBlocks);
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 onboarding API to surface progress:\n - `learning.onboarding.listTracks`\n - `learning.onboarding.getProgress`\n - `learning.onboarding.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,38 +1,2 @@
1
1
  // @bun
2
- // src/docs/platform-tour.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var platformTourDocBlocks = [
5
- {
6
- id: "docs.learning-journey.platform-tour",
7
- title: "Learning Journey \u2014 Platform Primitives Tour",
8
- summary: "Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/learning-journey/platform-tour",
12
- tags: ["learning", "platform", "onboarding"],
13
- body: `## Track
14
- - **Key**: \`platform_primitives_tour\`
15
- - **Persona**: platform developer exploring primitives
16
- - **Goal**: Touch each cross-cutting module once, event-driven completion
17
-
18
- ## Steps & Events
19
- 1) \`identity_rbac\` \u2192 \`org.member.added\`
20
- 2) \`event_bus_audit\` \u2192 \`audit_log.created\`
21
- 3) \`notifications\` \u2192 \`notification.sent\`
22
- 4) \`jobs_scheduler\` \u2192 \`job.completed\`
23
- 5) \`feature_flags\` \u2192 \`flag.toggled\`
24
- 6) \`files_attachments\` \u2192 \`attachment.attached\`
25
- 7) \`usage_metering\` \u2192 \`usage.recorded\`
26
-
27
- XP: 20 per step, 20 bonus XP upon completion.
28
-
29
- ## Wiring
30
- - Tracks export from \`@contractspec/example.learning-journey-platform-tour/track\`.
31
- - Use onboarding API to surface progress:
32
- - \`learning.onboarding.listTracks\`
33
- - \`learning.onboarding.getProgress\`
34
- - \`learning.onboarding.recordEvent\` wired from each module's event bus handlers.
35
- - Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering.`
36
- }
37
- ];
38
- registerDocBlocks(platformTourDocBlocks);
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 onboarding API to surface progress:\n - `learning.onboarding.listTracks`\n - `learning.onboarding.getProgress`\n - `learning.onboarding.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.js CHANGED
@@ -1,35 +1,2 @@
1
1
  // @bun
2
- // src/example.ts
3
- import { defineExample } from "@contractspec/lib.contracts-spec";
4
- var example = defineExample({
5
- meta: {
6
- key: "learning-journey-platform-tour",
7
- version: "1.0.0",
8
- title: "Learning Journey \u2014 Platform Tour",
9
- description: "Learning journey track + contracts + presentations for a platform tour.",
10
- kind: "template",
11
- visibility: "public",
12
- stability: "experimental",
13
- owners: ["@platform.core"],
14
- tags: ["learning", "journey", "platform-tour"]
15
- },
16
- docs: {
17
- rootDocId: "docs.examples.platform-tour",
18
- goalDocId: "docs.examples.platform-tour.goal",
19
- usageDocId: "docs.examples.platform-tour.usage"
20
- },
21
- entrypoints: {
22
- packageName: "@contractspec/example.learning-journey-platform-tour",
23
- docs: "./docs"
24
- },
25
- surfaces: {
26
- templates: true,
27
- sandbox: { enabled: true, modes: ["markdown", "playground"] },
28
- studio: { enabled: true, installable: true },
29
- mcp: { enabled: true }
30
- }
31
- });
32
- var example_default = example;
33
- export {
34
- example_default as default
35
- };
2
+ import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"learning-journey-platform-tour",version:"1.0.0",title:"Learning Journey \u2014 Platform Tour",description:"Learning journey track + contracts + presentations for a platform tour.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","journey","platform-tour"]},docs:{rootDocId:"docs.examples.platform-tour",goalDocId:"docs.examples.platform-tour.goal",usageDocId:"docs.examples.platform-tour.usage"},entrypoints:{packageName:"@contractspec/example.learning-journey-platform-tour",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown","playground"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
@@ -1,131 +1,2 @@
1
1
  // @bun
2
- // src/track.ts
3
- var platformPrimitivesTourTrack = {
4
- id: "platform_primitives_tour",
5
- productId: "contractspec-platform",
6
- name: "Platform Primitives Tour",
7
- description: "Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.",
8
- targetUserSegment: "platform_developer",
9
- targetRole: "developer",
10
- totalXp: 140,
11
- completionRewards: { xpBonus: 20, badgeKey: "platform_primitives" },
12
- steps: [
13
- {
14
- id: "identity_rbac",
15
- title: "Create org and member",
16
- description: "Create an org and add at least one member.",
17
- order: 1,
18
- completion: {
19
- eventName: "org.member.added",
20
- sourceModule: "@contractspec/lib.identity-rbac"
21
- },
22
- xpReward: 20,
23
- metadata: { surface: "identity" }
24
- },
25
- {
26
- id: "event_bus_audit",
27
- title: "Emit an auditable event",
28
- description: "Emit an event that lands in the audit log.",
29
- order: 2,
30
- completion: {
31
- eventName: "audit_log.created",
32
- sourceModule: "@contractspec/module.audit-trail"
33
- },
34
- xpReward: 20,
35
- metadata: { surface: "bus+audit" }
36
- },
37
- {
38
- id: "notifications",
39
- title: "Send a notification",
40
- description: "Send yourself a notification and verify delivery.",
41
- order: 3,
42
- completion: {
43
- eventName: "notification.sent",
44
- sourceModule: "@contractspec/module.notifications"
45
- },
46
- xpReward: 20,
47
- metadata: { surface: "notifications" }
48
- },
49
- {
50
- id: "jobs_scheduler",
51
- title: "Schedule and run a job",
52
- description: "Schedule a background job and let it run once.",
53
- order: 4,
54
- completion: {
55
- eventName: "job.completed",
56
- sourceModule: "@contractspec/lib.jobs"
57
- },
58
- xpReward: 20,
59
- metadata: { surface: "jobs" }
60
- },
61
- {
62
- id: "feature_flags",
63
- title: "Create and toggle a feature flag",
64
- description: "Create a feature flag and toggle it at least once.",
65
- order: 5,
66
- completion: {
67
- eventName: "flag.toggled",
68
- sourceModule: "@contractspec/lib.feature-flags"
69
- },
70
- xpReward: 20,
71
- metadata: { surface: "feature-flags" }
72
- },
73
- {
74
- id: "files_attachments",
75
- title: "Attach a file",
76
- description: "Upload and attach a file to any entity.",
77
- order: 6,
78
- completion: {
79
- eventName: "attachment.attached",
80
- sourceModule: "@contractspec/lib.files"
81
- },
82
- xpReward: 20,
83
- metadata: { surface: "files" }
84
- },
85
- {
86
- id: "usage_metering",
87
- title: "Record usage",
88
- description: "Emit a usage metric (regeneration, agent run, or similar).",
89
- order: 7,
90
- completion: {
91
- eventName: "usage.recorded",
92
- sourceModule: "@contractspec/lib.metering"
93
- },
94
- xpReward: 20,
95
- metadata: { surface: "metering" }
96
- }
97
- ],
98
- metadata: {
99
- surfacedIn: ["studio/learning", "platform/dev-center"]
100
- }
101
- };
102
- var platformLearningTracks = [
103
- platformPrimitivesTourTrack
104
- ];
105
-
106
- // src/handlers/demo.handlers.ts
107
- var platformTourEvents = [
108
- "org.member.added",
109
- "audit_log.created",
110
- "notification.sent",
111
- "job.completed",
112
- "flag.toggled",
113
- "attachment.attached",
114
- "usage.recorded"
115
- ];
116
- var emitPlatformTourEvent = (eventName, { learnerId, occurredAt = new Date, payload }, record) => {
117
- const event = {
118
- learnerId,
119
- name: eventName,
120
- occurredAt,
121
- payload,
122
- trackId: platformPrimitivesTourTrack.id
123
- };
124
- return record ? record(event) : event;
125
- };
126
- var emitAllPlatformTourEvents = (params, record) => platformTourEvents.map((name) => emitPlatformTourEvent(name, params, record));
127
- export {
128
- platformTourEvents,
129
- emitPlatformTourEvent,
130
- emitAllPlatformTourEvents
131
- };
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:{xpBonus: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,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,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,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,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,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,completion:{eventName:"usage.recorded",sourceModule:"@contractspec/lib.metering"},xpReward:20,metadata:{surface:"metering"}}],metadata:{surfacedIn:["studio/learning","platform/dev-center"]}},s=[r];var c=["org.member.added","audit_log.created","notification.sent","job.completed","flag.toggled","attachment.attached","usage.recorded"],d=(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},u=(e,t)=>c.map((a)=>d(a,e,t));export{c as platformTourEvents,d as emitPlatformTourEvent,u as emitAllPlatformTourEvents};