@integrity-labs/agt-cli 0.28.197 → 0.28.199

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/mcp/index.js CHANGED
@@ -21216,6 +21216,37 @@ function describeFormRequestResult(resp) {
21216
21216
  };
21217
21217
  }
21218
21218
 
21219
+ // src/buttons-request.ts
21220
+ function findDuplicateButtonOption(options) {
21221
+ const seenLabels = /* @__PURE__ */ new Set();
21222
+ const seenValues = /* @__PURE__ */ new Set();
21223
+ for (const opt of options) {
21224
+ if (seenLabels.has(opt.label)) {
21225
+ return `Duplicate button label "${opt.label}". Each button label must be unique so the tapped choice is unambiguous.`;
21226
+ }
21227
+ if (seenValues.has(opt.value)) {
21228
+ return `Duplicate button value "${opt.value}". Each button value must be unique so the tapped choice is unambiguous.`;
21229
+ }
21230
+ seenLabels.add(opt.label);
21231
+ seenValues.add(opt.value);
21232
+ }
21233
+ return null;
21234
+ }
21235
+ function describeButtonsRequestResult(resp, channelId, optionCount) {
21236
+ if (!resp.ok) {
21237
+ const detail = resp.error ? `: ${resp.error}` : resp.status ? ` (status ${resp.status})` : "";
21238
+ return {
21239
+ text: `Could not post the buttons${detail}. Fix the issue (often the channel id) and try again, or tell your operator.`,
21240
+ isError: true
21241
+ };
21242
+ }
21243
+ const rid = resp.request_id ?? resp.interaction_id ?? "(unknown)";
21244
+ return {
21245
+ text: `Posted ${optionCount} buttons to ${channelId} (request \`${rid}\`). END YOUR TURN now - the user's tap arrives later as a direct-chat message (payload.kind = "button_click", payload.value / payload.label) carrying source_channel so you reply in the original conversation. Do not wait or poll.`,
21246
+ isError: false
21247
+ };
21248
+ }
21249
+
21219
21250
  // src/approval-tools.ts
21220
21251
  function statusToOutcome(status) {
21221
21252
  switch (status) {
@@ -22411,6 +22442,13 @@ server.tool(
22411
22442
  isError: true
22412
22443
  };
22413
22444
  }
22445
+ const dupError = findDuplicateButtonOption(params.options);
22446
+ if (dupError) {
22447
+ return {
22448
+ content: [{ type: "text", text: `Buttons request rejected: ${dupError}` }],
22449
+ isError: true
22450
+ };
22451
+ }
22414
22452
  let resp;
22415
22453
  try {
22416
22454
  resp = await apiPost("/host/request-buttons", {
@@ -22443,14 +22481,14 @@ server.tool(
22443
22481
  isError: true
22444
22482
  };
22445
22483
  }
22446
- const rid = resp.request_id ?? resp.interaction_id ?? "(unknown)";
22484
+ const { text, isError } = describeButtonsRequestResult(
22485
+ resp,
22486
+ params.channel_id,
22487
+ params.options.length
22488
+ );
22447
22489
  return {
22448
- content: [
22449
- {
22450
- type: "text",
22451
- text: `Posted ${params.options.length} buttons to ${params.channel_id} (request \`${rid}\`). END YOUR TURN now \u2014 the user's tap arrives later as a direct-chat message (payload.kind = "button_click", payload.value / payload.label) carrying source_channel so you reply in the original conversation. Do not wait or poll.`
22452
- }
22453
- ]
22490
+ content: [{ type: "text", text }],
22491
+ ...isError ? { isError: true } : {}
22454
22492
  };
22455
22493
  }
22456
22494
  );
@@ -22981,18 +23019,18 @@ server.tool(
22981
23019
  }
22982
23020
  );
22983
23021
  server.tool(
22984
- "plugin_list",
22985
- `List the plugins currently installed on this agent, with their current typed context values and a preview of any freeform overrides. Use this when the user asks "what plugins do I have?", "show me the plugins", "what is the Coding plugin configured with?", or before calling plugin_improve to see what fields exist and what they're set to.`,
23022
+ "integration_list",
23023
+ `List the integrations currently installed on this agent, with their current typed context values and a preview of any freeform overrides. Use this when the user asks "what integrations do I have?", "show me the integrations", "what is the Coding integration configured with?", or before calling integration_improve to see what fields exist and what they're set to.`,
22986
23024
  {},
22987
23025
  async () => {
22988
23026
  const data = await apiPost("/host/list-plugins", {
22989
23027
  agent_id: AGT_AGENT_ID
22990
23028
  });
22991
23029
  if (!data.plugins.length) {
22992
- return { content: [{ type: "text", text: "No plugins installed on this agent." }] };
23030
+ return { content: [{ type: "text", text: "No integrations installed on this agent." }] };
22993
23031
  }
22994
23032
  const lines = [];
22995
- lines.push(`## Installed Plugins (${data.plugins.length})
23033
+ lines.push(`## Installed Integrations (${data.plugins.length})
22996
23034
  `);
22997
23035
  for (const p of data.plugins) {
22998
23036
  lines.push(`### ${p.plugin_name} \`${p.integration_slug ?? p.plugin_slug}\` (v${p.version})`);
@@ -23014,16 +23052,16 @@ server.tool(
23014
23052
  }
23015
23053
  lines.push("");
23016
23054
  }
23017
- lines.push("To update any plugin's behavior, use the `plugin_improve` tool with the user's feedback.");
23055
+ lines.push("To update any integration's behavior, use the `integration_improve` tool with the user's feedback.");
23018
23056
  return { content: [{ type: "text", text: lines.join("\n") }] };
23019
23057
  }
23020
23058
  );
23021
23059
  server.tool(
23022
- "plugin_improve",
23060
+ "integration_improve",
23023
23061
  // Description leads with the user phrasings the agent should match against,
23024
23062
  // then explains the safety rule. Order matters — Claude\'s tool selection
23025
23063
  // weights the first line of a description heavily.
23026
- `Update, edit, or add a rule to an installed plugin (e.g. the Coding plugin, the Knowledge Base plugin, the Slack plugin). USE THIS TOOL when the user says any of: "update the X plugin", "add a rule to plugin Y", "tell the X plugin not to do Z", "change the X plugin so it does Y", "the Coding plugin should always/never...", "remember this for the X plugin". This is the ONLY correct way to modify a plugin's behavior. NEVER edit SKILL.md files under .claude/skills/plugin-* directly \u2014 those files are derived from the platform database and your edits will be silently overwritten on the next manager refresh. The platform calls an LLM to translate the user's request into a structured update of the plugin's typed context fields and/or freeform overrides text, then returns a diff for you to show the user. Default flow is preview-then-apply: call once to get the proposed diff, show it to the user, then call again with auto_apply=true if they confirm. Only works for plugins that are actually installed on this agent.`,
23064
+ `Update, edit, or add a rule to an installed integration (e.g. the Coding integration, the Knowledge Base integration, the Slack integration). USE THIS TOOL when the user says any of: "update the X integration", "add a rule to integration Y", "tell the X integration not to do Z", "change the X integration so it does Y", "the Coding integration should always/never...", "remember this for the X integration". This is the ONLY correct way to modify an integration's behavior. NEVER edit SKILL.md files under .claude/skills/integration-* directly \u2014 those files are derived from the platform database and your edits will be silently overwritten on the next manager refresh. The platform calls an LLM to translate the user's request into a structured update of the integration's typed context fields and/or freeform overrides text, then returns a diff for you to show the user. Default flow is preview-then-apply: call once to get the proposed diff, show it to the user, then call again with auto_apply=true if they confirm. Only works for integrations that are actually installed on this agent.`,
23027
23065
  {
23028
23066
  integration_slug: external_exports.string().optional().describe('Integration slug to improve (e.g. "claude-code-github"). Either this or integration_id is required.'),
23029
23067
  integration_id: external_exports.string().optional().describe("Integration UUID. Either this or integration_slug is required."),
@@ -23033,7 +23071,7 @@ server.tool(
23033
23071
  // canonical names.
23034
23072
  plugin_slug: external_exports.string().optional().describe("@deprecated Use integration_slug. Legacy plugin-slug alias."),
23035
23073
  plugin_id: external_exports.string().optional().describe("@deprecated Use integration_id. Legacy plugin-UUID alias."),
23036
- feedback: external_exports.string().min(1).describe("The user's feedback in natural language. What should the plugin do differently?"),
23074
+ feedback: external_exports.string().min(1).describe("The user's feedback in natural language. What should the integration do differently?"),
23037
23075
  transcript_snippet: external_exports.string().optional().describe("Optional short transcript snippet showing the behavior the user flagged. Helps the LLM understand context. Max 2000 chars."),
23038
23076
  auto_apply: external_exports.boolean().optional().describe("If true, apply the proposed update immediately without preview. Default false (preview-then-apply). Only set to true after the user has confirmed the proposed diff.")
23039
23077
  },
@@ -23054,7 +23092,7 @@ server.tool(
23054
23092
  auto_apply: params.auto_apply ?? false
23055
23093
  });
23056
23094
  const lines = [];
23057
- lines.push(data.applied ? "\u2705 Applied plugin context update" : "\u{1F4CB} Proposed plugin context update (preview)");
23095
+ lines.push(data.applied ? "\u2705 Applied integration context update" : "\u{1F4CB} Proposed integration context update (preview)");
23058
23096
  lines.push("");
23059
23097
  lines.push(`Rationale: ${data.proposed.rationale}`);
23060
23098
  if (data.proposed.changed_fields.length > 0) {
@@ -23083,10 +23121,10 @@ server.tool(
23083
23121
  if (!data.applied) {
23084
23122
  lines.push("");
23085
23123
  lines.push("---");
23086
- lines.push("Show this diff to the user. If they confirm, call `plugin_improve` again with `auto_apply: true` and the same arguments to apply.");
23124
+ lines.push("Show this diff to the user. If they confirm, call `integration_improve` again with `auto_apply: true` and the same arguments to apply.");
23087
23125
  } else {
23088
23126
  lines.push("");
23089
- lines.push("Update applied. The manager will re-render the plugin's SKILL.md files on the next refresh cycle.");
23127
+ lines.push("Update applied. The manager will re-render the integration's SKILL.md files on the next refresh cycle.");
23090
23128
  }
23091
23129
  return { content: [{ type: "text", text: lines.join("\n") }] };
23092
23130
  }
@@ -23345,8 +23383,8 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
23345
23383
  "knowledge_add",
23346
23384
  "knowledge_update",
23347
23385
  "knowledge_delete",
23348
- "plugin_list",
23349
- "plugin_improve",
23386
+ "integration_list",
23387
+ "integration_improve",
23350
23388
  "dashboards_list",
23351
23389
  "dashboards_show",
23352
23390
  "dashboards_upsert",
@@ -34,8 +34,8 @@ import {
34
34
  writeDirectChatSessionState,
35
35
  writeEgressAllowlist,
36
36
  writePersistentClaudeWrapper
37
- } from "./chunk-PCYEFPBE.js";
38
- import "./chunk-CE6U2IAF.js";
37
+ } from "./chunk-4CBRFYUJ.js";
38
+ import "./chunk-KOZN2FW2.js";
39
39
  import "./chunk-XWVM4KPK.js";
40
40
  export {
41
41
  EGRESS_BASELINE_DOMAINS,
@@ -74,4 +74,4 @@ export {
74
74
  writeEgressAllowlist,
75
75
  writePersistentClaudeWrapper
76
76
  };
77
- //# sourceMappingURL=persistent-session-PG3OFGDB.js.map
77
+ //# sourceMappingURL=persistent-session-QKYQDE5W.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-PCYEFPBE.js";
4
- import "./chunk-CE6U2IAF.js";
3
+ } from "./chunk-4CBRFYUJ.js";
4
+ import "./chunk-KOZN2FW2.js";
5
5
  import "./chunk-XWVM4KPK.js";
6
6
 
7
7
  // src/lib/responsiveness-probe.ts
@@ -304,4 +304,4 @@ export {
304
304
  readAndResetChannelDeflections,
305
305
  readAndResetChannelLaneClassifications
306
306
  };
307
- //# sourceMappingURL=responsiveness-probe-MMHGI5FC.js.map
307
+ //# sourceMappingURL=responsiveness-probe-YE2F22RF.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.197",
3
+ "version": "0.28.199",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {