@keystrokehq/openrouter 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/create-chat-completion.cjs +1 -0
  4. package/dist/actions/create-chat-completion.cjs.map +1 -1
  5. package/dist/actions/create-chat-completion.d.cts +3 -25
  6. package/dist/actions/create-chat-completion.d.cts.map +1 -1
  7. package/dist/actions/create-chat-completion.d.mts +3 -25
  8. package/dist/actions/create-chat-completion.d.mts.map +1 -1
  9. package/dist/actions/create-chat-completion.mjs +1 -0
  10. package/dist/actions/create-chat-completion.mjs.map +1 -1
  11. package/dist/actions/create-coinbase-charge.cjs +1 -0
  12. package/dist/actions/create-coinbase-charge.cjs.map +1 -1
  13. package/dist/actions/create-coinbase-charge.d.cts +3 -7
  14. package/dist/actions/create-coinbase-charge.d.cts.map +1 -1
  15. package/dist/actions/create-coinbase-charge.d.mts +3 -7
  16. package/dist/actions/create-coinbase-charge.d.mts.map +1 -1
  17. package/dist/actions/create-coinbase-charge.mjs +1 -0
  18. package/dist/actions/create-coinbase-charge.mjs.map +1 -1
  19. package/dist/actions/create-message.cjs +1 -0
  20. package/dist/actions/create-message.cjs.map +1 -1
  21. package/dist/actions/create-message.d.cts +3 -60
  22. package/dist/actions/create-message.d.cts.map +1 -1
  23. package/dist/actions/create-message.d.mts +3 -60
  24. package/dist/actions/create-message.d.mts.map +1 -1
  25. package/dist/actions/create-message.mjs +1 -0
  26. package/dist/actions/create-message.mjs.map +1 -1
  27. package/dist/actions/get-credits.cjs +1 -0
  28. package/dist/actions/get-credits.cjs.map +1 -1
  29. package/dist/actions/get-credits.d.cts +3 -1
  30. package/dist/actions/get-credits.d.cts.map +1 -1
  31. package/dist/actions/get-credits.d.mts +3 -1
  32. package/dist/actions/get-credits.d.mts.map +1 -1
  33. package/dist/actions/get-credits.mjs +1 -0
  34. package/dist/actions/get-credits.mjs.map +1 -1
  35. package/dist/actions/get-current-key.cjs +1 -0
  36. package/dist/actions/get-current-key.cjs.map +1 -1
  37. package/dist/actions/get-current-key.d.cts +3 -4
  38. package/dist/actions/get-current-key.d.cts.map +1 -1
  39. package/dist/actions/get-current-key.d.mts +3 -4
  40. package/dist/actions/get-current-key.d.mts.map +1 -1
  41. package/dist/actions/get-current-key.mjs +1 -0
  42. package/dist/actions/get-current-key.mjs.map +1 -1
  43. package/dist/actions/get-generation.cjs +1 -0
  44. package/dist/actions/get-generation.cjs.map +1 -1
  45. package/dist/actions/get-generation.d.cts +3 -3
  46. package/dist/actions/get-generation.d.cts.map +1 -1
  47. package/dist/actions/get-generation.d.mts +3 -3
  48. package/dist/actions/get-generation.d.mts.map +1 -1
  49. package/dist/actions/get-generation.mjs +1 -0
  50. package/dist/actions/get-generation.mjs.map +1 -1
  51. package/dist/actions/get-models-count.cjs +1 -0
  52. package/dist/actions/get-models-count.cjs.map +1 -1
  53. package/dist/actions/get-models-count.d.cts +3 -4
  54. package/dist/actions/get-models-count.d.cts.map +1 -1
  55. package/dist/actions/get-models-count.d.mts +3 -4
  56. package/dist/actions/get-models-count.d.mts.map +1 -1
  57. package/dist/actions/get-models-count.mjs +1 -0
  58. package/dist/actions/get-models-count.mjs.map +1 -1
  59. package/dist/actions/list-available-models.cjs +1 -0
  60. package/dist/actions/list-available-models.cjs.map +1 -1
  61. package/dist/actions/list-available-models.d.cts +3 -5
  62. package/dist/actions/list-available-models.d.cts.map +1 -1
  63. package/dist/actions/list-available-models.d.mts +3 -5
  64. package/dist/actions/list-available-models.d.mts.map +1 -1
  65. package/dist/actions/list-available-models.mjs +1 -0
  66. package/dist/actions/list-available-models.mjs.map +1 -1
  67. package/dist/actions/list-embedding-models.cjs +1 -0
  68. package/dist/actions/list-embedding-models.cjs.map +1 -1
  69. package/dist/actions/list-embedding-models.d.cts +3 -4
  70. package/dist/actions/list-embedding-models.d.cts.map +1 -1
  71. package/dist/actions/list-embedding-models.d.mts +3 -4
  72. package/dist/actions/list-embedding-models.d.mts.map +1 -1
  73. package/dist/actions/list-embedding-models.mjs +1 -0
  74. package/dist/actions/list-embedding-models.mjs.map +1 -1
  75. package/dist/actions/list-model-endpoints.cjs +1 -0
  76. package/dist/actions/list-model-endpoints.cjs.map +1 -1
  77. package/dist/actions/list-model-endpoints.d.cts +3 -4
  78. package/dist/actions/list-model-endpoints.d.cts.map +1 -1
  79. package/dist/actions/list-model-endpoints.d.mts +3 -4
  80. package/dist/actions/list-model-endpoints.d.mts.map +1 -1
  81. package/dist/actions/list-model-endpoints.mjs +1 -0
  82. package/dist/actions/list-model-endpoints.mjs.map +1 -1
  83. package/dist/actions/list-providers.cjs +1 -0
  84. package/dist/actions/list-providers.cjs.map +1 -1
  85. package/dist/actions/list-providers.d.cts +3 -1
  86. package/dist/actions/list-providers.d.cts.map +1 -1
  87. package/dist/actions/list-providers.d.mts +3 -1
  88. package/dist/actions/list-providers.d.mts.map +1 -1
  89. package/dist/actions/list-providers.mjs +1 -0
  90. package/dist/actions/list-providers.mjs.map +1 -1
  91. package/dist/actions/list-user-models.cjs +1 -0
  92. package/dist/actions/list-user-models.cjs.map +1 -1
  93. package/dist/actions/list-user-models.d.cts +3 -4
  94. package/dist/actions/list-user-models.d.cts.map +1 -1
  95. package/dist/actions/list-user-models.d.mts +3 -4
  96. package/dist/actions/list-user-models.d.mts.map +1 -1
  97. package/dist/actions/list-user-models.mjs +1 -0
  98. package/dist/actions/list-user-models.mjs.map +1 -1
  99. package/dist/actions/list-zdr-endpoints.cjs +1 -0
  100. package/dist/actions/list-zdr-endpoints.cjs.map +1 -1
  101. package/dist/actions/list-zdr-endpoints.d.cts +3 -4
  102. package/dist/actions/list-zdr-endpoints.d.cts.map +1 -1
  103. package/dist/actions/list-zdr-endpoints.d.mts +3 -4
  104. package/dist/actions/list-zdr-endpoints.d.mts.map +1 -1
  105. package/dist/actions/list-zdr-endpoints.mjs +1 -0
  106. package/dist/actions/list-zdr-endpoints.mjs.map +1 -1
  107. package/dist/app.cjs +5 -2
  108. package/dist/app.cjs.map +1 -1
  109. package/dist/app.d.cts +7 -1
  110. package/dist/app.d.cts.map +1 -1
  111. package/dist/app.d.mts +7 -1
  112. package/dist/app.d.mts.map +1 -1
  113. package/dist/app.mjs +3 -2
  114. package/dist/app.mjs.map +1 -1
  115. package/dist/index.d.cts +1 -1
  116. package/dist/index.d.mts +1 -1
  117. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"action.cjs","names":["openrouter","executeOpenrouterTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { openrouter } from \"./app\";\nimport { executeOpenrouterTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return openrouter.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executeOpenrouterTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,WAAW,OAAO;EACvB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,sBAAsB,MAAM,KAAgC,CAAC;EAC7F;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"action.cjs","names":["openrouter","executeOpenrouterTool"],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { openrouter } from \"./app\";\nimport { executeOpenrouterTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof openrouter.credential> {\n return openrouter.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeOpenrouterTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAO0D;CAC1D,OAAOA,YAAAA,WAAW,OAAO;EACvB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,sBAAsB,MAAM,KAAgC,CAAC;EAC7F;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { openrouter } from \"./app\";\nimport { executeOpenrouterTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return openrouter.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executeOpenrouterTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,WAAW,OAAO;EACvB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,sBAAsB,MAAM,KAAgC,CAAC;EAC7F;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { openrouter } from \"./app\";\nimport { executeOpenrouterTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof openrouter.credential> {\n return openrouter.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeOpenrouterTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAO0D;CAC1D,OAAO,WAAW,OAAO;EACvB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,sBAAsB,MAAM,KAAgC,CAAC;EAC7F;CACF,CAAC;AACH"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/create-chat-completion.ts
@@ -1 +1 @@
1
- {"version":3,"file":"create-chat-completion.cjs","names":["z","action"],"sources":["../../src/actions/create-chat-completion.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateChatCompletionInput = z.object({\n n: z.number().int().describe(\"Number of completion choices to generate.\").optional(),\n stop: z.union([z.string(), z.array(z.string())]).optional(),\n user: z.string().describe(\"A unique identifier for the end-user to help detect abuse.\").optional(),\n model: z.string().describe(\"ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures.\"),\n top_p: z.number().describe(\"Nucleus sampling probability, between 0 and 1.\").optional(),\n stream: z.boolean().default(false).describe(\"Whether to stream back partial message deltas.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"system\", \"user\", \"assistant\", \"tool\"]).describe(\"Role of the message sender.\"),\n content: z.string().describe(\"Content of the message.\"),\n}).passthrough()).describe(\"List of conversation messages to provide as context.\"),\n functions: z.array(z.object({\n name: z.string().describe(\"Name of the function to be called by the model.\"),\n parameters: z.record(z.string(), z.unknown()).describe(\"JSON schema describing function parameters.\"),\n description: z.string().describe(\"Description of the function purpose.\").optional(),\n}).passthrough()).describe(\"List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.\").optional(),\n logit_bias: z.record(z.string(), z.unknown()).describe(\"Adjust the likelihood of specified tokens.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate.\").optional(),\n temperature: z.number().describe(\"Sampling temperature to use, between 0 and 2.\").optional(),\n function_call: z.union([z.enum([\"none\", \"auto\"]), z.record(z.string(), z.unknown())]).optional(),\n presence_penalty: z.number().describe(\"Penalty for new tokens based on presence in the text so far.\").optional(),\n frequency_penalty: z.number().describe(\"Penalty for new tokens based on frequency in the text so far.\").optional(),\n});\nconst OpenrouterCreateChatCompletion_UsageSchema = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens used.\").nullable(),\n prompt_tokens: z.number().int().describe(\"Number of tokens in the prompt.\").nullable(),\n completion_tokens: z.number().int().describe(\"Number of tokens generated in the completion.\").nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ErrorResponseSchema = z.object({\n code: z.number().int().describe(\"Error code from the provider.\").nullable(),\n message: z.string().describe(\"Error message from the provider.\").nullable(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional error information.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_FunctionCallSchema = z.object({\n name: z.string().describe(\"Name of the function called by the model.\").nullable(),\n arguments: z.record(z.string(), z.unknown()).describe(\"Arguments provided to the function call.\"),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ToolCallSchema = z.object({\n id: z.string().describe(\"Unique identifier for this tool call.\").nullable(),\n type: z.string().describe(\"Type of the call (function).\").nullable(),\n \"function\": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ChoiceMessageSchema = z.object({\n role: z.string().describe(\"Role of the generated message content.\").nullable(),\n content: z.string().describe(\"Content of the generated message.\").nullable().optional(),\n tool_calls: z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe(\"Tool calls triggered by the model.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_CreateChoiceSchema = z.object({\n error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),\n message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),\n finish_reason: z.string().describe(\"The reason why the completion finished.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Provider-specific finish reason.\").nullable().optional(),\n}).passthrough();\nexport const OpenrouterCreateChatCompletionOutput = z.object({\n id: z.string().describe(\"Unique identifier for the completion.\").nullable(),\n model: z.string().describe(\"Model ID used for the completion.\").nullable(),\n usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),\n object: z.enum([\"chat.completion\", \"chat.completion.chunk\"]).describe(\"Object type returned.\").nullable(),\n choices: z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe(\"List of generated completion choices.\"),\n created: z.number().int().describe(\"Unix timestamp when the completion was created.\").nullable(),\n system_fingerprint: z.string().describe(\"Provider fingerprint if supported.\").nullable().optional(),\n}).passthrough();\n\nexport const openrouterCreateChatCompletion = action(\"OPENROUTER_CREATE_CHAT_COMPLETION\", {\n slug: \"openrouter-create-chat-completion\",\n name: \"Create Chat Completion\",\n description: \"Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.\",\n input: OpenrouterCreateChatCompletionInput,\n output: OpenrouterCreateChatCompletionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAsCA,IAAAA,EAAE,OAAO;CAC1D,GAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACnF,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CAC1D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CACjG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2KAA2K;CACtM,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACtF,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACvG,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3B,MAAMA,IAAAA,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAa;EAAM,CAAC,CAAC,CAAC,SAAS,6BAA6B;EAC5F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACxD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,sDAAsD;CAC/E,WAAWA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC5B,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;EAC3E,YAAYA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,6CAA6C;E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A,EAAE,OAAO;CACjE,OAAO,mDAAmD,SAAS,CAAC,CAAC,SAAS;CAC9E,SAAS,mDAAmD,SAAS;CACrE,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClG,sBAAsBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpG,CAAC,CAAC,CAAC,YAAY;AACf,MAAa,uCAAuCA,IAAAA,EAAE,OAAO;CAC3D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;CAC1E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAO,2CAA2C,SAAS,CAAC,CAAC,SAAS;CACtE,QAAQA,IAAAA,EAAE,KAAK,CAAC,mBAAmB,uBAAuB,CAAC,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;CACxG,SAASA,IAAAA,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,uCAAuC;CACpH,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CAC/F,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpG,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,iCAAiCC,eAAAA,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"create-chat-completion.cjs","names":["z","action"],"sources":["../../src/actions/create-chat-completion.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { openrouter } from \"../app\";\n\nexport const OpenrouterCreateChatCompletionInput = z.object({\n n: z.number().int().describe(\"Number of completion choices to generate.\").optional(),\n stop: z.union([z.string(), z.array(z.string())]).optional(),\n user: z.string().describe(\"A unique identifier for the end-user to help detect abuse.\").optional(),\n model: z.string().describe(\"ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures.\"),\n top_p: z.number().describe(\"Nucleus sampling probability, between 0 and 1.\").optional(),\n stream: z.boolean().default(false).describe(\"Whether to stream back partial message deltas.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"system\", \"user\", \"assistant\", \"tool\"]).describe(\"Role of the message sender.\"),\n content: z.string().describe(\"Content of the message.\"),\n}).passthrough()).describe(\"List of conversation messages to provide as context.\"),\n functions: z.array(z.object({\n name: z.string().describe(\"Name of the function to be called by the model.\"),\n parameters: z.record(z.string(), z.unknown()).describe(\"JSON schema describing function parameters.\"),\n description: z.string().describe(\"Description of the function purpose.\").optional(),\n}).passthrough()).describe(\"List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.\").optional(),\n logit_bias: z.record(z.string(), z.unknown()).describe(\"Adjust the likelihood of specified tokens.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate.\").optional(),\n temperature: z.number().describe(\"Sampling temperature to use, between 0 and 2.\").optional(),\n function_call: z.union([z.enum([\"none\", \"auto\"]), z.record(z.string(), z.unknown())]).optional(),\n presence_penalty: z.number().describe(\"Penalty for new tokens based on presence in the text so far.\").optional(),\n frequency_penalty: z.number().describe(\"Penalty for new tokens based on frequency in the text so far.\").optional(),\n});\nconst OpenrouterCreateChatCompletion_UsageSchema = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens used.\").nullable(),\n prompt_tokens: z.number().int().describe(\"Number of tokens in the prompt.\").nullable(),\n completion_tokens: z.number().int().describe(\"Number of tokens generated in the completion.\").nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ErrorResponseSchema = z.object({\n code: z.number().int().describe(\"Error code from the provider.\").nullable(),\n message: z.string().describe(\"Error message from the provider.\").nullable(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional error information.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_FunctionCallSchema = z.object({\n name: z.string().describe(\"Name of the function called by the model.\").nullable(),\n arguments: z.record(z.string(), z.unknown()).describe(\"Arguments provided to the function call.\"),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ToolCallSchema = z.object({\n id: z.string().describe(\"Unique identifier for this tool call.\").nullable(),\n type: z.string().describe(\"Type of the call (function).\").nullable(),\n \"function\": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ChoiceMessageSchema = z.object({\n role: z.string().describe(\"Role of the generated message content.\").nullable(),\n content: z.string().describe(\"Content of the generated message.\").nullable().optional(),\n tool_calls: z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe(\"Tool calls triggered by the model.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_CreateChoiceSchema = z.object({\n error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),\n message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),\n finish_reason: z.string().describe(\"The reason why the completion finished.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Provider-specific finish reason.\").nullable().optional(),\n}).passthrough();\nexport const OpenrouterCreateChatCompletionOutput = z.object({\n id: z.string().describe(\"Unique identifier for the completion.\").nullable(),\n model: z.string().describe(\"Model ID used for the completion.\").nullable(),\n usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),\n object: z.enum([\"chat.completion\", \"chat.completion.chunk\"]).describe(\"Object type returned.\").nullable(),\n choices: z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe(\"List of generated completion choices.\"),\n created: z.number().int().describe(\"Unix timestamp when the completion was created.\").nullable(),\n system_fingerprint: z.string().describe(\"Provider fingerprint if supported.\").nullable().optional(),\n}).passthrough();\n\nexport const openrouterCreateChatCompletion: AppAction<\n typeof OpenrouterCreateChatCompletionInput,\n typeof OpenrouterCreateChatCompletionOutput,\n typeof openrouter.credential\n> = action(\"OPENROUTER_CREATE_CHAT_COMPLETION\", {\n slug: \"openrouter-create-chat-completion\",\n name: \"Create Chat Completion\",\n description: \"Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.\",\n input: OpenrouterCreateChatCompletionInput,\n output: OpenrouterCreateChatCompletionOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,sCAAsCA,IAAAA,EAAE,OAAO;CAC1D,GAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACnF,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CAC1D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CACjG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2KAA2K;CACtM,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACtF,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACvG,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3B,MAAMA,IAAAA,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAa;EAAM,CAAC,CAAC,CAAC,SAAS,6BAA6B;EAC5F,SAASA,IAAAA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C,CAAC,SAAS;AACpG,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,iCAITC,eAAAA,OAAO,qCAAqC;CAC9C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { openrouter } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/create-chat-completion.d.ts
@@ -68,31 +70,7 @@ declare const OpenrouterCreateChatCompletionOutput: z.ZodObject<{
68
70
  created: z.ZodNullable<z.ZodNumber>;
69
71
  system_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
72
  }, z.core.$loose>;
71
- declare const openrouterCreateChatCompletion: import("@keystrokehq/action").WorkflowActionDefinition<{
72
- model: string;
73
- messages: {
74
- [x: string]: unknown;
75
- role: "user" | "system" | "assistant" | "tool";
76
- content: string;
77
- }[];
78
- n?: number | undefined;
79
- stop?: string | string[] | undefined;
80
- user?: string | undefined;
81
- top_p?: number | undefined;
82
- stream?: boolean | undefined;
83
- functions?: {
84
- [x: string]: unknown;
85
- name: string;
86
- parameters: Record<string, unknown>;
87
- description?: string | undefined;
88
- }[] | undefined;
89
- logit_bias?: Record<string, unknown> | undefined;
90
- max_tokens?: number | undefined;
91
- temperature?: number | undefined;
92
- function_call?: Record<string, unknown> | "none" | "auto" | undefined;
93
- presence_penalty?: number | undefined;
94
- frequency_penalty?: number | undefined;
95
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
73
+ declare const openrouterCreateChatCompletion: AppAction<typeof OpenrouterCreateChatCompletionInput, typeof OpenrouterCreateChatCompletionOutput, typeof openrouter.credential>;
96
74
  //#endregion
97
75
  export { openrouterCreateChatCompletion };
98
76
  //# sourceMappingURL=create-chat-completion.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-chat-completion.d.cts","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"mappings":";;;cAIa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqDnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAUpC,8BAAA,gCAA8B,wBAAA"}
1
+ {"version":3,"file":"create-chat-completion.d.cts","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"mappings":";;;;;cAMa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqDnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAUpC,8BAAA,EAAgC,SAAA,QACpC,mCAAA,SACA,oCAAA,SACA,UAAA,CAAW,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { openrouter } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/create-chat-completion.d.ts
@@ -68,31 +70,7 @@ declare const OpenrouterCreateChatCompletionOutput: z.ZodObject<{
68
70
  created: z.ZodNullable<z.ZodNumber>;
69
71
  system_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
72
  }, z.core.$loose>;
71
- declare const openrouterCreateChatCompletion: import("@keystrokehq/action").WorkflowActionDefinition<{
72
- model: string;
73
- messages: {
74
- [x: string]: unknown;
75
- role: "user" | "system" | "assistant" | "tool";
76
- content: string;
77
- }[];
78
- n?: number | undefined;
79
- stop?: string | string[] | undefined;
80
- user?: string | undefined;
81
- top_p?: number | undefined;
82
- stream?: boolean | undefined;
83
- functions?: {
84
- [x: string]: unknown;
85
- name: string;
86
- parameters: Record<string, unknown>;
87
- description?: string | undefined;
88
- }[] | undefined;
89
- logit_bias?: Record<string, unknown> | undefined;
90
- max_tokens?: number | undefined;
91
- temperature?: number | undefined;
92
- function_call?: Record<string, unknown> | "none" | "auto" | undefined;
93
- presence_penalty?: number | undefined;
94
- frequency_penalty?: number | undefined;
95
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
73
+ declare const openrouterCreateChatCompletion: AppAction<typeof OpenrouterCreateChatCompletionInput, typeof OpenrouterCreateChatCompletionOutput, typeof openrouter.credential>;
96
74
  //#endregion
97
75
  export { openrouterCreateChatCompletion };
98
76
  //# sourceMappingURL=create-chat-completion.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-chat-completion.d.mts","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"mappings":";;;cAIa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqDnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAUpC,8BAAA,gCAA8B,wBAAA"}
1
+ {"version":3,"file":"create-chat-completion.d.mts","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"mappings":";;;;;cAMa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqDnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAUpC,8BAAA,EAAgC,SAAA,QACpC,mCAAA,SACA,oCAAA,SACA,UAAA,CAAW,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  //#region src/actions/create-chat-completion.ts
@@ -1 +1 @@
1
- {"version":3,"file":"create-chat-completion.mjs","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateChatCompletionInput = z.object({\n n: z.number().int().describe(\"Number of completion choices to generate.\").optional(),\n stop: z.union([z.string(), z.array(z.string())]).optional(),\n user: z.string().describe(\"A unique identifier for the end-user to help detect abuse.\").optional(),\n model: z.string().describe(\"ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures.\"),\n top_p: z.number().describe(\"Nucleus sampling probability, between 0 and 1.\").optional(),\n stream: z.boolean().default(false).describe(\"Whether to stream back partial message deltas.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"system\", \"user\", \"assistant\", \"tool\"]).describe(\"Role of the message sender.\"),\n content: z.string().describe(\"Content of the message.\"),\n}).passthrough()).describe(\"List of conversation messages to provide as context.\"),\n functions: z.array(z.object({\n name: z.string().describe(\"Name of the function to be called by the model.\"),\n parameters: z.record(z.string(), z.unknown()).describe(\"JSON schema describing function parameters.\"),\n description: z.string().describe(\"Description of the function purpose.\").optional(),\n}).passthrough()).describe(\"List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.\").optional(),\n logit_bias: z.record(z.string(), z.unknown()).describe(\"Adjust the likelihood of specified tokens.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate.\").optional(),\n temperature: z.number().describe(\"Sampling temperature to use, between 0 and 2.\").optional(),\n function_call: z.union([z.enum([\"none\", \"auto\"]), z.record(z.string(), z.unknown())]).optional(),\n presence_penalty: z.number().describe(\"Penalty for new tokens based on presence in the text so far.\").optional(),\n frequency_penalty: z.number().describe(\"Penalty for new tokens based on frequency in the text so far.\").optional(),\n});\nconst OpenrouterCreateChatCompletion_UsageSchema = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens used.\").nullable(),\n prompt_tokens: z.number().int().describe(\"Number of tokens in the prompt.\").nullable(),\n completion_tokens: z.number().int().describe(\"Number of tokens generated in the completion.\").nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ErrorResponseSchema = z.object({\n code: z.number().int().describe(\"Error code from the provider.\").nullable(),\n message: z.string().describe(\"Error message from the provider.\").nullable(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional error information.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_FunctionCallSchema = z.object({\n name: z.string().describe(\"Name of the function called by the model.\").nullable(),\n arguments: z.record(z.string(), z.unknown()).describe(\"Arguments provided to the function call.\"),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ToolCallSchema = z.object({\n id: z.string().describe(\"Unique identifier for this tool call.\").nullable(),\n type: z.string().describe(\"Type of the call (function).\").nullable(),\n \"function\": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ChoiceMessageSchema = z.object({\n role: z.string().describe(\"Role of the generated message content.\").nullable(),\n content: z.string().describe(\"Content of the generated message.\").nullable().optional(),\n tool_calls: z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe(\"Tool calls triggered by the model.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_CreateChoiceSchema = z.object({\n error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),\n message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),\n finish_reason: z.string().describe(\"The reason why the completion finished.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Provider-specific finish reason.\").nullable().optional(),\n}).passthrough();\nexport const OpenrouterCreateChatCompletionOutput = z.object({\n id: z.string().describe(\"Unique identifier for the completion.\").nullable(),\n model: z.string().describe(\"Model ID used for the completion.\").nullable(),\n usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),\n object: z.enum([\"chat.completion\", \"chat.completion.chunk\"]).describe(\"Object type returned.\").nullable(),\n choices: z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe(\"List of generated completion choices.\"),\n created: z.number().int().describe(\"Unix timestamp when the completion was created.\").nullable(),\n system_fingerprint: z.string().describe(\"Provider fingerprint if supported.\").nullable().optional(),\n}).passthrough();\n\nexport const openrouterCreateChatCompletion = action(\"OPENROUTER_CREATE_CHAT_COMPLETION\", {\n slug: \"openrouter-create-chat-completion\",\n name: \"Create Chat Completion\",\n description: \"Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.\",\n input: OpenrouterCreateChatCompletionInput,\n output: OpenrouterCreateChatCompletionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAsC,EAAE,OAAO;CAC1D,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACnF,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CAC1D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CACjG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2KAA2K;CACtM,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACtF,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACvG,UAAU,EAAE,MAAM,EAAE,OAAO;EAC3B,MAAM,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAa;EAAM,CAAC,CAAC,CAAC,SAAS,6BAA6B;EAC5F,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACxD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,sDAAsD;CAC/E,WAAW,EAAE,MAAM,EAAE,OAAO;EAC5B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;EAC3E,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ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pG,CAAC,CAAC,CAAC,YAAY;AAWf,MAAa,iCAAiC,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAfkD,EAAE,OAAO;EAC3D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;EAC1E,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;EACzE,OAAO,2CAA2C,SAAS,CAAC,CAAC,SAAS;EACtE,QAAQ,EAAE,KAAK,CAAC,mBAAmB,uBAAuB,CAAC,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;EACxG,SAAS,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,uCAAuC;EACpH,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;EAC/F,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,CAAC,CAAC,CAAC,YAOO;AACV,CAAC"}
1
+ {"version":3,"file":"create-chat-completion.mjs","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { openrouter } from \"../app\";\n\nexport const OpenrouterCreateChatCompletionInput = z.object({\n n: z.number().int().describe(\"Number of completion choices to generate.\").optional(),\n stop: z.union([z.string(), z.array(z.string())]).optional(),\n user: z.string().describe(\"A unique identifier for the end-user to help detect abuse.\").optional(),\n model: z.string().describe(\"ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures.\"),\n top_p: z.number().describe(\"Nucleus sampling probability, between 0 and 1.\").optional(),\n stream: z.boolean().default(false).describe(\"Whether to stream back partial message deltas.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"system\", \"user\", \"assistant\", \"tool\"]).describe(\"Role of the message sender.\"),\n content: z.string().describe(\"Content of the message.\"),\n}).passthrough()).describe(\"List of conversation messages to provide as context.\"),\n functions: z.array(z.object({\n name: z.string().describe(\"Name of the function to be called by the model.\"),\n parameters: z.record(z.string(), z.unknown()).describe(\"JSON schema describing function parameters.\"),\n description: z.string().describe(\"Description of the function purpose.\").optional(),\n}).passthrough()).describe(\"List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.\").optional(),\n logit_bias: z.record(z.string(), z.unknown()).describe(\"Adjust the likelihood of specified tokens.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate.\").optional(),\n temperature: z.number().describe(\"Sampling temperature to use, between 0 and 2.\").optional(),\n function_call: z.union([z.enum([\"none\", \"auto\"]), z.record(z.string(), z.unknown())]).optional(),\n presence_penalty: z.number().describe(\"Penalty for new tokens based on presence in the text so far.\").optional(),\n frequency_penalty: z.number().describe(\"Penalty for new tokens based on frequency in the text so far.\").optional(),\n});\nconst OpenrouterCreateChatCompletion_UsageSchema = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens used.\").nullable(),\n prompt_tokens: z.number().int().describe(\"Number of tokens in the prompt.\").nullable(),\n completion_tokens: z.number().int().describe(\"Number of tokens generated in the completion.\").nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ErrorResponseSchema = z.object({\n code: z.number().int().describe(\"Error code from the provider.\").nullable(),\n message: z.string().describe(\"Error message from the provider.\").nullable(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional error information.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_FunctionCallSchema = z.object({\n name: z.string().describe(\"Name of the function called by the model.\").nullable(),\n arguments: z.record(z.string(), z.unknown()).describe(\"Arguments provided to the function call.\"),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ToolCallSchema = z.object({\n id: z.string().describe(\"Unique identifier for this tool call.\").nullable(),\n type: z.string().describe(\"Type of the call (function).\").nullable(),\n \"function\": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_ChoiceMessageSchema = z.object({\n role: z.string().describe(\"Role of the generated message content.\").nullable(),\n content: z.string().describe(\"Content of the generated message.\").nullable().optional(),\n tool_calls: z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe(\"Tool calls triggered by the model.\").nullable().optional(),\n}).passthrough();\nconst OpenrouterCreateChatCompletion_CreateChoiceSchema = z.object({\n error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),\n message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),\n finish_reason: z.string().describe(\"The reason why the completion finished.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Provider-specific finish reason.\").nullable().optional(),\n}).passthrough();\nexport const OpenrouterCreateChatCompletionOutput = z.object({\n id: z.string().describe(\"Unique identifier for the completion.\").nullable(),\n model: z.string().describe(\"Model ID used for the completion.\").nullable(),\n usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),\n object: z.enum([\"chat.completion\", \"chat.completion.chunk\"]).describe(\"Object type returned.\").nullable(),\n choices: z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe(\"List of generated completion choices.\"),\n created: z.number().int().describe(\"Unix timestamp when the completion was created.\").nullable(),\n system_fingerprint: z.string().describe(\"Provider fingerprint if supported.\").nullable().optional(),\n}).passthrough();\n\nexport const openrouterCreateChatCompletion: AppAction<\n typeof OpenrouterCreateChatCompletionInput,\n typeof OpenrouterCreateChatCompletionOutput,\n typeof openrouter.credential\n> = action(\"OPENROUTER_CREATE_CHAT_COMPLETION\", {\n slug: \"openrouter-create-chat-completion\",\n name: \"Create Chat Completion\",\n description: \"Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.\",\n input: OpenrouterCreateChatCompletionInput,\n output: OpenrouterCreateChatCompletionOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,sCAAsC,EAAE,OAAO;CAC1D,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACnF,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CAC1D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CACjG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2KAA2K;CACtM,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACtF,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACvG,UAAU,EAAE,MAAM,EAAE,OAAO;EAC3B,MAAM,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAa;EAAM,CAAC,CAAC,CAAC,SAAS,6BAA6B;EAC5F,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACxD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,sDAAsD;CAC/E,WAAW,EAAE,MAAM,EAAE,OAAO;EAC5B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;EAC3E,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,6CAA6C;EACpG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACpF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,gRAAgR,CAAC,CAAC,SAAS;CACpT,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ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C,SAAS,mCAAmC,CAAC,CAAC,SAAS;EACzE,OAAO,2CAA2C,SAAS,CAAC,CAAC,SAAS;EACtE,QAAQ,EAAE,KAAK,CAAC,mBAAmB,uBAAuB,CAAC,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;EACxG,SAAS,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,uCAAuC;EACpH,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;EAC/F,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,CAAC,CAAC,CAAC,YAWO;AACV,CAAC"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/create-coinbase-charge.ts
@@ -1 +1 @@
1
- {"version":3,"file":"create-coinbase-charge.cjs","names":["z","action"],"sources":["../../src/actions/create-coinbase-charge.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateCoinbaseChargeInput = z.object({\n amount: z.number().describe(\"Amount in USD to charge. This will be converted to the equivalent crypto amount.\"),\n sender: z.string().describe(\"Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x').\"),\n X_Title: z.string().describe(\"The app display name that customizes how your app appears in OpenRouter's dashboard.\").optional(),\n chain_id: z.union([z.literal(1), z.literal(137), z.literal(8453)]).describe(\"Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).\"),\n HTTP_Referer: z.string().describe(\"The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.\").optional(),\n});\nconst OpenrouterCreateCoinbaseCharge_Web3DataSchema = z.object({\n transfer_intent: z.record(z.string(), z.unknown()).describe(\"Details of the transfer intent for the crypto payment\"),\n}).passthrough();\nconst OpenrouterCreateCoinbaseCharge_ChargeDataSchema = z.object({\n id: z.string().describe(\"Unique identifier for the created charge\").nullable(),\n web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the charge was created\").nullable(),\n expires_at: z.string().describe(\"ISO 8601 timestamp when the charge expires\").nullable(),\n}).passthrough();\nexport const OpenrouterCreateCoinbaseChargeOutput = z.object({\n data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable(),\n}).passthrough();\n\nexport const openrouterCreateCoinbaseCharge = action(\"OPENROUTER_CREATE_COINBASE_CHARGE\", {\n slug: \"openrouter-create-coinbase-charge\",\n name: \"Create Coinbase Charge\",\n description: \"Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.\",\n input: OpenrouterCreateCoinbaseChargeInput,\n output: OpenrouterCreateCoinbaseChargeOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAsCA,IAAAA,EAAE,OAAO;CAC1D,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF;CAC9G,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG;CAClI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CAC9H,UAAUA,IAAAA,EAAE,MAAM;EAACA,IAAAA,EAAE,QAAQ,CAAC;EAAGA,IAAAA,EAAE,QAAQ,GAAG;EAAGA,IAAAA,EAAE,QAAQ,IAAI;CAAC,CAAC,CAAC,CAAC,SAAS,oGAAoG;CAChL,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yHAAyH,CAAC,CAAC,SAAS;AACxK,CAAC;AACD,MAAM,gDAAgDA,IAAAA,EAAE,OAAO,EAC7D,iBAAiBA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uDAAuD,EACrH,CAAC,CAAC,CAAC,YAAY;AACf,MAAM,kDAAkDA,IAAAA,EAAE,OAAO;CAC/D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAC7E,WAAW,8CAA8C,SAAS;CAClE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAC3F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,YAAY;AACf,MAAa,uCAAuCA,IAAAA,EAAE,OAAO,EAC3D,MAAM,gDAAgD,SAAS,EACjE,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,iCAAiCC,eAAAA,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"create-coinbase-charge.cjs","names":["z","action"],"sources":["../../src/actions/create-coinbase-charge.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { openrouter } from \"../app\";\n\nexport const OpenrouterCreateCoinbaseChargeInput = z.object({\n amount: z.number().describe(\"Amount in USD to charge. This will be converted to the equivalent crypto amount.\"),\n sender: z.string().describe(\"Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x').\"),\n X_Title: z.string().describe(\"The app display name that customizes how your app appears in OpenRouter's dashboard.\").optional(),\n chain_id: z.union([z.literal(1), z.literal(137), z.literal(8453)]).describe(\"Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).\"),\n HTTP_Referer: z.string().describe(\"The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.\").optional(),\n});\nconst OpenrouterCreateCoinbaseCharge_Web3DataSchema = z.object({\n transfer_intent: z.record(z.string(), z.unknown()).describe(\"Details of the transfer intent for the crypto payment\"),\n}).passthrough();\nconst OpenrouterCreateCoinbaseCharge_ChargeDataSchema = z.object({\n id: z.string().describe(\"Unique identifier for the created charge\").nullable(),\n web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the charge was created\").nullable(),\n expires_at: z.string().describe(\"ISO 8601 timestamp when the charge expires\").nullable(),\n}).passthrough();\nexport const OpenrouterCreateCoinbaseChargeOutput = z.object({\n data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable(),\n}).passthrough();\n\nexport const openrouterCreateCoinbaseCharge: AppAction<\n typeof OpenrouterCreateCoinbaseChargeInput,\n typeof OpenrouterCreateCoinbaseChargeOutput,\n typeof openrouter.credential\n> = action(\"OPENROUTER_CREATE_COINBASE_CHARGE\", {\n slug: \"openrouter-create-coinbase-charge\",\n name: \"Create Coinbase Charge\",\n description: \"Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.\",\n input: OpenrouterCreateCoinbaseChargeInput,\n output: OpenrouterCreateCoinbaseChargeOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,sCAAsCA,IAAAA,EAAE,OAAO;CAC1D,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF;CAC9G,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG;CAClI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CAC9H,UAAUA,IAAAA,EAAE,MAAM;EAACA,IAAAA,EAAE,QAAQ,CAAC;EAAGA,IAAAA,EAAE,QAAQ,GAAG;EAAGA,IAAAA,EAAE,QAAQ,IAAI;CAAC,CAAC,CAAC,CAAC,SAAS,oGAAoG;CAChL,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yHAAyH,CAAC,CAAC,SAAS;AACxK,CAAC;AACD,MAAM,gDAAgDA,IAAAA,EAAE,OAAO,EAC7D,iBAAiBA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uDAAuD,EACrH,CAAC,CAAC,CAAC,YAAY;AACf,MAAM,kDAAkDA,IAAAA,EAAE,OAAO;CAC/D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAC7E,WAAW,8CAA8C,SAAS;CAClE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAC3F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,YAAY;AACf,MAAa,uCAAuCA,IAAAA,EAAE,OAAO,EAC3D,MAAM,gDAAgD,SAAS,EACjE,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,iCAITC,eAAAA,OAAO,qCAAqC;CAC9C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { openrouter } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/create-coinbase-charge.d.ts
@@ -18,13 +20,7 @@ declare const OpenrouterCreateCoinbaseChargeOutput: z.ZodObject<{
18
20
  expires_at: z.ZodNullable<z.ZodString>;
19
21
  }, z.core.$loose>>;
20
22
  }, z.core.$loose>;
21
- declare const openrouterCreateCoinbaseCharge: import("@keystrokehq/action").WorkflowActionDefinition<{
22
- amount: number;
23
- sender: string;
24
- chain_id: 1 | 137 | 8453;
25
- X_Title?: string | undefined;
26
- HTTP_Referer?: string | undefined;
27
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
23
+ declare const openrouterCreateCoinbaseCharge: AppAction<typeof OpenrouterCreateCoinbaseChargeInput, typeof OpenrouterCreateCoinbaseChargeOutput, typeof openrouter.credential>;
28
24
  //#endregion
29
25
  export { openrouterCreateCoinbaseCharge };
30
26
  //# sourceMappingURL=create-coinbase-charge.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-coinbase-charge.d.cts","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"mappings":";;;cAIa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;cAgBnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;cAIpC,8BAAA,gCAA8B,wBAAA"}
1
+ {"version":3,"file":"create-coinbase-charge.d.cts","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"mappings":";;;;;cAMa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;cAgBnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;cAIpC,8BAAA,EAAgC,SAAA,QACpC,mCAAA,SACA,oCAAA,SACA,UAAA,CAAW,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { openrouter } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/create-coinbase-charge.d.ts
@@ -18,13 +20,7 @@ declare const OpenrouterCreateCoinbaseChargeOutput: z.ZodObject<{
18
20
  expires_at: z.ZodNullable<z.ZodString>;
19
21
  }, z.core.$loose>>;
20
22
  }, z.core.$loose>;
21
- declare const openrouterCreateCoinbaseCharge: import("@keystrokehq/action").WorkflowActionDefinition<{
22
- amount: number;
23
- sender: string;
24
- chain_id: 1 | 137 | 8453;
25
- X_Title?: string | undefined;
26
- HTTP_Referer?: string | undefined;
27
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
23
+ declare const openrouterCreateCoinbaseCharge: AppAction<typeof OpenrouterCreateCoinbaseChargeInput, typeof OpenrouterCreateCoinbaseChargeOutput, typeof openrouter.credential>;
28
24
  //#endregion
29
25
  export { openrouterCreateCoinbaseCharge };
30
26
  //# sourceMappingURL=create-coinbase-charge.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-coinbase-charge.d.mts","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"mappings":";;;cAIa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;cAgBnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;cAIpC,8BAAA,gCAA8B,wBAAA"}
1
+ {"version":3,"file":"create-coinbase-charge.d.mts","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"mappings":";;;;;cAMa,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;cAgBnC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;cAIpC,8BAAA,EAAgC,SAAA,QACpC,mCAAA,SACA,oCAAA,SACA,UAAA,CAAW,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  //#region src/actions/create-coinbase-charge.ts
@@ -1 +1 @@
1
- {"version":3,"file":"create-coinbase-charge.mjs","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateCoinbaseChargeInput = z.object({\n amount: z.number().describe(\"Amount in USD to charge. This will be converted to the equivalent crypto amount.\"),\n sender: z.string().describe(\"Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x').\"),\n X_Title: z.string().describe(\"The app display name that customizes how your app appears in OpenRouter's dashboard.\").optional(),\n chain_id: z.union([z.literal(1), z.literal(137), z.literal(8453)]).describe(\"Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).\"),\n HTTP_Referer: z.string().describe(\"The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.\").optional(),\n});\nconst OpenrouterCreateCoinbaseCharge_Web3DataSchema = z.object({\n transfer_intent: z.record(z.string(), z.unknown()).describe(\"Details of the transfer intent for the crypto payment\"),\n}).passthrough();\nconst OpenrouterCreateCoinbaseCharge_ChargeDataSchema = z.object({\n id: z.string().describe(\"Unique identifier for the created charge\").nullable(),\n web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the charge was created\").nullable(),\n expires_at: z.string().describe(\"ISO 8601 timestamp when the charge expires\").nullable(),\n}).passthrough();\nexport const OpenrouterCreateCoinbaseChargeOutput = z.object({\n data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable(),\n}).passthrough();\n\nexport const openrouterCreateCoinbaseCharge = action(\"OPENROUTER_CREATE_COINBASE_CHARGE\", {\n slug: \"openrouter-create-coinbase-charge\",\n name: \"Create Coinbase Charge\",\n description: \"Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.\",\n input: OpenrouterCreateCoinbaseChargeInput,\n output: OpenrouterCreateCoinbaseChargeOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAsC,EAAE,OAAO;CAC1D,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF;CAC9G,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG;CAClI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CAC9H,UAAU,EAAE,MAAM;EAAC,EAAE,QAAQ,CAAC;EAAG,EAAE,QAAQ,GAAG;EAAG,EAAE,QAAQ,IAAI;CAAC,CAAC,CAAC,CAAC,SAAS,oGAAoG;CAChL,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,yHAAyH,CAAC,CAAC,SAAS;AACxK,CAAC;AACD,MAAM,gDAAgD,EAAE,OAAO,EAC7D,iBAAiB,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uDAAuD,EACrH,CAAC,CAAC,CAAC,YAAY;AACf,MAAM,kDAAkD,EAAE,OAAO;CAC/D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAC7E,WAAW,8CAA8C,SAAS;CAClE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAC3F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,YAAY;AAKf,MAAa,iCAAiC,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATkD,EAAE,OAAO,EAC3D,MAAM,gDAAgD,SAAS,EACjE,CAAC,CAAC,CAAC,YAOO;AACV,CAAC"}
1
+ {"version":3,"file":"create-coinbase-charge.mjs","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { openrouter } from \"../app\";\n\nexport const OpenrouterCreateCoinbaseChargeInput = z.object({\n amount: z.number().describe(\"Amount in USD to charge. This will be converted to the equivalent crypto amount.\"),\n sender: z.string().describe(\"Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x').\"),\n X_Title: z.string().describe(\"The app display name that customizes how your app appears in OpenRouter's dashboard.\").optional(),\n chain_id: z.union([z.literal(1), z.literal(137), z.literal(8453)]).describe(\"Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).\"),\n HTTP_Referer: z.string().describe(\"The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.\").optional(),\n});\nconst OpenrouterCreateCoinbaseCharge_Web3DataSchema = z.object({\n transfer_intent: z.record(z.string(), z.unknown()).describe(\"Details of the transfer intent for the crypto payment\"),\n}).passthrough();\nconst OpenrouterCreateCoinbaseCharge_ChargeDataSchema = z.object({\n id: z.string().describe(\"Unique identifier for the created charge\").nullable(),\n web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the charge was created\").nullable(),\n expires_at: z.string().describe(\"ISO 8601 timestamp when the charge expires\").nullable(),\n}).passthrough();\nexport const OpenrouterCreateCoinbaseChargeOutput = z.object({\n data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable(),\n}).passthrough();\n\nexport const openrouterCreateCoinbaseCharge: AppAction<\n typeof OpenrouterCreateCoinbaseChargeInput,\n typeof OpenrouterCreateCoinbaseChargeOutput,\n typeof openrouter.credential\n> = action(\"OPENROUTER_CREATE_COINBASE_CHARGE\", {\n slug: \"openrouter-create-coinbase-charge\",\n name: \"Create Coinbase Charge\",\n description: \"Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.\",\n input: OpenrouterCreateCoinbaseChargeInput,\n output: OpenrouterCreateCoinbaseChargeOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,sCAAsC,EAAE,OAAO;CAC1D,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF;CAC9G,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG;CAClI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CAC9H,UAAU,EAAE,MAAM;EAAC,EAAE,QAAQ,CAAC;EAAG,EAAE,QAAQ,GAAG;EAAG,EAAE,QAAQ,IAAI;CAAC,CAAC,CAAC,CAAC,SAAS,oGAAoG;CAChL,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,yHAAyH,CAAC,CAAC,SAAS;AACxK,CAAC;AACD,MAAM,gDAAgD,EAAE,OAAO,EAC7D,iBAAiB,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uDAAuD,EACrH,CAAC,CAAC,CAAC,YAAY;AACf,MAAM,kDAAkD,EAAE,OAAO;CAC/D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAC7E,WAAW,8CAA8C,SAAS;CAClE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAC3F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,YAAY;AAKf,MAAa,iCAIT,OAAO,qCAAqC;CAC9C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAbkD,EAAE,OAAO,EAC3D,MAAM,gDAAgD,SAAS,EACjE,CAAC,CAAC,CAAC,YAWO;AACV,CAAC"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/create-message.ts
@@ -1 +1 @@
1
- {"version":3,"file":"create-message.cjs","names":["z","action"],"sources":["../../src/actions/create-message.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateMessageInput = z.object({\n user: z.string().describe(\"Unique identifier for the end-user (max 128 characters).\").optional(),\n model: z.string().describe(\"Model identifier to use for generation. Example: 'anthropic/claude-4.5-sonnet-20250929'.\"),\n tools: z.array(z.object({\n name: z.string().describe(\"Name of the tool.\"),\n type: z.string().describe(\"Type of tool (default: 'function').\").optional(),\n description: z.string().describe(\"Description of the tool.\").optional(),\n input_schema: z.record(z.string(), z.unknown()).describe(\"JSON schema describing the tool's input parameters.\").optional(),\n}).passthrough().describe(\"Tool definition for function calling.\")).describe(\"List of tools available for the model to call.\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter.\").optional(),\n top_p: z.number().describe(\"Nucleus sampling probability between 0 and 1.\").optional(),\n models: z.array(z.string()).describe(\"List of fallback models to use if primary model fails.\").optional(),\n stream: z.boolean().describe(\"Whether to stream the response. Default false.\").optional(),\n system: z.union([z.string(), z.array(z.record(z.string(), z.unknown()))]).optional(),\n plugins: z.array(z.object({\n id: z.string().describe(\"Plugin identifier.\"),\n enabled: z.boolean().describe(\"Whether the plugin is enabled.\").optional(),\n}).passthrough().describe(\"Plugin configuration.\")).describe(\"Plugins to enable for this request.\").optional(),\n x_title: z.string().describe(\"App display name for OpenRouter dashboard.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"user\", \"assistant\"]).describe(\"Role of the message sender.\"),\n content: z.union([z.string(), z.array(z.object({\n text: z.string().nullable().optional(),\n type: z.string().describe(\"Type of content block (e.g., 'text', 'image').\"),\n source: z.record(z.string(), z.unknown()).nullable().optional(),\n}).passthrough().describe(\"Content block in a message.\"))]),\n}).passthrough().describe(\"Message in the conversation.\")).describe(\"List of conversation messages. Each message has a role ('user' or 'assistant') and content.\"),\n metadata: z.object({\n user_id: z.string().describe(\"Unique identifier for the user making the request.\").optional(),\n}).describe(\"Metadata for the request.\").optional(),\n provider: z.object({\n zdr: z.boolean().describe(\"Whether to restrict routing to only ZDR (Zero Data Retention) endpoints.\").optional(),\n allow_fallbacks: z.boolean().describe(\"Whether to allow backup providers when primary is unavailable. Default true.\").optional(),\n data_collection: z.enum([\"allow\", \"deny\"]).describe(\"Data collection preference for provider routing.\").optional(),\n require_parameters: z.boolean().describe(\"Whether to filter providers to only those that support all provided parameters.\").optional(),\n enforce_distillable_text: z.boolean().describe(\"Whether to restrict routing to only models that allow text distillation.\").optional(),\n}).describe(\"Provider routing preferences.\").optional(),\n thinking: z.object({\n type: z.string().describe(\"Type of thinking configuration.\"),\n budget_tokens: z.number().int().describe(\"Budget for thinking tokens.\").optional(),\n}).describe(\"Configuration for extended thinking.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate in the response.\"),\n session_id: z.string().describe(\"Unique identifier for grouping related requests (max 128 characters).\").optional(),\n temperature: z.number().describe(\"Sampling temperature between 0 and 2.\").optional(),\n tool_choice: z.object({\n name: z.string().describe(\"Name of specific tool to use (when type is 'tool').\").optional(),\n type: z.string().describe(\"Type of tool choice: 'auto', 'any', 'tool', etc.\"),\n disable_parallel_tool_use: z.boolean().describe(\"Whether to disable parallel tool use.\").optional(),\n}).describe(\"Tool choice configuration.\").optional(),\n http_referer: z.string().describe(\"App URL identifier used for tracking API usage per application.\").optional(),\n service_tier: z.enum([\"auto\", \"standard_only\"]).describe(\"Service tier for the request.\").optional(),\n output_config: z.object({\n effort: z.enum([\"low\", \"medium\", \"high\", \"max\"]).describe(\"Effort level for output generation.\").optional(),\n}).describe(\"Configuration for controlling output behavior.\").optional(),\n stop_sequences: z.array(z.string()).describe(\"Sequences where generation should stop.\").optional(),\n}).describe(\"Request to create a message using Anthropic Messages API format.\");\nconst OpenrouterCreateMessage_ResponseUsageSchema = z.object({\n input_tokens: z.number().int().describe(\"Number of input tokens.\").nullable(),\n output_tokens: z.number().int().describe(\"Number of output tokens.\").nullable(),\n cache_read_input_tokens: z.number().int().describe(\"Number of tokens read from cache.\").nullable().optional(),\n cache_creation_input_tokens: z.number().int().describe(\"Number of tokens used for cache creation.\").nullable().optional(),\n}).passthrough().describe(\"Token usage information.\");\nconst OpenrouterCreateMessage_ContentBlockSchema = z.object({\n text: z.string().describe(\"Text content if applicable.\").nullable().optional(),\n type: z.string().describe(\"Type of content block.\").nullable(),\n}).passthrough().describe(\"Content block in the response.\");\nexport const OpenrouterCreateMessageOutput = z.object({\n id: z.string().describe(\"Unique identifier for this message.\").nullable(),\n role: z.string().describe(\"Role of the response, typically 'assistant'.\").nullable(),\n type: z.string().describe(\"Object type, typically 'message'.\").nullable(),\n model: z.string().describe(\"Model that generated the response.\").nullable(),\n usage: OpenrouterCreateMessage_ResponseUsageSchema.nullable(),\n content: z.array(OpenrouterCreateMessage_ContentBlockSchema).describe(\"List of content blocks in the response.\"),\n stop_reason: z.string().describe(\"Reason why generation stopped.\").nullable().optional(),\n stop_sequence: z.string().describe(\"Stop sequence that triggered generation to stop.\").nullable().optional(),\n}).passthrough().describe(\"Response from creating a message.\");\n\nexport const openrouterCreateMessage = action(\"OPENROUTER_CREATE_MESSAGE\", {\n slug: \"openrouter-create-message\",\n name: \"Create Message (Anthropic Format)\",\n description: \"Tool to create a message using Anthropic Messages API format via OpenRouter. Use when you need Claude-compatible chat completion with support for text, images, PDFs, tools, and extended thinking.\",\n input: OpenrouterCreateMessageInput,\n output: OpenrouterCreateMessageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAC/F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0FAA0F;CACrH,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB;EAC7C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAC1E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;EACtE,cAAcA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CAC3H,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACtI,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CACvE,OAAOA,IAAAA,EAAE,OAA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,CAAC,SAAS,mCAAmC;AAE7D,MAAa,0BAA0BC,eAAAA,OAAO,6BAA6B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"create-message.cjs","names":["z","action"],"sources":["../../src/actions/create-message.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { openrouter } from \"../app\";\n\nexport const OpenrouterCreateMessageInput = z.object({\n user: z.string().describe(\"Unique identifier for the end-user (max 128 characters).\").optional(),\n model: z.string().describe(\"Model identifier to use for generation. Example: 'anthropic/claude-4.5-sonnet-20250929'.\"),\n tools: z.array(z.object({\n name: z.string().describe(\"Name of the tool.\"),\n type: z.string().describe(\"Type of tool (default: 'function').\").optional(),\n description: z.string().describe(\"Description of the tool.\").optional(),\n input_schema: z.record(z.string(), z.unknown()).describe(\"JSON schema describing the tool's input parameters.\").optional(),\n}).passthrough().describe(\"Tool definition for function calling.\")).describe(\"List of tools available for the model to call.\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter.\").optional(),\n top_p: z.number().describe(\"Nucleus sampling probability between 0 and 1.\").optional(),\n models: z.array(z.string()).describe(\"List of fallback models to use if primary model fails.\").optional(),\n stream: z.boolean().describe(\"Whether to stream the response. Default false.\").optional(),\n system: z.union([z.string(), z.array(z.record(z.string(), z.unknown()))]).optional(),\n plugins: z.array(z.object({\n id: z.string().describe(\"Plugin identifier.\"),\n enabled: z.boolean().describe(\"Whether the plugin is enabled.\").optional(),\n}).passthrough().describe(\"Plugin configuration.\")).describe(\"Plugins to enable for this request.\").optional(),\n x_title: z.string().describe(\"App display name for OpenRouter dashboard.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"user\", \"assistant\"]).describe(\"Role of the message sender.\"),\n content: z.union([z.string(), z.array(z.object({\n text: z.string().nullable().optional(),\n type: z.string().describe(\"Type of content block (e.g., 'text', 'image').\"),\n source: z.record(z.string(), z.unknown()).nullable().optional(),\n}).passthrough().describe(\"Content block in a message.\"))]),\n}).passthrough().describe(\"Message in the conversation.\")).describe(\"List of conversation messages. Each message has a role ('user' or 'assistant') and content.\"),\n metadata: z.object({\n user_id: z.string().describe(\"Unique identifier for the user making the request.\").optional(),\n}).describe(\"Metadata for the request.\").optional(),\n provider: z.object({\n zdr: z.boolean().describe(\"Whether to restrict routing to only ZDR (Zero Data Retention) endpoints.\").optional(),\n allow_fallbacks: z.boolean().describe(\"Whether to allow backup providers when primary is unavailable. Default true.\").optional(),\n data_collection: z.enum([\"allow\", \"deny\"]).describe(\"Data collection preference for provider routing.\").optional(),\n require_parameters: z.boolean().describe(\"Whether to filter providers to only those that support all provided parameters.\").optional(),\n enforce_distillable_text: z.boolean().describe(\"Whether to restrict routing to only models that allow text distillation.\").optional(),\n}).describe(\"Provider routing preferences.\").optional(),\n thinking: z.object({\n type: z.string().describe(\"Type of thinking configuration.\"),\n budget_tokens: z.number().int().describe(\"Budget for thinking tokens.\").optional(),\n}).describe(\"Configuration for extended thinking.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate in the response.\"),\n session_id: z.string().describe(\"Unique identifier for grouping related requests (max 128 characters).\").optional(),\n temperature: z.number().describe(\"Sampling temperature between 0 and 2.\").optional(),\n tool_choice: z.object({\n name: z.string().describe(\"Name of specific tool to use (when type is 'tool').\").optional(),\n type: z.string().describe(\"Type of tool choice: 'auto', 'any', 'tool', etc.\"),\n disable_parallel_tool_use: z.boolean().describe(\"Whether to disable parallel tool use.\").optional(),\n}).describe(\"Tool choice configuration.\").optional(),\n http_referer: z.string().describe(\"App URL identifier used for tracking API usage per application.\").optional(),\n service_tier: z.enum([\"auto\", \"standard_only\"]).describe(\"Service tier for the request.\").optional(),\n output_config: z.object({\n effort: z.enum([\"low\", \"medium\", \"high\", \"max\"]).describe(\"Effort level for output generation.\").optional(),\n}).describe(\"Configuration for controlling output behavior.\").optional(),\n stop_sequences: z.array(z.string()).describe(\"Sequences where generation should stop.\").optional(),\n}).describe(\"Request to create a message using Anthropic Messages API format.\");\nconst OpenrouterCreateMessage_ResponseUsageSchema = z.object({\n input_tokens: z.number().int().describe(\"Number of input tokens.\").nullable(),\n output_tokens: z.number().int().describe(\"Number of output tokens.\").nullable(),\n cache_read_input_tokens: z.number().int().describe(\"Number of tokens read from cache.\").nullable().optional(),\n cache_creation_input_tokens: z.number().int().describe(\"Number of tokens used for cache creation.\").nullable().optional(),\n}).passthrough().describe(\"Token usage information.\");\nconst OpenrouterCreateMessage_ContentBlockSchema = z.object({\n text: z.string().describe(\"Text content if applicable.\").nullable().optional(),\n type: z.string().describe(\"Type of content block.\").nullable(),\n}).passthrough().describe(\"Content block in the response.\");\nexport const OpenrouterCreateMessageOutput = z.object({\n id: z.string().describe(\"Unique identifier for this message.\").nullable(),\n role: z.string().describe(\"Role of the response, typically 'assistant'.\").nullable(),\n type: z.string().describe(\"Object type, typically 'message'.\").nullable(),\n model: z.string().describe(\"Model that generated the response.\").nullable(),\n usage: OpenrouterCreateMessage_ResponseUsageSchema.nullable(),\n content: z.array(OpenrouterCreateMessage_ContentBlockSchema).describe(\"List of content blocks in the response.\"),\n stop_reason: z.string().describe(\"Reason why generation stopped.\").nullable().optional(),\n stop_sequence: z.string().describe(\"Stop sequence that triggered generation to stop.\").nullable().optional(),\n}).passthrough().describe(\"Response from creating a message.\");\n\nexport const openrouterCreateMessage: AppAction<\n typeof OpenrouterCreateMessageInput,\n typeof OpenrouterCreateMessageOutput,\n typeof openrouter.credential\n> = action(\"OPENROUTER_CREATE_MESSAGE\", {\n slug: \"openrouter-create-message\",\n name: \"Create Message (Anthropic Format)\",\n description: \"Tool to create a message using Anthropic Messages API format via OpenRouter. Use when you need Claude-compatible chat completion with support for text, images, PDFs, tools, and extended thinking.\",\n input: OpenrouterCreateMessageInput,\n output: OpenrouterCreateMessageOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CAC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AAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;AAC/D,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gCAAgC;AAC1D,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CACxE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;CACnF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACxE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CAC1E,OAAO,4CAA4C,SAAS;CAC5D,SAASA,IAAAA,EAAE,MAAM,0CAA0C,CAAC,CAAC,SAAS,yCAAyC;CAC/G,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvF,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,mCAAmC;AAE7D,MAAa,0BAITC,eAAAA,OAAO,6BAA6B;CACtC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { openrouter } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/create-message.d.ts
@@ -89,66 +91,7 @@ declare const OpenrouterCreateMessageOutput: z.ZodObject<{
89
91
  stop_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
92
  stop_sequence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
93
  }, z.core.$loose>;
92
- declare const openrouterCreateMessage: import("@keystrokehq/action").WorkflowActionDefinition<{
93
- model: string;
94
- messages: {
95
- [x: string]: unknown;
96
- role: "user" | "assistant";
97
- content: string | {
98
- [x: string]: unknown;
99
- type: string;
100
- text?: string | null | undefined;
101
- source?: Record<string, unknown> | null | undefined;
102
- }[];
103
- }[];
104
- max_tokens: number;
105
- user?: string | undefined;
106
- tools?: {
107
- [x: string]: unknown;
108
- name: string;
109
- type?: string | undefined;
110
- description?: string | undefined;
111
- input_schema?: Record<string, unknown> | undefined;
112
- }[] | undefined;
113
- top_k?: number | undefined;
114
- top_p?: number | undefined;
115
- models?: string[] | undefined;
116
- stream?: boolean | undefined;
117
- system?: string | Record<string, unknown>[] | undefined;
118
- plugins?: {
119
- [x: string]: unknown;
120
- id: string;
121
- enabled?: boolean | undefined;
122
- }[] | undefined;
123
- x_title?: string | undefined;
124
- metadata?: {
125
- user_id?: string | undefined;
126
- } | undefined;
127
- provider?: {
128
- zdr?: boolean | undefined;
129
- allow_fallbacks?: boolean | undefined;
130
- data_collection?: "allow" | "deny" | undefined;
131
- require_parameters?: boolean | undefined;
132
- enforce_distillable_text?: boolean | undefined;
133
- } | undefined;
134
- thinking?: {
135
- type: string;
136
- budget_tokens?: number | undefined;
137
- } | undefined;
138
- session_id?: string | undefined;
139
- temperature?: number | undefined;
140
- tool_choice?: {
141
- type: string;
142
- name?: string | undefined;
143
- disable_parallel_tool_use?: boolean | undefined;
144
- } | undefined;
145
- http_referer?: string | undefined;
146
- service_tier?: "auto" | "standard_only" | undefined;
147
- output_config?: {
148
- effort?: "low" | "medium" | "high" | "max" | undefined;
149
- } | undefined;
150
- stop_sequences?: string[] | undefined;
151
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
94
+ declare const openrouterCreateMessage: AppAction<typeof OpenrouterCreateMessageInput, typeof OpenrouterCreateMessageOutput, typeof openrouter.credential>;
152
95
  //#endregion
153
96
  export { openrouterCreateMessage };
154
97
  //# sourceMappingURL=create-message.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-message.d.cts","names":[],"sources":["../../src/actions/create-message.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkE5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAW7B,uBAAA,gCAAuB,wBAAA"}
1
+ {"version":3,"file":"create-message.d.cts","names":[],"sources":["../../src/actions/create-message.ts"],"mappings":";;;;;cAMa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkE5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAW7B,uBAAA,EAAyB,SAAA,QAC7B,4BAAA,SACA,6BAAA,SACA,UAAA,CAAW,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { openrouter } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/create-message.d.ts
@@ -89,66 +91,7 @@ declare const OpenrouterCreateMessageOutput: z.ZodObject<{
89
91
  stop_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
92
  stop_sequence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
93
  }, z.core.$loose>;
92
- declare const openrouterCreateMessage: import("@keystrokehq/action").WorkflowActionDefinition<{
93
- model: string;
94
- messages: {
95
- [x: string]: unknown;
96
- role: "user" | "assistant";
97
- content: string | {
98
- [x: string]: unknown;
99
- type: string;
100
- text?: string | null | undefined;
101
- source?: Record<string, unknown> | null | undefined;
102
- }[];
103
- }[];
104
- max_tokens: number;
105
- user?: string | undefined;
106
- tools?: {
107
- [x: string]: unknown;
108
- name: string;
109
- type?: string | undefined;
110
- description?: string | undefined;
111
- input_schema?: Record<string, unknown> | undefined;
112
- }[] | undefined;
113
- top_k?: number | undefined;
114
- top_p?: number | undefined;
115
- models?: string[] | undefined;
116
- stream?: boolean | undefined;
117
- system?: string | Record<string, unknown>[] | undefined;
118
- plugins?: {
119
- [x: string]: unknown;
120
- id: string;
121
- enabled?: boolean | undefined;
122
- }[] | undefined;
123
- x_title?: string | undefined;
124
- metadata?: {
125
- user_id?: string | undefined;
126
- } | undefined;
127
- provider?: {
128
- zdr?: boolean | undefined;
129
- allow_fallbacks?: boolean | undefined;
130
- data_collection?: "allow" | "deny" | undefined;
131
- require_parameters?: boolean | undefined;
132
- enforce_distillable_text?: boolean | undefined;
133
- } | undefined;
134
- thinking?: {
135
- type: string;
136
- budget_tokens?: number | undefined;
137
- } | undefined;
138
- session_id?: string | undefined;
139
- temperature?: number | undefined;
140
- tool_choice?: {
141
- type: string;
142
- name?: string | undefined;
143
- disable_parallel_tool_use?: boolean | undefined;
144
- } | undefined;
145
- http_referer?: string | undefined;
146
- service_tier?: "auto" | "standard_only" | undefined;
147
- output_config?: {
148
- effort?: "low" | "medium" | "high" | "max" | undefined;
149
- } | undefined;
150
- stop_sequences?: string[] | undefined;
151
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
94
+ declare const openrouterCreateMessage: AppAction<typeof OpenrouterCreateMessageInput, typeof OpenrouterCreateMessageOutput, typeof openrouter.credential>;
152
95
  //#endregion
153
96
  export { openrouterCreateMessage };
154
97
  //# sourceMappingURL=create-message.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-message.d.mts","names":[],"sources":["../../src/actions/create-message.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkE5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAW7B,uBAAA,gCAAuB,wBAAA"}
1
+ {"version":3,"file":"create-message.d.mts","names":[],"sources":["../../src/actions/create-message.ts"],"mappings":";;;;;cAMa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkE5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAW7B,uBAAA,EAAyB,SAAA,QAC7B,4BAAA,SACA,6BAAA,SACA,UAAA,CAAW,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  //#region src/actions/create-message.ts