@manta-eu/client 0.1.0

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 (188) hide show
  1. package/LICENSE +21 -0
  2. package/dist/generated/graphql.d.ts +4719 -0
  3. package/dist/generated/graphql.d.ts.map +1 -0
  4. package/dist/generated/graphql.js +2452 -0
  5. package/dist/graphql-clients.d.ts +9 -0
  6. package/dist/graphql-clients.d.ts.map +1 -0
  7. package/dist/graphql-clients.js +27 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2 -0
  11. package/dist/shared/action-plan.d.ts +2 -0
  12. package/dist/shared/action-plan.d.ts.map +1 -0
  13. package/dist/shared/action-plan.js +1 -0
  14. package/dist/shared/agent-mode.d.ts +9 -0
  15. package/dist/shared/agent-mode.d.ts.map +1 -0
  16. package/dist/shared/agent-mode.js +38 -0
  17. package/dist/shared/agent-types.d.ts +41 -0
  18. package/dist/shared/agent-types.d.ts.map +1 -0
  19. package/dist/shared/agent-types.js +12 -0
  20. package/dist/shared/chat-context.d.ts +7 -0
  21. package/dist/shared/chat-context.d.ts.map +1 -0
  22. package/dist/shared/chat-context.js +38 -0
  23. package/dist/shared/chat-manager.d.ts +183 -0
  24. package/dist/shared/chat-manager.d.ts.map +1 -0
  25. package/dist/shared/chat-manager.js +75 -0
  26. package/dist/shared/chat-turn-errors.d.ts +16 -0
  27. package/dist/shared/chat-turn-errors.d.ts.map +1 -0
  28. package/dist/shared/chat-turn-errors.js +18 -0
  29. package/dist/shared/constants.d.ts +11 -0
  30. package/dist/shared/constants.d.ts.map +1 -0
  31. package/dist/shared/constants.js +10 -0
  32. package/dist/shared/conversation-starter-defaults.d.ts +8 -0
  33. package/dist/shared/conversation-starter-defaults.d.ts.map +1 -0
  34. package/dist/shared/conversation-starter-defaults.js +20 -0
  35. package/dist/shared/datastore-id.d.ts +4 -0
  36. package/dist/shared/datastore-id.d.ts.map +1 -0
  37. package/dist/shared/datastore-id.js +17 -0
  38. package/dist/shared/datastore-path.d.ts +19 -0
  39. package/dist/shared/datastore-path.d.ts.map +1 -0
  40. package/dist/shared/datastore-path.js +62 -0
  41. package/dist/shared/datastore-route-table.d.ts +36 -0
  42. package/dist/shared/datastore-route-table.d.ts.map +1 -0
  43. package/dist/shared/datastore-route-table.js +43 -0
  44. package/dist/shared/duration.d.ts +6 -0
  45. package/dist/shared/duration.d.ts.map +1 -0
  46. package/dist/shared/duration.js +55 -0
  47. package/dist/shared/entity-set.d.ts +14 -0
  48. package/dist/shared/entity-set.d.ts.map +1 -0
  49. package/dist/shared/entity-set.js +25 -0
  50. package/dist/shared/error-utils.d.ts +23 -0
  51. package/dist/shared/error-utils.d.ts.map +1 -0
  52. package/dist/shared/error-utils.js +56 -0
  53. package/dist/shared/explorer-paths.d.ts +4 -0
  54. package/dist/shared/explorer-paths.d.ts.map +1 -0
  55. package/dist/shared/explorer-paths.js +7 -0
  56. package/dist/shared/fileIri.d.ts +12 -0
  57. package/dist/shared/fileIri.d.ts.map +1 -0
  58. package/dist/shared/fileIri.js +18 -0
  59. package/dist/shared/index.d.ts +22 -0
  60. package/dist/shared/index.d.ts.map +1 -0
  61. package/dist/shared/index.js +8 -0
  62. package/dist/shared/live-context.d.ts +2 -0
  63. package/dist/shared/live-context.d.ts.map +1 -0
  64. package/dist/shared/live-context.js +15 -0
  65. package/dist/shared/maintenance-schedule.d.ts +11 -0
  66. package/dist/shared/maintenance-schedule.d.ts.map +1 -0
  67. package/dist/shared/maintenance-schedule.js +38 -0
  68. package/dist/shared/memory-citation-sampling.d.ts +16 -0
  69. package/dist/shared/memory-citation-sampling.d.ts.map +1 -0
  70. package/dist/shared/memory-citation-sampling.js +14 -0
  71. package/dist/shared/memory-confidence.d.ts +3 -0
  72. package/dist/shared/memory-confidence.d.ts.map +1 -0
  73. package/dist/shared/memory-confidence.js +7 -0
  74. package/dist/shared/memory-consolidation-limits.d.ts +6 -0
  75. package/dist/shared/memory-consolidation-limits.d.ts.map +1 -0
  76. package/dist/shared/memory-consolidation-limits.js +5 -0
  77. package/dist/shared/memory-dates.d.ts +3 -0
  78. package/dist/shared/memory-dates.d.ts.map +1 -0
  79. package/dist/shared/memory-dates.js +7 -0
  80. package/dist/shared/memory-decay.d.ts +22 -0
  81. package/dist/shared/memory-decay.d.ts.map +1 -0
  82. package/dist/shared/memory-decay.js +43 -0
  83. package/dist/shared/memory-diversity.d.ts +10 -0
  84. package/dist/shared/memory-diversity.d.ts.map +1 -0
  85. package/dist/shared/memory-diversity.js +44 -0
  86. package/dist/shared/memory-entity-recall.d.ts +8 -0
  87. package/dist/shared/memory-entity-recall.d.ts.map +1 -0
  88. package/dist/shared/memory-entity-recall.js +17 -0
  89. package/dist/shared/memory-importance.d.ts +4 -0
  90. package/dist/shared/memory-importance.d.ts.map +1 -0
  91. package/dist/shared/memory-importance.js +9 -0
  92. package/dist/shared/memory-keyword-recall.d.ts +13 -0
  93. package/dist/shared/memory-keyword-recall.d.ts.map +1 -0
  94. package/dist/shared/memory-keyword-recall.js +141 -0
  95. package/dist/shared/memory-kind-iris.d.ts +9 -0
  96. package/dist/shared/memory-kind-iris.d.ts.map +1 -0
  97. package/dist/shared/memory-kind-iris.js +22 -0
  98. package/dist/shared/memory-preload-gate.d.ts +37 -0
  99. package/dist/shared/memory-preload-gate.d.ts.map +1 -0
  100. package/dist/shared/memory-preload-gate.js +95 -0
  101. package/dist/shared/memory-sources.d.ts +3 -0
  102. package/dist/shared/memory-sources.d.ts.map +1 -0
  103. package/dist/shared/memory-sources.js +3 -0
  104. package/dist/shared/memory-teams.d.ts +2 -0
  105. package/dist/shared/memory-teams.d.ts.map +1 -0
  106. package/dist/shared/memory-teams.js +3 -0
  107. package/dist/shared/memory-token-budget.d.ts +8 -0
  108. package/dist/shared/memory-token-budget.d.ts.map +1 -0
  109. package/dist/shared/memory-token-budget.js +23 -0
  110. package/dist/shared/memory-volatility.d.ts +24 -0
  111. package/dist/shared/memory-volatility.d.ts.map +1 -0
  112. package/dist/shared/memory-volatility.js +55 -0
  113. package/dist/shared/message-utils.d.ts +12 -0
  114. package/dist/shared/message-utils.d.ts.map +1 -0
  115. package/dist/shared/message-utils.js +22 -0
  116. package/dist/shared/model.d.ts +165 -0
  117. package/dist/shared/model.d.ts.map +1 -0
  118. package/dist/shared/model.js +93 -0
  119. package/dist/shared/org-roles.d.ts +11 -0
  120. package/dist/shared/org-roles.d.ts.map +1 -0
  121. package/dist/shared/org-roles.js +10 -0
  122. package/dist/shared/page-context.d.ts +7 -0
  123. package/dist/shared/page-context.d.ts.map +1 -0
  124. package/dist/shared/page-context.js +1 -0
  125. package/dist/shared/permissions.d.ts +9 -0
  126. package/dist/shared/permissions.d.ts.map +1 -0
  127. package/dist/shared/permissions.js +10 -0
  128. package/dist/shared/questionnaire.d.ts +32 -0
  129. package/dist/shared/questionnaire.d.ts.map +1 -0
  130. package/dist/shared/questionnaire.js +68 -0
  131. package/dist/shared/rdf-namespaces.d.ts +11 -0
  132. package/dist/shared/rdf-namespaces.d.ts.map +1 -0
  133. package/dist/shared/rdf-namespaces.js +15 -0
  134. package/dist/shared/rule-iri.d.ts +4 -0
  135. package/dist/shared/rule-iri.d.ts.map +1 -0
  136. package/dist/shared/rule-iri.js +13 -0
  137. package/dist/shared/rule-search.d.ts +2 -0
  138. package/dist/shared/rule-search.d.ts.map +1 -0
  139. package/dist/shared/rule-search.js +1 -0
  140. package/dist/shared/session-types.d.ts +14 -0
  141. package/dist/shared/session-types.d.ts.map +1 -0
  142. package/dist/shared/session-types.js +1 -0
  143. package/dist/shared/spa-routes.d.ts +3 -0
  144. package/dist/shared/spa-routes.d.ts.map +1 -0
  145. package/dist/shared/spa-routes.js +5 -0
  146. package/dist/shared/stakeholder-iri.d.ts +7 -0
  147. package/dist/shared/stakeholder-iri.d.ts.map +1 -0
  148. package/dist/shared/stakeholder-iri.js +20 -0
  149. package/dist/shared/team-activation.d.ts +7 -0
  150. package/dist/shared/team-activation.d.ts.map +1 -0
  151. package/dist/shared/team-activation.js +3 -0
  152. package/dist/shared/team.d.ts +150 -0
  153. package/dist/shared/team.d.ts.map +1 -0
  154. package/dist/shared/team.js +88 -0
  155. package/dist/shared/tools/coercers.d.ts +6 -0
  156. package/dist/shared/tools/coercers.d.ts.map +1 -0
  157. package/dist/shared/tools/coercers.js +63 -0
  158. package/dist/shared/tools/index.d.ts +4 -0
  159. package/dist/shared/tools/index.d.ts.map +1 -0
  160. package/dist/shared/tools/index.js +2 -0
  161. package/dist/shared/tools/metadata.d.ts +12 -0
  162. package/dist/shared/tools/metadata.d.ts.map +1 -0
  163. package/dist/shared/tools/metadata.js +215 -0
  164. package/dist/shared/tools/test-triple.d.ts +16 -0
  165. package/dist/shared/tools/test-triple.d.ts.map +1 -0
  166. package/dist/shared/tools/test-triple.js +26 -0
  167. package/dist/shared/tools/types.d.ts +236 -0
  168. package/dist/shared/tools/types.d.ts.map +1 -0
  169. package/dist/shared/tools/types.js +1 -0
  170. package/dist/shared/upload.d.ts +26 -0
  171. package/dist/shared/upload.d.ts.map +1 -0
  172. package/dist/shared/upload.js +26 -0
  173. package/dist/shared/website-url.d.ts +5 -0
  174. package/dist/shared/website-url.d.ts.map +1 -0
  175. package/dist/shared/website-url.js +31 -0
  176. package/dist/shared/workspace-artifacts.d.ts +21 -0
  177. package/dist/shared/workspace-artifacts.d.ts.map +1 -0
  178. package/dist/shared/workspace-artifacts.js +59 -0
  179. package/dist/shared/writable-shape-query.d.ts +2 -0
  180. package/dist/shared/writable-shape-query.d.ts.map +1 -0
  181. package/dist/shared/writable-shape-query.js +21 -0
  182. package/dist/types/jsonld.d.ts +2 -0
  183. package/dist/types/jsonld.d.ts.map +1 -0
  184. package/dist/types/jsonld.js +1 -0
  185. package/dist/types/sparql-types.d.ts +3 -0
  186. package/dist/types/sparql-types.d.ts.map +1 -0
  187. package/dist/types/sparql-types.js +1 -0
  188. package/package.json +93 -0
@@ -0,0 +1,55 @@
1
+ import { msPerDay, parseMemoryDate } from "./memory-dates.js";
2
+ export const memoryVolatilities = ["stable", "slow", "volatile"];
3
+ export const volatilityRules = {
4
+ stable: { trustDays: null, maxImportance: 5 },
5
+ slow: { trustDays: 90, maxImportance: 3 },
6
+ volatile: { trustDays: 7, maxImportance: 2 },
7
+ };
8
+ export const defaultMemoryVolatility = "slow";
9
+ export function isMemoryVolatility(value) {
10
+ return typeof value === "string" && memoryVolatilities.includes(value);
11
+ }
12
+ export function normalizeVolatility(value) {
13
+ return isMemoryVolatility(value) ? value : defaultMemoryVolatility;
14
+ }
15
+ export function volatilityTrustDays(volatility) {
16
+ return volatilityRules[normalizeVolatility(volatility)].trustDays;
17
+ }
18
+ export function maxImportanceForVolatility(volatility) {
19
+ return volatilityRules[normalizeVolatility(volatility)].maxImportance;
20
+ }
21
+ export const volatilityInferenceSlack = 1.5;
22
+ export function inferVolatility(memoryTrustedUntil, since) {
23
+ if (memoryTrustedUntil == null)
24
+ return "stable";
25
+ const horizon = parseMemoryDate(memoryTrustedUntil);
26
+ const from = parseMemoryDate(since);
27
+ if (horizon == null || from == null)
28
+ return defaultMemoryVolatility;
29
+ const spanDays = (horizon.getTime() - from.getTime()) / msPerDay;
30
+ const volatileDays = volatilityRules.volatile.trustDays ?? 0;
31
+ return spanDays <= volatileDays * volatilityInferenceSlack ? "volatile" : defaultMemoryVolatility;
32
+ }
33
+ export function isDeadlineDerivedHorizon(memoryTrustedUntil, memoryValidUntil) {
34
+ const horizon = parseMemoryDate(memoryTrustedUntil);
35
+ const deadline = parseMemoryDate(memoryValidUntil);
36
+ return horizon != null && deadline != null && horizon.getTime() === deadline.getTime();
37
+ }
38
+ export function importanceCeilingFor(memory) {
39
+ return isDeadlineDerivedHorizon(memory.memoryTrustedUntil, memory.memoryValidUntil)
40
+ ? maxImportanceForVolatility("stable")
41
+ : maxImportanceForVolatility(inferVolatility(memory.memoryTrustedUntil, memory.extractedAt));
42
+ }
43
+ export function capHorizonByDeadline(horizon, memoryValidUntil, now = new Date()) {
44
+ const deadline = memoryValidUntil != null && new Date(memoryValidUntil) > now ? memoryValidUntil : null;
45
+ if (deadline == null)
46
+ return horizon;
47
+ if (horizon == null)
48
+ return deadline;
49
+ return new Date(deadline) < new Date(horizon) ? deadline : horizon;
50
+ }
51
+ export function resolveTrustedUntil(volatility, memoryValidUntil, now = new Date()) {
52
+ const days = volatilityTrustDays(volatility);
53
+ const fromVolatility = days != null ? new Date(now.getTime() + days * msPerDay).toISOString() : null;
54
+ return capHorizonByDeadline(fromVolatility, memoryValidUntil, now);
55
+ }
@@ -0,0 +1,12 @@
1
+ import type { PageContext } from "./page-context.js";
2
+ import type { ChatUIMessage } from "./index.js";
3
+ import type { OperatorAllowedModel } from "./model.js";
4
+ import type { FileUIPart } from "ai";
5
+ export type CreateUserMessageArgs = {
6
+ text: string;
7
+ fileParts?: FileUIPart[];
8
+ pageContext?: PageContext;
9
+ model?: OperatorAllowedModel;
10
+ };
11
+ export declare function createUserMessage(args: CreateUserMessageArgs): ChatUIMessage;
12
+ //# sourceMappingURL=message-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-utils.d.ts","sourceRoot":"","sources":["../../src/shared/message-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAGrC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,UAAU,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,aAAa,CAsB5E"}
@@ -0,0 +1,22 @@
1
+ import { isPresent } from "@manta-eu/lib/present";
2
+ import { v7 as uuidv7 } from "uuid";
3
+ export function createUserMessage(args) {
4
+ const { text, fileParts, pageContext, model } = args;
5
+ const parts = [];
6
+ if (isPresent(fileParts)) {
7
+ parts.push(...fileParts);
8
+ }
9
+ if (text) {
10
+ parts.push({ type: "text", text });
11
+ }
12
+ return {
13
+ id: uuidv7(),
14
+ role: "user",
15
+ parts,
16
+ metadata: {
17
+ createdAt: new Date().toISOString(),
18
+ ...(pageContext && { pageContext }),
19
+ ...(model && { model }),
20
+ },
21
+ };
22
+ }
@@ -0,0 +1,165 @@
1
+ export declare const opus_5 = "claude-opus-5";
2
+ export declare const sonnet_4_5 = "claude-sonnet-4-5-20250929";
3
+ export declare const haiku_4_5 = "claude-haiku-4-5-20251001";
4
+ export declare const vllmPrimaryModel = "vllm-primary";
5
+ export declare const vertexClaudeModel = "vertex-claude";
6
+ export declare const anthropicPrimaryModel = "claude-opus-5";
7
+ export declare const anthropicSupportedMimeTypes: readonly string[];
8
+ export declare const vllmSupportedMimeTypes: readonly string[];
9
+ export declare const modelOptions: readonly [{
10
+ readonly id: "claude-opus-5";
11
+ readonly label: "Claude Opus";
12
+ readonly provider: "anthropic";
13
+ readonly contextWindow: 200000;
14
+ readonly isOperatorAllowed: true;
15
+ readonly supportedMimeTypes: readonly string[];
16
+ readonly supportsPromptCaching: true;
17
+ }, {
18
+ readonly id: "claude-sonnet-4-5-20250929";
19
+ readonly label: "Claude Sonnet";
20
+ readonly provider: "anthropic";
21
+ readonly contextWindow: 200000;
22
+ readonly isOperatorAllowed: true;
23
+ readonly supportedMimeTypes: readonly string[];
24
+ readonly supportsPromptCaching: true;
25
+ }, {
26
+ readonly id: "claude-haiku-4-5-20251001";
27
+ readonly label: "Claude Haiku";
28
+ readonly provider: "anthropic";
29
+ readonly contextWindow: 200000;
30
+ readonly isOperatorAllowed: false;
31
+ readonly supportedMimeTypes: readonly string[];
32
+ readonly supportsPromptCaching: true;
33
+ }, {
34
+ readonly id: "vllm-primary";
35
+ readonly label: "Manta LLM";
36
+ readonly provider: "vllm";
37
+ readonly contextWindow: 262144;
38
+ readonly isOperatorAllowed: true;
39
+ readonly supportedMimeTypes: readonly string[];
40
+ readonly supportsPromptCaching: false;
41
+ }, {
42
+ readonly id: "vertex-claude";
43
+ readonly label: "Claude (Vertex AI)";
44
+ readonly provider: "google-vertex-anthropic";
45
+ readonly contextWindow: 200000;
46
+ readonly isOperatorAllowed: true;
47
+ readonly supportedMimeTypes: readonly string[];
48
+ readonly supportsPromptCaching: true;
49
+ }];
50
+ export type MantaModelId = (typeof modelOptions)[number]["id"];
51
+ export declare const getModelMetaById: (modelId: MantaModelId) => {
52
+ readonly id: "claude-opus-5";
53
+ readonly label: "Claude Opus";
54
+ readonly provider: "anthropic";
55
+ readonly contextWindow: 200000;
56
+ readonly isOperatorAllowed: true;
57
+ readonly supportedMimeTypes: readonly string[];
58
+ readonly supportsPromptCaching: true;
59
+ } | {
60
+ readonly id: "claude-sonnet-4-5-20250929";
61
+ readonly label: "Claude Sonnet";
62
+ readonly provider: "anthropic";
63
+ readonly contextWindow: 200000;
64
+ readonly isOperatorAllowed: true;
65
+ readonly supportedMimeTypes: readonly string[];
66
+ readonly supportsPromptCaching: true;
67
+ } | {
68
+ readonly id: "claude-haiku-4-5-20251001";
69
+ readonly label: "Claude Haiku";
70
+ readonly provider: "anthropic";
71
+ readonly contextWindow: 200000;
72
+ readonly isOperatorAllowed: false;
73
+ readonly supportedMimeTypes: readonly string[];
74
+ readonly supportsPromptCaching: true;
75
+ } | {
76
+ readonly id: "vllm-primary";
77
+ readonly label: "Manta LLM";
78
+ readonly provider: "vllm";
79
+ readonly contextWindow: 262144;
80
+ readonly isOperatorAllowed: true;
81
+ readonly supportedMimeTypes: readonly string[];
82
+ readonly supportsPromptCaching: false;
83
+ } | {
84
+ readonly id: "vertex-claude";
85
+ readonly label: "Claude (Vertex AI)";
86
+ readonly provider: "google-vertex-anthropic";
87
+ readonly contextWindow: 200000;
88
+ readonly isOperatorAllowed: true;
89
+ readonly supportedMimeTypes: readonly string[];
90
+ readonly supportsPromptCaching: true;
91
+ };
92
+ export declare const getSupportedMimeTypes: (modelId: MantaModelId) => readonly string[];
93
+ export declare function requiresSingleSystemMessage(modelId: MantaModelId): boolean;
94
+ export declare const isValidModelId: (value: unknown) => value is MantaModelId;
95
+ export declare const operatorModelOptions: ({
96
+ readonly id: "claude-opus-5";
97
+ readonly label: "Claude Opus";
98
+ readonly provider: "anthropic";
99
+ readonly contextWindow: 200000;
100
+ readonly isOperatorAllowed: true;
101
+ readonly supportedMimeTypes: readonly string[];
102
+ readonly supportsPromptCaching: true;
103
+ } | {
104
+ readonly id: "claude-sonnet-4-5-20250929";
105
+ readonly label: "Claude Sonnet";
106
+ readonly provider: "anthropic";
107
+ readonly contextWindow: 200000;
108
+ readonly isOperatorAllowed: true;
109
+ readonly supportedMimeTypes: readonly string[];
110
+ readonly supportsPromptCaching: true;
111
+ } | {
112
+ readonly id: "vllm-primary";
113
+ readonly label: "Manta LLM";
114
+ readonly provider: "vllm";
115
+ readonly contextWindow: 262144;
116
+ readonly isOperatorAllowed: true;
117
+ readonly supportedMimeTypes: readonly string[];
118
+ readonly supportsPromptCaching: false;
119
+ } | {
120
+ readonly id: "vertex-claude";
121
+ readonly label: "Claude (Vertex AI)";
122
+ readonly provider: "google-vertex-anthropic";
123
+ readonly contextWindow: 200000;
124
+ readonly isOperatorAllowed: true;
125
+ readonly supportedMimeTypes: readonly string[];
126
+ readonly supportsPromptCaching: true;
127
+ })[];
128
+ export type OperatorAllowedModel = (typeof operatorModelOptions)[number]["id"];
129
+ export declare function isOperatorAllowedModel(value: unknown): value is OperatorAllowedModel;
130
+ export type AllowedModels = readonly [MantaModelId, ...MantaModelId[]];
131
+ export declare function getMinimumContextWindow(allowedModels: AllowedModels): number;
132
+ export declare function operatorModelOptionsFor(allowedModels: readonly MantaModelId[]): ({
133
+ readonly id: "claude-opus-5";
134
+ readonly label: "Claude Opus";
135
+ readonly provider: "anthropic";
136
+ readonly contextWindow: 200000;
137
+ readonly isOperatorAllowed: true;
138
+ readonly supportedMimeTypes: readonly string[];
139
+ readonly supportsPromptCaching: true;
140
+ } | {
141
+ readonly id: "claude-sonnet-4-5-20250929";
142
+ readonly label: "Claude Sonnet";
143
+ readonly provider: "anthropic";
144
+ readonly contextWindow: 200000;
145
+ readonly isOperatorAllowed: true;
146
+ readonly supportedMimeTypes: readonly string[];
147
+ readonly supportsPromptCaching: true;
148
+ } | {
149
+ readonly id: "vllm-primary";
150
+ readonly label: "Manta LLM";
151
+ readonly provider: "vllm";
152
+ readonly contextWindow: 262144;
153
+ readonly isOperatorAllowed: true;
154
+ readonly supportedMimeTypes: readonly string[];
155
+ readonly supportsPromptCaching: false;
156
+ } | {
157
+ readonly id: "vertex-claude";
158
+ readonly label: "Claude (Vertex AI)";
159
+ readonly provider: "google-vertex-anthropic";
160
+ readonly contextWindow: 200000;
161
+ readonly isOperatorAllowed: true;
162
+ readonly supportedMimeTypes: readonly string[];
163
+ readonly supportsPromptCaching: true;
164
+ })[];
165
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/shared/model.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,kBAA0C,CAAC;AAC9D,eAAO,MAAM,UAAU,+BAAuD,CAAC;AAC/E,eAAO,MAAM,SAAS,8BAAsD,CAAC;AAC7E,eAAO,MAAM,gBAAgB,iBAAyC,CAAC;AACvE,eAAO,MAAM,iBAAiB,kBAA0C,CAAC;AAEzE,eAAO,MAAM,qBAAqB,kBAAS,CAAC;AAE5C,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAMxD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAA2D,CAAC;AAEhH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDf,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAI/D,eAAO,MAAM,gBAAgB,GAAI,SAAS,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrD,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,YAAY,sBAE1D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAE1E;AAGD,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,YAExD,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAkD,CAAC;AAEpF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE/E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,CAEpF;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,YAAY,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;AAEvE,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAE5E;AAED,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAI7E"}
@@ -0,0 +1,93 @@
1
+ import { z } from "zod";
2
+ export const opus_5 = "claude-opus-5";
3
+ export const sonnet_4_5 = "claude-sonnet-4-5-20250929";
4
+ export const haiku_4_5 = "claude-haiku-4-5-20251001";
5
+ export const vllmPrimaryModel = "vllm-primary";
6
+ export const vertexClaudeModel = "vertex-claude";
7
+ export const anthropicPrimaryModel = opus_5;
8
+ export const anthropicSupportedMimeTypes = [
9
+ "image/png",
10
+ "image/jpeg",
11
+ "image/gif",
12
+ "image/webp",
13
+ "application/pdf",
14
+ ];
15
+ export const vllmSupportedMimeTypes = ["image/png", "image/jpeg", "image/gif", "image/webp"];
16
+ export const modelOptions = [
17
+ {
18
+ id: opus_5,
19
+ label: "Claude Opus",
20
+ provider: "anthropic",
21
+ contextWindow: 200_000,
22
+ isOperatorAllowed: true,
23
+ supportedMimeTypes: anthropicSupportedMimeTypes,
24
+ supportsPromptCaching: true,
25
+ },
26
+ {
27
+ id: sonnet_4_5,
28
+ label: "Claude Sonnet",
29
+ provider: "anthropic",
30
+ contextWindow: 200_000,
31
+ isOperatorAllowed: true,
32
+ supportedMimeTypes: anthropicSupportedMimeTypes,
33
+ supportsPromptCaching: true,
34
+ },
35
+ {
36
+ id: haiku_4_5,
37
+ label: "Claude Haiku",
38
+ provider: "anthropic",
39
+ contextWindow: 200_000,
40
+ isOperatorAllowed: false,
41
+ supportedMimeTypes: anthropicSupportedMimeTypes,
42
+ supportsPromptCaching: true,
43
+ },
44
+ {
45
+ id: vllmPrimaryModel,
46
+ label: "Manta LLM",
47
+ provider: "vllm",
48
+ contextWindow: 262_144,
49
+ isOperatorAllowed: true,
50
+ supportedMimeTypes: vllmSupportedMimeTypes,
51
+ supportsPromptCaching: false,
52
+ },
53
+ {
54
+ id: vertexClaudeModel,
55
+ label: "Claude (Vertex AI)",
56
+ provider: "google-vertex-anthropic",
57
+ // A floor, not the exact window: the model behind this id is whatever GOOGLE_VERTEX_MODEL
58
+ // names, and which Claude generations a project can reach depends on its pinned region.
59
+ contextWindow: 200_000,
60
+ isOperatorAllowed: true,
61
+ supportedMimeTypes: anthropicSupportedMimeTypes,
62
+ supportsPromptCaching: true,
63
+ },
64
+ ];
65
+ const modelById = new Map(modelOptions.map((m) => [m.id, m]));
66
+ export const getModelMetaById = (modelId) => {
67
+ const meta = modelById.get(modelId);
68
+ if (!meta) {
69
+ throw new Error(`Unknown model ID: ${modelId}`);
70
+ }
71
+ return meta;
72
+ };
73
+ export const getSupportedMimeTypes = (modelId) => {
74
+ return getModelMetaById(modelId).supportedMimeTypes;
75
+ };
76
+ export function requiresSingleSystemMessage(modelId) {
77
+ return !getModelMetaById(modelId).supportsPromptCaching;
78
+ }
79
+ const validModelSchema = z.enum(modelOptions.map((m) => m.id));
80
+ export const isValidModelId = (value) => {
81
+ return validModelSchema.safeParse(value).success;
82
+ };
83
+ export const operatorModelOptions = modelOptions.filter((m) => m.isOperatorAllowed);
84
+ export function isOperatorAllowedModel(value) {
85
+ return isValidModelId(value) && getModelMetaById(value).isOperatorAllowed;
86
+ }
87
+ export function getMinimumContextWindow(allowedModels) {
88
+ return Math.min(...allowedModels.map((modelId) => getModelMetaById(modelId).contextWindow));
89
+ }
90
+ export function operatorModelOptionsFor(allowedModels) {
91
+ const allowed = new Set(allowedModels);
92
+ return operatorModelOptions.filter((model) => allowed.has(model.id));
93
+ }
@@ -0,0 +1,11 @@
1
+ import type { Capability } from "./permissions.js";
2
+ export type OrgRoleDefinition = {
3
+ readonly id: string;
4
+ readonly groupName: string;
5
+ readonly label: string;
6
+ readonly capabilities: readonly Capability[];
7
+ };
8
+ export declare const orgAdminRole: OrgRoleDefinition;
9
+ export declare const plainMemberRole = "user";
10
+ export declare function findOrgRole(roles: readonly OrgRoleDefinition[], id: string): OrgRoleDefinition | undefined;
11
+ //# sourceMappingURL=org-roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org-roles.d.ts","sourceRoot":"","sources":["../../src/shared/org-roles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,iBAK1B,CAAC;AAEF,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAE1G"}
@@ -0,0 +1,10 @@
1
+ export const orgAdminRole = {
2
+ id: "admin",
3
+ groupName: "Admins",
4
+ label: "Admin",
5
+ capabilities: ["team:manage", "org:settings", "org:integrations"],
6
+ };
7
+ export const plainMemberRole = "user";
8
+ export function findOrgRole(roles, id) {
9
+ return roles.find((role) => role.id === id);
10
+ }
@@ -0,0 +1,7 @@
1
+ import type { IRI } from "@manta-eu/rdf-lib/namespaces";
2
+ /** The entities a screen is showing, so the agent can answer about what the user is looking at. */
3
+ export type PageContext = {
4
+ iris: IRI[];
5
+ typenames: string[];
6
+ };
7
+ //# sourceMappingURL=page-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-context.d.ts","sourceRoot":"","sources":["../../src/shared/page-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAExD,mGAAmG;AACnG,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ export declare const capabilities: readonly ["team:manage", "org:settings", "org:integrations"];
2
+ export type Capability = (typeof capabilities)[number];
3
+ export declare function isCapability(value: string): value is Capability;
4
+ export type CapabilityPrincipal = {
5
+ isOperator: boolean;
6
+ isOrgAdmin: boolean;
7
+ };
8
+ export declare function hasCapability(principal: CapabilityPrincipal, capability: Capability): boolean;
9
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/shared/permissions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,8DAA+D,CAAC;AAEzF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAE/D;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,aAAa,CAAC,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAG7F"}
@@ -0,0 +1,10 @@
1
+ import { orgAdminRole } from "./org-roles.js";
2
+ export const capabilities = ["team:manage", "org:settings", "org:integrations"];
3
+ export function isCapability(value) {
4
+ return capabilities.some((candidate) => candidate === value);
5
+ }
6
+ export function hasCapability(principal, capability) {
7
+ if (principal.isOperator)
8
+ return true;
9
+ return principal.isOrgAdmin && orgAdminRole.capabilities.includes(capability);
10
+ }
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ export declare const requestUserInputToolName = "requestUserInput";
3
+ export declare const requestUserInputToolPartType: "tool-requestUserInput";
4
+ export declare const questionnaireInputSchema: z.ZodObject<{
5
+ questions: z.ZodArray<z.ZodObject<{
6
+ id: z.ZodString;
7
+ header: z.ZodString;
8
+ question: z.ZodString;
9
+ options: z.ZodArray<z.ZodObject<{
10
+ label: z.ZodString;
11
+ description: z.ZodString;
12
+ recommended: z.ZodOptional<z.ZodBoolean>;
13
+ }, z.core.$strip>>;
14
+ }, z.core.$strip>>;
15
+ }, z.core.$strip>;
16
+ export declare const questionnaireOutputSchema: z.ZodObject<{
17
+ answers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ questionId: z.ZodString;
19
+ source: z.ZodLiteral<"option">;
20
+ value: z.ZodString;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ questionId: z.ZodString;
23
+ source: z.ZodLiteral<"other">;
24
+ value: z.ZodString;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ questionId: z.ZodString;
27
+ source: z.ZodLiteral<"skipped">;
28
+ }, z.core.$strip>], "source">>;
29
+ }, z.core.$strip>;
30
+ export type QuestionnaireInput = z.infer<typeof questionnaireInputSchema>;
31
+ export type QuestionnaireOutput = z.infer<typeof questionnaireOutputSchema>;
32
+ //# sourceMappingURL=questionnaire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"questionnaire.d.ts","sourceRoot":"","sources":["../../src/shared/questionnaire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,4BAA4B,yBAA8C,CAAC;AAgCxF,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAgBjC,CAAC;AAmBL,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAEpC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { z } from "zod";
2
+ export const requestUserInputToolName = "requestUserInput";
3
+ export const requestUserInputToolPartType = `tool-${requestUserInputToolName}`;
4
+ const questionnaireOptionSchema = z.object({
5
+ label: z.string().trim().min(1).max(40).describe("Short user-facing option label"),
6
+ description: z.string().trim().min(1).max(120).describe("One sentence explaining the option"),
7
+ recommended: z.boolean().optional().describe("Whether this is the recommended option"),
8
+ });
9
+ const questionnaireQuestionSchema = z
10
+ .object({
11
+ id: z
12
+ .string()
13
+ .trim()
14
+ .regex(/^[a-z][a-z0-9_]*$/)
15
+ .describe("Stable snake_case identifier for mapping the answer"),
16
+ header: z.string().trim().min(1).max(24).describe("Short heading of one to four words"),
17
+ question: z.string().trim().min(1).max(200).describe("Single-sentence question shown to the user"),
18
+ options: z
19
+ .array(questionnaireOptionSchema)
20
+ .min(1)
21
+ .max(4)
22
+ .describe("One to four mutually exclusive predefined answers"),
23
+ })
24
+ .superRefine(({ options }, context) => {
25
+ if (options.filter(({ recommended }) => recommended).length <= 1)
26
+ return;
27
+ context.addIssue({
28
+ code: "custom",
29
+ message: "At most one option can be recommended",
30
+ path: ["options"],
31
+ });
32
+ });
33
+ export const questionnaireInputSchema = z
34
+ .object({
35
+ questions: z.array(questionnaireQuestionSchema).min(1).max(3),
36
+ })
37
+ .superRefine(({ questions }, context) => {
38
+ const questionIds = new Set();
39
+ questions.forEach(({ id }, index) => {
40
+ if (questionIds.has(id)) {
41
+ context.addIssue({
42
+ code: "custom",
43
+ message: "Question IDs must be unique",
44
+ path: ["questions", index, "id"],
45
+ });
46
+ }
47
+ questionIds.add(id);
48
+ });
49
+ });
50
+ const questionnaireAnswerSchema = z.discriminatedUnion("source", [
51
+ z.object({
52
+ questionId: z.string().trim().min(1),
53
+ source: z.literal("option"),
54
+ value: z.string().trim().min(1),
55
+ }),
56
+ z.object({
57
+ questionId: z.string().trim().min(1),
58
+ source: z.literal("other"),
59
+ value: z.string().trim().min(1),
60
+ }),
61
+ z.object({
62
+ questionId: z.string().trim().min(1),
63
+ source: z.literal("skipped"),
64
+ }),
65
+ ]);
66
+ export const questionnaireOutputSchema = z.object({
67
+ answers: z.array(questionnaireAnswerSchema).min(1).max(3),
68
+ });
@@ -0,0 +1,11 @@
1
+ export declare const rulesGraphIri = "https://rdfox.com/default-base-iri/rules";
2
+ export declare const ontologyGraphIri: string;
3
+ export declare const writeLifecycle: {
4
+ predicate: string;
5
+ readOnly: string;
6
+ createOnly: string;
7
+ };
8
+ export declare const nonDataGraphIris: string[];
9
+ export declare function mintInstanceIri(classIri: string, localId: string): string;
10
+ export { baseIri, compactUri, decodeIriLocalName, encodeIriLocalName, encodeIriUnsafeChars, expandPrefix, formatEntityName, formatIriForRdfox, getNamespaceValues, isFullIri, isValidFullIri, isIri, isIsoDatetime, infrastructureNamespaces, iriLocalName, iriNamespace, isOwlNothing, owlNothingIri, isPrefixedIri, labeledNamespaces, type LabeledNamespacePrefix, namespaces, type NamespaceMeta, nfo, parseEntityUri, prependMissingSparqlPrefixes, rdfoxDefaultBaseIri, shaclGraphIri, sh, toTurtlePrefixes, validateFullIri, wellKnownPredicates, type IRI, } from "@manta-eu/rdf-lib/namespaces";
11
+ //# sourceMappingURL=rdf-namespaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rdf-namespaces.d.ts","sourceRoot":"","sources":["../../src/shared/rdf-namespaces.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa,6CAAqC,CAAC;AAGhE,eAAO,MAAM,gBAAgB,QAA+B,CAAC;AAG7D,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAwD,CAAC;AAEtF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,OAAO,EACL,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,KAAK,EACL,aAAa,EACb,wBAAwB,EACxB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,UAAU,EACV,KAAK,aAAa,EAClB,GAAG,EACH,cAAc,EACd,4BAA4B,EAC5B,mBAAmB,EACnB,aAAa,EACb,EAAE,EACF,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,KAAK,GAAG,GACT,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { encodeIriLocalName as encodeIriLocalNameValue, expandPrefix as expandPrefixIri, iriLocalName as iriLocalNameValue, iriNamespace as iriNamespaceValue, rdfoxDefaultBaseIri as rdfoxDefaultBaseIriValue, shaclGraphIri as shaclGraphIriValue, } from "@manta-eu/rdf-lib/namespaces";
2
+ export const rulesGraphIri = `${rdfoxDefaultBaseIriValue}rules`;
3
+ // KGC uploads the realm ontology here (kgc/kgc/realms/lib/ontology.py: realm_base + "ontology").
4
+ export const ontologyGraphIri = expandPrefixIri(":ontology");
5
+ // Field mutability Inferal publishes on its property shapes (DAT-577).
6
+ export const writeLifecycle = {
7
+ predicate: expandPrefixIri("relay:writeLifecycle"),
8
+ readOnly: expandPrefixIri("relay:ReadOnly"),
9
+ createOnly: expandPrefixIri("relay:CreateOnly"),
10
+ };
11
+ export const nonDataGraphIris = [ontologyGraphIri, shaclGraphIriValue, rulesGraphIri];
12
+ export function mintInstanceIri(classIri, localId) {
13
+ return `${iriNamespaceValue(classIri)}${encodeIriLocalNameValue(`${iriLocalNameValue(classIri)}_${localId}`)}`;
14
+ }
15
+ export { baseIri, compactUri, decodeIriLocalName, encodeIriLocalName, encodeIriUnsafeChars, expandPrefix, formatEntityName, formatIriForRdfox, getNamespaceValues, isFullIri, isValidFullIri, isIri, isIsoDatetime, infrastructureNamespaces, iriLocalName, iriNamespace, isOwlNothing, owlNothingIri, isPrefixedIri, labeledNamespaces, namespaces, nfo, parseEntityUri, prependMissingSparqlPrefixes, rdfoxDefaultBaseIri, shaclGraphIri, sh, toTurtlePrefixes, validateFullIri, wellKnownPredicates, } from "@manta-eu/rdf-lib/namespaces";
@@ -0,0 +1,4 @@
1
+ export declare const ruleNameMaxLength = 255;
2
+ export declare function sanitizeRuleName(value: string): string;
3
+ export declare function normalizeRuleLocalName(value: string): string | null;
4
+ //# sourceMappingURL=rule-iri.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-iri.d.ts","sourceRoot":"","sources":["../../src/shared/rule-iri.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKnE"}
@@ -0,0 +1,13 @@
1
+ export const ruleNameMaxLength = 255;
2
+ export function sanitizeRuleName(value) {
3
+ return value
4
+ .trim()
5
+ .replace(/[^a-zA-Z0-9_-]+/g, "_")
6
+ .replace(/^[-_]+|[-_]+$/g, "");
7
+ }
8
+ export function normalizeRuleLocalName(value) {
9
+ const sanitizedName = sanitizeRuleName(value);
10
+ if (!sanitizedName)
11
+ return null;
12
+ return sanitizedName.startsWith("Rule_") ? sanitizedName : `Rule_${sanitizedName}`;
13
+ }
@@ -0,0 +1,2 @@
1
+ export declare const ruleSearchMaxLength = 200;
2
+ //# sourceMappingURL=rule-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-search.d.ts","sourceRoot":"","sources":["../../src/shared/rule-search.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,MAAM,CAAC"}
@@ -0,0 +1 @@
1
+ export const ruleSearchMaxLength = 200;
@@ -0,0 +1,14 @@
1
+ export type User = {
2
+ id: string;
3
+ email: string;
4
+ name?: string | null | undefined;
5
+ };
6
+ /** Structurally the same as `@manta-eu/ldo-ui`'s picker row, so either satisfies the other. */
7
+ export type Datastore = {
8
+ id: string;
9
+ name: string;
10
+ depth?: number;
11
+ selectable?: boolean;
12
+ badge?: string;
13
+ };
14
+ //# sourceMappingURL=session-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-types.d.ts","sourceRoot":"","sources":["../../src/shared/session-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,+FAA+F;AAC/F,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const globalSpaRoutes: string[];
2
+ export declare const scopedSpaRoutes: string[];
3
+ //# sourceMappingURL=spa-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spa-routes.d.ts","sourceRoot":"","sources":["../../src/shared/spa-routes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,UAAwC,CAAC;AAErE,eAAO,MAAM,eAAe,UAAoD,CAAC"}
@@ -0,0 +1,5 @@
1
+ const errorRoutePath = "/error";
2
+ import { datastoreRoutePaths, globalRoutePaths } from "./datastore-route-table.js";
3
+ // A wildcard instead of scopedSpaRoutes would answer /d/<id>/graphql, and every typo, with index.html.
4
+ export const globalSpaRoutes = [errorRoutePath, ...globalRoutePaths];
5
+ export const scopedSpaRoutes = ["", "/", errorRoutePath, ...datastoreRoutePaths];