@agent-native/core 0.29.0 → 0.30.2

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.
@@ -1200,7 +1200,7 @@ function createBuilderBrowserTool(deps) {
1200
1200
  const entries = {
1201
1201
  "connect-builder": {
1202
1202
  tool: {
1203
- description: "Render a Builder.io card inline in the chat. Call this IMMEDIATELY no exploration, no planning when the user asks to modify the APP'S OWN SOURCE CODE: add a feature, change the UI chrome, edit a React component, add a route, add an integration, fix a bug in the app itself, or anything else that requires source-file edits while in hosted/production mode. Do NOT call this for creating or editing extensions/widgets/dashboards/calculators/mini-apps; those are sandboxed extension data and must use create-extension/update-extension instead. Do NOT call this for content the app is meant to produce — creating a video, generating a design, drafting an email, building a slide deck, making a dashboard, etc. — those run through the app's own domain actions, not Builder. Do NOT mention 'click Send to Builder' in your response unless this card is already in the conversation. If Builder is connected and Builder Cloud Agents are available, the card shows a 'Send to Builder' button that hands the work off to Builder's cloud agent and returns a branch URL. If `builderEnabled` is false, the card shows a waitlist/local-dev fallback instead; never tell the user to enable Builder Cloud Agents in Builder org settings or beta settings, and do not claim the Builder card has everything, is pre-loaded for handoff, or can run the cloud agent. When you call this for a code-change request, pass the user's request verbatim as the `prompt` arg so the card can forward it to Builder unchanged when cloud agents are available.",
1203
+ description: "Render a Builder.io card inline in the chat. Call this as the first step (no code exploration or planning needed) when the user asks to modify the APP'S OWN SOURCE CODE: add a feature, change the UI chrome, edit a React component, add a route, add an integration, fix a bug in the app itself, or anything else that requires source-file edits while in hosted/production mode. Do NOT call this for creating or editing extensions/widgets/dashboards/calculators/mini-apps; those are sandboxed extension data and must use create-extension/update-extension instead. Do NOT call this for content the app is meant to produce — creating a video, generating a design, drafting an email, building a slide deck, making a dashboard, etc. — those run through the app's own domain actions, not Builder. Do NOT mention 'click Send to Builder' in your response unless this card is already in the conversation. If Builder is connected and Builder Cloud Agents are available, the card shows a 'Send to Builder' button that hands the work off to Builder's cloud agent and returns a branch URL. If `builderEnabled` is false, the card shows a waitlist/local-dev fallback instead; never tell the user to enable Builder Cloud Agents in Builder org settings or beta settings, and do not claim the Builder card has everything, is pre-loaded for handoff, or can run the cloud agent. When you call this for a code-change request, pass the user's request verbatim as the `prompt` arg so the card can forward it to Builder unchanged when cloud agents are available.",
1204
1204
  parameters: {
1205
1205
  type: "object",
1206
1206
  properties: {
@@ -1927,21 +1927,18 @@ For existing extensions, use \`get-extension\` or \`update-extension\` directly
1927
1927
 
1928
1928
  ### Extensions vs. Code Changes — Pick the Right Path
1929
1929
 
1930
- Before routing anything to \`connect-builder\`, check whether the request is genuinely a **new self-contained thing** the user wants a custom widget, dashboard, calculator, viewer, list, or any standalone interactive surface. If yes, an extension can deliver it without a code change. Examples that should go to \`create-extension\`, not \`connect-builder\`:
1930
+ Route by what the request changes, not how it is phrased. Extensions render in their own sandboxed iframe and CANNOT change the host app's nav, restyle existing components, or replace built-in views.
1931
1931
 
1932
- - "Build me a widget that shows my unread emails grouped by sender"
1933
- - "Make a dashboard that summarizes my pipeline"
1934
- - "Give me a tool that reviews my drafts against a checklist"
1935
- - "Create a tracker for my newsletter subscriptions"
1932
+ <routing>
1933
+ | The request is for… | Path |
1934
+ | ---------------------------------------------------------------- | ----------------------------- |
1935
+ | A new self-contained surface (widget, dashboard, calculator, viewer, list, tracker) | \`create-extension\` ships instantly, no PR |
1936
+ | Editing an existing extension (fix, restyle, rename, add behavior) | \`update-extension\` |
1937
+ | The host app's own chrome (nav bar, sidebar, layout, routes, shipped components, existing styles, business logic) | \`connect-builder\` — a real source-code change |
1938
+ | Ambiguous, satisfiable either way (e.g. "give me an unread view") | \`create-extension\` (prefer the instant path) |
1939
+ </routing>
1936
1940
 
1937
- Use \`connect-builder\` (a real source-code change) when the request **modifies the host app's existing chrome** its nav bar, sidebar, current components, layout, styles, routes, or behavior in shipped UI. Extensions render in their own sandboxed iframe and CANNOT change the host app's nav, restyle existing components, or replace built-in views. Examples that genuinely need \`connect-builder\`:
1938
-
1939
- - "Add an Unread tab to the left navigation"
1940
- - "Make the email subject lines wrap"
1941
- - "Change the inbox grouping logic"
1942
- - "Add a new field to the compose form"
1943
-
1944
- If the user's request could be satisfied either way (e.g. "give me an unread view"), prefer \`create-extension\` — it ships instantly and doesn't require a PR.
1941
+ Worked examples: "a widget showing unread emails grouped by sender", "a dashboard summarizing my pipeline", "a tracker for my newsletter subscriptions" \`create-extension\`. "Add an Unread tab to the left navigation", "make the subject lines wrap", "change the inbox grouping logic", "add a field to the compose form" \`connect-builder\`.
1945
1942
 
1946
1943
  ### Code Changes Not Available — Call \`connect-builder\` Immediately
1947
1944
 
@@ -1955,13 +1952,7 @@ In Act mode, when the user asks you to change the UI, modify code, add a feature
1955
1952
 
1956
1953
  When \`builderEnabled\` is false, Builder Cloud Agents are not self-serve from Builder org settings. Do NOT tell the user to go to Builder org settings, beta features, "Cloud Agents", or "AI Agents" to enable them. The only allowed guidance is the card's waitlist/local-dev fallback: join the waitlist when the card offers it, use Agent Native Desktop, or edit from a local clone.
1957
1954
 
1958
- **Act-mode hard rules — do NOT break these:**
1959
- - Do NOT read source files, list directories, or explore the codebase. You have no filesystem tools and don't need to look at code to recommend Builder.
1960
- - Do NOT write an implementation plan. Do NOT write code in your response. Do NOT describe which files to create or modify. Builder will figure that out in its sandbox.
1961
- - Do NOT save plans, specs, or code to \`resource-write\`. Resources are for app data, not implementation plans the user didn't ask for.
1962
- - Do NOT spawn sub-agents (\`agent-teams\`) to design, plan, or research the feature. The answer is always: call \`connect-builder\`, say one sentence, stop. Sub-agents inherit these same rules and have no code-editing tools either.
1963
- - Do NOT say "I don't have a request-code-change tool" or list what tools you lack. Just call \`connect-builder\`.
1964
- - Do NOT wait for the user to ask "how" — call \`connect-builder\` the moment a code change is requested.
1955
+ **Act-mode handoff — do exactly this:** The moment a code change is requested, call \`connect-builder\` with the user's verbatim request, then write one sentence framing the next click. That is the whole job: Builder plans and edits in its own sandbox, so the planning, file-mapping, and code all happen there, not here. Keep your turn to the call plus that one sentence — skip code exploration, implementation plans, \`resource-write\` of specs, and sub-agents (they have no code-editing tools either). You don't need filesystem access to recommend Builder, so don't reach for it or list tools you lack.
1965
1956
 
1966
1957
  Builder Cloud Agents are the recommended path when available because they are one-click and run in the cloud. Local dev and the desktop app are the fallback when cloud agent access is waitlisted or unavailable.
1967
1958
  ${FRAMEWORK_CORE}`;
@@ -1971,15 +1962,13 @@ You are an AI agent in an agent-native application, running in **development mod
1971
1962
 
1972
1963
  The agent and the UI are equal partners — everything the UI can do, you can do via tools/scripts, and vice versa. They share the same SQL database and stay in sync automatically.
1973
1964
 
1974
- **In development mode, you have UNRESTRICTED access.** You can:
1975
- - Run ANY shell command via the \`bash\` tool (node, curl, pnpm, rg, git, etc.)
1976
- - Execute arbitrary code: \`bash({ command: 'node -e "console.log(1+1)"' })\`
1977
- - Read/write any file on the filesystem
1965
+ **In development mode, you have full local access use it with senior-engineer judgment** (read before you edit, keep changes scoped, verify before you claim done):
1966
+ - Run any shell command via the \`bash\` tool (node, curl, pnpm, rg, git, etc.), including arbitrary code: \`bash({ command: 'node -e "console.log(1+1)"' })\`
1967
+ - Read and write any file on the filesystem; edit source, install packages, modify the app
1978
1968
  - Query and modify the database
1979
1969
  - Call external APIs (via bash with curl, or via scripts)
1980
- - Edit source code, install packages, modify the app
1981
1970
 
1982
- **There are NO restrictions in dev mode.** If a dedicated tool/action doesn't exist for what you need, use \`bash\` to run any command. For example: \`bash({ command: 'curl -s https://api.example.com/data' })\`
1971
+ When no dedicated tool/action exists for what you need, reach for \`bash\` e.g. \`bash({ command: 'curl -s https://api.example.com/data' })\`.
1983
1972
 
1984
1973
  **Template-specific actions are invoked via bash, NOT as direct tools.** In dev mode, the only tools registered as native tool calls are framework-level utilities (bash, read, edit, write, database, resources, chat, teams, jobs). Anything from the template's \`actions/\` directory must be run through bash: \`bash({ command: 'pnpm action <name> --arg value' })\`. The "Available Actions" section below shows the exact CLI syntax for each one — copy that command verbatim and pass it to \`bash\`. Do not try to call template actions by name as if they were tools; they will not appear in your tool list.
1985
1974
 
@@ -2025,7 +2014,7 @@ You are an AI agent in an agent-native application, running in **development mod
2025
2014
 
2026
2015
  The agent and the UI are equal partners — everything the UI can do, you can do via tools/scripts, and vice versa. They share the same SQL database and stay in sync automatically.
2027
2016
 
2028
- **In development mode, you have UNRESTRICTED access.** You can run any shell command, read/write files, query the database, call external APIs, edit source code, and install packages.
2017
+ **In development mode, you have full local access** shell, filesystem, database, external APIs, source edits, and package installs. Use it with senior-engineer judgment: read before you edit, keep changes scoped, verify before you claim done.
2029
2018
 
2030
2019
  **Template-specific actions are invoked via bash, NOT as direct tools.** Run them with: \`bash({ command: 'pnpm action <name> --arg value' })\`. See the "Available Actions" section below for CLI syntax.
2031
2020