@distilled.cloud/temporal 1.0.0-rc.15 → 1.0.0-rc.17

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 (46) hide show
  1. package/lib/.lazy.json +1 -0
  2. package/lib/_bundle/lazy.js +4 -0
  3. package/lib/_bundle/sdk.js +2 -0
  4. package/lib/_bundle/sdk.js.map +1 -0
  5. package/lib/credentials.d.ts +2 -2
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/credentials.js +1 -41
  8. package/lib/errors.d.ts +15 -15
  9. package/lib/errors.d.ts.map +1 -1
  10. package/lib/errors.js +1 -26
  11. package/lib/index.d.ts +1 -1
  12. package/lib/index.js +0 -19
  13. package/lib/index.lazy.js +8 -0
  14. package/lib/{index.js.map → index.lazy.js.map} +1 -1
  15. package/lib/pagination.d.ts +1 -1
  16. package/lib/pagination.js +1 -9
  17. package/lib/protocol.d.ts.map +1 -1
  18. package/lib/protocol.js +1 -43
  19. package/lib/retry.d.ts +1 -1
  20. package/lib/retry.d.ts.map +1 -1
  21. package/lib/retry.js +1 -32
  22. package/lib/services/index.js +0 -2
  23. package/lib/services/temporal.d.ts +0 -726
  24. package/lib/services/temporal.d.ts.map +1 -1
  25. package/lib/services/temporal.js +177 -4993
  26. package/lib/services/temporal.js.map +1 -1
  27. package/lib/services.lazy/index.js +3 -0
  28. package/lib/services.lazy/temporal.js +3 -0
  29. package/lib/traits.d.ts +1 -1
  30. package/lib/traits.js +1 -11
  31. package/package.json +9 -7
  32. package/src/credentials.ts +7 -6
  33. package/src/errors.ts +12 -16
  34. package/src/index.ts +2 -2
  35. package/src/pagination.ts +1 -1
  36. package/src/protocol.ts +6 -9
  37. package/src/retry.ts +6 -4
  38. package/src/services/temporal.ts +5761 -6627
  39. package/src/traits.ts +1 -1
  40. package/lib/credentials.js.map +0 -1
  41. package/lib/errors.js.map +0 -1
  42. package/lib/pagination.js.map +0 -1
  43. package/lib/protocol.js.map +0 -1
  44. package/lib/retry.js.map +0 -1
  45. package/lib/services/index.js.map +0 -1
  46. package/lib/traits.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import{api$lazyNamespace as $N}from"@distilled.cloud/core/_bundle/base";
2
+ const $u=import.meta.url,temporal=$N($u,"./temporal.js");
3
+ export{temporal};
@@ -0,0 +1,3 @@
1
+ import{$L}from"../_bundle/lazy.js";
2
+ const{o:$o,e:$e}=/*@__PURE__*/$L("../services/temporal.js","oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",98928,9847);
3
+ export const countActivityExecutions=$o(),countNexusOperationExecutions=$o(),countSchedules=$o(),countWorkflowExecutions=$o(),createNexusEndpoint=$o(),createSchedule=$o(),createWorkerDeployment=$o(),createWorkerDeploymentVersion=$o(),createWorkflowRule=$o(),deleteNexusEndpoint=$o(),deleteSchedule=$o(),deleteWorkerDeployment=$o(),deleteWorkerDeploymentVersion=$o(),deleteWorkflowRule=$o(),describeActivityExecution=$o(),describeBatchOperation=$o(),describeDeployment=$o(),describeNamespace=$o(),describeNexusOperationExecution=$o(),describeSchedule=$o(),describeTaskQueue=$o(),describeWorker=$o(),describeWorkerDeployment=$o(),describeWorkerDeploymentVersion=$o(),describeWorkflowExecution=$o(),describeWorkflowRule=$o(),fetchWorkerConfig=$o(),getClusterInfo=$o(),getCurrentDeployment=$o(),getDeploymentReachability=$o(),getNexusEndpoint=$o(),getSystemInfo=$o(),getWorkerBuildIdCompatibility=$o(),getWorkerTaskReachability=$o(),getWorkerVersioningRules=$o(),getWorkflowExecutionHistory=$o(),getWorkflowExecutionHistoryReverse=$o(),listActivityExecutions=$o(),listArchivedWorkflowExecutions=$o(),listBatchOperations=$o(),listDeployments=$o(),listNamespaces=$o(),listNexusEndpoints=$o(),listNexusOperationExecutions=$o(),listScheduleMatchingTimes=$o(),listSchedules=$o(),listSearchAttributes=$o(),listWorkerDeployments=$o(),listWorkers=$o(),listWorkflowExecutions=$o(),listWorkflowRules=$o(),patchSchedule=$o(),pauseActivity=$o(),pauseActivityExecution=$o(),pauseWorkflowExecution=$o(),pollActivityExecution=$o(),pollNexusOperationExecution=$o(),queryWorkflow=$o(),recordActivityTaskHeartbeat=$o(),recordActivityTaskHeartbeatById=$o(),recordWorkerHeartbeat=$o(),registerNamespace=$o(),requestCancelActivityExecution=$o(),requestCancelNexusOperationExecution=$o(),requestCancelWorkflowExecution=$o(),resetActivity=$o(),resetActivityExecution=$o(),resetWorkflowExecution=$o(),respondActivityTaskCanceled=$o(),respondActivityTaskCanceledById=$o(),respondActivityTaskCompleted=$o(),respondActivityTaskCompletedById=$o(),respondActivityTaskFailed=$o(),respondActivityTaskFailedById=$o(),setCurrentDeployment=$o(),setWorkerDeploymentCurrentVersion=$o(),setWorkerDeploymentManager=$o(),setWorkerDeploymentRampingVersion=$o(),signalWithStartWorkflowExecution=$o(),signalWorkflowExecution=$o(),startActivityExecution=$o(),startBatchOperation=$o(),startNexusOperationExecution=$o(),startWorkflowExecution=$o(),stopBatchOperation=$o(),terminateActivityExecution=$o(),terminateNexusOperationExecution=$o(),terminateWorkflowExecution=$o(),triggerWorkflowRule=$o(),unpauseActivity=$o(),unpauseActivityExecution=$o(),unpauseWorkflowExecution=$o(),updateActivityExecutionOptions=$o(),updateActivityOptions=$o(),updateNamespace=$o(),updateNexusEndpoint=$o(),updateSchedule=$o(),updateTaskQueueConfig=$o(),updateWorkerConfig=$o(),updateWorkerDeploymentVersionComputeConfig=$o(),updateWorkerDeploymentVersionMetadata=$o(),updateWorkflowExecution=$o(),updateWorkflowExecutionOptions=$o(),validateWorkerDeploymentVersionComputeConfig=$o();
package/lib/traits.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Temporal SDK trait surface — hand-written.
2
+ * Temporal SDK trait surface -- hand-written.
3
3
  *
4
4
  * Re-exports the generic protocol traits from core (so generated operations
5
5
  * import everything from one place). Temporal has no envelope of its own; the
package/lib/traits.js CHANGED
@@ -1,11 +1 @@
1
- /**
2
- * Temporal SDK trait surface — hand-written.
3
- *
4
- * Re-exports the generic protocol traits from core (so generated operations
5
- * import everything from one place). Temporal has no envelope of its own; the
6
- * REST-protocol traits (SensitiveValue / RawResponse) come from
7
- * `core/protocol-rest`.
8
- */
9
- export { Body, Header, Query, Label, Http, ResponseCode, HttpBody, FormDataFile, KeyDictionary, UnionCases, applyErrorMatchers, getErrorMatchers, bodySymbol, headerSymbol, querySymbol, labelSymbol, httpSymbol, responseCodeSymbol, httpBodySymbol, formDataFileSymbol, keyDictionarySymbol, unionCasesSymbol, errorMatchersSymbol, } from "@distilled.cloud/core/trait";
10
- export { SensitiveValue, RawResponse, RawResponseRoot, sensitiveValueSymbol, rawResponseSymbol, rawResponseRootSymbol, } from "@distilled.cloud/core/protocol-rest";
11
- //# sourceMappingURL=traits.js.map
1
+ export { traits$Body as Body, traits$FormDataFile as FormDataFile, traits$Header as Header, traits$Http as Http, traits$HttpBody as HttpBody, traits$KeyDictionary as KeyDictionary, traits$Label as Label, traits$Query as Query, traits$RawResponse as RawResponse, traits$RawResponseRoot as RawResponseRoot, traits$ResponseCode as ResponseCode, traits$SensitiveValue as SensitiveValue, traits$UnionCases as UnionCases, traits$applyErrorMatchers as applyErrorMatchers, traits$bodySymbol as bodySymbol, traits$errorMatchersSymbol as errorMatchersSymbol, traits$formDataFileSymbol as formDataFileSymbol, traits$getErrorMatchers as getErrorMatchers, traits$headerSymbol as headerSymbol, traits$httpBodySymbol as httpBodySymbol, traits$httpSymbol as httpSymbol, traits$keyDictionarySymbol as keyDictionarySymbol, traits$labelSymbol as labelSymbol, traits$querySymbol as querySymbol, traits$rawResponseRootSymbol as rawResponseRootSymbol, traits$rawResponseSymbol as rawResponseSymbol, traits$responseCodeSymbol as responseCodeSymbol, traits$sensitiveValueSymbol as sensitiveValueSymbol, traits$unionCasesSymbol as unionCasesSymbol } from "./_bundle/sdk.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/temporal",
3
- "version": "1.0.0-rc.15",
3
+ "version": "1.0.0-rc.17",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,6 +18,7 @@
18
18
  "types": "./lib/index.d.ts",
19
19
  "bun": "./src/index.ts",
20
20
  "worker": "./src/index.ts",
21
+ "distilled-lazy": "./lib/index.lazy.js",
21
22
  "default": "./lib/index.js"
22
23
  },
23
24
  "./Credentials": {
@@ -60,27 +61,28 @@
60
61
  "types": "./lib/services/*.d.ts",
61
62
  "bun": "./src/services/*.ts",
62
63
  "worker": "./src/services/*.ts",
64
+ "distilled-lazy": "./lib/services.lazy/*.js",
63
65
  "default": "./lib/services/*.js"
64
66
  }
65
67
  },
66
68
  "dependencies": {
67
- "@distilled.cloud/core": "1.0.0-rc.15"
69
+ "@distilled.cloud/core": "1.0.0-rc.17"
68
70
  },
69
71
  "devDependencies": {
70
- "@types/node": "26.2.0"
72
+ "@types/node": "26.6.5"
71
73
  },
72
74
  "peerDependencies": {
73
- "effect": "^4.0.0"
75
+ "effect": "^4.0.5"
74
76
  },
75
77
  "distilled": {
76
- "generatedAt": "2026-10-06",
78
+ "generatedAt": "2026-10-09",
77
79
  "specUpdatedAt": "2026-10-06"
78
80
  },
79
81
  "scripts": {
80
- "build": "tsc -b",
82
+ "build": "tsrs -b",
81
83
  "convert": "node --conditions=bun scripts/convert.ts",
82
84
  "generate": "node --conditions=bun scripts/convert.ts && node --conditions=bun scripts/generate.ts",
83
- "typecheck": "tsc -p tsconfig.json",
85
+ "typecheck": "tsrs -p tsconfig.json",
84
86
  "specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-temporal",
85
87
  "specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-temporal"
86
88
  }
@@ -1,6 +1,6 @@
1
1
  import { ConfigError } from "@distilled.cloud/core/errors";
2
2
  /**
3
- * Temporal credentials — hand-written.
3
+ * Temporal credentials -- hand-written.
4
4
  *
5
5
  * API-compatible port of the distilled v0 credentials module: the
6
6
  * `Credentials` service holds an *effect* that resolves the current
@@ -25,9 +25,10 @@ export interface Config {
25
25
  readonly apiBaseUrl: string;
26
26
  }
27
27
 
28
- export class Credentials extends Context.Service<Credentials, Effect.Effect<Config>>()(
29
- "TemporalCredentials",
30
- ) {}
28
+ export class Credentials
29
+ extends /*@__PURE__*/ Context.Service<Credentials, Effect.Effect<Config>>()(
30
+ "TemporalCredentials",
31
+ ) {}
31
32
 
32
33
  /** Layer from a redacted API key + optional base URL. */
33
34
  export const fromApiKey = (config: {
@@ -43,9 +44,9 @@ export const fromApiKey = (config: {
43
44
  );
44
45
 
45
46
  /** Reads TEMPORAL_API_KEY (required) and TEMPORAL_API_BASE_URL (optional). */
46
- export const CredentialsFromEnv: Layer.Layer<Credentials> = Layer.succeed(
47
+ export const CredentialsFromEnv: Layer.Layer<Credentials> = /*@__PURE__*/ Layer.succeed(
47
48
  Credentials,
48
- Effect.gen(function* () {
49
+ /*@__PURE__*/ Effect.gen(function* () {
49
50
  const apiKey = process.env.TEMPORAL_API_KEY;
50
51
 
51
52
  if (!apiKey) {
package/src/errors.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Re-exports the common HTTP errors from core and adds the Temporal fallback
5
5
  * errors. Note the generated service module additionally defines its own
6
- * per-status matcher classes (BadRequest/NotFound/…) for the statuses each
7
- * operation declares — those share `_tag`s with the core classes here, so
6
+ * per-status matcher classes (BadRequest/NotFound/...) for the statuses each
7
+ * operation declares -- those share `_tag`s with the core classes here, so
8
8
  * `catchTag` works against either.
9
9
  */
10
10
  export {
@@ -28,23 +28,19 @@ export {
28
28
  export type { DefaultErrors } from "@distilled.cloud/core/errors";
29
29
 
30
30
  import * as Category from "@distilled.cloud/core/category";
31
- import * as Schema from "effect/Schema";
31
+ import * as Schema from "@distilled.cloud/core/schema-lite-typed";
32
32
 
33
- /** Unknown Temporal error — returned when nothing else matches the failure. */
34
- export class UnknownTemporalError extends Schema.TaggedError<UnknownTemporalError>()(
35
- "UnknownTemporalError",
36
- {
37
- code: Schema.optional(Schema.String),
38
- message: Schema.optional(Schema.String),
33
+ /** Unknown Temporal error -- returned when nothing else matches the failure. */
34
+ export class UnknownTemporalError
35
+ extends /*@__PURE__*/ Schema.TaggedError<UnknownTemporalError>()("UnknownTemporalError", {
36
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
37
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
39
38
  body: Schema.Unknown,
40
- },
41
- ).pipe(Category.withServerError) {}
39
+ }).pipe(Category.withServerError) {}
42
40
 
43
41
  /** Schema parse error wrapper (kept for v0 surface parity). */
44
- export class TemporalParseError extends Schema.TaggedError<TemporalParseError>()(
45
- "TemporalParseError",
46
- {
42
+ export class TemporalParseError
43
+ extends /*@__PURE__*/ Schema.TaggedError<TemporalParseError>()("TemporalParseError", {
47
44
  body: Schema.Unknown,
48
45
  cause: Schema.Unknown,
49
- },
50
- ).pipe(Category.withParseError) {}
46
+ }).pipe(Category.withParseError) {}
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @distilled.cloud/temporal — Temporal WorkflowService HTTP SDK for Effect.
2
+ * @distilled.cloud/temporal -- Temporal WorkflowService HTTP SDK for Effect.
3
3
  *
4
4
  * `./services` is generated by `scripts/generate.ts` from the Smithy model
5
5
  * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI
@@ -21,6 +21,6 @@ export * as Retry from "./retry.ts";
21
21
  export * as Services from "./services/index.ts";
22
22
  // Operations (and their request/response types) are importable straight off
23
23
  // the package root. The service-local typed error classes shadow the
24
- // same-named shared ones from ./errors.ts — the ops actually raise the
24
+ // same-named shared ones from ./errors.ts -- the ops actually raise the
25
25
  // service-local classes.
26
26
  export * from "./services/temporal.ts";
package/src/pagination.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Temporal pagination — hand-written.
2
+ * Temporal pagination -- hand-written.
3
3
  *
4
4
  * Temporal's paginated list operations are cursor-mode (`nextPageToken` in
5
5
  * and out); generated operations pass core's {@link paginateCursor} strategy
package/src/protocol.ts CHANGED
@@ -2,13 +2,13 @@ import type * as API from "@distilled.cloud/core/api";
2
2
  import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
3
3
  import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
4
4
  /**
5
- * TemporalProtocol — hand-written.
5
+ * TemporalProtocol -- hand-written.
6
6
  *
7
7
  * Temporal's frontend HTTP API speaks bearer-authenticated JSON REST (gRPC
8
8
  * transcoding, no response envelope), so the whole protocol is one
9
9
  * `makeRestProtocol` call from `core/protocol-rest`:
10
10
  *
11
- * request: credentials → `Authorization: Bearer <apiKey>` + base URL
11
+ * request: credentials -> `Authorization: Bearer <apiKey>` + base URL
12
12
  * (default http://localhost:7243), resolved from the
13
13
  * calling fiber on every request. Spec paths already include
14
14
  * `/api/v1`.
@@ -42,19 +42,16 @@ export type TemporalOpError =
42
42
  /** Context (requirements) shared by every generated Temporal operation. */
43
43
  export type TemporalOpContext = Credentials | HttpClient.HttpClient;
44
44
 
45
- export const TemporalProtocol: Layer.Layer<API.Protocol> = makeRestProtocol<Config>({
46
- // The Credentials service holds an effect — resolving it here (per
45
+ export const TemporalProtocol: Layer.Layer<API.Protocol> = /*@__PURE__*/ makeRestProtocol<Config>({
46
+ // The Credentials service holds an effect -- resolving it here (per
47
47
  // request, on the calling fiber) picks up context-provided credentials.
48
- credentials: Effect.gen(function* () {
49
- const resolve = yield* Credentials;
50
- return yield* resolve;
51
- }),
48
+ credentials: /*@__PURE__*/ Effect.flatMap(Credentials, (resolve) => resolve),
52
49
  baseUrl: (creds) => creds.apiBaseUrl,
53
50
  headers: (creds) => ({
54
51
  Authorization: `Bearer ${Redacted.value(creds.apiKey)}`,
55
52
  }),
56
53
  // Temporal's google.rpc.Status error body is `{ code?, message, details? }`
57
- // — the factory's default lenient envelope covers it.
54
+ // -- the factory's default lenient envelope covers it.
58
55
  unknownError: ({ code, message, body }) =>
59
56
  new UnknownTemporalError({
60
57
  code: typeof code === "string" ? code : code !== undefined ? String(code) : undefined,
package/src/retry.ts CHANGED
@@ -32,17 +32,19 @@ export {
32
32
  } from "@distilled.cloud/core/retry";
33
33
 
34
34
  /** Context tag for configuring retry behavior of Temporal API calls. */
35
- export class Retry extends Context.Service<Retry, Policy>()("TemporalRetry") {}
35
+ export class Retry extends /*@__PURE__*/ Context.Service<Retry, Policy>()("TemporalRetry") {}
36
36
 
37
37
  /** Provides a custom retry policy to every Temporal API call below it. */
38
38
  export const policy = (optionsOrFactory: Policy) =>
39
39
  Effect.provide(Layer.succeed(Retry, optionsOrFactory));
40
40
 
41
41
  /** Disables all automatic retries. */
42
- export const none = Effect.provide(Layer.succeed(Retry, { while: () => false }));
42
+ export const none = /*@__PURE__*/ Effect.provide(
43
+ /*@__PURE__*/ Layer.succeed(Retry, { while: () => false }),
44
+ );
43
45
 
44
46
  /** Apply the throttling retry policy (retries throttling errors indefinitely). */
45
- export const throttling = policy(throttlingFactory);
47
+ export const throttling = /*@__PURE__*/ policy(throttlingFactory);
46
48
 
47
49
  /** Apply the transient retry policy (retries all transient errors indefinitely). */
48
- export const transient = policy(transientFactory);
50
+ export const transient = /*@__PURE__*/ policy(transientFactory);