@keystrokehq/keystroke 0.0.173 → 0.0.175
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/action.cjs +2 -3
- package/dist/action.d.cts +3 -3
- package/dist/action.d.mts +3 -3
- package/dist/action.mjs +2 -2
- package/dist/agent.cjs +3 -3
- package/dist/agent.d.cts +2 -2
- package/dist/agent.d.mts +2 -2
- package/dist/agent.mjs +3 -3
- package/dist/app.cjs +36 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +52 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +52 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +35 -0
- package/dist/app.mjs.map +1 -0
- package/dist/client.cjs +3 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -0
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.mts +6 -0
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs +3 -1
- package/dist/client.mjs.map +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/credentials.cjs +2 -3
- package/dist/credentials.d.cts +2 -2
- package/dist/credentials.d.mts +2 -2
- package/dist/credentials.mjs +2 -2
- package/dist/{dist--zLOSTcG.cjs → dist-B3WT5qgl.cjs} +65 -64
- package/dist/dist-B3WT5qgl.cjs.map +1 -0
- package/dist/{dist-DT5CSOQc.mjs → dist-BwuyO3oY.mjs} +8 -10
- package/dist/dist-BwuyO3oY.mjs.map +1 -0
- package/dist/{dist-Dz0i7l87.cjs → dist-CIhk3fW1.cjs} +56 -63
- package/dist/dist-CIhk3fW1.cjs.map +1 -0
- package/dist/{dist-BF5yN9sB.mjs → dist-DgjcBE-O.mjs} +64 -51
- package/dist/dist-DgjcBE-O.mjs.map +1 -0
- package/dist/{dist-bGasqeNy.mjs → dist-itGeZOJp.mjs} +56 -63
- package/dist/dist-itGeZOJp.mjs.map +1 -0
- package/dist/{dist--dtTaEXy.cjs → dist-tKIYuAek.cjs} +8 -10
- package/dist/dist-tKIYuAek.cjs.map +1 -0
- package/dist/{index-s53YoTdO.d.cts → index-CPCPd4hJ.d.cts} +2 -2
- package/dist/{index-BDPrsenN.d.mts.map → index-CPCPd4hJ.d.cts.map} +1 -1
- package/dist/{index-BDPrsenN.d.mts → index-Cn6nUPtC.d.mts} +2 -2
- package/dist/{index-s53YoTdO.d.cts.map → index-Cn6nUPtC.d.mts.map} +1 -1
- package/dist/{index-uWH8vj_f.d.cts → index-DQfGP5X4.d.cts} +4 -4
- package/dist/{index-uWH8vj_f.d.cts.map → index-DQfGP5X4.d.cts.map} +1 -1
- package/dist/{index-B9hlxKDT.d.cts → index-DpOXmY3P.d.cts} +12 -9
- package/dist/index-DpOXmY3P.d.cts.map +1 -0
- package/dist/{index-1uEWGKCk.d.mts → index-DsDxuNfg.d.mts} +12 -9
- package/dist/index-DsDxuNfg.d.mts.map +1 -0
- package/dist/{index-BPC4loSM.d.mts → index-DykbAIg-.d.mts} +2 -2
- package/dist/index-DykbAIg-.d.mts.map +1 -0
- package/dist/{index-DvJmjY4X.d.mts → index-VCi-jUnh.d.mts} +4 -4
- package/dist/{index-DvJmjY4X.d.mts.map → index-VCi-jUnh.d.mts.map} +1 -1
- package/dist/{index-DAzE8I-g.d.cts → index-e9f4pcX4.d.cts} +15 -17
- package/dist/index-e9f4pcX4.d.cts.map +1 -0
- package/dist/{index-DAzE8I-g.d.mts → index-e9f4pcX4.d.mts} +15 -17
- package/dist/index-e9f4pcX4.d.mts.map +1 -0
- package/dist/{index-Ugto82oH.d.cts → index-nUAXCgEe.d.cts} +2 -2
- package/dist/index-nUAXCgEe.d.cts.map +1 -0
- package/dist/{mistral-D56Ydau-.mjs → mistral-MfzlP5Os.mjs} +2 -2
- package/dist/{mistral-D56Ydau-.mjs.map → mistral-MfzlP5Os.mjs.map} +1 -1
- package/dist/{mistral-GXPqP1mo.cjs → mistral-gBakFlvh.cjs} +2 -2
- package/dist/{mistral-GXPqP1mo.cjs.map → mistral-gBakFlvh.cjs.map} +1 -1
- package/dist/{sse-U_LwOMpt.mjs → sse-CFH10VfF.mjs} +2 -2
- package/dist/{sse-U_LwOMpt.mjs.map → sse-CFH10VfF.mjs.map} +1 -1
- package/dist/{sse-D1mtozXN.cjs → sse-CO21wkJ1.cjs} +2 -2
- package/dist/{sse-D1mtozXN.cjs.map → sse-CO21wkJ1.cjs.map} +1 -1
- package/dist/trigger.cjs +1 -1
- package/dist/trigger.d.cts +3 -3
- package/dist/trigger.d.mts +3 -3
- package/dist/trigger.mjs +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.d.cts +2 -2
- package/dist/workflow.d.mts +2 -2
- package/dist/workflow.mjs +1 -1
- package/package.json +7 -1
- package/dist/dist--dtTaEXy.cjs.map +0 -1
- package/dist/dist--zLOSTcG.cjs.map +0 -1
- package/dist/dist-BF5yN9sB.mjs.map +0 -1
- package/dist/dist-DT5CSOQc.mjs.map +0 -1
- package/dist/dist-Dz0i7l87.cjs.map +0 -1
- package/dist/dist-bGasqeNy.mjs.map +0 -1
- package/dist/index-1uEWGKCk.d.mts.map +0 -1
- package/dist/index-B9hlxKDT.d.cts.map +0 -1
- package/dist/index-BPC4loSM.d.mts.map +0 -1
- package/dist/index-DAzE8I-g.d.cts.map +0 -1
- package/dist/index-DAzE8I-g.d.mts.map +0 -1
- package/dist/index-Ugto82oH.d.cts.map +0 -1
package/dist/action.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist
|
|
3
|
-
exports.
|
|
4
|
-
exports.DEFAULT_CREDENTIAL_RESOLUTION_CHAIN = require_dist.DEFAULT_CREDENTIAL_RESOLUTION_CHAIN;
|
|
2
|
+
const require_dist = require("./dist-B3WT5qgl.cjs");
|
|
3
|
+
exports.CREDENTIAL_SCOPE_TYPES = require_dist.CREDENTIAL_SCOPE_TYPES;
|
|
5
4
|
exports.actionCoreSchema = require_dist.actionCoreSchema;
|
|
6
5
|
exports.createStepInvocation = require_dist.createStepInvocation;
|
|
7
6
|
exports.credential = require_dist.credential;
|
package/dist/action.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { C as runWithRunSignal, S as runOutsideActionExecution, _ as isAction, a as ResolveActionCredentialsFn, b as registerWorkflowRunGetter, c as WorkflowActionDefinition, d as createStepInvocation, f as defineAction, g as getWorkflowRunHandle, h as getRunSignal, i as AgentRunOptions, l as WorkflowRunHandle, m as getActionCredentialRequirements, n as ActionDefinition, o as ResolveActionToolOptions, p as executeAction, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as actionCoreSchema, v as isStepInvocation, w as runWithinActionExecution, x as resolveActionTool, y as isWithinActionExecution } from "./index-
|
|
3
|
-
export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions,
|
|
1
|
+
import { C as isCredentialInput, S as defineCredential, T as toCredentialRequirement, a as CredentialInput, b as credential, d as DefineOAuthCredentialInput, f as DefineStaticCredentialInput, l as CredentialScopeType, n as Credential, o as CredentialList, p as NormalizeCredential, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_TYPES, u as DefineCredentialInput, v as ResolvedCredentials, w as normalizeCredentialList, x as credentialInputSchema } from "./index-e9f4pcX4.cjs";
|
|
2
|
+
import { C as runWithRunSignal, S as runOutsideActionExecution, _ as isAction, a as ResolveActionCredentialsFn, b as registerWorkflowRunGetter, c as WorkflowActionDefinition, d as createStepInvocation, f as defineAction, g as getWorkflowRunHandle, h as getRunSignal, i as AgentRunOptions, l as WorkflowRunHandle, m as getActionCredentialRequirements, n as ActionDefinition, o as ResolveActionToolOptions, p as executeAction, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as actionCoreSchema, v as isStepInvocation, w as runWithinActionExecution, x as resolveActionTool, y as isWithinActionExecution } from "./index-DpOXmY3P.cjs";
|
|
3
|
+
export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_TYPES, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeType, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, type WorkflowRunHandle, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getRunSignal, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithRunSignal, runWithinActionExecution, toCredentialRequirement };
|
package/dist/action.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { C as runWithRunSignal, S as runOutsideActionExecution, _ as isAction, a as ResolveActionCredentialsFn, b as registerWorkflowRunGetter, c as WorkflowActionDefinition, d as createStepInvocation, f as defineAction, g as getWorkflowRunHandle, h as getRunSignal, i as AgentRunOptions, l as WorkflowRunHandle, m as getActionCredentialRequirements, n as ActionDefinition, o as ResolveActionToolOptions, p as executeAction, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as actionCoreSchema, v as isStepInvocation, w as runWithinActionExecution, x as resolveActionTool, y as isWithinActionExecution } from "./index-
|
|
3
|
-
export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions,
|
|
1
|
+
import { C as isCredentialInput, S as defineCredential, T as toCredentialRequirement, a as CredentialInput, b as credential, d as DefineOAuthCredentialInput, f as DefineStaticCredentialInput, l as CredentialScopeType, n as Credential, o as CredentialList, p as NormalizeCredential, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_TYPES, u as DefineCredentialInput, v as ResolvedCredentials, w as normalizeCredentialList, x as credentialInputSchema } from "./index-e9f4pcX4.mjs";
|
|
2
|
+
import { C as runWithRunSignal, S as runOutsideActionExecution, _ as isAction, a as ResolveActionCredentialsFn, b as registerWorkflowRunGetter, c as WorkflowActionDefinition, d as createStepInvocation, f as defineAction, g as getWorkflowRunHandle, h as getRunSignal, i as AgentRunOptions, l as WorkflowRunHandle, m as getActionCredentialRequirements, n as ActionDefinition, o as ResolveActionToolOptions, p as executeAction, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as actionCoreSchema, v as isStepInvocation, w as runWithinActionExecution, x as resolveActionTool, y as isWithinActionExecution } from "./index-DsDxuNfg.mjs";
|
|
3
|
+
export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_TYPES, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeType, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, type WorkflowRunHandle, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getRunSignal, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithRunSignal, runWithinActionExecution, toCredentialRequirement };
|
package/dist/action.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
export {
|
|
1
|
+
import { C as toCredentialRequirement, S as normalizeCredentialList, _ as credential, a as getActionCredentialRequirements, b as isCredentialInput, c as isAction, d as registerWorkflowRunGetter, f as resolveActionTool, g as CREDENTIAL_SCOPE_TYPES, h as runWithinActionExecution, i as executeAction, l as isStepInvocation, m as runWithRunSignal, n as createStepInvocation, o as getRunSignal, p as runOutsideActionExecution, r as defineAction, s as getWorkflowRunHandle, t as actionCoreSchema, u as isWithinActionExecution, v as credentialInputSchema, y as defineCredential } from "./dist-DgjcBE-O.mjs";
|
|
2
|
+
export { CREDENTIAL_SCOPE_TYPES, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getRunSignal, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithRunSignal, runWithinActionExecution, toCredentialRequirement };
|
package/dist/agent.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-DHdmVzO2.cjs");
|
|
3
|
-
const require_dist$1 = require("./dist
|
|
3
|
+
const require_dist$1 = require("./dist-B3WT5qgl.cjs");
|
|
4
4
|
const require_dist$2 = require("./dist-CLr3qkxM.cjs");
|
|
5
5
|
require("./env-api-keys-BFptfIIs.cjs");
|
|
6
6
|
const require_event_stream = require("./event-stream-CS-ls7wC.cjs");
|
|
7
7
|
require("./json-parse-TT8Vr6d3.cjs");
|
|
8
|
-
const require_dist$3 = require("./dist-
|
|
8
|
+
const require_dist$3 = require("./dist-CIhk3fW1.cjs");
|
|
9
9
|
let zod = require("zod");
|
|
10
10
|
let node_async_hooks = require("node:async_hooks");
|
|
11
11
|
let node_fs = require("node:fs");
|
|
@@ -902,7 +902,7 @@ function loadGoogleVertexProviderModule() {
|
|
|
902
902
|
return googleVertexProviderModulePromise;
|
|
903
903
|
}
|
|
904
904
|
function loadMistralProviderModule() {
|
|
905
|
-
mistralProviderModulePromise ||= Promise.resolve().then(() => require("./mistral-
|
|
905
|
+
mistralProviderModulePromise ||= Promise.resolve().then(() => require("./mistral-gBakFlvh.cjs")).then((module) => {
|
|
906
906
|
const provider = module;
|
|
907
907
|
return {
|
|
908
908
|
stream: provider.streamMistral,
|
package/dist/agent.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { l as ThinkingLevel, u as getModel } from "./index-BByNfhJU.cjs";
|
|
2
|
-
import { A as loadAssetManifest, B as runLlm, C as createAgent, D as errorMessage, E as defineTool, F as resolveAgentAssets, G as AgentModelIdSchema, H as AgentCreateInput, I as resolveAgentId, J as parseAgentCreateInput, K as DEFAULT_THINKING_LEVEL, L as resolveAgentTools, M as normalizeAgentDefinition, N as prepareAgentSession, O as forceToolChoice, P as prompt, R as resolveAgentWorkspaceRoot, S as buildAgentRuntime, T as defineSubagentTool, U as AgentCreateInputSchema, V as snapshot, W as AgentModelId, X as resolveThinkingLevel, Y as resolveAgentModel, _ as SessionAgentMismatchError, a as AgentDefinitionInput, b as SubagentToolInherit, c as BuildAgentRuntimeContext, d as PromptInput, f as PromptResponse, g as SandboxedAgentRuntime, h as SUBAGENT_TOOL, i as AgentDefinition, j as messages, k as getSubagentToolMetadata, l as DefineSubagentToolInput, m as RunAgentPromptOptions, n as AgentAssetInput, o as AgentRuntime, p as ResolvedAgentAssets, q as ThinkingLevelSchema, r as AgentConfig, s as AgentSnapshot, t as Agent, u as ForcedToolChoice, v as SubagentTool, w as defineAgent, x as SubagentToolMetadata, y as SubagentToolDetails, z as runAgentPrompt } from "./index-
|
|
3
|
-
import { a as McpDefinition, c as McpServerOptions, d as McpTransport, f as connectMcpDefinition, g as isMcp, h as defineMcp, i as McpConnection, l as McpStdioOptions, m as connectMcpStdio, n as McpAuthOptions, o as McpDefinitionInput, p as connectMcpServer, r as McpCallToolOptions, s as McpHttpTransport, t as ToolCredentialResolver, u as McpStdioTransport } from "./index-
|
|
2
|
+
import { A as loadAssetManifest, B as runLlm, C as createAgent, D as errorMessage, E as defineTool, F as resolveAgentAssets, G as AgentModelIdSchema, H as AgentCreateInput, I as resolveAgentId, J as parseAgentCreateInput, K as DEFAULT_THINKING_LEVEL, L as resolveAgentTools, M as normalizeAgentDefinition, N as prepareAgentSession, O as forceToolChoice, P as prompt, R as resolveAgentWorkspaceRoot, S as buildAgentRuntime, T as defineSubagentTool, U as AgentCreateInputSchema, V as snapshot, W as AgentModelId, X as resolveThinkingLevel, Y as resolveAgentModel, _ as SessionAgentMismatchError, a as AgentDefinitionInput, b as SubagentToolInherit, c as BuildAgentRuntimeContext, d as PromptInput, f as PromptResponse, g as SandboxedAgentRuntime, h as SUBAGENT_TOOL, i as AgentDefinition, j as messages, k as getSubagentToolMetadata, l as DefineSubagentToolInput, m as RunAgentPromptOptions, n as AgentAssetInput, o as AgentRuntime, p as ResolvedAgentAssets, q as ThinkingLevelSchema, r as AgentConfig, s as AgentSnapshot, t as Agent, u as ForcedToolChoice, v as SubagentTool, w as defineAgent, x as SubagentToolMetadata, y as SubagentToolDetails, z as runAgentPrompt } from "./index-DQfGP5X4.cjs";
|
|
3
|
+
import { a as McpDefinition, c as McpServerOptions, d as McpTransport, f as connectMcpDefinition, g as isMcp, h as defineMcp, i as McpConnection, l as McpStdioOptions, m as connectMcpStdio, n as McpAuthOptions, o as McpDefinitionInput, p as connectMcpServer, r as McpCallToolOptions, s as McpHttpTransport, t as ToolCredentialResolver, u as McpStdioTransport } from "./index-nUAXCgEe.cjs";
|
|
4
4
|
export { type Agent, type AgentAssetInput, type AgentConfig, type AgentCreateInput, AgentCreateInputSchema, type AgentDefinition, type AgentDefinitionInput, type AgentModelId, AgentModelIdSchema, type AgentRuntime, type AgentSnapshot, type BuildAgentRuntimeContext, DEFAULT_THINKING_LEVEL, type DefineSubagentToolInput, type ForcedToolChoice, type McpAuthOptions, type McpCallToolOptions, type McpConnection, type McpDefinition, type McpDefinitionInput, type McpHttpTransport, type McpServerOptions, type McpStdioOptions, type McpStdioTransport, type McpTransport, type PromptInput, type PromptResponse, type ResolvedAgentAssets, type RunAgentPromptOptions, SUBAGENT_TOOL, type SandboxedAgentRuntime, SessionAgentMismatchError, type SubagentTool, type SubagentToolDetails, type SubagentToolInherit, type SubagentToolMetadata, type ThinkingLevel, ThinkingLevelSchema, type ToolCredentialResolver, buildAgentRuntime, connectMcpDefinition, connectMcpServer, connectMcpStdio, createAgent, defineAgent, defineMcp, defineSubagentTool, defineTool, errorMessage, forceToolChoice, getModel, getSubagentToolMetadata, isMcp, loadAssetManifest, messages, normalizeAgentDefinition, parseAgentCreateInput, prepareAgentSession, prompt, resolveAgentAssets, resolveAgentId, resolveAgentModel, resolveAgentTools, resolveAgentWorkspaceRoot, resolveThinkingLevel, runAgentPrompt, runLlm, snapshot };
|
package/dist/agent.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { l as ThinkingLevel, u as getModel } from "./index-D37gqyek.mjs";
|
|
2
|
-
import { A as loadAssetManifest, B as runLlm, C as createAgent, D as errorMessage, E as defineTool, F as resolveAgentAssets, G as AgentModelIdSchema, H as AgentCreateInput, I as resolveAgentId, J as parseAgentCreateInput, K as DEFAULT_THINKING_LEVEL, L as resolveAgentTools, M as normalizeAgentDefinition, N as prepareAgentSession, O as forceToolChoice, P as prompt, R as resolveAgentWorkspaceRoot, S as buildAgentRuntime, T as defineSubagentTool, U as AgentCreateInputSchema, V as snapshot, W as AgentModelId, X as resolveThinkingLevel, Y as resolveAgentModel, _ as SessionAgentMismatchError, a as AgentDefinitionInput, b as SubagentToolInherit, c as BuildAgentRuntimeContext, d as PromptInput, f as PromptResponse, g as SandboxedAgentRuntime, h as SUBAGENT_TOOL, i as AgentDefinition, j as messages, k as getSubagentToolMetadata, l as DefineSubagentToolInput, m as RunAgentPromptOptions, n as AgentAssetInput, o as AgentRuntime, p as ResolvedAgentAssets, q as ThinkingLevelSchema, r as AgentConfig, s as AgentSnapshot, t as Agent, u as ForcedToolChoice, v as SubagentTool, w as defineAgent, x as SubagentToolMetadata, y as SubagentToolDetails, z as runAgentPrompt } from "./index-
|
|
3
|
-
import { a as McpDefinition, c as McpServerOptions, d as McpTransport, f as connectMcpDefinition, g as isMcp, h as defineMcp, i as McpConnection, l as McpStdioOptions, m as connectMcpStdio, n as McpAuthOptions, o as McpDefinitionInput, p as connectMcpServer, r as McpCallToolOptions, s as McpHttpTransport, t as ToolCredentialResolver, u as McpStdioTransport } from "./index-
|
|
2
|
+
import { A as loadAssetManifest, B as runLlm, C as createAgent, D as errorMessage, E as defineTool, F as resolveAgentAssets, G as AgentModelIdSchema, H as AgentCreateInput, I as resolveAgentId, J as parseAgentCreateInput, K as DEFAULT_THINKING_LEVEL, L as resolveAgentTools, M as normalizeAgentDefinition, N as prepareAgentSession, O as forceToolChoice, P as prompt, R as resolveAgentWorkspaceRoot, S as buildAgentRuntime, T as defineSubagentTool, U as AgentCreateInputSchema, V as snapshot, W as AgentModelId, X as resolveThinkingLevel, Y as resolveAgentModel, _ as SessionAgentMismatchError, a as AgentDefinitionInput, b as SubagentToolInherit, c as BuildAgentRuntimeContext, d as PromptInput, f as PromptResponse, g as SandboxedAgentRuntime, h as SUBAGENT_TOOL, i as AgentDefinition, j as messages, k as getSubagentToolMetadata, l as DefineSubagentToolInput, m as RunAgentPromptOptions, n as AgentAssetInput, o as AgentRuntime, p as ResolvedAgentAssets, q as ThinkingLevelSchema, r as AgentConfig, s as AgentSnapshot, t as Agent, u as ForcedToolChoice, v as SubagentTool, w as defineAgent, x as SubagentToolMetadata, y as SubagentToolDetails, z as runAgentPrompt } from "./index-VCi-jUnh.mjs";
|
|
3
|
+
import { a as McpDefinition, c as McpServerOptions, d as McpTransport, f as connectMcpDefinition, g as isMcp, h as defineMcp, i as McpConnection, l as McpStdioOptions, m as connectMcpStdio, n as McpAuthOptions, o as McpDefinitionInput, p as connectMcpServer, r as McpCallToolOptions, s as McpHttpTransport, t as ToolCredentialResolver, u as McpStdioTransport } from "./index-DykbAIg-.mjs";
|
|
4
4
|
export { type Agent, type AgentAssetInput, type AgentConfig, type AgentCreateInput, AgentCreateInputSchema, type AgentDefinition, type AgentDefinitionInput, type AgentModelId, AgentModelIdSchema, type AgentRuntime, type AgentSnapshot, type BuildAgentRuntimeContext, DEFAULT_THINKING_LEVEL, type DefineSubagentToolInput, type ForcedToolChoice, type McpAuthOptions, type McpCallToolOptions, type McpConnection, type McpDefinition, type McpDefinitionInput, type McpHttpTransport, type McpServerOptions, type McpStdioOptions, type McpStdioTransport, type McpTransport, type PromptInput, type PromptResponse, type ResolvedAgentAssets, type RunAgentPromptOptions, SUBAGENT_TOOL, type SandboxedAgentRuntime, SessionAgentMismatchError, type SubagentTool, type SubagentToolDetails, type SubagentToolInherit, type SubagentToolMetadata, type ThinkingLevel, ThinkingLevelSchema, type ToolCredentialResolver, buildAgentRuntime, connectMcpDefinition, connectMcpServer, connectMcpStdio, createAgent, defineAgent, defineMcp, defineSubagentTool, defineTool, errorMessage, forceToolChoice, getModel, getSubagentToolMetadata, isMcp, loadAssetManifest, messages, normalizeAgentDefinition, parseAgentCreateInput, prepareAgentSession, prompt, resolveAgentAssets, resolveAgentId, resolveAgentModel, resolveAgentTools, resolveAgentWorkspaceRoot, resolveThinkingLevel, runAgentPrompt, runLlm, snapshot };
|
package/dist/agent.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $ as Options, $t as IsMap, An as IsSymbol$1, At as Unreachable, Bn as __require, Bt as IsRef$1, Cn as IsMinLength$2, Ct as IsInteger$2, Dn as IsObject$1, Dt as IsCodec, En as IsNumber$1, Et as IsBigInt$2, Fn as Symbols, Ft as IsUnion, G as ensureWorkspaceDir, Gt as IsArray$2, Ht as IsFunction$2, In as guard_exports, It as Union, Jt as IsOptional, K as materializeSandbox, Kt as Base, Ln as __commonJSMin, Lt as IsObject$2, Mn as IsUnsafePropertyKey, Mt as IsEnum$1, Nn as IsValueLike, Nt as IsCyclic, On as IsObjectNotArray$1, Ot as Hash, Pn as Keys$1, Pt as Unknown, Q as Instantiate, Qt as Get$3, Rt as _Object_, Sn as IsMaxLength$2, St as IsIterator$2, Tn as IsNull$1, Tt as IsBoolean$2, Ut as IsConstructor$2, Vt as Ref$1, W as defineSandbox, Wt as IsAsyncIterator$2, X as resolveSandboxRoot, Xt as IsPromise, Yt as Optional, Z as Evaluate$1, Zt as IsSchema$1, _n as IsGreaterThan$1, _t as IsLiteralBigInt, a as createSandbox, an as EveryAll, at as RecordPattern, bn as IsLessEqualThan$1, bt as IsLiteralString, c as defineTool$1, cn as IsAsyncIterator$1, ct as EnumToUnion, d as resolveRunProvider, dn as IsClassInstance, dt as String$1, en as IsSet, et as Compare, fn as IsConstructor$1, ft as IsSymbol$2, gn as IsGreaterEqualThan$1, gt as IsLiteral, hn as IsFunction$1, ht as IsNull$2, i as createJustBashProvider, in as Every$1, it as IsRecord, jn as IsUndefined$1, jt as IsIntersect, kn as IsString$1, kt as hash_exports, ln as IsBigInt$1, lt as TemplateLiteralDecode, mn as IsEqual$1, mt as Number$1, nn as Entries$2, nt as IsVoid, o as defaultWorkspacesRoot, on as HasPropertyKey$1, ot as RecordValue, pn as IsDeepEqual$1, pt as IsNumber$2, q as packAssetDirs, qt as IsBase, r as createInvokeToolBridge, rn as EntriesRegExp, rt as IsUndefined$2, s as defineSkill, sn as IsArray$1, st as IsTuple, tn as IsTypeArray, tt as IsTemplateLiteral, u as materializeSkills, un as IsBoolean$1, ut as IsString$2, vn as IsInteger$1, vt as IsLiteralBoolean, wn as IsMultipleOf$1, wt as Boolean$1, xn as IsLessThan$1, xt as Literal, yn as IsIterator$1, yt as IsLiteralNumber, zn as __exportAll, zt as IsNever } from "./dist-IaCcrwur.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { c as isAction, f as resolveActionTool, o as getRunSignal, s as getWorkflowRunHandle, u as isWithinActionExecution, w as toolParameters } from "./dist-DgjcBE-O.mjs";
|
|
3
3
|
import "./env-api-keys-mSUt6vw1.mjs";
|
|
4
4
|
import { i as getModel, t as AssistantMessageEventStream } from "./event-stream-C7YBbzsc.mjs";
|
|
5
5
|
import "./json-parse-DzekVFUW.mjs";
|
|
6
|
-
import { C as connectMcpStdio, S as connectMcpServer, T as isMcp, _ as captureConsole, a as resolveActionCredentials, b as withSpan, c as addAgentSessionDuration, d as getAgentByRoute, f as getSession, g as touchSession, h as resolveRunSourceFromTraceContext, i as isCredentialError, l as appendEvent, m as recordLlmUsageFromAssistantMessage, n as captureCredentialToolErrors, o as resolveMcpTools, p as listMessageEvents, r as createCredentialResolver, s as MESSAGE_EVENT_TYPE$1, t as buildCredentialRunContext, u as createSession, v as getTraceContext, w as defineMcp, x as connectMcpDefinition } from "./dist-
|
|
6
|
+
import { C as connectMcpStdio, S as connectMcpServer, T as isMcp, _ as captureConsole, a as resolveActionCredentials, b as withSpan, c as addAgentSessionDuration, d as getAgentByRoute, f as getSession, g as touchSession, h as resolveRunSourceFromTraceContext, i as isCredentialError, l as appendEvent, m as recordLlmUsageFromAssistantMessage, n as captureCredentialToolErrors, o as resolveMcpTools, p as listMessageEvents, r as createCredentialResolver, s as MESSAGE_EVENT_TYPE$1, t as buildCredentialRunContext, u as createSession, v as getTraceContext, w as defineMcp, x as connectMcpDefinition } from "./dist-itGeZOJp.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -900,7 +900,7 @@ function loadGoogleVertexProviderModule() {
|
|
|
900
900
|
return googleVertexProviderModulePromise;
|
|
901
901
|
}
|
|
902
902
|
function loadMistralProviderModule() {
|
|
903
|
-
mistralProviderModulePromise ||= import("./mistral-
|
|
903
|
+
mistralProviderModulePromise ||= import("./mistral-MfzlP5Os.mjs").then((module) => {
|
|
904
904
|
const provider = module;
|
|
905
905
|
return {
|
|
906
906
|
stream: provider.streamMistral,
|
package/dist/app.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_dist = require("./dist-B3WT5qgl.cjs");
|
|
3
|
+
require("zod");
|
|
4
|
+
//#region ../app/dist/index.mjs
|
|
5
|
+
function appCredentialFor(slug, input) {
|
|
6
|
+
if (input.auth === "api_key") return require_dist.credential.static(slug, input.credential);
|
|
7
|
+
if (input.auth === "oauth") return input.tokenField !== void 0 ? require_dist.credential.oauth(slug, { tokenField: input.tokenField }) : require_dist.credential.oauth(slug);
|
|
8
|
+
return require_dist.credential.keystroke(slug);
|
|
9
|
+
}
|
|
10
|
+
function defineApp(input) {
|
|
11
|
+
const slug = input.slug.trim();
|
|
12
|
+
if (!slug) throw new Error("defineApp requires a non-empty slug");
|
|
13
|
+
const auth = input.auth ?? "keystroke";
|
|
14
|
+
const appCredential = appCredentialFor(slug, input);
|
|
15
|
+
function action(def) {
|
|
16
|
+
return require_dist.defineAction({
|
|
17
|
+
slug: def.slug,
|
|
18
|
+
...def.name !== void 0 ? { name: def.name } : {},
|
|
19
|
+
...def.description !== void 0 ? { description: def.description } : {},
|
|
20
|
+
input: def.input,
|
|
21
|
+
output: def.output,
|
|
22
|
+
credentials: [appCredential],
|
|
23
|
+
run: def.run
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
slug,
|
|
28
|
+
auth,
|
|
29
|
+
credential: appCredential,
|
|
30
|
+
action
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.defineApp = defineApp;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=app.cjs.map
|
package/dist/app.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.cjs","names":["credential","defineAction"],"sources":["../../app/dist/index.mjs"],"sourcesContent":["import { credential, defineAction } from \"@keystrokehq/action\";\nimport \"zod\";\n//#region src/define-app.ts\nfunction appCredentialFor(slug, input) {\n\tif (input.auth === \"api_key\") return credential.static(slug, input.credential);\n\tif (input.auth === \"oauth\") return input.tokenField !== void 0 ? credential.oauth(slug, { tokenField: input.tokenField }) : credential.oauth(slug);\n\treturn credential.keystroke(slug);\n}\nfunction defineApp(input) {\n\tconst slug = input.slug.trim();\n\tif (!slug) throw new Error(\"defineApp requires a non-empty slug\");\n\tconst auth = input.auth ?? \"keystroke\";\n\tconst appCredential = appCredentialFor(slug, input);\n\tfunction action(def) {\n\t\treturn defineAction({\n\t\t\tslug: def.slug,\n\t\t\t...def.name !== void 0 ? { name: def.name } : {},\n\t\t\t...def.description !== void 0 ? { description: def.description } : {},\n\t\t\tinput: def.input,\n\t\t\toutput: def.output,\n\t\t\tcredentials: [appCredential],\n\t\t\trun: def.run\n\t\t});\n\t}\n\treturn {\n\t\tslug,\n\t\tauth,\n\t\tcredential: appCredential,\n\t\taction\n\t};\n}\n//#endregion\nexport { defineApp };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;AAGA,SAAS,iBAAiB,MAAM,OAAO;CACtC,IAAI,MAAM,SAAS,WAAW,OAAOA,aAAAA,WAAW,OAAO,MAAM,MAAM,UAAU;CAC7E,IAAI,MAAM,SAAS,SAAS,OAAO,MAAM,eAAe,KAAK,IAAIA,aAAAA,WAAW,MAAM,MAAM,EAAE,YAAY,MAAM,WAAW,CAAC,IAAIA,aAAAA,WAAW,MAAM,IAAI;CACjJ,OAAOA,aAAAA,WAAW,UAAU,IAAI;AACjC;AACA,SAAS,UAAU,OAAO;CACzB,MAAM,OAAO,MAAM,KAAK,KAAK;CAC7B,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,qCAAqC;CAChE,MAAM,OAAO,MAAM,QAAQ;CAC3B,MAAM,gBAAgB,iBAAiB,MAAM,KAAK;CAClD,SAAS,OAAO,KAAK;EACpB,OAAOC,aAAAA,aAAa;GACnB,MAAM,IAAI;GACV,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;GAC/C,GAAG,IAAI,gBAAgB,KAAK,IAAI,EAAE,aAAa,IAAI,YAAY,IAAI,CAAC;GACpE,OAAO,IAAI;GACX,QAAQ,IAAI;GACZ,aAAa,CAAC,aAAa;GAC3B,KAAK,IAAI;EACV,CAAC;CACF;CACA,OAAO;EACN;EACA;EACA,YAAY;EACZ;CACD;AACD"}
|
package/dist/app.d.cts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { n as Credential, v as ResolvedCredentials } from "./index-e9f4pcX4.cjs";
|
|
2
|
+
import { c as WorkflowActionDefinition, r as ActionDefinitionInput } from "./index-DpOXmY3P.cjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region ../app/dist/index.d.mts
|
|
6
|
+
//#region src/define-app.d.ts
|
|
7
|
+
/** Auth strategy an app templates onto its credential instances. */
|
|
8
|
+
type AppAuthKind = "keystroke" | "api_key" | "oauth";
|
|
9
|
+
/** Keystroke MCP app — actions resolve the keystroke credential keyed by slug. */
|
|
10
|
+
type DefineKeystrokeAppInput = {
|
|
11
|
+
/** App + credential key (e.g. `github`). Matches `credential_instances.slug`. */slug: string;
|
|
12
|
+
auth?: "keystroke";
|
|
13
|
+
};
|
|
14
|
+
/** Direct-HTTP app — each `action()` owns its `run` and reads the static credential. */
|
|
15
|
+
type DefineApiKeyAppInput = {
|
|
16
|
+
slug: string;
|
|
17
|
+
auth: "api_key"; /** Vault credential fields (e.g. `{ apiKey: z.string() }`). */
|
|
18
|
+
credential: Record<string, z.ZodTypeAny>;
|
|
19
|
+
};
|
|
20
|
+
/** OAuth-managed app — each `action()` reads the resolved token. */
|
|
21
|
+
type DefineOAuthAppInput = {
|
|
22
|
+
slug: string;
|
|
23
|
+
auth: "oauth"; /** Token field exposed to actions (defaults to `accessToken`). */
|
|
24
|
+
tokenField?: string;
|
|
25
|
+
};
|
|
26
|
+
type DefineAppInput = DefineKeystrokeAppInput | DefineApiKeyAppInput | DefineOAuthAppInput;
|
|
27
|
+
/** Authoring shape for `app.action()` — `defineAction` with the app credential pre-bound. */
|
|
28
|
+
type AppActionDefinition<TInput extends z.ZodType, TOutput extends z.ZodType, TCred extends Credential> = Omit<ActionDefinitionInput<TInput, TOutput, ResolvedCredentials<readonly [TCred]>>, "credentials">;
|
|
29
|
+
type App<TCred extends Credential = Credential> = {
|
|
30
|
+
readonly slug: string;
|
|
31
|
+
readonly auth: AppAuthKind; /** Credential ref every action on this app declares — templated from the app, not authored per use. */
|
|
32
|
+
readonly credential: TCred;
|
|
33
|
+
/**
|
|
34
|
+
* Define an action with its own `run`, reading the app credential. The result is an ordinary
|
|
35
|
+
* action — same credential resolution and `.scope()` binding as any other.
|
|
36
|
+
*/
|
|
37
|
+
action<TInput extends z.ZodType, TOutput extends z.ZodType>(def: AppActionDefinition<TInput, TOutput, TCred>): WorkflowActionDefinition<z.infer<TInput>, z.infer<TOutput>, ResolvedCredentials<readonly [TCred]>, readonly [TCred]>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Author a connectable app: one templated credential plus actions that declare it. The auth kind
|
|
41
|
+
* selects the credential shape (`keystroke` | `api_key` | `oauth`).
|
|
42
|
+
*/
|
|
43
|
+
declare function defineApp<S extends string, R extends Record<string, z.ZodTypeAny>>(input: {
|
|
44
|
+
slug: S;
|
|
45
|
+
auth: "api_key";
|
|
46
|
+
credential: R;
|
|
47
|
+
}): App<Credential<S, z.ZodObject<R>>>;
|
|
48
|
+
declare function defineApp(input: DefineOAuthAppInput): App;
|
|
49
|
+
declare function defineApp(input: DefineKeystrokeAppInput): App; //#endregion
|
|
50
|
+
//#endregion
|
|
51
|
+
export { type App, type AppActionDefinition, type AppAuthKind, type DefineApiKeyAppInput, type DefineAppInput, type DefineKeystrokeAppInput, type DefineOAuthAppInput, defineApp };
|
|
52
|
+
//# sourceMappingURL=app.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.cts","names":["ActionDefinitionInput","Credential","ResolvedCredentials","WorkflowActionDefinition","z","AppAuthKind","DefineKeystrokeAppInput","slug","auth","DefineApiKeyAppInput","ZodTypeAny","Record","credential","DefineOAuthAppInput","tokenField","DefineAppInput","AppActionDefinition","TInput","TOutput","TCred","ZodType","Omit","App","infer","action","def","defineApp","S","R","ZodObject","input"],"sources":["../../app/dist/index.d.mts"],"mappings":";;;;;;;KAKKK,WAAAA;;KAEAC,uBAAAA;EAFW,iFAGmEC,IAAAA;EACjFC,IAAI;AAAA;;KAGDC,oBAAAA;EACHF,IAAAA;EACAC,IAAAA,aALI;EAMJI,UAAAA,EAAYD,MAAM,SAASP,CAAAA,CAAEM,UAAAA;AAAAA;;KAG1BG,mBAAAA;EACHN,IAAAA;EACAC,IAAAA,WANAA;EAOAM,UAAAA;AAAAA;AAAAA,KAEGC,cAAAA,GAAiBT,uBAAAA,GAA0BG,oBAAAA,GAAuBI,mBAAAA;;KAElEG,mBAAAA,gBAAmCZ,CAAAA,CAAEgB,OAAAA,kBAAyBhB,CAAAA,CAAEgB,OAAAA,gBAAuBnB,UAAAA,IAAcoB,IAAAA,CAAKrB,qBAAAA,CAAsBiB,MAAAA,EAAQC,OAAAA,EAAShB,mBAAAA,WAA8BiB,KAAAA;AAAAA,KAC/KG,GAAAA,eAAkBrB,UAAAA,GAAaA,UAAAA;EAAAA,SACzBM,IAAAA;EAAAA,SACAC,IAAAA,EAAMH,WAAAA,EAVO;EAAA,SAWbO,UAAAA,EAAYO,KAAAA;EAXC;;;;EAgBtBK,MAAAA,gBAAsBpB,CAAAA,CAAEgB,OAAAA,kBAAyBhB,CAAAA,CAAEgB,OAAAA,EAASK,GAAAA,EAAKT,mBAAAA,CAAoBC,MAAAA,EAAQC,OAAAA,EAASC,KAAAA,IAAShB,wBAAAA,CAAyBC,CAAAA,CAAEmB,KAAAA,CAAMN,MAAAA,GAASb,CAAAA,CAAEmB,KAAAA,CAAML,OAAAA,GAAUhB,mBAAAA,WAA8BiB,KAAAA,cAAmBA,KAAAA;AAAAA;AAblN;;;;AAAA,iBAmBKO,SAAAA,6BAAsCf,MAAAA,SAAeP,CAAAA,CAAEM,UAAAA,EAAAA,CAAaoB,KAAAA;EACnFvB,IAAAA,EAAMoB,CAAAA;EACNnB,IAAAA;EACAI,UAAAA,EAAYgB,CAAAA;AAAAA,IACVN,GAAAA,CAAIrB,UAAAA,CAAW0B,CAAAA,EAAGvB,CAAAA,CAAEyB,SAAAA,CAAUD,CAAAA;AAAAA,iBACjBF,SAAAA,CAAUI,KAAAA,EAAOjB,mBAAAA,GAAsBS,GAAG;AAAA,iBAC1CI,SAAAA,CAAUI,KAAAA,EAAOxB,uBAAAA,GAA0BgB,GAAG"}
|
package/dist/app.d.mts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { n as Credential, v as ResolvedCredentials } from "./index-e9f4pcX4.mjs";
|
|
2
|
+
import { c as WorkflowActionDefinition, r as ActionDefinitionInput } from "./index-DsDxuNfg.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region ../app/dist/index.d.mts
|
|
6
|
+
//#region src/define-app.d.ts
|
|
7
|
+
/** Auth strategy an app templates onto its credential instances. */
|
|
8
|
+
type AppAuthKind = "keystroke" | "api_key" | "oauth";
|
|
9
|
+
/** Keystroke MCP app — actions resolve the keystroke credential keyed by slug. */
|
|
10
|
+
type DefineKeystrokeAppInput = {
|
|
11
|
+
/** App + credential key (e.g. `github`). Matches `credential_instances.slug`. */slug: string;
|
|
12
|
+
auth?: "keystroke";
|
|
13
|
+
};
|
|
14
|
+
/** Direct-HTTP app — each `action()` owns its `run` and reads the static credential. */
|
|
15
|
+
type DefineApiKeyAppInput = {
|
|
16
|
+
slug: string;
|
|
17
|
+
auth: "api_key"; /** Vault credential fields (e.g. `{ apiKey: z.string() }`). */
|
|
18
|
+
credential: Record<string, z.ZodTypeAny>;
|
|
19
|
+
};
|
|
20
|
+
/** OAuth-managed app — each `action()` reads the resolved token. */
|
|
21
|
+
type DefineOAuthAppInput = {
|
|
22
|
+
slug: string;
|
|
23
|
+
auth: "oauth"; /** Token field exposed to actions (defaults to `accessToken`). */
|
|
24
|
+
tokenField?: string;
|
|
25
|
+
};
|
|
26
|
+
type DefineAppInput = DefineKeystrokeAppInput | DefineApiKeyAppInput | DefineOAuthAppInput;
|
|
27
|
+
/** Authoring shape for `app.action()` — `defineAction` with the app credential pre-bound. */
|
|
28
|
+
type AppActionDefinition<TInput extends z.ZodType, TOutput extends z.ZodType, TCred extends Credential> = Omit<ActionDefinitionInput<TInput, TOutput, ResolvedCredentials<readonly [TCred]>>, "credentials">;
|
|
29
|
+
type App<TCred extends Credential = Credential> = {
|
|
30
|
+
readonly slug: string;
|
|
31
|
+
readonly auth: AppAuthKind; /** Credential ref every action on this app declares — templated from the app, not authored per use. */
|
|
32
|
+
readonly credential: TCred;
|
|
33
|
+
/**
|
|
34
|
+
* Define an action with its own `run`, reading the app credential. The result is an ordinary
|
|
35
|
+
* action — same credential resolution and `.scope()` binding as any other.
|
|
36
|
+
*/
|
|
37
|
+
action<TInput extends z.ZodType, TOutput extends z.ZodType>(def: AppActionDefinition<TInput, TOutput, TCred>): WorkflowActionDefinition<z.infer<TInput>, z.infer<TOutput>, ResolvedCredentials<readonly [TCred]>, readonly [TCred]>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Author a connectable app: one templated credential plus actions that declare it. The auth kind
|
|
41
|
+
* selects the credential shape (`keystroke` | `api_key` | `oauth`).
|
|
42
|
+
*/
|
|
43
|
+
declare function defineApp<S extends string, R extends Record<string, z.ZodTypeAny>>(input: {
|
|
44
|
+
slug: S;
|
|
45
|
+
auth: "api_key";
|
|
46
|
+
credential: R;
|
|
47
|
+
}): App<Credential<S, z.ZodObject<R>>>;
|
|
48
|
+
declare function defineApp(input: DefineOAuthAppInput): App;
|
|
49
|
+
declare function defineApp(input: DefineKeystrokeAppInput): App; //#endregion
|
|
50
|
+
//#endregion
|
|
51
|
+
export { type App, type AppActionDefinition, type AppAuthKind, type DefineApiKeyAppInput, type DefineAppInput, type DefineKeystrokeAppInput, type DefineOAuthAppInput, defineApp };
|
|
52
|
+
//# sourceMappingURL=app.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.mts","names":["ActionDefinitionInput","Credential","ResolvedCredentials","WorkflowActionDefinition","z","AppAuthKind","DefineKeystrokeAppInput","slug","auth","DefineApiKeyAppInput","ZodTypeAny","Record","credential","DefineOAuthAppInput","tokenField","DefineAppInput","AppActionDefinition","TInput","TOutput","TCred","ZodType","Omit","App","infer","action","def","defineApp","S","R","ZodObject","input"],"sources":["../../app/dist/index.d.mts"],"mappings":";;;;;;;KAKKK,WAAAA;;KAEAC,uBAAAA;EAFW,iFAGmEC,IAAAA;EACjFC,IAAI;AAAA;;KAGDC,oBAAAA;EACHF,IAAAA;EACAC,IAAAA,aALI;EAMJI,UAAAA,EAAYD,MAAM,SAASP,CAAAA,CAAEM,UAAAA;AAAAA;;KAG1BG,mBAAAA;EACHN,IAAAA;EACAC,IAAAA,WANAA;EAOAM,UAAAA;AAAAA;AAAAA,KAEGC,cAAAA,GAAiBT,uBAAAA,GAA0BG,oBAAAA,GAAuBI,mBAAAA;;KAElEG,mBAAAA,gBAAmCZ,CAAAA,CAAEgB,OAAAA,kBAAyBhB,CAAAA,CAAEgB,OAAAA,gBAAuBnB,UAAAA,IAAcoB,IAAAA,CAAKrB,qBAAAA,CAAsBiB,MAAAA,EAAQC,OAAAA,EAAShB,mBAAAA,WAA8BiB,KAAAA;AAAAA,KAC/KG,GAAAA,eAAkBrB,UAAAA,GAAaA,UAAAA;EAAAA,SACzBM,IAAAA;EAAAA,SACAC,IAAAA,EAAMH,WAAAA,EAVO;EAAA,SAWbO,UAAAA,EAAYO,KAAAA;EAXC;;;;EAgBtBK,MAAAA,gBAAsBpB,CAAAA,CAAEgB,OAAAA,kBAAyBhB,CAAAA,CAAEgB,OAAAA,EAASK,GAAAA,EAAKT,mBAAAA,CAAoBC,MAAAA,EAAQC,OAAAA,EAASC,KAAAA,IAAShB,wBAAAA,CAAyBC,CAAAA,CAAEmB,KAAAA,CAAMN,MAAAA,GAASb,CAAAA,CAAEmB,KAAAA,CAAML,OAAAA,GAAUhB,mBAAAA,WAA8BiB,KAAAA,cAAmBA,KAAAA;AAAAA;AAblN;;;;AAAA,iBAmBKO,SAAAA,6BAAsCf,MAAAA,SAAeP,CAAAA,CAAEM,UAAAA,EAAAA,CAAaoB,KAAAA;EACnFvB,IAAAA,EAAMoB,CAAAA;EACNnB,IAAAA;EACAI,UAAAA,EAAYgB,CAAAA;AAAAA,IACVN,GAAAA,CAAIrB,UAAAA,CAAW0B,CAAAA,EAAGvB,CAAAA,CAAEyB,SAAAA,CAAUD,CAAAA;AAAAA,iBACjBF,SAAAA,CAAUI,KAAAA,EAAOjB,mBAAAA,GAAsBS,GAAG;AAAA,iBAC1CI,SAAAA,CAAUI,KAAAA,EAAOxB,uBAAAA,GAA0BgB,GAAG"}
|
package/dist/app.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { _ as credential, r as defineAction } from "./dist-DgjcBE-O.mjs";
|
|
2
|
+
import "zod";
|
|
3
|
+
//#region ../app/dist/index.mjs
|
|
4
|
+
function appCredentialFor(slug, input) {
|
|
5
|
+
if (input.auth === "api_key") return credential.static(slug, input.credential);
|
|
6
|
+
if (input.auth === "oauth") return input.tokenField !== void 0 ? credential.oauth(slug, { tokenField: input.tokenField }) : credential.oauth(slug);
|
|
7
|
+
return credential.keystroke(slug);
|
|
8
|
+
}
|
|
9
|
+
function defineApp(input) {
|
|
10
|
+
const slug = input.slug.trim();
|
|
11
|
+
if (!slug) throw new Error("defineApp requires a non-empty slug");
|
|
12
|
+
const auth = input.auth ?? "keystroke";
|
|
13
|
+
const appCredential = appCredentialFor(slug, input);
|
|
14
|
+
function action(def) {
|
|
15
|
+
return defineAction({
|
|
16
|
+
slug: def.slug,
|
|
17
|
+
...def.name !== void 0 ? { name: def.name } : {},
|
|
18
|
+
...def.description !== void 0 ? { description: def.description } : {},
|
|
19
|
+
input: def.input,
|
|
20
|
+
output: def.output,
|
|
21
|
+
credentials: [appCredential],
|
|
22
|
+
run: def.run
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
slug,
|
|
27
|
+
auth,
|
|
28
|
+
credential: appCredential,
|
|
29
|
+
action
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { defineApp };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=app.mjs.map
|
package/dist/app.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.mjs","names":[],"sources":["../../app/dist/index.mjs"],"sourcesContent":["import { credential, defineAction } from \"@keystrokehq/action\";\nimport \"zod\";\n//#region src/define-app.ts\nfunction appCredentialFor(slug, input) {\n\tif (input.auth === \"api_key\") return credential.static(slug, input.credential);\n\tif (input.auth === \"oauth\") return input.tokenField !== void 0 ? credential.oauth(slug, { tokenField: input.tokenField }) : credential.oauth(slug);\n\treturn credential.keystroke(slug);\n}\nfunction defineApp(input) {\n\tconst slug = input.slug.trim();\n\tif (!slug) throw new Error(\"defineApp requires a non-empty slug\");\n\tconst auth = input.auth ?? \"keystroke\";\n\tconst appCredential = appCredentialFor(slug, input);\n\tfunction action(def) {\n\t\treturn defineAction({\n\t\t\tslug: def.slug,\n\t\t\t...def.name !== void 0 ? { name: def.name } : {},\n\t\t\t...def.description !== void 0 ? { description: def.description } : {},\n\t\t\tinput: def.input,\n\t\t\toutput: def.output,\n\t\t\tcredentials: [appCredential],\n\t\t\trun: def.run\n\t\t});\n\t}\n\treturn {\n\t\tslug,\n\t\tauth,\n\t\tcredential: appCredential,\n\t\taction\n\t};\n}\n//#endregion\nexport { defineApp };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;AAGA,SAAS,iBAAiB,MAAM,OAAO;CACtC,IAAI,MAAM,SAAS,WAAW,OAAO,WAAW,OAAO,MAAM,MAAM,UAAU;CAC7E,IAAI,MAAM,SAAS,SAAS,OAAO,MAAM,eAAe,KAAK,IAAI,WAAW,MAAM,MAAM,EAAE,YAAY,MAAM,WAAW,CAAC,IAAI,WAAW,MAAM,IAAI;CACjJ,OAAO,WAAW,UAAU,IAAI;AACjC;AACA,SAAS,UAAU,OAAO;CACzB,MAAM,OAAO,MAAM,KAAK,KAAK;CAC7B,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,qCAAqC;CAChE,MAAM,OAAO,MAAM,QAAQ;CAC3B,MAAM,gBAAgB,iBAAiB,MAAM,KAAK;CAClD,SAAS,OAAO,KAAK;EACpB,OAAO,aAAa;GACnB,MAAM,IAAI;GACV,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;GAC/C,GAAG,IAAI,gBAAgB,KAAK,IAAI,EAAE,aAAa,IAAI,YAAY,IAAI,CAAC;GACpE,OAAO,IAAI;GACX,QAAQ,IAAI;GACZ,aAAa,CAAC,aAAa;GAC3B,KAAK,IAAI;EACV,CAAC;CACF;CACA,OAAO;EACN;EACA;EACA,YAAY;EACZ;CACD;AACD"}
|
package/dist/client.cjs
CHANGED
|
@@ -14,7 +14,9 @@ function createKeystrokeClient(options = {}) {
|
|
|
14
14
|
return { tools: { execute: (input) => api.post("tools/execute", { json: {
|
|
15
15
|
app: input.app,
|
|
16
16
|
tool: input.tool,
|
|
17
|
-
arguments: input.arguments ?? {}
|
|
17
|
+
arguments: input.arguments ?? {},
|
|
18
|
+
version: input.version,
|
|
19
|
+
...input.instanceId ? { instanceId: input.instanceId } : {}
|
|
18
20
|
} }).json() } };
|
|
19
21
|
}
|
|
20
22
|
//#endregion
|
package/dist/client.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.cjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import ky, { type KyInstance, type Options } from \"ky\";\n\nexport type KeystrokeClientOptions = {\n /** Defaults to process.env.KEYSTROKE_API_KEY */\n apiKey?: string;\n /** Defaults to process.env.PUBLIC_PLATFORM_URL or http://localhost:3002 */\n platformUrl?: string;\n ky?: Options;\n};\n\nexport type ExecuteToolInput = {\n app: string;\n tool: string;\n arguments?: Record<string, unknown>;\n};\n\nexport type KeystrokeClient = {\n tools: {\n execute: (input: ExecuteToolInput) => Promise<{ ok: boolean; result: unknown }>;\n };\n};\n\nexport function createKeystrokeClient(options: KeystrokeClientOptions = {}): KeystrokeClient {\n const apiKey = options.apiKey ?? process.env.KEYSTROKE_API_KEY;\n const platformUrl = (\n options.platformUrl ??\n process.env.PUBLIC_PLATFORM_URL ??\n \"http://localhost:3002\"\n ).replace(/\\/+$/, \"\");\n\n const api: KyInstance = ky.create({\n prefix: `${platformUrl}/mcp/`,\n headers: apiKey ? { \"x-api-key\": apiKey } : {},\n ...options.ky,\n });\n\n return {\n tools: {\n execute: (input) =>\n api\n .post(\"tools/execute\", {\n json: {\n app: input.app,\n tool: input.tool,\n arguments: input.arguments ?? {},\n },\n })\n .json<{ ok: boolean; result: unknown }>(),\n },\n };\n}\n"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"client.cjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import ky, { type KyInstance, type Options } from \"ky\";\n\nexport type KeystrokeClientOptions = {\n /** Defaults to process.env.KEYSTROKE_API_KEY */\n apiKey?: string;\n /** Defaults to process.env.PUBLIC_PLATFORM_URL or http://localhost:3002 */\n platformUrl?: string;\n ky?: Options;\n};\n\nexport type ExecuteToolInput = {\n app: string;\n tool: string;\n arguments?: Record<string, unknown>;\n /**\n * Resolved credential instance to execute against. When set, the platform executes that exact\n * connection; when omitted it falls back to resolving the app's instance by scope.\n */\n instanceId?: string;\n /** Pinned provider toolkit version (e.g. `20260501_01`); forwarded to the provider on execute. */\n version: string;\n};\n\nexport type KeystrokeClient = {\n tools: {\n execute: (input: ExecuteToolInput) => Promise<{ ok: boolean; result: unknown }>;\n };\n};\n\nexport function createKeystrokeClient(options: KeystrokeClientOptions = {}): KeystrokeClient {\n const apiKey = options.apiKey ?? process.env.KEYSTROKE_API_KEY;\n const platformUrl = (\n options.platformUrl ??\n process.env.PUBLIC_PLATFORM_URL ??\n \"http://localhost:3002\"\n ).replace(/\\/+$/, \"\");\n\n const api: KyInstance = ky.create({\n prefix: `${platformUrl}/mcp/`,\n headers: apiKey ? { \"x-api-key\": apiKey } : {},\n ...options.ky,\n });\n\n return {\n tools: {\n execute: (input) =>\n api\n .post(\"tools/execute\", {\n json: {\n app: input.app,\n tool: input.tool,\n arguments: input.arguments ?? {},\n version: input.version,\n ...(input.instanceId ? { instanceId: input.instanceId } : {}),\n },\n })\n .json<{ ok: boolean; result: unknown }>(),\n },\n };\n}\n"],"mappings":";;;;;AA6BA,SAAgB,sBAAsB,UAAkC,CAAC,GAAoB;CAC3F,MAAM,SAAS,QAAQ,UAAU,QAAQ,IAAI;CAC7C,MAAM,eACJ,QAAQ,eACR,QAAQ,IAAI,uBACZ,yBACA,QAAQ,QAAQ,EAAE;CAEpB,MAAM,MAAkB,GAAA,QAAG,OAAO;EAChC,QAAQ,GAAG,YAAY;EACvB,SAAS,SAAS,EAAE,aAAa,OAAO,IAAI,CAAC;EAC7C,GAAG,QAAQ;CACb,CAAC;CAED,OAAO,EACL,OAAO,EACL,UAAU,UACR,IACG,KAAK,iBAAiB,EACrB,MAAM;EACJ,KAAK,MAAM;EACX,MAAM,MAAM;EACZ,WAAW,MAAM,aAAa,CAAC;EAC/B,SAAS,MAAM;EACf,GAAI,MAAM,aAAa,EAAE,YAAY,MAAM,WAAW,IAAI,CAAC;CAC7D,EACF,CAAC,EACA,KAAuC,EAC9C,EACF;AACF"}
|
package/dist/client.d.cts
CHANGED
|
@@ -10,6 +10,12 @@ type ExecuteToolInput = {
|
|
|
10
10
|
app: string;
|
|
11
11
|
tool: string;
|
|
12
12
|
arguments?: Record<string, unknown>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolved credential instance to execute against. When set, the platform executes that exact
|
|
15
|
+
* connection; when omitted it falls back to resolving the app's instance by scope.
|
|
16
|
+
*/
|
|
17
|
+
instanceId?: string; /** Pinned provider toolkit version (e.g. `20260501_01`); forwarded to the provider on execute. */
|
|
18
|
+
version: string;
|
|
13
19
|
};
|
|
14
20
|
type KeystrokeClient = {
|
|
15
21
|
tools: {
|
package/dist/client.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.cts","names":[],"sources":["../src/client.ts"],"mappings":";;;KAEY,sBAAA;kDAEV,MAAA,WAFgC;EAIhC,WAAA;EACA,EAAA,GAAK,OAAO;AAAA;AAAA,KAGF,gBAAA;EACV,GAAA;EACA,IAAA;EACA,SAAA,GAAY,MAAM;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"client.d.cts","names":[],"sources":["../src/client.ts"],"mappings":";;;KAEY,sBAAA;kDAEV,MAAA,WAFgC;EAIhC,WAAA;EACA,EAAA,GAAK,OAAO;AAAA;AAAA,KAGF,gBAAA;EACV,GAAA;EACA,IAAA;EACA,SAAA,GAAY,MAAM;EANN;AAGd;;;EAQE,UAAA,WAPA;EASA,OAAA;AAAA;AAAA,KAGU,eAAA;EACV,KAAA;IACE,OAAA,GAAU,KAAA,EAAO,gBAAA,KAAqB,OAAO;MAAG,EAAA;MAAa,MAAA;IAAA;EAAA;AAAA;AAAA,iBAIjD,qBAAA,CAAsB,OAAA,GAAS,sBAAA,GAA8B,eAAe"}
|
package/dist/client.d.mts
CHANGED
|
@@ -10,6 +10,12 @@ type ExecuteToolInput = {
|
|
|
10
10
|
app: string;
|
|
11
11
|
tool: string;
|
|
12
12
|
arguments?: Record<string, unknown>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolved credential instance to execute against. When set, the platform executes that exact
|
|
15
|
+
* connection; when omitted it falls back to resolving the app's instance by scope.
|
|
16
|
+
*/
|
|
17
|
+
instanceId?: string; /** Pinned provider toolkit version (e.g. `20260501_01`); forwarded to the provider on execute. */
|
|
18
|
+
version: string;
|
|
13
19
|
};
|
|
14
20
|
type KeystrokeClient = {
|
|
15
21
|
tools: {
|
package/dist/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mappings":";;;KAEY,sBAAA;kDAEV,MAAA,WAFgC;EAIhC,WAAA;EACA,EAAA,GAAK,OAAO;AAAA;AAAA,KAGF,gBAAA;EACV,GAAA;EACA,IAAA;EACA,SAAA,GAAY,MAAM;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mappings":";;;KAEY,sBAAA;kDAEV,MAAA,WAFgC;EAIhC,WAAA;EACA,EAAA,GAAK,OAAO;AAAA;AAAA,KAGF,gBAAA;EACV,GAAA;EACA,IAAA;EACA,SAAA,GAAY,MAAM;EANN;AAGd;;;EAQE,UAAA,WAPA;EASA,OAAA;AAAA;AAAA,KAGU,eAAA;EACV,KAAA;IACE,OAAA,GAAU,KAAA,EAAO,gBAAA,KAAqB,OAAO;MAAG,EAAA;MAAa,MAAA;IAAA;EAAA;AAAA;AAAA,iBAIjD,qBAAA,CAAsB,OAAA,GAAS,sBAAA,GAA8B,eAAe"}
|
package/dist/client.mjs
CHANGED
|
@@ -11,7 +11,9 @@ function createKeystrokeClient(options = {}) {
|
|
|
11
11
|
return { tools: { execute: (input) => api.post("tools/execute", { json: {
|
|
12
12
|
app: input.app,
|
|
13
13
|
tool: input.tool,
|
|
14
|
-
arguments: input.arguments ?? {}
|
|
14
|
+
arguments: input.arguments ?? {},
|
|
15
|
+
version: input.version,
|
|
16
|
+
...input.instanceId ? { instanceId: input.instanceId } : {}
|
|
15
17
|
} }).json() } };
|
|
16
18
|
}
|
|
17
19
|
//#endregion
|
package/dist/client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import ky, { type KyInstance, type Options } from \"ky\";\n\nexport type KeystrokeClientOptions = {\n /** Defaults to process.env.KEYSTROKE_API_KEY */\n apiKey?: string;\n /** Defaults to process.env.PUBLIC_PLATFORM_URL or http://localhost:3002 */\n platformUrl?: string;\n ky?: Options;\n};\n\nexport type ExecuteToolInput = {\n app: string;\n tool: string;\n arguments?: Record<string, unknown>;\n};\n\nexport type KeystrokeClient = {\n tools: {\n execute: (input: ExecuteToolInput) => Promise<{ ok: boolean; result: unknown }>;\n };\n};\n\nexport function createKeystrokeClient(options: KeystrokeClientOptions = {}): KeystrokeClient {\n const apiKey = options.apiKey ?? process.env.KEYSTROKE_API_KEY;\n const platformUrl = (\n options.platformUrl ??\n process.env.PUBLIC_PLATFORM_URL ??\n \"http://localhost:3002\"\n ).replace(/\\/+$/, \"\");\n\n const api: KyInstance = ky.create({\n prefix: `${platformUrl}/mcp/`,\n headers: apiKey ? { \"x-api-key\": apiKey } : {},\n ...options.ky,\n });\n\n return {\n tools: {\n execute: (input) =>\n api\n .post(\"tools/execute\", {\n json: {\n app: input.app,\n tool: input.tool,\n arguments: input.arguments ?? {},\n },\n })\n .json<{ ok: boolean; result: unknown }>(),\n },\n };\n}\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import ky, { type KyInstance, type Options } from \"ky\";\n\nexport type KeystrokeClientOptions = {\n /** Defaults to process.env.KEYSTROKE_API_KEY */\n apiKey?: string;\n /** Defaults to process.env.PUBLIC_PLATFORM_URL or http://localhost:3002 */\n platformUrl?: string;\n ky?: Options;\n};\n\nexport type ExecuteToolInput = {\n app: string;\n tool: string;\n arguments?: Record<string, unknown>;\n /**\n * Resolved credential instance to execute against. When set, the platform executes that exact\n * connection; when omitted it falls back to resolving the app's instance by scope.\n */\n instanceId?: string;\n /** Pinned provider toolkit version (e.g. `20260501_01`); forwarded to the provider on execute. */\n version: string;\n};\n\nexport type KeystrokeClient = {\n tools: {\n execute: (input: ExecuteToolInput) => Promise<{ ok: boolean; result: unknown }>;\n };\n};\n\nexport function createKeystrokeClient(options: KeystrokeClientOptions = {}): KeystrokeClient {\n const apiKey = options.apiKey ?? process.env.KEYSTROKE_API_KEY;\n const platformUrl = (\n options.platformUrl ??\n process.env.PUBLIC_PLATFORM_URL ??\n \"http://localhost:3002\"\n ).replace(/\\/+$/, \"\");\n\n const api: KyInstance = ky.create({\n prefix: `${platformUrl}/mcp/`,\n headers: apiKey ? { \"x-api-key\": apiKey } : {},\n ...options.ky,\n });\n\n return {\n tools: {\n execute: (input) =>\n api\n .post(\"tools/execute\", {\n json: {\n app: input.app,\n tool: input.tool,\n arguments: input.arguments ?? {},\n version: input.version,\n ...(input.instanceId ? { instanceId: input.instanceId } : {}),\n },\n })\n .json<{ ok: boolean; result: unknown }>(),\n },\n };\n}\n"],"mappings":";;AA6BA,SAAgB,sBAAsB,UAAkC,CAAC,GAAoB;CAC3F,MAAM,SAAS,QAAQ,UAAU,QAAQ,IAAI;CAC7C,MAAM,eACJ,QAAQ,eACR,QAAQ,IAAI,uBACZ,yBACA,QAAQ,QAAQ,EAAE;CAEpB,MAAM,MAAkB,GAAG,OAAO;EAChC,QAAQ,GAAG,YAAY;EACvB,SAAS,SAAS,EAAE,aAAa,OAAO,IAAI,CAAC;EAC7C,GAAG,QAAQ;CACb,CAAC;CAED,OAAO,EACL,OAAO,EACL,UAAU,UACR,IACG,KAAK,iBAAiB,EACrB,MAAM;EACJ,KAAK,MAAM;EACX,MAAM,MAAM;EACZ,WAAW,MAAM,aAAa,CAAC;EAC/B,SAAS,MAAM;EACf,GAAI,MAAM,aAAa,EAAE,YAAY,MAAM,WAAW,IAAI,CAAC;CAC7D,EACF,CAAC,EACA,KAAuC,EAC9C,EACF;AACF"}
|
package/dist/config.d.cts
CHANGED
package/dist/config.d.mts
CHANGED
package/dist/credentials.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist
|
|
3
|
-
exports.
|
|
4
|
-
exports.DEFAULT_CREDENTIAL_RESOLUTION_CHAIN = require_dist.DEFAULT_CREDENTIAL_RESOLUTION_CHAIN;
|
|
2
|
+
const require_dist = require("./dist-B3WT5qgl.cjs");
|
|
3
|
+
exports.CREDENTIAL_SCOPE_TYPES = require_dist.CREDENTIAL_SCOPE_TYPES;
|
|
5
4
|
exports.credential = require_dist.credential;
|
|
6
5
|
exports.credentialInputSchema = require_dist.credentialInputSchema;
|
|
7
6
|
exports.defineCredential = require_dist.defineCredential;
|
package/dist/credentials.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export {
|
|
1
|
+
import { C as isCredentialInput, S as defineCredential, T as toCredentialRequirement, a as CredentialInput, b as credential, d as DefineOAuthCredentialInput, f as DefineStaticCredentialInput, l as CredentialScopeType, n as Credential, o as CredentialList, p as NormalizeCredential, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_TYPES, u as DefineCredentialInput, v as ResolvedCredentials, w as normalizeCredentialList, x as credentialInputSchema } from "./index-e9f4pcX4.cjs";
|
|
2
|
+
export { CREDENTIAL_SCOPE_TYPES, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeType, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolvedCredentials, credential, credentialInputSchema, defineCredential, isCredentialInput, normalizeCredentialList, toCredentialRequirement };
|
package/dist/credentials.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export {
|
|
1
|
+
import { C as isCredentialInput, S as defineCredential, T as toCredentialRequirement, a as CredentialInput, b as credential, d as DefineOAuthCredentialInput, f as DefineStaticCredentialInput, l as CredentialScopeType, n as Credential, o as CredentialList, p as NormalizeCredential, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_TYPES, u as DefineCredentialInput, v as ResolvedCredentials, w as normalizeCredentialList, x as credentialInputSchema } from "./index-e9f4pcX4.mjs";
|
|
2
|
+
export { CREDENTIAL_SCOPE_TYPES, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeType, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolvedCredentials, credential, credentialInputSchema, defineCredential, isCredentialInput, normalizeCredentialList, toCredentialRequirement };
|
package/dist/credentials.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { C as toCredentialRequirement, S as normalizeCredentialList, _ as credential, b as isCredentialInput, g as CREDENTIAL_SCOPE_TYPES, v as credentialInputSchema, y as defineCredential } from "./dist-DgjcBE-O.mjs";
|
|
2
|
+
export { CREDENTIAL_SCOPE_TYPES, credential, credentialInputSchema, defineCredential, isCredentialInput, normalizeCredentialList, toCredentialRequirement };
|