@rallycry/conveyor-agent 10.13.55 → 10.13.56

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.
@@ -3,11 +3,13 @@ import {
3
3
  DEFAULT_RETRY_DELAY_MS,
4
4
  FETCH_TIMEOUT_MS,
5
5
  GIT_PREP_MAX_RETRIES,
6
+ gitCredentialHelper,
6
7
  mapChatHistory,
7
8
  readAgentVersion,
8
9
  registerBootMilestoneSocketFallback,
9
- reportBootMilestone
10
- } from "./chunk-KCB7CSWJ.js";
10
+ reportBootMilestone,
11
+ writeGitCredential
12
+ } from "./chunk-7765OQU5.js";
11
13
  import {
12
14
  LoopLagMonitor,
13
15
  buildConveyorSocketOptions,
@@ -1454,22 +1456,24 @@ async function isAuthError(cwd) {
1454
1456
  return errLooksLikeAuth(err);
1455
1457
  }
1456
1458
  }
1457
- async function updateRemoteToken(cwd, token) {
1459
+ async function updateRemoteCredential(cwd, credential) {
1458
1460
  try {
1459
- const url = await git(cwd, ["remote", "get-url", "origin"]);
1460
- const match = url.match(/github\.com[/:]([^/]+\/[^/]+?)(?:\.git)?\/?$/);
1461
- if (match) {
1462
- const repo = match[1].replace(/\.git$/, "");
1463
- await git(cwd, [
1464
- "remote",
1465
- "set-url",
1466
- "origin",
1467
- `https://x-access-token:${token}@github.com/${repo}.git`
1468
- ]);
1461
+ const currentUrl = await git(cwd, ["remote", "get-url", "origin"]);
1462
+ const cloneUrl = credential.cloneUrl ?? currentUrl;
1463
+ writeGitCredential(cwd, cloneUrl, credential);
1464
+ if (currentUrl !== cloneUrl) {
1465
+ await git(cwd, ["remote", "set-url", "origin", cloneUrl]);
1469
1466
  }
1467
+ await git(cwd, ["config", "--local", "credential.helper", gitCredentialHelper(cwd)]);
1470
1468
  } catch {
1471
1469
  }
1472
1470
  }
1471
+ async function updateRemoteToken(cwd, token) {
1472
+ const username = process.env.CONVEYOR_GIT_USERNAME || "x-access-token";
1473
+ const cloneUrl = process.env.CONVEYOR_GIT_CLONE_URL || void 0;
1474
+ await updateRemoteCredential(cwd, { username, secret: token, cloneUrl });
1475
+ process.env.CONVEYOR_GIT_SECRET = token;
1476
+ }
1473
1477
  function wipRefForBranch(branch) {
1474
1478
  return `conveyor-wip/${branch}`;
1475
1479
  }
@@ -9282,7 +9286,7 @@ Environment \u2014 already built and running. These are the facts you would othe
9282
9286
  `- The repo is cloned at your working directory with \`${context.githubBranch}\` checked out, dependencies installed, database migrated, git configured, and the dev stack up. Commit and push directly to this branch.`,
9283
9287
  `- The web app is served on port 3050, the API on port 7090.`,
9284
9288
  `- Web is served from a production build, not \`next dev\` \u2014 your edits do NOT hot-reload. Run \`bun run web:rebuild\` (rebuild + restart lands in ~2s) before re-testing a UI change. The API hot-reloads on its own.`,
9285
- `- Playwright MCP writes screenshots to the working directory, not a \`.playwright-mcp/\` subfolder. Move or delete them before committing.`,
9289
+ `- Browser automation is the Playwright CLI (\`playwright\`, pinned 1.62.1), NOT an MCP server \u2014 there are no \`mcp__playwright__*\` tools here. Only the headless shell is baked, so a launch must name it AND disable the sandbox: \`chromium.launch({ channel: "chromium-headless-shell", args: ["--no-sandbox"] })\`. A bare \`chromium.launch()\` FAILS: since playwright 1.49 that resolves to the full browser, which is deliberately not installed (pods have no display and cannot run Chromium's sandbox). Screenshots land wherever you write them \u2014 move or delete them before committing.`,
9286
9290
  `- The clone is \`--single-branch\`, so a bare \`git fetch origin <branch>\` does NOT create \`origin/<branch>\`. To reference any other branch, use the explicit refspec: \`git fetch origin <branch>:refs/remotes/origin/<branch>\`.`,
9287
9291
  `- The shell cwd resets between Bash calls, and so does every shell variable. A var you export in one call is EMPTY in the next, which silently redirects output to \`/\` and loses it. Write literal absolute paths (\`git -C\`, \`bun run --cwd\`), and \`mkdir -p\` a directory in the SAME call as the redirect that writes to it.`,
9288
9292
  `- The \`gh\` CLI is available for READ-ONLY PR and CI state (\`gh pr view\`, \`gh pr checks\`, \`gh pr diff\`). Use the mcp__conveyor__* tools for anything that mutates a PR or card.`,
@@ -16304,4 +16308,4 @@ export {
16304
16308
  loadConveyorConfig,
16305
16309
  unshallowRepo
16306
16310
  };
16307
- //# sourceMappingURL=chunk-V33EYJWC.js.map
16311
+ //# sourceMappingURL=chunk-PG3Z6RIC.js.map