@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.d.cts CHANGED
@@ -2305,7 +2305,7 @@ declare class RepoManager {
2305
2305
  * Creates on first access, fetches updates on subsequent calls.
2306
2306
  * Returns the absolute path to the cache directory.
2307
2307
  */
2308
- ensureCache(source: RepoSource, depth?: number): Promise<string>;
2308
+ ensureCache(source: RepoSource, depth?: number, resolve?: 'remote' | 'local'): Promise<string>;
2309
2309
  /**
2310
2310
  * Clone a repo from cache into the workspace at the configured path.
2311
2311
  * Handles checkout, ref resolution, ancestor walking, shallow clone, sparse checkout.
@@ -2628,14 +2628,30 @@ declare const AgentVConfigSchema: z.ZodObject<{
2628
2628
  maxRetries: z.ZodOptional<z.ZodNumber>;
2629
2629
  /** Agent timeout in milliseconds (default: 120000) */
2630
2630
  agentTimeoutMs: z.ZodOptional<z.ZodNumber>;
2631
+ /** Enable verbose logging */
2632
+ verbose: z.ZodOptional<z.ZodBoolean>;
2633
+ /** Write human-readable trace JSONL to this path (supports {timestamp} placeholder) */
2634
+ traceFile: z.ZodOptional<z.ZodString>;
2635
+ /** Always keep temp workspaces after eval */
2636
+ keepWorkspaces: z.ZodOptional<z.ZodBoolean>;
2637
+ /** Write OTLP JSON trace to this path (supports {timestamp} placeholder) */
2638
+ otelFile: z.ZodOptional<z.ZodString>;
2631
2639
  }, "strip", z.ZodTypeAny, {
2640
+ verbose?: boolean | undefined;
2632
2641
  workers?: number | undefined;
2633
2642
  maxRetries?: number | undefined;
2634
2643
  agentTimeoutMs?: number | undefined;
2644
+ keepWorkspaces?: boolean | undefined;
2645
+ traceFile?: string | undefined;
2646
+ otelFile?: string | undefined;
2635
2647
  }, {
2648
+ verbose?: boolean | undefined;
2636
2649
  workers?: number | undefined;
2637
2650
  maxRetries?: number | undefined;
2638
2651
  agentTimeoutMs?: number | undefined;
2652
+ keepWorkspaces?: boolean | undefined;
2653
+ traceFile?: string | undefined;
2654
+ otelFile?: string | undefined;
2639
2655
  }>>;
2640
2656
  /** Output settings */
2641
2657
  output: z.ZodOptional<z.ZodObject<{
@@ -2682,9 +2698,13 @@ declare const AgentVConfigSchema: z.ZodObject<{
2682
2698
  format?: "yaml" | "jsonl" | "json" | "xml" | undefined;
2683
2699
  } | undefined;
2684
2700
  execution?: {
2701
+ verbose?: boolean | undefined;
2685
2702
  workers?: number | undefined;
2686
2703
  maxRetries?: number | undefined;
2687
2704
  agentTimeoutMs?: number | undefined;
2705
+ keepWorkspaces?: boolean | undefined;
2706
+ traceFile?: string | undefined;
2707
+ otelFile?: string | undefined;
2688
2708
  } | undefined;
2689
2709
  cache?: {
2690
2710
  enabled?: boolean | undefined;
@@ -2700,9 +2720,13 @@ declare const AgentVConfigSchema: z.ZodObject<{
2700
2720
  format?: "yaml" | "jsonl" | "json" | "xml" | undefined;
2701
2721
  } | undefined;
2702
2722
  execution?: {
2723
+ verbose?: boolean | undefined;
2703
2724
  workers?: number | undefined;
2704
2725
  maxRetries?: number | undefined;
2705
2726
  agentTimeoutMs?: number | undefined;
2727
+ keepWorkspaces?: boolean | undefined;
2728
+ traceFile?: string | undefined;
2729
+ otelFile?: string | undefined;
2706
2730
  } | undefined;
2707
2731
  cache?: {
2708
2732
  enabled?: boolean | undefined;
package/dist/index.d.ts CHANGED
@@ -2305,7 +2305,7 @@ declare class RepoManager {
2305
2305
  * Creates on first access, fetches updates on subsequent calls.
2306
2306
  * Returns the absolute path to the cache directory.
2307
2307
  */
2308
- ensureCache(source: RepoSource, depth?: number): Promise<string>;
2308
+ ensureCache(source: RepoSource, depth?: number, resolve?: 'remote' | 'local'): Promise<string>;
2309
2309
  /**
2310
2310
  * Clone a repo from cache into the workspace at the configured path.
2311
2311
  * Handles checkout, ref resolution, ancestor walking, shallow clone, sparse checkout.
@@ -2628,14 +2628,30 @@ declare const AgentVConfigSchema: z.ZodObject<{
2628
2628
  maxRetries: z.ZodOptional<z.ZodNumber>;
2629
2629
  /** Agent timeout in milliseconds (default: 120000) */
2630
2630
  agentTimeoutMs: z.ZodOptional<z.ZodNumber>;
2631
+ /** Enable verbose logging */
2632
+ verbose: z.ZodOptional<z.ZodBoolean>;
2633
+ /** Write human-readable trace JSONL to this path (supports {timestamp} placeholder) */
2634
+ traceFile: z.ZodOptional<z.ZodString>;
2635
+ /** Always keep temp workspaces after eval */
2636
+ keepWorkspaces: z.ZodOptional<z.ZodBoolean>;
2637
+ /** Write OTLP JSON trace to this path (supports {timestamp} placeholder) */
2638
+ otelFile: z.ZodOptional<z.ZodString>;
2631
2639
  }, "strip", z.ZodTypeAny, {
2640
+ verbose?: boolean | undefined;
2632
2641
  workers?: number | undefined;
2633
2642
  maxRetries?: number | undefined;
2634
2643
  agentTimeoutMs?: number | undefined;
2644
+ keepWorkspaces?: boolean | undefined;
2645
+ traceFile?: string | undefined;
2646
+ otelFile?: string | undefined;
2635
2647
  }, {
2648
+ verbose?: boolean | undefined;
2636
2649
  workers?: number | undefined;
2637
2650
  maxRetries?: number | undefined;
2638
2651
  agentTimeoutMs?: number | undefined;
2652
+ keepWorkspaces?: boolean | undefined;
2653
+ traceFile?: string | undefined;
2654
+ otelFile?: string | undefined;
2639
2655
  }>>;
2640
2656
  /** Output settings */
2641
2657
  output: z.ZodOptional<z.ZodObject<{
@@ -2682,9 +2698,13 @@ declare const AgentVConfigSchema: z.ZodObject<{
2682
2698
  format?: "yaml" | "jsonl" | "json" | "xml" | undefined;
2683
2699
  } | undefined;
2684
2700
  execution?: {
2701
+ verbose?: boolean | undefined;
2685
2702
  workers?: number | undefined;
2686
2703
  maxRetries?: number | undefined;
2687
2704
  agentTimeoutMs?: number | undefined;
2705
+ keepWorkspaces?: boolean | undefined;
2706
+ traceFile?: string | undefined;
2707
+ otelFile?: string | undefined;
2688
2708
  } | undefined;
2689
2709
  cache?: {
2690
2710
  enabled?: boolean | undefined;
@@ -2700,9 +2720,13 @@ declare const AgentVConfigSchema: z.ZodObject<{
2700
2720
  format?: "yaml" | "jsonl" | "json" | "xml" | undefined;
2701
2721
  } | undefined;
2702
2722
  execution?: {
2723
+ verbose?: boolean | undefined;
2703
2724
  workers?: number | undefined;
2704
2725
  maxRetries?: number | undefined;
2705
2726
  agentTimeoutMs?: number | undefined;
2727
+ keepWorkspaces?: boolean | undefined;
2728
+ traceFile?: string | undefined;
2729
+ otelFile?: string | undefined;
2706
2730
  } | undefined;
2707
2731
  cache?: {
2708
2732
  enabled?: boolean | undefined;
package/dist/index.js CHANGED
@@ -12653,14 +12653,24 @@ var RepoManager = class {
12653
12653
  * Creates on first access, fetches updates on subsequent calls.
12654
12654
  * Returns the absolute path to the cache directory.
12655
12655
  */
12656
- async ensureCache(source, depth) {
12656
+ async ensureCache(source, depth, resolve) {
12657
12657
  const key = cacheKey(source);
12658
12658
  const cachePath = path35.join(this.cacheDir, key);
12659
12659
  const lockPath = `${cachePath}.lock`;
12660
+ const cacheExists = existsSync2(path35.join(cachePath, "HEAD"));
12661
+ if (resolve === "local") {
12662
+ if (cacheExists) {
12663
+ return cachePath;
12664
+ }
12665
+ const url = getSourceUrl(source);
12666
+ throw new Error(
12667
+ `No cache found for \`${url}\`. Run \`agentv cache add --url ${url} --from <local-path>\` to seed it.`
12668
+ );
12669
+ }
12660
12670
  await mkdir11(this.cacheDir, { recursive: true });
12661
12671
  await acquireLock(lockPath);
12662
12672
  try {
12663
- if (existsSync2(path35.join(cachePath, "HEAD"))) {
12673
+ if (cacheExists) {
12664
12674
  const fetchArgs = ["fetch", "--prune"];
12665
12675
  if (depth) {
12666
12676
  fetchArgs.push("--depth", String(depth));
@@ -12687,7 +12697,11 @@ var RepoManager = class {
12687
12697
  */
12688
12698
  async materialize(repo, workspacePath) {
12689
12699
  const targetDir = path35.join(workspacePath, repo.path);
12690
- const cachePath = await this.ensureCache(repo.source, repo.clone?.depth);
12700
+ const cachePath = await this.ensureCache(
12701
+ repo.source,
12702
+ repo.clone?.depth,
12703
+ repo.checkout?.resolve
12704
+ );
12691
12705
  const cloneArgs = ["clone"];
12692
12706
  if (repo.clone?.depth) {
12693
12707
  cloneArgs.push("--depth", String(repo.clone.depth));
@@ -14482,7 +14496,15 @@ var AgentVConfigSchema = z5.object({
14482
14496
  /** Maximum retries on failure (default: 2) */
14483
14497
  maxRetries: z5.number().int().min(0).optional(),
14484
14498
  /** Agent timeout in milliseconds (default: 120000) */
14485
- agentTimeoutMs: z5.number().int().min(0).optional()
14499
+ agentTimeoutMs: z5.number().int().min(0).optional(),
14500
+ /** Enable verbose logging */
14501
+ verbose: z5.boolean().optional(),
14502
+ /** Write human-readable trace JSONL to this path (supports {timestamp} placeholder) */
14503
+ traceFile: z5.string().optional(),
14504
+ /** Always keep temp workspaces after eval */
14505
+ keepWorkspaces: z5.boolean().optional(),
14506
+ /** Write OTLP JSON trace to this path (supports {timestamp} placeholder) */
14507
+ otelFile: z5.string().optional()
14486
14508
  }).optional(),
14487
14509
  /** Output settings */
14488
14510
  output: z5.object({