@integrity-labs/agt-cli 0.28.1211 → 0.28.1212

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-ALZS5XAJ.js";
43
+ } from "../chunk-QII2YF5V.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.1211" : "dev";
5203
+ var cliVersion = true ? "0.28.1212" : "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.1211" : "dev";
6463
+ var cliVersion2 = true ? "0.28.1212" : "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) => {
@@ -8082,7 +8082,7 @@ function exchangeFailureKind(err) {
8082
8082
  }
8083
8083
 
8084
8084
  // src/lib/api-client.ts
8085
- var agtCliVersion = true ? "0.28.1211" : "dev";
8085
+ var agtCliVersion = true ? "0.28.1212" : "dev";
8086
8086
  var lastConfigHash = null;
8087
8087
  function setConfigHash(hash) {
8088
8088
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -13683,4 +13683,4 @@ export {
13683
13683
  managerInstallSystemUnitCommand,
13684
13684
  managerUninstallSystemUnitCommand
13685
13685
  };
13686
- //# sourceMappingURL=chunk-ALZS5XAJ.js.map
13686
+ //# sourceMappingURL=chunk-QII2YF5V.js.map
@@ -85,7 +85,7 @@ import {
85
85
  tripClass,
86
86
  writeEtcEnvironment,
87
87
  writeProfileDScript
88
- } from "../chunk-ALZS5XAJ.js";
88
+ } from "../chunk-QII2YF5V.js";
89
89
  import {
90
90
  CLAUDE_CODE_SECURITY_FLOOR,
91
91
  SELF_UPDATE_TIMEOUTS,
@@ -16447,7 +16447,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
16447
16447
  var lastVersionCheckAt = 0;
16448
16448
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
16449
16449
  var lastResponsivenessProbeAt = 0;
16450
- var agtCliVersion = true ? "0.28.1211" : "dev";
16450
+ var agtCliVersion = true ? "0.28.1212" : "dev";
16451
16451
  function resolveBrewPath(execFileSync3) {
16452
16452
  try {
16453
16453
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
package/dist/mcp/index.js CHANGED
@@ -29239,6 +29239,11 @@ var KANBAN_STATUSES = [
29239
29239
  "needs_attention",
29240
29240
  "waiting"
29241
29241
  ];
29242
+ var KANBAN_TERMINAL_STATES = /* @__PURE__ */ new Set([
29243
+ "done",
29244
+ "failed",
29245
+ "cancelled"
29246
+ ]);
29242
29247
  var KANBAN_STATUS_SET = new Set(KANBAN_STATUSES);
29243
29248
 
29244
29249
  // ../core/dist/kanban/waiting.js
@@ -48334,7 +48339,7 @@ var OWED_REPLY_SECTION_NOTE = "_Another agent left you a note on these cards and
48334
48339
  var OWED_REPLY_UNAVAILABLE_NOTE = "_Replies you owe could not be loaded just now, so any that are owed are NOT shown here. They are still owed: check kanban_list again shortly before concluding you owe nothing._";
48335
48340
  var OWED_REPLY_TRUNCATED_NOTE = "_More replies are owed than are shown here (the oldest are listed first). Answer these, and the rest appear on your next kanban_list._";
48336
48341
  var HUMAN_ASSIGNED_SECTION_HEADING = "Assigned to a person (not yours to action)";
48337
- var HUMAN_ASSIGNED_SECTION_NOTE = "_These belong to a person, not to you. You cannot move, note or complete them \u2014 every kanban write is refused, except one: a row marked `[reply owed to @x]` is answered with `kanban_respond` as usual. If the work is finished (or was never really theirs), use `kanban_recall` to pull the card back onto your board, then close it as normal._";
48342
+ var HUMAN_ASSIGNED_SECTION_NOTE = "_These belong to a person, not to you. You cannot move or complete them, and kanban writes are refused, except two: `kanban_log` adds a note they can read, which is how to correct something on the card, and a row marked `[reply owed to @x]` is answered with `kanban_respond` as usual. If the work is finished (or was never really theirs), use `kanban_recall` to pull the card back onto your board, then close it as normal._";
48338
48343
  function describeKanbanProject(item) {
48339
48344
  if (!item.project_id) return null;
48340
48345
  return item.project_name ? `${item.project_name} (${item.project_id})` : item.project_id;
@@ -48633,9 +48638,10 @@ function noticeCloseNotice(data) {
48633
48638
  return entries.map((e) => typeof e?.message === "string" ? e.message.trim() : "").filter((m) => m.length > 0).map((m) => ` ${m}`).join("");
48634
48639
  }
48635
48640
  function noteRollOffNotice(data) {
48636
- const rolled = data?.updated_items?.some((i) => i.notes_truncated) ?? false;
48641
+ const items = [...data?.updated_items ?? [], ...data?.human_card_notes_rolled_off ?? []];
48642
+ const rolled = items.some((i) => i.notes_truncated);
48637
48643
  if (!rolled) return "";
48638
- const dropped = data?.updated_items?.reduce(
48644
+ const dropped = items.reduce(
48639
48645
  (n, i) => n + (typeof i.notes_dropped_bytes === "number" ? i.notes_dropped_bytes : 0),
48640
48646
  0
48641
48647
  );
@@ -48647,7 +48653,16 @@ function describeKanbanWriteFailure(failure, label) {
48647
48653
  switch (failure.reason) {
48648
48654
  case "assigned_to_human": {
48649
48655
  const who = failure.assignee_name ? ` (${failure.assignee_name})` : "";
48650
- return `Can't touch "${label}" \u2014 that card is assigned to a person${who}, not to you, so every kanban write to it is refused. It still shows on your board for visibility. If the work is done (or should come back to you), call kanban_recall with this id first, then move or complete it as normal.`;
48656
+ return `Can't change "${label}" \u2014 that card is assigned to a person${who}, not to you, so the only write it takes is a note. To correct something on it, send just the note with kanban_log, and they will see it on the card. It still shows on your board for visibility. If the work is done (or should come back to you), call kanban_recall with this id first, then move or complete it as normal.`;
48657
+ }
48658
+ case "human_card_note_empty":
48659
+ return `Your note on "${label}" was not written: it was empty once cleaned up, so there was nothing to add. Nothing on the card changed. Send the note text again.`;
48660
+ case "human_card_note_not_written":
48661
+ return `Your note on "${label}" was not written. The card is a person's and does take notes, but it couldn't be read, it kept changing, or its older notes couldn't be saved first. Nothing on it changed. Try again.`;
48662
+ case "human_card_closed": {
48663
+ const listed = (failure.candidates ?? []).map((c) => ` - ${c.title} [${c.status}] (id: ${c.id})`).join("\n");
48664
+ return `Your note on "${label}" was not written: no open person's card with that title was found, and a closed card does not take a note by title. If you mean to note a closed card, send the note again with its id` + (listed ? `:
48665
+ ${listed}` : ".");
48651
48666
  }
48652
48667
  case "ambiguous_match": {
48653
48668
  const candidates = failure.candidates ?? [];
@@ -49439,7 +49454,9 @@ function formatKanbanLogResult(label, data, match = {}) {
49439
49454
  );
49440
49455
  return { text: explained ?? `Item "${label}" not found.`, isError: true };
49441
49456
  }
49442
- const trimmed = data.updated_items?.some((i) => i.notes_truncated) ?? false;
49457
+ const trimmed = [...data.updated_items ?? [], ...data.human_card_notes_rolled_off ?? []].some(
49458
+ (i) => i.notes_truncated
49459
+ );
49443
49460
  return {
49444
49461
  text: trimmed ? `Logged on "${label}". (Older inline notes rolled off the 4 KB column; full history preserved.)` : `Logged on "${label}".`,
49445
49462
  isError: false
@@ -49490,9 +49507,9 @@ function buildKanbanUpdateItem(id, fields) {
49490
49507
  if (fields.priority !== void 0) item.priority = fields.priority;
49491
49508
  return item;
49492
49509
  }
49493
- function resolveKanbanUpdateTarget(match, params) {
49510
+ function resolveKanbanUpdateTarget(match, params, noteOnly = false) {
49494
49511
  if (match) {
49495
- if (match.assigned) {
49512
+ if (match.assigned && !noteOnly) {
49496
49513
  return {
49497
49514
  kind: "human_assigned",
49498
49515
  id: match.id,
@@ -49507,6 +49524,20 @@ function resolveKanbanUpdateTarget(match, params) {
49507
49524
  }
49508
49525
  return { kind: "not_found", label: params.title ?? params.id ?? "" };
49509
49526
  }
49527
+ function findKanbanUpdateMatch(items, params) {
49528
+ if (params.id) {
49529
+ const byId = items.find((i) => i.id === params.id);
49530
+ return byId ? { kind: "match", item: byId } : { kind: "miss" };
49531
+ }
49532
+ if (params.title === void 0) return { kind: "miss" };
49533
+ const byTitle = items.filter((i) => i.title === params.title);
49534
+ if (byTitle.length === 0) return { kind: "miss" };
49535
+ const open = byTitle.filter((i) => !CLOSED_STATUSES.has(i.status ?? ""));
49536
+ if (open.length === 1) return { kind: "match", item: open[0] };
49537
+ if (open.length > 1) return { kind: "ambiguous", candidates: open };
49538
+ return { kind: "closed_only", candidates: byTitle };
49539
+ }
49540
+ var CLOSED_STATUSES = KANBAN_TERMINAL_STATES;
49510
49541
 
49511
49542
  // src/kanban-add.ts
49512
49543
  function buildKanbanAddItem(params) {
@@ -50311,9 +50342,34 @@ server.tool(
50311
50342
  const board = await apiPost("/host/my-kanban", {
50312
50343
  agent_id: AGT_AGENT_ID
50313
50344
  });
50314
- const match = board.items.find(
50315
- (i) => i.id === params.id || i.title === params.title
50316
- );
50345
+ const found = findKanbanUpdateMatch(board.items, { id: params.id, title: params.title });
50346
+ if (found.kind === "ambiguous") {
50347
+ const listed = found.candidates.map((c) => ` - ${c.title} [${c.status}] (id: ${c.id})`).join("\n");
50348
+ return {
50349
+ content: [
50350
+ {
50351
+ type: "text",
50352
+ text: `"${params.title}" matched ${found.candidates.length} cards. Retry with one of these ids:
50353
+ ${listed}`
50354
+ }
50355
+ ],
50356
+ isError: true
50357
+ };
50358
+ }
50359
+ if (found.kind === "closed_only") {
50360
+ const listed = found.candidates.map((c) => ` - ${c.title} [${c.status}] (id: ${c.id})`).join("\n");
50361
+ return {
50362
+ content: [
50363
+ {
50364
+ type: "text",
50365
+ text: `"${params.title}" matched only closed card(s) on your board, and a closed card is not updated by title. Nothing was written. The board lists only your most urgent open cards, so an open card with this title can still exist past that cut: find its id with kanban_search and retry with that id. Use one of these ids ONLY if you mean to write to the finished card itself:
50366
+ ${listed}`
50367
+ }
50368
+ ],
50369
+ isError: true
50370
+ };
50371
+ }
50372
+ const match = found.kind === "match" ? found.item : void 0;
50317
50373
  const target = resolveKanbanUpdateTarget(
50318
50374
  match ? {
50319
50375
  id: match.id,
@@ -50321,7 +50377,9 @@ server.tool(
50321
50377
  assigned: isHumanAssigned(match),
50322
50378
  assigneeName: match.assignee_name ?? null
50323
50379
  } : void 0,
50324
- { id: params.id, title: params.title }
50380
+ { id: params.id, title: params.title },
50381
+ // CS-1827: a note is the one write a person's card takes, so let it through.
50382
+ params.notes !== void 0 && params.result === void 0 && params.new_title === void 0 && params.new_description === void 0 && params.priority === void 0
50325
50383
  );
50326
50384
  if (target.kind === "not_found") {
50327
50385
  return {
@@ -50335,7 +50393,7 @@ server.tool(
50335
50393
  content: [
50336
50394
  {
50337
50395
  type: "text",
50338
- text: `Can't update "${target.title}" \u2014 that card is assigned to a person${who}, not to you. Call kanban_recall with id ${target.id} to bring it back onto your board first.`
50396
+ text: `Can't change "${target.title}" \u2014 that card is assigned to a person${who}, not to you, so the only write it takes is a note. To correct something on it, send just \`notes\` or use kanban_log. To change anything else, call kanban_recall with id ${target.id} to bring it back onto your board first.`
50339
50397
  }
50340
50398
  ],
50341
50399
  isError: true
@@ -50982,7 +51040,7 @@ server.tool(
50982
51040
  );
50983
51041
  server.tool(
50984
51042
  "kanban_recall",
50985
- 'Pull a card you assigned to a HUMAN teammate back onto your own board. Use this when a card shows under "Assigned to a person" in kanban_list and you need to act on it - typically because the person finished the work (or it is no longer needed) and the card has to be closed. While a card is assigned to a person, every kanban write to it is refused; recall makes it yours again so kanban_move / kanban_done / kanban_log work. Recall does NOT complete the card - after recalling, close it yourself with kanban_done and a result. You can only recall a card you assigned.',
51043
+ 'Pull a card you assigned to a HUMAN teammate back onto your own board. Use this when a card shows under "Assigned to a person" in kanban_list and you need to act on it - typically because the person finished the work (or it is no longer needed) and the card has to be closed. While a card is assigned to a person, the only kanban write it takes is a note (kanban_log), so use that, not recall, to correct something on it. Recall makes it yours again so kanban_move / kanban_done work. Recall does NOT complete the card - after recalling, close it yourself with kanban_done and a result. You can only recall a card you assigned.',
50986
51044
  {
50987
51045
  id: external_exports.string().describe('The card id, exactly as kanban_list shows it under "Assigned to a person".'),
50988
51046
  reason: external_exports.string().optional().describe(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1211",
3
+ "version": "0.28.1212",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {