@integrity-labs/agt-cli 0.28.1098 → 0.28.1099
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/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-XLY3X6VS.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5474
5474
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5475
5475
|
import chalk18 from "chalk";
|
|
5476
5476
|
import ora16 from "ora";
|
|
5477
|
-
var cliVersion = true ? "0.28.
|
|
5477
|
+
var cliVersion = true ? "0.28.1099" : "dev";
|
|
5478
5478
|
async function fetchLatestVersion() {
|
|
5479
5479
|
const host2 = getHost();
|
|
5480
5480
|
if (!host2) return null;
|
|
@@ -6734,7 +6734,7 @@ function handleError(err) {
|
|
|
6734
6734
|
}
|
|
6735
6735
|
|
|
6736
6736
|
// src/bin/agt.ts
|
|
6737
|
-
var cliVersion2 = true ? "0.28.
|
|
6737
|
+
var cliVersion2 = true ? "0.28.1099" : "dev";
|
|
6738
6738
|
var program = new Command();
|
|
6739
6739
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
6740
6740
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -7122,7 +7122,7 @@ function exchangeFailureKind(err) {
|
|
|
7122
7122
|
}
|
|
7123
7123
|
|
|
7124
7124
|
// src/lib/api-client.ts
|
|
7125
|
-
var agtCliVersion = true ? "0.28.
|
|
7125
|
+
var agtCliVersion = true ? "0.28.1099" : "dev";
|
|
7126
7126
|
var lastConfigHash = null;
|
|
7127
7127
|
function setConfigHash(hash) {
|
|
7128
7128
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -12095,4 +12095,4 @@ export {
|
|
|
12095
12095
|
managerInstallSystemUnitCommand,
|
|
12096
12096
|
managerUninstallSystemUnitCommand
|
|
12097
12097
|
};
|
|
12098
|
-
//# sourceMappingURL=chunk-
|
|
12098
|
+
//# sourceMappingURL=chunk-XLY3X6VS.js.map
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
safeWriteJsonAtomic,
|
|
68
68
|
setConfigHash,
|
|
69
69
|
tripClass
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-XLY3X6VS.js";
|
|
71
71
|
import {
|
|
72
72
|
getProjectDir as getProjectDir2,
|
|
73
73
|
getReadyTasks,
|
|
@@ -14900,7 +14900,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
14900
14900
|
var lastVersionCheckAt = 0;
|
|
14901
14901
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
14902
14902
|
var lastResponsivenessProbeAt = 0;
|
|
14903
|
-
var agtCliVersion = true ? "0.28.
|
|
14903
|
+
var agtCliVersion = true ? "0.28.1099" : "dev";
|
|
14904
14904
|
function resolveBrewPath(execFileSync3) {
|
|
14905
14905
|
try {
|
|
14906
14906
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -21829,7 +21829,17 @@ function realtimeRebindBackoffMs(attempts) {
|
|
|
21829
21829
|
const step = attempts - REALTIME_REBIND_FREE_ATTEMPTS;
|
|
21830
21830
|
return Math.min(1e4 * 2 ** (step - 1), REALTIME_REBIND_MAX_BACKOFF_MS);
|
|
21831
21831
|
}
|
|
21832
|
-
function
|
|
21832
|
+
function jitteredRealtimeRebindBackoffMs(attempts, rand = hostRebindJitter) {
|
|
21833
|
+
const ceiling = realtimeRebindBackoffMs(attempts);
|
|
21834
|
+
if (ceiling === 0) return 0;
|
|
21835
|
+
const r = Math.min(Math.max(rand(), 0), 1);
|
|
21836
|
+
return Math.round(ceiling + ceiling / 2 * r);
|
|
21837
|
+
}
|
|
21838
|
+
var HOST_REBIND_JITTER = Math.random();
|
|
21839
|
+
function hostRebindJitter() {
|
|
21840
|
+
return HOST_REBIND_JITTER;
|
|
21841
|
+
}
|
|
21842
|
+
function recordRealtimeRebindFailure(failures, agentId, status, now, rand = hostRebindJitter) {
|
|
21833
21843
|
const prior = failures.get(agentId);
|
|
21834
21844
|
const attempts = (prior?.attempts ?? 0) + 1;
|
|
21835
21845
|
const next = {
|
|
@@ -21837,7 +21847,7 @@ function recordRealtimeRebindFailure(failures, agentId, status, now) {
|
|
|
21837
21847
|
since: prior?.since ?? now,
|
|
21838
21848
|
lastStatus: status,
|
|
21839
21849
|
loggedAtAttempt: prior?.loggedAtAttempt ?? 0,
|
|
21840
|
-
nextAttemptAt: now +
|
|
21850
|
+
nextAttemptAt: now + jitteredRealtimeRebindBackoffMs(attempts, rand)
|
|
21841
21851
|
};
|
|
21842
21852
|
failures.set(agentId, next);
|
|
21843
21853
|
return next;
|
|
@@ -22356,13 +22366,14 @@ function ensureRealtimeIntegrationContextStarted(agentStates) {
|
|
|
22356
22366
|
);
|
|
22357
22367
|
},
|
|
22358
22368
|
onSubscriptionLost: (agentId, status) => {
|
|
22369
|
+
const lostAt = Date.now();
|
|
22359
22370
|
const state10 = recordRealtimeRebindFailure(
|
|
22360
22371
|
realtimeRebindFailures,
|
|
22361
22372
|
agentId,
|
|
22362
22373
|
status,
|
|
22363
|
-
|
|
22374
|
+
lostAt
|
|
22364
22375
|
);
|
|
22365
|
-
const waitMs =
|
|
22376
|
+
const waitMs = Math.max(0, state10.nextAttemptAt - lostAt);
|
|
22366
22377
|
if (state10.attempts === 1 || state10.attempts > state10.loggedAtAttempt) {
|
|
22367
22378
|
state10.loggedAtAttempt = state10.attempts;
|
|
22368
22379
|
const stuckForSeconds = Math.floor((Date.now() - state10.since) / 1e3);
|
|
@@ -24204,6 +24215,7 @@ export {
|
|
|
24204
24215
|
DAY_ROLLOVER_FORCE_GRACE_MIN,
|
|
24205
24216
|
DAY_ROLLOVER_INBOUND_DEFER_MAX_MIN,
|
|
24206
24217
|
DAY_ROLLOVER_INBOUND_GRACE_SEC,
|
|
24218
|
+
HOST_REBIND_JITTER,
|
|
24207
24219
|
REALTIME_REBIND_FREE_ATTEMPTS,
|
|
24208
24220
|
REALTIME_REBIND_IN_FLIGHT_GRACE_MS,
|
|
24209
24221
|
REALTIME_REBIND_MAX_BACKOFF_MS,
|
|
@@ -24235,6 +24247,7 @@ export {
|
|
|
24235
24247
|
inboundHoldMinutes,
|
|
24236
24248
|
isOlderSemverTuple,
|
|
24237
24249
|
isPrereleaseVersion,
|
|
24250
|
+
jitteredRealtimeRebindBackoffMs,
|
|
24238
24251
|
markAgentForFreshMemorySync,
|
|
24239
24252
|
maybeInjectKanbanCheck,
|
|
24240
24253
|
maybeProbeClaudeRuntimeAuth,
|