@lerianstudio/matcher-mcp 4.5.0-beta.36 → 5.0.0-beta.2

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.
@@ -72,8 +72,26 @@ step until the resource is actually usable, and tell the operator exactly what \
72
72
  still remains. Never leave them with a broken half-created shell. Do not decide \
73
73
  the next step from memory — after each proposal is applied, call the \
74
74
  getSetupProgress read tool for that context and propose the action its \`next\` \
75
- field names (the operationId, path, and required fields it returns); when \
76
- \`next\` is null the context is ready.
75
+ field names (the operationId, path, and required fields it returns); gate on \
76
+ \`readiness.ready\`, never on \`next\` being null a null \`next\` can still mean \
77
+ unready (the backend has no action to name for an unmapped gap), so only \
78
+ \`readiness.ready\` being true means the context is actually ready.
79
+ - \`readiness.missing[]\` names each gap using one of six \
80
+ stable identifiers: context.activation.requirement.left-source (no LEFT \
81
+ source yet), context.activation.requirement.right-source (no RIGHT source \
82
+ yet), context.activation.requirement.source-mapping (a source still needs a \
83
+ field map), context.activation.requirement.match-rule (no match rule yet), \
84
+ context.activation.requirement.fee-rule (fee normalization is on but no fee \
85
+ rule exists), and context.activation.requirement.unknown (a setup step \
86
+ outside those five — treat it as "there is still a general setup step \
87
+ remaining" with no specific resource named). \`next.requirementId\` only ever \
88
+ names one of the first five, the actionable ones, never the unknown \
89
+ identifier: an unmapped gap gives the backend no action to name, which is \
90
+ exactly how \`next\` can be null while the context is still unready. These \
91
+ identifiers are for YOU to \
92
+ route on, never for the operator to read: translate the one you see into plain \
93
+ language about what is missing and never paste the raw identifier into your \
94
+ reply.
77
95
  - The reconciliation context is the primary example. A bare context is a DRAFT \
78
96
  that cannot ingest, match, or report: to be usable it needs at least one LEFT \
79
97
  source AND one RIGHT source, a field map for every source, and at least one \
@@ -119,6 +137,19 @@ explain what the mapping does.
119
137
  entries, or ingest data — you have no tools for those. If the operator asks, \
120
138
  explain what you found and what they would need to do; do not claim to have done \
121
139
  it.
140
+ - A failed tool call is a CODED REFUSAL: the tool result carries a matcher \
141
+ \`status\`, \`code\`, and often a \`detail\` sentence. Explain it to the operator in \
142
+ the language they are writing to you in, not by default in English. Always keep \
143
+ the wire \`code\` visible in your answer, exactly as returned — never rename, \
144
+ drop, or invent one, so support can still correlate it with server logs. \
145
+ Translate the \`detail\` the tool actually returned into their language \
146
+ faithfully; never add a cause, a fix, or a fact the tool result did not state. If \
147
+ the result has no usable \`detail\` (blank or absent), say plainly that the \
148
+ request failed and give the \`status\`/\`code\` you do have — never invent an \
149
+ explanation to fill the gap. A 401 or 403 refusal stays SHORT: state in one \
150
+ sentence that the operator is not authorized to do this, and do not speculate \
151
+ about which permission, role, or policy is missing — the tool result does not \
152
+ tell you that, and guessing would be fabrication.
122
153
  - Be concise and precise. Prefer exact figures from tool results over vague \
123
154
  descriptions. Cite the reconciliation context when it matters.
124
155
 
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/copilot/system-prompt.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,4EAA4E;AAC5E,yEAAyE;AACzE,wEAAwE;AACxE,+EAA+E;AAC/E,4EAA4E;AAC5E,2EAA2E;AAC3E,aAAa;AACb,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAC9E,+CAA+C;AAC/C,EAAE;AACF,6EAA6E;AAC7E,qEAAqE;AACrE,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,6EAA6E;AAC7E,0EAA0E;AAC1E,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAa5E,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEAyN6C,CAAA;AAEjE;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,WAAW,CAAA;AACpB,CAAC"}
1
+ {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/copilot/system-prompt.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,4EAA4E;AAC5E,yEAAyE;AACzE,wEAAwE;AACxE,+EAA+E;AAC/E,4EAA4E;AAC5E,2EAA2E;AAC3E,aAAa;AACb,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAC9E,+CAA+C;AAC/C,EAAE;AACF,6EAA6E;AAC7E,qEAAqE;AACrE,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,6EAA6E;AAC7E,0EAA0E;AAC1E,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAa5E,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEAwP6C,CAAA;AAEjE;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -3449,7 +3449,7 @@ components:
3449
3449
  - "2025-01-15T10:30:00Z"
3450
3450
  type: string
3451
3451
  usedByContexts:
3452
- description: Number of distinct contexts whose fee rules reference this schedule. Computed at read time from fee_rules (never persisted).
3452
+ description: Number of distinct contexts whose fee rules reference this schedule. Computed at read time from the fee rules that reference this schedule (never persisted).
3453
3453
  examples:
3454
3454
  - 2
3455
3455
  format: int64
@@ -6667,19 +6667,9 @@ components:
6667
6667
  SetupProgressNextResponse:
6668
6668
  additionalProperties: false
6669
6669
  properties:
6670
- action:
6671
- description: Stable semantic label of the action.
6672
- enum:
6673
- - add_left_source
6674
- - add_right_source
6675
- - add_field_map
6676
- - add_match_rule
6677
- examples:
6678
- - add_left_source
6679
- type: string
6680
6670
  forSource:
6681
6671
  $ref: "#/components/schemas/SetupProgressSourceRef"
6682
- description: Source the action targets; set only for the field_maps action, naming the unmapped source.
6672
+ description: Source the action targets; set only for the source-mapping action, naming the unmapped source.
6683
6673
  method:
6684
6674
  description: HTTP method of the create endpoint.
6685
6675
  examples:
@@ -6706,19 +6696,19 @@ components:
6706
6696
  type:
6707
6697
  - array
6708
6698
  - "null"
6709
- slug:
6710
- description: Readiness slug this action satisfies.
6699
+ requirementId:
6700
+ description: Public activation-requirement identifier this action satisfies.
6711
6701
  enum:
6712
- - sources_left
6713
- - sources_right
6714
- - field_maps
6715
- - match_rules
6702
+ - context.activation.requirement.left-source
6703
+ - context.activation.requirement.right-source
6704
+ - context.activation.requirement.source-mapping
6705
+ - context.activation.requirement.match-rule
6706
+ - context.activation.requirement.fee-rule
6716
6707
  examples:
6717
- - sources_left
6708
+ - context.activation.requirement.left-source
6718
6709
  type: string
6719
6710
  required:
6720
- - slug
6721
- - action
6711
+ - requirementId
6722
6712
  - operationId
6723
6713
  - method
6724
6714
  - path
@@ -6728,11 +6718,18 @@ components:
6728
6718
  additionalProperties: false
6729
6719
  properties:
6730
6720
  missing:
6731
- description: Stable slugs of missing requirements (sources_left, sources_right, field_maps, match_rules); empty when ready.
6721
+ description: Stable identifiers of missing activation requirements; empty when ready.
6732
6722
  examples:
6733
- - - sources_left
6734
- - match_rules
6723
+ - - context.activation.requirement.left-source
6724
+ - context.activation.requirement.match-rule
6735
6725
  items:
6726
+ enum:
6727
+ - context.activation.requirement.left-source
6728
+ - context.activation.requirement.right-source
6729
+ - context.activation.requirement.source-mapping
6730
+ - context.activation.requirement.match-rule
6731
+ - context.activation.requirement.fee-rule
6732
+ - context.activation.requirement.unknown
6736
6733
  type: string
6737
6734
  type:
6738
6735
  - array
@@ -8789,6 +8786,24 @@ paths:
8789
8786
  schema:
8790
8787
  $ref: "#/components/schemas/ReconciliationContextResponse"
8791
8788
  description: OK
8789
+ "409":
8790
+ content:
8791
+ application/problem+json:
8792
+ examples:
8793
+ activationNotReady:
8794
+ summary: Missing a right-side source and a match rule.
8795
+ value:
8796
+ type: https://errors.lerian.studio/v1/MTCH-0103
8797
+ title: Conflict
8798
+ status: 409
8799
+ detail: context is not ready for activation; call GET setup-progress for the missing requirements
8800
+ errors:
8801
+ - location: context.activation.requirement.right-source
8802
+ - location: context.activation.requirement.match-rule
8803
+ code: MTCH-0103
8804
+ schema:
8805
+ $ref: "#/components/schemas/Detail"
8806
+ description: Context activation is blocked by an invalid transition, a duplicate name, an archived context, or missing activation requirements.
8792
8807
  default:
8793
8808
  content:
8794
8809
  application/problem+json:
@@ -12478,6 +12493,30 @@ paths:
12478
12493
  responses:
12479
12494
  "204":
12480
12495
  description: No Content
12496
+ "409":
12497
+ content:
12498
+ application/problem+json:
12499
+ examples:
12500
+ feeScheduleInUse:
12501
+ summary: Two contexts still reference this schedule's fee rules.
12502
+ value:
12503
+ type: https://errors.lerian.studio/v1/MTCH-0108
12504
+ title: Conflict
12505
+ status: 409
12506
+ detail: This fee schedule is still referenced by fee rules; nothing was deleted. Remove the referencing fee rules, then retry the deletion.
12507
+ errors:
12508
+ - location: fee-schedule.delete.blocking-contexts
12509
+ value:
12510
+ references:
12511
+ - id: 11111111-1111-1111-1111-111111111111
12512
+ name: US Card Settlements
12513
+ - id: 22222222-2222-2222-2222-222222222222
12514
+ name: EU Card Settlements
12515
+ count: 2
12516
+ code: MTCH-0108
12517
+ schema:
12518
+ $ref: "#/components/schemas/Detail"
12519
+ description: Fee schedule is still referenced by fee rules or variance history.
12481
12520
  default:
12482
12521
  content:
12483
12522
  application/problem+json:
@@ -11,9 +11,10 @@
11
11
  // field.
12
12
  //
13
13
  // `context_setup_progress` (F3 fix) reports activation/upload prerequisites —
14
- // configured-resource counts and the stable missing-requirement slugs — so an
15
- // operator can check readiness before attempting `context_update
16
- // status=ACTIVE` instead of discovering the gate via a 409.
14
+ // configured-resource counts and the stable missing-requirement identifiers
15
+ // (context.activation.requirement.*) — so an operator can check readiness
16
+ // before attempting `context_update status=ACTIVE` instead of discovering the
17
+ // gate via a 409.
17
18
  import { registerContextArchiveTool } from './archive.js';
18
19
  import { registerContextCreateTool } from './create.js';
19
20
  import { registerContextGetTool } from './get.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/context/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,wEAAwE;AACxE,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,iFAAiF;AACjF,+EAA+E;AAC/E,+EAA+E;AAC/E,SAAS;AACT,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,iEAAiE;AACjE,4DAA4D;AAI5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAEvD,8DAA8D;AAC9D,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACjC,uBAAuB,CAAC,MAAM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CAAC,CAAA;IAClC,0BAA0B,CAAC,MAAM,CAAC,CAAA;IAClC,gCAAgC,CAAC,MAAM,CAAC,CAAA;IACxC,2BAA2B,CAAC,MAAM,CAAC,CAAA;AACrC,CAAC"}
@@ -44,13 +44,19 @@ export function registerContextNextStepTool(server) {
44
44
  'its readiness gate. Provide contextId (UUID path param, not a tenant ' +
45
45
  'field). Returns { ready, next, thenCall }: ready is true only when the ' +
46
46
  'context satisfies every activation requirement; next is the exact ' +
47
- 'action to take (slug, action, operationId, method, path, requiredFields ' +
48
- ' field NAMES only, never values; you supply the values), or null when ' +
49
- 'ready; thenCall instructs you to apply next and call next_step again ' +
50
- 'with the same contextId, repeating until ready is true (null when ' +
51
- 'ready). Prefer this over context_setup_progress when you just need the ' +
52
- 'next action to advance setup. Returns a structured RFC 9457 error on ' +
53
- 'failure (e.g. 404 if the context does not exist or is not yours).',
47
+ 'action to take (requirementId one of the FIVE public ' +
48
+ 'context.activation.requirement.* identifiers: left-source, ' +
49
+ 'right-source, source-mapping, match-rule, fee-rule; the sixth, ' +
50
+ 'context.activation.requirement.unknown, never reaches next the ' +
51
+ "backend returns a null next for an unmapped slug it appears only in " +
52
+ 'context_setup_progress readiness.missing[]; operationId, method, ' +
53
+ 'path, requiredFields field NAMES only, never values; you supply the ' +
54
+ 'values), or null when ready; thenCall instructs you to apply next and ' +
55
+ 'call next_step again with the same contextId, repeating until ready is ' +
56
+ 'true (null when ready). Prefer this over context_setup_progress when ' +
57
+ 'you just need the next action to advance setup. Returns a structured ' +
58
+ 'RFC 9457 error on failure (e.g. 404 if the context does not exist or ' +
59
+ 'is not yours).',
54
60
  inputSchema: nextStepInputShape,
55
61
  }, async (args, extra) => {
56
62
  let client;
@@ -1 +1 @@
1
- {"version":3,"file":"next-step.js","sourceRoot":"","sources":["../../../src/tools/context/next-step.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,mEAAmE;AACnE,+BAA+B;AAC/B,EAAE;AACF,gFAAgF;AAChF,gFAAg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EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,EAAE,CAAA;YAC1E,CAAC;YACD,MAAM,GAAG,CAAA;QACX,CAAC;QAED,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAoB;gBACnD,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC;aAC/C,CAAC,CAAA;YACF,wEAAwE;YACxE,8DAA8D;YAC9D,MAAM,KAAK,GAAG,IAAI,EAAE,SAAS,EAAE,KAAK,IAAI,KAAK,CAAA;YAC7C,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA;YAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAA;YACnD,OAAO;gBACL,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE;iBAClE;aACF,CAAA;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,qEAAqE;YACrE,2DAA2D;YAC3D,IAAI,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3B,OAAO,WAAW,CAAC,GAAG,CAAC,CAAA;YACzB,CAAC;YACD,MAAM,GAAG,CAAA;QACX,CAAC;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -6,9 +6,9 @@
6
6
  // + match rules to already exist (the readiness gate). Before this tool, an
7
7
  // operator only discovered the gate by hitting a 403/409. This tool reports
8
8
  // the SAME aggregate state matcher's readiness gate checks — configured-
9
- // resource counts, last-run state, and the stable missing-requirement slugs —
10
- // in one request, so an operator-driving LLM can check readiness BEFORE
11
- // attempting activation instead of after failing it.
9
+ // resource counts, last-run state, and the stable missing-requirement
10
+ // identifiers — in one request, so an operator-driving LLM can check
11
+ // readiness BEFORE attempting activation instead of after failing it.
12
12
  //
13
13
  // contextId is the only input (a UUID path param); no tenant field is
14
14
  // accepted (matcher scopes to the relayed token's tenant).
@@ -43,11 +43,17 @@ export function registerContextSetupProgressTool(server) {
43
43
  'schedules { total }; lastRun (id/status/completedAt of the most ' +
44
44
  'recent match run, or null if it never ran); and readiness ' +
45
45
  '{ ready, missing[] } — ready is true only when every requirement is ' +
46
- 'met, and missing[] names the stable gaps using the SAME slugs ' +
47
- '(sources_left, sources_right, field_maps, match_rules) the 409 ' +
48
- 'activation-rejection payload uses. Returns a structured RFC 9457 ' +
49
- 'error on failure (e.g. 404 if the context does not exist or is not ' +
50
- 'yours).',
46
+ 'met, and missing[] names the stable gaps. The 409 activation ' +
47
+ 'rejection itself carries NO requirement detail — it is deliberately ' +
48
+ 'generic so this is where to read the identifiers: ' +
49
+ 'context.activation.requirement.left-source, ' +
50
+ 'context.activation.requirement.right-source, ' +
51
+ 'context.activation.requirement.source-mapping, ' +
52
+ 'context.activation.requirement.match-rule, ' +
53
+ 'context.activation.requirement.fee-rule, or ' +
54
+ 'context.activation.requirement.unknown. Returns a structured RFC ' +
55
+ '9457 error on failure (e.g. 404 if the context does not exist or is ' +
56
+ 'not yours).',
51
57
  inputSchema: getContextSetupProgressInputShape,
52
58
  }, async (args, extra) => {
53
59
  return dispatchContext({ method: 'GET', path: contextSetupProgressPath(args.contextId) }, extra);
@@ -1 +1 @@
1
- {"version":3,"file":"setup-progress.js","sourceRoot":"","sources":["../../../src/tools/context/setup-progress.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,yEAAyE;AACzE,8EAA8E;AAC9E,wEAAwE;AACxE,qDAAqD;AACrD,EAAE;AACF,sEAAsE;AACtE,2DAA2D;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1D,uDAAuD;AACvD,MAAM,UAAU,wBAAwB,CAAC,SAAiB;IACxD,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAA;AACnD,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,mEAAmE,CAAC;CACjF,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAAC,MAAiB;IAChE,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;QACE,WAAW,EACT,mEAAmE;YACnE,uEAAuE;YACvE,sEAAsE;YACtE,oEAAoE;YACpE,sEAAsE;YACtE,qEAAqE;YACrE,sEAAsE;YACtE,+DAA+D;YAC/D,kEAAkE;YAClE,4DAA4D;YAC5D,sEAAsE;YACtE,gEAAgE;YAChE,iEAAiE;YACjE,mEAAmE;YACnE,qEAAqE;YACrE,SAAS;QACX,WAAW,EAAE,iCAAiC;KAC/C,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,eAAe,CACpB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,EACjE,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"setup-progress.js","sourceRoot":"","sources":["../../../src/tools/context/setup-progress.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,yEAAyE;AACzE,sEAAsE;AACtE,qEAAqE;AACrE,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,2DAA2D;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1D,uDAAuD;AACvD,MAAM,UAAU,wBAAwB,CAAC,SAAiB;IACxD,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAA;AACnD,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,mEAAmE,CAAC;CACjF,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAAC,MAAiB;IAChE,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;QACE,WAAW,EACT,mEAAmE;YACnE,uEAAuE;YACvE,sEAAsE;YACtE,oEAAoE;YACpE,sEAAsE;YACtE,qEAAqE;YACrE,sEAAsE;YACtE,+DAA+D;YAC/D,kEAAkE;YAClE,4DAA4D;YAC5D,sEAAsE;YACtE,+DAA+D;YAC/D,sEAAsE;YACtE,sDAAsD;YACtD,8CAA8C;YAC9C,+CAA+C;YAC/C,iDAAiD;YACjD,6CAA6C;YAC7C,8CAA8C;YAC9C,mEAAmE;YACnE,sEAAsE;YACtE,aAAa;QACf,WAAW,EAAE,iCAAiC;KAC/C,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,eAAe,CACpB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,EACjE,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -5,7 +5,8 @@
5
5
  // scopes to the relayed token's tenant). A 204 response surfaces as `null`
6
6
  // (see dispatchFieldMap), matching the other curated families' delete
7
7
  // behavior. Deleting a source's only field map will reopen the
8
- // `field_maps` readiness gap reported by context_setup_progress.
8
+ // context.activation.requirement.source-mapping readiness gap reported by
9
+ // context_setup_progress.
9
10
  import { z } from 'zod';
10
11
  import { dispatchFieldMap, fieldMapPath } from './shared.js';
11
12
  /** Zod raw shape for `field_map_delete` input — just the flat id. */
@@ -23,8 +24,9 @@ export const deleteFieldMapInputShape = {
23
24
  export function registerFieldMapDeleteTool(server) {
24
25
  server.registerTool('field_map_delete', {
25
26
  description: 'Delete a field map by id (UUID path param, not a tenant field). ' +
26
- "Removing a source's only field map reopens the field_maps " +
27
- 'activation-readiness gap (see context_setup_progress) and an ACTIVE ' +
27
+ "Removing a source's only field map reopens the " +
28
+ 'context.activation.requirement.source-mapping activation-readiness ' +
29
+ 'gap (see context_setup_progress) and an ACTIVE ' +
28
30
  "context's matching/ingestion against that source will be affected. " +
29
31
  'Returns null on success (204), or a structured RFC 9457 error.',
30
32
  inputSchema: deleteFieldMapInputShape,
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/tools/field-map/delete.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,2EAA2E;AAC3E,sEAAsE;AACtE,+DAA+D;AAC/D,iEAAiE;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE5D,qEAAqE;AACrE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,oCAAoC,CAAC;CAClD,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAiB;IAC1D,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,WAAW,EACT,kEAAkE;YAClE,4DAA4D;YAC5D,sEAAsE;YACtE,qEAAqE;YACrE,gEAAgE;QAClE,WAAW,EAAE,wBAAwB;KACtC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,gBAAgB,CACrB,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EACzD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/tools/field-map/delete.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,2EAA2E;AAC3E,sEAAsE;AACtE,+DAA+D;AAC/D,0EAA0E;AAC1E,0BAA0B;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE5D,qEAAqE;AACrE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,oCAAoC,CAAC;CAClD,CAAA;AAOD;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAiB;IAC1D,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,WAAW,EACT,kEAAkE;YAClE,iDAAiD;YACjD,qEAAqE;YACrE,iDAAiD;YACjD,qEAAqE;YACrE,gEAAgE;QAClE,WAAW,EAAE,wBAAwB;KACtC,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,gBAAgB,CACrB,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EACzD,KAAK,CACN,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -1,11 +1,11 @@
1
1
  // Curated field-map vertical: five typed tools over the matcher field-map
2
2
  // resource — create, list, get, update, delete. Field maps bind a source's
3
3
  // raw column names to matcher's canonical reconciliation vocabulary and gate
4
- // context activation (the `field_maps` readiness slug — see
5
- // context_setup_progress). Closes findings N3 (field-map shape undiscoverable)
6
- // and N4/F6 (createFieldMap generic-only, ingestion read/write asymmetry):
7
- // before this family, all five operations were UNCOVERED (neither curated nor
8
- // generic-only).
4
+ // context activation (the context.activation.requirement.source-mapping
5
+ // readiness identifier — see context_setup_progress). Closes findings N3
6
+ // (field-map shape undiscoverable) and N4/F6 (createFieldMap generic-only,
7
+ // ingestion read/write asymmetry): before this family, all five operations
8
+ // were UNCOVERED (neither curated nor generic-only).
9
9
  //
10
10
  // Path shape is mixed, unlike sources: create/get are source-nested
11
11
  // (/v1/contexts/{contextId}/sources/{sourceId}/field-maps), list is
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/field-map/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,4DAA4D;AAC5D,+EAA+E;AAC/E,2EAA2E;AAC3E,8EAA8E;AAC9E,iBAAiB;AACjB,EAAE;AACF,oEAAoE;AACpE,oEAAoE;AACpE,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,2EAA2E;AAC3E,wEAAwE;AACxE,gBAAgB;AAIhB,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAExD,qEAAqE;AACrE,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,0BAA0B,CAAC,MAAM,CAAC,CAAA;IAClC,wBAAwB,CAAC,MAAM,CAAC,CAAA;IAChC,uBAAuB,CAAC,MAAM,CAAC,CAAA;IAC/B,0BAA0B,CAAC,MAAM,CAAC,CAAA;IAClC,0BAA0B,CAAC,MAAM,CAAC,CAAA;AACpC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/field-map/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,wEAAwE;AACxE,yEAAyE;AACzE,2EAA2E;AAC3E,2EAA2E;AAC3E,qDAAqD;AACrD,EAAE;AACF,oEAAoE;AACpE,oEAAoE;AACpE,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,2EAA2E;AAC3E,wEAAwE;AACxE,gBAAgB;AAIhB,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAExD,qEAAqE;AACrE,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,0BAA0B,CAAC,MAAM,CAAC,CAAA;IAClC,wBAAwB,CAAC,MAAM,CAAC,CAAA;IAChC,uBAAuB,CAAC,MAAM,CAAC,CAAA;IAC/B,0BAA0B,CAAC,MAAM,CAAC,CAAA;IAClC,0BAA0B,CAAC,MAAM,CAAC,CAAA;AACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lerianstudio/matcher-mcp",
3
- "version": "4.5.0-beta.36",
3
+ "version": "5.0.0-beta.2",
4
4
  "type": "module",
5
5
  "description": "Model Context Protocol server for the Matcher reconciliation engine",
6
6
  "license": "Apache-2.0",
@@ -41,6 +41,7 @@
41
41
  "build": "tsc",
42
42
  "postbuild": "node scripts/vendor-spec.mjs",
43
43
  "typecheck": "tsc --noEmit",
44
+ "pretest": "node scripts/vendor-spec.mjs",
44
45
  "test": "vitest run",
45
46
  "lint": "eslint ."
46
47
  },