@alan-ai-hq/agent-manager-linux-x64 0.1.203 → 0.1.204

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/alan-agent.cjs CHANGED
@@ -24781,7 +24781,8 @@ var init_run_log_upload = __esm({
24781
24781
  RUN_LOG_UPLOAD_ERROR_CODES = {
24782
24782
  runNotFound: "transcript_run_not_found",
24783
24783
  sealBeforeEnd: "run_log_seal_before_end",
24784
- checkpointConflict: "transcript_checkpoint_conflict"
24784
+ checkpointConflict: "transcript_checkpoint_conflict",
24785
+ checkpointRejected: "transcript_checkpoint_rejected"
24785
24786
  };
24786
24787
  offsetSchema = external_exports.number().int().nonnegative();
24787
24788
  runLogUploadReceiptSchema = external_exports.object({
@@ -41440,6 +41441,9 @@ function supportsProactiveAuth(version2) {
41440
41441
  const [minMajor, minMinor] = PROACTIVE_AUTH_MIN_VERSION;
41441
41442
  return major > minMajor || major === minMajor && minor >= minMinor;
41442
41443
  }
41444
+ function remoteForms(host) {
41445
+ return [`https://${host}/`, `git@${host}:`, `ssh://git@${host}/`];
41446
+ }
41443
41447
  async function configureGitCredentialHelper(input2) {
41444
41448
  const scope = `${input2.gatewayUrl.replace(/\/+$/, "")}/${GIT_GATEWAY_HOST_ROUTE}/`;
41445
41449
  const helper = gitCredentialHelperValue(input2);
@@ -41456,13 +41460,9 @@ async function configureGitCredentialHelper(input2) {
41456
41460
  await git2(["config", "--global", `credential.${scope}.useHttpPath`, "true"]);
41457
41461
  for (const host of /* @__PURE__ */ new Set([...GIT_GATEWAY_HTTPS_HOSTS, ...input2.extraHosts])) {
41458
41462
  await unset(`url.${scope}${host}/.insteadOf`);
41459
- await git2([
41460
- "config",
41461
- "--global",
41462
- "--add",
41463
- `url.${scope}${host}/.insteadOf`,
41464
- `https://${host}/`
41465
- ]);
41463
+ for (const remote of remoteForms(host)) {
41464
+ await git2(["config", "--global", "--add", `url.${scope}${host}/.insteadOf`, remote]);
41465
+ }
41466
41466
  }
41467
41467
  const version2 = parseGitVersion((await versionRead).stdout);
41468
41468
  const proactiveAuth = supportsProactiveAuth(version2);
@@ -42361,16 +42361,21 @@ async function configureGh(ghConfigDir, socketPath) {
42361
42361
  }
42362
42362
  async function configureGit(input2, git2) {
42363
42363
  const run5 = createGlobalGitRun(input2);
42364
- for (const githubUrl of [GITHUB_URL, "https://www.github.com/"]) {
42364
+ const sshForms = remoteForms("github.com").filter((form) => form !== GITHUB_URL);
42365
+ for (const githubUrl of [GITHUB_URL, "https://www.github.com/", ...sshForms]) {
42366
+ const pattern = `^${githubUrl.replaceAll(".", "\\.")}`;
42365
42367
  const rewrites = await run5(
42366
- ["config", "--global", "--get-regexp", "^url\\..*\\.insteadof$", `^${githubUrl}`],
42368
+ ["config", "--global", "--get-regexp", "^url\\..*\\.insteadof$", pattern],
42367
42369
  [0, 1]
42368
42370
  );
42369
42371
  for (const line of rewrites.stdout.split("\n")) {
42370
42372
  const key = line.split(" ")[0];
42371
- if (key) await run5(["config", "--global", "--unset-all", key, `^${githubUrl}`], [0, 5]);
42373
+ if (key) await run5(["config", "--global", "--unset-all", key, pattern], [0, 5]);
42372
42374
  }
42373
42375
  }
42376
+ for (const form of sshForms) {
42377
+ await run5(["config", "--global", "--add", `url.${GITHUB_URL}.insteadOf`, form]);
42378
+ }
42374
42379
  await run5(["config", "--global", `http.${GITHUB_URL}.proxy`, git2.proxyUrl]);
42375
42380
  await run5(["config", "--global", `http.${GITHUB_URL}.sslCAInfo`, git2.caPath]);
42376
42381
  }
@@ -42385,6 +42390,7 @@ var init_config3 = __esm({
42385
42390
  import_promises42 = require("node:fs/promises");
42386
42391
  import_node_path46 = require("node:path");
42387
42392
  init_runtime_v2();
42393
+ init_credential_config();
42388
42394
  init_global_config_runner();
42389
42395
  GITHUB_URL = "https://github.com/";
42390
42396
  GH_SOCKET_KEY = "http_unix_socket";
@@ -166461,7 +166467,7 @@ var import_node_worker_threads2 = require("node:worker_threads");
166461
166467
  // package.json
166462
166468
  var package_default = {
166463
166469
  name: "@alan-ai-hq/agent-manager",
166464
- version: "0.1.203",
166470
+ version: "0.1.204",
166465
166471
  private: true,
166466
166472
  type: "module",
166467
166473
  description: "Alan machine runtime (alan-agent): identity, link, reconciler, session holders, run log, uploader, local API",
@@ -172772,9 +172778,13 @@ function withoutMediaData(update) {
172772
172778
  }
172773
172779
  var KEPT_FRACTIONS = [0.5, 0.25, 0.1, 0.02];
172774
172780
  var MIN_TRUNCATED_CHARS = 64 * 1024;
172781
+ function isHighSurrogate2(code) {
172782
+ return code >= 55296 && code <= 56319;
172783
+ }
172775
172784
  function truncatedText(value3, fraction) {
172776
172785
  if (value3.length < MIN_TRUNCATED_CHARS) return value3;
172777
- const kept = Math.floor(value3.length * fraction);
172786
+ const cut = Math.floor(value3.length * fraction);
172787
+ const kept = isHighSurrogate2(value3.charCodeAt(cut - 1)) ? cut - 1 : cut;
172778
172788
  return `${value3.slice(0, kept)}
172779
172789
  [truncated: ${kept} of ${value3.length} characters kept]`;
172780
172790
  }
@@ -179766,7 +179776,7 @@ init_runtime_v2();
179766
179776
  var PARK_MS = 5 * 6e4;
179767
179777
  var UNAUTHORIZED = 401;
179768
179778
  function isFinalRejection(rejection2) {
179769
- return rejection2.status === 404 && rejection2.code === RUN_LOG_UPLOAD_ERROR_CODES.runNotFound || rejection2.status === 409 && rejection2.code === RUN_LOG_UPLOAD_ERROR_CODES.checkpointConflict;
179779
+ return rejection2.status === 404 && rejection2.code === RUN_LOG_UPLOAD_ERROR_CODES.runNotFound || rejection2.status === 409 && rejection2.code === RUN_LOG_UPLOAD_ERROR_CODES.checkpointConflict || rejection2.status === 422 && rejection2.code === RUN_LOG_UPLOAD_ERROR_CODES.checkpointRejected;
179770
179780
  }
179771
179781
  async function settleRejection({ store, clock, log, terminal: terminal2, unauthorized, ended }, { runId, progressPath, progress, rejection: rejection2, tokenAtStart }) {
179772
179782
  if (rejection2.status === UNAUTHORIZED) {
package/alan-holder.cjs CHANGED
@@ -36592,6 +36592,16 @@ var init_global_config_runner = __esm({
36592
36592
  }
36593
36593
  });
36594
36594
 
36595
+ // src/capabilities/git/credential-config.ts
36596
+ function remoteForms(host) {
36597
+ return [`https://${host}/`, `git@${host}:`, `ssh://git@${host}/`];
36598
+ }
36599
+ var init_credential_config = __esm({
36600
+ "src/capabilities/git/credential-config.ts"() {
36601
+ "use strict";
36602
+ }
36603
+ });
36604
+
36595
36605
  // src/capabilities/git/origin-fetch.ts
36596
36606
  async function readTrimmed(path23) {
36597
36607
  return (0, import_promises22.readFile)(path23, "utf8").then(
@@ -36918,16 +36928,21 @@ async function configureGh(ghConfigDir, socketPath) {
36918
36928
  }
36919
36929
  async function configureGit(input2, git2) {
36920
36930
  const run4 = createGlobalGitRun(input2);
36921
- for (const githubUrl of [GITHUB_URL, "https://www.github.com/"]) {
36931
+ const sshForms = remoteForms("github.com").filter((form) => form !== GITHUB_URL);
36932
+ for (const githubUrl of [GITHUB_URL, "https://www.github.com/", ...sshForms]) {
36933
+ const pattern = `^${githubUrl.replaceAll(".", "\\.")}`;
36922
36934
  const rewrites = await run4(
36923
- ["config", "--global", "--get-regexp", "^url\\..*\\.insteadof$", `^${githubUrl}`],
36935
+ ["config", "--global", "--get-regexp", "^url\\..*\\.insteadof$", pattern],
36924
36936
  [0, 1]
36925
36937
  );
36926
36938
  for (const line of rewrites.stdout.split("\n")) {
36927
36939
  const key = line.split(" ")[0];
36928
- if (key) await run4(["config", "--global", "--unset-all", key, `^${githubUrl}`], [0, 5]);
36940
+ if (key) await run4(["config", "--global", "--unset-all", key, pattern], [0, 5]);
36929
36941
  }
36930
36942
  }
36943
+ for (const form of sshForms) {
36944
+ await run4(["config", "--global", "--add", `url.${GITHUB_URL}.insteadOf`, form]);
36945
+ }
36931
36946
  await run4(["config", "--global", `http.${GITHUB_URL}.proxy`, git2.proxyUrl]);
36932
36947
  await run4(["config", "--global", `http.${GITHUB_URL}.sslCAInfo`, git2.caPath]);
36933
36948
  }
@@ -36942,6 +36957,7 @@ var init_config3 = __esm({
36942
36957
  import_promises24 = require("node:fs/promises");
36943
36958
  import_node_path28 = require("node:path");
36944
36959
  init_runtime_v2();
36960
+ init_credential_config();
36945
36961
  init_global_config_runner();
36946
36962
  GITHUB_URL = "https://github.com/";
36947
36963
  GH_SOCKET_KEY = "http_unix_socket";
@@ -144893,9 +144909,13 @@ function withoutMediaData(update) {
144893
144909
  }
144894
144910
  var KEPT_FRACTIONS = [0.5, 0.25, 0.1, 0.02];
144895
144911
  var MIN_TRUNCATED_CHARS = 64 * 1024;
144912
+ function isHighSurrogate(code) {
144913
+ return code >= 55296 && code <= 56319;
144914
+ }
144896
144915
  function truncatedText(value2, fraction) {
144897
144916
  if (value2.length < MIN_TRUNCATED_CHARS) return value2;
144898
- const kept = Math.floor(value2.length * fraction);
144917
+ const cut = Math.floor(value2.length * fraction);
144918
+ const kept = isHighSurrogate(value2.charCodeAt(cut - 1)) ? cut - 1 : cut;
144899
144919
  return `${value2.slice(0, kept)}
144900
144920
  [truncated: ${kept} of ${value2.length} characters kept]`;
144901
144921
  }
@@ -146551,7 +146571,7 @@ async function runHolder({
146551
146571
  // package.json
146552
146572
  var package_default = {
146553
146573
  name: "@alan-ai-hq/agent-manager",
146554
- version: "0.1.203",
146574
+ version: "0.1.204",
146555
146575
  private: true,
146556
146576
  type: "module",
146557
146577
  description: "Alan machine runtime (alan-agent): identity, link, reconciler, session holders, run log, uploader, local API",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alan-ai-hq/agent-manager-linux-x64",
3
- "version": "0.1.203",
3
+ "version": "0.1.204",
4
4
  "description": "Alan machine runtime (alan-agent) for one platform: the official Node.js binary, the runtime bundle and its launcher. Installed by @alan-ai-hq/agent-manager.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://tryalan.ai",