@lssm/lib.contracts 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102
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/app-config.feature.js +53 -1
- package/dist/app-config/contracts.d.ts +50 -50
- package/dist/app-config/contracts.js +396 -1
- package/dist/app-config/docs/app-config.docblock.js +22 -220
- package/dist/app-config/events.d.ts +27 -27
- package/dist/app-config/events.js +168 -1
- package/dist/app-config/index.js +8 -1
- package/dist/app-config/lifecycle-contracts.d.ts +80 -80
- package/dist/app-config/lifecycle-contracts.js +441 -1
- package/dist/app-config/runtime.js +617 -1
- package/dist/app-config/spec.js +36 -1
- package/dist/app-config/validation.js +538 -1
- package/dist/capabilities/docs/capabilities.docblock.js +22 -1
- package/dist/capabilities/openbanking.js +92 -1
- package/dist/capabilities.js +50 -1
- package/dist/client/index.js +9 -1
- package/dist/client/react/drivers/rn-reusables.js +21 -1
- package/dist/client/react/drivers/shadcn.js +11 -1
- package/dist/client/react/feature-render.js +43 -1
- package/dist/client/react/form-render.js +298 -1
- package/dist/client/react/index.js +8 -1
- package/dist/contract-registry/index.js +3 -1
- package/dist/contract-registry/schemas.js +61 -1
- package/dist/contracts-adapter-hydration.js +41 -1
- package/dist/contracts-adapter-input.js +77 -1
- package/dist/data-views/docs/data-views.docblock.js +22 -1
- package/dist/data-views/query-generator.js +48 -1
- package/dist/data-views/runtime.js +39 -1
- package/dist/data-views.js +35 -1
- package/dist/docs/PUBLISHING.docblock.js +17 -76
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -350
- package/dist/docs/index.js +33 -1
- package/dist/docs/meta.docs.js +15 -2
- package/dist/docs/presentations.js +77 -1
- package/dist/docs/registry.js +51 -1
- package/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +17 -383
- package/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +17 -68
- package/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +17 -140
- package/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +17 -86
- package/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +17 -1
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +25 -2
- package/dist/docs/tech/contracts/README.docblock.js +21 -1
- package/dist/docs/tech/contracts/create-subscription.docblock.js +21 -1
- package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.js +21 -180
- package/dist/docs/tech/contracts/migrations.docblock.js +21 -1
- package/dist/docs/tech/contracts/openapi-export.docblock.js +22 -2
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +19 -60
- package/dist/docs/tech/contracts/overlays.docblock.js +21 -68
- package/dist/docs/tech/contracts/tests.docblock.js +21 -132
- package/dist/docs/tech/contracts/themes.docblock.js +21 -1
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +21 -106
- package/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -213
- package/dist/docs/tech/llm/llm-integration.docblock.js +74 -5
- package/dist/docs/tech/mcp-endpoints.docblock.js +38 -1
- package/dist/docs/tech/presentation-runtime.docblock.js +17 -1
- package/dist/docs/tech/schema/README.docblock.js +21 -262
- package/dist/docs/tech/studio/learning-events.docblock.js +49 -1
- package/dist/docs/tech/studio/learning-journeys.docblock.js +25 -2
- package/dist/docs/tech/studio/platform-admin-panel.docblock.js +24 -2
- package/dist/docs/tech/studio/project-access-teams.docblock.js +26 -16
- package/dist/docs/tech/studio/project-routing.docblock.js +68 -1
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +23 -2
- package/dist/docs/tech/studio/team-invitations.docblock.js +41 -36
- package/dist/docs/tech/studio/workspace-ops.docblock.js +48 -1
- package/dist/docs/tech/studio/workspaces.docblock.js +24 -2
- package/dist/docs/tech/telemetry-ingest.docblock.js +37 -3
- package/dist/docs/tech/templates/runtime.docblock.js +21 -1
- package/dist/docs/tech/vscode-extension.docblock.js +37 -3
- package/dist/docs/tech/workflows/overview.docblock.js +21 -1
- package/dist/docs/tech-contracts.docs.js +19 -2
- package/dist/events.js +12 -1
- package/dist/experiments/docs/experiments.docblock.js +22 -128
- package/dist/experiments/evaluator.js +101 -1
- package/dist/experiments/spec.js +33 -1
- package/dist/features.js +68 -1
- package/dist/forms/docs/forms.docblock.js +22 -1
- package/dist/forms.js +119 -1
- package/dist/index.js +107 -1
- package/dist/install.js +40 -1
- package/dist/integrations/contracts.d.ts +102 -102
- package/dist/integrations/contracts.js +388 -1
- package/dist/integrations/docs/integrations.docblock.js +95 -1
- package/dist/integrations/health.js +69 -1
- package/dist/integrations/index.js +23 -1
- package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
- package/dist/integrations/openbanking/contracts/accounts.js +237 -1
- package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
- package/dist/integrations/openbanking/contracts/balances.js +167 -1
- package/dist/integrations/openbanking/contracts/index.js +12 -1
- package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
- package/dist/integrations/openbanking/contracts/transactions.js +218 -1
- package/dist/integrations/openbanking/guards.js +32 -1
- package/dist/integrations/openbanking/models.d.ts +55 -55
- package/dist/integrations/openbanking/models.js +242 -1
- package/dist/integrations/openbanking/openbanking.feature.js +68 -1
- package/dist/integrations/openbanking/telemetry.js +39 -1
- package/dist/integrations/providers/elevenlabs.js +56 -1
- package/dist/integrations/providers/gcs-storage.js +79 -1
- package/dist/integrations/providers/gmail.js +91 -1
- package/dist/integrations/providers/google-calendar.js +70 -1
- package/dist/integrations/providers/impls/elevenlabs-voice.js +95 -1
- package/dist/integrations/providers/impls/gcs-storage.js +88 -1
- package/dist/integrations/providers/impls/gmail-inbound.js +200 -1
- package/dist/integrations/providers/impls/gmail-outbound.js +104 -5
- package/dist/integrations/providers/impls/google-calendar.js +154 -1
- package/dist/integrations/providers/impls/index.js +16 -1
- package/dist/integrations/providers/impls/mistral-embedding.js +41 -1
- package/dist/integrations/providers/impls/mistral-llm.js +247 -1
- package/dist/integrations/providers/impls/postmark-email.js +55 -1
- package/dist/integrations/providers/impls/powens-client.js +171 -1
- package/dist/integrations/providers/impls/powens-openbanking.js +218 -1
- package/dist/integrations/providers/impls/provider-factory.js +142 -1
- package/dist/integrations/providers/impls/qdrant-vector.js +69 -1
- package/dist/integrations/providers/impls/stripe-payments.js +202 -1
- package/dist/integrations/providers/impls/twilio-sms.js +58 -1
- package/dist/integrations/providers/index.js +13 -1
- package/dist/integrations/providers/mistral.js +72 -1
- package/dist/integrations/providers/postmark.js +72 -1
- package/dist/integrations/providers/powens.js +120 -1
- package/dist/integrations/providers/qdrant.js +77 -1
- package/dist/integrations/providers/registry.js +34 -1
- package/dist/integrations/providers/stripe.js +87 -1
- package/dist/integrations/providers/twilio-sms.js +65 -1
- package/dist/integrations/runtime.js +186 -1
- package/dist/integrations/secrets/aws-secret-manager.js +231 -1
- package/dist/integrations/secrets/env-secret-provider.js +81 -1
- package/dist/integrations/secrets/gcp-secret-manager.js +229 -1
- package/dist/integrations/secrets/index.js +8 -1
- package/dist/integrations/secrets/manager.js +103 -1
- package/dist/integrations/secrets/provider.js +58 -1
- package/dist/integrations/secrets/scaleway-secret-manager.js +247 -1
- package/dist/integrations/spec.js +39 -1
- package/dist/jobs/define-job.js +16 -1
- package/dist/jobs/gcp-cloud-tasks.js +53 -1
- package/dist/jobs/gcp-pubsub.js +39 -1
- package/dist/jobs/handlers/gmail-sync-handler.js +9 -1
- package/dist/jobs/handlers/index.js +12 -1
- package/dist/jobs/handlers/ping-handler.js +15 -1
- package/dist/jobs/handlers/storage-document-handler.js +14 -1
- package/dist/jobs/index.js +4 -1
- package/dist/jobs/memory-queue.js +71 -1
- package/dist/jobs/queue.js +33 -1
- package/dist/jobs/scaleway-sqs-queue.js +153 -1
- package/dist/jsonschema.d.ts +3 -3
- package/dist/jsonschema.js +32 -1
- package/dist/knowledge/contracts.d.ts +66 -66
- package/dist/knowledge/contracts.js +317 -1
- package/dist/knowledge/docs/knowledge.docblock.js +22 -138
- package/dist/knowledge/index.js +10 -1
- package/dist/knowledge/ingestion/document-processor.js +54 -1
- package/dist/knowledge/ingestion/embedding-service.js +25 -1
- package/dist/knowledge/ingestion/gmail-adapter.js +50 -5
- package/dist/knowledge/ingestion/index.js +7 -1
- package/dist/knowledge/ingestion/storage-adapter.js +26 -1
- package/dist/knowledge/ingestion/vector-indexer.js +32 -1
- package/dist/knowledge/query/index.js +3 -1
- package/dist/knowledge/query/service.js +64 -2
- package/dist/knowledge/runtime.js +49 -1
- package/dist/knowledge/spaces/email-threads.js +38 -1
- package/dist/knowledge/spaces/financial-docs.js +38 -1
- package/dist/knowledge/spaces/financial-overview.js +42 -1
- package/dist/knowledge/spaces/index.js +8 -1
- package/dist/knowledge/spaces/product-canon.js +38 -1
- package/dist/knowledge/spaces/support-faq.js +41 -1
- package/dist/knowledge/spaces/uploaded-docs.js +38 -1
- package/dist/knowledge/spec.js +39 -1
- package/dist/llm/exporters.js +541 -8
- package/dist/llm/index.js +4 -1
- package/dist/llm/prompts.js +246 -56
- package/dist/markdown.js +116 -3
- package/dist/migrations.js +33 -1
- package/dist/onboarding-base.d.ts +29 -29
- package/dist/onboarding-base.js +196 -1
- package/dist/openapi.js +75 -1
- package/dist/openbanking/docs/openbanking.docblock.js +22 -109
- package/dist/ownership.js +40 -1
- package/dist/policy/docs/policy.docblock.js +22 -1
- package/dist/policy/engine.js +223 -1
- package/dist/policy/opa-adapter.js +71 -1
- package/dist/policy/spec.js +33 -1
- package/dist/presentations/docs/presentations-conventions.docblock.js +21 -7
- package/dist/presentations.backcompat.js +47 -1
- package/dist/presentations.d.ts +3 -3
- package/dist/presentations.js +66 -1
- package/dist/presentations.v2.js +278 -6
- package/dist/prompt.js +10 -1
- package/dist/promptRegistry.js +34 -1
- package/dist/regenerator/docs/regenerator.docblock.js +22 -184
- package/dist/regenerator/executor.js +86 -1
- package/dist/regenerator/index.js +6 -1
- package/dist/regenerator/service.js +92 -1
- package/dist/regenerator/sinks.js +32 -1
- package/dist/regenerator/utils.js +51 -1
- package/dist/registry.js +208 -1
- package/dist/resources.js +47 -1
- package/dist/schema/dist/EnumType.js +2 -1
- package/dist/schema/dist/FieldType.js +49 -1
- package/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/schema/dist/SchemaModel.js +39 -1
- package/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/schema/dist/entity/index.js +2 -1
- package/dist/schema/dist/entity/types.js +1 -1
- package/dist/schema/dist/index.js +6 -1
- package/dist/schema-to-markdown.js +214 -10
- package/dist/server/graphql-pothos.js +128 -1
- package/dist/server/index.js +10 -1
- package/dist/server/mcp/createMcpServer.js +28 -1
- package/dist/server/mcp/registerPresentations.js +151 -1
- package/dist/server/mcp/registerPrompts.js +36 -2
- package/dist/server/mcp/registerResources.js +35 -1
- package/dist/server/mcp/registerTools.js +22 -1
- package/dist/server/provider-mcp.js +3 -1
- package/dist/server/rest-elysia.js +20 -1
- package/dist/server/rest-express.js +39 -1
- package/dist/server/rest-generic.js +125 -1
- package/dist/server/rest-next-app.js +38 -1
- package/dist/server/rest-next-mcp.js +45 -1
- package/dist/server/rest-next-pages.js +25 -1
- package/dist/spec.js +35 -1
- package/dist/telemetry/anomaly.js +48 -1
- package/dist/telemetry/docs/telemetry.docblock.js +22 -139
- package/dist/telemetry/index.js +5 -1
- package/dist/telemetry/spec.js +69 -1
- package/dist/telemetry/tracker.js +76 -1
- package/dist/tests/index.js +4 -1
- package/dist/tests/runner.js +150 -1
- package/dist/tests/spec.js +33 -1
- package/dist/themes.js +39 -1
- package/dist/workflow/adapters/db-adapter.js +83 -1
- package/dist/workflow/adapters/file-adapter.js +11 -1
- package/dist/workflow/adapters/index.js +5 -1
- package/dist/workflow/adapters/memory-store.js +58 -1
- package/dist/workflow/expression.js +98 -1
- package/dist/workflow/index.js +9 -1
- package/dist/workflow/runner.js +337 -1
- package/dist/workflow/sla-monitor.js +47 -1
- package/dist/workflow/spec.js +32 -1
- package/dist/workflow/validation.js +175 -1
- package/package.json +11 -4
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { ContractSpec } from "../spec.js";
|
|
2
2
|
import { SpecRegistry } from "../registry.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _lssm_lib_schema272 from "@lssm/lib.schema";
|
|
4
4
|
import { SchemaModel } from "@lssm/lib.schema";
|
|
5
5
|
|
|
6
6
|
//#region src/knowledge/contracts.d.ts
|
|
7
7
|
declare const CreateKnowledgeSource: ContractSpec<SchemaModel<{
|
|
8
8
|
tenantId: {
|
|
9
|
-
type:
|
|
9
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
spaceKey: {
|
|
13
|
-
type:
|
|
13
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
spaceVersion: {
|
|
17
|
-
type:
|
|
17
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
label: {
|
|
21
|
-
type:
|
|
21
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
sourceType: {
|
|
25
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
config: {
|
|
29
|
-
type:
|
|
29
|
+
type: _lssm_lib_schema272.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
syncSchedule: {
|
|
33
33
|
type: SchemaModel<{
|
|
34
34
|
enabled: {
|
|
35
|
-
type:
|
|
35
|
+
type: _lssm_lib_schema272.FieldType<boolean, boolean>;
|
|
36
36
|
isOptional: false;
|
|
37
37
|
};
|
|
38
38
|
cron: {
|
|
39
|
-
type:
|
|
39
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
40
40
|
isOptional: true;
|
|
41
41
|
};
|
|
42
42
|
intervalMs: {
|
|
43
|
-
type:
|
|
43
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
44
44
|
isOptional: true;
|
|
45
45
|
};
|
|
46
46
|
}>;
|
|
@@ -48,92 +48,92 @@ declare const CreateKnowledgeSource: ContractSpec<SchemaModel<{
|
|
|
48
48
|
};
|
|
49
49
|
}>, SchemaModel<{
|
|
50
50
|
id: {
|
|
51
|
-
type:
|
|
51
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
52
52
|
isOptional: false;
|
|
53
53
|
};
|
|
54
54
|
tenantId: {
|
|
55
|
-
type:
|
|
55
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
56
56
|
isOptional: false;
|
|
57
57
|
};
|
|
58
58
|
spaceKey: {
|
|
59
|
-
type:
|
|
59
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
60
60
|
isOptional: false;
|
|
61
61
|
};
|
|
62
62
|
spaceVersion: {
|
|
63
|
-
type:
|
|
63
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
64
64
|
isOptional: false;
|
|
65
65
|
};
|
|
66
66
|
label: {
|
|
67
|
-
type:
|
|
67
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
68
68
|
isOptional: false;
|
|
69
69
|
};
|
|
70
70
|
sourceType: {
|
|
71
|
-
type:
|
|
71
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
72
72
|
isOptional: false;
|
|
73
73
|
};
|
|
74
74
|
syncSchedule: {
|
|
75
75
|
type: SchemaModel<{
|
|
76
76
|
enabled: {
|
|
77
|
-
type:
|
|
77
|
+
type: _lssm_lib_schema272.FieldType<boolean, boolean>;
|
|
78
78
|
isOptional: false;
|
|
79
79
|
};
|
|
80
80
|
cron: {
|
|
81
|
-
type:
|
|
81
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
82
82
|
isOptional: true;
|
|
83
83
|
};
|
|
84
84
|
intervalMs: {
|
|
85
|
-
type:
|
|
85
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
86
86
|
isOptional: true;
|
|
87
87
|
};
|
|
88
88
|
}>;
|
|
89
89
|
isOptional: true;
|
|
90
90
|
};
|
|
91
91
|
lastSyncStatus: {
|
|
92
|
-
type:
|
|
92
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
93
93
|
isOptional: true;
|
|
94
94
|
};
|
|
95
95
|
lastSyncAt: {
|
|
96
|
-
type:
|
|
96
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
97
97
|
isOptional: true;
|
|
98
98
|
};
|
|
99
99
|
itemsProcessed: {
|
|
100
|
-
type:
|
|
100
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
101
101
|
isOptional: true;
|
|
102
102
|
};
|
|
103
103
|
createdAt: {
|
|
104
|
-
type:
|
|
104
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
105
105
|
isOptional: true;
|
|
106
106
|
};
|
|
107
107
|
updatedAt: {
|
|
108
|
-
type:
|
|
108
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
109
109
|
isOptional: true;
|
|
110
110
|
};
|
|
111
111
|
}>, undefined>;
|
|
112
112
|
declare const UpdateKnowledgeSource: ContractSpec<SchemaModel<{
|
|
113
113
|
sourceId: {
|
|
114
|
-
type:
|
|
114
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
115
115
|
isOptional: false;
|
|
116
116
|
};
|
|
117
117
|
label: {
|
|
118
|
-
type:
|
|
118
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
119
119
|
isOptional: true;
|
|
120
120
|
};
|
|
121
121
|
config: {
|
|
122
|
-
type:
|
|
122
|
+
type: _lssm_lib_schema272.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
123
123
|
isOptional: true;
|
|
124
124
|
};
|
|
125
125
|
syncSchedule: {
|
|
126
126
|
type: SchemaModel<{
|
|
127
127
|
enabled: {
|
|
128
|
-
type:
|
|
128
|
+
type: _lssm_lib_schema272.FieldType<boolean, boolean>;
|
|
129
129
|
isOptional: false;
|
|
130
130
|
};
|
|
131
131
|
cron: {
|
|
132
|
-
type:
|
|
132
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
133
133
|
isOptional: true;
|
|
134
134
|
};
|
|
135
135
|
intervalMs: {
|
|
136
|
-
type:
|
|
136
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
137
137
|
isOptional: true;
|
|
138
138
|
};
|
|
139
139
|
}>;
|
|
@@ -141,149 +141,149 @@ declare const UpdateKnowledgeSource: ContractSpec<SchemaModel<{
|
|
|
141
141
|
};
|
|
142
142
|
}>, SchemaModel<{
|
|
143
143
|
id: {
|
|
144
|
-
type:
|
|
144
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
145
145
|
isOptional: false;
|
|
146
146
|
};
|
|
147
147
|
tenantId: {
|
|
148
|
-
type:
|
|
148
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
149
149
|
isOptional: false;
|
|
150
150
|
};
|
|
151
151
|
spaceKey: {
|
|
152
|
-
type:
|
|
152
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
153
153
|
isOptional: false;
|
|
154
154
|
};
|
|
155
155
|
spaceVersion: {
|
|
156
|
-
type:
|
|
156
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
157
157
|
isOptional: false;
|
|
158
158
|
};
|
|
159
159
|
label: {
|
|
160
|
-
type:
|
|
160
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
161
161
|
isOptional: false;
|
|
162
162
|
};
|
|
163
163
|
sourceType: {
|
|
164
|
-
type:
|
|
164
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
165
165
|
isOptional: false;
|
|
166
166
|
};
|
|
167
167
|
syncSchedule: {
|
|
168
168
|
type: SchemaModel<{
|
|
169
169
|
enabled: {
|
|
170
|
-
type:
|
|
170
|
+
type: _lssm_lib_schema272.FieldType<boolean, boolean>;
|
|
171
171
|
isOptional: false;
|
|
172
172
|
};
|
|
173
173
|
cron: {
|
|
174
|
-
type:
|
|
174
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
175
175
|
isOptional: true;
|
|
176
176
|
};
|
|
177
177
|
intervalMs: {
|
|
178
|
-
type:
|
|
178
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
179
179
|
isOptional: true;
|
|
180
180
|
};
|
|
181
181
|
}>;
|
|
182
182
|
isOptional: true;
|
|
183
183
|
};
|
|
184
184
|
lastSyncStatus: {
|
|
185
|
-
type:
|
|
185
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
186
186
|
isOptional: true;
|
|
187
187
|
};
|
|
188
188
|
lastSyncAt: {
|
|
189
|
-
type:
|
|
189
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
190
190
|
isOptional: true;
|
|
191
191
|
};
|
|
192
192
|
itemsProcessed: {
|
|
193
|
-
type:
|
|
193
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
194
194
|
isOptional: true;
|
|
195
195
|
};
|
|
196
196
|
createdAt: {
|
|
197
|
-
type:
|
|
197
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
198
198
|
isOptional: true;
|
|
199
199
|
};
|
|
200
200
|
updatedAt: {
|
|
201
|
-
type:
|
|
201
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
202
202
|
isOptional: true;
|
|
203
203
|
};
|
|
204
204
|
}>, undefined>;
|
|
205
205
|
declare const DeleteKnowledgeSource: ContractSpec<SchemaModel<{
|
|
206
206
|
sourceId: {
|
|
207
|
-
type:
|
|
207
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
208
208
|
isOptional: false;
|
|
209
209
|
};
|
|
210
210
|
}>, SchemaModel<{
|
|
211
211
|
success: {
|
|
212
|
-
type:
|
|
212
|
+
type: _lssm_lib_schema272.FieldType<boolean, boolean>;
|
|
213
213
|
isOptional: false;
|
|
214
214
|
};
|
|
215
215
|
}>, undefined>;
|
|
216
216
|
declare const ListKnowledgeSources: ContractSpec<SchemaModel<{
|
|
217
217
|
tenantId: {
|
|
218
|
-
type:
|
|
218
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
219
219
|
isOptional: false;
|
|
220
220
|
};
|
|
221
221
|
spaceKey: {
|
|
222
|
-
type:
|
|
222
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
223
223
|
isOptional: true;
|
|
224
224
|
};
|
|
225
225
|
}>, SchemaModel<{
|
|
226
226
|
sources: {
|
|
227
227
|
type: SchemaModel<{
|
|
228
228
|
id: {
|
|
229
|
-
type:
|
|
229
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
230
230
|
isOptional: false;
|
|
231
231
|
};
|
|
232
232
|
tenantId: {
|
|
233
|
-
type:
|
|
233
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
234
234
|
isOptional: false;
|
|
235
235
|
};
|
|
236
236
|
spaceKey: {
|
|
237
|
-
type:
|
|
237
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
238
238
|
isOptional: false;
|
|
239
239
|
};
|
|
240
240
|
spaceVersion: {
|
|
241
|
-
type:
|
|
241
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
242
242
|
isOptional: false;
|
|
243
243
|
};
|
|
244
244
|
label: {
|
|
245
|
-
type:
|
|
245
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
246
246
|
isOptional: false;
|
|
247
247
|
};
|
|
248
248
|
sourceType: {
|
|
249
|
-
type:
|
|
249
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
250
250
|
isOptional: false;
|
|
251
251
|
};
|
|
252
252
|
syncSchedule: {
|
|
253
253
|
type: SchemaModel<{
|
|
254
254
|
enabled: {
|
|
255
|
-
type:
|
|
255
|
+
type: _lssm_lib_schema272.FieldType<boolean, boolean>;
|
|
256
256
|
isOptional: false;
|
|
257
257
|
};
|
|
258
258
|
cron: {
|
|
259
|
-
type:
|
|
259
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
260
260
|
isOptional: true;
|
|
261
261
|
};
|
|
262
262
|
intervalMs: {
|
|
263
|
-
type:
|
|
263
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
264
264
|
isOptional: true;
|
|
265
265
|
};
|
|
266
266
|
}>;
|
|
267
267
|
isOptional: true;
|
|
268
268
|
};
|
|
269
269
|
lastSyncStatus: {
|
|
270
|
-
type:
|
|
270
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
271
271
|
isOptional: true;
|
|
272
272
|
};
|
|
273
273
|
lastSyncAt: {
|
|
274
|
-
type:
|
|
274
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
275
275
|
isOptional: true;
|
|
276
276
|
};
|
|
277
277
|
itemsProcessed: {
|
|
278
|
-
type:
|
|
278
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
279
279
|
isOptional: true;
|
|
280
280
|
};
|
|
281
281
|
createdAt: {
|
|
282
|
-
type:
|
|
282
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
283
283
|
isOptional: true;
|
|
284
284
|
};
|
|
285
285
|
updatedAt: {
|
|
286
|
-
type:
|
|
286
|
+
type: _lssm_lib_schema272.FieldType<Date, string>;
|
|
287
287
|
isOptional: true;
|
|
288
288
|
};
|
|
289
289
|
}>;
|
|
@@ -293,20 +293,20 @@ declare const ListKnowledgeSources: ContractSpec<SchemaModel<{
|
|
|
293
293
|
}>, undefined>;
|
|
294
294
|
declare const TriggerKnowledgeSourceSync: ContractSpec<SchemaModel<{
|
|
295
295
|
sourceId: {
|
|
296
|
-
type:
|
|
296
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
297
297
|
isOptional: false;
|
|
298
298
|
};
|
|
299
299
|
}>, SchemaModel<{
|
|
300
300
|
success: {
|
|
301
|
-
type:
|
|
301
|
+
type: _lssm_lib_schema272.FieldType<boolean, boolean>;
|
|
302
302
|
isOptional: false;
|
|
303
303
|
};
|
|
304
304
|
itemsProcessed: {
|
|
305
|
-
type:
|
|
305
|
+
type: _lssm_lib_schema272.FieldType<number, number>;
|
|
306
306
|
isOptional: true;
|
|
307
307
|
};
|
|
308
308
|
error: {
|
|
309
|
-
type:
|
|
309
|
+
type: _lssm_lib_schema272.FieldType<string, string>;
|
|
310
310
|
isOptional: true;
|
|
311
311
|
};
|
|
312
312
|
}>, undefined>;
|
|
@@ -1 +1,317 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { SchemaModel } from "../schema/dist/SchemaModel.js";
|
|
3
|
+
import "../schema/dist/index.js";
|
|
4
|
+
import { defineCommand, defineQuery } from "../spec.js";
|
|
5
|
+
|
|
6
|
+
//#region src/knowledge/contracts.ts
|
|
7
|
+
const KnowledgeSyncSchedule = new SchemaModel({
|
|
8
|
+
name: "KnowledgeSyncSchedule",
|
|
9
|
+
fields: {
|
|
10
|
+
enabled: {
|
|
11
|
+
type: ScalarTypeEnum.Boolean(),
|
|
12
|
+
isOptional: false
|
|
13
|
+
},
|
|
14
|
+
cron: {
|
|
15
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
16
|
+
isOptional: true
|
|
17
|
+
},
|
|
18
|
+
intervalMs: {
|
|
19
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
20
|
+
isOptional: true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const KnowledgeSourceRecord = new SchemaModel({
|
|
25
|
+
name: "KnowledgeSourceRecord",
|
|
26
|
+
fields: {
|
|
27
|
+
id: {
|
|
28
|
+
type: ScalarTypeEnum.ID(),
|
|
29
|
+
isOptional: false
|
|
30
|
+
},
|
|
31
|
+
tenantId: {
|
|
32
|
+
type: ScalarTypeEnum.ID(),
|
|
33
|
+
isOptional: false
|
|
34
|
+
},
|
|
35
|
+
spaceKey: {
|
|
36
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
37
|
+
isOptional: false
|
|
38
|
+
},
|
|
39
|
+
spaceVersion: {
|
|
40
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
41
|
+
isOptional: false
|
|
42
|
+
},
|
|
43
|
+
label: {
|
|
44
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
45
|
+
isOptional: false
|
|
46
|
+
},
|
|
47
|
+
sourceType: {
|
|
48
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
+
isOptional: false
|
|
50
|
+
},
|
|
51
|
+
syncSchedule: {
|
|
52
|
+
type: KnowledgeSyncSchedule,
|
|
53
|
+
isOptional: true
|
|
54
|
+
},
|
|
55
|
+
lastSyncStatus: {
|
|
56
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
57
|
+
isOptional: true
|
|
58
|
+
},
|
|
59
|
+
lastSyncAt: {
|
|
60
|
+
type: ScalarTypeEnum.DateTime(),
|
|
61
|
+
isOptional: true
|
|
62
|
+
},
|
|
63
|
+
itemsProcessed: {
|
|
64
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
65
|
+
isOptional: true
|
|
66
|
+
},
|
|
67
|
+
createdAt: {
|
|
68
|
+
type: ScalarTypeEnum.DateTime(),
|
|
69
|
+
isOptional: true
|
|
70
|
+
},
|
|
71
|
+
updatedAt: {
|
|
72
|
+
type: ScalarTypeEnum.DateTime(),
|
|
73
|
+
isOptional: true
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const CreateKnowledgeSourceInput = new SchemaModel({
|
|
78
|
+
name: "CreateKnowledgeSourceInput",
|
|
79
|
+
fields: {
|
|
80
|
+
tenantId: {
|
|
81
|
+
type: ScalarTypeEnum.ID(),
|
|
82
|
+
isOptional: false
|
|
83
|
+
},
|
|
84
|
+
spaceKey: {
|
|
85
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
86
|
+
isOptional: false
|
|
87
|
+
},
|
|
88
|
+
spaceVersion: {
|
|
89
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
90
|
+
isOptional: false
|
|
91
|
+
},
|
|
92
|
+
label: {
|
|
93
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
94
|
+
isOptional: false
|
|
95
|
+
},
|
|
96
|
+
sourceType: {
|
|
97
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
98
|
+
isOptional: false
|
|
99
|
+
},
|
|
100
|
+
config: {
|
|
101
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
102
|
+
isOptional: false
|
|
103
|
+
},
|
|
104
|
+
syncSchedule: {
|
|
105
|
+
type: KnowledgeSyncSchedule,
|
|
106
|
+
isOptional: true
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const UpdateKnowledgeSourceInput = new SchemaModel({
|
|
111
|
+
name: "UpdateKnowledgeSourceInput",
|
|
112
|
+
fields: {
|
|
113
|
+
sourceId: {
|
|
114
|
+
type: ScalarTypeEnum.ID(),
|
|
115
|
+
isOptional: false
|
|
116
|
+
},
|
|
117
|
+
label: {
|
|
118
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
119
|
+
isOptional: true
|
|
120
|
+
},
|
|
121
|
+
config: {
|
|
122
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
123
|
+
isOptional: true
|
|
124
|
+
},
|
|
125
|
+
syncSchedule: {
|
|
126
|
+
type: KnowledgeSyncSchedule,
|
|
127
|
+
isOptional: true
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const DeleteKnowledgeSourceInput = new SchemaModel({
|
|
132
|
+
name: "DeleteKnowledgeSourceInput",
|
|
133
|
+
fields: { sourceId: {
|
|
134
|
+
type: ScalarTypeEnum.ID(),
|
|
135
|
+
isOptional: false
|
|
136
|
+
} }
|
|
137
|
+
});
|
|
138
|
+
const DeleteKnowledgeSourceOutput = new SchemaModel({
|
|
139
|
+
name: "DeleteKnowledgeSourceOutput",
|
|
140
|
+
fields: { success: {
|
|
141
|
+
type: ScalarTypeEnum.Boolean(),
|
|
142
|
+
isOptional: false
|
|
143
|
+
} }
|
|
144
|
+
});
|
|
145
|
+
const ListKnowledgeSourcesInput = new SchemaModel({
|
|
146
|
+
name: "ListKnowledgeSourcesInput",
|
|
147
|
+
fields: {
|
|
148
|
+
tenantId: {
|
|
149
|
+
type: ScalarTypeEnum.ID(),
|
|
150
|
+
isOptional: false
|
|
151
|
+
},
|
|
152
|
+
spaceKey: {
|
|
153
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
154
|
+
isOptional: true
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
const ListKnowledgeSourcesOutput = new SchemaModel({
|
|
159
|
+
name: "ListKnowledgeSourcesOutput",
|
|
160
|
+
fields: { sources: {
|
|
161
|
+
type: KnowledgeSourceRecord,
|
|
162
|
+
isOptional: false,
|
|
163
|
+
isArray: true
|
|
164
|
+
} }
|
|
165
|
+
});
|
|
166
|
+
const TriggerKnowledgeSyncInput = new SchemaModel({
|
|
167
|
+
name: "TriggerKnowledgeSyncInput",
|
|
168
|
+
fields: { sourceId: {
|
|
169
|
+
type: ScalarTypeEnum.ID(),
|
|
170
|
+
isOptional: false
|
|
171
|
+
} }
|
|
172
|
+
});
|
|
173
|
+
const TriggerKnowledgeSyncOutput = new SchemaModel({
|
|
174
|
+
name: "TriggerKnowledgeSyncOutput",
|
|
175
|
+
fields: {
|
|
176
|
+
success: {
|
|
177
|
+
type: ScalarTypeEnum.Boolean(),
|
|
178
|
+
isOptional: false
|
|
179
|
+
},
|
|
180
|
+
itemsProcessed: {
|
|
181
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
182
|
+
isOptional: true
|
|
183
|
+
},
|
|
184
|
+
error: {
|
|
185
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
186
|
+
isOptional: true
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
const CreateKnowledgeSource = defineCommand({
|
|
191
|
+
meta: {
|
|
192
|
+
name: "knowledge.source.create",
|
|
193
|
+
version: 1,
|
|
194
|
+
description: "Create a knowledge source binding for a tenant.",
|
|
195
|
+
goal: "Onboard a new knowledge ingestion source such as Notion or uploads.",
|
|
196
|
+
context: "Used by Ops and App Studio to configure knowledge ingestion per tenant and space.",
|
|
197
|
+
owners: ["platform.knowledge"],
|
|
198
|
+
tags: ["knowledge", "sources"],
|
|
199
|
+
stability: "experimental"
|
|
200
|
+
},
|
|
201
|
+
io: {
|
|
202
|
+
input: CreateKnowledgeSourceInput,
|
|
203
|
+
output: KnowledgeSourceRecord
|
|
204
|
+
},
|
|
205
|
+
policy: {
|
|
206
|
+
auth: "admin",
|
|
207
|
+
policies: [{
|
|
208
|
+
name: "platform.knowledge.manage",
|
|
209
|
+
version: 1
|
|
210
|
+
}]
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
const UpdateKnowledgeSource = defineCommand({
|
|
214
|
+
meta: {
|
|
215
|
+
name: "knowledge.source.update",
|
|
216
|
+
version: 1,
|
|
217
|
+
description: "Update metadata or configuration for a knowledge source.",
|
|
218
|
+
goal: "Allow rotation of credentials, sync schedules, and labels.",
|
|
219
|
+
context: "Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).",
|
|
220
|
+
owners: ["platform.knowledge"],
|
|
221
|
+
tags: ["knowledge", "sources"],
|
|
222
|
+
stability: "experimental"
|
|
223
|
+
},
|
|
224
|
+
io: {
|
|
225
|
+
input: UpdateKnowledgeSourceInput,
|
|
226
|
+
output: KnowledgeSourceRecord
|
|
227
|
+
},
|
|
228
|
+
policy: {
|
|
229
|
+
auth: "admin",
|
|
230
|
+
policies: [{
|
|
231
|
+
name: "platform.knowledge.manage",
|
|
232
|
+
version: 1
|
|
233
|
+
}]
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
const DeleteKnowledgeSource = defineCommand({
|
|
237
|
+
meta: {
|
|
238
|
+
name: "knowledge.source.delete",
|
|
239
|
+
version: 1,
|
|
240
|
+
description: "Delete a knowledge source binding for a tenant.",
|
|
241
|
+
goal: "Remove obsolete or compromised knowledge ingestion paths.",
|
|
242
|
+
context: "Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.",
|
|
243
|
+
owners: ["platform.knowledge"],
|
|
244
|
+
tags: ["knowledge", "sources"],
|
|
245
|
+
stability: "experimental"
|
|
246
|
+
},
|
|
247
|
+
io: {
|
|
248
|
+
input: DeleteKnowledgeSourceInput,
|
|
249
|
+
output: DeleteKnowledgeSourceOutput
|
|
250
|
+
},
|
|
251
|
+
policy: {
|
|
252
|
+
auth: "admin",
|
|
253
|
+
policies: [{
|
|
254
|
+
name: "platform.knowledge.manage",
|
|
255
|
+
version: 1
|
|
256
|
+
}]
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
const ListKnowledgeSources = defineQuery({
|
|
260
|
+
meta: {
|
|
261
|
+
name: "knowledge.source.list",
|
|
262
|
+
version: 1,
|
|
263
|
+
description: "List knowledge sources configured for a tenant.",
|
|
264
|
+
goal: "Provide visibility into knowledge ingest configuration and schedules.",
|
|
265
|
+
context: "Used by App Studio and Ops flows to surface knowledge sources and their health.",
|
|
266
|
+
owners: ["platform.knowledge"],
|
|
267
|
+
tags: ["knowledge", "sources"],
|
|
268
|
+
stability: "experimental"
|
|
269
|
+
},
|
|
270
|
+
io: {
|
|
271
|
+
input: ListKnowledgeSourcesInput,
|
|
272
|
+
output: ListKnowledgeSourcesOutput
|
|
273
|
+
},
|
|
274
|
+
policy: {
|
|
275
|
+
auth: "admin",
|
|
276
|
+
policies: [{
|
|
277
|
+
name: "platform.knowledge.read",
|
|
278
|
+
version: 1
|
|
279
|
+
}]
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
const TriggerKnowledgeSourceSync = defineCommand({
|
|
283
|
+
meta: {
|
|
284
|
+
name: "knowledge.source.triggerSync",
|
|
285
|
+
version: 1,
|
|
286
|
+
description: "Trigger an immediate sync for a knowledge source.",
|
|
287
|
+
goal: "Support manual or automated sync retries for knowledge ingestion.",
|
|
288
|
+
context: "Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.",
|
|
289
|
+
owners: ["platform.knowledge"],
|
|
290
|
+
tags: ["knowledge", "sources"],
|
|
291
|
+
stability: "experimental"
|
|
292
|
+
},
|
|
293
|
+
io: {
|
|
294
|
+
input: TriggerKnowledgeSyncInput,
|
|
295
|
+
output: TriggerKnowledgeSyncOutput
|
|
296
|
+
},
|
|
297
|
+
policy: {
|
|
298
|
+
auth: "admin",
|
|
299
|
+
policies: [{
|
|
300
|
+
name: "platform.knowledge.manage",
|
|
301
|
+
version: 1
|
|
302
|
+
}]
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
const knowledgeContracts = {
|
|
306
|
+
CreateKnowledgeSource,
|
|
307
|
+
UpdateKnowledgeSource,
|
|
308
|
+
DeleteKnowledgeSource,
|
|
309
|
+
ListKnowledgeSources,
|
|
310
|
+
TriggerKnowledgeSourceSync
|
|
311
|
+
};
|
|
312
|
+
function registerKnowledgeContracts(registry) {
|
|
313
|
+
return registry.register(CreateKnowledgeSource).register(UpdateKnowledgeSource).register(DeleteKnowledgeSource).register(ListKnowledgeSources).register(TriggerKnowledgeSourceSync);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
//#endregion
|
|
317
|
+
export { CreateKnowledgeSource, DeleteKnowledgeSource, ListKnowledgeSources, TriggerKnowledgeSourceSync, UpdateKnowledgeSource, knowledgeContracts, registerKnowledgeContracts };
|