agent-valley 4.9.0 → 4.9.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "av",
4
- "version": "4.9.0",
4
+ "version": "4.9.2",
5
5
  "description": "Delegate repository goals to Agent Valley and inspect mission progress and verification evidence.",
6
6
  "author": {
7
7
  "name": "Agent Valley"
package/dist/index.js CHANGED
@@ -57994,8 +57994,10 @@ function frameworkFailure(reason) {
57994
57994
  function nativeOutcome(run) {
57995
57995
  if (run.nativeOutcome === "cancelled")
57996
57996
  return;
57997
- if (run.nativeOutcome)
57998
- return run.nativeOutcome;
57997
+ if (run.nativeOutcome === "passed")
57998
+ return "passed";
57999
+ if (run.nativeOutcome === "failed")
58000
+ return frameworkFailure(run.evidence) ? undefined : "failed";
57999
58001
  if (run.outcome !== "failed")
58000
58002
  return "passed";
58001
58003
  if (run.executionState === "settled" && !frameworkFailure(run.evidence))
@@ -139973,7 +139975,7 @@ init_zod();
139973
139975
  import { createHash as createHash30 } from "node:crypto";
139974
139976
  import { constants as constants18 } from "node:fs";
139975
139977
  import { lstat as lstat30, open as open19, readdir as readdir18, realpath as realpath38, rename as rename5, rm as rm10 } from "node:fs/promises";
139976
- import { dirname as dirname14, join as join66, resolve as resolve39 } from "node:path";
139978
+ import { dirname as dirname14, join as join66, resolve as resolve39, sep as sep20 } from "node:path";
139977
139979
  var digest7 = (content) => createHash30("sha256").update(content).digest("hex");
139978
139980
  var sha2 = string2().regex(/^[a-f0-9]{40,64}$/);
139979
139981
  var preparedSchema = strictObject({
@@ -139986,8 +139988,8 @@ var preparedSchema = strictObject({
139986
139988
  tree: sha2,
139987
139989
  recoveryCommit: sha2,
139988
139990
  baselineDigest: string2().regex(/^[a-f0-9]{64}$/),
139989
- device: number2().int(),
139990
- inode: number2().int(),
139991
+ device: number2(),
139992
+ inode: number2(),
139991
139993
  at: exports_iso.datetime()
139992
139994
  });
139993
139995
  var completedSchema = strictObject({
@@ -140085,7 +140087,7 @@ async function inspectClone(path, baseline) {
140085
140087
  git2(path, ["worktree", "list", "--porcelain"]),
140086
140088
  git2(path, ["remote"])
140087
140089
  ]);
140088
- if (top.trim() !== path || branch.trim() !== baseline.branch || head.trim() !== baseline.commit)
140090
+ if (resolve39(top.trim()) !== resolve39(path) || branch.trim() !== baseline.branch || head.trim() !== baseline.commit)
140089
140091
  throw new Error("Frozen baseline repository identity changed.");
140090
140092
  const expectedRefs = [
140091
140093
  `refs/heads/${baseline.branch} ${baseline.commit}`,
@@ -140095,8 +140097,8 @@ async function inspectClone(path, baseline) {
140095
140097
  `).sort()) !== JSON.stringify(expectedRefs) || remotes.trim())
140096
140098
  throw new Error("Frozen baseline has extra Git references or remotes.");
140097
140099
  if (worktrees.split(`
140098
- `).filter((line) => line.startsWith("worktree ")).join(`
140099
- `) !== `worktree ${path}`)
140100
+ `).filter((line) => line.startsWith("worktree ")).map((line) => `worktree ${resolve39(line.slice("worktree ".length))}`).join(`
140101
+ `) !== `worktree ${resolve39(path)}`)
140100
140102
  throw new Error("Frozen baseline has linked worktrees.");
140101
140103
  for (const entry of status.split("\x00").filter(Boolean)) {
140102
140104
  if (entry === "!! .agent-valley/" && await emptyScratch(join66(path, ".agent-valley")))
@@ -140144,7 +140146,7 @@ async function protectMissionBaseline(mission, protectedPaths) {
140144
140146
  protectedPaths.add(mission.workspace.path);
140145
140147
  const workspace = mission.workspace.path;
140146
140148
  const prefix = join66(mission.repositoryRoot, ".agent-valley", "operations");
140147
- if (!workspace.startsWith(`${prefix}/`))
140149
+ if (!workspace.startsWith(`${prefix}${sep20}`))
140148
140150
  return;
140149
140151
  await localDirectory3(dirname14(workspace));
140150
140152
  const raw = await readLocal(join66(dirname14(workspace), "workspace.json"));
@@ -140207,7 +140209,7 @@ async function pruneContinuousBaselines(storageRoot, operationId, options = {})
140207
140209
  const operation = await store.load(operationId);
140208
140210
  const root = operation.repositoryRoot;
140209
140211
  await localDirectory3(root);
140210
- if ((await git2(root, ["rev-parse", "--show-toplevel"])).trim() !== root)
140212
+ if (resolve39((await git2(root, ["rev-parse", "--show-toplevel"])).trim()) !== resolve39(root))
140211
140213
  throw new Error("Restore the original Git repository before pruning.");
140212
140214
  const artifacts = join66(root, ".agent-valley", "operations", operationId);
140213
140215
  const baselines = join66(artifacts, "baselines");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-valley",
3
- "version": "4.9.0",
3
+ "version": "4.9.2",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=26.10.0",