@capxul/mcp 4.0.1 → 4.1.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.
- package/dist/main.mjs +287 -49
- package/package.json +2 -2
package/dist/main.mjs
CHANGED
|
@@ -4056,12 +4056,14 @@ const CAPXUL_OPERATIONS = {
|
|
|
4056
4056
|
},
|
|
4057
4057
|
activity: {
|
|
4058
4058
|
annotate: "activity.annotate",
|
|
4059
|
+
emitAnnotationSaved: "activity.emitAnnotationSaved",
|
|
4059
4060
|
get: "activity.get",
|
|
4060
4061
|
list: "activity.list",
|
|
4061
4062
|
summary: "activity.summary"
|
|
4062
4063
|
},
|
|
4063
4064
|
addressBook: {
|
|
4064
4065
|
add: "addressBook.add",
|
|
4066
|
+
emitRelationshipChanged: "addressBook.emitRelationshipChanged",
|
|
4065
4067
|
get: "addressBook.get",
|
|
4066
4068
|
hide: "addressBook.hide",
|
|
4067
4069
|
label: "addressBook.label",
|
|
@@ -4905,7 +4907,20 @@ const QuickPayExternalAddressAcknowledgedProps = Schema.Struct({
|
|
|
4905
4907
|
external_address_acknowledged: Schema.Literal(true),
|
|
4906
4908
|
organization_id: OptionalOrgId
|
|
4907
4909
|
});
|
|
4908
|
-
const DepositInitiatedProps = Schema.Struct({
|
|
4910
|
+
const DepositInitiatedProps = Schema.Struct({
|
|
4911
|
+
...TelemetryEnvelopeProps,
|
|
4912
|
+
scope_kind: Schema.optional(Schema.Literals(["account", "organization"])),
|
|
4913
|
+
account_kind: Schema.optional(Schema.Literals(["personalSafe", "orgTreasury"])),
|
|
4914
|
+
chain_id: Schema.optional(Schema.Number),
|
|
4915
|
+
network: Schema.optional(Schema.Literal("base-sepolia")),
|
|
4916
|
+
organization_id: OptionalOrgId,
|
|
4917
|
+
$groups: Schema.optional(Schema.Struct({ organization: OptionalOrgId })),
|
|
4918
|
+
actor_id: OptionalString,
|
|
4919
|
+
actor_kind: Schema.optional(Schema.Literal("authenticated")),
|
|
4920
|
+
distinct_id: OptionalString,
|
|
4921
|
+
trace_id: OptionalString,
|
|
4922
|
+
span_id: OptionalString
|
|
4923
|
+
});
|
|
4909
4924
|
const DepositSettledProps = Schema.Struct({
|
|
4910
4925
|
...TelemetryEnvelopeProps,
|
|
4911
4926
|
chain_id: Schema.Number,
|
|
@@ -5143,6 +5158,148 @@ Schema.Struct({
|
|
|
5143
5158
|
name: Schema.Literal("movement_scan_incident"),
|
|
5144
5159
|
props: MovementScanIncidentProps
|
|
5145
5160
|
});
|
|
5161
|
+
const ActivityReferenceProps = {
|
|
5162
|
+
reference_kind: Schema.Literals(["payment", "movement"]),
|
|
5163
|
+
reference_id: Schema.String
|
|
5164
|
+
};
|
|
5165
|
+
const ActivityFilterProps = {
|
|
5166
|
+
filter_kind: Schema.optional(Schema.Literals([
|
|
5167
|
+
"all",
|
|
5168
|
+
"payment",
|
|
5169
|
+
"movement"
|
|
5170
|
+
])),
|
|
5171
|
+
filter_direction: Schema.optional(Schema.Literals([
|
|
5172
|
+
"all",
|
|
5173
|
+
"in",
|
|
5174
|
+
"out",
|
|
5175
|
+
"self"
|
|
5176
|
+
])),
|
|
5177
|
+
filter_status: Schema.optional(Schema.Array(Schema.Literals([
|
|
5178
|
+
"pending",
|
|
5179
|
+
"settling",
|
|
5180
|
+
"pending_claim",
|
|
5181
|
+
"scheduled",
|
|
5182
|
+
"streaming",
|
|
5183
|
+
"settled",
|
|
5184
|
+
"cancelled",
|
|
5185
|
+
"failed"
|
|
5186
|
+
])))
|
|
5187
|
+
};
|
|
5188
|
+
const ActivityActionProps = {
|
|
5189
|
+
...TelemetryEnvelopeProps,
|
|
5190
|
+
scope_kind: Schema.Literals(["account", "organization"]),
|
|
5191
|
+
reason_code: Schema.optional(Schema.Literals(CAPXUL_ERROR_CODES))
|
|
5192
|
+
};
|
|
5193
|
+
Schema.Struct({
|
|
5194
|
+
name: Schema.Literal("contact_relationship_changed"),
|
|
5195
|
+
props: Schema.Struct({
|
|
5196
|
+
...TelemetryEnvelopeProps,
|
|
5197
|
+
change: Schema.Literals([
|
|
5198
|
+
"added",
|
|
5199
|
+
"renamed",
|
|
5200
|
+
"hidden",
|
|
5201
|
+
"restored"
|
|
5202
|
+
]),
|
|
5203
|
+
scope_kind: Schema.Literals(["account", "organization"]),
|
|
5204
|
+
scope_id: Schema.String,
|
|
5205
|
+
owner_party_id: Schema.String,
|
|
5206
|
+
party_id: Schema.String,
|
|
5207
|
+
hidden: Schema.Boolean,
|
|
5208
|
+
occurred_at: Schema.Number,
|
|
5209
|
+
operation: Schema.Literals([
|
|
5210
|
+
CAPXUL_OPERATIONS.addressBook.add,
|
|
5211
|
+
CAPXUL_OPERATIONS.addressBook.label,
|
|
5212
|
+
CAPXUL_OPERATIONS.addressBook.hide,
|
|
5213
|
+
CAPXUL_OPERATIONS.addressBook.unhide
|
|
5214
|
+
])
|
|
5215
|
+
})
|
|
5216
|
+
});
|
|
5217
|
+
const ContactActionProps = {
|
|
5218
|
+
...TelemetryEnvelopeProps,
|
|
5219
|
+
scope_kind: Schema.Literals(["account", "organization"]),
|
|
5220
|
+
party_id: OptionalString,
|
|
5221
|
+
reason_code: Schema.optional(Schema.Literals(CAPXUL_ERROR_CODES))
|
|
5222
|
+
};
|
|
5223
|
+
Schema.Struct({
|
|
5224
|
+
name: Schema.Literal("ui_contact_action_completed"),
|
|
5225
|
+
props: Schema.Union([
|
|
5226
|
+
Schema.Struct({
|
|
5227
|
+
...ContactActionProps,
|
|
5228
|
+
action: Schema.Literal("add"),
|
|
5229
|
+
outcome: Schema.Literals(["opened", "cancelled"])
|
|
5230
|
+
}),
|
|
5231
|
+
Schema.Struct({
|
|
5232
|
+
...ContactActionProps,
|
|
5233
|
+
action: Schema.Literal("refusal"),
|
|
5234
|
+
outcome: Schema.Literal("displayed")
|
|
5235
|
+
}),
|
|
5236
|
+
Schema.Struct({
|
|
5237
|
+
...ContactActionProps,
|
|
5238
|
+
action: Schema.Literal("retry"),
|
|
5239
|
+
outcome: Schema.Literal("requested")
|
|
5240
|
+
})
|
|
5241
|
+
])
|
|
5242
|
+
});
|
|
5243
|
+
Schema.Struct({
|
|
5244
|
+
name: Schema.Literal("activity_annotation_saved"),
|
|
5245
|
+
props: Schema.Struct({
|
|
5246
|
+
...TelemetryEnvelopeProps,
|
|
5247
|
+
...ActivityReferenceProps,
|
|
5248
|
+
scope_kind: Schema.Literals(["account", "organization"]),
|
|
5249
|
+
scope_id: Schema.String,
|
|
5250
|
+
occurred_at: Schema.Number
|
|
5251
|
+
})
|
|
5252
|
+
});
|
|
5253
|
+
Schema.Struct({
|
|
5254
|
+
name: Schema.Literal("ui_activity_action_completed"),
|
|
5255
|
+
props: Schema.Union([
|
|
5256
|
+
Schema.Struct({
|
|
5257
|
+
...ActivityActionProps,
|
|
5258
|
+
...ActivityFilterProps,
|
|
5259
|
+
action: Schema.Literal("filter"),
|
|
5260
|
+
outcome: Schema.Literal("committed")
|
|
5261
|
+
}),
|
|
5262
|
+
Schema.Struct({
|
|
5263
|
+
...ActivityActionProps,
|
|
5264
|
+
action: Schema.Literal("refusal"),
|
|
5265
|
+
outcome: Schema.Literal("displayed")
|
|
5266
|
+
}),
|
|
5267
|
+
Schema.Struct({
|
|
5268
|
+
...ActivityActionProps,
|
|
5269
|
+
action: Schema.Literal("retry"),
|
|
5270
|
+
outcome: Schema.Literal("requested")
|
|
5271
|
+
}),
|
|
5272
|
+
Schema.Struct({
|
|
5273
|
+
...ActivityActionProps,
|
|
5274
|
+
...ActivityReferenceProps,
|
|
5275
|
+
action: Schema.Literal("detail"),
|
|
5276
|
+
outcome: Schema.Literals(["opened", "failed"])
|
|
5277
|
+
}),
|
|
5278
|
+
Schema.Struct({
|
|
5279
|
+
...ActivityActionProps,
|
|
5280
|
+
...ActivityReferenceProps,
|
|
5281
|
+
action: Schema.Literal("receipt"),
|
|
5282
|
+
outcome: Schema.Literals([
|
|
5283
|
+
"document_rendered",
|
|
5284
|
+
"explorer_opened",
|
|
5285
|
+
"popup_blocked",
|
|
5286
|
+
"failed"
|
|
5287
|
+
])
|
|
5288
|
+
}),
|
|
5289
|
+
Schema.Struct({
|
|
5290
|
+
...ActivityActionProps,
|
|
5291
|
+
...ActivityFilterProps,
|
|
5292
|
+
action: Schema.Literal("export"),
|
|
5293
|
+
outcome: Schema.Literals([
|
|
5294
|
+
"completed",
|
|
5295
|
+
"partial",
|
|
5296
|
+
"failed"
|
|
5297
|
+
]),
|
|
5298
|
+
row_count: Schema.optional(Schema.Number),
|
|
5299
|
+
truncated: Schema.optional(Schema.Boolean)
|
|
5300
|
+
})
|
|
5301
|
+
])
|
|
5302
|
+
});
|
|
5146
5303
|
function redactTelemetryProps(name, props, options = {}) {
|
|
5147
5304
|
if (props === void 0) return void 0;
|
|
5148
5305
|
const clone = cloneProps$1(props);
|
|
@@ -10176,6 +10333,23 @@ function observationOnlyControls(controls) {
|
|
|
10176
10333
|
const { signal: _signal, timeoutMs: _timeoutMs, deadlineMs: _deadlineMs, ...observation } = controls ?? {};
|
|
10177
10334
|
return copyInvocationObservation(controls, observation);
|
|
10178
10335
|
}
|
|
10336
|
+
/** Project only SDK-owned facts. A caller Organization hint is not authority. */
|
|
10337
|
+
function verifiedOperationFields(attributes) {
|
|
10338
|
+
const domain = {};
|
|
10339
|
+
const organizationId = attributes.get("verified_organization_id");
|
|
10340
|
+
if (typeof organizationId === "string" && safeEngineeringIdentifier(organizationId) !== void 0) domain.organization_id = organizationId;
|
|
10341
|
+
for (const [key, allowed] of [
|
|
10342
|
+
["scope_kind", ["account", "organization"]],
|
|
10343
|
+
["account_kind", ["personalSafe", "orgTreasury"]],
|
|
10344
|
+
["network", ["base-sepolia"]]
|
|
10345
|
+
]) {
|
|
10346
|
+
const value = attributes.get(key);
|
|
10347
|
+
if (typeof value === "string" && allowed.some((candidate) => candidate === value)) domain[key] = value;
|
|
10348
|
+
}
|
|
10349
|
+
const chainId = attributes.get("chain_id");
|
|
10350
|
+
if (typeof chainId === "number" && Number.isSafeInteger(chainId) && chainId > 0) domain.chain_id = chainId;
|
|
10351
|
+
return domain;
|
|
10352
|
+
}
|
|
10179
10353
|
/** Observe a public Effect that already uses the canonical CapxulError channel. */
|
|
10180
10354
|
async function runCapxulEffect(effect, controls, operation = CAPXUL_OPERATIONS.runtime.port, runPromise = Effect.runPromise) {
|
|
10181
10355
|
const invocation = readInvocationObservation(controls);
|
|
@@ -10204,8 +10378,10 @@ async function runCapxulEffect(effect, controls, operation = CAPXUL_OPERATIONS.r
|
|
|
10204
10378
|
const error = Exit.isFailure(exit) ? Cause.squash(exit.cause) : void 0;
|
|
10205
10379
|
const failure = error instanceof CapxulError ? error : void 0;
|
|
10206
10380
|
const outcome = Exit.isSuccess(exit) ? "succeeded" : failure?.code === "CANCELLED" ? "cancelled" : failure !== void 0 && EXPECTED_OPERATION_OUTCOMES.has(failure.code) ? "refused" : "failed";
|
|
10381
|
+
const span = yield* Effect.currentSpan.pipe(Effect.orDie);
|
|
10207
10382
|
const completion = {
|
|
10208
10383
|
...fields,
|
|
10384
|
+
...verifiedOperationFields(span.attributes),
|
|
10209
10385
|
duration_ms,
|
|
10210
10386
|
outcome,
|
|
10211
10387
|
...failure === void 0 ? {} : { failure_code: failure.code },
|
|
@@ -11383,7 +11559,7 @@ const moneyExecutionContract = {
|
|
|
11383
11559
|
};
|
|
11384
11560
|
//#endregion
|
|
11385
11561
|
//#region ../../packages/sdk/package.json
|
|
11386
|
-
var version$1 = "4.
|
|
11562
|
+
var version$1 = "4.1.1";
|
|
11387
11563
|
//#endregion
|
|
11388
11564
|
//#region ../../packages/sdk/src/telemetry/exception-projection.ts
|
|
11389
11565
|
/** Fixed fallback for failures that have no safe message. */
|
|
@@ -11890,11 +12066,50 @@ function emitAccountBalanceFailed(telemetry, error) {
|
|
|
11890
12066
|
}
|
|
11891
12067
|
});
|
|
11892
12068
|
}
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
12069
|
+
/** A successful authorized instruction read, not an incoming transfer. */
|
|
12070
|
+
function emitDepositInitiated(telemetry, instructions, source, verifiedOrganizationId) {
|
|
12071
|
+
return Effect.gen(function* () {
|
|
12072
|
+
const organizationId = safeEngineeringIdentifier(verifiedOrganizationId);
|
|
12073
|
+
const fields = {
|
|
12074
|
+
scope_kind: organizationId === void 0 ? "account" : "organization",
|
|
12075
|
+
account_kind: organizationId === void 0 ? "personalSafe" : "orgTreasury",
|
|
12076
|
+
...Number.isSafeInteger(instructions.chainId) && instructions.chainId > 0 ? { chain_id: instructions.chainId } : {},
|
|
12077
|
+
...instructions.network === "base-sepolia" ? { network: instructions.network } : {},
|
|
12078
|
+
...organizationId === void 0 ? {} : { verified_organization_id: organizationId }
|
|
12079
|
+
};
|
|
12080
|
+
yield* Effect.annotateCurrentSpan(fields);
|
|
12081
|
+
if (telemetry === void 0) return;
|
|
12082
|
+
const span = yield* Effect.currentSpan;
|
|
12083
|
+
const snapshot = readInvocationObservation(source);
|
|
12084
|
+
const { organizationId: _hint, ...context } = snapshot?.context ?? {};
|
|
12085
|
+
const event = {
|
|
12086
|
+
name: "deposit_initiated",
|
|
12087
|
+
props: {
|
|
12088
|
+
scope_kind: fields.scope_kind,
|
|
12089
|
+
account_kind: fields.account_kind,
|
|
12090
|
+
...fields.chain_id === void 0 ? {} : { chain_id: fields.chain_id },
|
|
12091
|
+
...fields.network === void 0 ? {} : { network: fields.network },
|
|
12092
|
+
$groups: organizationId === void 0 ? {} : { organization: organizationId },
|
|
12093
|
+
...safeEngineeringIdentifier(snapshot?.actorId) === void 0 ? {} : {
|
|
12094
|
+
actor_id: snapshot.actorId,
|
|
12095
|
+
actor_kind: "authenticated",
|
|
12096
|
+
distinct_id: snapshot.actorId
|
|
12097
|
+
},
|
|
12098
|
+
trace_id: span.traceId,
|
|
12099
|
+
span_id: span.spanId,
|
|
12100
|
+
...organizationId === void 0 ? {} : { organization_id: organizationId }
|
|
12101
|
+
}
|
|
12102
|
+
};
|
|
12103
|
+
yield* telemetry.emit(snapshot === void 0 ? event : attachInvocationObservation(event, {
|
|
12104
|
+
active: snapshot.active,
|
|
12105
|
+
...snapshot?.actorId === void 0 ? {} : { actorId: snapshot.actorId },
|
|
12106
|
+
context: {
|
|
12107
|
+
...context,
|
|
12108
|
+
...organizationId === void 0 ? {} : { organizationId },
|
|
12109
|
+
traceparent: `00-${span.traceId}-${span.spanId}-01`
|
|
12110
|
+
}
|
|
12111
|
+
}));
|
|
12112
|
+
}).pipe(Effect.catchCause(() => Effect.void));
|
|
11898
12113
|
}
|
|
11899
12114
|
function emitPaymentInitiated(telemetry, input) {
|
|
11900
12115
|
return emitMoneyTelemetry(telemetry, {
|
|
@@ -12510,7 +12725,10 @@ function makeFinancialOpsMethods(deps) {
|
|
|
12510
12725
|
return {
|
|
12511
12726
|
me: {
|
|
12512
12727
|
get: (options) => runIfActive(options?.signal, CAPXUL_OPERATIONS.me.get, () => deps.convexCall.query(fns.me, {})),
|
|
12513
|
-
depositInstructions: (options) =>
|
|
12728
|
+
depositInstructions: (options) => {
|
|
12729
|
+
const controls = deps.invocationControls?.(options) ?? options;
|
|
12730
|
+
return runPortEffect(Effect.suspend(() => deps.convexCall.query(fns.depositInstructions, copyInvocationObservation(controls, {}))).pipe(Effect.tap((instructions) => emitDepositInitiated(deps.telemetry, instructions, controls))), controls, CAPXUL_OPERATIONS.me.depositInstructions, deps.runPromise);
|
|
12731
|
+
}
|
|
12514
12732
|
},
|
|
12515
12733
|
targets: { resolve: async (reference, options) => {
|
|
12516
12734
|
const recipient = normalizeTargetForBackend(reference, "reference");
|
|
@@ -12518,43 +12736,57 @@ function makeFinancialOpsMethods(deps) {
|
|
|
12518
12736
|
return mapOk(await runIfActive(options?.signal, CAPXUL_OPERATIONS.recipient.resolve, () => deps.convexCall.query(fns.resolveRecipient, { recipient: recipient.value })), resolvedTargetFromResolution);
|
|
12519
12737
|
} },
|
|
12520
12738
|
destinations: {
|
|
12521
|
-
add:
|
|
12522
|
-
const
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
const scopeValue = scope.value;
|
|
12528
|
-
if (scopeValue === void 0) return {
|
|
12529
|
-
ok: false,
|
|
12530
|
-
error: Errors.invalidInput("target", DESTINATION_SCOPE_MESSAGE)
|
|
12739
|
+
add: (input, options) => {
|
|
12740
|
+
const controls = deps.invocationControls?.(options) ?? options;
|
|
12741
|
+
const actor = actorReferenceToBackend(input.actor);
|
|
12742
|
+
const verifiedScope = {
|
|
12743
|
+
scope_kind: actor?.kind === "org" ? "organization" : "account",
|
|
12744
|
+
...actor?.kind === "org" ? { verified_organization_id: actor.orgId } : {}
|
|
12531
12745
|
};
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12746
|
+
return runPortEffect(Effect.suspend(() => {
|
|
12747
|
+
const scope = normalizeDestinationInputScope(input, "target");
|
|
12748
|
+
if (!scope.ok) return Effect.fail({ publicError: scope.error });
|
|
12749
|
+
const scopeValue = scope.value;
|
|
12750
|
+
if (scopeValue === void 0) return Effect.fail({ publicError: Errors.invalidInput("target", DESTINATION_SCOPE_MESSAGE) });
|
|
12751
|
+
return deps.convexCall.mutation(fns.addDestination, copyInvocationObservation(controls, {
|
|
12752
|
+
...actor === void 0 ? {} : { actor },
|
|
12753
|
+
...isSelfTarget(scopeValue) ? { self: true } : { ref: scopeValue },
|
|
12754
|
+
kind: destinationKindToBackend(input.kind),
|
|
12755
|
+
...input.label === void 0 ? {} : { label: input.label },
|
|
12756
|
+
payload: input.payload
|
|
12757
|
+
})).pipe(Effect.map(destinationFromBackend), Effect.tap(() => Effect.annotateCurrentSpan(verifiedScope)));
|
|
12758
|
+
}), controls, CAPXUL_OPERATIONS.destinations.add, deps.runPromise);
|
|
12540
12759
|
},
|
|
12541
|
-
list:
|
|
12542
|
-
const
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12760
|
+
list: (input, options) => {
|
|
12761
|
+
const controls = deps.invocationControls?.(options) ?? options;
|
|
12762
|
+
const actor = actorReferenceToBackend(input.actor);
|
|
12763
|
+
const verifiedScope = {
|
|
12764
|
+
scope_kind: actor?.kind === "org" ? "organization" : "account",
|
|
12765
|
+
...actor?.kind === "org" ? { verified_organization_id: actor.orgId } : {}
|
|
12546
12766
|
};
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12767
|
+
return runPortEffect(Effect.suspend(() => {
|
|
12768
|
+
const scope = normalizeDestinationInputScope(input, "target");
|
|
12769
|
+
if (!scope.ok) return Effect.fail({ publicError: scope.error });
|
|
12770
|
+
const scopeValue = scope.value;
|
|
12771
|
+
return deps.convexCall.query(fns.listDestinations, copyInvocationObservation(controls, {
|
|
12772
|
+
...actor === void 0 ? {} : { actor },
|
|
12773
|
+
...scopeValue !== void 0 && isSelfTarget(scopeValue) ? { self: true } : {},
|
|
12774
|
+
...scopeValue !== void 0 && !isSelfTarget(scopeValue) ? { ref: scopeValue } : {}
|
|
12775
|
+
})).pipe(Effect.map((destinations) => destinations.map(destinationFromBackend).filter((destination) => input.kind === void 0 || destination.kind === input.kind)), Effect.tap(() => Effect.annotateCurrentSpan(verifiedScope)));
|
|
12776
|
+
}), controls, CAPXUL_OPERATIONS.destinations.list, deps.runPromise);
|
|
12553
12777
|
},
|
|
12554
|
-
remove: (input, options) =>
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12778
|
+
remove: (input, options) => {
|
|
12779
|
+
const controls = deps.invocationControls?.(options) ?? options;
|
|
12780
|
+
const actor = actorReferenceToBackend(input.actor);
|
|
12781
|
+
const verifiedScope = {
|
|
12782
|
+
scope_kind: actor?.kind === "org" ? "organization" : "account",
|
|
12783
|
+
...actor?.kind === "org" ? { verified_organization_id: actor.orgId } : {}
|
|
12784
|
+
};
|
|
12785
|
+
return runPortEffect(Effect.suspend(() => deps.convexCall.mutation(fns.removeDestination, copyInvocationObservation(controls, {
|
|
12786
|
+
...actor === void 0 ? {} : { actor },
|
|
12787
|
+
destinationId: input.destinationId
|
|
12788
|
+
})).pipe(Effect.tap(() => Effect.annotateCurrentSpan(verifiedScope)))), controls, CAPXUL_OPERATIONS.destinations.remove, deps.runPromise);
|
|
12789
|
+
}
|
|
12558
12790
|
},
|
|
12559
12791
|
payments: {
|
|
12560
12792
|
pay,
|
|
@@ -17479,6 +17711,8 @@ const OBSERVED_CONVEX_QUERIES = /* @__PURE__ */ new Set([
|
|
|
17479
17711
|
"movement/activity:list",
|
|
17480
17712
|
"movement/activity:summary",
|
|
17481
17713
|
"movement/activity:get",
|
|
17714
|
+
"financialOps/queries:depositInstructions",
|
|
17715
|
+
"financialOps/destinations:list",
|
|
17482
17716
|
"financialOps/queries:verifyPaymentDocument",
|
|
17483
17717
|
"financialOps/queries:renderStoredDocument",
|
|
17484
17718
|
"financialOps/addressBook:list",
|
|
@@ -17496,6 +17730,8 @@ const OBSERVED_CONVEX_QUERIES = /* @__PURE__ */ new Set([
|
|
|
17496
17730
|
]);
|
|
17497
17731
|
const OBSERVED_CONVEX_MUTATIONS = /* @__PURE__ */ new Set([
|
|
17498
17732
|
"movement/activity:annotate",
|
|
17733
|
+
"financialOps/destinations:add",
|
|
17734
|
+
"financialOps/destinations:remove",
|
|
17499
17735
|
"financialOps/addressBook:add",
|
|
17500
17736
|
"financialOps/addressBook:hide",
|
|
17501
17737
|
"financialOps/addressBook:unhide",
|
|
@@ -44019,7 +44255,7 @@ function readOrgDepositInstructionsProgram(orgId) {
|
|
|
44019
44255
|
const deps = yield* OrgDepsTag;
|
|
44020
44256
|
const org = findOrgById(yield* listOrgsProgram(), orgId);
|
|
44021
44257
|
if (org === void 0) return yield* Effect.fail(orgNotFound(orgId));
|
|
44022
|
-
|
|
44258
|
+
const instructions = {
|
|
44023
44259
|
accountKind: "orgTreasury",
|
|
44024
44260
|
chainId: Number(deps.chainId ?? 84532),
|
|
44025
44261
|
network: "base-sepolia",
|
|
@@ -44027,6 +44263,8 @@ function readOrgDepositInstructionsProgram(orgId) {
|
|
|
44027
44263
|
address: String(org.safeAddress).toLowerCase(),
|
|
44028
44264
|
label: "Capxul org treasury"
|
|
44029
44265
|
};
|
|
44266
|
+
yield* emitDepositInitiated(deps.telemetry, instructions, deps.invocationSource, String(org.id));
|
|
44267
|
+
return instructions;
|
|
44030
44268
|
});
|
|
44031
44269
|
}
|
|
44032
44270
|
function listRolesProgram(orgId) {
|
|
@@ -44261,12 +44499,12 @@ function makeOrgMethods(deps) {
|
|
|
44261
44499
|
});
|
|
44262
44500
|
return toCapxulResult(readOrgProfileProgram(orgId), layer);
|
|
44263
44501
|
},
|
|
44264
|
-
depositInstructions(
|
|
44265
|
-
|
|
44266
|
-
|
|
44267
|
-
|
|
44268
|
-
|
|
44269
|
-
|
|
44502
|
+
depositInstructions(options) {
|
|
44503
|
+
const controls = deps.invocationControls?.(options) ?? options;
|
|
44504
|
+
return runCapxulEffect(readOrgDepositInstructionsProgram(orgId).pipe(Effect.provide(orgDepsLayer({
|
|
44505
|
+
...orgDeps,
|
|
44506
|
+
...controls === void 0 ? {} : { invocationSource: controls }
|
|
44507
|
+
}))), controls, CAPXUL_OPERATIONS.org.profile.depositInstructions, deps.runPromise);
|
|
44270
44508
|
}
|
|
44271
44509
|
},
|
|
44272
44510
|
treasury(options) {
|
|
@@ -46415,7 +46653,7 @@ function stdioIdentity(env = process.env, options = {}) {
|
|
|
46415
46653
|
}
|
|
46416
46654
|
//#endregion
|
|
46417
46655
|
//#region package.json
|
|
46418
|
-
var version = "4.
|
|
46656
|
+
var version = "4.1.1";
|
|
46419
46657
|
//#endregion
|
|
46420
46658
|
//#region src/deps.ts
|
|
46421
46659
|
const NO_IDENTITY = async () => void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/mcp",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
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": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
52
52
|
"vite-plus": "0.3.0",
|
|
53
53
|
"@capxul/config": "0.3.0",
|
|
54
|
-
"@capxul/sdk": "4.
|
|
54
|
+
"@capxul/sdk": "4.1.1",
|
|
55
55
|
"@capxul/typescript-config": "0.0.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|