@helmr/sdk 0.1.1-rc.6 → 0.1.1-rc.7

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 CHANGED
@@ -37,7 +37,7 @@ const handle = await client.tasks.trigger<typeof impl>(
37
37
 
38
38
  const current = await client.runs.retrieve(handle)
39
39
  const pendingWaitpoint = current.pendingWaitpoint
40
- if (pendingWaitpoint !== null && pendingWaitpoint.kind === "manual") {
40
+ if (pendingWaitpoint !== null && pendingWaitpoint.kind === "human") {
41
41
  await client.waitpoints.respond(pendingWaitpoint, {
42
42
  value: { approved: true },
43
43
  })
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ConcurrentWaitError, validateSecretName, type CacheBuilder, type CacheMount, type CacheMountBinding, type EmitContent, type EmitEvent, type ImageBuilder, type ImageRunOptions, type NoPayload, type Placement, type SandboxBuilder, type SecretDecls, type SecretMountBinding, type SourceCapabilities, type SourceDirRef, type SourceDirectoryOptions, type SourceFileRef, type TaskContext, type TaskWorkspace, type TaskOutput, type TaskPayload, type TaskTriggerPayload, type WaitCapabilities, type WaitForInput, type WaitJson, type WaitOptions, type WaitResolution, type WaitManualOptions, type WaitUntilInput } from "./internal.js";
1
+ import { ConcurrentWaitError, validateSecretName, type CacheBuilder, type CacheMount, type CacheMountBinding, type EmitContent, type EmitEvent, type ImageBuilder, type ImageRunOptions, type NoPayload, type Placement, type SandboxBuilder, type SecretDecls, type SecretMountBinding, type SourceCapabilities, type SourceDirRef, type SourceDirectoryOptions, type SourceFileRef, type TaskContext, type TaskWorkspace, type TaskOutput, type TaskPayload, type TaskTriggerPayload, type WaitCapabilities, type WaitForInput, type WaitJson, type WaitOptions, type WaitResolution, type WaitHumanOptions, type WaitUntilInput } from "./internal.js";
2
2
  import { PayloadSchemaValidationError } from "./schema/payload.js";
3
3
  import { idempotencyKeys } from "./idempotency.js";
4
4
  export type { IdempotencyKey, IdempotencyKeyCreateOptions, IdempotencyKeyInput, IdempotencyKeyScope } from "./idempotency.js";
@@ -12,9 +12,9 @@ import { task as scheduledTask, type ScheduleCron, type ScheduledTaskConfig, typ
12
12
  import { tasks } from "./trigger.js";
13
13
  export { AuthError, RunNotFoundError, TimeoutError, UnsupportedTransportError } from "./runtime/errors.js";
14
14
  export { ConcurrentWaitError, PayloadSchemaValidationError };
15
- export { type LogSnapshot, type ListRunEventsOptions, type ListRunsOptions, type PendingDelayWaitpoint, type PendingManualWaitpoint, type PendingWaitpoint, type RetrieveRunOptions, type RunEvent, type RunEventRecord, type RunEventRecordPage, type RunHandle, type RunSnapshot, type RunStatus, type RunSummary, type RunWaitOptions, type SubscribeRunEventsOptions, type WaitpointRespondOptions, type WaitpointRef, } from "./runtime/run.js";
15
+ export { type LogSnapshot, type ListRunEventsOptions, type ListRunsOptions, type PendingDelayWaitpoint, type PendingHumanWaitpoint, type PendingWaitpoint, type RetrieveRunOptions, type RunEvent, type RunEventRecord, type RunEventRecordPage, type RunHandle, type RunSnapshot, type RunStatus, type RunSummary, type RunWaitOptions, type SubscribeRunEventsOptions, type WaitpointRespondOptions, type WaitpointRef, } from "./runtime/run.js";
16
16
  export { defineConfig, idempotencyKeys, queue, sandbox, task, tasks };
17
- export type { HelmrConfig, HelmrConfigInput, Placement, SecretDecls, Task, TaskConfig, TaskQueueConfig, TaskOutput, TaskPayload, TaskTriggerPayload, WaitCapabilities, WaitForInput, WaitJson, WaitOptions, WaitResolution, WaitManualOptions, WaitUntilInput, PayloadSchema, StandardSchemaV1, NoPayload, };
17
+ export type { HelmrConfig, HelmrConfigInput, Placement, SecretDecls, Task, TaskConfig, TaskQueueConfig, TaskOutput, TaskPayload, TaskTriggerPayload, WaitCapabilities, WaitForInput, WaitJson, WaitOptions, WaitResolution, WaitHumanOptions, WaitUntilInput, PayloadSchema, StandardSchemaV1, NoPayload, };
18
18
  export declare const image: (id: string) => ImageBuilder;
19
19
  export declare const cache: (id: string) => CacheBuilder;
20
20
  export declare const source: SourceCapabilities;
@@ -40,7 +40,7 @@ export interface WaitOptions {
40
40
  readonly policy?: string;
41
41
  readonly displayText?: string;
42
42
  }
43
- export interface WaitManualOptions<TSchema extends PayloadSchema<any, any> = PayloadSchema<any, any>> extends WaitOptions {
43
+ export interface WaitHumanOptions<TSchema extends PayloadSchema<any, any> = PayloadSchema<any, any>> extends WaitOptions {
44
44
  readonly schema?: TSchema;
45
45
  }
46
46
  export interface WaitResolution<TPayload = unknown> {
@@ -62,8 +62,8 @@ export type WaitUntilInput = string | Date | {
62
62
  export interface WaitCapabilities {
63
63
  for(input: WaitForInput, opts?: Omit<WaitOptions, "timeout" | "policy">): Promise<void>;
64
64
  until(input: WaitUntilInput, opts?: Omit<WaitOptions, "timeout" | "policy">): Promise<void>;
65
- manual<TSchema extends PayloadSchema<any, any>>(opts: WaitManualOptions<TSchema>): Promise<PayloadSchemaOutput<TSchema>>;
66
- manual<TPayload = unknown>(opts?: WaitManualOptions): Promise<TPayload>;
65
+ human<TSchema extends PayloadSchema<any, any>>(opts: WaitHumanOptions<TSchema>): Promise<PayloadSchemaOutput<TSchema>>;
66
+ human<TPayload = unknown>(opts?: WaitHumanOptions): Promise<TPayload>;
67
67
  }
68
68
  export declare class ConcurrentWaitError extends Error {
69
69
  constructor(message: string);
@@ -1,5 +1,5 @@
1
1
  import { type AnyTask, type NoPayload, type SecretDecls, type TaskOutput, type TaskRunOptions, type TaskSecrets, type TaskTriggerPayload } from "../internal.js";
2
- import { type LogSnapshot, type ListRunEventsOptions, type ListRunsOptions, type PendingManualWaitpoint, type PendingWaitpointResponse, type RetrieveRunOptions, type RunHandle, type RunEvent, type RunSnapshot, type RunSummary, type RunWaitOptions, type SubscribeRunEventsOptions, type WaitpointRespondOptions, type WaitpointRef } from "./run.js";
2
+ import { type LogSnapshot, type ListRunEventsOptions, type ListRunsOptions, type PendingHumanWaitpoint, type PendingWaitpointResponse, type RetrieveRunOptions, type RunHandle, type RunEvent, type RunSnapshot, type RunSummary, type RunWaitOptions, type SubscribeRunEventsOptions, type WaitpointRespondOptions, type WaitpointRef } from "./run.js";
3
3
  export interface HelmrClientOptions {
4
4
  readonly url?: string;
5
5
  readonly apiKey?: string;
@@ -15,12 +15,12 @@ export declare const triggerTaskClientMethod: unique symbol;
15
15
  export interface WaitpointsApi {
16
16
  readonly create: (opts: WaitpointCreateOptions) => Promise<Waitpoint>;
17
17
  readonly respond: {
18
- (target: PendingManualWaitpoint | WaitpointRef, opts?: WaitpointRespondOptions): Promise<void>;
18
+ (target: PendingHumanWaitpoint | WaitpointRef, opts?: WaitpointRespondOptions): Promise<void>;
19
19
  (waitpointId: string, opts?: WaitpointRespondOptions): Promise<void>;
20
20
  };
21
21
  readonly tokens: {
22
22
  readonly create: {
23
- (target: PendingManualWaitpoint | WaitpointRef, opts?: WaitpointTokenCreateOptions): Promise<WaitpointResponseToken>;
23
+ (target: PendingHumanWaitpoint | WaitpointRef, opts?: WaitpointTokenCreateOptions): Promise<WaitpointResponseToken>;
24
24
  (waitpointId: string, opts?: WaitpointTokenCreateOptions): Promise<WaitpointResponseToken>;
25
25
  };
26
26
  readonly respond: {
@@ -122,7 +122,7 @@ export interface Waitpoint {
122
122
  readonly id: string;
123
123
  readonly projectId: string;
124
124
  readonly environmentId: string;
125
- readonly kind: "manual" | "delay";
125
+ readonly kind: "human" | "delay";
126
126
  readonly status: "pending" | "completed" | "expired" | "cancelled";
127
127
  readonly request: unknown;
128
128
  readonly displayText: string;
@@ -28,7 +28,7 @@ export interface RunSnapshot<TOutput = unknown> extends RunStateBooleans {
28
28
  readonly output?: TOutput;
29
29
  }
30
30
  export type RunSummary<TOutput = unknown> = RunSnapshot<TOutput>;
31
- export type PendingWaitpoint = PendingManualWaitpoint | PendingDelayWaitpoint;
31
+ export type PendingWaitpoint = PendingHumanWaitpoint | PendingDelayWaitpoint;
32
32
  interface PendingWaitpointBase {
33
33
  readonly runId: string;
34
34
  readonly waitpointId: string;
@@ -37,8 +37,8 @@ interface PendingWaitpointBase {
37
37
  readonly request: unknown;
38
38
  readonly displayText: string;
39
39
  }
40
- export interface PendingManualWaitpoint extends PendingWaitpointBase {
41
- readonly kind: "manual";
40
+ export interface PendingHumanWaitpoint extends PendingWaitpointBase {
41
+ readonly kind: "human";
42
42
  }
43
43
  export interface PendingDelayWaitpoint extends PendingWaitpointBase {
44
44
  readonly kind: "delay";
@@ -154,7 +154,7 @@ export interface LogSnapshot {
154
154
  readonly truncated: boolean;
155
155
  }
156
156
  export interface PendingWaitpointResponse {
157
- readonly kind: "manual" | "delay";
157
+ readonly kind: "human" | "delay";
158
158
  readonly waitpoint_id: string;
159
159
  readonly timeout?: number | null;
160
160
  readonly request?: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helmr/sdk",
3
- "version": "0.1.1-rc.6",
3
+ "version": "0.1.1-rc.7",
4
4
  "description": "TypeScript SDK for authoring and triggering Helmr tasks.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -43,6 +43,6 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@bufbuild/protobuf": "^2.11.0",
46
- "@helmr/proto": "0.1.1-rc.6"
46
+ "@helmr/proto": "0.1.1-rc.7"
47
47
  }
48
48
  }