@walkeros/mcp 4.3.0-next-1784055686454 → 4.3.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.
package/dist/stdio.js CHANGED
@@ -722,7 +722,7 @@ var NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
722
722
  var JSDELIVR_BASE = "https://cdn.jsdelivr.net/npm";
723
723
  var WALKEROS_JSON_PATH = "dist/walkerOS.json";
724
724
  var CACHE_TTL = 5 * 60 * 1e3;
725
- var CLIENT_HEADER = "walkeros-mcp/4.3.0-next-1784055686454";
725
+ var CLIENT_HEADER = "walkeros-mcp/4.3.0";
726
726
  function getPackageBaseUrl() {
727
727
  return process.env.WALKEROS_APP_URL || void 0;
728
728
  }
@@ -1466,7 +1466,7 @@ async function feedbackHandlerBody(client, input) {
1466
1466
  const isAnonymous = explicitAnonymous ?? anonymous ?? true;
1467
1467
  await client.submitFeedback(text, {
1468
1468
  anonymous: isAnonymous,
1469
- version: "4.3.0-next-1784055686454"
1469
+ version: "4.3.0"
1470
1470
  });
1471
1471
  return mcpResult8({ ok: true });
1472
1472
  } catch (error) {
@@ -1502,7 +1502,7 @@ var spec_default = {
1502
1502
  openapi: "3.1.0",
1503
1503
  info: {
1504
1504
  title: "walkerOS Tag Manager API",
1505
- version: "2.4.0",
1505
+ version: "3.1.0",
1506
1506
  description: "API for managing walkerOS flows, projects, and real-time event observation.",
1507
1507
  contact: {
1508
1508
  name: "elbwalker",
@@ -3826,6 +3826,9 @@ var spec_default = {
3826
3826
  sessionExpiresAt: {
3827
3827
  type: "string",
3828
3828
  format: "date-time"
3829
+ },
3830
+ sessionGrant: {
3831
+ type: "string"
3829
3832
  }
3830
3833
  },
3831
3834
  required: ["grant", "activationUrl", "sessionExpiresAt"]
@@ -3900,15 +3903,15 @@ var spec_default = {
3900
3903
  token: {
3901
3904
  type: "string"
3902
3905
  },
3903
- activationUrl: {
3904
- type: ["string", "null"]
3906
+ previewEnabled: {
3907
+ type: "boolean"
3905
3908
  },
3906
3909
  bundleUrl: {
3907
3910
  type: "string",
3908
3911
  format: "uri"
3909
3912
  }
3910
3913
  },
3911
- required: ["previewId", "token", "activationUrl", "bundleUrl"]
3914
+ required: ["previewId", "token", "previewEnabled", "bundleUrl"]
3912
3915
  },
3913
3916
  ObserveSessionJourneysResponse: {
3914
3917
  type: "object",
@@ -5989,6 +5992,65 @@ var spec_default = {
5989
5992
  },
5990
5993
  required: ["email"]
5991
5994
  },
5995
+ VerifyResponse: {
5996
+ oneOf: [
5997
+ {
5998
+ type: "object",
5999
+ properties: {
6000
+ status: {
6001
+ type: "string",
6002
+ enum: ["ok"]
6003
+ },
6004
+ redirectTo: {
6005
+ type: "string",
6006
+ example: "/"
6007
+ }
6008
+ },
6009
+ required: ["status", "redirectTo"]
6010
+ },
6011
+ {
6012
+ type: "object",
6013
+ properties: {
6014
+ status: {
6015
+ type: "string",
6016
+ enum: ["confirm_required"]
6017
+ },
6018
+ email: {
6019
+ type: "string",
6020
+ example: "user@example.com"
6021
+ }
6022
+ },
6023
+ required: ["status", "email"]
6024
+ },
6025
+ {
6026
+ type: "object",
6027
+ properties: {
6028
+ status: {
6029
+ type: "string",
6030
+ enum: ["expired", "used", "invalid", "malformed"]
6031
+ }
6032
+ },
6033
+ required: ["status"]
6034
+ }
6035
+ ]
6036
+ },
6037
+ VerifyRequest: {
6038
+ type: "object",
6039
+ properties: {
6040
+ token: {
6041
+ type: "string",
6042
+ minLength: 1
6043
+ },
6044
+ redirect_to: {
6045
+ type: "string",
6046
+ example: "/dashboard"
6047
+ },
6048
+ confirm: {
6049
+ type: "boolean"
6050
+ }
6051
+ },
6052
+ required: ["token"]
6053
+ },
5992
6054
  WhoamiResponse: {
5993
6055
  type: "object",
5994
6056
  properties: {
@@ -6967,10 +7029,46 @@ var spec_default = {
6967
7029
  }
6968
7030
  },
6969
7031
  "/api/auth/verify": {
7032
+ post: {
7033
+ tags: ["Auth"],
7034
+ summary: "Redeem magic link token",
7035
+ description: "Redeem a magic link token and create an authenticated session. Redeems immediately when the browser-nonce cookie from the magic-link request matches; otherwise answers confirm_required and expects a follow-up call with confirm: true.",
7036
+ requestBody: {
7037
+ content: {
7038
+ "application/json": {
7039
+ schema: {
7040
+ $ref: "#/components/schemas/VerifyRequest"
7041
+ }
7042
+ }
7043
+ }
7044
+ },
7045
+ responses: {
7046
+ "200": {
7047
+ description: "Redemption result. status=ok sets the session cookie and carries the redirect target.",
7048
+ content: {
7049
+ "application/json": {
7050
+ schema: {
7051
+ $ref: "#/components/schemas/VerifyResponse"
7052
+ }
7053
+ }
7054
+ }
7055
+ },
7056
+ "400": {
7057
+ description: "Validation error",
7058
+ content: {
7059
+ "application/json": {
7060
+ schema: {
7061
+ $ref: "#/components/schemas/ErrorResponse"
7062
+ }
7063
+ }
7064
+ }
7065
+ }
7066
+ }
7067
+ },
6970
7068
  get: {
6971
7069
  tags: ["Auth"],
6972
- summary: "Verify magic link token",
6973
- description: "Verify a magic link token and create an authenticated session. Redirects to the specified URL or home page.",
7070
+ summary: "Legacy magic link entry point",
7071
+ description: "Side-effect-free redirector to the /auth/verify page for links minted before the page-URL change. Never consumes the token; redemption happens via POST.",
6974
7072
  parameters: [
6975
7073
  {
6976
7074
  schema: {
@@ -6997,8 +7095,8 @@ var spec_default = {
6997
7095
  }
6998
7096
  ],
6999
7097
  responses: {
7000
- "302": {
7001
- description: "Redirect to target URL with session cookie set"
7098
+ "307": {
7099
+ description: "Redirect to the /auth/verify page with the token forwarded"
7002
7100
  }
7003
7101
  }
7004
7102
  }
@@ -16269,6 +16367,9 @@ var inputSchema11 = {
16269
16367
  ),
16270
16368
  origins: z10.array(z10.string()).optional().describe(
16271
16369
  "Site origins (bare https://host[:port]) to mint a preview activation grant for. Used by preview_regrant; the returned activationUrl targets the first origin."
16370
+ ),
16371
+ sessionId: z10.string().optional().describe(
16372
+ "Observe session id \u2014 when set, preview_regrant mints an activation/forwarding grant PAIR: the returned activationUrl both activates the web preview and lets the page forward events to the session container (elbPreviewSession param). Pass it to observe server-side hops; omit for a plain web preview."
16272
16373
  )
16273
16374
  };
16274
16375
  var annotations11 = {
@@ -16277,6 +16378,39 @@ var annotations11 = {
16277
16378
  idempotentHint: false,
16278
16379
  openWorldHint: true
16279
16380
  };
16381
+ var PREVIEW_SUMMARY_FIELDS = [
16382
+ "id",
16383
+ "previewId",
16384
+ "flowId",
16385
+ "flowSettingsId",
16386
+ "bundleUrl",
16387
+ "activationUrl",
16388
+ "grant",
16389
+ "sessionGrant",
16390
+ "sessionExpiresAt",
16391
+ "status",
16392
+ "observeFeed",
16393
+ "createdBy",
16394
+ "createdAt"
16395
+ ];
16396
+ function isRecord(value) {
16397
+ return typeof value === "object" && value !== null && !Array.isArray(value);
16398
+ }
16399
+ function redactPreview(data) {
16400
+ if (!isRecord(data)) return {};
16401
+ const out = {};
16402
+ for (const field of PREVIEW_SUMMARY_FIELDS) {
16403
+ if (data[field] !== void 0) out[field] = data[field];
16404
+ }
16405
+ return out;
16406
+ }
16407
+ function redactPreviewList(data) {
16408
+ if (!isRecord(data)) return { previews: [] };
16409
+ return {
16410
+ previews: Array.isArray(data.previews) ? data.previews.map(redactPreview) : [],
16411
+ ...data.total !== void 0 ? { total: data.total } : {}
16412
+ };
16413
+ }
16280
16414
  function createFlowManageToolSpec(client) {
16281
16415
  return {
16282
16416
  name: "flow_manage",
@@ -16306,7 +16440,8 @@ async function flowManageHandlerBody(client, input) {
16306
16440
  flowSettingsId,
16307
16441
  source,
16308
16442
  siteUrl,
16309
- origins
16443
+ origins,
16444
+ sessionId
16310
16445
  } = input ?? {};
16311
16446
  const validationError = validateActionInput(
16312
16447
  "flow_manage",
@@ -16470,7 +16605,7 @@ async function flowManageHandlerBody(client, input) {
16470
16605
  projectId: resolvedProjectId,
16471
16606
  flowId
16472
16607
  });
16473
- return mcpResult12(data);
16608
+ return mcpResult12(redactPreviewList(data));
16474
16609
  }
16475
16610
  case "preview_get": {
16476
16611
  assertParam(flowId, "flowId", "preview_get");
@@ -16480,7 +16615,7 @@ async function flowManageHandlerBody(client, input) {
16480
16615
  flowId,
16481
16616
  previewId
16482
16617
  });
16483
- return mcpResult12(data);
16618
+ return mcpResult12(redactPreview(data));
16484
16619
  }
16485
16620
  case "preview_create": {
16486
16621
  assertParam(flowId, "flowId", "preview_create");
@@ -16496,7 +16631,7 @@ async function flowManageHandlerBody(client, input) {
16496
16631
  ...source ? { source } : {},
16497
16632
  ...siteUrl ? { siteUrl } : {}
16498
16633
  });
16499
- return mcpResult12(preview, {
16634
+ return mcpResult12(redactPreview(preview), {
16500
16635
  next: [
16501
16636
  'Open activationUrl on your site to activate preview mode. When activationUrl is null, no grant has been minted for a site yet \u2014 use action "preview_regrant" with your site origins to mint one.',
16502
16637
  "Poll observeFeed (observe_journeys with this flowId) to watch preview events arrive."
@@ -16531,11 +16666,12 @@ async function flowManageHandlerBody(client, input) {
16531
16666
  projectId: resolvedProjectId,
16532
16667
  flowId,
16533
16668
  previewId,
16534
- origins: origins ?? []
16669
+ origins: origins ?? [],
16670
+ ...sessionId ? { sessionId } : {}
16535
16671
  });
16536
- return mcpResult12(data, {
16672
+ return mcpResult12(redactPreview(data), {
16537
16673
  next: [
16538
- "Open activationUrl on the target origin to activate preview mode."
16674
+ sessionId ? "Open activationUrl on the target origin: it activates the web preview AND forwards its events to the observe session. Use sessionGrant as the X-Walkeros-Preview header for direct server-hop test events." : "Open activationUrl on the target origin to activate preview mode."
16539
16675
  ]
16540
16676
  });
16541
16677
  }
@@ -17639,6 +17775,7 @@ import {
17639
17775
  getPreview,
17640
17776
  createPreview,
17641
17777
  deletePreview,
17778
+ regrantPreview,
17642
17779
  listSecrets,
17643
17780
  createSecret,
17644
17781
  updateSecret,
@@ -17708,11 +17845,14 @@ var HttpToolClient = class {
17708
17845
  return getPreview(options);
17709
17846
  }
17710
17847
  async createPreview(options) {
17711
- return createPreview(options);
17848
+ return createPreview({ ...options, url: options.url ?? options.siteUrl });
17712
17849
  }
17713
17850
  async deletePreview(options) {
17714
17851
  return deletePreview(options);
17715
17852
  }
17853
+ async regrantPreview(options) {
17854
+ return regrantPreview(options);
17855
+ }
17716
17856
  async listSecrets(options) {
17717
17857
  return listSecrets(options);
17718
17858
  }
@@ -17790,7 +17930,7 @@ var HttpToolClient = class {
17790
17930
  };
17791
17931
 
17792
17932
  // src/stdio.ts
17793
- setClientContext({ type: "mcp", version: "4.3.0-next-1784055686454" });
17933
+ setClientContext({ type: "mcp", version: "4.3.0" });
17794
17934
  process.on("uncaughtException", (err) => {
17795
17935
  const emitter = getMcpEmitterSingleton();
17796
17936
  if (emitter) {
@@ -17810,7 +17950,7 @@ process.on("unhandledRejection", (reason) => {
17810
17950
  async function main() {
17811
17951
  const server = createWalkerOSMcpServer({
17812
17952
  client: new HttpToolClient(),
17813
- version: "4.3.0-next-1784055686454"
17953
+ version: "4.3.0"
17814
17954
  });
17815
17955
  const transport = new StdioServerTransport();
17816
17956
  await server.connect(transport);
@@ -17820,7 +17960,7 @@ main().catch(async (error) => {
17820
17960
  try {
17821
17961
  const emitter = await createMcpEmitter({
17822
17962
  clientInfo: void 0,
17823
- packageVersion: "4.3.0-next-1784055686454"
17963
+ packageVersion: "4.3.0"
17824
17964
  });
17825
17965
  await emitter.emitError("startup");
17826
17966
  } catch {