@capxul/mcp 4.2.0-rc.14 → 4.2.0-rc.15

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,11 +1,11 @@
1
1
  {
2
2
  "source": {
3
- "commit": "ad9386dd8d539fea17964d05292fc0ca16495d2f",
4
- "tree": "87b1723ed13d7be72487cbcbbfded24b0ac850e5",
3
+ "commit": "b2dff9052ea3f3a55dfca98530c02b4ac3bcfa96",
4
+ "tree": "9fc0a21bc2cb477c62dd9f5c44c4977d74548d94",
5
5
  "branch": "codex/programme-rc",
6
6
  "repository": "https://github.com/Xelmar-tech/infrastructure",
7
7
  "lockfileSha256": "5870f53b72706d103220c1bcf733cb4fb71196aea32a9cfbdc277d73cc959264"
8
8
  },
9
9
  "name": "@capxul/mcp",
10
- "version": "4.2.0-rc.14"
10
+ "version": "4.2.0-rc.15"
11
11
  }
package/dist/main.mjs CHANGED
@@ -7286,6 +7286,10 @@ const OptionalAccountId = Schema.optional(AccountIdSchema$1);
7286
7286
  const OptionalWeiAmount = Schema.optional(WeiAmountSchema$1);
7287
7287
  const OptionalCurrencyCode = Schema.optional(CurrencyCodeSchema$1);
7288
7288
  const OptionalBalanceBucket = Schema.optional(BalanceBucketSchema);
7289
+ /** Which Safe a money record is about. Declared here so the money-domain
7290
+ * props below can name it as well as the UI-step props further down. */
7291
+ const AccountKindSchema = Schema.Literals(["personalSafe", "orgTreasury"]);
7292
+ const OptionalAccountKind = Schema.optional(AccountKindSchema);
7289
7293
  const OptionalAddress = Schema.optional(AddressSchema$1);
7290
7294
  const OptionalAppId = Schema.optional(AppIdSchema$1);
7291
7295
  const OptionalBlockNumber = Schema.optional(BlockNumberSchema$1);
@@ -7438,9 +7442,22 @@ const BootstrapFailedProps = Schema.Struct({
7438
7442
  reason: OptionalString,
7439
7443
  target_host: OptionalString
7440
7444
  });
7445
+ /**
7446
+ * R08 (#1966): which Safe was read, on which chain, of which token. `currency`
7447
+ * is the DISPLAY code the surface shows ("USD"); it never says which ERC-20 the
7448
+ * `balanceOf` actually hit, so a reader could not tell a treasury read from a
7449
+ * personal one, nor USDX from any other dollar-labelled token. The producer
7450
+ * takes each of these from the authority that already decided it — the verified
7451
+ * Organization row's chain, the configured token address — never from a label.
7452
+ * The verified `organization_id` and its group arrive from the backend
7453
+ * attribution, so they are not repeated here.
7454
+ */
7441
7455
  const AccountBalanceReadProps = Schema.Struct({
7442
7456
  ...TelemetryEnvelopeProps,
7443
7457
  account_id: OptionalAccountId,
7458
+ account_kind: OptionalAccountKind,
7459
+ chain_id: OptionalChainId,
7460
+ token_address: OptionalAddress,
7444
7461
  currency: OptionalCurrencyCode,
7445
7462
  balance_bucket: OptionalBalanceBucket,
7446
7463
  durationMs: OptionalDurationMs
@@ -8084,7 +8101,6 @@ Schema.Struct({
8084
8101
  });
8085
8102
  /** The one spelling of "whose scope did this happen in" across every surface. */
8086
8103
  const ScopeKindSchema = Schema.Literals(["account", "organization"]);
8087
- const AccountKindSchema = Schema.Literals(["personalSafe", "orgTreasury"]);
8088
8104
  const OptionalReasonCode = Schema.optional(Schema.Literals(CAPXUL_ERROR_CODES));
8089
8105
  const ActivityReferenceProps = {
8090
8106
  reference_kind: Schema.Literals(["payment", "movement"]),
@@ -12828,7 +12844,7 @@ function subscribeActivity(deps, actor, controls, onChange) {
12828
12844
  }
12829
12845
  //#endregion
12830
12846
  //#region ../../packages/sdk/package.json
12831
- var version$1 = "4.2.0-rc.14";
12847
+ var version$1 = "4.2.0-rc.15";
12832
12848
  //#endregion
12833
12849
  //#region ../../packages/sdk/src/telemetry/exception-projection.ts
12834
12850
  /** Fixed fallback for failures that have no safe message. */
@@ -46298,32 +46314,27 @@ function makeOrgMethods(deps) {
46298
46314
  });
46299
46315
  return treasury(orgId, deps.invocationControls?.(options) ?? options);
46300
46316
  },
46301
- account: { async get(options) {
46302
- if (options?.signal?.aborted) return {
46303
- ok: false,
46304
- error: Errors.cancelled({ operation: CAPXUL_OPERATIONS.org.account.get })
46305
- };
46317
+ account: { get(options) {
46306
46318
  const controls = deps.invocationControls?.(options) ?? options;
46307
- const treasuryResult = await treasury(orgId, controls);
46308
- if (!treasuryResult.ok) return {
46309
- ok: false,
46310
- error: treasuryResult.error
46311
- };
46312
- const orgList = await listOrganizations(controls);
46313
- if (!orgList.ok) return {
46319
+ if (controls?.signal?.aborted) return Promise.resolve({
46314
46320
  ok: false,
46315
- error: orgList.error
46316
- };
46317
- const org = orgList.value.find((candidate) => candidate.id === orgId);
46318
- return {
46319
- ok: true,
46320
- value: {
46321
+ error: Errors.cancelled({ operation: CAPXUL_OPERATIONS.org.account.get })
46322
+ });
46323
+ return runCapxulEffect(Effect.gen(function* () {
46324
+ const parent = yield* Effect.currentSpan.pipe(Effect.orDie);
46325
+ const captured = carryInvocationParentSpan(controls, parent);
46326
+ const treasuryResult = yield* Effect.promise(() => treasury(orgId, captured));
46327
+ if (!treasuryResult.ok) return yield* Effect.fail(treasuryResult.error);
46328
+ const orgList = yield* Effect.promise(() => listOrganizations(captured));
46329
+ if (!orgList.ok) return yield* Effect.fail(orgList.error);
46330
+ const org = orgList.value.find((candidate) => candidate.id === orgId);
46331
+ return {
46321
46332
  id: treasuryResult.value.id,
46322
46333
  address: org?.safeAddress ?? null,
46323
46334
  balance: treasuryResult.value.balance,
46324
46335
  available: treasuryResult.value.available
46325
- }
46326
- };
46336
+ };
46337
+ }), observationOnlyControls(controls), CAPXUL_OPERATIONS.org.account.get, deps.runPromise);
46327
46338
  } },
46328
46339
  members(_options) {
46329
46340
  if (_options?.signal?.aborted) return Promise.resolve({
@@ -49014,7 +49025,7 @@ function stdioIdentity(env = process.env, options = {}) {
49014
49025
  }
49015
49026
  //#endregion
49016
49027
  //#region package.json
49017
- var version = "4.2.0-rc.14";
49028
+ var version = "4.2.0-rc.15";
49018
49029
  //#endregion
49019
49030
  //#region src/deps.ts
49020
49031
  const NO_IDENTITY = async () => void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/mcp",
3
- "version": "4.2.0-rc.14",
3
+ "version": "4.2.0-rc.15",
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,8 +51,8 @@
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/typescript-config": "0.0.0",
55
- "@capxul/sdk": "4.2.0-rc.14"
54
+ "@capxul/sdk": "4.2.0-rc.15",
55
+ "@capxul/typescript-config": "0.0.0"
56
56
  },
57
57
  "scripts": {
58
58
  "dev": "vp exec tsx src/main.ts serve",