@contractspec/example.kb-update-pipeline 3.7.6 → 3.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/AGENTS.md +50 -29
- package/CHANGELOG.md +21 -0
- package/README.md +59 -12
- package/dist/browser/entities/index.js +2 -2
- package/dist/browser/entities/models.js +2 -2
- package/dist/browser/events.js +1 -1
- package/dist/browser/index.js +70 -70
- package/dist/browser/operations/index.js +3 -3
- package/dist/browser/operations/pipeline.js +3 -3
- package/dist/browser/presentations.js +2 -2
- package/dist/entities/index.js +2 -2
- package/dist/entities/models.js +2 -2
- package/dist/events.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +70 -70
- package/dist/node/entities/index.js +2 -2
- package/dist/node/entities/models.js +2 -2
- package/dist/node/events.js +1 -1
- package/dist/node/index.js +70 -70
- package/dist/node/operations/index.js +3 -3
- package/dist/node/operations/pipeline.js +3 -3
- package/dist/node/presentations.js +2 -2
- package/dist/operations/index.js +3 -3
- package/dist/operations/pipeline.js +3 -3
- package/dist/presentations.js +2 -2
- package/package.json +7 -7
- package/src/docs/kb-update-pipeline.docblock.ts +22 -22
- package/src/entities/models.ts +36 -36
- package/src/events.ts +99 -99
- package/src/example.ts +28 -28
- package/src/handlers/memory.handlers.test.ts +64 -64
- package/src/handlers/memory.handlers.ts +158 -158
- package/src/index.ts +2 -2
- package/src/kb-update-pipeline.feature.ts +62 -62
- package/src/operations/pipeline.ts +125 -125
- package/src/presentations.ts +59 -59
- package/src/tests/operations.test-spec.ts +72 -72
- package/tsconfig.json +7 -17
- package/tsdown.config.js +7 -13
package/.turbo/turbo-build.log
CHANGED
|
@@ -3,7 +3,7 @@ $ bun run prebuild && bun run build:bundle && bun run build:types
|
|
|
3
3
|
$ contractspec-bun-build prebuild
|
|
4
4
|
$ contractspec-bun-build transpile
|
|
5
5
|
[contractspec-bun-build] transpile target=bun root=src entries=14 noBundle=false
|
|
6
|
-
Bundled 14 modules in
|
|
6
|
+
Bundled 14 modules in 26ms
|
|
7
7
|
|
|
8
8
|
docs/index.js 1.49 KB (entry point)
|
|
9
9
|
./index.js 20.86 KB (entry point)
|
|
@@ -21,7 +21,7 @@ Bundled 14 modules in 14ms
|
|
|
21
21
|
handlers/memory.handlers.js 3.62 KB (entry point)
|
|
22
22
|
|
|
23
23
|
[contractspec-bun-build] transpile target=node root=src entries=14 noBundle=false
|
|
24
|
-
Bundled 14 modules in
|
|
24
|
+
Bundled 14 modules in 30ms
|
|
25
25
|
|
|
26
26
|
docs/index.js 1.48 KB (entry point)
|
|
27
27
|
./index.js 20.85 KB (entry point)
|
|
@@ -39,7 +39,7 @@ Bundled 14 modules in 48ms
|
|
|
39
39
|
handlers/memory.handlers.js 3.61 KB (entry point)
|
|
40
40
|
|
|
41
41
|
[contractspec-bun-build] transpile target=browser root=src entries=14 noBundle=false
|
|
42
|
-
Bundled 14 modules in
|
|
42
|
+
Bundled 14 modules in 13ms
|
|
43
43
|
|
|
44
44
|
docs/index.js 1.48 KB (entry point)
|
|
45
45
|
./index.js 20.85 KB (entry point)
|
package/AGENTS.md
CHANGED
|
@@ -1,38 +1,59 @@
|
|
|
1
|
-
# AI Agent Guide
|
|
1
|
+
# AI Agent Guide — `@contractspec/example.kb-update-pipeline`
|
|
2
2
|
|
|
3
3
|
Scope: `packages/examples/kb-update-pipeline/*`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Example: KB update automation pipeline with HITL review and auditability.
|
|
6
6
|
|
|
7
7
|
## Quick Context
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
- `./
|
|
28
|
-
- `./
|
|
29
|
-
- `./
|
|
30
|
-
- `./
|
|
31
|
-
- `./
|
|
9
|
+
- Layer: `example`.
|
|
10
|
+
- Package visibility: published package.
|
|
11
|
+
- Primary consumers are example explorers, template authors, and documentation readers.
|
|
12
|
+
- Related packages: `@contractspec/lib.contracts-spec`, `@contractspec/lib.schema`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+
|
|
16
|
+
- `src/docs/` contains docblocks and documentation-facing exports.
|
|
17
|
+
- `src/entities/` contains domain entities and value objects.
|
|
18
|
+
- `src/events.ts` is package-level event definitions.
|
|
19
|
+
- `src/example.ts` is the runnable example entrypoint.
|
|
20
|
+
- `src/handlers/` contains handlers or demo adapters wired to contract surfaces.
|
|
21
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
22
|
+
- `src/kb-update-pipeline.feature.ts` defines a feature entrypoint.
|
|
23
|
+
|
|
24
|
+
## Public Surface
|
|
25
|
+
|
|
26
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
27
|
+
- Export `./docs` resolves through `./src/docs/index.ts`.
|
|
28
|
+
- Export `./docs/kb-update-pipeline.docblock` resolves through `./src/docs/kb-update-pipeline.docblock.ts`.
|
|
29
|
+
- Export `./entities` resolves through `./src/entities/index.ts`.
|
|
30
|
+
- Export `./entities/models` resolves through `./src/entities/models.ts`.
|
|
31
|
+
- Export `./events` resolves through `./src/events.ts`.
|
|
32
|
+
- Export `./example` resolves through `./src/example.ts`.
|
|
33
|
+
- Export `./handlers` resolves through `./src/handlers/index.ts`.
|
|
34
|
+
- Export `./handlers/memory.handlers` resolves through `./src/handlers/memory.handlers.ts`.
|
|
35
|
+
- Export `./kb-update-pipeline.feature` resolves through `./src/kb-update-pipeline.feature.ts`.
|
|
36
|
+
- The package publishes 14 total export subpaths; keep docs aligned with `package.json`.
|
|
37
|
+
|
|
38
|
+
## Guardrails
|
|
39
|
+
|
|
40
|
+
- Keep the example package demonstrative, buildable, and aligned with the exported feature surface.
|
|
41
|
+
- Do not add hidden production assumptions that are not actually implemented in the example.
|
|
42
|
+
- Changes here can affect downstream packages such as `@contractspec/lib.contracts-spec`, `@contractspec/lib.schema`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
43
|
+
- Changes here can affect downstream packages such as `@contractspec/lib.contracts-spec`, `@contractspec/lib.schema`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
32
44
|
|
|
33
45
|
## Local Commands
|
|
34
46
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
47
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
48
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
49
|
+
- `bun run test` — bun test
|
|
50
|
+
- `bun run lint` — bun lint:fix
|
|
51
|
+
- `bun run lint:check` — biome check .
|
|
52
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
53
|
+
- `bun run typecheck` — tsc --noEmit
|
|
54
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
55
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
56
|
+
- `bun run clean` — rimraf dist .turbo
|
|
57
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
58
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
59
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @contractspec/example.kb-update-pipeline
|
|
2
2
|
|
|
3
|
+
## 3.7.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1a44cb6: feat: improve examples to increase coverage of Contracts type
|
|
8
|
+
- Updated dependencies [1a44cb6]
|
|
9
|
+
- @contractspec/lib.contracts-spec@4.1.2
|
|
10
|
+
- @contractspec/lib.schema@3.7.8
|
|
11
|
+
|
|
12
|
+
## 3.7.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- fix: release
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @contractspec/lib.contracts-spec@4.1.1
|
|
19
|
+
- @contractspec/lib.schema@3.7.7
|
|
20
|
+
|
|
3
21
|
## 3.7.6
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -706,14 +724,17 @@
|
|
|
706
724
|
feat: Contract layers support (features, examples, app-configs)
|
|
707
725
|
|
|
708
726
|
### New CLI Commands
|
|
727
|
+
|
|
709
728
|
- `contractspec list layers` - List all contract layers with filtering
|
|
710
729
|
|
|
711
730
|
### Enhanced Commands
|
|
731
|
+
|
|
712
732
|
- `contractspec ci` - New `layers` check category validates features/examples/config
|
|
713
733
|
- `contractspec doctor` - New `layers` health checks
|
|
714
734
|
- `contractspec integrity` - Now shows layer statistics
|
|
715
735
|
|
|
716
736
|
### New APIs
|
|
737
|
+
|
|
717
738
|
- `discoverLayers()` - Scan workspace for all layer files
|
|
718
739
|
- `scanExampleSource()` - Parse ExampleSpec from source code
|
|
719
740
|
- `isExampleFile()` - Check if file is an example spec
|
package/README.md
CHANGED
|
@@ -1,28 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @contractspec/example.kb-update-pipeline
|
|
2
2
|
|
|
3
|
-
Website: https://contractspec.io
|
|
3
|
+
Website: https://contractspec.io
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Example: KB update automation pipeline with HITL review and auditability.**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
## Contracts
|
|
7
|
+
## What This Demonstrates
|
|
9
8
|
|
|
10
|
-
-
|
|
11
|
-
|
|
9
|
+
- HITL (human-in-the-loop) review pipeline pattern.
|
|
10
|
+
- Entity models for KB articles and update proposals.
|
|
11
|
+
- Event-driven pipeline with typed operations.
|
|
12
|
+
- Feature definition with presentations and test-specs.
|
|
13
|
+
- In-memory handlers for demo scenarios.
|
|
14
|
+
- `src/docs/` contains docblocks and documentation-facing exports.
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
## Running tests
|
|
16
|
+
## Running Locally
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
bun
|
|
18
|
-
|
|
18
|
+
From `packages/examples/kb-update-pipeline`:
|
|
19
|
+
- `bun run dev`
|
|
20
|
+
- `bun run build`
|
|
21
|
+
- `bun run test`
|
|
22
|
+
- `bun run typecheck`
|
|
19
23
|
|
|
24
|
+
## Usage
|
|
20
25
|
|
|
26
|
+
Use `@contractspec/example.kb-update-pipeline` as a reference implementation, or import its exported surfaces into a workspace that composes ContractSpec examples and bundles.
|
|
21
27
|
|
|
28
|
+
## Architecture
|
|
22
29
|
|
|
30
|
+
- `src/docs/` contains docblocks and documentation-facing exports.
|
|
31
|
+
- `src/entities/` contains domain entities and value objects.
|
|
32
|
+
- `src/events.ts` is package-level event definitions.
|
|
33
|
+
- `src/example.ts` is the runnable example entrypoint.
|
|
34
|
+
- `src/handlers/` contains handlers or demo adapters wired to contract surfaces.
|
|
35
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
36
|
+
- `src/kb-update-pipeline.feature.ts` defines a feature entrypoint.
|
|
23
37
|
|
|
38
|
+
## Public Entry Points
|
|
24
39
|
|
|
40
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
41
|
+
- Export `./docs` resolves through `./src/docs/index.ts`.
|
|
42
|
+
- Export `./docs/kb-update-pipeline.docblock` resolves through `./src/docs/kb-update-pipeline.docblock.ts`.
|
|
43
|
+
- Export `./entities` resolves through `./src/entities/index.ts`.
|
|
44
|
+
- Export `./entities/models` resolves through `./src/entities/models.ts`.
|
|
45
|
+
- Export `./events` resolves through `./src/events.ts`.
|
|
46
|
+
- Export `./example` resolves through `./src/example.ts`.
|
|
47
|
+
- Export `./handlers` resolves through `./src/handlers/index.ts`.
|
|
48
|
+
- Export `./handlers/memory.handlers` resolves through `./src/handlers/memory.handlers.ts`.
|
|
49
|
+
- Export `./kb-update-pipeline.feature` resolves through `./src/kb-update-pipeline.feature.ts`.
|
|
50
|
+
- The package publishes 14 total export subpaths; keep docs aligned with `package.json`.
|
|
25
51
|
|
|
52
|
+
## Local Commands
|
|
26
53
|
|
|
54
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
55
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
56
|
+
- `bun run test` — bun test
|
|
57
|
+
- `bun run lint` — bun lint:fix
|
|
58
|
+
- `bun run lint:check` — biome check .
|
|
59
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
60
|
+
- `bun run typecheck` — tsc --noEmit
|
|
61
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
62
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
63
|
+
- `bun run clean` — rimraf dist .turbo
|
|
64
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
65
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
66
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
27
67
|
|
|
68
|
+
## Recent Updates
|
|
28
69
|
|
|
70
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
71
|
+
- Missing contract layers.
|
|
72
|
+
|
|
73
|
+
## Notes
|
|
74
|
+
|
|
75
|
+
- Works alongside `@contractspec/lib.contracts-spec`, `@contractspec/lib.schema`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
package/dist/browser/events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/events.ts
|
|
2
2
|
import { defineEvent, StabilityEnum } from "@contractspec/lib.contracts-spec";
|
|
3
|
-
import {
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
4
|
var KbChangeDetectedPayload = defineSchemaModel({
|
|
5
5
|
name: "KbChangeDetectedPayload",
|
|
6
6
|
description: "Emitted when a source change is detected.",
|
package/dist/browser/index.js
CHANGED
|
@@ -43,9 +43,9 @@ var docBlocks = [
|
|
|
43
43
|
registerDocBlocks(docBlocks);
|
|
44
44
|
// src/entities/models.ts
|
|
45
45
|
import {
|
|
46
|
-
ScalarTypeEnum,
|
|
47
46
|
defineEnum,
|
|
48
|
-
defineSchemaModel
|
|
47
|
+
defineSchemaModel,
|
|
48
|
+
ScalarTypeEnum
|
|
49
49
|
} from "@contractspec/lib.schema";
|
|
50
50
|
var ChangeRiskLevelEnum = defineEnum("ChangeRiskLevel", [
|
|
51
51
|
"low",
|
|
@@ -92,7 +92,7 @@ var ReviewTaskModel = defineSchemaModel({
|
|
|
92
92
|
});
|
|
93
93
|
// src/events.ts
|
|
94
94
|
import { defineEvent, StabilityEnum } from "@contractspec/lib.contracts-spec";
|
|
95
|
-
import {
|
|
95
|
+
import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
|
|
96
96
|
var KbChangeDetectedPayload = defineSchemaModel2({
|
|
97
97
|
name: "KbChangeDetectedPayload",
|
|
98
98
|
description: "Emitted when a source change is detected.",
|
|
@@ -350,9 +350,75 @@ function createPipelineMemoryHandlers(store) {
|
|
|
350
350
|
publishIfReady
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
+
// src/kb-update-pipeline.feature.ts
|
|
354
|
+
import { defineFeature } from "@contractspec/lib.contracts-spec";
|
|
355
|
+
var KbUpdatePipelineFeature = defineFeature({
|
|
356
|
+
meta: {
|
|
357
|
+
key: "kb-update-pipeline",
|
|
358
|
+
version: "1.0.0",
|
|
359
|
+
title: "KB Update Pipeline (HITL)",
|
|
360
|
+
description: "Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.",
|
|
361
|
+
domain: "knowledge",
|
|
362
|
+
owners: ["@examples"],
|
|
363
|
+
tags: ["knowledge", "pipeline", "hitl", "audit", "notifications"],
|
|
364
|
+
stability: "experimental"
|
|
365
|
+
},
|
|
366
|
+
operations: [
|
|
367
|
+
{ key: "kbPipeline.runWatch", version: "1.0.0" },
|
|
368
|
+
{ key: "kbPipeline.createReviewTask", version: "1.0.0" },
|
|
369
|
+
{ key: "kbPipeline.submitDecision", version: "1.0.0" },
|
|
370
|
+
{ key: "kbPipeline.publishIfReady", version: "1.0.0" }
|
|
371
|
+
],
|
|
372
|
+
events: [
|
|
373
|
+
{ key: "kb.change.detected", version: "1.0.0" },
|
|
374
|
+
{ key: "kb.change.summarized", version: "1.0.0" },
|
|
375
|
+
{ key: "kb.patch.proposed", version: "1.0.0" },
|
|
376
|
+
{ key: "kb.review.requested", version: "1.0.0" },
|
|
377
|
+
{ key: "kb.review.decided", version: "1.0.0" }
|
|
378
|
+
],
|
|
379
|
+
presentations: [
|
|
380
|
+
{ key: "kb.dashboard", version: "1.0.0" },
|
|
381
|
+
{ key: "kb.review.list", version: "1.0.0" },
|
|
382
|
+
{ key: "kb.review.form", version: "1.0.0" }
|
|
383
|
+
],
|
|
384
|
+
opToPresentation: [
|
|
385
|
+
{
|
|
386
|
+
op: { key: "kbPipeline.runWatch", version: "1.0.0" },
|
|
387
|
+
pres: { key: "kb.dashboard", version: "1.0.0" }
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
op: { key: "kbPipeline.createReviewTask", version: "1.0.0" },
|
|
391
|
+
pres: { key: "kb.review.list", version: "1.0.0" }
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
op: { key: "kbPipeline.submitDecision", version: "1.0.0" },
|
|
395
|
+
pres: { key: "kb.review.form", version: "1.0.0" }
|
|
396
|
+
}
|
|
397
|
+
],
|
|
398
|
+
presentationsTargets: [
|
|
399
|
+
{ key: "kb.dashboard", version: "1.0.0", targets: ["react", "markdown"] },
|
|
400
|
+
{ key: "kb.review.list", version: "1.0.0", targets: ["react", "markdown"] },
|
|
401
|
+
{ key: "kb.review.form", version: "1.0.0", targets: ["react"] }
|
|
402
|
+
],
|
|
403
|
+
capabilities: {
|
|
404
|
+
requires: [
|
|
405
|
+
{ key: "identity", version: "1.0.0" },
|
|
406
|
+
{ key: "notifications", version: "1.0.0" },
|
|
407
|
+
{ key: "audit-trail", version: "1.0.0" }
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
knowledge: [{ key: "kb.knowledge.rules", version: "1.0.0" }],
|
|
411
|
+
telemetry: [{ key: "kb-pipeline.telemetry", version: "1.0.0" }],
|
|
412
|
+
jobs: [{ key: "kb-pipeline.job.watch", version: "1.0.0" }],
|
|
413
|
+
docs: [
|
|
414
|
+
"docs.examples.kb-update-pipeline.goal",
|
|
415
|
+
"docs.examples.kb-update-pipeline.reference"
|
|
416
|
+
]
|
|
417
|
+
});
|
|
418
|
+
|
|
353
419
|
// src/operations/pipeline.ts
|
|
354
420
|
import { defineCommand } from "@contractspec/lib.contracts-spec";
|
|
355
|
-
import {
|
|
421
|
+
import { defineSchemaModel as defineSchemaModel3, ScalarTypeEnum as ScalarTypeEnum3 } from "@contractspec/lib.schema";
|
|
356
422
|
var RunWatchInput = defineSchemaModel3({
|
|
357
423
|
name: "KbPipelineRunWatchInput",
|
|
358
424
|
description: "Trigger a watch cycle for KB sources (demo).",
|
|
@@ -493,72 +559,6 @@ var KbPipelinePublishIfReadyContract = defineCommand({
|
|
|
493
559
|
},
|
|
494
560
|
policy: { auth: "user" }
|
|
495
561
|
});
|
|
496
|
-
// src/kb-update-pipeline.feature.ts
|
|
497
|
-
import { defineFeature } from "@contractspec/lib.contracts-spec";
|
|
498
|
-
var KbUpdatePipelineFeature = defineFeature({
|
|
499
|
-
meta: {
|
|
500
|
-
key: "kb-update-pipeline",
|
|
501
|
-
version: "1.0.0",
|
|
502
|
-
title: "KB Update Pipeline (HITL)",
|
|
503
|
-
description: "Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.",
|
|
504
|
-
domain: "knowledge",
|
|
505
|
-
owners: ["@examples"],
|
|
506
|
-
tags: ["knowledge", "pipeline", "hitl", "audit", "notifications"],
|
|
507
|
-
stability: "experimental"
|
|
508
|
-
},
|
|
509
|
-
operations: [
|
|
510
|
-
{ key: "kbPipeline.runWatch", version: "1.0.0" },
|
|
511
|
-
{ key: "kbPipeline.createReviewTask", version: "1.0.0" },
|
|
512
|
-
{ key: "kbPipeline.submitDecision", version: "1.0.0" },
|
|
513
|
-
{ key: "kbPipeline.publishIfReady", version: "1.0.0" }
|
|
514
|
-
],
|
|
515
|
-
events: [
|
|
516
|
-
{ key: "kb.change.detected", version: "1.0.0" },
|
|
517
|
-
{ key: "kb.change.summarized", version: "1.0.0" },
|
|
518
|
-
{ key: "kb.patch.proposed", version: "1.0.0" },
|
|
519
|
-
{ key: "kb.review.requested", version: "1.0.0" },
|
|
520
|
-
{ key: "kb.review.decided", version: "1.0.0" }
|
|
521
|
-
],
|
|
522
|
-
presentations: [
|
|
523
|
-
{ key: "kb.dashboard", version: "1.0.0" },
|
|
524
|
-
{ key: "kb.review.list", version: "1.0.0" },
|
|
525
|
-
{ key: "kb.review.form", version: "1.0.0" }
|
|
526
|
-
],
|
|
527
|
-
opToPresentation: [
|
|
528
|
-
{
|
|
529
|
-
op: { key: "kbPipeline.runWatch", version: "1.0.0" },
|
|
530
|
-
pres: { key: "kb.dashboard", version: "1.0.0" }
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
op: { key: "kbPipeline.createReviewTask", version: "1.0.0" },
|
|
534
|
-
pres: { key: "kb.review.list", version: "1.0.0" }
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
op: { key: "kbPipeline.submitDecision", version: "1.0.0" },
|
|
538
|
-
pres: { key: "kb.review.form", version: "1.0.0" }
|
|
539
|
-
}
|
|
540
|
-
],
|
|
541
|
-
presentationsTargets: [
|
|
542
|
-
{ key: "kb.dashboard", version: "1.0.0", targets: ["react", "markdown"] },
|
|
543
|
-
{ key: "kb.review.list", version: "1.0.0", targets: ["react", "markdown"] },
|
|
544
|
-
{ key: "kb.review.form", version: "1.0.0", targets: ["react"] }
|
|
545
|
-
],
|
|
546
|
-
capabilities: {
|
|
547
|
-
requires: [
|
|
548
|
-
{ key: "identity", version: "1.0.0" },
|
|
549
|
-
{ key: "notifications", version: "1.0.0" },
|
|
550
|
-
{ key: "audit-trail", version: "1.0.0" }
|
|
551
|
-
]
|
|
552
|
-
},
|
|
553
|
-
knowledge: [{ key: "kb.knowledge.rules", version: "1.0.0" }],
|
|
554
|
-
telemetry: [{ key: "kb-pipeline.telemetry", version: "1.0.0" }],
|
|
555
|
-
jobs: [{ key: "kb-pipeline.job.watch", version: "1.0.0" }],
|
|
556
|
-
docs: [
|
|
557
|
-
"docs.examples.kb-update-pipeline.goal",
|
|
558
|
-
"docs.examples.kb-update-pipeline.reference"
|
|
559
|
-
]
|
|
560
|
-
});
|
|
561
|
-
|
|
562
562
|
// src/presentations.ts
|
|
563
563
|
import {
|
|
564
564
|
definePresentation,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/entities/models.ts
|
|
2
2
|
import {
|
|
3
|
-
ScalarTypeEnum,
|
|
4
3
|
defineEnum,
|
|
5
|
-
defineSchemaModel
|
|
4
|
+
defineSchemaModel,
|
|
5
|
+
ScalarTypeEnum
|
|
6
6
|
} from "@contractspec/lib.schema";
|
|
7
7
|
var ChangeRiskLevelEnum = defineEnum("ChangeRiskLevel", [
|
|
8
8
|
"low",
|
|
@@ -50,7 +50,7 @@ var ReviewTaskModel = defineSchemaModel({
|
|
|
50
50
|
|
|
51
51
|
// src/operations/pipeline.ts
|
|
52
52
|
import { defineCommand } from "@contractspec/lib.contracts-spec";
|
|
53
|
-
import {
|
|
53
|
+
import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
|
|
54
54
|
var RunWatchInput = defineSchemaModel2({
|
|
55
55
|
name: "KbPipelineRunWatchInput",
|
|
56
56
|
description: "Trigger a watch cycle for KB sources (demo).",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/entities/models.ts
|
|
2
2
|
import {
|
|
3
|
-
ScalarTypeEnum,
|
|
4
3
|
defineEnum,
|
|
5
|
-
defineSchemaModel
|
|
4
|
+
defineSchemaModel,
|
|
5
|
+
ScalarTypeEnum
|
|
6
6
|
} from "@contractspec/lib.schema";
|
|
7
7
|
var ChangeRiskLevelEnum = defineEnum("ChangeRiskLevel", [
|
|
8
8
|
"low",
|
|
@@ -50,7 +50,7 @@ var ReviewTaskModel = defineSchemaModel({
|
|
|
50
50
|
|
|
51
51
|
// src/operations/pipeline.ts
|
|
52
52
|
import { defineCommand } from "@contractspec/lib.contracts-spec";
|
|
53
|
-
import {
|
|
53
|
+
import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
|
|
54
54
|
var RunWatchInput = defineSchemaModel2({
|
|
55
55
|
name: "KbPipelineRunWatchInput",
|
|
56
56
|
description: "Trigger a watch cycle for KB sources (demo).",
|
package/dist/entities/index.js
CHANGED
package/dist/entities/models.js
CHANGED
package/dist/events.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/events.ts
|
|
3
3
|
import { defineEvent, StabilityEnum } from "@contractspec/lib.contracts-spec";
|
|
4
|
-
import {
|
|
4
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
5
5
|
var KbChangeDetectedPayload = defineSchemaModel({
|
|
6
6
|
name: "KbChangeDetectedPayload",
|
|
7
7
|
description: "Emitted when a source change is detected.",
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Automation proposes KB updates; humans verify; everything audited and notified.
|
|
5
5
|
*/
|
|
6
6
|
export * from './entities';
|
|
7
|
-
export * from './operations';
|
|
8
7
|
export * from './events';
|
|
8
|
+
export { default as example } from './example';
|
|
9
9
|
export * from './handlers';
|
|
10
10
|
export * from './kb-update-pipeline.feature';
|
|
11
|
-
export
|
|
11
|
+
export * from './operations';
|
|
12
12
|
export * from './presentations';
|
|
13
13
|
import './docs';
|