@sixb/sqlite 0.1.6 → 0.1.8

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 (91) hide show
  1. package/dist/agents/rows.d.ts +7 -4
  2. package/dist/agents/rows.d.ts.map +1 -1
  3. package/dist/agents/runs.d.ts +3 -2
  4. package/dist/agents/runs.d.ts.map +1 -1
  5. package/dist/agents/threads.d.ts.map +1 -1
  6. package/dist/ai-cost-groups.d.ts +5 -0
  7. package/dist/ai-cost-groups.d.ts.map +1 -0
  8. package/dist/ai-cost-storage.d.ts +2 -1
  9. package/dist/ai-cost-storage.d.ts.map +1 -1
  10. package/dist/ai-limit-storage.d.ts +35 -0
  11. package/dist/ai-limit-storage.d.ts.map +1 -0
  12. package/dist/ai-usage-storage.d.ts +1 -0
  13. package/dist/ai-usage-storage.d.ts.map +1 -1
  14. package/dist/auth-storage/access-tokens.d.ts +1 -1
  15. package/dist/auth-storage/access-tokens.d.ts.map +1 -1
  16. package/dist/auth-storage/auth-storage.d.ts +4 -1
  17. package/dist/auth-storage/auth-storage.d.ts.map +1 -1
  18. package/dist/auth-storage/device-authorizations.d.ts +29 -0
  19. package/dist/auth-storage/device-authorizations.d.ts.map +1 -0
  20. package/dist/auth-storage/rows.d.ts +19 -1
  21. package/dist/auth-storage/rows.d.ts.map +1 -1
  22. package/dist/auth-storage/shared.d.ts +1 -1
  23. package/dist/auth-storage/shared.d.ts.map +1 -1
  24. package/dist/execution-storage.d.ts +3 -2
  25. package/dist/execution-storage.d.ts.map +1 -1
  26. package/dist/index.d.ts +4 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +3443 -789
  29. package/dist/index.js.map +29 -20
  30. package/dist/migrations.d.ts.map +1 -1
  31. package/dist/objects/index.d.ts +3 -0
  32. package/dist/objects/index.d.ts.map +1 -0
  33. package/dist/{object-query-compiler.d.ts → objects/query-compiler.d.ts} +16 -1
  34. package/dist/objects/query-compiler.d.ts.map +1 -0
  35. package/dist/objects/read-scope.d.ts +17 -0
  36. package/dist/objects/read-scope.d.ts.map +1 -0
  37. package/dist/objects/reader.d.ts +51 -0
  38. package/dist/objects/reader.d.ts.map +1 -0
  39. package/dist/objects/rows.d.ts +33 -0
  40. package/dist/objects/rows.d.ts.map +1 -0
  41. package/dist/objects/selected-reader.d.ts +9 -0
  42. package/dist/objects/selected-reader.d.ts.map +1 -0
  43. package/dist/{object-storage.d.ts → objects/storage.d.ts} +12 -9
  44. package/dist/objects/storage.d.ts.map +1 -0
  45. package/dist/share-grant-storage.d.ts +20 -0
  46. package/dist/share-grant-storage.d.ts.map +1 -0
  47. package/dist/share-session-storage.d.ts +19 -0
  48. package/dist/share-session-storage.d.ts.map +1 -0
  49. package/dist/storage-errors.d.ts +1 -0
  50. package/dist/storage-errors.d.ts.map +1 -1
  51. package/dist/transactions.d.ts +8 -0
  52. package/dist/transactions.d.ts.map +1 -1
  53. package/package.json +3 -3
  54. package/src/agents/rows.ts +36 -9
  55. package/src/agents/runs.ts +152 -13
  56. package/src/agents/threads.ts +2 -17
  57. package/src/ai-cost-groups.ts +100 -0
  58. package/src/ai-cost-storage.ts +67 -25
  59. package/src/ai-limit-storage.ts +981 -0
  60. package/src/ai-usage-storage.ts +24 -1
  61. package/src/auth-storage/access-tokens.ts +77 -68
  62. package/src/auth-storage/auth-storage.ts +80 -1
  63. package/src/auth-storage/device-authorizations.ts +153 -0
  64. package/src/auth-storage/rows.ts +41 -0
  65. package/src/auth-storage/shared.ts +1 -0
  66. package/src/execution-storage.ts +22 -3
  67. package/src/index.ts +24 -3
  68. package/src/migrations/029-model-accounting.sql +79 -0
  69. package/src/migrations/030-ai-usage-limits.sql +100 -0
  70. package/src/migrations/031-subagent-runs.sql +231 -0
  71. package/src/migrations/032-conversation-run-spec.sql +78 -0
  72. package/src/migrations/033-retire-agent-definitions.sql +89 -0
  73. package/src/migrations/034-device-authorizations.sql +22 -0
  74. package/src/migrations/035-share-grants.sql +66 -0
  75. package/src/migrations/036-share-sessions.sql +226 -0
  76. package/src/migrations.ts +22 -0
  77. package/src/objects/index.ts +2 -0
  78. package/src/{object-query-compiler.ts → objects/query-compiler.ts} +104 -54
  79. package/src/objects/read-scope.ts +316 -0
  80. package/src/objects/reader.ts +526 -0
  81. package/src/objects/rows.ts +123 -0
  82. package/src/objects/selected-reader.ts +119 -0
  83. package/src/objects/storage.ts +296 -0
  84. package/src/share-grant-storage.ts +252 -0
  85. package/src/share-session-storage.ts +189 -0
  86. package/src/storage-errors.ts +4 -0
  87. package/src/transactions.ts +32 -0
  88. package/src/workflow-run-storage.ts +8 -8
  89. package/dist/object-query-compiler.d.ts.map +0 -1
  90. package/dist/object-storage.d.ts.map +0 -1
  91. package/src/object-storage.ts +0 -709
@@ -0,0 +1,189 @@
1
+ import type { Database } from "bun:sqlite"
2
+ import {
3
+ normalizeGetShareSessionByIdInput,
4
+ normalizeRenewShareSessionIfValidInput,
5
+ normalizeRevokeShareSessionInput,
6
+ normalizeShareSessionCreate,
7
+ parseShareSessionRecord,
8
+ } from "@sixb/core/internal/share-session-storage-provider"
9
+ import type {
10
+ CreateShareSessionInput,
11
+ GetShareSessionByIdInput,
12
+ RenewShareSessionIfValidInput,
13
+ RevokeShareSessionInput,
14
+ ShareSessionRecord,
15
+ ShareSessionStorage,
16
+ } from "@sixb/core/storage"
17
+ import { ShareSessionStorageError } from "@sixb/core/storage"
18
+ import { installFreshSqliteSchema } from "./migrations"
19
+ import { isForeignKeyConstraintError, isUniqueConstraintError } from "./storage-errors"
20
+ import {
21
+ closeSqliteStoreConnection,
22
+ openSqliteStoreConnection,
23
+ type SqliteStoreConnection,
24
+ } from "./transactions"
25
+
26
+ export interface SqliteShareSessionStorageOptions {
27
+ readonly path?: string
28
+ readonly connection?: SqliteStoreConnection
29
+ }
30
+
31
+ /** SQLite persistence for short-lived Share access sessions. */
32
+ export class SqliteShareSessionStorage implements ShareSessionStorage {
33
+ private readonly connection: SqliteStoreConnection
34
+ private readonly db: Database
35
+
36
+ constructor(options: SqliteShareSessionStorageOptions = {}) {
37
+ this.connection = openSqliteStoreConnection(options)
38
+ this.db = this.connection.db
39
+ if (this.connection.installFreshSchema) installFreshSqliteSchema(this.db)
40
+ }
41
+
42
+ async create(input: CreateShareSessionInput): Promise<ShareSessionRecord> {
43
+ const record = normalizeShareSessionCreate(input)
44
+ try {
45
+ const row = this.db
46
+ .query(
47
+ `
48
+ INSERT INTO share_sessions (
49
+ project_id, id, grant_id, token_hash, created_at, expires_at,
50
+ absolute_expires_at
51
+ ) VALUES (?, ?, ?, ?, ?, ?, ?)
52
+ RETURNING *
53
+ `
54
+ )
55
+ .get(
56
+ record.projectId,
57
+ record.id,
58
+ record.grantId,
59
+ record.tokenHash,
60
+ record.createdAt.toISOString(),
61
+ record.expiresAt.toISOString(),
62
+ record.absoluteExpiresAt.toISOString()
63
+ ) as SqliteShareSessionRow | null
64
+ if (!row) throw invalidRecord(`Share session '${record.id}' disappeared after create.`)
65
+ return rowToRecord(row)
66
+ } catch (error) {
67
+ if (isUniqueConstraintError(error)) {
68
+ throw new ShareSessionStorageError(
69
+ "duplicate",
70
+ `[SixbSqlite] Share session '${record.id}' conflicts with an existing record.`,
71
+ { cause: error }
72
+ )
73
+ }
74
+ if (isForeignKeyConstraintError(error)) {
75
+ throw new ShareSessionStorageError(
76
+ "invalid_input",
77
+ `[SixbSqlite] Share grant '${record.grantId}' does not exist in project '${record.projectId}'.`,
78
+ { cause: error }
79
+ )
80
+ }
81
+ throw error
82
+ }
83
+ }
84
+
85
+ async getById(input: GetShareSessionByIdInput): Promise<ShareSessionRecord | null> {
86
+ const normalized = normalizeGetShareSessionByIdInput(input)
87
+ return this.getRow(normalized.projectId, normalized.id)
88
+ }
89
+
90
+ async renewIfValid(input: RenewShareSessionIfValidInput): Promise<ShareSessionRecord | null> {
91
+ const normalized = normalizeRenewShareSessionIfValidInput(input)
92
+ const requestedExpiry = normalized.expiresAt.toISOString()
93
+ const now = normalized.now.toISOString()
94
+ const row = this.db
95
+ .query(
96
+ `
97
+ UPDATE share_sessions
98
+ SET expires_at = CASE
99
+ WHEN ? > absolute_expires_at THEN absolute_expires_at
100
+ WHEN ? > expires_at THEN ?
101
+ ELSE expires_at
102
+ END
103
+ WHERE project_id = ?
104
+ AND id = ?
105
+ AND grant_id = ?
106
+ AND token_hash = ?
107
+ AND revoked_at IS NULL
108
+ AND created_at <= ?
109
+ AND expires_at > ?
110
+ AND absolute_expires_at > ?
111
+ RETURNING *
112
+ `
113
+ )
114
+ .get(
115
+ requestedExpiry,
116
+ requestedExpiry,
117
+ requestedExpiry,
118
+ normalized.projectId,
119
+ normalized.id,
120
+ normalized.grantId,
121
+ normalized.tokenHash,
122
+ now,
123
+ now,
124
+ now
125
+ ) as SqliteShareSessionRow | null
126
+ return row ? rowToRecord(row) : null
127
+ }
128
+
129
+ async revoke(input: RevokeShareSessionInput): Promise<ShareSessionRecord | null> {
130
+ const normalized = normalizeRevokeShareSessionInput(input)
131
+ const current = this.getRow(normalized.projectId, normalized.id)
132
+ if (!current || current.revokedAt) return current
133
+ const revocation = normalizeRevokeShareSessionInput(normalized, current.createdAt)
134
+ const row = this.db
135
+ .query(
136
+ `
137
+ UPDATE share_sessions
138
+ SET revoked_at = ?
139
+ WHERE project_id = ? AND id = ? AND revoked_at IS NULL
140
+ RETURNING *
141
+ `
142
+ )
143
+ .get(
144
+ revocation.revokedAt.toISOString(),
145
+ revocation.projectId,
146
+ revocation.id
147
+ ) as SqliteShareSessionRow | null
148
+ return row ? rowToRecord(row) : this.getRow(revocation.projectId, revocation.id)
149
+ }
150
+
151
+ close(): void {
152
+ closeSqliteStoreConnection(this.connection)
153
+ }
154
+
155
+ private getRow(projectId: string, id: string): ShareSessionRecord | null {
156
+ const row = this.db
157
+ .query("SELECT * FROM share_sessions WHERE project_id = ? AND id = ?")
158
+ .get(projectId, id) as SqliteShareSessionRow | null
159
+ return row ? rowToRecord(row) : null
160
+ }
161
+ }
162
+
163
+ interface SqliteShareSessionRow {
164
+ readonly project_id: unknown
165
+ readonly id: unknown
166
+ readonly grant_id: unknown
167
+ readonly token_hash: unknown
168
+ readonly created_at: unknown
169
+ readonly expires_at: unknown
170
+ readonly absolute_expires_at: unknown
171
+ readonly revoked_at: unknown
172
+ }
173
+
174
+ function rowToRecord(row: SqliteShareSessionRow): ShareSessionRecord {
175
+ return parseShareSessionRecord({
176
+ projectId: row.project_id,
177
+ id: row.id,
178
+ grantId: row.grant_id,
179
+ tokenHash: row.token_hash,
180
+ createdAt: row.created_at,
181
+ expiresAt: row.expires_at,
182
+ absoluteExpiresAt: row.absolute_expires_at,
183
+ ...(row.revoked_at === null ? {} : { revokedAt: row.revoked_at }),
184
+ })
185
+ }
186
+
187
+ function invalidRecord(message: string): ShareSessionStorageError {
188
+ return new ShareSessionStorageError("invalid_record", `[SixbSqlite] ${message}`)
189
+ }
@@ -1,3 +1,7 @@
1
1
  export function isUniqueConstraintError(error: unknown): boolean {
2
2
  return error instanceof Error && error.message.includes("UNIQUE constraint failed")
3
3
  }
4
+
5
+ export function isForeignKeyConstraintError(error: unknown): boolean {
6
+ return error instanceof Error && error.message.includes("FOREIGN KEY constraint failed")
7
+ }
@@ -45,6 +45,7 @@ export function closeSqliteStoreConnection(connection: SqliteStoreConnection): v
45
45
  }
46
46
 
47
47
  const activeImmediateTransactions = new WeakSet<Database>()
48
+ const activeDeferredReadTransactions = new WeakSet<Database>()
48
49
 
49
50
  export function runImmediateTransaction<T>(db: Database, run: () => T): T {
50
51
  if (activeImmediateTransactions.has(db)) {
@@ -94,6 +95,37 @@ export async function runImmediateTransactionAsync<T>(
94
95
  }
95
96
  }
96
97
 
98
+ /**
99
+ * Run a multi-statement read against one proven SQLite snapshot.
100
+ *
101
+ * A provider-owned immediate transaction already has a stable snapshot and may be reused. Any
102
+ * other pre-existing transaction is rejected because this provider cannot prove who owns it or
103
+ * which lifecycle will close it.
104
+ */
105
+ export function runDeferredReadTransaction<T>(db: Database, run: () => T): T {
106
+ if (activeImmediateTransactions.has(db) || activeDeferredReadTransactions.has(db)) {
107
+ return run()
108
+ }
109
+ if (db.inTransaction) {
110
+ throw new Error(
111
+ "[SixbSqlite] Selected object reads cannot join an unverified SQLite transaction."
112
+ )
113
+ }
114
+
115
+ db.run("BEGIN DEFERRED")
116
+ activeDeferredReadTransactions.add(db)
117
+ try {
118
+ const result = run()
119
+ db.run("COMMIT")
120
+ return result
121
+ } catch (error) {
122
+ rollbackQuietly(db)
123
+ throw error
124
+ } finally {
125
+ activeDeferredReadTransactions.delete(db)
126
+ }
127
+ }
128
+
97
129
  function rollbackQuietly(db: Database): void {
98
130
  try {
99
131
  db.run("ROLLBACK")
@@ -491,7 +491,7 @@ export class SqliteWorkflowAgentNodeRunStorage implements WorkflowAgentNodeRunSt
491
491
  projectId: input.projectId,
492
492
  executionId: input.executionId,
493
493
  nodeRunId: input.nodeRunId,
494
- agentId: input.agentId,
494
+ actorId: input.actorId,
495
495
  workflowExecutionId: parent.execution_id,
496
496
  })
497
497
 
@@ -499,14 +499,14 @@ export class SqliteWorkflowAgentNodeRunStorage implements WorkflowAgentNodeRunSt
499
499
  this.db
500
500
  .query(`
501
501
  INSERT INTO workflow_agent_node_runs (
502
- project_id, node_run_id, execution_id, agent_id, status, prompt, attempt, created_at
502
+ project_id, node_run_id, execution_id, actor_id, status, prompt, attempt, created_at
503
503
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
504
504
  `)
505
505
  .run(
506
506
  input.projectId,
507
507
  input.nodeRunId,
508
508
  input.executionId,
509
- input.agentId,
509
+ input.actorId,
510
510
  "queued",
511
511
  input.prompt,
512
512
  0,
@@ -659,9 +659,9 @@ export class SqliteWorkflowAgentNodeRunStorage implements WorkflowAgentNodeRunSt
659
659
  if (hasEmptyStatuses(input)) return { runs: [], total: 0, hasMore: false }
660
660
  const whereClauses = ["project_id = ?"]
661
661
  const args: SqliteValue[] = [input.projectId]
662
- if (input.agentId) {
663
- whereClauses.push("agent_id = ?")
664
- args.push(input.agentId)
662
+ if (input.actorId) {
663
+ whereClauses.push("actor_id = ?")
664
+ args.push(input.actorId)
665
665
  }
666
666
  appendRunListFilters(whereClauses, args, input)
667
667
  const result = queryRunList<WorkflowAgentNodeRunDatabaseRow>({
@@ -1073,7 +1073,7 @@ interface WorkflowAgentNodeRunDatabaseRow {
1073
1073
  project_id: string
1074
1074
  node_run_id: string
1075
1075
  execution_id: string
1076
- agent_id: string
1076
+ actor_id: string
1077
1077
  status: WorkflowAgentNodeRunRecord["status"]
1078
1078
  prompt: string
1079
1079
  model_id: string | null
@@ -1107,7 +1107,7 @@ function rowToWorkflowAgentNodeRunRecord(
1107
1107
  projectId: row.project_id,
1108
1108
  nodeRunId: row.node_run_id,
1109
1109
  executionId: row.execution_id,
1110
- agentId: row.agent_id,
1110
+ actorId: row.actor_id,
1111
1111
  status: row.status,
1112
1112
  prompt: row.prompt,
1113
1113
  ...(row.model_id ? { modelId: row.model_id } : {}),
@@ -1 +0,0 @@
1
- {"version":3,"file":"object-query-compiler.d.ts","sourceRoot":"","sources":["../src/object-query-compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAKjB,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AAEnE,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,WAAW,EAAE,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,WAAW,EAAE,CAAA;IACxB,KAAK,EAAE,aAAa,CAAA;IACpB,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,OAAO,CAAC,QAAQ,EA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