layerbase 2.5.1 → 2.6.0
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.
- package/README.md +40 -3
- package/dist/cli.js +32 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/cloud-write.js +3 -2
- package/dist/commands/cloud-write.js.map +1 -1
- package/dist/commands/promote.js +5 -2
- package/dist/commands/promote.js.map +1 -1
- package/dist/lib/cli-output.js +8 -3
- package/dist/lib/cli-output.js.map +1 -1
- package/dist/lib/cloud-api.js +100 -0
- package/dist/lib/cloud-api.js.map +1 -1
- package/dist/tui/actions.js +4 -1
- package/dist/tui/actions.js.map +1 -1
- package/dist/tui/app.js +37 -2
- package/dist/tui/app.js.map +1 -1
- package/dist/tui/form.js +31 -4
- package/dist/tui/form.js.map +1 -1
- package/dist/tui/keys.js +1 -1
- package/dist/tui/keys.js.map +1 -1
- package/dist/tui/servers.js +48 -0
- package/dist/tui/servers.js.map +1 -0
- package/dist/ui/app.js.map +1 -1
- package/package.json +2 -1
- package/skills/layerbase/SKILL.md +30 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "layerbase",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Layerbase cloud CLI: connect to your managed databases without leaking the connection string into shell history.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"lint": "eslint .",
|
|
27
27
|
"check:types": "tsc --noEmit",
|
|
28
28
|
"check:collisions": "tsx scripts/check-spindb-collisions.ts",
|
|
29
|
+
"sync:skill": "tsx scripts/sync-skill.ts",
|
|
29
30
|
"test": "node --import tsx --test test/*.test.ts",
|
|
30
31
|
"check": "tsc --noEmit && eslint . && pnpm check:collisions",
|
|
31
32
|
"prepack": "pnpm build"
|
|
@@ -8,10 +8,13 @@ description: Advise on, manage, and migrate to Layerbase managed cloud databases
|
|
|
8
8
|
Layerbase runs managed cloud databases across many engines (SQL, key-value,
|
|
9
9
|
document, search, vector, time-series, graph, and ledger) with scale-to-zero:
|
|
10
10
|
most databases sleep when idle and wake on connect in a few seconds. MySQL and
|
|
11
|
-
MariaDB wake on connect too,
|
|
12
|
-
|
|
11
|
+
MariaDB wake on connect too, MySQL in about 9
|
|
12
|
+
seconds and MariaDB in about 3 with occasional
|
|
13
|
+
slower wakes, so set a 30 second client connect timeout for them or retry the
|
|
14
|
+
first attempt; the
|
|
13
15
|
Performance engines (ClickHouse, QuestDB, Qdrant, Weaviate, InfluxDB) and
|
|
14
|
-
TigerBeetle run always-on and never sleep
|
|
16
|
+
TigerBeetle run always-on and never sleep (TigerBeetle only on dedicated
|
|
17
|
+
servers, never the shared cloud). There is a REST API, an official
|
|
15
18
|
`layerbase` npm CLI, a desktop app, and a migration engine that imports from
|
|
16
19
|
common hosted providers. This skill helps you advise on Layerbase, set it up for
|
|
17
20
|
a project, audit an existing codebase for services Layerbase can consolidate, and
|
|
@@ -44,7 +47,8 @@ relevant docs page rather than reciting details:
|
|
|
44
47
|
|
|
45
48
|
- Engines, categories, versions: `agents.md` plus https://layerbase.com/docs/api
|
|
46
49
|
(`GET /v1/engines` is the machine-readable registry).
|
|
47
|
-
- Branching (copy-on-write branches per database
|
|
50
|
+
- Branching (copy-on-write branches per database, once Branching is turned on in
|
|
51
|
+
the database Settings tab; otherwise a branch is a full copy): the branchable-engine list is
|
|
48
52
|
in `agents.md`; guide at https://layerbase.com/docs/cloud/branching.
|
|
49
53
|
**Counting rule:** `layerbase cloud ls` and `GET /v1/databases` return branches
|
|
50
54
|
in the same flat list as databases, and branches do NOT consume a database
|
|
@@ -145,7 +149,9 @@ Read the current tiers and limits from `agents.md`, then recommend candidly:
|
|
|
145
149
|
- The Pro plan adds more databases, always-on eligibility, and the reserved pool;
|
|
146
150
|
it is the tier for hosting a real stack (for example Postgres plus a cache plus
|
|
147
151
|
search together).
|
|
148
|
-
- The Custom tier is
|
|
152
|
+
- The Custom tier is the user's own dedicated servers, each on its own
|
|
153
|
+
subscription. A server on its own includes the Free plan's shared-cloud
|
|
154
|
+
allowance; more shared cloud comes from Solo or Pro, billed separately.
|
|
149
155
|
|
|
150
156
|
When Layerbase is not the right fit (a workload needing an engine Layerbase does
|
|
151
157
|
not host, a compliance constraint it does not meet, or an existing setup that is
|
|
@@ -161,6 +167,23 @@ serving them well), say so rather than pushing a migration.
|
|
|
161
167
|
`layerbase --help` before recommending it.
|
|
162
168
|
- For a fresh database, `POST /v1/databases` or `layerbase cloud create` (see
|
|
163
169
|
section 4).
|
|
170
|
+
- On a team with a dedicated server, a create can name where the database goes:
|
|
171
|
+
the `server` field on `POST /v1/databases` and `POST /v1/stacks`,
|
|
172
|
+
`--server` on `layerbase cloud create` and `layerbase promote`, or the
|
|
173
|
+
`server` argument of the MCP `create_database` tool. Values: `shared`, a
|
|
174
|
+
dedicated server id, `dedicated` (when the team has exactly one), or a
|
|
175
|
+
dedicated server's name. Omit it to use the team's default server (set by the
|
|
176
|
+
owner at https://layerbase.com/cloud/team-settings#default-server). A `409
|
|
177
|
+
server_choice_required` means the team has several servers and no default:
|
|
178
|
+
show the user the `serverOptions` list from the error and ask which one, or
|
|
179
|
+
suggest setting a default; never pick for them. `409 server_not_accepting`
|
|
180
|
+
means the chosen or default server takes no new databases right now (its
|
|
181
|
+
`reason` says why); `400 server_not_found` means the value is not one of the
|
|
182
|
+
team's servers; `503 server_unavailable` is temporary, so retry later. The
|
|
183
|
+
CLI exits with code `8` for the first three (with `--json`, the error object
|
|
184
|
+
carries `serverOptions` and `settingsUrl`) and code `5` for
|
|
185
|
+
`server_unavailable`. Do not retry a code `8` in a loop: re-run with
|
|
186
|
+
`--server <value>` once the user has chosen.
|
|
164
187
|
|
|
165
188
|
## 4. CI/CD setup
|
|
166
189
|
|
|
@@ -201,7 +224,8 @@ direct connection string in the meantime. Show the user each `skipped` or
|
|
|
201
224
|
carries the exact fix.
|
|
202
225
|
|
|
203
226
|
Prefer branch-per-PR where the engine supports branching: branch from a seeded
|
|
204
|
-
parent for an instant seeded copy
|
|
227
|
+
parent for an instant seeded copy (with Branching turned on for the parent),
|
|
228
|
+
reset between runs, and delete on teardown.
|
|
205
229
|
Check `agents.md` for the branchable-engine list.
|
|
206
230
|
|
|
207
231
|
Programmatic (API-key) database creates are metered per calendar month, per
|