agent-valley 4.8.8 → 4.9.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.
@@ -6731,7 +6731,20 @@ var init_skill_matrix_schema = __esm(() => {
6731
6731
  // ../../packages/core/src/domain/agent.ts
6732
6732
  var AGENT_IDS;
6733
6733
  var init_agent = __esm(() => {
6734
- AGENT_IDS = ["claude", "codex", "qwen", "antigravity", "cursor", "grok", "kimi", "opencode"];
6734
+ AGENT_IDS = [
6735
+ "claude",
6736
+ "codex",
6737
+ "qwen",
6738
+ "dsh",
6739
+ "zcode",
6740
+ "antigravity",
6741
+ "cursor",
6742
+ "grok",
6743
+ "kimi",
6744
+ "opencode",
6745
+ "kilo",
6746
+ "freellm"
6747
+ ];
6735
6748
  });
6736
6749
 
6737
6750
  // ../../packages/core/src/config/task-schema.ts
@@ -6765,6 +6778,7 @@ var init_actor_schema = __esm(() => {
6765
6778
  timeout: number2().min(30).optional(),
6766
6779
  max_retries: number2().min(1).optional(),
6767
6780
  retry_delay: number2().min(1).optional(),
6781
+ retry_retention_sec: number2().min(1).optional(),
6768
6782
  max_parallel: number2().min(1, "actor.max_parallel must be >= 1").optional()
6769
6783
  });
6770
6784
  routingRuleSchema = object({
@@ -7303,7 +7317,7 @@ var init_execution = __esm(() => {
7303
7317
  });
7304
7318
 
7305
7319
  // ../../packages/core/src/chief/parallel-contract.ts
7306
- var objectId, imageSchema, parallelBaselineSchema, parallelWorkspaceSchema, taskWorktreeRecordSchema, parallelDeliverySchema, ParallelIntegrationConflict;
7320
+ var objectId, imageSchema, parallelBaselineSchema, parallelWorkspaceSchema, taskWorktreeRecordSchema, parallelDeliverySchema, taskChangeSetSchema, ParallelIntegrationConflict;
7307
7321
  var init_parallel_contract = __esm(() => {
7308
7322
  init_zod();
7309
7323
  objectId = string2().regex(/^[a-f0-9]{40,64}$/);
@@ -7318,7 +7332,11 @@ var init_parallel_contract = __esm(() => {
7318
7332
  path: string2().min(1),
7319
7333
  branch: string2().min(1),
7320
7334
  baselineHead: objectId,
7321
- baselineTree: objectId
7335
+ baselineTree: objectId,
7336
+ snapshotTree: objectId.optional(),
7337
+ snapshotCommit: objectId.optional(),
7338
+ snapshotRef: string2().min(1).optional(),
7339
+ workerRef: string2().min(1).optional()
7322
7340
  });
7323
7341
  taskWorktreeRecordSchema = parallelWorkspaceSchema;
7324
7342
  parallelDeliverySchema = strictObject({
@@ -7327,9 +7345,23 @@ var init_parallel_contract = __esm(() => {
7327
7345
  patchPath: string2().min(1),
7328
7346
  patchSha256: string2().regex(/^[a-f0-9]{64}$/),
7329
7347
  deliveryTree: objectId,
7348
+ workerHead: objectId.optional(),
7330
7349
  changes: array(strictObject({ path: string2().min(1), before: imageSchema.nullable(), after: imageSchema.nullable() })).max(20000),
7331
7350
  status: _enum(["prepared", "applying", "applied"])
7332
7351
  });
7352
+ taskChangeSetSchema = strictObject({
7353
+ version: literal(1),
7354
+ inputTree: objectId,
7355
+ deliveryTree: objectId,
7356
+ files: array(strictObject({
7357
+ path: string2().min(1),
7358
+ status: _enum(["added", "modified", "deleted"]),
7359
+ size: number2().int().nonnegative(),
7360
+ sha256: string2().regex(/^[a-f0-9]{64}$/)
7361
+ })).max(20000),
7362
+ diff: string2().max(70000),
7363
+ diffTruncated: boolean2()
7364
+ });
7333
7365
  ParallelIntegrationConflict = class ParallelIntegrationConflict extends Error {
7334
7366
  taskId;
7335
7367
  paths;
@@ -7384,7 +7416,8 @@ var init_mission_state_schema = __esm(() => {
7384
7416
  review: reviewSchema.optional(),
7385
7417
  fingerprint: text.optional(),
7386
7418
  effectState: _enum(["not-started", "running", "unknown", "completed"]).optional(),
7387
- parallel: taskWorktreeRecordSchema.optional()
7419
+ parallel: taskWorktreeRecordSchema.optional(),
7420
+ changeSet: taskChangeSetSchema.optional()
7388
7421
  });
7389
7422
  verificationSchema = strictObject({
7390
7423
  ok: boolean2(),
@@ -7460,7 +7493,7 @@ var init_review_gates = __esm(() => {
7460
7493
  });
7461
7494
 
7462
7495
  // ../../packages/core/src/chief/operations.ts
7463
- var actorType, text3, amount, routingCandidateSchema, chiefOperatingPolicySchema, operatingRunSchema, providerHealthSchema, providerHealthEvidenceSchema, routeEvidenceSchema, reviewDecisionSchema, chiefOperationsSchema;
7496
+ var actorType, text3, amount, routingCandidateSchema, DEFAULT_EVIDENCE_WINDOW = 10, MAX_EVIDENCE_WINDOW = 1000, chiefOperatingPolicySchema, operatingRunSchema, providerHealthSchema, providerHealthEvidenceSchema, routeOutcomeSchema, routeEvidenceSchema, reviewDecisionSchema, chiefOperationsSchema;
7464
7497
  var init_operations = __esm(() => {
7465
7498
  init_zod();
7466
7499
  init_skill_matrix_schema();
@@ -7478,7 +7511,8 @@ var init_operations = __esm(() => {
7478
7511
  routing: strictObject({
7479
7512
  candidates: array(routingCandidateSchema).min(1).max(20),
7480
7513
  minSamples: number2().int().min(1).max(1000),
7481
- minSuccessRate: number2().min(0).max(1)
7514
+ minSuccessRate: number2().min(0).max(1),
7515
+ evidenceWindow: number2().int().min(1).max(MAX_EVIDENCE_WINDOW).optional()
7482
7516
  }).optional(),
7483
7517
  reviewVendor: _enum(["prefer", "require", "off"]),
7484
7518
  reviewGates: reviewGatesSchema.optional(),
@@ -7540,6 +7574,10 @@ var init_operations = __esm(() => {
7540
7574
  model: text3.optional(),
7541
7575
  providerHealth: providerHealthSchema
7542
7576
  });
7577
+ routeOutcomeSchema = strictObject({
7578
+ at: text3,
7579
+ outcome: _enum(["passed", "failed", "rejected"])
7580
+ });
7543
7581
  routeEvidenceSchema = strictObject({
7544
7582
  actorType,
7545
7583
  model: text3.optional(),
@@ -7547,6 +7585,7 @@ var init_operations = __esm(() => {
7547
7585
  successes: number2().int().nonnegative(),
7548
7586
  totalCostUsd: amount.nullable(),
7549
7587
  successfulDeliverableCostUsd: amount.nullable(),
7588
+ recent: array(routeOutcomeSchema).max(MAX_EVIDENCE_WINDOW).optional(),
7550
7589
  providerHealth: providerHealthSchema.optional()
7551
7590
  }).refine((entry) => entry.successes <= entry.samples, "Route successes cannot exceed actual samples.");
7552
7591
  reviewDecisionSchema = strictObject({
@@ -7834,8 +7873,14 @@ function chiefOperatingPolicy(config, readyActors, automatic = true, skillCompat
7834
7873
  outputPerMillionUsd: item.output_per_million_usd
7835
7874
  })),
7836
7875
  minSamples: config.routing.min_samples,
7837
- minSuccessRate: config.routing.min_success_rate
7838
- } : automatic && readyActors.length > 1 ? { candidates: readyActors.map((actorType) => ({ actorType })), minSamples: 3, minSuccessRate: 0.8 } : undefined,
7876
+ minSuccessRate: config.routing.min_success_rate,
7877
+ evidenceWindow: config.routing.evidence_window
7878
+ } : automatic && readyActors.length > 1 ? {
7879
+ candidates: readyActors.map((actorType) => ({ actorType })),
7880
+ minSamples: 3,
7881
+ minSuccessRate: 0.8,
7882
+ evidenceWindow: DEFAULT_EVIDENCE_WINDOW
7883
+ } : undefined,
7839
7884
  reviewVendor: config.review_vendor ?? "prefer",
7840
7885
  reviewGates: config.review_gates,
7841
7886
  memory: config.memory ?? true,
@@ -7892,7 +7937,8 @@ var init_chief_schema = __esm(() => {
7892
7937
  output_per_million_usd: price
7893
7938
  })).min(1).max(20),
7894
7939
  min_samples: number2().int().min(1).max(1000).default(3),
7895
- min_success_rate: number2().min(0).max(1).default(0.8)
7940
+ min_success_rate: number2().min(0).max(1).default(0.8),
7941
+ evidence_window: number2().int().min(1).max(MAX_EVIDENCE_WINDOW).default(DEFAULT_EVIDENCE_WINDOW)
7896
7942
  }).optional(),
7897
7943
  review_vendor: _enum(["prefer", "require", "off"]).optional(),
7898
7944
  review_gates: reviewGatesSchema.optional(),
@@ -15268,6 +15314,7 @@ function mergeConfigs(global, project, env) {
15268
15314
  agentTimeout: projectActor?.timeout ?? globalActor?.timeout ?? defaults.agentTimeout,
15269
15315
  agentMaxRetries: projectActor?.max_retries ?? globalActor?.max_retries ?? defaults.agentMaxRetries,
15270
15316
  agentRetryDelay: projectActor?.retry_delay ?? globalActor?.retry_delay ?? defaults.agentRetryDelay,
15317
+ agentRetryRetentionSec: projectActor?.retry_retention_sec ?? globalActor?.retry_retention_sec,
15271
15318
  maxParallel: resolveMaxParallel(projectActor?.max_parallel ?? globalActor?.max_parallel, hw.recommended),
15272
15319
  serverPort: project?.server?.port ?? global?.server?.port ?? defaults.serverPort,
15273
15320
  logLevel: project?.logging?.level ?? global?.logging?.level ?? defaults.logLevel,
@@ -15467,6 +15514,7 @@ var init_yaml_loader = __esm(() => {
15467
15514
  agentTimeout: number2().min(30),
15468
15515
  agentMaxRetries: number2().min(1),
15469
15516
  agentRetryDelay: number2().min(1),
15517
+ agentRetryRetentionSec: number2().min(1).optional(),
15470
15518
  maxParallel: number2().min(1),
15471
15519
  serverPort: number2().int().min(1).max(65535),
15472
15520
  logLevel: _enum(["debug", "info", "warn", "error"]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-valley",
3
- "version": "4.8.8",
3
+ "version": "4.9.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=26.10.0",