@ironflow/core 0.1.0-test.2
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 +60 -0
- package/dist/constants.d.ts +219 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +233 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors.d.ts +140 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +205 -0
- package/dist/errors.js.map +1 -0
- package/dist/gen/index.d.ts +7 -0
- package/dist/gen/index.d.ts.map +1 -0
- package/dist/gen/index.js +7 -0
- package/dist/gen/index.js.map +1 -0
- package/dist/gen/ironflow/v1/index.d.ts +13 -0
- package/dist/gen/ironflow/v1/index.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/index.js +15 -0
- package/dist/gen/ironflow/v1/index.js.map +1 -0
- package/dist/gen/ironflow/v1/ironflow_connect.d.ts +209 -0
- package/dist/gen/ironflow/v1/ironflow_connect.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/ironflow_connect.js +216 -0
- package/dist/gen/ironflow/v1/ironflow_connect.js.map +1 -0
- package/dist/gen/ironflow/v1/ironflow_pb.d.ts +814 -0
- package/dist/gen/ironflow/v1/ironflow_pb.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/ironflow_pb.js +157 -0
- package/dist/gen/ironflow/v1/ironflow_pb.js.map +1 -0
- package/dist/gen/ironflow/v1/pubsub_connect.d.ts +104 -0
- package/dist/gen/ironflow/v1/pubsub_connect.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/pubsub_connect.js +110 -0
- package/dist/gen/ironflow/v1/pubsub_connect.js.map +1 -0
- package/dist/gen/ironflow/v1/pubsub_pb.d.ts +814 -0
- package/dist/gen/ironflow/v1/pubsub_pb.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/pubsub_pb.js +202 -0
- package/dist/gen/ironflow/v1/pubsub_pb.js.map +1 -0
- package/dist/gen/ironflow/v1/types_pb.d.ts +698 -0
- package/dist/gen/ironflow/v1/types_pb.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/types_pb.js +217 -0
- package/dist/gen/ironflow/v1/types_pb.js.map +1 -0
- package/dist/gen/ironflow/v1/worker_connect.d.ts +20 -0
- package/dist/gen/ironflow/v1/worker_connect.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/worker_connect.js +26 -0
- package/dist/gen/ironflow/v1/worker_connect.js.map +1 -0
- package/dist/gen/ironflow/v1/worker_pb.d.ts +685 -0
- package/dist/gen/ironflow/v1/worker_pb.d.ts.map +1 -0
- package/dist/gen/ironflow/v1/worker_pb.js +135 -0
- package/dist/gen/ironflow/v1/worker_pb.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +26 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +78 -0
- package/dist/logger.js.map +1 -0
- package/dist/protocol.d.ts +250 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +34 -0
- package/dist/protocol.js.map +1 -0
- package/dist/schemas.d.ts +394 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +268 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +577 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +49 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +60 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +109 -0
- package/dist/utils.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.10.2 with parameter "target=ts,import_extension=js"
|
|
2
|
+
// @generated from file ironflow/v1/worker.proto (package ironflow.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_ironflow_v1_types } from "./types_pb.js";
|
|
6
|
+
import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
7
|
+
/**
|
|
8
|
+
* Describes the file ironflow/v1/worker.proto.
|
|
9
|
+
*/
|
|
10
|
+
export const file_ironflow_v1_worker = /*@__PURE__*/ fileDesc("Chhpcm9uZmxvdy92MS93b3JrZXIucHJvdG8SC2lyb25mbG93LnYxItIDCg1Xb3JrZXJNZXNzYWdlEi8KCHJlZ2lzdGVyGAEgASgLMhsuaXJvbmZsb3cudjEuV29ya2VyUmVnaXN0ZXJIABIxCgloZWFydGJlYXQYAiABKAsyHC5pcm9uZmxvdy52MS5Xb3JrZXJIZWFydGJlYXRIABIwCgxzdGVwX3N0YXJ0ZWQYAyABKAsyGC5pcm9uZmxvdy52MS5TdGVwU3RhcnRlZEgAEjQKDnN0ZXBfY29tcGxldGVkGAQgASgLMhouaXJvbmZsb3cudjEuU3RlcENvbXBsZXRlZEgAEi4KC3N0ZXBfZmFpbGVkGAUgASgLMhcuaXJvbmZsb3cudjEuU3RlcEZhaWxlZEgAEjAKDHN0ZXBfeWllbGRlZBgGIAEoCzIYLmlyb25mbG93LnYxLlN0ZXBZaWVsZGVkSAASMgoNam9iX2NvbXBsZXRlZBgHIAEoCzIZLmlyb25mbG93LnYxLkpvYkNvbXBsZXRlZEgAEiwKCmpvYl9mYWlsZWQYCCABKAsyFi5pcm9uZmxvdy52MS5Kb2JGYWlsZWRIABImCgdqb2JfYWNrGAkgASgLMhMuaXJvbmZsb3cudjEuSm9iQWNrSABCCQoHcGF5bG9hZCL9AQoOV29ya2VyUmVnaXN0ZXISEQoJd29ya2VyX2lkGAEgASgJEhAKCGhvc3RuYW1lGAIgASgJEhQKDGZ1bmN0aW9uX2lkcxgDIAMoCRIbChNtYXhfY29uY3VycmVudF9qb2JzGAQgASgFEjcKBmxhYmVscxgFIAMoCzInLmlyb25mbG93LnYxLldvcmtlclJlZ2lzdGVyLkxhYmVsc0VudHJ5EisK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EhgKEGRyYWluX3RpbWVvdXRfbXMYAiABKAUyVgoNV29ya2VyU2VydmljZRJFCgdDb25uZWN0EhouaXJvbmZsb3cudjEuV29ya2VyTWVzc2FnZRoaLmlyb25mbG93LnYxLkVuZ2luZU1lc3NhZ2UoATABQjpaOGdpdGh1Yi5jb20vc2FoaW5hL2lyb25mbG93L2dlbi9nby9pcm9uZmxvdy92MTtpcm9uZmxvd3YxYgZwcm90bzM", [file_ironflow_v1_types, file_google_protobuf_struct, file_google_protobuf_timestamp]);
|
|
11
|
+
/**
|
|
12
|
+
* Describes the message ironflow.v1.WorkerMessage.
|
|
13
|
+
* Use `create(WorkerMessageSchema)` to create a new message.
|
|
14
|
+
*/
|
|
15
|
+
export const WorkerMessageSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 0);
|
|
16
|
+
/**
|
|
17
|
+
* Describes the message ironflow.v1.WorkerRegister.
|
|
18
|
+
* Use `create(WorkerRegisterSchema)` to create a new message.
|
|
19
|
+
*/
|
|
20
|
+
export const WorkerRegisterSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 1);
|
|
21
|
+
/**
|
|
22
|
+
* Describes the message ironflow.v1.WorkerVersion.
|
|
23
|
+
* Use `create(WorkerVersionSchema)` to create a new message.
|
|
24
|
+
*/
|
|
25
|
+
export const WorkerVersionSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 2);
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message ironflow.v1.WorkerHeartbeat.
|
|
28
|
+
* Use `create(WorkerHeartbeatSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export const WorkerHeartbeatSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 3);
|
|
31
|
+
/**
|
|
32
|
+
* Describes the message ironflow.v1.ActiveJob.
|
|
33
|
+
* Use `create(ActiveJobSchema)` to create a new message.
|
|
34
|
+
*/
|
|
35
|
+
export const ActiveJobSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 4);
|
|
36
|
+
/**
|
|
37
|
+
* Describes the message ironflow.v1.WorkerMetrics.
|
|
38
|
+
* Use `create(WorkerMetricsSchema)` to create a new message.
|
|
39
|
+
*/
|
|
40
|
+
export const WorkerMetricsSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 5);
|
|
41
|
+
/**
|
|
42
|
+
* Describes the message ironflow.v1.StepStarted.
|
|
43
|
+
* Use `create(StepStartedSchema)` to create a new message.
|
|
44
|
+
*/
|
|
45
|
+
export const StepStartedSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 6);
|
|
46
|
+
/**
|
|
47
|
+
* Describes the message ironflow.v1.StepCompleted.
|
|
48
|
+
* Use `create(StepCompletedSchema)` to create a new message.
|
|
49
|
+
*/
|
|
50
|
+
export const StepCompletedSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 7);
|
|
51
|
+
/**
|
|
52
|
+
* Describes the message ironflow.v1.StepFailed.
|
|
53
|
+
* Use `create(StepFailedSchema)` to create a new message.
|
|
54
|
+
*/
|
|
55
|
+
export const StepFailedSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 8);
|
|
56
|
+
/**
|
|
57
|
+
* Describes the message ironflow.v1.StepYielded.
|
|
58
|
+
* Use `create(StepYieldedSchema)` to create a new message.
|
|
59
|
+
*/
|
|
60
|
+
export const StepYieldedSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 9);
|
|
61
|
+
/**
|
|
62
|
+
* Describes the message ironflow.v1.SleepYield.
|
|
63
|
+
* Use `create(SleepYieldSchema)` to create a new message.
|
|
64
|
+
*/
|
|
65
|
+
export const SleepYieldSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 10);
|
|
66
|
+
/**
|
|
67
|
+
* Describes the message ironflow.v1.WaitEventYield.
|
|
68
|
+
* Use `create(WaitEventYieldSchema)` to create a new message.
|
|
69
|
+
*/
|
|
70
|
+
export const WaitEventYieldSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 11);
|
|
71
|
+
/**
|
|
72
|
+
* Describes the message ironflow.v1.JobCompleted.
|
|
73
|
+
* Use `create(JobCompletedSchema)` to create a new message.
|
|
74
|
+
*/
|
|
75
|
+
export const JobCompletedSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 12);
|
|
76
|
+
/**
|
|
77
|
+
* Describes the message ironflow.v1.JobFailed.
|
|
78
|
+
* Use `create(JobFailedSchema)` to create a new message.
|
|
79
|
+
*/
|
|
80
|
+
export const JobFailedSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 13);
|
|
81
|
+
/**
|
|
82
|
+
* Describes the message ironflow.v1.JobAck.
|
|
83
|
+
* Use `create(JobAckSchema)` to create a new message.
|
|
84
|
+
*/
|
|
85
|
+
export const JobAckSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 14);
|
|
86
|
+
/**
|
|
87
|
+
* Describes the message ironflow.v1.EngineMessage.
|
|
88
|
+
* Use `create(EngineMessageSchema)` to create a new message.
|
|
89
|
+
*/
|
|
90
|
+
export const EngineMessageSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 15);
|
|
91
|
+
/**
|
|
92
|
+
* Describes the message ironflow.v1.WorkerRegistered.
|
|
93
|
+
* Use `create(WorkerRegisteredSchema)` to create a new message.
|
|
94
|
+
*/
|
|
95
|
+
export const WorkerRegisteredSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 16);
|
|
96
|
+
/**
|
|
97
|
+
* Describes the message ironflow.v1.JobAssignment.
|
|
98
|
+
* Use `create(JobAssignmentSchema)` to create a new message.
|
|
99
|
+
*/
|
|
100
|
+
export const JobAssignmentSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 17);
|
|
101
|
+
/**
|
|
102
|
+
* Describes the message ironflow.v1.CompletedStep.
|
|
103
|
+
* Use `create(CompletedStepSchema)` to create a new message.
|
|
104
|
+
*/
|
|
105
|
+
export const CompletedStepSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 18);
|
|
106
|
+
/**
|
|
107
|
+
* Describes the message ironflow.v1.JobContext.
|
|
108
|
+
* Use `create(JobContextSchema)` to create a new message.
|
|
109
|
+
*/
|
|
110
|
+
export const JobContextSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 19);
|
|
111
|
+
/**
|
|
112
|
+
* Describes the message ironflow.v1.StepAck.
|
|
113
|
+
* Use `create(StepAckSchema)` to create a new message.
|
|
114
|
+
*/
|
|
115
|
+
export const StepAckSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 20);
|
|
116
|
+
/**
|
|
117
|
+
* Describes the message ironflow.v1.ResumeJob.
|
|
118
|
+
* Use `create(ResumeJobSchema)` to create a new message.
|
|
119
|
+
*/
|
|
120
|
+
export const ResumeJobSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 21);
|
|
121
|
+
/**
|
|
122
|
+
* Describes the message ironflow.v1.CancelJob.
|
|
123
|
+
* Use `create(CancelJobSchema)` to create a new message.
|
|
124
|
+
*/
|
|
125
|
+
export const CancelJobSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 22);
|
|
126
|
+
/**
|
|
127
|
+
* Describes the message ironflow.v1.Shutdown.
|
|
128
|
+
* Use `create(ShutdownSchema)` to create a new message.
|
|
129
|
+
*/
|
|
130
|
+
export const ShutdownSchema = /*@__PURE__*/ messageDesc(file_ironflow_v1_worker, 23);
|
|
131
|
+
/**
|
|
132
|
+
* @generated from service ironflow.v1.WorkerService
|
|
133
|
+
*/
|
|
134
|
+
export const WorkerService = /*@__PURE__*/ serviceDesc(file_ironflow_v1_worker, 0);
|
|
135
|
+
//# sourceMappingURL=worker_pb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker_pb.js","sourceRoot":"","sources":["../../../../src/gen/ironflow/v1/worker_pb.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,qFAAqF;AACrF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AE,EAAE,CAAC,CAAC;AAiB3C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA2B,aAAa,CACnE,WAAW,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;AAsB3C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAwB,aAAa,CAC7D,WAAW,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;AA+B3C;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA0B,aAAa,CACjE,WAAW,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;AAiB3C;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA0B,aAAa,CACjE,WAAW,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;AAmB3C;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAyB,aAAa,CAC/D,WAAW,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAWrB,aAAa,CAChB,WAAW,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ironflow/core
|
|
3
|
+
*
|
|
4
|
+
* Core types, schemas, and utilities shared between browser and Node.js SDKs.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export type { Branded, RunId, FunctionId, StepId, EventId, JobId, WorkerId, SubscriptionId, FunctionConfig, FunctionContext, FunctionHandler, IronflowFunction, Trigger, RetryConfig, ConcurrencyConfig, ExecutionMode, IronflowEvent, EventFilter, StepClient, Duration, ParallelOptions, RunInfo, Run, RunStatus, ListRunsOptions, ListRunsResult, TriggerResult, TriggerSyncOptions, TriggerSyncResult, EmitOptions, EmitResult, Logger, SubscribeOptions, BufferConfig, SubscriptionEvent, EventMetadata, SubscriptionErrorInfo, ConnectionState, SubscriptionCallbacks, Subscription, AckHandle, AckableSubscription, AckMode, BackpressureMode, AckType, ConsumerGroupStatus, ConsumerGroupConfig, ConsumerGroup, ServerCapabilities, } from "./types.js";
|
|
9
|
+
export { createRunId, createFunctionId, createStepId, createEventId, createJobId, createWorkerId, createSubscriptionId, } from "./types.js";
|
|
10
|
+
export type { PushRequest, PushResponse, CompletedStep, ResumeContext, StepResult, YieldInfo, SleepYield, WaitEventYield, WSSubscribeRequest, WSUnsubscribeRequest, WSAckRequest, WSSubscriptionResult, WSEventMessage, WSSubscriptionError, WSError, WSServerMessage, WSClientMessage, RetryEvent, RetryInfo, ClientRetryConfig, } from "./protocol.js";
|
|
11
|
+
export { patterns } from "./protocol.js";
|
|
12
|
+
export { DEFAULT_PORT, DEFAULT_HOST, DEFAULT_SERVER_URL, DEFAULT_WS_URL, DEFAULT_TIMEOUTS, DEFAULT_RETRY, DEFAULT_CLIENT_RETRY, DEFAULT_WORKER, DEFAULT_RECONNECT, ENV_VARS, getServerUrl, getWebSocketUrl, STEP_TYPES, STEP_STATUS, RUN_STATUS, WS_MESSAGE_TYPES, HTTP_HEADERS, JSON_HEADERS, ERROR_CODES, API_ENDPOINTS, TIMING, ACK_TYPES, } from "./constants.js";
|
|
13
|
+
export { IronflowError, ConnectionError, SubscriptionError, TimeoutError, ValidationError, SchemaValidationError, SignatureError, FunctionNotFoundError, RunNotFoundError, StepError, NonRetryableError, NotConfiguredError, isRetryable, isIronflowError, } from "./errors.js";
|
|
14
|
+
export { RunStatusSchema, CompletedStepSchema, ResumeContextSchema, PushRequestEventSchema, PushRequestSchema, TriggerResponseSchema, TriggerSyncResultItemSchema, TriggerSyncResponseSchema, RunResponseSchema, ListRunsResponseSchema, RegisterFunctionResponseSchema, HealthResponseSchema, ErrorResponseSchema, EmptyResponseSchema, AckModeSchema, BackpressureModeSchema, ConsumerGroupStatusSchema, ConsumerGroupResponseSchema, ListConsumerGroupsResponseSchema, JobCompletedStepSchema, JobEventSchema, JobContextSchema, JobAssignmentSchema, EventMetadataSchema, WSSubscriptionResultItemSchema, WSSubscriptionResultSchema, WSEventMessageSchema, WSSubscriptionErrorSchema, WSErrorSchema, WSServerMessageSchema, type ValidatedPushRequest, type ValidatedRunResponse, type ValidatedJobAssignment, type ValidatedWSServerMessage, parseAndValidate, validate, } from "./schemas.js";
|
|
15
|
+
export { createLogger, createNoopLogger, type LogLevel, type LoggerConfig, } from "./logger.js";
|
|
16
|
+
export { parseDuration, calculateBackoff, sleep, createDeferred, generateId, safeJsonParse, isObject, deepMerge, type Deferred, } from "./utils.js";
|
|
17
|
+
export { IronflowService, PubSubService, WorkerService, } from "./gen/index.js";
|
|
18
|
+
export type { Function, Run as PbRun, Step as PbStep, RunStatus as PbRunStatus, StepStatus as PbStepStatus, StepType as PbStepType, ExecutionMode as PbExecutionMode, } from "./gen/index.js";
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,YAAY,EAEV,OAAO,EACP,KAAK,EACL,UAAU,EACV,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,EAGd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EAGb,aAAa,EACb,WAAW,EAGX,UAAU,EACV,QAAQ,EACR,eAAe,EAGf,OAAO,EACP,GAAG,EACH,SAAS,EACT,eAAe,EACf,cAAc,EAGd,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EAGjB,WAAW,EACX,UAAU,EAGV,MAAM,EAGN,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,SAAS,EACT,mBAAmB,EAGnB,OAAO,EACP,gBAAgB,EAChB,OAAO,EACP,mBAAmB,EACnB,m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mB,EAGnB,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,gCAAgC,EAGhC,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EAGnB,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,aAAa,EACb,qBAAqB,EAGrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAG7B,gBAAgB,EAChB,QAAQ,GACT,MAAM,cAAc,CAAC;AAMtB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,KAAK,QAAQ,EACb,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AAMrB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,KAAK,QAAQ,GACd,MAAM,YAAY,CAAC;AAMpB,OAAO,EAEL,eAAe,EACf,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAEV,QAAQ,EACR,GAAG,IAAI,KAAK,EACZ,IAAI,IAAI,MAAM,EACd,SAAS,IAAI,WAAW,EACxB,UAAU,IAAI,YAAY,EAC1B,QAAQ,IAAI,UAAU,EACtB,aAAa,IAAI,eAAe,GACjC,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ironflow/core
|
|
3
|
+
*
|
|
4
|
+
* Core types, schemas, and utilities shared between browser and Node.js SDKs.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
// Branded ID factory functions
|
|
9
|
+
export { createRunId, createFunctionId, createStepId, createEventId, createJobId, createWorkerId, createSubscriptionId, } from "./types.js";
|
|
10
|
+
export { patterns } from "./protocol.js";
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Constants Exports
|
|
13
|
+
// ============================================================================
|
|
14
|
+
export { DEFAULT_PORT, DEFAULT_HOST, DEFAULT_SERVER_URL, DEFAULT_WS_URL, DEFAULT_TIMEOUTS, DEFAULT_RETRY, DEFAULT_CLIENT_RETRY, DEFAULT_WORKER, DEFAULT_RECONNECT, ENV_VARS, getServerUrl, getWebSocketUrl, STEP_TYPES, STEP_STATUS, RUN_STATUS, WS_MESSAGE_TYPES, HTTP_HEADERS, JSON_HEADERS, ERROR_CODES, API_ENDPOINTS, TIMING, ACK_TYPES, } from "./constants.js";
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Error Exports
|
|
17
|
+
// ============================================================================
|
|
18
|
+
export { IronflowError, ConnectionError, SubscriptionError, TimeoutError, ValidationError, SchemaValidationError, SignatureError, FunctionNotFoundError, RunNotFoundError, StepError, NonRetryableError, NotConfiguredError, isRetryable, isIronflowError, } from "./errors.js";
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// Schema Exports
|
|
21
|
+
// ============================================================================
|
|
22
|
+
export {
|
|
23
|
+
// Run schemas
|
|
24
|
+
RunStatusSchema,
|
|
25
|
+
// Push request schemas
|
|
26
|
+
CompletedStepSchema, ResumeContextSchema, PushRequestEventSchema, PushRequestSchema,
|
|
27
|
+
// Response schemas
|
|
28
|
+
TriggerResponseSchema, TriggerSyncResultItemSchema, TriggerSyncResponseSchema, RunResponseSchema, ListRunsResponseSchema, RegisterFunctionResponseSchema, HealthResponseSchema, ErrorResponseSchema, EmptyResponseSchema,
|
|
29
|
+
// Consumer group schemas
|
|
30
|
+
AckModeSchema, BackpressureModeSchema, ConsumerGroupStatusSchema, ConsumerGroupResponseSchema, ListConsumerGroupsResponseSchema,
|
|
31
|
+
// Worker schemas
|
|
32
|
+
JobCompletedStepSchema, JobEventSchema, JobContextSchema, JobAssignmentSchema,
|
|
33
|
+
// WebSocket schemas
|
|
34
|
+
EventMetadataSchema, WSSubscriptionResultItemSchema, WSSubscriptionResultSchema, WSEventMessageSchema, WSSubscriptionErrorSchema, WSErrorSchema, WSServerMessageSchema,
|
|
35
|
+
// Validation helpers
|
|
36
|
+
parseAndValidate, validate, } from "./schemas.js";
|
|
37
|
+
// ============================================================================
|
|
38
|
+
// Logger Exports
|
|
39
|
+
// ============================================================================
|
|
40
|
+
export { createLogger, createNoopLogger, } from "./logger.js";
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// Utility Exports
|
|
43
|
+
// ============================================================================
|
|
44
|
+
export { parseDuration, calculateBackoff, sleep, createDeferred, generateId, safeJsonParse, isObject, deepMerge, } from "./utils.js";
|
|
45
|
+
// ============================================================================
|
|
46
|
+
// Generated Protobuf/ConnectRPC Exports
|
|
47
|
+
// ============================================================================
|
|
48
|
+
export {
|
|
49
|
+
// ConnectRPC service definitions
|
|
50
|
+
IronflowService, PubSubService, WorkerService, } from "./gen/index.js";
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+EH,+BAA+B;AAC/B,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,cAAc,EACd,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAkCpB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,MAAM,EACN,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,+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iCAAiC;AACjC,eAAe,EACf,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/logger.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger utilities for Ironflow SDK
|
|
3
|
+
*/
|
|
4
|
+
import type { Logger } from "./types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Log level enumeration
|
|
7
|
+
*/
|
|
8
|
+
export type LogLevel = "debug" | "info" | "warn" | "error" | "silent";
|
|
9
|
+
/**
|
|
10
|
+
* Logger configuration
|
|
11
|
+
*/
|
|
12
|
+
export interface LoggerConfig {
|
|
13
|
+
/** Minimum log level to output */
|
|
14
|
+
level?: LogLevel;
|
|
15
|
+
/** Prefix for log messages */
|
|
16
|
+
prefix?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create a logger instance
|
|
20
|
+
*/
|
|
21
|
+
export declare function createLogger(config?: LoggerConfig): Logger;
|
|
22
|
+
/**
|
|
23
|
+
* Create a no-op logger that doesn't output anything
|
|
24
|
+
*/
|
|
25
|
+
export declare function createNoopLogger(): Logger;
|
|
26
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAaD;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAwC1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAOzC"}
|
package/dist/logger.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger utilities for Ironflow SDK
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Log level priorities for filtering
|
|
6
|
+
*/
|
|
7
|
+
const LOG_LEVELS = {
|
|
8
|
+
debug: 0,
|
|
9
|
+
info: 1,
|
|
10
|
+
warn: 2,
|
|
11
|
+
error: 3,
|
|
12
|
+
silent: 4,
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Create a logger instance
|
|
16
|
+
*/
|
|
17
|
+
export function createLogger(config) {
|
|
18
|
+
const level = config?.level ?? getDefaultLogLevel();
|
|
19
|
+
const prefix = config?.prefix ?? "[ironflow]";
|
|
20
|
+
const minLevel = LOG_LEVELS[level];
|
|
21
|
+
const shouldLog = (logLevel) => LOG_LEVELS[logLevel] >= minLevel;
|
|
22
|
+
const formatMessage = (message) => `${prefix} ${message}`;
|
|
23
|
+
const formatData = (data) => {
|
|
24
|
+
if (!data)
|
|
25
|
+
return "";
|
|
26
|
+
return " " + JSON.stringify(data);
|
|
27
|
+
};
|
|
28
|
+
return {
|
|
29
|
+
debug(message, data) {
|
|
30
|
+
if (shouldLog("debug")) {
|
|
31
|
+
// eslint-disable-next-line no-console
|
|
32
|
+
console.debug(formatMessage(message) + formatData(data));
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
info(message, data) {
|
|
36
|
+
if (shouldLog("info")) {
|
|
37
|
+
// eslint-disable-next-line no-console
|
|
38
|
+
console.info(formatMessage(message) + formatData(data));
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
warn(message, data) {
|
|
42
|
+
if (shouldLog("warn")) {
|
|
43
|
+
// eslint-disable-next-line no-console
|
|
44
|
+
console.warn(formatMessage(message) + formatData(data));
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
error(message, data) {
|
|
48
|
+
if (shouldLog("error")) {
|
|
49
|
+
// eslint-disable-next-line no-console
|
|
50
|
+
console.error(formatMessage(message) + formatData(data));
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Create a no-op logger that doesn't output anything
|
|
57
|
+
*/
|
|
58
|
+
export function createNoopLogger() {
|
|
59
|
+
return {
|
|
60
|
+
debug() { },
|
|
61
|
+
info() { },
|
|
62
|
+
warn() { },
|
|
63
|
+
error() { },
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get the default log level from environment
|
|
68
|
+
*/
|
|
69
|
+
function getDefaultLogLevel() {
|
|
70
|
+
if (typeof process !== "undefined" && process.env?.["IRONFLOW_LOG_LEVEL"]) {
|
|
71
|
+
const level = process.env["IRONFLOW_LOG_LEVEL"].toLowerCase();
|
|
72
|
+
if (level in LOG_LEVELS) {
|
|
73
|
+
return level;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return "info";
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH;;GAEG;AACH,MAAM,UAAU,GAA6B;IAC3C,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAqB;IAChD,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,kBAAkB,EAAE,CAAC;IACpD,MAAM,MAAM,GAAG,MAAM,EAAE,MAAM,IAAI,YAAY,CAAC;IAC9C,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;I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C,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO;QACL,KAAK,KAAI,CAAC;QACV,IAAI,KAAI,CAAC;QACT,IAAI,KAAI,CAAC;QACT,KAAK,KAAI,CAAC;KACX,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB;IACzB,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,EAAE,CAAC;QAC1E,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,IAAI,KAAK,IAAI,UAAU,EAAE,CAAC;YACxB,OAAO,KAAiB,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ironflow Protocol Definitions
|
|
3
|
+
*
|
|
4
|
+
* WebSocket and HTTP protocol types for communication with the Ironflow server.
|
|
5
|
+
*/
|
|
6
|
+
import type { AckMode, AckType, BackpressureMode, EventMetadata } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Request from engine to SDK (Push mode)
|
|
9
|
+
*/
|
|
10
|
+
export interface PushRequest {
|
|
11
|
+
run_id: string;
|
|
12
|
+
function_id: string;
|
|
13
|
+
attempt: number;
|
|
14
|
+
event: {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
data: unknown;
|
|
18
|
+
timestamp: string;
|
|
19
|
+
idempotency_key?: string;
|
|
20
|
+
source?: string;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
steps: CompletedStep[];
|
|
24
|
+
resume?: ResumeContext;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A completed step from previous execution
|
|
28
|
+
*/
|
|
29
|
+
export interface CompletedStep {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
status: "completed" | "failed";
|
|
33
|
+
output?: unknown;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Resume context for sleep/waitForEvent
|
|
38
|
+
*/
|
|
39
|
+
export interface ResumeContext {
|
|
40
|
+
step_id: string;
|
|
41
|
+
type: "sleep" | "wait_for_event";
|
|
42
|
+
data?: unknown;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Response from SDK to engine (Push mode)
|
|
46
|
+
*/
|
|
47
|
+
export interface PushResponse {
|
|
48
|
+
status: "completed" | "yielded" | "failed";
|
|
49
|
+
steps: StepResult[];
|
|
50
|
+
result?: unknown;
|
|
51
|
+
error?: {
|
|
52
|
+
message: string;
|
|
53
|
+
code?: string;
|
|
54
|
+
step_id?: string;
|
|
55
|
+
retryable: boolean;
|
|
56
|
+
stack?: string;
|
|
57
|
+
};
|
|
58
|
+
yield?: YieldInfo;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Result of a step execution
|
|
62
|
+
*/
|
|
63
|
+
export interface StepResult {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
type: "invoke" | "sleep" | "wait_for_event";
|
|
67
|
+
status: "completed" | "failed";
|
|
68
|
+
started_at: string;
|
|
69
|
+
ended_at?: string;
|
|
70
|
+
duration_ms?: number;
|
|
71
|
+
output?: unknown;
|
|
72
|
+
error?: {
|
|
73
|
+
message: string;
|
|
74
|
+
retryable: boolean;
|
|
75
|
+
stack?: string;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Yield information for sleep/waitForEvent
|
|
80
|
+
*/
|
|
81
|
+
export type YieldInfo = SleepYield | WaitEventYield;
|
|
82
|
+
export interface SleepYield {
|
|
83
|
+
step_id: string;
|
|
84
|
+
type: "sleep";
|
|
85
|
+
until: string;
|
|
86
|
+
}
|
|
87
|
+
export interface WaitEventYield {
|
|
88
|
+
step_id: string;
|
|
89
|
+
type: "wait_for_event";
|
|
90
|
+
event_filter: {
|
|
91
|
+
event: string;
|
|
92
|
+
match?: string;
|
|
93
|
+
timeout?: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Subscribe request message sent to server
|
|
98
|
+
*/
|
|
99
|
+
export interface WSSubscribeRequest {
|
|
100
|
+
type: "subscribe";
|
|
101
|
+
subscription: {
|
|
102
|
+
pattern: string;
|
|
103
|
+
options?: {
|
|
104
|
+
replay?: number;
|
|
105
|
+
includeMetadata?: boolean;
|
|
106
|
+
filter?: string;
|
|
107
|
+
consumerGroup?: string;
|
|
108
|
+
ackMode?: AckMode;
|
|
109
|
+
backpressure?: BackpressureMode;
|
|
110
|
+
namespace?: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Unsubscribe request message sent to server
|
|
116
|
+
*/
|
|
117
|
+
export interface WSUnsubscribeRequest {
|
|
118
|
+
type: "unsubscribe";
|
|
119
|
+
subscriptionId: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Acknowledgment request message sent to server
|
|
123
|
+
*/
|
|
124
|
+
export interface WSAckRequest {
|
|
125
|
+
type: "ack";
|
|
126
|
+
eventId: string;
|
|
127
|
+
ackType: AckType;
|
|
128
|
+
/** Delay in milliseconds before redelivery (for NAK) */
|
|
129
|
+
redeliverDelay?: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Subscription result message from server
|
|
133
|
+
*/
|
|
134
|
+
export interface WSSubscriptionResult {
|
|
135
|
+
type: "subscription_result";
|
|
136
|
+
results: Array<{
|
|
137
|
+
pattern: string;
|
|
138
|
+
status: "ok" | "error";
|
|
139
|
+
subscriptionId?: string;
|
|
140
|
+
code?: string;
|
|
141
|
+
message?: string;
|
|
142
|
+
}>;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Event message from server
|
|
146
|
+
*/
|
|
147
|
+
export interface WSEventMessage {
|
|
148
|
+
type: "event";
|
|
149
|
+
subscriptionId: string;
|
|
150
|
+
topic: string;
|
|
151
|
+
data: unknown;
|
|
152
|
+
meta?: EventMetadata;
|
|
153
|
+
/** Event ID for consumer group ack/nak/term */
|
|
154
|
+
eventId?: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Subscription error message from server
|
|
158
|
+
*/
|
|
159
|
+
export interface WSSubscriptionError {
|
|
160
|
+
type: "subscription_error";
|
|
161
|
+
subscriptionId: string;
|
|
162
|
+
code: string;
|
|
163
|
+
message: string;
|
|
164
|
+
retrying: boolean;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* General error message from server
|
|
168
|
+
*/
|
|
169
|
+
export interface WSError {
|
|
170
|
+
type: "error";
|
|
171
|
+
code: string;
|
|
172
|
+
message: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Union of all WebSocket messages from server
|
|
176
|
+
*/
|
|
177
|
+
export type WSServerMessage = WSSubscriptionResult | WSEventMessage | WSSubscriptionError | WSError;
|
|
178
|
+
/**
|
|
179
|
+
* Union of all WebSocket messages sent to server
|
|
180
|
+
*/
|
|
181
|
+
export type WSClientMessage = WSSubscribeRequest | WSUnsubscribeRequest | WSAckRequest;
|
|
182
|
+
/**
|
|
183
|
+
* Retry event information passed to onRetry callback
|
|
184
|
+
*/
|
|
185
|
+
export interface RetryEvent {
|
|
186
|
+
/** Current attempt number (1-based) */
|
|
187
|
+
attempt: number;
|
|
188
|
+
/** Maximum attempts configured */
|
|
189
|
+
maxAttempts: number;
|
|
190
|
+
/** The error that triggered the retry */
|
|
191
|
+
error: Error;
|
|
192
|
+
/** Delay before the next retry in ms */
|
|
193
|
+
delayMs: number;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Retry information for subscription events
|
|
197
|
+
*/
|
|
198
|
+
export interface RetryInfo {
|
|
199
|
+
/** The event ID being retried */
|
|
200
|
+
eventId: string;
|
|
201
|
+
/** Current retry attempt number */
|
|
202
|
+
attempt: number;
|
|
203
|
+
/** Maximum retry attempts */
|
|
204
|
+
maxAttempts: number;
|
|
205
|
+
/** Delay until next retry in milliseconds */
|
|
206
|
+
delayMs?: number;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Retry configuration for client HTTP requests
|
|
210
|
+
*/
|
|
211
|
+
export interface ClientRetryConfig {
|
|
212
|
+
/** Maximum number of retry attempts (default: 3) */
|
|
213
|
+
maxAttempts?: number;
|
|
214
|
+
/** Initial delay between retries in ms for server errors (default: 100) */
|
|
215
|
+
initialDelayMs?: number;
|
|
216
|
+
/** Maximum delay between retries in ms (default: 10000) */
|
|
217
|
+
maxDelayMs?: number;
|
|
218
|
+
/** Backoff multiplier for server errors (default: 2.0) */
|
|
219
|
+
backoffMultiplier?: number;
|
|
220
|
+
/** Fixed delay for connection errors in ms (default: 2000) */
|
|
221
|
+
connectionRetryDelayMs?: number;
|
|
222
|
+
/** Callback invoked before each retry */
|
|
223
|
+
onRetry?: (event: RetryEvent) => void;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Helper functions for building common subscription patterns.
|
|
227
|
+
*
|
|
228
|
+
* Patterns use NATS-style wildcards:
|
|
229
|
+
* - `*` matches a single token
|
|
230
|
+
* - `>` matches one or more tokens (must be at end)
|
|
231
|
+
*/
|
|
232
|
+
export declare const patterns: {
|
|
233
|
+
/** Subscribe to all run events */
|
|
234
|
+
readonly allRuns: () => string;
|
|
235
|
+
/** Subscribe to all events for a specific run */
|
|
236
|
+
readonly run: (runId: string) => string;
|
|
237
|
+
/** Subscribe to run lifecycle events only (created, updated, completed, failed) */
|
|
238
|
+
readonly runLifecycle: (runId: string) => string;
|
|
239
|
+
/** Subscribe to step events for a run */
|
|
240
|
+
readonly runSteps: (runId: string) => string;
|
|
241
|
+
/** Subscribe to all function events */
|
|
242
|
+
readonly allFunctions: () => string;
|
|
243
|
+
/** Subscribe to events for a specific function */
|
|
244
|
+
readonly function: (functionId: string) => string;
|
|
245
|
+
/** Subscribe to a user event pattern */
|
|
246
|
+
readonly userEvent: (eventName: string) => string;
|
|
247
|
+
/** Subscribe to all user events */
|
|
248
|
+
readonly allUserEvents: () => string;
|
|
249
|
+
};
|
|
250
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAMpF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;IACF,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B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IACrB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yCAAyC;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC;AAMD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;IACnB,kCAAkC;;IAGlC,iDAAiD;0BACpC,MAAM;IAEnB,mFAAmF;mCAC7D,MAAM;IAE5B,yCAAyC;+BACvB,MAAM;IAExB,uCAAuC;;IAGvC,kDAAkD;oCAC3B,MAAM;IAE7B,wCAAwC;oCACjB,MAAM;IAE7B,mCAAmC;;CAE3B,CAAC"}
|
package/dist/protocol.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ironflow Protocol Definitions
|
|
3
|
+
*
|
|
4
|
+
* WebSocket and HTTP protocol types for communication with the Ironflow server.
|
|
5
|
+
*/
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Pattern Helpers
|
|
8
|
+
// ============================================================================
|
|
9
|
+
/**
|
|
10
|
+
* Helper functions for building common subscription patterns.
|
|
11
|
+
*
|
|
12
|
+
* Patterns use NATS-style wildcards:
|
|
13
|
+
* - `*` matches a single token
|
|
14
|
+
* - `>` matches one or more tokens (must be at end)
|
|
15
|
+
*/
|
|
16
|
+
export const patterns = {
|
|
17
|
+
/** Subscribe to all run events */
|
|
18
|
+
allRuns: () => "system.run.>",
|
|
19
|
+
/** Subscribe to all events for a specific run */
|
|
20
|
+
run: (runId) => `system.run.${runId}.>`,
|
|
21
|
+
/** Subscribe to run lifecycle events only (created, updated, completed, failed) */
|
|
22
|
+
runLifecycle: (runId) => `system.run.${runId}.*`,
|
|
23
|
+
/** Subscribe to step events for a run */
|
|
24
|
+
runSteps: (runId) => `system.run.${runId}.step.>`,
|
|
25
|
+
/** Subscribe to all function events */
|
|
26
|
+
allFunctions: () => "system.function.>",
|
|
27
|
+
/** Subscribe to events for a specific function */
|
|
28
|
+
function: (functionId) => `system.function.${functionId}.>`,
|
|
29
|
+
/** Subscribe to a user event pattern */
|
|
30
|
+
userEvent: (eventName) => `events:${eventName}`,
|
|
31
|
+
/** Subscribe to all user events */
|
|
32
|
+
allUserEvents: () => "events:>",
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyQH,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,kCAAkC;IAClC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc;IAE7B,iDAAiD;IACjD,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,cAAc,KAAK,IAAI;IAE/C,mFAAmF;IACnF,YAAY,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,cAAc,KAAK,IAAI;IAExD,yCAAyC;IACzC,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,cAAc,KAAK,SAAS;IAEzD,uCAAuC;IACvC,YAAY,EAAE,GAAG,EAAE,CAAC,mBAAmB;IAEvC,kDAAkD;IAClD,QAAQ,EAAE,CAAC,UAAkB,EAAE,EAAE,CAAC,mBAAmB,UAAU,IAAI;IAEnE,wCAAwC;IACxC,SAAS,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,UAAU,SAAS,EAAE;IAEvD,mCAAmC;IACnC,aAAa,EAAE,GAAG,EAAE,CAAC,UAAU;CACvB,CAAC"}
|