@contractspec/example.kb-update-pipeline 0.0.0-canary-20260113162409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$bundle.log +55 -0
- package/.turbo/turbo-build.log +56 -0
- package/CHANGELOG.md +342 -0
- package/LICENSE +21 -0
- package/README.md +28 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/kb-update-pipeline.docblock.d.ts +1 -0
- package/dist/docs/kb-update-pipeline.docblock.js +31 -0
- package/dist/docs/kb-update-pipeline.docblock.js.map +1 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.js +3 -0
- package/dist/entities/models.d.ts +61 -0
- package/dist/entities/models.d.ts.map +1 -0
- package/dist/entities/models.js +74 -0
- package/dist/entities/models.js.map +1 -0
- package/dist/events.d.ts +74 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +150 -0
- package/dist/events.js.map +1 -0
- package/dist/example.d.ts +7 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +50 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +2 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/memory.handlers.d.ts +68 -0
- package/dist/handlers/memory.handlers.d.ts.map +1 -0
- package/dist/handlers/memory.handlers.js +93 -0
- package/dist/handlers/memory.handlers.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +12 -0
- package/dist/kb-update-pipeline.feature.d.ts +7 -0
- package/dist/kb-update-pipeline.feature.d.ts.map +1 -0
- package/dist/kb-update-pipeline.feature.js +142 -0
- package/dist/kb-update-pipeline.feature.js.map +1 -0
- package/dist/operations/index.d.ts +2 -0
- package/dist/operations/index.js +3 -0
- package/dist/operations/pipeline.d.ts +137 -0
- package/dist/operations/pipeline.d.ts.map +1 -0
- package/dist/operations/pipeline.js +183 -0
- package/dist/operations/pipeline.js.map +1 -0
- package/dist/presentations.d.ts +9 -0
- package/dist/presentations.d.ts.map +1 -0
- package/dist/presentations.js +71 -0
- package/dist/presentations.js.map +1 -0
- package/dist/tests/operations.test-spec.d.ts +9 -0
- package/dist/tests/operations.test-spec.d.ts.map +1 -0
- package/dist/tests/operations.test-spec.js +94 -0
- package/dist/tests/operations.test-spec.js.map +1 -0
- package/example.ts +1 -0
- package/package.json +74 -0
- package/src/docs/index.ts +1 -0
- package/src/docs/kb-update-pipeline.docblock.ts +30 -0
- package/src/entities/index.ts +1 -0
- package/src/entities/models.ts +53 -0
- package/src/events.ts +134 -0
- package/src/example.ts +34 -0
- package/src/handlers/index.ts +1 -0
- package/src/handlers/memory.handlers.test.ts +81 -0
- package/src/handlers/memory.handlers.ts +186 -0
- package/src/index.ts +15 -0
- package/src/kb-update-pipeline.feature.ts +59 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/pipeline.ts +159 -0
- package/src/presentations.ts +68 -0
- package/src/tests/operations.test-spec.ts +82 -0
- package/tsconfig.json +19 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +17 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineFeature } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/kb-update-pipeline.feature.ts
|
|
4
|
+
const KbUpdatePipelineFeature = defineFeature({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "kb-update-pipeline",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
title: "KB Update Pipeline (HITL)",
|
|
9
|
+
description: "Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.",
|
|
10
|
+
domain: "knowledge",
|
|
11
|
+
owners: ["@examples"],
|
|
12
|
+
tags: [
|
|
13
|
+
"knowledge",
|
|
14
|
+
"pipeline",
|
|
15
|
+
"hitl",
|
|
16
|
+
"audit",
|
|
17
|
+
"notifications"
|
|
18
|
+
],
|
|
19
|
+
stability: "experimental"
|
|
20
|
+
},
|
|
21
|
+
operations: [
|
|
22
|
+
{
|
|
23
|
+
key: "kbPipeline.runWatch",
|
|
24
|
+
version: "1.0.0"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: "kbPipeline.createReviewTask",
|
|
28
|
+
version: "1.0.0"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "kbPipeline.submitDecision",
|
|
32
|
+
version: "1.0.0"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: "kbPipeline.publishIfReady",
|
|
36
|
+
version: "1.0.0"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
events: [
|
|
40
|
+
{
|
|
41
|
+
key: "kb.change.detected",
|
|
42
|
+
version: "1.0.0"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: "kb.change.summarized",
|
|
46
|
+
version: "1.0.0"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "kb.patch.proposed",
|
|
50
|
+
version: "1.0.0"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "kb.review.requested",
|
|
54
|
+
version: "1.0.0"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "kb.review.decided",
|
|
58
|
+
version: "1.0.0"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
presentations: [
|
|
62
|
+
{
|
|
63
|
+
key: "kb.dashboard",
|
|
64
|
+
version: "1.0.0"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: "kb.review.list",
|
|
68
|
+
version: "1.0.0"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "kb.review.form",
|
|
72
|
+
version: "1.0.0"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
opToPresentation: [
|
|
76
|
+
{
|
|
77
|
+
op: {
|
|
78
|
+
key: "kbPipeline.runWatch",
|
|
79
|
+
version: "1.0.0"
|
|
80
|
+
},
|
|
81
|
+
pres: {
|
|
82
|
+
key: "kb.dashboard",
|
|
83
|
+
version: "1.0.0"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
op: {
|
|
88
|
+
key: "kbPipeline.createReviewTask",
|
|
89
|
+
version: "1.0.0"
|
|
90
|
+
},
|
|
91
|
+
pres: {
|
|
92
|
+
key: "kb.review.list",
|
|
93
|
+
version: "1.0.0"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
op: {
|
|
98
|
+
key: "kbPipeline.submitDecision",
|
|
99
|
+
version: "1.0.0"
|
|
100
|
+
},
|
|
101
|
+
pres: {
|
|
102
|
+
key: "kb.review.form",
|
|
103
|
+
version: "1.0.0"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
presentationsTargets: [
|
|
108
|
+
{
|
|
109
|
+
key: "kb.dashboard",
|
|
110
|
+
version: "1.0.0",
|
|
111
|
+
targets: ["react", "markdown"]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
key: "kb.review.list",
|
|
115
|
+
version: "1.0.0",
|
|
116
|
+
targets: ["react", "markdown"]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
key: "kb.review.form",
|
|
120
|
+
version: "1.0.0",
|
|
121
|
+
targets: ["react"]
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
capabilities: { requires: [
|
|
125
|
+
{
|
|
126
|
+
key: "identity",
|
|
127
|
+
version: "1.0.0"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
key: "notifications",
|
|
131
|
+
version: "1.0.0"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
key: "audit-trail",
|
|
135
|
+
version: "1.0.0"
|
|
136
|
+
}
|
|
137
|
+
] }
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
export { KbUpdatePipelineFeature };
|
|
142
|
+
//# sourceMappingURL=kb-update-pipeline.feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kb-update-pipeline.feature.js","names":[],"sources":["../src/kb-update-pipeline.feature.ts"],"sourcesContent":["import { defineFeature } from '@contractspec/lib.contracts';\n\nexport const KbUpdatePipelineFeature = defineFeature({\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,MAAa,0BAA0B,cAAc;CACnD,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;GAAS;EAChD;GAAE,KAAK;GAA+B,SAAS;GAAS;EACxD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACvD;CACD,QAAQ;EACN;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC9C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC/C;CACD,eAAe;EACb;GAAE,KAAK;GAAgB,SAAS;GAAS;EACzC;GAAE,KAAK;GAAkB,SAAS;GAAS;EAC3C;GAAE,KAAK;GAAkB,SAAS;GAAS;EAC5C;CACD,kBAAkB;EAChB;GACE,IAAI;IAAE,KAAK;IAAuB,SAAS;IAAS;GACpD,MAAM;IAAE,KAAK;IAAgB,SAAS;IAAS;GAChD;EACD;GACE,IAAI;IAAE,KAAK;IAA+B,SAAS;IAAS;GAC5D,MAAM;IAAE,KAAK;IAAkB,SAAS;IAAS;GAClD;EACD;GACE,IAAI;IAAE,KAAK;IAA6B,SAAS;IAAS;GAC1D,MAAM;IAAE,KAAK;IAAkB,SAAS;IAAS;GAClD;EACF;CACD,sBAAsB;EACpB;GAAE,KAAK;GAAgB,SAAS;GAAS,SAAS,CAAC,SAAS,WAAW;GAAE;EACzE;GAAE,KAAK;GAAkB,SAAS;GAAS,SAAS,CAAC,SAAS,WAAW;GAAE;EAC3E;GAAE,KAAK;GAAkB,SAAS;GAAS,SAAS,CAAC,QAAQ;GAAE;EAChE;CACD,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC1C;GAAE,KAAK;GAAe,SAAS;GAAS;EACzC,EACF;CACF,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract } from "./pipeline.js";
|
|
2
|
+
export { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract } from "./pipeline.js";
|
|
2
|
+
|
|
3
|
+
export { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts12 from "@contractspec/lib.contracts";
|
|
2
|
+
import * as _contractspec_lib_schema35 from "@contractspec/lib.schema";
|
|
3
|
+
|
|
4
|
+
//#region src/operations/pipeline.d.ts
|
|
5
|
+
declare const KbPipelineRunWatchContract: _contractspec_lib_contracts12.OperationSpec<_contractspec_lib_schema35.SchemaModel<{
|
|
6
|
+
jurisdiction: {
|
|
7
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
8
|
+
isOptional: false;
|
|
9
|
+
};
|
|
10
|
+
}>, _contractspec_lib_schema35.SchemaModel<{
|
|
11
|
+
candidates: {
|
|
12
|
+
type: _contractspec_lib_schema35.SchemaModel<{
|
|
13
|
+
id: {
|
|
14
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
sourceDocumentId: {
|
|
18
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
detectedAt: {
|
|
22
|
+
type: _contractspec_lib_schema35.FieldType<Date, string>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
diffSummary: {
|
|
26
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
27
|
+
isOptional: false;
|
|
28
|
+
};
|
|
29
|
+
riskLevel: {
|
|
30
|
+
type: _contractspec_lib_schema35.EnumType<[string, string, string]>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
isArray: true;
|
|
35
|
+
isOptional: false;
|
|
36
|
+
};
|
|
37
|
+
}>, undefined>;
|
|
38
|
+
declare const KbPipelineCreateReviewTaskContract: _contractspec_lib_contracts12.OperationSpec<_contractspec_lib_schema35.SchemaModel<{
|
|
39
|
+
changeCandidateId: {
|
|
40
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
41
|
+
isOptional: false;
|
|
42
|
+
};
|
|
43
|
+
}>, _contractspec_lib_schema35.SchemaModel<{
|
|
44
|
+
id: {
|
|
45
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
46
|
+
isOptional: false;
|
|
47
|
+
};
|
|
48
|
+
changeCandidateId: {
|
|
49
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
50
|
+
isOptional: false;
|
|
51
|
+
};
|
|
52
|
+
status: {
|
|
53
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
54
|
+
isOptional: false;
|
|
55
|
+
};
|
|
56
|
+
assignedRole: {
|
|
57
|
+
type: _contractspec_lib_schema35.EnumType<[string, string]>;
|
|
58
|
+
isOptional: false;
|
|
59
|
+
};
|
|
60
|
+
decision: {
|
|
61
|
+
type: _contractspec_lib_schema35.EnumType<[string, string]>;
|
|
62
|
+
isOptional: true;
|
|
63
|
+
};
|
|
64
|
+
decidedAt: {
|
|
65
|
+
type: _contractspec_lib_schema35.FieldType<Date, string>;
|
|
66
|
+
isOptional: true;
|
|
67
|
+
};
|
|
68
|
+
decidedBy: {
|
|
69
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
70
|
+
isOptional: true;
|
|
71
|
+
};
|
|
72
|
+
}>, undefined>;
|
|
73
|
+
declare const KbPipelineSubmitDecisionContract: _contractspec_lib_contracts12.OperationSpec<_contractspec_lib_schema35.SchemaModel<{
|
|
74
|
+
reviewTaskId: {
|
|
75
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
76
|
+
isOptional: false;
|
|
77
|
+
};
|
|
78
|
+
decision: {
|
|
79
|
+
type: _contractspec_lib_schema35.EnumType<[string, string]>;
|
|
80
|
+
isOptional: false;
|
|
81
|
+
};
|
|
82
|
+
decidedBy: {
|
|
83
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
84
|
+
isOptional: false;
|
|
85
|
+
};
|
|
86
|
+
decidedByRole: {
|
|
87
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
88
|
+
isOptional: false;
|
|
89
|
+
};
|
|
90
|
+
}>, _contractspec_lib_schema35.SchemaModel<{
|
|
91
|
+
id: {
|
|
92
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
93
|
+
isOptional: false;
|
|
94
|
+
};
|
|
95
|
+
changeCandidateId: {
|
|
96
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
97
|
+
isOptional: false;
|
|
98
|
+
};
|
|
99
|
+
status: {
|
|
100
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
101
|
+
isOptional: false;
|
|
102
|
+
};
|
|
103
|
+
assignedRole: {
|
|
104
|
+
type: _contractspec_lib_schema35.EnumType<[string, string]>;
|
|
105
|
+
isOptional: false;
|
|
106
|
+
};
|
|
107
|
+
decision: {
|
|
108
|
+
type: _contractspec_lib_schema35.EnumType<[string, string]>;
|
|
109
|
+
isOptional: true;
|
|
110
|
+
};
|
|
111
|
+
decidedAt: {
|
|
112
|
+
type: _contractspec_lib_schema35.FieldType<Date, string>;
|
|
113
|
+
isOptional: true;
|
|
114
|
+
};
|
|
115
|
+
decidedBy: {
|
|
116
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
117
|
+
isOptional: true;
|
|
118
|
+
};
|
|
119
|
+
}>, undefined>;
|
|
120
|
+
declare const KbPipelinePublishIfReadyContract: _contractspec_lib_contracts12.OperationSpec<_contractspec_lib_schema35.SchemaModel<{
|
|
121
|
+
jurisdiction: {
|
|
122
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
123
|
+
isOptional: false;
|
|
124
|
+
};
|
|
125
|
+
}>, _contractspec_lib_schema35.SchemaModel<{
|
|
126
|
+
published: {
|
|
127
|
+
type: _contractspec_lib_schema35.FieldType<boolean, boolean>;
|
|
128
|
+
isOptional: false;
|
|
129
|
+
};
|
|
130
|
+
reason: {
|
|
131
|
+
type: _contractspec_lib_schema35.FieldType<string, string>;
|
|
132
|
+
isOptional: true;
|
|
133
|
+
};
|
|
134
|
+
}>, undefined>;
|
|
135
|
+
//#endregion
|
|
136
|
+
export { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract };
|
|
137
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","names":[],"sources":["../../src/operations/pipeline.ts"],"sourcesContent":[],"mappings":";;;;cAwEa,0DAA0B,yCAAA;;UAarC,0BAAA,CAAA;;EAbW,CAAA;CAaX,CAAA,wCAAA,CAAA;;IAbqC,IAAA,wCAAA,CAAA;;cAAA,0BAAA,CAAA;;;;;;;MAAA,UAAA,EAAA;QAe1B,IAAA,sCAaX,KAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,KAAA;;MAb6C,WAAA,EAAA;;;;;;;;;;IAAA,UAAA,EAAA,KAAA;EAelC,CAAA;CA8BX,CAAA,EAAA,SAAA,CAAA;cA7CW,kEAAkC,yCAAA;;UAa7C,0BAAA,CAAA;;EAE2C,CAAA;;;UAfE,0BAAA,CAAA;;;;;;;EAeF,MAAA,EAAA;IAgChC,IAAA,sCAwBX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;EAxB2C,YAAA,EAAA;;;;EAAA,QAAA,EAAA;;;;;;;;;;;;;cAhChC,gEAAgC,yCAAA;;UA8B3C,0BAAA,CAAA;;;;;;;;;;;;;;;;;UA9B2C,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgChC,gEAAgC,yCAAA;;UAwB3C,0BAAA,CAAA;;;;;UAxB2C,0BAAA,CAAA"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { ChangeCandidateModel, ReviewDecisionEnum, ReviewTaskModel } from "../entities/models.js";
|
|
2
|
+
import { defineCommand } from "@contractspec/lib.contracts";
|
|
3
|
+
import { ScalarTypeEnum, defineSchemaModel as defineSchemaModel$1 } from "@contractspec/lib.schema";
|
|
4
|
+
|
|
5
|
+
//#region src/operations/pipeline.ts
|
|
6
|
+
const RunWatchInput = defineSchemaModel$1({
|
|
7
|
+
name: "KbPipelineRunWatchInput",
|
|
8
|
+
description: "Trigger a watch cycle for KB sources (demo).",
|
|
9
|
+
fields: { jurisdiction: {
|
|
10
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
11
|
+
isOptional: false
|
|
12
|
+
} }
|
|
13
|
+
});
|
|
14
|
+
const RunWatchOutput = defineSchemaModel$1({
|
|
15
|
+
name: "KbPipelineRunWatchOutput",
|
|
16
|
+
description: "Output containing detected changes.",
|
|
17
|
+
fields: { candidates: {
|
|
18
|
+
type: ChangeCandidateModel,
|
|
19
|
+
isArray: true,
|
|
20
|
+
isOptional: false
|
|
21
|
+
} }
|
|
22
|
+
});
|
|
23
|
+
const CreateReviewTaskInput = defineSchemaModel$1({
|
|
24
|
+
name: "KbPipelineCreateReviewTaskInput",
|
|
25
|
+
description: "Create a review task for a change candidate.",
|
|
26
|
+
fields: { changeCandidateId: {
|
|
27
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
28
|
+
isOptional: false
|
|
29
|
+
} }
|
|
30
|
+
});
|
|
31
|
+
const SubmitDecisionInput = defineSchemaModel$1({
|
|
32
|
+
name: "KbPipelineSubmitDecisionInput",
|
|
33
|
+
description: "Submit a decision for a review task.",
|
|
34
|
+
fields: {
|
|
35
|
+
reviewTaskId: {
|
|
36
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
37
|
+
isOptional: false
|
|
38
|
+
},
|
|
39
|
+
decision: {
|
|
40
|
+
type: ReviewDecisionEnum,
|
|
41
|
+
isOptional: false
|
|
42
|
+
},
|
|
43
|
+
decidedBy: {
|
|
44
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
45
|
+
isOptional: false
|
|
46
|
+
},
|
|
47
|
+
decidedByRole: {
|
|
48
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
+
isOptional: false
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const PublishIfReadyInput = defineSchemaModel$1({
|
|
54
|
+
name: "KbPipelinePublishIfReadyInput",
|
|
55
|
+
description: "Publish snapshot if approvals are satisfied for a jurisdiction.",
|
|
56
|
+
fields: { jurisdiction: {
|
|
57
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
58
|
+
isOptional: false
|
|
59
|
+
} }
|
|
60
|
+
});
|
|
61
|
+
const PublishIfReadyOutput = defineSchemaModel$1({
|
|
62
|
+
name: "KbPipelinePublishIfReadyOutput",
|
|
63
|
+
description: "Output for publish-if-ready operation.",
|
|
64
|
+
fields: {
|
|
65
|
+
published: {
|
|
66
|
+
type: ScalarTypeEnum.Boolean(),
|
|
67
|
+
isOptional: false
|
|
68
|
+
},
|
|
69
|
+
reason: {
|
|
70
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
71
|
+
isOptional: true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
const KbPipelineRunWatchContract = defineCommand({
|
|
76
|
+
meta: {
|
|
77
|
+
key: "kbPipeline.runWatch",
|
|
78
|
+
version: "1.0.0",
|
|
79
|
+
stability: "experimental",
|
|
80
|
+
owners: ["@examples"],
|
|
81
|
+
tags: [
|
|
82
|
+
"knowledge",
|
|
83
|
+
"pipeline",
|
|
84
|
+
"jobs"
|
|
85
|
+
],
|
|
86
|
+
description: "Detect source changes and create change candidates.",
|
|
87
|
+
goal: "Automate discovery of updates needing review.",
|
|
88
|
+
context: "Scheduled job or manual trigger in demos."
|
|
89
|
+
},
|
|
90
|
+
io: {
|
|
91
|
+
input: RunWatchInput,
|
|
92
|
+
output: RunWatchOutput
|
|
93
|
+
},
|
|
94
|
+
policy: { auth: "user" }
|
|
95
|
+
});
|
|
96
|
+
const KbPipelineCreateReviewTaskContract = defineCommand({
|
|
97
|
+
meta: {
|
|
98
|
+
key: "kbPipeline.createReviewTask",
|
|
99
|
+
version: "1.0.0",
|
|
100
|
+
stability: "experimental",
|
|
101
|
+
owners: ["@examples"],
|
|
102
|
+
tags: [
|
|
103
|
+
"knowledge",
|
|
104
|
+
"pipeline",
|
|
105
|
+
"hitl"
|
|
106
|
+
],
|
|
107
|
+
description: "Create a review task for a detected change.",
|
|
108
|
+
goal: "Route work to human verifiers.",
|
|
109
|
+
context: "Called after change detection or manual selection."
|
|
110
|
+
},
|
|
111
|
+
io: {
|
|
112
|
+
input: CreateReviewTaskInput,
|
|
113
|
+
output: ReviewTaskModel
|
|
114
|
+
},
|
|
115
|
+
policy: { auth: "user" }
|
|
116
|
+
});
|
|
117
|
+
const KbPipelineSubmitDecisionContract = defineCommand({
|
|
118
|
+
meta: {
|
|
119
|
+
key: "kbPipeline.submitDecision",
|
|
120
|
+
version: "1.0.0",
|
|
121
|
+
stability: "experimental",
|
|
122
|
+
owners: ["@examples"],
|
|
123
|
+
tags: [
|
|
124
|
+
"knowledge",
|
|
125
|
+
"pipeline",
|
|
126
|
+
"hitl",
|
|
127
|
+
"rbac"
|
|
128
|
+
],
|
|
129
|
+
description: "Submit approve/reject decision for a review task.",
|
|
130
|
+
goal: "Ensure humans verify before publishing.",
|
|
131
|
+
context: "Curator/expert reviews and decides."
|
|
132
|
+
},
|
|
133
|
+
io: {
|
|
134
|
+
input: SubmitDecisionInput,
|
|
135
|
+
output: ReviewTaskModel,
|
|
136
|
+
errors: {
|
|
137
|
+
FORBIDDEN_ROLE: {
|
|
138
|
+
description: "Role not allowed to approve the given risk level",
|
|
139
|
+
http: 403,
|
|
140
|
+
gqlCode: "FORBIDDEN_ROLE",
|
|
141
|
+
when: "curator attempts to approve a high-risk change"
|
|
142
|
+
},
|
|
143
|
+
REVIEW_TASK_NOT_FOUND: {
|
|
144
|
+
description: "Review task not found",
|
|
145
|
+
http: 404,
|
|
146
|
+
gqlCode: "REVIEW_TASK_NOT_FOUND",
|
|
147
|
+
when: "reviewTaskId is invalid"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
policy: { auth: "user" }
|
|
152
|
+
});
|
|
153
|
+
const KbPipelinePublishIfReadyContract = defineCommand({
|
|
154
|
+
meta: {
|
|
155
|
+
key: "kbPipeline.publishIfReady",
|
|
156
|
+
version: "1.0.0",
|
|
157
|
+
stability: "experimental",
|
|
158
|
+
owners: ["@examples"],
|
|
159
|
+
tags: [
|
|
160
|
+
"knowledge",
|
|
161
|
+
"pipeline",
|
|
162
|
+
"publishing"
|
|
163
|
+
],
|
|
164
|
+
description: "Publish snapshot if ready (all approvals satisfied).",
|
|
165
|
+
goal: "Prevent publishing until all required approvals exist.",
|
|
166
|
+
context: "Called by job or UI to attempt publish."
|
|
167
|
+
},
|
|
168
|
+
io: {
|
|
169
|
+
input: PublishIfReadyInput,
|
|
170
|
+
output: PublishIfReadyOutput,
|
|
171
|
+
errors: { NOT_READY: {
|
|
172
|
+
description: "Publishing is blocked because approvals are incomplete",
|
|
173
|
+
http: 409,
|
|
174
|
+
gqlCode: "NOT_READY",
|
|
175
|
+
when: "there are open review tasks or unapproved rule versions"
|
|
176
|
+
} }
|
|
177
|
+
},
|
|
178
|
+
policy: { auth: "user" }
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
//#endregion
|
|
182
|
+
export { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract };
|
|
183
|
+
//# sourceMappingURL=pipeline.js.map
|
|
@@ -0,0 +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.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 rule versions',\n },\n },\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;AASA,MAAM,gBAAgBA,oBAAkB;CACtC,MAAM;CACN,aAAa;CACb,QAAQ,EACN,cAAc;EAAE,MAAM,eAAe,iBAAiB;EAAE,YAAY;EAAO,EAC5E;CACF,CAAC;AAEF,MAAM,iBAAiBA,oBAAkB;CACvC,MAAM;CACN,aAAa;CACb,QAAQ,EACN,YAAY;EACV,MAAM;EACN,SAAS;EACT,YAAY;EACb,EACF;CACF,CAAC;AAEF,MAAM,wBAAwBA,oBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ,EACN,mBAAmB;EACjB,MAAM,eAAe,iBAAiB;EACtC,YAAY;EACb,EACF;CACF,CAAC;AAEF,MAAM,sBAAsBA,oBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,UAAU;GAAE,MAAM;GAAoB,YAAY;GAAO;EACzD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACF;CACF,CAAC;AAEF,MAAM,sBAAsBA,oBAAkB;CAC5C,MAAM;CACN,aACE;CACF,QAAQ,EACN,cAAc;EAAE,MAAM,eAAe,iBAAiB;EAAE,YAAY;EAAO,EAC5E;CACF,CAAC;AAEF,MAAM,uBAAuBA,oBAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,SAAS;GAAE,YAAY;GAAO;EAChE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE;CACF,CAAC;AAEF,MAAa,6BAA6B,cAAc;CACtD,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;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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts9 from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/presentations.d.ts
|
|
4
|
+
declare const KbDashboardPresentation: _contractspec_lib_contracts9.PresentationSpec;
|
|
5
|
+
declare const KbReviewListPresentation: _contractspec_lib_contracts9.PresentationSpec;
|
|
6
|
+
declare const KbReviewFormPresentation: _contractspec_lib_contracts9.PresentationSpec;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { KbDashboardPresentation, KbReviewFormPresentation, KbReviewListPresentation };
|
|
9
|
+
//# sourceMappingURL=presentations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentations.d.ts","names":[],"sources":["../src/presentations.ts"],"sourcesContent":[],"mappings":";;;cAGa,yBAoBX,4BAAA,CApBkC;cAsBvB,0BAoBX,4BAAA,CApBmC;cAsBxB,0BAoBX,4BAAA,CApBmC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ChangeCandidateModel, ReviewTaskModel } from "./entities/models.js";
|
|
2
|
+
import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/presentations.ts
|
|
5
|
+
const KbDashboardPresentation = definePresentation({
|
|
6
|
+
meta: {
|
|
7
|
+
key: "kb.dashboard",
|
|
8
|
+
version: "1.0.0",
|
|
9
|
+
title: "KB Update Dashboard",
|
|
10
|
+
description: "Overview of KB change candidates and review tasks.",
|
|
11
|
+
domain: "knowledge",
|
|
12
|
+
owners: ["@examples"],
|
|
13
|
+
tags: ["dashboard", "knowledge"],
|
|
14
|
+
stability: StabilityEnum.Experimental,
|
|
15
|
+
goal: "Visualize status",
|
|
16
|
+
context: "Dashboard"
|
|
17
|
+
},
|
|
18
|
+
source: {
|
|
19
|
+
type: "component",
|
|
20
|
+
framework: "react",
|
|
21
|
+
componentKey: "KbDashboard",
|
|
22
|
+
props: ChangeCandidateModel
|
|
23
|
+
},
|
|
24
|
+
targets: ["react", "markdown"]
|
|
25
|
+
});
|
|
26
|
+
const KbReviewListPresentation = definePresentation({
|
|
27
|
+
meta: {
|
|
28
|
+
key: "kb.review.list",
|
|
29
|
+
version: "1.0.0",
|
|
30
|
+
title: "Review Tasks",
|
|
31
|
+
description: "List of pending review tasks for the current user.",
|
|
32
|
+
domain: "knowledge",
|
|
33
|
+
owners: ["@examples"],
|
|
34
|
+
tags: ["list", "review"],
|
|
35
|
+
stability: StabilityEnum.Experimental,
|
|
36
|
+
goal: "List tasks",
|
|
37
|
+
context: "Inbox"
|
|
38
|
+
},
|
|
39
|
+
source: {
|
|
40
|
+
type: "component",
|
|
41
|
+
framework: "react",
|
|
42
|
+
componentKey: "ReviewTaskList",
|
|
43
|
+
props: ReviewTaskModel
|
|
44
|
+
},
|
|
45
|
+
targets: ["react", "markdown"]
|
|
46
|
+
});
|
|
47
|
+
const KbReviewFormPresentation = definePresentation({
|
|
48
|
+
meta: {
|
|
49
|
+
key: "kb.review.form",
|
|
50
|
+
version: "1.0.0",
|
|
51
|
+
title: "Review Change",
|
|
52
|
+
description: "Form to approve or reject a KB change candidate.",
|
|
53
|
+
domain: "knowledge",
|
|
54
|
+
owners: ["@examples"],
|
|
55
|
+
tags: ["form", "review"],
|
|
56
|
+
stability: StabilityEnum.Experimental,
|
|
57
|
+
goal: "Review",
|
|
58
|
+
context: "Detail"
|
|
59
|
+
},
|
|
60
|
+
source: {
|
|
61
|
+
type: "component",
|
|
62
|
+
framework: "react",
|
|
63
|
+
componentKey: "ReviewDecisionForm",
|
|
64
|
+
props: ReviewTaskModel
|
|
65
|
+
},
|
|
66
|
+
targets: ["react"]
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { KbDashboardPresentation, KbReviewFormPresentation, KbReviewListPresentation };
|
|
71
|
+
//# sourceMappingURL=presentations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentations.js","names":[],"sources":["../src/presentations.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\nimport { ChangeCandidateModel, ReviewTaskModel } from './entities/models';\n\nexport const KbDashboardPresentation = definePresentation({\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 = definePresentation({\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 = definePresentation({\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":";;;;AAGA,MAAa,0BAA0B,mBAAmB;CACxD,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,CAAC;AAEF,MAAa,2BAA2B,mBAAmB;CACzD,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,CAAC;AAEF,MAAa,2BAA2B,mBAAmB;CACzD,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,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts4 from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/tests/operations.test-spec.d.ts
|
|
4
|
+
declare const RunWatchTest: _contractspec_lib_contracts4.TestSpec;
|
|
5
|
+
declare const CreateReviewTaskTest: _contractspec_lib_contracts4.TestSpec;
|
|
6
|
+
declare const SubmitDecisionTest: _contractspec_lib_contracts4.TestSpec;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { CreateReviewTaskTest, RunWatchTest, SubmitDecisionTest };
|
|
9
|
+
//# sourceMappingURL=operations.test-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.test-spec.d.ts","names":[],"sources":["../../src/tests/operations.test-spec.ts"],"sourcesContent":[],"mappings":";;;cAEa,cAyBX,4BAAA,CAzBuB;cA2BZ,sBAyBX,4BAAA,CAzB+B;cA2BpB,oBAyBX,4BAAA,CAzB6B"}
|