@lerianstudio/matcher-mcp 5.0.0 → 5.1.0-beta.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/matcher/idempotency.js +9 -4
- package/dist/matcher/idempotency.js.map +1 -1
- package/dist/spec/curated-operations.js +4 -0
- package/dist/spec/curated-operations.js.map +1 -1
- package/dist/spec/openapi.yaml +125 -17
- package/dist/tools/exception/adjust-entry.js +8 -3
- package/dist/tools/exception/adjust-entry.js.map +1 -1
- package/dist/tools/tool-error.js +22 -3
- package/dist/tools/tool-error.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,9 +34,13 @@ export const idempotencyKeyInputField = z
|
|
|
34
34
|
.describe('Optional idempotency key. OMIT IT normally: a key derived from this ' +
|
|
35
35
|
'request is sent automatically for dispatch operations, so a retry after ' +
|
|
36
36
|
'a timeout replays the recorded answer instead of dispatching a second ' +
|
|
37
|
-
'time.
|
|
38
|
-
'
|
|
39
|
-
'
|
|
37
|
+
'time. Keep that key (keep omitting this field) on a 409 MTCH-0018 (the ' +
|
|
38
|
+
'first attempt is still in flight: wait, then retry) and on a 409 ' +
|
|
39
|
+
'MTCH-0022 (an earlier attempt may already have applied: check the ' +
|
|
40
|
+
'target system). Supply a distinct value ONLY to deliberately dispatch ' +
|
|
41
|
+
'again: after checking the target system that an MTCH-0514 or MTCH-0022 ' +
|
|
42
|
+
'outcome did not apply, or after fixing the cause of a refusal such as ' +
|
|
43
|
+
'a 409 MTCH-0007, which the derived key would otherwise replay.');
|
|
40
44
|
/**
|
|
41
45
|
* Is this path one of matcher's two dispatch routes —
|
|
42
46
|
* `/v1/exceptions/{id}/dispatch` and `/v1/exceptions/bulk/dispatch`?
|
|
@@ -50,7 +54,8 @@ export function isDispatchPath(path) {
|
|
|
50
54
|
*
|
|
51
55
|
* Determinism is the whole point — the model's retry of the same tool call with
|
|
52
56
|
* the same arguments derives the same key, so matcher replays its recorded
|
|
53
|
-
* answer
|
|
57
|
+
* answer, or refuses 409 MTCH-0022 when the first attempt's outcome was never
|
|
58
|
+
* recorded (an MTCH-0514), instead of re-executing.
|
|
54
59
|
*
|
|
55
60
|
* `exceptionIds` is sorted for the digest only; the body keeps the caller's
|
|
56
61
|
* order. The same SET of ids is the same request whatever order it arrived in,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idempotency.js","sourceRoot":"","sources":["../../src/matcher/idempotency.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,qCAAqC;AACrC,4EAA4E;AAC5E,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,CAAA;AAEhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,EAAE;KACR,KAAK,CACJ,uBAAuB,EACvB,yDAAyD,CAC1D;KACA,QAAQ,EAAE;KACV,QAAQ,CACP,sEAAsE;IACpE,0EAA0E;IAC1E,wEAAwE;IACxE,
|
|
1
|
+
{"version":3,"file":"idempotency.js","sourceRoot":"","sources":["../../src/matcher/idempotency.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,qCAAqC;AACrC,4EAA4E;AAC5E,mEAAmE;AACnE,iFAAiF;AACjF,8EAA8E;AAC9E,0DAA0D;AAC1D,EAAE;AACF,kFAAkF;AAClF,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AA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ACxB,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;IACnC,CAAC;IAED,MAAM,MAAM,GAAG,IAA+B,CAAA;IAC9C,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACjB,yEAAyE;QACzE,uEAAuE;QACvE,oEAAoE;QACpE,4CAA4C;SAC3C,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,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"}
|
|
@@ -161,6 +161,10 @@ export const GENERIC_ONLY_OPERATION_IDS = [
|
|
|
161
161
|
'listCallbackCredentials', // GET /v1/exceptions/callbacks/credentials
|
|
162
162
|
'rotateCallbackCredential', // POST /v1/exceptions/callbacks/credentials/{credentialId}/rotate
|
|
163
163
|
'revokeCallbackCredential', // DELETE /v1/exceptions/callbacks/credentials/{credentialId}
|
|
164
|
+
// aggregator webhook token (generic-only) — list + revoke of the tokens an
|
|
165
|
+
// operator mints, the same lifecycle CRUD as the callback credentials above.
|
|
166
|
+
'listAggregatorWebhookTokens', // GET /v1/discovery/webhooks/tokens
|
|
167
|
+
'revokeAggregatorWebhookToken', // DELETE /v1/discovery/webhooks/tokens/{tokenId}
|
|
164
168
|
// discovery webhook (generic-only) — inbound aggregator webhook receiver, not
|
|
165
169
|
// an operator-initiated action (cf. processCallback above).
|
|
166
170
|
'receiveAggregatorWebhook', // POST /v1/discovery/webhooks/{provider}/{webhookToken}
|
|
@@ -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,yDAAyD;AACzD,gFAAgF;AAChF,4EAA4E;AAC5E,mEAAmE;AACnE,2EAA2E;AAC3E,4EAA4E;AAC5E,+EAA+E;AAC/E,yEAAyE;AACzE,4EAA4E;AAC5E,EAAE;AACF,yEAAyE;AACzE,sEAAsE;AACtE,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,mEAAmE;AACnE,8DAA8D;AAC9D,EAAE;AACF,kDAAkD;AAClD,kFAAkF;AAClF,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,uDAAuD;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,6CAA6C;IAC7C,iBAAiB,EAAE,wBAAwB,EAAE,sBAAsB;IACnE,iBAAiB,EAAE,uCAAuC,EAAE,sBAAsB;IAClF,cAAc,EAAE,oCAAoC,EAAE,mBAAmB;IACzE,gBAAgB,EAAE,uBAAuB,EAAE,oBAAoB;IAC/D,mBAAmB,EAAE,8CAA8C,EAAE,wBAAwB;IAC7F,iBAAiB,EAAE,sCAAsC,EAAE,sBAAsB;IAEjF,qCAAqC;IACrC,aAAa,EAAE,yCAAyC,EAAE,kBAAkB;IAC5E,aAAa,EAAE,kCAAkC,EAAE,kBAAkB;IACrE,UAAU,EAAE,+BAA+B,EAAE,eAAe;IAC5D,YAAY,EAAE,wCAAwC,EAAE,gBAAgB;IACxE,aAAa,EAAE,iCAAiC,EAAE,kBAAkB;IAEpE,yCAAyC;IACzC,eAAe,EAAE,qCAAqC,EAAE,oBAAoB;IAC5E,eAAe,EAAE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D,yEAAyE;IACzE,6EAA6E;IAC7E,8EAA8E;IAC9E,wEAAwE;IACxE,QAAQ,EAAE,kBAAkB;IAC5B,eAAe,EAAE,yBAAyB;IAC1C,0EAA0E;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"}
|
|
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,yDAAyD;AACzD,gFAAgF;AAChF,4EAA4E;AAC5E,mEAAmE;AACnE,2EAA2E;AAC3E,4EAA4E;AAC5E,+EAA+E;AAC/E,yEAAyE;AACzE,4EAA4E;AAC5E,EAAE;AACF,yEAAyE;AACzE,sEAAsE;AACtE,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,mEAAmE;AACnE,8DAA8D;AAC9D,EAAE;AACF,kDAAkD;AAClD,kFAAkF;AAClF,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,uDAAuD;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,6CAA6C;IAC7C,iBAAiB,EA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,CAAA"}
|
package/dist/spec/openapi.yaml
CHANGED
|
@@ -113,6 +113,14 @@ components:
|
|
|
113
113
|
maxLength: 3
|
|
114
114
|
minLength: 3
|
|
115
115
|
type: string
|
|
116
|
+
direction:
|
|
117
|
+
description: Side of the adjustment entry, DEBIT or CREDIT. Optional; DEBIT when omitted. The amount stays positive either way
|
|
118
|
+
enum:
|
|
119
|
+
- DEBIT
|
|
120
|
+
- CREDIT
|
|
121
|
+
examples:
|
|
122
|
+
- DEBIT
|
|
123
|
+
type: string
|
|
116
124
|
effectiveAt:
|
|
117
125
|
description: When the adjustment takes effect, as an RFC 3339 timestamp
|
|
118
126
|
examples:
|
|
@@ -2328,6 +2336,10 @@ components:
|
|
|
2328
2336
|
CreateManualMatchRequest:
|
|
2329
2337
|
additionalProperties: false
|
|
2330
2338
|
properties:
|
|
2339
|
+
exceptionId:
|
|
2340
|
+
description: Optional exception the operator is pairing. Its transaction must be one of transactionIds; confirming the match resolves it in the same write, unless it is no longer open or is under an active dispute
|
|
2341
|
+
format: uuid
|
|
2342
|
+
type: string
|
|
2331
2343
|
notes:
|
|
2332
2344
|
description: Optional note for the manual match
|
|
2333
2345
|
type: string
|
|
@@ -2423,7 +2435,7 @@ components:
|
|
|
2423
2435
|
- file
|
|
2424
2436
|
type: string
|
|
2425
2437
|
scheduleSpec:
|
|
2426
|
-
description:
|
|
2438
|
+
description: "How often the binding scheduler runs: a positive duration such as 15m, optionally written @every 15m. Cron expressions are refused."
|
|
2427
2439
|
examples:
|
|
2428
2440
|
- "@every 1h"
|
|
2429
2441
|
maxLength: 100
|
|
@@ -3145,10 +3157,13 @@ components:
|
|
|
3145
3157
|
- BUSINESS_DECISION
|
|
3146
3158
|
type: string
|
|
3147
3159
|
resolutionType:
|
|
3148
|
-
description: "How the exception was resolved: FORCE_MATCH (override match)
|
|
3160
|
+
description: "How the exception was resolved: FORCE_MATCH (override match), ADJUST_ENTRY (monetary correction), MANUAL_MATCH (the manual match that paired it), AUTO_CONSUME (closed automatically when a run settled its transaction against a carried open item) or UNMATCH_WITHDRAWN (withdrawn by an un-match: the match that raised it, or the manual match that resolved it, was undone)"
|
|
3149
3161
|
enum:
|
|
3150
3162
|
- FORCE_MATCH
|
|
3151
3163
|
- ADJUST_ENTRY
|
|
3164
|
+
- MANUAL_MATCH
|
|
3165
|
+
- AUTO_CONSUME
|
|
3166
|
+
- UNMATCH_WITHDRAWN
|
|
3152
3167
|
examples:
|
|
3153
3168
|
- FORCE_MATCH
|
|
3154
3169
|
type: string
|
|
@@ -7692,7 +7707,7 @@ components:
|
|
|
7692
7707
|
- file
|
|
7693
7708
|
type: string
|
|
7694
7709
|
scheduleSpec:
|
|
7695
|
-
description:
|
|
7710
|
+
description: "How often the binding scheduler runs: a positive duration such as 15m, optionally written @every 15m. Cron expressions are refused."
|
|
7696
7711
|
examples:
|
|
7697
7712
|
- "@every 1h"
|
|
7698
7713
|
type: string
|
|
@@ -7839,7 +7854,7 @@ components:
|
|
|
7839
7854
|
additionalProperties: false
|
|
7840
7855
|
properties:
|
|
7841
7856
|
currency:
|
|
7842
|
-
description: ISO 4217 currency code for the monetary amounts in this row.
|
|
7857
|
+
description: ISO 4217 currency code for the monetary amounts in this row; empty when the source holds more than one currency in the window, whose amounts are then a cross-currency sum.
|
|
7843
7858
|
examples:
|
|
7844
7859
|
- USD
|
|
7845
7860
|
type: string
|
|
@@ -8270,6 +8285,47 @@ components:
|
|
|
8270
8285
|
- healthy
|
|
8271
8286
|
- latencyMs
|
|
8272
8287
|
type: object
|
|
8288
|
+
TokenListResponse:
|
|
8289
|
+
additionalProperties: false
|
|
8290
|
+
properties:
|
|
8291
|
+
tokens:
|
|
8292
|
+
description: The tenant's webhook tokens (live and revoked), newest first. Metadata only — never the token or its hash.
|
|
8293
|
+
items:
|
|
8294
|
+
$ref: "#/components/schemas/TokenMetadata"
|
|
8295
|
+
type:
|
|
8296
|
+
- array
|
|
8297
|
+
- "null"
|
|
8298
|
+
required:
|
|
8299
|
+
- tokens
|
|
8300
|
+
type: object
|
|
8301
|
+
TokenMetadata:
|
|
8302
|
+
additionalProperties: false
|
|
8303
|
+
properties:
|
|
8304
|
+
configName:
|
|
8305
|
+
description: Config name of the aggregator connection the token is bound to
|
|
8306
|
+
type: string
|
|
8307
|
+
createdAt:
|
|
8308
|
+
description: Mint time (RFC 3339, UTC)
|
|
8309
|
+
type: string
|
|
8310
|
+
id:
|
|
8311
|
+
description: Surrogate id of the token
|
|
8312
|
+
format: uuid
|
|
8313
|
+
type: string
|
|
8314
|
+
revokedAt:
|
|
8315
|
+
description: When this token was revoked (RFC 3339, UTC); absent if live
|
|
8316
|
+
type: string
|
|
8317
|
+
vendor:
|
|
8318
|
+
description: Aggregator vendor the token is bound to
|
|
8319
|
+
enum:
|
|
8320
|
+
- pluggy
|
|
8321
|
+
- belvo
|
|
8322
|
+
type: string
|
|
8323
|
+
required:
|
|
8324
|
+
- id
|
|
8325
|
+
- vendor
|
|
8326
|
+
- configName
|
|
8327
|
+
- createdAt
|
|
8328
|
+
type: object
|
|
8273
8329
|
TransactionResponse:
|
|
8274
8330
|
additionalProperties: false
|
|
8275
8331
|
properties:
|
|
@@ -8754,7 +8810,7 @@ components:
|
|
|
8754
8810
|
maxLength: 255
|
|
8755
8811
|
type: string
|
|
8756
8812
|
scheduleSpec:
|
|
8757
|
-
description:
|
|
8813
|
+
description: "How often the binding scheduler runs: a positive duration such as 15m, optionally written @every 15m. Cron expressions are refused."
|
|
8758
8814
|
examples:
|
|
8759
8815
|
- "@every 30m"
|
|
8760
8816
|
maxLength: 100
|
|
@@ -9022,7 +9078,7 @@ components:
|
|
|
9022
9078
|
additionalProperties: false
|
|
9023
9079
|
properties:
|
|
9024
9080
|
matchedAmount:
|
|
9025
|
-
description: Total monetary value of matched transactions, as a decimal string
|
|
9081
|
+
description: "Total monetary value of matched transactions, as a decimal string: an arithmetic sum across currencies, a money figure only when the window holds one currency."
|
|
9026
9082
|
examples:
|
|
9027
9083
|
- "1180000.00"
|
|
9028
9084
|
type: string
|
|
@@ -9045,7 +9101,7 @@ components:
|
|
|
9045
9101
|
format: date-time
|
|
9046
9102
|
type: string
|
|
9047
9103
|
totalAmount:
|
|
9048
|
-
description: Total monetary value of all transactions, as a decimal string
|
|
9104
|
+
description: "Total monetary value of all transactions, as a decimal string: an arithmetic sum across currencies, a money figure only when the window holds one currency."
|
|
9049
9105
|
examples:
|
|
9050
9106
|
- "1250000.00"
|
|
9051
9107
|
type: string
|
|
@@ -9056,7 +9112,7 @@ components:
|
|
|
9056
9112
|
format: int64
|
|
9057
9113
|
type: integer
|
|
9058
9114
|
unmatchedAmount:
|
|
9059
|
-
description: Total monetary value of unmatched transactions, as a decimal string
|
|
9115
|
+
description: "Total monetary value of unmatched transactions, as a decimal string: an arithmetic sum across currencies, a money figure only when the window holds one currency (see unmatchedByCurrency)."
|
|
9060
9116
|
examples:
|
|
9061
9117
|
- "70000.00"
|
|
9062
9118
|
type: string
|
|
@@ -9218,17 +9274,19 @@ info:
|
|
|
9218
9274
|
|
|
9219
9275
|
## Idempotency
|
|
9220
9276
|
|
|
9221
|
-
POST, PUT and PATCH requests accept an optional `X-Idempotency` header. It is the one header a key travels in and it has no synonym: a mutating request that carries an older spelling and no `X-Idempotency` is refused with 400 rather than processed unkeyed. 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 `X-Idempotency-Replayed: true`; a retry that arrives while the first attempt is still in flight is refused with 409
|
|
9277
|
+
POST, PUT and PATCH requests accept an optional `X-Idempotency` header. It is the one header a key travels in and it has no synonym: a mutating request that carries an older spelling and no `X-Idempotency` is refused with 400 rather than processed unkeyed. 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 `X-Idempotency-Replayed: true`; a retry that arrives while the first attempt is still in flight is refused with 409 `MTCH-0018`.
|
|
9222
9278
|
|
|
9223
9279
|
A retry must repeat the original request. On an ordinary route the body is part of what identifies it, so a completed key re-sent with a DIFFERENT body is refused with 422 and nothing is applied — send the correction under a new key. The two file routes (`POST /v1/imports/contexts/{contextId}/sources/{sourceId}/upload` and the matching `/preview`) consume their body as a live stream and cannot re-read it, so there the key itself is the identity under that method and path: a completed key re-sent replays the first answer whatever file the retry carries.
|
|
9224
9280
|
|
|
9225
|
-
A key is ONE attempt. A refusal the request earned is recorded like any other answer, and every resend under that key replays it for the retention window — a caller that wants to correct its request mints a new key. Three answers do NOT spend the key, because none of them is an answer to the request itself: a 429 from the rate limiter, a 402 from the volume quota, and a 502 with code `MTCH-0513`, where the dispatch target answered and DECLINED before anything was created there. Every other 5xx HOLDS the key, including that code's near neighbour, the dispatch whose outcome could not be confirmed (502, code `MTCH-0514`), whose exception may already exist in the target system: the outcome was not recorded, so every resend under that key is refused 409 and nothing is sent again. Deliberately attempting such an operation again therefore requires a NEW key.
|
|
9281
|
+
A key is ONE attempt. A refusal the request earned is recorded like any other answer, and every resend under that key replays it for the retention window — a caller that wants to correct its request mints a new key. Three answers do NOT spend the key, because none of them is an answer to the request itself: a 429 from the rate limiter, a 402 from the volume quota, and a 502 with code `MTCH-0513`, where the dispatch target answered and DECLINED before anything was created there. Every other 5xx HOLDS the key, including that code's near neighbour, the dispatch whose outcome could not be confirmed (502, code `MTCH-0514`), whose exception may already exist in the target system: the outcome was not recorded, so every resend under that key is refused 409 `MTCH-0022` and nothing is sent again. Deliberately attempting such an operation again therefore requires a NEW key.
|
|
9226
9282
|
|
|
9227
9283
|
`X-Idempotency-Fenced` rides every response whose outcome the guard could not receipt, a 2xx included. `true` means the hold landed: the key still protects the operation and every resend under it is refused 409. Only `false` means a resend would EXECUTE — the answer in hand may already have applied and the key no longer protects it, so check whether the first attempt took effect before sending anything again.
|
|
9228
9284
|
|
|
9229
|
-
|
|
9285
|
+
`MTCH-0022` is the one code for a 409 saying an earlier attempt under this key already ran: it may already have applied and nothing is run again under that key, so keep the key and check the outcome before sending anything. Every other 409 refuses the request itself.
|
|
9286
|
+
|
|
9287
|
+
Two bounds close the contract. A response larger than about 1 MB is delivered to its caller in full, but it is not stored for replay: a duplicate under the same key is answered 409 `MTCH-0022` instead of replayed. And an over-sized body is refused with 413 and spends nothing. On every route but one the service-wide request body limit refuses it before the key is read. The streaming upload (`POST /v1/imports/contexts/{contextId}/sources/{sourceId}/upload`) is exempt from that limit: the key is read first and ingestion enforces its own upload limit inside the handler, so its 413 is a fourth answer that releases the key, and a smaller file may be re-sent under it.
|
|
9230
9288
|
|
|
9231
|
-
Secret mints are another, 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 `X-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
|
|
9289
|
+
Secret mints are another, 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 `X-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 or aggregator webhook token shows in its list operation (metadata only, never the secret) and is revoked through its own operation.
|
|
9232
9290
|
license:
|
|
9233
9291
|
name: Lerian Studio General License
|
|
9234
9292
|
title: Matcher Reconciliation API
|
|
@@ -11657,6 +11715,27 @@ paths:
|
|
|
11657
11715
|
tags:
|
|
11658
11716
|
- Discovery
|
|
11659
11717
|
/v1/discovery/webhooks/tokens:
|
|
11718
|
+
get:
|
|
11719
|
+
description: Lists the caller tenant's aggregator webhook tokens (live and revoked), newest first. Returns metadata only — never the token or its hash.
|
|
11720
|
+
operationId: listAggregatorWebhookTokens
|
|
11721
|
+
responses:
|
|
11722
|
+
"200":
|
|
11723
|
+
content:
|
|
11724
|
+
application/json:
|
|
11725
|
+
schema:
|
|
11726
|
+
$ref: "#/components/schemas/TokenListResponse"
|
|
11727
|
+
description: OK
|
|
11728
|
+
default:
|
|
11729
|
+
content:
|
|
11730
|
+
application/problem+json:
|
|
11731
|
+
schema:
|
|
11732
|
+
$ref: "#/components/schemas/Detail"
|
|
11733
|
+
description: Error
|
|
11734
|
+
security:
|
|
11735
|
+
- BearerAuth: []
|
|
11736
|
+
summary: List aggregator webhook tokens
|
|
11737
|
+
tags:
|
|
11738
|
+
- Discovery
|
|
11660
11739
|
post:
|
|
11661
11740
|
description: Mints a webhook token bound to an existing aggregator connection and returns the raw token plus its provider-facing webhook URL ONCE. Only the token's SHA-256 hash is stored.
|
|
11662
11741
|
operationId: mintAggregatorWebhookToken
|
|
@@ -11684,6 +11763,35 @@ paths:
|
|
|
11684
11763
|
summary: Mint an aggregator webhook token
|
|
11685
11764
|
tags:
|
|
11686
11765
|
- Discovery
|
|
11766
|
+
/v1/discovery/webhooks/tokens/{tokenId}:
|
|
11767
|
+
delete:
|
|
11768
|
+
description: Revokes an aggregator webhook token so vendor deliveries to its URL are refused. Revocation is terminal and append-only audited. Other live tokens for the same connection keep working.
|
|
11769
|
+
operationId: revokeAggregatorWebhookToken
|
|
11770
|
+
parameters:
|
|
11771
|
+
- description: Id of the token to revoke
|
|
11772
|
+
in: path
|
|
11773
|
+
name: tokenId
|
|
11774
|
+
required: true
|
|
11775
|
+
schema:
|
|
11776
|
+
description: Id of the token to revoke
|
|
11777
|
+
examples:
|
|
11778
|
+
- 550e8400-e29b-41d4-a716-446655440000
|
|
11779
|
+
format: uuid
|
|
11780
|
+
type: string
|
|
11781
|
+
responses:
|
|
11782
|
+
"204":
|
|
11783
|
+
description: No Content
|
|
11784
|
+
default:
|
|
11785
|
+
content:
|
|
11786
|
+
application/problem+json:
|
|
11787
|
+
schema:
|
|
11788
|
+
$ref: "#/components/schemas/Detail"
|
|
11789
|
+
description: Error
|
|
11790
|
+
security:
|
|
11791
|
+
- BearerAuth: []
|
|
11792
|
+
summary: Revoke an aggregator webhook token
|
|
11793
|
+
tags:
|
|
11794
|
+
- Discovery
|
|
11687
11795
|
/v1/discovery/webhooks/{provider}/{webhookToken}:
|
|
11688
11796
|
post:
|
|
11689
11797
|
description: "Receives a Pluggy/Belvo aggregator webhook and asynchronously pulls the signaled data into the ingestion pipeline. This route carries no operator JWT. It is authenticated by an opaque token in the URL path (resolved to a tenant binding server-side, never claimed) PLUS a per-provider source check: a valid HMAC-SHA256 of the raw body in the X-Webhook-Signature header, OR membership in the provider's source-IP allowlist. Both layers fail closed; the tenant is derived solely from the resolved token binding."
|
|
@@ -12201,7 +12309,7 @@ paths:
|
|
|
12201
12309
|
- Exception
|
|
12202
12310
|
/v1/exceptions/bulk/assign:
|
|
12203
12311
|
post:
|
|
12204
|
-
description: Assigns multiple exceptions to a single assignee. Partial success is supported -- each exception is processed independently.
|
|
12312
|
+
description: Assigns multiple exceptions to a single assignee; an exception already assigned moves to the new assignee. Partial success is supported -- each exception is processed independently.
|
|
12205
12313
|
operationId: bulkAssignExceptions
|
|
12206
12314
|
requestBody:
|
|
12207
12315
|
content:
|
|
@@ -12604,7 +12712,7 @@ paths:
|
|
|
12604
12712
|
- Exception
|
|
12605
12713
|
/v1/exceptions/{exceptionId}/assign:
|
|
12606
12714
|
post:
|
|
12607
|
-
description: Assigns a single exception to a user. Mirrors the bulk-assign auth and validation but acts on exactly one exception addressed by path. Returns the updated exception.
|
|
12715
|
+
description: Assigns a single exception to a user; an exception already assigned moves to the new assignee and its history records both. Mirrors the bulk-assign auth and validation but acts on exactly one exception addressed by path. Returns the updated exception.
|
|
12608
12716
|
operationId: assignException
|
|
12609
12717
|
parameters:
|
|
12610
12718
|
- description: Exception ID (UUID)
|
|
@@ -14456,7 +14564,7 @@ paths:
|
|
|
14456
14564
|
- Ingestion
|
|
14457
14565
|
/v1/imports/contexts/{contextId}/sources/{sourceId}/fetch:
|
|
14458
14566
|
post:
|
|
14459
|
-
description: Lists every object matching the supplied transport coordinates (SFTP today) and streams each into the trusted-content ingestion pipeline (dedup + outbox + match-trigger), returning a per-file outcome in fetch order. The tenant is resolved from the JWT and the context/source from the path — NEVER from the body. The body carries connection coordinates plus an OPAQUE credential reference, never a secret. A transport-level fetch failure (the external endpoint is unreachable or rejects the credential) returns 503; per-file intake failures are reported in the response body without failing the batch.
|
|
14567
|
+
description: Lists every object matching the supplied transport coordinates (SFTP today) and streams each into the trusted-content ingestion pipeline (dedup + outbox + match-trigger), returning a per-file outcome in fetch order. The tenant is resolved from the JWT and the context/source from the path — NEVER from the body. The body carries connection coordinates plus an OPAQUE credential reference, never a secret. Settings the transport cannot use (an invalid field, a credential reference that does not resolve, an SFTP fetch without a known_hosts host key) return 400. A transport-level fetch failure (the external endpoint is unreachable or rejects the credential) returns 503; per-file intake failures are reported in the response body without failing the batch.
|
|
14460
14568
|
operationId: fetchTrigger
|
|
14461
14569
|
parameters:
|
|
14462
14570
|
- description: Context ID
|
|
@@ -15049,7 +15157,7 @@ paths:
|
|
|
15049
15157
|
- Matching
|
|
15050
15158
|
/v1/matching/candidates:
|
|
15051
15159
|
get:
|
|
15052
|
-
description: "Returns a ranked list of opposite-side unmatched transactions the engine considers plausible counterparts for the target transaction, each with a confidence score, the rule that drove it, a per-component rationale (the \"why\"), and amount/date deltas. Powers the exception-resolution and manual-match candidate pickers. Scope: proposals are scored by the deterministic rule engine over raw transaction amounts and do NOT apply run-time fee normalization or the FX-variance band; only 1:1 pairwise counterparts are returned."
|
|
15160
|
+
description: "Returns a ranked list of opposite-side unmatched transactions the engine considers plausible counterparts for the target transaction, each with a confidence score, the rule that drove it, a per-component rationale (the \"why\"), and amount/date deltas. Powers the exception-resolution and manual-match candidate pickers. Scope: proposals are scored by the deterministic rule engine over raw transaction amounts and do NOT apply run-time fee normalization or the FX-variance band; only 1:1 pairwise counterparts are returned. A target that is not UNMATCHED (for example an exception raised on an already matched leg) has no counterpart and returns an empty list."
|
|
15053
15161
|
operationId: listMatchCandidates
|
|
15054
15162
|
parameters:
|
|
15055
15163
|
- description: Context ID the transaction belongs to
|
|
@@ -15565,7 +15673,7 @@ paths:
|
|
|
15565
15673
|
- Matching
|
|
15566
15674
|
/v1/matching/manual:
|
|
15567
15675
|
post:
|
|
15568
|
-
description: Manually links multiple transactions (at least 2) into a match group with 100% confidence. Transactions must be UNMATCHED and belong to the specified context.
|
|
15676
|
+
description: Manually links multiple transactions (at least 2) into a match group with 100% confidence. Transactions must be UNMATCHED and belong to the specified context. When exceptionId names the exception being paired, the same write resolves it.
|
|
15569
15677
|
operationId: createManualMatch
|
|
15570
15678
|
parameters:
|
|
15571
15679
|
- description: Context ID the transactions belong to
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// adjustment entry, used when a monetary correction is needed to reconcile the
|
|
5
5
|
// transaction. Mirrors the spec's AdjustEntryRequest — reasonCode, notes, amount
|
|
6
6
|
// (decimal STRING, positive), currency (ISO 4217, 3 letters) and effectiveAt
|
|
7
|
-
// (RFC 3339), all required
|
|
8
|
-
// accepted.
|
|
7
|
+
// (RFC 3339), all required, plus an optional direction (DEBIT or CREDIT,
|
|
8
|
+
// DEBIT when omitted). exceptionId is a path param; no tenant field is accepted.
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { bodyWithout } from '../request-fields.js';
|
|
11
11
|
import { dispatchToolRequest } from '../shared-dispatch.js';
|
|
@@ -39,6 +39,10 @@ export const adjustEntryInputShape = {
|
|
|
39
39
|
.string()
|
|
40
40
|
.describe('When the adjustment takes effect, as an RFC 3339 timestamp (e.g. ' +
|
|
41
41
|
'"2025-01-20T10:30:00Z").'),
|
|
42
|
+
direction: z
|
|
43
|
+
.enum(['DEBIT', 'CREDIT'])
|
|
44
|
+
.optional()
|
|
45
|
+
.describe('Side of the adjustment entry, DEBIT or CREDIT; DEBIT when omitted. The amount stays positive either way.'),
|
|
42
46
|
};
|
|
43
47
|
/**
|
|
44
48
|
* Build the POST body from the input minus the path-only `exceptionId`. Only the
|
|
@@ -57,7 +61,8 @@ export function registerExceptionAdjustEntryTool(server) {
|
|
|
57
61
|
description: 'Resolve a reconciliation exception by creating a balancing adjustment ' +
|
|
58
62
|
'entry. Provide exceptionId (UUID path param), reasonCode (1–255), notes ' +
|
|
59
63
|
'(1–1000), amount (positive decimal string, e.g. "150.50"), currency (ISO ' +
|
|
60
|
-
'4217, 3 letters),
|
|
64
|
+
'4217, 3 letters), effectiveAt (RFC 3339), and optionally direction ' +
|
|
65
|
+
'(DEBIT or CREDIT, DEBIT when omitted). No tenant field is ' +
|
|
61
66
|
'accepted. Returns the updated exception, or a structured RFC 9457 error.',
|
|
62
67
|
inputSchema: adjustEntryInputShape,
|
|
63
68
|
}, async (args, extra) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adjust-entry.js","sourceRoot":"","sources":["../../../src/tools/exception/adjust-entry.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,EAAE;AACF,sEAAsE;AACtE,+EAA+E;AAC/E,iFAAiF;AACjF,6EAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"adjust-entry.js","sourceRoot":"","sources":["../../../src/tools/exception/adjust-entry.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,EAAE;AACF,sEAAsE;AACtE,+EAA+E;AAC/E,iFAAiF;AACjF,6EAA6E;AAC7E,yEAAyE;AACzE,iFAAiF;AAEjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEl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AA0E;YAC1E,2EAA2E;YAC3E,qEAAqE;YACrE,4DAA4D;YAC5D,0EAA0E;QAC5E,WAAW,EAAE,qBAAqB;KACnC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,mBAAmB,CACxB;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC;YAChD,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC;SACjC,EACD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
package/dist/tools/tool-error.js
CHANGED
|
@@ -16,13 +16,32 @@ import { MatcherApiError } from '../matcher/client.js';
|
|
|
16
16
|
const GUIDANCE_RETRYABLE = 'matcher backend was unavailable/timed out; retry';
|
|
17
17
|
/** Guidance shown alongside `retryable: false` — the request itself must change. */
|
|
18
18
|
const GUIDANCE_NOT_RETRYABLE = 'fix the request';
|
|
19
|
+
/**
|
|
20
|
+
* The idempotency fence's two 409s mean KEEP THE KEY, the opposite of a domain
|
|
21
|
+
* refusal (MTCH-0007), which a caller corrects and resends under a new key.
|
|
22
|
+
*/
|
|
23
|
+
const KEY_HELD = {
|
|
24
|
+
'MTCH-0018': {
|
|
25
|
+
retryable: true,
|
|
26
|
+
guidance: 'an earlier request with this idempotency key is still in flight; wait, then retry with the same key',
|
|
27
|
+
},
|
|
28
|
+
'MTCH-0022': {
|
|
29
|
+
retryable: false,
|
|
30
|
+
guidance: 'an earlier request with this idempotency key already ran and may have applied; check the outcome before sending again; keep the key',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
19
33
|
/**
|
|
20
34
|
* Classify a matcher HTTP status into a retryability hint. Backend
|
|
21
35
|
* unavailability/timeouts (any 5xx — including the synthetic 504 for transport
|
|
22
36
|
* failures — and 429 Too Many Requests) are retryable as-is; every other
|
|
23
|
-
* client-side 4xx is not (the caller must change the request first)
|
|
37
|
+
* client-side 4xx is not (the caller must change the request first), except the
|
|
38
|
+
* idempotency fence codes in KEY_HELD.
|
|
24
39
|
*/
|
|
25
|
-
function retryabilityFor(status) {
|
|
40
|
+
function retryabilityFor(status, code) {
|
|
41
|
+
const held = status === 409 && code !== undefined ? KEY_HELD[code] : undefined;
|
|
42
|
+
if (held !== undefined) {
|
|
43
|
+
return held;
|
|
44
|
+
}
|
|
26
45
|
const retryable = status >= 500 || status === 429;
|
|
27
46
|
return {
|
|
28
47
|
retryable,
|
|
@@ -40,7 +59,7 @@ function retryabilityFor(status) {
|
|
|
40
59
|
*/
|
|
41
60
|
export function toToolError(err) {
|
|
42
61
|
const { status, problem } = err;
|
|
43
|
-
const { retryable, guidance } = retryabilityFor(status);
|
|
62
|
+
const { retryable, guidance } = retryabilityFor(status, problem.code);
|
|
44
63
|
const payload = {
|
|
45
64
|
status,
|
|
46
65
|
...(problem.title !== undefined ? { title: problem.title } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-error.js","sourceRoot":"","sources":["../../src/tools/tool-error.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,qBAAqB;AACrB,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,qFAAqF;AACrF,kDAAkD;AAIlD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AA4BtD,qFAAqF;AACrF,MAAM,kBAAkB,GACtB,kDAAkD,CAAA;AACpD,oFAAoF;AACpF,MAAM,sBAAsB,GAAG,iBAAiB,CAAA;AAEhD
|
|
1
|
+
{"version":3,"file":"tool-error.js","sourceRoot":"","sources":["../../src/tools/tool-error.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,qBAAqB;AACrB,EAAE;AACF,4EAA4E;AAC5E,+EAA+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