@keystrokehq/keystroke 0.0.157 → 0.0.158

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 (79) hide show
  1. package/dist/action.cjs +3 -1
  2. package/dist/action.d.cts +3 -3
  3. package/dist/action.d.mts +3 -3
  4. package/dist/action.mjs +2 -2
  5. package/dist/agent.cjs +10 -4
  6. package/dist/agent.cjs.map +1 -1
  7. package/dist/agent.d.cts +2 -2
  8. package/dist/agent.d.mts +2 -2
  9. package/dist/agent.mjs +10 -4
  10. package/dist/agent.mjs.map +1 -1
  11. package/dist/config.d.cts +5 -2
  12. package/dist/config.d.cts.map +1 -1
  13. package/dist/config.d.mts +5 -2
  14. package/dist/config.d.mts.map +1 -1
  15. package/dist/credentials.cjs +1 -1
  16. package/dist/credentials.d.cts +1 -1
  17. package/dist/credentials.d.mts +1 -1
  18. package/dist/credentials.mjs +1 -1
  19. package/dist/{dist-DVhUiNxI.cjs → dist-BN4tLQ4S.cjs} +54 -13
  20. package/dist/dist-BN4tLQ4S.cjs.map +1 -0
  21. package/dist/{dist-DCLn7nnX.cjs → dist-BPL6RGOX.cjs} +35 -5
  22. package/dist/dist-BPL6RGOX.cjs.map +1 -0
  23. package/dist/{dist-Bk52Cwwx.mjs → dist-B_PNHSDU.mjs} +24 -6
  24. package/dist/dist-B_PNHSDU.mjs.map +1 -0
  25. package/dist/{dist-mqIKZUtC.mjs → dist-BsLHL5ev.mjs} +43 -14
  26. package/dist/dist-BsLHL5ev.mjs.map +1 -0
  27. package/dist/{dist-DfIdsDNZ.cjs → dist-C2-wphiV.cjs} +7 -5
  28. package/dist/{dist-DfIdsDNZ.cjs.map → dist-C2-wphiV.cjs.map} +1 -1
  29. package/dist/{dist-DYCqNVKj.mjs → dist-lDHLFeHS.mjs} +5 -3
  30. package/dist/{dist-DYCqNVKj.mjs.map → dist-lDHLFeHS.mjs.map} +1 -1
  31. package/dist/{index-CiuCYKLw.d.cts → index-BNcrFoZi.d.cts} +2 -1
  32. package/dist/index-BNcrFoZi.d.cts.map +1 -0
  33. package/dist/{index-CiuCYKLw.d.mts → index-BNcrFoZi.d.mts} +2 -1
  34. package/dist/index-BNcrFoZi.d.mts.map +1 -0
  35. package/dist/{index-C9bN3PaO.d.cts → index-BUmyUoC2.d.mts} +10 -3
  36. package/dist/index-BUmyUoC2.d.mts.map +1 -0
  37. package/dist/{index-B-OL-2Px.d.mts → index-Bbe9CzYo.d.mts} +16 -4
  38. package/dist/index-Bbe9CzYo.d.mts.map +1 -0
  39. package/dist/{index-DG70_Odx.d.cts → index-BmXIGJlQ.d.cts} +16 -4
  40. package/dist/index-BmXIGJlQ.d.cts.map +1 -0
  41. package/dist/{index-MfPRY7cK.d.cts → index-CUrU-w2Y.d.cts} +2 -2
  42. package/dist/{index-MfPRY7cK.d.cts.map → index-CUrU-w2Y.d.cts.map} +1 -1
  43. package/dist/{index-D-CtqeAA.d.mts → index-CyCx29m7.d.mts} +5 -4
  44. package/dist/index-CyCx29m7.d.mts.map +1 -0
  45. package/dist/{index-COm9NdJ2.d.cts → index-DuYf0Fdc.d.cts} +5 -4
  46. package/dist/index-DuYf0Fdc.d.cts.map +1 -0
  47. package/dist/{index-ptRM3z9H.d.mts → index-Qnwdoq7U.d.mts} +2 -2
  48. package/dist/{index-ptRM3z9H.d.mts.map → index-Qnwdoq7U.d.mts.map} +1 -1
  49. package/dist/{index-Bg5PEyGE.d.mts → index-jLW9DNA0.d.cts} +10 -3
  50. package/dist/index-jLW9DNA0.d.cts.map +1 -0
  51. package/dist/{mistral-DjA92zum.mjs → mistral-DIdWCzNl.mjs} +2 -2
  52. package/dist/{mistral-DjA92zum.mjs.map → mistral-DIdWCzNl.mjs.map} +1 -1
  53. package/dist/{mistral-CQ_FR-Wp.cjs → mistral-jf7ZLGhZ.cjs} +2 -2
  54. package/dist/{mistral-CQ_FR-Wp.cjs.map → mistral-jf7ZLGhZ.cjs.map} +1 -1
  55. package/dist/{sse-B2_n99ud.mjs → sse-DL0amYvP.mjs} +2 -2
  56. package/dist/{sse-B2_n99ud.mjs.map → sse-DL0amYvP.mjs.map} +1 -1
  57. package/dist/{sse-Bur6Etcd.cjs → sse-cQ49VLYa.cjs} +2 -2
  58. package/dist/{sse-Bur6Etcd.cjs.map → sse-cQ49VLYa.cjs.map} +1 -1
  59. package/dist/trigger.cjs +1 -1
  60. package/dist/trigger.d.cts +3 -3
  61. package/dist/trigger.d.mts +3 -3
  62. package/dist/trigger.mjs +1 -1
  63. package/dist/workflow.cjs +3 -1
  64. package/dist/workflow.d.cts +2 -2
  65. package/dist/workflow.d.mts +2 -2
  66. package/dist/workflow.mjs +2 -2
  67. package/package.json +1 -1
  68. package/dist/dist-Bk52Cwwx.mjs.map +0 -1
  69. package/dist/dist-DCLn7nnX.cjs.map +0 -1
  70. package/dist/dist-DVhUiNxI.cjs.map +0 -1
  71. package/dist/dist-mqIKZUtC.mjs.map +0 -1
  72. package/dist/index-B-OL-2Px.d.mts.map +0 -1
  73. package/dist/index-Bg5PEyGE.d.mts.map +0 -1
  74. package/dist/index-C9bN3PaO.d.cts.map +0 -1
  75. package/dist/index-COm9NdJ2.d.cts.map +0 -1
  76. package/dist/index-CiuCYKLw.d.cts.map +0 -1
  77. package/dist/index-CiuCYKLw.d.mts.map +0 -1
  78. package/dist/index-D-CtqeAA.d.mts.map +0 -1
  79. package/dist/index-DG70_Odx.d.cts.map +0 -1
package/dist/action.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-DCLn7nnX.cjs");
2
+ const require_dist = require("./dist-BPL6RGOX.cjs");
3
3
  exports.CREDENTIAL_SCOPE_LEVELS = require_dist.CREDENTIAL_SCOPE_LEVELS;
4
4
  exports.DEFAULT_CREDENTIAL_RESOLUTION_CHAIN = require_dist.DEFAULT_CREDENTIAL_RESOLUTION_CHAIN;
5
5
  exports.actionCoreSchema = require_dist.actionCoreSchema;
@@ -10,6 +10,7 @@ exports.defineAction = require_dist.defineAction;
10
10
  exports.defineCredential = require_dist.defineCredential;
11
11
  exports.executeAction = require_dist.executeAction;
12
12
  exports.getActionCredentialRequirements = require_dist.getActionCredentialRequirements;
13
+ exports.getRunSignal = require_dist.getRunSignal;
13
14
  exports.getWorkflowRunHandle = require_dist.getWorkflowRunHandle;
14
15
  exports.isAction = require_dist.isAction;
15
16
  exports.isCredentialInput = require_dist.isCredentialInput;
@@ -19,5 +20,6 @@ exports.normalizeCredentialList = require_dist.normalizeCredentialList;
19
20
  exports.registerWorkflowRunGetter = require_dist.registerWorkflowRunGetter;
20
21
  exports.resolveActionTool = require_dist.resolveActionTool;
21
22
  exports.runOutsideActionExecution = require_dist.runOutsideActionExecution;
23
+ exports.runWithRunSignal = require_dist.runWithRunSignal;
22
24
  exports.runWithinActionExecution = require_dist.runWithinActionExecution;
23
25
  exports.toCredentialRequirement = require_dist.toCredentialRequirement;
package/dist/action.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { C as normalizeCredentialList, S as isCredentialInput, _ as ResolvedCredentials, a as CredentialInput, b as credentialInputSchema, d as DefineCredentialInput, f as DefineOAuthCredentialInput, l as CredentialScopeLevel, m as NormalizeCredential, n as Credential, o as CredentialList, p as DefineStaticCredentialInput, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_LEVELS, u as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, w as toCredentialRequirement, x as defineCredential, y as credential } from "./index-CiuCYKLw.cjs";
2
- import { _ as isWithinActionExecution, a as ResolveActionCredentialsFn, b as runOutsideActionExecution, c as WorkflowActionDefinition, d as defineAction, f as executeAction, g as isStepInvocation, h as isAction, i as AgentRunOptions, l as actionCoreSchema, m as getWorkflowRunHandle, n as ActionDefinition, o as ResolveActionToolOptions, p as getActionCredentialRequirements, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as createStepInvocation, v as registerWorkflowRunGetter, x as runWithinActionExecution, y as resolveActionTool } from "./index-DG70_Odx.cjs";
3
- export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_LEVELS, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeLevel, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithinActionExecution, toCredentialRequirement };
1
+ import { C as normalizeCredentialList, S as isCredentialInput, _ as ResolvedCredentials, a as CredentialInput, b as credentialInputSchema, d as DefineCredentialInput, f as DefineOAuthCredentialInput, l as CredentialScopeLevel, m as NormalizeCredential, n as Credential, o as CredentialList, p as DefineStaticCredentialInput, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_LEVELS, u as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, w as toCredentialRequirement, x as defineCredential, y as credential } from "./index-BNcrFoZi.cjs";
2
+ import { C as runWithinActionExecution, S as runWithRunSignal, _ as isStepInvocation, a as ResolveActionCredentialsFn, b as resolveActionTool, c as WorkflowActionDefinition, d as defineAction, f as executeAction, g as isAction, h as getWorkflowRunHandle, i as AgentRunOptions, l as actionCoreSchema, m as getRunSignal, n as ActionDefinition, o as ResolveActionToolOptions, p as getActionCredentialRequirements, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as createStepInvocation, v as isWithinActionExecution, x as runOutsideActionExecution, y as registerWorkflowRunGetter } from "./index-BmXIGJlQ.cjs";
3
+ export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_LEVELS, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeLevel, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, 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 normalizeCredentialList, S as isCredentialInput, _ as ResolvedCredentials, a as CredentialInput, b as credentialInputSchema, d as DefineCredentialInput, f as DefineOAuthCredentialInput, l as CredentialScopeLevel, m as NormalizeCredential, n as Credential, o as CredentialList, p as DefineStaticCredentialInput, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_LEVELS, u as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, w as toCredentialRequirement, x as defineCredential, y as credential } from "./index-CiuCYKLw.mjs";
2
- import { _ as isWithinActionExecution, a as ResolveActionCredentialsFn, b as runOutsideActionExecution, c as WorkflowActionDefinition, d as defineAction, f as executeAction, g as isStepInvocation, h as isAction, i as AgentRunOptions, l as actionCoreSchema, m as getWorkflowRunHandle, n as ActionDefinition, o as ResolveActionToolOptions, p as getActionCredentialRequirements, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as createStepInvocation, v as registerWorkflowRunGetter, x as runWithinActionExecution, y as resolveActionTool } from "./index-B-OL-2Px.mjs";
3
- export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_LEVELS, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeLevel, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithinActionExecution, toCredentialRequirement };
1
+ import { C as normalizeCredentialList, S as isCredentialInput, _ as ResolvedCredentials, a as CredentialInput, b as credentialInputSchema, d as DefineCredentialInput, f as DefineOAuthCredentialInput, l as CredentialScopeLevel, m as NormalizeCredential, n as Credential, o as CredentialList, p as DefineStaticCredentialInput, r as CredentialAuthKind, s as CredentialRequirement, t as CREDENTIAL_SCOPE_LEVELS, u as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, w as toCredentialRequirement, x as defineCredential, y as credential } from "./index-BNcrFoZi.mjs";
2
+ import { C as runWithinActionExecution, S as runWithRunSignal, _ as isStepInvocation, a as ResolveActionCredentialsFn, b as resolveActionTool, c as WorkflowActionDefinition, d as defineAction, f as executeAction, g as isAction, h as getWorkflowRunHandle, i as AgentRunOptions, l as actionCoreSchema, m as getRunSignal, n as ActionDefinition, o as ResolveActionToolOptions, p as getActionCredentialRequirements, r as ActionDefinitionInput, s as StepInvocation, t as ActionCredentialConsumer, u as createStepInvocation, v as isWithinActionExecution, x as runOutsideActionExecution, y as registerWorkflowRunGetter } from "./index-Bbe9CzYo.mjs";
3
+ export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_LEVELS, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeLevel, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, 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 toCredentialRequirement, _ as credential, a as getActionCredentialRequirements, b as isCredentialInput, c as isStepInvocation, d as resolveActionTool, f as runOutsideActionExecution, g as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, i as executeAction, l as isWithinActionExecution, m as CREDENTIAL_SCOPE_LEVELS, n as createStepInvocation, o as getWorkflowRunHandle, p as runWithinActionExecution, r as defineAction, s as isAction, t as actionCoreSchema, u as registerWorkflowRunGetter, v as credentialInputSchema, x as normalizeCredentialList, y as defineCredential } from "./dist-Bk52Cwwx.mjs";
2
- export { CREDENTIAL_SCOPE_LEVELS, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithinActionExecution, toCredentialRequirement };
1
+ import { C as normalizeCredentialList, S as isCredentialInput, a as getActionCredentialRequirements, b as credentialInputSchema, c as isAction, d as registerWorkflowRunGetter, f as resolveActionTool, g as CREDENTIAL_SCOPE_LEVELS, 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 DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, w as toCredentialRequirement, x as defineCredential, y as credential } from "./dist-B_PNHSDU.mjs";
2
+ export { CREDENTIAL_SCOPE_LEVELS, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, 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,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_dist$1 = require("./dist-DnGkWV6x.cjs");
3
- const require_dist$2 = require("./dist-DCLn7nnX.cjs");
3
+ const require_dist$2 = require("./dist-BPL6RGOX.cjs");
4
4
  require("./env-api-keys-BFptfIIs.cjs");
5
5
  const require_event_stream = require("./event-stream-CS-ls7wC.cjs");
6
6
  require("./json-parse-CwSaKHrs.cjs");
7
- const require_dist$3 = require("./dist-DfIdsDNZ.cjs");
7
+ const require_dist$3 = require("./dist-C2-wphiV.cjs");
8
8
  let zod = require("zod");
9
9
  let node_async_hooks = require("node:async_hooks");
10
10
  let node_fs = require("node:fs");
@@ -901,7 +901,7 @@ function loadGoogleVertexProviderModule() {
901
901
  return googleVertexProviderModulePromise;
902
902
  }
903
903
  function loadMistralProviderModule() {
904
- mistralProviderModulePromise ||= Promise.resolve().then(() => require("./mistral-CQ_FR-Wp.cjs")).then((module) => {
904
+ mistralProviderModulePromise ||= Promise.resolve().then(() => require("./mistral-jf7ZLGhZ.cjs")).then((module) => {
905
905
  const provider = module;
906
906
  return {
907
907
  stream: provider.streamMistral,
@@ -13803,6 +13803,10 @@ async function runAgentPrompt(agent, agentId, input, options = {}) {
13803
13803
  if (!shouldPersistAgentEvent(event)) return;
13804
13804
  await persistAgentEvent(sessionId, event, memoryConfig);
13805
13805
  });
13806
+ const signal = require_dist$2.getRunSignal();
13807
+ const onAbort = () => runtime.pi.abort();
13808
+ if (signal.aborted) onAbort();
13809
+ else signal.addEventListener("abort", onAbort, { once: true });
13806
13810
  try {
13807
13811
  const snapshot = await require_dist$3.captureConsole(async () => prompt(runtime, input.message));
13808
13812
  const credentialError = runtime.takeCredentialError?.();
@@ -13811,9 +13815,11 @@ async function runAgentPrompt(agent, agentId, input, options = {}) {
13811
13815
  return {
13812
13816
  sessionId,
13813
13817
  messages: messages(snapshot),
13814
- error: errorMessage(snapshot) ?? null
13818
+ error: errorMessage(snapshot) ?? null,
13819
+ canceled: signal.aborted
13815
13820
  };
13816
13821
  } finally {
13822
+ signal.removeEventListener("abort", onAbort);
13817
13823
  unsubscribe();
13818
13824
  try {
13819
13825
  runtime.memory?.reindexSessions();