@integrity-labs/agt-cli 0.27.15 → 0.27.17
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-LJEV2QHN.js → chunk-QQVNHJ76.js} +30 -40
- package/dist/chunk-QQVNHJ76.js.map +1 -0
- package/dist/lib/manager-worker.js +9 -5
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +1 -462
- package/dist/mcp/slack-channel.js +30 -518
- package/dist/mcp/telegram-channel.js +14 -474
- package/package.json +1 -1
- package/dist/chunk-LJEV2QHN.js.map +0 -1
package/dist/bin/agt.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
success,
|
|
28
28
|
table,
|
|
29
29
|
warn
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-QQVNHJ76.js";
|
|
31
31
|
import {
|
|
32
32
|
CHANNEL_REGISTRY,
|
|
33
33
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4643,7 +4643,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4643
4643
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4644
4644
|
import chalk18 from "chalk";
|
|
4645
4645
|
import ora16 from "ora";
|
|
4646
|
-
var cliVersion = true ? "0.27.
|
|
4646
|
+
var cliVersion = true ? "0.27.17" : "dev";
|
|
4647
4647
|
async function fetchLatestVersion() {
|
|
4648
4648
|
const host2 = getHost();
|
|
4649
4649
|
if (!host2) return null;
|
|
@@ -5175,7 +5175,7 @@ function handleError(err) {
|
|
|
5175
5175
|
}
|
|
5176
5176
|
|
|
5177
5177
|
// src/bin/agt.ts
|
|
5178
|
-
var cliVersion2 = true ? "0.27.
|
|
5178
|
+
var cliVersion2 = true ? "0.27.17" : "dev";
|
|
5179
5179
|
var program = new Command();
|
|
5180
5180
|
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");
|
|
5181
5181
|
program.hook("preAction", (thisCommand) => {
|
|
@@ -2681,42 +2681,6 @@ If your charter doesn't authorise team-scope skill writes
|
|
|
2681
2681
|
refused server-side \u2014 surface that error to the user rather than
|
|
2682
2682
|
falling back to a local-disk write.
|
|
2683
2683
|
|
|
2684
|
-
`;
|
|
2685
|
-
}
|
|
2686
|
-
function buildProgressHeartbeatSection(resolvedChannels) {
|
|
2687
|
-
const hasSlack = !!resolvedChannels?.includes("slack");
|
|
2688
|
-
const hasDirectChat = !!resolvedChannels?.includes("direct-chat");
|
|
2689
|
-
if (!hasSlack && !hasDirectChat)
|
|
2690
|
-
return "";
|
|
2691
|
-
const bullets = [];
|
|
2692
|
-
if (hasSlack) {
|
|
2693
|
-
bullets.push("- **Slack threads:** `slack_progress_start` (channel + thread_ts from the inbound `<channel>` tag, label = short task name) \u2192 `slack_progress_update` between steps (pass `step_label`, optional `step_current`/`step_total`) \u2192 `slack_progress_complete` (summary) or `slack_progress_fail` (one-sentence reason).");
|
|
2694
|
-
}
|
|
2695
|
-
if (hasDirectChat) {
|
|
2696
|
-
bullets.push("- **Direct Chat sessions:** `direct_chat_progress_start` (session_id from the inbound tag, label) \u2192 `direct_chat_progress_update` \u2192 `direct_chat_progress_complete` / `_fail`.");
|
|
2697
|
-
}
|
|
2698
|
-
return `
|
|
2699
|
-
## Progress heartbeats during multi-step work
|
|
2700
|
-
|
|
2701
|
-
When a task involves **\u22653 tool calls or is likely to take >5 seconds**
|
|
2702
|
-
of tool work, open an in-place progress anchor instead of streaming
|
|
2703
|
-
"working on\u2026" / "still working\u2026" / "done" messages. The operator sees
|
|
2704
|
-
one message that ticks forward as you advance, not a thread flooded
|
|
2705
|
-
with status pings.
|
|
2706
|
-
|
|
2707
|
-
${bullets.join("\n")}
|
|
2708
|
-
|
|
2709
|
-
The state machine debounces updates to roughly one API call per second
|
|
2710
|
-
per channel, so it's safe to call \`_update\` after every step rather
|
|
2711
|
-
than batching. Always end with \`_complete\` or \`_fail\` \u2014 leaving an
|
|
2712
|
-
anchor in the "working" state means a future stale-state sweep flips it
|
|
2713
|
-
to \u26A0\uFE0F "agent unresponsive" once the heartbeat goes cold.
|
|
2714
|
-
|
|
2715
|
-
**Skip the heartbeat for one-shot replies.** A single \`slack.reply\` /
|
|
2716
|
-
\`direct_chat.reply\` is still the right pattern when there's no
|
|
2717
|
-
multi-step work to surface. Heartbeats are for the case where you'd
|
|
2718
|
-
otherwise emit several intermediate messages.
|
|
2719
|
-
|
|
2720
2684
|
`;
|
|
2721
2685
|
}
|
|
2722
2686
|
function buildPersonalitySection(seed) {
|
|
@@ -3077,7 +3041,7 @@ inline replies \u2014 they do NOT replace this dispatch decision.
|
|
|
3077
3041
|
If the work turns out to be unexpectedly slow after you started inline,
|
|
3078
3042
|
finish the current sub-step, then dispatch the rest. Don't apologise for
|
|
3079
3043
|
mid-task switching \u2014 operators care about responsiveness, not consistency.
|
|
3080
|
-
|
|
3044
|
+
|
|
3081
3045
|
${activeTasksSection}${personalitySection}## Identity
|
|
3082
3046
|
|
|
3083
3047
|
- Code Name: ${frontmatter.code_name}
|
|
@@ -4872,6 +4836,20 @@ ${sections}`
|
|
|
4872
4836
|
},
|
|
4873
4837
|
writeChannelCredentials(codeName, channelId, config, options) {
|
|
4874
4838
|
const tzEnv = options?.agentTimezone && options.agentTimezone.trim() !== "" ? { TZ: options.agentTimezone.trim() } : {};
|
|
4839
|
+
const senderPolicyEnv = (() => {
|
|
4840
|
+
const sp = options?.senderPolicy;
|
|
4841
|
+
if (!sp)
|
|
4842
|
+
return {};
|
|
4843
|
+
return {
|
|
4844
|
+
// Channel-specific var name to match what the consumer MCP reads;
|
|
4845
|
+
// spread below selects the right one per channelId.
|
|
4846
|
+
...sp.mode === "team_agents_only" && sp.team_id ? { AGT_TEAM_ID: sp.team_id } : {},
|
|
4847
|
+
// sentinel keys consumed by the per-channel spread below
|
|
4848
|
+
_SENDER_POLICY_MODE: sp.mode
|
|
4849
|
+
};
|
|
4850
|
+
})();
|
|
4851
|
+
const senderPolicyMode = senderPolicyEnv["_SENDER_POLICY_MODE"];
|
|
4852
|
+
delete senderPolicyEnv["_SENDER_POLICY_MODE"];
|
|
4875
4853
|
const agentDir = getAgentDir(codeName);
|
|
4876
4854
|
mkdirSync4(agentDir, { recursive: true });
|
|
4877
4855
|
const isPersistent = options?.sessionMode === "persistent";
|
|
@@ -5023,7 +5001,14 @@ ${sections}`
|
|
|
5023
5001
|
// (ENG-4936) honours PEER_DISABLED with identical
|
|
5024
5002
|
// semantics. Only emit when non-default so the env block
|
|
5025
5003
|
// stays clean for the common case.
|
|
5026
|
-
...peerDisabledMode !== "off" ? { PEER_DISABLED: peerDisabledMode } : {}
|
|
5004
|
+
...peerDisabledMode !== "off" ? { PEER_DISABLED: peerDisabledMode } : {},
|
|
5005
|
+
// ENG-5841: SLACK_SENDER_POLICY drives slack-inbound-filter.ts.
|
|
5006
|
+
// Only emitted when the effective mode is restrictive (default
|
|
5007
|
+
// 'all' is the absence of the env var — same convention the
|
|
5008
|
+
// MCP filter uses on its own end).
|
|
5009
|
+
...senderPolicyMode ? { SLACK_SENDER_POLICY: senderPolicyMode } : {},
|
|
5010
|
+
...senderPolicyEnv
|
|
5011
|
+
// AGT_TEAM_ID when team_agents_only
|
|
5027
5012
|
}
|
|
5028
5013
|
};
|
|
5029
5014
|
const provisionMcpPath = join4(agentDir, "provision", ".mcp.json");
|
|
@@ -5199,7 +5184,12 @@ ${sections}`
|
|
|
5199
5184
|
...peerTeamIds.length > 0 ? { MSTEAMS_PEER_TEAM_IDS: peerTeamIds.join(",") } : {},
|
|
5200
5185
|
...knownPeerBotIds.length > 0 ? { MSTEAMS_KNOWN_PEER_BOT_IDS: knownPeerBotIds.join(",") } : {},
|
|
5201
5186
|
...msteamsAgtAuthEnv,
|
|
5202
|
-
...tzEnv
|
|
5187
|
+
...tzEnv,
|
|
5188
|
+
// ENG-5841: MSTEAMS_SENDER_POLICY drives teams-inbound-filter.ts.
|
|
5189
|
+
// Mirrors the Slack branch above — only emitted when restrictive.
|
|
5190
|
+
...senderPolicyMode ? { MSTEAMS_SENDER_POLICY: senderPolicyMode } : {},
|
|
5191
|
+
...senderPolicyEnv
|
|
5192
|
+
// AGT_TEAM_ID when team_agents_only
|
|
5203
5193
|
};
|
|
5204
5194
|
if (isPersistent && existsSync5(localTeamsChannel)) {
|
|
5205
5195
|
mcpServers["msteams"] = {
|
|
@@ -6920,4 +6910,4 @@ export {
|
|
|
6920
6910
|
managerInstallSystemUnitCommand,
|
|
6921
6911
|
managerUninstallSystemUnitCommand
|
|
6922
6912
|
};
|
|
6923
|
-
//# sourceMappingURL=chunk-
|
|
6913
|
+
//# sourceMappingURL=chunk-QQVNHJ76.js.map
|