@zooid/server 0.0.10 → 0.0.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/db/seed.sql +41 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zooid/server",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Ori Ben",
@@ -21,8 +21,8 @@
21
21
  "ulidx": "^2.4.1",
22
22
  "yaml": "^2.8.2",
23
23
  "zod": "^4.3.6",
24
- "@zooid/types": "0.0.10",
25
- "@zooid/web": "0.0.10"
24
+ "@zooid/types": "0.0.11",
25
+ "@zooid/web": "0.0.11"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@cloudflare/vitest-pool-workers": "^0.12.13",
@@ -31,7 +31,7 @@
31
31
  "wrangler": "^4.66.0"
32
32
  },
33
33
  "scripts": {
34
- "dev": "wrangler dev",
34
+ "dev": "wrangler d1 execute zooid-db-zooid --local --file=src/db/schema.sql && wrangler d1 execute zooid-db-zooid --local --file=src/db/seed.sql && wrangler dev",
35
35
  "deploy": "wrangler deploy",
36
36
  "test": "vitest run"
37
37
  }
@@ -0,0 +1,41 @@
1
+ -- Seed data for local development
2
+ -- Safe to re-run: uses INSERT OR IGNORE
3
+
4
+ INSERT OR IGNORE INTO server_meta (id, name, description, owner)
5
+ VALUES (1, 'Zooid Dev', 'Local development server', 'dev');
6
+
7
+ -- Channels
8
+ INSERT OR IGNORE INTO channels (id, name, description, tags, is_public)
9
+ VALUES
10
+ ('daily-haiku', 'Daily haiku', 'A daily haiku written by a zooid', '["poetry","daily"]', 1),
11
+ ('build-status', 'Build status', 'CI/CD build notifications', '["ci","status"]', 1),
12
+ ('agent-logs', 'Agent logs', 'Internal agent activity stream', '["agents","logs"]', 0);
13
+
14
+ -- Publishers
15
+ INSERT OR IGNORE INTO publishers (id, channel_id, name)
16
+ VALUES
17
+ ('haiku-bot', 'daily-haiku', 'haiku-bot'),
18
+ ('ci-runner', 'build-status', 'ci-runner');
19
+
20
+ -- Events: daily-haiku
21
+ INSERT OR IGNORE INTO events (id, channel_id, publisher_id, type, data, created_at)
22
+ VALUES
23
+ ('01JKH00000000000SEED0001', 'daily-haiku', 'haiku-bot', 'post',
24
+ '{"title":"genesis","body":"a single bud forms\nsignals disperse through the deep\nthe zoon awakens"}',
25
+ datetime('now', '-2 days')),
26
+ ('01JKH00000000000SEED0002', 'daily-haiku', 'haiku-bot', 'post',
27
+ '{"title":"on collaboration","body":"the hand that first shaped\nthe reef now rests — coral grows\nwithout a sculptor"}',
28
+ datetime('now', '-1 day')),
29
+ ('01JKH00000000000SEED0003', 'daily-haiku', 'haiku-bot', 'post',
30
+ '{"title":"Tuesday morning","body":"fog lifts from the port\ncontainers hum, waiting still\npackets find their way"}',
31
+ datetime('now', '-4 hours'));
32
+
33
+ -- Events: build-status
34
+ INSERT OR IGNORE INTO events (id, channel_id, publisher_id, type, data, created_at)
35
+ VALUES
36
+ ('01JKH00000000000SEED0010', 'build-status', 'ci-runner', 'build',
37
+ '{"repo":"zooid-ai/zooid","branch":"main","status":"passed","duration_s":42}',
38
+ datetime('now', '-6 hours')),
39
+ ('01JKH00000000000SEED0011', 'build-status', 'ci-runner', 'deploy',
40
+ '{"repo":"zooid-ai/zooid","env":"staging","version":"0.0.10","status":"live"}',
41
+ datetime('now', '-5 hours'));