@protobase/cli 0.94.45 → 0.95.1
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/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.1",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@better-auth/core": "^1.7.12",
|
|
45
45
|
"@hono/node-server": "^2.1.3",
|
|
46
|
-
"@protobase/config": "0.
|
|
47
|
-
"@protobase/layout": "0.
|
|
48
|
-
"@protobase/query": "0.
|
|
49
|
-
"@protobase/schema": "0.
|
|
50
|
-
"@protobase/server": "0.
|
|
51
|
-
"@protobase/ui": "0.
|
|
52
|
-
"@protobase/workflows": "0.
|
|
46
|
+
"@protobase/config": "0.95.1",
|
|
47
|
+
"@protobase/layout": "0.95.1",
|
|
48
|
+
"@protobase/query": "0.95.1",
|
|
49
|
+
"@protobase/schema": "0.95.1",
|
|
50
|
+
"@protobase/server": "0.95.1",
|
|
51
|
+
"@protobase/ui": "0.95.1",
|
|
52
|
+
"@protobase/workflows": "0.95.1",
|
|
53
53
|
"@react-email/render": "^2.1.0",
|
|
54
54
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
55
55
|
"@sentry/vite-plugin": "^11.10.0",
|
|
@@ -239,7 +239,7 @@ Nothing refuses a tool result larger than an AI client takes yet, as below.
|
|
|
239
239
|
|
|
240
240
|
`context` holds the caller's `session`, the `locale` they read, `approve(request)`, `resources()`, the resources they may read, and `records`, the app's records **as that person**: their role's access rules, tenant, hidden fields, `validate` and write hooks apply, as in the REST API and the built-in tools. Its methods are the assistant's, listed [there](assistant.md#the-apps-own-tools); a refusal rejects with an `HttpProblem`. `show` does nothing over MCP, and there is no `conversation`.
|
|
241
241
|
|
|
242
|
-
A tool refuses by throwing an `HttpProblem` with a status below 500, such as `notFound(detail)` or `forbidden(slug, detail)`, or by letting through the one `records` rejects with: the client gets `{ "error": <slug>, "message": <detail> }` as an error result, as from the built-in tools, and nothing is reported. Anything else a tool throws is reported to the app's error handler and reaches the client as "The server failed to answer.", or, for a query the database stopped at its statement timeout, as
|
|
242
|
+
A tool refuses by throwing an `HttpProblem` with a status below 500, such as `notFound(detail)` or `forbidden(slug, detail)`, or by letting through the one `records` rejects with: the client gets `{ "error": <slug>, "message": <detail> }` as an error result, as from the built-in tools, and nothing is reported. Anything else a tool throws is reported to the app's error handler and reaches the client as "The server failed to answer.", or, for a query the database stopped at its statement timeout, as `{ "error": "statement-timeout", "message": <a sentence naming the tool> }`. `refusalOf(error)` from `@protobase/server` gives that `{ error, message }` text for a refusal and `undefined` otherwise, and `refused(error)` gives it or throws the error again, for a tool that returns a refusal as its result rather than as an error.
|
|
243
243
|
|
|
244
244
|
Nothing cuts a tool's result, as nothing cuts the built-in tools': a tool that can return a lot takes a limit or the fields to return, as `list_records` takes `page_size` and `fields`. <gap>A tool result larger than an AI client takes cannot be refused with a message naming what to leave out because a size guard is not implemented.</gap>
|
|
245
245
|
|
|
@@ -219,10 +219,6 @@ A failing Task or Map fails with an error name: a step type's own, such as `Http
|
|
|
219
219
|
|
|
220
220
|
### Blocks
|
|
221
221
|
|
|
222
|
-
:::caution[Beta]
|
|
223
|
-
<gap>Two runs that reach a block with the same key at the same moment cannot share one run of it, because joining a block's run already under way is not implemented.</gap> Each of them runs the block.
|
|
224
|
-
:::
|
|
225
|
-
|
|
226
222
|
A block wraps steps into one step that runs once while what it reads stays the same. Its steps run as a run of their own, and its result is kept for a time you set, so a workflow that reaches it again, in this run or another, gets that result without running them. Use it for work that must not be repeated, such as fetching a file from a link that expires and storing it: once stored, the stored file is what counts.
|
|
227
223
|
|
|
228
224
|
```json
|
|
@@ -244,7 +240,7 @@ A block wraps steps into one step that runs once while what it reads stays the s
|
|
|
244
240
|
- **What it reads.** `Arguments` is the block's input. Its steps read it as `$states.context.Execution.Input`, and secrets by name; they never read the variables around the block. A variable a step inside assigns stays inside. The block's result is its last step's output, which its `Output` and `Assign` read as `$states.result`.
|
|
245
241
|
- **When it runs again.** The block is keyed by the values of its input that its steps read and by the secrets they read, together with its steps as they are written. So a changed value that only a later step reads runs it again, and a value none of them reads does not. `Cache.Key`, an expression, keys it on its value instead. `Cache.Ttl` is how long a result serves, as seconds or text such as `10 minutes`, `1 hour` or `2 days`, at most 30 days; a definition without a valid one is refused. A result is kept under the run's tenant, the version's last editor with the roles they hold now, the person who turned it on and the accounts it binds, so another run reuses it only when it acts as the same people, and none is reused once the last editor's roles change or while they hold none. A result that is empty is kept too.
|
|
246
242
|
- **What is never kept.** A secret: a result that holds a secret's value is not kept, so the next visit runs the block again, and a block reached after a secret it reads changed runs again too. `Arguments` may not hold a secret, since the block's run keeps its input; read it inside the block by name. A result is reused only while the accounts its steps sign in with can still be used.
|
|
247
|
-
- **Its own run.** A block's run has its own trace and limits. Its output, like every value a run keeps, is at most 256 KiB; larger data goes through a [storage configuration](#storing-files). On the run's page, the Block step links to the run that gave its result, the earlier one when the result was reused, and that page marks the block's steps from its own trace. Open it to read each step, replay it by itself, or go back to the run that started it. A failed block fails the Block step with the block run's error, which `Retry` and `Catch` take; each try starts a new run of the block. A run waits for its block's run and goes on once that ends.
|
|
243
|
+
- **Its own run.** A block's run has its own trace and limits. Its output, like every value a run keeps, is at most 256 KiB; larger data goes through a [storage configuration](#storing-files). On the run's page, the Block step links to the run that gave its result, the earlier one when the result was reused, and that page marks the block's steps from its own trace. Open it to read each step, replay it by itself, or go back to the run that started it. A failed block fails the Block step with the block run's error, which `Retry` and `Catch` take; each try starts a new run of the block. A run waits for its block's run and goes on once that ends. Runs that reach a block with the same key while its run is under way, such as two runs started together or the items of a For each, share that run when they act as the same people: it runs once, and each of them takes its result, or its failure, and links to it. The Block step of a run that joined another's is marked *Joined*. <gap>A block whose steps read a secret cannot share its run with runs that reach it at the same moment, and runs for each of them, because telling whether the secret changed while its run was under way is not implemented.</gap> <gap>A run that reaches a block in the moment between its run ending and the result being kept cannot take that result, and runs the block again, because a block's run keeping its own result is not implemented.</gap>
|
|
248
244
|
- **Building one.** In the editor, *Add step* offers *Block*, which comes with one step inside; with the block or one of its steps chosen, *Add step* adds inside it, as for For each.
|
|
249
245
|
- **A Wait after it.** When a state reads, after a Wait, a variable a Block set before that Wait, the check warns on that state that what the block fetched may have expired by then. The editor shows the warning on the step and in its form, and MCP clients get it in `warnings`; a save goes through with it.
|
|
250
246
|
|