@tailor-platform/sdk 1.82.0 → 1.83.0
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/CHANGELOG.md +8 -0
- package/dist/application-CP7JKG9R.mjs +3 -0
- package/dist/{application-CVeA53ok.mjs → application-Cp0FxIm2.mjs} +3 -3
- package/dist/application-Cp0FxIm2.mjs.map +1 -0
- package/dist/cli/index.mjs +3 -3
- package/dist/cli/lib.mjs +2 -2
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/index.mjs +3 -3
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/workflow/execution-policy.d.mts +2 -2
- package/dist/{globals-DUqEetIh.mjs → globals-DraXTdqg.mjs} +6 -5
- package/dist/globals-DraXTdqg.mjs.map +1 -0
- package/dist/{register-typescript-runtime-O7zQNif0.mjs → register-typescript-runtime-CCHyKeXO.mjs} +125 -11
- package/dist/register-typescript-runtime-CCHyKeXO.mjs.map +1 -0
- package/dist/{registry-CXi7rJq7.mjs → registry-Ct0Wgxp1.mjs} +3 -3
- package/dist/registry-Ct0Wgxp1.mjs.map +1 -0
- package/dist/runtime/index.mjs +1 -1
- package/dist/runtime/workflow.d.mts +39 -21
- package/dist/runtime/workflow.mjs +2 -2
- package/dist/utils/test/index.mjs +18 -12
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/utils/test/mock.d.mts +2 -2
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.mjs +30 -24
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/dist/vitest/mocks/workflow.d.mts +20 -15
- package/dist/vitest/setup.mjs +1 -1
- package/dist/{workflow-CkIDJpdg.mjs → workflow-B2mwc7aT.mjs} +17 -9
- package/dist/workflow-B2mwc7aT.mjs.map +1 -0
- package/docs/runtime.md +1 -1
- package/docs/services/tailordb-migration.md +5 -3
- package/docs/services/workflow.md +2 -2
- package/docs/testing.md +1 -1
- package/package.json +2 -2
- package/dist/application-CP0W2sQo.mjs +0 -3
- package/dist/application-CVeA53ok.mjs.map +0 -1
- package/dist/globals-DUqEetIh.mjs.map +0 -1
- package/dist/register-typescript-runtime-O7zQNif0.mjs.map +0 -1
- package/dist/registry-CXi7rJq7.mjs.map +0 -1
- package/dist/workflow-CkIDJpdg.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry-CXi7rJq7.mjs","names":[],"sources":["../src/utils/test/platform-serialize.ts","../src/configure/services/workflow/registry.ts"],"sourcesContent":["/**\n * Validate and serialize a value as it would cross the Platform JSON boundary.\n *\n * Mirrors the runtime checks the platform performs on workflow arguments,\n * wait payloads, and trigger inputs so that local tests fail in the same\n * places production fails.\n *\n * Throws on:\n * - `NaN` / `Infinity` / `-Infinity` (`JSON.stringify` would silently emit `null`)\n * - `BigInt` (TypeError is thrown by `JSON.stringify`; we emit a clearer message)\n * - Non-plain objects (class instances, including `Date`, `Map`, `Set`, `Error`,\n * and user-defined DTOs whose prototype is not `Object.prototype`)\n *\n * The replacer reads `this[key]` so the check sees the original value before\n * any `toJSON` conversion (e.g. `Date.prototype.toJSON`).\n * @param value - Value to validate and round-trip\n * @returns The JSON-normalized value (undefined/function properties stripped, etc.)\n */\nexport function platformSerialize<T>(value: T): T {\n // Top-level undefined is allowed (jobs may take no input).\n if (value === undefined) return undefined as T;\n\n // Root function/symbol stringify to `undefined`; throw a specific message here.\n if (typeof value === \"function\") {\n throw new TypeError(\"platformSerialize: function is not JSON-serializable at <root>\");\n }\n if (typeof value === \"symbol\") {\n throw new TypeError(\"platformSerialize: Symbol is not JSON-serializable at <root>\");\n }\n\n const serialized = JSON.stringify(value, function (key, val) {\n if (typeof val === \"number\" && !Number.isFinite(val)) {\n throw new TypeError(\n `platformSerialize: non-finite number at ${formatPath(key)}: ${String(val)}`,\n );\n }\n if (typeof val === \"bigint\") {\n throw new TypeError(\n `platformSerialize: BigInt is not JSON-serializable at ${formatPath(key)}`,\n );\n }\n // Look at the pre-toJSON value so Date/Map/Set/etc. can be detected.\n const raw = (this as Record<string, unknown>)[key];\n if (raw !== null && typeof raw === \"object\" && !Array.isArray(raw)) {\n const proto = Object.getPrototypeOf(raw);\n if (proto !== Object.prototype && proto !== null) {\n const ctor = (raw as { constructor?: { name?: string } }).constructor?.name ?? \"anonymous\";\n throw new TypeError(\n `platformSerialize: non-plain object at ${formatPath(key)} (${ctor} instance)`,\n );\n }\n }\n return val;\n });\n\n // `JSON.stringify` returns `undefined` when the root collapses (e.g. a `toJSON`\n // returning `undefined`); parsing that would throw opaquely.\n // JSON.stringify returns undefined for non-serializable values\n // oxlint-disable-next-line typescript/no-unnecessary-condition\n if (serialized === undefined) {\n throw new TypeError(\"platformSerialize: value is not JSON-serializable at <root>\");\n }\n\n return JSON.parse(serialized) as T;\n}\n\nfunction formatPath(key: string): string {\n return key === \"\" ? \"<root>\" : `\"${key}\"`;\n}\n","import { platformSerialize } from \"#/utils/test/platform-serialize\";\nimport { buildJobContext } from \"./test-env-key\";\nimport type { TailorEnv, TailorInvoker } from \"#/runtime/types\";\nimport type { StartJobFunctionOptions, StartWorkflowOptions } from \"#/runtime/workflow\";\n\n/**\n * Body signature shared by workflow jobs at registry-write time.\n * The user's `createWorkflowJob`/`createWorkflow` body uses concrete types,\n * but the registry erases them for storage.\n */\nexport type RegisteredJobBody = (\n args: unknown,\n context: { env: TailorEnv; invoker?: TailorInvoker },\n) => unknown | Promise<unknown>;\n\nexport interface RegisteredWorkflow {\n mainJobName: string;\n}\n\nconst JOB_REGISTRY_KEY: unique symbol = Symbol.for(\"tailor-platform/sdk:job-registry\");\nconst WORKFLOW_REGISTRY_KEY: unique symbol = Symbol.for(\"tailor-platform/sdk:workflow-registry\");\n\ntype PlatformWorkflow = {\n startWorkflow: (name: string, args?: unknown, options?: StartWorkflowOptions) => Promise<string>;\n triggerWorkflow: (\n name: string,\n args?: unknown,\n options?: StartWorkflowOptions,\n ) => Promise<string>;\n startJobFunction: (name: string, args?: unknown, options?: StartJobFunctionOptions) => unknown;\n triggerJobFunction: (name: string, args?: unknown, options?: StartJobFunctionOptions) => unknown;\n};\n\ntype GlobalWithRegistry = typeof globalThis & {\n [JOB_REGISTRY_KEY]?: Map<string, RegisteredJobBody>;\n [WORKFLOW_REGISTRY_KEY]?: Map<string, RegisteredWorkflow>;\n tailor?: { workflow?: PlatformWorkflow };\n};\n\nfunction jobs(): Map<string, RegisteredJobBody> {\n const g = globalThis as GlobalWithRegistry;\n let map = g[JOB_REGISTRY_KEY];\n if (!map) {\n map = new Map();\n g[JOB_REGISTRY_KEY] = map;\n }\n return map;\n}\n\nfunction workflows(): Map<string, RegisteredWorkflow> {\n const g = globalThis as GlobalWithRegistry;\n let map = g[WORKFLOW_REGISTRY_KEY];\n if (!map) {\n map = new Map();\n g[WORKFLOW_REGISTRY_KEY] = map;\n }\n return map;\n}\n\n/**\n * Register a job body keyed by job name. Called as a side effect by\n * `createWorkflowJob` so the vitest mock can execute the body when\n * `globalThis.tailor.workflow.triggerJobFunction(name, args)` is invoked.\n *\n * In production builds the bundler rewrites `.trigger()` calls so this registry\n * is never read; the gated write is dropped as dead code.\n * @param name - Job name\n * @param body - Job body function\n */\nexport function registerJob(name: string, body: RegisteredJobBody): void {\n jobs().set(name, body);\n}\n\n/**\n * Look up a registered job body by name.\n * @param name - Job name\n * @returns The registered body, or undefined when no job is registered\n */\nexport function getRegisteredJob(name: string): RegisteredJobBody | undefined {\n return jobs().get(name);\n}\n\n/**\n * Register a workflow's main job name so the mock can run the workflow locally.\n * @param name - Workflow name\n * @param mainJobName - Name of the workflow's main job\n */\nexport function registerWorkflow(name: string, mainJobName: string): void {\n workflows().set(name, { mainJobName });\n}\n\n/**\n * Look up a registered workflow by name.\n * @param name - Workflow name\n * @returns The registered workflow, or undefined\n */\nexport function getRegisteredWorkflow(name: string): RegisteredWorkflow | undefined {\n return workflows().get(name);\n}\n\nfunction currentPlatformWorkflow(): PlatformWorkflow | undefined {\n // globalThis may not have the tailor property at runtime\n // oxlint-disable-next-line typescript/no-unnecessary-condition\n return (globalThis as GlobalWithRegistry).tailor?.workflow;\n}\n\n// A valid placeholder UUID, so callers that validate the execution id behave the\n// same locally as against the platform.\nexport const TRIGGER_DEFAULT = \"00000000-0000-4000-8000-000000000000\";\n\nfunction serializeReturn(out: unknown): unknown {\n return out instanceof Promise ? out.then((v) => platformSerialize(v)) : platformSerialize(out);\n}\n\n// Runs the registered body across the platform JSON boundary. Shared by the\n// `tailor-runtime` default runner and the no-shim `.trigger()` fallback below.\nexport function runRegisteredJob(name: string, args?: unknown): unknown {\n const body = getRegisteredJob(name);\n const out = body ? body(platformSerialize(args), buildJobContext()) : null;\n return serializeReturn(out);\n}\n\nexport async function runRegisteredWorkflow(name: string, args?: unknown): Promise<string> {\n const workflow = getRegisteredWorkflow(name);\n if (workflow) await runRegisteredJob(workflow.mainJobName, args);\n return TRIGGER_DEFAULT;\n}\n\n// `.trigger()` routes through the installed `tailor.workflow` shim, falling back\n// to running the registered body/workflow locally when none is installed.\n// Preserve arity: the shim sees a 2-argument call when the caller supplied no\n// options, and a 3-argument call otherwise, mirroring the bundler rewrite so\n// mocks observe the same shape in local execution and in bundled workflows.\nexport function dispatchTriggerJob(\n name: string,\n args?: unknown,\n options?: StartJobFunctionOptions,\n): unknown {\n const workflow = currentPlatformWorkflow();\n if (!workflow) return runRegisteredJob(name, args);\n // oxlint-disable-next-line prefer-rest-params\n return arguments.length >= 3\n ? workflow.triggerJobFunction(name, args, options)\n : workflow.triggerJobFunction(name, args);\n}\n\n// Accepts `unknown` because the SDK-side `.trigger()` accepts a wider options\n// shape than the platform surface (e.g. `authInvoker` may be a machine-user\n// name string that the bundler normalizes at build time). Local execution\n// forwards the value verbatim; only the bundled path enforces the platform\n// contract.\nexport function dispatchTriggerWorkflow(\n name: string,\n args?: unknown,\n options?: unknown,\n): Promise<string> {\n const workflow = currentPlatformWorkflow();\n if (!workflow) return runRegisteredWorkflow(name, args);\n // oxlint-disable-next-line prefer-rest-params\n return arguments.length >= 3\n ? workflow.triggerWorkflow(name, args, options as StartWorkflowOptions | undefined)\n : workflow.triggerWorkflow(name, args);\n}\n"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-CkIDJpdg.mjs","names":[],"sources":["../src/runtime/workflow.ts"],"sourcesContent":["/**\n * Workflow utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.workflow` runtime API.\n * At runtime this delegates to `globalThis.tailor.workflow`. Use `mockWorkflow`\n * from `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n *\n * The canonical names (`startWorkflow`, `startJobFunction`,\n * `resumeWorkflowExecution`) mirror the public `tailor.v1` RPC vocabulary.\n * The pre-alignment names (`triggerWorkflow`, `triggerJobFunction`,\n * `resumeWorkflow`) are kept as frozen aliases that reference the same platform\n * implementations, so existing code continues to work unchanged.\n * @example\n * import { workflow } from \"@tailor-platform/sdk/runtime\";\n *\n * const executionId = await workflow.startWorkflow(\"myWorkflow\", { data: \"value\" });\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Specifies the machine user that should be used to execute the workflow.\n * This allows workflows to run with specific authentication context.\n */\nexport interface AuthInvoker {\n /** The namespace where the machine user is defined */\n namespace: string;\n /** The name of the machine user to use for workflow execution */\n machineUserName: string;\n}\n\n/** Options for {@link startWorkflow}. */\nexport interface StartWorkflowOptions {\n /** Optional authentication invoker to specify which machine user should execute the workflow */\n authInvoker?: AuthInvoker;\n}\n\n/**\n * Frozen alias for {@link StartWorkflowOptions}. Kept for backward compatibility.\n * @deprecated Use {@link StartWorkflowOptions} instead.\n */\nexport type TriggerWorkflowOptions = StartWorkflowOptions;\n\ndeclare const executionPolicyKeyBrand: unique symbol;\n\n/**\n * A concrete runtime key produced by an execution policy instance — either an\n * exact-match policy's `.key`, or a wildcard policy's `.keyFor(suffix)` (see\n * `defineWorkflowExecutionPolicies`). Branded so an arbitrary string that\n * wasn't derived from a declared policy can't be passed as `executionPolicyKey`.\n */\nexport type ExecutionPolicyKey = string & { readonly [executionPolicyKeyBrand]: never };\n\n/** Options for {@link startJobFunction}. */\nexport interface StartJobFunctionOptions {\n /**\n * Execution policy key matched by the platform against the policies\n * declared with `defineWorkflowExecutionPolicies` in `tailor.config.ts`.\n */\n executionPolicyKey?: ExecutionPolicyKey;\n}\n\n/**\n * Frozen alias for {@link StartJobFunctionOptions}. Kept for backward compatibility.\n * @deprecated Use {@link StartJobFunctionOptions} instead.\n */\nexport type TriggerJobFunctionOptions = StartJobFunctionOptions;\n\n/**\n * Platform API surface for `tailor.workflow`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.workflow`.\n *\n * Each method below is also re-exported as a top-level named export from this\n * module so callers can either `import * as workflow from\n * \"@tailor-platform/sdk/runtime/workflow\"` or pick individual methods.\n */\nexport interface TailorWorkflowAPI {\n /**\n * Starts a workflow and returns its execution ID.\n *\n * Canonical name that mirrors the `tailor.v1` RPC vocabulary.\n * {@link triggerWorkflow} is a frozen alias that resolves to the same\n * platform implementation.\n * @param workflowName - Workflow name as defined in tailor.config\n * @param args - Arguments forwarded to the workflow's main job\n * @param options - Optional start options (e.g. `authInvoker`)\n * @returns The execution ID of the started workflow\n */\n startWorkflow(workflowName: string, args?: any, options?: StartWorkflowOptions): Promise<string>;\n\n /**\n * Frozen alias for {@link startWorkflow}. Kept for backward compatibility.\n * @deprecated Use {@link startWorkflow} instead.\n */\n triggerWorkflow(\n workflowName: string,\n args?: any,\n options?: TriggerWorkflowOptions,\n ): Promise<string>;\n\n /**\n * Resumes a failed or pending-retry workflow execution and returns its execution ID.\n *\n * Canonical name that mirrors the `tailor.v1` RPC vocabulary.\n * {@link resumeWorkflow} is a frozen alias that resolves to the same\n * platform implementation.\n * @param executionId - The execution to resume\n * @returns The execution ID of the resumed workflow\n */\n resumeWorkflowExecution(executionId: string): Promise<string>;\n\n /**\n * Frozen alias for {@link resumeWorkflowExecution}. Kept for backward compatibility.\n * @deprecated Use {@link resumeWorkflowExecution} instead.\n */\n resumeWorkflow(executionId: string): Promise<string>;\n\n /**\n * Starts a job function and returns its result.\n *\n * Canonical name that mirrors the `tailor.v1` RPC vocabulary.\n * {@link triggerJobFunction} is a frozen alias that resolves to the same\n * platform implementation.\n * @param jobName - Job name as defined in the workflow\n * @param args - Arguments forwarded to the job\n * @param options - Optional start options (e.g. `executionPolicyKey`)\n * @returns The job's return value\n */\n startJobFunction(jobName: string, args?: any, options?: StartJobFunctionOptions): any;\n\n /**\n * Frozen alias for {@link startJobFunction}. Kept for backward compatibility.\n * @deprecated Use {@link startJobFunction} instead.\n */\n triggerJobFunction(jobName: string, args?: any, options?: TriggerJobFunctionOptions): any;\n\n /**\n * Suspends the current workflow execution and waits for an external signal to resume.\n * @param key - Wait point key\n * @param payload - Optional payload to record with the wait point\n * @returns The payload supplied by the corresponding `resolve` call\n */\n wait(key: string, payload?: any): any;\n\n /**\n * Resolves a waiting workflow execution, causing it to resume.\n * @param executionId - The execution to resume\n * @param key - Wait point key to resolve\n * @param callback - Callback receiving the wait payload; its return value is forwarded to `wait`\n * @returns A promise that resolves once the resolve has been recorded\n */\n resolve(executionId: string, key: string, callback: (waitPayload: any) => any): Promise<void>;\n}\n\nconst api = (): TailorWorkflowAPI =>\n (globalThis as { tailor: { workflow: TailorWorkflowAPI } }).tailor.workflow;\n\n/**\n * See {@link TailorWorkflowAPI.startWorkflow}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.startWorkflow}\n * @returns The execution ID of the started workflow\n */\nexport const startWorkflow: TailorWorkflowAPI[\"startWorkflow\"] = (...args) =>\n api().startWorkflow(...args);\n\n/**\n * Frozen alias for {@link startWorkflow}. Kept for backward compatibility.\n * @deprecated Use {@link startWorkflow} instead.\n * @param args - Forwarded to {@link TailorWorkflowAPI.triggerWorkflow}\n * @returns The execution ID of the triggered workflow\n */\nexport const triggerWorkflow: TailorWorkflowAPI[\"triggerWorkflow\"] = (...args) =>\n api().triggerWorkflow(...args);\n\n/**\n * See {@link TailorWorkflowAPI.resumeWorkflowExecution}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.resumeWorkflowExecution}\n * @returns The execution ID of the resumed workflow\n */\nexport const resumeWorkflowExecution: TailorWorkflowAPI[\"resumeWorkflowExecution\"] = (...args) =>\n api().resumeWorkflowExecution(...args);\n\n/**\n * Frozen alias for {@link resumeWorkflowExecution}. Kept for backward compatibility.\n * @deprecated Use {@link resumeWorkflowExecution} instead.\n * @param args - Forwarded to {@link TailorWorkflowAPI.resumeWorkflow}\n * @returns The execution ID of the resumed workflow\n */\nexport const resumeWorkflow: TailorWorkflowAPI[\"resumeWorkflow\"] = (...args) =>\n api().resumeWorkflow(...args);\n\n/**\n * See {@link TailorWorkflowAPI.startJobFunction}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.startJobFunction}\n * @returns The job's return value\n */\nexport const startJobFunction: TailorWorkflowAPI[\"startJobFunction\"] = (...args) =>\n api().startJobFunction(...args);\n\n/**\n * Frozen alias for {@link startJobFunction}. Kept for backward compatibility.\n * @deprecated Use {@link startJobFunction} instead.\n * @param args - Forwarded to {@link TailorWorkflowAPI.triggerJobFunction}\n * @returns The job's return value\n */\nexport const triggerJobFunction: TailorWorkflowAPI[\"triggerJobFunction\"] = (...args) =>\n api().triggerJobFunction(...args);\n\n/**\n * See {@link TailorWorkflowAPI.wait}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.wait}\n * @returns The payload supplied by the corresponding `resolve` call\n */\nexport const wait: TailorWorkflowAPI[\"wait\"] = (...args) => api().wait(...args);\n\n/**\n * See {@link TailorWorkflowAPI.resolve}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.resolve}\n * @returns A promise that resolves once the resolve has been recorded\n */\nexport const resolve: TailorWorkflowAPI[\"resolve\"] = (...args) => api().resolve(...args);\n"],"mappings":";;;;;;;;;;;;;AA0JA,MAAM,YACH,WAA2D,OAAO;;;;;;AAOrE,MAAa,iBAAqD,GAAG,SACnE,IAAI,CAAC,CAAC,cAAc,GAAG,IAAI;;;;;;;AAQ7B,MAAa,mBAAyD,GAAG,SACvE,IAAI,CAAC,CAAC,gBAAgB,GAAG,IAAI;;;;;;AAO/B,MAAa,2BAAyE,GAAG,SACvF,IAAI,CAAC,CAAC,wBAAwB,GAAG,IAAI;;;;;;;AAQvC,MAAa,kBAAuD,GAAG,SACrE,IAAI,CAAC,CAAC,eAAe,GAAG,IAAI;;;;;;AAO9B,MAAa,oBAA2D,GAAG,SACzE,IAAI,CAAC,CAAC,iBAAiB,GAAG,IAAI;;;;;;;AAQhC,MAAa,sBAA+D,GAAG,SAC7E,IAAI,CAAC,CAAC,mBAAmB,GAAG,IAAI;;;;;;AAOlC,MAAa,QAAmC,GAAG,SAAS,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI;;;;;;AAO9E,MAAa,WAAyC,GAAG,SAAS,IAAI,CAAC,CAAC,QAAQ,GAAG,IAAI"}
|