ankka 0.6.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.
- package/README.md +30 -0
- package/dist/_proto/ankka/protocol/v1/agent_pb.d.ts +350 -0
- package/dist/_proto/ankka/protocol/v1/agent_pb.js +90 -0
- package/dist/_proto/ankka/protocol/v1/client_pb.d.ts +254 -0
- package/dist/_proto/ankka/protocol/v1/client_pb.js +47 -0
- package/dist/_proto/ankka/protocol/v1/consumer_pb.d.ts +105 -0
- package/dist/_proto/ankka/protocol/v1/consumer_pb.js +28 -0
- package/dist/_proto/ankka/protocol/v1/discovery_pb.d.ts +598 -0
- package/dist/_proto/ankka/protocol/v1/discovery_pb.js +175 -0
- package/dist/_proto/ankka/protocol/v1/endpoint_pb.d.ts +224 -0
- package/dist/_proto/ankka/protocol/v1/endpoint_pb.js +44 -0
- package/dist/_proto/ankka/protocol/v1/event_sourced_pb.d.ts +212 -0
- package/dist/_proto/ankka/protocol/v1/event_sourced_pb.js +47 -0
- package/dist/_proto/ankka/protocol/v1/key_value_pb.d.ts +154 -0
- package/dist/_proto/ankka/protocol/v1/key_value_pb.js +36 -0
- package/dist/_proto/ankka/protocol/v1/payload_pb.d.ts +276 -0
- package/dist/_proto/ankka/protocol/v1/payload_pb.js +110 -0
- package/dist/_proto/ankka/protocol/v1/timed_action_pb.d.ts +75 -0
- package/dist/_proto/ankka/protocol/v1/timed_action_pb.js +23 -0
- package/dist/_proto/ankka/protocol/v1/view_pb.d.ts +93 -0
- package/dist/_proto/ankka/protocol/v1/view_pb.js +23 -0
- package/dist/_proto/ankka/protocol/v1/workflow_pb.d.ts +298 -0
- package/dist/_proto/ankka/protocol/v1/workflow_pb.js +67 -0
- package/dist/agent.d.ts +27 -0
- package/dist/agent.js +36 -0
- package/dist/client.d.ts +92 -0
- package/dist/client.js +239 -0
- package/dist/codec.d.ts +44 -0
- package/dist/codec.js +215 -0
- package/dist/consumer.d.ts +31 -0
- package/dist/consumer.js +32 -0
- package/dist/context.d.ts +61 -0
- package/dist/context.js +75 -0
- package/dist/effects/agent.d.ts +37 -0
- package/dist/effects/agent.js +48 -0
- package/dist/effects/common.d.ts +68 -0
- package/dist/effects/common.js +55 -0
- package/dist/effects/eventSourced.d.ts +50 -0
- package/dist/effects/eventSourced.js +66 -0
- package/dist/effects/keyValue.d.ts +36 -0
- package/dist/effects/keyValue.js +47 -0
- package/dist/effects/stateless.d.ts +40 -0
- package/dist/effects/stateless.js +35 -0
- package/dist/effects/workflow.d.ts +99 -0
- package/dist/effects/workflow.js +83 -0
- package/dist/endpoint.d.ts +21 -0
- package/dist/endpoint.js +29 -0
- package/dist/eventSourcedEntity.d.ts +40 -0
- package/dist/eventSourcedEntity.js +66 -0
- package/dist/handlers.d.ts +55 -0
- package/dist/handlers.js +64 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +39 -0
- package/dist/json.d.ts +21 -0
- package/dist/json.js +362 -0
- package/dist/keyValueEntity.d.ts +29 -0
- package/dist/keyValueEntity.js +52 -0
- package/dist/kinds.d.ts +8 -0
- package/dist/kinds.js +41 -0
- package/dist/materialise.d.ts +33 -0
- package/dist/materialise.js +55 -0
- package/dist/routes.d.ts +71 -0
- package/dist/routes.js +79 -0
- package/dist/schema.d.ts +112 -0
- package/dist/schema.js +200 -0
- package/dist/server/agent.d.ts +14 -0
- package/dist/server/agent.js +113 -0
- package/dist/server/discovery.d.ts +5 -0
- package/dist/server/discovery.js +21 -0
- package/dist/server/eventSourced.d.ts +12 -0
- package/dist/server/eventSourced.js +168 -0
- package/dist/server/http.d.ts +10 -0
- package/dist/server/http.js +153 -0
- package/dist/server/keyValue.d.ts +5 -0
- package/dist/server/keyValue.js +122 -0
- package/dist/server/payloads.d.ts +6 -0
- package/dist/server/payloads.js +11 -0
- package/dist/server/queue.d.ts +10 -0
- package/dist/server/queue.js +67 -0
- package/dist/server/server.d.ts +34 -0
- package/dist/server/server.js +101 -0
- package/dist/server/stateless.d.ts +9 -0
- package/dist/server/stateless.js +108 -0
- package/dist/server/workflow.d.ts +5 -0
- package/dist/server/workflow.js +244 -0
- package/dist/service.d.ts +147 -0
- package/dist/service.js +384 -0
- package/dist/spec.d.ts +7 -0
- package/dist/spec.js +106 -0
- package/dist/testkit/index.d.ts +3 -0
- package/dist/testkit/index.js +6 -0
- package/dist/testkit/integration.d.ts +60 -0
- package/dist/testkit/integration.js +284 -0
- package/dist/testkit/kinds.d.ts +133 -0
- package/dist/testkit/kinds.js +398 -0
- package/dist/testkit/unit.d.ts +54 -0
- package/dist/testkit/unit.js +224 -0
- package/dist/time.d.ts +73 -0
- package/dist/time.js +275 -0
- package/dist/timedAction.d.ts +20 -0
- package/dist/timedAction.js +28 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/dist/view.d.ts +37 -0
- package/dist/view.js +52 -0
- package/dist/workflow.d.ts +33 -0
- package/dist/workflow.js +61 -0
- package/package.json +75 -0
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# ankka for TypeScript
|
|
2
|
+
|
|
3
|
+
The ankka SDK for services written in TypeScript on Node.js. A service is a process that the ankka
|
|
4
|
+
runtime hosts as a sidecar: the sidecar owns everything durable and distributed, and the process owns
|
|
5
|
+
the decisions. This package speaks the sidecar protocol so your code never does.
|
|
6
|
+
|
|
7
|
+
Documentation: <https://docs.ankka.cloud/> — start with *Your first service in TypeScript* and the
|
|
8
|
+
*TypeScript SDK* reference.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install ankka # the SDK
|
|
12
|
+
npm install -D testcontainers @testcontainers/postgresql # only if you use the integration testkit
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Node 22.22 or later. A service runs from source: `node main.ts`.
|
|
16
|
+
|
|
17
|
+
## Developing the SDK
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm ci
|
|
21
|
+
npm run proto # copy protocol/ in, generate src/_proto, write src/version.ts
|
|
22
|
+
npm run typecheck # tsc --noEmit over src, test, examples
|
|
23
|
+
npm test # the fast tests, no Docker
|
|
24
|
+
npm run test:slow # the Docker-backed tests (needs the ankka-sidecar image)
|
|
25
|
+
npm run conformance # the platform's conformance suite against this SDK's reference service
|
|
26
|
+
npm run build # emit dist/, what the package ships
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`proto/` is a verbatim copy of the repository's `protocol/`; CI fails when the two differ, so a
|
|
30
|
+
protocol change reaches this SDK deliberately by running `npm run proto`.
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Empty, Error, Failure, Metadata, Payload } from "./payload_pb.ts";
|
|
3
|
+
import type { Message, UnknownEnum } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file ankka/protocol/v1/agent.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_ankka_protocol_v1_agent: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
* @generated from message ankka.protocol.v1.PlanRequest
|
|
10
|
+
*/
|
|
11
|
+
export type PlanRequest = Message<"ankka.protocol.v1.PlanRequest"> & {
|
|
12
|
+
/**
|
|
13
|
+
* @generated from field: string component_id = 1;
|
|
14
|
+
*/
|
|
15
|
+
componentId: string;
|
|
16
|
+
/**
|
|
17
|
+
* @generated from field: string session_id = 2;
|
|
18
|
+
*/
|
|
19
|
+
sessionId: string;
|
|
20
|
+
/**
|
|
21
|
+
* @generated from field: string name = 3;
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* @generated from field: ankka.protocol.v1.Payload payload = 4;
|
|
26
|
+
*/
|
|
27
|
+
payload?: Payload | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* @generated from field: ankka.protocol.v1.Metadata metadata = 5;
|
|
30
|
+
*/
|
|
31
|
+
metadata?: Metadata | undefined;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Describes the message ankka.protocol.v1.PlanRequest.
|
|
35
|
+
* Use `create(PlanRequestSchema)` to create a new message.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PlanRequestSchema: GenMessage<PlanRequest>;
|
|
38
|
+
/**
|
|
39
|
+
* @generated from message ankka.protocol.v1.PlanReply
|
|
40
|
+
*/
|
|
41
|
+
export type PlanReply = Message<"ankka.protocol.v1.PlanReply"> & {
|
|
42
|
+
/**
|
|
43
|
+
* @generated from oneof ankka.protocol.v1.PlanReply.message
|
|
44
|
+
*/
|
|
45
|
+
message: {
|
|
46
|
+
/**
|
|
47
|
+
* @generated from field: ankka.protocol.v1.AgentPlan plan = 1;
|
|
48
|
+
*/
|
|
49
|
+
value: AgentPlan;
|
|
50
|
+
case: "plan";
|
|
51
|
+
} | {
|
|
52
|
+
/**
|
|
53
|
+
* @generated from field: ankka.protocol.v1.Failure failure = 2;
|
|
54
|
+
*/
|
|
55
|
+
value: Failure;
|
|
56
|
+
case: "failure";
|
|
57
|
+
} | {
|
|
58
|
+
case: undefined;
|
|
59
|
+
value?: undefined;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Describes the message ankka.protocol.v1.PlanReply.
|
|
64
|
+
* Use `create(PlanReplySchema)` to create a new message.
|
|
65
|
+
*/
|
|
66
|
+
export declare const PlanReplySchema: GenMessage<PlanReply>;
|
|
67
|
+
/**
|
|
68
|
+
* AgentEffect, as data
|
|
69
|
+
*
|
|
70
|
+
* @generated from message ankka.protocol.v1.AgentPlan
|
|
71
|
+
*/
|
|
72
|
+
export type AgentPlan = Message<"ankka.protocol.v1.AgentPlan"> & {
|
|
73
|
+
/**
|
|
74
|
+
* a name in the sidecar's configuration
|
|
75
|
+
*
|
|
76
|
+
* @generated from field: optional string model = 1;
|
|
77
|
+
*/
|
|
78
|
+
model?: string | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* @generated from field: optional string system = 2;
|
|
81
|
+
*/
|
|
82
|
+
system?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* @generated from field: optional string user = 3;
|
|
85
|
+
*/
|
|
86
|
+
user?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* @generated from field: repeated string context = 4;
|
|
89
|
+
*/
|
|
90
|
+
context: string[];
|
|
91
|
+
/**
|
|
92
|
+
* @generated from field: ankka.protocol.v1.AgentPlan.Memory memory = 5;
|
|
93
|
+
*/
|
|
94
|
+
memory: AgentPlan_Memory;
|
|
95
|
+
/**
|
|
96
|
+
* names declared in discovery
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: repeated string tools = 6;
|
|
99
|
+
*/
|
|
100
|
+
tools: string[];
|
|
101
|
+
/**
|
|
102
|
+
* @generated from field: ankka.protocol.v1.AgentPlan.ResponseShape response_shape = 7;
|
|
103
|
+
*/
|
|
104
|
+
responseShape?: AgentPlan_ResponseShape | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* names declared in discovery
|
|
107
|
+
*
|
|
108
|
+
* @generated from field: repeated string guardrails = 8;
|
|
109
|
+
*/
|
|
110
|
+
guardrails: string[];
|
|
111
|
+
/**
|
|
112
|
+
* effects.error(...): a refusal before any model call
|
|
113
|
+
*
|
|
114
|
+
* @generated from field: optional ankka.protocol.v1.Error failure = 9;
|
|
115
|
+
*/
|
|
116
|
+
failure?: Error | undefined;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Describes the message ankka.protocol.v1.AgentPlan.
|
|
120
|
+
* Use `create(AgentPlanSchema)` to create a new message.
|
|
121
|
+
*/
|
|
122
|
+
export declare const AgentPlanSchema: GenMessage<AgentPlan>;
|
|
123
|
+
/**
|
|
124
|
+
* @generated from message ankka.protocol.v1.AgentPlan.ResponseShape
|
|
125
|
+
*/
|
|
126
|
+
export type AgentPlan_ResponseShape = Message<"ankka.protocol.v1.AgentPlan.ResponseShape"> & {
|
|
127
|
+
/**
|
|
128
|
+
* @generated from oneof ankka.protocol.v1.AgentPlan.ResponseShape.shape
|
|
129
|
+
*/
|
|
130
|
+
shape: {
|
|
131
|
+
/**
|
|
132
|
+
* @generated from field: ankka.protocol.v1.Empty text = 1;
|
|
133
|
+
*/
|
|
134
|
+
value: Empty;
|
|
135
|
+
case: "text";
|
|
136
|
+
} | {
|
|
137
|
+
/**
|
|
138
|
+
* @generated from field: ankka.protocol.v1.AgentPlan.ResponseShape.Json json = 2;
|
|
139
|
+
*/
|
|
140
|
+
value: AgentPlan_ResponseShape_Json;
|
|
141
|
+
case: "json";
|
|
142
|
+
} | {
|
|
143
|
+
case: undefined;
|
|
144
|
+
value?: undefined;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Describes the message ankka.protocol.v1.AgentPlan.ResponseShape.
|
|
149
|
+
* Use `create(AgentPlan_ResponseShapeSchema)` to create a new message.
|
|
150
|
+
*/
|
|
151
|
+
export declare const AgentPlan_ResponseShapeSchema: GenMessage<AgentPlan_ResponseShape>;
|
|
152
|
+
/**
|
|
153
|
+
* @generated from message ankka.protocol.v1.AgentPlan.ResponseShape.Json
|
|
154
|
+
*/
|
|
155
|
+
export type AgentPlan_ResponseShape_Json = Message<"ankka.protocol.v1.AgentPlan.ResponseShape.Json"> & {
|
|
156
|
+
/**
|
|
157
|
+
* @generated from field: string schema_hint = 1;
|
|
158
|
+
*/
|
|
159
|
+
schemaHint: string;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Describes the message ankka.protocol.v1.AgentPlan.ResponseShape.Json.
|
|
163
|
+
* Use `create(AgentPlan_ResponseShape_JsonSchema)` to create a new message.
|
|
164
|
+
*/
|
|
165
|
+
export declare const AgentPlan_ResponseShape_JsonSchema: GenMessage<AgentPlan_ResponseShape_Json>;
|
|
166
|
+
/**
|
|
167
|
+
* @generated from enum ankka.protocol.v1.AgentPlan.Memory
|
|
168
|
+
*/
|
|
169
|
+
export declare const AgentPlan_Memory: {
|
|
170
|
+
/**
|
|
171
|
+
* @generated from enum value: SESSION = 0;
|
|
172
|
+
*/
|
|
173
|
+
readonly SESSION: 0;
|
|
174
|
+
/**
|
|
175
|
+
* @generated from enum value: NONE = 1;
|
|
176
|
+
*/
|
|
177
|
+
readonly NONE: 1;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* @generated from enum ankka.protocol.v1.AgentPlan.Memory
|
|
181
|
+
*/
|
|
182
|
+
export type AgentPlan_Memory = (typeof AgentPlan_Memory)[keyof typeof AgentPlan_Memory] | UnknownEnum;
|
|
183
|
+
/**
|
|
184
|
+
* Describes the enum ankka.protocol.v1.AgentPlan.Memory.
|
|
185
|
+
*/
|
|
186
|
+
export declare const AgentPlan_MemorySchema: GenEnum<AgentPlan_Memory>;
|
|
187
|
+
/**
|
|
188
|
+
* @generated from message ankka.protocol.v1.ToolRequest
|
|
189
|
+
*/
|
|
190
|
+
export type ToolRequest = Message<"ankka.protocol.v1.ToolRequest"> & {
|
|
191
|
+
/**
|
|
192
|
+
* @generated from field: string component_id = 1;
|
|
193
|
+
*/
|
|
194
|
+
componentId: string;
|
|
195
|
+
/**
|
|
196
|
+
* @generated from field: string session_id = 2;
|
|
197
|
+
*/
|
|
198
|
+
sessionId: string;
|
|
199
|
+
/**
|
|
200
|
+
* @generated from field: string tool = 3;
|
|
201
|
+
*/
|
|
202
|
+
tool: string;
|
|
203
|
+
/**
|
|
204
|
+
* @generated from field: string arguments_json = 4;
|
|
205
|
+
*/
|
|
206
|
+
argumentsJson: string;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Describes the message ankka.protocol.v1.ToolRequest.
|
|
210
|
+
* Use `create(ToolRequestSchema)` to create a new message.
|
|
211
|
+
*/
|
|
212
|
+
export declare const ToolRequestSchema: GenMessage<ToolRequest>;
|
|
213
|
+
/**
|
|
214
|
+
* @generated from message ankka.protocol.v1.ToolResult
|
|
215
|
+
*/
|
|
216
|
+
export type ToolResult = Message<"ankka.protocol.v1.ToolResult"> & {
|
|
217
|
+
/**
|
|
218
|
+
* @generated from oneof ankka.protocol.v1.ToolResult.result
|
|
219
|
+
*/
|
|
220
|
+
result: {
|
|
221
|
+
/**
|
|
222
|
+
* @generated from field: string ok = 1;
|
|
223
|
+
*/
|
|
224
|
+
value: string;
|
|
225
|
+
case: "ok";
|
|
226
|
+
} | {
|
|
227
|
+
/**
|
|
228
|
+
* @generated from field: string error = 2;
|
|
229
|
+
*/
|
|
230
|
+
value: string;
|
|
231
|
+
case: "error";
|
|
232
|
+
} | {
|
|
233
|
+
case: undefined;
|
|
234
|
+
value?: undefined;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Describes the message ankka.protocol.v1.ToolResult.
|
|
239
|
+
* Use `create(ToolResultSchema)` to create a new message.
|
|
240
|
+
*/
|
|
241
|
+
export declare const ToolResultSchema: GenMessage<ToolResult>;
|
|
242
|
+
/**
|
|
243
|
+
* @generated from message ankka.protocol.v1.GuardrailRequest
|
|
244
|
+
*/
|
|
245
|
+
export type GuardrailRequest = Message<"ankka.protocol.v1.GuardrailRequest"> & {
|
|
246
|
+
/**
|
|
247
|
+
* @generated from field: string component_id = 1;
|
|
248
|
+
*/
|
|
249
|
+
componentId: string;
|
|
250
|
+
/**
|
|
251
|
+
* @generated from field: string session_id = 2;
|
|
252
|
+
*/
|
|
253
|
+
sessionId: string;
|
|
254
|
+
/**
|
|
255
|
+
* @generated from field: string guardrail = 3;
|
|
256
|
+
*/
|
|
257
|
+
guardrail: string;
|
|
258
|
+
/**
|
|
259
|
+
* @generated from field: ankka.protocol.v1.GuardrailRequest.Stage stage = 4;
|
|
260
|
+
*/
|
|
261
|
+
stage: GuardrailRequest_Stage;
|
|
262
|
+
/**
|
|
263
|
+
* @generated from field: string text = 5;
|
|
264
|
+
*/
|
|
265
|
+
text: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Describes the message ankka.protocol.v1.GuardrailRequest.
|
|
269
|
+
* Use `create(GuardrailRequestSchema)` to create a new message.
|
|
270
|
+
*/
|
|
271
|
+
export declare const GuardrailRequestSchema: GenMessage<GuardrailRequest>;
|
|
272
|
+
/**
|
|
273
|
+
* @generated from enum ankka.protocol.v1.GuardrailRequest.Stage
|
|
274
|
+
*/
|
|
275
|
+
export declare const GuardrailRequest_Stage: {
|
|
276
|
+
/**
|
|
277
|
+
* @generated from enum value: INPUT = 0;
|
|
278
|
+
*/
|
|
279
|
+
readonly INPUT: 0;
|
|
280
|
+
/**
|
|
281
|
+
* @generated from enum value: OUTPUT = 1;
|
|
282
|
+
*/
|
|
283
|
+
readonly OUTPUT: 1;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* @generated from enum ankka.protocol.v1.GuardrailRequest.Stage
|
|
287
|
+
*/
|
|
288
|
+
export type GuardrailRequest_Stage = (typeof GuardrailRequest_Stage)[keyof typeof GuardrailRequest_Stage] | UnknownEnum;
|
|
289
|
+
/**
|
|
290
|
+
* Describes the enum ankka.protocol.v1.GuardrailRequest.Stage.
|
|
291
|
+
*/
|
|
292
|
+
export declare const GuardrailRequest_StageSchema: GenEnum<GuardrailRequest_Stage>;
|
|
293
|
+
/**
|
|
294
|
+
* @generated from message ankka.protocol.v1.GuardrailResult
|
|
295
|
+
*/
|
|
296
|
+
export type GuardrailResult = Message<"ankka.protocol.v1.GuardrailResult"> & {
|
|
297
|
+
/**
|
|
298
|
+
* @generated from oneof ankka.protocol.v1.GuardrailResult.result
|
|
299
|
+
*/
|
|
300
|
+
result: {
|
|
301
|
+
/**
|
|
302
|
+
* @generated from field: ankka.protocol.v1.Empty pass = 1;
|
|
303
|
+
*/
|
|
304
|
+
value: Empty;
|
|
305
|
+
case: "pass";
|
|
306
|
+
} | {
|
|
307
|
+
/**
|
|
308
|
+
* @generated from field: string block = 2;
|
|
309
|
+
*/
|
|
310
|
+
value: string;
|
|
311
|
+
case: "block";
|
|
312
|
+
} | {
|
|
313
|
+
case: undefined;
|
|
314
|
+
value?: undefined;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Describes the message ankka.protocol.v1.GuardrailResult.
|
|
319
|
+
* Use `create(GuardrailResultSchema)` to create a new message.
|
|
320
|
+
*/
|
|
321
|
+
export declare const GuardrailResultSchema: GenMessage<GuardrailResult>;
|
|
322
|
+
/**
|
|
323
|
+
* @generated from service ankka.protocol.v1.Agent
|
|
324
|
+
*/
|
|
325
|
+
export declare const Agent: GenService<{
|
|
326
|
+
/**
|
|
327
|
+
* @generated from rpc ankka.protocol.v1.Agent.Plan
|
|
328
|
+
*/
|
|
329
|
+
plan: {
|
|
330
|
+
methodKind: "unary";
|
|
331
|
+
input: typeof PlanRequestSchema;
|
|
332
|
+
output: typeof PlanReplySchema;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* @generated from rpc ankka.protocol.v1.Agent.InvokeTool
|
|
336
|
+
*/
|
|
337
|
+
invokeTool: {
|
|
338
|
+
methodKind: "unary";
|
|
339
|
+
input: typeof ToolRequestSchema;
|
|
340
|
+
output: typeof ToolResultSchema;
|
|
341
|
+
};
|
|
342
|
+
/**
|
|
343
|
+
* @generated from rpc ankka.protocol.v1.Agent.CheckGuardrail
|
|
344
|
+
*/
|
|
345
|
+
checkGuardrail: {
|
|
346
|
+
methodKind: "unary";
|
|
347
|
+
input: typeof GuardrailRequestSchema;
|
|
348
|
+
output: typeof GuardrailResultSchema;
|
|
349
|
+
};
|
|
350
|
+
}>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Agents: the process plans (an AgentEffect as data) and runs tools; the sidecar runs the loop.
|
|
2
|
+
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
3
|
+
import { file_ankka_protocol_v1_payload } from "./payload_pb.js";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file ankka/protocol/v1/agent.proto.
|
|
6
|
+
*/
|
|
7
|
+
export const file_ankka_protocol_v1_agent = /*@__PURE__*/ fileDesc("Ch1hbmtrYS9wcm90b2NvbC92MS9hZ2VudC5wcm90bxIRYW5ra2EucHJvdG9jb2wudjEioQEKC1BsYW5SZXF1ZXN0EhQKDGNvbXBvbmVudF9pZBgBIAEoCRISCgpzZXNzaW9uX2lkGAIgASgJEgwKBG5hbWUYAyABKAkSKwoHcGF5bG9hZBgEIAEoCzIaLmFua2thLnByb3RvY29sLnYxLlBheWxvYWQSLQoIbWV0YWRhdGEYBSABKAsyGy5hbmtrYS5wcm90b2NvbC52MS5NZXRhZGF0YSJzCglQbGFuUmVwbHkSLAoEcGxhbhgBIAEoCzIcLmFua2thLnByb3RvY29sLnYxLkFnZW50UGxhbkgAEi0KB2ZhaWx1cmUYAiABKAsyGi5hbmtrYS5wcm90b2NvbC52MS5GYWlsdXJlSABCCQoHbWVzc2FnZSKSBAoJQWdlbnRQbGFuEhIKBW1vZGVsGAEgASgJSACIAQESEwoGc3lzdGVtGAIgASgJSAGIAQESEQoEdXNlchgDIAEoCUgCiAEBEg8KB2NvbnRleHQYBCADKAkSMwoGbWVtb3J5GAUgASgOMiMuYW5ra2EucHJvdG9jb2wudjEuQWdlbnRQbGFuLk1lbW9yeRINCgV0b29scxgGIAMoCRJCCg5yZXNwb25zZV9zaGFwZRgHIAEoCzIqLmFua2thLnByb3RvY29sLnYxLkFnZW50UGxhbi5SZXNwb25zZVNoYXBlEhIKCmd1YXJkcmFpbHMYCCADKAkSLgoHZmFpbHVyZRgJIAEoCzIYLmFua2thLnByb3RvY29sLnYxLkVycm9ySAOIAQEaoAEKDVJlc3BvbnNlU2hhcGUSKAoEdGV4dBgBIAEoCzIYLmFua2thLnByb3RvY29sLnYxLkVtcHR5SAASPwoEanNvbhgCIAEoCzIvLmFua2thLnByb3RvY29sLnYxLkFnZW50UGxhbi5SZXNwb25zZVNoYXBlLkpzb25IABobCgRKc29uEhMKC3NjaGVtYV9oaW50GAEgASgJQgcKBXNoYXBlIh8KBk1lbW9yeRILCgdTRVNTSU9OEAASCAoETk9ORRABQggKBl9tb2RlbEIJCgdfc3lzdGVtQgcKBV91c2VyQgoKCF9mYWlsdXJlIl0KC1Rvb2xSZXF1ZXN0EhQKDGNvbXBvbmVudF9pZBgBIAEoCRISCgpzZXNzaW9uX2lkGAIgASgJEgwKBHRvb2wYAyABKAkSFgoOYXJndW1lbnRzX2pzb24YBCABKAkiNQoKVG9vbFJlc3VsdBIMCgJvaxgBIAEoCUgAEg8KBWVycm9yGAIgASgJSABCCAoGcmVzdWx0IrcBChBHdWFyZHJhaWxSZXF1ZXN0EhQKDGNvbXBvbmVudF9pZBgBIAEoCRISCgpzZXNzaW9uX2lkGAIgASgJEhEKCWd1YXJkcmFpbBgDIAEoCRI4CgVzdGFnZRgEIAEoDjIpLmFua2thLnByb3RvY29sLnYxLkd1YXJkcmFpbFJlcXVlc3QuU3RhZ2USDAoEdGV4dBgFIAEoCSIeCgVTdGFnZRIJCgVJTlBVVBAAEgoKBk9VVFBVVBABIlYKD0d1YXJkcmFpbFJlc3VsdBIoCgRwYXNzGAEgASgLMhguYW5ra2EucHJvdG9jb2wudjEuRW1wdHlIABIPCgVibG9jaxgCIAEoCUgAQggKBnJlc3VsdDL1AQoFQWdlbnQSRAoEUGxhbhIeLmFua2thLnByb3RvY29sLnYxLlBsYW5SZXF1ZXN0GhwuYW5ra2EucHJvdG9jb2wudjEuUGxhblJlcGx5EksKCkludm9rZVRvb2wSHi5hbmtrYS5wcm90b2NvbC52MS5Ub29sUmVxdWVzdBodLmFua2thLnByb3RvY29sLnYxLlRvb2xSZXN1bHQSWQoOQ2hlY2tHdWFyZHJhaWwSIy5hbmtrYS5wcm90b2NvbC52MS5HdWFyZHJhaWxSZXF1ZXN0GiIuYW5ra2EucHJvdG9jb2wudjEuR3VhcmRyYWlsUmVzdWx0YgZwcm90bzM", [file_ankka_protocol_v1_payload]);
|
|
8
|
+
/**
|
|
9
|
+
* Describes the message ankka.protocol.v1.PlanRequest.
|
|
10
|
+
* Use `create(PlanRequestSchema)` to create a new message.
|
|
11
|
+
*/
|
|
12
|
+
export const PlanRequestSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 0);
|
|
13
|
+
/**
|
|
14
|
+
* Describes the message ankka.protocol.v1.PlanReply.
|
|
15
|
+
* Use `create(PlanReplySchema)` to create a new message.
|
|
16
|
+
*/
|
|
17
|
+
export const PlanReplySchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 1);
|
|
18
|
+
/**
|
|
19
|
+
* Describes the message ankka.protocol.v1.AgentPlan.
|
|
20
|
+
* Use `create(AgentPlanSchema)` to create a new message.
|
|
21
|
+
*/
|
|
22
|
+
export const AgentPlanSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 2);
|
|
23
|
+
/**
|
|
24
|
+
* Describes the message ankka.protocol.v1.AgentPlan.ResponseShape.
|
|
25
|
+
* Use `create(AgentPlan_ResponseShapeSchema)` to create a new message.
|
|
26
|
+
*/
|
|
27
|
+
export const AgentPlan_ResponseShapeSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 2, 0);
|
|
28
|
+
/**
|
|
29
|
+
* Describes the message ankka.protocol.v1.AgentPlan.ResponseShape.Json.
|
|
30
|
+
* Use `create(AgentPlan_ResponseShape_JsonSchema)` to create a new message.
|
|
31
|
+
*/
|
|
32
|
+
export const AgentPlan_ResponseShape_JsonSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 2, 0, 0);
|
|
33
|
+
/**
|
|
34
|
+
* @generated from enum ankka.protocol.v1.AgentPlan.Memory
|
|
35
|
+
*/
|
|
36
|
+
export const AgentPlan_Memory = {
|
|
37
|
+
/**
|
|
38
|
+
* @generated from enum value: SESSION = 0;
|
|
39
|
+
*/
|
|
40
|
+
SESSION: 0,
|
|
41
|
+
/**
|
|
42
|
+
* @generated from enum value: NONE = 1;
|
|
43
|
+
*/
|
|
44
|
+
NONE: 1,
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Describes the enum ankka.protocol.v1.AgentPlan.Memory.
|
|
48
|
+
*/
|
|
49
|
+
export const AgentPlan_MemorySchema = /*@__PURE__*/ enumDesc(file_ankka_protocol_v1_agent, 2, 0);
|
|
50
|
+
/**
|
|
51
|
+
* Describes the message ankka.protocol.v1.ToolRequest.
|
|
52
|
+
* Use `create(ToolRequestSchema)` to create a new message.
|
|
53
|
+
*/
|
|
54
|
+
export const ToolRequestSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 3);
|
|
55
|
+
/**
|
|
56
|
+
* Describes the message ankka.protocol.v1.ToolResult.
|
|
57
|
+
* Use `create(ToolResultSchema)` to create a new message.
|
|
58
|
+
*/
|
|
59
|
+
export const ToolResultSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 4);
|
|
60
|
+
/**
|
|
61
|
+
* Describes the message ankka.protocol.v1.GuardrailRequest.
|
|
62
|
+
* Use `create(GuardrailRequestSchema)` to create a new message.
|
|
63
|
+
*/
|
|
64
|
+
export const GuardrailRequestSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 5);
|
|
65
|
+
/**
|
|
66
|
+
* @generated from enum ankka.protocol.v1.GuardrailRequest.Stage
|
|
67
|
+
*/
|
|
68
|
+
export const GuardrailRequest_Stage = {
|
|
69
|
+
/**
|
|
70
|
+
* @generated from enum value: INPUT = 0;
|
|
71
|
+
*/
|
|
72
|
+
INPUT: 0,
|
|
73
|
+
/**
|
|
74
|
+
* @generated from enum value: OUTPUT = 1;
|
|
75
|
+
*/
|
|
76
|
+
OUTPUT: 1,
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Describes the enum ankka.protocol.v1.GuardrailRequest.Stage.
|
|
80
|
+
*/
|
|
81
|
+
export const GuardrailRequest_StageSchema = /*@__PURE__*/ enumDesc(file_ankka_protocol_v1_agent, 5, 0);
|
|
82
|
+
/**
|
|
83
|
+
* Describes the message ankka.protocol.v1.GuardrailResult.
|
|
84
|
+
* Use `create(GuardrailResultSchema)` to create a new message.
|
|
85
|
+
*/
|
|
86
|
+
export const GuardrailResultSchema = /*@__PURE__*/ messageDesc(file_ankka_protocol_v1_agent, 6);
|
|
87
|
+
/**
|
|
88
|
+
* @generated from service ankka.protocol.v1.Agent
|
|
89
|
+
*/
|
|
90
|
+
export const Agent = /*@__PURE__*/ serviceDesc(file_ankka_protocol_v1_agent, 0);
|