@integrity-labs/agt-cli 0.28.1220 → 0.28.1221

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
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-QAQIUHMS.js";
43
+ } from "../chunk-U5CKO3OD.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5200,7 +5200,7 @@ import { execFileSync, execSync } from "child_process";
5200
5200
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
5201
5201
  import chalk17 from "chalk";
5202
5202
  import ora15 from "ora";
5203
- var cliVersion = true ? "0.28.1220" : "dev";
5203
+ var cliVersion = true ? "0.28.1221" : "dev";
5204
5204
  async function fetchLatestVersion() {
5205
5205
  const host2 = getHost();
5206
5206
  if (!host2) return null;
@@ -6460,7 +6460,7 @@ function handleError(err) {
6460
6460
  }
6461
6461
 
6462
6462
  // src/bin/agt.ts
6463
- var cliVersion2 = true ? "0.28.1220" : "dev";
6463
+ var cliVersion2 = true ? "0.28.1221" : "dev";
6464
6464
  var program = new Command();
6465
6465
  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");
6466
6466
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -8084,7 +8084,7 @@ function exchangeFailureKind(err) {
8084
8084
  }
8085
8085
 
8086
8086
  // src/lib/api-client.ts
8087
- var agtCliVersion = true ? "0.28.1220" : "dev";
8087
+ var agtCliVersion = true ? "0.28.1221" : "dev";
8088
8088
  var lastConfigHash = null;
8089
8089
  function setConfigHash(hash) {
8090
8090
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -13724,4 +13724,4 @@ export {
13724
13724
  managerInstallSystemUnitCommand,
13725
13725
  managerUninstallSystemUnitCommand
13726
13726
  };
13727
- //# sourceMappingURL=chunk-QAQIUHMS.js.map
13727
+ //# sourceMappingURL=chunk-U5CKO3OD.js.map
@@ -85,7 +85,7 @@ import {
85
85
  tripClass,
86
86
  writeEtcEnvironment,
87
87
  writeProfileDScript
88
- } from "../chunk-QAQIUHMS.js";
88
+ } from "../chunk-U5CKO3OD.js";
89
89
  import {
90
90
  CLAUDE_CODE_SECURITY_FLOOR,
91
91
  SELF_UPDATE_TIMEOUTS,
@@ -16455,7 +16455,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
16455
16455
  var lastVersionCheckAt = 0;
16456
16456
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
16457
16457
  var lastResponsivenessProbeAt = 0;
16458
- var agtCliVersion = true ? "0.28.1220" : "dev";
16458
+ var agtCliVersion = true ? "0.28.1221" : "dev";
16459
16459
  function resolveBrewPath(execFileSync3) {
16460
16460
  try {
16461
16461
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
package/dist/mcp/index.js CHANGED
@@ -49648,6 +49648,9 @@ function describeKanbanRespondOutcome(data) {
49648
49648
  return data.delivered === false ? `Answer added as a note on the card and it is on ${who}'s board as a reply they owe. The instant notice did not go out, so they will see it at their next board walk. It is off your plate.` : `Answer delivered to ${who} as a note on the card. It shows on their board until they answer, and their answer comes back to yours. It is off your plate.`;
49649
49649
  }
49650
49650
  if (data.ok && data.delivered !== false) {
49651
+ if (data.answered_as === "manager") {
49652
+ return "Answer delivered as their manager. Their card is un-parked and back on their board, so it is off your plate. The person it was parked on was not told; if they need to know the decision is made, tell them.";
49653
+ }
49651
49654
  return "Answer delivered. Their card is un-parked and back on their board \u2014 they will pick it up from here, so it is off your plate.";
49652
49655
  }
49653
49656
  if (data.reason === "recorded_undelivered" || data.ok && data.delivered === false) {
@@ -49661,13 +49664,31 @@ function describeKanbanRespondOutcome(data) {
49661
49664
  return data.error ?? "Could not send your answer.";
49662
49665
  }
49663
49666
  var REFUSAL_MESSAGES = {
49664
- not_found: () => 'No card is parked on you or owed a reply by you with that id. Re-read kanban_list \u2014 only cards under "You are blocking these" or "Replies you owe" can be answered here, and the id must be copied exactly.',
49667
+ not_found: () => `No card you can answer has that id. Re-read kanban_list for a card under "You are blocking these" or "Replies you owe", or, as a manager, kanban_parked for a DIRECT report's card parked on a person (ENG-11927). Copy the id exactly. A grand-report's card, or one on another team, cannot be answered here.`,
49665
49668
  self_block: () => "That card is parked on YOU by you \u2014 a self-block, almost always a mistyped code_name when it was parked. Fix it on your own card rather than answering it.",
49666
49669
  already_responded: () => "Someone already answered that card, so it has resumed. Nothing more to do.",
49667
49670
  not_actionable: (d) => `That card is no longer parked (status: ${d.status ?? "unknown"}), so there is nothing to un-park. The agent has moved on.`,
49671
+ // ENG-11927 ask 3: a manager may answer a report's card only when it is parked on a person.
49672
+ not_human_wait: (d) => d.waiting_kind === "approval" ? "That card is parked on a pending approval, and the approval decides it, not an answer here. Nothing was changed. Use approval_annotate to add your recommendation instead." : `That card is parked on "${d.waiting_kind ?? "something other than a person"}", not on a person, so a manager cannot answer it here. Nothing was changed. If it is parked on another agent, that agent answers it.`,
49668
49673
  recorded_not_unparked: () => "Your answer was recorded but the card could not be un-parked, so the agent is still blocked \u2014 tell them directly and check the card."
49669
49674
  };
49670
49675
  var HANDLED_REFUSAL_REASONS = Object.keys(REFUSAL_MESSAGES).sort();
49676
+ function describeKanbanRespondRejection(status, body) {
49677
+ if (status !== 404 && status !== 409) return null;
49678
+ if (!body) return null;
49679
+ let parsed;
49680
+ try {
49681
+ parsed = JSON.parse(body);
49682
+ } catch {
49683
+ return null;
49684
+ }
49685
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return null;
49686
+ const data = parsed;
49687
+ if (data.ok !== false || typeof data.reason !== "string" || !HANDLED_REFUSAL_REASONS.includes(data.reason)) {
49688
+ return null;
49689
+ }
49690
+ return describeKanbanRespondOutcome(data);
49691
+ }
49671
49692
 
49672
49693
  // src/kanban-update.ts
49673
49694
  function buildKanbanUpdateItem(id, fields) {
@@ -50028,9 +50049,10 @@ async function getToken() {
50028
50049
  return AGT_TOKEN;
50029
50050
  }
50030
50051
  var ApiPostError = class extends Error {
50031
- constructor(message, status) {
50052
+ constructor(message, status, responseBody = null) {
50032
50053
  super(message);
50033
50054
  this.status = status;
50055
+ this.responseBody = responseBody;
50034
50056
  this.name = "ApiPostError";
50035
50057
  }
50036
50058
  };
@@ -50070,7 +50092,8 @@ async function apiPost(path, body, retried = false, timeoutMs = 15e3, toolName,
50070
50092
  status: res.status,
50071
50093
  body: text
50072
50094
  }),
50073
- res.status
50095
+ res.status,
50096
+ text
50074
50097
  );
50075
50098
  }
50076
50099
  try {
@@ -50978,7 +51001,7 @@ server.tool(
50978
51001
  );
50979
51002
  server.tool(
50980
51003
  "kanban_parked",
50981
- "List the cards of an agent that reports directly to you, oldest first. By default its parked cards (needs_attention and waiting); pass column for its active cards, for example to find out what a todo card sitting for hours is. Each card shows its title, column, age, why it was parked where that is recorded (origin, waiting kind, waiting-on line), and the ticket or PR reference stored on it. Read-only: it changes nothing on the board. It never returns descriptions, results or notes. References are as stored, with no live ticket or PR state, and a linked reference can be a chat thread rather than a ticket. Only the direct reports-to manager can read this, the agent must be on your own team, and a manager-only agent refuses it. Use kanban_peek for counts on any teammate. Don't know the agent's code_name? Call directory_lookup first.",
51004
+ "List the cards of an agent that reports directly to you, oldest first. By default its parked cards (needs_attention and waiting); pass column for its active cards, for example to find out what a todo card sitting for hours is. Each card shows its title, column, age, why it was parked where that is recorded (origin, waiting kind, waiting-on line), and the ticket or PR reference stored on it. Read-only: it changes nothing on the board. It never returns descriptions, results or notes. A card waiting on a person (waiting kind human) is a decision you can make: answer it in place with kanban_respond and its id (ENG-11927). References are as stored, with no live ticket or PR state, and a linked reference can be a chat thread rather than a ticket. Only the direct reports-to manager can read this, the agent must be on your own team, and a manager-only agent refuses it. Use kanban_peek for counts on any teammate. Don't know the agent's code_name? Call directory_lookup first.",
50982
51005
  {
50983
51006
  target_agent: external_exports.string().describe("The agent that reports to you: its agent code_name (kebab-case) or agent UUID."),
50984
51007
  column: external_exports.enum(["needs_attention", "waiting", "in_progress", "todo", "backlog", "active"]).optional().describe('Only this column. "active" means in_progress, todo and backlog together. Omit for needs_attention and waiting.'),
@@ -51182,10 +51205,10 @@ server.tool(
51182
51205
  );
51183
51206
  server.tool(
51184
51207
  "kanban_respond",
51185
- 'Answer another agent on a card that is not yours to move. Two cases, both listed by kanban_list: (1) "You are blocking these" - a card another agent PARKED on you; it has stopped until you act, and your answer is delivered onto that card and un-parks it. (2) "Replies you owe" - a note another agent left you on a card (ENG-11483); your answer is added as a note and goes back to their board, and passing expects_reply: false ends the exchange quietly. A reply owed on one of YOUR OWN active cards stays in its status section, marked "[reply owed to @x]" - answer that the same way. Either way, do the thing asked, then send the answer here. Do NOT create a second card to carry it - it would sit beside the one it answers, joined by nothing. Only the agent the card names (the one it is parked on, or the one owing the reply) can answer it.',
51208
+ `Answer another agent on a card that is not yours to move. Two cases, both listed by kanban_list: (1) "You are blocking these" - a card another agent PARKED on you; it has stopped until you act, and your answer is delivered onto that card and un-parks it. (2) "Replies you owe" - a note another agent left you on a card (ENG-11483); your answer is added as a note and goes back to their board, and passing expects_reply: false ends the exchange quietly. A reply owed on one of YOUR OWN active cards stays in its status section, marked "[reply owed to @x]" - answer that the same way. Either way, do the thing asked, then send the answer here. Do NOT create a second card to carry it - it would sit beside the one it answers, joined by nothing. Only the agent the card names (the one it is parked on, or the one owing the reply) can answer it, with one addition (ENG-11927): a manager agent can also answer its DIRECT report's card that is parked on a PERSON (waiting_kind "human", as kanban_parked lists it), in place, so the person does not have to route a decision that is yours to make. Not a grand-report's card, not a card parked on an approval or anything other than a person.`,
51186
51209
  {
51187
51210
  card_id: external_exports.string().describe(
51188
- 'The card id, exactly as kanban_list shows it: under "You are blocking these", under "Replies you owe", or on your own card marked "[reply owed to @x]".'
51211
+ `The card id, exactly as kanban_list shows it: under "You are blocking these", under "Replies you owe", or on your own card marked "[reply owed to @x]". As a manager, the id kanban_parked shows for a direct report's card parked on a person.`
51189
51212
  ),
51190
51213
  text: external_exports.string().optional().describe(
51191
51214
  "Your answer, self-contained. This is what the blocked agent resumes on, so give it the ANSWER rather than a pointer to one - it cannot see your board, your session or your files. Required unless you are picking a choice with `value`."
@@ -51208,6 +51231,8 @@ server.tool(
51208
51231
  ...typeof params.expects_reply === "boolean" ? { expects_reply: params.expects_reply } : {}
51209
51232
  });
51210
51233
  } catch (err) {
51234
+ const refusal = err instanceof ApiPostError ? describeKanbanRespondRejection(err.status, err.responseBody) : null;
51235
+ if (refusal !== null) return { content: [{ type: "text", text: refusal }] };
51211
51236
  return {
51212
51237
  content: [{ type: "text", text: `Could not send your answer: ${err.message}` }]
51213
51238
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1220",
3
+ "version": "0.28.1221",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {