@integrity-labs/agt-cli 0.28.317 → 0.28.319

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
@@ -21824,7 +21824,7 @@ server.tool(
21824
21824
  }
21825
21825
  );
21826
21826
  var kanbanMoveStatuses = AGT_KANBAN_WAITING_ENABLED ? ["backlog", "todo", "in_progress", "waiting", "done", "failed"] : ["backlog", "todo", "in_progress", "done", "failed"];
21827
- var kanbanMoveDescription = AGT_KANBAN_WAITING_ENABLED ? 'Move a kanban item to a different status column. Use status="failed" for a task attempted but not completable. Use status="waiting" when you have COMPLETED your part and cannot proceed until one specific external action happens (a person approves/answers/decides, or a dependency like a PR merge or deploy completes). status="waiting" REQUIRES waiting_kind - classify the wait as "pr-review", "pr-merged", "human", "external", or "other" (the catch-all when none fit). For a PR wait ("pr-review"/"pr-merged") set waiting_repo ("owner/repo") and waiting_pr (the number) INSTEAD of waiting_on - the card then links straight to the PR and can auto-resume when it lands. For "human"/"external"/"other" set waiting_on to a one-line ask ("Answer my 5 scoping questions") AND put the full context the person needs to decide - the actual questions, options, links - in waiting_details, so they can answer from the card without opening a ticket. Do NOT use waiting to offload hard work, and do NOT confuse it with a failure. (matches the hosted kanban_move enum).' : 'Move a kanban item to a different status column. Use status="failed" to mark a task that was attempted but could not complete (matches the hosted kanban_move enum).';
21827
+ var kanbanMoveDescription = AGT_KANBAN_WAITING_ENABLED ? `Move a kanban item to a different status column. Use status="failed" for a task attempted but not completable. Use status="waiting" when you have COMPLETED your part and cannot proceed until one specific external action happens (a person approves/answers/decides, or a dependency like a PR merge or deploy completes). status="waiting" REQUIRES waiting_kind - classify the wait as "pr-review", "pr-merged", "human", "external", or "other" (the catch-all when none fit). For a PR wait ("pr-review"/"pr-merged") set waiting_repo ("owner/repo") and waiting_pr (the number) INSTEAD of waiting_on - the card then links straight to the PR and can auto-resume when it lands. For "human"/"external"/"other" set waiting_on to a one-line ask ("Answer my 5 scoping questions") AND put the full context the person needs to decide - the actual questions, options, links - in waiting_details, so they can answer from the card without opening a ticket. For "human" ALSO set waiting_on_person to that person's Slack user id, so the card lands in their "Awaiting you" queue and they are notified instead of your ask sitting unseen. Do NOT use waiting to offload hard work, and do NOT confuse it with a failure. (matches the hosted kanban_move enum).` : 'Move a kanban item to a different status column. Use status="failed" to mark a task that was attempted but could not complete (matches the hosted kanban_move enum).';
21828
21828
  var kanbanMoveStatusDescribe = AGT_KANBAN_WAITING_ENABLED ? 'Target status. "waiting" parks the card until one external action happens; it REQUIRES waiting_kind - use "pr-review"/"pr-merged" with waiting_repo + waiting_pr, or "human"/"external"/"other" with a concrete waiting_on. "failed" closes the row as a failed attempt; there is no "cancelled" status, close no-longer-needed work via kanban_done with an explanatory result.' : 'Target status. "failed" closes the row as a failed attempt; there is no "cancelled" status, close no-longer-needed work via kanban_done with an explanatory result.';
21829
21829
  server.tool(
21830
21830
  "kanban_move",
@@ -21850,6 +21850,9 @@ server.tool(
21850
21850
  waiting_pr: external_exports.number().int().positive().optional().describe("Only with a pr-* waiting_kind: the pull request number (e.g. 3120)."),
21851
21851
  waiting_choices: external_exports.array(external_exports.string()).optional().describe(
21852
21852
  'Optional, best with waiting_kind="human": 2-5 short answer options to offer the person as one-click buttons (e.g. ["Ship it", "Hold", "Needs changes"]). Keep them short. They can still add a free-text comment alongside a choice. Omit for an open-ended human wait (they just get a comment box).'
21853
+ ),
21854
+ waiting_on_person: external_exports.string().optional().describe(
21855
+ `Only with waiting_kind="human": the Slack user id of the ONE person whose decision you are parked on (e.g. "U0123ABCD" - the same id you would pass to deliver_to). This puts the card in that person's "Awaiting you" queue and notifies them, so your ask does not sit unseen. It does NOT reassign the card - you still own driving it to done and you resume as soon as they answer. Set it whenever you know who has to act; omit only if genuinely nobody specific does.`
21853
21856
  )
21854
21857
  } : {}
21855
21858
  },
@@ -21884,6 +21887,17 @@ server.tool(
21884
21887
  isError: true
21885
21888
  };
21886
21889
  }
21890
+ if (p.waiting_on_person && p.waiting_kind !== "human") {
21891
+ return {
21892
+ content: [
21893
+ {
21894
+ type: "text",
21895
+ text: `Error: waiting_on_person is only valid with waiting_kind="human" (got "${p.waiting_kind ?? "unset"}"). Use waiting_kind="human" when one specific person must decide; for a PR use "pr-review"/"pr-merged" with waiting_repo + waiting_pr, and for a non-human blocker use "external"/"other" with waiting_on.`
21896
+ }
21897
+ ],
21898
+ isError: true
21899
+ };
21900
+ }
21887
21901
  let waitingContext;
21888
21902
  if (isPrKind) {
21889
21903
  waitingContext = { repo: p.waiting_repo, pr_number: p.waiting_pr };
@@ -21903,7 +21917,8 @@ server.tool(
21903
21917
  notes: params.notes,
21904
21918
  waiting_on: isPrKind ? void 0 : p.waiting_on,
21905
21919
  waiting_kind: p.waiting_kind,
21906
- waiting_context: waitingContext
21920
+ waiting_context: waitingContext,
21921
+ waiting_on_person: p.waiting_on_person
21907
21922
  }
21908
21923
  ]
21909
21924
  });
@@ -38801,7 +38801,12 @@ var INTEGRATION_REGISTRY = [
38801
38801
  },
38802
38802
  // ENG-5857 mints the real session id; default empty so the header
38803
38803
  // resolves cleanly (no profile bound → ephemeral session) until then.
38804
- envDefaults: { ANCHOR_BROWSER_SESSION_ID: "" }
38804
+ envDefaults: { ANCHOR_BROWSER_SESSION_ID: "" },
38805
+ // ENG-7748: route through the stdio remote-MCP proxy so the api-key and
38806
+ // the minted anchor-session-id headers are read LIVE per request. A
38807
+ // re-minted session id then takes effect with no agent respawn (a direct-
38808
+ // HTTP header would be frozen at spawn).
38809
+ liveHeaderRefresh: true
38805
38810
  }
38806
38811
  },
38807
38812
  {
@@ -12,6 +12,8 @@ var TOKEN_FILE_ENV = "AGT_REMOTE_MCP_TOKEN_FILE";
12
12
  var TOKEN_VAR_ENV = "AGT_REMOTE_MCP_TOKEN_VAR";
13
13
  var ALLOWLIST_ENV = "AGT_REMOTE_MCP_TOOL_ALLOWLIST";
14
14
  var PREENABLE_ENV = "AGT_REMOTE_MCP_PREENABLE_TOOLSETS";
15
+ var AUTH_HEADER_ENV = "AGT_REMOTE_MCP_AUTH_HEADER";
16
+ var EXTRA_HEADERS_ENV = "AGT_REMOTE_MCP_EXTRA_HEADERS";
15
17
  var REMOTE_FETCH_TIMEOUT_MS = 3e4;
16
18
  var remoteUrl = process.env[URL_ENV] ?? "";
17
19
  var tokenFile = process.env[TOKEN_FILE_ENV] ?? "";
@@ -19,6 +21,8 @@ var tokenVar = process.env[TOKEN_VAR_ENV] ?? "";
19
21
  var label = process.env["AGT_REMOTE_MCP_LABEL"] || tokenVar || "remote-oauth";
20
22
  var toolAllowlist = parseToolAllowlist(process.env[ALLOWLIST_ENV] ?? "");
21
23
  var preEnableToolsets = parsePreEnableToolsets(process.env[PREENABLE_ENV] ?? "");
24
+ var authHeaderName = (process.env[AUTH_HEADER_ENV] ?? "").trim();
25
+ var extraHeaderSpecs = parseExtraHeaders(process.env[EXTRA_HEADERS_ENV] ?? "");
22
26
  function logErr(msg) {
23
27
  process.stderr.write(`[remote-oauth-proxy:${label}] ${msg}
24
28
  `);
@@ -91,6 +95,19 @@ function parseToolAllowlist(raw) {
91
95
  }
92
96
  return out;
93
97
  }
98
+ function parseExtraHeaders(raw) {
99
+ const out = [];
100
+ for (const part of (raw || "").split(",")) {
101
+ const trimmed = part.trim();
102
+ if (!trimmed) continue;
103
+ const colon = trimmed.indexOf(":");
104
+ if (colon <= 0) continue;
105
+ const header = trimmed.slice(0, colon).trim();
106
+ const varName = trimmed.slice(colon + 1).trim();
107
+ if (header && varName) out.push({ header, varName });
108
+ }
109
+ return out;
110
+ }
94
111
  function filterToolsListMessage(message, allow) {
95
112
  if (allow.size === 0) return { message, total: 0, kept: 0, advertised: [] };
96
113
  let obj;
@@ -166,14 +183,25 @@ function extractJsonRpcMessages(contentType, body) {
166
183
  }
167
184
  return out;
168
185
  }
186
+ function buildForwardHeaders(token, authHeader, extras, readVar) {
187
+ const headers = {
188
+ "Content-Type": "application/json",
189
+ Accept: "application/json, text/event-stream"
190
+ };
191
+ if (authHeader) headers[authHeader] = token;
192
+ else headers["Authorization"] = `Bearer ${token}`;
193
+ for (const { header, varName } of extras) {
194
+ headers[header] = readVar(varName) ?? "";
195
+ }
196
+ return headers;
197
+ }
198
+ function readTokenVar(varName) {
199
+ return readCurrentToken(tokenFile, varName);
200
+ }
169
201
  async function postRpc(token, body) {
170
202
  const res = await fetch(remoteUrl, {
171
203
  method: "POST",
172
- headers: {
173
- "Content-Type": "application/json",
174
- Accept: "application/json, text/event-stream",
175
- Authorization: `Bearer ${token}`
176
- },
204
+ headers: buildForwardHeaders(token, authHeaderName, extraHeaderSpecs, readTokenVar),
177
205
  body,
178
206
  signal: AbortSignal.timeout(REMOTE_FETCH_TIMEOUT_MS)
179
207
  });
@@ -250,11 +278,7 @@ async function forward(line, id, isNotification, method, params) {
250
278
  try {
251
279
  res = await fetch(remoteUrl, {
252
280
  method: "POST",
253
- headers: {
254
- "Content-Type": "application/json",
255
- Accept: "application/json, text/event-stream",
256
- Authorization: `Bearer ${token}`
257
- },
281
+ headers: buildForwardHeaders(token, authHeaderName, extraHeaderSpecs, readTokenVar),
258
282
  body: line,
259
283
  signal: AbortSignal.timeout(REMOTE_FETCH_TIMEOUT_MS)
260
284
  });
@@ -361,6 +385,7 @@ if (invokedDirectly) {
361
385
  }
362
386
  export {
363
387
  buildEnableToolsetRequest,
388
+ buildForwardHeaders,
364
389
  buildToolsListRequest,
365
390
  extractJsonRpcMessages,
366
391
  extractToolsArray,
@@ -368,6 +393,7 @@ export {
368
393
  isToolCallBlocked,
369
394
  main,
370
395
  parseEnableToolsetResponse,
396
+ parseExtraHeaders,
371
397
  parsePreEnableToolsets,
372
398
  parseToolAllowlist,
373
399
  readCurrentToken,
@@ -36,7 +36,7 @@ import {
36
36
  writeDirectChatSessionState,
37
37
  writeEgressAllowlist,
38
38
  writePersistentClaudeWrapper
39
- } from "./chunk-ORTMG5E3.js";
39
+ } from "./chunk-ISHK77EM.js";
40
40
  import "./chunk-XWVM4KPK.js";
41
41
  export {
42
42
  EGRESS_BASELINE_DOMAINS,
@@ -77,4 +77,4 @@ export {
77
77
  writeEgressAllowlist,
78
78
  writePersistentClaudeWrapper
79
79
  };
80
- //# sourceMappingURL=persistent-session-UZNQVUYB.js.map
80
+ //# sourceMappingURL=persistent-session-U5IQYEXX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-ORTMG5E3.js";
3
+ } from "./chunk-ISHK77EM.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -427,4 +427,4 @@ export {
427
427
  readAndResetSlackReplyBindingClassifications,
428
428
  readAndResetSlackReplyTargetClassifications
429
429
  };
430
- //# sourceMappingURL=responsiveness-probe-5XF7ZCYF.js.map
430
+ //# sourceMappingURL=responsiveness-probe-YIESMTKL.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.317",
3
+ "version": "0.28.319",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {