mtech-ai-local-runner 0.1.96 → 0.1.98

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.
@@ -5,7 +5,7 @@ import { createHash, randomUUID } from "node:crypto";
5
5
  import { resolve, join, sep, dirname } from "node:path";
6
6
  import { assertOwnedGitObjectStorage, RegisteredSubmoduleMaterializer } from './registered-submodules.js';
7
7
  import { isP1WorkingBranch } from '../publication/git-snapshot.js';
8
- import { repositoryAccessFailure, RepositoryAccessError } from './repository-access.js';
8
+ import { gitErrorOf, GitReadError, repositoryAccessFailure, RepositoryAccessError } from './repository-access.js';
9
9
  export class WorkspaceManager {
10
10
  deps;
11
11
  submodules;
@@ -104,7 +104,7 @@ export class WorkspaceManager {
104
104
  await managedGit(["--git-dir", mirrorPath, "cat-file", "-e", `${input.baseCommitSha}^{commit}`]);
105
105
  }
106
106
  catch (error) {
107
- throw this.accessError(error) ?? new Error(`Repository revision ${input.baseCommitSha} is unavailable`);
107
+ throw this.accessError(error) ?? new GitReadError(`Repository revision ${input.baseCommitSha} is unavailable`, gitErrorOf(error));
108
108
  }
109
109
  if (!await this.exists(workspacePath)) {
110
110
  await managedGit(["--git-dir", mirrorPath, "worktree", "add", "--detach", workspacePath, input.baseCommitSha]);
@@ -198,10 +198,13 @@ export class WorkspaceManager {
198
198
  await handle.close();
199
199
  }
200
200
  }
201
- /** A credential or network failure keeps its code (Work Item 6f9e64ae); anything else stays the caller's error. */
201
+ /**
202
+ * A credential or network failure keeps its code (Work Item 6f9e64ae) and the redacted end of Git's error (Work Item
203
+ * 6dc9d8be); anything else stays the caller's error, whose stderr the coordinator reads the same way.
204
+ */
202
205
  accessError(error) {
203
206
  const code = repositoryAccessFailure(error);
204
- return code === undefined ? undefined : new RepositoryAccessError(code);
207
+ return code === undefined ? undefined : new RepositoryAccessError(code, gitErrorOf(error));
205
208
  }
206
209
  assertContained(root, candidate) {
207
210
  const resolved = resolve(candidate);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mtech-ai-local-runner",
3
- "version": "0.1.96",
3
+ "version": "0.1.98",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "bin": {