@cellaflow/sdk 0.7.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.
Files changed (41) hide show
  1. package/dist/cellaflow/v1/common_pb.d.ts +119 -0
  2. package/dist/cellaflow/v1/common_pb.d.ts.map +1 -0
  3. package/dist/cellaflow/v1/common_pb.js +166 -0
  4. package/dist/cellaflow/v1/common_pb.js.map +1 -0
  5. package/dist/cellaflow/v1/idempotency_pb.d.ts +378 -0
  6. package/dist/cellaflow/v1/idempotency_pb.d.ts.map +1 -0
  7. package/dist/cellaflow/v1/idempotency_pb.js +513 -0
  8. package/dist/cellaflow/v1/idempotency_pb.js.map +1 -0
  9. package/dist/cellaflow/v1/internal_pb.d.ts +201 -0
  10. package/dist/cellaflow/v1/internal_pb.d.ts.map +1 -0
  11. package/dist/cellaflow/v1/internal_pb.js +254 -0
  12. package/dist/cellaflow/v1/internal_pb.js.map +1 -0
  13. package/dist/cellaflow/v1/service_connect.d.ts +84 -0
  14. package/dist/cellaflow/v1/service_connect.d.ts.map +1 -0
  15. package/dist/cellaflow/v1/service_connect.js +88 -0
  16. package/dist/cellaflow/v1/service_connect.js.map +1 -0
  17. package/dist/cellaflow/v1/service_pb.d.ts +172 -0
  18. package/dist/cellaflow/v1/service_pb.d.ts.map +1 -0
  19. package/dist/cellaflow/v1/service_pb.js +266 -0
  20. package/dist/cellaflow/v1/service_pb.js.map +1 -0
  21. package/dist/client.d.ts +88 -0
  22. package/dist/client.d.ts.map +1 -0
  23. package/dist/client.js +187 -0
  24. package/dist/client.js.map +1 -0
  25. package/dist/index.d.ts +5 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +8 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/serialization.d.ts +18 -0
  30. package/dist/serialization.d.ts.map +1 -0
  31. package/dist/serialization.js +41 -0
  32. package/dist/serialization.js.map +1 -0
  33. package/package.json +59 -0
  34. package/src/cellaflow/v1/common_pb.ts +195 -0
  35. package/src/cellaflow/v1/idempotency_pb.ts +591 -0
  36. package/src/cellaflow/v1/internal_pb.ts +308 -0
  37. package/src/cellaflow/v1/service_connect.ts +90 -0
  38. package/src/cellaflow/v1/service_pb.ts +323 -0
  39. package/src/client.ts +277 -0
  40. package/src/index.ts +7 -0
  41. package/src/serialization.ts +53 -0
@@ -0,0 +1,119 @@
1
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
+ import { Message, proto3 } from "@bufbuild/protobuf";
3
+ /**
4
+ * StepStatus defines compile-time type-safe execution states for a step.
5
+ *
6
+ * @generated from enum cellaflow.v1.StepStatus
7
+ */
8
+ export declare enum StepStatus {
9
+ /**
10
+ * @generated from enum value: STEP_STATUS_UNSPECIFIED = 0;
11
+ */
12
+ UNSPECIFIED = 0,
13
+ /**
14
+ * @generated from enum value: STEP_STATUS_RUNNING = 1;
15
+ */
16
+ RUNNING = 1,
17
+ /**
18
+ * @generated from enum value: STEP_STATUS_SUCCESS = 2;
19
+ */
20
+ SUCCESS = 2,
21
+ /**
22
+ * @generated from enum value: STEP_STATUS_FAILED = 3;
23
+ */
24
+ FAILED = 3,
25
+ /**
26
+ * @generated from enum value: STEP_STATUS_TIMER_SCHEDULED = 4;
27
+ */
28
+ TIMER_SCHEDULED = 4,
29
+ /**
30
+ * @generated from enum value: STEP_STATUS_TIMER_FIRED = 5;
31
+ */
32
+ TIMER_FIRED = 5
33
+ }
34
+ /**
35
+ * StepResult represents the outcome of a single step in a workflow execution session.
36
+ *
37
+ * @generated from message cellaflow.v1.StepResult
38
+ */
39
+ export declare class StepResult extends Message<StepResult> {
40
+ /**
41
+ * Optional to distinguish between explicit sequence 0 and unset/omitted values.
42
+ * Validation: Must be greater than 0 during normal execution.
43
+ *
44
+ * @generated from field: optional uint64 sequence = 1;
45
+ */
46
+ sequence?: bigint;
47
+ /**
48
+ * @generated from field: string name = 2;
49
+ */
50
+ name: string;
51
+ /**
52
+ * Safe enum-typed status to prevent raw string errors (e.g. typos).
53
+ *
54
+ * @generated from field: cellaflow.v1.StepStatus status = 3;
55
+ */
56
+ status: StepStatus;
57
+ /**
58
+ * Output payload generated by this execution step.
59
+ * Validation: Size must not exceed 4MB (4,194,304 bytes).
60
+ *
61
+ * @generated from field: bytes output_payload = 4;
62
+ */
63
+ outputPayload: Uint8Array<ArrayBuffer>;
64
+ /**
65
+ * Unique idempotency key to prevent duplicate tool execution.
66
+ * Validation: If specified, must not be empty.
67
+ *
68
+ * @generated from field: optional string idempotency_key = 5;
69
+ */
70
+ idempotencyKey?: string;
71
+ /**
72
+ * Deadline for the sleep operation, represented as a Unix timestamp in milliseconds.
73
+ * Used when status is STEP_STATUS_TIMER_SCHEDULED.
74
+ *
75
+ * @generated from field: optional uint64 deadline_ms = 6;
76
+ */
77
+ deadlineMs?: bigint;
78
+ /**
79
+ * The sequence number of the originating TimerScheduled event.
80
+ * Used when status is STEP_STATUS_TIMER_FIRED to explicitly pair events.
81
+ *
82
+ * @generated from field: optional uint64 source_sequence = 7;
83
+ */
84
+ sourceSequence?: bigint;
85
+ constructor(data?: PartialMessage<StepResult>);
86
+ static readonly runtime: typeof proto3;
87
+ static readonly typeName = "cellaflow.v1.StepResult";
88
+ static readonly fields: FieldList;
89
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StepResult;
90
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StepResult;
91
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StepResult;
92
+ static equals(a: StepResult | PlainMessage<StepResult> | undefined, b: StepResult | PlainMessage<StepResult> | undefined): boolean;
93
+ }
94
+ /**
95
+ * @generated from message cellaflow.v1.WorkflowDefinition
96
+ */
97
+ export declare class WorkflowDefinition extends Message<WorkflowDefinition> {
98
+ /**
99
+ * @generated from field: string id = 1;
100
+ */
101
+ id: string;
102
+ /**
103
+ * @generated from field: string version = 2;
104
+ */
105
+ version: string;
106
+ /**
107
+ * @generated from field: string description = 3;
108
+ */
109
+ description: string;
110
+ constructor(data?: PartialMessage<WorkflowDefinition>);
111
+ static readonly runtime: typeof proto3;
112
+ static readonly typeName = "cellaflow.v1.WorkflowDefinition";
113
+ static readonly fields: FieldList;
114
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkflowDefinition;
115
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkflowDefinition;
116
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkflowDefinition;
117
+ static equals(a: WorkflowDefinition | PlainMessage<WorkflowDefinition> | undefined, b: WorkflowDefinition | PlainMessage<WorkflowDefinition> | undefined): boolean;
118
+ }
119
+ //# sourceMappingURL=common_pb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common_pb.d.ts","sourceRoot":"","sources":["../../../src/cellaflow/v1/common_pb.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjI,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,oBAAY,UAAU;IACpB;;OAEG;IACH,WAAW,IAAI;IAEf;;OAEG;IACH,OAAO,IAAI;IAEX;;OAEG;IACH,OAAO,IAAI;IAEX;;OAEG;IACH,MAAM,IAAI;IAEV;;OAEG;IACH,eAAe,IAAI;IAEnB;;OAEG;IACH,WAAW,IAAI;CAChB;AAWD;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,OAAO,CAAC,UAAU,CAAC;IACjD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,SAAM;IAEV;;;;OAIG;IACH,MAAM,aAA0B;IAEhC;;;;;OAKG;IACH,aAAa,0BAAqB;IAElC;;;;;OAKG;IACH,cAAc,C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CAAC,MAAM,EAAE,SAAS,CAI9B;IAEH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,kBAAkB,CAE7F;IAED,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,kBAAkB,CAE5F;IAED,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,kBAAkB,CAEhG;IAED,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,kBAAkB,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,kBAAkB,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,SAAS,GAAG,OAAO,CAEjK;CACF"}
@@ -0,0 +1,166 @@
1
+ // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js"
2
+ // @generated from file cellaflow/v1/common.proto (package cellaflow.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { Message, proto3 } from "@bufbuild/protobuf";
6
+ /**
7
+ * StepStatus defines compile-time type-safe execution states for a step.
8
+ *
9
+ * @generated from enum cellaflow.v1.StepStatus
10
+ */
11
+ export var StepStatus;
12
+ (function (StepStatus) {
13
+ /**
14
+ * @generated from enum value: STEP_STATUS_UNSPECIFIED = 0;
15
+ */
16
+ StepStatus[StepStatus["UNSPECIFIED"] = 0] = "UNSPECIFIED";
17
+ /**
18
+ * @generated from enum value: STEP_STATUS_RUNNING = 1;
19
+ */
20
+ StepStatus[StepStatus["RUNNING"] = 1] = "RUNNING";
21
+ /**
22
+ * @generated from enum value: STEP_STATUS_SUCCESS = 2;
23
+ */
24
+ StepStatus[StepStatus["SUCCESS"] = 2] = "SUCCESS";
25
+ /**
26
+ * @generated from enum value: STEP_STATUS_FAILED = 3;
27
+ */
28
+ StepStatus[StepStatus["FAILED"] = 3] = "FAILED";
29
+ /**
30
+ * @generated from enum value: STEP_STATUS_TIMER_SCHEDULED = 4;
31
+ */
32
+ StepStatus[StepStatus["TIMER_SCHEDULED"] = 4] = "TIMER_SCHEDULED";
33
+ /**
34
+ * @generated from enum value: STEP_STATUS_TIMER_FIRED = 5;
35
+ */
36
+ StepStatus[StepStatus["TIMER_FIRED"] = 5] = "TIMER_FIRED";
37
+ })(StepStatus || (StepStatus = {}));
38
+ // Retrieve enum metadata with: proto3.getEnumType(StepStatus)
39
+ proto3.util.setEnumType(StepStatus, "cellaflow.v1.StepStatus", [
40
+ { no: 0, name: "STEP_STATUS_UNSPECIFIED" },
41
+ { no: 1, name: "STEP_STATUS_RUNNING" },
42
+ { no: 2, name: "STEP_STATUS_SUCCESS" },
43
+ { no: 3, name: "STEP_STATUS_FAILED" },
44
+ { no: 4, name: "STEP_STATUS_TIMER_SCHEDULED" },
45
+ { no: 5, name: "STEP_STATUS_TIMER_FIRED" },
46
+ ]);
47
+ /**
48
+ * StepResult represents the outcome of a single step in a workflow execution session.
49
+ *
50
+ * @generated from message cellaflow.v1.StepResult
51
+ */
52
+ export class StepResult extends Message {
53
+ /**
54
+ * Optional to distinguish between explicit sequence 0 and unset/omitted values.
55
+ * Validation: Must be greater than 0 during normal execution.
56
+ *
57
+ * @generated from field: optional uint64 sequence = 1;
58
+ */
59
+ sequence;
60
+ /**
61
+ * @generated from field: string name = 2;
62
+ */
63
+ name = "";
64
+ /**
65
+ * Safe enum-typed status to prevent raw string errors (e.g. typos).
66
+ *
67
+ * @generated from field: cellaflow.v1.StepStatus status = 3;
68
+ */
69
+ status = StepStatus.UNSPECIFIED;
70
+ /**
71
+ * Output payload generated by this execution step.
72
+ * Validation: Size must not exceed 4MB (4,194,304 bytes).
73
+ *
74
+ * @generated from field: bytes output_payload = 4;
75
+ */
76
+ outputPayload = new Uint8Array(0);
77
+ /**
78
+ * Unique idempotency key to prevent duplicate tool execution.
79
+ * Validation: If specified, must not be empty.
80
+ *
81
+ * @generated from field: optional string idempotency_key = 5;
82
+ */
83
+ idempotencyKey;
84
+ /**
85
+ * Deadline for the sleep operation, represented as a Unix timestamp in milliseconds.
86
+ * Used when status is STEP_STATUS_TIMER_SCHEDULED.
87
+ *
88
+ * @generated from field: optional uint64 deadline_ms = 6;
89
+ */
90
+ deadlineMs;
91
+ /**
92
+ * The sequence number of the originating TimerScheduled event.
93
+ * Used when status is STEP_STATUS_TIMER_FIRED to explicitly pair events.
94
+ *
95
+ * @generated from field: optional uint64 source_sequence = 7;
96
+ */
97
+ sourceSequence;
98
+ constructor(data) {
99
+ super();
100
+ proto3.util.initPartial(data, this);
101
+ }
102
+ static runtime = proto3;
103
+ static typeName = "cellaflow.v1.StepResult";
104
+ static fields = proto3.util.newFieldList(() => [
105
+ { no: 1, name: "sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
106
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
107
+ { no: 3, name: "status", kind: "enum", T: proto3.getEnumType(StepStatus) },
108
+ { no: 4, name: "output_payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
109
+ { no: 5, name: "idempotency_key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
110
+ { no: 6, name: "deadline_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
111
+ { no: 7, name: "source_sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
112
+ ]);
113
+ static fromBinary(bytes, options) {
114
+ return new StepResult().fromBinary(bytes, options);
115
+ }
116
+ static fromJson(jsonValue, options) {
117
+ return new StepResult().fromJson(jsonValue, options);
118
+ }
119
+ static fromJsonString(jsonString, options) {
120
+ return new StepResult().fromJsonString(jsonString, options);
121
+ }
122
+ static equals(a, b) {
123
+ return proto3.util.equals(StepResult, a, b);
124
+ }
125
+ }
126
+ /**
127
+ * @generated from message cellaflow.v1.WorkflowDefinition
128
+ */
129
+ export class WorkflowDefinition extends Message {
130
+ /**
131
+ * @generated from field: string id = 1;
132
+ */
133
+ id = "";
134
+ /**
135
+ * @generated from field: string version = 2;
136
+ */
137
+ version = "";
138
+ /**
139
+ * @generated from field: string description = 3;
140
+ */
141
+ description = "";
142
+ constructor(data) {
143
+ super();
144
+ proto3.util.initPartial(data, this);
145
+ }
146
+ static runtime = proto3;
147
+ static typeName = "cellaflow.v1.WorkflowDefinition";
148
+ static fields = proto3.util.newFieldList(() => [
149
+ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
150
+ { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
151
+ { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
152
+ ]);
153
+ static fromBinary(bytes, options) {
154
+ return new WorkflowDefinition().fromBinary(bytes, options);
155
+ }
156
+ static fromJson(jsonValue, options) {
157
+ return new WorkflowDefinition().fromJson(jsonValue, options);
158
+ }
159
+ static fromJsonString(jsonString, options) {
160
+ return new WorkflowDefinition().fromJsonString(jsonString, options);
161
+ }
162
+ static equals(a, b) {
163
+ return proto3.util.equals(WorkflowDefinition, a, b);
164
+ }
165
+ }
166
+ //# sourceMappingURL=common_pb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common_pb.js","sourceRoot":"","sources":["../../../src/cellaflow/v1/common_pb.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,uFAAuF;AACvF,oBAAoB;AACpB,cAAc;AAGd,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAN,IAAY,UA8BX;AA9BD,WAAY,UAAU;IACpB;;OAEG;IACH,yDAAe,CAAA;IAEf;;OAEG;IACH,iDAAW,CAAA;IAEX;;OAEG;IACH,iDAAW,CAAA;IAEX;;OAEG;IACH,+CAAU,CAAA;IAEV;;OAEG;IACH,iEAAmB,CAAA;IAEnB;;OAEG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KAAiB,EAAE,OAAoC;QACvE,OAAO,IAAI,kBAAkB,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,SAAoB,EAAE,OAAkC;QACtE,OAAO,IAAI,kBAAkB,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,UAAkB,EAAE,OAAkC;QAC1E,OAAO,IAAI,kBAAkB,EAAE,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,CAAoE,EAAE,CAAoE;QACtJ,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC;CACF"}
@@ -0,0 +1,378 @@
1
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
+ import { Message, proto3 } from "@bufbuild/protobuf";
3
+ import { StepResult } from "./common_pb.js";
4
+ /**
5
+ * Key construction scope used by SDKs during key auto-derivation.
6
+ * The SDK uses this to prefix the opaque idempotency_key before sending it
7
+ * to the engine. The engine never parses this — it is purely an SDK concern.
8
+ *
9
+ * @generated from enum cellaflow.v1.IdempotencyScope
10
+ */
11
+ export declare enum IdempotencyScope {
12
+ /**
13
+ * @generated from enum value: SCOPE_UNSPECIFIED = 0;
14
+ */
15
+ SCOPE_UNSPECIFIED = 0,
16
+ /**
17
+ * Shared across all agents in the session (Default)
18
+ *
19
+ * @generated from enum value: SCOPE_SESSION_WIDE = 1;
20
+ */
21
+ SCOPE_SESSION_WIDE = 1,
22
+ /**
23
+ * Isolated to the executing agent
24
+ *
25
+ * @generated from enum value: SCOPE_AGENT_PRIVATE = 2;
26
+ */
27
+ SCOPE_AGENT_PRIVATE = 2,
28
+ /**
29
+ * Isolated to the specific superstep / node
30
+ *
31
+ * @generated from enum value: SCOPE_STEP_LOCAL = 3;
32
+ */
33
+ SCOPE_STEP_LOCAL = 3
34
+ }
35
+ /**
36
+ * @generated from enum cellaflow.v1.CacheStatus
37
+ */
38
+ export declare enum CacheStatus {
39
+ /**
40
+ * @generated from enum value: CACHE_STATUS_UNSPECIFIED = 0;
41
+ */
42
+ UNSPECIFIED = 0,
43
+ /**
44
+ * Found in cache (or completed by in-flight worker)
45
+ *
46
+ * @generated from enum value: CACHE_STATUS_HIT = 1;
47
+ */
48
+ HIT = 1,
49
+ /**
50
+ * Miss & lease granted: caller should execute tool
51
+ *
52
+ * @generated from enum value: CACHE_STATUS_ACQUIRED = 2;
53
+ */
54
+ ACQUIRED = 2,
55
+ /**
56
+ * Miss & currently running by another worker
57
+ *
58
+ * @generated from enum value: CACHE_STATUS_IN_PROGRESS = 3;
59
+ */
60
+ IN_PROGRESS = 3
61
+ }
62
+ /**
63
+ * @generated from enum cellaflow.v1.RenewFailureReason
64
+ */
65
+ export declare enum RenewFailureReason {
66
+ /**
67
+ * @generated from enum value: RENEW_FAILURE_REASON_UNSPECIFIED = 0;
68
+ */
69
+ UNSPECIFIED = 0,
70
+ /**
71
+ * Lease timed out before renewal arrived
72
+ *
73
+ * @generated from enum value: RENEW_FAILURE_REASON_EXPIRED = 1;
74
+ */
75
+ EXPIRED = 1,
76
+ /**
77
+ * A newer worker acquired a higher fencing token
78
+ *
79
+ * @generated from enum value: RENEW_FAILURE_REASON_SUPERSEDED = 2;
80
+ */
81
+ SUPERSEDED = 2,
82
+ /**
83
+ * Key does not exist or was deleted
84
+ *
85
+ * @generated from enum value: RENEW_FAILURE_REASON_NOT_FOUND = 3;
86
+ */
87
+ NOT_FOUND = 3,
88
+ /**
89
+ * Step was already committed by another worker
90
+ *
91
+ * @generated from enum value: RENEW_FAILURE_REASON_COMPLETED = 4;
92
+ */
93
+ COMPLETED = 4,
94
+ /**
95
+ * The lease hit its maximum total lifetime and was reclaimed.
96
+ *
97
+ * Distinct from EXPIRED: the holder kept renewing and is likely still running,
98
+ * so it must learn the engine took the lease back rather than that its own
99
+ * renewal lapsed.
100
+ *
101
+ * @generated from enum value: RENEW_FAILURE_REASON_MAX_LIFETIME_EXCEEDED = 5;
102
+ */
103
+ MAX_LIFETIME_EXCEEDED = 5
104
+ }
105
+ /**
106
+ * @generated from enum cellaflow.v1.IdempotencyCommitStatus
107
+ */
108
+ export declare enum IdempotencyCommitStatus {
109
+ /**
110
+ * @generated from enum value: IDEMPOTENCY_COMMIT_UNSPECIFIED = 0;
111
+ */
112
+ IDEMPOTENCY_COMMIT_UNSPECIFIED = 0,
113
+ /**
114
+ * @generated from enum value: IDEMPOTENCY_COMMIT_COMMITTED = 1;
115
+ */
116
+ IDEMPOTENCY_COMMIT_COMMITTED = 1,
117
+ /**
118
+ * Idempotent retry of the commit call itself
119
+ *
120
+ * @generated from enum value: IDEMPOTENCY_COMMIT_ALREADY_COMMITTED = 2;
121
+ */
122
+ IDEMPOTENCY_COMMIT_ALREADY_COMMITTED = 2,
123
+ /**
124
+ * Fencing token invalid — caller was fenced out
125
+ *
126
+ * @generated from enum value: IDEMPOTENCY_COMMIT_STALE_LEASE_REJECTED = 3;
127
+ */
128
+ IDEMPOTENCY_COMMIT_STALE_LEASE_REJECTED = 3
129
+ }
130
+ /**
131
+ * @generated from message cellaflow.v1.CheckCacheRequest
132
+ */
133
+ export declare class CheckCacheRequest extends Message<CheckCacheRequest> {
134
+ /**
135
+ * Opaque caller-supplied label, carried for logging and diagnostics.
136
+ *
137
+ * Not parsed into the idempotency key: key derivation is an SDK concern and the
138
+ * engine treats the key as opaque.
139
+ *
140
+ * @generated from field: string agent_id = 1;
141
+ */
142
+ agentId: string;
143
+ /**
144
+ * Fully formed, opaque composite key
145
+ *
146
+ * @generated from field: string idempotency_key = 2;
147
+ */
148
+ idempotencyKey: string;
149
+ /**
150
+ * @generated from field: optional uint64 wait_timeout_ms = 3;
151
+ */
152
+ waitTimeoutMs?: bigint;
153
+ /**
154
+ * Crash-detection window; defaults to engine config
155
+ *
156
+ * @generated from field: optional uint64 lease_ttl_ms = 4;
157
+ */
158
+ leaseTtlMs?: bigint;
159
+ /**
160
+ * The session this check is being made on behalf of.
161
+ *
162
+ * The idempotency key is opaque to the engine and deliberately stays that way,
163
+ * so the session cannot be recovered from it. Without this field the engine
164
+ * cannot tell the caller where its session currently sits, which is what a
165
+ * caller needs after a cache hit — see `current_sequence` on the response.
166
+ *
167
+ * Optional for wire compatibility: clients predating this field still work,
168
+ * they simply receive no `current_sequence` back.
169
+ *
170
+ * @generated from field: optional string session_id = 5;
171
+ */
172
+ sessionId?: string;
173
+ /**
174
+ * The graph position this caller intends to write to.
175
+ *
176
+ * The engine already knows which session is asking (field 5) and where that
177
+ * session has committed to (`latest_committed_sequence`). This supplies the
178
+ * one missing input: where the caller is going. With all three, a lease that
179
+ * would authorise a side effect at an already-committed position can be
180
+ * refused *before* the side effect happens, rather than rejected at commit
181
+ * time after the money has moved.
182
+ *
183
+ * Note this is the caller's *intended* position, not the response's
184
+ * `current_sequence`, which reports where the session already sits.
185
+ *
186
+ * Optional for wire compatibility: clients that omit it keep the previous
187
+ * behaviour and are still granted leases. Sending 0 is an error rather than
188
+ * a synonym for "unset" -- sequences are 1-based, so 0 is never a position a
189
+ * caller could legitimately intend to write.
190
+ *
191
+ * @generated from field: optional uint64 sequence = 6;
192
+ */
193
+ sequence?: bigint;
194
+ constructor(data?: PartialMessage<CheckCacheRequest>);
195
+ static readonly runtime: typeof proto3;
196
+ static readonly typeName = "cellaflow.v1.CheckCacheRequest";
197
+ static readonly fields: FieldList;
198
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CheckCacheRequest;
199
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CheckCacheRequest;
200
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CheckCacheRequest;
201
+ static equals(a: CheckCacheRequest | PlainMessage<CheckCacheRequest> | undefined, b: CheckCacheRequest | PlainMessage<CheckCacheRequest> | undefined): boolean;
202
+ }
203
+ /**
204
+ * @generated from message cellaflow.v1.CheckCacheResponse
205
+ */
206
+ export declare class CheckCacheResponse extends Message<CheckCacheResponse> {
207
+ /**
208
+ * @generated from field: cellaflow.v1.CacheStatus status = 1;
209
+ */
210
+ status: CacheStatus;
211
+ /**
212
+ * @generated from field: optional cellaflow.v1.StepResult cached_result = 2;
213
+ */
214
+ cachedResult?: StepResult;
215
+ /**
216
+ * Present iff ACQUIRED
217
+ *
218
+ * @generated from field: optional uint64 fencing_token = 3;
219
+ */
220
+ fencingToken?: bigint;
221
+ /**
222
+ * Present iff ACQUIRED or IN_PROGRESS
223
+ *
224
+ * @generated from field: optional uint64 lease_expires_at_ms = 4;
225
+ */
226
+ leaseExpiresAtMs?: bigint;
227
+ /**
228
+ * Present iff ACQUIRED — caller MUST renew
229
+ *
230
+ * @generated from field: optional uint64 heartbeat_interval_ms = 5;
231
+ */
232
+ heartbeatIntervalMs?: bigint;
233
+ /**
234
+ * Present iff IN_PROGRESS and wait exhausted
235
+ *
236
+ * @generated from field: optional uint64 retry_after_ms = 6;
237
+ */
238
+ retryAfterMs?: bigint;
239
+ /**
240
+ * Present iff IN_PROGRESS (for distributed tracing)
241
+ *
242
+ * @generated from field: optional string current_holder_id = 7;
243
+ */
244
+ currentHolderId?: string;
245
+ /**
246
+ * The requested session's highest committed sequence, or 0 if it has
247
+ * none. Present whenever `session_id` was supplied — on every status, not only
248
+ * on HIT.
249
+ *
250
+ * A caller that takes a HIT returns without committing, so its local counter
251
+ * advances while the session's does not, and its next commit fails the
252
+ * ordering check one step after the real cause. This lets it re-align.
253
+ *
254
+ * Returned on ACQUIRED and IN_PROGRESS too because it costs one seek on a call
255
+ * that already performs a storage transaction, and it lets a caller about to
256
+ * execute confirm it is where it thinks it is.
257
+ *
258
+ * @generated from field: optional uint64 current_sequence = 8;
259
+ */
260
+ currentSequence?: bigint;
261
+ constructor(data?: PartialMessage<CheckCacheResponse>);
262
+ static readonly runtime: typeof proto3;
263
+ static readonly typeName = "cellaflow.v1.CheckCacheResponse";
264
+ static readonly fields: FieldList;
265
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CheckCacheResponse;
266
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CheckCacheResponse;
267
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CheckCacheResponse;
268
+ static equals(a: CheckCacheResponse | PlainMessage<CheckCacheResponse> | undefined, b: CheckCacheResponse | PlainMessage<CheckCacheResponse> | undefined): boolean;
269
+ }
270
+ /**
271
+ * @generated from message cellaflow.v1.RenewLeaseRequest
272
+ */
273
+ export declare class RenewLeaseRequest extends Message<RenewLeaseRequest> {
274
+ /**
275
+ * @generated from field: string agent_id = 1;
276
+ */
277
+ agentId: string;
278
+ /**
279
+ * @generated from field: string idempotency_key = 2;
280
+ */
281
+ idempotencyKey: string;
282
+ /**
283
+ * @generated from field: uint64 fencing_token = 3;
284
+ */
285
+ fencingToken: bigint;
286
+ /**
287
+ * @generated from field: uint64 extend_ms = 4;
288
+ */
289
+ extendMs: bigint;
290
+ constructor(data?: PartialMessage<RenewLeaseRequest>);
291
+ static readonly runtime: typeof proto3;
292
+ static readonly typeName = "cellaflow.v1.RenewLeaseRequest";
293
+ static readonly fields: FieldList;
294
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RenewLeaseRequest;
295
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RenewLeaseRequest;
296
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RenewLeaseRequest;
297
+ static equals(a: RenewLeaseRequest | PlainMessage<RenewLeaseRequest> | undefined, b: RenewLeaseRequest | PlainMessage<RenewLeaseRequest> | undefined): boolean;
298
+ }
299
+ /**
300
+ * @generated from message cellaflow.v1.RenewLeaseResponse
301
+ */
302
+ export declare class RenewLeaseResponse extends Message<RenewLeaseResponse> {
303
+ /**
304
+ * False => lease was reclaimed/completed; stop execution
305
+ *
306
+ * @generated from field: bool renewed = 1;
307
+ */
308
+ renewed: boolean;
309
+ /**
310
+ * Present iff renewed = true
311
+ *
312
+ * @generated from field: optional uint64 new_expires_at_ms = 2;
313
+ */
314
+ newExpiresAtMs?: bigint;
315
+ /**
316
+ * Present iff renewed = false
317
+ *
318
+ * @generated from field: optional cellaflow.v1.RenewFailureReason failure_reason = 3;
319
+ */
320
+ failureReason?: RenewFailureReason;
321
+ constructor(data?: PartialMessage<RenewLeaseResponse>);
322
+ static readonly runtime: typeof proto3;
323
+ static readonly typeName = "cellaflow.v1.RenewLeaseResponse";
324
+ static readonly fields: FieldList;
325
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RenewLeaseResponse;
326
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RenewLeaseResponse;
327
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RenewLeaseResponse;
328
+ static equals(a: RenewLeaseResponse | PlainMessage<RenewLeaseResponse> | undefined, b: RenewLeaseResponse | PlainMessage<RenewLeaseResponse> | undefined): boolean;
329
+ }
330
+ /**
331
+ * @generated from message cellaflow.v1.ReleaseLeaseRequest
332
+ */
333
+ export declare class ReleaseLeaseRequest extends Message<ReleaseLeaseRequest> {
334
+ /**
335
+ * @generated from field: string agent_id = 1;
336
+ */
337
+ agentId: string;
338
+ /**
339
+ * @generated from field: string idempotency_key = 2;
340
+ */
341
+ idempotencyKey: string;
342
+ /**
343
+ * @generated from field: uint64 fencing_token = 3;
344
+ */
345
+ fencingToken: bigint;
346
+ /**
347
+ * e.g. "RATE_LIMITED_429", "CANCELLED", "TOOL_ERROR"
348
+ *
349
+ * @generated from field: optional string reason = 4;
350
+ */
351
+ reason?: string;
352
+ constructor(data?: PartialMessage<ReleaseLeaseRequest>);
353
+ static readonly runtime: typeof proto3;
354
+ static readonly typeName = "cellaflow.v1.ReleaseLeaseRequest";
355
+ static readonly fields: FieldList;
356
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReleaseLeaseRequest;
357
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReleaseLeaseRequest;
358
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReleaseLeaseRequest;
359
+ static equals(a: ReleaseLeaseRequest | PlainMessage<ReleaseLeaseRequest> | undefined, b: ReleaseLeaseRequest | PlainMessage<ReleaseLeaseRequest> | undefined): boolean;
360
+ }
361
+ /**
362
+ * @generated from message cellaflow.v1.ReleaseLeaseResponse
363
+ */
364
+ export declare class ReleaseLeaseResponse extends Message<ReleaseLeaseResponse> {
365
+ /**
366
+ * @generated from field: bool released = 1;
367
+ */
368
+ released: boolean;
369
+ constructor(data?: PartialMessage<ReleaseLeaseResponse>);
370
+ static readonly runtime: typeof proto3;
371
+ static readonly typeName = "cellaflow.v1.ReleaseLeaseResponse";
372
+ static readonly fields: FieldList;
373
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReleaseLeaseResponse;
374
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReleaseLeaseResponse;
375
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReleaseLeaseResponse;
376
+ static equals(a: ReleaseLeaseResponse | PlainMessage<ReleaseLeaseResponse> | undefined, b: ReleaseLeaseResponse | PlainMessage<ReleaseLeaseResponse> | undefined): boolean;
377
+ }
378
+ //# sourceMappingURL=idempotency_pb.d.ts.map