@contractspec/example.kb-update-pipeline 1.44.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  const KbUpdatePipelineFeature = {
3
3
  meta: {
4
4
  key: "kb-update-pipeline",
5
- version: 1,
5
+ version: "1.0.0",
6
6
  title: "KB Update Pipeline (HITL)",
7
7
  description: "Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.",
8
8
  domain: "knowledge",
@@ -19,118 +19,118 @@ const KbUpdatePipelineFeature = {
19
19
  operations: [
20
20
  {
21
21
  key: "kbPipeline.runWatch",
22
- version: 1
22
+ version: "1.0.0"
23
23
  },
24
24
  {
25
25
  key: "kbPipeline.createReviewTask",
26
- version: 1
26
+ version: "1.0.0"
27
27
  },
28
28
  {
29
29
  key: "kbPipeline.submitDecision",
30
- version: 1
30
+ version: "1.0.0"
31
31
  },
32
32
  {
33
33
  key: "kbPipeline.publishIfReady",
34
- version: 1
34
+ version: "1.0.0"
35
35
  }
36
36
  ],
37
37
  events: [
38
38
  {
39
39
  key: "kb.change.detected",
40
- version: 1
40
+ version: "1.0.0"
41
41
  },
42
42
  {
43
43
  key: "kb.change.summarized",
44
- version: 1
44
+ version: "1.0.0"
45
45
  },
46
46
  {
47
47
  key: "kb.patch.proposed",
48
- version: 1
48
+ version: "1.0.0"
49
49
  },
50
50
  {
51
51
  key: "kb.review.requested",
52
- version: 1
52
+ version: "1.0.0"
53
53
  },
54
54
  {
55
55
  key: "kb.review.decided",
56
- version: 1
56
+ version: "1.0.0"
57
57
  }
58
58
  ],
59
59
  presentations: [
60
60
  {
61
61
  key: "kb.dashboard",
62
- version: 1
62
+ version: "1.0.0"
63
63
  },
64
64
  {
65
65
  key: "kb.review.list",
66
- version: 1
66
+ version: "1.0.0"
67
67
  },
68
68
  {
69
69
  key: "kb.review.form",
70
- version: 1
70
+ version: "1.0.0"
71
71
  }
72
72
  ],
73
73
  opToPresentation: [
74
74
  {
75
75
  op: {
76
76
  key: "kbPipeline.runWatch",
77
- version: 1
77
+ version: "1.0.0"
78
78
  },
79
79
  pres: {
80
80
  key: "kb.dashboard",
81
- version: 1
81
+ version: "1.0.0"
82
82
  }
83
83
  },
84
84
  {
85
85
  op: {
86
86
  key: "kbPipeline.createReviewTask",
87
- version: 1
87
+ version: "1.0.0"
88
88
  },
89
89
  pres: {
90
90
  key: "kb.review.list",
91
- version: 1
91
+ version: "1.0.0"
92
92
  }
93
93
  },
94
94
  {
95
95
  op: {
96
96
  key: "kbPipeline.submitDecision",
97
- version: 1
97
+ version: "1.0.0"
98
98
  },
99
99
  pres: {
100
100
  key: "kb.review.form",
101
- version: 1
101
+ version: "1.0.0"
102
102
  }
103
103
  }
104
104
  ],
105
105
  presentationsTargets: [
106
106
  {
107
107
  key: "kb.dashboard",
108
- version: 1,
108
+ version: "1.0.0",
109
109
  targets: ["react", "markdown"]
110
110
  },
111
111
  {
112
112
  key: "kb.review.list",
113
- version: 1,
113
+ version: "1.0.0",
114
114
  targets: ["react", "markdown"]
115
115
  },
116
116
  {
117
117
  key: "kb.review.form",
118
- version: 1,
118
+ version: "1.0.0",
119
119
  targets: ["react"]
120
120
  }
121
121
  ],
122
122
  capabilities: { requires: [
123
123
  {
124
124
  key: "identity",
125
- version: 1
125
+ version: "1.0.0"
126
126
  },
127
127
  {
128
128
  key: "notifications",
129
- version: 1
129
+ version: "1.0.0"
130
130
  },
131
131
  {
132
132
  key: "audit-trail",
133
- version: 1
133
+ version: "1.0.0"
134
134
  }
135
135
  ] }
136
136
  };
@@ -1 +1 @@
1
- {"version":3,"file":"kb-update-pipeline.feature.js","names":["KbUpdatePipelineFeature: FeatureModuleSpec"],"sources":["../src/kb-update-pipeline.feature.ts"],"sourcesContent":["import type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\nexport const KbUpdatePipelineFeature: FeatureModuleSpec = {\n meta: {\n key: 'kb-update-pipeline',\n version: 1,\n title: 'KB Update Pipeline (HITL)',\n description:\n 'Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'hitl', 'audit', 'notifications'],\n stability: 'experimental',\n },\n operations: [\n { key: 'kbPipeline.runWatch', version: 1 },\n { key: 'kbPipeline.createReviewTask', version: 1 },\n { key: 'kbPipeline.submitDecision', version: 1 },\n { key: 'kbPipeline.publishIfReady', version: 1 },\n ],\n events: [\n { key: 'kb.change.detected', version: 1 },\n { key: 'kb.change.summarized', version: 1 },\n { key: 'kb.patch.proposed', version: 1 },\n { key: 'kb.review.requested', version: 1 },\n { key: 'kb.review.decided', version: 1 },\n ],\n presentations: [\n { key: 'kb.dashboard', version: 1 },\n { key: 'kb.review.list', version: 1 },\n { key: 'kb.review.form', version: 1 },\n ],\n opToPresentation: [\n {\n op: { key: 'kbPipeline.runWatch', version: 1 },\n pres: { key: 'kb.dashboard', version: 1 },\n },\n {\n op: { key: 'kbPipeline.createReviewTask', version: 1 },\n pres: { key: 'kb.review.list', version: 1 },\n },\n {\n op: { key: 'kbPipeline.submitDecision', version: 1 },\n pres: { key: 'kb.review.form', version: 1 },\n },\n ],\n presentationsTargets: [\n { key: 'kb.dashboard', version: 1, targets: ['react', 'markdown'] },\n { key: 'kb.review.list', version: 1, targets: ['react', 'markdown'] },\n { key: 'kb.review.form', version: 1, targets: ['react'] },\n ],\n capabilities: {\n requires: [\n { key: 'identity', version: 1 },\n { key: 'notifications', version: 1 },\n { key: 'audit-trail', version: 1 },\n ],\n },\n};\n"],"mappings":";AAEA,MAAaA,0BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAY;GAAQ;GAAS;GAAgB;EACjE,WAAW;EACZ;CACD,YAAY;EACV;GAAE,KAAK;GAAuB,SAAS;GAAG;EAC1C;GAAE,KAAK;GAA+B,SAAS;GAAG;EAClD;GAAE,KAAK;GAA6B,SAAS;GAAG;EAChD;GAAE,KAAK;GAA6B,SAAS;GAAG;EACjD;CACD,QAAQ;EACN;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAAqB,SAAS;GAAG;EACxC;GAAE,KAAK;GAAuB,SAAS;GAAG;EAC1C;GAAE,KAAK;GAAqB,SAAS;GAAG;EACzC;CACD,eAAe;EACb;GAAE,KAAK;GAAgB,SAAS;GAAG;EACnC;GAAE,KAAK;GAAkB,SAAS;GAAG;EACrC;GAAE,KAAK;GAAkB,SAAS;GAAG;EACtC;CACD,kBAAkB;EAChB;GACE,IAAI;IAAE,KAAK;IAAuB,SAAS;IAAG;GAC9C,MAAM;IAAE,KAAK;IAAgB,SAAS;IAAG;GAC1C;EACD;GACE,IAAI;IAAE,KAAK;IAA+B,SAAS;IAAG;GACtD,MAAM;IAAE,KAAK;IAAkB,SAAS;IAAG;GAC5C;EACD;GACE,IAAI;IAAE,KAAK;IAA6B,SAAS;IAAG;GACpD,MAAM;IAAE,KAAK;IAAkB,SAAS;IAAG;GAC5C;EACF;CACD,sBAAsB;EACpB;GAAE,KAAK;GAAgB,SAAS;GAAG,SAAS,CAAC,SAAS,WAAW;GAAE;EACnE;GAAE,KAAK;GAAkB,SAAS;GAAG,SAAS,CAAC,SAAS,WAAW;GAAE;EACrE;GAAE,KAAK;GAAkB,SAAS;GAAG,SAAS,CAAC,QAAQ;GAAE;EAC1D;CACD,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAG;EAC/B;GAAE,KAAK;GAAiB,SAAS;GAAG;EACpC;GAAE,KAAK;GAAe,SAAS;GAAG;EACnC,EACF;CACF"}
1
+ {"version":3,"file":"kb-update-pipeline.feature.js","names":["KbUpdatePipelineFeature: FeatureModuleSpec"],"sources":["../src/kb-update-pipeline.feature.ts"],"sourcesContent":["import type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\nexport const KbUpdatePipelineFeature: FeatureModuleSpec = {\n meta: {\n key: 'kb-update-pipeline',\n version: '1.0.0',\n title: 'KB Update Pipeline (HITL)',\n description:\n 'Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'hitl', 'audit', 'notifications'],\n stability: 'experimental',\n },\n operations: [\n { key: 'kbPipeline.runWatch', version: '1.0.0' },\n { key: 'kbPipeline.createReviewTask', version: '1.0.0' },\n { key: 'kbPipeline.submitDecision', version: '1.0.0' },\n { key: 'kbPipeline.publishIfReady', version: '1.0.0' },\n ],\n events: [\n { key: 'kb.change.detected', version: '1.0.0' },\n { key: 'kb.change.summarized', version: '1.0.0' },\n { key: 'kb.patch.proposed', version: '1.0.0' },\n { key: 'kb.review.requested', version: '1.0.0' },\n { key: 'kb.review.decided', version: '1.0.0' },\n ],\n presentations: [\n { key: 'kb.dashboard', version: '1.0.0' },\n { key: 'kb.review.list', version: '1.0.0' },\n { key: 'kb.review.form', version: '1.0.0' },\n ],\n opToPresentation: [\n {\n op: { key: 'kbPipeline.runWatch', version: '1.0.0' },\n pres: { key: 'kb.dashboard', version: '1.0.0' },\n },\n {\n op: { key: 'kbPipeline.createReviewTask', version: '1.0.0' },\n pres: { key: 'kb.review.list', version: '1.0.0' },\n },\n {\n op: { key: 'kbPipeline.submitDecision', version: '1.0.0' },\n pres: { key: 'kb.review.form', version: '1.0.0' },\n },\n ],\n presentationsTargets: [\n { key: 'kb.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },\n { key: 'kb.review.list', version: '1.0.0', targets: ['react', 'markdown'] },\n { key: 'kb.review.form', version: '1.0.0', targets: ['react'] },\n ],\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n ],\n },\n};\n"],"mappings":";AAEA,MAAaA,0BAA6C;CACxD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AAS;GAAS;EACrC;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC1C;GAAE,KAAK;GAAe,SAAS;GAAS;EACzC,EACF;CACF"}
@@ -75,7 +75,7 @@ const PublishIfReadyOutput = defineSchemaModel$1({
75
75
  const KbPipelineRunWatchContract = defineCommand({
76
76
  meta: {
77
77
  key: "kbPipeline.runWatch",
78
- version: 1,
78
+ version: "1.0.0",
79
79
  stability: "experimental",
80
80
  owners: ["@examples"],
81
81
  tags: [
@@ -96,7 +96,7 @@ const KbPipelineRunWatchContract = defineCommand({
96
96
  const KbPipelineCreateReviewTaskContract = defineCommand({
97
97
  meta: {
98
98
  key: "kbPipeline.createReviewTask",
99
- version: 1,
99
+ version: "1.0.0",
100
100
  stability: "experimental",
101
101
  owners: ["@examples"],
102
102
  tags: [
@@ -117,7 +117,7 @@ const KbPipelineCreateReviewTaskContract = defineCommand({
117
117
  const KbPipelineSubmitDecisionContract = defineCommand({
118
118
  meta: {
119
119
  key: "kbPipeline.submitDecision",
120
- version: 1,
120
+ version: "1.0.0",
121
121
  stability: "experimental",
122
122
  owners: ["@examples"],
123
123
  tags: [
@@ -153,7 +153,7 @@ const KbPipelineSubmitDecisionContract = defineCommand({
153
153
  const KbPipelinePublishIfReadyContract = defineCommand({
154
154
  meta: {
155
155
  key: "kbPipeline.publishIfReady",
156
- version: 1,
156
+ version: "1.0.0",
157
157
  stability: "experimental",
158
158
  owners: ["@examples"],
159
159
  tags: [
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline.js","names":["defineSchemaModel"],"sources":["../../src/operations/pipeline.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\n\nimport {\n ChangeCandidateModel,\n ReviewDecisionEnum,\n ReviewTaskModel,\n} from '../entities/models';\n\nconst RunWatchInput = defineSchemaModel({\n name: 'KbPipelineRunWatchInput',\n description: 'Trigger a watch cycle for KB sources (demo).',\n fields: {\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst RunWatchOutput = defineSchemaModel({\n name: 'KbPipelineRunWatchOutput',\n description: 'Output containing detected changes.',\n fields: {\n candidates: {\n type: ChangeCandidateModel,\n isArray: true,\n isOptional: false,\n },\n },\n});\n\nconst CreateReviewTaskInput = defineSchemaModel({\n name: 'KbPipelineCreateReviewTaskInput',\n description: 'Create a review task for a change candidate.',\n fields: {\n changeCandidateId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n});\n\nconst SubmitDecisionInput = defineSchemaModel({\n name: 'KbPipelineSubmitDecisionInput',\n description: 'Submit a decision for a review task.',\n fields: {\n reviewTaskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n decision: { type: ReviewDecisionEnum, isOptional: false },\n decidedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n decidedByRole: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n});\n\nconst PublishIfReadyInput = defineSchemaModel({\n name: 'KbPipelinePublishIfReadyInput',\n description:\n 'Publish snapshot if approvals are satisfied for a jurisdiction.',\n fields: {\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst PublishIfReadyOutput = defineSchemaModel({\n name: 'KbPipelinePublishIfReadyOutput',\n description: 'Output for publish-if-ready operation.',\n fields: {\n published: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const KbPipelineRunWatchContract = defineCommand({\n meta: {\n key: 'kbPipeline.runWatch',\n version: 1,\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'jobs'],\n description: 'Detect source changes and create change candidates.',\n goal: 'Automate discovery of updates needing review.',\n context: 'Scheduled job or manual trigger in demos.',\n },\n io: { input: RunWatchInput, output: RunWatchOutput },\n policy: { auth: 'user' },\n});\n\nexport const KbPipelineCreateReviewTaskContract = defineCommand({\n meta: {\n key: 'kbPipeline.createReviewTask',\n version: 1,\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'hitl'],\n description: 'Create a review task for a detected change.',\n goal: 'Route work to human verifiers.',\n context: 'Called after change detection or manual selection.',\n },\n io: { input: CreateReviewTaskInput, output: ReviewTaskModel },\n policy: { auth: 'user' },\n});\n\nexport const KbPipelineSubmitDecisionContract = defineCommand({\n meta: {\n key: 'kbPipeline.submitDecision',\n version: 1,\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'hitl', 'rbac'],\n description: 'Submit approve/reject decision for a review task.',\n goal: 'Ensure humans verify before publishing.',\n context: 'Curator/expert reviews and decides.',\n },\n io: {\n input: SubmitDecisionInput,\n output: ReviewTaskModel,\n errors: {\n FORBIDDEN_ROLE: {\n description: 'Role not allowed to approve the given risk level',\n http: 403,\n gqlCode: 'FORBIDDEN_ROLE',\n when: 'curator attempts to approve a high-risk change',\n },\n REVIEW_TASK_NOT_FOUND: {\n description: 'Review task not found',\n http: 404,\n gqlCode: 'REVIEW_TASK_NOT_FOUND',\n when: 'reviewTaskId is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\nexport const KbPipelinePublishIfReadyContract = defineCommand({\n meta: {\n key: 'kbPipeline.publishIfReady',\n version: 1,\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'publishing'],\n description: 'Publish snapshot if ready (all approvals satisfied).',\n goal: 'Prevent publishing until all required approvals exist.',\n context: 'Called by job or UI to attempt publish.',\n },\n io: {\n input: PublishIfReadyInput,\n output: PublishIfReadyOutput,\n errors: {\n NOT_READY: {\n description: 'Publishing is blocked because approvals are incomplete',\n http: 409,\n gqlCode: 'NOT_READY',\n when: 'there are open review tasks or unapproved rule versions',\n },\n },\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;AASA,MAAM,gBAAgBA,oBAAkB;CACtC,MAAM;CACN,aAAa;CAC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;AAEF,MAAa,qCAAqC,cAAc;CAC9D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAY;GAAO;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAiB;CAC7D,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,mCAAmC,cAAc;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAY;GAAQ;GAAO;EAC/C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ;GACN,gBAAgB;IACd,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,uBAAuB;IACrB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,mCAAmC,cAAc;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAY;GAAa;EAC7C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ,EACN,WAAW;GACT,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
1
+ {"version":3,"file":"pipeline.js","names":["defineSchemaModel"],"sources":["../../src/operations/pipeline.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\n\nimport {\n ChangeCandidateModel,\n ReviewDecisionEnum,\n ReviewTaskModel,\n} from '../entities/models';\n\nconst RunWatchInput = defineSchemaModel({\n name: 'KbPipelineRunWatchInput',\n description: 'Trigger a watch cycle for KB sources (demo).',\n fields: {\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst RunWatchOutput = defineSchemaModel({\n name: 'KbPipelineRunWatchOutput',\n description: 'Output containing detected changes.',\n fields: {\n candidates: {\n type: ChangeCandidateModel,\n isArray: true,\n isOptional: false,\n },\n },\n});\n\nconst CreateReviewTaskInput = defineSchemaModel({\n name: 'KbPipelineCreateReviewTaskInput',\n description: 'Create a review task for a change candidate.',\n fields: {\n changeCandidateId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n});\n\nconst SubmitDecisionInput = defineSchemaModel({\n name: 'KbPipelineSubmitDecisionInput',\n description: 'Submit a decision for a review task.',\n fields: {\n reviewTaskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n decision: { type: ReviewDecisionEnum, isOptional: false },\n decidedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n decidedByRole: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n});\n\nconst PublishIfReadyInput = defineSchemaModel({\n name: 'KbPipelinePublishIfReadyInput',\n description:\n 'Publish snapshot if approvals are satisfied for a jurisdiction.',\n fields: {\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst PublishIfReadyOutput = defineSchemaModel({\n name: 'KbPipelinePublishIfReadyOutput',\n description: 'Output for publish-if-ready operation.',\n fields: {\n published: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const KbPipelineRunWatchContract = defineCommand({\n meta: {\n key: 'kbPipeline.runWatch',\n version: '1.0.0',\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'jobs'],\n description: 'Detect source changes and create change candidates.',\n goal: 'Automate discovery of updates needing review.',\n context: 'Scheduled job or manual trigger in demos.',\n },\n io: { input: RunWatchInput, output: RunWatchOutput },\n policy: { auth: 'user' },\n});\n\nexport const KbPipelineCreateReviewTaskContract = defineCommand({\n meta: {\n key: 'kbPipeline.createReviewTask',\n version: '1.0.0',\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'hitl'],\n description: 'Create a review task for a detected change.',\n goal: 'Route work to human verifiers.',\n context: 'Called after change detection or manual selection.',\n },\n io: { input: CreateReviewTaskInput, output: ReviewTaskModel },\n policy: { auth: 'user' },\n});\n\nexport const KbPipelineSubmitDecisionContract = defineCommand({\n meta: {\n key: 'kbPipeline.submitDecision',\n version: '1.0.0',\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'hitl', 'rbac'],\n description: 'Submit approve/reject decision for a review task.',\n goal: 'Ensure humans verify before publishing.',\n context: 'Curator/expert reviews and decides.',\n },\n io: {\n input: SubmitDecisionInput,\n output: ReviewTaskModel,\n errors: {\n FORBIDDEN_ROLE: {\n description: 'Role not allowed to approve the given risk level',\n http: 403,\n gqlCode: 'FORBIDDEN_ROLE',\n when: 'curator attempts to approve a high-risk change',\n },\n REVIEW_TASK_NOT_FOUND: {\n description: 'Review task not found',\n http: 404,\n gqlCode: 'REVIEW_TASK_NOT_FOUND',\n when: 'reviewTaskId is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\nexport const KbPipelinePublishIfReadyContract = defineCommand({\n meta: {\n key: 'kbPipeline.publishIfReady',\n version: '1.0.0',\n stability: 'experimental',\n owners: ['@examples'],\n tags: ['knowledge', 'pipeline', 'publishing'],\n description: 'Publish snapshot if ready (all approvals satisfied).',\n goal: 'Prevent publishing until all required approvals exist.',\n context: 'Called by job or UI to attempt publish.',\n },\n io: {\n input: PublishIfReadyInput,\n output: PublishIfReadyOutput,\n errors: {\n NOT_READY: {\n description: 'Publishing is blocked because approvals are incomplete',\n http: 409,\n gqlCode: 'NOT_READY',\n when: 'there are open review tasks or unapproved r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AAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAe,QAAQ;EAAgB;CACpD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,qCAAqC,cAAc;CAC9D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAY;GAAO;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAiB;CAC7D,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,mCAAmC,cAAc;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAY;GAAQ;GAAO;EAC/C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ;GACN,gBAAgB;IACd,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,uBAAuB;IACrB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,mCAAmC,cAAc;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAY;GAAa;EAC7C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ,EACN,WAAW;GACT,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
@@ -5,7 +5,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
5
5
  const KbDashboardPresentation = {
6
6
  meta: {
7
7
  key: "kb.dashboard",
8
- version: 1,
8
+ version: "1.0.0",
9
9
  title: "KB Update Dashboard",
10
10
  description: "Overview of KB change candidates and review tasks.",
11
11
  domain: "knowledge",
@@ -26,7 +26,7 @@ const KbDashboardPresentation = {
26
26
  const KbReviewListPresentation = {
27
27
  meta: {
28
28
  key: "kb.review.list",
29
- version: 1,
29
+ version: "1.0.0",
30
30
  title: "Review Tasks",
31
31
  description: "List of pending review tasks for the current user.",
32
32
  domain: "knowledge",
@@ -47,7 +47,7 @@ const KbReviewListPresentation = {
47
47
  const KbReviewFormPresentation = {
48
48
  meta: {
49
49
  key: "kb.review.form",
50
- version: 1,
50
+ version: "1.0.0",
51
51
  title: "Review Change",
52
52
  description: "Form to approve or reject a KB change candidate.",
53
53
  domain: "knowledge",
@@ -1 +1 @@
1
- {"version":3,"file":"presentations.js","names":["KbDashboardPresentation: PresentationSpec","KbReviewListPresentation: PresentationSpec","KbReviewFormPresentation: PresentationSpec"],"sources":["../src/presentations.ts"],"sourcesContent":["import { StabilityEnum } from '@contractspec/lib.contracts';\nimport type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { ChangeCandidateModel, ReviewTaskModel } from './entities/models';\n\nexport const KbDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'kb.dashboard',\n version: 1,\n title: 'KB Update Dashboard',\n description: 'Overview of KB change candidates and review tasks.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['dashboard', 'knowledge'],\n stability: StabilityEnum.Experimental,\n goal: 'Visualize status',\n context: 'Dashboard',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'KbDashboard',\n props: ChangeCandidateModel, // Simplified props mapping for example\n },\n targets: ['react', 'markdown'],\n};\n\nexport const KbReviewListPresentation: PresentationSpec = {\n meta: {\n key: 'kb.review.list',\n version: 1,\n title: 'Review Tasks',\n description: 'List of pending review tasks for the current user.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['list', 'review'],\n stability: StabilityEnum.Experimental,\n goal: 'List tasks',\n context: 'Inbox',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewTaskList',\n props: ReviewTaskModel,\n },\n targets: ['react', 'markdown'],\n};\n\nexport const KbReviewFormPresentation: PresentationSpec = {\n meta: {\n key: 'kb.review.form',\n version: 1,\n title: 'Review Change',\n description: 'Form to approve or reject a KB change candidate.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['form', 'review'],\n stability: StabilityEnum.Experimental,\n goal: 'Review',\n context: 'Detail',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewDecisionForm',\n props: ReviewTaskModel,\n },\n targets: ['react'],\n};\n"],"mappings":";;;;AAIA,MAAaA,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,aAAa,YAAY;EAChC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC/B;AAED,MAAaC,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,SAAS;EACxB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC/B;AAED,MAAaC,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,SAAS;EACxB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CACnB"}
1
+ {"version":3,"file":"presentations.js","names":["KbDashboardPresentation: PresentationSpec","KbReviewListPresentation: PresentationSpec","KbReviewFormPresentation: PresentationSpec"],"sources":["../src/presentations.ts"],"sourcesContent":["import { StabilityEnum } from '@contractspec/lib.contracts';\nimport type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { ChangeCandidateModel, ReviewTaskModel } from './entities/models';\n\nexport const KbDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'kb.dashboard',\n version: '1.0.0',\n title: 'KB Update Dashboard',\n description: 'Overview of KB change candidates and review tasks.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['dashboard', 'knowledge'],\n stability: StabilityEnum.Experimental,\n goal: 'Visualize status',\n context: 'Dashboard',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'KbDashboard',\n props: ChangeCandidateModel, // Simplified props mapping for example\n },\n targets: ['react', 'markdown'],\n};\n\nexport const KbReviewListPresentation: PresentationSpec = {\n meta: {\n key: 'kb.review.list',\n version: '1.0.0',\n title: 'Review Tasks',\n description: 'List of pending review tasks for the current user.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['list', 'review'],\n stability: StabilityEnum.Experimental,\n goal: 'List tasks',\n context: 'Inbox',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewTaskList',\n props: ReviewTaskModel,\n },\n targets: ['react', 'markdown'],\n};\n\nexport const KbReviewFormPresentation: PresentationSpec = {\n meta: {\n key: 'kb.review.form',\n version: '1.0.0',\n title: 'Review Change',\n description: 'Form to approve or reject a KB change candidate.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['form', 'review'],\n stability: StabilityEnum.Experimental,\n goal: 'Review',\n context: 'Detail',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewDecisionForm',\n props: ReviewTaskModel,\n },\n targets: ['react'],\n};\n"],"mappings":";;;;AAIA,MAAaA,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,aAAa,YAAY;EAChC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC/B;AAED,MAAaC,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,SAAS;EACxB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC/B;AAED,MAAaC,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM,CAAC,QAAQ,SAAS;EACxB,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.kb-update-pipeline",
3
- "version": "1.44.0",
3
+ "version": "1.45.0",
4
4
  "description": "Example: KB update automation pipeline with HITL review and auditability.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -37,15 +37,15 @@
37
37
  "test": "bun test"
38
38
  },
39
39
  "dependencies": {
40
- "@contractspec/lib.contracts": "1.44.0",
41
- "@contractspec/lib.identity-rbac": "1.44.0",
42
- "@contractspec/lib.schema": "1.44.0",
43
- "@contractspec/module.notifications": "1.44.0",
40
+ "@contractspec/lib.contracts": "1.45.0",
41
+ "@contractspec/lib.identity-rbac": "1.45.0",
42
+ "@contractspec/lib.schema": "1.45.0",
43
+ "@contractspec/module.notifications": "1.45.0",
44
44
  "zod": "^4.1.13"
45
45
  },
46
46
  "devDependencies": {
47
- "@contractspec/tool.tsdown": "1.44.0",
48
- "@contractspec/tool.typescript": "1.44.0",
47
+ "@contractspec/tool.tsdown": "1.45.0",
48
+ "@contractspec/tool.typescript": "1.45.0",
49
49
  "tsdown": "^0.18.3",
50
50
  "typescript": "^5.9.3"
51
51
  },
package/src/events.ts CHANGED
@@ -24,7 +24,7 @@ const KbChangeDetectedPayload = defineSchemaModel({
24
24
  export const KbChangeDetectedEvent = defineEvent({
25
25
  meta: {
26
26
  key: 'kb.change.detected',
27
- version: 1,
27
+ version: '1.0.0',
28
28
  description: 'KB source change detected.',
29
29
  stability: StabilityEnum.Experimental,
30
30
  owners: [],
@@ -49,7 +49,7 @@ const KbChangeSummarizedPayload = defineSchemaModel({
49
49
  export const KbChangeSummarizedEvent = defineEvent({
50
50
  meta: {
51
51
  key: 'kb.change.summarized',
52
- version: 1,
52
+ version: '1.0.0',
53
53
  description: 'KB change summarized.',
54
54
  stability: StabilityEnum.Experimental,
55
55
  owners: [],
@@ -77,7 +77,7 @@ const KbPatchProposedPayload = defineSchemaModel({
77
77
  export const KbPatchProposedEvent = defineEvent({
78
78
  meta: {
79
79
  key: 'kb.patch.proposed',
80
- version: 1,
80
+ version: '1.0.0',
81
81
  description: 'KB rule patch proposed (draft versions created).',
82
82
  stability: StabilityEnum.Experimental,
83
83
  owners: [],
@@ -102,7 +102,7 @@ const KbReviewRequestedPayload = defineSchemaModel({
102
102
  export const KbReviewRequestedEvent = defineEvent({
103
103
  meta: {
104
104
  key: 'kb.review.requested',
105
- version: 1,
105
+ version: '1.0.0',
106
106
  description: 'KB review requested.',
107
107
  stability: StabilityEnum.Experimental,
108
108
  owners: [],
@@ -124,7 +124,7 @@ const KbReviewDecidedPayload = defineSchemaModel({
124
124
  export const KbReviewDecidedEvent = defineEvent({
125
125
  meta: {
126
126
  key: 'kb.review.decided',
127
- version: 1,
127
+ version: '1.0.0',
128
128
  description: 'KB review decided.',
129
129
  stability: StabilityEnum.Experimental,
130
130
  owners: [],
package/src/example.ts CHANGED
@@ -1,11 +1,18 @@
1
- const example = {
2
- id: 'kb-update-pipeline',
3
- title: 'KB Update Pipeline',
4
- summary:
5
- 'Automation proposes KB updates; humans verify; everything audited and notified.',
6
- tags: ['knowledge', 'pipeline', 'hitl', 'audit'],
7
- kind: 'knowledge',
8
- visibility: 'public',
1
+ import type { ExampleSpec } from '@contractspec/lib.contracts';
2
+
3
+ const example: ExampleSpec = {
4
+ meta: {
5
+ key: 'kb-update-pipeline',
6
+ version: '1.0.0',
7
+ title: 'KB Update Pipeline',
8
+ description:
9
+ 'Automation proposes KB updates; humans verify; everything audited and notified.',
10
+ kind: 'knowledge',
11
+ visibility: 'public',
12
+ stability: 'experimental',
13
+ owners: ['@platform.core'],
14
+ tags: ['knowledge', 'pipeline', 'hitl', 'audit'],
15
+ },
9
16
  docs: {
10
17
  rootDocId: 'docs.examples.kb-update-pipeline',
11
18
  },
@@ -22,6 +29,6 @@ const example = {
22
29
  studio: { enabled: true, installable: true },
23
30
  mcp: { enabled: true },
24
31
  },
25
- } as const;
32
+ };
26
33
 
27
34
  export default example;
package/src/feature.ts CHANGED
@@ -3,7 +3,7 @@ import type { FeatureModuleSpec } from '@contractspec/lib.contracts';
3
3
  export const KbUpdatePipelineFeature: FeatureModuleSpec = {
4
4
  meta: {
5
5
  key: 'kb-update-pipeline',
6
- version: 1,
6
+ version: '1.0.0',
7
7
  title: 'KB Update Pipeline (HITL)',
8
8
  description:
9
9
  'Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.',
@@ -13,26 +13,26 @@ export const KbUpdatePipelineFeature: FeatureModuleSpec = {
13
13
  stability: 'experimental',
14
14
  },
15
15
  operations: [
16
- { key: 'kbPipeline.runWatch', version: 1 },
17
- { key: 'kbPipeline.createReviewTask', version: 1 },
18
- { key: 'kbPipeline.submitDecision', version: 1 },
19
- { key: 'kbPipeline.publishIfReady', version: 1 },
16
+ { key: 'kbPipeline.runWatch', version: '1.0.0' },
17
+ { key: 'kbPipeline.createReviewTask', version: '1.0.0' },
18
+ { key: 'kbPipeline.submitDecision', version: '1.0.0' },
19
+ { key: 'kbPipeline.publishIfReady', version: '1.0.0' },
20
20
  ],
21
21
  events: [
22
- { key: 'kb.change.detected', version: 1 },
23
- { key: 'kb.change.summarized', version: 1 },
24
- { key: 'kb.patch.proposed', version: 1 },
25
- { key: 'kb.review.requested', version: 1 },
26
- { key: 'kb.review.decided', version: 1 },
22
+ { key: 'kb.change.detected', version: '1.0.0' },
23
+ { key: 'kb.change.summarized', version: '1.0.0' },
24
+ { key: 'kb.patch.proposed', version: '1.0.0' },
25
+ { key: 'kb.review.requested', version: '1.0.0' },
26
+ { key: 'kb.review.decided', version: '1.0.0' },
27
27
  ],
28
28
  presentations: [],
29
29
  opToPresentation: [],
30
30
  presentationsTargets: [],
31
31
  capabilities: {
32
32
  requires: [
33
- { key: 'identity', version: 1 },
34
- { key: 'notifications', version: 1 },
35
- { key: 'audit-trail', version: 1 },
33
+ { key: 'identity', version: '1.0.0' },
34
+ { key: 'notifications', version: '1.0.0' },
35
+ { key: 'audit-trail', version: '1.0.0' },
36
36
  ],
37
37
  },
38
38
  };
@@ -3,7 +3,7 @@ import type { FeatureModuleSpec } from '@contractspec/lib.contracts';
3
3
  export const KbUpdatePipelineFeature: FeatureModuleSpec = {
4
4
  meta: {
5
5
  key: 'kb-update-pipeline',
6
- version: 1,
6
+ version: '1.0.0',
7
7
  title: 'KB Update Pipeline (HITL)',
8
8
  description:
9
9
  'Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.',
@@ -13,47 +13,47 @@ export const KbUpdatePipelineFeature: FeatureModuleSpec = {
13
13
  stability: 'experimental',
14
14
  },
15
15
  operations: [
16
- { key: 'kbPipeline.runWatch', version: 1 },
17
- { key: 'kbPipeline.createReviewTask', version: 1 },
18
- { key: 'kbPipeline.submitDecision', version: 1 },
19
- { key: 'kbPipeline.publishIfReady', version: 1 },
16
+ { key: 'kbPipeline.runWatch', version: '1.0.0' },
17
+ { key: 'kbPipeline.createReviewTask', version: '1.0.0' },
18
+ { key: 'kbPipeline.submitDecision', version: '1.0.0' },
19
+ { key: 'kbPipeline.publishIfReady', version: '1.0.0' },
20
20
  ],
21
21
  events: [
22
- { key: 'kb.change.detected', version: 1 },
23
- { key: 'kb.change.summarized', version: 1 },
24
- { key: 'kb.patch.proposed', version: 1 },
25
- { key: 'kb.review.requested', version: 1 },
26
- { key: 'kb.review.decided', version: 1 },
22
+ { key: 'kb.change.detected', version: '1.0.0' },
23
+ { key: 'kb.change.summarized', version: '1.0.0' },
24
+ { key: 'kb.patch.proposed', version: '1.0.0' },
25
+ { key: 'kb.review.requested', version: '1.0.0' },
26
+ { key: 'kb.review.decided', version: '1.0.0' },
27
27
  ],
28
28
  presentations: [
29
- { key: 'kb.dashboard', version: 1 },
30
- { key: 'kb.review.list', version: 1 },
31
- { key: 'kb.review.form', version: 1 },
29
+ { key: 'kb.dashboard', version: '1.0.0' },
30
+ { key: 'kb.review.list', version: '1.0.0' },
31
+ { key: 'kb.review.form', version: '1.0.0' },
32
32
  ],
33
33
  opToPresentation: [
34
34
  {
35
- op: { key: 'kbPipeline.runWatch', version: 1 },
36
- pres: { key: 'kb.dashboard', version: 1 },
35
+ op: { key: 'kbPipeline.runWatch', version: '1.0.0' },
36
+ pres: { key: 'kb.dashboard', version: '1.0.0' },
37
37
  },
38
38
  {
39
- op: { key: 'kbPipeline.createReviewTask', version: 1 },
40
- pres: { key: 'kb.review.list', version: 1 },
39
+ op: { key: 'kbPipeline.createReviewTask', version: '1.0.0' },
40
+ pres: { key: 'kb.review.list', version: '1.0.0' },
41
41
  },
42
42
  {
43
- op: { key: 'kbPipeline.submitDecision', version: 1 },
44
- pres: { key: 'kb.review.form', version: 1 },
43
+ op: { key: 'kbPipeline.submitDecision', version: '1.0.0' },
44
+ pres: { key: 'kb.review.form', version: '1.0.0' },
45
45
  },
46
46
  ],
47
47
  presentationsTargets: [
48
- { key: 'kb.dashboard', version: 1, targets: ['react', 'markdown'] },
49
- { key: 'kb.review.list', version: 1, targets: ['react', 'markdown'] },
50
- { key: 'kb.review.form', version: 1, targets: ['react'] },
48
+ { key: 'kb.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },
49
+ { key: 'kb.review.list', version: '1.0.0', targets: ['react', 'markdown'] },
50
+ { key: 'kb.review.form', version: '1.0.0', targets: ['react'] },
51
51
  ],
52
52
  capabilities: {
53
53
  requires: [
54
- { key: 'identity', version: 1 },
55
- { key: 'notifications', version: 1 },
56
- { key: 'audit-trail', version: 1 },
54
+ { key: 'identity', version: '1.0.0' },
55
+ { key: 'notifications', version: '1.0.0' },
56
+ { key: 'audit-trail', version: '1.0.0' },
57
57
  ],
58
58
  },
59
59
  };
@@ -73,7 +73,7 @@ const PublishIfReadyOutput = defineSchemaModel({
73
73
  export const KbPipelineRunWatchContract = defineCommand({
74
74
  meta: {
75
75
  key: 'kbPipeline.runWatch',
76
- version: 1,
76
+ version: '1.0.0',
77
77
  stability: 'experimental',
78
78
  owners: ['@examples'],
79
79
  tags: ['knowledge', 'pipeline', 'jobs'],
@@ -88,7 +88,7 @@ export const KbPipelineRunWatchContract = defineCommand({
88
88
  export const KbPipelineCreateReviewTaskContract = defineCommand({
89
89
  meta: {
90
90
  key: 'kbPipeline.createReviewTask',
91
- version: 1,
91
+ version: '1.0.0',
92
92
  stability: 'experimental',
93
93
  owners: ['@examples'],
94
94
  tags: ['knowledge', 'pipeline', 'hitl'],
@@ -103,7 +103,7 @@ export const KbPipelineCreateReviewTaskContract = defineCommand({
103
103
  export const KbPipelineSubmitDecisionContract = defineCommand({
104
104
  meta: {
105
105
  key: 'kbPipeline.submitDecision',
106
- version: 1,
106
+ version: '1.0.0',
107
107
  stability: 'experimental',
108
108
  owners: ['@examples'],
109
109
  tags: ['knowledge', 'pipeline', 'hitl', 'rbac'],
@@ -135,7 +135,7 @@ export const KbPipelineSubmitDecisionContract = defineCommand({
135
135
  export const KbPipelinePublishIfReadyContract = defineCommand({
136
136
  meta: {
137
137
  key: 'kbPipeline.publishIfReady',
138
- version: 1,
138
+ version: '1.0.0',
139
139
  stability: 'experimental',
140
140
  owners: ['@examples'],
141
141
  tags: ['knowledge', 'pipeline', 'publishing'],
@@ -5,7 +5,7 @@ import { ChangeCandidateModel, ReviewTaskModel } from './entities/models';
5
5
  export const KbDashboardPresentation: PresentationSpec = {
6
6
  meta: {
7
7
  key: 'kb.dashboard',
8
- version: 1,
8
+ version: '1.0.0',
9
9
  title: 'KB Update Dashboard',
10
10
  description: 'Overview of KB change candidates and review tasks.',
11
11
  domain: 'knowledge',
@@ -27,7 +27,7 @@ export const KbDashboardPresentation: PresentationSpec = {
27
27
  export const KbReviewListPresentation: PresentationSpec = {
28
28
  meta: {
29
29
  key: 'kb.review.list',
30
- version: 1,
30
+ version: '1.0.0',
31
31
  title: 'Review Tasks',
32
32
  description: 'List of pending review tasks for the current user.',
33
33
  domain: 'knowledge',
@@ -49,7 +49,7 @@ export const KbReviewListPresentation: PresentationSpec = {
49
49
  export const KbReviewFormPresentation: PresentationSpec = {
50
50
  meta: {
51
51
  key: 'kb.review.form',
52
- version: 1,
52
+ version: '1.0.0',
53
53
  title: 'Review Change',
54
54
  description: 'Form to approve or reject a KB change candidate.',
55
55
  domain: 'knowledge',