@answerlayer/cli 0.2.3 → 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.
Files changed (3) hide show
  1. package/README.md +4 -2
  2. package/package.json +1 -1
  3. package/src/cli.js +17 -6
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`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@answerlayer/cli",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Open-source command line client for the AnswerLayer API.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -759,6 +759,9 @@ async function handleOptimization(client, command, positionals, parsed, io) {
759
759
  }
760
760
 
761
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
+ }
762
765
  const sharedModel = firstValue(parsed.flags.model);
763
766
  const selectedCaseIds = optionalCsvOrRepeated(parsed.flags.case);
764
767
  const categories = optionalDistinctRepeated(parsed.flags.category);
@@ -785,11 +788,7 @@ async function handleOptimization(client, command, positionals, parsed, io) {
785
788
  models: {
786
789
  eval_execution: firstValue(parsed.flags.evalModel) || sharedModel,
787
790
  proposal: firstValue(parsed.flags.proposalModel) || sharedModel,
788
- analysis: firstValue(parsed.flags.analysisModel)
789
- || firstValue(parsed.flags.proposalModel)
790
- || sharedModel,
791
791
  validation: "deterministic",
792
- repair: "disabled",
793
792
  },
794
793
  budget: {
795
794
  max_iterations: numberFlag(parsed.flags.maxIterations, 3),
@@ -798,6 +797,15 @@ async function handleOptimization(client, command, positionals, parsed, io) {
798
797
  max_output_tokens: numberFlag(parsed.flags.maxOutputTokens, 50000),
799
798
  max_sql_queries: numberFlag(parsed.flags.maxSqlQueries, 500),
800
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,
801
809
  },
802
810
  objectives: {
803
811
  minimum_score_improvement: numberFlag(parsed.flags.minImprovement, 0.5),
@@ -1645,7 +1653,6 @@ function normalizeFlagName(rawName) {
1645
1653
  "--review-policy": "reviewPolicy",
1646
1654
  "--promotion-policy": "promotionPolicy",
1647
1655
  "--eval-model": "evalModel",
1648
- "--analysis-model": "analysisModel",
1649
1656
  "--proposal-model": "proposalModel",
1650
1657
  "--base-hash": "baseHash",
1651
1658
  "--max-iterations": "maxIterations",
@@ -1654,6 +1661,9 @@ function normalizeFlagName(rawName) {
1654
1661
  "--max-output-tokens": "maxOutputTokens",
1655
1662
  "--max-sql-queries": "maxSqlQueries",
1656
1663
  "--max-duration": "maxDuration",
1664
+ "--max-agent-turns": "maxAgentTurns",
1665
+ "--max-validation-attempts": "maxValidationAttempts",
1666
+ "--max-targeted-evals": "maxTargetedEvals",
1657
1667
  "--min-improvement": "minImprovement",
1658
1668
  "--max-regressions": "maxRegressions",
1659
1669
  "--target-pass-rate": "targetPassRate",
@@ -1903,11 +1913,12 @@ Data products:
1903
1913
  and --use-semantic-layer or --no-semantic-layer
1904
1914
  Optimization:
1905
1915
  answerlayer optimize start --name NAME --connection ID --suite ID --model MODEL
1906
- [--eval-model MODEL] [--proposal-model MODEL] [--analysis-model MODEL]
1916
+ [--eval-model MODEL] [--proposal-model MODEL]
1907
1917
  [--mode recommendation|supervised|fully_automatic]
1908
1918
  [--component entities,relationships,measures,metrics,dimensions,filters]
1909
1919
  [--review-policy every_sweep|exceptions_only|end_of_run]
1910
1920
  [--promotion-policy manual|automatic] [--max-iterations N]
1921
+ [--max-agent-turns N] [--max-validation-attempts N] [--max-targeted-evals N]
1911
1922
  answerlayer optimize promote RUN_ID --base-hash SHA256
1912
1923
  update accepts --label <name>
1913
1924
  answerlayer ontologies list|create|get|validate