@lssm/example.kb-update-pipeline 0.0.0-canary-20251220041653 → 0.0.0-canary-20251221132705

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.
Files changed (57) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +69 -57
  2. package/.turbo/turbo-build.log +59 -47
  3. package/CHANGELOG.md +5 -5
  4. package/dist/events.d.ts +21 -21
  5. package/dist/events.d.ts.map +1 -1
  6. package/dist/handlers/memory.handlers.d.ts.map +1 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js +6 -0
  10. package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js.map +1 -0
  11. package/dist/libs/contracts/dist/client/react/form-render.js +1 -0
  12. package/dist/libs/contracts/dist/data-views.js +1 -0
  13. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
  14. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
  15. package/dist/libs/contracts/dist/features.js +1 -0
  16. package/dist/libs/contracts/dist/forms.js +1 -0
  17. package/dist/libs/contracts/dist/index.js +14 -1
  18. package/dist/libs/contracts/dist/index.js.map +1 -0
  19. package/dist/libs/contracts/dist/integrations/contracts.js +1 -1
  20. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -1
  21. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -1
  22. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
  23. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -1
  24. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
  25. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -1
  26. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
  27. package/dist/libs/contracts/dist/knowledge/contracts.js +1 -1
  28. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -1
  29. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -1
  30. package/dist/libs/contracts/dist/onboarding-base.js +1 -1
  31. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
  32. package/dist/libs/contracts/dist/{spec.js → operation.js} +2 -2
  33. package/dist/libs/contracts/dist/operation.js.map +1 -0
  34. package/dist/libs/contracts/dist/presentations.js +1 -0
  35. package/dist/libs/contracts/dist/registry-utils.js +24 -0
  36. package/dist/libs/contracts/dist/registry-utils.js.map +1 -0
  37. package/dist/libs/contracts/dist/registry.js +1 -0
  38. package/dist/libs/contracts/dist/workflow/index.js +1 -0
  39. package/dist/libs/contracts/dist/workflow/spec.js +1 -0
  40. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +122 -0
  41. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +1 -0
  42. package/dist/libs/contracts/dist/workspace-config/index.js +1 -0
  43. package/dist/operations/pipeline.d.ts +137 -0
  44. package/dist/operations/pipeline.d.ts.map +1 -0
  45. package/dist/{contracts → operations}/pipeline.js +2 -2
  46. package/dist/operations/pipeline.js.map +1 -0
  47. package/package.json +9 -9
  48. package/src/index.ts +1 -1
  49. package/tsconfig.tsbuildinfo +1 -1
  50. package/dist/contracts/pipeline.d.ts +0 -137
  51. package/dist/contracts/pipeline.d.ts.map +0 -1
  52. package/dist/contracts/pipeline.js.map +0 -1
  53. package/dist/libs/contracts/dist/spec.js.map +0 -1
  54. /package/dist/{contracts → operations}/index.d.ts +0 -0
  55. /package/dist/{contracts → operations}/index.js +0 -0
  56. /package/src/{contracts → operations}/index.ts +0 -0
  57. /package/src/{contracts → operations}/pipeline.ts +0 -0
@@ -1 +1,2 @@
1
+ import "./spec.js";
1
2
  import "./runner.js";
@@ -0,0 +1 @@
1
+ import "../registry-utils.js";
@@ -0,0 +1,122 @@
1
+ import * as z$1 from "zod";
2
+
3
+ //#region ../../libs/contracts/dist/workspace-config/contractsrc-schema.js
4
+ /**
5
+ * ContractSpec configuration schema definitions.
6
+ *
7
+ * These schemas define the structure of .contractsrc.json files
8
+ * and are shared across CLI tools and libraries.
9
+ */
10
+ /**
11
+ * OpenAPI source configuration for import/sync/validate operations.
12
+ */
13
+ const OpenApiSourceConfigSchema = z$1.object({
14
+ name: z$1.string(),
15
+ url: z$1.url().optional(),
16
+ file: z$1.string().optional(),
17
+ syncMode: z$1.enum([
18
+ "import",
19
+ "sync",
20
+ "validate"
21
+ ]).default("validate"),
22
+ tags: z$1.array(z$1.string()).optional(),
23
+ exclude: z$1.array(z$1.string()).optional(),
24
+ include: z$1.array(z$1.string()).optional(),
25
+ prefix: z$1.string().optional(),
26
+ defaultStability: z$1.enum([
27
+ "experimental",
28
+ "beta",
29
+ "stable",
30
+ "deprecated"
31
+ ]).optional(),
32
+ defaultAuth: z$1.enum([
33
+ "anonymous",
34
+ "user",
35
+ "admin"
36
+ ]).optional(),
37
+ defaultOwners: z$1.array(z$1.string()).optional()
38
+ });
39
+ const OpenApiExportConfigSchema = z$1.object({
40
+ outputPath: z$1.string().default("./openapi.json"),
41
+ format: z$1.enum(["json", "yaml"]).default("json"),
42
+ title: z$1.string().optional(),
43
+ version: z$1.string().optional(),
44
+ description: z$1.string().optional(),
45
+ servers: z$1.array(z$1.object({
46
+ url: z$1.string(),
47
+ description: z$1.string().optional()
48
+ })).optional()
49
+ });
50
+ /**
51
+ * OpenAPI configuration section.
52
+ */
53
+ const OpenApiConfigSchema = z$1.object({
54
+ sources: z$1.array(OpenApiSourceConfigSchema).optional(),
55
+ export: OpenApiExportConfigSchema.optional()
56
+ });
57
+ /**
58
+ * Grouping strategy for organizing specs.
59
+ */
60
+ const GroupingStrategySchema = z$1.enum([
61
+ "by-tag",
62
+ "by-owner",
63
+ "by-domain",
64
+ "by-url-path-single",
65
+ "by-url-path-multi",
66
+ "by-feature",
67
+ "none"
68
+ ]);
69
+ /**
70
+ * Grouping rule configuration.
71
+ */
72
+ const GroupingRuleSchema = z$1.object({
73
+ strategy: GroupingStrategySchema,
74
+ urlPathLevel: z$1.number().optional(),
75
+ pattern: z$1.string().optional()
76
+ });
77
+ /**
78
+ * Output directory conventions for generated specs.
79
+ */
80
+ const FolderConventionsSchema = z$1.object({
81
+ models: z$1.string().default("models"),
82
+ operations: z$1.string().default("operations/commands|queries"),
83
+ events: z$1.string().default("events"),
84
+ presentations: z$1.string().default("presentations"),
85
+ forms: z$1.string().default("forms"),
86
+ groupByFeature: z$1.boolean().default(true),
87
+ operationsGrouping: GroupingRuleSchema.optional(),
88
+ modelsGrouping: GroupingRuleSchema.optional(),
89
+ eventsGrouping: GroupingRuleSchema.optional()
90
+ });
91
+ /**
92
+ * Full ContractSpec configuration schema (.contractsrc.json).
93
+ */
94
+ const ContractsrcSchema = z$1.object({
95
+ aiProvider: z$1.enum([
96
+ "claude",
97
+ "openai",
98
+ "ollama",
99
+ "custom"
100
+ ]).default("claude"),
101
+ aiModel: z$1.string().optional(),
102
+ agentMode: z$1.enum([
103
+ "simple",
104
+ "cursor",
105
+ "claude-code",
106
+ "openai-codex"
107
+ ]).default("simple"),
108
+ customEndpoint: z$1.url().nullable().optional(),
109
+ customApiKey: z$1.string().nullable().optional(),
110
+ outputDir: z$1.string().default("./src"),
111
+ conventions: FolderConventionsSchema,
112
+ defaultOwners: z$1.array(z$1.string()).default([]),
113
+ defaultTags: z$1.array(z$1.string()).default([]),
114
+ packages: z$1.array(z$1.string()).optional(),
115
+ excludePackages: z$1.array(z$1.string()).optional(),
116
+ recursive: z$1.boolean().optional(),
117
+ openapi: OpenApiConfigSchema.optional()
118
+ });
119
+
120
+ //#endregion
121
+ export { FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema };
122
+ //# sourceMappingURL=contractsrc-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractsrc-schema.js","names":[],"sources":["../../../../../../../libs/contracts/dist/workspace-config/contractsrc-schema.js"],"sourcesContent":["import * as z$1 from \"zod\";\n\n//#region src/workspace-config/contractsrc-schema.ts\n/**\n* ContractSpec configuration schema definitions.\n*\n* These schemas define the structure of .contractsrc.json files\n* and are shared across CLI tools and libraries.\n*/\n/**\n* OpenAPI source configuration for import/sync/validate operations.\n*/\nconst OpenApiSourceConfigSchema = z$1.object({\n\tname: z$1.string(),\n\turl: z$1.url().optional(),\n\tfile: z$1.string().optional(),\n\tsyncMode: z$1.enum([\n\t\t\"import\",\n\t\t\"sync\",\n\t\t\"validate\"\n\t]).default(\"validate\"),\n\ttags: z$1.array(z$1.string()).optional(),\n\texclude: z$1.array(z$1.string()).optional(),\n\tinclude: z$1.array(z$1.string()).optional(),\n\tprefix: z$1.string().optional(),\n\tdefaultStability: z$1.enum([\n\t\t\"experimental\",\n\t\t\"beta\",\n\t\t\"stable\",\n\t\t\"deprecated\"\n\t]).optional(),\n\tdefaultAuth: z$1.enum([\n\t\t\"anonymous\",\n\t\t\"user\",\n\t\t\"admin\"\n\t]).optional(),\n\tdefaultOwners: z$1.array(z$1.string()).optional()\n});\nconst OpenApiExportConfigSchema = z$1.object({\n\toutputPath: z$1.string().default(\"./openapi.json\"),\n\tformat: z$1.enum([\"json\", \"yaml\"]).default(\"json\"),\n\ttitle: z$1.string().optional(),\n\tversion: z$1.string().optional(),\n\tdescription: z$1.string().optional(),\n\tservers: z$1.array(z$1.object({\n\t\turl: z$1.string(),\n\t\tdescription: z$1.string().optional()\n\t})).optional()\n});\n/**\n* OpenAPI configuration section.\n*/\nconst OpenApiConfigSchema = z$1.object({\n\tsources: z$1.array(OpenApiSourceConfigSchema).optional(),\n\texport: OpenApiExportConfigSchema.optional()\n});\n/**\n* Grouping strategy for organizing specs.\n*/\nconst GroupingStrategySchema = z$1.enum([\n\t\"by-tag\",\n\t\"by-owner\",\n\t\"by-domain\",\n\t\"by-url-path-single\",\n\t\"by-url-path-multi\",\n\t\"by-feature\",\n\t\"none\"\n]);\n/**\n* Grouping rule configuration.\n*/\nconst GroupingRuleSchema = z$1.object({\n\tstrategy: GroupingStrategySchema,\n\turlPathLevel: z$1.number().optional(),\n\tpattern: z$1.string().optional()\n});\n/**\n* Output directory conventions for generated specs.\n*/\nconst FolderConventionsSchema = z$1.object({\n\tmodels: z$1.string().default(\"models\"),\n\toperations: z$1.string().default(\"operations/commands|queries\"),\n\tevents: z$1.string().default(\"events\"),\n\tpresentations: z$1.string().default(\"presentations\"),\n\tforms: z$1.string().default(\"forms\"),\n\tgroupByFeature: z$1.boolean().default(true),\n\toperationsGrouping: GroupingRuleSchema.optional(),\n\tmodelsGrouping: GroupingRuleSchema.optional(),\n\teventsGrouping: GroupingRuleSchema.optional()\n});\n/**\n* Full ContractSpec configuration schema (.contractsrc.json).\n*/\nconst ContractsrcSchema = z$1.object({\n\taiProvider: z$1.enum([\n\t\t\"claude\",\n\t\t\"openai\",\n\t\t\"ollama\",\n\t\t\"custom\"\n\t]).default(\"claude\"),\n\taiModel: z$1.string().optional(),\n\tagentMode: z$1.enum([\n\t\t\"simple\",\n\t\t\"cursor\",\n\t\t\"claude-code\",\n\t\t\"openai-codex\"\n\t]).default(\"simple\"),\n\tcustomEndpoint: z$1.url().nullable().optional(),\n\tcustomApiKey: z$1.string().nullable().optional(),\n\toutputDir: z$1.string().default(\"./src\"),\n\tconventions: FolderConventionsSchema,\n\tdefaultOwners: z$1.array(z$1.string()).default([]),\n\tdefaultTags: z$1.array(z$1.string()).default([]),\n\tpackages: z$1.array(z$1.string()).optional(),\n\texcludePackages: z$1.array(z$1.string()).optional(),\n\trecursive: z$1.boolean().optional(),\n\topenapi: OpenApiConfigSchema.optional()\n});\n/**\n* Default configuration values.\n*/\nconst DEFAULT_CONTRACTSRC = {\n\taiProvider: \"claude\",\n\tagentMode: \"simple\",\n\toutputDir: \"./src\",\n\tconventions: {\n\t\tmodels: \"models\",\n\t\toperations: \"interactions/commands|queries\",\n\t\tevents: \"events\",\n\t\tpresentations: \"presentations\",\n\t\tforms: \"forms\",\n\t\tgroupByFeature: true\n\t},\n\tdefaultOwners: [],\n\tdefaultTags: []\n};\n\n//#endregion\nexport { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, GroupingRuleSchema, GroupingStrategySchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema };"],"mappings":";;;;;;;;;;;;AAYA,MAAM,4BAA4B,IAAI,OAAO;CAC5C,MAAM,IAAI,QAAQ;CAClB,KAAK,IAAI,KAAK,CAAC,UAAU;CACzB,MAAM,IAAI,QAAQ,CAAC,UAAU;CAC7B,UAAU,IAAI,KAAK;EAClB;EACA;EACA;EACA,CAAC,CAAC,QAAQ,WAAW;CACtB,MAAM,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CACxC,SAAS,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CAC3C,SAAS,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CAC3C,QAAQ,IAAI,QAAQ,CAAC,UAAU;CAC/B,kBAAkB,IAAI,KAAK;EAC1B;EACA;EACA;EACA;EACA,CAAC,CAAC,UAAU;CACb,aAAa,IAAI,KAAK;EACrB;EACA;EACA;EACA,CAAC,CAAC,UAAU;CACb,eAAe,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CACjD,CAAC;AACF,MAAM,4BAA4B,IAAI,OAAO;CAC5C,YAAY,IAAI,QAAQ,CAAC,QAAQ,iBAAiB;CAClD,QAAQ,IAAI,KAAK,CAAC,QAAQ,OAAO,CAAC,CAAC,QAAQ,OAAO;CAClD,OAAO,IAAI,QAAQ,CAAC,UAAU;CAC9B,SAAS,IAAI,QAAQ,CAAC,UAAU;CAChC,aAAa,IAAI,QAAQ,CAAC,UAAU;CACpC,SAAS,IAAI,MAAM,IAAI,OAAO;EAC7B,KAAK,IAAI,QAAQ;EACjB,aAAa,IAAI,QAAQ,CAAC,UAAU;EACpC,CAAC,CAAC,CAAC,UAAU;CACd,CAAC;;;;AAIF,MAAM,sBAAsB,IAAI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AAE,CAAC;CAChD,UAAU,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CAC5C,iBAAiB,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CACnD,WAAW,IAAI,SAAS,CAAC,UAAU;CACnC,SAAS,oBAAoB,UAAU;CACvC,CAAC"}
@@ -0,0 +1 @@
1
+ import { FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema } from "./contractsrc-schema.js";
@@ -0,0 +1,137 @@
1
+ import * as _lssm_lib_schema0 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
3
+
4
+ //#region src/operations/pipeline.d.ts
5
+ declare const KbPipelineRunWatchContract: _lssm_lib_contracts0.OperationSpec<_lssm_lib_schema0.SchemaModel<{
6
+ jurisdiction: {
7
+ type: _lssm_lib_schema0.FieldType<string, string>;
8
+ isOptional: false;
9
+ };
10
+ }>, _lssm_lib_schema0.SchemaModel<{
11
+ candidates: {
12
+ type: _lssm_lib_schema0.SchemaModel<{
13
+ id: {
14
+ type: _lssm_lib_schema0.FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ sourceDocumentId: {
18
+ type: _lssm_lib_schema0.FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ detectedAt: {
22
+ type: _lssm_lib_schema0.FieldType<Date, string>;
23
+ isOptional: false;
24
+ };
25
+ diffSummary: {
26
+ type: _lssm_lib_schema0.FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ riskLevel: {
30
+ type: _lssm_lib_schema0.EnumType<[string, string, string]>;
31
+ isOptional: false;
32
+ };
33
+ }>;
34
+ isArray: true;
35
+ isOptional: false;
36
+ };
37
+ }>, undefined>;
38
+ declare const KbPipelineCreateReviewTaskContract: _lssm_lib_contracts0.OperationSpec<_lssm_lib_schema0.SchemaModel<{
39
+ changeCandidateId: {
40
+ type: _lssm_lib_schema0.FieldType<string, string>;
41
+ isOptional: false;
42
+ };
43
+ }>, _lssm_lib_schema0.SchemaModel<{
44
+ id: {
45
+ type: _lssm_lib_schema0.FieldType<string, string>;
46
+ isOptional: false;
47
+ };
48
+ changeCandidateId: {
49
+ type: _lssm_lib_schema0.FieldType<string, string>;
50
+ isOptional: false;
51
+ };
52
+ status: {
53
+ type: _lssm_lib_schema0.FieldType<string, string>;
54
+ isOptional: false;
55
+ };
56
+ assignedRole: {
57
+ type: _lssm_lib_schema0.EnumType<[string, string]>;
58
+ isOptional: false;
59
+ };
60
+ decision: {
61
+ type: _lssm_lib_schema0.EnumType<[string, string]>;
62
+ isOptional: true;
63
+ };
64
+ decidedAt: {
65
+ type: _lssm_lib_schema0.FieldType<Date, string>;
66
+ isOptional: true;
67
+ };
68
+ decidedBy: {
69
+ type: _lssm_lib_schema0.FieldType<string, string>;
70
+ isOptional: true;
71
+ };
72
+ }>, undefined>;
73
+ declare const KbPipelineSubmitDecisionContract: _lssm_lib_contracts0.OperationSpec<_lssm_lib_schema0.SchemaModel<{
74
+ reviewTaskId: {
75
+ type: _lssm_lib_schema0.FieldType<string, string>;
76
+ isOptional: false;
77
+ };
78
+ decision: {
79
+ type: _lssm_lib_schema0.EnumType<[string, string]>;
80
+ isOptional: false;
81
+ };
82
+ decidedBy: {
83
+ type: _lssm_lib_schema0.FieldType<string, string>;
84
+ isOptional: false;
85
+ };
86
+ decidedByRole: {
87
+ type: _lssm_lib_schema0.FieldType<string, string>;
88
+ isOptional: false;
89
+ };
90
+ }>, _lssm_lib_schema0.SchemaModel<{
91
+ id: {
92
+ type: _lssm_lib_schema0.FieldType<string, string>;
93
+ isOptional: false;
94
+ };
95
+ changeCandidateId: {
96
+ type: _lssm_lib_schema0.FieldType<string, string>;
97
+ isOptional: false;
98
+ };
99
+ status: {
100
+ type: _lssm_lib_schema0.FieldType<string, string>;
101
+ isOptional: false;
102
+ };
103
+ assignedRole: {
104
+ type: _lssm_lib_schema0.EnumType<[string, string]>;
105
+ isOptional: false;
106
+ };
107
+ decision: {
108
+ type: _lssm_lib_schema0.EnumType<[string, string]>;
109
+ isOptional: true;
110
+ };
111
+ decidedAt: {
112
+ type: _lssm_lib_schema0.FieldType<Date, string>;
113
+ isOptional: true;
114
+ };
115
+ decidedBy: {
116
+ type: _lssm_lib_schema0.FieldType<string, string>;
117
+ isOptional: true;
118
+ };
119
+ }>, undefined>;
120
+ declare const KbPipelinePublishIfReadyContract: _lssm_lib_contracts0.OperationSpec<_lssm_lib_schema0.SchemaModel<{
121
+ jurisdiction: {
122
+ type: _lssm_lib_schema0.FieldType<string, string>;
123
+ isOptional: false;
124
+ };
125
+ }>, _lssm_lib_schema0.SchemaModel<{
126
+ published: {
127
+ type: _lssm_lib_schema0.FieldType<boolean, boolean>;
128
+ isOptional: false;
129
+ };
130
+ reason: {
131
+ type: _lssm_lib_schema0.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,iDAA0B,gCAAA;;UAarC,iBAAA,CAAA;;EAbW,CAAA;CAaX,CAAA,+BAAA,CAAA;;IAbqC,IAAA,+BAAA,CAAA;;cAAA,iBAAA,CAAA;;;;;;;MAAA,UAAA,EAAA;QAe1B,IAAA,6BAaX,KAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,KAAA;;MAb6C,WAAA,EAAA;;;;;;;;;;IAAA,UAAA,EAAA,KAAA;EAelC,CAAA;CA8BX,CAAA,EAAA,SAAA,CAAA;cA7CW,yDAAkC,gCAAA;;UAa7C,iBAAA,CAAA;gBAE2C,KAAA;EAAA,CAAA;;;UAfE,iBAAA,CAAA;;;;;;;EAeF,MAAA,EAAA;IAgChC,IAAA,6BAwBX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;EAxB2C,YAAA,EAAA;;;;EAAA,QAAA,EAAA;;;;;;;;;;;;;cAhChC,uDAAgC,gCAAA;;UA8B3C,iBAAA,CAAA;;;;;;;;;;;;;;;;;UA9B2C,iBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgChC,uDAAgC,gCAAA;;UAwB3C,iBAAA,CAAA;;;;;UAxB2C,iBAAA,CAAA"}
@@ -1,9 +1,9 @@
1
- import { defineCommand } from "../libs/contracts/dist/spec.js";
1
+ import { defineCommand } from "../libs/contracts/dist/operation.js";
2
2
  import "../libs/contracts/dist/index.js";
3
3
  import { E5, K5 } from "../libs/schema/dist/index.js";
4
4
  import { ChangeCandidateModel, ReviewDecisionEnum, ReviewTaskModel } from "../entities/models.js";
5
5
 
6
- //#region src/contracts/pipeline.ts
6
+ //#region src/operations/pipeline.ts
7
7
  const RunWatchInput = K5({
8
8
  name: "KbPipelineRunWatchInput",
9
9
  description: "Trigger a watch cycle for KB sources (demo).",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/operations/pipeline.ts"],"sourcesContent":["import { defineCommand } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum, defineSchemaModel } from '@lssm/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 name: '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 name: '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 name: '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 name: '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,GAAkB;CACtC,MAAM;CACN,aAAa;CACb,QAAQ,EACN,cAAc;EAAE,MAAMC,GAAe,iBAAiB;EAAE,YAAY;EAAO,EAC5E;CACF,CAAC;AAEF,MAAM,iBAAiBD,GAAkB;CACvC,MAAM;CACN,aAAa;CACb,QAAQ,EACN,YAAY;EACV,MAAM;EACN,SAAS;EACT,YAAY;EACb,EACF;CACF,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,QAAQ;EAAiB;CAC7D,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,mCAAmC,cAAc;CAC5D,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,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,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/example.kb-update-pipeline",
3
- "version": "0.0.0-canary-20251220041653",
3
+ "version": "0.0.0-canary-20251221132705",
4
4
  "description": "Example: KB update automation pipeline with HITL review and auditability.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -8,8 +8,6 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": "./dist/index.js",
11
- "./contracts": "./dist/contracts/index.js",
12
- "./contracts/pipeline": "./dist/contracts/pipeline.js",
13
11
  "./docs": "./dist/docs/index.js",
14
12
  "./docs/kb-update-pipeline.docblock": "./dist/docs/kb-update-pipeline.docblock.js",
15
13
  "./entities": "./dist/entities/index.js",
@@ -20,6 +18,8 @@
20
18
  "./handlers": "./dist/handlers/index.js",
21
19
  "./handlers/memory.handlers": "./dist/handlers/memory.handlers.js",
22
20
  "./kb-update-pipeline.feature": "./dist/kb-update-pipeline.feature.js",
21
+ "./operations": "./dist/operations/index.js",
22
+ "./operations/pipeline": "./dist/operations/pipeline.js",
23
23
  "./*": "./*"
24
24
  },
25
25
  "scripts": {
@@ -36,15 +36,15 @@
36
36
  "test": "bun test"
37
37
  },
38
38
  "dependencies": {
39
- "@lssm/lib.contracts": "0.0.0-canary-20251220041653",
40
- "@lssm/lib.identity-rbac": "0.0.0-canary-20251220041653",
41
- "@lssm/lib.schema": "0.0.0-canary-20251220041653",
42
- "@lssm/module.notifications": "0.0.0-canary-20251220041653",
39
+ "@lssm/lib.contracts": "0.0.0-canary-20251221132705",
40
+ "@lssm/lib.identity-rbac": "0.0.0-canary-20251221132705",
41
+ "@lssm/lib.schema": "0.0.0-canary-20251221132705",
42
+ "@lssm/module.notifications": "0.0.0-canary-20251221132705",
43
43
  "zod": "^4.1.13"
44
44
  },
45
45
  "devDependencies": {
46
- "@lssm/tool.tsdown": "0.0.0-canary-20251220041653",
47
- "@lssm/tool.typescript": "0.0.0-canary-20251220041653",
46
+ "@lssm/tool.tsdown": "0.0.0-canary-20251221132705",
47
+ "@lssm/tool.typescript": "0.0.0-canary-20251221132705",
48
48
  "tsdown": "^0.18.1",
49
49
  "typescript": "^5.9.3"
50
50
  },
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Automation proposes KB updates; humans verify; everything audited and notified.
5
5
  */
6
6
  export * from './entities';
7
- export * from './contracts';
7
+ export * from './operations';
8
8
  export * from './events';
9
9
  export * from './handlers';
10
10
  export * from './kb-update-pipeline.feature';