Skip to content

@agent-native/core@0.174.0

Choose a tag to compare

@builder-io-integration builder-io-integration released this 25 Aug 17:33
· 4761 commits to main since this release
0c152fa

Minor Changes

  • b4c3864: Collapse the core-routes mcpConnect* options into one mcp object, and fix the MCP server name on multi-label hosts.

    createCoreRoutesPlugin({ mcp: { connect, serverName } }) replaces the four flat keys disableMcpConnect, mcpConnectServerName, mcpConnectAppId, and mcpConnectAppName — the same shape AgentChatMcpOptions already uses for the protocol mount. All four stay accepted for one minor; setting both forms to disagreeing values throws at plugin init rather than booting with a connect surface nobody chose.

    The two identity keys are deprecated outright rather than carried over: app.id and app.name are declared config fields, so a per-surface option for them is a third spelling of one thing. Unset, they now resolve from config — the same value the runtime config report already read.

    An explicit serverName is returned verbatim, prefix and all — it pins an id clients already hold in their config, which is why Plan publishes the bare plan rather than the derived agent-native-plan.

    Fixes the server name on hosts with more than one leading label. serverName fell back to the first hostname label, and every beta deployment is beta.<app>.agent-native.com, so all of them advertised themselves as agent-native-beta. Clients key their MCP config by that name, so connecting a second beta app replaced the first. Identity now resolves from app.id / app.template / app.slug before the hostname, which covers every first-party template with no configuration.

  • b4c3864: Resolve the app's name, slug, and description once, through app config.

    server/app-name.ts is removed. getAppName(), getAppSlug(), and getAppDescription() become getAppConfig().app.name / .slug / .description, and the first-party-template lookup they performed now runs over the resolved config, keyed on app.packageName (npm_package_name). It fills only what is still unset, so APP_NAME or a defineAppConfig() value always wins.

    getAppConfig() no longer touches the filesystem. getAppName() read package.json from process.cwd() on every resolution path; the repo already treats that as a development-only fallback (server/cookie-namespace.ts uses one solely in its non-production branch). A deployment where npm_package_name does not reach the runtime should set app.name in server/plugins/config.ts or APP_NAME.

    This removes a second resolver for a declared field: getAppName() read process.env.APP_NAME directly while app.name already declared that alias, so the two disagreed. core-routes-plugin.ts resolved the same app name both ways, thirty lines apart — the runtime config report got undefined for every first-party template while the MCP connect page got "Mail". Both now read one value.

    app.slug and app.description are new fields with no env alias: the slug selects the per-app transactional email sender on agent-native.com, so a name the first-party template table already contains is its only source. app.packageName and app.template are deliberately still env-only — both are read as app-id fallbacks when matching stored workspace connection grants, and filling them from package.json would repoint those lookups.

    A package.json that exists but cannot be read or parsed now throws and names the file, instead of being silently indistinguishable from having none — which previously branded the app "Agent Native" and sent from the generic mailbox with nothing in the log.

  • b4c3864: Deprecate createAgentChatPlugin({ model }) and ({ durableBackgroundRuns }) in favour of the declared agent.* config surface.

    agent.model (AGENT_MODEL) was declared but no agent-chat path read it — every model resolution site read the plugin option directly, so the field was inert. It is now the layer beneath the option, resolved through one helper instead of eight raw reads.

    Fixes two delegated-run gates (A2A and MCP) that tested durableBackgroundRuns === true on the raw option instead of calling isAgentChatDurableBackgroundEnabled. On Netlify, where durable background is default-on, a mount that did not pass the option was capping delegated turns at the 40s foreground chunk budget while running inside the 13-minute background function.

  • b4c3864: Move observability settings out of the settings table and into defineAppConfig().

    observability is now a declared config domain. The observability-config settings row is no longer read: nothing in core ever wrote it, so its only "UI" was a documented putSetting(...) snippet an app author pasted into their own code — which makes it deployment configuration, not a runtime preference. Deployments that wrote that row must move those values into defineAppConfig({ observability: { … } }); every field also has a deployment environment variable alias.

    This also takes a database round-trip off the agent hot path. getObservabilityConfig() read the settings row on every instrumented run inside a bare catch {}, so a database outage was indistinguishable from "never configured" and silently served defaults.

    defineAppConfig() now returns a Nitro plugin, so its canonical home is server/plugins/config.ts with export default defineAppConfig({ … }) — the same shape as every other framework plugin. The config layer is still applied at module load, before any plugin reads it. Existing callers that ignore the return value are unaffected.

    Removed: ObservabilityConfig.exporters and ObservabilityExporterConfig. Nothing ever read them — observability/tracing.ts states that core deliberately registers no OpenTelemetry provider or exporter — so the documented OTLP export never sent anything, and the docs recommended putting a backend bearer token into the settings table to configure it. Export now happens by registering a TracerProvider in the app, which keeps the credential in the app's own wiring and the vault.

    Removed: DEFAULT_OBSERVABILITY_CONFIG. The schema's declared defaults are the single source now.

Patch Changes

  • d9e978f: Expose model-produced tool inputs to eval scorers so argument-level agent behavior can be verified.
  • 536e193: Compile oversized PostHog transcript bounding against ES2022 by walking the last user message instead of using Array.findLast.
  • Release all public npm packages with a patch version bump.
  • f22b29b: Validate OpenRouter keys before saving them and preserve actionable provider setup errors.
  • eae6742: Stop SQL-replayed provider authentication failures from self-continuing.
  • Updated dependencies
    • @agent-native/recap-cli@0.5.11
    • @agent-native/toolkit@0.16.14