@sanity/ailf 4.4.0 → 4.5.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.
|
@@ -265,7 +265,13 @@ export function computeResolvedOptions(opts) {
|
|
|
265
265
|
const apiUrl = process.env.AILF_API_URL ??
|
|
266
266
|
repoConfig?.execution?.apiUrl ??
|
|
267
267
|
"https://ailf-api.sanity.build";
|
|
268
|
-
|
|
268
|
+
// W0202 — `--api-key` flag wins over the env var. The CLI's dotenv
|
|
269
|
+
// bootstrap (`cli.ts`) loads the project `.env` with `override: true`,
|
|
270
|
+
// matching the repo convention that the file is the source of truth
|
|
271
|
+
// (see `.claude/rules/config.md`). That convention silently squashes
|
|
272
|
+
// shell-set `AILF_API_KEY`, so an explicit per-run flag is the only
|
|
273
|
+
// ergonomic way to pick a non-default key for one invocation.
|
|
274
|
+
const apiKey = opts.apiKey ?? process.env.AILF_API_KEY ?? undefined;
|
|
269
275
|
// Output directory (W0077 Phase 6c) — `output.dir` from .ailf/config.yaml
|
|
270
276
|
// when set, otherwise <cwd>/.ailf/results/latest/.
|
|
271
277
|
const outputDir = resolveOutputDir(repoConfig?.output?.dir);
|
package/dist/commands/run.d.ts
CHANGED
package/dist/commands/run.js
CHANGED
|
@@ -47,6 +47,7 @@ export function createRunCommand() {
|
|
|
47
47
|
.option("-o, --output <path>", "Write PR comment markdown to file")
|
|
48
48
|
.option("--promptfoo-url <url>", "Promptfoo share URL for report")
|
|
49
49
|
.option("--remote", "Submit evaluation to the AILF API instead of running locally", false)
|
|
50
|
+
.option("--api-key <value>", "API key for --remote dispatch. Wins over AILF_API_KEY and any value loaded from the project .env file (W0202).")
|
|
50
51
|
.option("--no-artifacts-write", "Run artifact writers in dry-run mode — log intended writes, touch no storage")
|
|
51
52
|
// D0037 caller envelope (W0069) — threads through --remote so the
|
|
52
53
|
// server-side pipeline attributes provenance to the caller, not the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ailf",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"tsx": "^4.19.2",
|
|
56
56
|
"typescript": "^5.7.3",
|
|
57
57
|
"vitest": "^4.1.5",
|
|
58
|
-
"@sanity/ailf-
|
|
59
|
-
"@sanity/ailf-
|
|
58
|
+
"@sanity/ailf-shared": "0.1.0",
|
|
59
|
+
"@sanity/ailf-core": "0.1.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "tsc && tsx scripts/bundle-workspace-deps.ts",
|