@agentv/core 2.11.1 → 2.11.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/dist/index.cjs CHANGED
@@ -15512,14 +15512,24 @@ var RepoManager = class {
15512
15512
  * Creates on first access, fetches updates on subsequent calls.
15513
15513
  * Returns the absolute path to the cache directory.
15514
15514
  */
15515
- async ensureCache(source, depth) {
15515
+ async ensureCache(source, depth, resolve) {
15516
15516
  const key = cacheKey(source);
15517
15517
  const cachePath = import_node_path38.default.join(this.cacheDir, key);
15518
15518
  const lockPath = `${cachePath}.lock`;
15519
+ const cacheExists = (0, import_node_fs11.existsSync)(import_node_path38.default.join(cachePath, "HEAD"));
15520
+ if (resolve === "local") {
15521
+ if (cacheExists) {
15522
+ return cachePath;
15523
+ }
15524
+ const url = getSourceUrl(source);
15525
+ throw new Error(
15526
+ `No cache found for \`${url}\`. Run \`agentv cache add --url ${url} --from <local-path>\` to seed it.`
15527
+ );
15528
+ }
15519
15529
  await (0, import_promises27.mkdir)(this.cacheDir, { recursive: true });
15520
15530
  await acquireLock(lockPath);
15521
15531
  try {
15522
- if ((0, import_node_fs11.existsSync)(import_node_path38.default.join(cachePath, "HEAD"))) {
15532
+ if (cacheExists) {
15523
15533
  const fetchArgs = ["fetch", "--prune"];
15524
15534
  if (depth) {
15525
15535
  fetchArgs.push("--depth", String(depth));
@@ -15546,7 +15556,11 @@ var RepoManager = class {
15546
15556
  */
15547
15557
  async materialize(repo, workspacePath) {
15548
15558
  const targetDir = import_node_path38.default.join(workspacePath, repo.path);
15549
- const cachePath = await this.ensureCache(repo.source, repo.clone?.depth);
15559
+ const cachePath = await this.ensureCache(
15560
+ repo.source,
15561
+ repo.clone?.depth,
15562
+ repo.checkout?.resolve
15563
+ );
15550
15564
  const cloneArgs = ["clone"];
15551
15565
  if (repo.clone?.depth) {
15552
15566
  cloneArgs.push("--depth", String(repo.clone.depth));
@@ -17341,7 +17355,15 @@ var AgentVConfigSchema = import_zod6.z.object({
17341
17355
  /** Maximum retries on failure (default: 2) */
17342
17356
  maxRetries: import_zod6.z.number().int().min(0).optional(),
17343
17357
  /** Agent timeout in milliseconds (default: 120000) */
17344
- agentTimeoutMs: import_zod6.z.number().int().min(0).optional()
17358
+ agentTimeoutMs: import_zod6.z.number().int().min(0).optional(),
17359
+ /** Enable verbose logging */
17360
+ verbose: import_zod6.z.boolean().optional(),
17361
+ /** Write human-readable trace JSONL to this path (supports {timestamp} placeholder) */
17362
+ traceFile: import_zod6.z.string().optional(),
17363
+ /** Always keep temp workspaces after eval */
17364
+ keepWorkspaces: import_zod6.z.boolean().optional(),
17365
+ /** Write OTLP JSON trace to this path (supports {timestamp} placeholder) */
17366
+ otelFile: import_zod6.z.string().optional()
17345
17367
  }).optional(),
17346
17368
  /** Output settings */
17347
17369
  output: import_zod6.z.object({