@keystrokehq/keystroke 0.0.80 → 0.0.81
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 +1 -1
- package/dist/action.mjs +1 -1
- package/dist/agent.cjs +3 -3
- package/dist/agent.mjs +3 -3
- package/dist/credentials.cjs +1 -1
- package/dist/credentials.mjs +1 -1
- package/dist/{dist-BtUZgkWX.mjs → dist--tk_TVnK.mjs} +3 -3
- package/dist/{dist-BtUZgkWX.mjs.map → dist--tk_TVnK.mjs.map} +1 -1
- package/dist/{dist-CX_VjS8G.cjs → dist-BM_f7hFN.cjs} +9 -4
- package/dist/{dist-CX_VjS8G.cjs.map → dist-BM_f7hFN.cjs.map} +1 -1
- package/dist/{dist-DR_w7Bmm.cjs → dist-BNr93pr4.cjs} +3 -3
- package/dist/{dist-DR_w7Bmm.cjs.map → dist-BNr93pr4.cjs.map} +1 -1
- package/dist/{dist-Bpe_YLml.cjs → dist-Cc65iNYW.cjs} +3 -3
- package/dist/{dist-Bpe_YLml.cjs.map → dist-Cc65iNYW.cjs.map} +1 -1
- package/dist/{dist-B7ES0xNw.mjs → dist-DJQ009A6.mjs} +3 -3
- package/dist/{dist-B7ES0xNw.mjs.map → dist-DJQ009A6.mjs.map} +1 -1
- package/dist/{dist-BuYkgW2u.mjs → dist-DYbhRy-F.mjs} +9 -4
- package/dist/{dist-BuYkgW2u.mjs.map → dist-DYbhRy-F.mjs.map} +1 -1
- package/dist/{mistral-B8z_6zB0.mjs → mistral-DJwJ_CBZ.mjs} +2 -2
- package/dist/{mistral-B8z_6zB0.mjs.map → mistral-DJwJ_CBZ.mjs.map} +1 -1
- package/dist/{mistral-TLUycOvY.cjs → mistral-S8Ee__qL.cjs} +2 -2
- package/dist/{mistral-TLUycOvY.cjs.map → mistral-S8Ee__qL.cjs.map} +1 -1
- package/dist/{sse-BSm1UyYJ.mjs → sse-BHpqdClU.mjs} +2 -2
- package/dist/{sse-BSm1UyYJ.mjs.map → sse-BHpqdClU.mjs.map} +1 -1
- package/dist/{sse-DDj9BDCL.cjs → sse-DHVuTBxw.cjs} +2 -2
- package/dist/{sse-DDj9BDCL.cjs.map → sse-DHVuTBxw.cjs.map} +1 -1
- package/dist/trigger.cjs +1 -1
- package/dist/trigger.mjs +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.mjs +1 -1
- package/package.json +1 -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-
|
|
2
|
+
const require_dist = require("./dist-BM_f7hFN.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;
|
package/dist/action.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as credentialInputSchema, a as getActionCredentialRequirements, b as normalizeCredentialList, c as isStepInvocation, d as runOutsideActionExecution, f as runWithinActionExecution, g as credential, h as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, i as executeAction, l as registerWorkflowRunGetter, n as createStepInvocation, o as getWorkflowRunHandle, p as CREDENTIAL_SCOPE_LEVELS, r as defineAction, s as isAction, t as actionCoreSchema, u as resolveActionTool, v as defineCredential, x as toCredentialRequirement, y as isCredentialInput } from "./dist-
|
|
1
|
+
import { _ as credentialInputSchema, a as getActionCredentialRequirements, b as normalizeCredentialList, c as isStepInvocation, d as runOutsideActionExecution, f as runWithinActionExecution, g as credential, h as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, i as executeAction, l as registerWorkflowRunGetter, n as createStepInvocation, o as getWorkflowRunHandle, p as CREDENTIAL_SCOPE_LEVELS, r as defineAction, s as isAction, t as actionCoreSchema, u as resolveActionTool, v as defineCredential, x as toCredentialRequirement, y as isCredentialInput } from "./dist-DYbhRy-F.mjs";
|
|
2
2
|
export { CREDENTIAL_SCOPE_LEVELS, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, normalizeCredentialList, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, 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-C7Fgk61q.cjs");
|
|
3
|
-
const require_dist$2 = require("./dist-
|
|
3
|
+
const require_dist$2 = require("./dist-BM_f7hFN.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-DV41_cbO.cjs");
|
|
7
|
-
const require_dist$3 = require("./dist-
|
|
7
|
+
const require_dist$3 = require("./dist-Cc65iNYW.cjs");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_module = require("node:module");
|
|
10
10
|
let node_fs = require("node:fs");
|
|
@@ -928,7 +928,7 @@ function loadGoogleVertexProviderModule() {
|
|
|
928
928
|
return googleVertexProviderModulePromise;
|
|
929
929
|
}
|
|
930
930
|
function loadMistralProviderModule() {
|
|
931
|
-
mistralProviderModulePromise ||= Promise.resolve().then(() => require("./mistral-
|
|
931
|
+
mistralProviderModulePromise ||= Promise.resolve().then(() => require("./mistral-S8Ee__qL.cjs")).then((module) => {
|
|
932
932
|
const provider = module;
|
|
933
933
|
return {
|
|
934
934
|
stream: provider.streamMistral,
|
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, Y as resolveAppRootFromModule, 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-PFUo6XmY.mjs";
|
|
2
|
-
import { s as isAction, u as resolveActionTool } from "./dist-
|
|
2
|
+
import { s as isAction, u as resolveActionTool } from "./dist-DYbhRy-F.mjs";
|
|
3
3
|
import "./env-api-keys-CdN4tAK8.mjs";
|
|
4
4
|
import { i as getModel, t as AssistantMessageEventStream } from "./event-stream-C7YBbzsc.mjs";
|
|
5
5
|
import "./json-parse-CQOxNUrj.mjs";
|
|
6
|
-
import { S as isMcp, _ as touchSession, a as buildCredentialRunContext, b as connectMcpStdio, c as isCredentialError, d as MESSAGE_EVENT_TYPE$1, f as appendEvent, g as listMessageEvents, h as getSession, i as withSpan, l as resolveActionCredentials, m as getAgentByRoute, n as getTraceContext, o as captureCredentialToolErrors, p as createSession, s as createCredentialResolver, t as captureConsole, u as resolveMcpTools, v as connectMcpDefinition, x as defineMcp, y as connectMcpServer } from "./dist-
|
|
6
|
+
import { S as isMcp, _ as touchSession, a as buildCredentialRunContext, b as connectMcpStdio, c as isCredentialError, d as MESSAGE_EVENT_TYPE$1, f as appendEvent, g as listMessageEvents, h as getSession, i as withSpan, l as resolveActionCredentials, m as getAgentByRoute, n as getTraceContext, o as captureCredentialToolErrors, p as createSession, s as createCredentialResolver, t as captureConsole, u as resolveMcpTools, v as connectMcpDefinition, x as defineMcp, y as connectMcpServer } from "./dist-DJQ009A6.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -927,7 +927,7 @@ function loadGoogleVertexProviderModule() {
|
|
|
927
927
|
return googleVertexProviderModulePromise;
|
|
928
928
|
}
|
|
929
929
|
function loadMistralProviderModule() {
|
|
930
|
-
mistralProviderModulePromise ||= import("./mistral-
|
|
930
|
+
mistralProviderModulePromise ||= import("./mistral-DJwJ_CBZ.mjs").then((module) => {
|
|
931
931
|
const provider = module;
|
|
932
932
|
return {
|
|
933
933
|
stream: provider.streamMistral,
|
package/dist/credentials.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BM_f7hFN.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.credential = require_dist.credential;
|
package/dist/credentials.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as credentialInputSchema, b as normalizeCredentialList, g as credential, h as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, p as CREDENTIAL_SCOPE_LEVELS, v as defineCredential, x as toCredentialRequirement, y as isCredentialInput } from "./dist-
|
|
1
|
+
import { _ as credentialInputSchema, b as normalizeCredentialList, g as credential, h as DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, p as CREDENTIAL_SCOPE_LEVELS, v as defineCredential, x as toCredentialRequirement, y as isCredentialInput } from "./dist-DYbhRy-F.mjs";
|
|
2
2
|
export { CREDENTIAL_SCOPE_LEVELS, DEFAULT_CREDENTIAL_RESOLUTION_CHAIN, credential, credentialInputSchema, defineCredential, isCredentialInput, normalizeCredentialList, toCredentialRequirement };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { U as SandboxDefinitionSchema } from "./dist-PFUo6XmY.mjs";
|
|
2
|
-
import { a as getActionCredentialRequirements, b as normalizeCredentialList, i as executeAction, l as registerWorkflowRunGetter } from "./dist-
|
|
3
|
-
import { i as withSpan, l as resolveActionCredentials, n as getTraceContext, r as logSystem, t as captureConsole } from "./dist-
|
|
2
|
+
import { a as getActionCredentialRequirements, b as normalizeCredentialList, i as executeAction, l as registerWorkflowRunGetter } from "./dist-DYbhRy-F.mjs";
|
|
3
|
+
import { i as withSpan, l as resolveActionCredentials, n as getTraceContext, r as logSystem, t as captureConsole } from "./dist-DJQ009A6.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
//#region ../workflow/dist/index.mjs
|
|
@@ -151,4 +151,4 @@ async function executeWorkflow(workflow, input, options = {}) {
|
|
|
151
151
|
//#endregion
|
|
152
152
|
export { isWorkflow as i, defineWorkflow as n, executeWorkflow as r, MemoryActionStore as t };
|
|
153
153
|
|
|
154
|
-
//# sourceMappingURL=dist
|
|
154
|
+
//# sourceMappingURL=dist--tk_TVnK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dist
|
|
1
|
+
{"version":3,"file":"dist--tk_TVnK.mjs","names":[],"sources":["../../workflow/dist/index.mjs"],"sourcesContent":["import { z } from \"zod\";\nimport { SandboxDefinitionSchema } from \"@keystrokehq/sandbox\";\nimport { captureConsole, getTraceContext, logSystem, withSpan } from \"@keystrokehq/tracing\";\nimport { executeAction, getActionCredentialRequirements, normalizeCredentialList, registerWorkflowRunGetter } from \"@keystrokehq/action\";\nimport { resolveActionCredentials } from \"@keystrokehq/credentials\";\nimport { AsyncLocalStorage } from \"node:async_hooks\";\n//#region src/workflow-definition.ts\nconst zodSchema = z.custom((v) => v instanceof z.ZodType, \"must be a Zod schema\");\n/** Runtime validation for an unbranded workflow definition. */\nconst workflowCoreSchema = z.object({\n\tkey: z.string().trim().min(1),\n\tname: z.string().optional(),\n\tdescription: z.string().optional(),\n\tsubscription: z.object({ mode: z.enum([\"system\", \"subscribable\"]).optional() }).optional(),\n\tsandbox: SandboxDefinitionSchema.optional(),\n\tinput: zodSchema,\n\toutput: zodSchema,\n\trun: z.function()\n});\nconst WORKFLOW = Symbol.for(\"keystroke.workflow\");\n/**\n* Validates brand + shape via `workflowCoreSchema` so discovery and guards\n* reject malformed definitions.\n*/\nfunction isWorkflow(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(WORKFLOW in value) || value[WORKFLOW] !== true) return false;\n\treturn workflowCoreSchema.safeParse(value).success;\n}\n//#endregion\n//#region src/define-workflow.ts\nfunction defineWorkflow(def) {\n\tconst result = workflowCoreSchema.safeParse(def);\n\tif (!result.success) throw new Error(`Invalid workflow definition: ${formatIssues(result.error.issues)}`);\n\treturn {\n\t\t...result.data,\n\t\t[WORKFLOW]: true\n\t};\n}\nfunction formatIssues(issues) {\n\treturn issues.map((issue) => {\n\t\treturn `${issue.path.length > 0 ? `${issue.path.join(\".\")}: ` : \"\"}${issue.message}`;\n\t}).join(\"; \");\n}\n//#endregion\n//#region src/create-action-runner.ts\nfunction withCredentialChainOverride(requirements, chain) {\n\tif (!requirements || !chain) return requirements;\n\treturn normalizeCredentialList(requirements).map((requirement) => ({\n\t\t...requirement,\n\t\tchain\n\t}));\n}\nfunction createActionRunner(store, runId, options = {}) {\n\treturn async (action, input, runOptions) => {\n\t\tconst actionKey = runOptions?.id ?? action.key;\n\t\tconst cached = await store.get(runId, actionKey);\n\t\tif (cached !== void 0) {\n\t\t\tawait withSpan({\n\t\t\t\tkind: \"action\",\n\t\t\t\tname: actionKey,\n\t\t\t\trefId: `${runId}:${actionKey}`,\n\t\t\t\tmetadata: {\n\t\t\t\t\trunId,\n\t\t\t\t\tactionKey,\n\t\t\t\t\treplayed: true\n\t\t\t\t}\n\t\t\t}, async () => {\n\t\t\t\tawait logSystem(\"info\", \"action replayed from checkpoint\", {\n\t\t\t\t\trunId,\n\t\t\t\t\tactionKey\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn action.output.parse(cached);\n\t\t}\n\t\treturn withSpan({\n\t\t\tkind: \"action\",\n\t\t\tname: actionKey,\n\t\t\trefId: `${runId}:${actionKey}`,\n\t\t\tmetadata: {\n\t\t\t\trunId,\n\t\t\t\tactionKey\n\t\t\t}\n\t\t}, async () => captureConsole(async () => {\n\t\t\tconst requirements = withCredentialChainOverride(getActionCredentialRequirements(action), runOptions?.credentialChain);\n\t\t\tconst contextOverride = runOptions?.credentialSelection ? { selection: runOptions.credentialSelection } : void 0;\n\t\t\tconst validatedOutput = await executeAction(action, input, requirements?.length ? await resolveActionCredentials(requirements, {\n\t\t\t\tresolveCredentials: options.resolveCredentials,\n\t\t\t\tcontext: options.credentialContext,\n\t\t\t\toauthAdapter: options.oauthAdapter,\n\t\t\t\tconsumer: {\n\t\t\t\t\tkind: \"action\",\n\t\t\t\t\tname: action.key\n\t\t\t\t},\n\t\t\t\tcontextOverride\n\t\t\t}) : {});\n\t\t\tawait store.set(runId, actionKey, validatedOutput);\n\t\t\treturn validatedOutput;\n\t\t}));\n\t};\n}\n//#endregion\n//#region src/memory-action-store.ts\nvar MemoryActionStore = class {\n\trecords = /* @__PURE__ */ new Map();\n\tkey(runId, actionKey) {\n\t\treturn `${runId}:${actionKey}`;\n\t}\n\tasync get(runId, actionKey) {\n\t\treturn this.records.get(this.key(runId, actionKey));\n\t}\n\tasync set(runId, actionKey, output) {\n\t\tthis.records.set(this.key(runId, actionKey), output);\n\t}\n};\n//#endregion\n//#region src/run-context.ts\nconst storage = new AsyncLocalStorage();\nregisterWorkflowRunGetter(() => {\n\tconst store = storage.getStore();\n\tif (!store) return;\n\treturn { actionRunner: store.actionRunner };\n});\nfunction runWithWorkflowContext(store, fn) {\n\treturn storage.run(store, fn);\n}\n//#endregion\n//#region src/execute-workflow.ts\nasync function runWorkflowBody(workflow, validatedInput, ctx, actionRunner) {\n\treturn runWithWorkflowContext({\n\t\tactionRunner,\n\t\trunId: ctx.runId\n\t}, () => captureConsole(async () => workflow.run(validatedInput, ctx)));\n}\nasync function executeWorkflow(workflow, input, options = {}) {\n\tconst runId = options.runId ?? crypto.randomUUID();\n\tconst actionRunner = createActionRunner(options.actionStore ?? options.actionStoreFactory?.() ?? new MemoryActionStore(), runId, {\n\t\tresolveCredentials: options.resolveCredentials,\n\t\tcredentialContext: options.credentialContext,\n\t\toauthAdapter: options.oauthAdapter\n\t});\n\tconst validatedInput = workflow.input.parse(input);\n\tconst ctx = {\n\t\trunId,\n\t\t...options.context\n\t};\n\tif (options.skipWorkflowSpan) return workflow.output.parse(await runWorkflowBody(workflow, validatedInput, ctx, actionRunner));\n\tconst parent = getTraceContext();\n\tconst output = await withSpan({\n\t\tkind: \"workflow_run\",\n\t\tname: workflow.key,\n\t\trefId: runId,\n\t\ttraceId: parent?.traceId ?? runId,\n\t\tmetadata: {\n\t\t\tworkflowKey: workflow.key,\n\t\t\ttrigger: options.context?.trigger ?? \"api\",\n\t\t\t...options.workflowSpanMetadata\n\t\t}\n\t}, () => runWorkflowBody(workflow, validatedInput, ctx, actionRunner));\n\treturn workflow.output.parse(output);\n}\n//#endregion\nexport { MemoryActionStore, defineWorkflow, executeWorkflow, isWorkflow };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;AAOA,MAAM,YAAY,EAAE,QAAQ,MAAM,aAAa,EAAE,SAAS,sBAAsB;;AAEhF,MAAM,qBAAqB,EAAE,OAAO;CACnC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC;CAC5B,MAAM,EAAE,OAAO,EAAE,SAAS;CAC1B,aAAa,EAAE,OAAO,EAAE,SAAS;CACjC,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS;CACzF,SAAS,wBAAwB,SAAS;CAC1C,OAAO;CACP,QAAQ;CACR,KAAK,EAAE,SAAS;AACjB,CAAC;AACD,MAAM,WAAW,OAAO,IAAI,oBAAoB;;;;;AAKhD,SAAS,WAAW,OAAO;CAC1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QAAQ,SAAS,OAAO,WAAW;CACjD,MAAM,eAAe,mBAAmB,QAAQ,eAAe,QAAQ,qBAAqB,KAAK,IAAI,kBAAkB,GAAG,OAAO;EAChI,oBAAoB,QAAQ;EAC5B,mBAAmB,QAAQ;EAC3B,cAAc,QAAQ;CACvB,CAAC;CACD,MAAM,iBAAiB,SAAS,MAAM,MAAM,KAAK;CACjD,MAAM,MAAM;EACX;EACA,GAAG,QAAQ;CACZ;CACA,IAAI,QAAQ,kBAAkB,OAAO,SAAS,OAAO,MAAM,MAAM,gBAAgB,UAAU,gBAAgB,KAAK,YAAY,CAAC;CAC7H,MAAM,SAAS,gBAAgB;CAC/B,MAAM,SAAS,MAAM,SAAS;EAC7B,MAAM;EACN,MAAM,SAAS;EACf,OAAO;EACP,SAAS,QAAQ,WAAW;EAC5B,UAAU;GACT,aAAa,SAAS;GACtB,SAAS,QAAQ,SAAS,WAAW;GACrC,GAAG,QAAQ;EACZ;CACD,SAAS,gBAAgB,UAAU,gBAAgB,KAAK,YAAY,CAAC;CACrE,OAAO,SAAS,OAAO,MAAM,MAAM;AACpC"}
|
|
@@ -1345,12 +1345,17 @@ function runWithinActionExecution(actionKey, run) {
|
|
|
1345
1345
|
function runOutsideActionExecution(fn) {
|
|
1346
1346
|
return executingAction.exit(fn);
|
|
1347
1347
|
}
|
|
1348
|
-
|
|
1348
|
+
const REGISTRY_KEY = Symbol.for("keystroke.workflowRunGetter");
|
|
1349
|
+
function registry() {
|
|
1350
|
+
const globalScope = globalThis;
|
|
1351
|
+
if (!globalScope[REGISTRY_KEY]) globalScope[REGISTRY_KEY] = {};
|
|
1352
|
+
return globalScope[REGISTRY_KEY];
|
|
1353
|
+
}
|
|
1349
1354
|
function registerWorkflowRunGetter(fn) {
|
|
1350
|
-
getter = fn;
|
|
1355
|
+
registry().getter = fn;
|
|
1351
1356
|
}
|
|
1352
1357
|
function getWorkflowRunHandle() {
|
|
1353
|
-
return getter?.();
|
|
1358
|
+
return registry().getter?.();
|
|
1354
1359
|
}
|
|
1355
1360
|
function buildSelectionForAction(action, instanceId) {
|
|
1356
1361
|
if (!action.credentials?.length) return {};
|
|
@@ -1603,4 +1608,4 @@ Object.defineProperty(exports, "toCredentialRequirement", {
|
|
|
1603
1608
|
}
|
|
1604
1609
|
});
|
|
1605
1610
|
|
|
1606
|
-
//# sourceMappingURL=dist-
|
|
1611
|
+
//# sourceMappingURL=dist-BM_f7hFN.cjs.map
|