@tryfinch/finch-api-mcp 6.27.0 → 6.29.0
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/README.md +77 -3
- package/compat.d.mts +52 -0
- package/compat.d.mts.map +1 -0
- package/compat.d.ts +52 -0
- package/compat.d.ts.map +1 -0
- package/compat.js +342 -0
- package/compat.js.map +1 -0
- package/compat.mjs +332 -0
- package/compat.mjs.map +1 -0
- package/dynamic-tools.d.mts +12 -0
- package/dynamic-tools.d.mts.map +1 -0
- package/dynamic-tools.d.ts +12 -0
- package/dynamic-tools.d.ts.map +1 -0
- package/dynamic-tools.js +133 -0
- package/dynamic-tools.js.map +1 -0
- package/dynamic-tools.mjs +130 -0
- package/dynamic-tools.mjs.map +1 -0
- package/index.js +40 -116
- package/index.js.map +1 -1
- package/index.mjs +42 -115
- package/index.mjs.map +1 -1
- package/options.d.mts +11 -0
- package/options.d.mts.map +1 -0
- package/options.d.ts +11 -0
- package/options.d.ts.map +1 -0
- package/options.js +337 -0
- package/options.js.map +1 -0
- package/options.mjs +331 -0
- package/options.mjs.map +1 -0
- package/package.json +6 -3
- package/server.d.mts +9 -2
- package/server.d.mts.map +1 -1
- package/server.d.ts +9 -2
- package/server.d.ts.map +1 -1
- package/server.js +34 -11
- package/server.js.map +1 -1
- package/server.mjs +31 -9
- package/server.mjs.map +1 -1
- package/src/compat.ts +429 -0
- package/src/dynamic-tools.ts +152 -0
- package/src/index.ts +42 -130
- package/src/options.ts +361 -0
- package/src/server.ts +46 -11
- package/src/tools/access-tokens/create-access-tokens.ts +2 -2
- package/src/tools/account/disconnect-account.ts +1 -2
- package/src/tools/account/introspect-account.ts +1 -2
- package/src/tools/connect/sessions/new-connect-sessions.ts +2 -2
- package/src/tools/connect/sessions/reauthenticate-connect-sessions.ts +2 -2
- package/src/tools/hris/benefits/create-hris-benefits.ts +38 -3
- package/src/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/list-hris-benefits.ts +1 -2
- package/src/tools/hris/benefits/list-supported-benefits-hris-benefits.ts +1 -2
- package/src/tools/hris/benefits/retrieve-hris-benefits.ts +2 -2
- package/src/tools/hris/benefits/update-hris-benefits.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.ts +1 -2
- package/src/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.ts +2 -2
- package/src/tools/hris/company/retrieve-hris-company.ts +1 -2
- package/src/tools/hris/directory/list-hris-directory.ts +2 -2
- package/src/tools/hris/directory/list-individuals-hris-directory.ts +2 -2
- package/src/tools/hris/documents/list-hris-documents.ts +2 -2
- package/src/tools/hris/documents/retreive-hris-documents.ts +2 -2
- package/src/tools/hris/employments/retrieve-many-hris-employments.ts +2 -2
- package/src/tools/hris/individuals/retrieve-many-hris-individuals.ts +2 -2
- package/src/tools/hris/pay-statements/retrieve-many-hris-pay-statements.ts +2 -2
- package/src/tools/hris/payments/list-hris-payments.ts +2 -2
- package/src/tools/index.ts +16 -6
- package/src/tools/jobs/automated/create-jobs-automated.ts +2 -2
- package/src/tools/jobs/automated/list-jobs-automated.ts +2 -2
- package/src/tools/jobs/automated/retrieve-jobs-automated.ts +2 -2
- package/src/tools/jobs/manual/retrieve-jobs-manual.ts +2 -2
- package/src/tools/payroll/pay-groups/list-payroll-pay-groups.ts +2 -2
- package/src/tools/payroll/pay-groups/retrieve-payroll-pay-groups.ts +2 -2
- package/src/tools/providers/list-providers.ts +1 -2
- package/src/tools/request-forwarding/forward-request-forwarding.ts +2 -2
- package/src/tools/sandbox/company/update-sandbox-company.ts +42 -37
- package/src/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.ts +2 -2
- package/src/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.ts +7 -2
- package/src/tools/sandbox/connections/create-sandbox-connections.ts +2 -2
- package/src/tools/sandbox/directory/create-sandbox-directory.ts +82 -74
- package/src/tools/sandbox/employment/update-sandbox-employment.ts +62 -54
- package/src/tools/sandbox/individual/update-sandbox-individual.ts +19 -14
- package/src/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.ts +1 -2
- package/src/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.ts +2 -2
- package/src/tools/sandbox/jobs/create-sandbox-jobs.ts +2 -2
- package/src/tools/sandbox/payment/create-sandbox-payment.ts +49 -41
- package/tools/access-tokens/create-access-tokens.d.mts +10 -2
- package/tools/access-tokens/create-access-tokens.d.mts.map +1 -1
- package/tools/access-tokens/create-access-tokens.d.ts +10 -2
- package/tools/access-tokens/create-access-tokens.d.ts.map +1 -1
- package/tools/access-tokens/create-access-tokens.js +1 -1
- package/tools/access-tokens/create-access-tokens.js.map +1 -1
- package/tools/access-tokens/create-access-tokens.mjs +1 -1
- package/tools/access-tokens/create-access-tokens.mjs.map +1 -1
- package/tools/account/disconnect-account.d.mts +10 -2
- package/tools/account/disconnect-account.d.mts.map +1 -1
- package/tools/account/disconnect-account.d.ts +10 -2
- package/tools/account/disconnect-account.d.ts.map +1 -1
- package/tools/account/disconnect-account.js +0 -1
- package/tools/account/disconnect-account.js.map +1 -1
- package/tools/account/disconnect-account.mjs +0 -1
- package/tools/account/disconnect-account.mjs.map +1 -1
- package/tools/account/introspect-account.d.mts +10 -2
- package/tools/account/introspect-account.d.mts.map +1 -1
- package/tools/account/introspect-account.d.ts +10 -2
- package/tools/account/introspect-account.d.ts.map +1 -1
- package/tools/account/introspect-account.js +0 -1
- package/tools/account/introspect-account.js.map +1 -1
- package/tools/account/introspect-account.mjs +0 -1
- package/tools/account/introspect-account.mjs.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.d.mts +10 -2
- package/tools/connect/sessions/new-connect-sessions.d.mts.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.d.ts +10 -2
- package/tools/connect/sessions/new-connect-sessions.d.ts.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.js +1 -1
- package/tools/connect/sessions/new-connect-sessions.js.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.mjs +1 -1
- package/tools/connect/sessions/new-connect-sessions.mjs.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts +10 -2
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts +10 -2
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.js +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.js.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.mjs +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.mjs.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/create-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/create-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.js +37 -2
- package/tools/hris/benefits/create-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.mjs +37 -2
- package/tools/hris/benefits/create-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/list-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/list-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.js +0 -1
- package/tools/hris/benefits/list-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.mjs +0 -1
- package/tools/hris/benefits/list-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.js +0 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs +0 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/retrieve-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/retrieve-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.js +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.mjs +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/update-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/update-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js +0 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs +0 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/retrieve-hris-company.d.mts +10 -2
- package/tools/hris/company/retrieve-hris-company.d.mts.map +1 -1
- package/tools/hris/company/retrieve-hris-company.d.ts +10 -2
- package/tools/hris/company/retrieve-hris-company.d.ts.map +1 -1
- package/tools/hris/company/retrieve-hris-company.js +0 -1
- package/tools/hris/company/retrieve-hris-company.js.map +1 -1
- package/tools/hris/company/retrieve-hris-company.mjs +0 -1
- package/tools/hris/company/retrieve-hris-company.mjs.map +1 -1
- package/tools/hris/directory/list-hris-directory.d.mts +10 -2
- package/tools/hris/directory/list-hris-directory.d.mts.map +1 -1
- package/tools/hris/directory/list-hris-directory.d.ts +10 -2
- package/tools/hris/directory/list-hris-directory.d.ts.map +1 -1
- package/tools/hris/directory/list-hris-directory.js +1 -1
- package/tools/hris/directory/list-hris-directory.js.map +1 -1
- package/tools/hris/directory/list-hris-directory.mjs +1 -1
- package/tools/hris/directory/list-hris-directory.mjs.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.d.mts +10 -2
- package/tools/hris/directory/list-individuals-hris-directory.d.mts.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.d.ts +10 -2
- package/tools/hris/directory/list-individuals-hris-directory.d.ts.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.js +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.js.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.mjs +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.mjs.map +1 -1
- package/tools/hris/documents/list-hris-documents.d.mts +10 -2
- package/tools/hris/documents/list-hris-documents.d.mts.map +1 -1
- package/tools/hris/documents/list-hris-documents.d.ts +10 -2
- package/tools/hris/documents/list-hris-documents.d.ts.map +1 -1
- package/tools/hris/documents/list-hris-documents.js +1 -1
- package/tools/hris/documents/list-hris-documents.js.map +1 -1
- package/tools/hris/documents/list-hris-documents.mjs +1 -1
- package/tools/hris/documents/list-hris-documents.mjs.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.d.mts +10 -2
- package/tools/hris/documents/retreive-hris-documents.d.mts.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.d.ts +10 -2
- package/tools/hris/documents/retreive-hris-documents.d.ts.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.js +1 -1
- package/tools/hris/documents/retreive-hris-documents.js.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.mjs +1 -1
- package/tools/hris/documents/retreive-hris-documents.mjs.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.d.mts +10 -2
- package/tools/hris/employments/retrieve-many-hris-employments.d.mts.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.d.ts +10 -2
- package/tools/hris/employments/retrieve-many-hris-employments.d.ts.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.js +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.js.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.mjs +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.mjs.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts +10 -2
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts +10 -2
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.js +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.js.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.mjs +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.mjs.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts +10 -2
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts +10 -2
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs.map +1 -1
- package/tools/hris/payments/list-hris-payments.d.mts +10 -2
- package/tools/hris/payments/list-hris-payments.d.mts.map +1 -1
- package/tools/hris/payments/list-hris-payments.d.ts +10 -2
- package/tools/hris/payments/list-hris-payments.d.ts.map +1 -1
- package/tools/hris/payments/list-hris-payments.js +1 -1
- package/tools/hris/payments/list-hris-payments.js.map +1 -1
- package/tools/hris/payments/list-hris-payments.mjs +1 -1
- package/tools/hris/payments/list-hris-payments.mjs.map +1 -1
- package/tools/index.d.mts +1 -1
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +13 -7
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +11 -5
- package/tools/index.mjs.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.d.mts +10 -2
- package/tools/jobs/automated/create-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.d.ts +10 -2
- package/tools/jobs/automated/create-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.js +1 -1
- package/tools/jobs/automated/create-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.mjs +1 -1
- package/tools/jobs/automated/create-jobs-automated.mjs.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.d.mts +10 -2
- package/tools/jobs/automated/list-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.d.ts +10 -2
- package/tools/jobs/automated/list-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.js +1 -1
- package/tools/jobs/automated/list-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.mjs +1 -1
- package/tools/jobs/automated/list-jobs-automated.mjs.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.d.mts +10 -2
- package/tools/jobs/automated/retrieve-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.d.ts +10 -2
- package/tools/jobs/automated/retrieve-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.js +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.mjs +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.mjs.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.d.mts +10 -2
- package/tools/jobs/manual/retrieve-jobs-manual.d.mts.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.d.ts +10 -2
- package/tools/jobs/manual/retrieve-jobs-manual.d.ts.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.js +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.js.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.mjs +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.mjs.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts +10 -2
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts +10 -2
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.js +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.js.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts +10 -2
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts +10 -2
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs.map +1 -1
- package/tools/providers/list-providers.d.mts +10 -2
- package/tools/providers/list-providers.d.mts.map +1 -1
- package/tools/providers/list-providers.d.ts +10 -2
- package/tools/providers/list-providers.d.ts.map +1 -1
- package/tools/providers/list-providers.js +0 -1
- package/tools/providers/list-providers.js.map +1 -1
- package/tools/providers/list-providers.mjs +0 -1
- package/tools/providers/list-providers.mjs.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.d.mts +10 -2
- package/tools/request-forwarding/forward-request-forwarding.d.mts.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.d.ts +10 -2
- package/tools/request-forwarding/forward-request-forwarding.d.ts.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.js +1 -1
- package/tools/request-forwarding/forward-request-forwarding.js.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.mjs +1 -1
- package/tools/request-forwarding/forward-request-forwarding.mjs.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.d.mts +10 -2
- package/tools/sandbox/company/update-sandbox-company.d.mts.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.d.ts +10 -2
- package/tools/sandbox/company/update-sandbox-company.d.ts.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.js +41 -36
- package/tools/sandbox/company/update-sandbox-company.js.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.mjs +41 -36
- package/tools/sandbox/company/update-sandbox-company.mjs.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts +10 -2
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts +10 -2
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts +10 -2
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts +10 -2
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js +6 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs +6 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.d.mts +10 -2
- package/tools/sandbox/connections/create-sandbox-connections.d.mts.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.d.ts +10 -2
- package/tools/sandbox/connections/create-sandbox-connections.d.ts.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.js +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.js.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.mjs +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.mjs.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.d.mts +10 -2
- package/tools/sandbox/directory/create-sandbox-directory.d.mts.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.d.ts +10 -2
- package/tools/sandbox/directory/create-sandbox-directory.d.ts.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.js +79 -71
- package/tools/sandbox/directory/create-sandbox-directory.js.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.mjs +79 -71
- package/tools/sandbox/directory/create-sandbox-directory.mjs.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.d.mts +10 -2
- package/tools/sandbox/employment/update-sandbox-employment.d.mts.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.d.ts +10 -2
- package/tools/sandbox/employment/update-sandbox-employment.d.ts.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.js +60 -52
- package/tools/sandbox/employment/update-sandbox-employment.js.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.mjs +60 -52
- package/tools/sandbox/employment/update-sandbox-employment.mjs.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.d.mts +10 -2
- package/tools/sandbox/individual/update-sandbox-individual.d.mts.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.d.ts +10 -2
- package/tools/sandbox/individual/update-sandbox-individual.d.ts.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.js +16 -11
- package/tools/sandbox/individual/update-sandbox-individual.js.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.mjs +16 -11
- package/tools/sandbox/individual/update-sandbox-individual.mjs.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts +10 -2
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts +10 -2
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js +0 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs +0 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts +10 -2
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts +10 -2
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.d.mts +10 -2
- package/tools/sandbox/jobs/create-sandbox-jobs.d.mts.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.d.ts +10 -2
- package/tools/sandbox/jobs/create-sandbox-jobs.d.ts.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.js +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.js.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.mjs +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.mjs.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.d.mts +10 -2
- package/tools/sandbox/payment/create-sandbox-payment.d.mts.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.d.ts +10 -2
- package/tools/sandbox/payment/create-sandbox-payment.d.ts.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.js +48 -40
- package/tools/sandbox/payment/create-sandbox-payment.js.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.mjs +48 -40
- package/tools/sandbox/payment/create-sandbox-payment.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ export FINCH_ACCESS_TOKEN="My Access Token"
|
|
|
13
13
|
export FINCH_CLIENT_ID="4ab15e51-11ad-49f4-acae-f343b7794375"
|
|
14
14
|
export FINCH_CLIENT_SECRET="My Client Secret"
|
|
15
15
|
export FINCH_WEBHOOK_SECRET="My Webhook Secret"
|
|
16
|
-
npx -y @tryfinch/finch-api-mcp
|
|
16
|
+
npx -y @tryfinch/finch-api-mcp@latest
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
### Via MCP Client
|
|
@@ -28,7 +28,7 @@ For clients with a configuration JSON, it might look something like this:
|
|
|
28
28
|
"mcpServers": {
|
|
29
29
|
"tryfinch_finch_api_api": {
|
|
30
30
|
"command": "npx",
|
|
31
|
-
"args": ["-y", "@tryfinch/finch-api-mcp"],
|
|
31
|
+
"args": ["-y", "@tryfinch/finch-api-mcp", "--client=claude", "--tools=dynamic"],
|
|
32
32
|
"env": {
|
|
33
33
|
"FINCH_ACCESS_TOKEN": "My Access Token",
|
|
34
34
|
"FINCH_CLIENT_ID": "4ab15e51-11ad-49f4-acae-f343b7794375",
|
|
@@ -40,7 +40,14 @@ For clients with a configuration JSON, it might look something like this:
|
|
|
40
40
|
}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Exposing endpoints to your MCP Client
|
|
44
|
+
|
|
45
|
+
There are two ways to expose endpoints as tools in the MCP server:
|
|
46
|
+
|
|
47
|
+
1. Exposing one tool per endpoint, and filtering as necessary
|
|
48
|
+
2. Exposing a set of tools to dynamically discover and invoke endpoints from the API
|
|
49
|
+
|
|
50
|
+
### Filtering endpoints and tools
|
|
44
51
|
|
|
45
52
|
You can run the package on the command line to discover and filter the set of tools that are exposed by the
|
|
46
53
|
MCP Server. This can be helpful for large APIs where including all endpoints at once is too much for your AI's
|
|
@@ -52,12 +59,79 @@ You can filter by multiple aspects:
|
|
|
52
59
|
- `--resource` includes all tools under a specific resource, and can have wildcards, e.g. `my.resource*`
|
|
53
60
|
- `--operation` includes just read (get/list) or just write operations
|
|
54
61
|
|
|
62
|
+
### Dynamic tools
|
|
63
|
+
|
|
64
|
+
If you specify `--tools=dynamic` to the MCP server, instead of exposing one tool per endpoint in the API, it will
|
|
65
|
+
expose the following tools:
|
|
66
|
+
|
|
67
|
+
1. `list_api_endpoints` - Discovers available endpoints, with optional filtering by search query
|
|
68
|
+
2. `get_api_endpoint_schema` - Gets detailed schema information for a specific endpoint
|
|
69
|
+
3. `invoke_api_endpoint` - Executes any endpoint with the appropriate parameters
|
|
70
|
+
|
|
71
|
+
This allows you to have the full set of API endpoints available to your MCP Client, while not requiring that all
|
|
72
|
+
of their schemas be loaded into context at once. Instead, the LLM will automatically use these tools together to
|
|
73
|
+
search for, look up, and invoke endpoints dynamically. However, due to the indirect nature of the schemas, it
|
|
74
|
+
can struggle to provide the correct properties a bit more than when tools are imported explicitly. Therefore,
|
|
75
|
+
you can opt-in to explicit tools, the dynamic tools, or both.
|
|
76
|
+
|
|
55
77
|
See more information with `--help`.
|
|
56
78
|
|
|
57
79
|
All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. `--no-tool`).
|
|
58
80
|
|
|
59
81
|
Use `--list` to see the list of available tools, or see below.
|
|
60
82
|
|
|
83
|
+
### Specifying the MCP Client
|
|
84
|
+
|
|
85
|
+
Different clients have varying abilities to handle arbitrary tools and schemas.
|
|
86
|
+
|
|
87
|
+
You can specify the client you are using with the `--client` argument, and the MCP server will automatically
|
|
88
|
+
serve tools and schemas that are more compatible with that client.
|
|
89
|
+
|
|
90
|
+
- `--client=<type>`: Set all capabilities based on a known MCP client
|
|
91
|
+
|
|
92
|
+
- Valid values: `openai-agents`, `claude`, `claude-code`, `cursor`
|
|
93
|
+
- Example: `--client=cursor`
|
|
94
|
+
|
|
95
|
+
Additionally, if you have a client not on the above list, or the client has gotten better
|
|
96
|
+
over time, you can manually enable or disable certain capabilities:
|
|
97
|
+
|
|
98
|
+
- `--capability=<name>`: Specify individual client capabilities
|
|
99
|
+
- Available capabilities:
|
|
100
|
+
- `top-level-unions`: Enable support for top-level unions in tool schemas
|
|
101
|
+
- `valid-json`: Enable JSON string parsing for arguments
|
|
102
|
+
- `refs`: Enable support for $ref pointers in schemas
|
|
103
|
+
- `unions`: Enable support for union types (anyOf) in schemas
|
|
104
|
+
- `formats`: Enable support for format validations in schemas (e.g. date-time, email)
|
|
105
|
+
- `tool-name-length=N`: Set maximum tool name length to N characters
|
|
106
|
+
- Example: `--capability=top-level-unions --capability=tool-name-length=40`
|
|
107
|
+
- Example: `--capability=top-level-unions,tool-name-length=40`
|
|
108
|
+
|
|
109
|
+
### Examples
|
|
110
|
+
|
|
111
|
+
1. Filter for read operations on cards:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
--resource=cards --operation=read
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
2. Exclude specific tools while including others:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
--resource=cards --no-tool=create_cards
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
3. Configure for Cursor client with custom max tool name length:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
--client=cursor --capability=tool-name-length=40
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
4. Complex filtering with multiple criteria:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards
|
|
133
|
+
```
|
|
134
|
+
|
|
61
135
|
## Importing the tools and server individually
|
|
62
136
|
|
|
63
137
|
```js
|
package/compat.d.mts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { Endpoint } from "./tools.mjs";
|
|
3
|
+
export interface ClientCapabilities {
|
|
4
|
+
topLevelUnions: boolean;
|
|
5
|
+
validJson: boolean;
|
|
6
|
+
refs: boolean;
|
|
7
|
+
unions: boolean;
|
|
8
|
+
formats: boolean;
|
|
9
|
+
toolNameLength: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const defaultClientCapabilities: ClientCapabilities;
|
|
12
|
+
/**
|
|
13
|
+
* Attempts to parse strings into JSON objects
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseEmbeddedJSON(args: Record<string, unknown>, schema: Record<string, unknown>): Record<string, unknown>;
|
|
16
|
+
export type JSONSchema = {
|
|
17
|
+
type?: string;
|
|
18
|
+
properties?: Record<string, JSONSchema>;
|
|
19
|
+
required?: string[];
|
|
20
|
+
anyOf?: JSONSchema[];
|
|
21
|
+
$ref?: string;
|
|
22
|
+
$defs?: Record<string, JSONSchema>;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Truncates tool names to the specified length while ensuring uniqueness.
|
|
27
|
+
* If truncation would cause duplicate names, appends a number to make them unique.
|
|
28
|
+
*/
|
|
29
|
+
export declare function truncateToolNames(names: string[], maxLength: number): Map<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Removes top-level unions from a tool by splitting it into multiple tools,
|
|
32
|
+
* one for each variant in the union.
|
|
33
|
+
*/
|
|
34
|
+
export declare function removeTopLevelUnions(tool: Tool): Tool[];
|
|
35
|
+
/**
|
|
36
|
+
* Inlines all $refs in a schema, eliminating $defs.
|
|
37
|
+
* If a circular reference is detected, the circular property is removed.
|
|
38
|
+
*/
|
|
39
|
+
export declare function inlineRefs(schema: JSONSchema): JSONSchema;
|
|
40
|
+
/**
|
|
41
|
+
* Removes anyOf fields from a schema, using only the first variant.
|
|
42
|
+
*/
|
|
43
|
+
export declare function removeAnyOf(schema: JSONSchema): JSONSchema;
|
|
44
|
+
/**
|
|
45
|
+
* Removes format fields from a schema and appends them to the description.
|
|
46
|
+
*/
|
|
47
|
+
export declare function removeFormats(schema: JSONSchema, formatsCapability: boolean): JSONSchema;
|
|
48
|
+
/**
|
|
49
|
+
* Applies all compatibility transformations to the endpoints based on the provided capabilities.
|
|
50
|
+
*/
|
|
51
|
+
export declare function applyCompatibilityTransformations(endpoints: Endpoint[], capabilities: ClientCapabilities): Endpoint[];
|
|
52
|
+
//# sourceMappingURL=compat.d.mts.map
|
package/compat.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.d.mts","sourceRoot":"","sources":["src/compat.ts"],"names":[],"mappings":"OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE;AAEnB,MAAM,WAAW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EAAE,OAAO,GAAG,UAAU,CAkCxF;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,QAAQ,EAAE,EACrB,YAAY,EAAE,kBAAkB,GAC/B,QAAQ,EAAE,CAiEZ"}
|
package/compat.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { Endpoint } from "./tools.js";
|
|
3
|
+
export interface ClientCapabilities {
|
|
4
|
+
topLevelUnions: boolean;
|
|
5
|
+
validJson: boolean;
|
|
6
|
+
refs: boolean;
|
|
7
|
+
unions: boolean;
|
|
8
|
+
formats: boolean;
|
|
9
|
+
toolNameLength: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const defaultClientCapabilities: ClientCapabilities;
|
|
12
|
+
/**
|
|
13
|
+
* Attempts to parse strings into JSON objects
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseEmbeddedJSON(args: Record<string, unknown>, schema: Record<string, unknown>): Record<string, unknown>;
|
|
16
|
+
export type JSONSchema = {
|
|
17
|
+
type?: string;
|
|
18
|
+
properties?: Record<string, JSONSchema>;
|
|
19
|
+
required?: string[];
|
|
20
|
+
anyOf?: JSONSchema[];
|
|
21
|
+
$ref?: string;
|
|
22
|
+
$defs?: Record<string, JSONSchema>;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Truncates tool names to the specified length while ensuring uniqueness.
|
|
27
|
+
* If truncation would cause duplicate names, appends a number to make them unique.
|
|
28
|
+
*/
|
|
29
|
+
export declare function truncateToolNames(names: string[], maxLength: number): Map<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Removes top-level unions from a tool by splitting it into multiple tools,
|
|
32
|
+
* one for each variant in the union.
|
|
33
|
+
*/
|
|
34
|
+
export declare function removeTopLevelUnions(tool: Tool): Tool[];
|
|
35
|
+
/**
|
|
36
|
+
* Inlines all $refs in a schema, eliminating $defs.
|
|
37
|
+
* If a circular reference is detected, the circular property is removed.
|
|
38
|
+
*/
|
|
39
|
+
export declare function inlineRefs(schema: JSONSchema): JSONSchema;
|
|
40
|
+
/**
|
|
41
|
+
* Removes anyOf fields from a schema, using only the first variant.
|
|
42
|
+
*/
|
|
43
|
+
export declare function removeAnyOf(schema: JSONSchema): JSONSchema;
|
|
44
|
+
/**
|
|
45
|
+
* Removes format fields from a schema and appends them to the description.
|
|
46
|
+
*/
|
|
47
|
+
export declare function removeFormats(schema: JSONSchema, formatsCapability: boolean): JSONSchema;
|
|
48
|
+
/**
|
|
49
|
+
* Applies all compatibility transformations to the endpoints based on the provided capabilities.
|
|
50
|
+
*/
|
|
51
|
+
export declare function applyCompatibilityTransformations(endpoints: Endpoint[], capabilities: ClientCapabilities): Endpoint[];
|
|
52
|
+
//# sourceMappingURL=compat.d.ts.map
|
package/compat.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["src/compat.ts"],"names":[],"mappings":"OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE;AAEnB,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,yBAAyB,EAAE,kBAOvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,2BAqB/F;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAwCzF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAyCvD;AA+BD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAazD;AAoED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CA0C1D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,GAAG,UAAU,CAkCxF;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,QAAQ,EAAE,EACrB,YAAY,EAAE,kBAAkB,GAC/B,QAAQ,EAAE,CAiEZ"}
|
package/compat.js
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultClientCapabilities = void 0;
|
|
4
|
+
exports.parseEmbeddedJSON = parseEmbeddedJSON;
|
|
5
|
+
exports.truncateToolNames = truncateToolNames;
|
|
6
|
+
exports.removeTopLevelUnions = removeTopLevelUnions;
|
|
7
|
+
exports.inlineRefs = inlineRefs;
|
|
8
|
+
exports.removeAnyOf = removeAnyOf;
|
|
9
|
+
exports.removeFormats = removeFormats;
|
|
10
|
+
exports.applyCompatibilityTransformations = applyCompatibilityTransformations;
|
|
11
|
+
exports.defaultClientCapabilities = {
|
|
12
|
+
topLevelUnions: true,
|
|
13
|
+
validJson: true,
|
|
14
|
+
refs: true,
|
|
15
|
+
unions: true,
|
|
16
|
+
formats: true,
|
|
17
|
+
toolNameLength: undefined,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Attempts to parse strings into JSON objects
|
|
21
|
+
*/
|
|
22
|
+
function parseEmbeddedJSON(args, schema) {
|
|
23
|
+
let updated = false;
|
|
24
|
+
const newArgs = Object.assign({}, args);
|
|
25
|
+
for (const [key, value] of Object.entries(newArgs)) {
|
|
26
|
+
if (typeof value === 'string') {
|
|
27
|
+
try {
|
|
28
|
+
const parsed = JSON.parse(value);
|
|
29
|
+
newArgs[key] = parsed;
|
|
30
|
+
updated = true;
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
// Not valid JSON, leave as is
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (updated) {
|
|
38
|
+
return newArgs;
|
|
39
|
+
}
|
|
40
|
+
return args;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Truncates tool names to the specified length while ensuring uniqueness.
|
|
44
|
+
* If truncation would cause duplicate names, appends a number to make them unique.
|
|
45
|
+
*/
|
|
46
|
+
function truncateToolNames(names, maxLength) {
|
|
47
|
+
if (maxLength <= 0) {
|
|
48
|
+
return new Map();
|
|
49
|
+
}
|
|
50
|
+
const renameMap = new Map();
|
|
51
|
+
const usedNames = new Set();
|
|
52
|
+
const toTruncate = names.filter((name) => name.length > maxLength);
|
|
53
|
+
if (toTruncate.length === 0) {
|
|
54
|
+
return renameMap;
|
|
55
|
+
}
|
|
56
|
+
const willCollide = new Set(toTruncate.map((name) => name.slice(0, maxLength - 1))).size < toTruncate.length;
|
|
57
|
+
if (!willCollide) {
|
|
58
|
+
for (const name of toTruncate) {
|
|
59
|
+
const truncatedName = name.slice(0, maxLength);
|
|
60
|
+
renameMap.set(name, truncatedName);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
const baseLength = maxLength - 1;
|
|
65
|
+
for (const name of toTruncate) {
|
|
66
|
+
const baseName = name.slice(0, baseLength);
|
|
67
|
+
let counter = 1;
|
|
68
|
+
while (usedNames.has(baseName + counter)) {
|
|
69
|
+
counter++;
|
|
70
|
+
}
|
|
71
|
+
const finalName = baseName + counter;
|
|
72
|
+
renameMap.set(name, finalName);
|
|
73
|
+
usedNames.add(finalName);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return renameMap;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Removes top-level unions from a tool by splitting it into multiple tools,
|
|
80
|
+
* one for each variant in the union.
|
|
81
|
+
*/
|
|
82
|
+
function removeTopLevelUnions(tool) {
|
|
83
|
+
const inputSchema = tool.inputSchema;
|
|
84
|
+
const variants = inputSchema.anyOf;
|
|
85
|
+
if (!variants || !Array.isArray(variants) || variants.length === 0) {
|
|
86
|
+
return [tool];
|
|
87
|
+
}
|
|
88
|
+
const defs = inputSchema.$defs || {};
|
|
89
|
+
return variants.map((variant, index) => {
|
|
90
|
+
const variantSchema = {
|
|
91
|
+
...inputSchema,
|
|
92
|
+
...variant,
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
...(inputSchema.properties || {}),
|
|
96
|
+
...(variant.properties || {}),
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
delete variantSchema.anyOf;
|
|
100
|
+
if (!variantSchema['description']) {
|
|
101
|
+
variantSchema['description'] = tool.description;
|
|
102
|
+
}
|
|
103
|
+
const usedDefs = findUsedDefs(variant, defs);
|
|
104
|
+
if (Object.keys(usedDefs).length > 0) {
|
|
105
|
+
variantSchema.$defs = usedDefs;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
delete variantSchema.$defs;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
...tool,
|
|
112
|
+
name: `${tool.name}_${toSnakeCase(variant['title'] || `variant${index + 1}`)}`,
|
|
113
|
+
description: variant['description'] || tool.description,
|
|
114
|
+
inputSchema: variantSchema,
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function findUsedDefs(schema, defs) {
|
|
119
|
+
const usedDefs = {};
|
|
120
|
+
if (typeof schema !== 'object' || schema === null) {
|
|
121
|
+
return usedDefs;
|
|
122
|
+
}
|
|
123
|
+
if (schema.$ref) {
|
|
124
|
+
const refParts = schema.$ref.split('/');
|
|
125
|
+
if (refParts[0] === '#' && refParts[1] === '$defs' && refParts[2]) {
|
|
126
|
+
const defName = refParts[2];
|
|
127
|
+
const def = defs[defName];
|
|
128
|
+
if (def) {
|
|
129
|
+
usedDefs[defName] = def;
|
|
130
|
+
Object.assign(usedDefs, findUsedDefs(def, defs));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return usedDefs;
|
|
134
|
+
}
|
|
135
|
+
for (const key in schema) {
|
|
136
|
+
if (key !== '$defs' && typeof schema[key] === 'object' && schema[key] !== null) {
|
|
137
|
+
Object.assign(usedDefs, findUsedDefs(schema[key], defs));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return usedDefs;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Inlines all $refs in a schema, eliminating $defs.
|
|
144
|
+
* If a circular reference is detected, the circular property is removed.
|
|
145
|
+
*/
|
|
146
|
+
function inlineRefs(schema) {
|
|
147
|
+
if (!schema || typeof schema !== 'object') {
|
|
148
|
+
return schema;
|
|
149
|
+
}
|
|
150
|
+
const clonedSchema = { ...schema };
|
|
151
|
+
const defs = schema.$defs || {};
|
|
152
|
+
delete clonedSchema.$defs;
|
|
153
|
+
const result = inlineRefsRecursive(clonedSchema, defs, new Set());
|
|
154
|
+
// The top level can never be null
|
|
155
|
+
return result === null ? {} : result;
|
|
156
|
+
}
|
|
157
|
+
function inlineRefsRecursive(schema, defs, refPath) {
|
|
158
|
+
if (!schema || typeof schema !== 'object') {
|
|
159
|
+
return schema;
|
|
160
|
+
}
|
|
161
|
+
if (Array.isArray(schema)) {
|
|
162
|
+
return schema.map((item) => {
|
|
163
|
+
const processed = inlineRefsRecursive(item, defs, refPath);
|
|
164
|
+
return processed === null ? {} : processed;
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
const result = { ...schema };
|
|
168
|
+
if ('$ref' in result && typeof result.$ref === 'string') {
|
|
169
|
+
if (result.$ref.startsWith('#/$defs/')) {
|
|
170
|
+
const refName = result.$ref.split('/').pop();
|
|
171
|
+
const def = defs[refName];
|
|
172
|
+
// If we've already seen this ref in our path, we have a circular reference
|
|
173
|
+
if (refPath.has(result.$ref)) {
|
|
174
|
+
// For circular references, we completely remove the property
|
|
175
|
+
// by returning null. The parent will remove it.
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
if (def) {
|
|
179
|
+
const newRefPath = new Set(refPath);
|
|
180
|
+
newRefPath.add(result.$ref);
|
|
181
|
+
const inlinedDef = inlineRefsRecursive({ ...def }, defs, newRefPath);
|
|
182
|
+
if (inlinedDef === null) {
|
|
183
|
+
return { ...result };
|
|
184
|
+
}
|
|
185
|
+
// Merge the inlined definition with the original schema's properties
|
|
186
|
+
// but preserve things like description, etc.
|
|
187
|
+
const { $ref, ...rest } = result;
|
|
188
|
+
return { ...inlinedDef, ...rest };
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
// Keep external refs as-is
|
|
192
|
+
return result;
|
|
193
|
+
}
|
|
194
|
+
for (const key in result) {
|
|
195
|
+
if (result[key] && typeof result[key] === 'object') {
|
|
196
|
+
const processed = inlineRefsRecursive(result[key], defs, refPath);
|
|
197
|
+
if (processed === null) {
|
|
198
|
+
// Remove properties that would cause circular references
|
|
199
|
+
delete result[key];
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
result[key] = processed;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return result;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Removes anyOf fields from a schema, using only the first variant.
|
|
210
|
+
*/
|
|
211
|
+
function removeAnyOf(schema) {
|
|
212
|
+
if (!schema || typeof schema !== 'object') {
|
|
213
|
+
return schema;
|
|
214
|
+
}
|
|
215
|
+
if (Array.isArray(schema)) {
|
|
216
|
+
return schema.map((item) => removeAnyOf(item));
|
|
217
|
+
}
|
|
218
|
+
const result = { ...schema };
|
|
219
|
+
if ('anyOf' in result && Array.isArray(result.anyOf) && result.anyOf.length > 0) {
|
|
220
|
+
const firstVariant = result.anyOf[0];
|
|
221
|
+
if (firstVariant && typeof firstVariant === 'object') {
|
|
222
|
+
// Special handling for properties to ensure deep merge
|
|
223
|
+
if (firstVariant.properties && result.properties) {
|
|
224
|
+
result.properties = {
|
|
225
|
+
...result.properties,
|
|
226
|
+
...firstVariant.properties,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
else if (firstVariant.properties) {
|
|
230
|
+
result.properties = { ...firstVariant.properties };
|
|
231
|
+
}
|
|
232
|
+
for (const key in firstVariant) {
|
|
233
|
+
if (key !== 'properties') {
|
|
234
|
+
result[key] = firstVariant[key];
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
delete result.anyOf;
|
|
239
|
+
}
|
|
240
|
+
for (const key in result) {
|
|
241
|
+
if (result[key] && typeof result[key] === 'object') {
|
|
242
|
+
result[key] = removeAnyOf(result[key]);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return result;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Removes format fields from a schema and appends them to the description.
|
|
249
|
+
*/
|
|
250
|
+
function removeFormats(schema, formatsCapability) {
|
|
251
|
+
if (formatsCapability) {
|
|
252
|
+
return schema;
|
|
253
|
+
}
|
|
254
|
+
if (!schema || typeof schema !== 'object') {
|
|
255
|
+
return schema;
|
|
256
|
+
}
|
|
257
|
+
if (Array.isArray(schema)) {
|
|
258
|
+
return schema.map((item) => removeFormats(item, formatsCapability));
|
|
259
|
+
}
|
|
260
|
+
const result = { ...schema };
|
|
261
|
+
if ('format' in result && typeof result['format'] === 'string') {
|
|
262
|
+
const formatStr = `(format: "${result['format']}")`;
|
|
263
|
+
if ('description' in result && typeof result['description'] === 'string') {
|
|
264
|
+
result['description'] = `${result['description']} ${formatStr}`;
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
result['description'] = formatStr;
|
|
268
|
+
}
|
|
269
|
+
delete result['format'];
|
|
270
|
+
}
|
|
271
|
+
for (const key in result) {
|
|
272
|
+
if (result[key] && typeof result[key] === 'object') {
|
|
273
|
+
result[key] = removeFormats(result[key], formatsCapability);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return result;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Applies all compatibility transformations to the endpoints based on the provided capabilities.
|
|
280
|
+
*/
|
|
281
|
+
function applyCompatibilityTransformations(endpoints, capabilities) {
|
|
282
|
+
let transformedEndpoints = [...endpoints];
|
|
283
|
+
// Handle top-level unions first as this changes tool names
|
|
284
|
+
if (!capabilities.topLevelUnions) {
|
|
285
|
+
const newEndpoints = [];
|
|
286
|
+
for (const endpoint of transformedEndpoints) {
|
|
287
|
+
const variantTools = removeTopLevelUnions(endpoint.tool);
|
|
288
|
+
if (variantTools.length === 1) {
|
|
289
|
+
newEndpoints.push(endpoint);
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
for (const variantTool of variantTools) {
|
|
293
|
+
newEndpoints.push({
|
|
294
|
+
...endpoint,
|
|
295
|
+
tool: variantTool,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
transformedEndpoints = newEndpoints;
|
|
301
|
+
}
|
|
302
|
+
if (capabilities.toolNameLength) {
|
|
303
|
+
const toolNames = transformedEndpoints.map((endpoint) => endpoint.tool.name);
|
|
304
|
+
const renameMap = truncateToolNames(toolNames, capabilities.toolNameLength);
|
|
305
|
+
transformedEndpoints = transformedEndpoints.map((endpoint) => ({
|
|
306
|
+
...endpoint,
|
|
307
|
+
tool: {
|
|
308
|
+
...endpoint.tool,
|
|
309
|
+
name: renameMap.get(endpoint.tool.name) ?? endpoint.tool.name,
|
|
310
|
+
},
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
if (!capabilities.refs || !capabilities.unions || !capabilities.formats) {
|
|
314
|
+
transformedEndpoints = transformedEndpoints.map((endpoint) => {
|
|
315
|
+
let schema = endpoint.tool.inputSchema;
|
|
316
|
+
if (!capabilities.refs) {
|
|
317
|
+
schema = inlineRefs(schema);
|
|
318
|
+
}
|
|
319
|
+
if (!capabilities.unions) {
|
|
320
|
+
schema = removeAnyOf(schema);
|
|
321
|
+
}
|
|
322
|
+
if (!capabilities.formats) {
|
|
323
|
+
schema = removeFormats(schema, capabilities.formats);
|
|
324
|
+
}
|
|
325
|
+
return {
|
|
326
|
+
...endpoint,
|
|
327
|
+
tool: {
|
|
328
|
+
...endpoint.tool,
|
|
329
|
+
inputSchema: schema,
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
return transformedEndpoints;
|
|
335
|
+
}
|
|
336
|
+
function toSnakeCase(str) {
|
|
337
|
+
return str
|
|
338
|
+
.replace(/\s+/g, '_')
|
|
339
|
+
.replace(/([a-z])([A-Z])/g, '$1_$2')
|
|
340
|
+
.toLowerCase();
|
|
341
|
+
}
|
|
342
|
+
//# sourceMappingURL=compat.js.map
|
package/compat.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["src/compat.ts"],"names":[],"mappings":";;;AAwBA,8CAqBC;AAgBD,8CAwCC;AAMD,oDAyCC;AAmCD,gCAaC;AA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