@spooky-sync/cli 0.0.1-canary.247 → 0.0.1-canary.249

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 (2) hide show
  1. package/AGENTS.md +17 -0
  2. package/package.json +6 -6
package/AGENTS.md CHANGED
@@ -140,6 +140,23 @@ apps:
140
140
  - "gomod:/go"
141
141
  ```
142
142
 
143
+ ## Sync transport (`sync.transport`)
144
+
145
+ `sync.transport: changefeed` changes what the schema pipeline emits, in three
146
+ places that must agree: `sp00ky::generate_sp00ky_events` keeps the
147
+ `_00_version` bookkeeping but drops the `http::post` (`post_ingest`),
148
+ `schema_builder::add_changefeed_clauses` puts `CHANGEFEED <retention> INCLUDE
149
+ ORIGINAL` on every synced `DEFINE TABLE` in the desired schema (after
150
+ `COMMENT`, before `PERMISSIONS`, the order SurrealDB renders, or `schema
151
+ diff` sees a phantom change forever), and `migrate::apply_internal_schema`
152
+ emits `ALTER TABLE IF EXISTS ... CHANGEFEED` for every synced user table after
153
+ the events (a user migration's `DEFINE TABLE OVERWRITE` without the clause
154
+ drops the feed; the ALTER puts it back on every deploy) plus `REMOVE EVENT
155
+ _00_dbsp_cleanup`. `backend::sync_settings_for(config_path)` is the single
156
+ reader of the setting. The scheduler/SSP get `SPKY_INGEST_TRANSPORT` through
157
+ `deployment.env` (cloud) or the dev launch specs. Retention must be in
158
+ SurrealDB's rendered form (`1d`, not `24h`): `valid_changefeed_retention`.
159
+
143
160
  ## Common gotchas
144
161
 
145
162
  - **`schema.gen.ts` must be regenerated after every `.surql` change.** `spky generate`. CI typically asserts no drift.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spooky-sync/cli",
3
- "version": "0.0.1-canary.247",
3
+ "version": "0.0.1-canary.249",
4
4
  "description": "Generate TypeScript/Dart types from SurrealDB schema files",
5
5
  "type": "module",
6
6
  "main": "./dist/syncgen.cjs",
@@ -62,10 +62,10 @@
62
62
  "vitest": "^1.0.0"
63
63
  },
64
64
  "optionalDependencies": {
65
- "@spooky-sync/cli-darwin-arm64": "0.0.1-canary.247",
66
- "@spooky-sync/cli-darwin-x64": "0.0.1-canary.247",
67
- "@spooky-sync/cli-linux-arm64": "0.0.1-canary.247",
68
- "@spooky-sync/cli-linux-x64": "0.0.1-canary.247",
69
- "@spooky-sync/cli-win32-x64": "0.0.1-canary.247"
65
+ "@spooky-sync/cli-darwin-arm64": "0.0.1-canary.249",
66
+ "@spooky-sync/cli-darwin-x64": "0.0.1-canary.249",
67
+ "@spooky-sync/cli-linux-arm64": "0.0.1-canary.249",
68
+ "@spooky-sync/cli-linux-x64": "0.0.1-canary.249",
69
+ "@spooky-sync/cli-win32-x64": "0.0.1-canary.249"
70
70
  }
71
71
  }