@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.
- package/dist/app-config/contracts.d.ts +56 -55
- package/dist/app-config/contracts.js +5 -4
- package/dist/app-config/docs/app-config.docblock.js +0 -1
- package/dist/app-config/events.d.ts +27 -27
- package/dist/app-config/lifecycle-contracts.d.ts +83 -82
- package/dist/app-config/lifecycle-contracts.js +2 -1
- package/dist/app-config/runtime.d.ts +4 -2
- package/dist/app-config/spec.d.ts +2 -1
- package/dist/app-config/validation.d.ts +4 -2
- package/dist/{capabilities.d.ts → capabilities/capabilities.d.ts} +3 -3
- package/dist/{capabilities.js → capabilities/capabilities.js} +1 -1
- package/dist/capabilities/docs/capabilities.docblock.js +0 -1
- package/dist/capabilities/index.d.ts +3 -0
- package/dist/capabilities/index.js +4 -0
- package/dist/capabilities/openbanking.d.ts +2 -1
- package/dist/client/react/feature-render.d.ts +3 -1
- package/dist/client/react/feature-render.js +2 -1
- package/dist/client/react/form-render.d.ts +1 -1
- package/dist/client/react/form-render.js +1 -1
- package/dist/{data-views.d.ts → data-views/data-views.d.ts} +5 -5
- package/dist/{data-views.js → data-views/data-views.js} +3 -3
- package/dist/data-views/docs/data-views.docblock.js +0 -1
- package/dist/data-views/index.d.ts +4 -0
- package/dist/data-views/index.js +5 -0
- package/dist/data-views/query-generator.d.ts +2 -1
- package/dist/data-views/runtime.d.ts +2 -1
- package/dist/docs/presentations.d.ts +3 -2
- package/dist/docs/registry.d.ts +3 -2
- package/dist/docs/tech/llm/llm-integration.docblock.js +2 -2
- package/dist/experiments/docs/experiments.docblock.js +0 -1
- package/dist/experiments/spec-resolver.d.ts +2 -1
- package/dist/features.d.ts +8 -5
- package/dist/forms/docs/forms.docblock.js +0 -1
- package/dist/{forms.d.ts → forms/forms.d.ts} +3 -3
- package/dist/{forms.js → forms/forms.js} +3 -3
- package/dist/forms/index.d.ts +2 -0
- package/dist/forms/index.js +3 -0
- package/dist/index.d.ts +19 -12
- package/dist/index.js +20 -15
- package/dist/install.d.ts +3 -2
- package/dist/install.js +1 -1
- package/dist/integrations/docs/integrations.docblock.js +0 -1
- package/dist/integrations/openbanking/contracts/accounts.d.ts +69 -68
- package/dist/integrations/openbanking/contracts/accounts.js +2 -1
- package/dist/integrations/openbanking/contracts/balances.d.ts +37 -36
- package/dist/integrations/openbanking/contracts/balances.js +2 -1
- package/dist/integrations/openbanking/contracts/index.d.ts +1 -1
- package/dist/integrations/openbanking/contracts/transactions.d.ts +51 -50
- package/dist/integrations/openbanking/contracts/transactions.js +2 -1
- package/dist/integrations/openbanking/models.d.ts +55 -55
- package/dist/integrations/operations.d.ts +437 -0
- package/dist/integrations/{contracts.js → operations.js} +3 -2
- package/dist/integrations/spec.d.ts +2 -1
- package/dist/jsonschema.d.ts +5 -4
- package/dist/knowledge/docs/knowledge.docblock.js +0 -1
- package/dist/knowledge/{contracts.d.ts → operations.d.ts} +70 -69
- package/dist/knowledge/{contracts.js → operations.js} +3 -2
- package/dist/llm/exporters.d.ts +10 -8
- package/dist/llm/exporters.js +11 -10
- package/dist/llm/index.d.ts +2 -2
- package/dist/llm/index.js +2 -2
- package/dist/llm/prompts.d.ts +2 -1
- package/dist/llm/prompts.js +8 -8
- package/dist/llm/types.d.ts +3 -2
- package/dist/markdown.d.ts +5 -4
- package/dist/markdown.js +6 -5
- package/dist/onboarding-base.d.ts +31 -30
- package/dist/onboarding-base.js +2 -1
- package/dist/openapi.d.ts +1 -1
- package/dist/operations/index.d.ts +3 -0
- package/dist/operations/index.js +4 -0
- package/dist/{operation.d.ts → operations/operation.d.ts} +7 -7
- package/dist/{operation.js → operations/operation.js} +1 -1
- package/dist/{registry.d.ts → operations/registry.d.ts} +6 -7
- package/dist/{registry.js → operations/registry.js} +5 -6
- package/dist/policy/docs/policy.docblock.js +0 -1
- package/dist/presentations/docs/presentations-conventions.docblock.js +0 -1
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +4 -0
- package/dist/{presentations.d.ts → presentations/presentations.d.ts} +6 -6
- package/dist/{presentations.js → presentations/presentations.js} +3 -3
- package/dist/presentations/presentations.v2.d.ts +54 -0
- package/dist/presentations/presentations.v2.js +0 -0
- package/dist/{presentations.v2.d.ts → presentations/transform-engine.d.ts} +3 -51
- package/dist/{presentations.v2.js → presentations/transform-engine.js} +2 -2
- package/dist/regenerator/docs/regenerator.docblock.js +0 -1
- package/dist/{contracts-adapter-hydration.d.ts → server/contracts-adapter-hydration.d.ts} +2 -2
- package/dist/{contracts-adapter-hydration.js → server/contracts-adapter-hydration.js} +1 -1
- package/dist/{contracts-adapter-input.d.ts → server/contracts-adapter-input.d.ts} +2 -3
- package/dist/{contracts-adapter-input.js → server/contracts-adapter-input.js} +2 -2
- package/dist/server/graphql-pothos.d.ts +1 -1
- package/dist/server/graphql-pothos.js +2 -2
- package/dist/server/mcp/createMcpServer.d.ts +1 -1
- package/dist/server/mcp/mcpTypes.d.ts +3 -2
- package/dist/server/mcp/registerPresentations.js +3 -2
- package/dist/server/mcp/registerTools.d.ts +1 -1
- package/dist/server/rest-elysia.d.ts +1 -1
- package/dist/server/rest-express.d.ts +1 -1
- package/dist/server/rest-generic.d.ts +1 -1
- package/dist/server/rest-next-app.d.ts +1 -1
- package/dist/server/rest-next-mcp.d.ts +1 -1
- package/dist/server/rest-next-pages.d.ts +1 -1
- package/dist/telemetry/docs/telemetry.docblock.js +0 -1
- package/dist/tests/runner.d.ts +1 -1
- package/dist/workflow/spec.d.ts +2 -1
- package/dist/workflow/validation.d.ts +2 -2
- package/dist/workspace-config/contractsrc-schema.d.ts +1 -1
- package/package.json +22 -17
- package/dist/integrations/contracts.d.ts +0 -436
- package/dist/openbanking/docs/openbanking.docblock.d.ts +0 -6
- 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
|
|
9
|
+
function operationsToMarkdown(registry, _extras) {
|
|
9
10
|
const lines = [];
|
|
10
|
-
for (const spec of
|
|
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(
|
|
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,
|
|
117
|
+
export { docsToMarkdown, operationsToMarkdown };
|
|
@@ -1,135 +1,136 @@
|
|
|
1
|
-
import { OperationSpec } from "./operation.js";
|
|
2
|
-
import
|
|
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:
|
|
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:
|
|
16
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
16
17
|
isOptional: false;
|
|
17
18
|
};
|
|
18
19
|
organizationId: {
|
|
19
|
-
type:
|
|
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:
|
|
26
|
+
type: _lssm_lib_schema7.FieldType<unknown, unknown>;
|
|
26
27
|
isOptional: false;
|
|
27
28
|
};
|
|
28
29
|
}>, SchemaModel<{
|
|
29
30
|
id: {
|
|
30
|
-
type:
|
|
31
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
31
32
|
isOptional: false;
|
|
32
33
|
};
|
|
33
34
|
organizationId: {
|
|
34
|
-
type:
|
|
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:
|
|
42
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
42
43
|
isOptional: true;
|
|
43
44
|
};
|
|
44
45
|
organizationId: {
|
|
45
|
-
type:
|
|
46
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
46
47
|
isOptional: true;
|
|
47
48
|
};
|
|
48
49
|
data: {
|
|
49
|
-
type:
|
|
50
|
+
type: _lssm_lib_schema7.FieldType<unknown, unknown>;
|
|
50
51
|
isOptional: true;
|
|
51
52
|
};
|
|
52
53
|
createdAt: {
|
|
53
|
-
type:
|
|
54
|
+
type: _lssm_lib_schema7.FieldType<Date, string>;
|
|
54
55
|
isOptional: true;
|
|
55
56
|
};
|
|
56
57
|
updatedAt: {
|
|
57
|
-
type:
|
|
58
|
+
type: _lssm_lib_schema7.FieldType<Date, string>;
|
|
58
59
|
isOptional: true;
|
|
59
60
|
};
|
|
60
61
|
}>;
|
|
61
|
-
declare const GetOnboardingDraftBaseSpec: OperationSpec<
|
|
62
|
+
declare const GetOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema7.AnySchemaModel, SchemaModel<{
|
|
62
63
|
id: {
|
|
63
|
-
type:
|
|
64
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
64
65
|
isOptional: true;
|
|
65
66
|
};
|
|
66
67
|
organizationId: {
|
|
67
|
-
type:
|
|
68
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
68
69
|
isOptional: true;
|
|
69
70
|
};
|
|
70
71
|
data: {
|
|
71
|
-
type:
|
|
72
|
+
type: _lssm_lib_schema7.FieldType<unknown, unknown>;
|
|
72
73
|
isOptional: true;
|
|
73
74
|
};
|
|
74
75
|
createdAt: {
|
|
75
|
-
type:
|
|
76
|
+
type: _lssm_lib_schema7.FieldType<Date, string>;
|
|
76
77
|
isOptional: true;
|
|
77
78
|
};
|
|
78
79
|
updatedAt: {
|
|
79
|
-
type:
|
|
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:
|
|
87
|
+
type: _lssm_lib_schema7.FieldType<boolean, boolean>;
|
|
87
88
|
isOptional: false;
|
|
88
89
|
};
|
|
89
90
|
}>;
|
|
90
|
-
declare const DeleteOnboardingDraftBaseSpec: OperationSpec<
|
|
91
|
+
declare const DeleteOnboardingDraftBaseSpec: OperationSpec<_lssm_lib_schema7.AnySchemaModel, SchemaModel<{
|
|
91
92
|
ok: {
|
|
92
|
-
type:
|
|
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:
|
|
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:
|
|
106
|
+
type: _lssm_lib_schema7.FieldType<boolean, boolean>;
|
|
106
107
|
isOptional: false;
|
|
107
108
|
};
|
|
108
109
|
userId: {
|
|
109
|
-
type:
|
|
110
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
110
111
|
isOptional: true;
|
|
111
112
|
};
|
|
112
113
|
organizationId: {
|
|
113
|
-
type:
|
|
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:
|
|
120
|
+
type: _lssm_lib_schema7.FieldType<unknown, unknown>;
|
|
120
121
|
isOptional: false;
|
|
121
122
|
};
|
|
122
123
|
}>, SchemaModel<{
|
|
123
124
|
success: {
|
|
124
|
-
type:
|
|
125
|
+
type: _lssm_lib_schema7.FieldType<boolean, boolean>;
|
|
125
126
|
isOptional: false;
|
|
126
127
|
};
|
|
127
128
|
userId: {
|
|
128
|
-
type:
|
|
129
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
129
130
|
isOptional: true;
|
|
130
131
|
};
|
|
131
132
|
organizationId: {
|
|
132
|
-
type:
|
|
133
|
+
type: _lssm_lib_schema7.FieldType<string, string>;
|
|
133
134
|
isOptional: true;
|
|
134
135
|
};
|
|
135
136
|
}>, undefined>;
|
package/dist/onboarding-base.js
CHANGED
|
@@ -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
|
@@ -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 };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Owner, Stability, Tag } from "
|
|
2
|
-
import { DocId } from "
|
|
3
|
-
import { EventSpec } from "
|
|
4
|
-
import { ResourceRefDescriptor } from "
|
|
5
|
-
import { PolicyRef } from "
|
|
6
|
-
import { TestSpecRef } from "
|
|
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,12 +1,11 @@
|
|
|
1
|
-
import { GroupKeyFn, RegistryFilter } from "
|
|
2
|
-
import {
|
|
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 "
|
|
6
|
-
import { HandlerForOperationSpec } from "
|
|
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,
|
|
104
|
+
export { OperationKey, OperationSpecRegistry, opKey };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { __toCommonJS } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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,
|
|
264
|
+
export { OperationSpecRegistry, opKey };
|
|
@@ -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 "
|
|
2
|
-
import { GroupKeyFn, RegistryFilter } from "
|
|
1
|
+
import { Stability } from "../ownership.js";
|
|
2
|
+
import { GroupKeyFn, RegistryFilter } from "../registry-utils.js";
|
|
3
3
|
import z from "zod";
|
|
4
|
-
import * as
|
|
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<
|
|
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<
|
|
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 "
|
|
2
|
-
import { init_registry_utils, registry_utils_exports } from "
|
|
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 {
|
|
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.
|
|
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,
|
|
66
|
+
export { ComponentMap, PresentationRenderer, PresentationValidator, ReactRenderDescriptor, RenderContext, TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { schemaToMarkdown } from "
|
|
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.
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { ResourceRegistry } from "
|
|
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,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
|
|
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
|
|
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.
|
|
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) {
|