or3-provider-sqlite 0.0.11 → 0.0.12

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 CHANGED
@@ -127,19 +127,27 @@ OR3_CONNECT_PROVIDER=sqlite
127
127
 
128
128
  On server startup, the Nitro plugin:
129
129
 
130
- 1. Initializes the SQLite database (creates file if needed)
131
- 2. Runs schema migrations automatically
132
- 3. Registers `AuthWorkspaceStore` with ID `sqlite`
133
- 4. Registers `SyncGatewayAdapter` when SQLite sync is selected
134
- 5. Registers `ConnectStore` when SQLite Connect persistence is selected
135
- 6. Registers `WebhookStore` and the admin stores (workspace access, workspace
136
- settings, user search) — all runtimes except D1
137
- 7. Registers `RateLimitProvider` with ID `sqlite` and the sync admin adapter
138
- 8. Registers a durable `BackgroundJobProvider` with ID `sqlite`, so active chat
130
+ 1. Registers `AuthWorkspaceStore` with ID `sqlite`
131
+ 2. Registers `SyncGatewayAdapter` when SQLite conversation transfer is enabled
132
+ 3. Registers `ConnectStore` when SQLite Connect persistence is selected
133
+ 4. Registers `WebhookStore` on runtimes other than D1, and the admin store
134
+ provider (D1 declares server-side admin capabilities unavailable)
135
+ 5. Registers `RateLimitProvider` with ID `sqlite` and the sync admin adapter
136
+ 6. Registers a durable `BackgroundJobProvider` with ID `sqlite`, so active chat
139
137
  and workflow jobs remain addressable across Nitro HMR/module reloads
138
+ 7. Initializes the database and runs schema migrations eagerly on local
139
+ runtimes, or on the first Worker request for D1
140
140
 
141
- Registration is skipped when `auth.enabled` is `false`, or when neither SQLite
142
- sync, SQLite Connect, nor SQLite background jobs are selected (local-only mode).
141
+ Registration is skipped when `auth.enabled` is `false`, or when SQLite is not
142
+ selected for account workspaces, Connect or background jobs. Account workspaces
143
+ use `sync.provider` even with `sync.enabled=false`; disabling conversation
144
+ transfer does not disable the workspace store. The sync gateway remains
145
+ unregistered while transfer is disabled.
146
+
147
+ Workspace-only account storage requires `or3-provider-sqlite@0.0.12` or later.
148
+ Version `0.0.11` skips workspace-store registration when sync, Connect and
149
+ background jobs are all disabled, causing Chat to exit before listening.
150
+ Upgrade the provider; conversation transfer can remain disabled.
143
151
 
144
152
  SQLite background jobs also persist mixed-runtime tool handoffs. Browser-only
145
153
  calls are atomically claimed and settled in `execution_json`; parked calls are
@@ -254,7 +262,7 @@ bun run build # build for distribution
254
262
 
255
263
  ### Atomic workspace settings
256
264
 
257
- The workspace settings store implements `compareAndSet(workspaceId, key, expectedValue, nextValue)` atomically. A `null` expected value means the key must be absent; a conflict returns `false` without overwriting it. The host uses this for concurrent plugin setup saves and persistent AI spend reservations.
265
+ The workspace settings store implements `compareAndSet(workspaceId, key, expectedValue, nextValue)` atomically. A `null` expected value means the key must be absent; a conflict returns `false` without overwriting it. The host uses this for concurrent plugin setup saves, bulk plugin enablement and permission review, and persistent AI spend reservations. A provider without this operation cannot safely run a bulk plugin rollout. A slow plugin write may outlive the HTTP response: the host reports pending after eight seconds and keeps the plugin lock until the atomic operation settles.
258
266
 
259
267
 
260
268
  ### Testing local changes in OR3 Chat
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "or3-provider-sqlite",
3
3
  "configKey": "or3-provider-sqlite",
4
- "version": "0.0.11",
4
+ "version": "0.0.12",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -29,10 +29,12 @@ let d1RuntimeInitialization;
29
29
  export default defineNitroPlugin(async (nitroApp) => {
30
30
  const config = useRuntimeConfig();
31
31
  if (!config.auth?.enabled) return;
32
+ const workspaceSelected = config.sync?.provider === SQLITE_PROVIDER_ID;
32
33
  const syncSelected = config.sync?.enabled === true && config.sync?.provider === SQLITE_PROVIDER_ID;
33
34
  const connectSelected = config.connect?.enabled === true && config.connect?.provider === SQLITE_PROVIDER_ID;
34
35
  const backgroundJobsSelected = config.backgroundJobs?.enabled === true && config.backgroundJobs?.storageProvider === SQLITE_PROVIDER_ID;
35
- if (!syncSelected && !connectSelected && !backgroundJobsSelected) return;
36
+ if (!workspaceSelected && !connectSelected && !backgroundJobsSelected)
37
+ return;
36
38
  const driver = getSqliteDriver();
37
39
  if (driver === "d1" && connectSelected) {
38
40
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "or3-provider-sqlite",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Saluana/or3-provider-sqlite.git"