@sixb/sqlite 0.1.11 → 0.1.13
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/README.md +32 -0
- package/dist/agents/rows.d.ts +2 -0
- package/dist/agents/rows.d.ts.map +1 -1
- package/dist/agents/threads.d.ts +2 -1
- package/dist/agents/threads.d.ts.map +1 -1
- package/dist/auth-storage/access-tokens.d.ts +0 -1
- package/dist/auth-storage/access-tokens.d.ts.map +1 -1
- package/dist/auth-storage/auth-storage.d.ts.map +1 -1
- package/dist/auth-storage/device-authorizations.d.ts.map +1 -1
- package/dist/auth-storage/rows.d.ts +6 -3
- package/dist/auth-storage/rows.d.ts.map +1 -1
- package/dist/auth-storage/sessions.d.ts +8 -1
- package/dist/auth-storage/sessions.d.ts.map +1 -1
- package/dist/auth-storage/shared.d.ts.map +1 -1
- package/dist/file-upload-session-storage.d.ts +6 -0
- package/dist/file-upload-session-storage.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1062 -137
- package/dist/index.js.map +28 -23
- package/dist/migrations.d.ts.map +1 -1
- package/dist/objects/query-compiler.d.ts +9 -2
- package/dist/objects/query-compiler.d.ts.map +1 -1
- package/dist/objects/read-scope.d.ts +3 -0
- package/dist/objects/read-scope.d.ts.map +1 -1
- package/dist/objects/reader.d.ts +1 -0
- package/dist/objects/reader.d.ts.map +1 -1
- package/dist/objects/rows.d.ts +1 -0
- package/dist/objects/rows.d.ts.map +1 -1
- package/dist/objects/storage.d.ts.map +1 -1
- package/dist/objects/vector-extension.d.ts +4 -0
- package/dist/objects/vector-extension.d.ts.map +1 -0
- package/dist/ontology-storage/index.d.ts +4 -0
- package/dist/ontology-storage/index.d.ts.map +1 -1
- package/dist/ontology-storage/materializations.d.ts +1 -2
- package/dist/ontology-storage/materializations.d.ts.map +1 -1
- package/dist/ontology-storage/shared.d.ts +2 -1
- package/dist/ontology-storage/shared.d.ts.map +1 -1
- package/dist/ontology-storage/vector-indexing.d.ts +20 -0
- package/dist/ontology-storage/vector-indexing.d.ts.map +1 -0
- package/dist/ontology-storage/vectors.d.ts +16 -0
- package/dist/ontology-storage/vectors.d.ts.map +1 -0
- package/dist/vector-encoding.d.ts +3 -0
- package/dist/vector-encoding.d.ts.map +1 -0
- package/dist/workflow-intervention-storage.d.ts.map +1 -1
- package/package.json +8 -4
- package/src/agents/rows.ts +12 -0
- package/src/agents/threads.ts +41 -2
- package/src/ai-cost-storage.ts +4 -0
- package/src/auth-storage/access-tokens.ts +11 -18
- package/src/auth-storage/auth-storage.ts +5 -7
- package/src/auth-storage/device-authorizations.ts +3 -5
- package/src/auth-storage/rows.ts +17 -7
- package/src/auth-storage/sessions.ts +89 -4
- package/src/auth-storage/shared.ts +9 -3
- package/src/file-upload-session-storage.ts +136 -0
- package/src/index.ts +5 -0
- package/src/migrations/041-agent-thread-workspaces.sql +2 -0
- package/src/migrations/042-vector-profiles.sql +21 -0
- package/src/migrations/043-vector-indexing.sql +197 -0
- package/src/migrations/044-vector-batching.sql +3 -0
- package/src/migrations/045-agent-thread-sandbox-state.sql +2 -0
- package/src/migrations/046-workflow-intervention-principals.sql +15 -0
- package/src/migrations/047-ontology-commit-attribution.sql +67 -0
- package/src/migrations/048-file-upload-sessions.sql +35 -0
- package/src/migrations/049-native-sessions.sql +12 -0
- package/src/migrations.ts +26 -0
- package/src/objects/query-compiler.ts +164 -11
- package/src/objects/read-scope.ts +34 -31
- package/src/objects/reader.ts +29 -1
- package/src/objects/rows.ts +5 -1
- package/src/objects/storage.ts +13 -1
- package/src/objects/vector-extension.ts +26 -0
- package/src/ontology-storage/index.ts +16 -0
- package/src/ontology-storage/materializations.ts +29 -59
- package/src/ontology-storage/shared.ts +7 -3
- package/src/ontology-storage/vector-indexing.ts +196 -0
- package/src/ontology-storage/vectors.ts +182 -0
- package/src/vector-encoding.ts +9 -0
- package/src/workflow-intervention-storage.ts +9 -9
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
ExpireWorkflowInterventionInput,
|
|
7
7
|
ListWorkflowInterventionsInput,
|
|
8
8
|
ListWorkflowInterventionsResult,
|
|
9
|
+
Principal,
|
|
9
10
|
SubmitWorkflowInterventionInput,
|
|
10
|
-
WorkflowInterventionActor,
|
|
11
11
|
WorkflowInterventionRecord,
|
|
12
12
|
WorkflowInterventionStorage,
|
|
13
13
|
} from "@sixb/core/storage"
|
|
@@ -113,7 +113,7 @@ export class SqliteWorkflowInterventionStorage implements WorkflowInterventionSt
|
|
|
113
113
|
.run(
|
|
114
114
|
"submitted",
|
|
115
115
|
(input.submittedAt ?? new Date()).toISOString(),
|
|
116
|
-
|
|
116
|
+
serializePrincipal(input.submittedBy),
|
|
117
117
|
serializeRecord(input.response),
|
|
118
118
|
existing.project_id,
|
|
119
119
|
existing.id
|
|
@@ -141,7 +141,7 @@ export class SqliteWorkflowInterventionStorage implements WorkflowInterventionSt
|
|
|
141
141
|
.run(
|
|
142
142
|
"cancelled",
|
|
143
143
|
(input.cancelledAt ?? new Date()).toISOString(),
|
|
144
|
-
|
|
144
|
+
serializePrincipal(input.cancelledBy),
|
|
145
145
|
existing.project_id,
|
|
146
146
|
existing.id
|
|
147
147
|
)
|
|
@@ -331,12 +331,12 @@ function parseRecord(value: string): WorkflowIOSnapshot {
|
|
|
331
331
|
return JSON.parse(value) as WorkflowIOSnapshot
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
function
|
|
335
|
-
return
|
|
334
|
+
function serializePrincipal(principal: Principal | undefined): string | null {
|
|
335
|
+
return principal ? JSON.stringify(principal) : null
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
function
|
|
339
|
-
return value ? (JSON.parse(value) as
|
|
338
|
+
function parsePrincipal(value: string | null): Principal | undefined {
|
|
339
|
+
return value ? (JSON.parse(value) as Principal) : undefined
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
function rowToWorkflowInterventionRecord(
|
|
@@ -358,10 +358,10 @@ function rowToWorkflowInterventionRecord(
|
|
|
358
358
|
requestedAt: new Date(row.requested_at),
|
|
359
359
|
expiresAt: row.expires_at ? new Date(row.expires_at) : undefined,
|
|
360
360
|
submittedAt: row.submitted_at ? new Date(row.submitted_at) : undefined,
|
|
361
|
-
submittedBy:
|
|
361
|
+
submittedBy: parsePrincipal(row.submitted_by),
|
|
362
362
|
response: row.response ? parseRecord(row.response) : undefined,
|
|
363
363
|
cancelledAt: row.cancelled_at ? new Date(row.cancelled_at) : undefined,
|
|
364
|
-
cancelledBy:
|
|
364
|
+
cancelledBy: parsePrincipal(row.cancelled_by),
|
|
365
365
|
expiredAt: row.expired_at ? new Date(row.expired_at) : undefined,
|
|
366
366
|
}
|
|
367
367
|
}
|