botshield-sdk 2.0.0 → 2.0.1

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.
Files changed (143) hide show
  1. package/README.md +8 -11
  2. package/bin/mcp-server.js +45 -55
  3. package/bin/mcp-server.js.map +17 -17
  4. package/dist/commonjs/funcs/census-create-session.d.ts +1 -1
  5. package/dist/commonjs/funcs/census-create-session.js +1 -1
  6. package/dist/commonjs/funcs/census-create-verification-link.js +1 -1
  7. package/dist/commonjs/funcs/census-create-verification-link.js.map +1 -1
  8. package/dist/commonjs/funcs/census-get-partner-config.js +0 -6
  9. package/dist/commonjs/funcs/census-get-partner-config.js.map +1 -1
  10. package/dist/commonjs/funcs/census-logout.d.ts +1 -1
  11. package/dist/commonjs/funcs/census-logout.js +1 -1
  12. package/dist/commonjs/funcs/census-verify-token.js +0 -6
  13. package/dist/commonjs/funcs/census-verify-token.js.map +1 -1
  14. package/dist/commonjs/funcs/verification-get-status.js +0 -6
  15. package/dist/commonjs/funcs/verification-get-status.js.map +1 -1
  16. package/dist/commonjs/lib/config.d.ts +3 -3
  17. package/dist/commonjs/lib/config.js +3 -3
  18. package/dist/commonjs/lib/encodings.d.ts +10 -9
  19. package/dist/commonjs/lib/encodings.d.ts.map +1 -1
  20. package/dist/commonjs/lib/encodings.js +29 -13
  21. package/dist/commonjs/lib/encodings.js.map +1 -1
  22. package/dist/commonjs/lib/security.d.ts.map +1 -1
  23. package/dist/commonjs/lib/security.js +0 -7
  24. package/dist/commonjs/lib/security.js.map +1 -1
  25. package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
  26. package/dist/commonjs/mcp-server/cli/start/command.js +0 -8
  27. package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
  28. package/dist/commonjs/mcp-server/cli/start/impl.d.ts +0 -1
  29. package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
  30. package/dist/commonjs/mcp-server/cli/start/impl.js +0 -2
  31. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  32. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  33. package/dist/commonjs/mcp-server/server.js +1 -1
  34. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js +1 -1
  35. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js.map +1 -1
  36. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js +1 -1
  37. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js.map +1 -1
  38. package/dist/commonjs/mcp-server/tools/actions-propose-action.js +1 -1
  39. package/dist/commonjs/mcp-server/tools/actions-propose-action.js.map +1 -1
  40. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +13 -3
  41. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/sdk-create-verification-link.js +4 -4
  43. package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
  44. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts +0 -2
  45. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts.map +1 -1
  46. package/dist/commonjs/models/operations/sdk-get-partner-config.js +0 -2
  47. package/dist/commonjs/models/operations/sdk-get-partner-config.js.map +1 -1
  48. package/dist/commonjs/models/operations/sdk-verify-token.d.ts +0 -2
  49. package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
  50. package/dist/commonjs/models/operations/sdk-verify-token.js +0 -2
  51. package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
  52. package/dist/commonjs/models/operations/verification-get-status.d.ts +10 -2
  53. package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
  54. package/dist/commonjs/models/operations/verification-get-status.js +4 -2
  55. package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
  56. package/dist/commonjs/models/security.d.ts +0 -2
  57. package/dist/commonjs/models/security.d.ts.map +1 -1
  58. package/dist/commonjs/models/security.js +0 -2
  59. package/dist/commonjs/models/security.js.map +1 -1
  60. package/dist/commonjs/sdk/census.d.ts +2 -2
  61. package/dist/commonjs/sdk/census.js +2 -2
  62. package/dist/esm/funcs/census-create-session.d.ts +1 -1
  63. package/dist/esm/funcs/census-create-session.js +1 -1
  64. package/dist/esm/funcs/census-create-verification-link.js +1 -1
  65. package/dist/esm/funcs/census-create-verification-link.js.map +1 -1
  66. package/dist/esm/funcs/census-get-partner-config.js +0 -6
  67. package/dist/esm/funcs/census-get-partner-config.js.map +1 -1
  68. package/dist/esm/funcs/census-logout.d.ts +1 -1
  69. package/dist/esm/funcs/census-logout.js +1 -1
  70. package/dist/esm/funcs/census-verify-token.js +0 -6
  71. package/dist/esm/funcs/census-verify-token.js.map +1 -1
  72. package/dist/esm/funcs/verification-get-status.js +0 -6
  73. package/dist/esm/funcs/verification-get-status.js.map +1 -1
  74. package/dist/esm/lib/config.d.ts +3 -3
  75. package/dist/esm/lib/config.js +3 -3
  76. package/dist/esm/lib/encodings.d.ts +10 -9
  77. package/dist/esm/lib/encodings.d.ts.map +1 -1
  78. package/dist/esm/lib/encodings.js +29 -13
  79. package/dist/esm/lib/encodings.js.map +1 -1
  80. package/dist/esm/lib/security.d.ts.map +1 -1
  81. package/dist/esm/lib/security.js +0 -7
  82. package/dist/esm/lib/security.js.map +1 -1
  83. package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
  84. package/dist/esm/mcp-server/cli/start/command.js +0 -8
  85. package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
  86. package/dist/esm/mcp-server/cli/start/impl.d.ts +0 -1
  87. package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
  88. package/dist/esm/mcp-server/cli/start/impl.js +0 -2
  89. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  90. package/dist/esm/mcp-server/mcp-server.js +1 -1
  91. package/dist/esm/mcp-server/server.js +1 -1
  92. package/dist/esm/mcp-server/tools/actions-cancel-action.js +1 -1
  93. package/dist/esm/mcp-server/tools/actions-cancel-action.js.map +1 -1
  94. package/dist/esm/mcp-server/tools/actions-check-action-status.js +1 -1
  95. package/dist/esm/mcp-server/tools/actions-check-action-status.js.map +1 -1
  96. package/dist/esm/mcp-server/tools/actions-propose-action.js +1 -1
  97. package/dist/esm/mcp-server/tools/actions-propose-action.js.map +1 -1
  98. package/dist/esm/models/operations/sdk-create-verification-link.d.ts +13 -3
  99. package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  100. package/dist/esm/models/operations/sdk-create-verification-link.js +4 -4
  101. package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
  102. package/dist/esm/models/operations/sdk-get-partner-config.d.ts +0 -2
  103. package/dist/esm/models/operations/sdk-get-partner-config.d.ts.map +1 -1
  104. package/dist/esm/models/operations/sdk-get-partner-config.js +0 -2
  105. package/dist/esm/models/operations/sdk-get-partner-config.js.map +1 -1
  106. package/dist/esm/models/operations/sdk-verify-token.d.ts +0 -2
  107. package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
  108. package/dist/esm/models/operations/sdk-verify-token.js +0 -2
  109. package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
  110. package/dist/esm/models/operations/verification-get-status.d.ts +10 -2
  111. package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
  112. package/dist/esm/models/operations/verification-get-status.js +4 -2
  113. package/dist/esm/models/operations/verification-get-status.js.map +1 -1
  114. package/dist/esm/models/security.d.ts +0 -2
  115. package/dist/esm/models/security.d.ts.map +1 -1
  116. package/dist/esm/models/security.js +0 -2
  117. package/dist/esm/models/security.js.map +1 -1
  118. package/dist/esm/sdk/census.d.ts +2 -2
  119. package/dist/esm/sdk/census.js +2 -2
  120. package/jsr.json +1 -1
  121. package/package.json +2 -2
  122. package/src/funcs/census-create-session.ts +1 -1
  123. package/src/funcs/census-create-verification-link.ts +1 -1
  124. package/src/funcs/census-get-partner-config.ts +0 -7
  125. package/src/funcs/census-logout.ts +1 -1
  126. package/src/funcs/census-verify-token.ts +0 -7
  127. package/src/funcs/verification-get-status.ts +0 -7
  128. package/src/lib/config.ts +3 -3
  129. package/src/lib/encodings.ts +58 -23
  130. package/src/lib/security.ts +0 -7
  131. package/src/mcp-server/cli/start/command.ts +0 -8
  132. package/src/mcp-server/cli/start/impl.ts +0 -3
  133. package/src/mcp-server/mcp-server.ts +1 -1
  134. package/src/mcp-server/server.ts +1 -1
  135. package/src/mcp-server/tools/actions-cancel-action.ts +1 -1
  136. package/src/mcp-server/tools/actions-check-action-status.ts +1 -1
  137. package/src/mcp-server/tools/actions-propose-action.ts +1 -1
  138. package/src/models/operations/sdk-create-verification-link.ts +17 -7
  139. package/src/models/operations/sdk-get-partner-config.ts +0 -4
  140. package/src/models/operations/sdk-verify-token.ts +0 -4
  141. package/src/models/operations/verification-get-status.ts +10 -4
  142. package/src/models/security.ts +0 -4
  143. package/src/sdk/census.ts +2 -2
package/README.md CHANGED
@@ -14,13 +14,13 @@ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *
14
14
 
15
15
  BotShield API: Human presence verification protocol.
16
16
 
17
- **Census** — a partner gate (checkout, sign-up, any action moment) asks whether a live human is present. The client pre-check returns the two-result-state contract `result_state: human_verified | unavailable`; when presence is required the person confirms with a device biometric in the BotShield app and the gate receives an ES256 attestation JWT, verifiable against the public JWKS at /.well-known/jwks.json. No identity crosses the boundary.
17
+ **BotShield Human Verification** — a BotShield Gate (checkout, sign-up, any action moment) asks whether a live human is present. The client pre-check returns the two-result-state contract `result_state: human_verified | unavailable`; when presence is required the person confirms with a device biometric in the BotShield app and the gate receives an ES256 attestation JWT, verifiable against the public JWKS at /.well-known/jwks.json. No identity crosses the boundary.
18
18
 
19
19
  **Agents Ask** — an agent proposes an action; the human confirms in the BotShield app and BotShield signs a Proof of Resolution JWT.
20
20
 
21
21
  **Frontend:** load the BotShield client script from https://cdn.botshield.ai/sdk.js and place the botshield-verify element.
22
22
 
23
- **Backend SDK:** install `botshield-sdk` from npm and use `client.sdk.*`, `client.verification.*`, `client.actions.*`.
23
+ **Backend SDK:** install `botshield-sdk` from npm and use `client.census.*`, `client.verification.*`, `client.actions.*`.
24
24
 
25
25
  **Response envelope:** every operation answers HTTP 200 with `{ data: ... }`. Most carry the result one level deeper (`data.data`); `logout` and `verification/status` carry it directly. Handler errors are also HTTP 200 — `data.error = { message, statusCode }` — so check `data.error` before reading a result. HTTP 400 is reserved for input validation (`InvalidInputError`), 500 for unhandled failures.
26
26
  <!-- End Summary [summary] -->
@@ -101,8 +101,7 @@ Add the following server definition to your `claude_desktop_config.json` file:
101
101
  "--",
102
102
  "mcp", "start",
103
103
  "--agent-key-auth", "...",
104
- "--agent-key-auth1", "...",
105
- "--agent-key-auth2", "..."
104
+ "--agent-key-auth1", "..."
106
105
  ]
107
106
  }
108
107
  }
@@ -126,8 +125,7 @@ Create a `.cursor/mcp.json` file in your project root with the following content
126
125
  "--",
127
126
  "mcp", "start",
128
127
  "--agent-key-auth", "...",
129
- "--agent-key-auth1", "...",
130
- "--agent-key-auth2", "..."
128
+ "--agent-key-auth1", "..."
131
129
  ]
132
130
  }
133
131
  }
@@ -207,7 +205,6 @@ This SDK supports the following security schemes globally:
207
205
  | --------------- | ------ | ------- |
208
206
  | `agentKeyAuth` | apiKey | API key |
209
207
  | `agentKeyAuth1` | apiKey | API key |
210
- | `agentKeyAuth2` | apiKey | API key |
211
208
 
212
209
  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
213
210
  ```typescript
@@ -267,14 +264,14 @@ run();
267
264
 
268
265
  ### [Census](docs/sdks/census/README.md)
269
266
 
270
- * [createSession](docs/sdks/census/README.md#createsession) - Create an Anchor Grant Window
267
+ * [createSession](docs/sdks/census/README.md#createsession) - Create a grant token
271
268
  * [createVerificationLink](docs/sdks/census/README.md#createverificationlink) - Create a verification request
272
269
  * [verifyToken](docs/sdks/census/README.md#verifytoken) - Validate a verification token
273
270
  * [storeSignal](docs/sdks/census/README.md#storesignal) - Store a Signal Pixel bot score
274
271
  * [validateSignal](docs/sdks/census/README.md#validatesignal) - Validate a signal token
275
272
  * [getPartnerConfig](docs/sdks/census/README.md#getpartnerconfig) - Get partner configuration
276
273
  * [revokeVerification](docs/sdks/census/README.md#revokeverification) - Revoke a pending verification
277
- * [logout](docs/sdks/census/README.md#logout) - Revoke an Anchor Grant Window token
274
+ * [logout](docs/sdks/census/README.md#logout) - Revoke a grant token
278
275
 
279
276
  ### [Verification](docs/sdks/verification/README.md)
280
277
 
@@ -301,10 +298,10 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
301
298
  - [`actionsCancelAction`](docs/sdks/actions/README.md#cancelaction) - Cancel a queued action proposal
302
299
  - [`actionsCheckActionStatus`](docs/sdks/actions/README.md#checkactionstatus) - Check action proposal status
303
300
  - [`actionsProposeAction`](docs/sdks/actions/README.md#proposeaction) - Propose an action for human confirmation
304
- - [`censusCreateSession`](docs/sdks/census/README.md#createsession) - Create an Anchor Grant Window
301
+ - [`censusCreateSession`](docs/sdks/census/README.md#createsession) - Create a grant token
305
302
  - [`censusCreateVerificationLink`](docs/sdks/census/README.md#createverificationlink) - Create a verification request
306
303
  - [`censusGetPartnerConfig`](docs/sdks/census/README.md#getpartnerconfig) - Get partner configuration
307
- - [`censusLogout`](docs/sdks/census/README.md#logout) - Revoke an Anchor Grant Window token
304
+ - [`censusLogout`](docs/sdks/census/README.md#logout) - Revoke a grant token
308
305
  - [`censusRevokeVerification`](docs/sdks/census/README.md#revokeverification) - Revoke a pending verification
309
306
  - [`censusStoreSignal`](docs/sdks/census/README.md#storesignal) - Store a Signal Pixel bot score
310
307
  - [`censusValidateSignal`](docs/sdks/census/README.md#validatesignal) - Validate a signal token
package/bin/mcp-server.js CHANGED
@@ -47249,9 +47249,9 @@ var init_config = __esm(() => {
47249
47249
  SDK_METADATA = {
47250
47250
  language: "typescript",
47251
47251
  openapiDocVersion: "2.0.0",
47252
- sdkVersion: "2.0.0",
47253
- genVersion: "2.918.3",
47254
- userAgent: "speakeasy-sdk/typescript 2.0.0 2.918.3 2.0.0 botshield-sdk"
47252
+ sdkVersion: "2.0.1",
47253
+ genVersion: "2.934.1",
47254
+ userAgent: "speakeasy-sdk/typescript 2.0.1 2.934.1 2.0.0 botshield-sdk"
47255
47255
  };
47256
47256
  });
47257
47257
 
@@ -47348,6 +47348,19 @@ function isPlainObject3(value) {
47348
47348
  var init_primitives = () => {};
47349
47349
 
47350
47350
  // src/lib/encodings.ts
47351
+ function encodeKeyChars(v, charEncoding) {
47352
+ return encodeChars(v, charEncoding === "percentExceptReserved" ? "percent" : charEncoding);
47353
+ }
47354
+ function encodeChars(v, charEncoding) {
47355
+ switch (charEncoding) {
47356
+ case "percent":
47357
+ return encodeURIComponent(v);
47358
+ case "percentExceptReserved":
47359
+ return encodeURIComponent(v).replace(reservedEscapes, (m) => decodeURIComponent(m));
47360
+ default:
47361
+ return v;
47362
+ }
47363
+ }
47351
47364
  function formEncoder(sep) {
47352
47365
  return (key, value, options) => {
47353
47366
  let out = "";
@@ -47356,7 +47369,7 @@ function formEncoder(sep) {
47356
47369
  return;
47357
47370
  }
47358
47371
  const encodeString = (v) => {
47359
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
47372
+ return encodeChars(v, options?.charEncoding);
47360
47373
  };
47361
47374
  const encodeValue = (v) => encodeString(serializeValue(v));
47362
47375
  const encodedSep = encodeString(sep);
@@ -47377,7 +47390,7 @@ function formEncoder(sep) {
47377
47390
  if (encValue == null) {
47378
47391
  return;
47379
47392
  }
47380
- tmp = `${encodeString(pk)}=${encValue}`;
47393
+ tmp = `${encodeKeyChars(pk, options?.charEncoding)}=${encValue}`;
47381
47394
  if (!tmp || tmp === "=") {
47382
47395
  return;
47383
47396
  }
@@ -47401,7 +47414,7 @@ function encodeDeepObjectObject(key, value, options) {
47401
47414
  }
47402
47415
  let out = "";
47403
47416
  const encodeString = (v) => {
47404
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
47417
+ return encodeChars(v, options?.charEncoding);
47405
47418
  };
47406
47419
  if (!isPlainObject3(value)) {
47407
47420
  throw new EncodingError(`Expected parameter '${key}' to be an object.`);
@@ -47418,7 +47431,7 @@ function encodeDeepObjectObject(key, value, options) {
47418
47431
  }
47419
47432
  const pairs = Array.isArray(cv) ? cv : [cv];
47420
47433
  const encoded = mapDefined(pairs, (v) => {
47421
- return `${encodeString(pk)}=${encodeString(serializeValue(v))}`;
47434
+ return `${encodeKeyChars(pk, options?.charEncoding)}=${encodeString(serializeValue(v))}`;
47422
47435
  })?.join("&");
47423
47436
  out += encoded == null ? "" : `&${encoded}`;
47424
47437
  });
@@ -47429,10 +47442,10 @@ function encodeJSON(key, value, options) {
47429
47442
  return;
47430
47443
  }
47431
47444
  const encodeString = (v) => {
47432
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
47445
+ return encodeChars(v, options?.charEncoding);
47433
47446
  };
47434
47447
  const encVal = encodeString(JSON.stringify(value, jsonReplacer));
47435
- return options?.explode ? encVal : `${encodeString(key)}=${encVal}`;
47448
+ return options?.explode ? encVal : `${encodeKeyChars(key, options?.charEncoding)}=${encVal}`;
47436
47449
  }
47437
47450
  function explode(key, value) {
47438
47451
  if (Array.isArray(value)) {
@@ -47514,7 +47527,7 @@ function queryEncoder(f) {
47514
47527
  };
47515
47528
  return bulkEncode;
47516
47529
  }
47517
- var EncodingError, encodeForm, encodeSpaceDelimited, encodePipeDelimited, encodeJSONQuery, encodeFormQuery, encodeSpaceDelimitedQuery, encodePipeDelimitedQuery, encodeDeepObjectQuery;
47530
+ var EncodingError, reservedEscapes, encodeForm, encodeSpaceDelimited, encodePipeDelimited, encodeJSONQuery, encodeFormQuery, encodeSpaceDelimitedQuery, encodePipeDelimitedQuery, encodeDeepObjectQuery;
47518
47531
  var init_encodings = __esm(() => {
47519
47532
  init_base64();
47520
47533
  init_primitives();
@@ -47524,6 +47537,7 @@ var init_encodings = __esm(() => {
47524
47537
  this.name = "EncodingError";
47525
47538
  }
47526
47539
  };
47540
+ reservedEscapes = /%(2[346bcf]|3[abdf]|40|5[bd])/gi;
47527
47541
  encodeForm = formEncoder(",");
47528
47542
  encodeSpaceDelimited = formEncoder(" ");
47529
47543
  encodePipeDelimited = formEncoder("|");
@@ -48733,13 +48747,6 @@ function resolveGlobalSecurity(security, allowedFields) {
48733
48747
  type: "apiKey:header",
48734
48748
  value: security?.agentKeyAuth1
48735
48749
  }
48736
- ],
48737
- [
48738
- {
48739
- fieldName: "Authorization",
48740
- type: "apiKey:header",
48741
- value: security?.agentKeyAuth2
48742
- }
48743
48750
  ]
48744
48751
  ];
48745
48752
  if (allowedFields) {
@@ -48969,13 +48976,11 @@ var init_security2 = __esm(() => {
48969
48976
  init_primitives2();
48970
48977
  Security$inboundSchema = objectType({
48971
48978
  agentKeyAuth: optional3(string4()),
48972
- agentKeyAuth1: optional3(string4()),
48973
- agentKeyAuth2: optional3(string4())
48979
+ agentKeyAuth1: optional3(string4())
48974
48980
  });
48975
48981
  Security$outboundSchema = objectType({
48976
48982
  agentKeyAuth: stringType().optional(),
48977
- agentKeyAuth1: stringType().optional(),
48978
- agentKeyAuth2: stringType().optional()
48983
+ agentKeyAuth1: stringType().optional()
48979
48984
  });
48980
48985
  });
48981
48986
 
@@ -49509,17 +49514,17 @@ var init_sdk_create_verification_link = __esm(() => {
49509
49514
  Private: "private"
49510
49515
  };
49511
49516
  SDKCreateVerificationLinkSecurity$inboundSchema = objectType({
49512
- ApiKeyAuth: string4()
49517
+ GrantTokenAuth: string4()
49513
49518
  }).transform((v) => {
49514
49519
  return remap(v, {
49515
- ApiKeyAuth: "apiKeyAuth"
49520
+ GrantTokenAuth: "grantTokenAuth"
49516
49521
  });
49517
49522
  });
49518
49523
  SDKCreateVerificationLinkSecurity$outboundSchema = objectType({
49519
- apiKeyAuth: stringType()
49524
+ grantTokenAuth: stringType()
49520
49525
  }).transform((v) => {
49521
49526
  return remap(v, {
49522
- apiKeyAuth: "ApiKeyAuth"
49527
+ grantTokenAuth: "GrantTokenAuth"
49523
49528
  });
49524
49529
  });
49525
49530
  SDKTypeRequest$inboundSchema = nativeEnumType(SDKTypeRequest);
@@ -49660,13 +49665,11 @@ var init_sdk_get_partner_config = __esm(() => {
49660
49665
  };
49661
49666
  SDKGetPartnerConfigSecurity$inboundSchema = objectType({
49662
49667
  apiKeyAuth: optional3(string4()),
49663
- apiKeyAuth1: optional3(string4()),
49664
- apiKeyAuth2: optional3(string4())
49668
+ apiKeyAuth1: optional3(string4())
49665
49669
  });
49666
49670
  SDKGetPartnerConfigSecurity$outboundSchema = objectType({
49667
49671
  apiKeyAuth: stringType().optional(),
49668
- apiKeyAuth1: stringType().optional(),
49669
- apiKeyAuth2: stringType().optional()
49672
+ apiKeyAuth1: stringType().optional()
49670
49673
  });
49671
49674
  SDKGetPartnerConfigRequest$inboundSchema = objectType({
49672
49675
  site_key: string4()
@@ -50039,13 +50042,11 @@ var init_sdk_verify_token = __esm(() => {
50039
50042
  init_models();
50040
50043
  SDKVerifyTokenSecurity$inboundSchema = objectType({
50041
50044
  apiKeyAuth: optional3(string4()),
50042
- apiKeyAuth1: optional3(string4()),
50043
- apiKeyAuth2: optional3(string4())
50045
+ apiKeyAuth1: optional3(string4())
50044
50046
  });
50045
50047
  SDKVerifyTokenSecurity$outboundSchema = objectType({
50046
50048
  apiKeyAuth: stringType().optional(),
50047
- apiKeyAuth1: stringType().optional(),
50048
- apiKeyAuth2: stringType().optional()
50049
+ apiKeyAuth1: stringType().optional()
50049
50050
  });
50050
50051
  SDKVerifyTokenRequest$inboundSchema = objectType({
50051
50052
  token: string4()
@@ -50132,6 +50133,7 @@ var init_verification_get_status = __esm(() => {
50132
50133
  VerificationGetStatusStatus = {
50133
50134
  Pending: "pending",
50134
50135
  Completed: "completed",
50136
+ Pass: "pass",
50135
50137
  Expired: "expired",
50136
50138
  Failed: "failed",
50137
50139
  NotFound: "not_found",
@@ -50143,13 +50145,11 @@ var init_verification_get_status = __esm(() => {
50143
50145
  };
50144
50146
  VerificationGetStatusSecurity$inboundSchema = objectType({
50145
50147
  apiKeyAuth: optional3(string4()),
50146
- apiKeyAuth1: optional3(string4()),
50147
- apiKeyAuth2: optional3(string4())
50148
+ apiKeyAuth1: optional3(string4())
50148
50149
  });
50149
50150
  VerificationGetStatusSecurity$outboundSchema = objectType({
50150
50151
  apiKeyAuth: stringType().optional(),
50151
- apiKeyAuth1: stringType().optional(),
50152
- apiKeyAuth2: stringType().optional()
50152
+ apiKeyAuth1: stringType().optional()
50153
50153
  });
50154
50154
  VerificationGetStatusRequest$inboundSchema = objectType({
50155
50155
  request_id: string4()
@@ -50396,7 +50396,7 @@ var init_actions_cancel_action2 = __esm(() => {
50396
50396
  tool$actionsCancelAction = {
50397
50397
  name: "cancel_resolution",
50398
50398
  description: `Stand down a queued resolution before the user responds. No-op once terminal; TTL expiry produces no Resolution.`,
50399
- scopes: ["queue", "queue", "queue"],
50399
+ scopes: ["queue", "queue"],
50400
50400
  args,
50401
50401
  tool: async (client, args2, ctx) => {
50402
50402
  const [result, apiCall] = await actionsCancelAction(client, args2.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
@@ -50502,7 +50502,7 @@ var init_actions_check_action_status2 = __esm(() => {
50502
50502
  tool$actionsCheckActionStatus = {
50503
50503
  name: "check_resolution_status",
50504
50504
  description: `Poll a proposed resolution (pass wait_seconds up to 25 to long-poll). Terminal states (approved/denied) carry the signed Proof of Resolution JWT — verify against BotShield's JWKS; the request_id is the JWT jti.`,
50505
- scopes: ["queue", "queue", "queue"],
50505
+ scopes: ["queue", "queue"],
50506
50506
  args: args2,
50507
50507
  tool: async (client, args3, ctx) => {
50508
50508
  const [result, apiCall] = await actionsCheckActionStatus(client, args3.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
@@ -50604,7 +50604,7 @@ var init_actions_propose_action2 = __esm(() => {
50604
50604
  tool$actionsProposeAction = {
50605
50605
  name: "propose_resolution",
50606
50606
  description: `Propose a human-presence-gated action to a BotShield user (Agents Ask). Returns a card_id immediately; the signed Proof of Resolution arrives async via the agent's registered callback, or poll check_resolution_status.`,
50607
- scopes: ["queue", "queue", "queue"],
50607
+ scopes: ["queue", "queue"],
50608
50608
  args: args3,
50609
50609
  tool: async (client, args4, ctx) => {
50610
50610
  const [result, apiCall] = await actionsProposeAction(client, args4.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
@@ -50624,7 +50624,7 @@ var init_actions_propose_action2 = __esm(() => {
50624
50624
  function createMCPServer(deps) {
50625
50625
  const server = new McpServer({
50626
50626
  name: "BotShield",
50627
- version: "2.0.0"
50627
+ version: "2.0.1"
50628
50628
  });
50629
50629
  const client = new BotShieldCore({
50630
50630
  security: deps.security,
@@ -50682,8 +50682,7 @@ async function startStdio(flags) {
50682
50682
  scopes: flags.scope,
50683
50683
  security: {
50684
50684
  agentKeyAuth: flags["agent-key-auth"] ?? "",
50685
- agentKeyAuth1: flags["agent-key-auth1"] ?? "",
50686
- agentKeyAuth2: flags["agent-key-auth2"] ?? ""
50685
+ agentKeyAuth1: flags["agent-key-auth1"] ?? ""
50687
50686
  },
50688
50687
  serverURL: flags["server-url"],
50689
50688
  serverIdx: flags["server-index"]
@@ -50705,8 +50704,7 @@ async function startSSE(flags) {
50705
50704
  scopes: flags.scope,
50706
50705
  security: {
50707
50706
  agentKeyAuth: flags["agent-key-auth"] ?? "",
50708
- agentKeyAuth1: flags["agent-key-auth1"] ?? "",
50709
- agentKeyAuth2: flags["agent-key-auth2"] ?? ""
50707
+ agentKeyAuth1: flags["agent-key-auth1"] ?? ""
50710
50708
  },
50711
50709
  serverURL: flags["server-url"],
50712
50710
  serverIdx: flags["server-index"]
@@ -52883,14 +52881,6 @@ var startCommand = buildCommand({
52883
52881
  return stringType().parse(value);
52884
52882
  }
52885
52883
  },
52886
- "agent-key-auth2": {
52887
- kind: "parsed",
52888
- brief: "Sets the agentKeyAuth2 auth field for the API",
52889
- optional: true,
52890
- parse: (value) => {
52891
- return stringType().parse(value);
52892
- }
52893
- },
52894
52884
  "server-url": {
52895
52885
  kind: "parsed",
52896
52886
  brief: "Overrides the default server URL used by the SDK",
@@ -52950,7 +52940,7 @@ var routes = buildRouteMap({
52950
52940
  var app = buildApplication(routes, {
52951
52941
  name: "mcp",
52952
52942
  versionInfo: {
52953
- currentVersion: "2.0.0"
52943
+ currentVersion: "2.0.1"
52954
52944
  }
52955
52945
  });
52956
52946
  run(app, process4.argv.slice(2), buildContext(process4));
@@ -52958,5 +52948,5 @@ export {
52958
52948
  app
52959
52949
  };
52960
52950
 
52961
- //# debugId=D0AF0A5E4FD256C764756E2164756E21
52951
+ //# debugId=13E49D19F03A227164756E2164756E21
52962
52952
  //# sourceMappingURL=mcp-server.js.map