@integrity-labs/agt-cli 0.28.211 → 0.28.213
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-Y4IVPWJB.js → chunk-NCL4MJTL.js} +2 -2
- package/dist/lib/manager-worker.js +4 -3
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +29 -13
- package/package.json +1 -1
- /package/dist/{chunk-Y4IVPWJB.js.map → chunk-NCL4MJTL.js.map} +0 -0
|
@@ -14302,11 +14302,29 @@ function readLockHolder(path) {
|
|
|
14302
14302
|
|
|
14303
14303
|
// src/direct-chat-channel.ts
|
|
14304
14304
|
import { homedir as homedir2 } from "os";
|
|
14305
|
-
import {
|
|
14305
|
+
import { join as join5 } from "path";
|
|
14306
14306
|
import { watch, mkdirSync as mkdirSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
14307
14307
|
|
|
14308
14308
|
// src/direct-chat-inbound-attachments.ts
|
|
14309
|
+
import { dirname as dirname2, join as join3 } from "path";
|
|
14309
14310
|
var MAX_INBOUND_ATTACHMENT_BYTES = 10 * 1024 * 1024;
|
|
14311
|
+
var INBOUND_ATTACHMENTS_SUBDIR = "direct-chat-inbound";
|
|
14312
|
+
function resolveInboundAttachmentsDir(input) {
|
|
14313
|
+
const { codeName, turnInitiatorFile, agentId, homeDir } = input;
|
|
14314
|
+
const codeNameTrimmed = typeof codeName === "string" ? codeName.trim() : "";
|
|
14315
|
+
if (codeNameTrimmed) {
|
|
14316
|
+
return join3(homeDir, ".augmented", codeNameTrimmed, INBOUND_ATTACHMENTS_SUBDIR);
|
|
14317
|
+
}
|
|
14318
|
+
const initiator = typeof turnInitiatorFile === "string" ? turnInitiatorFile.trim() : "";
|
|
14319
|
+
if (initiator) {
|
|
14320
|
+
return join3(dirname2(initiator), INBOUND_ATTACHMENTS_SUBDIR);
|
|
14321
|
+
}
|
|
14322
|
+
const agentIdTrimmed = typeof agentId === "string" ? agentId.trim() : "";
|
|
14323
|
+
if (agentIdTrimmed) {
|
|
14324
|
+
return join3(homeDir, ".augmented", agentIdTrimmed, INBOUND_ATTACHMENTS_SUBDIR);
|
|
14325
|
+
}
|
|
14326
|
+
return null;
|
|
14327
|
+
}
|
|
14310
14328
|
function isImageContentType(contentType) {
|
|
14311
14329
|
return typeof contentType === "string" && contentType.toLowerCase().startsWith("image/");
|
|
14312
14330
|
}
|
|
@@ -14403,9 +14421,9 @@ async function downloadInboundAttachments(attachments, dir, deps) {
|
|
|
14403
14421
|
// src/flags-cache-read.ts
|
|
14404
14422
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
14405
14423
|
import { homedir } from "os";
|
|
14406
|
-
import { join as
|
|
14424
|
+
import { join as join4 } from "path";
|
|
14407
14425
|
function defaultFlagsCachePath() {
|
|
14408
|
-
return
|
|
14426
|
+
return join4(homedir(), ".augmented", "flags-cache.json");
|
|
14409
14427
|
}
|
|
14410
14428
|
function envBoolean(raw) {
|
|
14411
14429
|
if (raw === void 0) return void 0;
|
|
@@ -14510,15 +14528,13 @@ var DIRECT_CHAT_MAINTENANCE_COOLDOWN_MS = (() => {
|
|
|
14510
14528
|
var AGT_HOST = process.env.AGT_HOST;
|
|
14511
14529
|
var AGT_API_KEY = process.env.AGT_API_KEY;
|
|
14512
14530
|
var AGT_AGENT_ID = process.env.AGT_AGENT_ID;
|
|
14513
|
-
var DIRECT_CHAT_AGENT_DIR = AGT_AGENT_ID ?
|
|
14514
|
-
var
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
})();
|
|
14521
|
-
var INBOUND_ATTACHMENTS_DIR = CODE_NAME_AGENT_DIR ? join4(CODE_NAME_AGENT_DIR, "direct-chat-inbound") : null;
|
|
14531
|
+
var DIRECT_CHAT_AGENT_DIR = AGT_AGENT_ID ? join5(homedir2(), ".augmented", AGT_AGENT_ID) : null;
|
|
14532
|
+
var INBOUND_ATTACHMENTS_DIR = resolveInboundAttachmentsDir({
|
|
14533
|
+
codeName: process.env.AGT_AGENT_CODE_NAME,
|
|
14534
|
+
turnInitiatorFile: process.env.AGT_TURN_INITIATOR_FILE,
|
|
14535
|
+
agentId: AGT_AGENT_ID,
|
|
14536
|
+
homeDir: homedir2()
|
|
14537
|
+
});
|
|
14522
14538
|
var inboundContextClient = createInboundContextClient({
|
|
14523
14539
|
agtHost: AGT_HOST ?? null,
|
|
14524
14540
|
agtApiKey: AGT_API_KEY ?? null,
|
|
@@ -14595,7 +14611,7 @@ var inboundAttachmentDeps = {
|
|
|
14595
14611
|
},
|
|
14596
14612
|
ensureDir: (dir) => mkdirSync3(dir, { recursive: true }),
|
|
14597
14613
|
writeFile: (path, bytes) => writeFileSync3(path, bytes, { mode: 384 }),
|
|
14598
|
-
joinPath: (...parts) =>
|
|
14614
|
+
joinPath: (...parts) => join5(...parts),
|
|
14599
14615
|
warn: (msg) => process.stderr.write(`${msg}
|
|
14600
14616
|
`)
|
|
14601
14617
|
};
|
package/package.json
CHANGED
|
File without changes
|