zidane 6.2.0 → 6.2.6
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/dist/{acp-0JO-UBEv.js → acp-CYJvnqPa.js} +2 -2
- package/dist/{acp-0JO-UBEv.js.map → acp-CYJvnqPa.js.map} +1 -1
- package/dist/acp-cli.js +4 -4
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-25moybsj.js → agent-D11SxCvA.js} +84 -66
- package/dist/agent-D11SxCvA.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{anthropic-CV_OSYVD.js → anthropic-DdlSgT6K.js} +47 -25
- package/dist/anthropic-DdlSgT6K.js.map +1 -0
- package/dist/{auth-D5FfJtLf.js → auth-Ys_7TmRj.js} +2 -2
- package/dist/{auth-D5FfJtLf.js.map → auth-Ys_7TmRj.js.map} +1 -1
- package/dist/{cache-telemetry-BKAwsNxm.js → cache-telemetry-KJ7B-_Gh.js} +8 -3
- package/dist/cache-telemetry-KJ7B-_Gh.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +1 -1
- package/dist/chat.d.ts +11 -4
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +5 -5
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-mUT8TI9j.d.ts → index-CNyYEOy0.d.ts} +110 -36
- package/dist/index-CNyYEOy0.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/{inline-autocomplete-w_O3SVtN.js → inline-autocomplete-BAwBcZtD.js} +12 -7
- package/dist/{inline-autocomplete-w_O3SVtN.js.map → inline-autocomplete-BAwBcZtD.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +1 -1
- package/dist/restate.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-DOcJz_J9.d.ts → tool-formatters-B7oWiy5m.d.ts} +2 -2
- package/dist/tool-formatters-B7oWiy5m.d.ts.map +1 -0
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-CzMMNrhJ.d.ts → transcript-anchors-BUZ915pM.d.ts} +2 -2
- package/dist/{transcript-anchors-CzMMNrhJ.d.ts.map → transcript-anchors-BUZ915pM.d.ts.map} +1 -1
- package/dist/{transcript-anchors-CO-WnuYQ.js → transcript-anchors-cc4gsU-j.js} +12 -4
- package/dist/{transcript-anchors-CO-WnuYQ.js.map → transcript-anchors-cc4gsU-j.js.map} +1 -1
- package/dist/tui.d.ts +17 -14
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +206 -32
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-CrCrJnvo.d.ts → turn-operations-2Ou_DkbC.d.ts} +3 -3
- package/dist/{turn-operations-CrCrJnvo.d.ts.map → turn-operations-2Ou_DkbC.d.ts.map} +1 -1
- package/dist/{turn-operations-D9p-y9EC.js → turn-operations-CXjRaltC.js} +72 -2
- package/dist/{turn-operations-D9p-y9EC.js.map → turn-operations-CXjRaltC.js.map} +1 -1
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/EXTENSIONS.md +6 -5
- package/package.json +2 -1
- package/scripts/eval.ts +21 -3
- package/dist/agent-25moybsj.js.map +0 -1
- package/dist/anthropic-CV_OSYVD.js.map +0 -1
- package/dist/cache-telemetry-BKAwsNxm.js.map +0 -1
- package/dist/index-mUT8TI9j.d.ts.map +0 -1
- package/dist/tool-formatters-DOcJz_J9.d.ts.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as AgentProviderError, c as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, f as matchesContextExceeded, i as AgentContextExceededError, l as ClassifiedError, n as AgentAbortedError, o as AgentToolNotAllowedError, r as AgentBudgetExceededError, u as ClassifiedErrorKind } from "./timeout-8vSIRjzl.js";
|
|
2
|
-
import { Af as ToolOutcome, Bd as AgentClock, Bf as TurnFinishReason, Cf as SessionMessage, Cp as RemoteStoreOptions, Df as ThinkingLevel, Ef as StreamHookContext, Ff as ToolResultImageContent, Fi as AgentHookMap, Fm as OpenAIParams, Gd as ChildRunStats, Gf as ToolContext, Hd as AgentStats, Hf as toolOutputBudgetByteLength, If as ToolResultImageRefContent, Ii as AgentHooks, Kf as ToolDef, Lf as ToolResultMetadata, Li as AgentOptions, Mf as ToolResultContent, Nf as ToolResultDocumentContent, Pf as ToolResultDocumentRefContent, Pi as Agent, Qm as AnthropicParams, Qp as StreamOptions, Rf as ToolResultTextContent, Sf as SessionHookContext, Tf as SpawnHookContext, Uf as toolOutputByteLength, Vd as AgentRunOptions, Vf as TurnUsage, Wf as toolResultToText, Wm as CerebrasParams, Xd as DEFAULT_AGENT_CLOCK, Xf as ReadStateMap, Xp as ProviderCapabilities, Yf as ReadStateEntry, Yp as Provider, Zp as StreamCallbacks, _ as MutationValidationFailure, _f as ResolveContentRefBlock, af as OAuthRefreshHookContext, b as MutationValidationResult, bc as McpConnection, bf as SessionContentBlock, br as InteractionToolOptions, bs as SpawnToolOptions, cf as PromptAudioPart, cp as SkillsConfig, df as PromptPart, dm as OpenRouterParams, dp as SessionData, ef as McpServerConfig, em as ToolCall, er as ValidationResult, ff as PromptTextPart, g as MutationValidationBatch, gf as ResolveContentRef, h as statsByModel, hf as RepeatGuardToolMatcher, hs as ChildAgent, ip as SkillConfig, jf as ToolResultAudioContent, kf as ToolHookContext, lf as PromptDocumentPart, lp as CreateSessionOptions, m as flattenTurns, mf as RepeatGuardConfig, mp as SessionStore, nm as ToolSpec, of as ProgressNudgeKind, op as SkillResource, p as ModelUsage, pf as PromptVideoPart, pp as SessionRun, qf as ToolMap, rm as TurnResult, sf as ProgressNudgeMessage, t as Preset, tf as McpToolHookContext, tm as ToolResult, uf as PromptImagePart, up as Session, v as MutationValidationHooksOptions, vf as RetryConfig, wf as SessionTurn, x as SuccessfulMutationOutcome, xf as SessionEndStatus, xs as SpawnToolState, y as MutationValidationMutation, yf as RunHookMap, zd as AgentBehavior, zf as ToolResultVideoContent } from "./index-
|
|
2
|
+
import { Af as ToolOutcome, Bd as AgentClock, Bf as TurnFinishReason, Cf as SessionMessage, Cp as RemoteStoreOptions, Df as ThinkingLevel, Ef as StreamHookContext, Ff as ToolResultImageContent, Fi as AgentHookMap, Fm as OpenAIParams, Gd as ChildRunStats, Gf as ToolContext, Hd as AgentStats, Hf as toolOutputBudgetByteLength, If as ToolResultImageRefContent, Ii as AgentHooks, Kf as ToolDef, Lf as ToolResultMetadata, Li as AgentOptions, Mf as ToolResultContent, Nf as ToolResultDocumentContent, Pf as ToolResultDocumentRefContent, Pi as Agent, Qm as AnthropicParams, Qp as StreamOptions, Rf as ToolResultTextContent, Sf as SessionHookContext, Tf as SpawnHookContext, Uf as toolOutputByteLength, Vd as AgentRunOptions, Vf as TurnUsage, Wf as toolResultToText, Wm as CerebrasParams, Xd as DEFAULT_AGENT_CLOCK, Xf as ReadStateMap, Xp as ProviderCapabilities, Yf as ReadStateEntry, Yp as Provider, Zp as StreamCallbacks, _ as MutationValidationFailure, _f as ResolveContentRefBlock, af as OAuthRefreshHookContext, b as MutationValidationResult, bc as McpConnection, bf as SessionContentBlock, br as InteractionToolOptions, bs as SpawnToolOptions, cf as PromptAudioPart, cp as SkillsConfig, df as PromptPart, dm as OpenRouterParams, dp as SessionData, ef as McpServerConfig, em as ToolCall, er as ValidationResult, ff as PromptTextPart, g as MutationValidationBatch, gf as ResolveContentRef, h as statsByModel, hf as RepeatGuardToolMatcher, hs as ChildAgent, ip as SkillConfig, jf as ToolResultAudioContent, kf as ToolHookContext, lf as PromptDocumentPart, lp as CreateSessionOptions, m as flattenTurns, mf as RepeatGuardConfig, mp as SessionStore, nm as ToolSpec, of as ProgressNudgeKind, op as SkillResource, p as ModelUsage, pf as PromptVideoPart, pp as SessionRun, qf as ToolMap, rm as TurnResult, sf as ProgressNudgeMessage, t as Preset, tf as McpToolHookContext, tm as ToolResult, uf as PromptImagePart, up as Session, v as MutationValidationHooksOptions, vf as RetryConfig, wf as SessionTurn, x as SuccessfulMutationOutcome, xf as SessionEndStatus, xs as SpawnToolState, y as MutationValidationMutation, yf as RunHookMap, zd as AgentBehavior, zf as ToolResultVideoContent } from "./index-CNyYEOy0.js";
|
|
3
3
|
import { _ as TaskStallInfo, a as ContextType, c as ExecutionContext, g as TaskHandle, h as TaskExitInfo, l as ExecutionHandle, m as TaskEntry, n as ContextCapabilities, o as DetachedTasksCapability, p as SpawnConfig, r as ContextHardening, s as ExecResult, t as BackgroundTaskStatus } from "./types-BDccavwj.js";
|
|
4
4
|
import { t as SandboxProvider } from "./sandbox-CgjG2VvQ.js";
|
|
5
5
|
export { type Agent, AgentAbortedError, type AgentBehavior, AgentBudgetExceededError, type AgentClock, AgentContextExceededError, type AgentHookMap, type AgentHooks, type AgentOptions, AgentProviderError, type AgentRunOptions, type AgentStats, AgentToolNotAllowedError, type AnthropicParams, type BackgroundTaskStatus, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, type CerebrasParams, type ChildAgent, type ChildRunStats, type ClassifiedError, type ClassifiedErrorKind, type ContextCapabilities, type ContextHardening, type ContextType, type CreateSessionOptions, DEFAULT_AGENT_CLOCK, type DetachedTasksCapability, type ExecResult, type ExecutionContext, type ExecutionHandle, type InteractionToolOptions, type McpConnection, type McpServerConfig, type McpToolHookContext, type ModelUsage, type MutationValidationBatch, type MutationValidationFailure, type MutationValidationHooksOptions, type MutationValidationMutation, type MutationValidationResult, type OAuthRefreshHookContext, type OpenAIParams, type OpenRouterParams, type Preset, type ProgressNudgeKind, type ProgressNudgeMessage, type PromptAudioPart, type PromptDocumentPart, type PromptImagePart, type PromptPart, type PromptTextPart, type PromptVideoPart, type Provider, type ProviderCapabilities, type ReadStateEntry, type ReadStateMap, type RemoteStoreOptions, type RepeatGuardConfig, type RepeatGuardToolMatcher, type ResolveContentRef, type ResolveContentRefBlock, type RetryConfig, type RunHookMap, type SandboxProvider, type Session, type SessionContentBlock, type SessionData, type SessionEndStatus, type SessionHookContext, type SessionMessage, type SessionRun, type SessionStore, type SessionTurn, type SkillConfig, type SkillResource, type SkillsConfig, type SpawnConfig, type SpawnHookContext, type SpawnToolOptions, type SpawnToolState, type StreamCallbacks, type StreamHookContext, type StreamOptions, type SuccessfulMutationOutcome, type TaskEntry, type TaskExitInfo, type TaskHandle, type TaskStallInfo, type ThinkingLevel, type ToolCall, type ToolContext, type ToolDef, type ToolHookContext, type ToolMap, type ToolOutcome, type ToolResult, type ToolResultAudioContent, type ToolResultContent, type ToolResultDocumentContent, type ToolResultDocumentRefContent, type ToolResultImageContent, type ToolResultImageRefContent, type ToolResultMetadata, type ToolResultTextContent, type ToolResultVideoContent, type ToolSpec, type TurnFinishReason, type TurnResult, type TurnUsage, type ValidationResult, flattenTurns, matchesContextExceeded, statsByModel, toolOutputBudgetByteLength, toolOutputByteLength, toolResultToText };
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -743,7 +743,7 @@ Tools with side effects or non-deterministic outputs MUST NOT be listed (no safe
|
|
|
743
743
|
|
|
744
744
|
**`toolBudgets`** caps per-tool calls per run. When `runToolCounts[name] >= max`, fires `onExceed`: `'block'` refuses with `Blocked: <message>`, `'steer'` enqueues a synthetic user message (one per tool per run, deduped). Function form returns `{ mode, message }` dynamically. Fires `tool-budget:exceeded` (distinct from byte-level `budget:exceeded`). Counts include dedup substitutes by design.
|
|
745
745
|
|
|
746
|
-
**`thinkingDecay`** tapers `thinkingBudget` per run-relative turn. `applyThinkingDecay(base, decay, turn)` runs at `runTurn` start. Struct form `{ afterTurn, factor, floor }` does geometric decay; function form `(turn, base) => number` accepts arbitrary curves. Result clamped to `[0, base]` so buggy curves can't exceed the caller's opt-in.
|
|
746
|
+
**`thinkingDecay`** tapers `thinkingBudget` per run-relative turn (1-indexed). `applyThinkingDecay(base, decay, turn)` runs at `runTurn` start. Struct form `{ afterTurn, factor, floor }` does geometric decay; function form `(turn, base) => number` accepts arbitrary curves. Result clamped to `[0, base]` so buggy curves can't exceed the caller's opt-in. Skipped for `thinking: 'adaptive'` only on providers with `adaptiveBudgetIsEnvelope` (Anthropic), where `thinkingBudget` caps the whole response envelope (`max_tokens`) and decaying it would strangle text/tool output; providers where adaptive `thinkingBudget` is a genuine per-turn thinking budget (openai-compat `reasoning.max_tokens`) still decay. `taskBudget` (Anthropic adaptive-only whole-task cap, emitted as `output_config.task_budget`) never decays.
|
|
747
747
|
|
|
748
748
|
**Reliability levers** are opt-in and live in `src/behaviors/`. `writeFileExistingPolicy` blocks full-file rewrites of existing files and points the model at `read_file` + `edit` / `multi_edit`; `readFileDefaults` sets omitted `read_file` slice defaults without overriding explicit tool-call args; `thinkingOverrunPolicy` queues a non-interrupting next-turn nudge when streamed thinking crosses a threshold; `textToolCallRescue` steers after a model writes a tool call as text; `unknownToolRecovery` queues closest currently-advertised tool-name suggestions without changing the unknown-tool error result; `progressNudges` emits bounded non-interrupting pivot nudges for broad stalls that exact repeat guards do not cover; `maxTurnsWarningMessage` customizes the existing max-turn proximity nudge.
|
|
749
749
|
|
package/docs/EXTENSIONS.md
CHANGED
|
@@ -406,7 +406,7 @@ flowchart TD
|
|
|
406
406
|
|
|
407
407
|
Key invariants:
|
|
408
408
|
|
|
409
|
-
1. **State first.** `runTui` reads `state.json` before discovery so a
|
|
409
|
+
1. **State first.** `runTui` reads `state.json` before discovery so the registry knows the enable allowlist as it builds. The allowlist gates **contributions, not execution**: a disabled-but-trusted extension is still imported and its `setup()` still runs — but only to declare its config schema (so its settings are browsable before you enable it). It runs with `ctx.disabled === true` and with the runtime bridges (`tui.*`, `submitPrompt`, `runtime`, `sessions`, `workspace`) withheld as inert no-ops, and it classifies as `inactive` so none of its behavioral contributions reach the active surface. Extensions that do side-effecting setup work (network probes, spawning processes, warming caches) must gate it on `!ctx.disabled`.
|
|
410
410
|
2. **Setup-then-merge.** Each extension's contributions are captured per-extension on `LoadedExtension.contributions`. The host can re-merge any subset via `mergeContributions(active, inactive)` to flip toggles without re-running `setup`.
|
|
411
411
|
3. **Sync `resolveConfig`.** Setup can be async; `resolveConfig` can't. The host pre-builds the registry, then passes it via `ChatOptions.extensionRegistry`. `runTui` does this internally; SDK / GUI hosts do the same:
|
|
412
412
|
|
|
@@ -432,11 +432,11 @@ Each extension shows up in `Settings → Extensions` with a checkbox. Toggling w
|
|
|
432
432
|
- `[names]` — explicit allowlist.
|
|
433
433
|
|
|
434
434
|
Disabled extensions:
|
|
435
|
-
-
|
|
436
|
-
- Land on `registry.inactive` so the toggle UI still lists them.
|
|
435
|
+
- Still run `setup()` at boot with `ctx.disabled === true` — schema-declaration only. Runtime bridges are withheld (`ctx.tui.*` / `ctx.submitPrompt` / `ctx.runtime` are inert), so an inactive extension can't paint status, inject prompts, or touch the session. Author-level side effects must be gated on `!ctx.disabled`.
|
|
436
|
+
- Land on `registry.inactive` so the toggle UI still lists them, and expose their **config schema** (categories + items) so their settings render before you enable them.
|
|
437
437
|
- Don't contribute tools / hooks / mcps / skills / themes / agents / providers / keybindings / footer hints / modals.
|
|
438
438
|
|
|
439
|
-
**Toggle = live filter; `/reload` = full re-apply.** Toggling live-filters tools / hooks / mcpServers / skills / completion providers / keybindings / footer hints (re-applied at the next session activation) and hides the extension's HUD paint + notifications immediately — but `setup()` isn't re-run and agent profiles + providers + themes stay visible in their pickers. Run `/reload` (or restart) to fully apply a toggle: the registry rebuilds against the current allowlist, so disabled extensions
|
|
439
|
+
**Toggle = live filter; `/reload` = full re-apply.** Toggling live-filters tools / hooks / mcpServers / skills / completion providers / keybindings / footer hints (re-applied at the next session activation) and hides the extension's HUD paint + notifications immediately — but `setup()` isn't re-run and agent profiles + providers + themes stay visible in their pickers. Run `/reload` (or restart) to fully apply a toggle: the registry rebuilds against the current allowlist, so disabled extensions re-run `setup()` in schema-only mode (`ctx.disabled`, no behavioral contributions) and their picker entries disappear. Picking an extension-contributed profile after toggling its extension off — without reloading — activates a half-functional state: the profile's own preset works, but the extension's hooks / tools are suppressed.
|
|
440
440
|
|
|
441
441
|
## Installing from GitHub / npm
|
|
442
442
|
|
|
@@ -491,9 +491,10 @@ subdir syntax — paste either source into the `ctrl+g` input):
|
|
|
491
491
|
```
|
|
492
492
|
Tahul/zidane:extensions/git-flow # /commit — agent-written commit messages + one-tap push
|
|
493
493
|
Tahul/zidane:extensions/headroom # compress large tool outputs via a local Headroom proxy
|
|
494
|
+
Tahul/zidane:extensions/pxpipe # image tool outputs in-process + optional pxpipe proxy routing
|
|
494
495
|
```
|
|
495
496
|
|
|
496
|
-
|
|
497
|
+
All mirror the packaging conventions to copy for
|
|
497
498
|
your own extensions (`package.json` with `zidane-extension` keyword, entry
|
|
498
499
|
`index.ts`, `zidane` as a peer).
|
|
499
500
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zidane",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.6",
|
|
4
4
|
"description": "an agent that goes straight to the goal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -251,6 +251,7 @@
|
|
|
251
251
|
"typecheck:extensions": "for d in extensions/*/; do tsc --noEmit -p \"$d\" || exit 1; done",
|
|
252
252
|
"test:inference": "cd test-inference && bun test",
|
|
253
253
|
"test:eval": "bun run scripts/eval.ts",
|
|
254
|
+
"evals": "bun run scripts/eval.ts",
|
|
254
255
|
"restate:fixture:up": "docker compose -f test/fixtures/restate-docker/docker-compose.yml up --build -d",
|
|
255
256
|
"restate:fixture:down": "docker compose -f test/fixtures/restate-docker/docker-compose.yml down -v",
|
|
256
257
|
"restate:fixture:service": "PORT=19080 bun run test/fixtures/restate-docker/service.ts",
|
package/scripts/eval.ts
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
* --concurrency | --jobs <n> max eval cases to run in parallel (default 4)
|
|
23
23
|
* --report-dir <dir> write per-case + run-summary JSON here
|
|
24
24
|
* --artifact-dir <dir> write per-case result/events/transcript/workspace here
|
|
25
|
+
* --baseline [path] write a settings+measurements snapshot after the run
|
|
26
|
+
* (default path: benchmarks/evals/baseline.json)
|
|
27
|
+
* --extensions <names> enable repo extensions for the run, comma-separated
|
|
28
|
+
* (e.g. pxpipe,headroom — see benchmarks/evals/_extensions.ts)
|
|
25
29
|
* --timeout <ms> per-test timeout (default 180000)
|
|
26
30
|
*/
|
|
27
31
|
|
|
@@ -30,6 +34,7 @@ import { resolve } from 'node:path'
|
|
|
30
34
|
|
|
31
35
|
const DEFAULT_TIMEOUT_MS = '180000'
|
|
32
36
|
const EVAL_TEST_FILE = 'test/eval-real.ts'
|
|
37
|
+
const DEFAULT_BASELINE_PATH = 'benchmarks/evals/baseline.json'
|
|
33
38
|
|
|
34
39
|
const FLAG_TO_ENV: Record<string, string> = {
|
|
35
40
|
'provider': 'ZIDANE_EVAL_PROVIDER',
|
|
@@ -45,6 +50,13 @@ const FLAG_TO_ENV: Record<string, string> = {
|
|
|
45
50
|
'jobs': 'ZIDANE_EVAL_CONCURRENCY',
|
|
46
51
|
'report-dir': 'ZIDANE_EVAL_REPORT_DIR',
|
|
47
52
|
'artifact-dir': 'ZIDANE_EVAL_ARTIFACT_DIR',
|
|
53
|
+
'baseline': 'ZIDANE_EVAL_BASELINE',
|
|
54
|
+
'extensions': 'ZIDANE_EVAL_EXTENSIONS',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Flags whose value may be omitted, falling back to a default. */
|
|
58
|
+
const OPTIONAL_VALUE_FLAGS: Record<string, string> = {
|
|
59
|
+
baseline: DEFAULT_BASELINE_PATH,
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
const NUMERIC_FLAGS = new Set(['repeat', 'concurrency', 'jobs', 'timeout'])
|
|
@@ -79,9 +91,13 @@ export function parseEvalCliArgs(argv: string[], options: EvalCliParseOptions =
|
|
|
79
91
|
const eq = key.indexOf('=')
|
|
80
92
|
const rawKey = eq === -1 ? key : key.slice(0, eq)
|
|
81
93
|
const inlineVal = eq === -1 ? undefined : key.slice(eq + 1)
|
|
82
|
-
|
|
83
|
-
if (!value)
|
|
84
|
-
|
|
94
|
+
let value = inlineVal ?? (argv[i + 1] && !argv[i + 1].startsWith('-') ? argv[++i] : undefined)
|
|
95
|
+
if (!value) {
|
|
96
|
+
const fallback = OPTIONAL_VALUE_FLAGS[rawKey]
|
|
97
|
+
if (!fallback)
|
|
98
|
+
throw new EvalCliError(`Missing value for eval flag: --${rawKey}`)
|
|
99
|
+
value = fallback
|
|
100
|
+
}
|
|
85
101
|
if (NUMERIC_FLAGS.has(rawKey))
|
|
86
102
|
assertPositiveInteger(rawKey, value)
|
|
87
103
|
if (rawKey === 'timeout') {
|
|
@@ -108,6 +124,8 @@ export function parseEvalCliArgs(argv: string[], options: EvalCliParseOptions =
|
|
|
108
124
|
|
|
109
125
|
const cwd = options.cwd ?? process.cwd()
|
|
110
126
|
const existingEnv = options.existingEnv ?? process.env
|
|
127
|
+
if (env.ZIDANE_EVAL_BASELINE)
|
|
128
|
+
env.ZIDANE_EVAL_BASELINE = resolve(cwd, env.ZIDANE_EVAL_BASELINE)
|
|
111
129
|
// Default a run-scoped artifact dir so the summary can render clickable links
|
|
112
130
|
// to each case's output. Overridable via --artifact-dir / ZIDANE_EVAL_ARTIFACT_DIR.
|
|
113
131
|
if (!env.ZIDANE_EVAL_ARTIFACT_DIR && !existingEnv.ZIDANE_EVAL_ARTIFACT_DIR) {
|