@postmcp/presets 0.1.24 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -111,6 +111,9 @@ var DEVELOPER_TOOLS_PRESETS = [
111
111
  authType: "Bearer (GITHUB_TOKEN)",
112
112
  authEnvVar: "GITHUB_TOKEN",
113
113
  defaultBaseUrl: "https://api.github.com",
114
+ defaultHeaders: {
115
+ "User-Agent": "PostMCP-GitHub-Preset"
116
+ },
114
117
  specUrl: "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json",
115
118
  tags: ["git", "code", "issues", "pr", "actions", "ci/cd", "releases"],
116
119
  fieldMasks: [
@@ -207,51 +210,6 @@ var DEVELOPER_TOOLS_PRESETS = [
207
210
  ]
208
211
  })
209
212
  },
210
- {
211
- id: "linear",
212
- name: "Linear API",
213
- description: "Fast project tracking, issues, milestones, teams, and cycles.",
214
- category: "Developer Tools",
215
- authType: "Bearer (LINEAR_API_KEY)",
216
- authEnvVar: "LINEAR_API_KEY",
217
- defaultBaseUrl: "https://api.linear.app",
218
- tags: ["issues", "roadmap", "cycles", "product"],
219
- fieldMasks: [
220
- { path: "/issues", fields: ["data.id", "data.title", "data.state.name", "data.priority", "data.assignee.name"] }
221
- ],
222
- macros: [
223
- {
224
- name: "createTeamIssue",
225
- description: "Creates a new issue in a team and assigns priority",
226
- parameters: {
227
- type: "object",
228
- properties: {
229
- teamId: { type: "string" },
230
- title: { type: "string" },
231
- description: { type: "string" },
232
- priority: { type: "integer" }
233
- },
234
- required: ["teamId", "title"]
235
- },
236
- steps: [
237
- { id: "createIssue", action: "POST /issues", body: { teamId: "{{teamId}}", title: "{{title}}", description: "{{description}}", priority: "{{priority}}" } }
238
- ]
239
- }
240
- ],
241
- bundledSpec: buildOpenAPISpec({
242
- title: "Linear API",
243
- baseUrl: "https://api.linear.app",
244
- description: "Linear Issue Tracking REST API",
245
- securityScheme: { name: "bearerAuth", type: "http", scheme: "bearer" },
246
- endpoints: [
247
- { path: "/viewer", method: "get", operationId: "getViewer", summary: "Get current user profile" },
248
- { path: "/teams", method: "get", operationId: "listTeams", summary: "List all teams" },
249
- { path: "/issues", method: "get", operationId: "listIssues", summary: "List recent issues", parameters: [{ name: "teamId", in: "query", schema: { type: "string" } }] },
250
- { path: "/issues", method: "post", operationId: "createIssue", summary: "Create issue", requestBody: { properties: { teamId: { type: "string" }, title: { type: "string" }, description: { type: "string" } } } },
251
- { path: "/projects", method: "get", operationId: "listProjects", summary: "List roadmap projects" }
252
- ]
253
- })
254
- },
255
213
  {
256
214
  id: "sentry",
257
215
  name: "Sentry API",
@@ -685,7 +643,7 @@ var PAYMENTS_COMMERCE_PRESETS = [
685
643
  category: "Payments & Commerce",
686
644
  authType: "Bearer (STRIPE_SECRET_KEY)",
687
645
  authEnvVar: "STRIPE_SECRET_KEY",
688
- defaultBaseUrl: "https://api.stripe.com/v1",
646
+ defaultBaseUrl: "https://api.stripe.com",
689
647
  specUrl: "https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json",
690
648
  tags: ["payments", "billing", "invoices", "cards", "subscriptions", "refunds"],
691
649
  fieldMasks: [
@@ -713,7 +671,7 @@ var PAYMENTS_COMMERCE_PRESETS = [
713
671
  ],
714
672
  bundledSpec: buildOpenAPISpec({
715
673
  title: "Stripe API",
716
- baseUrl: "https://api.stripe.com/v1",
674
+ baseUrl: "https://api.stripe.com",
717
675
  description: "Stripe Payments and Subscriptions API",
718
676
  securityScheme: { name: "bearerAuth", type: "http", scheme: "bearer" },
719
677
  endpoints: [
@@ -1043,6 +1001,9 @@ var COMMUNICATION_AI_PRESETS = [
1043
1001
  authType: "Header (x-api-key)",
1044
1002
  authEnvVar: "ANTHROPIC_API_KEY",
1045
1003
  defaultBaseUrl: "https://api.anthropic.com/v1",
1004
+ defaultHeaders: {
1005
+ "anthropic-version": "2023-06-01"
1006
+ },
1046
1007
  tags: ["llm", "ai", "claude", "reasoning", "coding"],
1047
1008
  bundledSpec: buildOpenAPISpec({
1048
1009
  title: "Anthropic Claude API",
@@ -1617,7 +1578,7 @@ __reExport(index_exports, types_exports);
1617
1578
  // src/auth.ts
1618
1579
  function buildPresetAuthConfig(preset, env = process.env) {
1619
1580
  const authConfig = {
1620
- headers: {},
1581
+ headers: { ...preset.defaultHeaders || {} },
1621
1582
  securitySchemes: {}
1622
1583
  };
1623
1584
  const envVarName = preset.authEnvVar;