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