@capxul/mcp 4.20.0-beta.36 → 4.20.0-beta.38

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.
@@ -1,4 +1,4 @@
1
- import { Gn as CapxulError, H as asCapxulError, R as abandonPrepared, Wn as Errors, a as prepareConfiguration, d as verifiedPreparation, f as buildCommand, i as authorInvitation, l as preparePermission, mt as CAPXUL_OPERATIONS, nn as absurd, o as verifiedConfiguration, p as validateReplacementInput, u as preparedIdentity } from "./organizations-BOE0gw6K.mjs";
1
+ import { B as abandonPrepared, Kt as CAPXUL_OPERATIONS, Ln as absurd, W as asCapxulError, a as prepareConfiguration, bt as noSessionError, d as verifiedPreparation, f as buildCommand, i as authorInvitation, l as preparePermission, o as verifiedConfiguration, or as CapxulError, p as validateReplacementInput, u as preparedIdentity } from "./organizations-CbI6_Azw.mjs";
2
2
  //#region ../../packages/sdk/src/accounts/permission-approvals.ts
3
3
  /** Prepare a Permission write or an invitation's configuration for `signerAddress`, checked. */
4
4
  function prepareVerifiedPermissionChange(deps, input, signerAddress, signal) {
@@ -65,7 +65,7 @@ async function prepareVerifiedPermissionWrite(deps, input, signerAddress, signal
65
65
  const session = deps.actor?.authSession() ?? null;
66
66
  if (session === null || deps.chainId === void 0) return {
67
67
  ok: false,
68
- error: Errors.notAuthenticated()
68
+ error: noSessionError(deps.actor)
69
69
  };
70
70
  const built = command(input.permission);
71
71
  if (!built.ok) return built;
@@ -96,7 +96,7 @@ async function prepareVerifiedInvitation(deps, input, signerAddress, signal) {
96
96
  const session = deps.actor?.authSession() ?? null;
97
97
  if (session === null || deps.chainId === void 0) return {
98
98
  ok: false,
99
- error: Errors.notAuthenticated()
99
+ error: noSessionError(deps.actor)
100
100
  };
101
101
  const orgId = input.organizationId;
102
102
  const authored = await authorInvitation(deps, orgId, input.invite, signal, void 0);
@@ -2620,6 +2620,13 @@ function setupIntegration(client, integration, integrationIndex) {
2620
2620
  }
2621
2621
  DEBUG_BUILD$1 && debug.log(`Integration installed: ${integration.name}`);
2622
2622
  }
2623
+ /**
2624
+ * Define an integration function that can be used to create an integration instance.
2625
+ * Note that this by design hides the implementation details of the integration, as they are considered internal.
2626
+ */
2627
+ function defineIntegration(fn) {
2628
+ return fn;
2629
+ }
2623
2630
  //#endregion
2624
2631
  //#region ../../node_modules/.pnpm/@sentry+core@9.47.1/node_modules/@sentry/core/build/esm/utils/clientreport.js
2625
2632
  /**
@@ -3619,6 +3626,61 @@ function applySdkMetadata(options, name, names = [name], source = "npm") {
3619
3626
  options._metadata = metadata;
3620
3627
  }
3621
3628
  //#endregion
3629
+ //#region ../../node_modules/.pnpm/@sentry+core@9.47.1/node_modules/@sentry/core/build/esm/utils/aggregate-errors.js
3630
+ /**
3631
+ * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.
3632
+ */
3633
+ function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, key, limit, event, hint) {
3634
+ if (!event.exception?.values || !hint || !isInstanceOf(hint.originalException, Error)) return;
3635
+ const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0;
3636
+ if (originalException) event.exception.values = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, hint.originalException, key, event.exception.values, originalException, 0);
3637
+ }
3638
+ function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) {
3639
+ if (prevExceptions.length >= limit + 1) return prevExceptions;
3640
+ let newExceptions = [...prevExceptions];
3641
+ if (isInstanceOf(error[key], Error)) {
3642
+ applyExceptionGroupFieldsForParentException(exception, exceptionId);
3643
+ const newException = exceptionFromErrorImplementation(parser, error[key]);
3644
+ const newExceptionId = newExceptions.length;
3645
+ applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);
3646
+ newExceptions = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error[key], key, [newException, ...newExceptions], newException, newExceptionId);
3647
+ }
3648
+ if (Array.isArray(error.errors)) error.errors.forEach((childError, i) => {
3649
+ if (isInstanceOf(childError, Error)) {
3650
+ applyExceptionGroupFieldsForParentException(exception, exceptionId);
3651
+ const newException = exceptionFromErrorImplementation(parser, childError);
3652
+ const newExceptionId = newExceptions.length;
3653
+ applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);
3654
+ newExceptions = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, childError, key, [newException, ...newExceptions], newException, newExceptionId);
3655
+ }
3656
+ });
3657
+ return newExceptions;
3658
+ }
3659
+ function applyExceptionGroupFieldsForParentException(exception, exceptionId) {
3660
+ exception.mechanism = exception.mechanism || {
3661
+ type: "generic",
3662
+ handled: true
3663
+ };
3664
+ exception.mechanism = {
3665
+ ...exception.mechanism,
3666
+ ...exception.type === "AggregateError" && { is_exception_group: true },
3667
+ exception_id: exceptionId
3668
+ };
3669
+ }
3670
+ function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) {
3671
+ exception.mechanism = exception.mechanism || {
3672
+ type: "generic",
3673
+ handled: true
3674
+ };
3675
+ exception.mechanism = {
3676
+ ...exception.mechanism,
3677
+ type: "chained",
3678
+ source,
3679
+ exception_id: exceptionId,
3680
+ parent_id: parentId
3681
+ };
3682
+ }
3683
+ //#endregion
3622
3684
  //#region ../../node_modules/.pnpm/@sentry+core@9.47.1/node_modules/@sentry/core/build/esm/utils/supports.js
3623
3685
  /**
3624
3686
  * isNative checks if the given function is a native implementation
@@ -4087,4 +4149,39 @@ const extractSafariExtensionDetails = (func, filename) => {
4087
4149
  return isSafariExtension || isSafariWebExtension ? [func.indexOf("@") !== -1 ? func.split("@")[0] : "?", isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`] : [func, filename];
4088
4150
  };
4089
4151
  //#endregion
4090
- export { BrowserClient, defaultStackParser, makeFetchTransport };
4152
+ //#region ../../node_modules/.pnpm/@sentry+browser@9.47.1/node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js
4153
+ const DEFAULT_KEY = "cause";
4154
+ const DEFAULT_LIMIT = 5;
4155
+ const INTEGRATION_NAME = "LinkedErrors";
4156
+ const _linkedErrorsIntegration = ((options = {}) => {
4157
+ const limit = options.limit || DEFAULT_LIMIT;
4158
+ const key = options.key || DEFAULT_KEY;
4159
+ return {
4160
+ name: INTEGRATION_NAME,
4161
+ preprocessEvent(event, hint, client) {
4162
+ applyAggregateErrorsToEvent(exceptionFromError, client.getOptions().stackParser, key, limit, event, hint);
4163
+ }
4164
+ };
4165
+ });
4166
+ /**
4167
+ * Aggregrate linked errors in an event.
4168
+ */
4169
+ const linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);
4170
+ //#endregion
4171
+ //#region ../../node_modules/.pnpm/@openfort+openfort-js@2.6.1_@typescript+typescript6@6.0.2/node_modules/@openfort/openfort-js/dist/sdk/src/core/errors/sentryClient.js
4172
+ /**
4173
+ * The only pieces of `@sentry/browser` the SDK uses, imported by name so
4174
+ * bundlers drop the rest (Replay, Feedback, …). Loaded lazily by
4175
+ * `InternalSentry.init` — never import this module statically.
4176
+ */
4177
+ function createSentryClient(options) {
4178
+ return new BrowserClient({
4179
+ ...options,
4180
+ integrations: [linkedErrorsIntegration()],
4181
+ stackParser: defaultStackParser,
4182
+ transport: makeFetchTransport,
4183
+ sendDefaultPii: false
4184
+ });
4185
+ }
4186
+ //#endregion
4187
+ export { createSentryClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/mcp",
3
- "version": "4.20.0-beta.36",
3
+ "version": "4.20.0-beta.38",
4
4
  "private": false,
5
5
  "description": "Capxul MCP server for auth, Account readiness, identity, Organizations, relationships, requests, destinations, and testnet funding over Streamable HTTP.",
6
6
  "keywords": [
@@ -54,8 +54,9 @@
54
54
  "typescript": "npm:@typescript/typescript6@6.0.2",
55
55
  "vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
56
56
  "vite-plus": "1.0.0",
57
- "@capxul/protocol": "0.2.0-beta.7",
58
- "@capxul/sdk": "4.20.0-beta.36",
57
+ "@capxul/observability": "4.20.0-beta.38",
58
+ "@capxul/protocol": "0.2.0-beta.8",
59
+ "@capxul/sdk": "4.20.0-beta.38",
59
60
  "@capxul/typescript-config": "0.0.0"
60
61
  },
61
62
  "scripts": {