@integrity-labs/agt-cli 0.20.6 → 0.20.8

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 CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  success,
51
51
  table,
52
52
  warn
53
- } from "../chunk-SOYIZEZG.js";
53
+ } from "../chunk-5A5EBN5L.js";
54
54
 
55
55
  // src/bin/agt.ts
56
56
  import { join as join10 } from "path";
@@ -3734,7 +3734,7 @@ import { execFileSync, execSync } from "child_process";
3734
3734
  import { existsSync as existsSync5, realpathSync } from "fs";
3735
3735
  import chalk17 from "chalk";
3736
3736
  import ora15 from "ora";
3737
- var cliVersion = true ? "0.20.6" : "dev";
3737
+ var cliVersion = true ? "0.20.8" : "dev";
3738
3738
  async function fetchLatestVersion() {
3739
3739
  const host2 = getHost();
3740
3740
  if (!host2) return null;
@@ -4266,7 +4266,7 @@ function handleError(err) {
4266
4266
  }
4267
4267
 
4268
4268
  // src/bin/agt.ts
4269
- var cliVersion2 = true ? "0.20.6" : "dev";
4269
+ var cliVersion2 = true ? "0.20.8" : "dev";
4270
4270
  var program = new Command();
4271
4271
  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");
4272
4272
  program.hook("preAction", (thisCommand) => {
@@ -2976,6 +2976,42 @@ If your charter doesn't authorise team-scope skill writes
2976
2976
  refused server-side \u2014 surface that error to the user rather than
2977
2977
  falling back to a local-disk write.
2978
2978
 
2979
+ `;
2980
+ }
2981
+ function buildProgressHeartbeatSection(resolvedChannels) {
2982
+ const hasSlack = !!resolvedChannels?.includes("slack");
2983
+ const hasDirectChat = !!resolvedChannels?.includes("direct-chat");
2984
+ if (!hasSlack && !hasDirectChat)
2985
+ return "";
2986
+ const bullets = [];
2987
+ if (hasSlack) {
2988
+ 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).");
2989
+ }
2990
+ if (hasDirectChat) {
2991
+ 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`.");
2992
+ }
2993
+ return `
2994
+ ## Progress heartbeats during multi-step work
2995
+
2996
+ When a task involves **\u22653 tool calls or is likely to take >5 seconds**
2997
+ of tool work, open an in-place progress anchor instead of streaming
2998
+ "working on\u2026" / "still working\u2026" / "done" messages. The operator sees
2999
+ one message that ticks forward as you advance, not a thread flooded
3000
+ with status pings.
3001
+
3002
+ ${bullets.join("\n")}
3003
+
3004
+ The state machine debounces updates to roughly one API call per second
3005
+ per channel, so it's safe to call \`_update\` after every step rather
3006
+ than batching. Always end with \`_complete\` or \`_fail\` \u2014 leaving an
3007
+ anchor in the "working" state means a future stale-state sweep flips it
3008
+ to \u26A0\uFE0F "agent unresponsive" once the heartbeat goes cold.
3009
+
3010
+ **Skip the heartbeat for one-shot replies.** A single \`slack.reply\` /
3011
+ \`direct_chat.reply\` is still the right pattern when there's no
3012
+ multi-step work to surface. Heartbeats are for the case where you'd
3013
+ otherwise emit several intermediate messages.
3014
+
2979
3015
  `;
2980
3016
  }
2981
3017
  function buildPersonalitySection(seed) {
@@ -3257,7 +3293,7 @@ inline replies \u2014 they do NOT replace this dispatch decision.
3257
3293
  If the work turns out to be unexpectedly slow after you started inline,
3258
3294
  finish the current sub-step, then dispatch the rest. Don't apologise for
3259
3295
  mid-task switching \u2014 operators care about responsiveness, not consistency.
3260
-
3296
+ ${buildProgressHeartbeatSection(resolvedChannels)}
3261
3297
  ${personalitySection}## Identity
3262
3298
 
3263
3299
  - Code Name: ${frontmatter.code_name}
@@ -6436,6 +6472,14 @@ function generateSlackAppManifest(input) {
6436
6472
  // caller passed a URL AND the app requested the `commands` scope.
6437
6473
  // Slack rejects manifests where slash_commands is non-empty without
6438
6474
  // the matching scope, so the scope check is a guard.
6475
+ //
6476
+ // ENG-5150: also register /restart. The slash_commands envelope handler
6477
+ // in packages/mcp/src/slack-channel.ts already routes it; without the
6478
+ // manifest entry Slack treats typed `/restart` as a plain message and
6479
+ // posts it to the channel before the bot can intercept it. /help is
6480
+ // intentionally NOT registered here — Slack reserves `/help` as a
6481
+ // built-in global command, so app-level registration is unreliable.
6482
+ // The message-intercept fallback in slack-channel.ts handles /help.
6439
6483
  ...slash_command_url && scopes.includes("commands") ? {
6440
6484
  slash_commands: [
6441
6485
  {
@@ -6457,6 +6501,12 @@ function generateSlackAppManifest(input) {
6457
6501
  url: slash_command_url,
6458
6502
  description: "Check whether this agent is online + last activity.",
6459
6503
  should_escape: false
6504
+ },
6505
+ {
6506
+ command: "/restart",
6507
+ url: slash_command_url,
6508
+ description: "Restart this agent (allowlisted users only).",
6509
+ should_escape: false
6460
6510
  }
6461
6511
  ]
6462
6512
  } : {}
@@ -8509,6 +8559,16 @@ var ajv2 = new Ajv20202({ allErrors: true, strict: false });
8509
8559
  addFormats2(ajv2);
8510
8560
  var compiledMetaSchema = ajv2.compile(context_meta_schema_default);
8511
8561
 
8562
+ // ../../packages/core/dist/types/plugin.js
8563
+ var HITL_TIER_ORDER = [
8564
+ "read",
8565
+ "write",
8566
+ "write_high_risk",
8567
+ "write_destructive",
8568
+ "admin"
8569
+ ];
8570
+ var HITL_TIER_RANK = Object.freeze(Object.fromEntries(HITL_TIER_ORDER.map((tier, i) => [tier, i])));
8571
+
8512
8572
  // ../../packages/core/dist/drift/comparators.js
8513
8573
  function compareToolPolicy(expected, actual) {
8514
8574
  const findings = [];
@@ -9381,4 +9441,4 @@ export {
9381
9441
  managerInstallSystemUnitCommand,
9382
9442
  managerUninstallSystemUnitCommand
9383
9443
  };
9384
- //# sourceMappingURL=chunk-SOYIZEZG.js.map
9444
+ //# sourceMappingURL=chunk-5A5EBN5L.js.map