@answerlayer/cli 0.2.2 → 0.2.4

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
@@ -249,8 +249,10 @@ answerlayer optimize start \
249
249
  --mode recommendation
250
250
  ```
251
251
 
252
- By default the proposal model also reviews bounded failed-case traces during
253
- failure analysis. Use `--analysis-model MODEL` to select a dedicated reviewer.
252
+ The proposal model runs one bounded optimization session that reviews failed-case
253
+ traces, edits a detached candidate, validates it, and repairs diagnostics before
254
+ submission. Tune its bounds with `--max-agent-turns`,
255
+ `--max-validation-attempts`, and `--max-targeted-evals`.
254
256
 
255
257
  Inspect and operate the registry with `answerlayer optimize list`,
256
258
  `get RUN_ID`, `pause RUN_ID`, `resume RUN_ID`, `stop RUN_ID`, `clone RUN_ID`,
@@ -296,9 +298,9 @@ answerlayer inquiry models
296
298
  answerlayer inquiry ask --connection <connection-id> --model claude-opus-4-6 "Investigate unusual revenue changes"
297
299
 
298
300
  answerlayer evals suites create --name "Revenue checks" --connection <connection-id>
301
+ answerlayer evals suites get <suite-id> --json # complete suite for authorized inspection
299
302
  answerlayer evals cases create <suite-id> --title "Monthly revenue" --question "What was revenue last month?" --category Revenue --expected-sql "select sum(amount) from orders where ..." --oracle-sources '[{"kind":"external","title":"Revenue policy","url":"https://example.com/revenue-policy"}]'
300
303
  answerlayer evals cases create <suite-id> --title "Unseen revenue check" --question "How much revenue did we make?" --partition holdout --expected-sql "select sum(amount) from orders"
301
- answerlayer evals cases reveal <case-id> --json # admin-only, explicit, and audited
302
304
  answerlayer evals runs create <suite-id> --label "Before prompt change"
303
305
  answerlayer evals runs create <suite-id> --case <case-id> --case <case-id> --label "Focused smoke run"
304
306
  answerlayer evals runs create <suite-id> --category Revenue --category Finance --case <case-id> --label "Focused category run"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@answerlayer/cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Open-source command line client for the AnswerLayer API.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -175,7 +175,7 @@ to see exact flags before using one:
175
175
  - `saved-queries` — list / get / create / execute reusable queries
176
176
  - `semantic` — entities, relationships, measures, metrics, dimensions, filters
177
177
  (most need `--connection <id>`)
178
- - `evals` — create evaluation suites and partitioned cases, explicitly reveal protected oracles, run them, compare runs, and retrieve evidence-backed failure analysis
178
+ - `evals` — inspect complete evaluation suites, manage partitioned cases, run them, compare runs, and retrieve evidence-backed failure analysis; holdout and adversarial cases remain excluded from model-facing generation and optimization
179
179
  - `generation` — generate semantic components, optionally grounded by an eval suite's authoring cases; holdout and adversarial cases are rejected
180
180
  - `dashboards`, `tiles` — build and read dashboards
181
181
  - `documents` — upload business-context docs and link them to connections
package/src/cli.js CHANGED
@@ -652,7 +652,6 @@ async function handleEvals(client, resource, positionals, parsed, io) {
652
652
  body: await readData(parsed.flags, io, { ...evalCasePayload(parsed.flags), is_active: activeFlag(parsed.flags) }),
653
653
  });
654
654
  }
655
- if (command === "reveal") return requestAndPrint(client, "POST", `${base}/cases/${encodeURIComponent(caseId)}/reveal`, parsed, io);
656
655
  if (command === "delete") return requestAndPrint(client, "DELETE", `${base}/cases/${encodeURIComponent(caseId)}`, parsed, io);
657
656
  throw usage(`Unknown evals cases command: ${command}`);
658
657
  }
@@ -760,6 +759,9 @@ async function handleOptimization(client, command, positionals, parsed, io) {
760
759
  }
761
760
 
762
761
  if (command === "start" || command === "create") {
762
+ if (parsed.flags.analysisModel !== undefined) {
763
+ throw usage("--analysis-model was removed; use --proposal-model for the coherent optimization agent");
764
+ }
763
765
  const sharedModel = firstValue(parsed.flags.model);
764
766
  const selectedCaseIds = optionalCsvOrRepeated(parsed.flags.case);
765
767
  const categories = optionalDistinctRepeated(parsed.flags.category);
@@ -786,11 +788,7 @@ async function handleOptimization(client, command, positionals, parsed, io) {
786
788
  models: {
787
789
  eval_execution: firstValue(parsed.flags.evalModel) || sharedModel,
788
790
  proposal: firstValue(parsed.flags.proposalModel) || sharedModel,
789
- analysis: firstValue(parsed.flags.analysisModel)
790
- || firstValue(parsed.flags.proposalModel)
791
- || sharedModel,
792
791
  validation: "deterministic",
793
- repair: "disabled",
794
792
  },
795
793
  budget: {
796
794
  max_iterations: numberFlag(parsed.flags.maxIterations, 3),
@@ -799,6 +797,15 @@ async function handleOptimization(client, command, positionals, parsed, io) {
799
797
  max_output_tokens: numberFlag(parsed.flags.maxOutputTokens, 50000),
800
798
  max_sql_queries: numberFlag(parsed.flags.maxSqlQueries, 500),
801
799
  max_duration_seconds: numberFlag(parsed.flags.maxDuration, 7200),
800
+ max_agent_turns: parseBoundedInteger(
801
+ firstValue(parsed.flags.maxAgentTurns), "max-agent-turns", 1, 200,
802
+ ) ?? 50,
803
+ max_validation_attempts: parseBoundedInteger(
804
+ firstValue(parsed.flags.maxValidationAttempts), "max-validation-attempts", 1, 100,
805
+ ) ?? 10,
806
+ max_targeted_evals: parseBoundedInteger(
807
+ firstValue(parsed.flags.maxTargetedEvals), "max-targeted-evals", 0, 25,
808
+ ) ?? 3,
802
809
  },
803
810
  objectives: {
804
811
  minimum_score_improvement: numberFlag(parsed.flags.minImprovement, 0.5),
@@ -1646,7 +1653,6 @@ function normalizeFlagName(rawName) {
1646
1653
  "--review-policy": "reviewPolicy",
1647
1654
  "--promotion-policy": "promotionPolicy",
1648
1655
  "--eval-model": "evalModel",
1649
- "--analysis-model": "analysisModel",
1650
1656
  "--proposal-model": "proposalModel",
1651
1657
  "--base-hash": "baseHash",
1652
1658
  "--max-iterations": "maxIterations",
@@ -1655,6 +1661,9 @@ function normalizeFlagName(rawName) {
1655
1661
  "--max-output-tokens": "maxOutputTokens",
1656
1662
  "--max-sql-queries": "maxSqlQueries",
1657
1663
  "--max-duration": "maxDuration",
1664
+ "--max-agent-turns": "maxAgentTurns",
1665
+ "--max-validation-attempts": "maxValidationAttempts",
1666
+ "--max-targeted-evals": "maxTargetedEvals",
1658
1667
  "--min-improvement": "minImprovement",
1659
1668
  "--max-regressions": "maxRegressions",
1660
1669
  "--target-pass-rate": "targetPassRate",
@@ -1889,7 +1898,7 @@ Data products:
1889
1898
  answerlayer semantic <entities|relationships|measures|metrics|dimensions|filters> list|get|create|update|delete|delete-all|generate
1890
1899
  answerlayer inquiry models|ask|sessions|create-session|session|update-session|delete-session|turn
1891
1900
  answerlayer evals suites list|create|get|update|delete
1892
- answerlayer evals cases create|update|reveal|delete
1901
+ answerlayer evals cases create|update|delete
1893
1902
  answerlayer evals runs list|create|create-batch|get|update|cancel|compare|analyze
1894
1903
  answerlayer optimize list|start|get|pause|resume|stop|clone|approve|reject|promote
1895
1904
  case create/update accept --category <name>,
@@ -1904,11 +1913,12 @@ Data products:
1904
1913
  and --use-semantic-layer or --no-semantic-layer
1905
1914
  Optimization:
1906
1915
  answerlayer optimize start --name NAME --connection ID --suite ID --model MODEL
1907
- [--eval-model MODEL] [--proposal-model MODEL] [--analysis-model MODEL]
1916
+ [--eval-model MODEL] [--proposal-model MODEL]
1908
1917
  [--mode recommendation|supervised|fully_automatic]
1909
1918
  [--component entities,relationships,measures,metrics,dimensions,filters]
1910
1919
  [--review-policy every_sweep|exceptions_only|end_of_run]
1911
1920
  [--promotion-policy manual|automatic] [--max-iterations N]
1921
+ [--max-agent-turns N] [--max-validation-attempts N] [--max-targeted-evals N]
1912
1922
  answerlayer optimize promote RUN_ID --base-hash SHA256
1913
1923
  update accepts --label <name>
1914
1924
  answerlayer ontologies list|create|get|validate