@integrity-labs/agt-cli 0.28.336 → 0.28.337
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 +144 -74
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-VIYSMPXD.js → chunk-N7XPDFCW.js} +45 -8
- package/dist/chunk-N7XPDFCW.js.map +1 -0
- package/dist/lib/manager-worker.js +63 -2
- 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/package.json +1 -1
- package/dist/chunk-VIYSMPXD.js.map +0 -1
|
@@ -7042,7 +7042,7 @@ function requireHost() {
|
|
|
7042
7042
|
}
|
|
7043
7043
|
|
|
7044
7044
|
// src/lib/api-client.ts
|
|
7045
|
-
var agtCliVersion = true ? "0.28.
|
|
7045
|
+
var agtCliVersion = true ? "0.28.337" : "dev";
|
|
7046
7046
|
var lastConfigHash = null;
|
|
7047
7047
|
function setConfigHash(hash) {
|
|
7048
7048
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8680,6 +8680,32 @@ function provision(input, frameworkId = "claude-code") {
|
|
|
8680
8680
|
};
|
|
8681
8681
|
}
|
|
8682
8682
|
|
|
8683
|
+
// src/lib/self-update-pin.ts
|
|
8684
|
+
function isValidPinVersion(v) {
|
|
8685
|
+
return PIN_VERSION_RE.test(v);
|
|
8686
|
+
}
|
|
8687
|
+
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-]+)*))?$/;
|
|
8688
|
+
function isPinSet(raw) {
|
|
8689
|
+
return typeof raw === "string" && raw.trim() !== "";
|
|
8690
|
+
}
|
|
8691
|
+
function normalizePinVersion(raw) {
|
|
8692
|
+
if (!isPinSet(raw)) return null;
|
|
8693
|
+
const v = raw.trim().replace(/^v/, "");
|
|
8694
|
+
return isValidPinVersion(v) ? v : null;
|
|
8695
|
+
}
|
|
8696
|
+
function pinAllowsUrgent(raw) {
|
|
8697
|
+
const v = (raw ?? "").trim().toLowerCase();
|
|
8698
|
+
return v === "1" || v === "true" || v === "yes" || v === "on";
|
|
8699
|
+
}
|
|
8700
|
+
function decidePin(opts) {
|
|
8701
|
+
const { installed, pinRaw } = opts;
|
|
8702
|
+
if (!isPinSet(pinRaw)) return { kind: "unpinned" };
|
|
8703
|
+
const pinned = normalizePinVersion(pinRaw);
|
|
8704
|
+
if (!pinned) return { kind: "invalid", raw: pinRaw.trim() };
|
|
8705
|
+
if (installed === pinned) return { kind: "satisfied", version: pinned };
|
|
8706
|
+
return { kind: "install", version: pinned };
|
|
8707
|
+
}
|
|
8708
|
+
|
|
8683
8709
|
// src/commands/manager.ts
|
|
8684
8710
|
import chalk3 from "chalk";
|
|
8685
8711
|
import { existsSync as existsSync9, realpathSync } from "fs";
|
|
@@ -8895,6 +8921,11 @@ function table(headers, rows) {
|
|
|
8895
8921
|
}
|
|
8896
8922
|
|
|
8897
8923
|
// src/commands/manager.ts
|
|
8924
|
+
function normalizePinInEnv(env) {
|
|
8925
|
+
const normalized = normalizePinVersion(env.AGT_CLI_PIN_VERSION);
|
|
8926
|
+
if (normalized) env.AGT_CLI_PIN_VERSION = normalized;
|
|
8927
|
+
else delete env.AGT_CLI_PIN_VERSION;
|
|
8928
|
+
}
|
|
8898
8929
|
function managerStartCommand(opts) {
|
|
8899
8930
|
const json = isJsonMode();
|
|
8900
8931
|
if (!process.env.HOME || !process.env.HOME.trim()) {
|
|
@@ -9139,7 +9170,7 @@ function resolveStableAgtBin(rawPath) {
|
|
|
9139
9170
|
}
|
|
9140
9171
|
async function managerInstallCommand(opts = {}) {
|
|
9141
9172
|
const json = isJsonMode();
|
|
9142
|
-
const { installSupervisor, supervisorStatus } = await import("./manager-supervisor-
|
|
9173
|
+
const { installSupervisor, supervisorStatus } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9143
9174
|
const intervalSec = parseInt(opts.interval ?? "10", 10);
|
|
9144
9175
|
if (isNaN(intervalSec) || intervalSec < 5) {
|
|
9145
9176
|
const msg = "Interval must be at least 5 seconds.";
|
|
@@ -9179,10 +9210,11 @@ async function managerInstallCommand(opts = {}) {
|
|
|
9179
9210
|
};
|
|
9180
9211
|
const apiKey = getApiKey();
|
|
9181
9212
|
if (apiKey) env.AGT_API_KEY = apiKey;
|
|
9182
|
-
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "PATH", "CLAUDE_PATH"]) {
|
|
9213
|
+
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "AGT_CLI_PIN_VERSION", "AGT_CLI_PIN_ALLOW_URGENT", "PATH", "CLAUDE_PATH"]) {
|
|
9183
9214
|
const v = process.env[k];
|
|
9184
9215
|
if (v != null) env[k] = v;
|
|
9185
9216
|
}
|
|
9217
|
+
normalizePinInEnv(env);
|
|
9186
9218
|
const result = await installSupervisor({ agtBin, intervalSec, configDir, env });
|
|
9187
9219
|
if (!result.ok) {
|
|
9188
9220
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9203,7 +9235,7 @@ async function managerInstallCommand(opts = {}) {
|
|
|
9203
9235
|
}
|
|
9204
9236
|
async function managerUninstallCommand() {
|
|
9205
9237
|
const json = isJsonMode();
|
|
9206
|
-
const { uninstallSupervisor } = await import("./manager-supervisor-
|
|
9238
|
+
const { uninstallSupervisor } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9207
9239
|
const result = await uninstallSupervisor();
|
|
9208
9240
|
if (!result.ok) {
|
|
9209
9241
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9219,7 +9251,7 @@ async function managerUninstallCommand() {
|
|
|
9219
9251
|
}
|
|
9220
9252
|
async function managerInstallSystemUnitCommand(opts = {}) {
|
|
9221
9253
|
const json = isJsonMode();
|
|
9222
|
-
const { installSystemUnit, systemUnitStatus } = await import("./manager-supervisor-
|
|
9254
|
+
const { installSystemUnit, systemUnitStatus } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9223
9255
|
const intervalSec = parseInt(opts.interval ?? "10", 10);
|
|
9224
9256
|
if (isNaN(intervalSec) || intervalSec < 5) {
|
|
9225
9257
|
const msg = "Interval must be at least 5 seconds.";
|
|
@@ -9253,10 +9285,11 @@ async function managerInstallSystemUnitCommand(opts = {}) {
|
|
|
9253
9285
|
};
|
|
9254
9286
|
const apiKey = getApiKey();
|
|
9255
9287
|
if (apiKey) env.AGT_API_KEY = apiKey;
|
|
9256
|
-
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "PATH", "CLAUDE_PATH"]) {
|
|
9288
|
+
for (const k of ["AGT_TEAM", "AGT_CLI_RELEASE_CHANNEL", "AGT_CLI_PIN_VERSION", "AGT_CLI_PIN_ALLOW_URGENT", "PATH", "CLAUDE_PATH"]) {
|
|
9257
9289
|
const v = process.env[k];
|
|
9258
9290
|
if (v != null) env[k] = v;
|
|
9259
9291
|
}
|
|
9292
|
+
normalizePinInEnv(env);
|
|
9260
9293
|
const result = await installSystemUnit({ agtBin, intervalSec, configDir, env, user });
|
|
9261
9294
|
if (!result.ok) {
|
|
9262
9295
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9277,7 +9310,7 @@ async function managerInstallSystemUnitCommand(opts = {}) {
|
|
|
9277
9310
|
}
|
|
9278
9311
|
async function managerUninstallSystemUnitCommand() {
|
|
9279
9312
|
const json = isJsonMode();
|
|
9280
|
-
const { uninstallSystemUnit } = await import("./manager-supervisor-
|
|
9313
|
+
const { uninstallSystemUnit } = await import("./manager-supervisor-P5G44DPX.js");
|
|
9281
9314
|
const result = await uninstallSystemUnit();
|
|
9282
9315
|
if (!result.ok) {
|
|
9283
9316
|
if (json) jsonOutput({ ok: false, error: result.error });
|
|
@@ -9428,6 +9461,10 @@ export {
|
|
|
9428
9461
|
gatherSessionToolBindProbe,
|
|
9429
9462
|
provision,
|
|
9430
9463
|
executeConnectivityProbe,
|
|
9464
|
+
isValidPinVersion,
|
|
9465
|
+
normalizePinVersion,
|
|
9466
|
+
pinAllowsUrgent,
|
|
9467
|
+
decidePin,
|
|
9431
9468
|
getManagerPaths,
|
|
9432
9469
|
startWatchdog,
|
|
9433
9470
|
managerStartCommand,
|
|
@@ -9439,4 +9476,4 @@ export {
|
|
|
9439
9476
|
managerInstallSystemUnitCommand,
|
|
9440
9477
|
managerUninstallSystemUnitCommand
|
|
9441
9478
|
};
|
|
9442
|
-
//# sourceMappingURL=chunk-
|
|
9479
|
+
//# sourceMappingURL=chunk-N7XPDFCW.js.map
|