@codeqr/ts-mcp 0.8.0 → 0.19.3
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/LICENSE +1 -1
- package/README.md +16 -218
- package/auth.d.mts +6 -0
- package/auth.d.mts.map +1 -0
- package/auth.d.ts +6 -0
- package/auth.d.ts.map +1 -0
- package/auth.js +37 -0
- package/auth.js.map +1 -0
- package/{headers.mjs → auth.mjs} +16 -2
- package/auth.mjs.map +1 -0
- package/code-tool-paths.cjs +4 -2
- package/code-tool-paths.cjs.map +1 -1
- package/code-tool-paths.d.cts +1 -1
- package/code-tool-paths.d.cts.map +1 -1
- package/code-tool-types.d.mts +7 -9
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts +7 -9
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +95 -32
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +95 -32
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts +12 -3
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +12 -3
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +275 -109
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +275 -109
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +22 -9
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +22 -9
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +31 -5
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +31 -5
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts +6 -3
- package/http.d.mts.map +1 -1
- package/http.d.ts +6 -3
- package/http.d.ts.map +1 -1
- package/http.js +108 -49
- package/http.js.map +1 -1
- package/http.mjs +108 -49
- package/http.mjs.map +1 -1
- package/index.js +19 -50
- package/index.js.map +1 -1
- package/index.mjs +19 -50
- package/index.mjs.map +1 -1
- package/instructions.d.mts +2 -0
- package/instructions.d.mts.map +1 -0
- package/instructions.d.ts +2 -0
- package/instructions.d.ts.map +1 -0
- package/instructions.js +42 -0
- package/instructions.js.map +1 -0
- package/instructions.mjs +39 -0
- package/instructions.mjs.map +1 -0
- package/logger.d.mts +7 -0
- package/logger.d.mts.map +1 -0
- package/logger.d.ts +7 -0
- package/logger.d.ts.map +1 -0
- package/logger.js +29 -0
- package/logger.js.map +1 -0
- package/logger.mjs +22 -0
- package/logger.mjs.map +1 -0
- package/methods.d.mts +10 -0
- package/methods.d.mts.map +1 -0
- package/methods.d.ts +10 -0
- package/methods.d.ts.map +1 -0
- package/methods.js +215 -0
- package/methods.js.map +1 -0
- package/methods.mjs +211 -0
- package/methods.mjs.map +1 -0
- package/options.d.mts +9 -9
- package/options.d.mts.map +1 -1
- package/options.d.ts +9 -9
- package/options.d.ts.map +1 -1
- package/options.js +54 -359
- package/options.js.map +1 -1
- package/options.mjs +54 -359
- package/options.mjs.map +1 -1
- package/package.json +67 -60
- package/server.d.mts +11 -16
- package/server.d.mts.map +1 -1
- package/server.d.ts +11 -16
- package/server.d.ts.map +1 -1
- package/server.js +86 -101
- package/server.js.map +1 -1
- package/server.mjs +85 -96
- package/server.mjs.map +1 -1
- package/src/{headers.ts → auth.ts} +18 -1
- package/src/code-tool-paths.cts +3 -1
- package/src/code-tool-types.ts +8 -9
- package/src/code-tool-worker.ts +110 -47
- package/src/code-tool.ts +362 -134
- package/src/docs-search-tool.ts +54 -6
- package/src/http.ts +128 -54
- package/src/index.ts +22 -63
- package/src/instructions.ts +60 -0
- package/src/logger.ts +28 -0
- package/src/methods.ts +236 -0
- package/src/options.ts +72 -384
- package/src/server.ts +99 -116
- package/src/stdio.ts +6 -5
- package/src/{tools/types.ts → types.ts} +14 -5
- package/src/util.ts +25 -0
- package/stdio.d.mts +1 -1
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.js +5 -4
- package/stdio.js.map +1 -1
- package/stdio.mjs +5 -4
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +10 -2
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +10 -2
- package/types.d.ts.map +1 -0
- package/types.js.map +1 -0
- package/types.mjs.map +1 -0
- package/util.d.mts +4 -0
- package/util.d.mts.map +1 -0
- package/util.d.ts +4 -0
- package/util.d.ts.map +1 -0
- package/util.js +30 -0
- package/util.js.map +1 -0
- package/util.mjs +24 -0
- package/util.mjs.map +1 -0
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -3
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -3
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -24
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -16
- package/filtering.mjs.map +0 -1
- package/headers.d.mts +0 -4
- package/headers.d.mts.map +0 -1
- package/headers.d.ts +0 -4
- package/headers.d.ts.map +0 -1
- package/headers.js +0 -22
- package/headers.js.map +0 -1
- package/headers.mjs.map +0 -1
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -153
- package/src/filtering.ts +0 -18
- package/src/tools/analytics/retrieve-analytics.ts +0 -441
- package/src/tools/domains/create-domains.ts +0 -75
- package/src/tools/domains/delete-domains.ts +0 -55
- package/src/tools/domains/list-domains.ts +0 -68
- package/src/tools/domains/update-domains.ts +0 -79
- package/src/tools/events/list-events.ts +0 -421
- package/src/tools/index.ts +0 -133
- package/src/tools/links/bulk/create-links-bulk.ts +0 -966
- package/src/tools/links/bulk/delete-links-bulk.ts +0 -59
- package/src/tools/links/count-links.ts +0 -957
- package/src/tools/links/create-links.ts +0 -957
- package/src/tools/links/delete-links.ts +0 -56
- package/src/tools/links/list-links.ts +0 -980
- package/src/tools/links/retrieve-info-links.ts +0 -75
- package/src/tools/links/update-links.ts +0 -964
- package/src/tools/links/upsert-links.ts +0 -958
- package/src/tools/projects/list-projects.ts +0 -51
- package/src/tools/projects/retrieve-projects.ts +0 -56
- package/src/tools/qrcodes/bulk/create-qrcodes-bulk.ts +0 -1077
- package/src/tools/qrcodes/bulk/delete-qrcodes-bulk.ts +0 -59
- package/src/tools/qrcodes/count-qrcodes.ts +0 -220
- package/src/tools/qrcodes/create-qrcodes.ts +0 -1067
- package/src/tools/qrcodes/delete-qrcodes.ts +0 -56
- package/src/tools/qrcodes/list-qrcodes.ts +0 -221
- package/src/tools/qrcodes/retrieve-qrcodes.ts +0 -67
- package/src/tools/qrcodes/update-qrcodes.ts +0 -1074
- package/src/tools/qrcodes/upsert-qrcodes.ts +0 -1068
- package/src/tools/tags/create-tags.ts +0 -59
- package/src/tools/tags/delete-tags.ts +0 -55
- package/src/tools/tags/list-tags.ts +0 -87
- package/src/tools/tags/update-tags.ts +0 -63
- package/src/tools/track/track-lead-track.ts +0 -93
- package/src/tools/track/track-sale-track.ts +0 -108
- package/src/tools.ts +0 -1
- package/tools/analytics/retrieve-analytics.d.mts +0 -45
- package/tools/analytics/retrieve-analytics.d.mts.map +0 -1
- package/tools/analytics/retrieve-analytics.d.ts +0 -45
- package/tools/analytics/retrieve-analytics.d.ts.map +0 -1
- package/tools/analytics/retrieve-analytics.js +0 -438
- package/tools/analytics/retrieve-analytics.js.map +0 -1
- package/tools/analytics/retrieve-analytics.mjs +0 -431
- package/tools/analytics/retrieve-analytics.mjs.map +0 -1
- package/tools/domains/create-domains.d.mts +0 -45
- package/tools/domains/create-domains.d.mts.map +0 -1
- package/tools/domains/create-domains.d.ts +0 -45
- package/tools/domains/create-domains.d.ts.map +0 -1
- package/tools/domains/create-domains.js +0 -74
- package/tools/domains/create-domains.js.map +0 -1
- package/tools/domains/create-domains.mjs +0 -67
- package/tools/domains/create-domains.mjs.map +0 -1
- package/tools/domains/delete-domains.d.mts +0 -45
- package/tools/domains/delete-domains.d.mts.map +0 -1
- package/tools/domains/delete-domains.d.ts +0 -45
- package/tools/domains/delete-domains.d.ts.map +0 -1
- package/tools/domains/delete-domains.js +0 -55
- package/tools/domains/delete-domains.js.map +0 -1
- package/tools/domains/delete-domains.mjs +0 -48
- package/tools/domains/delete-domains.mjs.map +0 -1
- package/tools/domains/list-domains.d.mts +0 -45
- package/tools/domains/list-domains.d.mts.map +0 -1
- package/tools/domains/list-domains.d.ts +0 -45
- package/tools/domains/list-domains.d.ts.map +0 -1
- package/tools/domains/list-domains.js +0 -67
- package/tools/domains/list-domains.js.map +0 -1
- package/tools/domains/list-domains.mjs +0 -60
- package/tools/domains/list-domains.mjs.map +0 -1
- package/tools/domains/update-domains.d.mts +0 -45
- package/tools/domains/update-domains.d.mts.map +0 -1
- package/tools/domains/update-domains.d.ts +0 -45
- package/tools/domains/update-domains.d.ts.map +0 -1
- package/tools/domains/update-domains.js +0 -78
- package/tools/domains/update-domains.js.map +0 -1
- package/tools/domains/update-domains.mjs +0 -71
- package/tools/domains/update-domains.mjs.map +0 -1
- package/tools/events/list-events.d.mts +0 -45
- package/tools/events/list-events.d.mts.map +0 -1
- package/tools/events/list-events.d.ts +0 -45
- package/tools/events/list-events.d.ts.map +0 -1
- package/tools/events/list-events.js +0 -418
- package/tools/events/list-events.js.map +0 -1
- package/tools/events/list-events.mjs +0 -411
- package/tools/events/list-events.mjs.map +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -117
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -110
- package/tools/index.mjs.map +0 -1
- package/tools/links/bulk/create-links-bulk.d.mts +0 -45
- package/tools/links/bulk/create-links-bulk.d.mts.map +0 -1
- package/tools/links/bulk/create-links-bulk.d.ts +0 -45
- package/tools/links/bulk/create-links-bulk.d.ts.map +0 -1
- package/tools/links/bulk/create-links-bulk.js +0 -956
- package/tools/links/bulk/create-links-bulk.js.map +0 -1
- package/tools/links/bulk/create-links-bulk.mjs +0 -949
- package/tools/links/bulk/create-links-bulk.mjs.map +0 -1
- package/tools/links/bulk/delete-links-bulk.d.mts +0 -45
- package/tools/links/bulk/delete-links-bulk.d.mts.map +0 -1
- package/tools/links/bulk/delete-links-bulk.d.ts +0 -45
- package/tools/links/bulk/delete-links-bulk.d.ts.map +0 -1
- package/tools/links/bulk/delete-links-bulk.js +0 -58
- package/tools/links/bulk/delete-links-bulk.js.map +0 -1
- package/tools/links/bulk/delete-links-bulk.mjs +0 -51
- package/tools/links/bulk/delete-links-bulk.mjs.map +0 -1
- package/tools/links/count-links.d.mts +0 -45
- package/tools/links/count-links.d.mts.map +0 -1
- package/tools/links/count-links.d.ts +0 -45
- package/tools/links/count-links.d.ts.map +0 -1
- package/tools/links/count-links.js +0 -951
- package/tools/links/count-links.js.map +0 -1
- package/tools/links/count-links.mjs +0 -944
- package/tools/links/count-links.mjs.map +0 -1
- package/tools/links/create-links.d.mts +0 -45
- package/tools/links/create-links.d.mts.map +0 -1
- package/tools/links/create-links.d.ts +0 -45
- package/tools/links/create-links.d.ts.map +0 -1
- package/tools/links/create-links.js +0 -947
- package/tools/links/create-links.js.map +0 -1
- package/tools/links/create-links.mjs +0 -940
- package/tools/links/create-links.mjs.map +0 -1
- package/tools/links/delete-links.d.mts +0 -45
- package/tools/links/delete-links.d.mts.map +0 -1
- package/tools/links/delete-links.d.ts +0 -45
- package/tools/links/delete-links.d.ts.map +0 -1
- package/tools/links/delete-links.js +0 -55
- package/tools/links/delete-links.js.map +0 -1
- package/tools/links/delete-links.mjs +0 -48
- package/tools/links/delete-links.mjs.map +0 -1
- package/tools/links/list-links.d.mts +0 -45
- package/tools/links/list-links.d.mts.map +0 -1
- package/tools/links/list-links.d.ts +0 -45
- package/tools/links/list-links.d.ts.map +0 -1
- package/tools/links/list-links.js +0 -973
- package/tools/links/list-links.js.map +0 -1
- package/tools/links/list-links.mjs +0 -966
- package/tools/links/list-links.mjs.map +0 -1
- package/tools/links/retrieve-info-links.d.mts +0 -45
- package/tools/links/retrieve-info-links.d.mts.map +0 -1
- package/tools/links/retrieve-info-links.d.ts +0 -45
- package/tools/links/retrieve-info-links.d.ts.map +0 -1
- package/tools/links/retrieve-info-links.js +0 -71
- package/tools/links/retrieve-info-links.js.map +0 -1
- package/tools/links/retrieve-info-links.mjs +0 -64
- package/tools/links/retrieve-info-links.mjs.map +0 -1
- package/tools/links/update-links.d.mts +0 -45
- package/tools/links/update-links.d.mts.map +0 -1
- package/tools/links/update-links.d.ts +0 -45
- package/tools/links/update-links.d.ts.map +0 -1
- package/tools/links/update-links.js +0 -953
- package/tools/links/update-links.js.map +0 -1
- package/tools/links/update-links.mjs +0 -946
- package/tools/links/update-links.mjs.map +0 -1
- package/tools/links/upsert-links.d.mts +0 -45
- package/tools/links/upsert-links.d.mts.map +0 -1
- package/tools/links/upsert-links.d.ts +0 -45
- package/tools/links/upsert-links.d.ts.map +0 -1
- package/tools/links/upsert-links.js +0 -947
- package/tools/links/upsert-links.js.map +0 -1
- package/tools/links/upsert-links.mjs +0 -940
- package/tools/links/upsert-links.mjs.map +0 -1
- package/tools/projects/list-projects.d.mts +0 -45
- package/tools/projects/list-projects.d.mts.map +0 -1
- package/tools/projects/list-projects.d.ts +0 -45
- package/tools/projects/list-projects.d.ts.map +0 -1
- package/tools/projects/list-projects.js +0 -51
- package/tools/projects/list-projects.js.map +0 -1
- package/tools/projects/list-projects.mjs +0 -44
- package/tools/projects/list-projects.mjs.map +0 -1
- package/tools/projects/retrieve-projects.d.mts +0 -45
- package/tools/projects/retrieve-projects.d.mts.map +0 -1
- package/tools/projects/retrieve-projects.d.ts +0 -45
- package/tools/projects/retrieve-projects.d.ts.map +0 -1
- package/tools/projects/retrieve-projects.js +0 -55
- package/tools/projects/retrieve-projects.js.map +0 -1
- package/tools/projects/retrieve-projects.mjs +0 -48
- package/tools/projects/retrieve-projects.mjs.map +0 -1
- package/tools/qrcodes/bulk/create-qrcodes-bulk.d.mts +0 -45
- package/tools/qrcodes/bulk/create-qrcodes-bulk.d.mts.map +0 -1
- package/tools/qrcodes/bulk/create-qrcodes-bulk.d.ts +0 -45
- package/tools/qrcodes/bulk/create-qrcodes-bulk.d.ts.map +0 -1
- package/tools/qrcodes/bulk/create-qrcodes-bulk.js +0 -1068
- package/tools/qrcodes/bulk/create-qrcodes-bulk.js.map +0 -1
- package/tools/qrcodes/bulk/create-qrcodes-bulk.mjs +0 -1061
- package/tools/qrcodes/bulk/create-qrcodes-bulk.mjs.map +0 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.mts +0 -45
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.mts.map +0 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.ts +0 -45
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.ts.map +0 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.js +0 -58
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.js.map +0 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.mjs +0 -51
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.mjs.map +0 -1
- package/tools/qrcodes/count-qrcodes.d.mts +0 -45
- package/tools/qrcodes/count-qrcodes.d.mts.map +0 -1
- package/tools/qrcodes/count-qrcodes.d.ts +0 -45
- package/tools/qrcodes/count-qrcodes.d.ts.map +0 -1
- package/tools/qrcodes/count-qrcodes.js +0 -215
- package/tools/qrcodes/count-qrcodes.js.map +0 -1
- package/tools/qrcodes/count-qrcodes.mjs +0 -208
- package/tools/qrcodes/count-qrcodes.mjs.map +0 -1
- package/tools/qrcodes/create-qrcodes.d.mts +0 -45
- package/tools/qrcodes/create-qrcodes.d.mts.map +0 -1
- package/tools/qrcodes/create-qrcodes.d.ts +0 -45
- package/tools/qrcodes/create-qrcodes.d.ts.map +0 -1
- package/tools/qrcodes/create-qrcodes.js +0 -1059
- package/tools/qrcodes/create-qrcodes.js.map +0 -1
- package/tools/qrcodes/create-qrcodes.mjs +0 -1052
- package/tools/qrcodes/create-qrcodes.mjs.map +0 -1
- package/tools/qrcodes/delete-qrcodes.d.mts +0 -45
- package/tools/qrcodes/delete-qrcodes.d.mts.map +0 -1
- package/tools/qrcodes/delete-qrcodes.d.ts +0 -45
- package/tools/qrcodes/delete-qrcodes.d.ts.map +0 -1
- package/tools/qrcodes/delete-qrcodes.js +0 -55
- package/tools/qrcodes/delete-qrcodes.js.map +0 -1
- package/tools/qrcodes/delete-qrcodes.mjs +0 -48
- package/tools/qrcodes/delete-qrcodes.mjs.map +0 -1
- package/tools/qrcodes/list-qrcodes.d.mts +0 -45
- package/tools/qrcodes/list-qrcodes.d.mts.map +0 -1
- package/tools/qrcodes/list-qrcodes.d.ts +0 -45
- package/tools/qrcodes/list-qrcodes.d.ts.map +0 -1
- package/tools/qrcodes/list-qrcodes.js +0 -217
- package/tools/qrcodes/list-qrcodes.js.map +0 -1
- package/tools/qrcodes/list-qrcodes.mjs +0 -210
- package/tools/qrcodes/list-qrcodes.mjs.map +0 -1
- package/tools/qrcodes/retrieve-qrcodes.d.mts +0 -45
- package/tools/qrcodes/retrieve-qrcodes.d.mts.map +0 -1
- package/tools/qrcodes/retrieve-qrcodes.d.ts +0 -45
- package/tools/qrcodes/retrieve-qrcodes.d.ts.map +0 -1
- package/tools/qrcodes/retrieve-qrcodes.js +0 -65
- package/tools/qrcodes/retrieve-qrcodes.js.map +0 -1
- package/tools/qrcodes/retrieve-qrcodes.mjs +0 -58
- package/tools/qrcodes/retrieve-qrcodes.mjs.map +0 -1
- package/tools/qrcodes/update-qrcodes.d.mts +0 -45
- package/tools/qrcodes/update-qrcodes.d.mts.map +0 -1
- package/tools/qrcodes/update-qrcodes.d.ts +0 -45
- package/tools/qrcodes/update-qrcodes.d.ts.map +0 -1
- package/tools/qrcodes/update-qrcodes.js +0 -1065
- package/tools/qrcodes/update-qrcodes.js.map +0 -1
- package/tools/qrcodes/update-qrcodes.mjs +0 -1058
- package/tools/qrcodes/update-qrcodes.mjs.map +0 -1
- package/tools/qrcodes/upsert-qrcodes.d.mts +0 -45
- package/tools/qrcodes/upsert-qrcodes.d.mts.map +0 -1
- package/tools/qrcodes/upsert-qrcodes.d.ts +0 -45
- package/tools/qrcodes/upsert-qrcodes.d.ts.map +0 -1
- package/tools/qrcodes/upsert-qrcodes.js +0 -1059
- package/tools/qrcodes/upsert-qrcodes.js.map +0 -1
- package/tools/qrcodes/upsert-qrcodes.mjs +0 -1052
- package/tools/qrcodes/upsert-qrcodes.mjs.map +0 -1
- package/tools/tags/create-tags.d.mts +0 -45
- package/tools/tags/create-tags.d.mts.map +0 -1
- package/tools/tags/create-tags.d.ts +0 -45
- package/tools/tags/create-tags.d.ts.map +0 -1
- package/tools/tags/create-tags.js +0 -58
- package/tools/tags/create-tags.js.map +0 -1
- package/tools/tags/create-tags.mjs +0 -51
- package/tools/tags/create-tags.mjs.map +0 -1
- package/tools/tags/delete-tags.d.mts +0 -45
- package/tools/tags/delete-tags.d.mts.map +0 -1
- package/tools/tags/delete-tags.d.ts +0 -45
- package/tools/tags/delete-tags.d.ts.map +0 -1
- package/tools/tags/delete-tags.js +0 -55
- package/tools/tags/delete-tags.js.map +0 -1
- package/tools/tags/delete-tags.mjs +0 -48
- package/tools/tags/delete-tags.mjs.map +0 -1
- package/tools/tags/list-tags.d.mts +0 -45
- package/tools/tags/list-tags.d.mts.map +0 -1
- package/tools/tags/list-tags.d.ts +0 -45
- package/tools/tags/list-tags.d.ts.map +0 -1
- package/tools/tags/list-tags.js +0 -87
- package/tools/tags/list-tags.js.map +0 -1
- package/tools/tags/list-tags.mjs +0 -80
- package/tools/tags/list-tags.mjs.map +0 -1
- package/tools/tags/update-tags.d.mts +0 -45
- package/tools/tags/update-tags.d.mts.map +0 -1
- package/tools/tags/update-tags.d.ts +0 -45
- package/tools/tags/update-tags.d.ts.map +0 -1
- package/tools/tags/update-tags.js +0 -63
- package/tools/tags/update-tags.js.map +0 -1
- package/tools/tags/update-tags.mjs +0 -56
- package/tools/tags/update-tags.mjs.map +0 -1
- package/tools/track/track-lead-track.d.mts +0 -45
- package/tools/track/track-lead-track.d.mts.map +0 -1
- package/tools/track/track-lead-track.d.ts +0 -45
- package/tools/track/track-lead-track.d.ts.map +0 -1
- package/tools/track/track-lead-track.js +0 -87
- package/tools/track/track-lead-track.js.map +0 -1
- package/tools/track/track-lead-track.mjs +0 -80
- package/tools/track/track-lead-track.mjs.map +0 -1
- package/tools/track/track-sale-track.d.mts +0 -45
- package/tools/track/track-sale-track.d.mts.map +0 -1
- package/tools/track/track-sale-track.d.ts +0 -45
- package/tools/track/track-sale-track.d.ts.map +0 -1
- package/tools/track/track-sale-track.js +0 -99
- package/tools/track/track-sale-track.js.map +0 -1
- package/tools/track/track-sale-track.mjs +0 -92
- package/tools/track/track-sale-track.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
- /package/{tools/types.js → types.js} +0 -0
- /package/{tools/types.mjs → types.mjs} +0 -0
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2026 Codeqr
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ For clients with a configuration JSON, it might look something like this:
|
|
|
25
25
|
"mcpServers": {
|
|
26
26
|
"codeqr_ts_api": {
|
|
27
27
|
"command": "npx",
|
|
28
|
-
"args": ["-y", "@codeqr/ts-mcp"
|
|
28
|
+
"args": ["-y", "@codeqr/ts-mcp"],
|
|
29
29
|
"env": {
|
|
30
30
|
"CODEQR_API_KEY": "My API Key"
|
|
31
31
|
}
|
|
@@ -39,14 +39,14 @@ For clients with a configuration JSON, it might look something like this:
|
|
|
39
39
|
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
|
|
40
40
|
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
|
|
41
41
|
|
|
42
|
-
[](https://cursor.com/en-US/install-mcp?name
|
|
42
|
+
[](https://cursor.com/en-US/install-mcp?name=%40codeqr%2Fts-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjb2RlcXIvdHMtbWNwIl0sImVudiI6eyJDT0RFUVJfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)
|
|
43
43
|
|
|
44
44
|
### VS Code
|
|
45
45
|
|
|
46
46
|
If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
|
|
47
47
|
in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration.
|
|
48
48
|
|
|
49
|
-
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40codeqr%2Fts-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40codeqr%2Fts-mcp%22%5D%2C%22env%22%3A%7B%22CODEQR_API_KEY%22%3A%
|
|
49
|
+
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40codeqr%2Fts-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40codeqr%2Fts-mcp%22%5D%2C%22env%22%3A%7B%22CODEQR_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
50
50
|
|
|
51
51
|
### Claude Code
|
|
52
52
|
|
|
@@ -54,113 +54,25 @@ If you use Claude Code, you can install the MCP server by running the command be
|
|
|
54
54
|
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
|
|
55
55
|
|
|
56
56
|
```
|
|
57
|
-
claude mcp add
|
|
57
|
+
claude mcp add codeqr_ts_mcp_api --env CODEQR_API_KEY="My API Key" -- npx -y @codeqr/ts-mcp
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
##
|
|
60
|
+
## Code Mode
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
This MCP server is built on the "Code Mode" tool scheme. In this MCP Server,
|
|
63
|
+
your agent will write code against the TypeScript SDK, which will then be executed in an
|
|
64
|
+
isolated sandbox. To accomplish this, the server will expose two tools to your agent:
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
3. Exposing a docs search tool and a code execution tool, allowing the client to write code to be executed against the TypeScript client
|
|
66
|
+
- The first tool is a docs search tool, which can be used to generically query for
|
|
67
|
+
documentation about your API/SDK.
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
- The second tool is a code tool, where the agent can write code against the TypeScript SDK.
|
|
70
|
+
The code will be executed in a sandbox environment without web or filesystem access. Then,
|
|
71
|
+
anything the code returns or prints will be returned to the agent as the result of the
|
|
72
|
+
tool call.
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
context window.
|
|
73
|
-
|
|
74
|
-
You can filter by multiple aspects:
|
|
75
|
-
|
|
76
|
-
- `--tool` includes a specific tool by name
|
|
77
|
-
- `--resource` includes all tools under a specific resource, and can have wildcards, e.g. `my.resource*`
|
|
78
|
-
- `--operation` includes just read (get/list) or just write operations
|
|
79
|
-
|
|
80
|
-
### Dynamic tools
|
|
81
|
-
|
|
82
|
-
If you specify `--tools=dynamic` to the MCP server, instead of exposing one tool per endpoint in the API, it will
|
|
83
|
-
expose the following tools:
|
|
84
|
-
|
|
85
|
-
1. `list_api_endpoints` - Discovers available endpoints, with optional filtering by search query
|
|
86
|
-
2. `get_api_endpoint_schema` - Gets detailed schema information for a specific endpoint
|
|
87
|
-
3. `invoke_api_endpoint` - Executes any endpoint with the appropriate parameters
|
|
88
|
-
|
|
89
|
-
This allows you to have the full set of API endpoints available to your MCP Client, while not requiring that all
|
|
90
|
-
of their schemas be loaded into context at once. Instead, the LLM will automatically use these tools together to
|
|
91
|
-
search for, look up, and invoke endpoints dynamically. However, due to the indirect nature of the schemas, it
|
|
92
|
-
can struggle to provide the correct properties a bit more than when tools are imported explicitly. Therefore,
|
|
93
|
-
you can opt-in to explicit tools, the dynamic tools, or both.
|
|
94
|
-
|
|
95
|
-
See more information with `--help`.
|
|
96
|
-
|
|
97
|
-
All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. `--no-tool`).
|
|
98
|
-
|
|
99
|
-
Use `--list` to see the list of available tools, or see below.
|
|
100
|
-
|
|
101
|
-
### Code execution
|
|
102
|
-
|
|
103
|
-
If you specify `--tools=code` to the MCP server, it will expose just two tools:
|
|
104
|
-
|
|
105
|
-
- `search_docs` - Searches the API documentation and returns a list of markdown results
|
|
106
|
-
- `execute` - Runs code against the TypeScript client
|
|
107
|
-
|
|
108
|
-
This allows the LLM to implement more complex logic by chaining together many API calls without loading
|
|
109
|
-
intermediary results into its context window.
|
|
110
|
-
|
|
111
|
-
The code execution itself happens in a Deno sandbox that has network access only to the base URL for the API.
|
|
112
|
-
|
|
113
|
-
### Specifying the MCP Client
|
|
114
|
-
|
|
115
|
-
Different clients have varying abilities to handle arbitrary tools and schemas.
|
|
116
|
-
|
|
117
|
-
You can specify the client you are using with the `--client` argument, and the MCP server will automatically
|
|
118
|
-
serve tools and schemas that are more compatible with that client.
|
|
119
|
-
|
|
120
|
-
- `--client=<type>`: Set all capabilities based on a known MCP client
|
|
121
|
-
|
|
122
|
-
- Valid values: `openai-agents`, `claude`, `claude-code`, `cursor`
|
|
123
|
-
- Example: `--client=cursor`
|
|
124
|
-
|
|
125
|
-
Additionally, if you have a client not on the above list, or the client has gotten better
|
|
126
|
-
over time, you can manually enable or disable certain capabilities:
|
|
127
|
-
|
|
128
|
-
- `--capability=<name>`: Specify individual client capabilities
|
|
129
|
-
- Available capabilities:
|
|
130
|
-
- `top-level-unions`: Enable support for top-level unions in tool schemas
|
|
131
|
-
- `valid-json`: Enable JSON string parsing for arguments
|
|
132
|
-
- `refs`: Enable support for $ref pointers in schemas
|
|
133
|
-
- `unions`: Enable support for union types (anyOf) in schemas
|
|
134
|
-
- `formats`: Enable support for format validations in schemas (e.g. date-time, email)
|
|
135
|
-
- `tool-name-length=N`: Set maximum tool name length to N characters
|
|
136
|
-
- Example: `--capability=top-level-unions --capability=tool-name-length=40`
|
|
137
|
-
- Example: `--capability=top-level-unions,tool-name-length=40`
|
|
138
|
-
|
|
139
|
-
### Examples
|
|
140
|
-
|
|
141
|
-
1. Filter for read operations on cards:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
--resource=cards --operation=read
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
2. Exclude specific tools while including others:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
--resource=cards --no-tool=create_cards
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
3. Configure for Cursor client with custom max tool name length:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
--client=cursor --capability=tool-name-length=40
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
4. Complex filtering with multiple criteria:
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards
|
|
163
|
-
```
|
|
74
|
+
Using this scheme, agents are capable of performing very complex tasks deterministically
|
|
75
|
+
and repeatably.
|
|
164
76
|
|
|
165
77
|
## Running remotely
|
|
166
78
|
|
|
@@ -187,117 +99,3 @@ A configuration JSON for this server might look like this, assuming the server i
|
|
|
187
99
|
}
|
|
188
100
|
}
|
|
189
101
|
```
|
|
190
|
-
|
|
191
|
-
The command-line arguments for filtering tools and specifying clients can also be used as query parameters in the URL.
|
|
192
|
-
For example, to exclude specific tools while including others, use the URL:
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
http://localhost:3000?resource=cards&resource=accounts&no_tool=create_cards
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Or, to configure for the Cursor client, with a custom max tool name length, use the URL:
|
|
199
|
-
|
|
200
|
-
```
|
|
201
|
-
http://localhost:3000?client=cursor&capability=tool-name-length%3D40
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
## Importing the tools and server individually
|
|
205
|
-
|
|
206
|
-
```js
|
|
207
|
-
// Import the server, generated endpoints, or the init function
|
|
208
|
-
import { server, endpoints, init } from "@codeqr/ts-mcp/server";
|
|
209
|
-
|
|
210
|
-
// import a specific tool
|
|
211
|
-
import createLinks from "@codeqr/ts-mcp/tools/links/create-links";
|
|
212
|
-
|
|
213
|
-
// initialize the server and all endpoints
|
|
214
|
-
init({ server, endpoints });
|
|
215
|
-
|
|
216
|
-
// manually start server
|
|
217
|
-
const transport = new StdioServerTransport();
|
|
218
|
-
await server.connect(transport);
|
|
219
|
-
|
|
220
|
-
// or initialize your own server with specific tools
|
|
221
|
-
const myServer = new McpServer(...);
|
|
222
|
-
|
|
223
|
-
// define your own endpoint
|
|
224
|
-
const myCustomEndpoint = {
|
|
225
|
-
tool: {
|
|
226
|
-
name: 'my_custom_tool',
|
|
227
|
-
description: 'My custom tool',
|
|
228
|
-
inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
|
|
229
|
-
},
|
|
230
|
-
handler: async (client: client, args: any) => {
|
|
231
|
-
return { myResponse: 'Hello world!' };
|
|
232
|
-
})
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
// initialize the server with your custom endpoints
|
|
236
|
-
init({ server: myServer, endpoints: [createLinks, myCustomEndpoint] });
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
## Available Tools
|
|
240
|
-
|
|
241
|
-
The following tools are available in this MCP server.
|
|
242
|
-
|
|
243
|
-
### Resource `links`:
|
|
244
|
-
|
|
245
|
-
- `create_links` (`write`): Create a new link for the authenticated workspace.
|
|
246
|
-
- `update_links` (`write`): Update a link for the authenticated workspace. If there's no change, returns it as it is.
|
|
247
|
-
- `list_links` (`read`): Retrieve a paginated list of links for the authenticated workspace.
|
|
248
|
-
- `delete_links` (`write`): Delete a link for the authenticated workspace.
|
|
249
|
-
- `count_links` (`read`): Retrieve the number of links for the authenticated workspace.
|
|
250
|
-
- `retrieve_info_links` (`read`): Retrieve the info for a link.
|
|
251
|
-
- `upsert_links` (`write`): Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created.
|
|
252
|
-
|
|
253
|
-
### Resource `links.bulk`:
|
|
254
|
-
|
|
255
|
-
- `create_links_bulk` (`write`): Bulk create up to 100 links for the authenticated workspace.
|
|
256
|
-
- `delete_links_bulk` (`write`): Bulk delete up to 100 links for the authenticated workspace.
|
|
257
|
-
|
|
258
|
-
### Resource `qrcodes`:
|
|
259
|
-
|
|
260
|
-
- `create_qrcodes` (`write`): Create a new QR Code for the authenticated workspace.
|
|
261
|
-
- `retrieve_qrcodes` (`read`): Retrieve the info for a QR Code.
|
|
262
|
-
- `update_qrcodes` (`write`): Update a QR Code for the authenticated workspace. If there's no change, returns it as it is.
|
|
263
|
-
- `list_qrcodes` (`read`): Retrieve a paginated list of QR Codes for the authenticated workspace.
|
|
264
|
-
- `delete_qrcodes` (`write`): Delete a QR Code for the authenticated workspace.
|
|
265
|
-
- `count_qrcodes` (`read`): Retrieve the number of QR Codes for the authenticated workspace.
|
|
266
|
-
- `upsert_qrcodes` (`write`): Upsert a QR Code for the authenticated workspace by its URL. If a QR Code with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new QR Code will be created.
|
|
267
|
-
|
|
268
|
-
### Resource `qrcodes.bulk`:
|
|
269
|
-
|
|
270
|
-
- `create_qrcodes_bulk` (`write`): Bulk create up to 100 QR Codes for the authenticated workspace.
|
|
271
|
-
- `delete_qrcodes_bulk` (`write`): Bulk delete up to 100 QR Codes for the authenticated workspace.
|
|
272
|
-
|
|
273
|
-
### Resource `analytics`:
|
|
274
|
-
|
|
275
|
-
- `retrieve_analytics` (`read`): Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.
|
|
276
|
-
|
|
277
|
-
### Resource `events`:
|
|
278
|
-
|
|
279
|
-
- `list_events` (`read`): Retrieve a paginated list of events for the authenticated workspace.
|
|
280
|
-
|
|
281
|
-
### Resource `tags`:
|
|
282
|
-
|
|
283
|
-
- `create_tags` (`write`): Create a new tag for the authenticated project.
|
|
284
|
-
- `update_tags` (`write`): Update a tag in the workspace.
|
|
285
|
-
- `list_tags` (`read`): Retrieve a list of tags for the authenticated workspace.
|
|
286
|
-
- `delete_tags` (`write`): Delete a tag from the workspace. All existing links will still work, but they will no longer be associated with this tag.
|
|
287
|
-
|
|
288
|
-
### Resource `domains`:
|
|
289
|
-
|
|
290
|
-
- `create_domains` (`write`): Create a domain for the authenticated workspace.
|
|
291
|
-
- `update_domains` (`write`): Update a domain for the authenticated workspace.
|
|
292
|
-
- `list_domains` (`read`): Retrieve a list of domains associated with the authenticated workspace.
|
|
293
|
-
- `delete_domains` (`write`): Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
|
|
294
|
-
|
|
295
|
-
### Resource `track`:
|
|
296
|
-
|
|
297
|
-
- `track_lead_track` (`write`): Track a lead for a short link.
|
|
298
|
-
- `track_sale_track` (`write`): Track a sale for a short link.
|
|
299
|
-
|
|
300
|
-
### Resource `projects`:
|
|
301
|
-
|
|
302
|
-
- `retrieve_projects` (`read`): Retrieve a project for the authenticated user.
|
|
303
|
-
- `list_projects` (`read`): Retrieve a list of projects for the authenticated user.
|
package/auth.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IncomingMessage } from 'node:http';
|
|
2
|
+
import { ClientOptions } from '@codeqr/ts';
|
|
3
|
+
import { McpOptions } from "./options.mjs";
|
|
4
|
+
export declare const parseClientAuthHeaders: (req: IncomingMessage, required?: boolean) => Partial<ClientOptions>;
|
|
5
|
+
export declare const getStainlessApiKey: (req: IncomingMessage, mcpOptions: McpOptions) => string | undefined;
|
|
6
|
+
//# sourceMappingURL=auth.d.mts.map
|
package/auth.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["src/auth.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE,MAAM,WAAW;OACpC,EAAE,aAAa,EAAE,MAAM,YAAY;OACnC,EAAE,UAAU,EAAE;AAErB,eAAO,MAAM,sBAAsB,GAAI,KAAK,eAAe,EAAE,WAAW,OAAO,KAAG,OAAO,CAAC,aAAa,CAqBtG,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,eAAe,EAAE,YAAY,UAAU,KAAG,MAAM,GAAG,SAY1F,CAAC"}
|
package/auth.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IncomingMessage } from 'node:http';
|
|
2
|
+
import { ClientOptions } from '@codeqr/ts';
|
|
3
|
+
import { McpOptions } from "./options.js";
|
|
4
|
+
export declare const parseClientAuthHeaders: (req: IncomingMessage, required?: boolean) => Partial<ClientOptions>;
|
|
5
|
+
export declare const getStainlessApiKey: (req: IncomingMessage, mcpOptions: McpOptions) => string | undefined;
|
|
6
|
+
//# sourceMappingURL=auth.d.ts.map
|
package/auth.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["src/auth.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE,MAAM,WAAW;OACpC,EAAE,aAAa,EAAE,MAAM,YAAY;OACnC,EAAE,UAAU,EAAE;AAErB,eAAO,MAAM,sBAAsB,GAAI,KAAK,eAAe,EAAE,WAAW,OAAO,KAAG,OAAO,CAAC,aAAa,CAqBtG,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,eAAe,EAAE,YAAY,UAAU,KAAG,MAAM,GAAG,SAY1F,CAAC"}
|
package/auth.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getStainlessApiKey = exports.parseClientAuthHeaders = void 0;
|
|
5
|
+
const parseClientAuthHeaders = (req, required) => {
|
|
6
|
+
if (req.headers.authorization) {
|
|
7
|
+
const scheme = req.headers.authorization.split(' ')[0];
|
|
8
|
+
const value = req.headers.authorization.slice(scheme.length + 1);
|
|
9
|
+
switch (scheme) {
|
|
10
|
+
case 'Bearer':
|
|
11
|
+
return { apiKey: req.headers.authorization.slice('Bearer '.length) };
|
|
12
|
+
default:
|
|
13
|
+
throw new Error('Unsupported authorization scheme. Expected the "Authorization" header to be a supported scheme (Bearer).');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else if (required) {
|
|
17
|
+
throw new Error('Missing required Authorization header; see WWW-Authenticate header for details.');
|
|
18
|
+
}
|
|
19
|
+
const apiKey = Array.isArray(req.headers['x-codeqr-api-key']) ?
|
|
20
|
+
req.headers['x-codeqr-api-key'][0]
|
|
21
|
+
: req.headers['x-codeqr-api-key'];
|
|
22
|
+
return { apiKey };
|
|
23
|
+
};
|
|
24
|
+
exports.parseClientAuthHeaders = parseClientAuthHeaders;
|
|
25
|
+
const getStainlessApiKey = (req, mcpOptions) => {
|
|
26
|
+
// Try to get the key from the x-stainless-api-key header
|
|
27
|
+
const headerKey = Array.isArray(req.headers['x-stainless-api-key']) ?
|
|
28
|
+
req.headers['x-stainless-api-key'][0]
|
|
29
|
+
: req.headers['x-stainless-api-key'];
|
|
30
|
+
if (headerKey && typeof headerKey === 'string') {
|
|
31
|
+
return headerKey;
|
|
32
|
+
}
|
|
33
|
+
// Fall back to value set in the mcpOptions (e.g. from environment variable), if provided
|
|
34
|
+
return mcpOptions.stainlessApiKey;
|
|
35
|
+
};
|
|
36
|
+
exports.getStainlessApiKey = getStainlessApiKey;
|
|
37
|
+
//# sourceMappingURL=auth.js.map
|
package/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["src/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAM/E,MAAM,sBAAsB,GAAG,CAAC,GAAoB,EAAE,QAAkB,EAA0B,EAAE;IACzG,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;QACxD,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjE,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,QAAQ;gBACX,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;YACvE;gBACE,MAAM,IAAI,KAAK,CACb,0GAA0G,CAC3G,CAAC;QACN,CAAC;IACH,CAAC;SAAM,IAAI,QAAQ,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,iFAAiF,CAAC,CAAC;IACrG,CAAC;IAED,MAAM,MAAM,GACV,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QAC9C,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC;AArBW,QAAA,sBAAsB,0BAqBjC;AAEK,MAAM,kBAAkB,GAAG,CAAC,GAAoB,EAAE,UAAsB,EAAsB,EAAE;IACrG,yDAAyD;IACzD,MAAM,SAAS,GACb,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACjD,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACvC,IAAI,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,yFAAyF;IACzF,OAAO,UAAU,CAAC,eAAe,CAAC;AACpC,CAAC,CAAC;AAZW,QAAA,kBAAkB,sBAY7B"}
|
package/{headers.mjs → auth.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export const
|
|
2
|
+
export const parseClientAuthHeaders = (req, required) => {
|
|
3
3
|
if (req.headers.authorization) {
|
|
4
4
|
const scheme = req.headers.authorization.split(' ')[0];
|
|
5
5
|
const value = req.headers.authorization.slice(scheme.length + 1);
|
|
@@ -10,9 +10,23 @@ export const parseAuthHeaders = (req) => {
|
|
|
10
10
|
throw new Error('Unsupported authorization scheme. Expected the "Authorization" header to be a supported scheme (Bearer).');
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
else if (required) {
|
|
14
|
+
throw new Error('Missing required Authorization header; see WWW-Authenticate header for details.');
|
|
15
|
+
}
|
|
13
16
|
const apiKey = Array.isArray(req.headers['x-codeqr-api-key']) ?
|
|
14
17
|
req.headers['x-codeqr-api-key'][0]
|
|
15
18
|
: req.headers['x-codeqr-api-key'];
|
|
16
19
|
return { apiKey };
|
|
17
20
|
};
|
|
18
|
-
|
|
21
|
+
export const getStainlessApiKey = (req, mcpOptions) => {
|
|
22
|
+
// Try to get the key from the x-stainless-api-key header
|
|
23
|
+
const headerKey = Array.isArray(req.headers['x-stainless-api-key']) ?
|
|
24
|
+
req.headers['x-stainless-api-key'][0]
|
|
25
|
+
: req.headers['x-stainless-api-key'];
|
|
26
|
+
if (headerKey && typeof headerKey === 'string') {
|
|
27
|
+
return headerKey;
|
|
28
|
+
}
|
|
29
|
+
// Fall back to value set in the mcpOptions (e.g. from environment variable), if provided
|
|
30
|
+
return mcpOptions.stainlessApiKey;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=auth.mjs.map
|
package/auth.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["src/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAMtF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAoB,EAAE,QAAkB,EAA0B,EAAE;IACzG,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;QACxD,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjE,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,QAAQ;gBACX,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;YACvE;gBACE,MAAM,IAAI,KAAK,CACb,0GAA0G,CAC3G,CAAC;QACN,CAAC;IACH,CAAC;SAAM,IAAI,QAAQ,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,iFAAiF,CAAC,CAAC;IACrG,CAAC;IAED,MAAM,MAAM,GACV,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QAC9C,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAoB,EAAE,UAAsB,EAAsB,EAAE;IACrG,yDAAyD;IACzD,MAAM,SAAS,GACb,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACjD,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACvC,IAAI,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,yFAAyF;IACzF,OAAO,UAAU,CAAC,eAAe,CAAC;AACpC,CAAC,CAAC"}
|
package/code-tool-paths.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
|
|
4
|
+
exports.getWorkerPath = getWorkerPath;
|
|
5
|
+
function getWorkerPath() {
|
|
6
|
+
return require.resolve('./code-tool-worker.mjs');
|
|
7
|
+
}
|
|
6
8
|
//# sourceMappingURL=code-tool-paths.cjs.map
|
package/code-tool-paths.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool-paths.cjs","sourceRoot":"","sources":["src/code-tool-paths.cts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"code-tool-paths.cjs","sourceRoot":"","sources":["src/code-tool-paths.cts"],"names":[],"mappings":";AAAA,sFAAsF;;AAEtF,sCAEC;AAFD,SAAgB,aAAa;IAC3B,OAAO,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACnD,CAAC"}
|
package/code-tool-paths.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getWorkerPath(): string;
|
|
2
2
|
//# sourceMappingURL=code-tool-paths.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool-paths.d.cts","sourceRoot":"","sources":["src/code-tool-paths.cts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"code-tool-paths.d.cts","sourceRoot":"","sources":["src/code-tool-paths.cts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
|
package/code-tool-types.d.mts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { ClientOptions } from '@codeqr/ts';
|
|
2
2
|
export type WorkerInput = {
|
|
3
|
-
|
|
3
|
+
project_name: string;
|
|
4
4
|
code: string;
|
|
5
|
+
client_opts: ClientOptions;
|
|
6
|
+
intent?: string | undefined;
|
|
5
7
|
};
|
|
6
|
-
export type
|
|
8
|
+
export type WorkerOutput = {
|
|
9
|
+
is_error: boolean;
|
|
7
10
|
result: unknown | null;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export type WorkerError = {
|
|
12
|
-
message: string | undefined;
|
|
13
|
-
logLines: string[];
|
|
14
|
-
errLines: string[];
|
|
11
|
+
log_lines: string[];
|
|
12
|
+
err_lines: string[];
|
|
15
13
|
};
|
|
16
14
|
//# sourceMappingURL=code-tool-types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool-types.d.mts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,YAAY;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,
|
|
1
|
+
{"version":3,"file":"code-tool-types.d.mts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,YAAY;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC"}
|
package/code-tool-types.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { ClientOptions } from '@codeqr/ts';
|
|
2
2
|
export type WorkerInput = {
|
|
3
|
-
|
|
3
|
+
project_name: string;
|
|
4
4
|
code: string;
|
|
5
|
+
client_opts: ClientOptions;
|
|
6
|
+
intent?: string | undefined;
|
|
5
7
|
};
|
|
6
|
-
export type
|
|
8
|
+
export type WorkerOutput = {
|
|
9
|
+
is_error: boolean;
|
|
7
10
|
result: unknown | null;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export type WorkerError = {
|
|
12
|
-
message: string | undefined;
|
|
13
|
-
logLines: string[];
|
|
14
|
-
errLines: string[];
|
|
11
|
+
log_lines: string[];
|
|
12
|
+
err_lines: string[];
|
|
15
13
|
};
|
|
16
14
|
//# sourceMappingURL=code-tool-types.d.ts.map
|
package/code-tool-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool-types.d.ts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,YAAY;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,
|
|
1
|
+
{"version":3,"file":"code-tool-types.d.ts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,YAAY;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool-worker.d.mts","sourceRoot":"","sources":["src/code-tool-worker.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"code-tool-worker.d.mts","sourceRoot":"","sources":["src/code-tool-worker.ts"],"names":[],"mappings":";iBAgO0B,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC;;AAsErD,wBAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool-worker.d.ts","sourceRoot":"","sources":["src/code-tool-worker.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"code-tool-worker.d.ts","sourceRoot":"","sources":["src/code-tool-worker.ts"],"names":[],"mappings":";iBAgO0B,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC;;AAsErD,wBAAyB"}
|