ankka 0.9.1 → 0.11.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 (78) hide show
  1. package/dist/_proto/ankka/protocol/v1/agent_pb.d.ts +35 -0
  2. package/dist/_proto/ankka/protocol/v1/agent_pb.js +8 -1
  3. package/dist/_proto/ankka/protocol/v1/client_pb.d.ts +542 -2
  4. package/dist/_proto/ankka/protocol/v1/client_pb.js +107 -6
  5. package/dist/_proto/ankka/protocol/v1/consumer_pb.d.ts +52 -1
  6. package/dist/_proto/ankka/protocol/v1/consumer_pb.js +11 -1
  7. package/dist/_proto/ankka/protocol/v1/discovery_pb.d.ts +330 -0
  8. package/dist/_proto/ankka/protocol/v1/discovery_pb.js +81 -16
  9. package/dist/_proto/ankka/protocol/v1/endpoint_pb.d.ts +184 -0
  10. package/dist/_proto/ankka/protocol/v1/endpoint_pb.js +26 -1
  11. package/dist/_proto/ankka/protocol/v1/view_pb.d.ts +63 -0
  12. package/dist/_proto/ankka/protocol/v1/view_pb.js +11 -1
  13. package/dist/_proto/ankka/protocol/v1/workflow_pb.d.ts +7 -0
  14. package/dist/_proto/ankka/protocol/v1/workflow_pb.js +1 -1
  15. package/dist/agent.d.ts +15 -1
  16. package/dist/agent.js +20 -0
  17. package/dist/approvals.d.ts +47 -0
  18. package/dist/approvals.js +57 -0
  19. package/dist/autonomous.d.ts +23 -1
  20. package/dist/autonomous.js +30 -1
  21. package/dist/client.d.ts +92 -4
  22. package/dist/client.js +262 -15
  23. package/dist/consumer.d.ts +40 -2
  24. package/dist/consumer.js +50 -0
  25. package/dist/context.d.ts +4 -0
  26. package/dist/contract.d.ts +36 -0
  27. package/dist/contract.js +58 -0
  28. package/dist/effects/keyed.d.ts +33 -0
  29. package/dist/effects/keyed.js +41 -0
  30. package/dist/effects/stateless.d.ts +21 -0
  31. package/dist/effects/stateless.js +19 -0
  32. package/dist/endpoint.d.ts +10 -1
  33. package/dist/endpoint.js +20 -0
  34. package/dist/graph.d.ts +171 -0
  35. package/dist/graph.js +446 -0
  36. package/dist/handlers.d.ts +10 -2
  37. package/dist/handlers.js +6 -2
  38. package/dist/index.d.ts +15 -6
  39. package/dist/index.js +13 -4
  40. package/dist/keyedView.d.ts +56 -0
  41. package/dist/keyedView.js +67 -0
  42. package/dist/mcp.d.ts +57 -0
  43. package/dist/mcp.js +64 -0
  44. package/dist/routes.d.ts +23 -3
  45. package/dist/routes.js +16 -3
  46. package/dist/server/agent.js +12 -4
  47. package/dist/server/discovery.d.ts +12 -1
  48. package/dist/server/discovery.js +95 -1
  49. package/dist/server/http.d.ts +2 -1
  50. package/dist/server/http.js +78 -4
  51. package/dist/server/stateless.js +104 -16
  52. package/dist/server/workflow.js +5 -1
  53. package/dist/service.d.ts +45 -3
  54. package/dist/service.js +234 -12
  55. package/dist/services.d.ts +137 -0
  56. package/dist/services.js +259 -0
  57. package/dist/socket.d.ts +15 -0
  58. package/dist/socket.js +25 -0
  59. package/dist/spec.d.ts +1 -1
  60. package/dist/spec.js +87 -14
  61. package/dist/startFrom.d.ts +32 -0
  62. package/dist/startFrom.js +44 -0
  63. package/dist/testkit/index.d.ts +2 -2
  64. package/dist/testkit/index.js +1 -1
  65. package/dist/testkit/integration.js +5 -0
  66. package/dist/testkit/kinds.d.ts +75 -5
  67. package/dist/testkit/kinds.js +264 -34
  68. package/dist/testkit/unit.d.ts +14 -1
  69. package/dist/testkit/unit.js +40 -3
  70. package/dist/timedAction.d.ts +17 -2
  71. package/dist/timedAction.js +33 -1
  72. package/dist/version.d.ts +1 -1
  73. package/dist/version.js +1 -1
  74. package/dist/view.d.ts +32 -0
  75. package/dist/view.js +8 -0
  76. package/dist/workflow.d.ts +18 -1
  77. package/dist/workflow.js +39 -0
  78. package/package.json +3 -2
@@ -185,6 +185,9 @@ export type AgentPlan_Memory = (typeof AgentPlan_Memory)[keyof typeof AgentPlan_
185
185
  */
186
186
  export declare const AgentPlan_MemorySchema: GenEnum<AgentPlan_Memory>;
187
187
  /**
188
+ * `metadata` (1.3): the trace the tool runs in and the agent's handler as the caller of whatever
189
+ * the tool calls, for the process to forward on those calls.
190
+ *
188
191
  * @generated from message ankka.protocol.v1.ToolRequest
189
192
  */
190
193
  export type ToolRequest = Message<"ankka.protocol.v1.ToolRequest"> & {
@@ -204,6 +207,10 @@ export type ToolRequest = Message<"ankka.protocol.v1.ToolRequest"> & {
204
207
  * @generated from field: string arguments_json = 4;
205
208
  */
206
209
  argumentsJson: string;
210
+ /**
211
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 5;
212
+ */
213
+ metadata?: Metadata | undefined;
207
214
  };
208
215
  /**
209
216
  * Describes the message ankka.protocol.v1.ToolRequest.
@@ -263,6 +270,18 @@ export type GuardrailRequest = Message<"ankka.protocol.v1.GuardrailRequest"> & {
263
270
  * @generated from field: string text = 5;
264
271
  */
265
272
  text: string;
273
+ /**
274
+ * protocol 1.3: the trace, and the handler whose call this check is
275
+ *
276
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 6;
277
+ */
278
+ metadata?: Metadata | undefined;
279
+ /**
280
+ * protocol 1.11: with RESULT, the MCP tool whose result this is
281
+ *
282
+ * @generated from field: optional string tool = 7;
283
+ */
284
+ tool?: string | undefined;
266
285
  };
267
286
  /**
268
287
  * Describes the message ankka.protocol.v1.GuardrailRequest.
@@ -270,6 +289,9 @@ export type GuardrailRequest = Message<"ankka.protocol.v1.GuardrailRequest"> & {
270
289
  */
271
290
  export declare const GuardrailRequestSchema: GenMessage<GuardrailRequest>;
272
291
  /**
292
+ * RESULT (1.11): what an MCP server's tool answered, checked by a result guardrail before the
293
+ * model is told it.
294
+ *
273
295
  * @generated from enum ankka.protocol.v1.GuardrailRequest.Stage
274
296
  */
275
297
  export declare const GuardrailRequest_Stage: {
@@ -281,8 +303,15 @@ export declare const GuardrailRequest_Stage: {
281
303
  * @generated from enum value: OUTPUT = 1;
282
304
  */
283
305
  readonly OUTPUT: 1;
306
+ /**
307
+ * @generated from enum value: RESULT = 2;
308
+ */
309
+ readonly RESULT: 2;
284
310
  };
285
311
  /**
312
+ * RESULT (1.11): what an MCP server's tool answered, checked by a result guardrail before the
313
+ * model is told it.
314
+ *
286
315
  * @generated from enum ankka.protocol.v1.GuardrailRequest.Stage
287
316
  */
288
317
  export type GuardrailRequest_Stage = (typeof GuardrailRequest_Stage)[keyof typeof GuardrailRequest_Stage] | UnknownEnum;
@@ -345,6 +374,12 @@ export type TaskResultRequest = Message<"ankka.protocol.v1.TaskResultRequest"> &
345
374
  * @generated from field: string result_json = 4;
346
375
  */
347
376
  resultJson: string;
377
+ /**
378
+ * protocol 1.3: the trace, and the handler whose call this check is
379
+ *
380
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 5;
381
+ */
382
+ metadata?: Metadata | undefined;
348
383
  };
349
384
  /**
350
385
  * Describes the message ankka.protocol.v1.TaskResultRequest.
@@ -4,7 +4,7 @@ import { file_ankka_protocol_v1_payload } from "./payload_pb.js";
4
4
  /**
5
5
  * Describes the file ankka/protocol/v1/agent.proto.
6
6
  */
7
- export const file_ankka_protocol_v1_agent = /*@__PURE__*/ fileDesc("Ch1hbmtrYS9wcm90b2NvbC92MS9hZ2VudC5wcm90bxIRYW5ra2EucHJvdG9jb2wudjEioQEKC1BsYW5SZXF1ZXN0EhQKDGNvbXBvbmVudF9pZBgBIAEoCRISCgpzZXNzaW9uX2lkGAIgASgJEgwKBG5hbWUYAyABKAkSKwoHcGF5bG9hZBgEIAEoCzIaLmFua2thLnByb3RvY29sLnYxLlBheWxvYWQSLQoIbWV0YWRhdGEYBSABKAsyGy5hbmtrYS5wcm90b2NvbC52MS5NZXRhZGF0YSJzCglQbGFuUmVwbHkSLAoEcGxhbhgBIAEoCzIcLmFua2thLnByb3RvY29sLnYxLkFnZW50UGxhbkgAEi0KB2ZhaWx1cmUYAiABKAsyGi5hbmtrYS5wcm90b2NvbC52MS5GYWlsdXJlSABCCQoHbWVzc2FnZSKSBAoJQWdlbnRQbGFuEhIKBW1v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IeCgVTdGFnZRIJCgVJTlBVVBAAEgoKBk9VVFBVVBABIlYKD0d1YXJkcmFpbFJlc3VsdBIoCgRwYXNzGAEgASgLMhguYW5ra2EucHJvdG9jb2wudjEuRW1wdHlIABIPCgVibG9jaxgCIAEoCUgAQggKBnJlc3VsdCJiChFUYXNrUmVzdWx0UmVxdWVzdBIUCgxjb21wb25lbnRfaWQYASABKAkSDwoHdGFza19pZBgCIAEoCRIRCgl0YXNrX3R5cGUYAyABKAkSEwoLcmVzdWx0X2pzb24YBCABKAkizAEKEVRhc2tSZXN1bHRWZXJkaWN0EioKBmFjY2VwdBgBIAEoCzIYLmFua2thLnByb3RvY29sLnYxLkVtcHR5SAASEwoJbWFsZm9ybWVkGAIgASgJSAASQAoGcmVqZWN0GAMgASgLMi4uYW5ra2EucHJvdG9jb2wudjEuVGFza1Jlc3VsdFZlcmRpY3QuUmVqZWN0aW9uSAAaKQoJUmVqZWN0aW9uEgwKBHJ1bGUYASABKAkSDgoGcmVhc29uGAIgASgJQgkKB3ZlcmRpY3Qy1AIKBUFnZW50EkQKBFBsYW4SHi5hbmtrYS5wcm90b2NvbC52MS5QbGFuUmVxdWVzdBocLmFua2thLnByb3RvY29sLnYxLlBsYW5SZXBseRJLCgpJbnZva2VUb29sEh4uYW5ra2EucHJvdG9jb2wudjEuVG9vbFJlcXVlc3QaHS5hbmtrYS5wcm90b2NvbC52MS5Ub29sUmVzdWx0ElkKDkNoZWNrR3VhcmRyYWlsEiMuYW5ra2EucHJvdG9jb2wudjEuR3VhcmRyYWlsUmVxdWVzdBoiLmFua2thLnByb3RvY29sLnYxLkd1YXJkcmFpbFJlc3VsdBJdCg9DaGVja1Rhc2tSZXN1bHQSJC5hbmtrYS5wcm90b2NvbC52MS5UYXNrUmVzdWx0UmVxdWVzdBokLmFua2thLnByb3RvY29sLnYxLlRhc2tSZXN1bHRWZXJkaWN0YgZwcm90bzM", [file_ankka_protocol_v1_payload]);
7
+ export const file_ankka_protocol_v1_agent = /*@__P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LkVtcHR5SAASEwoJbWFsZm9ybWVkGAIgASgJSAASQAoGcmVqZWN0GAMgASgLMi4uYW5ra2EucHJvdG9jb2wudjEuVGFza1Jlc3VsdFZlcmRpY3QuUmVqZWN0aW9uSAAaKQoJUmVqZWN0aW9uEgwKBHJ1bGUYASABKAkSDgoGcmVhc29uGAIgASgJQgkKB3ZlcmRpY3Qy1AIKBUFnZW50EkQKBFBsYW4SHi5hbmtrYS5wcm90b2NvbC52MS5QbGFuUmVxdWVzdBocLmFua2thLnByb3RvY29sLnYxLlBsYW5SZXBseRJLCgpJbnZva2VUb29sEh4uYW5ra2EucHJvdG9jb2wudjEuVG9vbFJlcXVlc3QaHS5hbmtrYS5wcm90b2NvbC52MS5Ub29sUmVzdWx0ElkKDkNoZWNrR3VhcmRyYWlsEiMuYW5ra2EucHJvdG9jb2wudjEuR3VhcmRyYWlsUmVxdWVzdBoiLmFua2thLnByb3RvY29sLnYxLkd1YXJkcmFpbFJlc3VsdBJdCg9DaGVja1Rhc2tSZXN1bHQSJC5hbmtrYS5wcm90b2NvbC52MS5UYXNrUmVzdWx0UmVxdWVzdBokLmFua2thLnByb3RvY29sLnYxLlRhc2tSZXN1bHRWZXJkaWN0YgZwcm90bzM", [file_ankka_protocol_v1_payload]);
8
8
  /**
9
9
  * Describes the message ankka.protocol.v1.PlanRequest.
10
10
  * Use `create(PlanRequestSchema)` to create a new message.
@@ -63,6 +63,9 @@ export const ToolResultSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1
63
63
  */
64
64
  export const GuardrailRequestSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 5);
65
65
  /**
66
+ * RESULT (1.11): what an MCP server's tool answered, checked by a result guardrail before the
67
+ * model is told it.
68
+ *
66
69
  * @generated from enum ankka.protocol.v1.GuardrailRequest.Stage
67
70
  */
68
71
  export const GuardrailRequest_Stage = {
@@ -74,6 +77,10 @@ export const GuardrailRequest_Stage = {
74
77
  * @generated from enum value: OUTPUT = 1;
75
78
  */
76
79
  OUTPUT: 1,
80
+ /**
81
+ * @generated from enum value: RESULT = 2;
82
+ */
83
+ RESULT: 2,
77
84
  };
78
85
  /**
79
86
  * Describes the enum ankka.protocol.v1.GuardrailRequest.Stage.
@@ -1,7 +1,8 @@
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
  */
@@ -59,6 +60,14 @@ export type InvokeReply = Message<"ankka.protocol.v1.InvokeReply"> & {
59
60
  */
60
61
  value: Error;
61
62
  case: "error";
63
+ } | {
64
+ /**
65
+ * 1.11: an agent's turn waits for a person's decision
66
+ *
67
+ * @generated from field: ankka.protocol.v1.ApprovalAwaited approval = 3;
68
+ */
69
+ value: ApprovalAwaited;
70
+ case: "approval";
62
71
  } | {
63
72
  case: undefined;
64
73
  value?: undefined;
@@ -94,6 +103,14 @@ export type StreamToken = Message<"ankka.protocol.v1.StreamToken"> & {
94
103
  */
95
104
  value: Error;
96
105
  case: "failed";
106
+ } | {
107
+ /**
108
+ * 1.11: terminal, in place of completed
109
+ *
110
+ * @generated from field: ankka.protocol.v1.ApprovalAwaited approval = 4;
111
+ */
112
+ value: ApprovalAwaited;
113
+ case: "approval";
97
114
  } | {
98
115
  case: undefined;
99
116
  value?: undefined;
@@ -105,6 +122,109 @@ export type StreamToken = Message<"ankka.protocol.v1.StreamToken"> & {
105
122
  */
106
123
  export declare const StreamTokenSchema: GenMessage<StreamToken>;
107
124
  /**
125
+ * 1.11: the approval requests an agent's turn waits on.
126
+ *
127
+ * @generated from message ankka.protocol.v1.ApprovalAwaited
128
+ */
129
+ export type ApprovalAwaited = Message<"ankka.protocol.v1.ApprovalAwaited"> & {
130
+ /**
131
+ * @generated from field: repeated ankka.protocol.v1.ApprovalRequest requests = 1;
132
+ */
133
+ requests: ApprovalRequest[];
134
+ };
135
+ /**
136
+ * Describes the message ankka.protocol.v1.ApprovalAwaited.
137
+ * Use `create(ApprovalAwaitedSchema)` to create a new message.
138
+ */
139
+ export declare const ApprovalAwaitedSchema: GenMessage<ApprovalAwaited>;
140
+ /**
141
+ * @generated from message ankka.protocol.v1.ApprovalRequest
142
+ */
143
+ export type ApprovalRequest = Message<"ankka.protocol.v1.ApprovalRequest"> & {
144
+ /**
145
+ * @generated from field: string id = 1;
146
+ */
147
+ id: string;
148
+ /**
149
+ * @generated from field: string tool = 2;
150
+ */
151
+ tool: string;
152
+ /**
153
+ * @generated from field: string arguments_json = 3;
154
+ */
155
+ argumentsJson: string;
156
+ /**
157
+ * @generated from field: int64 requested_at_millis = 4;
158
+ */
159
+ requestedAtMillis: bigint;
160
+ /**
161
+ * @generated from field: optional int64 expires_at_millis = 5;
162
+ */
163
+ expiresAtMillis?: bigint | undefined;
164
+ };
165
+ /**
166
+ * Describes the message ankka.protocol.v1.ApprovalRequest.
167
+ * Use `create(ApprovalRequestSchema)` to create a new message.
168
+ */
169
+ export declare const ApprovalRequestSchema: GenMessage<ApprovalRequest>;
170
+ /**
171
+ * @generated from message ankka.protocol.v1.DecideRequest
172
+ */
173
+ export type DecideRequest = Message<"ankka.protocol.v1.DecideRequest"> & {
174
+ /**
175
+ * AGENT or AUTONOMOUS_AGENT
176
+ *
177
+ * @generated from field: ankka.protocol.v1.Kind kind = 1;
178
+ */
179
+ kind: Kind;
180
+ /**
181
+ * @generated from field: string component_id = 2;
182
+ */
183
+ componentId: string;
184
+ /**
185
+ * the session, or the instance
186
+ *
187
+ * @generated from field: string entity_id = 3;
188
+ */
189
+ entityId: string;
190
+ /**
191
+ * AGENT: the handler that was called, whose turn waits
192
+ *
193
+ * @generated from field: string name = 4;
194
+ */
195
+ name: string;
196
+ /**
197
+ * @generated from field: string approval_id = 5;
198
+ */
199
+ approvalId: string;
200
+ /**
201
+ * @generated from field: bool approved = 6;
202
+ */
203
+ approved: boolean;
204
+ /**
205
+ * who decided; required
206
+ *
207
+ * @generated from field: string by = 7;
208
+ */
209
+ by: string;
210
+ /**
211
+ * @generated from field: optional string note = 8;
212
+ */
213
+ note?: string | undefined;
214
+ /**
215
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 9;
216
+ */
217
+ metadata?: Metadata | undefined;
218
+ };
219
+ /**
220
+ * Describes the message ankka.protocol.v1.DecideRequest.
221
+ * Use `create(DecideRequestSchema)` to create a new message.
222
+ */
223
+ export declare const DecideRequestSchema: GenMessage<DecideRequest>;
224
+ /**
225
+ * `metadata` (1.3): what the handler asking was given, as on `InvokeRequest`.
226
+ * `name` is "get", "all", or (1.13) one of the view's declared queries, asked with `values`.
227
+ *
108
228
  * @generated from message ankka.protocol.v1.QueryRequest
109
229
  */
110
230
  export type QueryRequest = Message<"ankka.protocol.v1.QueryRequest"> & {
@@ -117,9 +237,29 @@ export type QueryRequest = Message<"ankka.protocol.v1.QueryRequest"> & {
117
237
  */
118
238
  name: string;
119
239
  /**
240
+ * the key, for "get"
241
+ *
120
242
  * @generated from field: ankka.protocol.v1.Payload payload = 3;
121
243
  */
122
244
  payload?: Payload | undefined;
245
+ /**
246
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 4;
247
+ */
248
+ metadata?: Metadata | undefined;
249
+ /**
250
+ * 1.13: a declared query's values
251
+ *
252
+ * @generated from field: map<string, string> values = 5;
253
+ */
254
+ values: {
255
+ [key: string]: string;
256
+ };
257
+ /**
258
+ * 1.13: the most rows to read. Absent: 1000
259
+ *
260
+ * @generated from field: optional uint32 limit = 6;
261
+ */
262
+ limit?: number | undefined;
123
263
  };
124
264
  /**
125
265
  * Describes the message ankka.protocol.v1.QueryRequest.
@@ -207,6 +347,340 @@ export type CancelRequest = Message<"ankka.protocol.v1.CancelRequest"> & {
207
347
  * Use `create(CancelRequestSchema)` to create a new message.
208
348
  */
209
349
  export declare const CancelRequestSchema: GenMessage<CancelRequest>;
350
+ /**
351
+ * Both a delay and a period are given. There is no `kind` and no `entity_id`: a timer's target is a
352
+ * handler of a timed action. Scheduling again under a `timer_id` that already holds a recurring
353
+ * timer for the same `component_id`, `name` and `period_millis` keeps its next due and takes the
354
+ * payload, and `delay_millis` is not used; anything else under the id replaces it.
355
+ *
356
+ * @generated from message ankka.protocol.v1.ScheduleRecurringRequest
357
+ */
358
+ export type ScheduleRecurringRequest = Message<"ankka.protocol.v1.ScheduleRecurringRequest"> & {
359
+ /**
360
+ * @generated from field: string timer_id = 1;
361
+ */
362
+ timerId: string;
363
+ /**
364
+ * from now to the first due; 0 or less is due at once
365
+ *
366
+ * @generated from field: int64 delay_millis = 2;
367
+ */
368
+ delayMillis: bigint;
369
+ /**
370
+ * from each due to the next; from 1 to 36,500 days' worth
371
+ *
372
+ * @generated from field: int64 period_millis = 3;
373
+ */
374
+ periodMillis: bigint;
375
+ /**
376
+ * a timed action
377
+ *
378
+ * @generated from field: string component_id = 4;
379
+ */
380
+ componentId: string;
381
+ /**
382
+ * one of its handlers
383
+ *
384
+ * @generated from field: string name = 5;
385
+ */
386
+ name: string;
387
+ /**
388
+ * @generated from field: ankka.protocol.v1.Payload payload = 6;
389
+ */
390
+ payload?: Payload | undefined;
391
+ };
392
+ /**
393
+ * Describes the message ankka.protocol.v1.ScheduleRecurringRequest.
394
+ * Use `create(ScheduleRecurringRequestSchema)` to create a new message.
395
+ */
396
+ export declare const ScheduleRecurringRequestSchema: GenMessage<ScheduleRecurringRequest>;
397
+ /**
398
+ * @generated from message ankka.protocol.v1.ScheduleRecurringReply
399
+ */
400
+ export type ScheduleRecurringReply = Message<"ankka.protocol.v1.ScheduleRecurringReply"> & {
401
+ /**
402
+ * @generated from field: ankka.protocol.v1.Error error = 1;
403
+ */
404
+ error?: Error | undefined;
405
+ };
406
+ /**
407
+ * Describes the message ankka.protocol.v1.ScheduleRecurringReply.
408
+ * Use `create(ScheduleRecurringReplySchema)` to create a new message.
409
+ */
410
+ export declare const ScheduleRecurringReplySchema: GenMessage<ScheduleRecurringReply>;
411
+ /**
412
+ * @generated from message ankka.protocol.v1.GetSecretRequest
413
+ */
414
+ export type GetSecretRequest = Message<"ankka.protocol.v1.GetSecretRequest"> & {
415
+ /**
416
+ * @generated from field: string name = 1;
417
+ */
418
+ name: string;
419
+ };
420
+ /**
421
+ * Describes the message ankka.protocol.v1.GetSecretRequest.
422
+ * Use `create(GetSecretRequestSchema)` to create a new message.
423
+ */
424
+ export declare const GetSecretRequestSchema: GenMessage<GetSecretRequest>;
425
+ /**
426
+ * Exactly one case is set. A reply with none is a fault, never "absent".
427
+ *
428
+ * @generated from message ankka.protocol.v1.GetSecretReply
429
+ */
430
+ export type GetSecretReply = Message<"ankka.protocol.v1.GetSecretReply"> & {
431
+ /**
432
+ * @generated from oneof ankka.protocol.v1.GetSecretReply.result
433
+ */
434
+ result: {
435
+ /**
436
+ * the secret; never empty
437
+ *
438
+ * @generated from field: string value = 1;
439
+ */
440
+ value: string;
441
+ case: "value";
442
+ } | {
443
+ /**
444
+ * nothing is kept under the name
445
+ *
446
+ * @generated from field: ankka.protocol.v1.Empty absent = 2;
447
+ */
448
+ value: Empty;
449
+ case: "absent";
450
+ } | {
451
+ /**
452
+ * @generated from field: ankka.protocol.v1.Error error = 3;
453
+ */
454
+ value: Error;
455
+ case: "error";
456
+ } | {
457
+ case: undefined;
458
+ value?: undefined;
459
+ };
460
+ };
461
+ /**
462
+ * Describes the message ankka.protocol.v1.GetSecretReply.
463
+ * Use `create(GetSecretReplySchema)` to create a new message.
464
+ */
465
+ export declare const GetSecretReplySchema: GenMessage<GetSecretReply>;
466
+ /**
467
+ * @generated from message ankka.protocol.v1.PutSecretRequest
468
+ */
469
+ export type PutSecretRequest = Message<"ankka.protocol.v1.PutSecretRequest"> & {
470
+ /**
471
+ * @generated from field: string name = 1;
472
+ */
473
+ name: string;
474
+ /**
475
+ * @generated from field: string value = 2;
476
+ */
477
+ value: string;
478
+ };
479
+ /**
480
+ * Describes the message ankka.protocol.v1.PutSecretRequest.
481
+ * Use `create(PutSecretRequestSchema)` to create a new message.
482
+ */
483
+ export declare const PutSecretRequestSchema: GenMessage<PutSecretRequest>;
484
+ /**
485
+ * @generated from message ankka.protocol.v1.PutSecretReply
486
+ */
487
+ export type PutSecretReply = Message<"ankka.protocol.v1.PutSecretReply"> & {
488
+ /**
489
+ * @generated from field: ankka.protocol.v1.Error error = 1;
490
+ */
491
+ error?: Error | undefined;
492
+ };
493
+ /**
494
+ * Describes the message ankka.protocol.v1.PutSecretReply.
495
+ * Use `create(PutSecretReplySchema)` to create a new message.
496
+ */
497
+ export declare const PutSecretReplySchema: GenMessage<PutSecretReply>;
498
+ /**
499
+ * @generated from message ankka.protocol.v1.DeleteSecretRequest
500
+ */
501
+ export type DeleteSecretRequest = Message<"ankka.protocol.v1.DeleteSecretRequest"> & {
502
+ /**
503
+ * @generated from field: string name = 1;
504
+ */
505
+ name: string;
506
+ };
507
+ /**
508
+ * Describes the message ankka.protocol.v1.DeleteSecretRequest.
509
+ * Use `create(DeleteSecretRequestSchema)` to create a new message.
510
+ */
511
+ export declare const DeleteSecretRequestSchema: GenMessage<DeleteSecretRequest>;
512
+ /**
513
+ * @generated from message ankka.protocol.v1.DeleteSecretReply
514
+ */
515
+ export type DeleteSecretReply = Message<"ankka.protocol.v1.DeleteSecretReply"> & {
516
+ /**
517
+ * @generated from field: ankka.protocol.v1.Error error = 1;
518
+ */
519
+ error?: Error | undefined;
520
+ };
521
+ /**
522
+ * Describes the message ankka.protocol.v1.DeleteSecretReply.
523
+ * Use `create(DeleteSecretReplySchema)` to create a new message.
524
+ */
525
+ export declare const DeleteSecretReplySchema: GenMessage<DeleteSecretReply>;
526
+ /**
527
+ * A request to another service, by name: never an address, a host or a port.
528
+ *
529
+ * @generated from message ankka.protocol.v1.ServiceRequest
530
+ */
531
+ export type ServiceRequest = Message<"ankka.protocol.v1.ServiceRequest"> & {
532
+ /**
533
+ * the service's name
534
+ *
535
+ * @generated from field: string service = 1;
536
+ */
537
+ service: string;
538
+ /**
539
+ * absent: this service's own project
540
+ *
541
+ * @generated from field: optional string project = 2;
542
+ */
543
+ project?: string | undefined;
544
+ /**
545
+ * "GET", "POST", …
546
+ *
547
+ * @generated from field: string method = 3;
548
+ */
549
+ method: string;
550
+ /**
551
+ * starts with "/"; the query is part of it
552
+ *
553
+ * @generated from field: string path = 4;
554
+ */
555
+ path: string;
556
+ /**
557
+ * in order; the platform's own are removed
558
+ *
559
+ * @generated from field: repeated ankka.protocol.v1.HttpRequest.Pair headers = 5;
560
+ */
561
+ headers: HttpRequest_Pair[];
562
+ /**
563
+ * @generated from field: optional string content_type = 6;
564
+ */
565
+ contentType?: string | undefined;
566
+ /**
567
+ * absent: no body
568
+ *
569
+ * @generated from field: optional bytes body = 7;
570
+ */
571
+ body?: Uint8Array | undefined;
572
+ /**
573
+ * what the handler asking was given
574
+ *
575
+ * @generated from field: ankka.protocol.v1.Metadata metadata = 8;
576
+ */
577
+ metadata?: Metadata | undefined;
578
+ };
579
+ /**
580
+ * Describes the message ankka.protocol.v1.ServiceRequest.
581
+ * Use `create(ServiceRequestSchema)` to create a new message.
582
+ */
583
+ export declare const ServiceRequestSchema: GenMessage<ServiceRequest>;
584
+ /**
585
+ * Exactly one case is set. A reply with none is a fault.
586
+ *
587
+ * @generated from message ankka.protocol.v1.ServiceReply
588
+ */
589
+ export type ServiceReply = Message<"ankka.protocol.v1.ServiceReply"> & {
590
+ /**
591
+ * @generated from oneof ankka.protocol.v1.ServiceReply.result
592
+ */
593
+ result: {
594
+ /**
595
+ * the service answered, whatever its status
596
+ *
597
+ * @generated from field: ankka.protocol.v1.HttpResponse response = 1;
598
+ */
599
+ value: HttpResponse;
600
+ case: "response";
601
+ } | {
602
+ /**
603
+ * no answer came from the service
604
+ *
605
+ * @generated from field: ankka.protocol.v1.ServiceFailure failure = 2;
606
+ */
607
+ value: ServiceFailure;
608
+ case: "failure";
609
+ } | {
610
+ /**
611
+ * the runtime refused to make the call
612
+ *
613
+ * @generated from field: ankka.protocol.v1.Error error = 3;
614
+ */
615
+ value: Error;
616
+ case: "error";
617
+ } | {
618
+ case: undefined;
619
+ value?: undefined;
620
+ };
621
+ };
622
+ /**
623
+ * Describes the message ankka.protocol.v1.ServiceReply.
624
+ * Use `create(ServiceReplySchema)` to create a new message.
625
+ */
626
+ export declare const ServiceReplySchema: GenMessage<ServiceReply>;
627
+ /**
628
+ * @generated from message ankka.protocol.v1.ServiceFailure
629
+ */
630
+ export type ServiceFailure = Message<"ankka.protocol.v1.ServiceFailure"> & {
631
+ /**
632
+ * @generated from field: ankka.protocol.v1.ServiceFailure.Reason reason = 1;
633
+ */
634
+ reason: ServiceFailure_Reason;
635
+ /**
636
+ * what was tried, for the developer
637
+ *
638
+ * @generated from field: string detail = 2;
639
+ */
640
+ detail: string;
641
+ };
642
+ /**
643
+ * Describes the message ankka.protocol.v1.ServiceFailure.
644
+ * Use `create(ServiceFailureSchema)` to create a new message.
645
+ */
646
+ export declare const ServiceFailureSchema: GenMessage<ServiceFailure>;
647
+ /**
648
+ * UNANSWERED is zero on purpose: a reason a reader does not know reads as zero, and "no answer"
649
+ * is the reading of an unknown failure that never sends anything twice.
650
+ *
651
+ * @generated from enum ankka.protocol.v1.ServiceFailure.Reason
652
+ */
653
+ export declare const ServiceFailure_Reason: {
654
+ /**
655
+ * refused connection, broken, or no answer in time
656
+ *
657
+ * @generated from enum value: UNANSWERED = 0;
658
+ */
659
+ readonly UNANSWERED: 0;
660
+ /**
661
+ * no such service was found; nothing was sent
662
+ *
663
+ * @generated from enum value: UNRESOLVABLE = 1;
664
+ */
665
+ readonly UNRESOLVABLE: 1;
666
+ /**
667
+ * what answered is not the service; nothing was sent
668
+ *
669
+ * @generated from enum value: IDENTITY_MISMATCH = 2;
670
+ */
671
+ readonly IDENTITY_MISMATCH: 2;
672
+ };
673
+ /**
674
+ * UNANSWERED is zero on purpose: a reason a reader does not know reads as zero, and "no answer"
675
+ * is the reading of an unknown failure that never sends anything twice.
676
+ *
677
+ * @generated from enum ankka.protocol.v1.ServiceFailure.Reason
678
+ */
679
+ export type ServiceFailure_Reason = (typeof ServiceFailure_Reason)[keyof typeof ServiceFailure_Reason] | UnknownEnum;
680
+ /**
681
+ * Describes the enum ankka.protocol.v1.ServiceFailure.Reason.
682
+ */
683
+ export declare const ServiceFailure_ReasonSchema: GenEnum<ServiceFailure_Reason>;
210
684
  /**
211
685
  * @generated from service ankka.protocol.v1.Client
212
686
  */
@@ -251,4 +725,70 @@ export declare const Client: GenService<{
251
725
  input: typeof CancelRequestSchema;
252
726
  output: typeof EmptySchema;
253
727
  };
728
+ /**
729
+ * The service's secret store (protocol 1.6): named text values the runtime keeps in the
730
+ * service's own database, encrypted with a key only the runtime holds. A refusal or a fault is
731
+ * an Error in the reply, never a gRPC status, so that a module's import can carry it the same way.
732
+ *
733
+ * @generated from rpc ankka.protocol.v1.Client.GetSecret
734
+ */
735
+ getSecret: {
736
+ methodKind: "unary";
737
+ input: typeof GetSecretRequestSchema;
738
+ output: typeof GetSecretReplySchema;
739
+ };
740
+ /**
741
+ * @generated from rpc ankka.protocol.v1.Client.PutSecret
742
+ */
743
+ putSecret: {
744
+ methodKind: "unary";
745
+ input: typeof PutSecretRequestSchema;
746
+ output: typeof PutSecretReplySchema;
747
+ };
748
+ /**
749
+ * @generated from rpc ankka.protocol.v1.Client.DeleteSecret
750
+ */
751
+ deleteSecret: {
752
+ methodKind: "unary";
753
+ input: typeof DeleteSecretRequestSchema;
754
+ output: typeof DeleteSecretReplySchema;
755
+ };
756
+ /**
757
+ * A call to another service, made by the runtime as this service (protocol 1.8). The runtime
758
+ * resolves the service, presents this service's certificate and checks the other's; the process
759
+ * never holds a key. A refusal or a fault is in the reply, never a gRPC status, so that a
760
+ * module's import can carry it the same way.
761
+ *
762
+ * @generated from rpc ankka.protocol.v1.Client.Request
763
+ */
764
+ request: {
765
+ methodKind: "unary";
766
+ input: typeof ServiceRequestSchema;
767
+ output: typeof ServiceReplySchema;
768
+ };
769
+ /**
770
+ * A decision on an approval request (protocol 1.11): an agent's, answered as the handler that
771
+ * waited would have been — the answer, or requests still or newly awaiting — or an autonomous
772
+ * agent's, answered once it is recorded. A refusal is an Error in the reply.
773
+ *
774
+ * @generated from rpc ankka.protocol.v1.Client.Decide
775
+ */
776
+ decide: {
777
+ methodKind: "unary";
778
+ input: typeof DecideRequestSchema;
779
+ output: typeof InvokeReplySchema;
780
+ };
781
+ /**
782
+ * A recurring timer (protocol 1.12): first due after the delay, then once every period, each due the
783
+ * one before plus the period, until it is cancelled or replaced. `Cancel` cancels one. A runtime
784
+ * older than 1.12 answers UNIMPLEMENTED, so a timer meant to recur is never scheduled as one that
785
+ * fires once. A refusal is an Error in the reply, as for the secret store.
786
+ *
787
+ * @generated from rpc ankka.protocol.v1.Client.ScheduleRecurring
788
+ */
789
+ scheduleRecurring: {
790
+ methodKind: "unary";
791
+ input: typeof ScheduleRecurringRequestSchema;
792
+ output: typeof ScheduleRecurringReplySchema;
793
+ };
254
794
  }>;