@agentvalet/mcp-server 1.17.0 → 1.18.0

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.
@@ -6,7 +6,7 @@
6
6
  //
7
7
  // 1. Send a request to the public gate (POST /v1/actions) or the Observe
8
8
  // relay (POST /v1/observe/actions).
9
- // 2. Map the wire response to exactly one of the six documented decisions, so
9
+ // 2. Map the wire response to exactly one of the seven documented decisions, so
10
10
  // a connector switches on a single discriminated union instead of
11
11
  // re-deriving status-code semantics in every integration.
12
12
  //
@@ -18,6 +18,8 @@
18
18
  /** Agent states that mean "the agent itself is halted", surfaced as a 403 by the
19
19
  * permission check. Distinct from a policy denial of an otherwise-healthy agent. */
20
20
  const SUSPENDED_REASONS = new Set(["agent_suspended", "circuit_breaker_open"]);
21
+ /** An expired child identity (G6): permanent for this agent, so not "suspended". */
22
+ const EXPIRED_REASONS = new Set(["agent_expired"]);
21
23
  function readField(body, key) {
22
24
  if (body && typeof body === "object" && key in body) {
23
25
  const v = body[key];
@@ -34,6 +36,7 @@ function readField(body, key) {
34
36
  * 202 -> pending_approval
35
37
  * 403 reason in {agent_suspended,
36
38
  * circuit_breaker_open} -> suspended
39
+ * 403 reason agent_expired -> expired
37
40
  * 401 / 5xx -> error
38
41
  * other 4xx (402/403/412/429/...) -> denied
39
42
  */
@@ -55,6 +58,9 @@ export function classifyGateResponse(status, body) {
55
58
  if (reason && SUSPENDED_REASONS.has(reason)) {
56
59
  return { decision: "suspended", status, reason, raw: body };
57
60
  }
61
+ if (reason && EXPIRED_REASONS.has(reason)) {
62
+ return { decision: "expired", status, reason, raw: body };
63
+ }
58
64
  }
59
65
  // Identity rejection and upstream/server failures are not policy decisions.
60
66
  // 424 is the proxy's upstream-failure code (a 502/504 downgraded so
@@ -20,7 +20,7 @@ Matching a platform to a vendor: \`platformName\` is a label the OWNER typed and
20
20
 
21
21
  Response handling:
22
22
  - \`use_platform\` now waits up to 50 seconds for owner approval automatically. Most approvals complete in this window — the call simply takes longer and returns the upstream result like a normal success. Tell the user "waiting for owner approval" if the call is taking more than ~5 seconds.
23
- - If \`use_platform\` returns a \`pending_approval\` envelope after that wait, the action is queued and will run asynchronously when the owner approves. Tell the user clearly. Do NOT retry — duplicate calls will queue duplicate approvals.
23
+ - If \`use_platform\` returns a \`pending_approval\` envelope after that wait, the action is queued and will run asynchronously when the owner approves. Tell the user clearly. Do NOT retry — wait, or check back later for the outcome. An identical retry while the approval is pending returns the same approval id (no second approval is queued), but it does not speed anything up.
24
24
  - Do not retry a denied call with a different scope.
25
25
  - If a \`use_platform\` error response includes a \`report_hint\` block, you may briefly ask the user "Want me to lodge this with your AgentValet owner?" — on yes, call \`report_self_diagnostic\` with a one-sentence narrative plus the \`correlation_id\` from the hint so the owner can investigate.
26
26
 
@@ -150,7 +150,7 @@ export const WRITE_PLATFORM_TOOL = {
150
150
  type: "object",
151
151
  properties: {
152
152
  platform: { type: "string", description: "Platform ID (e.g. github, slack, stripe)" },
153
- endpoint: { type: "string", description: "Path in the platform's own API (e.g. /api/chat.postMessage)" },
153
+ endpoint: { type: "string", description: "Path in the platform's own API (e.g. /chat.postMessage)" },
154
154
  method: {
155
155
  type: "string",
156
156
  enum: ["POST", "PUT", "PATCH"],
@@ -381,9 +381,10 @@ export const LIST_MY_PENDING_ACTIONS_TOOL = {
381
381
  platform_id: { type: "string" },
382
382
  scope: { type: "string" },
383
383
  status: { type: "string" },
384
- executed_at: { type: "string" },
385
- result_summary: { type: "string" },
386
- execution_error: { type: "string" },
384
+ // null until there is something to report (expired, denied, not yet run).
385
+ executed_at: { type: ["string", "null"] },
386
+ result_summary: { type: ["string", "null"] },
387
+ execution_error: { type: ["string", "null"] },
387
388
  },
388
389
  required: ["approval_id", "status"],
389
390
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvalet/mcp-server",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "AgentValet MCP server — lets AI agents call approved platforms via the AgentValet proxy",
5
5
  "mcpName": "io.github.agentvalet/mcp-server",
6
6
  "type": "module",