@spine-event-engine/proto 2.0.0-snapshot.21 → 2.0.0-snapshot.23
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/dist/generated/proto-module.d.ts +7 -1
- package/dist/generated/proto-module.d.ts.map +1 -1
- package/dist/generated/proto-module.js +53 -17
- package/dist/generated/proto-module.js.map +1 -1
- package/dist/generated/spine/server/agent/execution_record_pb.d.ts +1781 -0
- package/dist/generated/spine/server/agent/execution_record_pb.d.ts.map +1 -0
- package/dist/generated/spine/server/agent/execution_record_pb.js +490 -0
- package/dist/generated/spine/server/agent/execution_record_pb.js.map +1 -0
- package/dist/generated/spine/server/agent/history_record_pb.d.ts +66 -0
- package/dist/generated/spine/server/agent/history_record_pb.d.ts.map +1 -0
- package/dist/generated/spine/server/agent/history_record_pb.js +25 -0
- package/dist/generated/spine/server/agent/history_record_pb.js.map +1 -0
- package/dist/generated/spine/ts/agent/content_pb.d.ts +963 -0
- package/dist/generated/spine/ts/agent/content_pb.d.ts.map +1 -0
- package/dist/generated/spine/ts/agent/content_pb.js +258 -0
- package/dist/generated/spine/ts/agent/content_pb.js.map +1 -0
- package/dist/generated/spine/ts/agent/history_pb.d.ts +165 -0
- package/dist/generated/spine/ts/agent/history_pb.d.ts.map +1 -0
- package/dist/generated/spine/ts/agent/history_pb.js +39 -0
- package/dist/generated/spine/ts/agent/history_pb.js.map +1 -0
- package/dist/generated/spine/ts/agent/interaction_events_pb.d.ts +541 -0
- package/dist/generated/spine/ts/agent/interaction_events_pb.d.ts.map +1 -0
- package/dist/generated/spine/ts/agent/interaction_events_pb.js +76 -0
- package/dist/generated/spine/ts/agent/interaction_events_pb.js.map +1 -0
- package/dist/generated/spine/ts/agent/model_pb.d.ts +870 -0
- package/dist/generated/spine/ts/agent/model_pb.d.ts.map +1 -0
- package/dist/generated/spine/ts/agent/model_pb.js +404 -0
- package/dist/generated/spine/ts/agent/model_pb.js.map +1 -0
- package/dist/src/agent/index.d.ts +38 -0
- package/dist/src/agent/index.d.ts.map +1 -0
- package/dist/src/agent/index.js +47 -0
- package/dist/src/agent/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/generated/.spine-proto-generation.json +1 -1
- package/generated/proto-module.ts +53 -17
- package/generated/spine/server/agent/execution_record_pb.ts +2034 -0
- package/generated/spine/server/agent/history_record_pb.ts +85 -0
- package/generated/spine/ts/agent/content_pb.ts +1103 -0
- package/generated/spine/ts/agent/history_pb.ts +194 -0
- package/generated/spine/ts/agent/interaction_events_pb.ts +639 -0
- package/generated/spine/ts/agent/model_pb.ts +1014 -0
- package/package.json +5 -1
- package/proto/spine/server/agent/execution_record.proto +849 -0
- package/proto/spine/server/agent/history_record.proto +47 -0
- package/proto/spine/ts/agent/content.proto +412 -0
- package/proto/spine/ts/agent/history.proto +99 -0
- package/proto/spine/ts/agent/interaction_events.proto +367 -0
- package/proto/spine/ts/agent/model.proto +333 -0
- package/proto/spine-sources.json +28 -4
- package/spine-proto-manifest.json +14 -2
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, CodeMatters. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
5
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
10
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
11
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
12
|
+
* the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package spine.server.agent;
|
|
18
|
+
|
|
19
|
+
import "google/protobuf/any.proto";
|
|
20
|
+
import "google/protobuf/timestamp.proto";
|
|
21
|
+
import "google/protobuf/wrappers.proto";
|
|
22
|
+
import "spine/core/actor_context.proto";
|
|
23
|
+
import "spine/core/command.proto";
|
|
24
|
+
import "spine/core/event.proto";
|
|
25
|
+
import "spine/core/version.proto";
|
|
26
|
+
import "spine/options.proto";
|
|
27
|
+
import "spine/ts/agent/content.proto";
|
|
28
|
+
import "spine/ts/agent/history.proto";
|
|
29
|
+
import "spine/ts/agent/model.proto";
|
|
30
|
+
|
|
31
|
+
option (SPI_all) = true;
|
|
32
|
+
option (type_url_prefix) = "type.spine.io";
|
|
33
|
+
|
|
34
|
+
// Complete Agent instance scope within one provider tenant boundary.
|
|
35
|
+
message AgentExecutionScope {
|
|
36
|
+
// Generated Agent state type name.
|
|
37
|
+
string state_type = 1 [(required) = true];
|
|
38
|
+
|
|
39
|
+
// Canonical storage key of the typed Agent identifier.
|
|
40
|
+
string agent_key = 2 [(required) = true];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Typed original signal ID used without optional version metadata.
|
|
44
|
+
message AgentSignalKey {
|
|
45
|
+
oneof id {
|
|
46
|
+
option (choice).required = true;
|
|
47
|
+
|
|
48
|
+
// Identity of an accepted Command.
|
|
49
|
+
spine.core.CommandId command = 1 [(validate) = true];
|
|
50
|
+
|
|
51
|
+
// Identity of an accepted Event or rejection Event.
|
|
52
|
+
spine.core.EventId event = 2 [(validate) = true];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Original signal and exact Agent instance identity used for admission deduplication.
|
|
57
|
+
message AgentInvocationKey {
|
|
58
|
+
// Concrete Agent instance scope.
|
|
59
|
+
AgentExecutionScope scope = 1 [
|
|
60
|
+
(required) = true,
|
|
61
|
+
(validate) = true
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
// Original Command or Event identity, independent of an Inbox row ID.
|
|
65
|
+
AgentSignalKey source_signal = 2 [
|
|
66
|
+
(required) = true,
|
|
67
|
+
(validate) = true
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Existing Inbox acceptance order, with a deterministic source identity tie-break.
|
|
72
|
+
message AgentInboxOrder {
|
|
73
|
+
// Time at which the Inbox received the source signal.
|
|
74
|
+
google.protobuf.Timestamp received_at = 1 [
|
|
75
|
+
(required) = true,
|
|
76
|
+
(validate) = true
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
// Existing Inbox version distinguishing signals received at the same time.
|
|
80
|
+
uint64 inbox_version = 2;
|
|
81
|
+
|
|
82
|
+
// Original source signal identity when time and Inbox version tie.
|
|
83
|
+
AgentSignalKey source_signal = 3 [
|
|
84
|
+
(required) = true,
|
|
85
|
+
(validate) = true
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Revision of Agent application handler code.
|
|
90
|
+
message AgentCodeRevision {
|
|
91
|
+
// Application build revision recorded at admission.
|
|
92
|
+
string value = 1 [(required) = true];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Revision of generated Agent state and signal schemas.
|
|
96
|
+
message AgentSchemaRevision {
|
|
97
|
+
// Generated schema revision recorded at admission.
|
|
98
|
+
string value = 1 [(required) = true];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Revision of Agent execution and authorization policy.
|
|
102
|
+
message AgentPolicyRevision {
|
|
103
|
+
// Execution policy revision recorded at admission.
|
|
104
|
+
string value = 1 [(required) = true];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Closed registered handler roles permitted by Agent admission.
|
|
108
|
+
enum AgentHandlerKind {
|
|
109
|
+
// No handler role was provided.
|
|
110
|
+
AGENT_HANDLER_KIND_UNSPECIFIED = 0;
|
|
111
|
+
|
|
112
|
+
// Command assignment declared by an Agent method.
|
|
113
|
+
AGENT_HANDLER_COMMAND_ASSIGNMENT = 1;
|
|
114
|
+
|
|
115
|
+
// Event-to-Command reaction declared by a handler.
|
|
116
|
+
AGENT_HANDLER_COMMAND_REACTION = 2;
|
|
117
|
+
|
|
118
|
+
// Event reaction declared by an Agent method.
|
|
119
|
+
AGENT_HANDLER_EVENT_REACTION = 3;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Closed signal origins used by generated handler metadata.
|
|
123
|
+
enum AgentHandlerOrigin {
|
|
124
|
+
// No signal origin was provided.
|
|
125
|
+
AGENT_HANDLER_ORIGIN_UNSPECIFIED = 0;
|
|
126
|
+
|
|
127
|
+
// Signal originated in the current bounded context.
|
|
128
|
+
AGENT_HANDLER_DOMESTIC = 1;
|
|
129
|
+
|
|
130
|
+
// Signal was imported from an external bounded context.
|
|
131
|
+
AGENT_HANDLER_EXTERNAL = 2;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Selected handler identity fixed when one signal is admitted.
|
|
135
|
+
message AgentHandlerBinding {
|
|
136
|
+
// Explicit order across reactors and command reactions.
|
|
137
|
+
uint32 ordinal = 1;
|
|
138
|
+
|
|
139
|
+
// Generated Agent state receiver type.
|
|
140
|
+
string receiver_type = 2 [(required) = true];
|
|
141
|
+
|
|
142
|
+
// Registered method on the Agent receiver.
|
|
143
|
+
string method_name = 3 [(required) = true];
|
|
144
|
+
|
|
145
|
+
// Assign, React, or Command role selected at intake.
|
|
146
|
+
AgentHandlerKind kind = 4 [(required) = true];
|
|
147
|
+
|
|
148
|
+
// Generated full type name of the handled Command, Event, or rejection.
|
|
149
|
+
string signal_type = 5 [(required) = true];
|
|
150
|
+
|
|
151
|
+
// Domestic or imported external signal source requirement.
|
|
152
|
+
AgentHandlerOrigin origin = 6 [(required) = true];
|
|
153
|
+
|
|
154
|
+
// Registered handler arity.
|
|
155
|
+
uint32 parameter_count = 7;
|
|
156
|
+
|
|
157
|
+
// Optional Event field path selected by a generated equality filter.
|
|
158
|
+
string where_event_field = 8;
|
|
159
|
+
|
|
160
|
+
// Stringifier text compared by the optional Event equality filter.
|
|
161
|
+
string where_equals = 9;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Immutable original work persisted before Inbox acknowledgement.
|
|
165
|
+
message AgentAcceptedInvocation {
|
|
166
|
+
// Typed Agent and original source signal identity.
|
|
167
|
+
AgentInvocationKey key = 1 [
|
|
168
|
+
(required) = true,
|
|
169
|
+
(validate) = true
|
|
170
|
+
];
|
|
171
|
+
|
|
172
|
+
// Original concrete typed recipient identifier.
|
|
173
|
+
google.protobuf.Any recipient_id = 2 [
|
|
174
|
+
(required) = true,
|
|
175
|
+
(validate) = true
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
// Original complete Command or Event envelope.
|
|
179
|
+
oneof signal {
|
|
180
|
+
option (choice).required = true;
|
|
181
|
+
|
|
182
|
+
// Accepted Command with original message identity and context.
|
|
183
|
+
spine.core.Command command = 3 [(validate) = true];
|
|
184
|
+
|
|
185
|
+
// Accepted Event or rejection with original message identity and context.
|
|
186
|
+
spine.core.Event event = 4 [(validate) = true];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Actor context supplied to all selected handlers.
|
|
190
|
+
spine.core.ActorContext actor = 5 [
|
|
191
|
+
(required) = true,
|
|
192
|
+
(validate) = true
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
// Existing Inbox order for the accepted signal.
|
|
196
|
+
AgentInboxOrder order = 6 [
|
|
197
|
+
(required) = true,
|
|
198
|
+
(validate) = true
|
|
199
|
+
];
|
|
200
|
+
|
|
201
|
+
// Every selected handler in actual execution order.
|
|
202
|
+
repeated AgentHandlerBinding handlers = 7 [(validate) = true];
|
|
203
|
+
|
|
204
|
+
// Accepted application handler code revision.
|
|
205
|
+
AgentCodeRevision code_revision = 8 [
|
|
206
|
+
(required) = true,
|
|
207
|
+
(validate) = true
|
|
208
|
+
];
|
|
209
|
+
|
|
210
|
+
// Accepted generated schema revision.
|
|
211
|
+
AgentSchemaRevision schema_revision = 9 [
|
|
212
|
+
(required) = true,
|
|
213
|
+
(validate) = true
|
|
214
|
+
];
|
|
215
|
+
|
|
216
|
+
// Accepted execution policy revision.
|
|
217
|
+
AgentPolicyRevision policy_revision = 10 [
|
|
218
|
+
(required) = true,
|
|
219
|
+
(validate) = true
|
|
220
|
+
];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Current state of one accepted invocation.
|
|
224
|
+
enum AgentInvocationStatus {
|
|
225
|
+
// No valid execution state was recorded.
|
|
226
|
+
AGENT_INVOCATION_STATUS_UNSPECIFIED = 0;
|
|
227
|
+
|
|
228
|
+
// Accepted work is waiting for its instance claim.
|
|
229
|
+
AGENT_INVOCATION_ACCEPTED = 1;
|
|
230
|
+
|
|
231
|
+
// An exclusive token may update the current invocation.
|
|
232
|
+
AGENT_INVOCATION_ACTIVE = 2;
|
|
233
|
+
|
|
234
|
+
// Handler work committed while output delivery remains pending.
|
|
235
|
+
AGENT_INVOCATION_COMPLETED_PENDING_DELIVERY = 3;
|
|
236
|
+
|
|
237
|
+
// Handler work and all outgoing delivery were accepted.
|
|
238
|
+
AGENT_INVOCATION_COMPLETED = 4;
|
|
239
|
+
|
|
240
|
+
// Execution ended with retained failure or uncertain effect evidence.
|
|
241
|
+
AGENT_INVOCATION_TERMINATED = 5;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Whole-transition limits spanning every selected handler.
|
|
245
|
+
message AgentInvocationBounds {
|
|
246
|
+
// Maximum named operations across all selected handlers.
|
|
247
|
+
google.protobuf.UInt64Value operations = 1;
|
|
248
|
+
|
|
249
|
+
// Maximum physical model requests across the whole invocation.
|
|
250
|
+
google.protobuf.UInt64Value model_requests = 2;
|
|
251
|
+
|
|
252
|
+
// Maximum external tool calls across the whole invocation.
|
|
253
|
+
google.protobuf.UInt64Value tool_calls = 3;
|
|
254
|
+
|
|
255
|
+
// Maximum recorded query and history reads across all handlers.
|
|
256
|
+
google.protobuf.UInt64Value recorded_reads = 4;
|
|
257
|
+
|
|
258
|
+
// Maximum elapsed milliseconds after execution starts.
|
|
259
|
+
google.protobuf.UInt64Value deadline_millis = 5;
|
|
260
|
+
|
|
261
|
+
// Maximum cumulative model, tool and setup input bytes.
|
|
262
|
+
google.protobuf.UInt64Value total_input_bytes = 6;
|
|
263
|
+
|
|
264
|
+
// Maximum cumulative reserved model, tool and setup output bytes.
|
|
265
|
+
google.protobuf.UInt64Value total_output_bytes = 7;
|
|
266
|
+
|
|
267
|
+
// Maximum retained execution evidence bytes for recovery.
|
|
268
|
+
google.protobuf.UInt64Value max_recovery_bytes = 8;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Durable whole-transition charges, including unresolved reservations.
|
|
272
|
+
message AgentInvocationCounters {
|
|
273
|
+
// Named operations already charged.
|
|
274
|
+
uint64 operations = 1;
|
|
275
|
+
|
|
276
|
+
// Physical model requests already charged, including uncertain requests.
|
|
277
|
+
uint64 model_requests = 2;
|
|
278
|
+
|
|
279
|
+
// External tool calls already charged, including uncertain writes.
|
|
280
|
+
uint64 tool_calls = 3;
|
|
281
|
+
|
|
282
|
+
// Query and history reads already recorded.
|
|
283
|
+
uint64 recorded_reads = 4;
|
|
284
|
+
|
|
285
|
+
// Cumulative model, tool and setup input bytes already charged.
|
|
286
|
+
uint64 input_bytes = 5;
|
|
287
|
+
|
|
288
|
+
// Full model, tool and setup response allowances charged before dispatch.
|
|
289
|
+
uint64 reserved_output_bytes = 6;
|
|
290
|
+
|
|
291
|
+
// Exact external response bytes observed, when known.
|
|
292
|
+
uint64 received_output_bytes = 7;
|
|
293
|
+
|
|
294
|
+
// Retained execution evidence bytes already charged.
|
|
295
|
+
uint64 recovery_bytes = 8;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// Deployment and complete credential-free connection identity chosen at start.
|
|
299
|
+
message AgentSelectedModel {
|
|
300
|
+
// Generation or decision deployment role.
|
|
301
|
+
spine.ts.agent.AiModelKind kind = 1 [(required) = true];
|
|
302
|
+
|
|
303
|
+
// Application-selected model deployment reference.
|
|
304
|
+
spine.ts.agent.ModelRef model = 2 [
|
|
305
|
+
(required) = true,
|
|
306
|
+
(validate) = true
|
|
307
|
+
];
|
|
308
|
+
|
|
309
|
+
// Complete nonsecret provider, account, endpoint and model identity.
|
|
310
|
+
spine.ts.agent.AiConnectionIdentity connection = 3 [
|
|
311
|
+
(required) = true,
|
|
312
|
+
(validate) = true
|
|
313
|
+
];
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// Invocation facts fixed only when execution begins.
|
|
317
|
+
message AgentExecutionStart {
|
|
318
|
+
// Absolute deadline sampled when execution began, excluding queue wait.
|
|
319
|
+
google.protobuf.Timestamp deadline = 1 [(validate) = true];
|
|
320
|
+
|
|
321
|
+
// Entity version observed before the first selected handler.
|
|
322
|
+
spine.core.Version initial_version = 2 [
|
|
323
|
+
(required) = true,
|
|
324
|
+
(validate) = true
|
|
325
|
+
];
|
|
326
|
+
|
|
327
|
+
// Whole-invocation limits, distinct from limits of each model call.
|
|
328
|
+
AgentInvocationBounds bounds = 3 [(validate) = true];
|
|
329
|
+
|
|
330
|
+
// Selected deployment and connection identity for each model kind.
|
|
331
|
+
repeated AgentSelectedModel models = 4 [(validate) = true];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Safe operational failure retained for exact replay.
|
|
335
|
+
message AgentSavedFailure {
|
|
336
|
+
// Failure category exposed by the application-facing facade.
|
|
337
|
+
spine.ts.agent.AiFailureCode code = 1 [(required) = true];
|
|
338
|
+
|
|
339
|
+
// Whether another accepted signal may make a fresh attempt.
|
|
340
|
+
bool retryable_by_new_signal = 2;
|
|
341
|
+
|
|
342
|
+
// Safe diagnostic reference, without credential or raw exception text.
|
|
343
|
+
spine.ts.agent.AiDiagnosticId diagnostic = 3 [
|
|
344
|
+
(required) = true,
|
|
345
|
+
(validate) = true
|
|
346
|
+
];
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Exact named model call admitted for deterministic recovery.
|
|
350
|
+
message AgentNamedOperation {
|
|
351
|
+
// Selected handler binding that called this name.
|
|
352
|
+
uint32 handler_ordinal = 1;
|
|
353
|
+
|
|
354
|
+
// Name unique within the active handler binding.
|
|
355
|
+
string call_name = 2 [(required) = true];
|
|
356
|
+
|
|
357
|
+
// Explicit conversation continued by this operation.
|
|
358
|
+
spine.ts.agent.ConversationId conversation = 3 [
|
|
359
|
+
(required) = true,
|
|
360
|
+
(validate) = true
|
|
361
|
+
];
|
|
362
|
+
|
|
363
|
+
// Logical operation reused during recovery.
|
|
364
|
+
spine.ts.agent.AiOperationId operation = 4 [
|
|
365
|
+
(required) = true,
|
|
366
|
+
(validate) = true
|
|
367
|
+
];
|
|
368
|
+
|
|
369
|
+
// Effective bounds for this one model operation.
|
|
370
|
+
spine.ts.agent.AiOperationLimits limits = 5 [(validate) = true];
|
|
371
|
+
|
|
372
|
+
// Exact dynamic typed application facts before backend rendering.
|
|
373
|
+
google.protobuf.Any input = 6 [
|
|
374
|
+
(required) = true,
|
|
375
|
+
(validate) = true
|
|
376
|
+
];
|
|
377
|
+
|
|
378
|
+
// Accepted capability identity.
|
|
379
|
+
spine.ts.agent.AiCapabilityName capability = 7 [
|
|
380
|
+
(required) = true,
|
|
381
|
+
(validate) = true
|
|
382
|
+
];
|
|
383
|
+
|
|
384
|
+
// Accepted capability definition revision.
|
|
385
|
+
spine.ts.agent.AiCapabilityRevision capability_revision = 8 [
|
|
386
|
+
(required) = true,
|
|
387
|
+
(validate) = true
|
|
388
|
+
];
|
|
389
|
+
|
|
390
|
+
// Accepted pure validation rule revision, when applicable.
|
|
391
|
+
spine.ts.agent.AiValidationRevision validation_revision = 9 [(validate) = true];
|
|
392
|
+
|
|
393
|
+
// Accepted decision mapping revision, when applicable.
|
|
394
|
+
spine.ts.agent.AiMappingRevision mapping_revision = 10 [(validate) = true];
|
|
395
|
+
|
|
396
|
+
// Admitted dynamic typed output or safe terminal failure.
|
|
397
|
+
oneof result {
|
|
398
|
+
// Validated typed application result returned to the handler.
|
|
399
|
+
google.protobuf.Any admitted_output = 11 [(validate) = true];
|
|
400
|
+
|
|
401
|
+
// Recorded failure returned to the handler.
|
|
402
|
+
AgentSavedFailure failure = 12 [(validate) = true];
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Provider and validation outcome associated with the recorded result.
|
|
406
|
+
spine.ts.agent.AiOutcome outcome = 13;
|
|
407
|
+
|
|
408
|
+
// Safe recorded diagnostics that do not terminate this operation.
|
|
409
|
+
repeated AgentSavedFailure diagnostics = 14 [(validate) = true];
|
|
410
|
+
|
|
411
|
+
// Absolute operation deadline fixed at creation and bounded by the invocation deadline.
|
|
412
|
+
google.protobuf.Timestamp deadline = 15 [(validate) = true];
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// Indexed history view selected by a recorded Agent read.
|
|
416
|
+
enum AgentHistoryReadKind {
|
|
417
|
+
// No history view was selected.
|
|
418
|
+
AGENT_HISTORY_READ_UNSPECIFIED = 0;
|
|
419
|
+
|
|
420
|
+
// Conversation records, System Events and emitted domain Events.
|
|
421
|
+
AGENT_HISTORY_READ_FULL = 1;
|
|
422
|
+
|
|
423
|
+
// Records from one explicitly identified conversation.
|
|
424
|
+
AGENT_HISTORY_READ_CONVERSATION = 2;
|
|
425
|
+
|
|
426
|
+
// System Events concerning this Agent.
|
|
427
|
+
AGENT_HISTORY_READ_SYSTEM = 3;
|
|
428
|
+
|
|
429
|
+
// Domain Events emitted by this Agent.
|
|
430
|
+
AGENT_HISTORY_READ_DOMAIN = 4;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Exact history request whose result is reused after interruption.
|
|
434
|
+
message AgentHistoryReadRequest {
|
|
435
|
+
// Indexed view used for this read.
|
|
436
|
+
AgentHistoryReadKind kind = 1 [(required) = true];
|
|
437
|
+
|
|
438
|
+
// Required only when the selected view is one conversation.
|
|
439
|
+
spine.ts.agent.ConversationId conversation = 2 [(validate) = true];
|
|
440
|
+
|
|
441
|
+
// Positive maximum number of requested entries.
|
|
442
|
+
uint64 page_size = 3 [(min).value = "1"];
|
|
443
|
+
|
|
444
|
+
// Original opaque continuation; absent on the first page.
|
|
445
|
+
spine.ts.agent.AgentHistoryCursor cursor = 4 [(validate) = true];
|
|
446
|
+
|
|
447
|
+
// Optional positive serialized-byte bound applied to this page.
|
|
448
|
+
google.protobuf.UInt64Value max_bytes = 5;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// Complete provider page returned by one recorded history read.
|
|
452
|
+
message AgentHistoryReadPage {
|
|
453
|
+
// Exact original entries, in newest-first order.
|
|
454
|
+
repeated spine.ts.agent.AgentHistoryEntry entries = 1 [(validate) = true];
|
|
455
|
+
|
|
456
|
+
// Whether another entry followed this page when the read occurred.
|
|
457
|
+
bool has_more = 2;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// Complete typed projection states returned by one recorded Agent query.
|
|
461
|
+
message AgentProjectionReadResult {
|
|
462
|
+
// State snapshots in the exact order returned to the handler.
|
|
463
|
+
repeated google.protobuf.Any states = 1 [(validate) = true];
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// Exact projection or Agent-history read reused after interruption.
|
|
467
|
+
message AgentReadSnapshot {
|
|
468
|
+
// Selected handler binding that made this read.
|
|
469
|
+
uint32 handler_ordinal = 1;
|
|
470
|
+
|
|
471
|
+
// Name unique within the active handler binding.
|
|
472
|
+
string read_name = 2 [(required) = true];
|
|
473
|
+
|
|
474
|
+
// Exact typed query or history-read request.
|
|
475
|
+
google.protobuf.Any request = 3 [
|
|
476
|
+
(required) = true,
|
|
477
|
+
(validate) = true
|
|
478
|
+
];
|
|
479
|
+
|
|
480
|
+
// Exact typed result returned to the handler.
|
|
481
|
+
google.protobuf.Any result = 4 [
|
|
482
|
+
(required) = true,
|
|
483
|
+
(validate) = true
|
|
484
|
+
];
|
|
485
|
+
|
|
486
|
+
// Agent scope under which the read was authorized.
|
|
487
|
+
AgentExecutionScope scope = 5 [
|
|
488
|
+
(required) = true,
|
|
489
|
+
(validate) = true
|
|
490
|
+
];
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// One local validation issue retained for exact attempt replay.
|
|
494
|
+
message AgentValidationIssue {
|
|
495
|
+
// Machine-readable issue category from the validator.
|
|
496
|
+
string code = 1 [(required) = true];
|
|
497
|
+
|
|
498
|
+
// Field path; empty when the issue applies to the root value.
|
|
499
|
+
string path = 2;
|
|
500
|
+
|
|
501
|
+
// Human-readable issue detail returned by the validator.
|
|
502
|
+
string message = 3 [(required) = true];
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// One physical request reservation and its exact observed progress.
|
|
506
|
+
message AgentAttemptEvidence {
|
|
507
|
+
// Logical operation that admitted this physical request.
|
|
508
|
+
spine.ts.agent.AiOperationId operation = 1 [
|
|
509
|
+
(required) = true,
|
|
510
|
+
(validate) = true
|
|
511
|
+
];
|
|
512
|
+
|
|
513
|
+
// Distinct identity of this physical provider request.
|
|
514
|
+
spine.ts.agent.AiAttemptId attempt = 2 [
|
|
515
|
+
(required) = true,
|
|
516
|
+
(validate) = true
|
|
517
|
+
];
|
|
518
|
+
|
|
519
|
+
// One-based physical request number shared by runtime and adapter.
|
|
520
|
+
uint64 physical_attempt = 3;
|
|
521
|
+
|
|
522
|
+
// Full response allowance charged before provider dispatch.
|
|
523
|
+
uint64 reserved_response_bytes = 4;
|
|
524
|
+
|
|
525
|
+
// Exact received bytes when observed; absence means an interrupted unknown amount.
|
|
526
|
+
google.protobuf.UInt64Value received_bytes = 5 [(validate) = true];
|
|
527
|
+
|
|
528
|
+
// Actual prepared generation or decision request sent to the provider.
|
|
529
|
+
oneof prepared_request {
|
|
530
|
+
// Generated request including rendered instructions and corrections.
|
|
531
|
+
spine.ts.agent.GenerationRequest generation_request = 6 [(validate) = true];
|
|
532
|
+
|
|
533
|
+
// Direct declared decision questions and typed input.
|
|
534
|
+
spine.ts.agent.DecisionRequest decision_request = 7 [(validate) = true];
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// Complete received generation or decision response when known.
|
|
538
|
+
oneof response {
|
|
539
|
+
// Exact received generation content and admitted result when any.
|
|
540
|
+
spine.ts.agent.GenerationResponse generation_response = 8 [(validate) = true];
|
|
541
|
+
|
|
542
|
+
// Exact received decision content and admitted result when any.
|
|
543
|
+
spine.ts.agent.DecisionResponse decision_response = 9 [(validate) = true];
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// Outcome after provider and local validation.
|
|
547
|
+
spine.ts.agent.AiOutcome outcome = 10;
|
|
548
|
+
|
|
549
|
+
// Ordered local validation issues used to replay this physical attempt.
|
|
550
|
+
repeated AgentValidationIssue validation_issues = 11 [(validate) = true];
|
|
551
|
+
|
|
552
|
+
// Exact serialized provider request-body bytes charged before dispatch.
|
|
553
|
+
uint64 input_bytes = 12;
|
|
554
|
+
|
|
555
|
+
// The transport barrier completed, including when no response ceiling is configured.
|
|
556
|
+
bool transport_reserved = 13;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// Persisted tool intent and observed result, including uncertain writes.
|
|
560
|
+
message AgentToolEvidence {
|
|
561
|
+
// Logical operation that requested the tool.
|
|
562
|
+
spine.ts.agent.AiOperationId operation = 1 [
|
|
563
|
+
(required) = true,
|
|
564
|
+
(validate) = true
|
|
565
|
+
];
|
|
566
|
+
|
|
567
|
+
// Physical provider attempt whose model output proposed the call.
|
|
568
|
+
spine.ts.agent.AiAttemptId requesting_attempt = 2 [
|
|
569
|
+
(required) = true,
|
|
570
|
+
(validate) = true
|
|
571
|
+
];
|
|
572
|
+
|
|
573
|
+
// Nonblank provider correlation ID, unique within this operation and attempt.
|
|
574
|
+
string provider_call_id = 3 [(required) = true];
|
|
575
|
+
|
|
576
|
+
// Authorized request with effect category and validated arguments.
|
|
577
|
+
spine.ts.agent.ToolRequest request = 4 [
|
|
578
|
+
(required) = true,
|
|
579
|
+
(validate) = true
|
|
580
|
+
];
|
|
581
|
+
|
|
582
|
+
// Complete observed tool result, absent when dispatch outcome is unknown.
|
|
583
|
+
spine.ts.agent.ToolResponse response = 5 [(validate) = true];
|
|
584
|
+
|
|
585
|
+
// Whether dispatch was known to have begun.
|
|
586
|
+
bool dispatched = 6;
|
|
587
|
+
|
|
588
|
+
// Unresolved write effect retained without automatic resend.
|
|
589
|
+
bool outcome_unknown = 7;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// Framework reservation identity distinct from the MCP wire request ID.
|
|
593
|
+
message AgentProtocolTicketId {
|
|
594
|
+
// Nonblank identity assigned before the physical protocol send.
|
|
595
|
+
string value = 1 [(required) = true];
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
// Phase of one physical MCP protocol exchange.
|
|
599
|
+
enum AgentProtocolPhase {
|
|
600
|
+
// No phase was selected.
|
|
601
|
+
AGENT_PROTOCOL_PHASE_UNSPECIFIED = 0;
|
|
602
|
+
|
|
603
|
+
// Connection setup or tool discovery before any tool intent.
|
|
604
|
+
AGENT_PROTOCOL_SETUP = 1;
|
|
605
|
+
|
|
606
|
+
// Authorized physical call for a previously journaled tool intent.
|
|
607
|
+
AGENT_PROTOCOL_CALL = 2;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// Fenced reservation and observed receipt for one physical MCP exchange.
|
|
611
|
+
message AgentProtocolEvidence {
|
|
612
|
+
// Named model operation that admitted this protocol exchange.
|
|
613
|
+
spine.ts.agent.AiOperationId operation = 1 [
|
|
614
|
+
(required) = true,
|
|
615
|
+
(validate) = true
|
|
616
|
+
];
|
|
617
|
+
|
|
618
|
+
// Configured MCP server selected for this exchange.
|
|
619
|
+
spine.ts.agent.McpServerId server = 2 [
|
|
620
|
+
(required) = true,
|
|
621
|
+
(validate) = true
|
|
622
|
+
];
|
|
623
|
+
|
|
624
|
+
// Framework ticket, distinct from the MCP wire request ID.
|
|
625
|
+
AgentProtocolTicketId ticket = 3 [
|
|
626
|
+
(required) = true,
|
|
627
|
+
(validate) = true
|
|
628
|
+
];
|
|
629
|
+
|
|
630
|
+
// Setup or authorized tool-call phase.
|
|
631
|
+
AgentProtocolPhase phase = 4 [(required) = true];
|
|
632
|
+
|
|
633
|
+
// Exact textual JSON-RPC method used for the physical exchange.
|
|
634
|
+
string method = 5 [(required) = true];
|
|
635
|
+
|
|
636
|
+
// Input bytes charged before any physical send.
|
|
637
|
+
uint64 input_bytes = 6;
|
|
638
|
+
|
|
639
|
+
// Full response credit reserved before any physical send.
|
|
640
|
+
uint64 reserved_response_bytes = 7;
|
|
641
|
+
|
|
642
|
+
// Exact known receipt; absence retains the full uncertain response credit.
|
|
643
|
+
google.protobuf.UInt64Value received_bytes = 8 [(validate) = true];
|
|
644
|
+
|
|
645
|
+
// Previously journaled tool intent for a call; absent during setup.
|
|
646
|
+
spine.ts.agent.AiToolCallId tool_call = 9 [(validate) = true];
|
|
647
|
+
|
|
648
|
+
// Whether the physical exchange reached a recorded terminal observation.
|
|
649
|
+
bool settled = 10;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
// One persisted step in the deterministic handler replay sequence.
|
|
653
|
+
message AgentExecutionJournalEntry {
|
|
654
|
+
// Ordered replay position within one invocation, never a history position.
|
|
655
|
+
uint64 ordinal = 1;
|
|
656
|
+
|
|
657
|
+
// One model operation, read, provider attempt or tool observation.
|
|
658
|
+
oneof evidence {
|
|
659
|
+
option (choice).required = true;
|
|
660
|
+
|
|
661
|
+
// Named logical model operation.
|
|
662
|
+
AgentNamedOperation operation = 2 [(validate) = true];
|
|
663
|
+
|
|
664
|
+
// Exact query or history read snapshot.
|
|
665
|
+
AgentReadSnapshot read = 3 [(validate) = true];
|
|
666
|
+
|
|
667
|
+
// Reserved or observed physical model request.
|
|
668
|
+
AgentAttemptEvidence attempt = 4 [(validate) = true];
|
|
669
|
+
|
|
670
|
+
// Reserved or observed external tool call.
|
|
671
|
+
AgentToolEvidence tool = 5 [(validate) = true];
|
|
672
|
+
|
|
673
|
+
// Reserved or observed physical MCP protocol exchange.
|
|
674
|
+
AgentProtocolEvidence protocol = 6 [(validate) = true];
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// Closed saved-output dispatcher roles, independent of registration position.
|
|
679
|
+
enum AgentSavedTargetKind {
|
|
680
|
+
// No saved dispatcher is selected.
|
|
681
|
+
AGENT_SAVED_TARGET_UNSPECIFIED = 0;
|
|
682
|
+
|
|
683
|
+
// A generated repository accepts this Event.
|
|
684
|
+
AGENT_SAVED_REPOSITORY_EVENT = 1;
|
|
685
|
+
|
|
686
|
+
// A generated repository accepts this Command.
|
|
687
|
+
AGENT_SAVED_REPOSITORY_COMMAND = 2;
|
|
688
|
+
|
|
689
|
+
// A generated standalone handler accepts this Event.
|
|
690
|
+
AGENT_SAVED_STANDALONE_EVENT = 3;
|
|
691
|
+
|
|
692
|
+
// A generated standalone handler accepts this Command.
|
|
693
|
+
AGENT_SAVED_STANDALONE_COMMAND = 4;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// Generated repository family used when rebinding an accepted recipient.
|
|
697
|
+
enum AgentSavedRepositoryFamily {
|
|
698
|
+
// No generated repository family was selected.
|
|
699
|
+
AGENT_SAVED_FAMILY_UNSPECIFIED = 0;
|
|
700
|
+
|
|
701
|
+
// Aggregate repository.
|
|
702
|
+
AGENT_SAVED_AGGREGATE = 1;
|
|
703
|
+
|
|
704
|
+
// Projection repository.
|
|
705
|
+
AGENT_SAVED_PROJECTION = 2;
|
|
706
|
+
|
|
707
|
+
// Process Manager repository.
|
|
708
|
+
AGENT_SAVED_PROCESS_MANAGER = 3;
|
|
709
|
+
|
|
710
|
+
// Agent repository.
|
|
711
|
+
AGENT_SAVED_AGENT = 4;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// One ordered validated dispatcher and its exact typed recipients.
|
|
715
|
+
message AgentSavedDispatchTarget {
|
|
716
|
+
// Closed dispatcher role; a matching runtime binding must still exist.
|
|
717
|
+
AgentSavedTargetKind kind = 1 [(required) = true];
|
|
718
|
+
|
|
719
|
+
// Generated repository state type, absent for a standalone handler.
|
|
720
|
+
string receiver_state_type = 2;
|
|
721
|
+
|
|
722
|
+
// Generated repository family, absent for a standalone handler.
|
|
723
|
+
AgentSavedRepositoryFamily repository_family = 3;
|
|
724
|
+
|
|
725
|
+
// Accepted signal message type used by this dispatcher.
|
|
726
|
+
string signal_type = 4 [(required) = true];
|
|
727
|
+
|
|
728
|
+
// Complete selected generated handler metadata fingerprint.
|
|
729
|
+
string binding_fingerprint = 5 [(required) = true];
|
|
730
|
+
|
|
731
|
+
// Exact typed repository recipients in accepted order; empty when filtered.
|
|
732
|
+
repeated google.protobuf.Any recipients = 6 [(validate) = true];
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
// Presence distinguishes a prepared empty route from an unprepared output.
|
|
736
|
+
message AgentSavedDispatchPlan {
|
|
737
|
+
// Applicable dispatchers in their accepted order.
|
|
738
|
+
repeated AgentSavedDispatchTarget targets = 1 [(validate) = true];
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
// Original outgoing envelope retained until normal delivery accepts its ID.
|
|
742
|
+
message AgentOutgoingSignal {
|
|
743
|
+
// Original envelope and ID for normal delivery.
|
|
744
|
+
oneof signal {
|
|
745
|
+
option (choice).required = true;
|
|
746
|
+
|
|
747
|
+
// Native Event emitted by the completed Agent transition.
|
|
748
|
+
spine.core.Event event = 1 [(validate) = true];
|
|
749
|
+
|
|
750
|
+
// Native Command emitted by a selected command reaction.
|
|
751
|
+
spine.core.Command command = 2 [(validate) = true];
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
// Normal delivery accepted this envelope's original message ID.
|
|
755
|
+
bool delivered = 3;
|
|
756
|
+
|
|
757
|
+
// Frozen target plan persisted before any transport side effect.
|
|
758
|
+
AgentSavedDispatchPlan plan = 4 [(validate) = true];
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
// Terminal transition result and pending delivery obligations.
|
|
762
|
+
message AgentExecutionCompletion {
|
|
763
|
+
// Version read before execution of the selected handlers.
|
|
764
|
+
spine.core.Version initial_version = 1 [
|
|
765
|
+
(required) = true,
|
|
766
|
+
(validate) = true
|
|
767
|
+
];
|
|
768
|
+
|
|
769
|
+
// Version after one persisted transition, equal to initial for a no-op.
|
|
770
|
+
spine.core.Version resulting_version = 2 [
|
|
771
|
+
(required) = true,
|
|
772
|
+
(validate) = true
|
|
773
|
+
];
|
|
774
|
+
|
|
775
|
+
// Current per-model preferences made visible with completion.
|
|
776
|
+
repeated spine.ts.agent.ModelPreference preferences = 3 [(validate) = true];
|
|
777
|
+
|
|
778
|
+
// Original outgoing signals and delivery state.
|
|
779
|
+
repeated AgentOutgoingSignal outgoing = 4 [(validate) = true];
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// Complete provider record for one accepted Agent signal.
|
|
783
|
+
message AgentExecutionRecord {
|
|
784
|
+
// Immutable source envelope and selected handler bindings.
|
|
785
|
+
AgentAcceptedInvocation accepted = 1 [
|
|
786
|
+
(required) = true,
|
|
787
|
+
(validate) = true
|
|
788
|
+
];
|
|
789
|
+
|
|
790
|
+
// Current execution and delivery phase.
|
|
791
|
+
AgentInvocationStatus status = 2 [(required) = true];
|
|
792
|
+
|
|
793
|
+
// Exact exclusive claim token; absent before claim or after release.
|
|
794
|
+
string claim_token = 3;
|
|
795
|
+
|
|
796
|
+
// Time after which another claim may replace this token.
|
|
797
|
+
google.protobuf.Timestamp claim_expires_at = 4 [(validate) = true];
|
|
798
|
+
|
|
799
|
+
// Chosen limits, models and initial version after execution starts.
|
|
800
|
+
AgentExecutionStart started = 5 [(validate) = true];
|
|
801
|
+
|
|
802
|
+
// Ordered evidence used to resume without repeating settled work.
|
|
803
|
+
repeated AgentExecutionJournalEntry journal = 6 [(validate) = true];
|
|
804
|
+
|
|
805
|
+
// Preference changes waiting for atomic transition completion.
|
|
806
|
+
repeated spine.ts.agent.ModelPreference staged_preferences = 7 [(validate) = true];
|
|
807
|
+
|
|
808
|
+
// Committed transition result and remaining delivery obligations.
|
|
809
|
+
AgentExecutionCompletion completion = 8 [(validate) = true];
|
|
810
|
+
|
|
811
|
+
// Safe diagnostic for a terminal invocation failure.
|
|
812
|
+
spine.ts.agent.AiDiagnosticId terminal_failure = 9 [(validate) = true];
|
|
813
|
+
|
|
814
|
+
// Mutable charges updated only under the current claim fence.
|
|
815
|
+
AgentInvocationCounters counters = 10 [(validate) = true];
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// Per-instance claim and current preference row serializing accepted work.
|
|
819
|
+
message AgentExecutionHead {
|
|
820
|
+
// Complete Agent instance identity within its provider tenant.
|
|
821
|
+
AgentExecutionScope scope = 1 [
|
|
822
|
+
(required) = true,
|
|
823
|
+
(validate) = true
|
|
824
|
+
];
|
|
825
|
+
|
|
826
|
+
// Currently claimed invocation; unset when no transition is active.
|
|
827
|
+
AgentInvocationKey active = 2 [(validate) = true];
|
|
828
|
+
|
|
829
|
+
// Current exclusive claim token for this Agent instance.
|
|
830
|
+
string claim_token = 3;
|
|
831
|
+
|
|
832
|
+
// Expiry of the current claim token.
|
|
833
|
+
google.protobuf.Timestamp claim_expires_at = 4 [(validate) = true];
|
|
834
|
+
|
|
835
|
+
// Queryable current model preferences after completed transitions.
|
|
836
|
+
repeated spine.ts.agent.ModelPreference preferences = 5 [(validate) = true];
|
|
837
|
+
|
|
838
|
+
// Existing Inbox order of the latest resolved invocation.
|
|
839
|
+
AgentInboxOrder last_resolved = 6 [(validate) = true];
|
|
840
|
+
|
|
841
|
+
// Earliest unresolved invocation selected by its original Inbox order.
|
|
842
|
+
AgentInvocationKey pending = 7 [(validate) = true];
|
|
843
|
+
|
|
844
|
+
// Original Inbox order of the pending invocation.
|
|
845
|
+
AgentInboxOrder pending_order = 8 [(validate) = true];
|
|
846
|
+
|
|
847
|
+
// Provider time at which the pending invocation may enter discovery.
|
|
848
|
+
google.protobuf.Timestamp eligible_at = 9 [(validate) = true];
|
|
849
|
+
}
|