@integrity-labs/agt-cli 0.28.346 → 0.28.348

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.
@@ -21331,8 +21331,8 @@ var tailLogsSchema = external_exports.object({
21331
21331
  agent_id: external_exports.string().min(1).max(64).describe(
21332
21332
  "UUID of the agent whose host log to tail. Fails closed (uniform not-found) if you are not authorized for its org."
21333
21333
  ),
21334
- log: external_exports.enum(["manager", "pane", "slack-stderr", "telegram-stderr", "manager-state"]).optional().describe(
21335
- `Which host log to read (default manager). manager = manager.log (lifecycle / respawn / wedge lines); pane = pane.log (the tmux pane \u2014 the agent's visible I/O, what it was "actually doing"); slack-stderr / telegram-stderr = that channel MCP's stderr (crash diagnosis); manager-state = manager-state.json (current per-agent state snapshot).`
21334
+ log: external_exports.enum(["manager", "pane", "slack-stderr", "telegram-stderr", "direct-chat-stderr", "manager-state"]).optional().describe(
21335
+ `Which host log to read (default manager). manager = manager.log (lifecycle / respawn / wedge lines); pane = pane.log (the tmux pane \u2014 the agent's visible I/O, what it was "actually doing"); slack-stderr / telegram-stderr / direct-chat-stderr = that channel MCP's stderr (crash diagnosis, e.g. attachment-download 400s); manager-state = manager-state.json (current per-agent state snapshot).`
21336
21336
  ),
21337
21337
  lines: external_exports.number().int().min(1).max(2e3).optional().describe(
21338
21338
  "Trailing lines to return (default 200, max 2000). Output is also byte-capped (~20 KB, newest kept) to stay within SSM limits \u2014 `truncated` flags when it clipped."
@@ -21342,7 +21342,7 @@ var queryLogsSchema = external_exports.object({
21342
21342
  agent_id: external_exports.string().min(1).max(64).describe(
21343
21343
  "UUID of the agent whose host log to query. Fails closed (uniform not-found) if you are not authorized for its org."
21344
21344
  ),
21345
- log: external_exports.enum(["manager", "pane", "slack-stderr", "telegram-stderr", "manager-state"]).optional().describe(
21345
+ log: external_exports.enum(["manager", "pane", "slack-stderr", "telegram-stderr", "direct-chat-stderr", "manager-state"]).optional().describe(
21346
21346
  "Which host log to read (default manager). Same allowlist as debug_tail_logs. Time filtering only applies to `manager` (its lines carry an ISO8601 prefix); the others return their byte-capped tail unfiltered (`time_filtered:false`)."
21347
21347
  ),
21348
21348
  since: external_exports.string().min(1).max(40).optional().describe(
@@ -21667,7 +21667,7 @@ server.tool(
21667
21667
  );
21668
21668
  server.tool(
21669
21669
  "debug_tail_logs",
21670
- "Live-tail an agent's HOST logs over SSM to ground-truth \"what was it actually doing?\" \u2014 the host-reaching read, used after debug_get_agent points at a sick agent. Resolves the agent's current host and returns the trailing lines of ONE allowlisted operational log: { agent_id, code_name, host, log, content (the tail), log_present, lines_requested, truncated, ssm_status }. Logs: `manager` (manager.log \u2014 respawn/wedge/lifecycle), `pane` (pane.log \u2014 the tmux pane, the agent's visible I/O, e.g. a stuck AskUserQuestion), `slack-stderr`/`telegram-stderr` (a channel MCP's crash output), `manager-state` (manager-state.json). Fails closed for an unauthorized org. Only operational logs are reachable \u2014 secret files (.mcp.json, .env.integrations) are NOT. Pass { agent_id, log?, lines? } (lines default 200, max 2000; output ~20 KB-capped, newest kept). Every call is audited as a cross-org host access.",
21670
+ "Live-tail an agent's HOST logs over SSM to ground-truth \"what was it actually doing?\" \u2014 the host-reaching read, used after debug_get_agent points at a sick agent. Resolves the agent's current host and returns the trailing lines of ONE allowlisted operational log: { agent_id, code_name, host, log, content (the tail), log_present, lines_requested, truncated, ssm_status }. Logs: `manager` (manager.log \u2014 respawn/wedge/lifecycle), `pane` (pane.log \u2014 the tmux pane, the agent's visible I/O, e.g. a stuck AskUserQuestion), `slack-stderr`/`telegram-stderr`/`direct-chat-stderr` (a channel MCP's crash output, e.g. attachment-download 400s), `manager-state` (manager-state.json). Fails closed for an unauthorized org. Only operational logs are reachable \u2014 secret files (.mcp.json, .env.integrations) are NOT. Pass { agent_id, log?, lines? } (lines default 200, max 2000; output ~20 KB-capped, newest kept). Every call is audited as a cross-org host access.",
21671
21671
  tailLogsSchema.shape,
21672
21672
  async (args) => {
21673
21673
  try {
@@ -21680,7 +21680,7 @@ server.tool(
21680
21680
  );
21681
21681
  server.tool(
21682
21682
  "debug_query_logs",
21683
- 'Read an agent\'s HOST logs OVER A TIME WINDOW, spanning rotated files \u2014 the historical counterpart to debug_tail_logs. Where tail only shows the live tail of the current file (minutes, and gone once it rotates), this reads the active log AND its logrotate siblings (manager.log.1, manager.log.2.gz, \u2026 14 kept) and filters lines to [since, until]. This is the read path for "did it restart at 4pm YESTERDAY?" \u2014 use it when the answer is older than the live tail or spans a rotation. Returns { agent_id, code_name, host, log, since, until, time_filtered, content, log_present, lines_requested, truncated, ssm_status }. Time filtering applies to `manager` (its lines carry an ISO8601 prefix); `pane`/`slack-stderr`/`telegram-stderr`/`manager-state` return their byte-capped tail unfiltered (time_filtered:false). Only operational logs are reachable \u2014 secret files (.mcp.json, .env.integrations) are NOT. Pass { agent_id, log?, since?, until?, lines? } (since/until ISO8601 UTC e.g. 2026-06-14T16:00:00Z, default unbounded; lines default 1000, max 5000; output ~20 KB-capped, newest kept \u2014 narrow the window if truncated). Fails closed for an unauthorized org; every call is audited as a cross-org host access.',
21683
+ 'Read an agent\'s HOST logs OVER A TIME WINDOW, spanning rotated files \u2014 the historical counterpart to debug_tail_logs. Where tail only shows the live tail of the current file (minutes, and gone once it rotates), this reads the active log AND its logrotate siblings (manager.log.1, manager.log.2.gz, \u2026 14 kept) and filters lines to [since, until]. This is the read path for "did it restart at 4pm YESTERDAY?" \u2014 use it when the answer is older than the live tail or spans a rotation. Returns { agent_id, code_name, host, log, since, until, time_filtered, content, log_present, lines_requested, truncated, ssm_status }. Time filtering applies to `manager` (its lines carry an ISO8601 prefix); `pane`/`slack-stderr`/`telegram-stderr`/`direct-chat-stderr`/`manager-state` return their byte-capped tail unfiltered (time_filtered:false). Only operational logs are reachable \u2014 secret files (.mcp.json, .env.integrations) are NOT. Pass { agent_id, log?, since?, until?, lines? } (since/until ISO8601 UTC e.g. 2026-06-14T16:00:00Z, default unbounded; lines default 1000, max 5000; output ~20 KB-capped, newest kept \u2014 narrow the window if truncated). Fails closed for an unauthorized org; every call is audited as a cross-org host access.',
21684
21684
  queryLogsSchema.shape,
21685
21685
  async (args) => {
21686
21686
  try {
@@ -30251,7 +30251,8 @@ import {
30251
30251
  readdirSync as readdirSync4,
30252
30252
  existsSync as existsSync6,
30253
30253
  renameSync as renameSync5,
30254
- unlinkSync as unlinkSync3
30254
+ unlinkSync as unlinkSync3,
30255
+ createWriteStream
30255
30256
  } from "fs";
30256
30257
 
30257
30258
  // src/direct-chat-inbound-attachments.ts
@@ -30329,6 +30330,9 @@ function buildAttachmentMeta(items) {
30329
30330
  if (firstImage?.path) meta.image_path = firstImage.path;
30330
30331
  return meta;
30331
30332
  }
30333
+ function redactPresignSignature(url) {
30334
+ return url.replace(/([?&]X-Amz-Signature=)[^&]+/gi, "$1<redacted>").replace(/([?&]X-Amz-Security-Token=)[^&]+/gi, "$1<redacted>");
30335
+ }
30332
30336
  async function downloadInboundAttachment(att, dir, deps) {
30333
30337
  const base = {
30334
30338
  filename: att.filename,
@@ -30341,7 +30345,18 @@ async function downloadInboundAttachment(att, dir, deps) {
30341
30345
  }
30342
30346
  try {
30343
30347
  const res = await deps.fetchUrl(att.download_url);
30344
- if (!res.ok) return { ...base, error: `download HTTP ${res.status}` };
30348
+ if (!res.ok) {
30349
+ let s3Body = "";
30350
+ try {
30351
+ const raw = await res.bytes();
30352
+ s3Body = new TextDecoder().decode(raw.slice(0, 600)).replace(/\s+/g, " ").trim();
30353
+ } catch {
30354
+ }
30355
+ deps.warn(
30356
+ `direct-chat inbound download HTTP ${res.status} for ${att.filename} url=${redactPresignSignature(att.download_url)} s3Body=${s3Body}`
30357
+ );
30358
+ return { ...base, error: `download HTTP ${res.status}` };
30359
+ }
30345
30360
  if (res.contentLength != null && res.contentLength > MAX_INBOUND_ATTACHMENT_BYTES) {
30346
30361
  return { ...base, error: "exceeds the 10 MB inbound limit" };
30347
30362
  }
@@ -33045,8 +33060,8 @@ var INTEGRATION_REGISTRY = [
33045
33060
  pricing: "usage",
33046
33061
  note: "Billed per Deck task run, plus per compute-minute.",
33047
33062
  meters: [
33048
- { event_type: "run_task", unit: "run" },
33049
- { event_type: "run_minutes", unit: "minute" }
33063
+ { event_type: "run_task", unit: "run", label: "Base run fee" },
33064
+ { event_type: "run_minutes", unit: "minute", label: "Compute time" }
33050
33065
  ]
33051
33066
  }
33052
33067
  },
@@ -34987,6 +35002,31 @@ var INBOUND_ATTACHMENTS_DIR = resolveInboundAttachmentsDir({
34987
35002
  homeDir: homedir3()
34988
35003
  });
34989
35004
  var AGT_AGENT_CODE_NAME = process.env.AGT_AGENT_CODE_NAME;
35005
+ var directChatStderrLogStream = null;
35006
+ if (AGT_AGENT_CODE_NAME) {
35007
+ try {
35008
+ const logDir = join10(homedir3(), ".augmented", AGT_AGENT_CODE_NAME);
35009
+ mkdirSync5(logDir, { recursive: true });
35010
+ directChatStderrLogStream = createWriteStream(
35011
+ join10(logDir, "direct-chat-channel-stderr.log"),
35012
+ { flags: "a", mode: 384 }
35013
+ );
35014
+ directChatStderrLogStream.on("error", () => {
35015
+ directChatStderrLogStream = null;
35016
+ });
35017
+ const origWrite = process.stderr.write.bind(process.stderr);
35018
+ process.stderr.write = (chunk, ...rest) => {
35019
+ try {
35020
+ const buf = typeof chunk === "string" ? chunk : String(chunk);
35021
+ const ts = (/* @__PURE__ */ new Date()).toISOString();
35022
+ directChatStderrLogStream?.write(`[${ts}] ${buf}${buf.endsWith("\n") ? "" : "\n"}`);
35023
+ } catch {
35024
+ }
35025
+ return origWrite(chunk, ...rest);
35026
+ };
35027
+ } catch {
35028
+ }
35029
+ }
34990
35030
  var PROGRESS_HEARTBEAT_PATH = AGT_AGENT_CODE_NAME ? join10(homedir3(), ".augmented", AGT_AGENT_CODE_NAME, "channel-progress-heartbeat.json") : null;
34991
35031
  var DIRECT_CHAT_PENDING_INBOUND_DIR = AGT_AGENT_CODE_NAME ? join10(homedir3(), ".augmented", AGT_AGENT_CODE_NAME, "direct-chat-pending-inbound") : null;
34992
35032
  var DIRECT_CHAT_DELIVERY_LEDGER_DIR = AGT_AGENT_CODE_NAME ? join10(homedir3(), ".augmented", AGT_AGENT_CODE_NAME, ".agt-inbound-delivery-ledger") : null;
@@ -38859,8 +38859,8 @@ var INTEGRATION_REGISTRY = [
38859
38859
  pricing: "usage",
38860
38860
  note: "Billed per Deck task run, plus per compute-minute.",
38861
38861
  meters: [
38862
- { event_type: "run_task", unit: "run" },
38863
- { event_type: "run_minutes", unit: "minute" }
38862
+ { event_type: "run_task", unit: "run", label: "Base run fee" },
38863
+ { event_type: "run_minutes", unit: "minute", label: "Compute time" }
38864
38864
  ]
38865
38865
  }
38866
38866
  },
@@ -32742,8 +32742,8 @@ var INTEGRATION_REGISTRY = [
32742
32742
  pricing: "usage",
32743
32743
  note: "Billed per Deck task run, plus per compute-minute.",
32744
32744
  meters: [
32745
- { event_type: "run_task", unit: "run" },
32746
- { event_type: "run_minutes", unit: "minute" }
32745
+ { event_type: "run_task", unit: "run", label: "Base run fee" },
32746
+ { event_type: "run_minutes", unit: "minute", label: "Compute time" }
32747
32747
  ]
32748
32748
  }
32749
32749
  },
@@ -37345,6 +37345,9 @@ function buildSlackMcpInstructions(opts) {
37345
37345
  ].join(" ");
37346
37346
  }
37347
37347
 
37348
+ // src/slack-react-taxonomy.ts
37349
+ var SLACK_REACT_TOOL_DESCRIPTION = "Add an emoji reaction to a Slack message. Use sparingly \u2014 prefer a text reply. Reaction taxonomy: \u2705 = action completed successfully. \u{1F4DD} (:memo:) and \u26A0\uFE0F (:warning:) are blessed for explicit multi-state STATUS pipelines only \u2014 e.g. marking a run/parent \u2705 done / \u{1F4DD} waiting / \u26A0\uFE0F failed for at-a-glance status. That exception is narrow: never use a reaction to tell a user that YOUR reply failed \u2014 NEVER react to signal failure of your own work; on failure call slack.reply with one sentence explaining what went wrong instead (no stack traces, no secrets). \u{1F440} (eyes) is already auto-applied on inbound; do not duplicate. \u23F3 (:hourglass_flowing_sand:) is reserved for the system to mark an inbound that arrived while the agent couldn't reply \u2014 never add \u23F3 or \u274C yourself. (A \u{1F512} you may see on a thread is the server's reply-throttle marker, not a coerced reaction \u2014 slack.react passes your emoji straight through to Slack and never rewrites it to \u{1F512}.)";
37350
+
37348
37351
  // src/slack-reply-binding-telemetry.ts
37349
37352
  import { readFileSync as readFileSync13, writeFileSync as writeFileSync10 } from "fs";
37350
37353
  import { join as join13 } from "path";
@@ -40919,13 +40922,13 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
40919
40922
  },
40920
40923
  {
40921
40924
  name: "slack.react",
40922
- description: "Add an emoji reaction to a Slack message. Use sparingly \u2014 prefer a text reply. Reaction taxonomy: \u2705 = action completed successfully. NEVER react to signal failure of your work \u2014 users can't tell why it failed from a reaction. On failure, call slack.reply with one sentence explaining what went wrong instead. \u{1F440} (eyes) is already auto-applied on inbound; do not duplicate. \u23F3 (:hourglass_flowing_sand:) is reserved for the system to mark an inbound that arrived while the agent couldn't reply \u2014 never add \u23F3 or \u274C yourself.",
40925
+ description: SLACK_REACT_TOOL_DESCRIPTION,
40923
40926
  inputSchema: {
40924
40927
  type: "object",
40925
40928
  properties: {
40926
40929
  channel: { type: "string", description: "Slack channel ID" },
40927
40930
  timestamp: { type: "string", description: "Message timestamp to react to" },
40928
- emoji: { type: "string", description: 'Emoji name without colons (e.g. "white_check_mark"). Do NOT use "x" or any other failure emoji \u2014 send a slack.reply explaining the failure instead.' }
40931
+ emoji: { type: "string", description: 'Emoji name without colons (e.g. "white_check_mark", "memo", "warning"). Do NOT use "x" (\u274C) or "hourglass_flowing_sand" (\u23F3) \u2014 those are system-only. To signal that your own reply failed, send a slack.reply explaining it rather than a reaction. See the tool description for the full taxonomy.' }
40929
40932
  },
40930
40933
  required: ["channel", "timestamp", "emoji"]
40931
40934
  }
@@ -33092,8 +33092,8 @@ var INTEGRATION_REGISTRY = [
33092
33092
  pricing: "usage",
33093
33093
  note: "Billed per Deck task run, plus per compute-minute.",
33094
33094
  meters: [
33095
- { event_type: "run_task", unit: "run" },
33096
- { event_type: "run_minutes", unit: "minute" }
33095
+ { event_type: "run_task", unit: "run", label: "Base run fee" },
33096
+ { event_type: "run_minutes", unit: "minute", label: "Compute time" }
33097
33097
  ]
33098
33098
  }
33099
33099
  },
@@ -36,7 +36,7 @@ import {
36
36
  writeDirectChatSessionState,
37
37
  writeEgressAllowlist,
38
38
  writePersistentClaudeWrapper
39
- } from "./chunk-NUL7IYDV.js";
39
+ } from "./chunk-ZGY4ADGS.js";
40
40
  import "./chunk-XWVM4KPK.js";
41
41
  export {
42
42
  EGRESS_BASELINE_DOMAINS,
@@ -77,4 +77,4 @@ export {
77
77
  writeEgressAllowlist,
78
78
  writePersistentClaudeWrapper
79
79
  };
80
- //# sourceMappingURL=persistent-session-2UIVPYXX.js.map
80
+ //# sourceMappingURL=persistent-session-G22EFMQM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-NUL7IYDV.js";
3
+ } from "./chunk-ZGY4ADGS.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -437,4 +437,4 @@ export {
437
437
  readAndResetSlackReplyBindingClassifications,
438
438
  readAndResetSlackReplyTargetClassifications
439
439
  };
440
- //# sourceMappingURL=responsiveness-probe-CPMALCAG.js.map
440
+ //# sourceMappingURL=responsiveness-probe-HXZFFAGD.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.346",
3
+ "version": "0.28.348",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {