@netlify/agent-runner-cli 1.135.0-prod-901.1 → 1.135.1

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.
@@ -12,9 +12,14 @@ provider SDKs work without API keys or configuration.
12
12
 
13
13
  ## How It Works
14
14
 
15
- Netlify sets provider-specific environment variables in all compute contexts (Functions, Edge Functions, server-side
16
- framework code). Official SDKs auto-detect these variables, so a default constructor like `new OpenAI()` works
17
- out of the box. Requests are proxied through AI Gateway and billed to your Netlify account credits.
15
+ Netlify injects provider-specific environment variables at runtime, and official SDKs auto-detect them — a default
16
+ constructor like `new OpenAI()` works out of the box. Requests are proxied through AI Gateway and billed to your
17
+ Netlify account credits.
18
+
19
+ > [!IMPORTANT]
20
+ > Write AI functions with modern syntax — **v2** (`export default async (req: Request) => Response`) or **v3** (object
21
+ > export `satisfies NetlifyFunction`). Credentials are injected by the modern function runtime only: a legacy **v1**
22
+ > function (`exports.handler`) gets no key at runtime and 500s with "missing API key" even though the build passes.
18
23
 
19
24
  Netlify **never overrides** environment variables you have already set. The check is per-provider: if you set your own
20
25
  `OPENAI_API_KEY`, Netlify will not set `OPENAI_API_KEY` or `OPENAI_BASE_URL`, but will still inject Anthropic and
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@netlify/agent-runner-cli",
3
3
  "type": "module",
4
- "version": "1.135.0-prod-901.1",
4
+ "version": "1.135.1",
5
5
  "description": "CLI tool for running Netlify agents",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -302,18 +302,10 @@ const main = async () => {
302
302
  )
303
303
  }
304
304
 
305
- main().catch(async (err) => {
305
+ main().catch((err) => {
306
306
  // Include argv on error so argument-passing bugs (e.g. shells dropping a
307
307
  // quoted value) are visible without dumping argv on every successful run.
308
308
  process.stderr.write(`[deploy] error: ${err.message ?? err}\n`)
309
309
  process.stderr.write(`[deploy] argv: ${JSON.stringify(rawArgv)}\n`)
310
- // Also surface the failure in the axis report: stderr only reaches the
311
- // runner console, so without this a failed deploy leaves no trace where
312
- // people actually look for the preview link.
313
- try {
314
- await writeAxisOutput(`## Netlify deploy — FAILED\n\n\`\`\`\n${err.message ?? err}\n\`\`\`\n`)
315
- } catch {
316
- // best-effort — never mask the original error
317
- }
318
310
  process.exit(1)
319
311
  })
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
5
- cd "$ROOT_DIR"
6
-
7
- SCENARIOS="${1:-budget-compare-*}"
8
- AGENTS="${2:-claude-budget|*}"
9
- CONCURRENCY="${AXIS_CONCURRENCY:-3}"
10
-
11
- if [[ -f .env.axis.local ]]; then
12
- set -a
13
- # shellcheck disable=SC1091
14
- source .env.axis.local
15
- set +a
16
- fi
17
-
18
- if [[ -z "${ANTHROPIC_API_KEY:-}" ]]; then
19
- if [[ ! -t 0 ]]; then
20
- echo "ANTHROPIC_API_KEY is not set and stdin is not interactive." >&2
21
- exit 1
22
- fi
23
- read -rsp "ANTHROPIC_API_KEY: " ANTHROPIC_API_KEY
24
- echo
25
- export ANTHROPIC_API_KEY
26
- fi
27
-
28
- if [[ -z "${NETLIFY_AUTH_TOKEN:-}" ]]; then
29
- if [[ ! -t 0 ]]; then
30
- echo "NETLIFY_AUTH_TOKEN is not set and stdin is not interactive." >&2
31
- exit 1
32
- fi
33
- read -rsp "NETLIFY_AUTH_TOKEN: " NETLIFY_AUTH_TOKEN
34
- echo
35
- export NETLIFY_AUTH_TOKEN
36
- fi
37
-
38
- mkdir -p .axis/reports
39
-
40
- exec node_modules/.bin/axis run \
41
- --config axis.config.ts \
42
- --scenario "$SCENARIOS" \
43
- --agent "$AGENTS" \
44
- --concurrency "$CONCURRENCY" \
45
- --output-dir .axis/reports \
46
- --verbose