@integrity-labs/agt-cli 0.28.358 → 0.28.360
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 +4 -4
- package/dist/{chunk-OUHANHOH.js → chunk-U62E42YH.js} +78 -3
- package/dist/chunk-U62E42YH.js.map +1 -0
- package/dist/{chunk-HTBXOXPI.js → chunk-Z7QR2YEJ.js} +24 -1
- package/dist/{chunk-HTBXOXPI.js.map → chunk-Z7QR2YEJ.js.map} +1 -1
- package/dist/{claude-pair-runtime-OLK7HT2U.js → claude-pair-runtime-JX2ZYSZC.js} +2 -2
- package/dist/lib/manager-worker.js +92 -20
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +23 -0
- package/dist/mcp/origami.js +23 -0
- package/dist/mcp/slack-channel.js +23 -0
- package/dist/mcp/telegram-channel.js +23 -0
- package/dist/{persistent-session-LFCRKYPY.js → persistent-session-7XG63YFS.js} +2 -2
- package/dist/{responsiveness-probe-DUO2RA6D.js → responsiveness-probe-JV6PRDKD.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-OUHANHOH.js.map +0 -1
- /package/dist/{claude-pair-runtime-OLK7HT2U.js.map → claude-pair-runtime-JX2ZYSZC.js.map} +0 -0
- /package/dist/{persistent-session-LFCRKYPY.js.map → persistent-session-7XG63YFS.js.map} +0 -0
- /package/dist/{responsiveness-probe-DUO2RA6D.js.map → responsiveness-probe-JV6PRDKD.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-U62E42YH.js";
|
|
44
44
|
import {
|
|
45
45
|
AnchorSessionClient,
|
|
46
46
|
CHANNEL_REGISTRY,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
renderTemplate,
|
|
71
71
|
resolveChannels,
|
|
72
72
|
serializeManifestForSlackCli
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-Z7QR2YEJ.js";
|
|
74
74
|
import "../chunk-XWVM4KPK.js";
|
|
75
75
|
|
|
76
76
|
// src/bin/agt.ts
|
|
@@ -4829,7 +4829,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4829
4829
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4830
4830
|
import chalk18 from "chalk";
|
|
4831
4831
|
import ora16 from "ora";
|
|
4832
|
-
var cliVersion = true ? "0.28.
|
|
4832
|
+
var cliVersion = true ? "0.28.360" : "dev";
|
|
4833
4833
|
async function fetchLatestVersion() {
|
|
4834
4834
|
const host2 = getHost();
|
|
4835
4835
|
if (!host2) return null;
|
|
@@ -6001,7 +6001,7 @@ function handleError(err) {
|
|
|
6001
6001
|
}
|
|
6002
6002
|
|
|
6003
6003
|
// src/bin/agt.ts
|
|
6004
|
-
var cliVersion2 = true ? "0.28.
|
|
6004
|
+
var cliVersion2 = true ? "0.28.360" : "dev";
|
|
6005
6005
|
var program = new Command();
|
|
6006
6006
|
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");
|
|
6007
6007
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resolveConnectivityProbe,
|
|
21
21
|
worseConnectivityOutcome,
|
|
22
22
|
wrapScheduledTaskPrompt
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Z7QR2YEJ.js";
|
|
24
24
|
import {
|
|
25
25
|
parsePsRows
|
|
26
26
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6653,6 +6653,13 @@ var HttpOpencodeClient = class _HttpOpencodeClient {
|
|
|
6653
6653
|
const out = await this.call("GET", `/api/session/${sessionID}/message`);
|
|
6654
6654
|
return out.data ?? [];
|
|
6655
6655
|
}
|
|
6656
|
+
async listSessions() {
|
|
6657
|
+
const out = await this.call("GET", "/api/session");
|
|
6658
|
+
return (out.data ?? []).filter((s) => typeof s.id === "string").map((s) => ({ id: s.id, title: s.title, updated: s.time?.updated, created: s.time?.created }));
|
|
6659
|
+
}
|
|
6660
|
+
async getStructuredMessages(sessionID) {
|
|
6661
|
+
return this.fetchMessages(sessionID);
|
|
6662
|
+
}
|
|
6656
6663
|
/** The message with the greatest `time.created` (opencode returns newest-first, but don't rely on order). */
|
|
6657
6664
|
static newestByCreated(messages) {
|
|
6658
6665
|
let newest;
|
|
@@ -6668,6 +6675,72 @@ var HttpOpencodeClient = class _HttpOpencodeClient {
|
|
|
6668
6675
|
}
|
|
6669
6676
|
};
|
|
6670
6677
|
|
|
6678
|
+
// ../../packages/core/dist/provisioning/frameworks/opencode/opencode-transcript.js
|
|
6679
|
+
var IDENTITY = (s) => s;
|
|
6680
|
+
var DEFAULT_MAX_PART_CHARS = 4e3;
|
|
6681
|
+
var DEFAULT_MAX_BYTES = 18e3;
|
|
6682
|
+
function emptyOpencodeTranscript(capturedAt) {
|
|
6683
|
+
return {
|
|
6684
|
+
version: 1,
|
|
6685
|
+
sessionId: null,
|
|
6686
|
+
sessionTitle: null,
|
|
6687
|
+
capturedAt,
|
|
6688
|
+
truncated: false,
|
|
6689
|
+
messages: []
|
|
6690
|
+
};
|
|
6691
|
+
}
|
|
6692
|
+
function buildOpencodeTranscript(input) {
|
|
6693
|
+
const redact = input.redact ?? IDENTITY;
|
|
6694
|
+
const maxPartChars = input.maxPartChars ?? DEFAULT_MAX_PART_CHARS;
|
|
6695
|
+
const maxBytes = input.maxBytes ?? DEFAULT_MAX_BYTES;
|
|
6696
|
+
const sorted = [...input.messages].sort((a, b) => (a.time?.created ?? 0) - (b.time?.created ?? 0));
|
|
6697
|
+
const limited = typeof input.maxMessages === "number" ? sorted.slice(-input.maxMessages) : sorted;
|
|
6698
|
+
let messages = limited.map((m) => buildMessage(m, redact, maxPartChars));
|
|
6699
|
+
let truncated = false;
|
|
6700
|
+
const envelopeOverhead = 200;
|
|
6701
|
+
while (messages.length > 0 && Buffer.byteLength(JSON.stringify(messages), "utf8") + envelopeOverhead > maxBytes) {
|
|
6702
|
+
messages = messages.slice(1);
|
|
6703
|
+
truncated = true;
|
|
6704
|
+
}
|
|
6705
|
+
return {
|
|
6706
|
+
version: 1,
|
|
6707
|
+
sessionId: input.sessionId,
|
|
6708
|
+
sessionTitle: input.sessionTitle ?? null,
|
|
6709
|
+
capturedAt: input.capturedAt,
|
|
6710
|
+
truncated,
|
|
6711
|
+
messages
|
|
6712
|
+
};
|
|
6713
|
+
}
|
|
6714
|
+
function buildMessage(m, redact, maxPartChars) {
|
|
6715
|
+
return {
|
|
6716
|
+
id: m.id,
|
|
6717
|
+
role: typeof m.type === "string" ? m.type : "unknown",
|
|
6718
|
+
createdAt: m.time?.created,
|
|
6719
|
+
completedAt: m.time?.completed,
|
|
6720
|
+
finish: m.finish,
|
|
6721
|
+
parts: (m.content ?? []).map((p) => buildPart(p, redact, maxPartChars))
|
|
6722
|
+
};
|
|
6723
|
+
}
|
|
6724
|
+
function clip(raw, redact, maxChars) {
|
|
6725
|
+
const red = redact(raw);
|
|
6726
|
+
return red.length > maxChars ? `${red.slice(0, maxChars)}\u2026 [truncated]` : red;
|
|
6727
|
+
}
|
|
6728
|
+
function buildPart(p, redact, maxPartChars) {
|
|
6729
|
+
if (p.type === "text" || p.type === "reasoning") {
|
|
6730
|
+
return { kind: p.type, text: typeof p.text === "string" ? clip(p.text, redact, maxPartChars) : "" };
|
|
6731
|
+
}
|
|
6732
|
+
if (p.type === "tool") {
|
|
6733
|
+
return {
|
|
6734
|
+
kind: "tool",
|
|
6735
|
+
tool: typeof p.tool === "string" ? p.tool : void 0,
|
|
6736
|
+
status: p.state?.status,
|
|
6737
|
+
// Redact the summary; DROP raw state.input entirely (may carry secrets).
|
|
6738
|
+
title: typeof p.state?.title === "string" ? clip(p.state.title, redact, maxPartChars) : void 0
|
|
6739
|
+
};
|
|
6740
|
+
}
|
|
6741
|
+
return { kind: "other" };
|
|
6742
|
+
}
|
|
6743
|
+
|
|
6671
6744
|
// ../../packages/core/dist/provisioning/frameworks/opencode/inbound-bridge.js
|
|
6672
6745
|
var InboundError = class extends Error {
|
|
6673
6746
|
/** True once `prompt()` has durably admitted the turn. Retry is unsafe. */
|
|
@@ -7153,7 +7226,7 @@ function requireHost() {
|
|
|
7153
7226
|
}
|
|
7154
7227
|
|
|
7155
7228
|
// src/lib/api-client.ts
|
|
7156
|
-
var agtCliVersion = true ? "0.28.
|
|
7229
|
+
var agtCliVersion = true ? "0.28.360" : "dev";
|
|
7157
7230
|
var lastConfigHash = null;
|
|
7158
7231
|
function setConfigHash(hash) {
|
|
7159
7232
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -9543,6 +9616,8 @@ export {
|
|
|
9543
9616
|
toOpencodeModel,
|
|
9544
9617
|
parseOpencodeModelRef,
|
|
9545
9618
|
HttpOpencodeClient,
|
|
9619
|
+
emptyOpencodeTranscript,
|
|
9620
|
+
buildOpencodeTranscript,
|
|
9546
9621
|
OpencodeInboundBridge,
|
|
9547
9622
|
readChannelServerEnv,
|
|
9548
9623
|
setJsonMode,
|
|
@@ -9604,4 +9679,4 @@ export {
|
|
|
9604
9679
|
managerInstallSystemUnitCommand,
|
|
9605
9680
|
managerUninstallSystemUnitCommand
|
|
9606
9681
|
};
|
|
9607
|
-
//# sourceMappingURL=chunk-
|
|
9682
|
+
//# sourceMappingURL=chunk-U62E42YH.js.map
|