@lssm/lib.contracts 0.0.0-canary-20251221114240 → 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.
@@ -0,0 +1,122 @@
1
+ import { __esmMin, __export } from "./_virtual/rolldown_runtime.js";
2
+
3
+ //#region src/registry-utils.ts
4
+ var registry_utils_exports = /* @__PURE__ */ __export({
5
+ GroupingStrategies: () => GroupingStrategies,
6
+ filterBy: () => filterBy,
7
+ getUniqueDomains: () => getUniqueDomains,
8
+ getUniqueOwners: () => getUniqueOwners,
9
+ getUniqueTags: () => getUniqueTags,
10
+ groupBy: () => groupBy,
11
+ groupByMultiple: () => groupByMultiple,
12
+ groupByToArray: () => groupByToArray
13
+ });
14
+ /**
15
+ * Filter items by criteria.
16
+ * All criteria are combined with AND logic.
17
+ */
18
+ function filterBy(items, filter) {
19
+ return items.filter((item) => {
20
+ if (filter.tags?.length) {
21
+ if (!filter.tags.some((tag) => item.meta.tags?.includes(tag))) return false;
22
+ }
23
+ if (filter.owners?.length) {
24
+ if (!filter.owners.some((owner) => item.meta.owners?.includes(owner))) return false;
25
+ }
26
+ if (filter.stability?.length) {
27
+ if (!filter.stability.includes(item.meta.stability ?? "stable")) return false;
28
+ }
29
+ if (filter.domain) {
30
+ if (GroupingStrategies.byDomain(item) !== filter.domain) return false;
31
+ }
32
+ if (filter.namePattern) {
33
+ const name = item.meta.name ?? item.meta.key ?? "";
34
+ const pattern = filter.namePattern.replace(/\*/g, ".*").replace(/\?/g, ".");
35
+ if (!new RegExp(`^${pattern}$`, "i").test(name)) return false;
36
+ }
37
+ return true;
38
+ });
39
+ }
40
+ /**
41
+ * Group items by key function.
42
+ */
43
+ function groupBy(items, keyFn) {
44
+ const groups = /* @__PURE__ */ new Map();
45
+ for (const item of items) {
46
+ const key = keyFn(item);
47
+ const existing = groups.get(key);
48
+ if (existing) existing.push(item);
49
+ else groups.set(key, [item]);
50
+ }
51
+ return groups;
52
+ }
53
+ /**
54
+ * Group items by key function, returning array format.
55
+ */
56
+ function groupByToArray(items, keyFn) {
57
+ const map = groupBy(items, keyFn);
58
+ return Array.from(map.entries()).map(([key, items$1]) => ({
59
+ key,
60
+ items: items$1
61
+ }));
62
+ }
63
+ /**
64
+ * Group items where one item can belong to multiple groups.
65
+ * Useful for byAllTags grouping.
66
+ */
67
+ function groupByMultiple(items, keysFn) {
68
+ const groups = /* @__PURE__ */ new Map();
69
+ for (const item of items) {
70
+ const keys = keysFn(item);
71
+ for (const key of keys) {
72
+ const existing = groups.get(key);
73
+ if (existing) existing.push(item);
74
+ else groups.set(key, [item]);
75
+ }
76
+ }
77
+ return groups;
78
+ }
79
+ /**
80
+ * Get unique tags from a collection of items.
81
+ */
82
+ function getUniqueTags(items) {
83
+ const tags = /* @__PURE__ */ new Set();
84
+ for (const item of items) for (const tag of item.meta.tags ?? []) tags.add(tag);
85
+ return Array.from(tags).sort();
86
+ }
87
+ /**
88
+ * Get unique owners from a collection of items.
89
+ */
90
+ function getUniqueOwners(items) {
91
+ const owners = /* @__PURE__ */ new Set();
92
+ for (const item of items) for (const owner of item.meta.owners ?? []) owners.add(owner);
93
+ return Array.from(owners).sort();
94
+ }
95
+ /**
96
+ * Get unique domains from a collection of items.
97
+ */
98
+ function getUniqueDomains(items) {
99
+ const domains = /* @__PURE__ */ new Set();
100
+ for (const item of items) domains.add(GroupingStrategies.byDomain(item));
101
+ return Array.from(domains).sort();
102
+ }
103
+ var GroupingStrategies;
104
+ var init_registry_utils = __esmMin(() => {
105
+ GroupingStrategies = {
106
+ byTag: (item) => item.meta.tags?.[0] ?? "untagged",
107
+ byAllTags: (item) => item.meta.tags?.length ? item.meta.tags : ["untagged"],
108
+ byOwner: (item) => item.meta.owners?.[0] ?? "unowned",
109
+ byDomain: (item) => {
110
+ return (item.meta.name ?? item.meta.key ?? "").split(".")[0] ?? "default";
111
+ },
112
+ byStability: (item) => item.meta.stability ?? "stable",
113
+ byUrlPath: (level) => (item) => {
114
+ if (!item.path) return "root";
115
+ return item.path.split("/").filter(Boolean).slice(0, level).join("/") || "root";
116
+ }
117
+ };
118
+ });
119
+
120
+ //#endregion
121
+ init_registry_utils();
122
+ export { GroupingStrategies, filterBy, getUniqueDomains, getUniqueOwners, getUniqueTags, groupBy, groupByMultiple, groupByToArray, init_registry_utils, registry_utils_exports };
@@ -1,3 +1,4 @@
1
+ import { GroupKeyFn, RegistryFilter } from "./registry-utils.js";
1
2
  import { defaultDocRegistry, docId, registerDocBlocks } from "./docs/registry.js";
2
3
  import { ResourceRefDescriptor } from "./resources.js";
3
4
  import { AnyOperationSpec, OperationSpec } from "./operation.js";
@@ -53,6 +54,38 @@ declare class OperationSpecRegistry {
53
54
  spec: AnyOperationSpec;
54
55
  handler: AnyOperationHandler;
55
56
  }[];
57
+ /**
58
+ * Filter specs by criteria.
59
+ */
60
+ filter(criteria: RegistryFilter): AnyOperationSpec[];
61
+ /**
62
+ * List specs with specific tag.
63
+ */
64
+ listByTag(tag: string): AnyOperationSpec[];
65
+ /**
66
+ * List specs by owner.
67
+ */
68
+ listByOwner(owner: string): AnyOperationSpec[];
69
+ /**
70
+ * Group specs by key function.
71
+ */
72
+ groupBy(keyFn: GroupKeyFn<AnyOperationSpec>): Map<string, AnyOperationSpec[]>;
73
+ /**
74
+ * Group by domain (first segment of name).
75
+ */
76
+ groupByDomain(): Map<string, AnyOperationSpec[]>;
77
+ /**
78
+ * Group by tag.
79
+ */
80
+ groupByTag(): Map<string, AnyOperationSpec[]>;
81
+ /**
82
+ * Get unique tags from all specs.
83
+ */
84
+ getUniqueTags(): string[];
85
+ /**
86
+ * Get unique owners from all specs.
87
+ */
88
+ getUniqueOwners(): string[];
56
89
  /**
57
90
  * Execute an operation by name/version with full runtime protections:
58
91
  * 1. Validates input against Zod schema.
package/dist/registry.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { __toCommonJS } from "./_virtual/rolldown_runtime.js";
2
+ import { init_registry_utils, registry_utils_exports } from "./registry-utils.js";
1
3
  import { eventKey } from "./events.js";
2
4
  import { isEmitDeclRef } from "./operation.js";
3
5
  import { defaultDocRegistry, docId, registerDocBlocks } from "./docs/registry.js";
@@ -94,6 +96,60 @@ var OperationSpecRegistry = class {
94
96
  return out;
95
97
  }
96
98
  /**
99
+ * Filter specs by criteria.
100
+ */
101
+ filter(criteria) {
102
+ const { filterBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
103
+ return filterBy(this.listSpecs(), criteria);
104
+ }
105
+ /**
106
+ * List specs with specific tag.
107
+ */
108
+ listByTag(tag) {
109
+ return this.listSpecs().filter((s) => s.meta.tags?.includes(tag));
110
+ }
111
+ /**
112
+ * List specs by owner.
113
+ */
114
+ listByOwner(owner) {
115
+ return this.listSpecs().filter((s) => s.meta.owners?.includes(owner));
116
+ }
117
+ /**
118
+ * Group specs by key function.
119
+ */
120
+ groupBy(keyFn) {
121
+ const { groupBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
122
+ return groupBy(this.listSpecs(), keyFn);
123
+ }
124
+ /**
125
+ * Group by domain (first segment of name).
126
+ */
127
+ groupByDomain() {
128
+ const { GroupingStrategies } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
129
+ return this.groupBy(GroupingStrategies.byDomain);
130
+ }
131
+ /**
132
+ * Group by tag.
133
+ */
134
+ groupByTag() {
135
+ const { GroupingStrategies } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
136
+ return this.groupBy(GroupingStrategies.byTag);
137
+ }
138
+ /**
139
+ * Get unique tags from all specs.
140
+ */
141
+ getUniqueTags() {
142
+ const { getUniqueTags } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
143
+ return getUniqueTags(this.listSpecs());
144
+ }
145
+ /**
146
+ * Get unique owners from all specs.
147
+ */
148
+ getUniqueOwners() {
149
+ const { getUniqueOwners } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
150
+ return getUniqueOwners(this.listSpecs());
151
+ }
152
+ /**
97
153
  * Execute an operation by name/version with full runtime protections:
98
154
  * 1. Validates input against Zod schema.
99
155
  * 2. Enforces policy (Auth, RBAC, Rate Limits) via PDP.
@@ -10,7 +10,7 @@ interface WorkflowTargetRef {
10
10
  version?: number;
11
11
  }
12
12
  type TestTarget = {
13
- type: 'contract';
13
+ type: 'operation';
14
14
  operation: OperationTargetRef;
15
15
  } | {
16
16
  type: 'workflow';
@@ -1,10 +1,10 @@
1
1
  import { OwnerShipMeta } from "../ownership.js";
2
+ import { GroupKeyFn, RegistryFilter } from "../registry-utils.js";
2
3
  import { CapabilityRef } from "../capabilities.js";
3
4
  import { ExperimentRef } from "../experiments/spec.js";
4
5
  import { OpRef } from "../features.js";
5
6
 
6
7
  //#region src/workflow/spec.d.ts
7
-
8
8
  /**
9
9
  * Reference to a form spec declared in {@link FormRegistry}.
10
10
  */
@@ -94,6 +94,16 @@ declare class WorkflowRegistry {
94
94
  register(spec: WorkflowSpec): this;
95
95
  list(): WorkflowSpec[];
96
96
  get(name: string, version?: number): WorkflowSpec | undefined;
97
+ /** Filter workflows by criteria. */
98
+ filter(criteria: RegistryFilter): WorkflowSpec[];
99
+ /** List workflows with specific tag. */
100
+ listByTag(tag: string): WorkflowSpec[];
101
+ /** List workflows by owner. */
102
+ listByOwner(owner: string): WorkflowSpec[];
103
+ /** Group workflows by key function. */
104
+ groupBy(keyFn: GroupKeyFn<WorkflowSpec>): Map<string, WorkflowSpec[]>;
105
+ /** Get unique tags from all workflows. */
106
+ getUniqueTags(): string[];
97
107
  }
98
108
  //#endregion
99
109
  export { CompensationStep, CompensationStrategy, FormRef, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowRegistry, WorkflowSpec, WorkflowStatus };
@@ -1,3 +1,6 @@
1
+ import { __toCommonJS } from "../_virtual/rolldown_runtime.js";
2
+ import { init_registry_utils, registry_utils_exports } from "../registry-utils.js";
3
+
1
4
  //#region src/workflow/spec.ts
2
5
  function workflowKey(meta) {
3
6
  return `${meta.name}.v${meta.version}`;
@@ -26,6 +29,29 @@ var WorkflowRegistry = class {
26
29
  }
27
30
  return candidate;
28
31
  }
32
+ /** Filter workflows by criteria. */
33
+ filter(criteria) {
34
+ const { filterBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
35
+ return filterBy(this.list(), criteria);
36
+ }
37
+ /** List workflows with specific tag. */
38
+ listByTag(tag) {
39
+ return this.list().filter((w) => w.meta.tags?.includes(tag));
40
+ }
41
+ /** List workflows by owner. */
42
+ listByOwner(owner) {
43
+ return this.list().filter((w) => w.meta.owners?.includes(owner));
44
+ }
45
+ /** Group workflows by key function. */
46
+ groupBy(keyFn) {
47
+ const { groupBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
48
+ return groupBy(this.list(), keyFn);
49
+ }
50
+ /** Get unique tags from all workflows. */
51
+ getUniqueTags() {
52
+ const { getUniqueTags } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
53
+ return getUniqueTags(this.list());
54
+ }
29
55
  };
30
56
 
31
57
  //#endregion
@@ -90,6 +90,34 @@ declare const OpenApiConfigSchema: z$1.ZodObject<{
90
90
  }, z$1.core.$strip>>>;
91
91
  }, z$1.core.$strip>>;
92
92
  }, z$1.core.$strip>;
93
+ /**
94
+ * Grouping strategy for organizing specs.
95
+ */
96
+ declare const GroupingStrategySchema: z$1.ZodEnum<{
97
+ "by-tag": "by-tag";
98
+ "by-owner": "by-owner";
99
+ "by-domain": "by-domain";
100
+ "by-url-path-single": "by-url-path-single";
101
+ "by-url-path-multi": "by-url-path-multi";
102
+ "by-feature": "by-feature";
103
+ none: "none";
104
+ }>;
105
+ /**
106
+ * Grouping rule configuration.
107
+ */
108
+ declare const GroupingRuleSchema: z$1.ZodObject<{
109
+ strategy: z$1.ZodEnum<{
110
+ "by-tag": "by-tag";
111
+ "by-owner": "by-owner";
112
+ "by-domain": "by-domain";
113
+ "by-url-path-single": "by-url-path-single";
114
+ "by-url-path-multi": "by-url-path-multi";
115
+ "by-feature": "by-feature";
116
+ none: "none";
117
+ }>;
118
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
119
+ pattern: z$1.ZodOptional<z$1.ZodString>;
120
+ }, z$1.core.$strip>;
93
121
  /**
94
122
  * Output directory conventions for generated specs.
95
123
  */
@@ -99,6 +127,46 @@ declare const FolderConventionsSchema: z$1.ZodObject<{
99
127
  events: z$1.ZodDefault<z$1.ZodString>;
100
128
  presentations: z$1.ZodDefault<z$1.ZodString>;
101
129
  forms: z$1.ZodDefault<z$1.ZodString>;
130
+ groupByFeature: z$1.ZodDefault<z$1.ZodBoolean>;
131
+ operationsGrouping: z$1.ZodOptional<z$1.ZodObject<{
132
+ strategy: z$1.ZodEnum<{
133
+ "by-tag": "by-tag";
134
+ "by-owner": "by-owner";
135
+ "by-domain": "by-domain";
136
+ "by-url-path-single": "by-url-path-single";
137
+ "by-url-path-multi": "by-url-path-multi";
138
+ "by-feature": "by-feature";
139
+ none: "none";
140
+ }>;
141
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
142
+ pattern: z$1.ZodOptional<z$1.ZodString>;
143
+ }, z$1.core.$strip>>;
144
+ modelsGrouping: z$1.ZodOptional<z$1.ZodObject<{
145
+ strategy: z$1.ZodEnum<{
146
+ "by-tag": "by-tag";
147
+ "by-owner": "by-owner";
148
+ "by-domain": "by-domain";
149
+ "by-url-path-single": "by-url-path-single";
150
+ "by-url-path-multi": "by-url-path-multi";
151
+ "by-feature": "by-feature";
152
+ none: "none";
153
+ }>;
154
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
155
+ pattern: z$1.ZodOptional<z$1.ZodString>;
156
+ }, z$1.core.$strip>>;
157
+ eventsGrouping: z$1.ZodOptional<z$1.ZodObject<{
158
+ strategy: z$1.ZodEnum<{
159
+ "by-tag": "by-tag";
160
+ "by-owner": "by-owner";
161
+ "by-domain": "by-domain";
162
+ "by-url-path-single": "by-url-path-single";
163
+ "by-url-path-multi": "by-url-path-multi";
164
+ "by-feature": "by-feature";
165
+ none: "none";
166
+ }>;
167
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
168
+ pattern: z$1.ZodOptional<z$1.ZodString>;
169
+ }, z$1.core.$strip>>;
102
170
  }, z$1.core.$strip>;
103
171
  /**
104
172
  * Full ContractSpec configuration schema (.contractsrc.json).
@@ -126,6 +194,46 @@ declare const ContractsrcSchema: z$1.ZodObject<{
126
194
  events: z$1.ZodDefault<z$1.ZodString>;
127
195
  presentations: z$1.ZodDefault<z$1.ZodString>;
128
196
  forms: z$1.ZodDefault<z$1.ZodString>;
197
+ groupByFeature: z$1.ZodDefault<z$1.ZodBoolean>;
198
+ operationsGrouping: z$1.ZodOptional<z$1.ZodObject<{
199
+ strategy: z$1.ZodEnum<{
200
+ "by-tag": "by-tag";
201
+ "by-owner": "by-owner";
202
+ "by-domain": "by-domain";
203
+ "by-url-path-single": "by-url-path-single";
204
+ "by-url-path-multi": "by-url-path-multi";
205
+ "by-feature": "by-feature";
206
+ none: "none";
207
+ }>;
208
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
209
+ pattern: z$1.ZodOptional<z$1.ZodString>;
210
+ }, z$1.core.$strip>>;
211
+ modelsGrouping: z$1.ZodOptional<z$1.ZodObject<{
212
+ strategy: z$1.ZodEnum<{
213
+ "by-tag": "by-tag";
214
+ "by-owner": "by-owner";
215
+ "by-domain": "by-domain";
216
+ "by-url-path-single": "by-url-path-single";
217
+ "by-url-path-multi": "by-url-path-multi";
218
+ "by-feature": "by-feature";
219
+ none: "none";
220
+ }>;
221
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
222
+ pattern: z$1.ZodOptional<z$1.ZodString>;
223
+ }, z$1.core.$strip>>;
224
+ eventsGrouping: z$1.ZodOptional<z$1.ZodObject<{
225
+ strategy: z$1.ZodEnum<{
226
+ "by-tag": "by-tag";
227
+ "by-owner": "by-owner";
228
+ "by-domain": "by-domain";
229
+ "by-url-path-single": "by-url-path-single";
230
+ "by-url-path-multi": "by-url-path-multi";
231
+ "by-feature": "by-feature";
232
+ none: "none";
233
+ }>;
234
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
235
+ pattern: z$1.ZodOptional<z$1.ZodString>;
236
+ }, z$1.core.$strip>>;
129
237
  }, z$1.core.$strip>;
130
238
  defaultOwners: z$1.ZodDefault<z$1.ZodArray<z$1.ZodString>>;
131
239
  defaultTags: z$1.ZodDefault<z$1.ZodArray<z$1.ZodString>>;
@@ -180,9 +288,11 @@ type OpenApiExportConfig = z$1.infer<typeof OpenApiExportConfigSchema>;
180
288
  type OpenApiConfig = z$1.infer<typeof OpenApiConfigSchema>;
181
289
  type FolderConventions = z$1.infer<typeof FolderConventionsSchema>;
182
290
  type ContractsrcConfig = z$1.infer<typeof ContractsrcSchema>;
291
+ type GroupingStrategy = z$1.infer<typeof GroupingStrategySchema>;
292
+ type GroupingRule = z$1.infer<typeof GroupingRuleSchema>;
183
293
  /**
184
294
  * Default configuration values.
185
295
  */
186
296
  declare const DEFAULT_CONTRACTSRC: ContractsrcConfig;
187
297
  //#endregion
188
- export { ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema };
298
+ export { ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, GroupingRule, GroupingRuleSchema, GroupingStrategy, GroupingStrategySchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema };
@@ -55,6 +55,26 @@ const OpenApiConfigSchema = z$1.object({
55
55
  export: OpenApiExportConfigSchema.optional()
56
56
  });
57
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
+ /**
58
78
  * Output directory conventions for generated specs.
59
79
  */
60
80
  const FolderConventionsSchema = z$1.object({
@@ -62,7 +82,11 @@ const FolderConventionsSchema = z$1.object({
62
82
  operations: z$1.string().default("operations/commands|queries"),
63
83
  events: z$1.string().default("events"),
64
84
  presentations: z$1.string().default("presentations"),
65
- forms: z$1.string().default("forms")
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()
66
90
  });
67
91
  /**
68
92
  * Full ContractSpec configuration schema (.contractsrc.json).
@@ -104,11 +128,12 @@ const DEFAULT_CONTRACTSRC = {
104
128
  operations: "interactions/commands|queries",
105
129
  events: "events",
106
130
  presentations: "presentations",
107
- forms: "forms"
131
+ forms: "forms",
132
+ groupByFeature: true
108
133
  },
109
134
  defaultOwners: [],
110
135
  defaultTags: []
111
136
  };
112
137
 
113
138
  //#endregion
114
- export { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema };
139
+ export { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, GroupingRuleSchema, GroupingStrategySchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/lib.contracts",
3
- "version": "0.0.0-canary-20251221114240",
3
+ "version": "0.0.0-canary-20251221132705",
4
4
  "scripts": {
5
5
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
6
6
  "publish:pkg:canary": "bun publish:pkg --tag canary",
@@ -16,8 +16,8 @@
16
16
  "test": "bun run"
17
17
  },
18
18
  "devDependencies": {
19
- "@lssm/tool.tsdown": "0.0.0-canary-20251221114240",
20
- "@lssm/tool.typescript": "0.0.0-canary-20251221114240",
19
+ "@lssm/tool.tsdown": "0.0.0-canary-20251221132705",
20
+ "@lssm/tool.typescript": "0.0.0-canary-20251221132705",
21
21
  "@types/express": "^5.0.3",
22
22
  "@types/turndown": "^5.0.6",
23
23
  "tsdown": "^0.18.1",
@@ -35,8 +35,8 @@
35
35
  "@elevenlabs/elevenlabs-js": "^2.27.0",
36
36
  "@google-cloud/secret-manager": "^6.1.1",
37
37
  "@google-cloud/storage": "^7.18.0",
38
- "@lssm/lib.logger": "0.0.0-canary-20251221114240",
39
- "@lssm/lib.schema": "0.0.0-canary-20251221114240",
38
+ "@lssm/lib.logger": "0.0.0-canary-20251221132705",
39
+ "@lssm/lib.schema": "0.0.0-canary-20251221132705",
40
40
  "@mistralai/mistralai": "^1.11.0",
41
41
  "@modelcontextprotocol/sdk": "^1.24.3",
42
42
  "@qdrant/js-client-rest": "^1.16.2",
@@ -256,7 +256,6 @@
256
256
  "./policy/opa-adapter": "./dist/policy/opa-adapter.js",
257
257
  "./policy/spec": "./dist/policy/spec.js",
258
258
  "./presentations": "./dist/presentations.js",
259
- "./presentations.backcompat": "./dist/presentations.backcompat.js",
260
259
  "./presentations.v2": "./dist/presentations.v2.js",
261
260
  "./presentations/docs/presentations-conventions.docblock": "./dist/presentations/docs/presentations-conventions.docblock.js",
262
261
  "./prompt": "./dist/prompt.js",
@@ -270,6 +269,7 @@
270
269
  "./regenerator/types": "./dist/regenerator/types.js",
271
270
  "./regenerator/utils": "./dist/regenerator/utils.js",
272
271
  "./registry": "./dist/registry.js",
272
+ "./registry-utils": "./dist/registry-utils.js",
273
273
  "./resources": "./dist/resources.js",
274
274
  "./schema-to-markdown": "./dist/schema-to-markdown.js",
275
275
  "./server": "./dist/server/index.js",
@@ -299,7 +299,6 @@
299
299
  "./translations/catalog": "./dist/translations/catalog.js",
300
300
  "./translations/tenant": "./dist/translations/tenant.js",
301
301
  "./types": "./dist/types.js",
302
- "./types/all": "./dist/types/all.js",
303
302
  "./workflow": "./dist/workflow/index.js",
304
303
  "./workflow/adapters": "./dist/workflow/adapters/index.js",
305
304
  "./workflow/adapters/db-adapter": "./dist/workflow/adapters/db-adapter.js",
@@ -1,7 +0,0 @@
1
- import { PresentationDescriptorV2 } from "./presentations.v2.js";
2
- import { PresentationSpec } from "./presentations.js";
3
-
4
- //#region src/presentations.backcompat.d.ts
5
- declare function toV2FromV1(v1: PresentationSpec): PresentationDescriptorV2;
6
- //#endregion
7
- export { toV2FromV1 };
@@ -1,47 +0,0 @@
1
- //#region src/presentations.backcompat.ts
2
- function toV2FromV1(v1) {
3
- if (v1.content.kind === "web_component") return {
4
- meta: { ...v1.meta },
5
- policy: v1.policy,
6
- source: {
7
- type: "component",
8
- framework: v1.content.framework,
9
- componentKey: v1.content.componentKey,
10
- props: v1.content.props
11
- },
12
- targets: [
13
- "react",
14
- "application/json",
15
- "application/xml"
16
- ]
17
- };
18
- if (v1.content.kind === "markdown") return {
19
- meta: { ...v1.meta },
20
- policy: v1.policy,
21
- source: {
22
- type: "blocknotejs",
23
- docJson: v1.content.content ?? v1.content.resourceUri ?? ""
24
- },
25
- targets: [
26
- "markdown",
27
- "application/json",
28
- "application/xml"
29
- ]
30
- };
31
- return {
32
- meta: { ...v1.meta },
33
- policy: v1.policy,
34
- source: {
35
- type: "blocknotejs",
36
- docJson: {
37
- kind: "data",
38
- mimeType: v1.content.mimeType,
39
- model: "schema"
40
- }
41
- },
42
- targets: ["application/json", "application/xml"]
43
- };
44
- }
45
-
46
- //#endregion
47
- export { toV2FromV1 };