@stackbone/cli 0.3.2 → 0.3.4

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,28 @@
1
+ -- 0046_runtime_identity_control_plane.sql — the identity the CONTROL PLANE knows
2
+ -- this box by (STA-594).
3
+ --
4
+ -- A box mints its own installation id on first boot (0033) and that value is
5
+ -- entirely its own: nobody outside the container picks it. The control plane
6
+ -- separately keeps an installation row, with its own id, for the same box. The
7
+ -- box never knew that second id, so it could not check a token minted for it.
8
+ --
9
+ -- It learns the pair during registration — the one moment both sides are
10
+ -- connected, mutually authenticated and cannot disagree — and keeps it here.
11
+ --
12
+ -- WHY A SEPARATE TABLE instead of two more columns on `runtime_identity`.
13
+ -- The box's own installation id namespaces its Connect grants and its storage
14
+ -- keys, so overwriting it orphans live OAuth grants with no visible error at
15
+ -- all. Two tables share no writable column, which makes "the learned value never
16
+ -- touches the minted one" a property of the schema rather than a discipline the
17
+ -- next UPDATE's column list has to remember.
18
+ --
19
+ -- One row, like `runtime_identity` (0033) and `workspace_settings` (0029): this
20
+ -- describes THE runtime, not a collection of anything. NO seed — the row's
21
+ -- absence is exactly what "nobody has told this box what it answers for" means,
22
+ -- and that absence is what the boot log reports.
23
+ CREATE TABLE IF NOT EXISTS stackbone_platform.runtime_control_plane_identity (
24
+ id int PRIMARY KEY DEFAULT 1 CHECK (id = 1),
25
+ installation_id uuid NOT NULL,
26
+ organization_id uuid NOT NULL,
27
+ learned_at timestamptz NOT NULL DEFAULT now()
28
+ );
@@ -0,0 +1,30 @@
1
+ -- 0050_run_steps_model_provider.sql — give the model its own home on a run step.
2
+ --
3
+ -- Until now the model id had nowhere to live, so it shared the `name` column with
4
+ -- whatever else each writer put there: a direct `client.ai` call stores the model
5
+ -- id, a deep-agent invocation stores the AGENT's name. Both read back as "name",
6
+ -- and nothing on the row says which of the two it is — so the trace viewer could
7
+ -- only print `name` and hope.
8
+ --
9
+ -- Two nullable text columns fix that. `name` keeps meaning whatever each writer
10
+ -- already means by it; it simply stops being where a reader looks for the model.
11
+ --
12
+ -- `provider` is DERIVED from the model id's prefix, never guessed. The ids the box
13
+ -- speaks are OpenRouter-style `vendor/model`, so `openai/gpt-4o-mini` yields
14
+ -- `openai`, and an id with no prefix leaves the column NULL rather than inventing
15
+ -- one. `openrouter` is never stored: it is the gateway that routed the call, not
16
+ -- the provider that served it.
17
+ --
18
+ -- Both columns are nullable with no default and no CHECK, because every row
19
+ -- written before this migration has neither and must stay readable: the trace
20
+ -- viewer falls back to `name` when `model` is null.
21
+ --
22
+ -- Viewer posture is UNCHANGED. 0005 grants SELECT on the TABLE
23
+ -- (`GRANT SELECT ON ALL TABLES IN SCHEMA stackbone_platform`), which covers every
24
+ -- column the table ever grows, and no column-level revoke exists to undo it. So a
25
+ -- new column needs no grant of its own — the DB Explorer sees these two the moment
26
+ -- they exist.
27
+
28
+ ALTER TABLE stackbone_platform.run_steps
29
+ ADD COLUMN IF NOT EXISTS model text,
30
+ ADD COLUMN IF NOT EXISTS provider text;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackbone/cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "bin": {