@capxul/mcp 4.20.0-beta.29 → 4.20.0-beta.30
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/main.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as __exportAll, o as __require, r as __commonJSMin, s as __toESM } from "./lib-DnmstTkB.mjs";
|
|
3
|
-
import { $ as isSignerNotReadySignal, $t as ChainIdSchema, A as makeApprovalsMethods, An as detectAuthCacheAdapter, At as publicKeyToAddress, B as BASE_SEPOLIA_CHAIN_ID, Bn as redactUrlSecrets, Bt as toBytes, C as makeAccountsMethods, Cn as copyInvocationObservation, Ct as toOrgId, D as ConvexCallPortTag, Dn as toPublishableKey, Dt as isBytes32, E as TelemetryPortTag, En as toAllowedOrigin, Et as images, F as makeDestinationsMethods, Fn as AuthCachePortTag, Ft as concatHex, G as failureEvidenceProps, Gn as CapxulError, Gt as hexToBigInt, H as asCapxulError, Hn as isRecord, Ht as numberToHex, I as makeCheckoutMethods, In as deserializeCapxulError, It as isAddress, J as withCapturedAttemptContext, Jn as isFailureMode, Jt as BaseError, K as observeFailedResult, Kn as isCapxulError, Kt as hexToNumber, L as makeTargetsMethods, Ln as serializeCapxulError, Lt as InvalidAddressError, M as logDroppedEvent, Mn as toEpochMs, Mt as createCursor, N as makeOfframpMethods, Nn as toAuthUserId, Nt as slice, O as convexCallErrorFromCapxul, On as AuthClientError, Ot as hashTypedData, P as makePaymentsMethods, Pn as toEmail, Pt as concat, Q as isEcdsaSignatureHex, Qt as EpochMsSchema, Rn as decodeChainCause, Rt as keccak256, S as PonderIndexerAdapter, Sn as attachInvocationObservation, St as ORGANIZATION_SETUP_STATUSES, T as AccountReadPortTag, Tn as sanitizeObservationContext, Tt as AppIdSchema, U as toPublicError, Un as readField, Ut as stringToHex, V as callOperation, Vn as isCredentialField, Vt as bytesToHex, W as failureDetail, Wn as Errors, Wt as toHex, X as UNOBSERVABLE_SIGNER_STATUS, Xt as isHex, Y as version$2, Yt as size, Z as causeChain, Zt as DurationMsSchema, _ as makePaymentDocumentsMethods, _n as SystemClockLayer, _t as OPERATIONS, an as askIdentity, at as toCountryCode, b as SmartAccountPortTag, bn as BetterAuthBrowserLayer, bt as setups, cn as runPortEffect, ct as toHandle, dn as toCapxulResult, dt as CLI_CAPABILITIES, en as isEvmAddress, et as openfortSignerNotReadyCode, fn as formatTraceparent, ft as CLI_COMMAND_NAMES, g as makeActivityMethods, gn as oauthBearerAuthClient, gt as normalizeCapxulOperation, h as makeMeMethods, hn as carryInvocationParentSpan, ht as isCapxulOperation, in as makeAuthMethods, it as makeClientRequestMethods, j as makeAccountMethods, jn as globalLocalStorage, jt as formatGwei$1, k as bindProductTelemetryInvocation, kn as AuthClientPortTag, kt as toRlp, ln as sessionFromActor, lt as validateHandle, m as bootIdentityFlow, mn as ActorFailure, mt as CAPXUL_OPERATIONS, n as makeOrgMethods, nn as absurd, nt as signerFailure, o as ConvexOrganizationAdapter, on as publicIdentityFailure, ot as toKycTier, p as executeIdentityProductObservation, pn as CAPXUL_ERROR_CODES, pt as CLI_INVOCATION_KINDS, q as observeSdkClient, qn as FAILURE_MODES, qt as trim$1, rn as getFunctionName, rt as makeCurrentUserMethods, s as OrgPortTag, sn as runIdentityFacade, st as toTesterKind, t as ConvexOrganizationSetupAdapter, tn as toAddress, tt as recoverRawDigestSigner, un as runCapxulEffect, ut as redactTelemetryProps, v as makeSmartAccountMethods, vn as ClockPortTag, vt as details, w as ConvexAccountLayer, wn as readInvocationObservation, wt as diagnostics, x as makeHoldingsMethods, xn as observationRequestHeaders, xt as ORGANIZATION_SETUP_REASONS, y as ConvexSmartAccountLayer, yn as BetterAuthNodeLayer, yt as onboardings, z as normalizeSafeSaltEmail, zn as redactSecrets, zt as hexToBytes } from "./organizations-
|
|
3
|
+
import { $ as isSignerNotReadySignal, $t as ChainIdSchema, A as makeApprovalsMethods, An as detectAuthCacheAdapter, At as publicKeyToAddress, B as BASE_SEPOLIA_CHAIN_ID, Bn as redactUrlSecrets, Bt as toBytes, C as makeAccountsMethods, Cn as copyInvocationObservation, Ct as toOrgId, D as ConvexCallPortTag, Dn as toPublishableKey, Dt as isBytes32, E as TelemetryPortTag, En as toAllowedOrigin, Et as images, F as makeDestinationsMethods, Fn as AuthCachePortTag, Ft as concatHex, G as failureEvidenceProps, Gn as CapxulError, Gt as hexToBigInt, H as asCapxulError, Hn as isRecord, Ht as numberToHex, I as makeCheckoutMethods, In as deserializeCapxulError, It as isAddress, J as withCapturedAttemptContext, Jn as isFailureMode, Jt as BaseError, K as observeFailedResult, Kn as isCapxulError, Kt as hexToNumber, L as makeTargetsMethods, Ln as serializeCapxulError, Lt as InvalidAddressError, M as logDroppedEvent, Mn as toEpochMs, Mt as createCursor, N as makeOfframpMethods, Nn as toAuthUserId, Nt as slice, O as convexCallErrorFromCapxul, On as AuthClientError, Ot as hashTypedData, P as makePaymentsMethods, Pn as toEmail, Pt as concat, Q as isEcdsaSignatureHex, Qt as EpochMsSchema, Rn as decodeChainCause, Rt as keccak256, S as PonderIndexerAdapter, Sn as attachInvocationObservation, St as ORGANIZATION_SETUP_STATUSES, T as AccountReadPortTag, Tn as sanitizeObservationContext, Tt as AppIdSchema, U as toPublicError, Un as readField, Ut as stringToHex, V as callOperation, Vn as isCredentialField, Vt as bytesToHex, W as failureDetail, Wn as Errors, Wt as toHex, X as UNOBSERVABLE_SIGNER_STATUS, Xt as isHex, Y as version$2, Yt as size, Z as causeChain, Zt as DurationMsSchema, _ as makePaymentDocumentsMethods, _n as SystemClockLayer, _t as OPERATIONS, an as askIdentity, at as toCountryCode, b as SmartAccountPortTag, bn as BetterAuthBrowserLayer, bt as setups, cn as runPortEffect, ct as toHandle, dn as toCapxulResult, dt as CLI_CAPABILITIES, en as isEvmAddress, et as openfortSignerNotReadyCode, fn as formatTraceparent, ft as CLI_COMMAND_NAMES, g as makeActivityMethods, gn as oauthBearerAuthClient, gt as normalizeCapxulOperation, h as makeMeMethods, hn as carryInvocationParentSpan, ht as isCapxulOperation, in as makeAuthMethods, it as makeClientRequestMethods, j as makeAccountMethods, jn as globalLocalStorage, jt as formatGwei$1, k as bindProductTelemetryInvocation, kn as AuthClientPortTag, kt as toRlp, ln as sessionFromActor, lt as validateHandle, m as bootIdentityFlow, mn as ActorFailure, mt as CAPXUL_OPERATIONS, n as makeOrgMethods, nn as absurd, nt as signerFailure, o as ConvexOrganizationAdapter, on as publicIdentityFailure, ot as toKycTier, p as executeIdentityProductObservation, pn as CAPXUL_ERROR_CODES, pt as CLI_INVOCATION_KINDS, q as observeSdkClient, qn as FAILURE_MODES, qt as trim$1, rn as getFunctionName, rt as makeCurrentUserMethods, s as OrgPortTag, sn as runIdentityFacade, st as toTesterKind, t as ConvexOrganizationSetupAdapter, tn as toAddress, tt as recoverRawDigestSigner, un as runCapxulEffect, ut as redactTelemetryProps, v as makeSmartAccountMethods, vn as ClockPortTag, vt as details, w as ConvexAccountLayer, wn as readInvocationObservation, wt as diagnostics, x as makeHoldingsMethods, xn as observationRequestHeaders, xt as ORGANIZATION_SETUP_REASONS, y as ConvexSmartAccountLayer, yn as BetterAuthNodeLayer, yt as onboardings, z as normalizeSafeSaltEmail, zn as redactSecrets, zt as hexToBytes } from "./organizations-CyTR7Lft.mjs";
|
|
4
4
|
import { n as sha256$2, t as secp256k1 } from "./secp256k1-b-_IancF.mjs";
|
|
5
5
|
import { t as require_lib } from "./lib-CoGPQsbr.mjs";
|
|
6
6
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
@@ -32994,7 +32994,7 @@ function stdioIdentity(env = process.env, options = {}) {
|
|
|
32994
32994
|
}
|
|
32995
32995
|
//#endregion
|
|
32996
32996
|
//#region package.json
|
|
32997
|
-
var version = "4.20.0-beta.
|
|
32997
|
+
var version = "4.20.0-beta.30";
|
|
32998
32998
|
//#endregion
|
|
32999
32999
|
//#region src/deps.ts
|
|
33000
33000
|
const NO_IDENTITY = async () => void 0;
|
|
@@ -2571,7 +2571,10 @@ function clearAuthCacheEffect(authCache) {
|
|
|
2571
2571
|
const signOutProgramWithOptions = (options) => Effect.gen(function* () {
|
|
2572
2572
|
const deps = yield* CapxulDepsTag;
|
|
2573
2573
|
let phase = deps.actor.snapshot().phase;
|
|
2574
|
-
if (phase === "
|
|
2574
|
+
if (phase === "restoring") {
|
|
2575
|
+
yield* getSessionProgramWithOptions(options).pipe(Effect.catchIf(() => deps.actor.snapshot().phase === "faulted", () => Effect.void));
|
|
2576
|
+
phase = deps.actor.snapshot().phase;
|
|
2577
|
+
} else if (phase === "signed_out") {
|
|
2575
2578
|
const cached = yield* deps.authCache.getSession.pipe(Effect.mapError((e) => Errors.providerError("auth-cache", "getSession", e)));
|
|
2576
2579
|
if (cached !== null) {
|
|
2577
2580
|
yield* deps.actor.restoreAuthSession(cached, depsRequestOptions(deps, options)).pipe(Effect.mapError(actorError));
|
|
@@ -8573,7 +8576,9 @@ const HomeSchema = Schema.Struct({
|
|
|
8573
8576
|
needsYou: Schema.NullOr(Schema.Struct({
|
|
8574
8577
|
requestsToPay: Schema.Array(Schema.String),
|
|
8575
8578
|
payrollToApprove: Schema.Array(Schema.String),
|
|
8576
|
-
paymentsToRetry: Schema.Array(Schema.String)
|
|
8579
|
+
paymentsToRetry: Schema.Array(Schema.String),
|
|
8580
|
+
/** The caller's capped Budgets in the Organization with nothing left this period. */
|
|
8581
|
+
budgetsUsedUp: Schema.Array(Schema.String)
|
|
8577
8582
|
})),
|
|
8578
8583
|
/** The newest rows of the actor's activity. */
|
|
8579
8584
|
recentActivity: Schema.NullOr(Schema.Array(ActivityItemSchema))
|
|
@@ -9272,7 +9277,8 @@ const PermissionReplacementInvitationSnapshotSchema = Schema.Struct({
|
|
|
9272
9277
|
"verified",
|
|
9273
9278
|
"mismatch",
|
|
9274
9279
|
"provider_failure",
|
|
9275
|
-
"applied"
|
|
9280
|
+
"applied",
|
|
9281
|
+
"abandoned"
|
|
9276
9282
|
]),
|
|
9277
9283
|
executionState: Schema.Literals([
|
|
9278
9284
|
"unprepared",
|
|
@@ -11225,7 +11231,8 @@ const PermissionCommandViewSchema = Schema.Struct({
|
|
|
11225
11231
|
"verified",
|
|
11226
11232
|
"mismatch",
|
|
11227
11233
|
"provider_failure",
|
|
11228
|
-
"applied"
|
|
11234
|
+
"applied",
|
|
11235
|
+
"abandoned"
|
|
11229
11236
|
]),
|
|
11230
11237
|
status: Schema.Literals([
|
|
11231
11238
|
"pending",
|
|
@@ -12666,7 +12673,9 @@ loadBudgetLeft: "permissions.authorities.loadBudgetLeft" },
|
|
|
12666
12673
|
/** The prepare action's transaction: authorize, plan and save the command. */
|
|
12667
12674
|
prepareIntent: "permissions.commands.prepareIntent",
|
|
12668
12675
|
/** The submit action's transaction: record the accepted UserOperation. */
|
|
12669
|
-
completeExecution: "permissions.commands.completeExecution"
|
|
12676
|
+
completeExecution: "permissions.commands.completeExecution",
|
|
12677
|
+
/** The prepare's cleanup: a saved command whose UserOperation could not be built ends. */
|
|
12678
|
+
abandonUnbuilt: "permissions.commands.abandonUnbuilt"
|
|
12670
12679
|
},
|
|
12671
12680
|
configurations: {
|
|
12672
12681
|
prepareIntent: "permissions.configurations.prepareIntent",
|
|
@@ -15813,7 +15822,7 @@ function mapAccountLifecycle(input) {
|
|
|
15813
15822
|
}
|
|
15814
15823
|
//#endregion
|
|
15815
15824
|
//#region ../../packages/sdk/package.json
|
|
15816
|
-
var version$1 = "4.20.0-beta.
|
|
15825
|
+
var version$1 = "4.20.0-beta.30";
|
|
15817
15826
|
//#endregion
|
|
15818
15827
|
//#region ../../packages/sdk/src/observability/telemetry/exception-projection.ts
|
|
15819
15828
|
/** Fixed fallback for failures that have no safe message. */
|
|
@@ -17952,21 +17961,25 @@ function recipientMatches$1(source, observation, target) {
|
|
|
17952
17961
|
const payrollEmailResolution = source.paymentType === "payroll" && to.kind === "party" && observation.recipient_locator_kind === "email";
|
|
17953
17962
|
return (observation.recipient_locator_kind === to.kind || payrollEmailResolution) && observation.recipient_address.toLowerCase() === target && observation.external_address_acknowledged === (source.externalAddressAcknowledged === true) && (to.kind !== "address" || to.address.toLowerCase() === target) && (to.kind !== "party" || observation.recipient_party_id === to.partyId) && (to.kind !== "handle" || observation.recipient_handle?.toLowerCase() === to.handle.toLowerCase());
|
|
17954
17963
|
}
|
|
17964
|
+
/**
|
|
17965
|
+
* The later release the caller asked for, or null for one paid at once. A
|
|
17966
|
+
* stored birth item names its operation; an Organization request item names
|
|
17967
|
+
* only its `timing` (#2439).
|
|
17968
|
+
*/
|
|
17969
|
+
function heldRelease(source) {
|
|
17970
|
+
if ("operation" in source) return source.operation === "create_commitment" ? source.release : null;
|
|
17971
|
+
return source.timing?.kind === "instant" ? null : source.timing ?? null;
|
|
17972
|
+
}
|
|
17955
17973
|
function operationMatches(source, item) {
|
|
17956
17974
|
if (item.operation !== "send" && item.operation !== "create_commitment") return false;
|
|
17957
17975
|
if (!Object.entries(PAYMENT_PURPOSE_KIND_CODES).some(([purpose, code]) => purpose === sourcePurpose(source) && code === item.kind)) return false;
|
|
17958
|
-
|
|
17959
|
-
|
|
17960
|
-
|
|
17961
|
-
|
|
17962
|
-
|
|
17963
|
-
|
|
17964
|
-
|
|
17965
|
-
return item.startTime === start && item.cliffTime === cliff && item.endTime === end;
|
|
17966
|
-
}
|
|
17967
|
-
return true;
|
|
17968
|
-
}
|
|
17969
|
-
return item.operation === "send";
|
|
17976
|
+
const release = heldRelease(source);
|
|
17977
|
+
if (release === null) return item.operation === "send";
|
|
17978
|
+
if (item.operation !== "create_commitment") return false;
|
|
17979
|
+
const start = Math.floor((release.kind === "scheduled" ? release.at : release.startsAt) / 1e3);
|
|
17980
|
+
const cliff = Math.floor((release.kind === "scheduled" ? release.at : release.cliffAt ?? release.startsAt) / 1e3);
|
|
17981
|
+
const end = Math.floor((release.kind === "scheduled" ? release.at : release.endsAt) / 1e3);
|
|
17982
|
+
return item.startTime === start && item.cliffTime === cliff && item.endTime === end;
|
|
17970
17983
|
}
|
|
17971
17984
|
function itemFactsMatch(source, item, observation) {
|
|
17972
17985
|
const exact = toExactAssetAmount(source.amount, CONFIGURED_MONEY_ASSETS);
|
|
@@ -23143,7 +23156,7 @@ function makeApprovalsMethods(deps) {
|
|
|
23143
23156
|
const signal = options?.signal;
|
|
23144
23157
|
if (isCommandApproval(input)) return openApproval(signal, (signerAddress) => prepareVerifiedCommand(deps, input, signerAddress, signal));
|
|
23145
23158
|
if (isPermissionChange(input)) return openApproval(signal, async (signerAddress) => {
|
|
23146
|
-
const { prepareVerifiedPermissionChange } = await import("./permission-approvals-
|
|
23159
|
+
const { prepareVerifiedPermissionChange } = await import("./permission-approvals-Kbhw35ZT.mjs");
|
|
23147
23160
|
return prepareVerifiedPermissionChange(deps, input, signerAddress, signal);
|
|
23148
23161
|
});
|
|
23149
23162
|
if ("organizationId" in input) return openApproval(signal, (signerAddress) => prepareVerifiedOrganizationPayment(deps, input, signerAddress, signal));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gn as CapxulError, H as asCapxulError, R as abandonPrepared, Wn as Errors, a as verifiedConfiguration, c as preparePermission, d as buildCommand, f as validateReplacementInput, i as prepareConfiguration, l as preparedIdentity, mt as CAPXUL_OPERATIONS, nn as absurd, r as authorInvitation, u as verifiedPreparation } from "./organizations-
|
|
1
|
+
import { Gn as CapxulError, H as asCapxulError, R as abandonPrepared, Wn as Errors, a as verifiedConfiguration, c as preparePermission, d as buildCommand, f as validateReplacementInput, i as prepareConfiguration, l as preparedIdentity, mt as CAPXUL_OPERATIONS, nn as absurd, r as authorInvitation, u as verifiedPreparation } from "./organizations-CyTR7Lft.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) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/mcp",
|
|
3
|
-
"version": "4.20.0-beta.
|
|
3
|
+
"version": "4.20.0-beta.30",
|
|
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,8 @@
|
|
|
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.
|
|
58
|
-
"@capxul/sdk": "4.20.0-beta.
|
|
57
|
+
"@capxul/protocol": "0.2.0-beta.4",
|
|
58
|
+
"@capxul/sdk": "4.20.0-beta.30",
|
|
59
59
|
"@capxul/typescript-config": "0.0.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|