@lssm/lib.contracts 0.0.0-canary-20251221132705 → 0.0.0-canary-20251221144710

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 (111) hide show
  1. package/dist/app-config/contracts.d.ts +56 -55
  2. package/dist/app-config/contracts.js +5 -4
  3. package/dist/app-config/docs/app-config.docblock.js +0 -1
  4. package/dist/app-config/events.d.ts +27 -27
  5. package/dist/app-config/lifecycle-contracts.d.ts +83 -82
  6. package/dist/app-config/lifecycle-contracts.js +2 -1
  7. package/dist/app-config/runtime.d.ts +4 -2
  8. package/dist/app-config/spec.d.ts +2 -1
  9. package/dist/app-config/validation.d.ts +4 -2
  10. package/dist/{capabilities.d.ts → capabilities/capabilities.d.ts} +3 -3
  11. package/dist/{capabilities.js → capabilities/capabilities.js} +1 -1
  12. package/dist/capabilities/docs/capabilities.docblock.js +0 -1
  13. package/dist/capabilities/index.d.ts +3 -0
  14. package/dist/capabilities/index.js +4 -0
  15. package/dist/capabilities/openbanking.d.ts +2 -1
  16. package/dist/client/react/feature-render.d.ts +3 -1
  17. package/dist/client/react/feature-render.js +2 -1
  18. package/dist/client/react/form-render.d.ts +1 -1
  19. package/dist/client/react/form-render.js +1 -1
  20. package/dist/{data-views.d.ts → data-views/data-views.d.ts} +5 -5
  21. package/dist/{data-views.js → data-views/data-views.js} +3 -3
  22. package/dist/data-views/docs/data-views.docblock.js +0 -1
  23. package/dist/data-views/index.d.ts +4 -0
  24. package/dist/data-views/index.js +5 -0
  25. package/dist/data-views/query-generator.d.ts +2 -1
  26. package/dist/data-views/runtime.d.ts +2 -1
  27. package/dist/docs/presentations.d.ts +3 -2
  28. package/dist/docs/registry.d.ts +3 -2
  29. package/dist/docs/tech/llm/llm-integration.docblock.js +2 -2
  30. package/dist/experiments/docs/experiments.docblock.js +0 -1
  31. package/dist/experiments/spec-resolver.d.ts +2 -1
  32. package/dist/features.d.ts +8 -5
  33. package/dist/forms/docs/forms.docblock.js +0 -1
  34. package/dist/{forms.d.ts → forms/forms.d.ts} +3 -3
  35. package/dist/{forms.js → forms/forms.js} +3 -3
  36. package/dist/forms/index.d.ts +2 -0
  37. package/dist/forms/index.js +3 -0
  38. package/dist/index.d.ts +19 -12
  39. package/dist/index.js +20 -15
  40. package/dist/install.d.ts +3 -2
  41. package/dist/install.js +1 -1
  42. package/dist/integrations/docs/integrations.docblock.js +0 -1
  43. package/dist/integrations/openbanking/contracts/accounts.d.ts +69 -68
  44. package/dist/integrations/openbanking/contracts/accounts.js +2 -1
  45. package/dist/integrations/openbanking/contracts/balances.d.ts +37 -36
  46. package/dist/integrations/openbanking/contracts/balances.js +2 -1
  47. package/dist/integrations/openbanking/contracts/index.d.ts +1 -1
  48. package/dist/integrations/openbanking/contracts/transactions.d.ts +51 -50
  49. package/dist/integrations/openbanking/contracts/transactions.js +2 -1
  50. package/dist/integrations/openbanking/models.d.ts +55 -55
  51. package/dist/integrations/operations.d.ts +437 -0
  52. package/dist/integrations/{contracts.js → operations.js} +3 -2
  53. package/dist/integrations/spec.d.ts +2 -1
  54. package/dist/jsonschema.d.ts +5 -4
  55. package/dist/knowledge/docs/knowledge.docblock.js +0 -1
  56. package/dist/knowledge/{contracts.d.ts → operations.d.ts} +70 -69
  57. package/dist/knowledge/{contracts.js → operations.js} +3 -2
  58. package/dist/llm/exporters.d.ts +10 -8
  59. package/dist/llm/exporters.js +11 -10
  60. package/dist/llm/index.d.ts +2 -2
  61. package/dist/llm/index.js +2 -2
  62. package/dist/llm/prompts.d.ts +2 -1
  63. package/dist/llm/prompts.js +8 -8
  64. package/dist/llm/types.d.ts +3 -2
  65. package/dist/markdown.d.ts +5 -4
  66. package/dist/markdown.js +6 -5
  67. package/dist/onboarding-base.d.ts +31 -30
  68. package/dist/onboarding-base.js +2 -1
  69. package/dist/openapi.d.ts +1 -1
  70. package/dist/operations/index.d.ts +3 -0
  71. package/dist/operations/index.js +4 -0
  72. package/dist/{operation.d.ts → operations/operation.d.ts} +7 -7
  73. package/dist/{operation.js → operations/operation.js} +1 -1
  74. package/dist/{registry.d.ts → operations/registry.d.ts} +6 -7
  75. package/dist/{registry.js → operations/registry.js} +5 -6
  76. package/dist/policy/docs/policy.docblock.js +0 -1
  77. package/dist/presentations/docs/presentations-conventions.docblock.js +0 -1
  78. package/dist/presentations/index.d.ts +4 -0
  79. package/dist/presentations/index.js +4 -0
  80. package/dist/{presentations.d.ts → presentations/presentations.d.ts} +6 -6
  81. package/dist/{presentations.js → presentations/presentations.js} +3 -3
  82. package/dist/presentations/presentations.v2.d.ts +54 -0
  83. package/dist/presentations/presentations.v2.js +0 -0
  84. package/dist/{presentations.v2.d.ts → presentations/transform-engine.d.ts} +3 -51
  85. package/dist/{presentations.v2.js → presentations/transform-engine.js} +2 -2
  86. package/dist/regenerator/docs/regenerator.docblock.js +0 -1
  87. package/dist/{contracts-adapter-hydration.d.ts → server/contracts-adapter-hydration.d.ts} +2 -2
  88. package/dist/{contracts-adapter-hydration.js → server/contracts-adapter-hydration.js} +1 -1
  89. package/dist/{contracts-adapter-input.d.ts → server/contracts-adapter-input.d.ts} +2 -3
  90. package/dist/{contracts-adapter-input.js → server/contracts-adapter-input.js} +2 -2
  91. package/dist/server/graphql-pothos.d.ts +1 -1
  92. package/dist/server/graphql-pothos.js +2 -2
  93. package/dist/server/mcp/createMcpServer.d.ts +1 -1
  94. package/dist/server/mcp/mcpTypes.d.ts +3 -2
  95. package/dist/server/mcp/registerPresentations.js +3 -2
  96. package/dist/server/mcp/registerTools.d.ts +1 -1
  97. package/dist/server/rest-elysia.d.ts +1 -1
  98. package/dist/server/rest-express.d.ts +1 -1
  99. package/dist/server/rest-generic.d.ts +1 -1
  100. package/dist/server/rest-next-app.d.ts +1 -1
  101. package/dist/server/rest-next-mcp.d.ts +1 -1
  102. package/dist/server/rest-next-pages.d.ts +1 -1
  103. package/dist/telemetry/docs/telemetry.docblock.js +0 -1
  104. package/dist/tests/runner.d.ts +1 -1
  105. package/dist/workflow/spec.d.ts +2 -1
  106. package/dist/workflow/validation.d.ts +2 -2
  107. package/dist/workspace-config/contractsrc-schema.d.ts +1 -1
  108. package/package.json +22 -17
  109. package/dist/integrations/contracts.d.ts +0 -436
  110. package/dist/openbanking/docs/openbanking.docblock.d.ts +0 -6
  111. package/dist/openbanking/docs/openbanking.docblock.js +0 -22
package/dist/markdown.js CHANGED
@@ -1,13 +1,14 @@
1
- import { isEmitDeclRef } from "./operation.js";
1
+ import { isEmitDeclRef } from "./operations/operation.js";
2
+ import "./operations/index.js";
2
3
 
3
4
  //#region src/markdown.ts
4
5
  /**
5
6
  * Render simple Markdown docs for each spec.
6
7
  * Useful for dev portals and repo docs generation.
7
8
  */
8
- function specsToMarkdown(reg, _extras) {
9
+ function operationsToMarkdown(registry, _extras) {
9
10
  const lines = [];
10
- for (const spec of reg.listSpecs()) {
11
+ for (const spec of registry.listSpecs()) {
11
12
  const m = spec.meta;
12
13
  lines.push(`# ${m.name}.v${m.version}`);
13
14
  lines.push("");
@@ -72,7 +73,7 @@ function specsToMarkdown(reg, _extras) {
72
73
  /** Render presentations and features as additional sections. */
73
74
  function docsToMarkdown(reg, extras) {
74
75
  const parts = [];
75
- parts.push(specsToMarkdown(reg, extras));
76
+ parts.push(operationsToMarkdown(reg, extras));
76
77
  if (extras.presentations) {
77
78
  parts.push("# Presentations");
78
79
  parts.push("");
@@ -113,4 +114,4 @@ function docsToMarkdown(reg, extras) {
113
114
  }
114
115
 
115
116
  //#endregion
116
- export { docsToMarkdown, specsToMarkdown };
117
+ export { docsToMarkdown, operationsToMarkdown };
@@ -1,135 +1,136 @@
1
- import { OperationSpec } from "./operation.js";
2
- import * as _lssm_lib_schema206 from "@lssm/lib.schema";
1
+ import { OperationSpec } from "./operations/operation.js";
2
+ import "./index.js";
3
+ import * as _lssm_lib_schema7 from "@lssm/lib.schema";
3
4
  import { SchemaModel } from "@lssm/lib.schema";
4
5
 
5
6
  //#region src/onboarding-base.d.ts
6
7
  /** Save/update onboarding draft (auto-save during flow) */
7
8
  declare const SaveOnboardingDraftInput: SchemaModel<{
8
9
  data: {
9
- type: _lssm_lib_schema206.FieldType<unknown, unknown>;
10
+ type: _lssm_lib_schema7.FieldType<unknown, unknown>;
10
11
  isOptional: false;
11
12
  };
12
13
  }>;
13
14
  declare const SaveOnboardingDraftOutput: SchemaModel<{
14
15
  id: {
15
- type: _lssm_lib_schema206.FieldType<string, string>;
16
+ type: _lssm_lib_schema7.FieldType<string, string>;
16
17
  isOptional: false;
17
18
  };
18
19
  organizationId: {
19
- type: _lssm_lib_schema206.FieldType<string, string>;
20
+ type: _lssm_lib_schema7.FieldType<string, string>;
20
21
  isOptional: false;
21
22
  };
22
23
  }>;
23
24
  declare const SaveOnboardingDraftBaseSpec: OperationSpec<SchemaModel<{
24
25
  data: {
25
- type: _lssm_lib_schema206.FieldType<unknown, unknown>;
26
+ type: _lssm_lib_schema7.FieldType<unknown, unknown>;
26
27
  isOptional: false;
27
28
  };
28
29
  }>, SchemaModel<{
29
30
  id: {
30
- type: _lssm_lib_schema206.FieldType<string, string>;
31
+ type: _lssm_lib_schema7.FieldType<string, string>;
31
32
  isOptional: false;
32
33
  };
33
34
  organizationId: {
34
- type: _lssm_lib_schema206.FieldType<string, string>;
35
+ type: _lssm_lib_schema7.FieldType<string, string>;
35
36
  isOptional: false;
36
37
  };
37
38
  }>, undefined>;
38
39
  /** Get current onboarding draft (on mount/restore) */
39
40
  declare const GetOnboardingDraftOutput: SchemaModel<{
40
41
  id: {
41
- type: _lssm_lib_schema206.FieldType<string, string>;
42
+ type: _lssm_lib_schema7.FieldType<string, string>;
42
43
  isOptional: true;
43
44
  };
44
45
  organizationId: {
45
- type: _lssm_lib_schema206.FieldType<string, string>;
46
+ type: _lssm_lib_schema7.FieldType<string, string>;
46
47
  isOptional: true;
47
48
  };
48
49
  data: {
49
- type: _lssm_lib_schema206.FieldType<unknown, unknown>;
50
+ type: _lssm_lib_schema7.FieldType<unknown, unknown>;
50
51
  isOptional: true;
51
52
  };
52
53
  createdAt: {
53
- type: _lssm_lib_schema206.FieldType<Date, string>;
54
+ type: _lssm_lib_schema7.FieldType<Date, string>;
54
55
  isOptional: true;
55
56
  };
56
57
  updatedAt: {
57
- type: _lssm_lib_schema206.FieldType<Date, string>;
58
+ type: _lssm_lib_schema7.FieldType<Date, string>;
58
59
  isOptional: true;
59
60
  };
60
61
  }>;
61
- declare const GetOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema206.AnySchemaModel, SchemaModel<{
62
+ declare const GetOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema7.AnySchemaModel, SchemaModel<{
62
63
  id: {
63
- type: _lssm_lib_schema206.FieldType<string, string>;
64
+ type: _lssm_lib_schema7.FieldType<string, string>;
64
65
  isOptional: true;
65
66
  };
66
67
  organizationId: {
67
- type: _lssm_lib_schema206.FieldType<string, string>;
68
+ type: _lssm_lib_schema7.FieldType<string, string>;
68
69
  isOptional: true;
69
70
  };
70
71
  data: {
71
- type: _lssm_lib_schema206.FieldType<unknown, unknown>;
72
+ type: _lssm_lib_schema7.FieldType<unknown, unknown>;
72
73
  isOptional: true;
73
74
  };
74
75
  createdAt: {
75
- type: _lssm_lib_schema206.FieldType<Date, string>;
76
+ type: _lssm_lib_schema7.FieldType<Date, string>;
76
77
  isOptional: true;
77
78
  };
78
79
  updatedAt: {
79
- type: _lssm_lib_schema206.FieldType<Date, string>;
80
+ type: _lssm_lib_schema7.FieldType<Date, string>;
80
81
  isOptional: true;
81
82
  };
82
83
  }>, undefined>;
83
84
  /** Delete onboarding draft (cleanup after completion or cancel) */
84
85
  declare const DeleteOnboardingDraftOutput: SchemaModel<{
85
86
  ok: {
86
- type: _lssm_lib_schema206.FieldType<boolean, boolean>;
87
+ type: _lssm_lib_schema7.FieldType<boolean, boolean>;
87
88
  isOptional: false;
88
89
  };
89
90
  }>;
90
- declare const DeleteOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema206.AnySchemaModel, SchemaModel<{
91
+ declare const DeleteOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema7.AnySchemaModel, SchemaModel<{
91
92
  ok: {
92
- type: _lssm_lib_schema206.FieldType<boolean, boolean>;
93
+ type: _lssm_lib_schema7.FieldType<boolean, boolean>;
93
94
  isOptional: false;
94
95
  };
95
96
  }>, undefined>;
96
97
  /** Complete onboarding (final submit, creates entities) */
97
98
  declare const CompleteOnboardingBaseInput: SchemaModel<{
98
99
  data: {
99
- type: _lssm_lib_schema206.FieldType<unknown, unknown>;
100
+ type: _lssm_lib_schema7.FieldType<unknown, unknown>;
100
101
  isOptional: false;
101
102
  };
102
103
  }>;
103
104
  declare const CompleteOnboardingBaseOutput: SchemaModel<{
104
105
  success: {
105
- type: _lssm_lib_schema206.FieldType<boolean, boolean>;
106
+ type: _lssm_lib_schema7.FieldType<boolean, boolean>;
106
107
  isOptional: false;
107
108
  };
108
109
  userId: {
109
- type: _lssm_lib_schema206.FieldType<string, string>;
110
+ type: _lssm_lib_schema7.FieldType<string, string>;
110
111
  isOptional: true;
111
112
  };
112
113
  organizationId: {
113
- type: _lssm_lib_schema206.FieldType<string, string>;
114
+ type: _lssm_lib_schema7.FieldType<string, string>;
114
115
  isOptional: true;
115
116
  };
116
117
  }>;
117
118
  declare const CompleteOnboardingBaseSpec: OperationSpec<SchemaModel<{
118
119
  data: {
119
- type: _lssm_lib_schema206.FieldType<unknown, unknown>;
120
+ type: _lssm_lib_schema7.FieldType<unknown, unknown>;
120
121
  isOptional: false;
121
122
  };
122
123
  }>, SchemaModel<{
123
124
  success: {
124
- type: _lssm_lib_schema206.FieldType<boolean, boolean>;
125
+ type: _lssm_lib_schema7.FieldType<boolean, boolean>;
125
126
  isOptional: false;
126
127
  };
127
128
  userId: {
128
- type: _lssm_lib_schema206.FieldType<string, string>;
129
+ type: _lssm_lib_schema7.FieldType<string, string>;
129
130
  isOptional: true;
130
131
  };
131
132
  organizationId: {
132
- type: _lssm_lib_schema206.FieldType<string, string>;
133
+ type: _lssm_lib_schema7.FieldType<string, string>;
133
134
  isOptional: true;
134
135
  };
135
136
  }>, undefined>;
@@ -1,6 +1,7 @@
1
1
  import { E5, x8 } from "./schema/dist/index.js";
2
- import { defineCommand, defineQuery } from "./operation.js";
3
2
  import { OwnersEnum, StabilityEnum } from "./ownership.js";
3
+ import { defineCommand, defineQuery } from "./operations/operation.js";
4
+ import "./operations/index.js";
4
5
 
5
6
  //#region src/onboarding-base.ts
6
7
  /**
package/dist/openapi.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { OperationSpecRegistry } from "./registry.js";
1
+ import { OperationSpecRegistry } from "./operations/registry.js";
2
2
 
3
3
  //#region src/openapi.d.ts
4
4
 
@@ -0,0 +1,3 @@
1
+ import { AnyOperationSpec, EmitDecl, EmitDeclInline, EmitDeclRef, ImplementationRef, ImplementationType, OpKind, OperationSpec, TelemetryTrigger, defineCommand, defineQuery, isEmitDeclRef } from "./operation.js";
2
+ import { OperationKey, OperationSpecRegistry, opKey } from "./registry.js";
3
+ export { AnyOperationSpec, EmitDecl, EmitDeclInline, EmitDeclRef, ImplementationRef, ImplementationType, OpKind, OperationKey, OperationSpec, OperationSpecRegistry, TelemetryTrigger, defineCommand, defineQuery, isEmitDeclRef, opKey };
@@ -0,0 +1,4 @@
1
+ import { defineCommand, defineQuery, isEmitDeclRef } from "./operation.js";
2
+ import { OperationSpecRegistry, opKey } from "./registry.js";
3
+
4
+ export { OperationSpecRegistry, defineCommand, defineQuery, isEmitDeclRef, opKey };
@@ -1,12 +1,12 @@
1
- import { Owner, Stability, Tag } from "./ownership.js";
2
- import { DocId } from "./docs/registry.js";
3
- import { EventSpec } from "./events.js";
4
- import { ResourceRefDescriptor } from "./resources.js";
5
- import { PolicyRef } from "./policy/spec.js";
6
- import { TestSpecRef } from "./tests/spec.js";
1
+ import { Owner, Stability, Tag } from "../ownership.js";
2
+ import { DocId } from "../docs/registry.js";
3
+ import { EventSpec } from "../events.js";
4
+ import { ResourceRefDescriptor } from "../resources.js";
5
+ import { PolicyRef } from "../policy/spec.js";
6
+ import { TestSpecRef } from "../tests/spec.js";
7
7
  import { AnySchemaModel } from "@lssm/lib.schema";
8
8
 
9
- //#region src/operation.d.ts
9
+ //#region src/operations/operation.d.ts
10
10
 
11
11
  /**
12
12
  * Distinguishes between state-changing operations (command) and read-only operations (query).
@@ -1,4 +1,4 @@
1
- //#region src/operation.ts
1
+ //#region src/operations/operation.ts
2
2
  const isEmitDeclRef = (e) => "ref" in e;
3
3
  /**
4
4
  * Helper to define a Command (write operation).
@@ -1,12 +1,11 @@
1
- import { GroupKeyFn, RegistryFilter } from "./registry-utils.js";
2
- import { defaultDocRegistry, docId, registerDocBlocks } from "./docs/registry.js";
3
- import { ResourceRefDescriptor } from "./resources.js";
1
+ import { GroupKeyFn, RegistryFilter } from "../registry-utils.js";
2
+ import { ResourceRefDescriptor } from "../resources.js";
4
3
  import { AnyOperationSpec, OperationSpec } from "./operation.js";
5
- import { HandlerCtx } from "./types.js";
6
- import { HandlerForOperationSpec } from "./install.js";
4
+ import { HandlerCtx } from "../types.js";
5
+ import { HandlerForOperationSpec } from "../install.js";
7
6
  import { AnySchemaModel } from "@lssm/lib.schema";
8
7
 
9
- //#region src/registry.d.ts
8
+ //#region src/operations/registry.d.ts
10
9
 
11
10
  type OperationKey = `${string}.v${number}`;
12
11
  declare function opKey(name: string, version: number): OperationKey;
@@ -102,4 +101,4 @@ declare class OperationSpecRegistry {
102
101
  execute(name: string, version: number | undefined, rawInput: unknown, ctx: HandlerCtx): Promise<unknown>;
103
102
  }
104
103
  //#endregion
105
- export { OperationKey, OperationSpecRegistry, defaultDocRegistry, docId, opKey, registerDocBlocks };
104
+ export { OperationKey, OperationSpecRegistry, opKey };
@@ -1,10 +1,9 @@
1
- import { __toCommonJS } from "./_virtual/rolldown_runtime.js";
2
- import { init_registry_utils, registry_utils_exports } from "./registry-utils.js";
3
- import { eventKey } from "./events.js";
1
+ import { __toCommonJS } from "../_virtual/rolldown_runtime.js";
2
+ import { eventKey } from "../events.js";
3
+ import { init_registry_utils, registry_utils_exports } from "../registry-utils.js";
4
4
  import { isEmitDeclRef } from "./operation.js";
5
- import { defaultDocRegistry, docId, registerDocBlocks } from "./docs/registry.js";
6
5
 
7
- //#region src/registry.ts
6
+ //#region src/operations/registry.ts
8
7
  /**
9
8
  * OperationSpecRegistry:
10
9
  * - Registers ContractSpecs (unique by name+version)
@@ -262,4 +261,4 @@ var OperationSpecRegistry = class {
262
261
  };
263
262
 
264
263
  //#endregion
265
- export { OperationSpecRegistry, defaultDocRegistry, docId, opKey, registerDocBlocks };
264
+ export { OperationSpecRegistry, opKey };
@@ -1,5 +1,4 @@
1
1
  import { registerDocBlocks } from "../../docs/registry.js";
2
- import "../../registry.js";
3
2
 
4
3
  //#region src/policy/docs/policy.docblock.ts
5
4
  const tech_contracts_policy_DocBlocks = [{
@@ -1,5 +1,4 @@
1
1
  import { registerDocBlocks } from "../../docs/registry.js";
2
- import "../../registry.js";
3
2
 
4
3
  //#region src/presentations/docs/presentations-conventions.docblock.ts
5
4
  const tech_contracts_presentations_conventions_DocBlocks = [{
@@ -0,0 +1,4 @@
1
+ import { PresentationDescriptorV2, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationTarget, PresentationV2Meta } from "./presentations.v2.js";
2
+ import { ComponentMap, PresentationRenderer, PresentationValidator, ReactRenderDescriptor, RenderContext, TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer } from "./transform-engine.js";
3
+ import { DataPresentation, MarkdownPresentation, PresentationContent, PresentationKind, PresentationMeta, PresentationPolicy, PresentationRegistry, PresentationSpec, WebComponentPresentation, jsonSchemaForPresentation } from "./presentations.js";
4
+ export { ComponentMap, DataPresentation, MarkdownPresentation, PresentationContent, PresentationDescriptorV2, PresentationKind, PresentationMeta, PresentationPolicy, PresentationRegistry, PresentationRenderer, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationSpec, PresentationTarget, PresentationV2Meta, PresentationValidator, ReactRenderDescriptor, RenderContext, TransformEngine, WebComponentPresentation, createDefaultTransformEngine, jsonSchemaForPresentation, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer };
@@ -0,0 +1,4 @@
1
+ import { TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer } from "./transform-engine.js";
2
+ import { PresentationRegistry, jsonSchemaForPresentation } from "./presentations.js";
3
+
4
+ export { PresentationRegistry, TransformEngine, createDefaultTransformEngine, jsonSchemaForPresentation, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer };
@@ -1,10 +1,10 @@
1
- import { Stability } from "./ownership.js";
2
- import { GroupKeyFn, RegistryFilter } from "./registry-utils.js";
1
+ import { Stability } from "../ownership.js";
2
+ import { GroupKeyFn, RegistryFilter } from "../registry-utils.js";
3
3
  import z from "zod";
4
- import * as _lssm_lib_schema234 from "@lssm/lib.schema";
4
+ import * as _lssm_lib_schema154 from "@lssm/lib.schema";
5
5
  import { AnySchemaModel } from "@lssm/lib.schema";
6
6
 
7
- //#region src/presentations.d.ts
7
+ //#region src/presentations/presentations.d.ts
8
8
  /** V1 presentation kinds (back-compat). Prefer V2 descriptors for new work. */
9
9
  type PresentationKind = 'web_component' | 'markdown' | 'data';
10
10
  /** Minimal metadata for presentations (V1). */
@@ -73,7 +73,7 @@ declare class PresentationRegistry {
73
73
  declare function jsonSchemaForPresentation(p: PresentationSpec): {
74
74
  framework: "react";
75
75
  componentKey: string;
76
- props: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema234.TopLevelZodFromModel<_lssm_lib_schema234.SchemaModelFieldsAnyConfig<_lssm_lib_schema234.AnyFieldType | _lssm_lib_schema234.AnyEnumType | AnySchemaModel>>>;
76
+ props: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema154.TopLevelZodFromModel<_lssm_lib_schema154.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema154.AnyFieldType | _lssm_lib_schema154.AnyEnumType>>>;
77
77
  meta: {
78
78
  readonly name: string;
79
79
  readonly version: number;
@@ -95,7 +95,7 @@ declare function jsonSchemaForPresentation(p: PresentationSpec): {
95
95
  kind: PresentationKind;
96
96
  } | {
97
97
  mimeType: string;
98
- model: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema234.TopLevelZodFromModel<_lssm_lib_schema234.SchemaModelFieldsAnyConfig<_lssm_lib_schema234.AnyFieldType | _lssm_lib_schema234.AnyEnumType | AnySchemaModel>>>;
98
+ model: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema154.TopLevelZodFromModel<_lssm_lib_schema154.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema154.AnyFieldType | _lssm_lib_schema154.AnyEnumType>>>;
99
99
  meta: {
100
100
  readonly name: string;
101
101
  readonly version: number;
@@ -1,8 +1,8 @@
1
- import { __toCommonJS } from "./_virtual/rolldown_runtime.js";
2
- import { init_registry_utils, registry_utils_exports } from "./registry-utils.js";
1
+ import { __toCommonJS } from "../_virtual/rolldown_runtime.js";
2
+ import { init_registry_utils, registry_utils_exports } from "../registry-utils.js";
3
3
  import z from "zod";
4
4
 
5
- //#region src/presentations.ts
5
+ //#region src/presentations/presentations.ts
6
6
  function keyOf(p) {
7
7
  return `${p.meta.name}.v${p.meta.version}`;
8
8
  }
@@ -0,0 +1,54 @@
1
+ import { OwnerShipMeta } from "../ownership.js";
2
+ import { DocId } from "../docs/registry.js";
3
+ import { AnySchemaModel } from "@lssm/lib.schema";
4
+ import { BlockConfig } from "@blocknote/core";
5
+
6
+ //#region src/presentations/presentations.v2.d.ts
7
+ /** Supported render targets for the transform engine and descriptors. */
8
+ type PresentationTarget = 'react' | 'markdown' | 'application/json' | 'application/xml';
9
+ interface PresentationV2Meta extends Partial<OwnerShipMeta> {
10
+ /** Fully-qualified presentation name (e.g., "sigil.auth.webauth_tabs_v2"). */
11
+ name: string;
12
+ /** Version of this descriptor. Increment on breaking changes. */
13
+ version: number;
14
+ /** Human-readable description for docs/a11y. Required by validators. */
15
+ description?: string;
16
+ /** Optional doc block id for this presentation. */
17
+ docId?: DocId;
18
+ }
19
+ /** React component presentation source. */
20
+ interface PresentationSourceComponentReact {
21
+ /** Source marker for React component presentations. */
22
+ type: 'component';
23
+ /** Framework for the component source (currently only 'react'). */
24
+ framework: 'react';
25
+ /** Component key resolved by host `componentMap`. */
26
+ componentKey: string;
27
+ /** Optional props schema to validate against. */
28
+ props?: AnySchemaModel;
29
+ }
30
+ /** BlockNoteJS document presentation source. */
31
+ interface PresentationSourceBlocknotejs {
32
+ /** Source marker for BlockNoteJS document presentations. */
33
+ type: 'blocknotejs';
34
+ /** BlockNoteJS JSON document. */
35
+ docJson: unknown;
36
+ /** Optional BlockNote config to guide rendering. */
37
+ blockConfig?: BlockConfig;
38
+ }
39
+ type PresentationSource = PresentationSourceComponentReact | PresentationSourceBlocknotejs;
40
+ /**
41
+ * Normalized presentation descriptor decoupled from framework/adapters.
42
+ * Renderers and validators are provided via TransformEngine.
43
+ */
44
+ interface PresentationDescriptorV2 {
45
+ meta: PresentationV2Meta;
46
+ policy?: {
47
+ flags?: string[];
48
+ pii?: string[];
49
+ };
50
+ source: PresentationSource;
51
+ targets: PresentationTarget[];
52
+ }
53
+ //#endregion
54
+ export { PresentationDescriptorV2, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationTarget, PresentationV2Meta };
File without changes
@@ -1,56 +1,8 @@
1
- import { OwnerShipMeta } from "./ownership.js";
2
- import { DocId } from "./docs/registry.js";
1
+ import { PresentationDescriptorV2, PresentationTarget } from "./presentations.v2.js";
3
2
  import React from "react";
4
- import { AnySchemaModel } from "@lssm/lib.schema";
5
3
  import { BlockConfig } from "@blocknote/core";
6
4
 
7
- //#region src/presentations.v2.d.ts
8
- /** Supported render targets for the transform engine and descriptors. */
9
- type PresentationTarget = 'react' | 'markdown' | 'application/json' | 'application/xml';
10
- interface PresentationV2Meta extends Partial<OwnerShipMeta> {
11
- /** Fully-qualified presentation name (e.g., "sigil.auth.webauth_tabs_v2"). */
12
- name: string;
13
- /** Version of this descriptor. Increment on breaking changes. */
14
- version: number;
15
- /** Human-readable description for docs/a11y. Required by validators. */
16
- description?: string;
17
- /** Optional doc block id for this presentation. */
18
- docId?: DocId;
19
- }
20
- /** React component presentation source. */
21
- interface PresentationSourceComponentReact {
22
- /** Source marker for React component presentations. */
23
- type: 'component';
24
- /** Framework for the component source (currently only 'react'). */
25
- framework: 'react';
26
- /** Component key resolved by host `componentMap`. */
27
- componentKey: string;
28
- /** Optional props schema to validate against. */
29
- props?: AnySchemaModel;
30
- }
31
- /** BlockNoteJS document presentation source. */
32
- interface PresentationSourceBlocknotejs {
33
- /** Source marker for BlockNoteJS document presentations. */
34
- type: 'blocknotejs';
35
- /** BlockNoteJS JSON document. */
36
- docJson: unknown;
37
- /** Optional BlockNote config to guide rendering. */
38
- blockConfig?: BlockConfig;
39
- }
40
- type PresentationSource = PresentationSourceComponentReact | PresentationSourceBlocknotejs;
41
- /**
42
- * Normalized presentation descriptor decoupled from framework/adapters.
43
- * Renderers and validators are provided via TransformEngine.
44
- */
45
- interface PresentationDescriptorV2 {
46
- meta: PresentationV2Meta;
47
- policy?: {
48
- flags?: string[];
49
- pii?: string[];
50
- };
51
- source: PresentationSource;
52
- targets: PresentationTarget[];
53
- }
5
+ //#region src/presentations/transform-engine.d.ts
54
6
  interface RenderContext {
55
7
  /** Optional locale hint (i18n). */
56
8
  locale?: string;
@@ -111,4 +63,4 @@ type ComponentMap = Record<string, React.ComponentType<any>>;
111
63
  */
112
64
  declare function registerReactToMarkdownRenderer(engine: TransformEngine, componentMap: ComponentMap): TransformEngine;
113
65
  //#endregion
114
- export { ComponentMap, PresentationDescriptorV2, PresentationRenderer, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationTarget, PresentationV2Meta, PresentationValidator, ReactRenderDescriptor, RenderContext, TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer };
66
+ export { ComponentMap, PresentationRenderer, PresentationValidator, ReactRenderDescriptor, RenderContext, TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer };
@@ -1,8 +1,8 @@
1
- import { schemaToMarkdown } from "./schema-to-markdown.js";
1
+ import { schemaToMarkdown } from "../schema-to-markdown.js";
2
2
  import React from "react";
3
3
  import TurndownService from "turndown";
4
4
 
5
- //#region src/presentations.v2.ts
5
+ //#region src/presentations/transform-engine.ts
6
6
  /**
7
7
  * Pluggable transform engine that renders descriptors to various targets
8
8
  * and runs validators (e.g., basic metadata checks, PII redaction policies).
@@ -1,5 +1,4 @@
1
1
  import { registerDocBlocks } from "../../docs/registry.js";
2
- import "../../registry.js";
3
2
 
4
3
  //#region src/regenerator/docs/regenerator.docblock.ts
5
4
  const tech_contracts_regenerator_DocBlocks = [{
@@ -1,6 +1,6 @@
1
- import { ResourceRegistry } from "./resources.js";
1
+ import { ResourceRegistry } from "../resources.js";
2
2
 
3
- //#region src/contracts-adapter-hydration.d.ts
3
+ //#region src/server/contracts-adapter-hydration.d.ts
4
4
  interface ReturnsDecl {
5
5
  isList: boolean;
6
6
  inner: string;
@@ -1,4 +1,4 @@
1
- //#region src/contracts-adapter-hydration.ts
1
+ //#region src/server/contracts-adapter-hydration.ts
2
2
  function parseReturns(returnsLike) {
3
3
  if (!returnsLike) return {
4
4
  isList: false,
@@ -1,10 +1,9 @@
1
1
  import { AnySchemaModel } from "@lssm/lib.schema";
2
2
  import { SchemaTypes } from "@pothos/core";
3
3
 
4
- //#region src/contracts-adapter-input.d.ts
5
- declare function isSchemaModel(x: unknown): x is AnySchemaModel;
4
+ //#region src/server/contracts-adapter-input.d.ts
6
5
  declare function createInputTypeBuilder<T extends SchemaTypes>(builder: PothosSchemaTypes.SchemaBuilder<T>): {
7
6
  buildInputFieldArgs: (model: AnySchemaModel | null) => null;
8
7
  };
9
8
  //#endregion
10
- export { createInputTypeBuilder, isSchemaModel };
9
+ export { createInputTypeBuilder };
@@ -1,4 +1,4 @@
1
- //#region src/contracts-adapter-input.ts
1
+ //#region src/server/contracts-adapter-input.ts
2
2
  function isSchemaModel(x) {
3
3
  return typeof x?.getPothosInput === "function" && typeof x?.getZod === "function";
4
4
  }
@@ -74,4 +74,4 @@ function createInputTypeBuilder(builder) {
74
74
  }
75
75
 
76
76
  //#endregion
77
- export { createInputTypeBuilder, isSchemaModel };
77
+ export { createInputTypeBuilder };
@@ -1,5 +1,5 @@
1
1
  import { ResourceRegistry } from "../resources.js";
2
- import { OperationSpecRegistry } from "../registry.js";
2
+ import { OperationSpecRegistry } from "../operations/registry.js";
3
3
  import "@pothos/plugin-prisma";
4
4
  import "@pothos/plugin-complexity";
5
5
  import "@pothos/plugin-relay";
@@ -1,6 +1,6 @@
1
- import { hydrateResourceIfNeeded, parseReturns } from "../contracts-adapter-hydration.js";
2
- import { createInputTypeBuilder } from "../contracts-adapter-input.js";
3
1
  import { defaultGqlField } from "../jsonschema.js";
2
+ import { createInputTypeBuilder } from "./contracts-adapter-input.js";
3
+ import { hydrateResourceIfNeeded, parseReturns } from "./contracts-adapter-hydration.js";
4
4
  import "@pothos/plugin-prisma";
5
5
  import "@pothos/plugin-complexity";
6
6
  import "@pothos/plugin-relay";
@@ -1,5 +1,5 @@
1
1
  import { ResourceRegistry } from "../../resources.js";
2
- import { OperationSpecRegistry } from "../../registry.js";
2
+ import { OperationSpecRegistry } from "../../operations/registry.js";
3
3
  import { PromptRegistry } from "../../promptRegistry.js";
4
4
  import { McpCtxFactories } from "./mcpTypes.js";
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -1,5 +1,6 @@
1
- import { PresentationDescriptorV2 } from "../../presentations.v2.js";
2
- import { PresentationRegistry } from "../../presentations.js";
1
+ import { PresentationDescriptorV2 } from "../../presentations/presentations.v2.js";
2
+ import { PresentationRegistry } from "../../presentations/presentations.js";
3
+ import "../../presentations/index.js";
3
4
  import { HandlerCtx } from "../../types.js";
4
5
  import { Logger } from "@lssm/lib.logger";
5
6
 
@@ -1,5 +1,6 @@
1
- import { createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer } from "../../presentations.v2.js";
2
- import { jsonSchemaForPresentation } from "../../presentations.js";
1
+ import { createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer } from "../../presentations/transform-engine.js";
2
+ import { jsonSchemaForPresentation } from "../../presentations/presentations.js";
3
+ import "../../presentations/index.js";
3
4
 
4
5
  //#region src/server/mcp/registerPresentations.ts
5
6
  function isEngineRenderOutput(x) {
@@ -1,4 +1,4 @@
1
- import { OperationSpecRegistry } from "../../registry.js";
1
+ import { OperationSpecRegistry } from "../../operations/registry.js";
2
2
  import { McpCtxFactories } from "./mcpTypes.js";
3
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { HandlerCtx } from "../types.js";
2
- import { OperationSpecRegistry } from "../registry.js";
2
+ import { OperationSpecRegistry } from "../operations/registry.js";
3
3
  import { RestOptions } from "./rest-generic.js";
4
4
  import { Elysia } from "elysia";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { HandlerCtx } from "../types.js";
2
- import { OperationSpecRegistry } from "../registry.js";
2
+ import { OperationSpecRegistry } from "../operations/registry.js";
3
3
  import { RestOptions } from "./rest-generic.js";
4
4
  import { Request, Router } from "express";
5
5