@lerianstudio/matcher-mcp 5.0.0-beta.4 → 5.0.0-beta.40

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.
@@ -14,6 +14,7 @@
14
14
  // fetch/abort error — so error handling upstream is uniform.
15
15
  import { loadConfig } from '../config.js';
16
16
  import { injectTraceContext } from '../observability/otel.js';
17
+ import { deriveDispatchIdempotencyKey, isDispatchPath, } from './idempotency.js';
17
18
  /** Thrown by `MatcherClient.request` on any matcher status >= 400 (or transport failure). */
18
19
  export class MatcherApiError extends Error {
19
20
  /** HTTP status from matcher (synthetic, e.g. 504, for transport failures). */
@@ -122,6 +123,19 @@ export function createMatcherClient(baseUrl, bearerToken) {
122
123
  // NOT set content-type and must NOT JSON.stringify. Every other body
123
124
  // (the overwhelming majority of requests) keeps the existing JSON path.
124
125
  const isFormData = req.body instanceof FormData;
126
+ // A dispatch is the one request whose side effect lands outside matcher, so
127
+ // it is never sent unkeyed: without a key the model's retry after a relay
128
+ // timeout opens a second ticket. The caller's own key always wins — that is
129
+ // how a DELIBERATE second dispatch gets through. Every other route stays
130
+ // opt-in and unkeyed. FormData is excluded because a dispatch body is JSON
131
+ // by contract and a multipart body has no canonical digest form here.
132
+ const idempotencyKey = req.idempotencyKey ??
133
+ (req.method === 'POST' && isDispatchPath(req.path) && !isFormData
134
+ ? deriveDispatchIdempotencyKey(req.path, req.body)
135
+ : undefined);
136
+ if (idempotencyKey !== undefined) {
137
+ headers['x-idempotency-key'] = idempotencyKey;
138
+ }
125
139
  let outgoingBody;
126
140
  if (isFormData) {
127
141
  outgoingBody = req.body;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/matcher/client.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,mDAAmD;AACnD,EAAE;AACF,kFAAkF;AAClF,4EAA4E;AAC5E,gFAAgF;AAChF,2DAA2D;AAC3D,EAAE;AACF,2CAA2C;AAC3C,6EAA6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AAoB,GAAG,CAAC,MAAM,KAAK,OAAO,EAAE,EAC5C,GAAG,CAAC,MAAM,EACV,OAAO,CACR,CAAA;YACH,CAAC;YAED,IAAI,CAAC;gBACH,OAAO,MAAM,YAAY,CAAI,GAAG,CAAC,CAAA;YACnC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,wEAAwE;gBACxE,oDAAoD;gBACpD,MAAM,MAAM,GACV,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAA;gBAC5D,MAAM,IAAI,eAAe,CACvB,oBAAoB,GAAG,CAAC,MAAM,gCAAgC,EAC9D,GAAG,CAAC,MAAM,EACV,EAAE,KAAK,EAAE,oCAAoC,EAAE,MAAM,EAAE,CACxD,CAAA;YACH,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,94 @@
1
+ // Idempotency keys for the requests the relay must never send twice.
2
+ //
3
+ // WHY THIS IS IN THE TRANSPORT LAYER
4
+ // Matcher's idempotency is opt-in on `X-Idempotency-Key`, so an unkeyed request
5
+ // is a request nobody can deduplicate. The relay aborts on its own
6
+ // `MATCHER_TIMEOUT_MS`: a dispatch that succeeds slowly at Jira/ServiceNow still
7
+ // hands the model a transport error, the model retries the tool, and a second
8
+ // ticket opens at the target — which matcher cannot undo.
9
+ //
10
+ // Dispatch reaches matcher through THREE surfaces, not one: `exception_dispatch`,
11
+ // `exception_bulk_dispatch`, and the generic `matcher_invoke` (which can invoke
12
+ // any operation in the spec, dispatch included). Keying only the curated pair
13
+ // would leave the generic surface duplicating tickets. `createMatcherClient` is
14
+ // the single seam all three route through, so the default key is stamped there
15
+ // and this module owns the two rules it needs: which paths are dispatch, and how
16
+ // their key is derived.
17
+ //
18
+ // Every other operation keeps today's unkeyed behaviour on purpose. A key makes
19
+ // a repeat REPLAY, which is right for a dispatch and wrong for, say, a second
20
+ // deliberate `createContext` with the same body.
21
+ import { createHash } from 'node:crypto';
22
+ import { z } from 'zod';
23
+ /** Matcher's own key contract: 1–128 chars of `A-Za-z0-9:_-`. */
24
+ export const IDEMPOTENCY_KEY_PATTERN = /^[A-Za-z0-9:_-]{1,128}$/;
25
+ /**
26
+ * Zod field for the optional caller-chosen key on the tools that can dispatch.
27
+ * Validated against matcher's contract so a malformed key fails at the tool
28
+ * boundary with a readable message instead of as a matcher 400.
29
+ */
30
+ export const idempotencyKeyInputField = z
31
+ .string()
32
+ .regex(IDEMPOTENCY_KEY_PATTERN, 'idempotencyKey must be 1–128 chars of A-Z a-z 0-9 : _ -')
33
+ .optional()
34
+ .describe('Optional idempotency key. OMIT IT normally: a key derived from this ' +
35
+ 'request is sent automatically for dispatch operations, so a retry after ' +
36
+ 'a timeout replays the recorded answer instead of dispatching a second ' +
37
+ 'time. Supply a distinct value ONLY to deliberately dispatch again after ' +
38
+ 'checking the target system — for example after an MTCH-0514 (outcome ' +
39
+ 'unconfirmed) answer.');
40
+ /**
41
+ * Is this path one of matcher's two dispatch routes —
42
+ * `/v1/exceptions/{id}/dispatch` and `/v1/exceptions/bulk/dispatch`?
43
+ */
44
+ export function isDispatchPath(path) {
45
+ return path.startsWith('/v1/exceptions/') && path.endsWith('/dispatch');
46
+ }
47
+ /**
48
+ * Content-derived key for a dispatch request: `dispatch:` + sha256 hex of
49
+ * `path|canonicalBody` (73 chars, inside matcher's 128-char cap and charset).
50
+ *
51
+ * Determinism is the whole point — the model's retry of the same tool call with
52
+ * the same arguments derives the same key, so matcher replays its recorded
53
+ * answer (including a HELD MTCH-0514 refusal) instead of re-executing.
54
+ *
55
+ * `exceptionIds` is sorted for the digest only; the body keeps the caller's
56
+ * order. The same SET of ids is the same request whatever order it arrived in,
57
+ * and a model re-emitting the list differently must not defeat the dedup.
58
+ */
59
+ export function deriveDispatchIdempotencyKey(path, body) {
60
+ return `dispatch:${createHash('sha256')
61
+ .update(`${path}|${JSON.stringify(canonicalizeBody(body))}`)
62
+ .digest('hex')}`;
63
+ }
64
+ /**
65
+ * The digest input's body form. Object keys are sorted recursively so the same
66
+ * fields in a different property order hash to the same key — `matcher_invoke`
67
+ * accepts a free-form body, so a model re-emitting equivalent JSON with another
68
+ * key order must not defeat the dedup. Ordinary arrays keep their order (a
69
+ * different element order can be a different request); `exceptionIds` is the
70
+ * one set-semantics exception and is value-sorted.
71
+ */
72
+ function canonicalizeBody(body) {
73
+ if (body === null || typeof body !== 'object') {
74
+ return body ?? null;
75
+ }
76
+ if (Array.isArray(body)) {
77
+ return body.map(canonicalizeBody);
78
+ }
79
+ const record = body;
80
+ return Object.fromEntries(Object.keys(record)
81
+ // `JSON.stringify` omits undefined-valued properties from the wire body,
82
+ // so they must not reach the digest either: `{ queue: undefined }` and
83
+ // `{}` send the same request and must derive the same key. Explicit
84
+ // nulls survive (they are on the wire too).
85
+ .filter((key) => record[key] !== undefined)
86
+ .sort()
87
+ .map((key) => [
88
+ key,
89
+ key === 'exceptionIds' && Array.isArray(record[key])
90
+ ? [...record[key]].map(String).sort()
91
+ : canonicalizeBody(record[key]),
92
+ ]));
93
+ }
94
+ //# sourceMappingURL=idempotency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"idempotency.js","sourceRoot":"","sources":["../../src/matcher/idempotency.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,qCAAqC;AACrC,gFAAgF;AAChF,mEAAmE;AACnE,iFAAiF;AACjF,8EAA8E;AAC9E,0DAA0D;AAC1D,EAAE;AACF,kFAAkF;AAClF,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,iFAAiF;AACjF,wBAAwB;AACxB,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,iDAAiD;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,iEAAiE;AACjE,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CA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AAC,KAAK,SAAS,CAAC;SAC1C,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;QACZ,GAAG;QACH,GAAG,KAAK,cAAc,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAClD,CAAC,CAAC,CAAC,GAAI,MAAM,CAAC,GAAG,CAAe,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE;YACpD,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KAClC,CAAC,CACL,CAAA;AACH,CAAC"}
@@ -172,6 +172,10 @@ export const GENERIC_ONLY_OPERATION_IDS = [
172
172
  // required knowing the operationId.)
173
173
  'admin-suspend-workspace', // PUT /v1/admin/workspaces/{slug}/suspend
174
174
  'admin-reactivate-workspace', // PUT /v1/admin/workspaces/{slug}/reactivate
175
+ // The enterprise plan assignment joins its two siblings above, and is the one of the
176
+ // four an agent must least be able to reach: it changes what a company is charged, on
177
+ // a workspace named in the path rather than in the caller's own token.
178
+ 'admin-assign-workspace-plan', // PUT /v1/admin/workspaces/{slug}/plan
175
179
  // The backoffice invoicing read belongs with its two siblings above and NOT with the
176
180
  // curated tools, for a reason stronger than "it is an operator surface": it is
177
181
  // addressed by slug and answers with another company's name, address and CPF/CNPJ.
@@ -1 +1 @@
1
- {"version":3,"file":"curated-operations.js","sourceRoot":"","sources":["../../src/spec/curated-operations.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wDAAwD;AACxD,EAAE;AACF,kBAAkB;AAClB,uEAAuE;AACvE,gFAAgF;AAChF,4EAA4E;AAC5E,2EAA2E;AAC3E,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,yEAAyE;AACzE,4EAA4E;AAC5E,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,4EAA4E;AAC5E,gFAAgF;AAChF,8DAA8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;CAC5C,CAAA"}
1
+ {"version":3,"file":"curated-operations.js","sourceRoot":"","sources":["../../src/spec/curated-operations.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wDAAwD;AACxD,EAAE;AACF,kBAAkB;AAClB,uEAAuE;AACvE,gFAAgF;AAChF,4EAA4E;AAC5E,2EAA2E;AAC3E,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,yEAAyE;AACzE,4EAA4E;AAC5E,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,4EAA4E;AAC5E,gFAAgF;AAChF,8DAA8D;AAC9D,EAAE;AACF,kDAAkD;AAClD,kFAAkF;AAClF,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,uDAAuD;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,6CAA6C;IAC7C,mBAAmB,EAAE,mDAAmD;IACxE,mBAAmB,EAAE,gEAAgE;IACrF,gBAAgB,EAAE,gEAAgE;IAClF,kBAAkB,EAAE,mDAAmD;IACvE,qBAAqB,EAAE,yEAAyE;IAChG,mBAAmB,EAAE,gEAAgE;IAErF,qCAAqC;IACrC,eAAe,EAAE,8DAA8D;IAC/E,eAAe,EAAE,qDAAqD;IACtE,YAAY,EAAE,qDAAqD;IACnE,cAAc,EAAE,8DAA8D;IAC9E,eAAe,EAAE,qDAAqD;IAEtE,yCAAyC;IACzC,iBAAiB,EAAE,6DAA6D;IAChF,iBAAiB,EAAE,sEAAsE;IACzF,cAAc,EAAE,sEAAsE;IACtF,gBAAgB,EAAE,6DAA6D;IAC/E,mBAAmB,EAAE,qEAAqE;IAC1F,iBAAiB,EAAE,sEAAsE;IAEzF,gHAAgH;IAChH,eAAe,EAAE,+CAA+C;IAChE,YAAY,EAAE,2DAA2D;IACzE,cAAc,EAAE,+CAA+C;IAC/D,eAAe,EAAE,2DAA2D;IAC5E,gBAAgB,EAAE,yEA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;IAC1E,qEAAqE;IACrE,uBAAuB,EAAE,wCAAwC;IACjE,oEAAoE;IACpE,4EAA4E;IAC5E,6EAA6E;IAC7E,2EAA2E;IAC3E,8EAA8E;IAC9E,qCAAqC;IACrC,yBAAyB,EAAE,0CAA0C;IACrE,4BAA4B,EAAE,6CAA6C;IAC3E,qFAAqF;IACrF,sFAAsF;IACtF,uEAAuE;IACvE,6BAA6B,EAAE,uCAAuC;IACtE,qFAAqF;IACrF,+EAA+E;IAC/E,mFAAmF;IACnF,mFAAmF;IACnF,0CAA0C;IAC1C,yBAAyB,EAAE,0CAA0C;IACrE,iFAAiF;IACjF,oFAAoF;IACpF,wEAAwE;IACxE,iFAAiF;IACjF,oFAAoF;IACpF,uBAAuB,EAAE,2BAA2B;CAC5C,CAAA"}
@@ -230,6 +230,33 @@ components:
230
230
  - createdAt
231
231
  - updatedAt
232
232
  type: object
233
+ AdminAssignPlanInputBody:
234
+ additionalProperties: false
235
+ properties:
236
+ plan:
237
+ description: "The plan code to assign. ONLY \"enterprise\" is accepted: self-serve plans are bought through checkout and converged from the live subscription's price, so assigning one here would be a payment-processor bypass the next processor delivery silently reverts. Any other code is refused with 409."
238
+ maxLength: 64
239
+ type: string
240
+ required:
241
+ - plan
242
+ type: object
243
+ AdminAssignPlanResult:
244
+ additionalProperties: false
245
+ properties:
246
+ billingStatus:
247
+ description: The commercial standing the workspace now holds. An enterprise contract is in good standing the moment it is signed, so this is always "active".
248
+ type: string
249
+ plan:
250
+ description: The plan the workspace now holds.
251
+ type: string
252
+ slug:
253
+ description: The workspace assigned.
254
+ type: string
255
+ required:
256
+ - slug
257
+ - plan
258
+ - billingStatus
259
+ type: object
233
260
  AdminWorkspaceBilling:
234
261
  additionalProperties: false
235
262
  properties:
@@ -321,10 +348,15 @@ components:
321
348
  additionalProperties: false
322
349
  properties:
323
350
  accountRef:
324
- description: Stored opaque vendor account reference (Pluggy itemId, Belvo link id)
351
+ description: Stored opaque vendor account reference (Pluggy itemId, Belvo link id); empty while the connection is awaiting consent
325
352
  examples:
326
353
  - a1b2c3d4-5678-90ab-cdef-1234567890ab
327
354
  type: string
355
+ awaitingConsent:
356
+ description: Whether the connection is still awaiting the end customer's vendor consent (no vendor item/link bound yet)
357
+ examples:
358
+ - false
359
+ type: boolean
328
360
  baseUrl:
329
361
  description: Stored vendor API base URL
330
362
  examples:
@@ -341,6 +373,11 @@ components:
341
373
  examples:
342
374
  - a1b2c3d4-5678-90ab-cdef-1234567890ab
343
375
  type: string
376
+ testable:
377
+ description: Whether Matcher can run a connectivity test for this connection right now (its vendor has a test path AND it is bound to a vendor item/link)
378
+ examples:
379
+ - true
380
+ type: boolean
344
381
  vendor:
345
382
  description: Aggregator vendor the connection is bound to
346
383
  enum:
@@ -355,6 +392,8 @@ components:
355
392
  - configName
356
393
  - baseUrl
357
394
  - accountRef
395
+ - testable
396
+ - awaitingConsent
358
397
  type: object
359
398
  AggregatorConnectionListResponse:
360
399
  additionalProperties: false
@@ -394,10 +433,9 @@ components:
394
433
  additionalProperties: false
395
434
  properties:
396
435
  accountRef:
397
- description: Opaque vendor account reference (Pluggy itemId, Belvo link id) the webhook pull threads onto its request
436
+ description: Opaque vendor account reference (Pluggy itemId, Belvo link id) the webhook pull threads onto its request. Omit to create a connection awaiting consent — the connect flow binds it after the end customer authorizes.
398
437
  examples:
399
438
  - a1b2c3d4-5678-90ab-cdef-1234567890ab
400
- minLength: 1
401
439
  type: string
402
440
  baseUrl:
403
441
  description: Vendor API base URL, stored as the connection host
@@ -432,7 +470,6 @@ components:
432
470
  - vendor
433
471
  - configName
434
472
  - baseUrl
435
- - accountRef
436
473
  - clientId
437
474
  - secret
438
475
  type: object
@@ -440,10 +477,15 @@ components:
440
477
  additionalProperties: false
441
478
  properties:
442
479
  accountRef:
443
- description: Stored opaque vendor account reference (Pluggy itemId, Belvo link id)
480
+ description: Stored opaque vendor account reference (Pluggy itemId, Belvo link id); empty while the connection is awaiting consent
444
481
  examples:
445
482
  - a1b2c3d4-5678-90ab-cdef-1234567890ab
446
483
  type: string
484
+ awaitingConsent:
485
+ description: Whether the connection is still awaiting the end customer's vendor consent (no vendor item/link bound yet)
486
+ examples:
487
+ - false
488
+ type: boolean
447
489
  baseUrl:
448
490
  description: Stored vendor API base URL
449
491
  examples:
@@ -468,6 +510,52 @@ components:
468
510
  - configName
469
511
  - baseUrl
470
512
  - accountRef
513
+ - awaitingConsent
514
+ type: object
515
+ AggregatorConsentTokenResponse:
516
+ additionalProperties: false
517
+ properties:
518
+ accountRef:
519
+ description: Vendor item/link id this token was scoped to (the stored binding); empty on a first consent. Pass it to the vendor widget's update mode alongside the token — do not substitute a locally cached value.
520
+ examples:
521
+ - a1b2c3d4-5678-90ab-cdef-1234567890ab
522
+ type: string
523
+ configName:
524
+ description: Config name of the connection the token was minted for
525
+ examples:
526
+ - pluggy-main
527
+ type: string
528
+ expiresAt:
529
+ description: UTC instant after which the vendor rejects this consent token
530
+ examples:
531
+ - "2026-08-23T12:30:00Z"
532
+ format: date-time
533
+ type: string
534
+ reconsent:
535
+ description: Whether the token re-authorizes the connection's existing vendor item/link (true) or will create a new one (false)
536
+ examples:
537
+ - false
538
+ type: boolean
539
+ token:
540
+ description: Short-lived, widget-ready consent token. Returned exactly once and never stored — pass it to the vendor widget and discard it.
541
+ examples:
542
+ - eyJhbGciOi...
543
+ type: string
544
+ vendor:
545
+ description: Aggregator vendor the consent token was minted against
546
+ enum:
547
+ - pluggy
548
+ - belvo
549
+ examples:
550
+ - pluggy
551
+ type: string
552
+ required:
553
+ - vendor
554
+ - configName
555
+ - token
556
+ - expiresAt
557
+ - reconsent
558
+ - accountRef
471
559
  type: object
472
560
  ApproveExtractionResponse:
473
561
  additionalProperties: false
@@ -632,6 +720,12 @@ components:
632
720
  - 0
633
721
  format: int64
634
722
  type: integer
723
+ fromSeq:
724
+ description: "Effective verification floor: the first tenant_seq eligible for inspection (1 when fromSeq was omitted). Resume a truncated run at fromSeq + verifiedCount"
725
+ examples:
726
+ - 1
727
+ format: int64
728
+ type: integer
635
729
  intact:
636
730
  description: True when every inspected record links to the previous one and matches its stored hash
637
731
  examples:
@@ -650,6 +744,7 @@ components:
650
744
  type: integer
651
745
  required:
652
746
  - intact
747
+ - fromSeq
653
748
  - verifiedCount
654
749
  - truncated
655
750
  type: object
@@ -878,6 +973,11 @@ components:
878
973
  BulkFailure:
879
974
  additionalProperties: false
880
975
  properties:
976
+ code:
977
+ description: Stable product error code for this row, when the failure has one
978
+ examples:
979
+ - MTCH-0514
980
+ type: string
881
981
  error:
882
982
  description: Human-readable reason the exception could not be processed
883
983
  examples:
@@ -1965,10 +2065,10 @@ components:
1965
2065
  type: integer
1966
2066
  structure:
1967
2067
  additionalProperties: {}
1968
- description: "Type-specific structure. FLAT: {\"amount\":\"1.50\"}. PERCENTAGE: {\"rate\":\"0.029\"} where rate is a 0..1 fraction of the base amount (0.029 means 2.9%), not a percent value. TIERED: {\"tiers\":[{\"rate\":\"0.01\",\"upTo\":\"1000\"},...]} with the same 0..1 fraction semantics per tier rate. EXPRESSION: {\"expression\":\"gross - desconto + multa + juros_dia * days_late(due_date, pay_date)\"} a formula over metadata fields (+ - * /, parentheses, and the functions days_late, days_between, max, min, abs, clamp)."
2068
+ description: "Type-specific structure. FLAT: {\"amount\":\"1.50\"}. PERCENTAGE: {\"rate\":\"0.029\"} where rate is a 0..1 fraction of the base amount (0.029 means 2.9%), not a percent value. TIERED: {\"tiers\":[{\"rate\":\"0.01\",\"upTo\":\"1000\"},...]} with the same 0..1 fraction semantics per tier rate. EXPRESSION: {\"expression\":\"gross - desconto + multa + juros_dia * days_late(due_date, pay_date)\"} a formula over metadata fields (+ - * /, parentheses, and the functions days_late, days_between, max, min, abs, clamp). A formula that is only the base amount times numeric literals is a percentage rate and is bounded 0..1: gross * 0.029 is 2.9%, gross * 2.9 is refused; any other formula is unbounded."
1969
2069
  type: object
1970
2070
  structureType:
1971
- description: Shape of the fee structure. FLAT is a fixed amount; PERCENTAGE is a rate of the base; TIERED applies different rates per amount tier; EXPRESSION computes the fee from a bounded arithmetic formula over transaction metadata.
2071
+ description: Shape of the fee structure; the structure field documents the object each one takes.
1972
2072
  enum:
1973
2073
  - FLAT
1974
2074
  - PERCENTAGE
@@ -2595,11 +2695,12 @@ components:
2595
2695
  additionalProperties: false
2596
2696
  properties:
2597
2697
  category:
2598
- description: "Dispute category: BANK_FEE_ERROR (incorrect fee), UNRECOGNIZED_CHARGE, DUPLICATE_TRANSACTION, or OTHER"
2698
+ description: "Dispute category: BANK_FEE_ERROR (incorrect fee), UNRECOGNIZED_CHARGE, DUPLICATE_TRANSACTION, AMOUNT_MISMATCH, or OTHER"
2599
2699
  enum:
2600
2700
  - BANK_FEE_ERROR
2601
2701
  - UNRECOGNIZED_CHARGE
2602
2702
  - DUPLICATE_TRANSACTION
2703
+ - AMOUNT_MISMATCH
2603
2704
  - OTHER
2604
2705
  examples:
2605
2706
  - BANK_FEE_ERROR
@@ -2759,7 +2860,7 @@ components:
2759
2860
  additionalProperties: false
2760
2861
  properties:
2761
2862
  amount:
2762
- description: "Enrichment: the exception transaction's amount as a decimal string in the transaction's currency. Present on list rows whose transaction still exists; absent on the get-by-id/resolution paths and when the transaction was deleted."
2863
+ description: "Enrichment: the exception transaction's amount as a decimal string in the transaction's currency. Present on list rows and get-by-id when the transaction still exists."
2763
2864
  examples:
2764
2865
  - "1250.50"
2765
2866
  type: string
@@ -2769,7 +2870,7 @@ components:
2769
2870
  - user@example.com
2770
2871
  type: string
2771
2872
  contextId:
2772
- description: "Enrichment: id of the reconciliation context the exception's source belongs to (UUID). Present on list rows whose transaction and source still exist; powers the global triage queue's context attribution."
2873
+ description: "Enrichment: id of the reconciliation context the exception's source belongs to (UUID). Present on list rows and get-by-id when the transaction and source still exist; powers the global triage queue's context attribution."
2773
2874
  examples:
2774
2875
  - 550e8400-e29b-41d4-a716-446655440004
2775
2876
  type: string
@@ -2779,7 +2880,7 @@ components:
2779
2880
  - "2025-01-15T10:30:00Z"
2780
2881
  type: string
2781
2882
  currency:
2782
- description: "Enrichment: ISO 4217 currency code of the exception transaction's amount. Present on list rows whose transaction still exists."
2883
+ description: "Enrichment: ISO 4217 currency code of the exception transaction's amount. Present on list rows and get-by-id when the transaction still exists."
2783
2884
  examples:
2784
2885
  - USD
2785
2886
  type: string
@@ -2841,6 +2942,9 @@ components:
2841
2942
  examples:
2842
2943
  - 550e8400-e29b-41d4-a716-446655440002
2843
2944
  type: string
2945
+ settlement:
2946
+ $ref: "#/components/schemas/ExceptionSettlementResponse"
2947
+ description: Settlement figures for a fee break (expected vs credited and the signed difference), derived from the live fee-variance snapshot recorded for the exception's transaction. Present on get-by-id only, and only when the snapshot and the transaction amount are both available in the same currency.
2844
2948
  severity:
2845
2949
  description: "Severity level: LOW and MEDIUM are informational, HIGH needs prompt review, CRITICAL requires immediate action"
2846
2950
  enum:
@@ -2852,21 +2956,27 @@ components:
2852
2956
  - HIGH
2853
2957
  type: string
2854
2958
  sourceId:
2855
- description: "Enrichment: id of the reconciliation source the exception transaction belongs to (UUID). Present on list rows whose transaction still exists."
2959
+ description: "Enrichment: id of the reconciliation source the exception transaction belongs to (UUID). Present on list rows and get-by-id when the transaction still exists."
2856
2960
  examples:
2857
2961
  - 550e8400-e29b-41d4-a716-446655440003
2858
2962
  type: string
2963
+ sourceName:
2964
+ description: "Enrichment: display name of the reconciliation source. Present on get-by-id when the transaction and its source still exist."
2965
+ examples:
2966
+ - Bank feed
2967
+ type: string
2859
2968
  status:
2860
- description: "Lifecycle status: OPEN (unhandled), ASSIGNED (owned by a user), RESOLVED (closed out)"
2969
+ description: "Lifecycle status: OPEN (unhandled), ASSIGNED (owned by a user), PENDING_RESOLUTION (a resolution is in flight), RESOLVED (closed out)"
2861
2970
  enum:
2862
2971
  - OPEN
2863
2972
  - ASSIGNED
2973
+ - PENDING_RESOLUTION
2864
2974
  - RESOLVED
2865
2975
  examples:
2866
2976
  - OPEN
2867
2977
  type: string
2868
2978
  transactionDate:
2869
- description: "Enrichment: the exception transaction's value date as an RFC 3339 timestamp. Present on list rows whose transaction still exists."
2979
+ description: "Enrichment: the exception transaction's value date as an RFC 3339 timestamp. Present on list rows and get-by-id when the transaction still exists."
2870
2980
  examples:
2871
2981
  - "2025-01-14T00:00:00Z"
2872
2982
  type: string
@@ -2888,6 +2998,35 @@ components:
2888
2998
  - createdAt
2889
2999
  - updatedAt
2890
3000
  type: object
3001
+ ExceptionSettlementResponse:
3002
+ additionalProperties: false
3003
+ properties:
3004
+ credited:
3005
+ description: Amount actually credited (the transaction amount), as a decimal string
3006
+ examples:
3007
+ - "95.00"
3008
+ type: string
3009
+ currency:
3010
+ description: ISO 4217 currency code of the settlement amounts (the transaction's currency)
3011
+ examples:
3012
+ - BRL
3013
+ type: string
3014
+ difference:
3015
+ description: Signed difference credited minus expected, as a decimal string; negative when the credit fell short
3016
+ examples:
3017
+ - "-2.00"
3018
+ type: string
3019
+ expected:
3020
+ description: Amount the transaction should have credited under the expected fee, as a decimal string
3021
+ examples:
3022
+ - "97.00"
3023
+ type: string
3024
+ required:
3025
+ - expected
3026
+ - credited
3027
+ - difference
3028
+ - currency
3029
+ type: object
2891
3030
  ExportCountResponse:
2892
3031
  additionalProperties: false
2893
3032
  properties:
@@ -3356,7 +3495,7 @@ components:
3356
3495
  type: integer
3357
3496
  structure:
3358
3497
  additionalProperties: {}
3359
- description: "Type-specific structure. FLAT: {\"amount\":\"1.50\"}. PERCENTAGE: {\"rate\":\"0.029\"} where rate is a 0..1 fraction of the base amount (0.029 means 2.9%), not a percent value. TIERED: {\"tiers\":[{\"rate\":\"0.01\",\"upTo\":\"1000\"},...]} with the same 0..1 fraction semantics per tier rate. EXPRESSION: {\"expression\":\"gross - desconto + multa + juros_dia * days_late(due_date, pay_date)\"} a formula over metadata fields (+ - * /, parentheses, and the functions days_late, days_between, max, min, abs, clamp)."
3498
+ description: "Type-specific structure. FLAT: {\"amount\":\"1.50\"}. PERCENTAGE: {\"rate\":\"0.029\"} where rate is a 0..1 fraction of the base amount (0.029 means 2.9%), not a percent value. TIERED: {\"tiers\":[{\"rate\":\"0.01\",\"upTo\":\"1000\"},...]} with the same 0..1 fraction semantics per tier rate. EXPRESSION: {\"expression\":\"gross - desconto + multa + juros_dia * days_late(due_date, pay_date)\"} a formula over metadata fields (+ - * /, parentheses, and the functions days_late, days_between, max, min, abs, clamp). A formula that is only the base amount times numeric literals is a percentage rate and is bounded 0..1: gross * 0.029 is 2.9%, gross * 2.9 is refused; any other formula is unbounded."
3360
3499
  type: object
3361
3500
  structureType:
3362
3501
  description: Shape of the fee structure. FLAT is a fixed amount; PERCENTAGE is a rate of the base; TIERED applies different rates per amount tier; EXPRESSION computes the fee from a bounded arithmetic formula over transaction metadata.
@@ -4054,7 +4193,7 @@ components:
4054
4193
  format: date-time
4055
4194
  type: string
4056
4195
  diagnosis:
4057
- description: Safe one-line diagnosis for a FAILED job (dialect diagnosis, rate-policy message, or generic safe message); empty for partial completed-with-errors jobs — internal error detail is never surfaced here
4196
+ description: Safe one-line diagnosis of anything the parser found worth reporting about the file (dialect mismatch, degraded settlement re-join, zero-detail file), the rate-policy message for policy-FAILED jobs, or a generic safe message for other FAILED jobs. Present on COMPLETED jobs too, including ones with zero failed rows; empty when there is nothing to report — internal error detail is never surfaced here
4058
4197
  examples:
4059
4198
  - file appears semicolon-delimited but the source declares comma; declare delimiter semicolon in the source dialect
4060
4199
  type: string
@@ -6657,7 +6796,9 @@ components:
6657
6796
  required:
6658
6797
  - id
6659
6798
  - status
6660
- type: object
6799
+ type:
6800
+ - object
6801
+ - "null"
6661
6802
  SetupProgressMatchRulesResponse:
6662
6803
  additionalProperties: false
6663
6804
  properties:
@@ -6719,7 +6860,9 @@ components:
6719
6860
  - method
6720
6861
  - path
6721
6862
  - requiredFields
6722
- type: object
6863
+ type:
6864
+ - object
6865
+ - "null"
6723
6866
  SetupProgressReadinessResponse:
6724
6867
  additionalProperties: false
6725
6868
  properties:
@@ -7580,16 +7723,7 @@ components:
7580
7723
  - pluggy-main
7581
7724
  minLength: 1
7582
7725
  type: string
7583
- vendor:
7584
- description: "Aggregator vendor: pluggy or belvo"
7585
- enum:
7586
- - pluggy
7587
- - belvo
7588
- examples:
7589
- - pluggy
7590
- type: string
7591
7726
  required:
7592
- - vendor
7593
7727
  - configName
7594
7728
  type: object
7595
7729
  TestAggregatorConnectionResponse:
@@ -7866,34 +8000,27 @@ components:
7866
8000
  additionalProperties: false
7867
8001
  properties:
7868
8002
  accountRef:
7869
- description: Opaque vendor account reference (Pluggy itemId, Belvo link id) the webhook pull threads onto its request
8003
+ description: Opaque vendor account reference (Pluggy itemId, Belvo link id). Supply it to bind (or re-bind) the connection after the vendor's consent widget returns one; omit it to leave the stored value untouched.
7870
8004
  examples:
7871
8005
  - a1b2c3d4-5678-90ab-cdef-1234567890ab
7872
- minLength: 1
7873
8006
  type: string
7874
8007
  baseUrl:
7875
- description: Vendor API base URL, stored as the connection host
8008
+ description: Vendor API base URL, stored as the connection host. Omit it to leave the stored URL untouched.
7876
8009
  examples:
7877
8010
  - https://api.pluggy.ai
7878
8011
  format: uri
7879
- minLength: 1
7880
8012
  type: string
7881
8013
  clientId:
7882
8014
  description: Aggregator API client id (optional; supply with secret to rotate, omit both to keep the stored credential; sealed; never emitted)
7883
8015
  type: string
7884
8016
  configName:
7885
- description: Unique connection config name (tenant-scoped); the mint endpoint binds a token to this name
8017
+ description: Unique connection config name (tenant-scoped); the mint endpoint binds a token to this name. Omit it to leave the stored name untouched.
7886
8018
  examples:
7887
8019
  - pluggy-main
7888
- minLength: 1
7889
8020
  type: string
7890
8021
  secret:
7891
8022
  description: Aggregator API client secret (optional; supply with clientId to rotate, omit both to keep the stored credential; sealed; never emitted)
7892
8023
  type: string
7893
- required:
7894
- - configName
7895
- - baseUrl
7896
- - accountRef
7897
8024
  type: object
7898
8025
  UpdateContextRequest:
7899
8026
  additionalProperties: false
@@ -8389,7 +8516,7 @@ components:
8389
8516
  format: int64
8390
8517
  type: integer
8391
8518
  monthlyLineAllowance:
8392
- description: Billable lines the plan includes per month, from the price list. Monthly on every plan regardless of billing interval. 0 when the stored plan code is not in the catalogue.
8519
+ description: Billable lines the plan includes per month, from the price list. Monthly on every plan regardless of billing interval. 0 when the plan is unmetered (see volumeUnmetered) or the stored plan code is not in the catalogue.
8393
8520
  format: int64
8394
8521
  type: integer
8395
8522
  overageCreditBalanceCents:
@@ -8397,7 +8524,7 @@ components:
8397
8524
  format: int64
8398
8525
  type: integer
8399
8526
  overageRateCentsPerThousandLines:
8400
- description: What lines beyond the allowance cost, in integer BRL cents per THOUSAND lines (per-thousand because the entry rate is 0,4 cents a line and would truncate to zero). 0 when the stored plan code is not in the catalogue.
8527
+ description: What lines beyond the allowance cost, in integer BRL cents per THOUSAND lines (per-thousand because the entry rate is 0,4 cents a line and would truncate to zero). 0 when the plan is unmetered (see volumeUnmetered) or the stored plan code is not in the catalogue.
8401
8528
  format: int64
8402
8529
  type: integer
8403
8530
  overageUncoveredCents:
@@ -8414,7 +8541,7 @@ components:
8414
8541
  description: "Setup lifecycle of the workspace: \"provisioning\" (still being built), \"active\" (ready to use), or \"failed\" (setup will not complete on its own — we have been told)."
8415
8542
  type: string
8416
8543
  provisioningStep:
8417
- description: "The setup step that is owed: \"create_tenant\", \"associate_service\", \"migrate_tenant\", \"provision_console\", or \"\" when nothing is owed. On a failed workspace this is the step it died on."
8544
+ description: "The setup step that is owed: \"create_tenant\", \"associate_service\", \"migrate_tenant\", \"provision_console\", \"grant_admin\", or \"\" when nothing is owed. On a failed workspace this is the step it died on."
8418
8545
  type: string
8419
8546
  trialEndsAt:
8420
8547
  description: When the free trial ends (UTC). Omitted for a paid plan that never trialed.
@@ -8423,6 +8550,9 @@ components:
8423
8550
  trialExpired:
8424
8551
  description: Whether the trial is over on EITHER axis (time or volume), or the workspace is already suspended.
8425
8552
  type: boolean
8553
+ volumeUnmetered:
8554
+ description: "Whether this plan is unmetered: its volume ceiling and its overage price are contractual (enterprise) rather than from the price list. When true, monthlyLineAllowance and overageRateCentsPerThousandLines are both 0 because no figure applies — do NOT render them as terms, and do not read the zero rate as free overage."
8555
+ type: boolean
8426
8556
  required:
8427
8557
  - plan
8428
8558
  - billingStatus
@@ -8435,6 +8565,7 @@ components:
8435
8565
  - provisioningState
8436
8566
  - provisioningStep
8437
8567
  - provisioningFailed
8568
+ - volumeUnmetered
8438
8569
  - monthlyLineAllowance
8439
8570
  - overageRateCentsPerThousandLines
8440
8571
  - overageCreditBalanceCents
@@ -8471,7 +8602,16 @@ info:
8471
8602
  email: support@lerian.studio
8472
8603
  name: Lerian Studio Support
8473
8604
  url: https://discord.gg/DnhqKwkGv3
8474
- description: Reconciliation engine for the Lerian Studio ecosystem. Provides automated transaction matching between Midaz ledger and external systems.
8605
+ description: |-
8606
+ Reconciliation engine for the Lerian Studio ecosystem. Provides automated transaction matching between Midaz ledger and external systems.
8607
+
8608
+ ## Idempotency
8609
+
8610
+ POST, PUT and PATCH requests accept an optional `Idempotency-Key` header (`X-Idempotency-Key` is also honoured, and wins if both are sent). Keys are 1-128 characters of letters, digits, hyphen, underscore or colon, are scoped per tenant, caller, method and request target, and are strictly opt-in: a request sent without the header is never de-duplicated. A retry under a key whose first attempt completed replays that stored response and carries `Idempotency-Replayed: true`; a retry that arrives while the first attempt is still in flight is refused with 409.
8611
+
8612
+ A request that FAILED normally releases its key, so a caller can correct the cause and retry under the same key. The exception is a dispatch whose outcome could not be confirmed (502, code `MTCH-0514`): the exception may already have been created in the target system, so that answer HOLDS its key — every retry under it replays the same 502 and no second dispatch is sent. Deliberately attempting that dispatch again therefore requires a NEW idempotency key. A dispatch the target answered and rejected (502, code `MTCH-0513`) created nothing there and releases its key as usual.
8613
+
8614
+ Secret mints are the other, sharper exception. `POST /v1/discovery/aggregator-connections/{id}/connect-token`, `POST /v1/discovery/webhooks/tokens`, `POST /v1/exceptions/callbacks/credentials` and `POST /v1/exceptions/callbacks/credentials/{credentialId}/rotate` each return a raw credential exactly ONCE, and storing that answer would keep the secret re-readable for the life of the key — so those four routes IGNORE the idempotency header entirely. Nothing is stored, nothing is replayed, and `Idempotency-Replayed` is never sent on them. A retry under the same key MINTS AGAIN and leaves a second live credential behind, so treat a mint as non-idempotent: read the first attempt's response rather than resending it. A surplus callback credential can be revoked through its own operation; a surplus aggregator webhook token has no revoke operation today and stays live.
8475
8615
  license:
8476
8616
  name: Lerian Studio General License
8477
8617
  title: Matcher Reconciliation API
@@ -8556,6 +8696,43 @@ paths:
8556
8696
  summary: Read a workspace's invoicing identification (backoffice)
8557
8697
  tags:
8558
8698
  - Onboarding
8699
+ /v1/admin/workspaces/{slug}/plan:
8700
+ put:
8701
+ description: "Puts a workspace on the contractual enterprise plan: persists plan=enterprise and billing_status=active together, then evicts the billing edge-gate and volume-resolver caches so the contractual ceiling applies immediately. ONLY \"enterprise\" is accepted. This is not a generic set-plan operation: self-serve plans are bought through hosted checkout and converged from the live subscription's price, so assigning one by hand would be a payment-processor bypass that the next processor delivery silently reverts — any other plan code returns 409. It REFUSES a workspace whose subscription the payment processor could still bill (409): the operator cancels there first, where the proration and refund decision gets human eyes, and this route never moves processor money. That refusal covers every subscription that is not permanently over — one awaiting card authentication or one that is paused is not charging today and resumes tomorrow, and it would revert this plan the moment it does; only a cancelled or expired subscription is assignable over. If the processor cannot be asked, the request is refused as retryable (503) rather than allowed through. A suspended workspace is refused (409) because this operation moves no access posture — reactivate it first, and the write is compare-and-swapped on the status read, so a suspension landing mid-request is refused rather than reversed. There is no reverse: removing the enterprise plan is not offered. The target slug comes from the URL path (backoffice operation, workspace admin action). An unknown workspace returns 404. Errors use RFC 9457 problem+json."
8702
+ operationId: admin-assign-workspace-plan
8703
+ parameters:
8704
+ - description: Slug of the workspace to assign the plan to.
8705
+ in: path
8706
+ name: slug
8707
+ required: true
8708
+ schema:
8709
+ description: Slug of the workspace to assign the plan to.
8710
+ maxLength: 255
8711
+ type: string
8712
+ requestBody:
8713
+ content:
8714
+ application/json:
8715
+ schema:
8716
+ $ref: "#/components/schemas/AdminAssignPlanInputBody"
8717
+ required: true
8718
+ responses:
8719
+ "200":
8720
+ content:
8721
+ application/json:
8722
+ schema:
8723
+ $ref: "#/components/schemas/AdminAssignPlanResult"
8724
+ description: OK
8725
+ default:
8726
+ content:
8727
+ application/problem+json:
8728
+ schema:
8729
+ $ref: "#/components/schemas/Detail"
8730
+ description: Error
8731
+ security:
8732
+ - BearerAuth: []
8733
+ summary: Assign the enterprise plan to a workspace (backoffice)
8734
+ tags:
8735
+ - Onboarding
8559
8736
  /v1/admin/workspaces/{slug}/reactivate:
8560
8737
  put:
8561
8738
  description: "Restores a suspended workspace: persists billing_status=active, re-enables interactive console login at the IdP, reactivates the tenant at the Tenant Manager (best-effort), and evicts the billing edge-gate cache. The target slug comes from the URL path (backoffice operation, workspace admin action). Idempotent. Errors use RFC 9457 problem+json."
@@ -10171,7 +10348,7 @@ paths:
10171
10348
  - Configuration
10172
10349
  /v1/discovery/aggregator-connections:
10173
10350
  get:
10174
- description: "Returns a cursor-paginated list of the tenant's Open-Finance data-aggregator (Pluggy/Belvo) connections, ordered by config name. The list is secret-free by construction: no credential material (clientId/secret/ciphertext) is ever returned."
10351
+ description: "Returns a cursor-paginated list of the tenant's Open-Finance data-aggregator (Pluggy/Belvo) connections, ordered by config name. The list is secret-free by construction: no credential material (clientId/secret/ciphertext) is ever returned. Each row carries `testable`, derived from the stored vendor, so a client knows whether the connectivity-test action can run at all without keeping its own vendor list."
10175
10352
  operationId: listAggregatorConnections
10176
10353
  parameters:
10177
10354
  - description: Maximum number of records to return
@@ -10239,7 +10416,7 @@ paths:
10239
10416
  - Discovery
10240
10417
  /v1/discovery/aggregator-connections/test:
10241
10418
  post:
10242
- description: "Runs a live connectivity check for an existing Open-Finance data-aggregator (Pluggy/Belvo) connection using its already-sealed credential, addressed by (vendor, configName). No credential is supplied or returned: the result is the secret-free boolean health of the connection."
10419
+ description: "Runs a live connectivity check for an existing Open-Finance data-aggregator (Pluggy/Belvo) connection using its already-sealed credential, addressed by configName. The vendor is read from the stored connection, not from the request. No credential is supplied or returned: the result is the secret-free boolean health of the connection. Two refusals are deliberately distinct: a config name matching no connection is 404 MTCH-0005, while a connection whose stored vendor Matcher has no test path for yet (Belvo today) is 422 MTCH-0210 and no test runs. The list endpoint's per-connection `testable` flag tells a client which is which before it offers the action."
10243
10420
  operationId: testAggregatorConnection
10244
10421
  requestBody:
10245
10422
  content:
@@ -10355,6 +10532,36 @@ paths:
10355
10532
  summary: Update aggregator connection
10356
10533
  tags:
10357
10534
  - Discovery
10535
+ /v1/discovery/aggregator-connections/{id}/connect-token:
10536
+ post:
10537
+ description: "Mints the short-lived token the aggregator vendor's OWN consent widget (Pluggy Connect / the Belvo widget) consumes in the end customer's browser, using the connection's already-sealed credential. The token is returned exactly once: it is never persisted, never logged, and there is no endpoint that reads it back. Nothing is supplied in the request — the vendor is read off the stored connection, and the mode is derived from it: a connection already bound to a vendor item/link gets a RE-CONSENT token for that same item (`reconsent: true`, and `accountRef` echoes the exact item/link the token was scoped to), while a connection awaiting consent gets a first-consent token that mints a new one (`accountRef` empty). Pass the returned `accountRef` to the vendor widget's update mode rather than a locally cached value: the token is item-scoped, and pairing it with a stale id makes the vendor run the create flow and orphan the original item. The item/link id the widget returns is bound back through PUT /v1/discovery/aggregator-connections/{id} with `accountRef` (no credential needs re-supplying). A non-aggregator connection id returns 404; a vendor with no consent path on this deployment returns 422 MTCH-0213."
10538
+ operationId: mintAggregatorConsentToken
10539
+ parameters:
10540
+ - description: Opaque aggregator connection id
10541
+ in: path
10542
+ name: id
10543
+ required: true
10544
+ schema:
10545
+ description: Opaque aggregator connection id
10546
+ type: string
10547
+ responses:
10548
+ "201":
10549
+ content:
10550
+ application/json:
10551
+ schema:
10552
+ $ref: "#/components/schemas/AggregatorConsentTokenResponse"
10553
+ description: Created
10554
+ default:
10555
+ content:
10556
+ application/problem+json:
10557
+ schema:
10558
+ $ref: "#/components/schemas/Detail"
10559
+ description: Error
10560
+ security:
10561
+ - BearerAuth: []
10562
+ summary: Mint aggregator consent token
10563
+ tags:
10564
+ - Discovery
10358
10565
  /v1/discovery/connections:
10359
10566
  get:
10360
10567
  description: Returns all discovered Fetcher database connections.
@@ -11708,7 +11915,7 @@ paths:
11708
11915
  - Exception
11709
11916
  /v1/exceptions/{exceptionId}:
11710
11917
  get:
11711
- description: Retrieves a single exception by its ID.
11918
+ description: Retrieves a single exception by its ID, including the amount/currency/date/source/context of its transaction and, for fee breaks, the expected vs credited settlement figures.
11712
11919
  operationId: getException
11713
11920
  parameters:
11714
11921
  - description: Exception ID (UUID)
@@ -13039,7 +13246,10 @@ paths:
13039
13246
  - Governance
13040
13247
  /v1/governance/audit-logs/verify:
13041
13248
  get:
13042
- description: "Re-verifies the calling tenant's tamper-evident audit hash chain and returns a structured verdict (intact, verified count, and the first broken tenant_seq when a break is found). The check is strictly read-only: it recomputes nothing into storage and never mutates an audit record. Use the optional maxRecords query parameter to bound how many records are inspected."
13249
+ description: |-
13250
+ Re-verifies the calling tenant's tamper-evident audit hash chain and returns a structured verdict (intact, verified count, and the first broken tenant_seq when a break is found). The check is strictly read-only: it recomputes nothing into storage and never mutates an audit record. Use the optional maxRecords query parameter to bound how many records are inspected.
13251
+
13252
+ Use the optional fromSeq query parameter to bind the verification floor: the first record inspected is the one with tenant_seq == fromSeq. A floor above 1 TRUSTS that record's stored prev_hash instead of validating it against the genesis hash, so tampering BELOW the floor is out of scope for that run and is not reported. Two uses follow from that: (1) resuming — when a verdict comes back truncated, re-run with fromSeq = fromSeq + verifiedCount to verify the remainder; (2) archived-partition tenants — once the archival worker has dropped the bottom partitions, verify from the current floor, because a run from seq 1 no longer has the records it would need. The verdict always echoes the effective fromSeq, so an empty range (verifiedCount 0 with a high fromSeq) is never mistaken for an intact chain verified from genesis.
13043
13253
  operationId: verifyAuditLogChain
13044
13254
  parameters:
13045
13255
  - description: Maximum number of records to inspect; clamped to the server bound. Omit to use the default bound.
@@ -13052,6 +13262,15 @@ paths:
13052
13262
  maximum: 10000
13053
13263
  minimum: 1
13054
13264
  type: integer
13265
+ - description: "Verification floor: the first record inspected is the one with this tenant_seq. Omit to start at the chain start (seq 1)."
13266
+ explode: false
13267
+ in: query
13268
+ name: fromSeq
13269
+ schema:
13270
+ description: "Verification floor: the first record inspected is the one with this tenant_seq. Omit to start at the chain start (seq 1)."
13271
+ format: int64
13272
+ minimum: 1
13273
+ type: integer
13055
13274
  responses:
13056
13275
  "200":
13057
13276
  content:
@@ -16381,7 +16600,7 @@ paths:
16381
16600
  - Onboarding
16382
16601
  /v1/workspace/credit-purchase:
16383
16602
  post:
16384
- description: "Opens a ONE-OFF hosted payment session that buys prepaid overage credit for the AUTHENTICATED tenant's own workspace, and returns the URL to redirect the browser to. It is never a subscription. The workspace is resolved from the JWT tenant-slug claim: this endpoint never accepts a tenant identifier in the body, path, query or headers. Any workspace may buy — trialing, lapsed, monthly or annual — because the customer who has run out of allowance is the one being told to buy. Payment is by CARD on every plan, including annual: the instrument that funds overage credit is deliberately not the subscription's instrument, and the card is saved for future CREDIT purchases only. An amount outside the price list's minimum and maximum is refused before the processor is called. The credit balance moves ONLY when the processor confirms the payment through the verified webhook — never on the return page and never in this response. Errors use the RFC 9457 application/problem+json contract."
16603
+ description: "Opens a ONE-OFF hosted payment session that buys prepaid overage credit for the AUTHENTICATED tenant's own workspace, and returns the URL to redirect the browser to. It is never a subscription. The workspace is resolved from the JWT tenant-slug claim: this endpoint never accepts a tenant identifier in the body, path, query or headers. Any workspace on a self-serve plan may buy — trialing, lapsed, monthly or annual — because the customer who has run out of allowance is the one being told to buy. A workspace on a CONTRACTUAL plan is refused with 409: its volume is not metered, so prepaid overage credit buys it nothing. Payment is by CARD on every plan, including annual: the instrument that funds overage credit is deliberately not the subscription's instrument, and the card is saved for future CREDIT purchases only. An amount outside the price list's minimum and maximum is refused before the processor is called. The credit balance moves ONLY when the processor confirms the payment through the verified webhook — never on the return page and never in this response. Errors use the RFC 9457 application/problem+json contract."
16385
16604
  operationId: workspace-credit-purchase
16386
16605
  requestBody:
16387
16606
  content:
@@ -9,6 +9,7 @@
9
9
  // tenant field; matcher scopes to the relayed token's tenant.
10
10
  import { z } from 'zod';
11
11
  import { DISPATCH_TARGET_SYSTEMS } from './dispatch.js';
12
+ import { idempotencyKeyInputField } from '../../matcher/idempotency.js';
12
13
  import { dispatchException, EXCEPTIONS_BULK_DISPATCH_PATH } from './shared.js';
13
14
  /** Zod raw shape for `exception_bulk_dispatch` input — ids + target + optional queue. */
14
15
  export const bulkDispatchInputShape = {
@@ -26,10 +27,11 @@ export const bulkDispatchInputShape = {
26
27
  .max(255)
27
28
  .optional()
28
29
  .describe('Optional queue or team assignment (≤255, e.g. "RECON-TEAM").'),
30
+ idempotencyKey: idempotencyKeyInputField,
29
31
  };
30
32
  /**
31
33
  * Build the bulk-dispatch POST body, omitting the optional `queue` when unset so
32
- * the request stays minimal.
34
+ * the request stays minimal. The header-only `idempotencyKey` never enters it.
33
35
  */
34
36
  export function buildBulkDispatchBody(args) {
35
37
  const body = {
@@ -54,13 +56,18 @@ export function registerExceptionBulkDispatchTool(server) {
54
56
  '(JIRA|SERVICENOW|WEBHOOK|MANUAL), and optionally a ' +
55
57
  'queue/team (≤255). Partial success is supported — the response reports ' +
56
58
  'per-exception successes and failures. No tenant field is accepted. Errors ' +
57
- 'surface as structured RFC 9457 problems.',
59
+ 'surface as structured RFC 9457 problems. This call is idempotent: an ' +
60
+ 'identical retry replays the recorded answer instead of dispatching the ' +
61
+ 'same exceptions a second time.',
58
62
  inputSchema: bulkDispatchInputShape,
59
63
  }, async (args, extra) => {
60
64
  return dispatchException({
61
65
  method: 'POST',
62
66
  path: EXCEPTIONS_BULK_DISPATCH_PATH,
63
67
  body: buildBulkDispatchBody(args),
68
+ ...(args.idempotencyKey !== undefined
69
+ ? { idempotencyKey: args.idempotencyKey }
70
+ : {}),
64
71
  }, extra);
65
72
  });
66
73
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bulk-dispatch.js","sourceRoot":"","sources":["../../../src/tools/exception/bulk-dispatch.ts"],"names":[],"mappings":"AAA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C;IAC3E,cAAc,EAAE,wBAAwB;CACzC,CAAA;AAOD;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAAuB;IAEvB,MAAM,IAAI,GAA4B;QACpC,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;KAChC,CAAA;IACD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACzB,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,MAAiB;IACjE,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,WAAW,EACT,2EAA2E;YAC3E,mEAAmE;YACnE,qDAAqD;YACrD,yEAAyE;YACzE,4EAA4E;YAC5E,uEAAuE;YACvE,yEAAyE;YACzE,gCAAgC;QAClC,WAAW,EAAE,sBAAsB;KACpC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,iBAAiB,CACtB;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,6BAA6B;YACnC,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;YACjC,GAAG,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS;gBACnC,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE;gBACzC,CAAC,CAAC,EAAE,CAAC;SACR,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -6,6 +6,7 @@
6
6
  // string) plus an optional queue/team. exceptionId is a path param; no tenant
7
7
  // field is accepted.
8
8
  import { z } from 'zod';
9
+ import { idempotencyKeyInputField } from '../../matcher/idempotency.js';
9
10
  import { dispatchException, exceptionDispatchPath } from './shared.js';
10
11
  /** External target systems a single exception can be dispatched to (closed enum per spec). */
11
12
  export const DISPATCH_TARGET_SYSTEMS = [
@@ -28,10 +29,12 @@ export const dispatchExceptionInputShape = {
28
29
  .max(255)
29
30
  .optional()
30
31
  .describe('Optional queue or team assignment (e.g. "RECON-TEAM").'),
32
+ idempotencyKey: idempotencyKeyInputField,
31
33
  };
32
34
  /**
33
- * Build the POST body from the input minus the path-only `exceptionId`, omitting
34
- * the optional `queue` when unset so the request stays minimal.
35
+ * Build the POST body from the input minus the path-only `exceptionId` and the
36
+ * header-only `idempotencyKey`, omitting the optional `queue` when unset so the
37
+ * request stays minimal.
35
38
  */
36
39
  export function buildDispatchBody(args) {
37
40
  const body = { targetSystem: args.targetSystem };
@@ -51,13 +54,17 @@ export function registerExceptionDispatchTool(server) {
51
54
  'Provide exceptionId (UUID path param), targetSystem ' +
52
55
  '(JIRA|SERVICENOW|WEBHOOK|MANUAL), and optionally a queue/team. No tenant ' +
53
56
  'field is accepted. Returns the dispatch acknowledgement, or a structured ' +
54
- 'RFC 9457 error.',
57
+ 'RFC 9457 error. This call is idempotent: an identical retry replays the ' +
58
+ 'recorded answer instead of opening a second ticket.',
55
59
  inputSchema: dispatchExceptionInputShape,
56
60
  }, async (args, extra) => {
57
61
  return dispatchException({
58
62
  method: 'POST',
59
63
  path: exceptionDispatchPath(args.exceptionId),
60
64
  body: buildDispatchBody(args),
65
+ ...(args.idempotencyKey !== undefined
66
+ ? { idempotencyKey: args.idempotencyKey }
67
+ : {}),
61
68
  }, extra);
62
69
  });
63
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../src/tools/exception/dispatch.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,4EAA4E;AAC5E,uEAAuE;AACvE,4EAA4E;AAC5E,8EAA8E;AAC9E,qBAAqB;AAErB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEtE,8FAA8F;AAC9F,MAAM,CAAC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QACE,WAAW,EACT,uEAAuE;YACvE,sDAAsD;YACtD,2EAA2E;YAC3E,2EAA2E;YAC3E,0EAA0E;YAC1E,qDAAqD;QACvD,WAAW,EAAE,2BAA2B;KACzC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,iBAAiB,CACtB;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC;YAC7C,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC;YAC7B,GAAG,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS;gBACnC,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE;gBACzC,CAAC,CAAC,EAAE,CAAC;SACR,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -10,7 +10,7 @@
10
10
  import { z } from 'zod';
11
11
  import { dispatchException, EXCEPTIONS_PATH } from './shared.js';
12
12
  /** Lifecycle states an exception can be filtered by (matcher's queue states). */
13
- export const EXCEPTION_STATUSES = ['OPEN', 'ASSIGNED', 'RESOLVED'];
13
+ export const EXCEPTION_STATUSES = ['OPEN', 'ASSIGNED', 'PENDING_RESOLUTION', 'RESOLVED'];
14
14
  /** Severity buckets an exception can be filtered by. */
15
15
  export const EXCEPTION_SEVERITIES = ['LOW', 'MEDIUM', 'HIGH', 'CRITICAL'];
16
16
  /** The reason an exception was raised (the matching defect that produced it). */
@@ -51,7 +51,7 @@ export const listExceptionsInputShape = {
51
51
  status: z
52
52
  .enum(EXCEPTION_STATUSES)
53
53
  .optional()
54
- .describe('Filter by lifecycle status (OPEN|ASSIGNED|RESOLVED).'),
54
+ .describe('Filter by lifecycle status (OPEN|ASSIGNED|PENDING_RESOLUTION|RESOLVED).'),
55
55
  severity: z
56
56
  .enum(EXCEPTION_SEVERITIES)
57
57
  .optional()
@@ -159,7 +159,7 @@ export function buildListQuery(args) {
159
159
  export function registerExceptionListTool(server) {
160
160
  server.registerTool('exception_list', {
161
161
  description: 'List reconciliation exceptions (cursor-paginated). Optional filters: ' +
162
- 'contextId (UUID — not a tenant field), status (OPEN|ASSIGNED|RESOLVED), ' +
162
+ 'contextId (UUID — not a tenant field), status (OPEN|ASSIGNED|PENDING_RESOLUTION|RESOLVED), ' +
163
163
  'severity (LOW|MEDIUM|HIGH|CRITICAL), reason (e.g. UNMATCHED, ' +
164
164
  'FEE_VARIANCE), assigned_to, external_system, date_from/date_to (RFC ' +
165
165
  '3339), plus sort_by/sort_order and limit (1–200)/cursor. The response ' +
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/tools/exception/list.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,gFAAgF;AAChF,yEAAyE;AACzE,4EAA4E;AAC5E,gFAAgF;AAChF,4EAA4E;AAE5E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEhE,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;AAE3E,wDAAwD;AACxD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAU,CAAA;AAElF,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,WAAW;IACX,qBAAqB;IACrB,qBAAqB;IACrB,uBAAuB;IACvB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,uBAAuB;IACvB,cAAc;IACd,kBAAkB;IAClB,uBAAuB;IACvB,kBAAkB;IAClB,YAAY;IACZ,cAAc;CACN,CAAA;AAEV,0FAA0F;AAC1F,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI;IAC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AAO,iBAAiB,CACtB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,eAAe;YACrB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1C,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -59,6 +59,11 @@ export const EXCEPTIONS_BULK_ASSIGN_PATH = `${EXCEPTIONS_PATH}/bulk/assign`;
59
59
  export const EXCEPTIONS_BULK_RESOLVE_PATH = `${EXCEPTIONS_PATH}/bulk/resolve`;
60
60
  /** Bulk-dispatch action across many exceptions. */
61
61
  export const EXCEPTIONS_BULK_DISPATCH_PATH = `${EXCEPTIONS_PATH}/bulk/dispatch`;
62
+ // The DEFAULT idempotency key for both dispatch routes is stamped by the
63
+ // transport (`src/matcher/idempotency.ts`), not here: the generic `matcher_invoke`
64
+ // can dispatch too, and keying only these two tools would leave that surface
65
+ // duplicating tickets. These tools only expose the OVERRIDE lane
66
+ // (`idempotencyKeyInputField`) for a deliberate second dispatch.
62
67
  /**
63
68
  * Run one assembled request through the relay: fail-closed auth, dispatch, and
64
69
  * RFC 9457 → tool-error mapping — identical to the generic invoke's dispatch so
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/tools/exception/shared.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,+EAA+E;AAC/E,wEAAwE;AACxE,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,gFAAgF;AAChF,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,kEAAkE;AAClE,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,qEAAqE;AAIrE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,iBAAiB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I,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,EAAE,CAAC,EAAE,CAAA;IAC9E,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,4EAA4E;QAC5E,4EAA4E;QAC5E,+CAA+C;QAC/C,IAAI,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,WAAW,CAAC,GAAG,CAAC,CAAA;QACzB,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;AACH,CAAC"}
@@ -61,7 +61,11 @@ export const feeScheduleItemShape = z
61
61
  '{"expression":"gross - desconto + multa + juros_dia * ' +
62
62
  'days_late(due_date, pay_date)"} — a bounded formula over metadata ' +
63
63
  'fields (operators + - * /, parentheses, and functions days_late, ' +
64
- 'days_between, max, min, abs, clamp).'),
64
+ 'days_between, max, min, abs, clamp). A formula that is only the ' +
65
+ 'base amount times numeric literals IS a percentage rate and ' +
66
+ 'carries the same 0..1 bound: gross * 0.029 charges 2.9% and is ' +
67
+ 'accepted, gross * 2.9 charges 290% and is refused. Any other ' +
68
+ 'formula is outside that subset and is deliberately unbounded.'),
65
69
  })
66
70
  .describe('A single fee item making up the schedule.');
67
71
  /** Zod raw shape for `fee_schedule_create` input — mirrors CreateFeeScheduleRequest. */
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/tools/fee-schedule/create.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE;AACF,iFAAiF;AACjF,8EAA8E;AAC9E,4EAA4E;AAC5E,4EAA4E;AAC5E,2EAA2E;AAC3E,+EAA+E;AAC/E,+DAA+D;AAC/D,EAAE;AACF,+EAA+E;AAC/E,iEAAiE;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CA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,gBAAgB,EAAE,CAAC;SAChB,IAAI,CAAC,kBAAkB,CAAC;SACxB,QAAQ,CACP,yEAAyE;QACvE,qEAAqE,CACxE;IACH,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,CAAC,8DAA8D,CAAC;IAC3E,YAAY,EAAE,CAAC;SACZ,IAAI,CAAC,cAAc,CAAC;SACpB,QAAQ,CACP,0EAA0E;QACxE,uEAAuE;QACvE,8BAA8B,CACjC;IACH,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,oBAAoB,CAAC;SAC3B,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CACP,2EAA2E;QACzE,2EAA2E,CAC9E;CACJ,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,YAAY,CACjB,qBAAqB,EACrB;QACE,WAAW,EACT,yEAAyE;YACzE,yEAAyE;YACzE,oEAAoE;YACpE,sEAAsE;YACtE,uEAAuE;YACvE,4BAA4B;QAC9B,WAAW,EAAE,2BAA2B;KACzC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,mBAAmB,CACxB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,EACxD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/tools/fee-schedule/create.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE;AACF,iFAAiF;AACjF,8EAA8E;AAC9E,4EAA4E;AAC5E,4EAA4E;AAC5E,2EAA2E;AAC3E,+EAA+E;AAC/E,+DAA+D;AAC/D,EAAE;AACF,+EAA+E;AAC/E,iEAAiE;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OA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G,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CAAC,wDAAwD,CAAC;IACrE,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CACP,yEAAyE;QACvE,+BAA+B,CAClC;IACH,gBAAgB,EAAE,CAAC;SAChB,IAAI,CAAC,kBAAkB,CAAC;SACxB,QAAQ,CACP,yEAAyE;QACvE,qEAAqE,CACxE;IACH,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,CAAC,8DAA8D,CAAC;IAC3E,YAAY,EAAE,CAAC;SACZ,IAAI,CAAC,cAAc,CAAC;SACpB,QAAQ,CACP,0EAA0E;QACxE,uEAAuE;QACvE,8BAA8B,CACjC;IACH,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,oBAAoB,CAAC;SAC3B,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CACP,2EAA2E;QACzE,2EAA2E,CAC9E;CACJ,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,YAAY,CACjB,qBAAqB,EACrB;QACE,WAAW,EACT,yEAAyE;YACzE,yEAAyE;YACzE,oEAAoE;YACpE,sEAAsE;YACtE,uEAAuE;YACvE,4BAA4B;QAC9B,WAAW,EAAE,2BAA2B;KACzC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,mBAAmB,CACxB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,EACxD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -39,6 +39,7 @@ import { Ajv2020 } from 'ajv/dist/2020.js';
39
39
  import { z } from 'zod';
40
40
  import { requireMatcherClient, UnauthenticatedError, } from '../../auth/request-token.js';
41
41
  import { MatcherApiError, } from '../../matcher/client.js';
42
+ import { idempotencyKeyInputField } from '../../matcher/idempotency.js';
42
43
  import { closestOperationIds, nonJsonBodyGuidance } from './describe-operation.js';
43
44
  import { isMatcherApiError, toToolError } from '../tool-error.js';
44
45
  /** Keys that would let a caller assert a tenant — categorically forbidden. */
@@ -302,6 +303,13 @@ export class Invoker {
302
303
  path,
303
304
  ...(input.query !== undefined ? { query: input.query } : {}),
304
305
  ...(body !== undefined ? { body } : {}),
306
+ // The DEFAULT key for a dispatch is stamped by the transport, so this
307
+ // generic surface is covered without knowing which operations dispatch.
308
+ // Passing a key here is the caller's deliberate override — how a second
309
+ // dispatch gets past a held refusal.
310
+ ...(input.idempotencyKey !== undefined
311
+ ? { idempotencyKey: input.idempotencyKey }
312
+ : {}),
305
313
  };
306
314
  }
307
315
  }
@@ -356,6 +364,7 @@ export const invokeInputShape = {
356
364
  .describe('JSON request body. Validated against the operation’s request-body ' +
357
365
  'schema before sending; on failure the validation errors are returned ' +
358
366
  'and no request is made. A tenant key is rejected.'),
367
+ idempotencyKey: idempotencyKeyInputField,
359
368
  };
360
369
  /**
361
370
  * Run an already-assembled request through the relay: fail-closed auth, dispatch,
@@ -417,6 +426,9 @@ export function registerInvokeTool(server, index) {
417
426
  ...(args.pathParams !== undefined ? { pathParams: args.pathParams } : {}),
418
427
  ...(args.query !== undefined ? { query: args.query } : {}),
419
428
  ...(args.body !== undefined ? { body: args.body } : {}),
429
+ ...(args.idempotencyKey !== undefined
430
+ ? { idempotencyKey: args.idempotencyKey }
431
+ : {}),
420
432
  });
421
433
  }
422
434
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"invoke.js","sourceRoot":"","sources":["../../../src/tools/generic/invoke.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE;AACF,iFAAiF;AACjF,qCAAqC;AACrC,iFAAiF;AACjF,4EAA4E;AAC5E,mCAAmC;AACnC,6EAA6E;AAC7E,iFAAiF;AACjF,gFAAgF;AAChF,iFAAiF;A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OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,WAAW,EAAE,CAAC;gBAC/B,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAA;YAClC,CAAC;YACD,MAAM,GAAG,CAAA;QACX,CAAC;QACD,OAAO,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IACjC,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -86,8 +86,11 @@ export function registerIngestionUploadBeginTool(server) {
86
86
  '" then file=@<your-local-file>.',
87
87
  '4. On success matcher returns 202 with a jobId. POLL ingestion_job_get ' +
88
88
  '(with this contextId and that jobId) to watch status. COMPLETED and ' +
89
- 'FAILED are terminal; on FAILED read the `diagnosis` field for the ' +
90
- 'reason.',
89
+ 'FAILED are terminal. ALWAYS read the `diagnosis` field when present, ' +
90
+ 'on either terminal status: on FAILED it is the reason, and on ' +
91
+ 'COMPLETED — including a job with zero failed rows — it is a ' +
92
+ 'file-level note the operator must act on, such as a settlement ' +
93
+ 're-join that fell back to degraded attribution.',
91
94
  '5. SIZE CAP: the streaming route is governed by the operator-' +
92
95
  'configured runtime key ingestion.max_upload_bytes (default ~1 GiB; ' +
93
96
  'range 1 MiB–8 GiB). It counts the TOTAL request body — every part, ' +
@@ -1 +1 @@
1
- {"version":3,"file":"upload-begin.js","sourceRoot":"","sources":["../../../src/tools/ingestion/upload-begin.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,wEAAwE;AACxE,0BAA0B;AAC1B,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,gFAAgF;AAChF,4EAA4E;AAC5E,6EAA6E;AAC7E,wEAAwE;AACxE,0CAA0C;AAE1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,UAAU,EAAE,MAA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E;gBACrE,cAAc;YAChB,sDAAsD;gBACpD,SAAS;gBACT,uEAAuE;gBACvE,kEAAkE;gBAClE,mBAAmB;YACrB,uEAAuE;gBACrE,uEAAuE;gBACvE,iEAAiE;gBACjE,sEAAsE;gBACtE,iBAAiB;gBACjB,aAAa;gBACb,iCAAiC;YACnC,yEAAyE;gBACvE,sEAAsE;gBACtE,oEAAoE;gBACpE,SAAS;YACX,+DAA+D;gBAC7D,qEAAqE;gBACrE,qEAAqE;gBACrE,iEAAiE;gBACjE,uEAAuE;gBACvE,mEAAmE;gBACnE,6DAA6D;YAC/D,8DAA8D;gBAC5D,gEAAgE;gBAChE,oEAAoE;gBACpE,mDAAmD;gBACnD,oDAAoD;SACvD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAEZ,MAAM,QAAQ,GAAG;YACf,SAAS;YACT,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,MAAM;YACjB,WAAW,EAAE,QAAQ;YACrB,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,OAAO;YACpB,YAAY;SACb,CAAA;QAED,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAA;IACxE,CAAC,CACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"upload-begin.js","sourceRoot":"","sources":["../../../src/tools/ingestion/upload-begin.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,wEAAwE;AACxE,0BAA0B;AAC1B,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF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ta.4",
3
+ "version": "5.0.0-beta.40",
4
4
  "type": "module",
5
5
  "description": "Model Context Protocol server for the Matcher reconciliation engine",
6
6
  "license": "Apache-2.0",