@odla-ai/harness 0.11.8 → 0.11.9

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/node.d.cts CHANGED
@@ -596,6 +596,34 @@ interface CodeToolBrokerOptions {
596
596
  onDecision?(decision: CodeToolDecision): Promise<void> | void;
597
597
  }
598
598
 
599
+ /**
600
+ * An installed dependency tree lent to a recipe for the length of one run.
601
+ *
602
+ * Mounted under a reserved name and removed in a finally, so the agent can run
603
+ * a real build without the tree ever being addressable by a patch.
604
+ */
605
+ interface RecipeDependencies {
606
+ /** Absolute path to an installed dependency tree on the host. */
607
+ source: string;
608
+ /** Where it appears inside the workspace. Must be a reserved name, so the
609
+ * agent still cannot address it. */
610
+ mountAs?: string;
611
+ }
612
+ /**
613
+ * Wrap an executor so `dependencies.source` is present during each recipe run.
614
+ *
615
+ * It is linked, not copied. A link costs nothing per run, and dependencies are
616
+ * identical across every attempt, racer and verification — copying them would
617
+ * multiply the largest thing in the tree by the number of stages.
618
+ *
619
+ * The link is removed in a `finally`, so a recipe that times out or throws
620
+ * cannot leave it behind for `workspace.patch()` to diff or
621
+ * `digestStagedWorkspace` to hash.
622
+ */
623
+ declare function withRecipeDependencies(executor: CodeRecipeExecutor, dependencies: RecipeDependencies): CodeRecipeExecutor;
624
+ /** Resolve the dependency tree for a repository root, when it has one. */
625
+ declare function installedDependencies(repoRoot: string): Promise<RecipeDependencies | null>;
626
+
599
627
  /** The file at a repository's root that declares its verification recipes. */
600
628
  declare const REPOSITORY_RECIPES_FILE = "odla.recipes.json";
601
629
  /** The release-owned execution envelope every repository-declared recipe runs in.
@@ -682,6 +710,9 @@ interface TheseusRuntimeEngineOptions {
682
710
  /** Injectable agent attempt. Defaults to runAgent over the brokered surface. */
683
711
  runAgentAttempt?: (options: CodeAgentAttemptOptions) => Promise<CodeAgentAttemptResult>;
684
712
  recipeExecutor?: CodeRecipeExecutor;
713
+ /** The host's installed dependency tree, lent read-only to every recipe
714
+ * container so a real test runner can be a proof in an offline sandbox. */
715
+ recipeDependencies?: RecipeDependencies | null;
685
716
  /** Owner-visible and terminal-visible bounded runtime failures. */
686
717
  onDiagnostic?: (message: string) => void;
687
718
  /** Skills the host adds for a session, beyond the sandbox surface.
@@ -1580,41 +1611,15 @@ declare function describePatchFailure(patch: string, detail: string): string;
1580
1611
  /** Apply a previously validated patch without invoking a shell or repository hooks. */
1581
1612
  declare function applyCodePatch(workspaceDir: string, rawPatch: string, paths: readonly string[]): Promise<void>;
1582
1613
 
1583
- /**
1584
- * An installed dependency tree lent to a recipe for the length of one run.
1585
- *
1586
- * Mounted under a reserved name and removed in a finally, so the agent can run
1587
- * a real build without the tree ever being addressable by a patch.
1588
- */
1589
- interface RecipeDependencies {
1590
- /** Absolute path to an installed dependency tree on the host. */
1591
- source: string;
1592
- /** Where it appears inside the workspace. Must be a reserved name, so the
1593
- * agent still cannot address it. */
1594
- mountAs?: string;
1595
- }
1596
- /**
1597
- * Wrap an executor so `dependencies.source` is present during each recipe run.
1598
- *
1599
- * It is linked, not copied. A link costs nothing per run, and dependencies are
1600
- * identical across every attempt, racer and verification — copying them would
1601
- * multiply the largest thing in the tree by the number of stages.
1602
- *
1603
- * The link is removed in a `finally`, so a recipe that times out or throws
1604
- * cannot leave it behind for `workspace.patch()` to diff or
1605
- * `digestStagedWorkspace` to hash.
1606
- */
1607
- declare function withRecipeDependencies(executor: CodeRecipeExecutor, dependencies: RecipeDependencies): CodeRecipeExecutor;
1608
- /** Resolve the dependency tree for a repository root, when it has one. */
1609
- declare function installedDependencies(repoRoot: string): Promise<RecipeDependencies | null>;
1610
-
1611
1614
  /** Every ordinary, policy-legal source path under `root`, sorted. */
1612
1615
  declare function registeredFiles(root: string, limit?: number): Promise<string[]>;
1613
1616
 
1614
1617
  /** Build a trusted, fixed command for an isolated and networkless recipe container. */
1615
- declare function buildRecipeContainerArgs(engine: ContainerEngine, workspaceDir: string, recipe: CodeBuildRecipe, name?: string): string[];
1618
+ declare function buildRecipeContainerArgs(engine: ContainerEngine, workspaceDir: string, recipe: CodeBuildRecipe, name?: string, dependencies?: RecipeDependencies | null): string[];
1616
1619
  /** Create a recipe executor that never invokes a shell and never mounts credentials. */
1617
- declare function createContainerRecipeExecutor(engine: ContainerEngine): CodeRecipeExecutor;
1620
+ declare function createContainerRecipeExecutor(engine: ContainerEngine, options?: {
1621
+ dependencies?: RecipeDependencies | null;
1622
+ }): CodeRecipeExecutor;
1618
1623
  /** Validate immutable recipe identity, digest image, command, and resource bounds. */
1619
1624
  declare function assertCodeBuildRecipe(recipe: CodeBuildRecipe): void;
1620
1625
 
package/dist/node.d.ts CHANGED
@@ -596,6 +596,34 @@ interface CodeToolBrokerOptions {
596
596
  onDecision?(decision: CodeToolDecision): Promise<void> | void;
597
597
  }
598
598
 
599
+ /**
600
+ * An installed dependency tree lent to a recipe for the length of one run.
601
+ *
602
+ * Mounted under a reserved name and removed in a finally, so the agent can run
603
+ * a real build without the tree ever being addressable by a patch.
604
+ */
605
+ interface RecipeDependencies {
606
+ /** Absolute path to an installed dependency tree on the host. */
607
+ source: string;
608
+ /** Where it appears inside the workspace. Must be a reserved name, so the
609
+ * agent still cannot address it. */
610
+ mountAs?: string;
611
+ }
612
+ /**
613
+ * Wrap an executor so `dependencies.source` is present during each recipe run.
614
+ *
615
+ * It is linked, not copied. A link costs nothing per run, and dependencies are
616
+ * identical across every attempt, racer and verification — copying them would
617
+ * multiply the largest thing in the tree by the number of stages.
618
+ *
619
+ * The link is removed in a `finally`, so a recipe that times out or throws
620
+ * cannot leave it behind for `workspace.patch()` to diff or
621
+ * `digestStagedWorkspace` to hash.
622
+ */
623
+ declare function withRecipeDependencies(executor: CodeRecipeExecutor, dependencies: RecipeDependencies): CodeRecipeExecutor;
624
+ /** Resolve the dependency tree for a repository root, when it has one. */
625
+ declare function installedDependencies(repoRoot: string): Promise<RecipeDependencies | null>;
626
+
599
627
  /** The file at a repository's root that declares its verification recipes. */
600
628
  declare const REPOSITORY_RECIPES_FILE = "odla.recipes.json";
601
629
  /** The release-owned execution envelope every repository-declared recipe runs in.
@@ -682,6 +710,9 @@ interface TheseusRuntimeEngineOptions {
682
710
  /** Injectable agent attempt. Defaults to runAgent over the brokered surface. */
683
711
  runAgentAttempt?: (options: CodeAgentAttemptOptions) => Promise<CodeAgentAttemptResult>;
684
712
  recipeExecutor?: CodeRecipeExecutor;
713
+ /** The host's installed dependency tree, lent read-only to every recipe
714
+ * container so a real test runner can be a proof in an offline sandbox. */
715
+ recipeDependencies?: RecipeDependencies | null;
685
716
  /** Owner-visible and terminal-visible bounded runtime failures. */
686
717
  onDiagnostic?: (message: string) => void;
687
718
  /** Skills the host adds for a session, beyond the sandbox surface.
@@ -1580,41 +1611,15 @@ declare function describePatchFailure(patch: string, detail: string): string;
1580
1611
  /** Apply a previously validated patch without invoking a shell or repository hooks. */
1581
1612
  declare function applyCodePatch(workspaceDir: string, rawPatch: string, paths: readonly string[]): Promise<void>;
1582
1613
 
1583
- /**
1584
- * An installed dependency tree lent to a recipe for the length of one run.
1585
- *
1586
- * Mounted under a reserved name and removed in a finally, so the agent can run
1587
- * a real build without the tree ever being addressable by a patch.
1588
- */
1589
- interface RecipeDependencies {
1590
- /** Absolute path to an installed dependency tree on the host. */
1591
- source: string;
1592
- /** Where it appears inside the workspace. Must be a reserved name, so the
1593
- * agent still cannot address it. */
1594
- mountAs?: string;
1595
- }
1596
- /**
1597
- * Wrap an executor so `dependencies.source` is present during each recipe run.
1598
- *
1599
- * It is linked, not copied. A link costs nothing per run, and dependencies are
1600
- * identical across every attempt, racer and verification — copying them would
1601
- * multiply the largest thing in the tree by the number of stages.
1602
- *
1603
- * The link is removed in a `finally`, so a recipe that times out or throws
1604
- * cannot leave it behind for `workspace.patch()` to diff or
1605
- * `digestStagedWorkspace` to hash.
1606
- */
1607
- declare function withRecipeDependencies(executor: CodeRecipeExecutor, dependencies: RecipeDependencies): CodeRecipeExecutor;
1608
- /** Resolve the dependency tree for a repository root, when it has one. */
1609
- declare function installedDependencies(repoRoot: string): Promise<RecipeDependencies | null>;
1610
-
1611
1614
  /** Every ordinary, policy-legal source path under `root`, sorted. */
1612
1615
  declare function registeredFiles(root: string, limit?: number): Promise<string[]>;
1613
1616
 
1614
1617
  /** Build a trusted, fixed command for an isolated and networkless recipe container. */
1615
- declare function buildRecipeContainerArgs(engine: ContainerEngine, workspaceDir: string, recipe: CodeBuildRecipe, name?: string): string[];
1618
+ declare function buildRecipeContainerArgs(engine: ContainerEngine, workspaceDir: string, recipe: CodeBuildRecipe, name?: string, dependencies?: RecipeDependencies | null): string[];
1616
1619
  /** Create a recipe executor that never invokes a shell and never mounts credentials. */
1617
- declare function createContainerRecipeExecutor(engine: ContainerEngine): CodeRecipeExecutor;
1620
+ declare function createContainerRecipeExecutor(engine: ContainerEngine, options?: {
1621
+ dependencies?: RecipeDependencies | null;
1622
+ }): CodeRecipeExecutor;
1618
1623
  /** Validate immutable recipe identity, digest image, command, and resource bounds. */
1619
1624
  declare function assertCodeBuildRecipe(recipe: CodeBuildRecipe): void;
1620
1625
 
package/dist/node.js CHANGED
@@ -60,7 +60,7 @@ import {
60
60
  validateRelativePath,
61
61
  verifyCodeCandidate,
62
62
  withProofRecipes
63
- } from "./chunk-NUDKRYL4.js";
63
+ } from "./chunk-X5KT7NHM.js";
64
64
  import "./chunk-INL642J5.js";
65
65
  import {
66
66
  assertPinnedImage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/harness",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
4
4
  "description": "Safe, inspectable coding-task protocol and credentialless container runner for odla Studio.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://odla.ai/docs/packages/harness",