@integrity-labs/agt-cli 0.28.264 → 0.28.266

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.
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
100
100
  return { ok: true };
101
101
  } catch {
102
102
  }
103
- const { resolveClaudeBinary } = await import("./persistent-session-OP4TXILO.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-FGGXFAJH.js");
104
104
  const claudeBin = resolveClaudeBinary();
105
105
  const pairEnv = {
106
106
  ...process.env,
@@ -373,4 +373,4 @@ export {
373
373
  startClaudePair,
374
374
  submitClaudePairCode
375
375
  };
376
- //# sourceMappingURL=claude-pair-runtime-X5NJYZSK.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-CXIVEO6R.js.map
@@ -37,7 +37,7 @@ import {
37
37
  requireHost,
38
38
  safeWriteJsonAtomic,
39
39
  setConfigHash
40
- } from "../chunk-MQ5S642N.js";
40
+ } from "../chunk-Z5YUBTSG.js";
41
41
  import {
42
42
  getProjectDir as getProjectDir2,
43
43
  getReadyTasks,
@@ -122,7 +122,7 @@ import {
122
122
  takeZombieDetection,
123
123
  transcriptActivityAgeSeconds,
124
124
  writeEgressAllowlist
125
- } from "../chunk-E45AAMBQ.js";
125
+ } from "../chunk-GBVZDTCB.js";
126
126
  import {
127
127
  reapOrphanChannelMcps
128
128
  } from "../chunk-XWVM4KPK.js";
@@ -6699,7 +6699,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6699
6699
  var lastVersionCheckAt = 0;
6700
6700
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6701
6701
  var lastResponsivenessProbeAt = 0;
6702
- var agtCliVersion = true ? "0.28.264" : "dev";
6702
+ var agtCliVersion = true ? "0.28.266" : "dev";
6703
6703
  function resolveBrewPath(execFileSync2) {
6704
6704
  try {
6705
6705
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7549,7 +7549,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
7549
7549
  if (codeNames.length === 0) return;
7550
7550
  void (async () => {
7551
7551
  try {
7552
- const { collectDiagnostics } = await import("../persistent-session-OP4TXILO.js");
7552
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
7553
7553
  await api.post("/host/heartbeat", {
7554
7554
  host_id: hostId,
7555
7555
  agent_diagnostics: collectDiagnostics(codeNames)
@@ -7647,7 +7647,7 @@ async function pollCycle() {
7647
7647
  }
7648
7648
  try {
7649
7649
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
7650
- const { collectDiagnostics } = await import("../persistent-session-OP4TXILO.js");
7650
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
7651
7651
  const diagCodeNames = [...agentState.persistentSessionAgents];
7652
7652
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
7653
7653
  let tailscaleHostname;
@@ -7795,7 +7795,7 @@ async function pollCycle() {
7795
7795
  const {
7796
7796
  collectResponsivenessProbes,
7797
7797
  getResponsivenessIntervalMs
7798
- } = await import("../responsiveness-probe-K2RGVZCR.js");
7798
+ } = await import("../responsiveness-probe-2734PYS6.js");
7799
7799
  const probeIntervalMs = getResponsivenessIntervalMs();
7800
7800
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
7801
7801
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -7827,7 +7827,7 @@ async function pollCycle() {
7827
7827
  collectResponsivenessProbes,
7828
7828
  livePendingInboundOldestAgeSeconds,
7829
7829
  parkPendingInbound
7830
- } = await import("../responsiveness-probe-K2RGVZCR.js");
7830
+ } = await import("../responsiveness-probe-2734PYS6.js");
7831
7831
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
7832
7832
  const wedgeNow = /* @__PURE__ */ new Date();
7833
7833
  const liveAgents = agentState.persistentSessionAgents;
@@ -10671,7 +10671,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
10671
10671
  void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
10672
10672
  void (async () => {
10673
10673
  try {
10674
- const { collectDiagnostics } = await import("../persistent-session-OP4TXILO.js");
10674
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
10675
10675
  await api.post("/host/heartbeat", {
10676
10676
  host_id: hostId,
10677
10677
  agent_diagnostics: collectDiagnostics([codeName])
@@ -10721,7 +10721,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
10721
10721
  }
10722
10722
  try {
10723
10723
  const hostId = await getHostId();
10724
- const { collectDiagnostics } = await import("../persistent-session-OP4TXILO.js");
10724
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
10725
10725
  await api.post("/host/heartbeat", {
10726
10726
  host_id: hostId,
10727
10727
  agent_diagnostics: collectDiagnostics([codeName])
@@ -11112,7 +11112,7 @@ async function processClaudePairSessions(agents) {
11112
11112
  killPairSession,
11113
11113
  pairTmuxSession,
11114
11114
  finalizeClaudePairOnboarding
11115
- } = await import("../claude-pair-runtime-X5NJYZSK.js");
11115
+ } = await import("../claude-pair-runtime-CXIVEO6R.js");
11116
11116
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
11117
11117
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
11118
11118
  const killed = await killPairSession(pairTmuxSession(pairId));
package/dist/mcp/index.js CHANGED
@@ -21202,6 +21202,37 @@ function describeFeatureRequestResult(resp) {
21202
21202
  };
21203
21203
  }
21204
21204
 
21205
+ // src/request-reconnect.ts
21206
+ function describeReconnectRequestResult(resp) {
21207
+ switch (resp.status) {
21208
+ case "notified":
21209
+ return {
21210
+ text: "Reconnect request sent \u2014 your manager has been notified with a reconnect link. Stop retrying the failing tool; it should start working again once the integration is reconnected.",
21211
+ isError: false
21212
+ };
21213
+ case "coalesced":
21214
+ return {
21215
+ text: "A reconnect request for this integration was already sent recently, so no new notification went out. Stop retrying the failing tool and wait for the reconnect.",
21216
+ isError: false
21217
+ };
21218
+ case "healthy":
21219
+ return {
21220
+ text: "The platform shows this integration as connected, so no reconnect request was sent. If the tool is still failing, tell your operator exactly what error you saw instead of retrying.",
21221
+ isError: false
21222
+ };
21223
+ case "not_reconnectable":
21224
+ return {
21225
+ text: "This integration has no reconnect path (it is not an OAuth/managed connection), so a reconnect request would not help. Tell your operator what failed so they can fix its configuration.",
21226
+ isError: false
21227
+ };
21228
+ default:
21229
+ return {
21230
+ text: `Could not send the reconnect request${resp.message ? `: ${resp.message}` : ""}. Tell your operator which integration is failing and don't keep retrying.`,
21231
+ isError: true
21232
+ };
21233
+ }
21234
+ }
21235
+
21205
21236
  // src/form-request.ts
21206
21237
  function describeFormRequestResult(resp) {
21207
21238
  if (resp.ok && resp.status === "pending" && resp.request_id) {
@@ -22236,6 +22267,46 @@ server.tool(
22236
22267
  return { content: [{ type: "text", text }], ...isError ? { isError: true } : {} };
22237
22268
  }
22238
22269
  );
22270
+ server.tool(
22271
+ "request_reconnect",
22272
+ 'Ask for one of YOUR OWN integrations to be reconnected when its tools fail with authentication/authorization errors (expired or revoked credentials, "needs re-auth", 401/403 from the provider). This notifies your human manager with a reconnect link \u2014 you cannot re-auth an integration yourself. Use it once per failing integration instead of retrying the failing tool; do NOT use it for tools you never had, for transient errors (timeouts, rate limits), or to request new integrations (use request_feature for that).',
22273
+ {
22274
+ integration: external_exports.string().min(1).max(120).describe(
22275
+ `The integration's id as it appears in your toolkit (e.g. "gmail", "xero", "github") \u2014 the service whose tools are failing with auth errors.`
22276
+ ),
22277
+ reason: external_exports.string().min(1).max(500).describe(
22278
+ 'Short factual description of what failed \u2014 the tool you called and the auth error you saw (e.g. "gmail search returned 401 invalid_grant"). Shown to the human who reconnects it.'
22279
+ )
22280
+ },
22281
+ async (params) => {
22282
+ if (!AGT_AGENT_CODE_NAME) {
22283
+ return {
22284
+ content: [{ type: "text", text: "Error: AGT_AGENT_CODE_NAME not configured." }],
22285
+ isError: true
22286
+ };
22287
+ }
22288
+ let resp;
22289
+ try {
22290
+ resp = await apiPost("/host/request-reconnect", {
22291
+ agent_code_name: AGT_AGENT_CODE_NAME,
22292
+ integration: params.integration,
22293
+ reason: params.reason
22294
+ });
22295
+ } catch (err) {
22296
+ return {
22297
+ content: [
22298
+ {
22299
+ type: "text",
22300
+ text: `Could not reach the reconnect-request service (${err instanceof Error ? err.message : String(err)}). Tell your operator which integration is failing.`
22301
+ }
22302
+ ],
22303
+ isError: true
22304
+ };
22305
+ }
22306
+ const { text, isError } = describeReconnectRequestResult(resp);
22307
+ return { content: [{ type: "text", text }], ...isError ? { isError: true } : {} };
22308
+ }
22309
+ );
22239
22310
  server.tool(
22240
22311
  "update_identity",
22241
22312
  "Update your OWN identity: your role, personality, description, and/or display name. Provide only the fields you want to change; omitted fields are left unchanged, and passing an empty string clears a field (display_name cannot be emptied). Your code_name never changes. Changes are saved immediately and take effect within a few minutes, on your next configuration refresh, when your guidance is regenerated. Use this to refine how you present yourself or how you behave, not for one-off tasks. Avoid changing your identity frequently.",
@@ -23506,6 +23577,9 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
23506
23577
  // this name, so the forwarding-skip is a no-op; listed here to keep the
23507
23578
  // lockstep guard green.
23508
23579
  "request_feature",
23580
+ // ENG-7495: agent-requested integration reconnect (always registered). No
23581
+ // API tool shares this name; listed here to keep the lockstep guard green.
23582
+ "request_reconnect",
23509
23583
  // ENG-6686: self-service identity edit (always registered). Listed here to
23510
23584
  // keep the lockstep guard green; no API tool shares this name.
23511
23585
  "update_identity",
@@ -38735,6 +38735,40 @@ var INTEGRATION_REGISTRY = [
38735
38735
  ]
38736
38736
  }
38737
38737
  },
38738
+ {
38739
+ id: "image-gen",
38740
+ name: "Image Generation",
38741
+ category: "media",
38742
+ description: "AI image generation for Augmented Live pages. An agent authoring a page passes a text prompt (agt_live.generate_image) and gets back a generated raster image, stored on the page asset CDN so there is no image to source or host. Augmented Team manages the model access for you - there is no key to enter. Generation runs through the Vercel AI Gateway (OpenAI gpt-image-2 today). It is a PREMIUM, usage-billed capability, separate from Augmented Live text and audio: gated on a per-org opt-in and a monthly USD budget, and metered per generated image.",
38743
+ // No vendor key to enter: Augmented owns the shared Vercel AI Gateway virtual
38744
+ // key (AI_GATEWAY_API_KEY) that fronts the image providers, so auth is `none`
38745
+ // (customers never enter a key), same as ElevenLabs.
38746
+ supported_auth_types: ["none"],
38747
+ capabilities: [
38748
+ { id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt for an Augmented Live page (agt_live.generate_image)", access: "write" }
38749
+ ],
38750
+ docs_url: "https://platform.openai.com/docs/guides/images",
38751
+ beta: true,
38752
+ // ENG-7472: premium (billable). Image gen bills back to Augmented's shared
38753
+ // Vercel AI Gateway key and is usage-priced per generated image, so it is gated
38754
+ // on a per-org opt-in (isOrgEntitledToPremium) + a per-org monthly USD budget,
38755
+ // and metered on integration_usage_events. This budget is PER-ORG, distinct
38756
+ // from the gateway key's own global per-key cap. Pricing lives in
38757
+ // integration_rate_cards; this only declares the priced model(s).
38758
+ //
38759
+ // event_type is per MODEL VERSION (not a flat `image`), because model versions
38760
+ // price differently (e.g. gpt-image-2 vs a future gpt-image-3 or a Gemini image
38761
+ // model). Only a model we actually run AND have seeded a rate card for is
38762
+ // declared here; the handler fails CLOSED when the deployed model maps to an
38763
+ // undeclared meter, so a version bump without a rate card refuses rather than
38764
+ // silently disabling the budget. Adding a model = declare its meter here + seed
38765
+ // its rate card + add a normalizer entry in augmented-live-image-gen.ts.
38766
+ premium: {
38767
+ pricing: "usage",
38768
+ note: "Billed per generated image; the rate depends on the model/version used.",
38769
+ meters: [{ event_type: "gpt_image_2", unit: "image" }]
38770
+ }
38771
+ },
38738
38772
  {
38739
38773
  id: "postiz",
38740
38774
  name: "Postiz",
@@ -39779,6 +39813,13 @@ var FLAG_REGISTRY = [
39779
39813
  defaultValue: false,
39780
39814
  envVar: "AGT_MANAGER_FAILURE_NOTIFY_ENABLED"
39781
39815
  },
39816
+ {
39817
+ key: "agent-request-reconnect",
39818
+ description: "Agent-facing `request_reconnect` MCP tool (ENG-7495). When ON, POST /host/request-reconnect accepts an agent's report that one of its integrations is failing auth, validates it against the shared needsReconnect predicate, and notifies the agent's human manager with a reconnect deep link (preferred channel; falls back to the team alert channel, then owner/admin email). OFF returns a soft \"not enabled\" result to the agent. Boolean gate; ships dark.",
39819
+ flagType: "boolean",
39820
+ defaultValue: false,
39821
+ envVar: "AGT_AGENT_REQUEST_RECONNECT_ENABLED"
39822
+ },
39782
39823
  {
39783
39824
  key: "model-api-error-reporting",
39784
39825
  description: "Manager reports model-API failures (529 overloaded, 429 rate-limit, 5xx, timeouts) from spawned-agent output and its own eval/memory backend calls to the AGT API, which persists them and opens a threshold alert for early warning of provider incidents (ENG-7363). Boolean gate; ships dark. Materialized to the host flags-cache.",
@@ -36,7 +36,7 @@ import {
36
36
  writeDirectChatSessionState,
37
37
  writeEgressAllowlist,
38
38
  writePersistentClaudeWrapper
39
- } from "./chunk-E45AAMBQ.js";
39
+ } from "./chunk-GBVZDTCB.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-OP4TXILO.js.map
80
+ //# sourceMappingURL=persistent-session-FGGXFAJH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-E45AAMBQ.js";
3
+ } from "./chunk-GBVZDTCB.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -418,4 +418,4 @@ export {
418
418
  readAndResetSlackReplyBindingClassifications,
419
419
  readAndResetSlackReplyTargetClassifications
420
420
  };
421
- //# sourceMappingURL=responsiveness-probe-K2RGVZCR.js.map
421
+ //# sourceMappingURL=responsiveness-probe-2734PYS6.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.264",
3
+ "version": "0.28.266",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {