@integrity-labs/agt-cli 0.28.184 → 0.28.186

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.
@@ -21154,6 +21154,10 @@ var SupportClient = class _SupportClient {
21154
21154
  fileFeatureRequest(args) {
21155
21155
  return this.post("/host/support/file_feature_request", args, true);
21156
21156
  }
21157
+ /** Report a KB gap (redacted + deduped + classified server-side). */
21158
+ requestKbArticle(args) {
21159
+ return this.post("/host/support/request_kb_article", args, true);
21160
+ }
21157
21161
  /** Propose creating an agent in the caller's OWN org (HITL-gated server-side). */
21158
21162
  createAgent(args) {
21159
21163
  return this.post("/host/support/create_agent", args, true);
@@ -21176,6 +21180,23 @@ var searchKbSchema = external_exports.object({
21176
21180
  var readKbSchema = external_exports.object({
21177
21181
  slug: external_exports.string().trim().min(1).describe("The kebab-case article slug returned by search_knowledge_base.")
21178
21182
  });
21183
+ var requestKbArticleSchema = external_exports.object({
21184
+ question: external_exports.string().trim().min(1).describe("The user question the knowledge base could not answer. Plain text; do NOT paste the conversation."),
21185
+ reason_codes: external_exports.array(
21186
+ external_exports.enum([
21187
+ "no_results",
21188
+ "low_relevance",
21189
+ "partial_answer",
21190
+ "outdated",
21191
+ "ambiguous_question",
21192
+ "out_of_scope"
21193
+ ])
21194
+ ).optional().describe("Why the KB fell short (one or more): no_results, low_relevance, partial_answer, outdated, ambiguous_question, out_of_scope."),
21195
+ tsquery: external_exports.string().trim().optional().describe("The search terms you actually queried (so curation can see what was tried)."),
21196
+ rejected_slugs: external_exports.array(
21197
+ external_exports.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "must be a kebab-case article slug")
21198
+ ).optional().describe("Slugs (kebab-case) of articles you looked at but that did not answer the question.")
21199
+ });
21179
21200
  var createAgentSchema = external_exports.object({
21180
21201
  code_name: external_exports.string().regex(
21181
21202
  /^[a-z0-9]+(?:-[a-z0-9]+)*$/,
@@ -21382,6 +21403,18 @@ server.tool(
21382
21403
  }
21383
21404
  }
21384
21405
  );
21406
+ server.tool(
21407
+ "request_kb_article",
21408
+ 'Report a knowledge-base GAP after search_knowledge_base did not answer the user. Call this at most once per distinct question, AFTER searching \u2014 the server may tell you the question is already covered (status:"answerable" with a slug to read instead), needs clarifying (status:"needs_clarification" with a question to ask the user), was filed (status:"filed"), matched a known gap (status:"duplicate"), or that your org hit its daily gap limit (status:"rate_limited" with retry_after_seconds \u2014 stop filing and tell the user to try later). Provide structured context, NOT a transcript: { question, reason_codes?, tsquery? (the terms you searched), rejected_slugs? (articles that did not fit) }. Carries no scope \u2014 your org is server-derived and never stored in clear. Returns { ok, status, message }.',
21409
+ requestKbArticleSchema.shape,
21410
+ async (args) => {
21411
+ try {
21412
+ return ok(await client.requestKbArticle(args));
21413
+ } catch (err) {
21414
+ return fail(err);
21415
+ }
21416
+ }
21417
+ );
21385
21418
  server.tool(
21386
21419
  "support_create_agent",
21387
21420
  'PROPOSE creating a new agent in YOUR organization. This does NOT create the agent directly - it files a request that a human owner approves via a server-rendered diff in Slack; the agent is created (as a draft) only after approval. Use it to set up a new agent a user asked for. Returns a structured envelope: `status:"proposed"` (with request_id + expires_at - tell the user it was sent for approval and when it expires), `status:"feature_disabled"` (self-remediation writes are off for this org - tell the user to ask their operator to enable them), `status:"no_approver"` (no approval channel is configured - relay the setup hint), or `status:"rate_limited"` (too many pending - relay retry_after_seconds). Org/team are set server-side from your host - you cannot create an agent in another org. Pass { code_name (kebab-case), display_name, description?, role?, host_id?, reason? }.',
package/dist/mcp/index.js CHANGED
@@ -22389,6 +22389,71 @@ server.tool(
22389
22389
  return { content: [{ type: "text", text }], ...isError ? { isError: true } : {} };
22390
22390
  }
22391
22391
  );
22392
+ server.tool(
22393
+ "request_buttons",
22394
+ 'Ask a user to pick ONE option by tapping a button, then END YOUR TURN. Posts a small button card (2-4 choices) into a Slack channel; the platform delivers the tapped choice back to you later as a direct-chat message (payload.kind = "button_click", payload.value / payload.label), carrying source_channel so you reply in the original conversation. Use this for a quick one-of-N decision ("merge it?", "which environment?", "approve copy A/B/C?") when your turn can end rather than block. Buttons only COLLECT a choice; they grant no permission, and any privileged action you take in response runs under your own authority. Slack channels only for now.',
22395
+ {
22396
+ channel_id: external_exports.string().min(1).describe("Slack channel id (C.../G..., NOT a name) to post the buttons into. Resolve names via slack.list_channels first."),
22397
+ thread_ts: external_exports.string().optional().describe("Optional Slack thread_ts to post inside a thread; omit to post top-level in the channel."),
22398
+ prompt_text: external_exports.string().min(1).max(3e3).describe("The question / context shown above the buttons."),
22399
+ options: external_exports.array(
22400
+ external_exports.object({
22401
+ label: external_exports.string().min(1).max(75).describe("Button text the user sees."),
22402
+ value: external_exports.string().min(1).max(2e3).describe("Machine value returned to you on tap (payload.value).")
22403
+ })
22404
+ ).min(2).max(4).describe("2-4 button options. Labels and values must each be unique."),
22405
+ request_id: external_exports.string().max(200).optional().describe("Optional correlation id you choose; it comes back on the button_click so you can match the tap. If omitted, the platform assigns one and returns it.")
22406
+ },
22407
+ async (params) => {
22408
+ if (!AGT_AGENT_CODE_NAME) {
22409
+ return {
22410
+ content: [{ type: "text", text: "Error: AGT_AGENT_CODE_NAME not configured." }],
22411
+ isError: true
22412
+ };
22413
+ }
22414
+ let resp;
22415
+ try {
22416
+ resp = await apiPost("/host/request-buttons", {
22417
+ agent_code_name: AGT_AGENT_CODE_NAME,
22418
+ channel_id: params.channel_id,
22419
+ ...params.thread_ts ? { thread_ts: params.thread_ts } : {},
22420
+ prompt_text: params.prompt_text,
22421
+ options: params.options,
22422
+ ...params.request_id ? { request_id: params.request_id } : {}
22423
+ });
22424
+ } catch (err) {
22425
+ const msg = err instanceof Error ? err.message : String(err);
22426
+ if (/returned\s+[45]\d\d/.test(msg)) {
22427
+ let detail = msg;
22428
+ const jsonStart = msg.indexOf("{");
22429
+ if (jsonStart !== -1) {
22430
+ try {
22431
+ const parsedErr = JSON.parse(msg.slice(jsonStart));
22432
+ if (parsedErr.error) detail = parsedErr.error;
22433
+ } catch {
22434
+ }
22435
+ }
22436
+ return {
22437
+ content: [{ type: "text", text: `Buttons request rejected: ${detail}` }],
22438
+ isError: true
22439
+ };
22440
+ }
22441
+ return {
22442
+ content: [{ type: "text", text: `Could not reach the buttons service (${msg}). Tell your operator.` }],
22443
+ isError: true
22444
+ };
22445
+ }
22446
+ const rid = resp.request_id ?? resp.interaction_id ?? "(unknown)";
22447
+ 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
+ ]
22454
+ };
22455
+ }
22456
+ );
22392
22457
  server.tool(
22393
22458
  "drift_report",
22394
22459
  "Report configuration drift detected in local agent files (CHARTER.md, TOOLS.md, etc.). Compares local file hashes against API-side versions and reports any differences.",
@@ -23311,7 +23376,10 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
23311
23376
  "request_channel_access",
23312
23377
  // ENG-7041 (ADR-0034): author + post a structured Slack form, await the typed
23313
23378
  // answer via direct-chat. Always registered; no API tool shares this name.
23314
- "request_form"
23379
+ "request_form",
23380
+ // ENG-7144 (ADR-0036): post a button card, end the turn, await the tap via
23381
+ // direct-chat (button_click). Always registered; no API tool shares this name.
23382
+ "request_buttons"
23315
23383
  ]);
23316
23384
  async function registerForwardedApiTools() {
23317
23385
  const apiTools = await discoverApiTools();
@@ -34,8 +34,8 @@ import {
34
34
  writeDirectChatSessionState,
35
35
  writeEgressAllowlist,
36
36
  writePersistentClaudeWrapper
37
- } from "./chunk-RLDZLSML.js";
38
- import "./chunk-K2N44EUC.js";
37
+ } from "./chunk-ORO4YLTN.js";
38
+ import "./chunk-ERHHYBVS.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-KBZFQ7SX.js.map
77
+ //# sourceMappingURL=persistent-session-SNLNY2VB.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-RLDZLSML.js";
4
- import "./chunk-K2N44EUC.js";
3
+ } from "./chunk-ORO4YLTN.js";
4
+ import "./chunk-ERHHYBVS.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-O4F7H7IB.js.map
307
+ //# sourceMappingURL=responsiveness-probe-6HC3PENG.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.184",
3
+ "version": "0.28.186",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {