@integrity-labs/agt-cli 0.28.336 → 0.28.338
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 +145 -75
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-J2WYEOBH.js → chunk-O4V3TMUI.js} +2 -1
- package/dist/{chunk-VIYSMPXD.js → chunk-S2JJ532Q.js} +59 -11
- package/dist/chunk-S2JJ532Q.js.map +1 -0
- package/dist/{claude-pair-runtime-T7EFAWS5.js → claude-pair-runtime-XPWI2M2Z.js} +2 -2
- package/dist/lib/manager-worker.js +71 -10
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{manager-supervisor-RMC62QES.js → manager-supervisor-P5G44DPX.js} +4 -4
- package/dist/{manager-supervisor-RMC62QES.js.map → manager-supervisor-P5G44DPX.js.map} +1 -1
- package/dist/{persistent-session-ENQXJNBJ.js → persistent-session-G7WNWWJZ.js} +2 -2
- package/dist/{responsiveness-probe-46XFHCPY.js → responsiveness-probe-X735BG2Q.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-VIYSMPXD.js.map +0 -1
- /package/dist/{chunk-J2WYEOBH.js.map → chunk-O4V3TMUI.js.map} +0 -0
- /package/dist/{claude-pair-runtime-T7EFAWS5.js.map → claude-pair-runtime-XPWI2M2Z.js.map} +0 -0
- /package/dist/{persistent-session-ENQXJNBJ.js.map → persistent-session-G7WNWWJZ.js.map} +0 -0
- /package/dist/{responsiveness-probe-46XFHCPY.js.map → responsiveness-probe-X735BG2Q.js.map} +0 -0
|
@@ -10011,6 +10011,7 @@ export {
|
|
|
10011
10011
|
normalizeFlagValue,
|
|
10012
10012
|
coerceEnvValue,
|
|
10013
10013
|
FLAGS_SCHEMA_VERSION,
|
|
10014
|
+
LATE_BOUND_VARS,
|
|
10014
10015
|
expandTemplateVars,
|
|
10015
10016
|
parseEnvIntegrations,
|
|
10016
10017
|
sessionTranscriptDir,
|
|
@@ -10061,4 +10062,4 @@ export {
|
|
|
10061
10062
|
stopAllSessionsAndWait,
|
|
10062
10063
|
getProjectDir
|
|
10063
10064
|
};
|
|
10064
|
-
//# sourceMappingURL=chunk-
|
|
10065
|
+
//# sourceMappingURL=chunk-O4V3TMUI.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
INTEGRATION_REGISTRY,
|
|
3
|
+
LATE_BOUND_VARS,
|
|
3
4
|
OAUTH_PROVIDERS,
|
|
4
5
|
coerceEnvValue,
|
|
5
6
|
expandTemplateVars,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
resolveConnectivityProbe,
|
|
20
21
|
worseConnectivityOutcome,
|
|
21
22
|
wrapScheduledTaskPrompt
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-O4V3TMUI.js";
|
|
23
24
|
import {
|
|
24
25
|
parsePsRows
|
|
25
26
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -7042,7 +7043,7 @@ function requireHost() {
|
|
|
7042
7043
|
}
|
|
7043
7044
|
|
|
7044
7045
|
// src/lib/api-client.ts
|
|
7045
|
-
var agtCliVersion = true ? "0.28.
|
|
7046
|
+
var agtCliVersion = true ? "0.28.338" : "dev";
|
|
7046
7047
|
var lastConfigHash = null;
|
|
7047
7048
|
function setConfigHash(hash) {
|
|
7048
7049
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8309,11 +8310,21 @@ function readMcpStdioServerConfig(projectDir2, serverKey, env) {
|
|
|
8309
8310
|
const sub = (value) => {
|
|
8310
8311
|
if (!env) return value;
|
|
8311
8312
|
const r = expandTemplateVars(value, env);
|
|
8312
|
-
for (const name of r.unresolved) unresolved.add(name);
|
|
8313
|
+
for (const name of r.unresolved) if (!LATE_BOUND_VARS.has(name)) unresolved.add(name);
|
|
8313
8314
|
return r.value;
|
|
8314
8315
|
};
|
|
8315
8316
|
const resolvedEnv = {};
|
|
8316
|
-
for (const [k, v] of Object.entries(entry.env ?? {}))
|
|
8317
|
+
for (const [k, v] of Object.entries(entry.env ?? {})) {
|
|
8318
|
+
if (!env) {
|
|
8319
|
+
resolvedEnv[k] = v;
|
|
8320
|
+
continue;
|
|
8321
|
+
}
|
|
8322
|
+
const r = expandTemplateVars(v, env);
|
|
8323
|
+
const hardUnresolved = r.unresolved.filter((name) => !LATE_BOUND_VARS.has(name));
|
|
8324
|
+
for (const name of hardUnresolved) unresolved.add(name);
|
|
8325
|
+
if (hardUnresolved.length === 0 && r.unresolved.length > 0) continue;
|
|
8326
|
+
resolvedEnv[k] = r.value;
|
|
8327
|
+
}
|
|
8317
8328
|
return {
|
|
8318
8329
|
command: entry.command,
|
|
8319
8330
|
args: (entry.args ?? []).map(sub),
|
|
@@ -8680,6 +8691,32 @@ function provision(input, frameworkId = "claude-code") {
|
|
|
8680
8691
|
};
|
|
8681
8692
|
}
|
|
8682
8693
|
|
|
8694
|
+
// src/lib/self-update-pin.ts
|
|
8695
|
+
function isValidPinVersion(v) {
|
|
8696
|
+
return PIN_VERSION_RE.test(v);
|
|
8697
|
+
}
|
|
8698
|
+
var PIN_VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
8699
|
+
function isPinSet(raw) {
|
|
8700
|
+
return typeof raw === "string" && raw.trim() !== "";
|
|
8701
|
+
}
|
|
8702
|
+
function normalizePinVersion(raw) {
|
|
8703
|
+
if (!isPinSet(raw)) return null;
|
|
8704
|
+
const v = raw.trim().replace(/^v/, "");
|
|
8705
|
+
return isValidPinVersion(v) ? v : null;
|
|
8706
|
+
}
|
|
8707
|
+
function pinAllowsUrgent(raw) {
|
|
8708
|
+
const v = (raw ?? "").trim().toLowerCase();
|
|
8709
|
+
return v === "1" || v === "true" || v === "yes" || v === "on";
|
|
8710
|
+
}
|
|
8711
|
+
function decidePin(opts) {
|
|
8712
|
+
const { installed, pinRaw } = opts;
|
|
8713
|
+
if (!isPinSet(pinRaw)) return { kind: "unpinned" };
|
|
8714
|
+
const pinned = normalizePinVersion(pinRaw);
|
|
8715
|
+
if (!pinned) return { kind: "invalid", raw: pinRaw.trim() };
|
|
8716
|
+
if (installed === pinned) return { kind: "satisfied", version: pinned };
|
|
8717
|
+
return { kind: "install", version: pinned };
|
|
8718
|
+
}
|
|
8719
|
+
|
|
8683
8720
|
// src/commands/manager.ts
|
|
8684
8721
|
import chalk3 from "chalk";
|
|
8685
8722
|
import { existsSync as existsSync9, realpathSync } from "fs";
|
|
@@ -8895,6 +8932,11 @@ function table(headers, rows) {
|
|
|
8895
8932
|
}
|
|
8896
8933
|
|
|
8897
8934
|
// src/commands/manager.ts
|
|
8935
|
+
function normalizePinInEnv(env) {
|
|
8936
|
+
const normalized = normalizePinVersion(env.AGT_CLI_PIN_VERSION);
|
|
8937
|
+
if (normalized) env.AGT_CLI_PIN_VERSION = normalized;
|
|
8938
|
+
else delete env.AGT_CLI_PIN_VERSION;
|
|
8939
|
+
}
|
|
8898
8940
|
function managerStartCommand(opts) {
|
|
8899
8941
|
const json = isJsonMode();
|
|
8900
8942
|
if (!process.env.HOME || !process.env.HOME.trim()) {
|
|
@@ -9139,7 +9181,7 @@ function resolveStableAgtBin(rawPath) {
|
|
|
9139
9181
|
}
|
|
9140
9182
|
async function managerInstallCommand(opts = {}) {
|
|
9141
9183
|
const json = isJsonMode();
|
|
9142
|
-
const { installSupervisor, supervisorStatus } = await import("./manager-supervisor-
|
|
9184
|
+
const { installSupervisor, supervisorStatus } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9143
9185
|
const intervalSec = parseInt(opts.interval ?? "10", 10);
|
|
9144
9186
|
if (isNaN(intervalSec) || intervalSec < 5) {
|
|
9145
9187
|
const msg = "Interval must be at least 5 seconds.";
|
|
@@ -9179,10 +9221,11 @@ async function managerInstallCommand(opts = {}) {
|
|
|
9179
9221
|
};
|
|
9180
9222
|
const apiKey = getApiKey();
|
|
9181
9223
|
if (apiKey) env.AGT_API_KEY = apiKey;
|
|
9182
|
-
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "PATH", "CLAUDE_PATH"]) {
|
|
9224
|
+
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "AGT_CLI_PIN_VERSION", "AGT_CLI_PIN_ALLOW_URGENT", "PATH", "CLAUDE_PATH"]) {
|
|
9183
9225
|
const v = process.env[k];
|
|
9184
9226
|
if (v != null) env[k] = v;
|
|
9185
9227
|
}
|
|
9228
|
+
normalizePinInEnv(env);
|
|
9186
9229
|
const result = await installSupervisor({ agtBin, intervalSec, configDir, env });
|
|
9187
9230
|
if (!result.ok) {
|
|
9188
9231
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9203,7 +9246,7 @@ async function managerInstallCommand(opts = {}) {
|
|
|
9203
9246
|
}
|
|
9204
9247
|
async function managerUninstallCommand() {
|
|
9205
9248
|
const json = isJsonMode();
|
|
9206
|
-
const { uninstallSupervisor } = await import("./manager-supervisor-
|
|
9249
|
+
const { uninstallSupervisor } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9207
9250
|
const result = await uninstallSupervisor();
|
|
9208
9251
|
if (!result.ok) {
|
|
9209
9252
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9219,7 +9262,7 @@ async function managerUninstallCommand() {
|
|
|
9219
9262
|
}
|
|
9220
9263
|
async function managerInstallSystemUnitCommand(opts = {}) {
|
|
9221
9264
|
const json = isJsonMode();
|
|
9222
|
-
const { installSystemUnit, systemUnitStatus } = await import("./manager-supervisor-
|
|
9265
|
+
const { installSystemUnit, systemUnitStatus } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9223
9266
|
const intervalSec = parseInt(opts.interval ?? "10", 10);
|
|
9224
9267
|
if (isNaN(intervalSec) || intervalSec < 5) {
|
|
9225
9268
|
const msg = "Interval must be at least 5 seconds.";
|
|
@@ -9253,10 +9296,11 @@ async function managerInstallSystemUnitCommand(opts = {}) {
|
|
|
9253
9296
|
};
|
|
9254
9297
|
const apiKey = getApiKey();
|
|
9255
9298
|
if (apiKey) env.AGT_API_KEY = apiKey;
|
|
9256
|
-
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "PATH", "CLAUDE_PATH"]) {
|
|
9299
|
+
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "AGT_CLI_PIN_VERSION", "AGT_CLI_PIN_ALLOW_URGENT", "PATH", "CLAUDE_PATH"]) {
|
|
9257
9300
|
const v = process.env[k];
|
|
9258
9301
|
if (v != null) env[k] = v;
|
|
9259
9302
|
}
|
|
9303
|
+
normalizePinInEnv(env);
|
|
9260
9304
|
const result = await installSystemUnit({ agtBin, intervalSec, configDir, env, user });
|
|
9261
9305
|
if (!result.ok) {
|
|
9262
9306
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9277,7 +9321,7 @@ async function managerInstallSystemUnitCommand(opts = {}) {
|
|
|
9277
9321
|
}
|
|
9278
9322
|
async function managerUninstallSystemUnitCommand() {
|
|
9279
9323
|
const json = isJsonMode();
|
|
9280
|
-
const { uninstallSystemUnit } = await import("./manager-supervisor-
|
|
9324
|
+
const { uninstallSystemUnit } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9281
9325
|
const result = await uninstallSystemUnit();
|
|
9282
9326
|
if (!result.ok) {
|
|
9283
9327
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9428,6 +9472,10 @@ export {
|
|
|
9428
9472
|
gatherSessionToolBindProbe,
|
|
9429
9473
|
provision,
|
|
9430
9474
|
executeConnectivityProbe,
|
|
9475
|
+
isValidPinVersion,
|
|
9476
|
+
normalizePinVersion,
|
|
9477
|
+
pinAllowsUrgent,
|
|
9478
|
+
decidePin,
|
|
9431
9479
|
getManagerPaths,
|
|
9432
9480
|
startWatchdog,
|
|
9433
9481
|
managerStartCommand,
|
|
@@ -9439,4 +9487,4 @@ export {
|
|
|
9439
9487
|
managerInstallSystemUnitCommand,
|
|
9440
9488
|
managerUninstallSystemUnitCommand
|
|
9441
9489
|
};
|
|
9442
|
-
//# sourceMappingURL=chunk-
|
|
9490
|
+
//# sourceMappingURL=chunk-S2JJ532Q.js.map
|