@integrity-labs/agt-cli 0.28.1088 → 0.28.1090
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 +5 -5
- package/dist/{chunk-JAXSZCTH.js → chunk-3YZWZJZR.js} +4 -4
- package/dist/{chunk-YOIJFB4J.js → chunk-DAZBANX7.js} +4 -2
- package/dist/{chunk-YOIJFB4J.js.map → chunk-DAZBANX7.js.map} +1 -1
- package/dist/{chunk-HN6B5G5V.js → chunk-YBOORROA.js} +2 -2
- package/dist/{claude-pair-runtime-XZXUHC4Q.js → claude-pair-runtime-U3QGHO36.js} +2 -2
- package/dist/lib/manager-worker.js +16 -16
- package/dist/mcp/direct-chat-channel.js +176 -133
- package/dist/mcp/index.js +175 -41
- package/dist/mcp/origami.js +3 -1
- package/dist/mcp/slack-channel.js +347 -262
- package/dist/mcp/teams-channel.js +210 -86
- package/dist/mcp/telegram-channel.js +290 -207
- package/dist/mcp/whatsapp-channel.js +194 -69
- package/dist/{persistent-session-QVJASJSQ.js → persistent-session-V3AMSH7S.js} +3 -3
- package/dist/{responsiveness-probe-AZSZBDKL.js → responsiveness-probe-MZBID4WC.js} +3 -3
- package/dist/{session-auth-dead-VY7AZM77.js → session-auth-dead-OCGA6YZW.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-JAXSZCTH.js.map → chunk-3YZWZJZR.js.map} +0 -0
- /package/dist/{chunk-HN6B5G5V.js.map → chunk-YBOORROA.js.map} +0 -0
- /package/dist/{claude-pair-runtime-XZXUHC4Q.js.map → claude-pair-runtime-U3QGHO36.js.map} +0 -0
- /package/dist/{persistent-session-QVJASJSQ.js.map → persistent-session-V3AMSH7S.js.map} +0 -0
- /package/dist/{responsiveness-probe-AZSZBDKL.js.map → responsiveness-probe-MZBID4WC.js.map} +0 -0
- /package/dist/{session-auth-dead-VY7AZM77.js.map → session-auth-dead-OCGA6YZW.js.map} +0 -0
package/dist/mcp/index.js
CHANGED
|
@@ -18867,7 +18867,7 @@ var require_filters = __commonJS({
|
|
|
18867
18867
|
return r.copySafeness(str, res);
|
|
18868
18868
|
}
|
|
18869
18869
|
_exports.indent = indent;
|
|
18870
|
-
function
|
|
18870
|
+
function join10(arr, del, attr) {
|
|
18871
18871
|
del = del || "";
|
|
18872
18872
|
if (attr) {
|
|
18873
18873
|
arr = lib.map(arr, function(v) {
|
|
@@ -18876,7 +18876,7 @@ var require_filters = __commonJS({
|
|
|
18876
18876
|
}
|
|
18877
18877
|
return arr.join(del);
|
|
18878
18878
|
}
|
|
18879
|
-
_exports.join =
|
|
18879
|
+
_exports.join = join10;
|
|
18880
18880
|
function last(arr) {
|
|
18881
18881
|
return arr[arr.length - 1];
|
|
18882
18882
|
}
|
|
@@ -20042,9 +20042,9 @@ var require_handler = __commonJS({
|
|
|
20042
20042
|
if (this.fsw.closed) {
|
|
20043
20043
|
return;
|
|
20044
20044
|
}
|
|
20045
|
-
const
|
|
20045
|
+
const dirname5 = sysPath.dirname(file);
|
|
20046
20046
|
const basename2 = sysPath.basename(file);
|
|
20047
|
-
const parent = this.fsw._getWatchedDir(
|
|
20047
|
+
const parent = this.fsw._getWatchedDir(dirname5);
|
|
20048
20048
|
let prevStats = stats;
|
|
20049
20049
|
if (parent.has(basename2))
|
|
20050
20050
|
return;
|
|
@@ -20071,7 +20071,7 @@ var require_handler = __commonJS({
|
|
|
20071
20071
|
prevStats = newStats2;
|
|
20072
20072
|
}
|
|
20073
20073
|
} catch (error2) {
|
|
20074
|
-
this.fsw._remove(
|
|
20074
|
+
this.fsw._remove(dirname5, basename2);
|
|
20075
20075
|
}
|
|
20076
20076
|
} else if (parent.has(basename2)) {
|
|
20077
20077
|
const at = newStats.atimeMs;
|
|
@@ -25175,7 +25175,7 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
25175
25175
|
})();</script>`;
|
|
25176
25176
|
|
|
25177
25177
|
// ../core/dist/integrations/augmented-live/publisher.js
|
|
25178
|
-
var PRESENTER_CHROME_SELECTORS = "#al-download, .al-launcher, .al-stats-btn, .al-edit-btn";
|
|
25178
|
+
var PRESENTER_CHROME_SELECTORS = "#al-download, #al-vis, .al-launcher, .al-stats-btn, .al-edit-btn";
|
|
25179
25179
|
var presenterChromeCss = `
|
|
25180
25180
|
/* ENG-9516: presenter mode. */
|
|
25181
25181
|
${PRESENTER_CHROME_SELECTORS}{transition:opacity .25s ease,visibility .25s ease}
|
|
@@ -25206,6 +25206,8 @@ var DECK_ATTRIBUTION_BOTTOM_PX = DECK_HUD_TOP_PX + DECK_CHROME_GAP_PX;
|
|
|
25206
25206
|
var DOWNLOAD_BOTTOM_PX = 72;
|
|
25207
25207
|
var DOWNLOAD_MOBILE_MIN_HEIGHT_PX = 44;
|
|
25208
25208
|
var DECK_ATTRIBUTION_NARROW_BOTTOM_PX = DOWNLOAD_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
|
|
25209
|
+
var VISIBILITY_BOTTOM_PX = DOWNLOAD_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
|
|
25210
|
+
var DECK_ATTRIBUTION_NARROW_WITH_VISIBILITY_BOTTOM_PX = VISIBILITY_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
|
|
25209
25211
|
|
|
25210
25212
|
// ../core/dist/integrations/augmented-live/asset.js
|
|
25211
25213
|
var MB = 1024 * 1024;
|
|
@@ -35540,8 +35542,8 @@ function renderKnowledgeBody(content) {
|
|
|
35540
35542
|
}
|
|
35541
35543
|
|
|
35542
35544
|
// src/index.ts
|
|
35543
|
-
import { homedir as
|
|
35544
|
-
import { basename, isAbsolute as isAbsolute2, join as
|
|
35545
|
+
import { homedir as homedir4 } from "os";
|
|
35546
|
+
import { basename, isAbsolute as isAbsolute2, join as join9, resolve as pathResolve, sep as sep2 } from "path";
|
|
35545
35547
|
|
|
35546
35548
|
// src/host-file-path.ts
|
|
35547
35549
|
var SKILL_BODY_PATH_MAX_BYTES = 512 * 1024;
|
|
@@ -35779,6 +35781,133 @@ async function makeArtefactWorkDir(prefix, env2) {
|
|
|
35779
35781
|
return mkdtemp(join2(scratch, prefix));
|
|
35780
35782
|
}
|
|
35781
35783
|
|
|
35784
|
+
// src/turn-context.ts
|
|
35785
|
+
import { mkdirSync as mkdirSync2, readFileSync as readFileSync3 } from "fs";
|
|
35786
|
+
import { homedir } from "os";
|
|
35787
|
+
import { dirname as dirname3, join as join5 } from "path";
|
|
35788
|
+
|
|
35789
|
+
// src/turn-initiator-marker.ts
|
|
35790
|
+
import { writeFileSync, readFileSync, mkdirSync, renameSync } from "fs";
|
|
35791
|
+
import { dirname as dirname2, join as join3 } from "path";
|
|
35792
|
+
var TURN_INITIATOR_MAX_AGE_MS = 5 * 60 * 1e3;
|
|
35793
|
+
var TURN_INITIATOR_LEDGER_FILENAME = ".turn-initiator-ledger.json";
|
|
35794
|
+
|
|
35795
|
+
// src/scheduled-turn-marker.ts
|
|
35796
|
+
import { readFileSync as readFileSync2, unlinkSync } from "fs";
|
|
35797
|
+
import { join as join4 } from "path";
|
|
35798
|
+
var SCHEDULED_TURN_MARKER_FILENAME2 = ".current-scheduled-turn.json";
|
|
35799
|
+
var SCHEDULED_TURN_MAX_AGE_MS = 15 * 60 * 1e3;
|
|
35800
|
+
function validateScheduledTurnMarker(raw, now, maxAgeMs = SCHEDULED_TURN_MAX_AGE_MS) {
|
|
35801
|
+
if (!raw || typeof raw !== "object") return null;
|
|
35802
|
+
const m = raw;
|
|
35803
|
+
if (typeof m.ts !== "number" || !Number.isFinite(m.ts)) return null;
|
|
35804
|
+
if (now - m.ts > maxAgeMs || now - m.ts < 0) return null;
|
|
35805
|
+
const out = { ts: m.ts };
|
|
35806
|
+
if (typeof m.task_id === "string" && m.task_id.length > 0) out.task_id = m.task_id;
|
|
35807
|
+
const t = m.target;
|
|
35808
|
+
if (t && typeof t === "object") {
|
|
35809
|
+
const tc = t;
|
|
35810
|
+
if (typeof tc.channel_id === "string" && tc.channel_id.length > 0) {
|
|
35811
|
+
out.target = {
|
|
35812
|
+
channel_id: tc.channel_id,
|
|
35813
|
+
...typeof tc.thread_ts === "string" && tc.thread_ts.length > 0 ? { thread_ts: tc.thread_ts } : {}
|
|
35814
|
+
};
|
|
35815
|
+
}
|
|
35816
|
+
}
|
|
35817
|
+
return out;
|
|
35818
|
+
}
|
|
35819
|
+
|
|
35820
|
+
// src/turn-context.ts
|
|
35821
|
+
var TURN_INITIATOR_MARKER_FILENAME = ".current-turn-initiator.json";
|
|
35822
|
+
function asSender(raw, now, maxAgeMs) {
|
|
35823
|
+
if (!raw || typeof raw !== "object") return null;
|
|
35824
|
+
const e = raw;
|
|
35825
|
+
if (typeof e["channel"] !== "string" || !e["channel"]) return null;
|
|
35826
|
+
if (typeof e["sender_id"] !== "string" || !e["sender_id"]) return null;
|
|
35827
|
+
const ts = e["ts"];
|
|
35828
|
+
if (typeof ts !== "number" || !Number.isFinite(ts) || now - ts < 0 || now - ts > maxAgeMs) return null;
|
|
35829
|
+
const kind = e["chat_kind"] === "direct" || e["chat_kind"] === "group" ? e["chat_kind"] : "unknown";
|
|
35830
|
+
const chatId = typeof e["chat_id"] === "string" && e["chat_id"] ? e["chat_id"] : void 0;
|
|
35831
|
+
const threadRef = typeof e["channel_ref"] === "string" && e["channel_ref"] ? e["channel_ref"] : void 0;
|
|
35832
|
+
return {
|
|
35833
|
+
channel: e["channel"],
|
|
35834
|
+
sender_id: e["sender_id"],
|
|
35835
|
+
chat_kind: kind,
|
|
35836
|
+
...chatId ? { chat_id: chatId } : {},
|
|
35837
|
+
...threadRef ? { thread_ref: threadRef } : {},
|
|
35838
|
+
ts
|
|
35839
|
+
};
|
|
35840
|
+
}
|
|
35841
|
+
function readJson(file) {
|
|
35842
|
+
try {
|
|
35843
|
+
return JSON.parse(readFileSync3(file, "utf8"));
|
|
35844
|
+
} catch {
|
|
35845
|
+
return void 0;
|
|
35846
|
+
}
|
|
35847
|
+
}
|
|
35848
|
+
function freshUnattributed(ledger, now, maxAgeMs) {
|
|
35849
|
+
if (!ledger || !Array.isArray(ledger.entries)) return false;
|
|
35850
|
+
return ledger.entries.some((e) => {
|
|
35851
|
+
const r = e;
|
|
35852
|
+
return r?.unattributed === true && typeof r.ts === "number" && Number.isFinite(r.ts) && now - r.ts >= 0 && now - r.ts <= maxAgeMs;
|
|
35853
|
+
});
|
|
35854
|
+
}
|
|
35855
|
+
function freshSenders(markerFile, ledger, now, maxAgeMs) {
|
|
35856
|
+
if (ledger && ledger.v === 1 && Array.isArray(ledger.entries)) {
|
|
35857
|
+
const fresh = ledger.entries.map((e) => asSender(e, now, maxAgeMs)).filter((s) => s !== null);
|
|
35858
|
+
if (fresh.length > 0) return fresh;
|
|
35859
|
+
}
|
|
35860
|
+
const single = asSender(readJson(markerFile), now, maxAgeMs);
|
|
35861
|
+
return single ? [single] : [];
|
|
35862
|
+
}
|
|
35863
|
+
function resolveTurnInitiatorFile(env2 = process.env, home = homedir()) {
|
|
35864
|
+
const injected = env2["AGT_TURN_INITIATOR_FILE"]?.trim();
|
|
35865
|
+
if (injected) return injected;
|
|
35866
|
+
const dir = resolveAgentDirAlias({
|
|
35867
|
+
codeName: env2["AGT_AGENT_CODE_NAME"],
|
|
35868
|
+
agentId: env2["AGT_AGENT_ID"],
|
|
35869
|
+
turnInitiatorFile: null,
|
|
35870
|
+
homeDir: home
|
|
35871
|
+
});
|
|
35872
|
+
return dir ? join5(dir, TURN_INITIATOR_MARKER_FILENAME) : null;
|
|
35873
|
+
}
|
|
35874
|
+
function readTurnContext(opts = {}) {
|
|
35875
|
+
try {
|
|
35876
|
+
return readTurnContextUnguarded(opts);
|
|
35877
|
+
} catch {
|
|
35878
|
+
return { v: 1, kind: "unavailable" };
|
|
35879
|
+
}
|
|
35880
|
+
}
|
|
35881
|
+
function readTurnContextUnguarded(opts) {
|
|
35882
|
+
const markerFile = opts.markerFile === void 0 ? (opts.resolveFile ?? (() => resolveTurnInitiatorFile()))() : opts.markerFile;
|
|
35883
|
+
if (!markerFile) return { v: 1, kind: "unavailable" };
|
|
35884
|
+
const now = opts.now ?? Date.now();
|
|
35885
|
+
const maxAgeMs = opts.maxAgeMs ?? TURN_INITIATOR_MAX_AGE_MS;
|
|
35886
|
+
const ledger = readJson(join5(dirname3(markerFile), TURN_INITIATOR_LEDGER_FILENAME));
|
|
35887
|
+
const senders = freshSenders(markerFile, ledger, now, maxAgeMs);
|
|
35888
|
+
const scheduled = validateScheduledTurnMarker(
|
|
35889
|
+
readJson(join5(dirname3(markerFile), SCHEDULED_TURN_MARKER_FILENAME2)),
|
|
35890
|
+
now
|
|
35891
|
+
);
|
|
35892
|
+
if (senders.length === 0) return { v: 1, kind: "none" };
|
|
35893
|
+
if (scheduled || freshUnattributed(ledger, now, maxAgeMs)) return { v: 1, kind: "ambiguous" };
|
|
35894
|
+
const latest = [...senders].sort((a, b) => b.ts - a.ts)[0];
|
|
35895
|
+
const same = senders.every(
|
|
35896
|
+
(s) => s.channel === latest.channel && s.sender_id === latest.sender_id && s.chat_kind === latest.chat_kind && s.chat_id === latest.chat_id
|
|
35897
|
+
);
|
|
35898
|
+
if (!same) return { v: 1, kind: "ambiguous" };
|
|
35899
|
+
return {
|
|
35900
|
+
v: 1,
|
|
35901
|
+
kind: "turn",
|
|
35902
|
+
channel: latest.channel,
|
|
35903
|
+
sender_id: latest.sender_id,
|
|
35904
|
+
chat_kind: latest.chat_kind,
|
|
35905
|
+
...latest.chat_id ? { chat_id: latest.chat_id } : {},
|
|
35906
|
+
// The newest thread: the one the person is replying in now.
|
|
35907
|
+
...latest.thread_ref ? { thread_ref: latest.thread_ref } : {}
|
|
35908
|
+
};
|
|
35909
|
+
}
|
|
35910
|
+
|
|
35782
35911
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js
|
|
35783
35912
|
var NEVER2 = Object.freeze({
|
|
35784
35913
|
status: "aborted"
|
|
@@ -46674,12 +46803,12 @@ function selectIntegrationsToRefresh(input) {
|
|
|
46674
46803
|
}
|
|
46675
46804
|
|
|
46676
46805
|
// src/self-restart.ts
|
|
46677
|
-
import { existsSync as existsSync2, mkdirSync, renameSync, writeFileSync } from "fs";
|
|
46678
|
-
import { homedir } from "os";
|
|
46679
|
-
import { join as
|
|
46806
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync3, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
46807
|
+
import { homedir as homedir2 } from "os";
|
|
46808
|
+
import { join as join6 } from "path";
|
|
46680
46809
|
import { randomUUID } from "crypto";
|
|
46681
46810
|
function restartFlagsDir() {
|
|
46682
|
-
return
|
|
46811
|
+
return join6(homedir2(), ".augmented", "restart-flags");
|
|
46683
46812
|
}
|
|
46684
46813
|
function isSelfRestartEnabled(env2) {
|
|
46685
46814
|
const raw = (env2.AGT_AGENT_SELF_RESTART_ENABLED ?? "").trim().toLowerCase();
|
|
@@ -46690,37 +46819,37 @@ function buildAgentRestartFlag(codeName, reason, nowMs) {
|
|
|
46690
46819
|
}
|
|
46691
46820
|
function writeAgentRestartFlag(codeName, reason, nowMs) {
|
|
46692
46821
|
const dir = restartFlagsDir();
|
|
46693
|
-
if (!existsSync2(dir))
|
|
46694
|
-
const path =
|
|
46822
|
+
if (!existsSync2(dir)) mkdirSync3(dir, { recursive: true });
|
|
46823
|
+
const path = join6(dir, `${codeName}.flag`);
|
|
46695
46824
|
const flag = buildAgentRestartFlag(codeName, reason, nowMs);
|
|
46696
46825
|
const tmpPath = `${path}.${process.pid}.${randomUUID()}.tmp`;
|
|
46697
|
-
|
|
46698
|
-
|
|
46826
|
+
writeFileSync2(tmpPath, JSON.stringify(flag) + "\n", "utf8");
|
|
46827
|
+
renameSync2(tmpPath, path);
|
|
46699
46828
|
return path;
|
|
46700
46829
|
}
|
|
46701
46830
|
|
|
46702
46831
|
// src/self-restart-confirm.ts
|
|
46703
|
-
import { existsSync as existsSync4, readdirSync, readFileSync as
|
|
46704
|
-
import { homedir as
|
|
46705
|
-
import { join as
|
|
46832
|
+
import { existsSync as existsSync4, readdirSync, readFileSync as readFileSync5 } from "fs";
|
|
46833
|
+
import { homedir as homedir3 } from "os";
|
|
46834
|
+
import { join as join7 } from "path";
|
|
46706
46835
|
|
|
46707
46836
|
// src/restart-confirm.ts
|
|
46708
|
-
import { existsSync as existsSync3, mkdirSync as
|
|
46709
|
-
import { dirname as
|
|
46837
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync4, readFileSync as readFileSync4, renameSync as renameSync3, unlinkSync as unlinkSync2, writeFileSync as writeFileSync3 } from "fs";
|
|
46838
|
+
import { dirname as dirname4 } from "path";
|
|
46710
46839
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
46711
46840
|
var RESTART_CONFIRM_MAX_AGE_MS = 10 * 60 * 1e3;
|
|
46712
46841
|
function writeRestartConfirmMarker(filePath, marker) {
|
|
46713
|
-
const dir =
|
|
46714
|
-
if (!existsSync3(dir))
|
|
46842
|
+
const dir = dirname4(filePath);
|
|
46843
|
+
if (!existsSync3(dir)) mkdirSync4(dir, { recursive: true, mode: 448 });
|
|
46715
46844
|
const tmpPath = `${filePath}.${process.pid}.${randomUUID2()}.tmp`;
|
|
46716
|
-
|
|
46717
|
-
|
|
46845
|
+
writeFileSync3(tmpPath, JSON.stringify(marker) + "\n", { encoding: "utf8", mode: 384 });
|
|
46846
|
+
renameSync3(tmpPath, filePath);
|
|
46718
46847
|
}
|
|
46719
46848
|
|
|
46720
46849
|
// src/self-restart-confirm.ts
|
|
46721
46850
|
var SELF_RESTART_PENDING_FRESHNESS_MS = 5 * 60 * 1e3;
|
|
46722
46851
|
function selfRestartAgentDir(codeName) {
|
|
46723
|
-
return
|
|
46852
|
+
return join7(homedir3(), ".augmented", codeName);
|
|
46724
46853
|
}
|
|
46725
46854
|
function selectFreshestPending(candidates, nowMs, maxAgeMs) {
|
|
46726
46855
|
let best = null;
|
|
@@ -46744,7 +46873,7 @@ function readMarkerDir(dir, toCandidate) {
|
|
|
46744
46873
|
for (const entry of entries) {
|
|
46745
46874
|
if (!entry.endsWith(".json") || entry.endsWith(".tmp")) continue;
|
|
46746
46875
|
try {
|
|
46747
|
-
const parsed = JSON.parse(
|
|
46876
|
+
const parsed = JSON.parse(readFileSync5(join7(dir, entry), "utf8"));
|
|
46748
46877
|
if (!parsed || typeof parsed !== "object") continue;
|
|
46749
46878
|
const candidate = toCandidate(parsed);
|
|
46750
46879
|
if (candidate) out.push(candidate);
|
|
@@ -46754,7 +46883,7 @@ function readMarkerDir(dir, toCandidate) {
|
|
|
46754
46883
|
return out;
|
|
46755
46884
|
}
|
|
46756
46885
|
function readPendingCandidates(agentDir) {
|
|
46757
|
-
const slack = readMarkerDir(
|
|
46886
|
+
const slack = readMarkerDir(join7(agentDir, "slack-pending-inbound"), (p2) => {
|
|
46758
46887
|
const channel = p2["channel"];
|
|
46759
46888
|
if (typeof channel !== "string" || channel.length === 0) return null;
|
|
46760
46889
|
const threadTs = p2["thread_ts"];
|
|
@@ -46762,7 +46891,7 @@ function readPendingCandidates(agentDir) {
|
|
|
46762
46891
|
if (typeof threadTs === "string" && threadTs.length > 0) reply["thread_ts"] = threadTs;
|
|
46763
46892
|
return { source: "slack", receivedAtMs: Date.parse(String(p2["received_at"])), reply };
|
|
46764
46893
|
});
|
|
46765
|
-
const telegram = readMarkerDir(
|
|
46894
|
+
const telegram = readMarkerDir(join7(agentDir, "telegram-pending-inbound"), (p2) => {
|
|
46766
46895
|
const chatId = p2["chat_id"];
|
|
46767
46896
|
if (chatId == null || typeof chatId !== "string" && typeof chatId !== "number") return null;
|
|
46768
46897
|
const reply = { chat_id: chatId };
|
|
@@ -46783,21 +46912,21 @@ function captureSelfRestartConfirm(opts) {
|
|
|
46783
46912
|
// human, so buildBackOnlineText degrades to the generic copy.
|
|
46784
46913
|
reply: best.reply
|
|
46785
46914
|
};
|
|
46786
|
-
const file = best.source === "slack" ?
|
|
46915
|
+
const file = best.source === "slack" ? join7(opts.agentDir, "slack-restart-confirm.json") : join7(opts.agentDir, "telegram-restart-confirm.json");
|
|
46787
46916
|
writeRestartConfirmMarker(file, marker);
|
|
46788
46917
|
return best.source;
|
|
46789
46918
|
}
|
|
46790
46919
|
|
|
46791
46920
|
// ../core/dist/integrations/forwarded-tools-report.js
|
|
46792
|
-
import { readFileSync as
|
|
46793
|
-
import { join as
|
|
46921
|
+
import { readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
|
|
46922
|
+
import { join as join8 } from "path";
|
|
46794
46923
|
var FORWARDED_TOOLS_REPORT_FILENAME = "forwarded-tools.json";
|
|
46795
46924
|
function forwardedToolsReportPath(agentDir) {
|
|
46796
|
-
return
|
|
46925
|
+
return join8(agentDir, FORWARDED_TOOLS_REPORT_FILENAME);
|
|
46797
46926
|
}
|
|
46798
46927
|
function writeForwardedToolsReport(agentDir, report) {
|
|
46799
46928
|
try {
|
|
46800
|
-
|
|
46929
|
+
writeFileSync4(forwardedToolsReportPath(agentDir), JSON.stringify(report), "utf-8");
|
|
46801
46930
|
return true;
|
|
46802
46931
|
} catch {
|
|
46803
46932
|
return false;
|
|
@@ -50676,9 +50805,9 @@ async function forwardToolCall(toolName, args) {
|
|
|
50676
50805
|
// root to its canonical form so both sides of the comparison are real
|
|
50677
50806
|
// paths. Falls back to the unresolved join if the dir is missing, which
|
|
50678
50807
|
// then simply refuses (there is nothing to read anyway).
|
|
50679
|
-
agentDir: canonicalAgentDir(
|
|
50808
|
+
agentDir: canonicalAgentDir(join9(homedir4(), ".augmented", AGT_AGENT_CODE_NAME)),
|
|
50680
50809
|
// agent-dir-allow: immediately realpath-resolved to the ADR-0049 agent_id-keyed dir before use as a containment root
|
|
50681
|
-
path: { isAbsolute: isAbsolute2, resolve: pathResolve, join:
|
|
50810
|
+
path: { isAbsolute: isAbsolute2, resolve: pathResolve, join: join9, sep: sep2 },
|
|
50682
50811
|
// O_NOFOLLOW is the whole point of opening by flags: the path is already
|
|
50683
50812
|
// symlink-resolved, so a symlink at the final component means it was
|
|
50684
50813
|
// swapped after the check, and this turns that into an ELOOP.
|
|
@@ -50737,7 +50866,12 @@ async function forwardToolCall(toolName, args) {
|
|
|
50737
50866
|
agent_id: AGT_AGENT_ID,
|
|
50738
50867
|
name: toolName,
|
|
50739
50868
|
arguments: outgoing,
|
|
50740
|
-
run_id: AGT_RUN_ID ?? null
|
|
50869
|
+
run_id: AGT_RUN_ID ?? null,
|
|
50870
|
+
// ENG-11348: who sent this turn, read from the host markers here, never
|
|
50871
|
+
// from the model's arguments. Ninja Lists caps the agent by that
|
|
50872
|
+
// person's access and refuses anything that is not one sender in a
|
|
50873
|
+
// one-to-one conversation; other tools ignore it.
|
|
50874
|
+
turn_context: readTurnContext()
|
|
50741
50875
|
},
|
|
50742
50876
|
false,
|
|
50743
50877
|
FORWARD_TOOL_CALL_TIMEOUT_MS,
|
|
@@ -51093,7 +51227,7 @@ async function saveArtefactSourceToFile(artefactId) {
|
|
|
51093
51227
|
codeName: AGT_AGENT_CODE_NAME,
|
|
51094
51228
|
turnInitiatorFile: process.env.AGT_TURN_INITIATOR_FILE,
|
|
51095
51229
|
agentId: AGT_AGENT_ID,
|
|
51096
|
-
homeDir:
|
|
51230
|
+
homeDir: homedir4()
|
|
51097
51231
|
});
|
|
51098
51232
|
const readOnce = async () => {
|
|
51099
51233
|
const before = await fetchArtefactRevision(artefactId);
|
|
@@ -51108,7 +51242,7 @@ async function saveArtefactSourceToFile(artefactId) {
|
|
|
51108
51242
|
};
|
|
51109
51243
|
let result = await readOnce();
|
|
51110
51244
|
if (result.revisionState !== "stable") result = await readOnce();
|
|
51111
|
-
const filePath =
|
|
51245
|
+
const filePath = join9(dir, safeDownloadName(`${artefactId}.html`, `${artefactId}.html`));
|
|
51112
51246
|
await writeFile(filePath, result.html, "utf8");
|
|
51113
51247
|
return {
|
|
51114
51248
|
path: filePath,
|
|
@@ -51188,7 +51322,7 @@ async function exportArtefactToFile(dir, artefactId, format, item) {
|
|
|
51188
51322
|
return { kind: "pending", jobId: outcome.jobId, retryAfterMs: outcome.retryAfterMs };
|
|
51189
51323
|
}
|
|
51190
51324
|
const fallback = `${artefactId}${item !== void 0 ? `-item-${item + 1}` : ""}.${format}`;
|
|
51191
|
-
const filePath =
|
|
51325
|
+
const filePath = join9(dir, safeDownloadName(outcome.body.filename, fallback));
|
|
51192
51326
|
const buf = Buffer.from(outcome.body.base64, "base64");
|
|
51193
51327
|
await writeFile(filePath, buf);
|
|
51194
51328
|
return {
|
|
@@ -51215,7 +51349,7 @@ async function downloadArtefactText(params) {
|
|
|
51215
51349
|
codeName: AGT_AGENT_CODE_NAME,
|
|
51216
51350
|
turnInitiatorFile: process.env.AGT_TURN_INITIATOR_FILE,
|
|
51217
51351
|
agentId: AGT_AGENT_ID,
|
|
51218
|
-
homeDir:
|
|
51352
|
+
homeDir: homedir4()
|
|
51219
51353
|
});
|
|
51220
51354
|
let items;
|
|
51221
51355
|
let truncatedFrom = null;
|
package/dist/mcp/origami.js
CHANGED
|
@@ -39301,7 +39301,7 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
|
|
|
39301
39301
|
})();</script>`;
|
|
39302
39302
|
|
|
39303
39303
|
// ../core/dist/integrations/augmented-live/publisher.js
|
|
39304
|
-
var PRESENTER_CHROME_SELECTORS = "#al-download, .al-launcher, .al-stats-btn, .al-edit-btn";
|
|
39304
|
+
var PRESENTER_CHROME_SELECTORS = "#al-download, #al-vis, .al-launcher, .al-stats-btn, .al-edit-btn";
|
|
39305
39305
|
var presenterChromeCss = `
|
|
39306
39306
|
/* ENG-9516: presenter mode. */
|
|
39307
39307
|
${PRESENTER_CHROME_SELECTORS}{transition:opacity .25s ease,visibility .25s ease}
|
|
@@ -39332,6 +39332,8 @@ var DECK_ATTRIBUTION_BOTTOM_PX = DECK_HUD_TOP_PX + DECK_CHROME_GAP_PX;
|
|
|
39332
39332
|
var DOWNLOAD_BOTTOM_PX = 72;
|
|
39333
39333
|
var DOWNLOAD_MOBILE_MIN_HEIGHT_PX = 44;
|
|
39334
39334
|
var DECK_ATTRIBUTION_NARROW_BOTTOM_PX = DOWNLOAD_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
|
|
39335
|
+
var VISIBILITY_BOTTOM_PX = DOWNLOAD_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
|
|
39336
|
+
var DECK_ATTRIBUTION_NARROW_WITH_VISIBILITY_BOTTOM_PX = VISIBILITY_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
|
|
39335
39337
|
|
|
39336
39338
|
// ../core/dist/integrations/augmented-live/asset.js
|
|
39337
39339
|
var MB = 1024 * 1024;
|