@agent-native/core 0.80.2 → 0.80.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.
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +45 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/action.ts +11 -0
- package/corpus/core/src/agent/production-agent.ts +3 -0
- package/corpus/core/src/cli/plan-local.ts +445 -108
- package/corpus/core/src/cli/skills.ts +14 -5
- package/corpus/core/src/server/action-routes.ts +14 -0
- package/corpus/core/src/vite/client.ts +15 -1
- package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +162 -0
- package/corpus/templates/clips/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +42 -18
- package/corpus/templates/plan/.agents/skills/visual-plan/references/local-files.md +14 -5
- package/corpus/templates/plan/.agents/skills/visual-recap/references/local-files.md +14 -5
- package/corpus/templates/plan/actions/validate-local-plan-source.ts +118 -0
- package/corpus/templates/plan/server/lib/plan-connector-catalog.ts +1 -0
- package/corpus/templates/plan/server/lib/public-action-paths.ts +1 -0
- package/dist/action.d.ts +8 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +3 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +3 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/plan-local.d.ts +30 -0
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +281 -56
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/skills.d.ts +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +14 -5
- package/dist/cli/skills.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +14 -0
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +12 -1
- package/dist/vite/client.js.map +1 -1
- package/package.json +1 -1
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.80.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fa56720: Fix video playback failing in workspace dev mode. When a browser requested video bytes (range/streaming requests), the dev server was stripping the app base path prefix before Nitro's media handler could run, causing Vite to return an error page instead of the video.
|
|
8
|
+
|
|
9
|
+
## 0.80.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 995dd3b: Add an opt-in `maxBodyBytes` option to `defineAction`. When set, the action
|
|
14
|
+
HTTP route rejects oversize requests with 413 based on the declared
|
|
15
|
+
`Content-Length` BEFORE buffering or parsing the body.
|
|
16
|
+
|
|
17
|
+
This closes a gap for public, no-auth POST actions: previously the router parsed
|
|
18
|
+
the full JSON body before any in-`run()` size check, so a large anonymous
|
|
19
|
+
request could force parse work on an unauthenticated route. The check is
|
|
20
|
+
runtime-agnostic (header only), so it works on both the web-`Request.json()` and
|
|
21
|
+
Node `readBody` paths, and is unset by default so existing actions are
|
|
22
|
+
unaffected. The Plan template's public `validate-local-plan-source` action opts
|
|
23
|
+
in.
|
|
24
|
+
|
|
25
|
+
- 995dd3b: Make `plan local verify` validate plan content against the real renderer
|
|
26
|
+
schema, and stop `plan local check` from reporting false greens.
|
|
27
|
+
|
|
28
|
+
Previously both headless commands could pass a plan the renderer later rejects:
|
|
29
|
+
`check` ran a hand-rolled regex lint (a subset of the schema that never
|
|
30
|
+
inspected blocks authored as JSON inside a container's `tabs={[…]}` /
|
|
31
|
+
`columns={[…]}` array), and `verify` only checked bridge/CORS transport, never
|
|
32
|
+
the content. The plan then got stuck on "Loading plan" when rendered.
|
|
33
|
+
|
|
34
|
+
Now:
|
|
35
|
+
- `verify` POSTs the MDX folder to the Plan app's new, public, no-DB
|
|
36
|
+
`validate-local-plan-source` action, which runs the renderer's own
|
|
37
|
+
`parsePlanMdxFolder` + `planContentSchema`. Its verdict gates `verify`'s
|
|
38
|
+
`ok`, and rejected plans surface the renderer's exact schema-path issue
|
|
39
|
+
(e.g. `blocks[1].data.tabs[0].blocks[0].data.items[0].id`). When the endpoint
|
|
40
|
+
is unavailable (older/unreachable Plan app), `verify` degrades to the
|
|
41
|
+
transport checks and warns that content was not validated, rather than
|
|
42
|
+
hard-failing.
|
|
43
|
+
- `check` now recurses into nested `tabs` block arrays so the common
|
|
44
|
+
nested-checklist / question-form / missing-`id` case is caught offline, and
|
|
45
|
+
it no longer reports `validation: "passed"`. It reports a clearly-scoped
|
|
46
|
+
`lint-passed` with a note pointing to `verify` for authoritative validation.
|
|
47
|
+
|
|
3
48
|
## 0.80.2
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.4",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -326,6 +326,10 @@ interface DefineActionWithSchema<
|
|
|
326
326
|
* Defaults to true. Set to false only for metadata/read actions that safely
|
|
327
327
|
* handle `ctx.userEmail` / `getRequestUserEmail()` being undefined. */
|
|
328
328
|
requiresAuth?: boolean;
|
|
329
|
+
/** Max HTTP request body in bytes. When set, the route 413s on the declared
|
|
330
|
+
* `Content-Length` before parsing. Use for public, no-auth POST actions;
|
|
331
|
+
* unset = no route-level cap. */
|
|
332
|
+
maxBodyBytes?: number;
|
|
329
333
|
/** Whether this action is exposed to the agent — the in-app assistant and the
|
|
330
334
|
* app's MCP/A2A tool surfaces — as a callable tool. **Default-allow opt-out**:
|
|
331
335
|
* `undefined` / `true` expose it; only an explicit `false` hides it from every
|
|
@@ -439,6 +443,9 @@ interface DefineActionWithParams<
|
|
|
439
443
|
/** Whether the HTTP/frontend action route must have an authenticated owner.
|
|
440
444
|
* Defaults to true. See the schema overload above. */
|
|
441
445
|
requiresAuth?: boolean;
|
|
446
|
+
/** Max HTTP request body in bytes; 413s on `Content-Length` before parsing.
|
|
447
|
+
* See the schema overload above. */
|
|
448
|
+
maxBodyBytes?: number;
|
|
442
449
|
/** Whether this action is exposed to the agent as a callable tool. Only an
|
|
443
450
|
* explicit `false` hides it from every agent tool list while keeping it
|
|
444
451
|
* frontend/HTTP-callable. See the schema overload above and actions.md. */
|
|
@@ -504,6 +511,7 @@ export interface ActionDefinition<TInput, TReturn> {
|
|
|
504
511
|
readonly tool: import("./agent/types.js").ActionTool;
|
|
505
512
|
readonly http?: ActionHttpConfig | false;
|
|
506
513
|
readonly requiresAuth?: boolean;
|
|
514
|
+
readonly maxBodyBytes?: number;
|
|
507
515
|
readonly agentTool?: boolean;
|
|
508
516
|
readonly readOnly?: boolean;
|
|
509
517
|
readonly parallelSafe?: boolean;
|
|
@@ -724,6 +732,9 @@ export function defineAction(options: any) {
|
|
|
724
732
|
...(typeof options.requiresAuth === "boolean"
|
|
725
733
|
? { requiresAuth: options.requiresAuth }
|
|
726
734
|
: {}),
|
|
735
|
+
...(typeof options.maxBodyBytes === "number"
|
|
736
|
+
? { maxBodyBytes: options.maxBodyBytes }
|
|
737
|
+
: {}),
|
|
727
738
|
...(typeof agentTool === "boolean" ? { agentTool } : {}),
|
|
728
739
|
...(typeof readOnly === "boolean" ? { readOnly } : {}),
|
|
729
740
|
...(typeof parallelSafe === "boolean" ? { parallelSafe } : {}),
|
|
@@ -534,6 +534,9 @@ export interface ActionEntry {
|
|
|
534
534
|
* Defaults to true; false lets safe metadata/read actions run with
|
|
535
535
|
* `ctx.userEmail` undefined when auth resolution returns 401/403. */
|
|
536
536
|
requiresAuth?: boolean;
|
|
537
|
+
/** Max HTTP request body in bytes; the route 413s on `Content-Length` before
|
|
538
|
+
* parsing. For public, no-auth POST actions. */
|
|
539
|
+
maxBodyBytes?: number;
|
|
537
540
|
/** Whether the action is exposed to the agent as a callable tool. Only an
|
|
538
541
|
* explicit `false` hides it from every agent tool surface (in-app assistant,
|
|
539
542
|
* MCP, A2A, job/trigger runners) while leaving it frontend/HTTP-callable.
|