run402 4.109.1 → 4.110.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/README.md CHANGED
@@ -253,7 +253,7 @@ import { db, adminDb, auth, email, ai } from "@run402/functions";
253
253
 
254
254
  ### Same-origin web routes
255
255
 
256
- `run402 deploy` accepts `site.public_paths` for clean static browser URLs and `routes.replace` for function ingress or exact method-aware static aliases. Release asset paths such as `events.html` are distinct from public paths such as `/events`: prefer `{ "site": { "replace": { "events.html": { "data": "<h1>Events</h1>" } }, "public_paths": { "mode": "explicit", "replace": { "/events": { "asset": "events.html" } } } } }` for ordinary clean static URLs. In explicit mode `/events.html` is not public unless separately declared; `mode: "implicit"` restores filename-derived reachability and can widen access. `site.embedding.frame_ancestors` (catalog keys, e.g. `["localhost"]`, never raw origins) lets the named embedders put the site in an iframe: the gateway sends `Content-Security-Policy: frame-ancestors http://localhost:* http://127.0.0.1:*` and drops `X-Frame-Options` on every response of the host; omitted on a later apply carries the previous declaration forward, `null` returns to deny, unknown keys fail `INVALID_SPEC` naming the valid ones, and `/_run402/config.json` discloses the effective policy cross-origin so an embedder can check before framing. `site.sign_in_path` (e.g. `"/join"`) names the app's own same-origin sign-in page: a signed-out user reaching MCP authorization (`/_run402/oauth/authorize`) is sent there with `returnTo` appended instead of the hosted `/auth/sign-in`; omitted carries forward, `null` returns to the hosted page, and a value with a query/fragment, `//`, `://`, or a `/_run402/` or `/auth/` prefix fails `INVALID_SPEC` on `site.sign_in_path`. `routes.replace` is an array of route entries, not a path-keyed map. Use exact `/admin` plus final-wildcard `/admin/*` for a routed section root, narrow `/api/*` methods such as `["GET","POST","OPTIONS"]`, POST-only `/login` function routes, and exact static route targets like `{ "pattern": "/events", "methods": ["GET","HEAD"], "target": { "type": "static", "file": "events.html" } }` only for route-table alias behavior. Static route `file` is a release asset path, not a public path, URL, CAS hash, rewrite, or redirect. Recipe — static home page + SPA shell: a root alias `{ "pattern": "/", "target": { "type": "static", "file": "home.html" } }` (with `home.html` at the site root) serves real static bytes at `GET /` (`route_static_alias`) while unmatched app routes keep the `index.html` shell (`spa_fallback`); expect non-blocking `STATIC_ALIAS_SHADOWS_STATIC_PATH` (warn) / `STATIC_ALIAS_DUPLICATE_CANONICAL_URL` (info) plan lints and verify with `run402 deploy resolve --url https://<your-site>/ --method GET`. Routed functions use Node 22 Fetch Request -> Response; `req.url` is the full public URL on managed subdomains, deployment hosts, and verified custom domains. Direct `/functions/v1/:name` remains API-key protected. Known resolve literals include `host_missing`, `manifest_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `none`, `static_exact`, `static_index`, `spa_fallback`, `spa_fallback_missing`, `route_function`, `route_static_alias`, and `route_method_miss`; known `authorization_result` values include `authorized`, `not_public`, `not_applicable`, `manifest_missing`, `target_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `missing_cas_object`, `unfinalized_or_deleting_cas_object`, `size_mismatch`, and `unauthorized_cas_object`. Known `fallback_state` values include `active_release_missing`, `unsupported_manifest_version`, and `negative_cache_hit`; preserve unknown future strings. Release inventories may include `static_public_paths` with `public_path`, `asset_path`, `reachability_authority`, and `direct`; resolve may return the same reachability fields plus `authorization_result`, `cas_object`, `response_variant`, and route/static fields like `allow`, `route_pattern`, `target_type`, `target_name`, and `target_file`. Static route target warnings include `STATIC_ALIAS_SHADOWS_STATIC_PATH`, `STATIC_ALIAS_RELATIVE_ASSET_RISK`, `STATIC_ALIAS_DUPLICATE_CANONICAL_URL`, `STATIC_ALIAS_EXTENSIONLESS_NON_HTML`, and `STATIC_ALIAS_TABLE_NEAR_LIMIT`; inspect active routes, `static_public_paths`, and the backing `asset_path`. Runtime route failure codes to branch on: `ROUTE_MANIFEST_LOAD_FAILED`, `ROUTED_INVOKE_WORKER_SECRET_MISSING`, `ROUTED_INVOKE_AUTH_FAILED`, `ROUTED_ROUTE_STALE`, `ROUTE_METHOD_NOT_ALLOWED`, and `ROUTED_RESPONSE_TOO_LARGE`.
256
+ `run402 deploy` accepts `site.public_paths` for clean static browser URLs and `routes.replace` for function ingress or exact method-aware static aliases. Release asset paths such as `events.html` are distinct from public paths such as `/events`: prefer `{ "site": { "replace": { "events.html": { "data": "<h1>Events</h1>" } }, "public_paths": { "mode": "explicit", "replace": { "/events": { "asset": "events.html" } } } } }` for ordinary clean static URLs. In explicit mode `/events.html` is not public unless separately declared; `mode: "implicit"` restores filename-derived reachability and can widen access. `site.embedding.frame_ancestors` (catalog keys, e.g. `["localhost"]`, never raw origins) lets the named embedders put the site in an iframe: the gateway sends `Content-Security-Policy: frame-ancestors http://localhost:* http://127.0.0.1:*` and drops `X-Frame-Options` on every response of the host; omitted on a later apply carries the previous declaration forward, `null` returns to deny, unknown keys fail `INVALID_SPEC` naming the valid ones, and `/_run402/config.json` discloses the effective policy cross-origin so an embedder can check before framing. `site.sign_in_path` (e.g. `"/join"`) names the app's own same-origin sign-in page: a signed-out user reaching MCP authorization (`/_run402/oauth/authorize`) is sent there with `returnTo` appended instead of the hosted `/auth/sign-in`; omitted carries forward, `null` returns to the hosted page, and a value with a query/fragment, `//`, `://`, or a `/_run402/` or `/auth/` prefix fails `INVALID_SPEC` on `site.sign_in_path`. `site.noindex: true` adds `X-Robots-Tag: noindex, nofollow, nosnippet` to every response of the host; omitted carries forward, `false` or `null` makes the host indexable again, and anything but a boolean or `null` fails `INVALID_SPEC` on `site.noindex`. `routes.replace` is an array of route entries, not a path-keyed map. Use exact `/admin` plus final-wildcard `/admin/*` for a routed section root, narrow `/api/*` methods such as `["GET","POST","OPTIONS"]`, POST-only `/login` function routes, and exact static route targets like `{ "pattern": "/events", "methods": ["GET","HEAD"], "target": { "type": "static", "file": "events.html" } }` only for route-table alias behavior. Static route `file` is a release asset path, not a public path, URL, CAS hash, rewrite, or redirect. Recipe — static home page + SPA shell: a root alias `{ "pattern": "/", "target": { "type": "static", "file": "home.html" } }` (with `home.html` at the site root) serves real static bytes at `GET /` (`route_static_alias`) while unmatched app routes keep the `index.html` shell (`spa_fallback`); expect non-blocking `STATIC_ALIAS_SHADOWS_STATIC_PATH` (warn) / `STATIC_ALIAS_DUPLICATE_CANONICAL_URL` (info) plan lints and verify with `run402 deploy resolve --url https://<your-site>/ --method GET`. Routed functions use Node 22 Fetch Request -> Response; `req.url` is the full public URL on managed subdomains, deployment hosts, and verified custom domains. Direct `/functions/v1/:name` remains API-key protected. Known resolve literals include `host_missing`, `manifest_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `none`, `static_exact`, `static_index`, `spa_fallback`, `spa_fallback_missing`, `route_function`, `route_static_alias`, and `route_method_miss`; known `authorization_result` values include `authorized`, `not_public`, `not_applicable`, `manifest_missing`, `target_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `missing_cas_object`, `unfinalized_or_deleting_cas_object`, `size_mismatch`, and `unauthorized_cas_object`. Known `fallback_state` values include `active_release_missing`, `unsupported_manifest_version`, and `negative_cache_hit`; preserve unknown future strings. Release inventories may include `static_public_paths` with `public_path`, `asset_path`, `reachability_authority`, and `direct`; resolve may return the same reachability fields plus `authorization_result`, `cas_object`, `response_variant`, and route/static fields like `allow`, `route_pattern`, `target_type`, `target_name`, and `target_file`. Static route target warnings include `STATIC_ALIAS_SHADOWS_STATIC_PATH`, `STATIC_ALIAS_RELATIVE_ASSET_RISK`, `STATIC_ALIAS_DUPLICATE_CANONICAL_URL`, `STATIC_ALIAS_EXTENSIONLESS_NON_HTML`, and `STATIC_ALIAS_TABLE_NEAR_LIMIT`; inspect active routes, `static_public_paths`, and the backing `asset_path`. Runtime route failure codes to branch on: `ROUTE_MANIFEST_LOAD_FAILED`, `ROUTED_INVOKE_WORKER_SECRET_MISSING`, `ROUTED_INVOKE_AUTH_FAILED`, `ROUTED_ROUTE_STALE`, `ROUTE_METHOD_NOT_ALLOWED`, and `ROUTED_RESPONSE_TOO_LARGE`.
257
257
 
258
258
  ### Secrets
259
259
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.109.1",
3
+ "version": "4.110.0",
4
4
  "description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/namespaces/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAwB3C,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EAQtB,WAAW,EACX,oBAAoB,EAEpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EAIvB,sBAAsB,EACtB,oBAAoB,EAUpB,iBAAiB,EAGjB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAGlB,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAyG3B,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;OAIG;IACG,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IAmD9E;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI3E;;;;OAIG;IACG,IAAI,CACR,IAAI,EAAE,WAAW,EACjB,IAAI,GAAE;QACJ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EA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+BnE;;;;OAIG;IACG,OAAO,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAW1E;AAqrED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;iEAG6D;IAC7D,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;CACvC;AAm7ED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD"}
@@ -1103,22 +1103,26 @@ function siteToCoreSpec(site) {
1103
1103
  ...(site.public_paths ? { public_paths: site.public_paths } : {}),
1104
1104
  };
1105
1105
  }
1106
- // tenant-site-embedding and site.sign_in_path never reach core: both are
1107
- // gateway-owned and core validates site keys against its own list.
1106
+ // tenant-site-embedding, site.sign_in_path, and site.noindex never reach
1107
+ // core: all three are gateway-owned and core validates site keys against
1108
+ // its own list.
1108
1109
  return site.public_paths ? { public_paths: site.public_paths } : {};
1109
1110
  }
1110
1111
  function siteToWire(site) {
1111
1112
  // tenant-site-embedding: `null` is a meaningful value on the wire (clear), so
1112
1113
  // it is carried whenever the key is present, unlike public_paths.
1113
- // site.sign_in_path follows the same rule (`null` clears back to the hosted page).
1114
+ // site.sign_in_path follows the same rule (`null` clears back to the hosted page),
1115
+ // and so does site.noindex (`false` or `null` clears back to indexable).
1114
1116
  const embedding = "embedding" in site && site.embedding !== undefined ? { embedding: site.embedding } : {};
1115
1117
  const signInPath = "sign_in_path" in site && site.sign_in_path !== undefined ? { sign_in_path: site.sign_in_path } : {};
1118
+ const noindex = "noindex" in site && site.noindex !== undefined ? { noindex: site.noindex } : {};
1116
1119
  if ("replace" in site && site.replace) {
1117
1120
  return {
1118
1121
  replace: fileSetToWire(site.replace),
1119
1122
  ...(site.public_paths ? { public_paths: site.public_paths } : {}),
1120
1123
  ...embedding,
1121
1124
  ...signInPath,
1125
+ ...noindex,
1122
1126
  };
1123
1127
  }
1124
1128
  if ("patch" in site && site.patch) {
@@ -1130,12 +1134,14 @@ function siteToWire(site) {
1130
1134
  ...(site.public_paths ? { public_paths: site.public_paths } : {}),
1131
1135
  ...embedding,
1132
1136
  ...signInPath,
1137
+ ...noindex,
1133
1138
  };
1134
1139
  }
1135
1140
  return {
1136
1141
  ...(site.public_paths ? { public_paths: site.public_paths } : {}),
1137
1142
  ...embedding,
1138
1143
  ...signInPath,
1144
+ ...noindex,
1139
1145
  };
1140
1146
  }
1141
1147
  function i18nToWire(i18n) {
@@ -2371,7 +2377,7 @@ const FUNCTION_SPEC_FIELDS = new Set([
2371
2377
  const FUNCTION_CONFIG_FIELDS = new Set(["timeoutSeconds", "memoryMb"]);
2372
2378
  const FUNCTION_TRIGGER_FIELDS = new Set(["id", "type", "cron", "timezone", "misfire_policy", "overlap_policy", "mailbox", "events", "run"]);
2373
2379
  const FUNCTION_TRIGGER_RUN_FIELDS = new Set(["event_type", "payload", "retry", "expires_after_seconds"]);
2374
- const SITE_SPEC_FIELDS = new Set(["replace", "patch", "public_paths", "embedding", "sign_in_path"]);
2380
+ const SITE_SPEC_FIELDS = new Set(["replace", "patch", "public_paths", "embedding", "sign_in_path", "noindex"]);
2375
2381
  const SITE_PATCH_FIELDS = new Set(["put", "delete"]);
2376
2382
  const SITE_PUBLIC_PATHS_FIELDS = new Set(["mode", "replace"]);
2377
2383
  const PUBLIC_STATIC_PATH_FIELDS = new Set(["asset", "cache_class"]);
@@ -2710,6 +2716,17 @@ function validateSiteSpec(site) {
2710
2716
  if (obj.sign_in_path !== undefined) {
2711
2717
  validateSiteSignInPath(obj.sign_in_path, "site.sign_in_path");
2712
2718
  }
2719
+ if (obj.noindex !== undefined) {
2720
+ validateSiteNoindex(obj.noindex, "site.noindex");
2721
+ }
2722
+ }
2723
+ /** site.noindex. `true` = every response of the host carries
2724
+ * `X-Robots-Tag: noindex, nofollow, nosnippet`; `false` or `null` clears back
2725
+ * to indexable; omitted carries forward. */
2726
+ function validateSiteNoindex(value, resource) {
2727
+ if (value === null || typeof value === "boolean")
2728
+ return;
2729
+ throw invalidSpec(`ReleaseSpec.${resource} must be true, false, or null; send true to add X-Robots-Tag: noindex, nofollow, nosnippet to every response of the host, false or null to make it indexable again, or omit ${resource} to carry the previous value forward`, resource);
2713
2730
  }
2714
2731
  /** site.sign_in_path. Structural check only (the gateway is authoritative on
2715
2732
  * the reserved prefixes and the full rule set): a same-origin absolute path
@@ -3089,6 +3106,10 @@ function hasSiteContent(site) {
3089
3106
  if (site && typeof site === "object" && "sign_in_path" in site && site.sign_in_path !== undefined) {
3090
3107
  return true;
3091
3108
  }
3109
+ // site.noindex: same rule, true/false/null is content.
3110
+ if (site && typeof site === "object" && "noindex" in site && site.noindex !== undefined) {
3111
+ return true;
3112
+ }
3092
3113
  if (!isRecord(site))
3093
3114
  return false;
3094
3115
  if (hasRecordEntries(site.replace))
@@ -3545,6 +3566,10 @@ async function normalizeReleaseSpec(client, spec, opts = {}) {
3545
3566
  const signInPath = "sign_in_path" in spec.site && spec.site.sign_in_path !== undefined
3546
3567
  ? { sign_in_path: spec.site.sign_in_path }
3547
3568
  : {};
3569
+ // site.noindex: present (boolean or null) travels as-is.
3570
+ const noindex = "noindex" in spec.site && spec.site.noindex !== undefined
3571
+ ? { noindex: spec.site.noindex }
3572
+ : {};
3548
3573
  if ("replace" in spec.site && spec.site.replace) {
3549
3574
  const map = await normalizeFileSet(spec.site.replace, rememberRelease);
3550
3575
  // Re-check post-expansion so `dir("dist")` (a LocalDirRef whose keys are
@@ -3555,6 +3580,7 @@ async function normalizeReleaseSpec(client, spec, opts = {}) {
3555
3580
  ...(publicPaths ? { public_paths: publicPaths } : {}),
3556
3581
  ...embedding,
3557
3582
  ...signInPath,
3583
+ ...noindex,
3558
3584
  };
3559
3585
  }
3560
3586
  else if ("patch" in spec.site && spec.site.patch) {
@@ -3570,13 +3596,15 @@ async function normalizeReleaseSpec(client, spec, opts = {}) {
3570
3596
  ...(publicPaths ? { public_paths: publicPaths } : {}),
3571
3597
  ...embedding,
3572
3598
  ...signInPath,
3599
+ ...noindex,
3573
3600
  };
3574
3601
  }
3575
- else if (publicPaths || "embedding" in embedding || "sign_in_path" in signInPath) {
3602
+ else if (publicPaths || "embedding" in embedding || "sign_in_path" in signInPath || "noindex" in noindex) {
3576
3603
  normalized.site = {
3577
3604
  ...(publicPaths ? { public_paths: publicPaths } : {}),
3578
3605
  ...embedding,
3579
3606
  ...signInPath,
3607
+ ...noindex,
3580
3608
  };
3581
3609
  }
3582
3610
  }