ankka 0.10.0 → 0.12.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 (94) hide show
  1. package/README.md +1 -0
  2. package/dist/_proto/ankka/protocol/v1/agent_pb.d.ts +35 -0
  3. package/dist/_proto/ankka/protocol/v1/agent_pb.js +8 -1
  4. package/dist/_proto/ankka/protocol/v1/client_pb.d.ts +858 -2
  5. package/dist/_proto/ankka/protocol/v1/client_pb.js +184 -9
  6. package/dist/_proto/ankka/protocol/v1/consumer_pb.d.ts +10 -1
  7. package/dist/_proto/ankka/protocol/v1/consumer_pb.js +1 -1
  8. package/dist/_proto/ankka/protocol/v1/discovery_pb.d.ts +373 -0
  9. package/dist/_proto/ankka/protocol/v1/discovery_pb.js +81 -16
  10. package/dist/_proto/ankka/protocol/v1/endpoint_pb.d.ts +210 -0
  11. package/dist/_proto/ankka/protocol/v1/endpoint_pb.js +35 -5
  12. package/dist/_proto/ankka/protocol/v1/event_sourced_pb.d.ts +86 -0
  13. package/dist/_proto/ankka/protocol/v1/event_sourced_pb.js +11 -1
  14. package/dist/_proto/ankka/protocol/v1/payload_pb.d.ts +61 -0
  15. package/dist/_proto/ankka/protocol/v1/payload_pb.js +18 -1
  16. package/dist/_proto/ankka/protocol/v1/view_pb.d.ts +70 -1
  17. package/dist/_proto/ankka/protocol/v1/view_pb.js +11 -1
  18. package/dist/_proto/ankka/protocol/v1/wasm_pb.d.ts +12 -0
  19. package/dist/_proto/ankka/protocol/v1/wasm_pb.js +1 -1
  20. package/dist/_proto/ankka/protocol/v1/workflow_pb.d.ts +7 -0
  21. package/dist/_proto/ankka/protocol/v1/workflow_pb.js +1 -1
  22. package/dist/agent.d.ts +15 -1
  23. package/dist/agent.js +20 -0
  24. package/dist/approvals.d.ts +47 -0
  25. package/dist/approvals.js +57 -0
  26. package/dist/autonomous.d.ts +23 -1
  27. package/dist/autonomous.js +30 -1
  28. package/dist/client.d.ts +188 -7
  29. package/dist/client.js +490 -21
  30. package/dist/consumer.d.ts +42 -3
  31. package/dist/consumer.js +35 -1
  32. package/dist/context.d.ts +29 -1
  33. package/dist/context.js +5 -2
  34. package/dist/contract.d.ts +40 -0
  35. package/dist/contract.js +60 -0
  36. package/dist/effects/common.d.ts +7 -0
  37. package/dist/effects/common.js +9 -1
  38. package/dist/effects/eventSourced.d.ts +26 -1
  39. package/dist/effects/eventSourced.js +58 -5
  40. package/dist/effects/keyed.d.ts +33 -0
  41. package/dist/effects/keyed.js +41 -0
  42. package/dist/endpoint.d.ts +10 -1
  43. package/dist/endpoint.js +20 -0
  44. package/dist/eventSourcedEntity.d.ts +8 -3
  45. package/dist/graph.d.ts +24 -2
  46. package/dist/graph.js +27 -1
  47. package/dist/handlers.d.ts +10 -2
  48. package/dist/handlers.js +6 -2
  49. package/dist/index.d.ts +15 -6
  50. package/dist/index.js +12 -3
  51. package/dist/keyedView.d.ts +59 -0
  52. package/dist/keyedView.js +73 -0
  53. package/dist/kinds.js +2 -0
  54. package/dist/mcp.d.ts +57 -0
  55. package/dist/mcp.js +64 -0
  56. package/dist/routes.d.ts +44 -4
  57. package/dist/routes.js +43 -4
  58. package/dist/server/agent.js +12 -4
  59. package/dist/server/discovery.d.ts +17 -1
  60. package/dist/server/discovery.js +182 -1
  61. package/dist/server/eventSourced.d.ts +4 -1
  62. package/dist/server/eventSourced.js +24 -6
  63. package/dist/server/http.d.ts +2 -1
  64. package/dist/server/http.js +80 -4
  65. package/dist/server/stateless.js +42 -3
  66. package/dist/server/workflow.js +5 -1
  67. package/dist/service.d.ts +46 -2
  68. package/dist/service.js +235 -15
  69. package/dist/services.d.ts +137 -0
  70. package/dist/services.js +259 -0
  71. package/dist/socket.d.ts +15 -0
  72. package/dist/socket.js +25 -0
  73. package/dist/spec.d.ts +1 -1
  74. package/dist/spec.js +94 -15
  75. package/dist/standing.d.ts +18 -0
  76. package/dist/standing.js +26 -0
  77. package/dist/startFrom.d.ts +36 -0
  78. package/dist/startFrom.js +51 -0
  79. package/dist/testkit/index.d.ts +2 -2
  80. package/dist/testkit/index.js +1 -1
  81. package/dist/testkit/integration.js +5 -0
  82. package/dist/testkit/kinds.d.ts +50 -5
  83. package/dist/testkit/kinds.js +208 -35
  84. package/dist/testkit/unit.d.ts +41 -3
  85. package/dist/testkit/unit.js +87 -10
  86. package/dist/timedAction.d.ts +17 -2
  87. package/dist/timedAction.js +33 -1
  88. package/dist/version.d.ts +1 -1
  89. package/dist/version.js +1 -1
  90. package/dist/view.d.ts +48 -1
  91. package/dist/view.js +18 -1
  92. package/dist/workflow.d.ts +18 -1
  93. package/dist/workflow.js +39 -0
  94. package/package.json +3 -2
@@ -1,11 +1,48 @@
1
- import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
2
  import type { Empty, EmptySchema, Error, Metadata, Outcome_Reply, Payload } from "./payload_pb.ts";
3
3
  import type { Kind } from "./discovery_pb.ts";
4
- import type { Message } from "@bufbuild/protobuf";
4
+ import type { HttpRequest_Pair, HttpResponse } from "./endpoint_pb.ts";
5
+ import type { Message, UnknownEnum } from "@bufbuild/protobuf";
5
6
  /**
6
7
  * Describes the file ankka/protocol/v1/client.proto.
7
8
  */
8
9
  export declare const file_ankka_protocol_v1_client: GenFile;
10
+ /**
11
+ * 1.18: a wait for a workflow's end.
12
+ *
13
+ * @generated from message ankka.protocol.v1.AwaitEndRequest
14
+ */
15
+ export type AwaitEndRequest = Message<"ankka.protocol.v1.AwaitEndRequest"> & {
16
+ /**
17
+ * the workflow's component id
18
+ *
19
+ * @generated from field: string component_id = 1;
20
+ */
21
+ componentId: string;
22
+ /**
23
+ * the workflow id
24
+ *
25
+ * @generated from field: string entity_id = 2;
26
+ */
27
+ entityId: string;
28
+ /**
29
+ * the caller's; required, more than zero
30
+ *
31
+ * @generated from field: int64 timeout_millis = 3;
32
+ */
33
+ timeoutMillis: bigint;
34
+ /**
35
+ * the handler's, so the wait is attributed and traced
36
+ *
37
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 4;
38
+ */
39
+ metadata?: Metadata | undefined;
40
+ };
41
+ /**
42
+ * Describes the message ankka.protocol.v1.AwaitEndRequest.
43
+ * Use `create(AwaitEndRequestSchema)` to create a new message.
44
+ */
45
+ export declare const AwaitEndRequestSchema: GenMessage<AwaitEndRequest>;
9
46
  /**
10
47
  * @generated from message ankka.protocol.v1.InvokeRequest
11
48
  */
@@ -59,6 +96,14 @@ export type InvokeReply = Message<"ankka.protocol.v1.InvokeReply"> & {
59
96
  */
60
97
  value: Error;
61
98
  case: "error";
99
+ } | {
100
+ /**
101
+ * 1.11: an agent's turn waits for a person's decision
102
+ *
103
+ * @generated from field: ankka.protocol.v1.ApprovalAwaited approval = 3;
104
+ */
105
+ value: ApprovalAwaited;
106
+ case: "approval";
62
107
  } | {
63
108
  case: undefined;
64
109
  value?: undefined;
@@ -94,6 +139,30 @@ export type StreamToken = Message<"ankka.protocol.v1.StreamToken"> & {
94
139
  */
95
140
  value: Error;
96
141
  case: "failed";
142
+ } | {
143
+ /**
144
+ * 1.11: terminal, in place of completed
145
+ *
146
+ * @generated from field: ankka.protocol.v1.ApprovalAwaited approval = 4;
147
+ */
148
+ value: ApprovalAwaited;
149
+ case: "approval";
150
+ } | {
151
+ /**
152
+ * 1.18: an AwaitEndStream's wait goes on
153
+ *
154
+ * @generated from field: ankka.protocol.v1.Empty heartbeat = 5;
155
+ */
156
+ value: Empty;
157
+ case: "heartbeat";
158
+ } | {
159
+ /**
160
+ * 1.18: terminal; the workflow completed with this state
161
+ *
162
+ * @generated from field: ankka.protocol.v1.Payload ended = 6;
163
+ */
164
+ value: Payload;
165
+ case: "ended";
97
166
  } | {
98
167
  case: undefined;
99
168
  value?: undefined;
@@ -105,6 +174,109 @@ export type StreamToken = Message<"ankka.protocol.v1.StreamToken"> & {
105
174
  */
106
175
  export declare const StreamTokenSchema: GenMessage<StreamToken>;
107
176
  /**
177
+ * 1.11: the approval requests an agent's turn waits on.
178
+ *
179
+ * @generated from message ankka.protocol.v1.ApprovalAwaited
180
+ */
181
+ export type ApprovalAwaited = Message<"ankka.protocol.v1.ApprovalAwaited"> & {
182
+ /**
183
+ * @generated from field: repeated ankka.protocol.v1.ApprovalRequest requests = 1;
184
+ */
185
+ requests: ApprovalRequest[];
186
+ };
187
+ /**
188
+ * Describes the message ankka.protocol.v1.ApprovalAwaited.
189
+ * Use `create(ApprovalAwaitedSchema)` to create a new message.
190
+ */
191
+ export declare const ApprovalAwaitedSchema: GenMessage<ApprovalAwaited>;
192
+ /**
193
+ * @generated from message ankka.protocol.v1.ApprovalRequest
194
+ */
195
+ export type ApprovalRequest = Message<"ankka.protocol.v1.ApprovalRequest"> & {
196
+ /**
197
+ * @generated from field: string id = 1;
198
+ */
199
+ id: string;
200
+ /**
201
+ * @generated from field: string tool = 2;
202
+ */
203
+ tool: string;
204
+ /**
205
+ * @generated from field: string arguments_json = 3;
206
+ */
207
+ argumentsJson: string;
208
+ /**
209
+ * @generated from field: int64 requested_at_millis = 4;
210
+ */
211
+ requestedAtMillis: bigint;
212
+ /**
213
+ * @generated from field: optional int64 expires_at_millis = 5;
214
+ */
215
+ expiresAtMillis?: bigint | undefined;
216
+ };
217
+ /**
218
+ * Describes the message ankka.protocol.v1.ApprovalRequest.
219
+ * Use `create(ApprovalRequestSchema)` to create a new message.
220
+ */
221
+ export declare const ApprovalRequestSchema: GenMessage<ApprovalRequest>;
222
+ /**
223
+ * @generated from message ankka.protocol.v1.DecideRequest
224
+ */
225
+ export type DecideRequest = Message<"ankka.protocol.v1.DecideRequest"> & {
226
+ /**
227
+ * AGENT or AUTONOMOUS_AGENT
228
+ *
229
+ * @generated from field: ankka.protocol.v1.Kind kind = 1;
230
+ */
231
+ kind: Kind;
232
+ /**
233
+ * @generated from field: string component_id = 2;
234
+ */
235
+ componentId: string;
236
+ /**
237
+ * the session, or the instance
238
+ *
239
+ * @generated from field: string entity_id = 3;
240
+ */
241
+ entityId: string;
242
+ /**
243
+ * AGENT: the handler that was called, whose turn waits
244
+ *
245
+ * @generated from field: string name = 4;
246
+ */
247
+ name: string;
248
+ /**
249
+ * @generated from field: string approval_id = 5;
250
+ */
251
+ approvalId: string;
252
+ /**
253
+ * @generated from field: bool approved = 6;
254
+ */
255
+ approved: boolean;
256
+ /**
257
+ * who decided; required
258
+ *
259
+ * @generated from field: string by = 7;
260
+ */
261
+ by: string;
262
+ /**
263
+ * @generated from field: optional string note = 8;
264
+ */
265
+ note?: string | undefined;
266
+ /**
267
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 9;
268
+ */
269
+ metadata?: Metadata | undefined;
270
+ };
271
+ /**
272
+ * Describes the message ankka.protocol.v1.DecideRequest.
273
+ * Use `create(DecideRequestSchema)` to create a new message.
274
+ */
275
+ export declare const DecideRequestSchema: GenMessage<DecideRequest>;
276
+ /**
277
+ * `metadata` (1.3): what the handler asking was given, as on `InvokeRequest`.
278
+ * `name` is "get", "all", or (1.13) one of the view's declared queries, asked with `values`.
279
+ *
108
280
  * @generated from message ankka.protocol.v1.QueryRequest
109
281
  */
110
282
  export type QueryRequest = Message<"ankka.protocol.v1.QueryRequest"> & {
@@ -117,9 +289,29 @@ export type QueryRequest = Message<"ankka.protocol.v1.QueryRequest"> & {
117
289
  */
118
290
  name: string;
119
291
  /**
292
+ * the key, for "get"
293
+ *
120
294
  * @generated from field: ankka.protocol.v1.Payload payload = 3;
121
295
  */
122
296
  payload?: Payload | undefined;
297
+ /**
298
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 4;
299
+ */
300
+ metadata?: Metadata | undefined;
301
+ /**
302
+ * 1.13: a declared query's values
303
+ *
304
+ * @generated from field: map<string, string> values = 5;
305
+ */
306
+ values: {
307
+ [key: string]: string;
308
+ };
309
+ /**
310
+ * 1.13: the most rows to read. Absent: 1000
311
+ *
312
+ * @generated from field: optional uint32 limit = 6;
313
+ */
314
+ limit?: number | undefined;
123
315
  };
124
316
  /**
125
317
  * Describes the message ankka.protocol.v1.QueryRequest.
@@ -155,6 +347,181 @@ export type QueryReply = Message<"ankka.protocol.v1.QueryReply"> & {
155
347
  * Use `create(QueryReplySchema)` to create a new message.
156
348
  */
157
349
  export declare const QueryReplySchema: GenMessage<QueryReply>;
350
+ /**
351
+ * 1.17. One element of a row stream or a watch. `QueryStream` honours `QueryRequest`'s `name`, `values`
352
+ * and `limit`, and gives every row when `limit` is absent.
353
+ *
354
+ * @generated from message ankka.protocol.v1.RowFrame
355
+ */
356
+ export type RowFrame = Message<"ankka.protocol.v1.RowFrame"> & {
357
+ /**
358
+ * @generated from oneof ankka.protocol.v1.RowFrame.frame
359
+ */
360
+ frame: {
361
+ /**
362
+ * @generated from field: ankka.protocol.v1.WatchedRow row = 1;
363
+ */
364
+ value: WatchedRow;
365
+ case: "row";
366
+ } | {
367
+ /**
368
+ * @generated from field: ankka.protocol.v1.Removed removed = 2;
369
+ */
370
+ value: Removed;
371
+ case: "removed";
372
+ } | {
373
+ /**
374
+ * @generated from field: ankka.protocol.v1.Empty caught_up = 3;
375
+ */
376
+ value: Empty;
377
+ case: "caughtUp";
378
+ } | {
379
+ /**
380
+ * @generated from field: ankka.protocol.v1.Ended ended = 4;
381
+ */
382
+ value: Ended;
383
+ case: "ended";
384
+ } | {
385
+ /**
386
+ * @generated from field: ankka.protocol.v1.Error failed = 5;
387
+ */
388
+ value: Error;
389
+ case: "failed";
390
+ } | {
391
+ case: undefined;
392
+ value?: undefined;
393
+ };
394
+ };
395
+ /**
396
+ * Describes the message ankka.protocol.v1.RowFrame.
397
+ * Use `create(RowFrameSchema)` to create a new message.
398
+ */
399
+ export declare const RowFrameSchema: GenMessage<RowFrame>;
400
+ /**
401
+ * The row under `key`, as stored: the process's own JSON under its row manifest.
402
+ *
403
+ * @generated from message ankka.protocol.v1.WatchedRow
404
+ */
405
+ export type WatchedRow = Message<"ankka.protocol.v1.WatchedRow"> & {
406
+ /**
407
+ * @generated from field: string key = 1;
408
+ */
409
+ key: string;
410
+ /**
411
+ * @generated from field: ankka.protocol.v1.Payload payload = 2;
412
+ */
413
+ payload?: Payload | undefined;
414
+ };
415
+ /**
416
+ * Describes the message ankka.protocol.v1.WatchedRow.
417
+ * Use `create(WatchedRowSchema)` to create a new message.
418
+ */
419
+ export declare const WatchedRowSchema: GenMessage<WatchedRow>;
420
+ /**
421
+ * The row under `key`, given earlier, no longer matches or was deleted.
422
+ *
423
+ * @generated from message ankka.protocol.v1.Removed
424
+ */
425
+ export type Removed = Message<"ankka.protocol.v1.Removed"> & {
426
+ /**
427
+ * @generated from field: string key = 1;
428
+ */
429
+ key: string;
430
+ };
431
+ /**
432
+ * Describes the message ankka.protocol.v1.Removed.
433
+ * Use `create(RemovedSchema)` to create a new message.
434
+ */
435
+ export declare const RemovedSchema: GenMessage<Removed>;
436
+ /**
437
+ * Why a watch ended: "rebuilt", "instance-stopping", "listener-lost" or "unread".
438
+ *
439
+ * @generated from message ankka.protocol.v1.Ended
440
+ */
441
+ export type Ended = Message<"ankka.protocol.v1.Ended"> & {
442
+ /**
443
+ * @generated from field: string reason = 1;
444
+ */
445
+ reason: string;
446
+ };
447
+ /**
448
+ * Describes the message ankka.protocol.v1.Ended.
449
+ * Use `create(EndedSchema)` to create a new message.
450
+ */
451
+ export declare const EndedSchema: GenMessage<Ended>;
452
+ /**
453
+ * 1.17. A watch of a declared query, declared watched, with its values, or of one row by its key.
454
+ *
455
+ * @generated from message ankka.protocol.v1.WatchRequest
456
+ */
457
+ export type WatchRequest = Message<"ankka.protocol.v1.WatchRequest"> & {
458
+ /**
459
+ * @generated from field: string view_id = 1;
460
+ */
461
+ viewId: string;
462
+ /**
463
+ * what the handler asking was given
464
+ *
465
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 2;
466
+ */
467
+ metadata?: Metadata | undefined;
468
+ /**
469
+ * @generated from oneof ankka.protocol.v1.WatchRequest.target
470
+ */
471
+ target: {
472
+ /**
473
+ * @generated from field: ankka.protocol.v1.Named named = 3;
474
+ */
475
+ value: Named;
476
+ case: "named";
477
+ } | {
478
+ /**
479
+ * @generated from field: string key = 4;
480
+ */
481
+ value: string;
482
+ case: "key";
483
+ } | {
484
+ case: undefined;
485
+ value?: undefined;
486
+ };
487
+ /**
488
+ * the unread rows held, one per key. Absent: the runtime's bound
489
+ *
490
+ * @generated from field: optional uint32 unread_bound = 5;
491
+ */
492
+ unreadBound?: number | undefined;
493
+ /**
494
+ * past the bound. Absent: DROP_HEAD
495
+ *
496
+ * @generated from field: ankka.protocol.v1.Overflow overflow = 6;
497
+ */
498
+ overflow: Overflow;
499
+ };
500
+ /**
501
+ * Describes the message ankka.protocol.v1.WatchRequest.
502
+ * Use `create(WatchRequestSchema)` to create a new message.
503
+ */
504
+ export declare const WatchRequestSchema: GenMessage<WatchRequest>;
505
+ /**
506
+ * @generated from message ankka.protocol.v1.Named
507
+ */
508
+ export type Named = Message<"ankka.protocol.v1.Named"> & {
509
+ /**
510
+ * @generated from field: string name = 1;
511
+ */
512
+ name: string;
513
+ /**
514
+ * @generated from field: map<string, string> values = 2;
515
+ */
516
+ values: {
517
+ [key: string]: string;
518
+ };
519
+ };
520
+ /**
521
+ * Describes the message ankka.protocol.v1.Named.
522
+ * Use `create(NamedSchema)` to create a new message.
523
+ */
524
+ export declare const NamedSchema: GenMessage<Named>;
158
525
  /**
159
526
  * @generated from message ankka.protocol.v1.ScheduleRequest
160
527
  */
@@ -207,6 +574,383 @@ export type CancelRequest = Message<"ankka.protocol.v1.CancelRequest"> & {
207
574
  * Use `create(CancelRequestSchema)` to create a new message.
208
575
  */
209
576
  export declare const CancelRequestSchema: GenMessage<CancelRequest>;
577
+ /**
578
+ * Both a delay and a period are given. There is no `kind` and no `entity_id`: a timer's target is a
579
+ * handler of a timed action. Scheduling again under a `timer_id` that already holds a recurring
580
+ * timer for the same `component_id`, `name` and `period_millis` keeps its next due and takes the
581
+ * payload, and `delay_millis` is not used; anything else under the id replaces it.
582
+ *
583
+ * @generated from message ankka.protocol.v1.ScheduleRecurringRequest
584
+ */
585
+ export type ScheduleRecurringRequest = Message<"ankka.protocol.v1.ScheduleRecurringRequest"> & {
586
+ /**
587
+ * @generated from field: string timer_id = 1;
588
+ */
589
+ timerId: string;
590
+ /**
591
+ * from now to the first due; 0 or less is due at once
592
+ *
593
+ * @generated from field: int64 delay_millis = 2;
594
+ */
595
+ delayMillis: bigint;
596
+ /**
597
+ * from each due to the next; from 1 to 36,500 days' worth
598
+ *
599
+ * @generated from field: int64 period_millis = 3;
600
+ */
601
+ periodMillis: bigint;
602
+ /**
603
+ * a timed action
604
+ *
605
+ * @generated from field: string component_id = 4;
606
+ */
607
+ componentId: string;
608
+ /**
609
+ * one of its handlers
610
+ *
611
+ * @generated from field: string name = 5;
612
+ */
613
+ name: string;
614
+ /**
615
+ * @generated from field: ankka.protocol.v1.Payload payload = 6;
616
+ */
617
+ payload?: Payload | undefined;
618
+ };
619
+ /**
620
+ * Describes the message ankka.protocol.v1.ScheduleRecurringRequest.
621
+ * Use `create(ScheduleRecurringRequestSchema)` to create a new message.
622
+ */
623
+ export declare const ScheduleRecurringRequestSchema: GenMessage<ScheduleRecurringRequest>;
624
+ /**
625
+ * @generated from message ankka.protocol.v1.ScheduleRecurringReply
626
+ */
627
+ export type ScheduleRecurringReply = Message<"ankka.protocol.v1.ScheduleRecurringReply"> & {
628
+ /**
629
+ * @generated from field: ankka.protocol.v1.Error error = 1;
630
+ */
631
+ error?: Error | undefined;
632
+ };
633
+ /**
634
+ * Describes the message ankka.protocol.v1.ScheduleRecurringReply.
635
+ * Use `create(ScheduleRecurringReplySchema)` to create a new message.
636
+ */
637
+ export declare const ScheduleRecurringReplySchema: GenMessage<ScheduleRecurringReply>;
638
+ /**
639
+ * @generated from message ankka.protocol.v1.GetSecretRequest
640
+ */
641
+ export type GetSecretRequest = Message<"ankka.protocol.v1.GetSecretRequest"> & {
642
+ /**
643
+ * @generated from field: string name = 1;
644
+ */
645
+ name: string;
646
+ };
647
+ /**
648
+ * Describes the message ankka.protocol.v1.GetSecretRequest.
649
+ * Use `create(GetSecretRequestSchema)` to create a new message.
650
+ */
651
+ export declare const GetSecretRequestSchema: GenMessage<GetSecretRequest>;
652
+ /**
653
+ * Exactly one case is set. A reply with none is a fault, never "absent".
654
+ *
655
+ * @generated from message ankka.protocol.v1.GetSecretReply
656
+ */
657
+ export type GetSecretReply = Message<"ankka.protocol.v1.GetSecretReply"> & {
658
+ /**
659
+ * @generated from oneof ankka.protocol.v1.GetSecretReply.result
660
+ */
661
+ result: {
662
+ /**
663
+ * the secret; never empty
664
+ *
665
+ * @generated from field: string value = 1;
666
+ */
667
+ value: string;
668
+ case: "value";
669
+ } | {
670
+ /**
671
+ * nothing is kept under the name
672
+ *
673
+ * @generated from field: ankka.protocol.v1.Empty absent = 2;
674
+ */
675
+ value: Empty;
676
+ case: "absent";
677
+ } | {
678
+ /**
679
+ * @generated from field: ankka.protocol.v1.Error error = 3;
680
+ */
681
+ value: Error;
682
+ case: "error";
683
+ } | {
684
+ case: undefined;
685
+ value?: undefined;
686
+ };
687
+ };
688
+ /**
689
+ * Describes the message ankka.protocol.v1.GetSecretReply.
690
+ * Use `create(GetSecretReplySchema)` to create a new message.
691
+ */
692
+ export declare const GetSecretReplySchema: GenMessage<GetSecretReply>;
693
+ /**
694
+ * @generated from message ankka.protocol.v1.PutSecretRequest
695
+ */
696
+ export type PutSecretRequest = Message<"ankka.protocol.v1.PutSecretRequest"> & {
697
+ /**
698
+ * @generated from field: string name = 1;
699
+ */
700
+ name: string;
701
+ /**
702
+ * @generated from field: string value = 2;
703
+ */
704
+ value: string;
705
+ };
706
+ /**
707
+ * Describes the message ankka.protocol.v1.PutSecretRequest.
708
+ * Use `create(PutSecretRequestSchema)` to create a new message.
709
+ */
710
+ export declare const PutSecretRequestSchema: GenMessage<PutSecretRequest>;
711
+ /**
712
+ * @generated from message ankka.protocol.v1.PutSecretReply
713
+ */
714
+ export type PutSecretReply = Message<"ankka.protocol.v1.PutSecretReply"> & {
715
+ /**
716
+ * @generated from field: ankka.protocol.v1.Error error = 1;
717
+ */
718
+ error?: Error | undefined;
719
+ };
720
+ /**
721
+ * Describes the message ankka.protocol.v1.PutSecretReply.
722
+ * Use `create(PutSecretReplySchema)` to create a new message.
723
+ */
724
+ export declare const PutSecretReplySchema: GenMessage<PutSecretReply>;
725
+ /**
726
+ * @generated from message ankka.protocol.v1.DeleteSecretRequest
727
+ */
728
+ export type DeleteSecretRequest = Message<"ankka.protocol.v1.DeleteSecretRequest"> & {
729
+ /**
730
+ * @generated from field: string name = 1;
731
+ */
732
+ name: string;
733
+ };
734
+ /**
735
+ * Describes the message ankka.protocol.v1.DeleteSecretRequest.
736
+ * Use `create(DeleteSecretRequestSchema)` to create a new message.
737
+ */
738
+ export declare const DeleteSecretRequestSchema: GenMessage<DeleteSecretRequest>;
739
+ /**
740
+ * @generated from message ankka.protocol.v1.DeleteSecretReply
741
+ */
742
+ export type DeleteSecretReply = Message<"ankka.protocol.v1.DeleteSecretReply"> & {
743
+ /**
744
+ * @generated from field: ankka.protocol.v1.Error error = 1;
745
+ */
746
+ error?: Error | undefined;
747
+ };
748
+ /**
749
+ * Describes the message ankka.protocol.v1.DeleteSecretReply.
750
+ * Use `create(DeleteSecretReplySchema)` to create a new message.
751
+ */
752
+ export declare const DeleteSecretReplySchema: GenMessage<DeleteSecretReply>;
753
+ /**
754
+ * A request to another service, by name: never an address, a host or a port.
755
+ *
756
+ * @generated from message ankka.protocol.v1.ServiceRequest
757
+ */
758
+ export type ServiceRequest = Message<"ankka.protocol.v1.ServiceRequest"> & {
759
+ /**
760
+ * the service's name
761
+ *
762
+ * @generated from field: string service = 1;
763
+ */
764
+ service: string;
765
+ /**
766
+ * absent: this service's own project
767
+ *
768
+ * @generated from field: optional string project = 2;
769
+ */
770
+ project?: string | undefined;
771
+ /**
772
+ * "GET", "POST", …
773
+ *
774
+ * @generated from field: string method = 3;
775
+ */
776
+ method: string;
777
+ /**
778
+ * starts with "/"; the query is part of it
779
+ *
780
+ * @generated from field: string path = 4;
781
+ */
782
+ path: string;
783
+ /**
784
+ * in order; the platform's own are removed
785
+ *
786
+ * @generated from field: repeated ankka.protocol.v1.HttpRequest.Pair headers = 5;
787
+ */
788
+ headers: HttpRequest_Pair[];
789
+ /**
790
+ * @generated from field: optional string content_type = 6;
791
+ */
792
+ contentType?: string | undefined;
793
+ /**
794
+ * absent: no body
795
+ *
796
+ * @generated from field: optional bytes body = 7;
797
+ */
798
+ body?: Uint8Array | undefined;
799
+ /**
800
+ * what the handler asking was given
801
+ *
802
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 8;
803
+ */
804
+ metadata?: Metadata | undefined;
805
+ };
806
+ /**
807
+ * Describes the message ankka.protocol.v1.ServiceRequest.
808
+ * Use `create(ServiceRequestSchema)` to create a new message.
809
+ */
810
+ export declare const ServiceRequestSchema: GenMessage<ServiceRequest>;
811
+ /**
812
+ * Exactly one case is set. A reply with none is a fault.
813
+ *
814
+ * @generated from message ankka.protocol.v1.ServiceReply
815
+ */
816
+ export type ServiceReply = Message<"ankka.protocol.v1.ServiceReply"> & {
817
+ /**
818
+ * @generated from oneof ankka.protocol.v1.ServiceReply.result
819
+ */
820
+ result: {
821
+ /**
822
+ * the service answered, whatever its status
823
+ *
824
+ * @generated from field: ankka.protocol.v1.HttpResponse response = 1;
825
+ */
826
+ value: HttpResponse;
827
+ case: "response";
828
+ } | {
829
+ /**
830
+ * no answer came from the service
831
+ *
832
+ * @generated from field: ankka.protocol.v1.ServiceFailure failure = 2;
833
+ */
834
+ value: ServiceFailure;
835
+ case: "failure";
836
+ } | {
837
+ /**
838
+ * the runtime refused to make the call
839
+ *
840
+ * @generated from field: ankka.protocol.v1.Error error = 3;
841
+ */
842
+ value: Error;
843
+ case: "error";
844
+ } | {
845
+ case: undefined;
846
+ value?: undefined;
847
+ };
848
+ };
849
+ /**
850
+ * Describes the message ankka.protocol.v1.ServiceReply.
851
+ * Use `create(ServiceReplySchema)` to create a new message.
852
+ */
853
+ export declare const ServiceReplySchema: GenMessage<ServiceReply>;
854
+ /**
855
+ * @generated from message ankka.protocol.v1.ServiceFailure
856
+ */
857
+ export type ServiceFailure = Message<"ankka.protocol.v1.ServiceFailure"> & {
858
+ /**
859
+ * @generated from field: ankka.protocol.v1.ServiceFailure.Reason reason = 1;
860
+ */
861
+ reason: ServiceFailure_Reason;
862
+ /**
863
+ * what was tried, for the developer
864
+ *
865
+ * @generated from field: string detail = 2;
866
+ */
867
+ detail: string;
868
+ };
869
+ /**
870
+ * Describes the message ankka.protocol.v1.ServiceFailure.
871
+ * Use `create(ServiceFailureSchema)` to create a new message.
872
+ */
873
+ export declare const ServiceFailureSchema: GenMessage<ServiceFailure>;
874
+ /**
875
+ * UNANSWERED is zero on purpose: a reason a reader does not know reads as zero, and "no answer"
876
+ * is the reading of an unknown failure that never sends anything twice.
877
+ *
878
+ * @generated from enum ankka.protocol.v1.ServiceFailure.Reason
879
+ */
880
+ export declare const ServiceFailure_Reason: {
881
+ /**
882
+ * refused connection, broken, or no answer in time
883
+ *
884
+ * @generated from enum value: UNANSWERED = 0;
885
+ */
886
+ readonly UNANSWERED: 0;
887
+ /**
888
+ * no such service was found; nothing was sent
889
+ *
890
+ * @generated from enum value: UNRESOLVABLE = 1;
891
+ */
892
+ readonly UNRESOLVABLE: 1;
893
+ /**
894
+ * what answered is not the service; nothing was sent
895
+ *
896
+ * @generated from enum value: IDENTITY_MISMATCH = 2;
897
+ */
898
+ readonly IDENTITY_MISMATCH: 2;
899
+ };
900
+ /**
901
+ * UNANSWERED is zero on purpose: a reason a reader does not know reads as zero, and "no answer"
902
+ * is the reading of an unknown failure that never sends anything twice.
903
+ *
904
+ * @generated from enum ankka.protocol.v1.ServiceFailure.Reason
905
+ */
906
+ export type ServiceFailure_Reason = (typeof ServiceFailure_Reason)[keyof typeof ServiceFailure_Reason] | UnknownEnum;
907
+ /**
908
+ * Describes the enum ankka.protocol.v1.ServiceFailure.Reason.
909
+ */
910
+ export declare const ServiceFailure_ReasonSchema: GenEnum<ServiceFailure_Reason>;
911
+ /**
912
+ * @generated from enum ankka.protocol.v1.Overflow
913
+ */
914
+ export declare const Overflow: {
915
+ /**
916
+ * drop the row changed longest ago
917
+ *
918
+ * @generated from enum value: DROP_HEAD = 0;
919
+ */
920
+ readonly DROP_HEAD: 0;
921
+ /**
922
+ * drop the row changed most recently
923
+ *
924
+ * @generated from enum value: DROP_TAIL = 1;
925
+ */
926
+ readonly DROP_TAIL: 1;
927
+ /**
928
+ * drop the row that arrived
929
+ *
930
+ * @generated from enum value: DROP_NEW = 2;
931
+ */
932
+ readonly DROP_NEW: 2;
933
+ /**
934
+ * drop every unread row
935
+ *
936
+ * @generated from enum value: DROP_ALL = 3;
937
+ */
938
+ readonly DROP_ALL: 3;
939
+ /**
940
+ * end the watch "unread"
941
+ *
942
+ * @generated from enum value: FAIL = 4;
943
+ */
944
+ readonly FAIL: 4;
945
+ };
946
+ /**
947
+ * @generated from enum ankka.protocol.v1.Overflow
948
+ */
949
+ export type Overflow = (typeof Overflow)[keyof typeof Overflow] | UnknownEnum;
950
+ /**
951
+ * Describes the enum ankka.protocol.v1.Overflow.
952
+ */
953
+ export declare const OverflowSchema: GenEnum<Overflow>;
210
954
  /**
211
955
  * @generated from service ankka.protocol.v1.Client
212
956
  */
@@ -251,4 +995,116 @@ export declare const Client: GenService<{
251
995
  input: typeof CancelRequestSchema;
252
996
  output: typeof EmptySchema;
253
997
  };
998
+ /**
999
+ * The service's secret store (protocol 1.6): named text values the runtime keeps in the
1000
+ * service's own database, encrypted with a key only the runtime holds. A refusal or a fault is
1001
+ * an Error in the reply, never a gRPC status, so that a module's import can carry it the same way.
1002
+ *
1003
+ * @generated from rpc ankka.protocol.v1.Client.GetSecret
1004
+ */
1005
+ getSecret: {
1006
+ methodKind: "unary";
1007
+ input: typeof GetSecretRequestSchema;
1008
+ output: typeof GetSecretReplySchema;
1009
+ };
1010
+ /**
1011
+ * @generated from rpc ankka.protocol.v1.Client.PutSecret
1012
+ */
1013
+ putSecret: {
1014
+ methodKind: "unary";
1015
+ input: typeof PutSecretRequestSchema;
1016
+ output: typeof PutSecretReplySchema;
1017
+ };
1018
+ /**
1019
+ * @generated from rpc ankka.protocol.v1.Client.DeleteSecret
1020
+ */
1021
+ deleteSecret: {
1022
+ methodKind: "unary";
1023
+ input: typeof DeleteSecretRequestSchema;
1024
+ output: typeof DeleteSecretReplySchema;
1025
+ };
1026
+ /**
1027
+ * A call to another service, made by the runtime as this service (protocol 1.8). The runtime
1028
+ * resolves the service, presents this service's certificate and checks the other's; the process
1029
+ * never holds a key. A refusal or a fault is in the reply, never a gRPC status, so that a
1030
+ * module's import can carry it the same way.
1031
+ *
1032
+ * @generated from rpc ankka.protocol.v1.Client.Request
1033
+ */
1034
+ request: {
1035
+ methodKind: "unary";
1036
+ input: typeof ServiceRequestSchema;
1037
+ output: typeof ServiceReplySchema;
1038
+ };
1039
+ /**
1040
+ * A decision on an approval request (protocol 1.11): an agent's, answered as the handler that
1041
+ * waited would have been — the answer, or requests still or newly awaiting — or an autonomous
1042
+ * agent's, answered once it is recorded. A refusal is an Error in the reply.
1043
+ *
1044
+ * @generated from rpc ankka.protocol.v1.Client.Decide
1045
+ */
1046
+ decide: {
1047
+ methodKind: "unary";
1048
+ input: typeof DecideRequestSchema;
1049
+ output: typeof InvokeReplySchema;
1050
+ };
1051
+ /**
1052
+ * A recurring timer (protocol 1.12): first due after the delay, then once every period, each due the
1053
+ * one before plus the period, until it is cancelled or replaced. `Cancel` cancels one. A runtime
1054
+ * older than 1.12 answers UNIMPLEMENTED, so a timer meant to recur is never scheduled as one that
1055
+ * fires once. A refusal is an Error in the reply, as for the secret store.
1056
+ *
1057
+ * @generated from rpc ankka.protocol.v1.Client.ScheduleRecurring
1058
+ */
1059
+ scheduleRecurring: {
1060
+ methodKind: "unary";
1061
+ input: typeof ScheduleRecurringRequestSchema;
1062
+ output: typeof ScheduleRecurringReplySchema;
1063
+ };
1064
+ /**
1065
+ * A view's query answered as a stream of rows, and a watch of a declared query declared watched or
1066
+ * of one row (protocol 1.17). A stream gives `row` frames and completes, or `failed`; a watch gives
1067
+ * the rows now, `caught_up` once, then `row` and `removed` as the view writes, and `ended` or
1068
+ * `failed` before it completes. A runtime older than 1.17 answers UNIMPLEMENTED.
1069
+ *
1070
+ * @generated from rpc ankka.protocol.v1.Client.QueryStream
1071
+ */
1072
+ queryStream: {
1073
+ methodKind: "server_streaming";
1074
+ input: typeof QueryRequestSchema;
1075
+ output: typeof RowFrameSchema;
1076
+ };
1077
+ /**
1078
+ * @generated from rpc ankka.protocol.v1.Client.Watch
1079
+ */
1080
+ watch: {
1081
+ methodKind: "server_streaming";
1082
+ input: typeof WatchRequestSchema;
1083
+ output: typeof RowFrameSchema;
1084
+ };
1085
+ /**
1086
+ * Waits for a workflow's end and answers it (protocol 1.18): the final state as a reply, or an
1087
+ * Error whose code is WORKFLOW_FAILED with the step and the reason in details, or TIMEOUT when
1088
+ * timeout_millis passed first and the workflow runs on. A runtime older than 1.18 answers
1089
+ * UNIMPLEMENTED, and the SDK says which protocol waiting needs.
1090
+ *
1091
+ * @generated from rpc ankka.protocol.v1.Client.AwaitEnd
1092
+ */
1093
+ awaitEnd: {
1094
+ methodKind: "unary";
1095
+ input: typeof AwaitEndRequestSchema;
1096
+ output: typeof InvokeReplySchema;
1097
+ };
1098
+ /**
1099
+ * The same wait as a stream (protocol 1.18): a heartbeat token while it waits, then one ended or
1100
+ * failed token, then the stream completes. For an endpoint serving the wait as server-sent
1101
+ * events past the runtime's idle timeout. Cancelling the stream ends the wait, not the workflow.
1102
+ *
1103
+ * @generated from rpc ankka.protocol.v1.Client.AwaitEndStream
1104
+ */
1105
+ awaitEndStream: {
1106
+ methodKind: "server_streaming";
1107
+ input: typeof AwaitEndRequestSchema;
1108
+ output: typeof StreamTokenSchema;
1109
+ };
254
1110
  }>;