@contractspec/example.learning-journey-platform-tour 3.7.6 → 3.7.10

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.
@@ -104,8 +104,8 @@ var platformLearningTracks = [
104
104
  ];
105
105
 
106
106
  // src/operations/index.ts
107
- import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
108
107
  import { defineCommand, defineQuery } from "@contractspec/lib.contracts-spec";
108
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
109
109
  var OWNERS = ["examples.learning-journey.platform-tour"];
110
110
  var StepModel = defineSchemaModel({
111
111
  name: "PlatformTourStep",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.learning-journey-platform-tour",
3
- "version": "3.7.6",
3
+ "version": "3.7.10",
4
4
  "description": "Learning journey track covering ContractSpec platform primitives.",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -85,20 +85,20 @@
85
85
  "dev": "contractspec-bun-build dev",
86
86
  "clean": "rimraf dist .turbo",
87
87
  "lint": "bun lint:fix",
88
- "lint:fix": "eslint src --fix",
89
- "lint:check": "eslint src",
88
+ "lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
89
+ "lint:check": "biome check .",
90
90
  "prebuild": "contractspec-bun-build prebuild",
91
91
  "typecheck": "tsc --noEmit"
92
92
  },
93
93
  "dependencies": {
94
- "@contractspec/lib.contracts-spec": "3.7.6",
95
- "@contractspec/lib.schema": "3.7.6",
96
- "@contractspec/module.learning-journey": "3.7.6"
94
+ "@contractspec/lib.contracts-spec": "4.1.2",
95
+ "@contractspec/lib.schema": "3.7.8",
96
+ "@contractspec/module.learning-journey": "3.7.10"
97
97
  },
98
98
  "devDependencies": {
99
- "@contractspec/tool.typescript": "3.7.6",
99
+ "@contractspec/tool.typescript": "3.7.8",
100
100
  "typescript": "^5.9.3",
101
- "@contractspec/tool.bun": "3.7.6"
101
+ "@contractspec/tool.bun": "3.7.8"
102
102
  },
103
103
  "publishConfig": {
104
104
  "exports": {
@@ -2,16 +2,16 @@ import type { DocBlock } from '@contractspec/lib.contracts-spec/docs';
2
2
  import { registerDocBlocks } from '@contractspec/lib.contracts-spec/docs';
3
3
 
4
4
  const platformTourDocBlocks: DocBlock[] = [
5
- {
6
- id: 'docs.learning-journey.platform-tour',
7
- title: 'Learning Journey — Platform Primitives Tour',
8
- summary:
9
- 'Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.',
10
- kind: 'reference',
11
- visibility: 'public',
12
- route: '/docs/learning-journey/platform-tour',
13
- tags: ['learning', 'platform', 'onboarding'],
14
- body: `## Track
5
+ {
6
+ id: 'docs.learning-journey.platform-tour',
7
+ title: 'Learning Journey — Platform Primitives Tour',
8
+ summary:
9
+ 'Cross-module tour that touches identity, audit, notifications, jobs, feature flags, files, and metering.',
10
+ kind: 'reference',
11
+ visibility: 'public',
12
+ route: '/docs/learning-journey/platform-tour',
13
+ tags: ['learning', 'platform', 'onboarding'],
14
+ body: `## Track
15
15
  - **Key**: \`platform_primitives_tour\`
16
16
  - **Persona**: platform developer exploring primitives
17
17
  - **Goal**: Touch each cross-cutting module once, event-driven completion
@@ -34,7 +34,7 @@ XP: 20 per step, 20 bonus XP upon completion.
34
34
  - \`learning.onboarding.getProgress\`
35
35
  - \`learning.onboarding.recordEvent\` wired from each module's event bus handlers.
36
36
  - Align event payloads with modules: identity-rbac, audit-trail, notifications, jobs, feature-flags, files, metering.`,
37
- },
37
+ },
38
38
  ];
39
39
 
40
40
  registerDocBlocks(platformTourDocBlocks);
package/src/example.ts CHANGED
@@ -1,33 +1,33 @@
1
1
  import { defineExample } from '@contractspec/lib.contracts-spec';
2
2
 
3
3
  const example = defineExample({
4
- meta: {
5
- key: 'learning-journey-platform-tour',
6
- version: '1.0.0',
7
- title: 'Learning Journey — Platform Tour',
8
- description:
9
- '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
- },
4
+ meta: {
5
+ key: 'learning-journey-platform-tour',
6
+ version: '1.0.0',
7
+ title: 'Learning Journey — Platform Tour',
8
+ description:
9
+ '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
31
  });
32
32
 
33
33
  export default example;
@@ -1,50 +1,50 @@
1
1
  import { platformPrimitivesTourTrack } from '../track';
2
2
 
3
3
  interface EmitParams {
4
- learnerId: string;
5
- occurredAt?: Date;
6
- payload?: Record<string, unknown>;
4
+ learnerId: string;
5
+ occurredAt?: Date;
6
+ payload?: Record<string, unknown>;
7
7
  }
8
8
 
9
9
  interface LearningJourneyEvent {
10
- learnerId: string;
11
- name: string;
12
- occurredAt: Date;
13
- trackId: string;
14
- payload?: Record<string, unknown>;
10
+ learnerId: string;
11
+ name: string;
12
+ occurredAt: Date;
13
+ trackId: string;
14
+ payload?: Record<string, unknown>;
15
15
  }
16
16
 
17
17
  type RecordEvent = (event: LearningJourneyEvent) => unknown;
18
18
 
19
19
  export const platformTourEvents = [
20
- 'org.member.added',
21
- 'audit_log.created',
22
- 'notification.sent',
23
- 'job.completed',
24
- 'flag.toggled',
25
- 'attachment.attached',
26
- 'usage.recorded',
20
+ 'org.member.added',
21
+ 'audit_log.created',
22
+ 'notification.sent',
23
+ 'job.completed',
24
+ 'flag.toggled',
25
+ 'attachment.attached',
26
+ 'usage.recorded',
27
27
  ] as const;
28
28
 
29
29
  export type PlatformEvent = (typeof platformTourEvents)[number];
30
30
 
31
31
  export const emitPlatformTourEvent = (
32
- eventName: PlatformEvent,
33
- { learnerId, occurredAt = new Date(), payload }: EmitParams,
34
- record?: RecordEvent
32
+ eventName: PlatformEvent,
33
+ { learnerId, occurredAt = new Date(), payload }: EmitParams,
34
+ record?: RecordEvent
35
35
  ) => {
36
- const event: LearningJourneyEvent = {
37
- learnerId,
38
- name: eventName,
39
- occurredAt,
40
- payload,
41
- trackId: platformPrimitivesTourTrack.id,
42
- };
43
- return record ? record(event) : event;
36
+ const event: LearningJourneyEvent = {
37
+ learnerId,
38
+ name: eventName,
39
+ occurredAt,
40
+ payload,
41
+ trackId: platformPrimitivesTourTrack.id,
42
+ };
43
+ return record ? record(event) : event;
44
44
  };
45
45
 
46
46
  export const emitAllPlatformTourEvents = (
47
- params: EmitParams,
48
- record?: RecordEvent
47
+ params: EmitParams,
48
+ record?: RecordEvent
49
49
  ) =>
50
- platformTourEvents.map((name) => emitPlatformTourEvent(name, params, record));
50
+ platformTourEvents.map((name) => emitPlatformTourEvent(name, params, record));
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from './track';
2
1
  export * from './docs';
3
- export * from './operations';
2
+ export { default as example } from './example';
4
3
  export * from './handlers/demo.handlers';
5
- export * from './presentations';
6
4
  export * from './learning-journey-platform-tour.feature';
7
- export { default as example } from './example';
5
+ export * from './operations';
6
+ export * from './presentations';
7
+ export * from './track';
@@ -10,59 +10,59 @@ import { defineFeature } from '@contractspec/lib.contracts-spec';
10
10
  * platform-specific tour track operations and presentations.
11
11
  */
12
12
  export const LearningJourneyPlatformTourFeature = defineFeature({
13
- meta: {
14
- key: 'learning-journey-platform-tour',
15
- version: '1.0.0',
16
- title: 'Learning Journey: Platform Tour',
17
- description:
18
- 'Platform primitives tour journey for exploring ContractSpec core features',
19
- domain: 'learning-journey',
20
- owners: ['@examples.learning-journey.platform-tour'],
21
- tags: ['learning', 'platform', 'tour', 'journey'],
22
- stability: 'experimental',
23
- },
13
+ meta: {
14
+ key: 'learning-journey-platform-tour',
15
+ version: '1.0.0',
16
+ title: 'Learning Journey: Platform Tour',
17
+ description:
18
+ 'Platform primitives tour journey for exploring ContractSpec core features',
19
+ domain: 'learning-journey',
20
+ owners: ['@examples.learning-journey.platform-tour'],
21
+ tags: ['learning', 'platform', 'tour', 'journey'],
22
+ stability: 'experimental',
23
+ },
24
24
 
25
- // All contract operations included in this feature
26
- operations: [
27
- { key: 'learningJourney.platformTour.recordEvent', version: '1.0.0' },
28
- { key: 'learningJourney.platformTour.getTrack', version: '1.0.0' },
29
- ],
25
+ // All contract operations included in this feature
26
+ operations: [
27
+ { key: 'learningJourney.platformTour.recordEvent', version: '1.0.0' },
28
+ { key: 'learningJourney.platformTour.getTrack', version: '1.0.0' },
29
+ ],
30
30
 
31
- // Events emitted by this feature
32
- events: [],
31
+ // Events emitted by this feature
32
+ events: [],
33
33
 
34
- // Presentations associated with this feature
35
- presentations: [
36
- { key: 'learning.journey.platform.track', version: '1.0.0' },
37
- { key: 'learning.journey.platform.widget', version: '1.0.0' },
38
- ],
34
+ // Presentations associated with this feature
35
+ presentations: [
36
+ { key: 'learning.journey.platform.track', version: '1.0.0' },
37
+ { key: 'learning.journey.platform.widget', version: '1.0.0' },
38
+ ],
39
39
 
40
- // Link operations to their primary presentations
41
- opToPresentation: [
42
- {
43
- op: { key: 'learningJourney.platformTour.getTrack', version: '1.0.0' },
44
- pres: { key: 'learning.journey.platform.track', version: '1.0.0' },
45
- },
46
- ],
40
+ // Link operations to their primary presentations
41
+ opToPresentation: [
42
+ {
43
+ op: { key: 'learningJourney.platformTour.getTrack', version: '1.0.0' },
44
+ pres: { key: 'learning.journey.platform.track', version: '1.0.0' },
45
+ },
46
+ ],
47
47
 
48
- // Target requirements for multi-surface rendering
49
- presentationsTargets: [
50
- {
51
- key: 'learning.journey.platform.track',
52
- version: '1.0.0',
53
- targets: ['react', 'markdown', 'application/json'],
54
- },
55
- {
56
- key: 'learning.journey.platform.widget',
57
- version: '1.0.0',
58
- targets: ['react'],
59
- },
60
- ],
48
+ // Target requirements for multi-surface rendering
49
+ presentationsTargets: [
50
+ {
51
+ key: 'learning.journey.platform.track',
52
+ version: '1.0.0',
53
+ targets: ['react', 'markdown', 'application/json'],
54
+ },
55
+ {
56
+ key: 'learning.journey.platform.widget',
57
+ version: '1.0.0',
58
+ targets: ['react'],
59
+ },
60
+ ],
61
61
 
62
- // Capability requirements
63
- capabilities: {
64
- requires: [{ key: 'identity', version: '1.0.0' }],
65
- },
62
+ // Capability requirements
63
+ capabilities: {
64
+ requires: [{ key: 'identity', version: '1.0.0' }],
65
+ },
66
66
 
67
- docs: ['docs.learning-journey.platform-tour'],
67
+ docs: ['docs.learning-journey.platform-tour'],
68
68
  });
@@ -1,49 +1,48 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
-
2
+ import type { PlatformEvent } from '../handlers/demo.handlers';
3
3
  import {
4
- GetPlatformTourTrack,
5
- RecordPlatformTourEvent,
6
- platformTourContracts,
7
- } from './index';
4
+ emitPlatformTourEvent,
5
+ platformTourEvents,
6
+ } from '../handlers/demo.handlers';
8
7
  import { platformPrimitivesTourTrack } from '../track';
9
8
  import {
10
- emitPlatformTourEvent,
11
- platformTourEvents,
12
- } from '../handlers/demo.handlers';
13
- import type { PlatformEvent } from '../handlers/demo.handlers';
9
+ GetPlatformTourTrack,
10
+ platformTourContracts,
11
+ RecordPlatformTourEvent,
12
+ } from './index';
14
13
 
15
14
  describe('platform tour contracts', () => {
16
- it('exposes track metadata', () => {
17
- expect(platformTourContracts.track.id).toBe('platform_primitives_tour');
18
- expect(platformTourContracts.track.steps.length).toBeGreaterThan(0);
19
- expect(GetPlatformTourTrack.meta.key).toBe(
20
- 'learningJourney.platformTour.getTrack'
21
- );
22
- });
15
+ it('exposes track metadata', () => {
16
+ expect(platformTourContracts.track.id).toBe('platform_primitives_tour');
17
+ expect(platformTourContracts.track.steps.length).toBeGreaterThan(0);
18
+ expect(GetPlatformTourTrack.meta.key).toBe(
19
+ 'learningJourney.platformTour.getTrack'
20
+ );
21
+ });
23
22
 
24
- it('allows recording events via demo handler', async () => {
25
- const [step] = platformPrimitivesTourTrack.steps;
26
- expect(step).toBeDefined();
27
- if (!step) throw new Error('Expected at least one platform tour step');
23
+ it('allows recording events via demo handler', async () => {
24
+ const [step] = platformPrimitivesTourTrack.steps;
25
+ expect(step).toBeDefined();
26
+ if (!step) throw new Error('Expected at least one platform tour step');
28
27
 
29
- const eventName = step.completion.eventName;
30
- const isPlatformEvent = (value: string): value is PlatformEvent =>
31
- platformTourEvents.includes(value as PlatformEvent);
28
+ const eventName = step.completion.eventName;
29
+ const isPlatformEvent = (value: string): value is PlatformEvent =>
30
+ platformTourEvents.includes(value as PlatformEvent);
32
31
 
33
- expect(isPlatformEvent(eventName)).toBe(true);
34
- if (!isPlatformEvent(eventName)) {
35
- throw new Error(`Unexpected event name: ${eventName}`);
36
- }
32
+ expect(isPlatformEvent(eventName)).toBe(true);
33
+ if (!isPlatformEvent(eventName)) {
34
+ throw new Error(`Unexpected event name: ${eventName}`);
35
+ }
37
36
 
38
- const result = await emitPlatformTourEvent(eventName, {
39
- learnerId: 'demo-learner',
40
- });
41
- expect(result).toBeDefined();
42
- });
37
+ const result = await emitPlatformTourEvent(eventName, {
38
+ learnerId: 'demo-learner',
39
+ });
40
+ expect(result).toBeDefined();
41
+ });
43
42
 
44
- it('exposes record event contract', () => {
45
- expect(RecordPlatformTourEvent.meta.key).toBe(
46
- 'learningJourney.platformTour.recordEvent'
47
- );
48
- });
43
+ it('exposes record event contract', () => {
44
+ expect(RecordPlatformTourEvent.meta.key).toBe(
45
+ 'learningJourney.platformTour.recordEvent'
46
+ );
47
+ });
49
48
  });
@@ -1,122 +1,122 @@
1
- import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';
2
1
  import { defineCommand, defineQuery } from '@contractspec/lib.contracts-spec';
2
+ import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
3
3
 
4
4
  import { platformPrimitivesTourTrack } from '../track';
5
5
 
6
6
  const OWNERS = ['examples.learning-journey.platform-tour'] as const;
7
7
 
8
8
  const StepModel = defineSchemaModel({
9
- name: 'PlatformTourStep',
10
- description: 'Step metadata for platform primitives tour',
11
- fields: {
12
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
- title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
15
- completionEvent: {
16
- type: ScalarTypeEnum.String_unsecure(),
17
- isOptional: false,
18
- },
19
- sourceModule: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
20
- xpReward: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
21
- order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
22
- },
9
+ name: 'PlatformTourStep',
10
+ description: 'Step metadata for platform primitives tour',
11
+ fields: {
12
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
15
+ completionEvent: {
16
+ type: ScalarTypeEnum.String_unsecure(),
17
+ isOptional: false,
18
+ },
19
+ sourceModule: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
20
+ xpReward: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
21
+ order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
22
+ },
23
23
  });
24
24
 
25
25
  export const PlatformTourTrackModel = defineSchemaModel({
26
- name: 'PlatformTourTrack',
27
- description: 'Platform primitives tour track definition',
28
- fields: {
29
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
30
- name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
31
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
32
- totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
33
- completionXpBonus: {
34
- type: ScalarTypeEnum.Int_unsecure(),
35
- isOptional: true,
36
- },
37
- completionBadgeKey: {
38
- type: ScalarTypeEnum.String_unsecure(),
39
- isOptional: true,
40
- },
41
- streakHoursWindow: {
42
- type: ScalarTypeEnum.Int_unsecure(),
43
- isOptional: true,
44
- },
45
- streakBonusXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
46
- steps: { type: StepModel, isArray: true, isOptional: false },
47
- },
26
+ name: 'PlatformTourTrack',
27
+ description: 'Platform primitives tour track definition',
28
+ fields: {
29
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
30
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
31
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
32
+ totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
33
+ completionXpBonus: {
34
+ type: ScalarTypeEnum.Int_unsecure(),
35
+ isOptional: true,
36
+ },
37
+ completionBadgeKey: {
38
+ type: ScalarTypeEnum.String_unsecure(),
39
+ isOptional: true,
40
+ },
41
+ streakHoursWindow: {
42
+ type: ScalarTypeEnum.Int_unsecure(),
43
+ isOptional: true,
44
+ },
45
+ streakBonusXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
46
+ steps: { type: StepModel, isArray: true, isOptional: false },
47
+ },
48
48
  });
49
49
 
50
50
  const TrackResponseModel = defineSchemaModel({
51
- name: 'PlatformTourTrackResponse',
52
- description: 'Response wrapper for platform tour track',
53
- fields: {
54
- track: { type: PlatformTourTrackModel, isOptional: false },
55
- },
51
+ name: 'PlatformTourTrackResponse',
52
+ description: 'Response wrapper for platform tour track',
53
+ fields: {
54
+ track: { type: PlatformTourTrackModel, isOptional: false },
55
+ },
56
56
  });
57
57
 
58
58
  const RecordDemoEventInput = defineSchemaModel({
59
- name: 'PlatformTourRecordEventInput',
60
- description: 'Emit a demo event to advance platform tour steps',
61
- fields: {
62
- learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
63
- eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
64
- payload: { type: ScalarTypeEnum.JSON(), isOptional: true },
65
- occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
66
- },
59
+ name: 'PlatformTourRecordEventInput',
60
+ description: 'Emit a demo event to advance platform tour steps',
61
+ fields: {
62
+ learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
63
+ eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
64
+ payload: { type: ScalarTypeEnum.JSON(), isOptional: true },
65
+ occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
66
+ },
67
67
  });
68
68
 
69
69
  const SuccessModel = defineSchemaModel({
70
- name: 'PlatformTourSuccess',
71
- description: 'Generic success response',
72
- fields: {
73
- success: { type: ScalarTypeEnum.Boolean(), isOptional: false },
74
- },
70
+ name: 'PlatformTourSuccess',
71
+ description: 'Generic success response',
72
+ fields: {
73
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false },
74
+ },
75
75
  });
76
76
 
77
77
  export const GetPlatformTourTrack = defineQuery({
78
- meta: {
79
- key: 'learningJourney.platformTour.getTrack',
80
- version: '1.0.0',
81
- stability: 'experimental',
82
- owners: [...OWNERS],
83
- tags: ['learning', 'platform', 'tour'],
84
- description: 'Fetch platform primitives tour track definition.',
85
- goal: 'Expose track metadata to UIs and templates.',
86
- context: 'Called by Studio/Playground to render journey steps.',
87
- },
88
- io: {
89
- input: defineSchemaModel({
90
- name: 'PlatformTourTrackInput',
91
- description: 'Track input',
92
- fields: {},
93
- }),
94
- output: TrackResponseModel,
95
- },
96
- policy: { auth: 'user' },
78
+ meta: {
79
+ key: 'learningJourney.platformTour.getTrack',
80
+ version: '1.0.0',
81
+ stability: 'experimental',
82
+ owners: [...OWNERS],
83
+ tags: ['learning', 'platform', 'tour'],
84
+ description: 'Fetch platform primitives tour track definition.',
85
+ goal: 'Expose track metadata to UIs and templates.',
86
+ context: 'Called by Studio/Playground to render journey steps.',
87
+ },
88
+ io: {
89
+ input: defineSchemaModel({
90
+ name: 'PlatformTourTrackInput',
91
+ description: 'Track input',
92
+ fields: {},
93
+ }),
94
+ output: TrackResponseModel,
95
+ },
96
+ policy: { auth: 'user' },
97
97
  });
98
98
 
99
99
  export const RecordPlatformTourEvent = defineCommand({
100
- meta: {
101
- key: 'learningJourney.platformTour.recordEvent',
102
- version: '1.0.0',
103
- stability: 'experimental',
104
- owners: [...OWNERS],
105
- tags: ['learning', 'platform', 'tour'],
106
- description: 'Record an event to advance platform tour progress.',
107
- goal: 'Advance steps via domain events in demo/sandbox contexts.',
108
- context:
109
- 'Called by handlers or demo scripts to emit step completion events.',
110
- },
111
- io: {
112
- input: RecordDemoEventInput,
113
- output: SuccessModel,
114
- },
115
- policy: { auth: 'user' },
100
+ meta: {
101
+ key: 'learningJourney.platformTour.recordEvent',
102
+ version: '1.0.0',
103
+ stability: 'experimental',
104
+ owners: [...OWNERS],
105
+ tags: ['learning', 'platform', 'tour'],
106
+ description: 'Record an event to advance platform tour progress.',
107
+ goal: 'Advance steps via domain events in demo/sandbox contexts.',
108
+ context:
109
+ 'Called by handlers or demo scripts to emit step completion events.',
110
+ },
111
+ io: {
112
+ input: RecordDemoEventInput,
113
+ output: SuccessModel,
114
+ },
115
+ policy: { auth: 'user' },
116
116
  });
117
117
 
118
118
  export const platformTourContracts = {
119
- GetPlatformTourTrack,
120
- RecordPlatformTourEvent,
121
- track: platformPrimitivesTourTrack,
119
+ GetPlatformTourTrack,
120
+ RecordPlatformTourEvent,
121
+ track: platformPrimitivesTourTrack,
122
122
  };