@agentcomms/resend 0.18.0 → 0.18.2

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/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { A as removeAccountChange, At as updateGateAtTerminal, C as inspectKey, Ct as runUpdateCheckChild, D as policyChange, Dt as terminalUpdateHooks, E as policyApprovalRefusal, Ft as writeResult, G as SEND_LOOKUP, H as CommsError, Ht as VERSION, J as approvalsOf, K as UPDATE_CHECK_CHILD_COMMAND, Lt as RESEND_CALLER, M as showAccount, Nt as waitForApproval, O as policyReport, P as ResendContext, Pt as wholeNumber, R as checkNewName, S as addAccountChange, St as runCommand, T as modeOf, Tt as serverPruneChange, U as EXIT_CODES, V as CHANNEL_SERVERS, W as PATH_OPTIONS, X as approveRefusedHint, Y as approveChangeAtTerminal, Z as canPrompt, _ as showSentEmail, _t as refuseUnclaimedApproval, a as revokeSendApproval, at as exemptFromUpdateGate, bt as renderPrune, c as downloadReceived, ct as handoffSentence, d as listReceived, dt as kindOf, et as cliHandoffs, f as listScheduled, g as showReceived, gt as pathOverridesFromCliOptions, ht as paint, i as prepareSend, it as escapeForDisplay, j as sendPolicyOf, k as policyWanted, kt as truncateDisplay, l as getMetrics, lt as handoffSentenceToFill, m as listSuppressions, mt as openCore, n as executeSend, nt as commandPathOf, o as sendStatus, p as listSentEmails, q as agentMarker, r as finishSendApproval, rt as describeFenceReport, s as cancelScheduledChange, st as gatedChangeAtTerminal, t as beginSendApproval, tt as colorEnabled, u as listDomains, ut as installExitStatus, vt as renderApprovalWait, w as listAccounts, wt as serverInstallChange, x as runDoctor, xt as resolvePaths, yt as renderInstall } from "./send-D-SXJezp.mjs";
2
+ import { A as removeAccountChange, At as updateGateAtTerminal, C as inspectKey, Ct as runUpdateCheckChild, D as policyChange, Dt as terminalUpdateHooks, E as policyApprovalRefusal, Ft as writeResult, G as SEND_LOOKUP, H as CommsError, Ht as VERSION, J as approvalsOf, K as UPDATE_CHECK_CHILD_COMMAND, Lt as RESEND_CALLER, M as showAccount, Nt as waitForApproval, O as policyReport, P as ResendContext, Pt as wholeNumber, R as checkNewName, S as addAccountChange, St as runCommand, T as modeOf, Tt as serverPruneChange, U as EXIT_CODES, V as CHANNEL_SERVERS, W as PATH_OPTIONS, X as approveRefusedHint, Y as approveChangeAtTerminal, Z as canPrompt, _ as showSentEmail, _t as refuseUnclaimedApproval, a as revokeSendApproval, at as exemptFromUpdateGate, bt as renderPrune, c as downloadReceived, ct as handoffSentence, d as listReceived, dt as kindOf, et as cliHandoffs, f as listScheduled, g as showReceived, gt as pathOverridesFromCliOptions, ht as paint, i as prepareSend, it as escapeForDisplay, j as sendPolicyOf, k as policyWanted, kt as truncateDisplay, l as getMetrics, lt as handoffSentenceToFill, m as listSuppressions, mt as openCore, n as executeSend, nt as commandPathOf, o as sendStatus, p as listSentEmails, q as agentMarker, r as finishSendApproval, rt as describeFenceReport, s as cancelScheduledChange, st as gatedChangeAtTerminal, t as beginSendApproval, tt as colorEnabled, u as listDomains, ut as installExitStatus, vt as renderApprovalWait, w as listAccounts, wt as serverInstallChange, x as runDoctor, xt as resolvePaths, yt as renderInstall } from "./send-7cKVm9mA.mjs";
3
3
  import path from "node:path";
4
4
  import { createInterface } from "node:readline/promises";
5
5
  import { stripVTControlCharacters } from "node:util";
@@ -3505,7 +3505,7 @@ is out: update first, or put it off (the stop names both commands) · 64 usage
3505
3505
  }));
3506
3506
  const mcp = program.command("mcp").description("run the MCP server on stdio, for a coding agent to connect to").option("--account <name>", "pin the server to one account; every tool then acts on it and no other").action(async (flags) => {
3507
3507
  ran = true;
3508
- const startResendStdioServer = deps.startMcp ?? (await import("./stdio-entry-DcVZBKOq.mjs")).startResendStdioServer;
3508
+ const startResendStdioServer = deps.startMcp ?? (await import("./stdio-entry-CskP8Urx.mjs")).startResendStdioServer;
3509
3509
  const core = coreForInvocation();
3510
3510
  await startResendStdioServer({
3511
3511
  ...deps,
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { Bt as RESEND_DOWNLOAD_ORIGIN, Et as stripInvisible, H as CommsError, Ht as VERSION, It as PACKAGE_NAME, Lt as RESEND_CALLER, N as resendRequest, P as ResendContext, Rt as REFUSED, Vt as ROUTES, b as readBody, ft as neutralise, h as resendId, pt as newBoundary, v as addressesOf, y as attachmentRisks, z as keyPermissionOf, zt as RESEND_API_ORIGIN } from "./send-D-SXJezp.mjs";
2
- import { t as createResendMcpServer } from "./server-BZOLLDTu.mjs";
1
+ import { Bt as RESEND_DOWNLOAD_ORIGIN, Et as stripInvisible, H as CommsError, Ht as VERSION, It as PACKAGE_NAME, Lt as RESEND_CALLER, N as resendRequest, P as ResendContext, Rt as REFUSED, Vt as ROUTES, b as readBody, ft as neutralise, h as resendId, pt as newBoundary, v as addressesOf, y as attachmentRisks, z as keyPermissionOf, zt as RESEND_API_ORIGIN } from "./send-7cKVm9mA.mjs";
2
+ import { t as createResendMcpServer } from "./server-CSe84nMI.mjs";
3
3
  //#region src/operations/events.ts
4
4
  const BODY_LIMIT = 2e4;
5
5
  const STATUS = /* @__PURE__ */ new Set([
@@ -12,7 +12,7 @@ import { execFile, spawn } from "node:child_process";
12
12
  //#endregion
13
13
  //#region src/version.ts
14
14
  /** The package version, read from package.json at build time. */
15
- const VERSION$1 = "0.18.0";
15
+ const VERSION$1 = "0.18.2";
16
16
  //#endregion
17
17
  //#region src/api/routes.ts
18
18
  /**
@@ -201,7 +201,7 @@ const RESEND_CALLER = Object.freeze({
201
201
  packageName: PACKAGE_NAME
202
202
  });
203
203
  //#endregion
204
- //#region ../core/dist/update-check-C_PW2LlM.mjs
204
+ //#region ../core/dist/update-check-ev9Jxi1R.mjs
205
205
  /**
206
206
  * Every failure a user or an agent can act on carries a specific, stable code from this registry, a message, an
207
207
  * optional one-line hint and structured `details`. The code decides the process exit status; agents and skills branch
@@ -4714,6 +4714,14 @@ function commandLinesFrom(ps) {
4714
4714
  });
4715
4715
  }
4716
4716
  const RUNTIME_NAME = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.+-]*)?$/;
4717
+ /** Whether a runtime's own manifest, the one the installer writes, names this package as what it installs. */
4718
+ async function pinsPackage(runtime, packageName) {
4719
+ try {
4720
+ return typeof JSON.parse(await readFile(join(runtime, "package.json"), "utf8")).dependencies?.[packageName] === "string";
4721
+ } catch {
4722
+ return false;
4723
+ }
4724
+ }
4717
4725
  /**
4718
4726
  * This product's managed runtimes on disk, oldest name first: every directory directly inside `<data>/runtime`,
4719
4727
  * named like a version, that holds this product's package — never a symbolic link, never another product's runtime,
@@ -4742,6 +4750,7 @@ async function listManagedRuntimes(dataDir, packageName) {
4742
4750
  } catch {
4743
4751
  continue;
4744
4752
  }
4753
+ if (!name.endsWith(suffix) && !await pinsPackage(path, packageName)) continue;
4745
4754
  found.push({
4746
4755
  path,
4747
4756
  version: name.endsWith(suffix) ? name.slice(0, -suffix.length) : name
@@ -10081,7 +10090,7 @@ function folding(platform) {
10081
10090
  return platform === "win32" ? (text) => text.toLowerCase() : (text) => text;
10082
10091
  }
10083
10092
  /** The package version, read from package.json at build time. */
10084
- const VERSION = "0.18.0";
10093
+ const VERSION = "0.18.2";
10085
10094
  /**
10086
10095
  * Versions as semver writes and orders them — what an update compares, and what the daily update check's reader needs
10087
10096
  * to decide whether the release it last heard of is newer than the one running.
@@ -12868,7 +12877,7 @@ function serverPruneChange(core, env, request, own) {
12868
12877
  };
12869
12878
  const { packageName, version } = ownProduct(request.channel, own) ?? {
12870
12879
  packageName: serverFacts(request.channel).packageName,
12871
- version: "0.18.0"
12880
+ version: "0.18.2"
12872
12881
  };
12873
12882
  const product = {
12874
12883
  packageName,
@@ -14602,7 +14611,7 @@ function terminalUpdateHooks(core, env, options) {
14602
14611
  };
14603
14612
  }
14604
14613
  //#endregion
14605
- //#region ../core/dist/tool-arguments-C_RA7n3A.mjs
14614
+ //#region ../core/dist/tool-arguments-JbqHfSTd.mjs
14606
14615
  const APPLIED = Symbol.for("agentcomms.strictToolArguments");
14607
14616
  const TARGET = "draft-2020-12";
14608
14617
  /**
@@ -1,4 +1,4 @@
1
- import { $ as checkForUpdates, A as removeAccountChange, B as strictToolArguments, D as policyChange, E as policyApprovalRefusal, F as CHANGE_POLICIES, G as SEND_LOOKUP, H as CommsError, Ht as VERSION, I as MODES, L as SEND_POLICIES, M as showAccount, Mt as waitCallOptions, Nt as waitForApproval, O as policyReport, Ot as toCommsError, P as ResendContext, Q as changeToolResult, _ as showSentEmail, _t as refuseUnclaimedApproval, c as downloadReceived, d as listReceived, f as listScheduled, g as showReceived, i as prepareSend, jt as updateToolGate, k as policyWanted, l as getMetrics, m as listSuppressions, n as executeSend, o as sendStatus, ot as gatedChange, p as listSentEmails, s as cancelScheduledChange, u as listDomains, w as listAccounts, x as runDoctor } from "./send-D-SXJezp.mjs";
1
+ import { $ as checkForUpdates, A as removeAccountChange, B as strictToolArguments, D as policyChange, E as policyApprovalRefusal, F as CHANGE_POLICIES, G as SEND_LOOKUP, H as CommsError, Ht as VERSION, I as MODES, L as SEND_POLICIES, M as showAccount, Mt as waitCallOptions, Nt as waitForApproval, O as policyReport, Ot as toCommsError, P as ResendContext, Q as changeToolResult, _ as showSentEmail, _t as refuseUnclaimedApproval, c as downloadReceived, d as listReceived, f as listScheduled, g as showReceived, i as prepareSend, jt as updateToolGate, k as policyWanted, l as getMetrics, m as listSuppressions, n as executeSend, o as sendStatus, ot as gatedChange, p as listSentEmails, s as cancelScheduledChange, u as listDomains, w as listAccounts, x as runDoctor } from "./send-7cKVm9mA.mjs";
2
2
  import { S as union, c as boolean, g as object, h as number, s as array, x as string } from "./iso-USuVU_sk.mjs";
3
3
  import { t as McpServer } from "./mcp-DIH4cS6P-CIWWZQbz.mjs";
4
4
  //#region src/mcp/server.ts
@@ -1,4 +1,4 @@
1
- import { t as createResendMcpServer } from "./server-BZOLLDTu.mjs";
1
+ import { t as createResendMcpServer } from "./server-CSe84nMI.mjs";
2
2
  //#region src/mcp/stdio-entry.ts
3
3
  /**
4
4
  * Starting the stdio server. On stdio, **stdout is the protocol**: one stray `console.log` corrupts the stream, so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentcomms/resend",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "description": "Resend for coding agents: read domains, sent and received mail, metrics and suppressions, and send mail that nothing sends without a person's approval of exactly what goes out.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "THIRD_PARTY_LICENSES"
32
32
  ],
33
33
  "dependencies": {
34
- "@agentcomms/core": "0.18.0"
34
+ "@agentcomms/core": "0.18.2"
35
35
  },
36
36
  "optionalDependencies": {
37
37
  "@napi-rs/keyring": "2.1.0"
@@ -107,5 +107,5 @@
107
107
  "typecheck": "tsc -p tsconfig.json",
108
108
  "test": "node --experimental-strip-types --test --test-timeout=600000 \"test/**/*.test.ts\""
109
109
  },
110
- "gitHead": "a55c5383b35a8214b9e481e2a148b0e29a663a9f"
110
+ "gitHead": "e053c074e8f90d2b36d4d3b0dd127e073ccd0053"
111
111
  }