openvibers/openvibe.bot Commits

Migrations: restore the text applied in production (#342)

OP OpenVibers committed 5 days ago · 3e620f4e01 · 8 files, +14 −14

Changes

ddiff --git a/migrations/0004_run_jobs.sql b/migrations/0004_run_jobs.sql
iindex 71eddb3..2bc8cf3 100644
---- a/migrations/0004_run_jobs.sql
++++ b/migrations/0004_run_jobs.sql
@@@ -1,17 +1,17 @@
-- phase: expand
--
-- Jobs on the device link (plan T14 step L1; platform.job@1 inside platform.job-frame@1): Bot is the dispatcher
---- that hands a job to a paired Link and meters it per wall-clock second for Billing. Additive only: two new
++-- that hands a job to a paired Node and meters it per wall-clock second for Billing. Additive only: two new
-- tables, nothing existing changes, nothing to backfill.
--
-- run_jobs one row per job id: what was sent, to which device, its state and how far it is metered
-- run_usage_outbox platform.usage-sample@1 readings waiting for Billing (the openvibe-sdk outboxSchema shape).
-- event_id is the reading's idempotency_key run:<job id>:<second>, so a second is queued once
---- however often the Link reports it.
++-- however often the Node reports it.
CREATE TABLE IF NOT EXISTS run_jobs (
id text PRIMARY KEY CHECK (id ~ '^job_[0-9A-HJKMNP-TV-Z]{26}$'), -- platform.job@1 id
-- node_id text NOT NULL REFERENCES devices (id), -- dev_…: the device whose Link runs it
++ node_id text NOT NULL REFERENCES devices (id), -- dev_…: the device whose Node runs it
project_id text, -- prj_… of the payer; no FK, Bot holds no projects
subject text, -- who the readings are for (user:usr_…)
provider text,
@@@ -19,9 +19,9 @@ CREATE TABLE IF NOT EXISTS run_jobs (
job jsonb NOT NULL, -- the platform.job@1 body, resent verbatim until acked
state text NOT NULL CHECK (state IN ('queued', 'placed', 'running', 'succeeded', 'failed', 'cancelled', 'expired')),
cancel_requested boolean NOT NULL DEFAULT false,
-- fault_code text, -- the Link's nack, or why Bot stopped sending it
++ fault_code text, -- the Node's nack, or why Bot stopped sending it
sent_at bigint, -- first time the job frame went out (ms)
-- started_ms bigint, -- the Link's started_ms: anchors every usage second
++ started_ms bigint, -- the Node's started_ms: anchors every usage second
wall_ms bigint, -- job_exit.usage.wall_ms as billed (capped at limits.wall_ms)
usage_read integer NOT NULL DEFAULT 0 CHECK (usage_read >= 0), -- seconds queued for Billing; never moves back
exit_reason text, -- job_exit.reason; set once, by the first job_exit
ddiff --git a/migrations/0023_screen_share_desk.sql b/migrations/0023_screen_share_desk.sql
iindex bf3e710..e47888c 100644
---- a/migrations/0023_screen_share_desk.sql
++++ b/migrations/0023_screen_share_desk.sql
@@@ -1,5 +1,5 @@
-- phase: expand
-- A screen share link shows the owner's own screen (main) or the machine's private desk (contracts 0.214.0 bot.command@1
---- `desk: private`, OpenVibe Link v0.15.0): the agent works on the desk, and a room watches it there, never the owner's
++-- `desk: private`, OpenVibe.Node v0.15.0): the agent works on the desk, and a room watches it there, never the owner's
-- screen. Links made before this show the owner's screen, as they did.
ALTER TABLE machine_screen_shares ADD COLUMN IF NOT EXISTS desk text NOT NULL DEFAULT 'main' CHECK (desk IN ('main', 'private'));
ddiff --git a/migrations/0024_machine_voice.sql b/migrations/0024_machine_voice.sql
iindex 3e8325d..efb3217 100644
---- a/migrations/0024_machine_voice.sql
++++ b/migrations/0024_machine_voice.sql
@@@ -1,6 +1,6 @@
-- phase: expand
-- Vibe by voice (consumer plan §8, contracts 0.214.0 bot.device-message@1 voice_ask / voice_answer): the owner lets
-- Vibe answer their voice on this machine, and chooses its call word. Off until they turn it on on openvibe.bot/machines;
---- the machine (OpenVibe Link's voice plugin) listens for the word only while it is on (config `voice`).
++-- the machine (OpenVibe Node's voice plugin) listens for the word only while it is on (config `voice`).
ALTER TABLE devices ADD COLUMN IF NOT EXISTS voice_on boolean NOT NULL DEFAULT false;
ALTER TABLE devices ADD COLUMN IF NOT EXISTS call_word text;
ddiff --git a/migrations/0025_machine_ai.sql b/migrations/0025_machine_ai.sql
iindex 6c1da7e..3f01a28 100644
---- a/migrations/0025_machine_ai.sql
++++ b/migrations/0025_machine_ai.sql
@@@ -1,5 +1,5 @@
-- phase: expand
-- AI on your own machines (contracts 0.219.0, bot.command@1 kind ai; capability bot.machine.ai): the owner lets their
---- AI (OpenVibe.AI, acting for them) run a model on this machine's own model server through OpenVibe Link's ai plugin.
++-- AI (OpenVibe.AI, acting for them) run a model on this machine's own model server through OpenVibe Node's ai plugin.
-- Off until they turn it on on openvibe.bot/machines.
ALTER TABLE devices ADD COLUMN IF NOT EXISTS ai_models boolean NOT NULL DEFAULT false;
ddiff --git a/migrations/0026_desk_leases.sql b/migrations/0026_desk_leases.sql
iindex 72cce4c..d37d0f5 100644
---- a/migrations/0026_desk_leases.sql
++++ b/migrations/0026_desk_leases.sql
@@@ -1,7 +1,7 @@
-- phase: expand
-- Run sessions (contracts 0.223.0, the Desks plan's D6). A machine's owner may offer its desks to other people
---- (shared_desks, off until they turn it on on openvibe.bot/machines; only where its OpenVibe Link runs every desk in its
---- own sandbox, desk_isolation sandbox, Link v0.32.0). OpenVibe.Run leases one named desk per session there, or on the
++-- (shared_desks, off until they turn it on on openvibe.bot/machines; only where its OpenVibe Node runs every desk in its
++-- own sandbox, desk_isolation sandbox, Node v0.32.0). OpenVibe.Run leases one named desk per session there, or on the
-- person's own machine (bot.desk-lease@1): only that session's commands reach the desk, and the lease ends with it.
ALTER TABLE devices ADD COLUMN IF NOT EXISTS shared_desks boolean NOT NULL DEFAULT false;
ddiff --git a/migrations/0027_machine_fleet.sql b/migrations/0027_machine_fleet.sql
iindex fdc5703..b6ab9fb 100644
---- a/migrations/0027_machine_fleet.sql
++++ b/migrations/0027_machine_fleet.sql
@@@ -1,7 +1,7 @@
-- phase: expand
-- What a machine's coding agents have left (Codes C9c, bot.device-message@1's heartbeat `fleet`): each agent's id,
-- whether it is installed and signed in, and each limit window's label, what it has used of its limit, and when it
---- frees. Its OpenVibe Link reads it with OpenVibe.Codes' own logins probe as the machine's user and reports labels,
++-- frees. Its OpenVibe.Node reads it with OpenVibe.Codes' own logins probe as the machine's user and reports labels,
-- numbers and times only: no key, token or account name. Bot keeps the latest reading per machine and when it stored
-- it; a machine that stops beating keeps its last reading, and fleet_at says how old it is.
ALTER TABLE devices ADD COLUMN IF NOT EXISTS fleet jsonb;
ddiff --git a/migrations/0028_machine_roles.sql b/migrations/0028_machine_roles.sql
iindex f8a5db8..e82e9b5 100644
---- a/migrations/0028_machine_roles.sql
++++ b/migrations/0028_machine_roles.sql
@@@ -1,6 +1,6 @@
-- phase: expand
-- Plan L34 (the machines hub): the roles a machine has for the network (the catalogue is Contracts 0.257.0's
-- machineRoles: codes.worker, desks.host, ai.host, bot.robot). The owner sets them on openvibe.network/machines and
---- the Link reads them on its next check-in (the config frame carries them). A machine that never had a role has the
++-- the Node reads them on its next check-in (the config frame carries them). A machine that never had a role has the
-- empty list, which is what the column starts with.
ALTER TABLE devices ADD COLUMN roles jsonb NOT NULL DEFAULT '[]'::jsonb;
ddiff --git a/migrations/0030_device_first_run.sql b/migrations/0030_device_first_run.sql
iindex d0f69f6..8ec4895 100644
---- a/migrations/0030_device_first_run.sql
++++ b/migrations/0030_device_first_run.sql
@@@ -1,6 +1,6 @@
-- phase: expand
---- The guided first run (OpenVibe Link's `openvibe-node`, docs/install.md#first-run-guided-and-measured): one row per
---- device and step, from the `node.first_run` telemetry events the Link sends over its existing device link. It powers
++-- The guided first run (OpenVibe.Node's `openvibe-node`, docs/install.md#first-run-guided-and-measured): one row per
++-- device and step, from the `node.first_run` telemetry events the Node sends over its existing device link. It powers
-- the machines page's figures for a machine's first job and the admin funnel (how many installs reach each step, and
-- how long each took). The fields are an allowlist: no path, username or address is stored.
CREATE TABLE IF NOT EXISTS device_first_run (