@lota-sdk/core 0.4.9 → 0.4.11
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/package.json +2 -2
- package/src/ai/embedding-cache.ts +3 -1
- package/src/ai-gateway/ai-gateway.ts +164 -82
- package/src/ai-gateway/index.ts +16 -1
- package/src/config/agent-defaults.ts +4 -107
- package/src/config/agent-types.ts +1 -1
- package/src/config/background-processing.ts +1 -1
- package/src/config/index.ts +0 -1
- package/src/config/logger.ts +22 -25
- package/src/config/thread-defaults.ts +1 -10
- package/src/create-runtime.ts +145 -670
- package/src/db/base.service.ts +30 -38
- package/src/db/memory-query-builder.ts +2 -1
- package/src/db/memory-store.ts +29 -20
- package/src/db/memory.ts +188 -195
- package/src/db/service-normalization.ts +97 -64
- package/src/db/service.ts +496 -384
- package/src/db/startup.ts +30 -19
- package/src/effect/helpers.ts +30 -5
- package/src/effect/index.ts +7 -7
- package/src/effect/layers.ts +75 -72
- package/src/effect/services.ts +15 -11
- package/src/embeddings/provider.ts +65 -71
- package/src/index.ts +13 -12
- package/src/queues/autonomous-job.queue.ts +177 -143
- package/src/queues/context-compaction.queue.ts +41 -39
- package/src/queues/delayed-node-promotion.queue.ts +61 -42
- package/src/queues/document-processor.queue.ts +5 -3
- package/src/queues/index.ts +1 -0
- package/src/queues/memory-consolidation.queue.ts +79 -53
- package/src/queues/organization-learning.queue.ts +70 -33
- package/src/queues/plan-agent-heartbeat.queue.ts +111 -83
- package/src/queues/plan-scheduler.queue.ts +101 -97
- package/src/queues/post-chat-memory.queue.ts +56 -46
- package/src/queues/queue-factory.ts +146 -69
- package/src/queues/queues.service.ts +61 -0
- package/src/queues/title-generation.queue.ts +44 -44
- package/src/redis/connection.ts +181 -164
- package/src/redis/org-memory-lock.ts +24 -9
- package/src/redis/redis-lease-lock.ts +8 -1
- package/src/redis/stream-context.ts +17 -9
- package/src/runtime/agent-identity-overrides.ts +7 -3
- package/src/runtime/agent-runtime-policy.ts +10 -5
- package/src/runtime/agent-stream-helpers.ts +24 -15
- package/src/runtime/chat-run-orchestration.ts +1 -1
- package/src/runtime/context-compaction/context-compaction-runtime.ts +28 -32
- package/src/runtime/context-compaction/context-compaction.ts +131 -85
- package/src/runtime/domain-layer.ts +203 -0
- package/src/runtime/execution-plan-visibility.ts +5 -2
- package/src/runtime/graph-designer.ts +0 -14
- package/src/runtime/helper-model.ts +8 -4
- package/src/runtime/index.ts +1 -1
- package/src/runtime/indexed-repositories-policy.ts +2 -6
- package/src/runtime/memory/memory-block.ts +19 -9
- package/src/runtime/memory/memory-pipeline.ts +53 -66
- package/src/runtime/memory/memory-scope.ts +33 -29
- package/src/runtime/plugin-resolution.ts +58 -62
- package/src/runtime/post-turn-side-effects.ts +139 -161
- package/src/runtime/retrieval-adapters.ts +4 -4
- package/src/runtime/runtime-config.ts +3 -9
- package/src/runtime/runtime-extensions.ts +0 -43
- package/src/runtime/runtime-lifecycle.ts +124 -0
- package/src/runtime/runtime-services.ts +455 -0
- package/src/runtime/runtime-worker-registry.ts +113 -30
- package/src/runtime/social-chat/social-chat-agent-runner.ts +13 -8
- package/src/runtime/social-chat/social-chat-history.ts +24 -13
- package/src/runtime/social-chat/social-chat.ts +420 -369
- package/src/runtime/team-consultation/team-consultation-orchestrator.ts +64 -57
- package/src/runtime/team-consultation/team-consultation-prompts.ts +11 -6
- package/src/runtime/thread-chat-helpers.ts +18 -9
- package/src/runtime/thread-turn-context.ts +28 -74
- package/src/runtime/turn-lifecycle.ts +6 -14
- package/src/services/agent-activity.service.ts +169 -176
- package/src/services/agent-executor.service.ts +207 -196
- package/src/services/artifact.service.ts +10 -5
- package/src/services/attachment.service.ts +16 -48
- package/src/services/autonomous-job.service.ts +81 -87
- package/src/services/background-work.service.ts +54 -0
- package/src/services/chat-run-registry.service.ts +3 -1
- package/src/services/context-compaction.service.ts +8 -10
- package/src/services/document-chunk.service.ts +8 -17
- package/src/services/execution-plan/execution-plan-graph.ts +122 -109
- package/src/services/execution-plan/execution-plan-schedule.ts +1 -15
- package/src/services/execution-plan/execution-plan.service.ts +68 -51
- package/src/services/feedback-loop.service.ts +1 -1
- package/src/services/global-orchestrator.service.ts +49 -15
- package/src/services/graph-full-routing.ts +49 -37
- package/src/services/index.ts +1 -0
- package/src/services/institutional-memory.service.ts +8 -17
- package/src/services/learned-skill.service.ts +38 -35
- package/src/services/memory/memory-conversation.ts +10 -5
- package/src/services/memory/memory-errors.ts +27 -0
- package/src/services/memory/memory-org-memory.ts +14 -3
- package/src/services/memory/memory-preseeded.ts +10 -4
- package/src/services/memory/memory-utils.ts +2 -1
- package/src/services/memory/memory.service.ts +37 -52
- package/src/services/memory/rerank.service.ts +3 -11
- package/src/services/monitoring-window.service.ts +1 -1
- package/src/services/mutating-approval.service.ts +1 -1
- package/src/services/node-workspace.service.ts +2 -2
- package/src/services/notification.service.ts +16 -4
- package/src/services/organization-member.service.ts +1 -1
- package/src/services/organization.service.ts +34 -51
- package/src/services/ownership-dispatcher.service.ts +148 -95
- package/src/services/plan/plan-agent-heartbeat.service.ts +30 -16
- package/src/services/plan/plan-agent-query.service.ts +13 -9
- package/src/services/plan/plan-approval.service.ts +52 -48
- package/src/services/plan/plan-artifact.service.ts +2 -2
- package/src/services/plan/plan-builder.service.ts +2 -2
- package/src/services/plan/plan-checkpoint.service.ts +1 -1
- package/src/services/plan/plan-compiler.service.ts +1 -1
- package/src/services/plan/plan-completion-side-effects.ts +99 -113
- package/src/services/plan/plan-coordination.service.ts +1 -1
- package/src/services/plan/plan-cycle.service.ts +171 -202
- package/src/services/plan/plan-deadline.service.ts +304 -307
- package/src/services/plan/plan-event-delivery.service.ts +84 -72
- package/src/services/plan/plan-executor-context.ts +2 -0
- package/src/services/plan/plan-executor-graph.ts +375 -353
- package/src/services/plan/plan-executor-helpers.ts +60 -75
- package/src/services/plan/plan-executor.service.ts +494 -489
- package/src/services/plan/plan-run.service.ts +12 -19
- package/src/services/plan/plan-scheduler.service.ts +89 -82
- package/src/services/plan/plan-template.service.ts +1 -1
- package/src/services/plan/plan-transaction-events.ts +8 -5
- package/src/services/plan/plan-validator.service.ts +1 -1
- package/src/services/plan/plan-workspace.service.ts +17 -11
- package/src/services/plugin-executor.service.ts +26 -21
- package/src/services/quality-metrics.service.ts +1 -1
- package/src/services/queue-job.service.ts +8 -17
- package/src/services/recent-activity-title.service.ts +22 -10
- package/src/services/recent-activity.service.ts +1 -1
- package/src/services/skill-resolver.service.ts +1 -1
- package/src/services/social-chat-history.service.ts +37 -20
- package/src/services/system-executor.service.ts +25 -20
- package/src/services/thread/thread-bootstrap.ts +37 -19
- package/src/services/thread/thread-listing.ts +2 -1
- package/src/services/thread/thread-memory-block.ts +18 -5
- package/src/services/thread/thread-message.service.ts +30 -13
- package/src/services/thread/thread-title.service.ts +1 -1
- package/src/services/thread/thread-turn-execution.ts +87 -83
- package/src/services/thread/thread-turn-preparation.service.ts +65 -40
- package/src/services/thread/thread-turn-streaming.ts +32 -36
- package/src/services/thread/thread-turn.ts +43 -29
- package/src/services/thread/thread.service.ts +32 -8
- package/src/services/user.service.ts +1 -1
- package/src/services/write-intent-validator.service.ts +1 -1
- package/src/storage/attachment-storage.service.ts +7 -4
- package/src/storage/generated-document-storage.service.ts +1 -1
- package/src/system-agents/context-compaction.agent.ts +1 -1
- package/src/system-agents/helper-agent-options.ts +1 -1
- package/src/system-agents/memory-reranker.agent.ts +1 -1
- package/src/system-agents/memory.agent.ts +1 -1
- package/src/system-agents/recent-activity-title-refiner.agent.ts +9 -6
- package/src/system-agents/regular-chat-memory-digest.agent.ts +1 -1
- package/src/system-agents/skill-extractor.agent.ts +1 -1
- package/src/system-agents/skill-manager.agent.ts +1 -1
- package/src/system-agents/thread-router.agent.ts +23 -20
- package/src/system-agents/title-generator.agent.ts +1 -1
- package/src/tools/execution-plan.tool.ts +36 -20
- package/src/tools/fetch-webpage.tool.ts +30 -22
- package/src/tools/firecrawl-client.ts +1 -6
- package/src/tools/plan-approval.tool.ts +9 -1
- package/src/tools/remember-memory.tool.ts +3 -6
- package/src/tools/research-topic.tool.ts +12 -3
- package/src/tools/search-web.tool.ts +26 -18
- package/src/tools/search.tool.ts +4 -5
- package/src/tools/team-think.tool.ts +139 -121
- package/src/utils/async.ts +15 -6
- package/src/utils/errors.ts +27 -15
- package/src/workers/bootstrap.ts +34 -58
- package/src/workers/memory-consolidation.worker.ts +4 -1
- package/src/workers/organization-learning.worker.ts +16 -3
- package/src/workers/regular-chat-memory-digest.helpers.ts +3 -4
- package/src/workers/regular-chat-memory-digest.runner.ts +46 -29
- package/src/workers/skill-extraction.runner.ts +13 -15
- package/src/workers/worker-utils.ts +14 -8
- package/src/config/search.ts +0 -3
- package/src/effect/awaitable-effect.ts +0 -87
- package/src/effect/runtime-ref.ts +0 -25
- package/src/effect/runtime.ts +0 -31
- package/src/redis/runtime-connection.ts +0 -10
- package/src/runtime/agent-types.ts +0 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Normalization helpers for SurrealDB service inputs.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `catch` handler and surfaced as typed `SurrealDBError` failures.
|
|
8
|
-
* Do not call these outside an Effect error boundary.
|
|
4
|
+
* Helpers that can fail return `Effect<T, SurrealDBError>` so callers can
|
|
5
|
+
* `yield*` them inside `Effect.gen` and use `catchTag('SurrealDBError')`
|
|
6
|
+
* without losing the typed failure channel.
|
|
9
7
|
*/
|
|
10
|
-
import { Schema } from 'effect'
|
|
8
|
+
import { Effect, Schema } from 'effect'
|
|
11
9
|
import { BoundQuery, RecordId, StringRecordId, Table, and, eq } from 'surrealdb'
|
|
12
10
|
import type { ExprLike, Mutation } from 'surrealdb'
|
|
13
11
|
import type { z } from 'zod'
|
|
@@ -29,6 +27,20 @@ type TransactionQueryDescriptor = { query: string; bindings?: Record<string, unk
|
|
|
29
27
|
|
|
30
28
|
type ParseSchema = <TSchema extends z.ZodTypeAny>(schema: TSchema, value: unknown) => z.infer<TSchema>
|
|
31
29
|
|
|
30
|
+
function isSurrealDBError(error: unknown): error is SurrealDBError {
|
|
31
|
+
return isRecord(error) && error._tag === 'SurrealDBError'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function toSurrealDBError(error: unknown, fallbackMessage: string): SurrealDBError {
|
|
35
|
+
if (isSurrealDBError(error)) {
|
|
36
|
+
return error
|
|
37
|
+
}
|
|
38
|
+
if (error instanceof Error) {
|
|
39
|
+
return new SurrealDBError({ message: `${fallbackMessage}: ${error.message}`, cause: error })
|
|
40
|
+
}
|
|
41
|
+
return new SurrealDBError({ message: fallbackMessage })
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
function isExplicitRecordIdValue(value: unknown): value is RecordIdInput {
|
|
33
45
|
if (value instanceof RecordId || value instanceof StringRecordId) {
|
|
34
46
|
return true
|
|
@@ -65,35 +77,38 @@ function isTransactionQueryDescriptor(value: unknown): value is TransactionQuery
|
|
|
65
77
|
return isRecord(value) && typeof value.query === 'string'
|
|
66
78
|
}
|
|
67
79
|
|
|
68
|
-
export function normalizeTransactionRecordId(value: unknown, context: string): RecordId {
|
|
80
|
+
export function normalizeTransactionRecordId(value: unknown, context: string): Effect.Effect<RecordId, SurrealDBError> {
|
|
69
81
|
if (!isRecordIdInput(value)) {
|
|
70
|
-
|
|
82
|
+
return Effect.fail(new SurrealDBError({ message: `Invalid record id for ${context}` }))
|
|
71
83
|
}
|
|
72
84
|
|
|
73
|
-
return
|
|
85
|
+
return Effect.try({
|
|
86
|
+
try: () => ensureRecordId(value),
|
|
87
|
+
catch: (error) => toSurrealDBError(error, `Invalid record id for ${context}`),
|
|
88
|
+
})
|
|
74
89
|
}
|
|
75
90
|
|
|
76
|
-
export function normalizeRecordIdForTable(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const recordId = ensureRecordId(id, table)
|
|
83
|
-
const resolvedTable = String(recordId.table)
|
|
84
|
-
if (resolvedTable !== table) {
|
|
85
|
-
throw new SurrealDBError({ message: `Record id table mismatch: expected "${table}" but got "${resolvedTable}"` })
|
|
86
|
-
}
|
|
87
|
-
return recordId
|
|
88
|
-
} catch (error) {
|
|
89
|
-
if (error instanceof SurrealDBError) {
|
|
90
|
-
throw error
|
|
91
|
-
}
|
|
92
|
-
if (error instanceof Error) {
|
|
93
|
-
throw new SurrealDBError({ message: `Invalid record id for table "${table}": ${error.message}`, cause: error })
|
|
94
|
-
}
|
|
95
|
-
throw new SurrealDBError({ message: `Invalid record id for table "${table}"` })
|
|
91
|
+
export function normalizeRecordIdForTable(
|
|
92
|
+
id: unknown,
|
|
93
|
+
table: DatabaseTable,
|
|
94
|
+
): Effect.Effect<ReturnType<typeof ensureRecordId>, SurrealDBError> {
|
|
95
|
+
if (!isRecordIdInput(id)) {
|
|
96
|
+
return Effect.fail(new SurrealDBError({ message: `Invalid record id for table "${table}"` }))
|
|
96
97
|
}
|
|
98
|
+
|
|
99
|
+
return Effect.try({
|
|
100
|
+
try: () => {
|
|
101
|
+
const recordId = ensureRecordId(id, table)
|
|
102
|
+
const resolvedTable = String(recordId.table)
|
|
103
|
+
if (resolvedTable !== table) {
|
|
104
|
+
throw new SurrealDBError({
|
|
105
|
+
message: `Record id table mismatch: expected "${table}" but got "${resolvedTable}"`,
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
return recordId
|
|
109
|
+
},
|
|
110
|
+
catch: (error) => toSurrealDBError(error, `Invalid record id for table "${table}"`),
|
|
111
|
+
})
|
|
97
112
|
}
|
|
98
113
|
|
|
99
114
|
export function normalizeSurrealValue(value: unknown): unknown {
|
|
@@ -137,10 +152,11 @@ export function normalizeQueryRows(
|
|
|
137
152
|
return schema ? [parseSchema(schema, statement)] : [statement]
|
|
138
153
|
}
|
|
139
154
|
|
|
140
|
-
export function assertValidIdentifier(name: string, context: string): void {
|
|
155
|
+
export function assertValidIdentifier(name: string, context: string): Effect.Effect<void, SurrealDBError> {
|
|
141
156
|
if (!/^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*$/.test(name)) {
|
|
142
|
-
|
|
157
|
+
return Effect.fail(new SurrealDBError({ message: `Invalid ${context}: "${name}"` }))
|
|
143
158
|
}
|
|
159
|
+
return Effect.void
|
|
144
160
|
}
|
|
145
161
|
|
|
146
162
|
export function buildFilterExpression(filter: Record<string, unknown>): ExprLike | undefined {
|
|
@@ -157,54 +173,68 @@ export function buildFilterExpression(filter: Record<string, unknown>): ExprLike
|
|
|
157
173
|
return and(...expressions)
|
|
158
174
|
}
|
|
159
175
|
|
|
160
|
-
export function buildBoundFilterClauses(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
} {
|
|
176
|
+
export function buildBoundFilterClauses(
|
|
177
|
+
filter: Record<string, unknown>,
|
|
178
|
+
): Effect.Effect<{ clause: string; bindings: Record<string, unknown> }, SurrealDBError> {
|
|
164
179
|
const entries = Object.entries(filter)
|
|
165
180
|
if (entries.length === 0) {
|
|
166
|
-
|
|
181
|
+
return Effect.fail(new SurrealDBError({ message: 'Expected a non-empty filter' }))
|
|
167
182
|
}
|
|
168
183
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
184
|
+
return Effect.gen(function* () {
|
|
185
|
+
const bindings: Record<string, unknown> = {}
|
|
186
|
+
const clauses: string[] = []
|
|
187
|
+
for (let index = 0; index < entries.length; index++) {
|
|
188
|
+
const [field, value] = entries[index]
|
|
189
|
+
yield* assertValidIdentifier(field, 'filter field')
|
|
190
|
+
|
|
191
|
+
const bindingKey = `filter_${index}`
|
|
192
|
+
bindings[bindingKey] = yield* Effect.try({
|
|
193
|
+
try: () => normalizeSurrealValue(value),
|
|
194
|
+
catch: (error) => toSurrealDBError(error, `Invalid filter value for field "${field}"`),
|
|
195
|
+
})
|
|
196
|
+
clauses.push(`${field} = $${bindingKey}`)
|
|
197
|
+
}
|
|
172
198
|
|
|
173
|
-
|
|
174
|
-
bindings[bindingKey] = normalizeSurrealValue(value)
|
|
175
|
-
return `${field} = $${bindingKey}`
|
|
199
|
+
return { clause: clauses.join(' AND '), bindings }
|
|
176
200
|
})
|
|
177
|
-
|
|
178
|
-
return { clause: clauses.join(' AND '), bindings }
|
|
179
201
|
}
|
|
180
202
|
|
|
181
|
-
export function normalizeBoundQuery<T extends unknown[] = unknown[]>(
|
|
182
|
-
|
|
203
|
+
export function normalizeBoundQuery<T extends unknown[] = unknown[]>(
|
|
204
|
+
query: BoundQuery<T>,
|
|
205
|
+
): Effect.Effect<BoundQuery<T>, SurrealDBError> {
|
|
206
|
+
return Effect.map(normalizeBindings(query.bindings), (bindings) => new BoundQuery<T>(query.query, bindings))
|
|
183
207
|
}
|
|
184
208
|
|
|
185
|
-
export function normalizeTransactionQuery(query: unknown): BoundQuery {
|
|
209
|
+
export function normalizeTransactionQuery(query: unknown): Effect.Effect<BoundQuery, SurrealDBError> {
|
|
186
210
|
if (query instanceof BoundQuery) {
|
|
187
|
-
return new BoundQuery(query.query,
|
|
211
|
+
return Effect.map(normalizeBindings(query.bindings), (bindings) => new BoundQuery(query.query, bindings))
|
|
188
212
|
}
|
|
189
213
|
|
|
190
214
|
if (isTransactionQueryDescriptor(query)) {
|
|
191
|
-
return new BoundQuery(query.query,
|
|
215
|
+
return Effect.map(normalizeBindings(query.bindings), (bindings) => new BoundQuery(query.query, bindings))
|
|
192
216
|
}
|
|
193
217
|
|
|
194
|
-
|
|
218
|
+
return Effect.fail(new SurrealDBError({ message: 'Invalid transaction query' }))
|
|
195
219
|
}
|
|
196
220
|
|
|
197
|
-
function normalizeBindings(
|
|
221
|
+
function normalizeBindings(
|
|
222
|
+
bindings?: Record<string, unknown>,
|
|
223
|
+
): Effect.Effect<Record<string, unknown> | undefined, SurrealDBError> {
|
|
198
224
|
if (!bindings) {
|
|
199
|
-
return undefined
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const normalized = normalizeSurrealValue(bindings)
|
|
203
|
-
if (!isRecord(normalized)) {
|
|
204
|
-
throw new SurrealDBError({ message: 'Invalid bindings value' })
|
|
225
|
+
return Effect.void as Effect.Effect<undefined, SurrealDBError>
|
|
205
226
|
}
|
|
206
227
|
|
|
207
|
-
return
|
|
228
|
+
return Effect.try({
|
|
229
|
+
try: () => {
|
|
230
|
+
const normalized = normalizeSurrealValue(bindings)
|
|
231
|
+
if (!isRecord(normalized)) {
|
|
232
|
+
throw new SurrealDBError({ message: 'Invalid bindings value' })
|
|
233
|
+
}
|
|
234
|
+
return normalized
|
|
235
|
+
},
|
|
236
|
+
catch: (error) => toSurrealDBError(error, 'Invalid bindings value'),
|
|
237
|
+
})
|
|
208
238
|
}
|
|
209
239
|
|
|
210
240
|
export function normalizeMutationData(data: Record<string, unknown>): Record<string, unknown> {
|
|
@@ -215,24 +245,27 @@ export function normalizeMutationData(data: Record<string, unknown>): Record<str
|
|
|
215
245
|
)
|
|
216
246
|
}
|
|
217
247
|
|
|
218
|
-
export function normalizeTableValue(value: unknown): Table<string> {
|
|
248
|
+
export function normalizeTableValue(value: unknown): Effect.Effect<Table<string>, SurrealDBError> {
|
|
219
249
|
if (value instanceof Table) {
|
|
220
|
-
return new Table<string>(value.name as string)
|
|
250
|
+
return Effect.succeed(new Table<string>(value.name as string))
|
|
221
251
|
}
|
|
222
252
|
|
|
223
253
|
if (typeof value === 'string' && value.length > 0) {
|
|
224
|
-
return new Table(value)
|
|
254
|
+
return Effect.succeed(new Table(value))
|
|
225
255
|
}
|
|
226
256
|
|
|
227
|
-
|
|
257
|
+
return Effect.fail(new SurrealDBError({ message: 'Invalid table value' }))
|
|
228
258
|
}
|
|
229
259
|
|
|
230
|
-
export function normalizeCreateTarget(value: unknown): Table<string> | RecordId {
|
|
260
|
+
export function normalizeCreateTarget(value: unknown): Effect.Effect<Table<string> | RecordId, SurrealDBError> {
|
|
231
261
|
if (
|
|
232
262
|
isExplicitRecordIdValue(value) ||
|
|
233
263
|
(typeof value === 'string' && isRecordIdInput(value) && /^[A-Za-z_][A-Za-z0-9_]*:/.test(value))
|
|
234
264
|
) {
|
|
235
|
-
return
|
|
265
|
+
return Effect.try({
|
|
266
|
+
try: () => ensureRecordId(value),
|
|
267
|
+
catch: (error) => toSurrealDBError(error, 'Invalid record id'),
|
|
268
|
+
})
|
|
236
269
|
}
|
|
237
270
|
|
|
238
271
|
return normalizeTableValue(value)
|