@topolo/mcp 0.14.1 → 0.14.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/dispatch.js CHANGED
@@ -125,6 +125,11 @@ function agentRunResult(invocation) {
125
125
  state: "approval_required",
126
126
  invocationId: invocation["invocationId"],
127
127
  verificationUrl: approval["verificationUrl"],
128
+ continuation: {
129
+ tool: "topolo_run_agent",
130
+ reuseSameInvocation: true,
131
+ arguments: { waitForApproval: true, waitSeconds: 120 }
132
+ },
128
133
  approval,
129
134
  invocation
130
135
  };
@@ -385,7 +390,7 @@ var TOOLS = [
385
390
  {
386
391
  name: "topolo_run_agent",
387
392
  title: "Run a Topolo agent to a durable checkpoint",
388
- description: "Creates or replays one idempotent Topolo Agent invocation, polls its published status, and returns either the terminal result or an approval_required handoff with the exact Topolo verification URL. Reusing the same idempotencyKey never starts a duplicate invocation.",
393
+ description: "Creates or replays one idempotent Topolo Agent invocation, polls its published status, and returns either the terminal result or an approval_required handoff with the exact Topolo verification URL. Reusing the same idempotencyKey never starts a duplicate invocation. After showing the verification URL, immediately call this tool again with the same invocation and waitForApproval=true so the terminal result returns here.",
389
394
  requiredScopes: [],
390
395
  destructive: true,
391
396
  inputSchema: {
@@ -404,6 +409,11 @@ var TOOLS = [
404
409
  maximum: 120,
405
410
  default: 30,
406
411
  description: "Maximum time to poll. Returns state=running when the bounded wait elapses."
412
+ },
413
+ waitForApproval: {
414
+ type: "boolean",
415
+ default: false,
416
+ description: "Set only when resuming an approval_required handoff already shown to the human. Keeps polling the same idempotent invocation while approval is pending."
407
417
  }
408
418
  },
409
419
  required: ["invocation"],
@@ -417,6 +427,7 @@ var TOOLS = [
417
427
  }
418
428
  const resource = optionalResourceContext(args);
419
429
  const waitSeconds = typeof args["waitSeconds"] === "number" ? Math.max(0, Math.min(120, Math.floor(args["waitSeconds"]))) : 30;
430
+ const waitForApproval = args["waitForApproval"] === true;
420
431
  const createResult = await topolo.client.callAction(
421
432
  AGENT_INVOCATIONS_CREATE,
422
433
  invocationInput,
@@ -424,7 +435,7 @@ var TOOLS = [
424
435
  );
425
436
  let invocation = invocationFrom(createResult);
426
437
  const deadline = Date.now() + waitSeconds * 1e3;
427
- while (invocation["terminal"] !== true && invocation["status"] !== "awaiting_approval" && Date.now() < deadline) {
438
+ while (invocation["terminal"] !== true && (invocation["status"] !== "awaiting_approval" || waitForApproval) && Date.now() < deadline) {
428
439
  const recommended = typeof invocation["recommendedPollAfterSeconds"] === "number" ? invocation["recommendedPollAfterSeconds"] : 2;
429
440
  const delayMs = Math.min(
430
441
  Math.max(250, recommended * 1e3),
package/dist/http.js CHANGED
@@ -17852,6 +17852,11 @@ function agentRunResult(invocation) {
17852
17852
  state: "approval_required",
17853
17853
  invocationId: invocation["invocationId"],
17854
17854
  verificationUrl: approval["verificationUrl"],
17855
+ continuation: {
17856
+ tool: "topolo_run_agent",
17857
+ reuseSameInvocation: true,
17858
+ arguments: { waitForApproval: true, waitSeconds: 120 }
17859
+ },
17855
17860
  approval,
17856
17861
  invocation
17857
17862
  };
@@ -18112,7 +18117,7 @@ var TOOLS = [
18112
18117
  {
18113
18118
  name: "topolo_run_agent",
18114
18119
  title: "Run a Topolo agent to a durable checkpoint",
18115
- description: "Creates or replays one idempotent Topolo Agent invocation, polls its published status, and returns either the terminal result or an approval_required handoff with the exact Topolo verification URL. Reusing the same idempotencyKey never starts a duplicate invocation.",
18120
+ description: "Creates or replays one idempotent Topolo Agent invocation, polls its published status, and returns either the terminal result or an approval_required handoff with the exact Topolo verification URL. Reusing the same idempotencyKey never starts a duplicate invocation. After showing the verification URL, immediately call this tool again with the same invocation and waitForApproval=true so the terminal result returns here.",
18116
18121
  requiredScopes: [],
18117
18122
  destructive: true,
18118
18123
  inputSchema: {
@@ -18131,6 +18136,11 @@ var TOOLS = [
18131
18136
  maximum: 120,
18132
18137
  default: 30,
18133
18138
  description: "Maximum time to poll. Returns state=running when the bounded wait elapses."
18139
+ },
18140
+ waitForApproval: {
18141
+ type: "boolean",
18142
+ default: false,
18143
+ description: "Set only when resuming an approval_required handoff already shown to the human. Keeps polling the same idempotent invocation while approval is pending."
18134
18144
  }
18135
18145
  },
18136
18146
  required: ["invocation"],
@@ -18144,6 +18154,7 @@ var TOOLS = [
18144
18154
  }
18145
18155
  const resource = optionalResourceContext(args);
18146
18156
  const waitSeconds = typeof args["waitSeconds"] === "number" ? Math.max(0, Math.min(120, Math.floor(args["waitSeconds"]))) : 30;
18157
+ const waitForApproval = args["waitForApproval"] === true;
18147
18158
  const createResult = await topolo.client.callAction(
18148
18159
  AGENT_INVOCATIONS_CREATE,
18149
18160
  invocationInput,
@@ -18151,7 +18162,7 @@ var TOOLS = [
18151
18162
  );
18152
18163
  let invocation = invocationFrom(createResult);
18153
18164
  const deadline = Date.now() + waitSeconds * 1e3;
18154
- while (invocation["terminal"] !== true && invocation["status"] !== "awaiting_approval" && Date.now() < deadline) {
18165
+ while (invocation["terminal"] !== true && (invocation["status"] !== "awaiting_approval" || waitForApproval) && Date.now() < deadline) {
18155
18166
  const recommended = typeof invocation["recommendedPollAfterSeconds"] === "number" ? invocation["recommendedPollAfterSeconds"] : 2;
18156
18167
  const delayMs = Math.min(
18157
18168
  Math.max(250, recommended * 1e3),
package/dist/index.js CHANGED
@@ -4214,6 +4214,11 @@ function agentRunResult(invocation) {
4214
4214
  state: "approval_required",
4215
4215
  invocationId: invocation["invocationId"],
4216
4216
  verificationUrl: approval["verificationUrl"],
4217
+ continuation: {
4218
+ tool: "topolo_run_agent",
4219
+ reuseSameInvocation: true,
4220
+ arguments: { waitForApproval: true, waitSeconds: 120 }
4221
+ },
4217
4222
  approval,
4218
4223
  invocation
4219
4224
  };
@@ -4474,7 +4479,7 @@ var TOOLS = [
4474
4479
  {
4475
4480
  name: "topolo_run_agent",
4476
4481
  title: "Run a Topolo agent to a durable checkpoint",
4477
- description: "Creates or replays one idempotent Topolo Agent invocation, polls its published status, and returns either the terminal result or an approval_required handoff with the exact Topolo verification URL. Reusing the same idempotencyKey never starts a duplicate invocation.",
4482
+ description: "Creates or replays one idempotent Topolo Agent invocation, polls its published status, and returns either the terminal result or an approval_required handoff with the exact Topolo verification URL. Reusing the same idempotencyKey never starts a duplicate invocation. After showing the verification URL, immediately call this tool again with the same invocation and waitForApproval=true so the terminal result returns here.",
4478
4483
  requiredScopes: [],
4479
4484
  destructive: true,
4480
4485
  inputSchema: {
@@ -4493,6 +4498,11 @@ var TOOLS = [
4493
4498
  maximum: 120,
4494
4499
  default: 30,
4495
4500
  description: "Maximum time to poll. Returns state=running when the bounded wait elapses."
4501
+ },
4502
+ waitForApproval: {
4503
+ type: "boolean",
4504
+ default: false,
4505
+ description: "Set only when resuming an approval_required handoff already shown to the human. Keeps polling the same idempotent invocation while approval is pending."
4496
4506
  }
4497
4507
  },
4498
4508
  required: ["invocation"],
@@ -4506,6 +4516,7 @@ var TOOLS = [
4506
4516
  }
4507
4517
  const resource = optionalResourceContext(args);
4508
4518
  const waitSeconds = typeof args["waitSeconds"] === "number" ? Math.max(0, Math.min(120, Math.floor(args["waitSeconds"]))) : 30;
4519
+ const waitForApproval = args["waitForApproval"] === true;
4509
4520
  const createResult = await topolo.client.callAction(
4510
4521
  AGENT_INVOCATIONS_CREATE,
4511
4522
  invocationInput,
@@ -4513,7 +4524,7 @@ var TOOLS = [
4513
4524
  );
4514
4525
  let invocation = invocationFrom(createResult);
4515
4526
  const deadline = Date.now() + waitSeconds * 1e3;
4516
- while (invocation["terminal"] !== true && invocation["status"] !== "awaiting_approval" && Date.now() < deadline) {
4527
+ while (invocation["terminal"] !== true && (invocation["status"] !== "awaiting_approval" || waitForApproval) && Date.now() < deadline) {
4517
4528
  const recommended = typeof invocation["recommendedPollAfterSeconds"] === "number" ? invocation["recommendedPollAfterSeconds"] : 2;
4518
4529
  const delayMs = Math.min(
4519
4530
  Math.max(250, recommended * 1e3),
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@topolo/mcp",
3
3
  "packageManager": "pnpm@10.17.1",
4
- "version": "0.14.1",
5
- "topoloPublishedVersion": "0.14.1",
4
+ "version": "0.14.2",
5
+ "topoloPublishedVersion": "0.14.2",
6
6
  "description": "Model Context Protocol server for the Topolo platform. Exposes scope-gated tools that third-party agents (Claude, Codex, etc.) can call natively.",
7
7
  "license": "UNLICENSED",
8
8
  "author": "Topolo",