@integrity-labs/agt-cli 0.28.1161 → 0.28.1163
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 +3 -3
- package/dist/{chunk-7M3EEBVM.js → chunk-DPMVTSFO.js} +2 -2
- package/dist/lib/manager-worker.js +2 -2
- package/dist/mcp/direct-chat-channel.js +75 -20
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/slack-channel.js +1 -0
- package/dist/mcp/telegram-channel.js +1 -0
- package/package.json +1 -1
- /package/dist/{chunk-7M3EEBVM.js.map → chunk-DPMVTSFO.js.map} +0 -0
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-DPMVTSFO.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
@@ -5513,7 +5513,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5513
5513
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5514
5514
|
import chalk18 from "chalk";
|
|
5515
5515
|
import ora16 from "ora";
|
|
5516
|
-
var cliVersion = true ? "0.28.
|
|
5516
|
+
var cliVersion = true ? "0.28.1163" : "dev";
|
|
5517
5517
|
async function fetchLatestVersion() {
|
|
5518
5518
|
const host2 = getHost();
|
|
5519
5519
|
if (!host2) return null;
|
|
@@ -6773,7 +6773,7 @@ function handleError(err) {
|
|
|
6773
6773
|
}
|
|
6774
6774
|
|
|
6775
6775
|
// src/bin/agt.ts
|
|
6776
|
-
var cliVersion2 = true ? "0.28.
|
|
6776
|
+
var cliVersion2 = true ? "0.28.1163" : "dev";
|
|
6777
6777
|
var program = new Command();
|
|
6778
6778
|
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");
|
|
6779
6779
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -8078,7 +8078,7 @@ function exchangeFailureKind(err) {
|
|
|
8078
8078
|
}
|
|
8079
8079
|
|
|
8080
8080
|
// src/lib/api-client.ts
|
|
8081
|
-
var agtCliVersion = true ? "0.28.
|
|
8081
|
+
var agtCliVersion = true ? "0.28.1163" : "dev";
|
|
8082
8082
|
var lastConfigHash = null;
|
|
8083
8083
|
function setConfigHash(hash) {
|
|
8084
8084
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -13235,4 +13235,4 @@ export {
|
|
|
13235
13235
|
managerInstallSystemUnitCommand,
|
|
13236
13236
|
managerUninstallSystemUnitCommand
|
|
13237
13237
|
};
|
|
13238
|
-
//# sourceMappingURL=chunk-
|
|
13238
|
+
//# sourceMappingURL=chunk-DPMVTSFO.js.map
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
setConfigHash,
|
|
78
78
|
shellGuard,
|
|
79
79
|
tripClass
|
|
80
|
-
} from "../chunk-
|
|
80
|
+
} from "../chunk-DPMVTSFO.js";
|
|
81
81
|
import {
|
|
82
82
|
CLAUDE_CODE_SECURITY_FLOOR,
|
|
83
83
|
SELF_UPDATE_TIMEOUTS,
|
|
@@ -15874,7 +15874,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
15874
15874
|
var lastVersionCheckAt = 0;
|
|
15875
15875
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
15876
15876
|
var lastResponsivenessProbeAt = 0;
|
|
15877
|
-
var agtCliVersion = true ? "0.28.
|
|
15877
|
+
var agtCliVersion = true ? "0.28.1163" : "dev";
|
|
15878
15878
|
function resolveBrewPath(execFileSync3) {
|
|
15879
15879
|
try {
|
|
15880
15880
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -19448,10 +19448,10 @@ var require_readdirp = __commonJS({
|
|
|
19448
19448
|
}
|
|
19449
19449
|
async _formatEntry(dirent, path) {
|
|
19450
19450
|
let entry;
|
|
19451
|
-
const
|
|
19451
|
+
const basename3 = this._isDirent ? dirent.name : dirent;
|
|
19452
19452
|
try {
|
|
19453
|
-
const fullPath = (0, node_path_1.resolve)((0, node_path_1.join)(path,
|
|
19454
|
-
entry = { path: (0, node_path_1.relative)(this._root, fullPath), fullPath, basename:
|
|
19453
|
+
const fullPath = (0, node_path_1.resolve)((0, node_path_1.join)(path, basename3));
|
|
19454
|
+
entry = { path: (0, node_path_1.relative)(this._root, fullPath), fullPath, basename: basename3 };
|
|
19455
19455
|
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
19456
19456
|
} catch (err) {
|
|
19457
19457
|
this._onError(err);
|
|
@@ -20008,9 +20008,9 @@ var require_handler = __commonJS({
|
|
|
20008
20008
|
_watchWithNodeFs(path, listener) {
|
|
20009
20009
|
const opts = this.fsw.options;
|
|
20010
20010
|
const directory = sysPath.dirname(path);
|
|
20011
|
-
const
|
|
20011
|
+
const basename3 = sysPath.basename(path);
|
|
20012
20012
|
const parent = this.fsw._getWatchedDir(directory);
|
|
20013
|
-
parent.add(
|
|
20013
|
+
parent.add(basename3);
|
|
20014
20014
|
const absolutePath = sysPath.resolve(path);
|
|
20015
20015
|
const options = {
|
|
20016
20016
|
persistent: opts.persistent
|
|
@@ -20020,7 +20020,7 @@ var require_handler = __commonJS({
|
|
|
20020
20020
|
let closer;
|
|
20021
20021
|
if (opts.usePolling) {
|
|
20022
20022
|
const enableBin = opts.interval !== opts.binaryInterval;
|
|
20023
|
-
options.interval = enableBin && isBinaryPath(
|
|
20023
|
+
options.interval = enableBin && isBinaryPath(basename3) ? opts.binaryInterval : opts.interval;
|
|
20024
20024
|
closer = setFsWatchFileListener(path, absolutePath, options, {
|
|
20025
20025
|
listener,
|
|
20026
20026
|
rawEmitter: this.fsw._emitRaw
|
|
@@ -20043,10 +20043,10 @@ var require_handler = __commonJS({
|
|
|
20043
20043
|
return;
|
|
20044
20044
|
}
|
|
20045
20045
|
const dirname4 = sysPath.dirname(file);
|
|
20046
|
-
const
|
|
20046
|
+
const basename3 = sysPath.basename(file);
|
|
20047
20047
|
const parent = this.fsw._getWatchedDir(dirname4);
|
|
20048
20048
|
let prevStats = stats;
|
|
20049
|
-
if (parent.has(
|
|
20049
|
+
if (parent.has(basename3))
|
|
20050
20050
|
return;
|
|
20051
20051
|
const listener = async (path, newStats) => {
|
|
20052
20052
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
|
|
@@ -20071,9 +20071,9 @@ var require_handler = __commonJS({
|
|
|
20071
20071
|
prevStats = newStats2;
|
|
20072
20072
|
}
|
|
20073
20073
|
} catch (error2) {
|
|
20074
|
-
this.fsw._remove(dirname4,
|
|
20074
|
+
this.fsw._remove(dirname4, basename3);
|
|
20075
20075
|
}
|
|
20076
|
-
} else if (parent.has(
|
|
20076
|
+
} else if (parent.has(basename3)) {
|
|
20077
20077
|
const at = newStats.atimeMs;
|
|
20078
20078
|
const mt = newStats.mtimeMs;
|
|
20079
20079
|
if (!at || at <= mt || mt !== prevStats.mtimeMs) {
|
|
@@ -47584,6 +47584,16 @@ function probeAgentSessionCached(codeName, ttlMs = SESSION_PROBE_TTL_MS, now = D
|
|
|
47584
47584
|
}
|
|
47585
47585
|
|
|
47586
47586
|
// src/direct-chat-poll-guard.ts
|
|
47587
|
+
var SAFETY_NET_POLL_MS = 12e4;
|
|
47588
|
+
var DOORBELL_UNWATCHED_POLL_MS = 3e4;
|
|
47589
|
+
function safetyNetIntervalMs(doorbellWatchAttached) {
|
|
47590
|
+
return doorbellWatchAttached ? SAFETY_NET_POLL_MS : DOORBELL_UNWATCHED_POLL_MS;
|
|
47591
|
+
}
|
|
47592
|
+
function doorbellWatchLost(attachedId, currentId) {
|
|
47593
|
+
if (attachedId === null) return false;
|
|
47594
|
+
return currentId !== attachedId;
|
|
47595
|
+
}
|
|
47596
|
+
var POLL_STUCK_MS = 9e4;
|
|
47587
47597
|
function evaluatePollGuard(state, nowMs, stuckMs) {
|
|
47588
47598
|
if (!state.inFlight) return { run: true, stuck: false };
|
|
47589
47599
|
if (state.leaseUntilMs != null && nowMs < state.leaseUntilMs) return { run: false, stuck: false };
|
|
@@ -47640,7 +47650,7 @@ function defaultIsPidAlive(pid) {
|
|
|
47640
47650
|
}
|
|
47641
47651
|
}
|
|
47642
47652
|
function acquireMcpSpawnLock(args) {
|
|
47643
|
-
const { agentDir, basename:
|
|
47653
|
+
const { agentDir, basename: basename3, options = {} } = args;
|
|
47644
47654
|
if (!agentDir) return { kind: "no-agent-dir" };
|
|
47645
47655
|
const isPidAlive = options.isPidAlive ?? defaultIsPidAlive;
|
|
47646
47656
|
const selfPid = options.selfPid ?? process.pid;
|
|
@@ -47648,7 +47658,7 @@ function acquireMcpSpawnLock(args) {
|
|
|
47648
47658
|
const nowMs = options.nowMs ?? (() => Date.now());
|
|
47649
47659
|
const lockMtimeMs = options.lockMtimeMs ?? defaultLockMtimeMs;
|
|
47650
47660
|
const staleMs = options.staleMs ?? STALE_LOCK_MS;
|
|
47651
|
-
const path = join13(agentDir,
|
|
47661
|
+
const path = join13(agentDir, basename3);
|
|
47652
47662
|
const existing = readLockHolder(path);
|
|
47653
47663
|
if (existing) {
|
|
47654
47664
|
if (existing.pid === selfPid) {
|
|
@@ -47728,7 +47738,7 @@ function readLockHolder(path) {
|
|
|
47728
47738
|
|
|
47729
47739
|
// src/direct-chat-channel.ts
|
|
47730
47740
|
import { homedir as homedir5 } from "os";
|
|
47731
|
-
import { join as join17 } from "path";
|
|
47741
|
+
import { basename as basename2, join as join17 } from "path";
|
|
47732
47742
|
import { randomUUID } from "crypto";
|
|
47733
47743
|
import {
|
|
47734
47744
|
watch,
|
|
@@ -53538,6 +53548,7 @@ var MAINTENANCE_GATED_TOOLS = /* @__PURE__ */ new Set([
|
|
|
53538
53548
|
"skill_create",
|
|
53539
53549
|
"skill_delete",
|
|
53540
53550
|
"skill_improve",
|
|
53551
|
+
"skill_install",
|
|
53541
53552
|
"skill_propose_revision",
|
|
53542
53553
|
"skill_publish_to_marketplace",
|
|
53543
53554
|
"skill_update",
|
|
@@ -55168,8 +55179,6 @@ var DOORBELL_ENABLED = resolveHostBooleanFlag({
|
|
|
55168
55179
|
defaultValue: false
|
|
55169
55180
|
});
|
|
55170
55181
|
var DOORBELL_FILE = "direct-chat-doorbell";
|
|
55171
|
-
var SAFETY_NET_POLL_MS = 3e4;
|
|
55172
|
-
var POLL_STUCK_MS = 9e4;
|
|
55173
55182
|
var pollGuard = { inFlight: false, inFlightSinceMs: null, leaseUntilMs: null };
|
|
55174
55183
|
async function pollOnce(sinceMs) {
|
|
55175
55184
|
const decision = evaluatePollGuard(pollGuard, Date.now(), POLL_STUCK_MS);
|
|
@@ -55192,8 +55201,40 @@ async function pollOnce(sinceMs) {
|
|
|
55192
55201
|
}
|
|
55193
55202
|
}
|
|
55194
55203
|
var doorbellWatcher = null;
|
|
55204
|
+
function dirInode(path) {
|
|
55205
|
+
if (!path) return null;
|
|
55206
|
+
try {
|
|
55207
|
+
const st = statSync4(path);
|
|
55208
|
+
return `${st.dev}:${st.ino}`;
|
|
55209
|
+
} catch {
|
|
55210
|
+
return null;
|
|
55211
|
+
}
|
|
55212
|
+
}
|
|
55195
55213
|
var safetyNetTimer = null;
|
|
55196
55214
|
if (DOORBELL_ENABLED && DIRECT_CHAT_AGENT_DIR) {
|
|
55215
|
+
let safetyNetTick = function() {
|
|
55216
|
+
if (doorbellWatchAttached && doorbellWatchLost(watchedDirIno, dirInode(DIRECT_CHAT_AGENT_DIR))) {
|
|
55217
|
+
degradeDoorbell("the watched directory was removed or replaced");
|
|
55218
|
+
}
|
|
55219
|
+
void pollOnce(sinceMs);
|
|
55220
|
+
}, degradeDoorbell = function(reason) {
|
|
55221
|
+
if (!doorbellWatchAttached) return;
|
|
55222
|
+
doorbellWatchAttached = false;
|
|
55223
|
+
try {
|
|
55224
|
+
doorbellWatcher?.close();
|
|
55225
|
+
} catch {
|
|
55226
|
+
}
|
|
55227
|
+
doorbellWatcher = null;
|
|
55228
|
+
const fallbackMs = safetyNetIntervalMs(false);
|
|
55229
|
+
process.stderr.write(
|
|
55230
|
+
`direct-chat-channel: doorbell watch lost (${reason}) \u2014 falling back to safety-net poll every ${fallbackMs}ms
|
|
55231
|
+
`
|
|
55232
|
+
);
|
|
55233
|
+
if (safetyNetTimer) clearInterval(safetyNetTimer);
|
|
55234
|
+
safetyNetTimer = setInterval(safetyNetTick, fallbackMs);
|
|
55235
|
+
safetyNetTimer.unref?.();
|
|
55236
|
+
};
|
|
55237
|
+
safetyNetTick2 = safetyNetTick, degradeDoorbell2 = degradeDoorbell;
|
|
55197
55238
|
try {
|
|
55198
55239
|
mkdirSync7(DIRECT_CHAT_AGENT_DIR, { recursive: true });
|
|
55199
55240
|
} catch {
|
|
@@ -55215,23 +55256,35 @@ if (DOORBELL_ENABLED && DIRECT_CHAT_AGENT_DIR) {
|
|
|
55215
55256
|
resetDirectChatClaims(DIRECT_CHAT_CLAIMS_PATH);
|
|
55216
55257
|
}
|
|
55217
55258
|
let debounce = null;
|
|
55259
|
+
let doorbellWatchAttached = false;
|
|
55218
55260
|
try {
|
|
55219
|
-
|
|
55261
|
+
const watchedDirName = basename2(DIRECT_CHAT_AGENT_DIR);
|
|
55262
|
+
doorbellWatcher = watch(DIRECT_CHAT_AGENT_DIR, (event, filename) => {
|
|
55263
|
+
if (event === "rename" && filename === watchedDirName) {
|
|
55264
|
+
degradeDoorbell("the watched directory was removed");
|
|
55265
|
+
return;
|
|
55266
|
+
}
|
|
55220
55267
|
if (filename !== DOORBELL_FILE) return;
|
|
55221
55268
|
if (debounce) clearTimeout(debounce);
|
|
55222
55269
|
debounce = setTimeout(() => {
|
|
55223
55270
|
void pollOnce(sinceMs);
|
|
55224
55271
|
}, 50);
|
|
55225
55272
|
});
|
|
55273
|
+
doorbellWatchAttached = true;
|
|
55274
|
+
doorbellWatcher.on("error", (err) => {
|
|
55275
|
+
degradeDoorbell(`watcher error: ${err.message}`);
|
|
55276
|
+
});
|
|
55226
55277
|
} catch (err) {
|
|
55227
55278
|
process.stderr.write(
|
|
55228
|
-
`direct-chat-channel: doorbell watch failed (${err.message}) \u2014 relying on safety-net poll
|
|
55279
|
+
`direct-chat-channel: doorbell watch failed (${err.message}) \u2014 relying on safety-net poll every ${safetyNetIntervalMs(false)}ms
|
|
55229
55280
|
`
|
|
55230
55281
|
);
|
|
55231
55282
|
}
|
|
55283
|
+
const safetyNetMs = safetyNetIntervalMs(doorbellWatchAttached);
|
|
55284
|
+
const watchedDirIno = doorbellWatchAttached ? dirInode(DIRECT_CHAT_AGENT_DIR) : null;
|
|
55232
55285
|
safetyNetTimer = setInterval(() => {
|
|
55233
|
-
|
|
55234
|
-
},
|
|
55286
|
+
safetyNetTick();
|
|
55287
|
+
}, safetyNetMs);
|
|
55235
55288
|
safetyNetTimer.unref?.();
|
|
55236
55289
|
if (sessionState.fresh) {
|
|
55237
55290
|
void runBacklogDrain({
|
|
@@ -55245,7 +55298,7 @@ if (DOORBELL_ENABLED && DIRECT_CHAT_AGENT_DIR) {
|
|
|
55245
55298
|
});
|
|
55246
55299
|
}
|
|
55247
55300
|
process.stderr.write(
|
|
55248
|
-
`direct-chat-channel: Started (agent=${AGT_AGENT_ID}, delivery=doorbell+pull, session=${sessionState.fresh ? "fresh\u2192backlog-drain (unscoped, retried)" : "resumed\u2192new-only"}, new_message_watermark_since=${sinceMs} \u2014 watching ${DOORBELL_FILE}, safety-net ${
|
|
55301
|
+
`direct-chat-channel: Started (agent=${AGT_AGENT_ID}, delivery=doorbell+pull, session=${sessionState.fresh ? "fresh\u2192backlog-drain (unscoped, retried)" : "resumed\u2192new-only"}, new_message_watermark_since=${sinceMs} \u2014 watching ${DOORBELL_FILE}, safety-net ${safetyNetMs}ms)
|
|
55249
55302
|
`
|
|
55250
55303
|
);
|
|
55251
55304
|
} else {
|
|
@@ -55254,6 +55307,8 @@ if (DOORBELL_ENABLED && DIRECT_CHAT_AGENT_DIR) {
|
|
|
55254
55307
|
`
|
|
55255
55308
|
);
|
|
55256
55309
|
}
|
|
55310
|
+
var safetyNetTick2;
|
|
55311
|
+
var degradeDoorbell2;
|
|
55257
55312
|
var progressTickTimer = null;
|
|
55258
55313
|
if (PROGRESS_HEARTBEAT_PATH) {
|
|
55259
55314
|
progressTickTimer = setInterval(() => {
|
package/dist/mcp/index.js
CHANGED
|
@@ -46819,6 +46819,7 @@ var MAINTENANCE_GATED_TOOLS = /* @__PURE__ */ new Set([
|
|
|
46819
46819
|
"skill_create",
|
|
46820
46820
|
"skill_delete",
|
|
46821
46821
|
"skill_improve",
|
|
46822
|
+
"skill_install",
|
|
46822
46823
|
"skill_propose_revision",
|
|
46823
46824
|
"skill_publish_to_marketplace",
|
|
46824
46825
|
"skill_update",
|
|
@@ -30997,6 +30997,7 @@ var MAINTENANCE_GATED_TOOLS = /* @__PURE__ */ new Set([
|
|
|
30997
30997
|
"skill_create",
|
|
30998
30998
|
"skill_delete",
|
|
30999
30999
|
"skill_improve",
|
|
31000
|
+
"skill_install",
|
|
31000
31001
|
"skill_propose_revision",
|
|
31001
31002
|
"skill_publish_to_marketplace",
|
|
31002
31003
|
"skill_update",
|
|
@@ -31214,6 +31214,7 @@ var MAINTENANCE_GATED_TOOLS = /* @__PURE__ */ new Set([
|
|
|
31214
31214
|
"skill_create",
|
|
31215
31215
|
"skill_delete",
|
|
31216
31216
|
"skill_improve",
|
|
31217
|
+
"skill_install",
|
|
31217
31218
|
"skill_propose_revision",
|
|
31218
31219
|
"skill_publish_to_marketplace",
|
|
31219
31220
|
"skill_update",
|
package/package.json
CHANGED
|
File without changes
|