@frihet/mcp-server 1.17.0 → 2.0.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.
Files changed (87) hide show
  1. package/README.md +106 -348
  2. package/dist/agent-onboarding.d.ts +1 -1
  3. package/dist/agent-onboarding.js +3 -3
  4. package/dist/canary/mcp-harness.d.ts +1 -1
  5. package/dist/canary/mcp-harness.js +4 -1
  6. package/dist/capability-truth.js +20 -12
  7. package/dist/claude-candidate-contract.d.ts +482 -0
  8. package/dist/claude-candidate-contract.js +87 -0
  9. package/dist/claude-output-privacy.d.ts +17 -0
  10. package/dist/claude-output-privacy.js +249 -0
  11. package/dist/claude-profile.d.ts +18 -0
  12. package/dist/claude-profile.js +260 -0
  13. package/dist/client-interface.d.ts +26 -20
  14. package/dist/client.d.ts +65 -29
  15. package/dist/client.js +278 -167
  16. package/dist/demo-client.d.ts +28 -21
  17. package/dist/demo-client.js +32 -14
  18. package/dist/deposit-contract.d.ts +29 -0
  19. package/dist/deposit-contract.js +76 -0
  20. package/dist/fetch-no-redirect.d.ts +3 -0
  21. package/dist/fetch-no-redirect.js +16 -0
  22. package/dist/fiscal-aliases.d.ts +2 -2
  23. package/dist/fiscal-aliases.js +2 -2
  24. package/dist/fiscal-period.d.ts +26 -0
  25. package/dist/fiscal-period.js +31 -0
  26. package/dist/google-profile.d.ts +19 -0
  27. package/dist/google-profile.js +122 -0
  28. package/dist/index.js +31 -7
  29. package/dist/logger.d.ts +1 -1
  30. package/dist/logger.js +2 -2
  31. package/dist/muse-profile.d.ts +19 -0
  32. package/dist/muse-profile.js +122 -0
  33. package/dist/observability.js +3 -2
  34. package/dist/openai-profile.d.ts +2 -2
  35. package/dist/openai-profile.js +37 -11
  36. package/dist/openai-review-contract.d.ts +1 -1
  37. package/dist/openai-review-contract.js +4 -5
  38. package/dist/openai-review-oauth.d.ts +107 -7
  39. package/dist/openai-review-oauth.js +161 -17
  40. package/dist/prompts/register-all.js +32 -78
  41. package/dist/redaction.d.ts +5 -0
  42. package/dist/redaction.js +9 -0
  43. package/dist/resources/register-all.js +150 -54
  44. package/dist/retry-after.d.ts +19 -0
  45. package/dist/retry-after.js +84 -0
  46. package/dist/server-composition.d.ts +6 -2
  47. package/dist/server-composition.js +46 -5
  48. package/dist/tool-exposure.d.ts +7 -5
  49. package/dist/tool-exposure.js +21 -13
  50. package/dist/tools/audit_gl.js +8 -8
  51. package/dist/tools/backend-availability.d.ts +8 -29
  52. package/dist/tools/backend-availability.js +31 -30
  53. package/dist/tools/bank_rules.js +66 -15
  54. package/dist/tools/banking.js +5 -13
  55. package/dist/tools/clients.js +254 -6
  56. package/dist/tools/deposits.js +107 -97
  57. package/dist/tools/einvoice.d.ts +17 -3
  58. package/dist/tools/einvoice.js +59 -12
  59. package/dist/tools/fiscal.d.ts +3 -4
  60. package/dist/tools/fiscal.js +93 -60
  61. package/dist/tools/gestoria.js +15 -7
  62. package/dist/tools/hr.js +41 -11
  63. package/dist/tools/igic.d.ts +9 -8
  64. package/dist/tools/igic.js +34 -64
  65. package/dist/tools/impuesto_sociedades.d.ts +4 -5
  66. package/dist/tools/impuesto_sociedades.js +16 -37
  67. package/dist/tools/intelligence.js +164 -10
  68. package/dist/tools/invoices.js +109 -42
  69. package/dist/tools/kitchen.js +19 -9
  70. package/dist/tools/quotes.js +86 -25
  71. package/dist/tools/recurring.js +26 -25
  72. package/dist/tools/register-all.d.ts +2 -2
  73. package/dist/tools/register-all.js +9 -6
  74. package/dist/tools/search.d.ts +19 -0
  75. package/dist/tools/search.js +84 -0
  76. package/dist/tools/shared.d.ts +18 -38
  77. package/dist/tools/shared.js +96 -30
  78. package/dist/tools/team.js +8 -16
  79. package/dist/tools/time.js +4 -12
  80. package/dist/tools/vendors.js +242 -6
  81. package/dist/types.d.ts +3 -1
  82. package/dist/workflows/daily-operational-brief.d.ts +163 -0
  83. package/dist/workflows/daily-operational-brief.js +881 -0
  84. package/docs/agent-onboarding.json +15 -5
  85. package/package.json +26 -12
  86. package/dist/tools/onboarding.d.ts +0 -19
  87. package/dist/tools/onboarding.js +0 -64
@@ -30,7 +30,7 @@ export declare const AGENT_ONBOARDING_CONTRACT_VERSION = 1;
30
30
  * ApiKeysSettings panel. The old index.ts wording ("Settings > Developers >
31
31
  * API Keys") pointed at a section that does not exist. */
32
32
  export declare const API_KEY_LOCATION = "https://app.frihet.io/settings/api";
33
- export declare const AGENT_SERVER_INSTRUCTIONS = "Frihet ERP \u2014 real business and fiscal records. Read freely, propose before you mutate.\n\nAUTH\n- Local (stdio): FRIHET_API_KEY=fri_... \u2014 create one at https://app.frihet.io/settings/api.\n- No key yet: FRIHET_DEMO=1 serves example fixtures. No network call, nothing persisted, demo_-prefixed IDs, fiscal actions simulated.\n- Hosted: https://mcp.frihet.io/mcp \u2014 OAuth 2.1 + PKCE, or Authorization: Bearer fri_...\n\nORIENT BEFORE ACTING (read-only)\n- get_business_context \u2014 fiscal zone, currency, IRPF/IVA defaults, plan limits. Call this first; the correct tax treatment depends on it.\n- Resources frihet://tax/rates and frihet://tax/calendar carry the Spanish rate table (IVA / IGIC / IPSI) and the filing deadlines. Read them instead of recalling a rate.\n\nCAPABILITY DISCOVERY\n- Every tool in tools/list carries _meta[\"io.frihet/capability\"] = {callability, writesFrihet, externalInteraction, externalSideEffects}. Read it before you call.\n- callability is a conservative fact, not a promise: api_dependent | runtime_checked | deferred | unavailable | local. Registration does NOT mean the backing API is enabled for this workspace; deferred and unavailable tools will refuse.\n- Large surface: set FRIHET_TOOL_MODE=grouped for progressive disclosure (list_tool_groups, search_tools, describe_tool) instead of loading every schema.\n\nTHE SAFE WORKFLOW \u2014 draft, show, stop\n- create_invoice defaults to status=draft: no fiscal number, no hash, nothing submitted to a tax authority. create_quote and create_credit_note are drafts too.\n- Build the draft, read it back, present it to the human, and stop there. Issuing is a separate, human-authorised step.\n\nHUMAN AUTHORITY \u2014 do not call unprompted\n- Any tool whose capability shows a non-empty externalSideEffects reaches outside Frihet \u2014 email to a client, webhook delivery, money movement, or a submission to AEAT / VeriFactu / TicketBAI / FACe. You cannot undo those.\n- Several also take confirm=true. That flag records the human's decision. Never set it to satisfy your own plan; ask, then pass what you were told.\n- delete_invoice does not always delete: an issued invoice is CANCELLED (status=cancelled) because VeriFactu forbids breaking the hash chain. Same for quotes.\n\nWHEN A CALL FAILS\n- Errors carry sanitized remediation text \u2014 read it, do not guess. 401 = key; 403 = scope or plan; 429 = wait Retry-After seconds.\n- After 409 IDEMPOTENCY_REQUEST_IN_PROGRESS, do NOT retry with a fresh Idempotency-Key. Read the resource back and decide from its actual state; a new key would create a second fiscal document.\n\nMachine-readable version of this contract: https://github.com/Frihet-io/frihet-mcp/blob/main/docs/agent-onboarding.json";
33
+ export declare const AGENT_SERVER_INSTRUCTIONS = "Frihet ERP \u2014 real business and fiscal records. Read freely, propose before you mutate.\n\nAUTH\n- Local (stdio): FRIHET_API_KEY=fri_... \u2014 create one at https://app.frihet.io/settings/api.\n- No key yet: FRIHET_DEMO=1 serves example fixtures. No network call, nothing persisted, demo_-prefixed IDs, fiscal actions simulated.\n- Hosted: https://mcp.frihet.io/mcp \u2014 OAuth 2.1 + PKCE, or Authorization: Bearer fri_...\n\nORIENT BEFORE ACTING (read-only)\n- get_business_context \u2014 fiscal zone, currency, IRPF/IVA defaults, plan limits. Call this first; the correct tax treatment depends on it.\n- Resources carry informational reference data with declared provenance: frihet://tax/rates and frihet://tax/calendar (Spanish statutory schedules and deadlines), frihet://config/expense-categories (LIRPF/LIVA deductibility guidelines), frihet://config/countries and currencies (defaults and ISO codes), frihet://api/schema (endpoint snapshot; canonical at https://api.frihet.io/v1/openapi.json). Read them instead of guessing, but treat as informational: writing tools and server endpoints enforce business and fiscal invariants server-side.\n\nCAPABILITY DISCOVERY\n- Every tool in tools/list carries _meta[\"io.frihet/capability\"] = {callability, writesFrihet, externalInteraction, externalSideEffects}. Read it before you call.\n- callability is a conservative fact, not a promise: api_dependent | runtime_checked | deferred | unavailable | local. Registration does NOT mean the backing API is enabled for this workspace; deferred and unavailable tools will refuse.\n- Large surface: set FRIHET_TOOL_MODE=grouped for progressive disclosure (list_tool_groups, search_tools, describe_tool) instead of loading every schema.\n\nTHE SAFE WORKFLOW \u2014 draft, show, stop\n- create_invoice defaults to status=draft: no fiscal number, no hash, nothing submitted to a tax authority. create_quote and create_credit_note are drafts too.\n- Build the draft, read it back, present it to the human, and stop there. Issuing is a separate, human-authorised step.\n\nHUMAN AUTHORITY \u2014 do not call unprompted\n- Any tool whose capability shows a non-empty externalSideEffects reaches outside Frihet \u2014 email to a client, webhook delivery, money movement, or a submission to AEAT / VeriFactu / TicketBAI / FACe. You cannot undo those.\n- Several also take confirm=true. It is a local client/agent interlock, not server-verifiable human attestation and not actor/resource/payload/expiry-bound. Never set it to satisfy your own plan; ask, then pass what you were told.\n- delete_invoice does not always delete: an issued invoice is CANCELLED (status=cancelled) because VeriFactu forbids breaking the hash chain. Same for quotes.\n\nWHEN A CALL FAILS\n- Errors carry sanitized remediation text \u2014 read it, do not guess. 401 = key; 403 = scope or plan; 429 = wait Retry-After seconds.\n- After 409 IDEMPOTENCY_REQUEST_IN_PROGRESS, do NOT retry with a fresh Idempotency-Key. Read the resource back and decide from its actual state; a new key would create a second fiscal document.\n\nMachine-readable version of this contract: https://github.com/Frihet-io/frihet-mcp/blob/main/docs/agent-onboarding.json";
34
34
  export interface AgentOnboardingDescriptor {
35
35
  onboardingContractVersion: number;
36
36
  server: {
@@ -47,7 +47,7 @@ AUTH
47
47
 
48
48
  ORIENT BEFORE ACTING (read-only)
49
49
  - get_business_context — fiscal zone, currency, IRPF/IVA defaults, plan limits. Call this first; the correct tax treatment depends on it.
50
- - Resources frihet://tax/rates and frihet://tax/calendar carry the Spanish rate table (IVA / IGIC / IPSI) and the filing deadlines. Read them instead of recalling a rate.
50
+ - Resources carry informational reference data with declared provenance: frihet://tax/rates and frihet://tax/calendar (Spanish statutory schedules and deadlines), frihet://config/expense-categories (LIRPF/LIVA deductibility guidelines), frihet://config/countries and currencies (defaults and ISO codes), frihet://api/schema (endpoint snapshot; canonical at https://api.frihet.io/v1/openapi.json). Read them instead of guessing, but treat as informational: writing tools and server endpoints enforce business and fiscal invariants server-side.
51
51
 
52
52
  CAPABILITY DISCOVERY
53
53
  - Every tool in tools/list carries _meta["${CAPABILITY_META_KEY}"] = {callability, writesFrihet, externalInteraction, externalSideEffects}. Read it before you call.
@@ -60,7 +60,7 @@ THE SAFE WORKFLOW — draft, show, stop
60
60
 
61
61
  HUMAN AUTHORITY — do not call unprompted
62
62
  - Any tool whose capability shows a non-empty externalSideEffects reaches outside Frihet — email to a client, webhook delivery, money movement, or a submission to AEAT / VeriFactu / TicketBAI / FACe. You cannot undo those.
63
- - Several also take confirm=true. That flag records the human's decision. Never set it to satisfy your own plan; ask, then pass what you were told.
63
+ - Several also take confirm=true. It is a local client/agent interlock, not server-verifiable human attestation and not actor/resource/payload/expiry-bound. Never set it to satisfy your own plan; ask, then pass what you were told.
64
64
  - delete_invoice does not always delete: an issued invoice is CANCELLED (status=cancelled) because VeriFactu forbids breaking the hash chain. Same for quotes.
65
65
 
66
66
  WHEN A CALL FAILS
@@ -214,7 +214,7 @@ export async function captureAgentOnboardingDescriptor() {
214
214
  {
215
215
  call: "resources/read frihet://tax/rates",
216
216
  kind: "read",
217
- note: "Authoritative IVA / IGIC / IPSI table. Do not recall a rate from memory.",
217
+ note: "Spanish statutory IVA / IGIC / IPSI reference schedule. Do not recall a rate from memory; server validates transaction math.",
218
218
  },
219
219
  {
220
220
  call: "list_clients",
@@ -15,7 +15,7 @@
15
15
  */
16
16
  export declare const HARNESS_CONTRACT_VERSION = 1;
17
17
  export declare const INSPECTOR_PINNED_VERSION = "2.3.0";
18
- export declare const CANONICAL_OPERATIONS_COUNT = 157;
18
+ export declare const CANONICAL_OPERATIONS_COUNT = 156;
19
19
  export declare const FISCAL_ALIASES_COUNT: number;
20
20
  export type CheckStatus = "PASS" | "FAIL" | "UNSUPPORTED" | "NOT_EXERCISED";
21
21
  export type OverallStatus = "PASS" | "PASS_WITH_GAPS" | "FAIL";
@@ -22,7 +22,10 @@ import { CAPABILITY_META_KEY } from "../capability-truth.js";
22
22
  import { FISCAL_MODELO_ALIASES } from "../fiscal-aliases.js";
23
23
  export const HARNESS_CONTRACT_VERSION = 1;
24
24
  export const INSPECTOR_PINNED_VERSION = "2.3.0";
25
- export const CANONICAL_OPERATIONS_COUNT = 157;
25
+ // Updated 2026-10-10 by issue #124 (IGIC-pattern withdraw of dead onboarding_status /
26
+ // onboarding_persona_set — the Frihet-ERP /v1/onboarding/* family is absent, so the
27
+ // MCP catalogue now declares 156 canonical operations, down from 158).
28
+ export const CANONICAL_OPERATIONS_COUNT = 156;
26
29
  export const FISCAL_ALIASES_COUNT = Object.keys(FISCAL_MODELO_ALIASES).length;
27
30
  /**
28
31
  * Executes the complete compatibility harness in-process and returns
@@ -14,17 +14,11 @@ const RUNTIME_CHECKED = new Set([
14
14
  "anomaly_list",
15
15
  "attendance_clock_in",
16
16
  "attendance_clock_out",
17
- "frihet_aiem_calculate",
18
17
  "frihet_bank_rule_create",
19
18
  "frihet_bank_rules_list",
20
19
  "frihet_gl_entry_approve",
21
20
  "frihet_gl_entry_audit_log",
22
21
  "frihet_gl_entry_reject",
23
- "frihet_modelo_200_summary",
24
- "frihet_modelo_202_summary",
25
- "frihet_modelo_415_summary",
26
- "frihet_modelo_418_summary",
27
- "frihet_modelo_425_summary",
28
22
  "frihet_portal_domain_add",
29
23
  "frihet_portal_domain_remove",
30
24
  "frihet_portal_domain_verify",
@@ -32,7 +26,6 @@ const RUNTIME_CHECKED = new Set([
32
26
  "frihet_tax_id_vies_lookup",
33
27
  "gestoria_template_create",
34
28
  "get_modelo_130_summary",
35
- "get_modelo_180_summary",
36
29
  "get_modelo_303_summary",
37
30
  "get_modelo_347_summary",
38
31
  "get_modelo_390_summary",
@@ -41,8 +34,6 @@ const RUNTIME_CHECKED = new Set([
41
34
  "leave_list",
42
35
  "leave_reject",
43
36
  "leave_request_create",
44
- "onboarding_persona_set",
45
- "onboarding_status",
46
37
  "overtime_report",
47
38
  "payroll_checklist",
48
39
  "payroll_export",
@@ -71,7 +62,19 @@ const DEFERRED = new Set([
71
62
  "create_reservation",
72
63
  "sync_channel",
73
64
  ]);
74
- const UNAVAILABLE = new Set(["ksef_submit"]);
65
+ // No Frihet-ERP route exists: publicApi.ts serves /fiscal/modelo/{303,130,390,347}
66
+ // only, and has no /igic/* (modelo or AIEM) and no /is/modelo/* route. These
67
+ // handlers return NOT_DEPLOYED without a call (ksef_submit: labelled unavailable).
68
+ const UNAVAILABLE = new Set([
69
+ "ksef_submit",
70
+ "get_modelo_180_summary",
71
+ "frihet_modelo_415_summary",
72
+ "frihet_modelo_418_summary",
73
+ "frihet_modelo_425_summary",
74
+ "frihet_aiem_calculate",
75
+ "frihet_modelo_200_summary",
76
+ "frihet_modelo_202_summary",
77
+ ]);
75
78
  const DESTRUCTIVE_UPDATES = new Set([
76
79
  // These writes can synchronously enqueue delivery to workspace webhooks.
77
80
  // Once an external endpoint receives the event, that disclosure cannot be
@@ -101,7 +104,6 @@ const DESTRUCTIVE_UPDATES = new Set([
101
104
  "send_invoice",
102
105
  "mark_invoice_paid",
103
106
  "update_kitchen_ticket",
104
- "onboarding_persona_set",
105
107
  "update_product",
106
108
  "update_quote",
107
109
  "send_quote",
@@ -147,11 +149,17 @@ const NON_IDEMPOTENT = new Set([
147
149
  "pause_recurring_invoice",
148
150
  "resume_recurring_invoice",
149
151
  ]);
150
- const WRITE_OVERRIDES = new Set(["frihet_portal_domain_verify"]);
152
+ const WRITE_OVERRIDES = new Set([
153
+ "frihet_portal_domain_verify",
154
+ // signed=true exercises a workspace certificate. MCP annotations are
155
+ // static, so classify the whole export tool conservatively.
156
+ "einvoice_export",
157
+ ]);
151
158
  const EXTERNAL_SIDE_EFFECTS = {
152
159
  create_invoice: ["webhook_delivery_or_configuration", "fiscal_or_einvoice_submission"],
153
160
  duplicate_invoice: ["webhook_delivery_or_configuration"],
154
161
  create_credit_note: ["webhook_delivery_or_configuration"],
162
+ run_recurring_now: ["webhook_delivery_or_configuration", "fiscal_or_einvoice_submission"],
155
163
  update_invoice: ["webhook_delivery_or_configuration", "fiscal_or_einvoice_submission"],
156
164
  mark_invoice_paid: ["webhook_delivery_or_configuration", "fiscal_or_einvoice_submission"],
157
165
  delete_invoice: ["webhook_delivery_or_configuration", "fiscal_or_einvoice_submission"],
@@ -0,0 +1,482 @@
1
+ declare function captureSurface(local: boolean, grouped: boolean): Promise<{
2
+ groups?: {} | undefined;
3
+ tools: {
4
+ inputSchema: {
5
+ [x: string]: unknown;
6
+ type: "object";
7
+ properties?: Record<string, object> | undefined;
8
+ required?: string[] | undefined;
9
+ };
10
+ name: string;
11
+ description?: string | undefined;
12
+ outputSchema?: {
13
+ [x: string]: unknown;
14
+ type: "object";
15
+ properties?: Record<string, object> | undefined;
16
+ required?: string[] | undefined;
17
+ } | undefined;
18
+ annotations?: {
19
+ title?: string | undefined;
20
+ readOnlyHint?: boolean | undefined;
21
+ destructiveHint?: boolean | undefined;
22
+ idempotentHint?: boolean | undefined;
23
+ openWorldHint?: boolean | undefined;
24
+ } | undefined;
25
+ execution?: {
26
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
27
+ } | undefined;
28
+ _meta?: Record<string, unknown> | undefined;
29
+ icons?: {
30
+ src: string;
31
+ mimeType?: string | undefined;
32
+ sizes?: string[] | undefined;
33
+ theme?: "light" | "dark" | undefined;
34
+ }[] | undefined;
35
+ title?: string | undefined;
36
+ }[];
37
+ resources: {
38
+ uri: string;
39
+ name: string;
40
+ description?: string | undefined;
41
+ mimeType?: string | undefined;
42
+ size?: number | undefined;
43
+ annotations?: {
44
+ audience?: ("user" | "assistant")[] | undefined;
45
+ priority?: number | undefined;
46
+ lastModified?: string | undefined;
47
+ } | undefined;
48
+ _meta?: {
49
+ [x: string]: unknown;
50
+ } | undefined;
51
+ icons?: {
52
+ src: string;
53
+ mimeType?: string | undefined;
54
+ sizes?: string[] | undefined;
55
+ theme?: "light" | "dark" | undefined;
56
+ }[] | undefined;
57
+ title?: string | undefined;
58
+ }[];
59
+ prompts: {
60
+ name: string;
61
+ description?: string | undefined;
62
+ arguments?: {
63
+ name: string;
64
+ description?: string | undefined;
65
+ required?: boolean | undefined;
66
+ }[] | undefined;
67
+ _meta?: {
68
+ [x: string]: unknown;
69
+ } | undefined;
70
+ icons?: {
71
+ src: string;
72
+ mimeType?: string | undefined;
73
+ sizes?: string[] | undefined;
74
+ theme?: "light" | "dark" | undefined;
75
+ }[] | undefined;
76
+ title?: string | undefined;
77
+ }[];
78
+ promptContent: {
79
+ name: string;
80
+ result: {
81
+ [x: string]: unknown;
82
+ messages: {
83
+ role: "user" | "assistant";
84
+ content: {
85
+ type: "text";
86
+ text: string;
87
+ annotations?: {
88
+ audience?: ("user" | "assistant")[] | undefined;
89
+ priority?: number | undefined;
90
+ lastModified?: string | undefined;
91
+ } | undefined;
92
+ _meta?: Record<string, unknown> | undefined;
93
+ } | {
94
+ type: "image";
95
+ data: string;
96
+ mimeType: string;
97
+ annotations?: {
98
+ audience?: ("user" | "assistant")[] | undefined;
99
+ priority?: number | undefined;
100
+ lastModified?: string | undefined;
101
+ } | undefined;
102
+ _meta?: Record<string, unknown> | undefined;
103
+ } | {
104
+ type: "audio";
105
+ data: string;
106
+ mimeType: string;
107
+ annotations?: {
108
+ audience?: ("user" | "assistant")[] | undefined;
109
+ priority?: number | undefined;
110
+ lastModified?: string | undefined;
111
+ } | undefined;
112
+ _meta?: Record<string, unknown> | undefined;
113
+ } | {
114
+ type: "resource";
115
+ resource: {
116
+ uri: string;
117
+ text: string;
118
+ mimeType?: string | undefined;
119
+ _meta?: Record<string, unknown> | undefined;
120
+ } | {
121
+ uri: string;
122
+ blob: string;
123
+ mimeType?: string | undefined;
124
+ _meta?: Record<string, unknown> | undefined;
125
+ };
126
+ annotations?: {
127
+ audience?: ("user" | "assistant")[] | undefined;
128
+ priority?: number | undefined;
129
+ lastModified?: string | undefined;
130
+ } | undefined;
131
+ _meta?: Record<string, unknown> | undefined;
132
+ } | {
133
+ uri: string;
134
+ name: string;
135
+ type: "resource_link";
136
+ description?: string | undefined;
137
+ mimeType?: string | undefined;
138
+ size?: number | undefined;
139
+ annotations?: {
140
+ audience?: ("user" | "assistant")[] | undefined;
141
+ priority?: number | undefined;
142
+ lastModified?: string | undefined;
143
+ } | undefined;
144
+ _meta?: {
145
+ [x: string]: unknown;
146
+ } | undefined;
147
+ icons?: {
148
+ src: string;
149
+ mimeType?: string | undefined;
150
+ sizes?: string[] | undefined;
151
+ theme?: "light" | "dark" | undefined;
152
+ }[] | undefined;
153
+ title?: string | undefined;
154
+ };
155
+ }[];
156
+ _meta?: {
157
+ [x: string]: unknown;
158
+ progressToken?: string | number | undefined;
159
+ "io.modelcontextprotocol/related-task"?: {
160
+ taskId: string;
161
+ } | undefined;
162
+ } | undefined;
163
+ description?: string | undefined;
164
+ };
165
+ }[];
166
+ currencies: {
167
+ [x: string]: unknown;
168
+ contents: ({
169
+ uri: string;
170
+ text: string;
171
+ mimeType?: string | undefined;
172
+ _meta?: Record<string, unknown> | undefined;
173
+ } | {
174
+ uri: string;
175
+ blob: string;
176
+ mimeType?: string | undefined;
177
+ _meta?: Record<string, unknown> | undefined;
178
+ })[];
179
+ _meta?: {
180
+ [x: string]: unknown;
181
+ progressToken?: string | number | undefined;
182
+ "io.modelcontextprotocol/related-task"?: {
183
+ taskId: string;
184
+ } | undefined;
185
+ } | undefined;
186
+ };
187
+ }>;
188
+ type CapturedSurface = Awaited<ReturnType<typeof captureSurface>>;
189
+ export declare function assertClaudeCandidateCaptureParity({ localFull, localGrouped, remoteFull, remoteGrouped }: {
190
+ localFull: CapturedSurface;
191
+ localGrouped: CapturedSurface;
192
+ remoteFull: CapturedSurface;
193
+ remoteGrouped: CapturedSurface;
194
+ }): void;
195
+ export declare function captureClaudeCandidateContract(): Promise<{
196
+ contractVersion: number;
197
+ status: string;
198
+ inventorySource: string;
199
+ instructions: string;
200
+ catalogue: {
201
+ canonicalOperations: number;
202
+ aliases: {
203
+ [k: string]: string;
204
+ };
205
+ discoveryNames: string[];
206
+ };
207
+ exclusions: {
208
+ tools: Readonly<Record<string, string>>;
209
+ resources: Readonly<Record<string, string>>;
210
+ prompts: Readonly<Record<string, string>>;
211
+ };
212
+ tools: {
213
+ full: {
214
+ inputSchema: {
215
+ [x: string]: unknown;
216
+ type: "object";
217
+ properties?: Record<string, object> | undefined;
218
+ required?: string[] | undefined;
219
+ };
220
+ name: string;
221
+ description?: string | undefined;
222
+ outputSchema?: {
223
+ [x: string]: unknown;
224
+ type: "object";
225
+ properties?: Record<string, object> | undefined;
226
+ required?: string[] | undefined;
227
+ } | undefined;
228
+ annotations?: {
229
+ title?: string | undefined;
230
+ readOnlyHint?: boolean | undefined;
231
+ destructiveHint?: boolean | undefined;
232
+ idempotentHint?: boolean | undefined;
233
+ openWorldHint?: boolean | undefined;
234
+ } | undefined;
235
+ execution?: {
236
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
237
+ } | undefined;
238
+ _meta?: Record<string, unknown> | undefined;
239
+ icons?: {
240
+ src: string;
241
+ mimeType?: string | undefined;
242
+ sizes?: string[] | undefined;
243
+ theme?: "light" | "dark" | undefined;
244
+ }[] | undefined;
245
+ title?: string | undefined;
246
+ }[];
247
+ grouped: {
248
+ inputSchema: {
249
+ [x: string]: unknown;
250
+ type: "object";
251
+ properties?: Record<string, object> | undefined;
252
+ required?: string[] | undefined;
253
+ };
254
+ name: string;
255
+ description?: string | undefined;
256
+ outputSchema?: {
257
+ [x: string]: unknown;
258
+ type: "object";
259
+ properties?: Record<string, object> | undefined;
260
+ required?: string[] | undefined;
261
+ } | undefined;
262
+ annotations?: {
263
+ title?: string | undefined;
264
+ readOnlyHint?: boolean | undefined;
265
+ destructiveHint?: boolean | undefined;
266
+ idempotentHint?: boolean | undefined;
267
+ openWorldHint?: boolean | undefined;
268
+ } | undefined;
269
+ execution?: {
270
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
271
+ } | undefined;
272
+ _meta?: Record<string, unknown> | undefined;
273
+ icons?: {
274
+ src: string;
275
+ mimeType?: string | undefined;
276
+ sizes?: string[] | undefined;
277
+ theme?: "light" | "dark" | undefined;
278
+ }[] | undefined;
279
+ title?: string | undefined;
280
+ }[];
281
+ };
282
+ resources: {
283
+ local: {
284
+ uri: string;
285
+ name: string;
286
+ description?: string | undefined;
287
+ mimeType?: string | undefined;
288
+ size?: number | undefined;
289
+ annotations?: {
290
+ audience?: ("user" | "assistant")[] | undefined;
291
+ priority?: number | undefined;
292
+ lastModified?: string | undefined;
293
+ } | undefined;
294
+ _meta?: {
295
+ [x: string]: unknown;
296
+ } | undefined;
297
+ icons?: {
298
+ src: string;
299
+ mimeType?: string | undefined;
300
+ sizes?: string[] | undefined;
301
+ theme?: "light" | "dark" | undefined;
302
+ }[] | undefined;
303
+ title?: string | undefined;
304
+ }[];
305
+ remote: {
306
+ uri: string;
307
+ name: string;
308
+ description?: string | undefined;
309
+ mimeType?: string | undefined;
310
+ size?: number | undefined;
311
+ annotations?: {
312
+ audience?: ("user" | "assistant")[] | undefined;
313
+ priority?: number | undefined;
314
+ lastModified?: string | undefined;
315
+ } | undefined;
316
+ _meta?: {
317
+ [x: string]: unknown;
318
+ } | undefined;
319
+ icons?: {
320
+ src: string;
321
+ mimeType?: string | undefined;
322
+ sizes?: string[] | undefined;
323
+ theme?: "light" | "dark" | undefined;
324
+ }[] | undefined;
325
+ title?: string | undefined;
326
+ }[];
327
+ };
328
+ prompts: {
329
+ name: string;
330
+ description?: string | undefined;
331
+ arguments?: {
332
+ name: string;
333
+ description?: string | undefined;
334
+ required?: boolean | undefined;
335
+ }[] | undefined;
336
+ _meta?: {
337
+ [x: string]: unknown;
338
+ } | undefined;
339
+ icons?: {
340
+ src: string;
341
+ mimeType?: string | undefined;
342
+ sizes?: string[] | undefined;
343
+ theme?: "light" | "dark" | undefined;
344
+ }[] | undefined;
345
+ title?: string | undefined;
346
+ }[];
347
+ promptContent: {
348
+ name: string;
349
+ result: {
350
+ [x: string]: unknown;
351
+ messages: {
352
+ role: "user" | "assistant";
353
+ content: {
354
+ type: "text";
355
+ text: string;
356
+ annotations?: {
357
+ audience?: ("user" | "assistant")[] | undefined;
358
+ priority?: number | undefined;
359
+ lastModified?: string | undefined;
360
+ } | undefined;
361
+ _meta?: Record<string, unknown> | undefined;
362
+ } | {
363
+ type: "image";
364
+ data: string;
365
+ mimeType: string;
366
+ annotations?: {
367
+ audience?: ("user" | "assistant")[] | undefined;
368
+ priority?: number | undefined;
369
+ lastModified?: string | undefined;
370
+ } | undefined;
371
+ _meta?: Record<string, unknown> | undefined;
372
+ } | {
373
+ type: "audio";
374
+ data: string;
375
+ mimeType: string;
376
+ annotations?: {
377
+ audience?: ("user" | "assistant")[] | undefined;
378
+ priority?: number | undefined;
379
+ lastModified?: string | undefined;
380
+ } | undefined;
381
+ _meta?: Record<string, unknown> | undefined;
382
+ } | {
383
+ type: "resource";
384
+ resource: {
385
+ uri: string;
386
+ text: string;
387
+ mimeType?: string | undefined;
388
+ _meta?: Record<string, unknown> | undefined;
389
+ } | {
390
+ uri: string;
391
+ blob: string;
392
+ mimeType?: string | undefined;
393
+ _meta?: Record<string, unknown> | undefined;
394
+ };
395
+ annotations?: {
396
+ audience?: ("user" | "assistant")[] | undefined;
397
+ priority?: number | undefined;
398
+ lastModified?: string | undefined;
399
+ } | undefined;
400
+ _meta?: Record<string, unknown> | undefined;
401
+ } | {
402
+ uri: string;
403
+ name: string;
404
+ type: "resource_link";
405
+ description?: string | undefined;
406
+ mimeType?: string | undefined;
407
+ size?: number | undefined;
408
+ annotations?: {
409
+ audience?: ("user" | "assistant")[] | undefined;
410
+ priority?: number | undefined;
411
+ lastModified?: string | undefined;
412
+ } | undefined;
413
+ _meta?: {
414
+ [x: string]: unknown;
415
+ } | undefined;
416
+ icons?: {
417
+ src: string;
418
+ mimeType?: string | undefined;
419
+ sizes?: string[] | undefined;
420
+ theme?: "light" | "dark" | undefined;
421
+ }[] | undefined;
422
+ title?: string | undefined;
423
+ };
424
+ }[];
425
+ _meta?: {
426
+ [x: string]: unknown;
427
+ progressToken?: string | number | undefined;
428
+ "io.modelcontextprotocol/related-task"?: {
429
+ taskId: string;
430
+ } | undefined;
431
+ } | undefined;
432
+ description?: string | undefined;
433
+ };
434
+ }[];
435
+ currencies: {
436
+ [x: string]: unknown;
437
+ contents: ({
438
+ uri: string;
439
+ text: string;
440
+ mimeType?: string | undefined;
441
+ _meta?: Record<string, unknown> | undefined;
442
+ } | {
443
+ uri: string;
444
+ blob: string;
445
+ mimeType?: string | undefined;
446
+ _meta?: Record<string, unknown> | undefined;
447
+ })[];
448
+ _meta?: {
449
+ [x: string]: unknown;
450
+ progressToken?: string | number | undefined;
451
+ "io.modelcontextprotocol/related-task"?: {
452
+ taskId: string;
453
+ } | undefined;
454
+ } | undefined;
455
+ };
456
+ groups: {} | undefined;
457
+ surfaces: {
458
+ localFull: {
459
+ tools: string;
460
+ resources: string;
461
+ toolNames: number;
462
+ };
463
+ localGrouped: {
464
+ tools: string;
465
+ resources: string;
466
+ toolNames: number;
467
+ };
468
+ remoteFull: {
469
+ tools: string;
470
+ resources: string;
471
+ toolNames: number;
472
+ };
473
+ remoteGrouped: {
474
+ tools: string;
475
+ resources: string;
476
+ toolNames: number;
477
+ };
478
+ };
479
+ }>;
480
+ export declare function serializeClaudeCandidateContract(contract: Awaited<ReturnType<typeof captureClaudeCandidateContract>>): string;
481
+ export {};
482
+ //# sourceMappingURL=claude-candidate-contract.d.ts.map