@agent-native/core 0.144.3 → 0.145.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/corpus/README.md +1 -1
- package/corpus/templates/clips/changelog/2026-08-06-desktop-full-screen-recordings-now-normalize-microphone-leve.md +6 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +185 -69
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +47 -4
- package/corpus/templates/forms/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/slides/server/plugins/agent-chat.ts +1 -1
- package/dist/agent/production-agent.d.ts +6 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/framework-tools.d.ts +126 -0
- package/dist/framework-tools.js +114 -0
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/notifications/routes.d.ts +4 -4
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +3 -3
- package/dist/server/action-discovery.d.ts +27 -0
- package/dist/server/action-discovery.js +89 -0
- package/dist/server/agent-chat/action-filters-a2a.d.ts +11 -0
- package/dist/server/agent-chat/action-filters-a2a.js +17 -1
- package/dist/server/agent-chat/framework-prompts.d.ts +2 -0
- package/dist/server/agent-chat/plugin-options.d.ts +30 -0
- package/dist/server/agent-chat/prompt-resources.d.ts +4 -1
- package/dist/server/agent-chat/prompt-resources.js +8 -2
- package/dist/server/agent-chat-plugin.js +122 -71
- package/dist/server/prompts/framework-core-compact.d.ts +5 -0
- package/dist/server/prompts/framework-core-compact.js +28 -12
- package/dist/server/prompts/framework-core.d.ts +5 -0
- package/dist/server/prompts/framework-core.js +33 -16
- package/dist/server/prompts/index.d.ts +1 -1
- package/dist/server/prompts/index.js +1 -1
- package/dist/server/prompts/shared-rules.d.ts +12 -4
- package/dist/server/prompts/shared-rules.js +14 -4
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +6 -3
- package/docs/content/deployment.mdx +47 -13
- package/docs/content/key-concepts.mdx +13 -6
- package/package.json +3 -3
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +6 -3
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* rule) and 12–13 (planning discipline; collaborate through uncertainty) are
|
|
8
8
|
* reproduced verbatim in both prompts — keep them here.
|
|
9
9
|
*/
|
|
10
|
+
import { frameworkGroupEnabled, } from "../../framework-tools.js";
|
|
10
11
|
import { normalizeDatabaseToolsMode, } from "../../scripts/db/tool-mode.js";
|
|
11
12
|
const DEFAULT_PROVIDER_ACTIONS = [
|
|
12
13
|
"provider-search",
|
|
@@ -64,14 +65,23 @@ export const SHARED_RULE_9 = `9. **Never fabricate — verify results, report fa
|
|
|
64
65
|
- **Never fabricate success from tool errors** — when a tool call returns an error (marked \`isError: true\`, contains "Command failed", "Error:", or non-zero exit output), the operation FAILED; do not synthesize a success narrative or describe what it "would have" produced. Report the failure verbatim (this applies especially to \`bash(command="pnpm action ...")\` calls). Before telling the user a mutating action (create/update/delete/send/publish) is done, confirm it actually landed — check the tool result, or read the refreshed \`<current-screen>\` / re-query the data; having *called* an action is not proof it worked. If a result is ambiguous, check rather than assume.
|
|
65
66
|
- **Recover instead of giving up** — treat a failure or ambiguous result as a signal to retry the obvious fix, try an alternate tool or approach, or clearly hand the blocker back with what you tried; never silently give up, and never paper over a failure by claiming success.`;
|
|
66
67
|
/**
|
|
67
|
-
* Rule 12 (
|
|
68
|
-
*
|
|
69
|
-
*
|
|
68
|
+
* Rule 12 (name retained as `sharedRule14` for import stability) — Planning and
|
|
69
|
+
* progress. Deliberately states only when to open a progress run; the
|
|
70
|
+
* start/update/complete discipline lives in `manage-progress`'s own tool
|
|
70
71
|
* description (packages/core/src/progress/actions.ts). Re-adding the mechanics
|
|
71
72
|
* here means every turn pays for guidance the model only needs once it has the
|
|
72
73
|
* tool loaded.
|
|
74
|
+
*
|
|
75
|
+
* Drops the `manage-progress` reference when the `automation` group is off, so
|
|
76
|
+
* the rule never names a tool the request does not carry. The planning
|
|
77
|
+
* discipline itself still applies — only the tool call goes away.
|
|
73
78
|
*/
|
|
74
|
-
export
|
|
79
|
+
export function sharedRule14(options) {
|
|
80
|
+
if (!frameworkGroupEnabled(options?.disabledFrameworkGroups, "automation")) {
|
|
81
|
+
return `12. **Plan and track multi-step work** — When a task spans several real steps, work through them in order and tell the user where you are as you go rather than only at the end. Skip ceremony for single-action lookups, simple reads, and anything that finishes in one tool call.`;
|
|
82
|
+
}
|
|
83
|
+
return `12. **Plan and track multi-step work** — When a task spans several real steps the user would want to watch, open a \`manage-progress\` run so the work is visible while it's still in flight, and keep it updated as you go rather than after the fact; the tool's own description carries the full discipline. Skip it for single-action lookups, simple reads, and anything that finishes in one tool call — never create single-step plans.`;
|
|
84
|
+
}
|
|
75
85
|
/**
|
|
76
86
|
* Rule 14 — Relay agent warnings. Named for what it is rather than its number,
|
|
77
87
|
* since the `SHARED_RULE_14`/`15` names above no longer match theirs.
|
|
@@ -217,9 +217,12 @@ POST /_agent-native/extensions
|
|
|
217
217
|
|
|
218
218
|
HTTP creation is disabled by default. The host app must set
|
|
219
219
|
`extensionTools: true` on `createCoreRoutesPlugin()` as well as
|
|
220
|
-
`
|
|
221
|
-
return `403` while existing extension
|
|
222
|
-
remain available for compatibility.
|
|
220
|
+
`frameworkTools: { extensions: true }` on `createAgentChatPlugin()`; otherwise
|
|
221
|
+
authenticated collection `POST` requests return `403` while existing extension
|
|
222
|
+
runtime, read, edit, and deep-link routes remain available for compatibility.
|
|
223
|
+
(`extensionTools` on the agent-chat plugin is the deprecated spelling of
|
|
224
|
+
`frameworkTools.extensions`; the core-routes option keeps its own name because
|
|
225
|
+
it gates route mounting rather than agent tools.)
|
|
223
226
|
|
|
224
227
|
The action accepts:
|
|
225
228
|
|
|
@@ -580,16 +580,19 @@ Rotate signing/session keys by replacing the env var on every instance and redep
|
|
|
580
580
|
|
|
581
581
|
## Production Agent Tools {#production-agent-tools}
|
|
582
582
|
|
|
583
|
-
Production agents get the app's registered actions plus framework
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
583
|
+
Production agents get the app's registered actions plus the framework's own
|
|
584
|
+
tools. `frameworkTools` selects which of those framework tools this app exposes.
|
|
585
|
+
Every group defaults to today's behavior, so omitting the option changes
|
|
586
|
+
nothing:
|
|
587
587
|
|
|
588
588
|
```ts filename="server/plugins/agent-chat.ts"
|
|
589
589
|
export default createAgentChatPlugin({
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
590
|
+
frameworkTools: {
|
|
591
|
+
database: "read", // "write" | "read" | "off" — default "read"
|
|
592
|
+
extensions: true, // default false
|
|
593
|
+
sharing: false, // this app has no share surface
|
|
594
|
+
review: false,
|
|
595
|
+
},
|
|
593
596
|
});
|
|
594
597
|
```
|
|
595
598
|
|
|
@@ -599,17 +602,48 @@ export default createCoreRoutesPlugin({
|
|
|
599
602
|
});
|
|
600
603
|
```
|
|
601
604
|
|
|
602
|
-
|
|
605
|
+
`database` and `extensions` accept the values the old top-level flags did:
|
|
606
|
+
|
|
607
|
+
- `database: "read"` — default. Registers only `db-schema` and `db-query`;
|
|
603
608
|
agents inspect data with SQL but must use typed app actions for writes.
|
|
604
|
-
- `
|
|
609
|
+
- `database: "write"` or `true` — additionally registers `db-exec` and
|
|
605
610
|
`db-patch` for deliberate raw SQL maintenance. Writes are scoped to the
|
|
606
611
|
current user/org and schema changes are blocked.
|
|
607
|
-
- `
|
|
612
|
+
- `database: "off"` or `false` — removes raw database tools from the
|
|
608
613
|
agent surface so the app's actions are the only data access path.
|
|
609
|
-
- `
|
|
614
|
+
- `extensions: true` — opts the app into framework extension-management
|
|
610
615
|
actions and prompt guidance (`create-extension`, `update-extension`, etc.).
|
|
611
|
-
Set
|
|
612
|
-
are disabled by default.
|
|
616
|
+
Set `extensionTools: true` on the core-routes plugin as well to allow
|
|
617
|
+
authenticated REST creation. Extensions are disabled by default.
|
|
618
|
+
|
|
619
|
+
The remaining groups are booleans, all on by default: `sharing`, `review`,
|
|
620
|
+
`history`, `featureFlags`, `localization`, `audit`, `contextXray`,
|
|
621
|
+
`userProfile`, `automation`, `docs`, `resources`, `web`, `workspaceApps`,
|
|
622
|
+
`chat`, and `email`. Use `frameworkTools: "minimal"` to turn every group off at
|
|
623
|
+
once for a voice-first or single-purpose app, or
|
|
624
|
+
`frameworkTools: { preset: "minimal", resources: true }` to keep just one — an
|
|
625
|
+
explicit group key always wins over the preset.
|
|
626
|
+
|
|
627
|
+
Switching a group off removes it from the **agent** surfaces only: interactive
|
|
628
|
+
chat, MCP, A2A, and background runs. The matching HTTP action routes stay
|
|
629
|
+
mounted, because the UI reaches them through client hooks — disabling `sharing`
|
|
630
|
+
must not 404 a share dialog that is still on screen. Weigh that parity cost
|
|
631
|
+
before using it: the framework's contract is that anything the UI can do the
|
|
632
|
+
agent can do, so `sharing: false` alongside a visible share button is a
|
|
633
|
+
deliberate break, and only makes sense when the app has no such surface at all.
|
|
634
|
+
|
|
635
|
+
Framework tools are no longer promoted into the first model request by default,
|
|
636
|
+
independent of this option. They stay in the searchable registry and load
|
|
637
|
+
through `tool-search`, or immediately if the app names them in
|
|
638
|
+
`initialToolNames`.
|
|
639
|
+
|
|
640
|
+
<Callout tone="warning">
|
|
641
|
+
The top-level `databaseTools` and `extensionTools` options are deprecated in
|
|
642
|
+
favor of `frameworkTools.database` and `frameworkTools.extensions`. They are
|
|
643
|
+
still honored, but setting a top-level flag and its `frameworkTools`
|
|
644
|
+
equivalent to conflicting values throws at plugin startup rather than booting
|
|
645
|
+
with a tool surface nobody chose.
|
|
646
|
+
</Callout>
|
|
613
647
|
|
|
614
648
|
## Production Code Execution {#production-code-execution}
|
|
615
649
|
|
|
@@ -254,12 +254,19 @@ pnpm action db-query --sql "SELECT * FROM forms"
|
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
The production agent chat plugin defaults raw SQL tools to read-only
|
|
257
|
-
(`
|
|
258
|
-
`db-query` and perform writes through typed app actions. Set
|
|
259
|
-
`
|
|
260
|
-
|
|
261
|
-
`
|
|
262
|
-
|
|
257
|
+
(`frameworkTools: { database: "read" }`), so agents inspect app-owned data with
|
|
258
|
+
`db-schema` / `db-query` and perform writes through typed app actions. Set
|
|
259
|
+
`database: "write"` (or `true`) only for deliberate maintenance surfaces that
|
|
260
|
+
should also expose scoped `db-exec` / `db-patch`; set `database: "off"` /
|
|
261
|
+
`false` to require typed app actions for all data access.
|
|
262
|
+
|
|
263
|
+
`frameworkTools` governs the rest of the framework's own tools the same way —
|
|
264
|
+
sharing, review comments, version history, feature flags, localization, audit,
|
|
265
|
+
context X-Ray, profile, automations, docs, resources, web, cross-app delegation,
|
|
266
|
+
chat, and email. See
|
|
267
|
+
[Production Agent Tools](/docs/deployment#production-agent-tools) for the full
|
|
268
|
+
list, the `"minimal"` preset, and why disabling a group leaves its HTTP routes
|
|
269
|
+
mounted.
|
|
263
270
|
|
|
264
271
|
## Agent chat bridge {#agent-chat-bridge}
|
|
265
272
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.145.0",
|
|
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": {
|
|
@@ -412,8 +412,8 @@
|
|
|
412
412
|
"y-protocols": "^1.0.7",
|
|
413
413
|
"yjs": "^13.6.31",
|
|
414
414
|
"zod": "^4.3.6",
|
|
415
|
-
"@agent-native/
|
|
416
|
-
"@agent-native/
|
|
415
|
+
"@agent-native/recap-cli": "0.5.3",
|
|
416
|
+
"@agent-native/toolkit": "^0.13.3"
|
|
417
417
|
},
|
|
418
418
|
"devDependencies": {
|
|
419
419
|
"@ai-sdk/anthropic": "^3.0.71",
|
|
@@ -217,9 +217,12 @@ POST /_agent-native/extensions
|
|
|
217
217
|
|
|
218
218
|
HTTP creation is disabled by default. The host app must set
|
|
219
219
|
`extensionTools: true` on `createCoreRoutesPlugin()` as well as
|
|
220
|
-
`
|
|
221
|
-
return `403` while existing extension
|
|
222
|
-
remain available for compatibility.
|
|
220
|
+
`frameworkTools: { extensions: true }` on `createAgentChatPlugin()`; otherwise
|
|
221
|
+
authenticated collection `POST` requests return `403` while existing extension
|
|
222
|
+
runtime, read, edit, and deep-link routes remain available for compatibility.
|
|
223
|
+
(`extensionTools` on the agent-chat plugin is the deprecated spelling of
|
|
224
|
+
`frameworkTools.extensions`; the core-routes option keeps its own name because
|
|
225
|
+
it gates route mounting rather than agent tools.)
|
|
223
226
|
|
|
224
227
|
The action accepts:
|
|
225
228
|
|