@agent-native/core 0.121.0 → 0.121.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.121.0",
3
+ "version": "0.121.2",
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": {
@@ -114,10 +114,15 @@ function isNetlifyHostedRuntimeForDispatch(): boolean {
114
114
  if (process.env.NETLIFY_LOCAL === "true") return false;
115
115
  if (process.env.NETLIFY === "false") return false;
116
116
  if (process.env.NETLIFY && process.env.NETLIFY !== "false") return true;
117
- // Netlify sets AWS Lambda runtime env on deployed Functions, but the build-time
118
- // NETLIFY flag is not always present in the runtime isolate. Treat Lambda as
119
- // Netlify here unless Netlify was explicitly disabled above; non-Netlify AWS
120
- // falls back inline if the /.netlify/functions dispatch fast-fails.
117
+ // NETLIFY is a build-only read-only variable. In deployed Functions Netlify
118
+ // documents URL, SITE_NAME, and SITE_ID as the runtime read-only variables;
119
+ // SITE_ID is the unambiguous host marker. Lambda compatibility mode also
120
+ // exposes AWS runtime variables, so keep the function-name fallback for older
121
+ // deploys. Without either check a modern Netlify Function silently selects the
122
+ // portable framework route even though the emitted background function exists.
123
+ if (process.env.SITE_ID) return true; // guard:allow-env-credential -- Netlify's read-only public site identifier is a runtime host marker, not a user credential.
124
+ // Non-Netlify AWS falls back inline if the /.netlify/functions dispatch
125
+ // fast-fails.
121
126
  return Boolean(process.env.AWS_LAMBDA_FUNCTION_NAME);
122
127
  }
123
128
 
@@ -202,6 +207,9 @@ export const AGENT_CHAT_BACKGROUND_RUN_FIELD = "__backgroundRun";
202
207
  * what "hosted" means.
203
208
  */
204
209
  export function isHostedRuntimeForDurableBackground(): boolean {
210
+ if (process.env.NETLIFY_LOCAL === "true") return false;
211
+ if (process.env.NETLIFY === "false") return false;
212
+ if (process.env.SITE_ID) return true; // guard:allow-env-credential -- Netlify's read-only public site identifier is a runtime host marker, not a user credential.
205
213
  if (
206
214
  process.env.NETLIFY &&
207
215
  process.env.NETLIFY !== "false" &&
@@ -319,6 +319,9 @@ export interface ResolveRunSoftTimeoutOptions {
319
319
  * that clamp (and the platform wall behind it) exists.
320
320
  */
321
321
  export function isHostedRuntime(): boolean {
322
+ if (process.env.NETLIFY_LOCAL === "true") return false;
323
+ if (process.env.NETLIFY === "false") return false;
324
+ if (process.env.SITE_ID) return true; // guard:allow-env-credential -- Netlify's read-only public site identifier is a runtime host marker, not a user credential.
322
325
  if (
323
326
  process.env.NETLIFY &&
324
327
  process.env.NETLIFY !== "false" &&