@lightspeed-ai/sdk 0.4.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 (47) hide show
  1. package/README.md +68 -0
  2. package/dist/client.d.ts +65 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +198 -0
  5. package/dist/client.js.map +1 -0
  6. package/dist/errors.d.ts +20 -0
  7. package/dist/errors.d.ts.map +1 -0
  8. package/dist/errors.js +53 -0
  9. package/dist/errors.js.map +1 -0
  10. package/dist/generated/methods.d.ts +3308 -0
  11. package/dist/generated/methods.d.ts.map +1 -0
  12. package/dist/generated/methods.js +2085 -0
  13. package/dist/generated/methods.js.map +1 -0
  14. package/dist/generated/types.d.ts +8048 -0
  15. package/dist/generated/types.d.ts.map +1 -0
  16. package/dist/generated/types.js +6 -0
  17. package/dist/generated/types.js.map +1 -0
  18. package/dist/generated/workflow-manifest.d.ts +223 -0
  19. package/dist/generated/workflow-manifest.d.ts.map +1 -0
  20. package/dist/generated/workflow-manifest.js +258 -0
  21. package/dist/generated/workflow-manifest.js.map +1 -0
  22. package/dist/generated/workflow-types.d.ts +587 -0
  23. package/dist/generated/workflow-types.d.ts.map +1 -0
  24. package/dist/generated/workflow-types.js +6 -0
  25. package/dist/generated/workflow-types.js.map +1 -0
  26. package/dist/index.d.ts +8 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +4 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/workflow.d.ts +221 -0
  31. package/dist/workflow.d.ts.map +1 -0
  32. package/dist/workflow.js +346 -0
  33. package/dist/workflow.js.map +1 -0
  34. package/examples/temporal-activity.ts +32 -0
  35. package/package.json +55 -0
  36. package/release.json +4 -0
  37. package/schema/api.schema.json +18595 -0
  38. package/schema/workflow.json +253 -0
  39. package/schema/workflow.schema.json +1237 -0
  40. package/src/client.ts +323 -0
  41. package/src/errors.ts +73 -0
  42. package/src/generated/methods.ts +3348 -0
  43. package/src/generated/types.ts +8319 -0
  44. package/src/generated/workflow-manifest.ts +258 -0
  45. package/src/generated/workflow-types.ts +612 -0
  46. package/src/index.ts +31 -0
  47. package/src/workflow.ts +475 -0
@@ -0,0 +1,587 @@
1
+ /**
2
+ * Who created a resource or authored bytes. An actor is whatever a key
3
+ * allowed to assert one said; core compares it and never resolves it.
4
+ *
5
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
6
+ * via the `definition` "Attribution".
7
+ */
8
+ export type Attribution = {
9
+ id: string;
10
+ kind: "actor";
11
+ } | {
12
+ kind: "key";
13
+ prefix: string;
14
+ } | {
15
+ kind: "local";
16
+ } | {
17
+ cause: string;
18
+ component: string;
19
+ kind: "internal";
20
+ };
21
+ /**
22
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
23
+ * via the `definition` "BotId".
24
+ */
25
+ export type BotId = string;
26
+ /**
27
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
28
+ * via the `definition` "BotTriggerId".
29
+ */
30
+ export type BotTriggerId = string;
31
+ /**
32
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
33
+ * via the `definition` "ChannelAccountId".
34
+ */
35
+ export type ChannelAccountId = string;
36
+ /**
37
+ * What a connector executes: provider message ids and their direction.
38
+ *
39
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
40
+ * via the `definition` "ChannelDeliveryOperation".
41
+ */
42
+ export type ChannelDeliveryOperation = {
43
+ replyContext?: ReplyContext | null;
44
+ replyTo?: string | null;
45
+ text: string;
46
+ type: "send";
47
+ } | {
48
+ messageId: string;
49
+ text: string;
50
+ type: "edit";
51
+ } | {
52
+ emoji: string;
53
+ /**
54
+ * Whether the reacted-to message is the bot's own.
55
+ */
56
+ fromMe: boolean;
57
+ messageId: string;
58
+ type: "react";
59
+ };
60
+ /**
61
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
62
+ * via the `definition` "ChannelProvider".
63
+ */
64
+ export type ChannelProvider = string;
65
+ /**
66
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
67
+ * via the `definition` "ChannelMediaKind".
68
+ */
69
+ export type ChannelMediaKind = "image" | "audio" | "document";
70
+ /**
71
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
72
+ * via the `definition` "ChatTurnAccess".
73
+ */
74
+ export type ChatTurnAccess = "anyone" | "listed";
75
+ /**
76
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
77
+ * via the `definition` "ChatGroupActivation".
78
+ */
79
+ export type ChatGroupActivation = "mention" | "always";
80
+ /**
81
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
82
+ * via the `definition` "ChatScope".
83
+ */
84
+ export type ChatScope = "direct" | "group";
85
+ /**
86
+ * Closed internal vocabulary carried by the shared delivery signal.
87
+ *
88
+ * Workflow-tool invocation bodies join this enum when the durable tool
89
+ * contracts land. This first slice folds the two existing transports.
90
+ *
91
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
92
+ * via the `definition` "EmissionBody".
93
+ */
94
+ export type EmissionBody = {
95
+ failure_message_ref?: string | null;
96
+ kind: "run_terminal";
97
+ output?: ContentRef | null;
98
+ run_id: number;
99
+ status: RunStatus;
100
+ token: string;
101
+ } | {
102
+ kind: "source_resolution";
103
+ promise_id: PromiseId;
104
+ resolution: PromiseResolution;
105
+ } | {
106
+ /**
107
+ * Workflow id of the session that emitted the invocation — the
108
+ * endpoint a receiver signals its reply to. Supplied by the
109
+ * substrate adapter; the harness treats it as opaque.
110
+ */
111
+ holder_workflow_id: string;
112
+ invocation: WorkflowToolInvocation;
113
+ kind: "tool_invocation";
114
+ } | {
115
+ completion_key: string;
116
+ invocation_id: WorkflowToolInvocationId;
117
+ kind: "invocation_cancellation";
118
+ promise_id: PromiseId;
119
+ };
120
+ /**
121
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
122
+ * via the `definition` "RunStatus".
123
+ */
124
+ export type RunStatus = "active" | "parked" | "cancelling" | "completed" | "failed" | "cancelled";
125
+ /**
126
+ * Stable identifier for a promise: a session-scoped counter rendered as
127
+ * `promise_<n>`, the same convention as `run_<n>`, so the model copies a
128
+ * short handle rather than a digest. The harness hands every tool batch a
129
+ * base one past the session cursor (`ToolInvocationBatchRequest::
130
+ * promise_id_base`); the executor numbers the promises it creates from
131
+ * that base, and the reducer accepts a creation only at or above the
132
+ * batch's base and never twice. Producer correlation lives on
133
+ * `PromiseSource`, not in the id.
134
+ *
135
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
136
+ * via the `definition` "PromiseId".
137
+ */
138
+ export type PromiseId = string;
139
+ /**
140
+ * How a promise reached a terminal state. Used by `ResolvePromise`
141
+ * admission; all transports (push notifications, poll results, timers,
142
+ * cancellation) converge on this one funnel.
143
+ *
144
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
145
+ * via the `definition` "PromiseResolution".
146
+ */
147
+ export type PromiseResolution = {
148
+ kind: "resolved";
149
+ payload_ref?: string | null;
150
+ } | {
151
+ error_ref?: string | null;
152
+ kind: "failed";
153
+ } | {
154
+ kind: "cancelled";
155
+ };
156
+ /**
157
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
158
+ * via the `definition` "WorkflowToolInvocationId".
159
+ */
160
+ export type WorkflowToolInvocationId = string;
161
+ /**
162
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
163
+ * via the `definition` "SessionId".
164
+ */
165
+ export type SessionId = string;
166
+ /**
167
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
168
+ * via the `definition` "ToolCallId".
169
+ */
170
+ export type ToolCallId = string;
171
+ /**
172
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
173
+ * via the `definition` "WorkflowToolId".
174
+ */
175
+ export type WorkflowToolId = string;
176
+ /**
177
+ * Stable identity for one cross-workflow emission.
178
+ *
179
+ * Ids are deterministic digests over a domain-separated, length-prefixed
180
+ * producer/source identity. They are safe to recompute after activity retry,
181
+ * worker restart, or workflow continue-as-new.
182
+ *
183
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
184
+ * via the `definition` "EmissionId".
185
+ */
186
+ export type EmissionId = string;
187
+ /**
188
+ * Durable producer identity carried with every emission.
189
+ *
190
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
191
+ * via the `definition` "EmissionProducer".
192
+ */
193
+ export type EmissionProducer = {
194
+ kind: "session";
195
+ log_seq: number;
196
+ session_id: SessionId;
197
+ universe_id: string;
198
+ } | {
199
+ kind: "workflow";
200
+ universe_id: string;
201
+ workflow_id: string;
202
+ };
203
+ /**
204
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
205
+ * via the `definition` "TranscriptionActivityResult".
206
+ */
207
+ export type TranscriptionActivityResult = {
208
+ kind: "succeeded";
209
+ transcript_ref: string;
210
+ } | {
211
+ failure: TranscriptionFailure;
212
+ kind: "failed";
213
+ };
214
+ /**
215
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
216
+ * via the `definition` "TranscriptionFailureKind".
217
+ */
218
+ export type TranscriptionFailureKind = "invalidAudio" | "configuration" | "provider" | "timeout" | "internal";
219
+ /**
220
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
221
+ * via the `definition` "TranscriptionStatus".
222
+ */
223
+ export type TranscriptionStatus = "pending" | "running" | "succeeded" | "failed" | "cancelled" | "expired";
224
+ /**
225
+ * Envelope and start-on-call types of the fixed deliver_emission transport between sessions and receiver workflows.
226
+ */
227
+ export interface LightspeedWorkflowContract {
228
+ [k: string]: unknown;
229
+ }
230
+ /**
231
+ * One connector activity call. `idempotency_key` is the invocation id, or
232
+ * `{invocation}:chunk:{i}/{n}` for a chunk of a split send.
233
+ *
234
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
235
+ * via the `definition` "ChannelDeliveryCommand".
236
+ */
237
+ export interface ChannelDeliveryCommand {
238
+ idempotencyKey: string;
239
+ invocationId: string;
240
+ operation: ChannelDeliveryOperation;
241
+ route: ChannelRoute;
242
+ version: number;
243
+ }
244
+ /**
245
+ * The message a send replies to, for providers that quote it themselves.
246
+ *
247
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
248
+ * via the `definition` "ReplyContext".
249
+ */
250
+ export interface ReplyContext {
251
+ senderId: string;
252
+ text: string;
253
+ }
254
+ /**
255
+ * Where a delivery goes: one account's chat, optionally a thread.
256
+ *
257
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
258
+ * via the `definition` "ChannelRoute".
259
+ */
260
+ export interface ChannelRoute {
261
+ accountId: ChannelAccountId;
262
+ chatId: string;
263
+ provider: ChannelProvider;
264
+ threadId?: string | null;
265
+ }
266
+ /**
267
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
268
+ * via the `definition` "ChannelDeliveryResult".
269
+ */
270
+ export interface ChannelDeliveryResult {
271
+ /**
272
+ * Every provider id the delivery produced (a chunked send has several;
273
+ * the first is the anchor).
274
+ */
275
+ messageIds: string[];
276
+ provider: ChannelProvider;
277
+ version: number;
278
+ }
279
+ /**
280
+ * A provider-owned attachment reference; never bytes. The connector
281
+ * downloads it when the conversation workflow asks (`prepare_channel_media`).
282
+ *
283
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
284
+ * via the `definition` "ChannelInboundMedia".
285
+ */
286
+ export interface ChannelInboundMedia {
287
+ byteSize?: number | null;
288
+ /**
289
+ * Provider file handle (a Telegram file id, a sealed WhatsApp locator).
290
+ */
291
+ fileId: string;
292
+ kind: ChannelMediaKind;
293
+ mime: string;
294
+ name?: string | null;
295
+ }
296
+ /**
297
+ * Who may take a turn and who may issue control commands, by provider
298
+ * handle (Telegram user id, WhatsApp JID). Handle allowlists on the
299
+ * trigger replace any platform membership lookup.
300
+ *
301
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
302
+ * via the `definition` "ChatAccess".
303
+ */
304
+ export interface ChatAccess {
305
+ /**
306
+ * Handles allowed to take a turn when `turn` is `listed`.
307
+ */
308
+ allowed?: string[];
309
+ /**
310
+ * Handles allowed to issue `/activation` and `/status`; empty denies
311
+ * control commands to everyone.
312
+ */
313
+ controllers?: string[];
314
+ turn?: ChatTurnAccess & string;
315
+ }
316
+ /**
317
+ * When the bot acts in a conversation.
318
+ *
319
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
320
+ * via the `definition` "ChatActivation".
321
+ */
322
+ export interface ChatActivation {
323
+ group?: ChatGroupActivation | null;
324
+ mentionNames?: string[];
325
+ triggerPrefixes?: string[];
326
+ }
327
+ /**
328
+ * Durable content identity and encoding. The payload stays in CAS; consumers
329
+ * project it outside the harness rather than assuming every output is text.
330
+ *
331
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
332
+ * via the `definition` "ContentRef".
333
+ */
334
+ export interface ContentRef {
335
+ content_ref: string;
336
+ media_type?: string | null;
337
+ provider_kind?: string | null;
338
+ }
339
+ /**
340
+ * The conversation a message belongs to: one account's chat, optionally
341
+ * a thread inside it.
342
+ *
343
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
344
+ * via the `definition` "ConversationRef".
345
+ */
346
+ export interface ConversationRef {
347
+ accountId: ChannelAccountId;
348
+ chatId: string;
349
+ threadId?: string | null;
350
+ }
351
+ /**
352
+ * Secret-free durable input of one conversation workflow: the chat trigger
353
+ * it serves and the conversation it fronts. The workflow owns nothing on
354
+ * the core side: the bot controller creates and controls the session; the
355
+ * workflow is the source of the conversation's events and the receiver of
356
+ * its `message_*` tools.
357
+ *
358
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
359
+ * via the `definition` "ConversationStart".
360
+ */
361
+ export interface ConversationStart {
362
+ access: ChatAccess;
363
+ accountId: ChannelAccountId;
364
+ activation: ChatActivation;
365
+ botId: BotId;
366
+ /**
367
+ * Task queue of the connector host serving the account.
368
+ */
369
+ connectorTaskQueue: string;
370
+ conversation: ConversationRef;
371
+ /**
372
+ * Human label of the conversation (routed session label, display name).
373
+ */
374
+ label: string;
375
+ provider: ChannelProvider;
376
+ scope: ChatScope;
377
+ triggerId: BotTriggerId;
378
+ universeId: string;
379
+ }
380
+ /**
381
+ * Bounded durable record of one successful workflow-tool tool call.
382
+ *
383
+ * The model arguments remain in CAS and are referenced by `arguments_ref`.
384
+ * Receiver-specific interpretation belongs to the receiving workflow.
385
+ *
386
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
387
+ * via the `definition` "WorkflowToolInvocation".
388
+ */
389
+ export interface WorkflowToolInvocation {
390
+ arguments_ref: string;
391
+ binding_fingerprint: string;
392
+ /**
393
+ * Keyed promise set created atomically with this invocation; `None`
394
+ * for notify (`Accepted`) completion. Request/reply is the single
395
+ * reserved key `reply`.
396
+ */
397
+ completion_promises?: {
398
+ [k: string]: PromiseId;
399
+ } | null;
400
+ /**
401
+ * Opaque, runtime-supplied context for the receiving workflow. This is
402
+ * separate from model-authored arguments so runtime state can be pinned
403
+ * without changing the tool's declared argument schema.
404
+ */
405
+ execution_context_ref?: string | null;
406
+ invocation_id: WorkflowToolInvocationId;
407
+ run_id: number;
408
+ schema_revision: number;
409
+ semantic_type: string;
410
+ session_id: SessionId;
411
+ session_universe_id: string;
412
+ tool_batch_id: number;
413
+ tool_call_id: ToolCallId;
414
+ tool_id: WorkflowToolId;
415
+ turn_id: number;
416
+ }
417
+ /**
418
+ * Bounded cross-workflow fact delivered through the fixed
419
+ * `deliver_emission` signal.
420
+ *
421
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
422
+ * via the `definition` "EmissionEnvelope".
423
+ */
424
+ export interface EmissionEnvelope {
425
+ body: EmissionBody;
426
+ emission_id: EmissionId;
427
+ producer: EmissionProducer;
428
+ }
429
+ /**
430
+ * `maintain_channel_typing`: keep the provider's typing indicator up for
431
+ * the conversation until the activity is cancelled.
432
+ *
433
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
434
+ * via the `definition` "MaintainChannelTypingInput".
435
+ */
436
+ export interface MaintainChannelTypingInput {
437
+ route: ChannelRoute;
438
+ }
439
+ /**
440
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
441
+ * via the `definition` "ModelConfig".
442
+ */
443
+ export interface ModelConfig {
444
+ apiKind: string;
445
+ model: string;
446
+ providerId: string;
447
+ }
448
+ /**
449
+ * `prepare_channel_media`: the connector downloads the provider file and
450
+ * stores it in the universe's CAS.
451
+ *
452
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
453
+ * via the `definition` "PrepareChannelMediaInput".
454
+ */
455
+ export interface PrepareChannelMediaInput {
456
+ media: ChannelInboundMedia;
457
+ route: ChannelRoute;
458
+ universeId: string;
459
+ }
460
+ /**
461
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
462
+ * via the `definition` "PrepareChannelMediaResult".
463
+ */
464
+ export interface PrepareChannelMediaResult {
465
+ item: PreparedMediaItem;
466
+ }
467
+ /**
468
+ * A prepared attachment: a CAS reference, never bytes.
469
+ *
470
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
471
+ * via the `definition` "PreparedMediaItem".
472
+ */
473
+ export interface PreparedMediaItem {
474
+ blobRef: string;
475
+ kind: ChannelMediaKind;
476
+ mime: string;
477
+ name?: string | null;
478
+ }
479
+ /**
480
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
481
+ * via the `definition` "TranscriptionFailure".
482
+ */
483
+ export interface TranscriptionFailure {
484
+ kind: TranscriptionFailureKind;
485
+ message: string;
486
+ }
487
+ /**
488
+ * Immutable audio input in this universe's content store.
489
+ *
490
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
491
+ * via the `definition` "TranscriptionAudio".
492
+ */
493
+ export interface TranscriptionAudio {
494
+ blobRef: string;
495
+ mime: string;
496
+ name: string;
497
+ }
498
+ /**
499
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
500
+ * via the `definition` "TranscriptionSnapshot".
501
+ */
502
+ export interface TranscriptionSnapshot {
503
+ request: TranscriptionStartParams;
504
+ view: TranscriptionView;
505
+ }
506
+ /**
507
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
508
+ * via the `definition` "TranscriptionStartParams".
509
+ */
510
+ export interface TranscriptionStartParams {
511
+ audio: TranscriptionAudio;
512
+ /**
513
+ * Scoped to the requester. Matching retries rejoin the original job,
514
+ * including after defaults change; changed requests conflict. Identity is
515
+ * retained for the Temporal namespace's workflow-history retention period.
516
+ */
517
+ idempotencyKey: string;
518
+ language?: string | null;
519
+ model?: ModelConfig | null;
520
+ prompt?: string | null;
521
+ }
522
+ /**
523
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
524
+ * via the `definition` "TranscriptionView".
525
+ */
526
+ export interface TranscriptionView {
527
+ audio: TranscriptionAudio;
528
+ createdAtMs: number;
529
+ createdBy: Attribution;
530
+ failure?: TranscriptionFailure | null;
531
+ model: ModelConfig;
532
+ status: TranscriptionStatus;
533
+ text?: string | null;
534
+ /**
535
+ * Plain UTF-8 transcript blob, usable as ordinary textRef input.
536
+ * Unsubmitted content can be swept after the ordinary CAS grace period.
537
+ */
538
+ transcriptRef?: string | null;
539
+ transcriptionId: string;
540
+ }
541
+ /**
542
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
543
+ * via the `definition` "TranscriptionWorkflowArgs".
544
+ */
545
+ export interface TranscriptionWorkflowArgs {
546
+ createdAtMs: number;
547
+ createdBy: Attribution;
548
+ model: ModelConfig;
549
+ request: TranscriptionStartParams;
550
+ transcriptionId: string;
551
+ universeId: string;
552
+ }
553
+ /**
554
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
555
+ * via the `definition` "WorkflowToolRecipeV1".
556
+ */
557
+ export interface WorkflowToolRecipeV1 {
558
+ taskQueue: string;
559
+ workflowType: string;
560
+ }
561
+ /**
562
+ * Result shape of [`WORKFLOW_TOOL_RECOVERY_QUERY`].
563
+ *
564
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
565
+ * via the `definition` "WorkflowToolRecoveryResult".
566
+ */
567
+ export interface WorkflowToolRecoveryResult {
568
+ resolutions?: {
569
+ [k: string]: PromiseResolution;
570
+ };
571
+ }
572
+ /**
573
+ * Start arguments every start-on-call plugin workflow receives. The plugin
574
+ * resolves each keyed completion promise by emitting `SourceResolution`
575
+ * bodies to the holder workflow through the fixed `deliver_emission`
576
+ * signal, using its own execution id as the producer workflow id.
577
+ *
578
+ * This interface was referenced by `LightspeedWorkflowContract`'s JSON-Schema
579
+ * via the `definition` "WorkflowToolStartArgs".
580
+ */
581
+ export interface WorkflowToolStartArgs {
582
+ execution_id: string;
583
+ holder_workflow_id: string;
584
+ invocation: WorkflowToolInvocation;
585
+ universe_id: string;
586
+ }
587
+ //# sourceMappingURL=workflow-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-types.d.ts","sourceRoot":"","sources":["../../src/generated/workflow-types.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;CACf,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IACE,IAAI,EAAE,OAAO,CAAC;CACf,GACD;IACE,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AACN;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAC3B;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACtC;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAChC;IACE,YAAY,CAAC,E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AS,EAAE,WAAW,CAAC;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,wBAAwB,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AACD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AACD;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE;QACZ,CAAC,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;KAChC,CAAC;CACH;AACD;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,sBAAsB,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Generated by clients/typescript/scripts/generate.mjs.
3
+ * Do not edit by hand.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=workflow-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-types.js","sourceRoot":"","sources":["../../src/generated/workflow-types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,8 @@
1
+ export { LightspeedRpcError, LightspeedTransportError, lightspeedRpcErrorKind } from "./errors.js";
2
+ export type { LightspeedRpcErrorKind, JsonRpcErrorPayload } from "./errors.js";
3
+ export { LightspeedClient, generateSubmissionId, } from "./client.js";
4
+ export type { AwaitRunOptions, AwaitRunResult, CallOptions, LightspeedClientOptions, ReadEventsOptions, RequestId, RunTerminalState, StartRunOptions, } from "./client.js";
5
+ export { METHODS, METHOD_INFO, NOTIFICATIONS, rpc, } from "./generated/methods.js";
6
+ export type { Method, MethodMap, MethodParams, MethodResult, NotificationMethod, RpcCaller, } from "./generated/methods.js";
7
+ export type * from "./generated/types.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACnG,YAAY,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,eAAe,EACf,cAAc,EACd,WAAW,EACX,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,GAAG,GACJ,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,MAAM,EACN,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,SAAS,GACV,MAAM,wBAAwB,CAAC;AAChC,mBAAmB,sBAAsB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { LightspeedRpcError, LightspeedTransportError, lightspeedRpcErrorKind } from "./errors.js";
2
+ export { LightspeedClient, generateSubmissionId, } from "./client.js";
3
+ export { METHODS, METHOD_INFO, NOTIFICATIONS, rpc, } from "./generated/methods.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEnG,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAWrB,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,GAAG,GACJ,MAAM,wBAAwB,CAAC"}