@executioncontrolprotocol/runtime-temporal 0.10.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/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @executioncontrolprotocol/runtime-temporal
2
+
3
+ > **Pre-release scaffold.** This package exposes a typed Temporal runtime
4
+ > definition and executor contract, but **durable execution is not implemented
5
+ > yet.** Binding this runtime and running a workflow throws a descriptive error.
6
+ > Use [`@executioncontrolprotocol/node`](../node/README.md) for local execution today.
7
+
8
+ ## What is real
9
+
10
+ - `temporalRuntimeDefinition` — a real `defineRuntime("@executioncontrolprotocol", "temporal")` with a
11
+ config schema (`taskQueue`, `durablePauses`).
12
+ - `TemporalRuntimeExecutor` — implements the `RuntimeExecutor` contract from
13
+ `@executioncontrolprotocol/core`.
14
+ - `registerTemporalRuntime(registry?)` — idempotent registration on a registry.
15
+ - `TEMPORAL_RUNTIME_ID` (`@executioncontrolprotocol/temporal`).
16
+
17
+ ## What is not implemented
18
+
19
+ - Durable orchestration, activities, signals/updates, pause/resume, and
20
+ policy-constrained retries. `TemporalRuntimeExecutor.execute()` rejects with a
21
+ clear "not yet implemented" error.
22
+
23
+ ## Usage (when implemented)
24
+
25
+ ```ts
26
+ import { environment, runtime } from "@executioncontrolprotocol/node"
27
+ import { temporalRuntimeDefinition, registerTemporalRuntime } from "@executioncontrolprotocol/runtime-temporal"
28
+
29
+ await registerTemporalRuntime()
30
+
31
+ const env = environment("production").withRuntime(
32
+ runtime("@executioncontrolprotocol/temporal", "Temporal Runtime").with({
33
+ taskQueue: "ecp-runtime",
34
+ durablePauses: true,
35
+ })
36
+ )
37
+ ```
38
+
39
+ See [`ecp-overhaul.md`](../../../ecp-overhaul.md) section 17 for the intended
40
+ Temporal responsibilities.
@@ -0,0 +1,44 @@
1
+ import type { RunResult, RuntimeExecutionContext, RuntimeExecutor, WorkflowManifest } from "@executioncontrolprotocol/core";
2
+ /**
3
+ * Temporal runtime id.
4
+ *
5
+ * @category Runtimes
6
+ */
7
+ export declare const TEMPORAL_RUNTIME_ID: "@executioncontrolprotocol/temporal";
8
+ /**
9
+ * Temporal runtime id (string binding).
10
+ *
11
+ * @deprecated Prefer {@link TEMPORAL_RUNTIME_ID} or
12
+ * {@link temporalRuntimeDefinition}. Retained for existing string bindings.
13
+ * @category Runtimes
14
+ */
15
+ export declare const temporalRuntime: "@executioncontrolprotocol/temporal";
16
+ /**
17
+ * Temporal runtime executor.
18
+ *
19
+ * This is a typed scaffold: the runtime definition, config schema, and executor
20
+ * contract are real so the runtime can be discovered, bound, and validated, but
21
+ * durable execution is not implemented. {@link execute} throws a clear error
22
+ * rather than failing in an opaque way.
23
+ *
24
+ * @category Runtimes
25
+ */
26
+ export declare class TemporalRuntimeExecutor implements RuntimeExecutor {
27
+ execute(_manifest: WorkflowManifest, _context: RuntimeExecutionContext): Promise<RunResult>;
28
+ }
29
+ /**
30
+ * Temporal runtime definition.
31
+ *
32
+ * Durable orchestration via Temporal is not yet implemented; binding this
33
+ * runtime and running a workflow throws a descriptive error.
34
+ *
35
+ * @category Runtimes
36
+ */
37
+ export declare const temporalRuntimeDefinition: import("@executioncontrolprotocol/core").RuntimeDefinition;
38
+ /**
39
+ * Register `@executioncontrolprotocol/temporal` on a registry (idempotent).
40
+ *
41
+ * @category Runtimes
42
+ */
43
+ export declare function registerTemporalRuntime(registry?: import("@executioncontrolprotocol/core").Registry): Promise<void>;
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EACjB,MAAM,gCAAgC,CAAA;AAEvC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAG,oCAA6C,CAAA;AAEhF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,sCAAsB,CAAA;AAQlD;;;;;;;;;GASG;AACH,qBAAa,uBAAwB,YAAW,eAAe;IAC7D,OAAO,CACL,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,SAAS,CAAC;CAGtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,4DAOQ,CAAA;AAE9C;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,oDAAiB,GACxB,OAAO,CAAC,IAAI,CAAC,CAIf"}
package/dist/index.js ADDED
@@ -0,0 +1,62 @@
1
+ import { defineRuntime, globalRegistry } from "@executioncontrolprotocol/core";
2
+ import { z } from "zod";
3
+ /**
4
+ * Temporal runtime id.
5
+ *
6
+ * @category Runtimes
7
+ */
8
+ export const TEMPORAL_RUNTIME_ID = "@executioncontrolprotocol/temporal";
9
+ /**
10
+ * Temporal runtime id (string binding).
11
+ *
12
+ * @deprecated Prefer {@link TEMPORAL_RUNTIME_ID} or
13
+ * {@link temporalRuntimeDefinition}. Retained for existing string bindings.
14
+ * @category Runtimes
15
+ */
16
+ export const temporalRuntime = TEMPORAL_RUNTIME_ID;
17
+ /** Error thrown when the Temporal runtime executes a workflow. */
18
+ const NOT_IMPLEMENTED_MESSAGE = "@executioncontrolprotocol/temporal is a pre-release scaffold and cannot execute workflows yet. " +
19
+ "Bind a host runtime such as @executioncontrolprotocol/node for local execution. Track Temporal " +
20
+ "durable execution support before depending on this runtime in production.";
21
+ /**
22
+ * Temporal runtime executor.
23
+ *
24
+ * This is a typed scaffold: the runtime definition, config schema, and executor
25
+ * contract are real so the runtime can be discovered, bound, and validated, but
26
+ * durable execution is not implemented. {@link execute} throws a clear error
27
+ * rather than failing in an opaque way.
28
+ *
29
+ * @category Runtimes
30
+ */
31
+ export class TemporalRuntimeExecutor {
32
+ execute(_manifest, _context) {
33
+ return Promise.reject(new Error(NOT_IMPLEMENTED_MESSAGE));
34
+ }
35
+ }
36
+ /**
37
+ * Temporal runtime definition.
38
+ *
39
+ * Durable orchestration via Temporal is not yet implemented; binding this
40
+ * runtime and running a workflow throws a descriptive error.
41
+ *
42
+ * @category Runtimes
43
+ */
44
+ export const temporalRuntimeDefinition = defineRuntime("@executioncontrolprotocol", "temporal")
45
+ .withConfig({
46
+ /** Temporal task queue name. */
47
+ taskQueue: z.string().optional(),
48
+ /** Whether to use durable pauses (signals/updates) when implemented. */
49
+ durablePauses: z.boolean().optional(),
50
+ })
51
+ .withExecutor(new TemporalRuntimeExecutor());
52
+ /**
53
+ * Register `@executioncontrolprotocol/temporal` on a registry (idempotent).
54
+ *
55
+ * @category Runtimes
56
+ */
57
+ export async function registerTemporalRuntime(registry = globalRegistry) {
58
+ if (!registry.getRuntime(TEMPORAL_RUNTIME_ID)) {
59
+ await registry.registerRuntime(temporalRuntimeDefinition);
60
+ }
61
+ }
62
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,oCAA6C,CAAA;AAEhF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAA;AAElD,kEAAkE;AAClE,MAAM,uBAAuB,GAC3B,iGAAiG;IACjG,iGAAiG;IACjG,2EAA2E,CAAA;AAE7E;;;;;;;;;GASG;AACH,MAAM,OAAO,uBAAuB;IAClC,OAAO,CACL,SAA2B,EAC3B,QAAiC;QAEjC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;IAC3D,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,aAAa,CAAC,2BAA2B,EAAE,UAAU,CAAC;KAC5F,UAAU,CAAC;IACV,gCAAgC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,wEAAwE;IACxE,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC;KACD,YAAY,CAAC,IAAI,uBAAuB,EAAE,CAAC,CAAA;AAE9C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAAQ,GAAG,cAAc;IAEzB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC9C,MAAM,QAAQ,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAA;IAC3D,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@executioncontrolprotocol/runtime-temporal",
3
+ "version": "0.10.0",
4
+ "description": "Pre-release Temporal runtime scaffold for ECP. Durable execution is not yet implemented; binding and running throws a descriptive error.",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc -b"
21
+ },
22
+ "peerDependencies": {
23
+ "@executioncontrolprotocol/core": "^0.10.0",
24
+ "@executioncontrolprotocol/types": "^0.10.0",
25
+ "zod": "^3.24.0"
26
+ },
27
+ "devDependencies": {
28
+ "@executioncontrolprotocol/core": "0.10.0",
29
+ "@executioncontrolprotocol/types": "0.10.0",
30
+ "typescript": "^5.7.0",
31
+ "zod": "^3.24.0"
32
+ }
33
+ }