@contractspec/example.learning-journey-studio-onboarding 3.7.5 → 3.7.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.learning-journey-studio-onboarding",
3
- "version": "3.7.5",
3
+ "version": "3.7.7",
4
4
  "description": "Learning journey track for first 30 minutes in ContractSpec Studio.",
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.5",
95
- "@contractspec/lib.schema": "3.7.5",
96
- "@contractspec/module.learning-journey": "3.7.5"
94
+ "@contractspec/lib.contracts-spec": "4.0.0",
95
+ "@contractspec/lib.schema": "3.7.6",
96
+ "@contractspec/module.learning-journey": "3.7.7"
97
97
  },
98
98
  "devDependencies": {
99
- "@contractspec/tool.typescript": "3.7.5",
99
+ "@contractspec/tool.typescript": "3.7.6",
100
100
  "typescript": "^5.9.3",
101
- "@contractspec/tool.bun": "3.7.5"
101
+ "@contractspec/tool.bun": "3.7.6"
102
102
  },
103
103
  "publishConfig": {
104
104
  "exports": {
@@ -2,16 +2,16 @@ import type { DocBlock } from '@contractspec/lib.contracts-spec';
2
2
  import { registerDocBlocks } from '@contractspec/lib.contracts-spec';
3
3
 
4
4
  const studioOnboardingDocBlocks: DocBlock[] = [
5
- {
6
- id: 'docs.learning-journey.studio-onboarding',
7
- title: 'Learning Journey — Studio Getting Started',
8
- summary:
9
- 'Track that guides a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.',
10
- kind: 'reference',
11
- visibility: 'public',
12
- route: '/docs/learning-journey/studio-onboarding',
13
- tags: ['learning', 'onboarding', 'studio'],
14
- body: `## Track
5
+ {
6
+ id: 'docs.learning-journey.studio-onboarding',
7
+ title: 'Learning Journey — Studio Getting Started',
8
+ summary:
9
+ 'Track that guides a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.',
10
+ kind: 'reference',
11
+ visibility: 'public',
12
+ route: '/docs/learning-journey/studio-onboarding',
13
+ tags: ['learning', 'onboarding', 'studio'],
14
+ body: `## Track
15
15
  - **Key**: \`studio_getting_started\`
16
16
  - **Persona**: new Studio developer, first 30 minutes
17
17
  - **Goal**: instantiate template → edit spec → regenerate → play → run evolution
@@ -32,7 +32,7 @@ XP: 20/20/20/20/30 with bonus 25 XP if completed within 48h (streak rule). Badge
32
32
  - \`learning.onboarding.getProgress\` to render progress
33
33
  - \`learning.onboarding.recordEvent\` to advance from bus events
34
34
  - Events should be emitted by Studio surfaces (template creation, spec save, regeneration, playground session start, evolution apply).`,
35
- },
35
+ },
36
36
  ];
37
37
 
38
38
  registerDocBlocks(studioOnboardingDocBlocks);
package/src/example.ts CHANGED
@@ -1,31 +1,31 @@
1
1
  import { defineExample } from '@contractspec/lib.contracts-spec';
2
2
 
3
3
  const example = defineExample({
4
- meta: {
5
- key: 'learning-journey-studio-onboarding',
6
- version: '1.0.0',
7
- title: 'Learning Journey — Studio Getting Started',
8
- description:
9
- 'Onboarding track guiding a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.',
10
- kind: 'template',
11
- visibility: 'public',
12
- stability: 'experimental',
13
- owners: ['@platform.core'],
14
- tags: ['learning', 'onboarding', 'studio'],
15
- },
16
- docs: {
17
- rootDocId: 'docs.learning-journey.studio-onboarding',
18
- },
19
- entrypoints: {
20
- packageName: '@contractspec/example.learning-journey-studio-onboarding',
21
- docs: './docs',
22
- },
23
- surfaces: {
24
- templates: true,
25
- sandbox: { enabled: true, modes: ['playground', 'markdown'] },
26
- studio: { enabled: true, installable: true },
27
- mcp: { enabled: true },
28
- },
4
+ meta: {
5
+ key: 'learning-journey-studio-onboarding',
6
+ version: '1.0.0',
7
+ title: 'Learning Journey — Studio Getting Started',
8
+ description:
9
+ 'Onboarding track guiding a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.',
10
+ kind: 'template',
11
+ visibility: 'public',
12
+ stability: 'experimental',
13
+ owners: ['@platform.core'],
14
+ tags: ['learning', 'onboarding', 'studio'],
15
+ },
16
+ docs: {
17
+ rootDocId: 'docs.learning-journey.studio-onboarding',
18
+ },
19
+ entrypoints: {
20
+ packageName: '@contractspec/example.learning-journey-studio-onboarding',
21
+ docs: './docs',
22
+ },
23
+ surfaces: {
24
+ templates: true,
25
+ sandbox: { enabled: true, modes: ['playground', 'markdown'] },
26
+ studio: { enabled: true, installable: true },
27
+ mcp: { enabled: true },
28
+ },
29
29
  });
30
30
 
31
31
  export default example;
@@ -1,48 +1,48 @@
1
1
  import { studioGettingStartedTrack } from '../track';
2
2
 
3
3
  interface EmitParams {
4
- learnerId: string;
5
- occurredAt?: Date;
4
+ learnerId: string;
5
+ occurredAt?: Date;
6
6
  }
7
7
 
8
8
  interface LearningJourneyEvent {
9
- learnerId: string;
10
- name: string;
11
- occurredAt: Date;
12
- trackId: string;
13
- payload?: Record<string, unknown>;
9
+ learnerId: string;
10
+ name: string;
11
+ occurredAt: Date;
12
+ trackId: string;
13
+ payload?: Record<string, unknown>;
14
14
  }
15
15
 
16
16
  type RecordEvent = (event: LearningJourneyEvent) => unknown;
17
17
 
18
18
  export const studioOnboardingEvents = [
19
- 'studio.template.instantiated',
20
- 'spec.changed',
21
- 'regeneration.completed',
22
- 'playground.session.started',
23
- 'studio.evolution.applied',
19
+ 'studio.template.instantiated',
20
+ 'spec.changed',
21
+ 'regeneration.completed',
22
+ 'playground.session.started',
23
+ 'studio.evolution.applied',
24
24
  ] as const;
25
25
 
26
26
  export type StudioEvent = (typeof studioOnboardingEvents)[number];
27
27
 
28
28
  export const emitStudioOnboardingEvent = (
29
- eventName: StudioEvent,
30
- { learnerId, occurredAt = new Date() }: EmitParams,
31
- record?: RecordEvent
29
+ eventName: StudioEvent,
30
+ { learnerId, occurredAt = new Date() }: EmitParams,
31
+ record?: RecordEvent
32
32
  ) => {
33
- const event: LearningJourneyEvent = {
34
- learnerId,
35
- name: eventName,
36
- occurredAt,
37
- trackId: studioGettingStartedTrack.id,
38
- };
39
- return record ? record(event) : event;
33
+ const event: LearningJourneyEvent = {
34
+ learnerId,
35
+ name: eventName,
36
+ occurredAt,
37
+ trackId: studioGettingStartedTrack.id,
38
+ };
39
+ return record ? record(event) : event;
40
40
  };
41
41
 
42
42
  export const emitAllStudioOnboardingEvents = (
43
- params: EmitParams,
44
- record?: RecordEvent
43
+ params: EmitParams,
44
+ record?: RecordEvent
45
45
  ) =>
46
- studioOnboardingEvents.map((name) =>
47
- emitStudioOnboardingEvent(name, params, record)
48
- );
46
+ studioOnboardingEvents.map((name) =>
47
+ emitStudioOnboardingEvent(name, params, record)
48
+ );
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-studio-onboarding.feature';
7
- export { default as example } from './example';
5
+ export * from './operations';
6
+ export * from './presentations';
7
+ export * from './track';
@@ -10,62 +10,62 @@ import { defineFeature } from '@contractspec/lib.contracts-spec';
10
10
  * Studio-specific onboarding track operations and presentations.
11
11
  */
12
12
  export const LearningJourneyStudioOnboardingFeature = defineFeature({
13
- meta: {
14
- key: 'learning-journey-studio-onboarding',
15
- title: 'Learning Journey: Studio Onboarding',
16
- description:
17
- 'Studio onboarding journey for getting started with ContractSpec Studio',
18
- domain: 'learning-journey',
19
- owners: ['@examples.learning-journey.studio-onboarding'],
20
- tags: ['learning', 'onboarding', 'studio', 'journey'],
21
- stability: 'experimental',
22
- version: '1.0.0',
23
- },
13
+ meta: {
14
+ key: 'learning-journey-studio-onboarding',
15
+ title: 'Learning Journey: Studio Onboarding',
16
+ description:
17
+ 'Studio onboarding journey for getting started with ContractSpec Studio',
18
+ domain: 'learning-journey',
19
+ owners: ['@examples.learning-journey.studio-onboarding'],
20
+ tags: ['learning', 'onboarding', 'studio', 'journey'],
21
+ stability: 'experimental',
22
+ version: '1.0.0',
23
+ },
24
24
 
25
- // All contract operations included in this feature
26
- operations: [
27
- { key: 'learningJourney.studioOnboarding.recordEvent', version: '1.0.0' },
28
- { key: 'learningJourney.studioOnboarding.getTrack', version: '1.0.0' },
29
- ],
25
+ // All contract operations included in this feature
26
+ operations: [
27
+ { key: 'learningJourney.studioOnboarding.recordEvent', version: '1.0.0' },
28
+ { key: 'learningJourney.studioOnboarding.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.studio.track', version: '1.0.0' },
37
- { key: 'learning.journey.studio.widget', version: '1.0.0' },
38
- ],
34
+ // Presentations associated with this feature
35
+ presentations: [
36
+ { key: 'learning.journey.studio.track', version: '1.0.0' },
37
+ { key: 'learning.journey.studio.widget', version: '1.0.0' },
38
+ ],
39
39
 
40
- // Link operations to their primary presentations
41
- opToPresentation: [
42
- {
43
- op: {
44
- key: 'learningJourney.studioOnboarding.getTrack',
45
- version: '1.0.0',
46
- },
47
- pres: { key: 'learning.journey.studio.track', version: '1.0.0' },
48
- },
49
- ],
40
+ // Link operations to their primary presentations
41
+ opToPresentation: [
42
+ {
43
+ op: {
44
+ key: 'learningJourney.studioOnboarding.getTrack',
45
+ version: '1.0.0',
46
+ },
47
+ pres: { key: 'learning.journey.studio.track', version: '1.0.0' },
48
+ },
49
+ ],
50
50
 
51
- // Target requirements for multi-surface rendering
52
- presentationsTargets: [
53
- {
54
- key: 'learning.journey.studio.track',
55
- version: '1.0.0',
56
- targets: ['react', 'markdown', 'application/json'],
57
- },
58
- {
59
- key: 'learning.journey.studio.widget',
60
- version: '1.0.0',
61
- targets: ['react'],
62
- },
63
- ],
51
+ // Target requirements for multi-surface rendering
52
+ presentationsTargets: [
53
+ {
54
+ key: 'learning.journey.studio.track',
55
+ version: '1.0.0',
56
+ targets: ['react', 'markdown', 'application/json'],
57
+ },
58
+ {
59
+ key: 'learning.journey.studio.widget',
60
+ version: '1.0.0',
61
+ targets: ['react'],
62
+ },
63
+ ],
64
64
 
65
- // Capability requirements
66
- capabilities: {
67
- requires: [{ key: 'identity', version: '1.0.0' }],
68
- },
65
+ // Capability requirements
66
+ capabilities: {
67
+ requires: [{ key: 'identity', version: '1.0.0' }],
68
+ },
69
69
 
70
- docs: ['docs.learning-journey.studio-onboarding'],
70
+ docs: ['docs.learning-journey.studio-onboarding'],
71
71
  });
@@ -1,49 +1,48 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
-
2
+ import type { StudioEvent } from '../handlers/demo.handlers';
3
3
  import {
4
- GetStudioOnboardingTrack,
5
- RecordStudioOnboardingEvent,
6
- studioOnboardingContracts,
7
- } from './index';
4
+ emitStudioOnboardingEvent,
5
+ studioOnboardingEvents,
6
+ } from '../handlers/demo.handlers';
8
7
  import { studioGettingStartedTrack } from '../track';
9
8
  import {
10
- emitStudioOnboardingEvent,
11
- studioOnboardingEvents,
12
- } from '../handlers/demo.handlers';
13
- import type { StudioEvent } from '../handlers/demo.handlers';
9
+ GetStudioOnboardingTrack,
10
+ RecordStudioOnboardingEvent,
11
+ studioOnboardingContracts,
12
+ } from './index';
14
13
 
15
14
  describe('studio onboarding contracts', () => {
16
- it('exposes track metadata', () => {
17
- expect(studioOnboardingContracts.track.id).toBe('studio_getting_started');
18
- expect(studioOnboardingContracts.track.steps.length).toBeGreaterThan(0);
19
- expect(GetStudioOnboardingTrack.meta.key).toBe(
20
- 'learningJourney.studioOnboarding.getTrack'
21
- );
22
- });
15
+ it('exposes track metadata', () => {
16
+ expect(studioOnboardingContracts.track.id).toBe('studio_getting_started');
17
+ expect(studioOnboardingContracts.track.steps.length).toBeGreaterThan(0);
18
+ expect(GetStudioOnboardingTrack.meta.key).toBe(
19
+ 'learningJourney.studioOnboarding.getTrack'
20
+ );
21
+ });
23
22
 
24
- it('allows recording events via demo handler', async () => {
25
- const step = studioGettingStartedTrack.steps[0];
26
- expect(step).toBeDefined();
27
- if (!step) throw new Error('Expected at least one onboarding step');
23
+ it('allows recording events via demo handler', async () => {
24
+ const step = studioGettingStartedTrack.steps[0];
25
+ expect(step).toBeDefined();
26
+ if (!step) throw new Error('Expected at least one onboarding step');
28
27
 
29
- const eventName = step.completion.eventName;
30
- const isStudioEvent = (value: string): value is StudioEvent =>
31
- studioOnboardingEvents.includes(value as StudioEvent);
28
+ const eventName = step.completion.eventName;
29
+ const isStudioEvent = (value: string): value is StudioEvent =>
30
+ studioOnboardingEvents.includes(value as StudioEvent);
32
31
 
33
- expect(isStudioEvent(eventName)).toBe(true);
34
- if (!isStudioEvent(eventName)) {
35
- throw new Error(`Unexpected event name: ${eventName}`);
36
- }
32
+ expect(isStudioEvent(eventName)).toBe(true);
33
+ if (!isStudioEvent(eventName)) {
34
+ throw new Error(`Unexpected event name: ${eventName}`);
35
+ }
37
36
 
38
- const result = await emitStudioOnboardingEvent(eventName, {
39
- learnerId: 'demo-learner',
40
- });
41
- expect(result).toBeDefined();
42
- });
37
+ const result = await emitStudioOnboardingEvent(eventName, {
38
+ learnerId: 'demo-learner',
39
+ });
40
+ expect(result).toBeDefined();
41
+ });
43
42
 
44
- it('exposes record event contract', () => {
45
- expect(RecordStudioOnboardingEvent.meta.key).toBe(
46
- 'learningJourney.studioOnboarding.recordEvent'
47
- );
48
- });
43
+ it('exposes record event contract', () => {
44
+ expect(RecordStudioOnboardingEvent.meta.key).toBe(
45
+ 'learningJourney.studioOnboarding.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 { studioGettingStartedTrack } from '../track';
5
5
 
6
6
  const OWNERS = ['examples.learning-journey.studio-onboarding'] as const;
7
7
 
8
8
  const StepModel = defineSchemaModel({
9
- name: 'StudioOnboardingStep',
10
- description: 'Step metadata for Studio onboarding journey',
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: 'StudioOnboardingStep',
10
+ description: 'Step metadata for Studio onboarding journey',
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 StudioOnboardingTrackModel = defineSchemaModel({
26
- name: 'StudioOnboardingTrack',
27
- description: 'Studio onboarding 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: 'StudioOnboardingTrack',
27
+ description: 'Studio onboarding 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: 'StudioOnboardingTrackResponse',
52
- description: 'Response wrapper for studio onboarding track',
53
- fields: {
54
- track: { type: StudioOnboardingTrackModel, isOptional: false },
55
- },
51
+ name: 'StudioOnboardingTrackResponse',
52
+ description: 'Response wrapper for studio onboarding track',
53
+ fields: {
54
+ track: { type: StudioOnboardingTrackModel, isOptional: false },
55
+ },
56
56
  });
57
57
 
58
58
  const RecordDemoEventInput = defineSchemaModel({
59
- name: 'StudioOnboardingRecordEventInput',
60
- description: 'Emit a demo event to advance Studio onboarding 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: 'StudioOnboardingRecordEventInput',
60
+ description: 'Emit a demo event to advance Studio onboarding 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: 'StudioOnboardingSuccess',
71
- description: 'Generic success response',
72
- fields: {
73
- success: { type: ScalarTypeEnum.Boolean(), isOptional: false },
74
- },
70
+ name: 'StudioOnboardingSuccess',
71
+ description: 'Generic success response',
72
+ fields: {
73
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false },
74
+ },
75
75
  });
76
76
 
77
77
  export const GetStudioOnboardingTrack = defineQuery({
78
- meta: {
79
- key: 'learningJourney.studioOnboarding.getTrack',
80
- version: '1.0.0',
81
- stability: 'experimental',
82
- owners: [...OWNERS],
83
- tags: ['learning', 'onboarding', 'studio'],
84
- description: 'Fetch the Studio onboarding 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: 'StudioOnboardingTrackInput',
91
- description: 'Track input',
92
- fields: {},
93
- }),
94
- output: TrackResponseModel,
95
- },
96
- policy: { auth: 'user' },
78
+ meta: {
79
+ key: 'learningJourney.studioOnboarding.getTrack',
80
+ version: '1.0.0',
81
+ stability: 'experimental',
82
+ owners: [...OWNERS],
83
+ tags: ['learning', 'onboarding', 'studio'],
84
+ description: 'Fetch the Studio onboarding 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: 'StudioOnboardingTrackInput',
91
+ description: 'Track input',
92
+ fields: {},
93
+ }),
94
+ output: TrackResponseModel,
95
+ },
96
+ policy: { auth: 'user' },
97
97
  });
98
98
 
99
99
  export const RecordStudioOnboardingEvent = defineCommand({
100
- meta: {
101
- key: 'learningJourney.studioOnboarding.recordEvent',
102
- version: '1.0.0',
103
- stability: 'experimental',
104
- owners: [...OWNERS],
105
- tags: ['learning', 'onboarding', 'studio'],
106
- description: 'Record an event to advance Studio onboarding 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.studioOnboarding.recordEvent',
102
+ version: '1.0.0',
103
+ stability: 'experimental',
104
+ owners: [...OWNERS],
105
+ tags: ['learning', 'onboarding', 'studio'],
106
+ description: 'Record an event to advance Studio onboarding 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 studioOnboardingContracts = {
119
- GetStudioOnboardingTrack,
120
- RecordStudioOnboardingEvent,
121
- track: studioGettingStartedTrack,
119
+ GetStudioOnboardingTrack,
120
+ RecordStudioOnboardingEvent,
121
+ track: studioGettingStartedTrack,
122
122
  };