@stackbone/cli 0.1.0-alpha.5 → 0.1.0-alpha.7

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.
@@ -0,0 +1,32 @@
1
+ -- 0010_agent_config.sql — single-row live `AGENT_CONFIG` table the agent
2
+ -- runtime wrapper reads on every invoke. Paired with the existing
3
+ -- `stackbone_platform.agent_config_versions` (migration 0007) which keeps the
4
+ -- audit history; this table holds the *current* payload only and is what the
5
+ -- SDK wrapper (libs/sdk/src/serve/request-handler.ts) issues a
6
+ -- `SELECT payload FROM stackbone_platform.agent_config WHERE id = 1` against
7
+ -- on every `POST /invoke`.
8
+ --
9
+ -- Two tables, one source of truth (`agent_config.payload`):
10
+ -- - agent_config_versions — append-only audit trail + rollback source.
11
+ -- - agent_config — single row, mirrors the latest payload.
12
+ --
13
+ -- AgentConfigService.put() writes both inside the same call so the audit
14
+ -- never lags the live read.
15
+ --
16
+ -- The install saga (apps/api/.../neon.adapter.ts) used to create this table
17
+ -- inline because no migration existed for it; the inline DDL is now a no-op
18
+ -- (CREATE TABLE IF NOT EXISTS) but kept in place so the seed insert that
19
+ -- copies the per-install snapshot config into row id=1 still runs.
20
+
21
+ CREATE TABLE IF NOT EXISTS stackbone_platform.agent_config (
22
+ id int PRIMARY KEY DEFAULT 1 CHECK (id = 1),
23
+ payload jsonb NOT NULL DEFAULT '{}'::jsonb,
24
+ updated_at timestamptz NOT NULL DEFAULT now()
25
+ );
26
+
27
+ -- Make sure the row exists even on a Neon that pre-dates the saga bootstrap
28
+ -- (e.g. testcontainer integration suites). Idempotent: re-running the
29
+ -- migration leaves the existing payload untouched.
30
+ INSERT INTO stackbone_platform.agent_config (id, payload)
31
+ VALUES (1, '{}'::jsonb)
32
+ ON CONFLICT (id) DO NOTHING;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackbone/cli",
3
- "version": "0.1.0-alpha.5",
3
+ "version": "0.1.0-alpha.7",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,12 +22,14 @@
22
22
  "drizzle-kit": "^0.31.10",
23
23
  "drizzle-orm": "^0.45.2",
24
24
  "hono": "^4.12.15",
25
+ "ignore": "^7.0.5",
25
26
  "open": "^11.0.0",
26
27
  "pg": "^8.20.0",
27
28
  "pg-query-emscripten": "^5.1.0",
28
29
  "pino": "^10.3.1",
29
30
  "pino-pretty": "^13.1.3",
30
31
  "postgres": "^3.4.9",
32
+ "tar-stream": "^3.1.8",
31
33
  "yaml": "^2.8.3",
32
34
  "zod": "^4.3.6"
33
35
  }
Binary file
Binary file