@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.
Files changed (50) hide show
  1. package/dist/generated/proto-module.d.ts +7 -1
  2. package/dist/generated/proto-module.d.ts.map +1 -1
  3. package/dist/generated/proto-module.js +53 -17
  4. package/dist/generated/proto-module.js.map +1 -1
  5. package/dist/generated/spine/server/agent/execution_record_pb.d.ts +1781 -0
  6. package/dist/generated/spine/server/agent/execution_record_pb.d.ts.map +1 -0
  7. package/dist/generated/spine/server/agent/execution_record_pb.js +490 -0
  8. package/dist/generated/spine/server/agent/execution_record_pb.js.map +1 -0
  9. package/dist/generated/spine/server/agent/history_record_pb.d.ts +66 -0
  10. package/dist/generated/spine/server/agent/history_record_pb.d.ts.map +1 -0
  11. package/dist/generated/spine/server/agent/history_record_pb.js +25 -0
  12. package/dist/generated/spine/server/agent/history_record_pb.js.map +1 -0
  13. package/dist/generated/spine/ts/agent/content_pb.d.ts +963 -0
  14. package/dist/generated/spine/ts/agent/content_pb.d.ts.map +1 -0
  15. package/dist/generated/spine/ts/agent/content_pb.js +258 -0
  16. package/dist/generated/spine/ts/agent/content_pb.js.map +1 -0
  17. package/dist/generated/spine/ts/agent/history_pb.d.ts +165 -0
  18. package/dist/generated/spine/ts/agent/history_pb.d.ts.map +1 -0
  19. package/dist/generated/spine/ts/agent/history_pb.js +39 -0
  20. package/dist/generated/spine/ts/agent/history_pb.js.map +1 -0
  21. package/dist/generated/spine/ts/agent/interaction_events_pb.d.ts +541 -0
  22. package/dist/generated/spine/ts/agent/interaction_events_pb.d.ts.map +1 -0
  23. package/dist/generated/spine/ts/agent/interaction_events_pb.js +76 -0
  24. package/dist/generated/spine/ts/agent/interaction_events_pb.js.map +1 -0
  25. package/dist/generated/spine/ts/agent/model_pb.d.ts +870 -0
  26. package/dist/generated/spine/ts/agent/model_pb.d.ts.map +1 -0
  27. package/dist/generated/spine/ts/agent/model_pb.js +404 -0
  28. package/dist/generated/spine/ts/agent/model_pb.js.map +1 -0
  29. package/dist/src/agent/index.d.ts +38 -0
  30. package/dist/src/agent/index.d.ts.map +1 -0
  31. package/dist/src/agent/index.js +47 -0
  32. package/dist/src/agent/index.js.map +1 -0
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/generated/.spine-proto-generation.json +1 -1
  35. package/generated/proto-module.ts +53 -17
  36. package/generated/spine/server/agent/execution_record_pb.ts +2034 -0
  37. package/generated/spine/server/agent/history_record_pb.ts +85 -0
  38. package/generated/spine/ts/agent/content_pb.ts +1103 -0
  39. package/generated/spine/ts/agent/history_pb.ts +194 -0
  40. package/generated/spine/ts/agent/interaction_events_pb.ts +639 -0
  41. package/generated/spine/ts/agent/model_pb.ts +1014 -0
  42. package/package.json +5 -1
  43. package/proto/spine/server/agent/execution_record.proto +849 -0
  44. package/proto/spine/server/agent/history_record.proto +47 -0
  45. package/proto/spine/ts/agent/content.proto +412 -0
  46. package/proto/spine/ts/agent/history.proto +99 -0
  47. package/proto/spine/ts/agent/interaction_events.proto +367 -0
  48. package/proto/spine/ts/agent/model.proto +333 -0
  49. package/proto/spine-sources.json +28 -4
  50. package/spine-proto-manifest.json +14 -2
@@ -0,0 +1,367 @@
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.ts.agent;
18
+
19
+ import "google/protobuf/timestamp.proto";
20
+ import "spine/core/diagnostics.proto";
21
+ import "spine/options.proto";
22
+ import "spine/ts/agent/content.proto";
23
+ import "spine/ts/agent/model.proto";
24
+
25
+ option (type_url_prefix) = "type.spine.io";
26
+
27
+ // Correlates a model interaction with the Agent and triggering signal.
28
+ message AgentOperationRef {
29
+ // Logical operation including bounded corrective attempts.
30
+ AiOperationId operation = 1 [
31
+ (required) = true,
32
+ (validate) = true
33
+ ];
34
+
35
+ // Canonical reference to Agent state type and concrete instance ID.
36
+ spine.core.MessageId agent = 2 [
37
+ (required) = true,
38
+ (validate) = true
39
+ ];
40
+
41
+ // Canonical reference to the handled command, event or rejection.
42
+ spine.core.MessageId source_signal = 3 [
43
+ (required) = true,
44
+ (validate) = true
45
+ ];
46
+
47
+ // Selected deployment and configuration revision.
48
+ ModelRef model = 4 [
49
+ (required) = true,
50
+ (validate) = true
51
+ ];
52
+
53
+ // Generation or decision; unspecified values are invalid.
54
+ AiModelKind kind = 5 [(required) = true];
55
+
56
+ // Explicit conversation continued by this operation.
57
+ ConversationId conversation = 6 [
58
+ (required) = true,
59
+ (validate) = true
60
+ ];
61
+ }
62
+
63
+ // Accepted named model operation and its fixed execution contract.
64
+ message AgentAiOperationStarted {
65
+ // Operation and accepted signal identity.
66
+ AgentOperationRef operation = 1 [
67
+ (required) = true,
68
+ (validate) = true
69
+ ];
70
+
71
+ // Application capability name.
72
+ AiCapabilityName capability = 2 [
73
+ (required) = true,
74
+ (validate) = true
75
+ ];
76
+
77
+ // Capability definition revision.
78
+ AiCapabilityRevision capability_revision = 3 [
79
+ (required) = true,
80
+ (validate) = true
81
+ ];
82
+
83
+ // Identity of typed input facts.
84
+ AiContentDigest input = 4 [
85
+ (required) = true,
86
+ (validate) = true
87
+ ];
88
+
89
+ // Effective physical, tool, time and byte limits.
90
+ AiOperationLimits limits = 5 [(validate) = true];
91
+
92
+ // Non-secret connection identity after authorization.
93
+ AiConnectionIdentity connection = 6 [(validate) = true];
94
+
95
+ // Occurrence time from Spine Time.
96
+ google.protobuf.Timestamp started_at = 7 [
97
+ (required) = true,
98
+ (validate) = true
99
+ ];
100
+
101
+ // Effective generation or direct decision execution mode.
102
+ AiExecutionMode mode = 8 [(required) = true];
103
+ }
104
+
105
+ // One physical provider request is about to be dispatched.
106
+ message AgentModelAttemptStarted {
107
+ // Logical interaction to which the request belongs.
108
+ AgentOperationRef operation = 1 [
109
+ (required) = true,
110
+ (validate) = true
111
+ ];
112
+
113
+ // Identity unique to this physical request.
114
+ AiAttemptId attempt = 2 [
115
+ (required) = true,
116
+ (validate) = true
117
+ ];
118
+
119
+ // Time the attempt was recorded using Spine Time.
120
+ google.protobuf.Timestamp started_at = 3 [
121
+ (required) = true,
122
+ (validate) = true
123
+ ];
124
+
125
+ // Actual prepared request identity, excluding credentials.
126
+ AiContentDigest request = 4 [
127
+ (required) = true,
128
+ (validate) = true
129
+ ];
130
+
131
+ // Earlier attempt being corrected; absent for the first attempt.
132
+ AiAttemptId previous_attempt = 5 [(validate) = true];
133
+ }
134
+
135
+ // Completion or failure of one physical provider request.
136
+ message AgentModelAttemptFinished {
137
+ // Logical operation that admitted the physical request.
138
+ AgentOperationRef operation = 1 [
139
+ (required) = true,
140
+ (validate) = true
141
+ ];
142
+
143
+ // Physical request identity.
144
+ AiAttemptId attempt = 2 [
145
+ (required) = true,
146
+ (validate) = true
147
+ ];
148
+
149
+ // Provider and local result status; TOOL_REQUESTED closes this attempt, not its operation.
150
+ AiOutcome outcome = 3 [(required) = true];
151
+
152
+ // Received content identity, absent if no response was received.
153
+ AiContentDigest response = 4 [(validate) = true];
154
+
155
+ // Provider usage when reported.
156
+ AiUsage usage = 5 [(validate) = true];
157
+
158
+ // Occurrence time from Spine Time.
159
+ google.protobuf.Timestamp finished_at = 6 [
160
+ (required) = true,
161
+ (validate) = true
162
+ ];
163
+
164
+ // Safe diagnostic reference for a non-admitted outcome.
165
+ AiDiagnosticId diagnostic_id = 7 [(validate) = true];
166
+
167
+ // Safe failure category when the physical attempt failed.
168
+ AiFailureCode failure = 8;
169
+ }
170
+
171
+ // Typed result passed local validation and was saved for recovery.
172
+ message AgentAiResultAdmitted {
173
+ // Logical operation producing the result.
174
+ AgentOperationRef operation = 1 [
175
+ (required) = true,
176
+ (validate) = true
177
+ ];
178
+
179
+ // Identity of the typed admitted output.
180
+ AiContentDigest result = 2 [
181
+ (required) = true,
182
+ (validate) = true
183
+ ];
184
+
185
+ // Validation revision pinned to the invocation.
186
+ AiValidationRevision validation_revision = 3 [
187
+ (required) = true,
188
+ (validate) = true
189
+ ];
190
+
191
+ // Decision mapping revision, absent for generation.
192
+ AiMappingRevision mapping_revision = 4 [(validate) = true];
193
+
194
+ // Occurrence time from Spine Time.
195
+ google.protobuf.Timestamp admitted_at = 5 [
196
+ (required) = true,
197
+ (validate) = true
198
+ ];
199
+ }
200
+
201
+ // Logical model operation ended without an admitted result.
202
+ message AgentAiOperationFailed {
203
+ // Logical operation that failed.
204
+ AgentOperationRef operation = 1 [
205
+ (required) = true,
206
+ (validate) = true
207
+ ];
208
+
209
+ // Safe terminal failure category; TOOL_REQUESTED is invalid here.
210
+ AiOutcome outcome = 2 [(required) = true];
211
+
212
+ // Diagnostic reference containing no credential or raw exception.
213
+ AiDiagnosticId diagnostic_id = 3 [
214
+ (required) = true,
215
+ (validate) = true
216
+ ];
217
+
218
+ // Last physical attempt if dispatch began.
219
+ AiAttemptId attempt = 4 [(validate) = true];
220
+
221
+ // Occurrence time from Spine Time.
222
+ google.protobuf.Timestamp failed_at = 5 [
223
+ (required) = true,
224
+ (validate) = true
225
+ ];
226
+
227
+ // Safe operational failure category.
228
+ AiFailureCode failure = 6 [(required) = true];
229
+ }
230
+
231
+ // An authorized external tool call was recorded before dispatch.
232
+ message AgentToolCallStarted {
233
+ // Logical operation requesting the tool.
234
+ AgentOperationRef operation = 1 [
235
+ (required) = true,
236
+ (validate) = true
237
+ ];
238
+
239
+ // Provider attempt that requested the tool.
240
+ AiAttemptId attempt = 2 [
241
+ (required) = true,
242
+ (validate) = true
243
+ ];
244
+
245
+ // Spine-assigned tool call identity.
246
+ AiToolCallId call = 3 [
247
+ (required) = true,
248
+ (validate) = true
249
+ ];
250
+
251
+ // Configured MCP server identifier.
252
+ McpServerId server = 4 [
253
+ (required) = true,
254
+ (validate) = true
255
+ ];
256
+
257
+ // Exact tool name.
258
+ McpToolName tool = 5 [
259
+ (required) = true,
260
+ (validate) = true
261
+ ];
262
+
263
+ // Validated argument identity.
264
+ AiContentDigest arguments = 6 [
265
+ (required) = true,
266
+ (validate) = true
267
+ ];
268
+
269
+ // Application-established effect category.
270
+ ToolEffect effect = 7 [(required) = true];
271
+
272
+ // Occurrence time from Spine Time.
273
+ google.protobuf.Timestamp started_at = 8 [
274
+ (required) = true,
275
+ (validate) = true
276
+ ];
277
+ }
278
+
279
+ // Result or uncertain outcome of an external tool call.
280
+ message AgentToolCallFinished {
281
+ // Logical operation requesting the tool.
282
+ AgentOperationRef operation = 1 [
283
+ (required) = true,
284
+ (validate) = true
285
+ ];
286
+
287
+ // Spine-assigned tool call identity.
288
+ AiToolCallId call = 2 [
289
+ (required) = true,
290
+ (validate) = true
291
+ ];
292
+
293
+ // Success, failure or unresolved write outcome.
294
+ AiOutcome outcome = 3 [(required) = true];
295
+
296
+ // Result content identity when available.
297
+ AiContentDigest result = 4 [(validate) = true];
298
+
299
+ // Occurrence time from Spine Time.
300
+ google.protobuf.Timestamp finished_at = 5 [
301
+ (required) = true,
302
+ (validate) = true
303
+ ];
304
+
305
+ // Safe diagnostic reference for failure or uncertainty.
306
+ AiDiagnosticId diagnostic_id = 6 [(validate) = true];
307
+ }
308
+
309
+ // A later invocation will use a changed deployment preference.
310
+ message AgentModelSelectionChanged {
311
+ // Agent whose preference changed.
312
+ spine.core.MessageId agent = 1 [
313
+ (required) = true,
314
+ (validate) = true
315
+ ];
316
+
317
+ // Signal authorizing the change.
318
+ spine.core.MessageId source_signal = 2 [
319
+ (required) = true,
320
+ (validate) = true
321
+ ];
322
+
323
+ // Kind affected by this preference.
324
+ AiModelKind kind = 3 [(required) = true];
325
+
326
+ // Previous explicit selection, absent when inherited.
327
+ ModelRef previous_model = 4 [(validate) = true];
328
+
329
+ // New explicit selection, absent when inheritance is restored.
330
+ ModelRef selected_model = 5 [(validate) = true];
331
+
332
+ // Occurrence time from Spine Time.
333
+ google.protobuf.Timestamp changed_at = 6 [
334
+ (required) = true,
335
+ (validate) = true
336
+ ];
337
+ }
338
+
339
+ // Accepted invocation ended because execution could not complete.
340
+ message AgentInvocationTerminated {
341
+ // Agent whose invocation terminated.
342
+ spine.core.MessageId agent = 1 [
343
+ (required) = true,
344
+ (validate) = true
345
+ ];
346
+
347
+ // Original accepted source signal.
348
+ spine.core.MessageId source_signal = 2 [
349
+ (required) = true,
350
+ (validate) = true
351
+ ];
352
+
353
+ // Safe termination reason.
354
+ string reason = 3 [(required) = true];
355
+
356
+ // Unresolved physical requests whose outcomes remain unknown.
357
+ repeated AiAttemptId unresolved_attempts = 4 [(validate) = true];
358
+
359
+ // Unresolved external tool calls whose effects may be unknown.
360
+ repeated AiToolCallId unresolved_tool_calls = 5 [(validate) = true];
361
+
362
+ // Occurrence time from Spine Time.
363
+ google.protobuf.Timestamp terminated_at = 6 [
364
+ (required) = true,
365
+ (validate) = true
366
+ ];
367
+ }
@@ -0,0 +1,333 @@
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.ts.agent;
18
+
19
+ import "google/protobuf/empty.proto";
20
+ import "spine/options.proto";
21
+
22
+ option (type_url_prefix) = "type.spine.io";
23
+
24
+ // Name of an authenticated deployment registered by the application.
25
+ message ModelName {
26
+ // Nonblank deployment name.
27
+ string value = 1 [(required) = true];
28
+ }
29
+
30
+ // Revision of a deployment's model, endpoint and capability configuration.
31
+ message ModelRevision {
32
+ // Nonblank application-assigned revision.
33
+ string value = 1 [(required) = true];
34
+ }
35
+
36
+ // Credential-free reference to a configured deployment.
37
+ message ModelRef {
38
+ // Deployment name in the application registry.
39
+ ModelName name = 1 [
40
+ (required) = true,
41
+ (validate) = true
42
+ ];
43
+
44
+ // Exact immutable configuration revision.
45
+ ModelRevision revision = 2 [
46
+ (required) = true,
47
+ (validate) = true
48
+ ];
49
+ }
50
+
51
+ // Kind of operation a deployment supports.
52
+ enum AiModelKind {
53
+ // Unspecified kinds are invalid in preferences and executed operations.
54
+ AI_MODEL_KIND_UNSPECIFIED = 0;
55
+
56
+ // Generates a structured candidate from instructions and input.
57
+ GENERATION = 1;
58
+
59
+ // Evaluates typed questions without a generated chat response.
60
+ DECISION = 2;
61
+ }
62
+
63
+ // Effective execution path fixed when a capability is accepted.
64
+ enum AiExecutionMode {
65
+ AI_EXECUTION_MODE_UNSPECIFIED = 0;
66
+ GENERATION_NATIVE_SCHEMA = 1;
67
+ GENERATION_PROMPT_VALIDATE = 2;
68
+ DECISION_DIRECT = 3;
69
+ }
70
+
71
+ // Deployment preference applied to later signals for one Agent instance.
72
+ message ModelPreference {
73
+ // Capability kind affected by this preference.
74
+ AiModelKind kind = 1 [(required) = true];
75
+
76
+ // Exactly one explicit selection or inheritance instruction is required.
77
+ oneof selection {
78
+ option (choice).required = true;
79
+
80
+ // Deployment to use after authorization and commit.
81
+ ModelRef model = 2 [(validate) = true];
82
+
83
+ // Removes this kind's instance override.
84
+ google.protobuf.Empty inherit_repository_default = 3;
85
+ }
86
+ }
87
+
88
+ // Identifies one conversation that may span several signals and operations.
89
+ message ConversationId {
90
+ // Application-assigned identifier scoped to the Agent instance.
91
+ string value = 1 [(required) = true];
92
+ }
93
+
94
+ // Identifies one logical model operation including corrective attempts.
95
+ message AiOperationId {
96
+ // Identifier assigned when the operation begins.
97
+ string value = 1 [(required) = true];
98
+ }
99
+
100
+ // Identifies one physical provider request within an operation.
101
+ message AiAttemptId {
102
+ // Identifier assigned to the physical request.
103
+ string value = 1 [(required) = true];
104
+ }
105
+
106
+ // Identifies exact serialized interaction content without retaining it in audit.
107
+ message AiContentDigest {
108
+ // Exactly 64 lowercase hexadecimal characters of SHA-256.
109
+ string value = 1 [
110
+ (required) = true,
111
+ (pattern).regex = "^[0-9a-f]{64}$"
112
+ ];
113
+ }
114
+
115
+ // Identifies one logical tool call and its recovery record.
116
+ message AiToolCallId {
117
+ // Spine-assigned ID, distinct from an MCP request ID.
118
+ string value = 1 [(required) = true];
119
+ }
120
+
121
+ // Name of one typed application capability, distinct from a deployment.
122
+ message AiCapabilityName {
123
+ string value = 1 [(required) = true];
124
+ }
125
+
126
+ // Revision of a typed application capability.
127
+ message AiCapabilityRevision {
128
+ string value = 1 [(required) = true];
129
+ }
130
+
131
+ // Revision of a pure application validation rule.
132
+ message AiValidationRevision {
133
+ string value = 1 [(required) = true];
134
+ }
135
+
136
+ // Revision of a pure decision-to-Proto mapping.
137
+ message AiMappingRevision {
138
+ string value = 1 [(required) = true];
139
+ }
140
+
141
+ // Safe reference to diagnostic information retained outside public events.
142
+ message AiDiagnosticId {
143
+ string value = 1 [(required) = true];
144
+ }
145
+
146
+ // Identity of one configured MCP server.
147
+ message McpServerId {
148
+ string value = 1 [(required) = true];
149
+ }
150
+
151
+ // Exact name of one expressly permitted MCP tool.
152
+ message McpToolName {
153
+ string value = 1 [(required) = true];
154
+ }
155
+
156
+ // Number of physical provider requests permitted for one operation.
157
+ message AiModelRequestLimit {
158
+ uint32 value = 1 [(min).value = "1"];
159
+ }
160
+
161
+ // Number of external tool calls permitted for one operation; zero disables tools.
162
+ message AiToolCallLimit {
163
+ uint32 value = 1;
164
+ }
165
+
166
+ // Maximum elapsed milliseconds for one operation.
167
+ message AiDeadlineMillis {
168
+ uint64 value = 1 [(min).value = "1"];
169
+ }
170
+
171
+ // Maximum bytes in one materialized provider request.
172
+ message AiInputByteLimit {
173
+ uint64 value = 1 [(min).value = "1"];
174
+ }
175
+
176
+ // Maximum received bytes before provider parsing.
177
+ message AiOutputByteLimit {
178
+ uint64 value = 1 [(min).value = "1"];
179
+ }
180
+
181
+ // Generation-only maximum output tokens.
182
+ message AiOutputTokenLimit {
183
+ uint64 value = 1 [(min).value = "1"];
184
+ }
185
+
186
+ // Provider-reported token count; known zero remains distinct from absence.
187
+ message AiTokenCount {
188
+ uint64 value = 1;
189
+ }
190
+
191
+ // Effective bounds for one model operation.
192
+ message AiOperationLimits {
193
+ // Maximum physical provider requests including corrections.
194
+ AiModelRequestLimit model_requests = 1 [(validate) = true];
195
+
196
+ // Maximum external tool calls; zero disables tools.
197
+ AiToolCallLimit tool_calls = 2 [(validate) = true];
198
+
199
+ // Maximum elapsed milliseconds.
200
+ AiDeadlineMillis deadline_ms = 3 [(validate) = true];
201
+
202
+ // Maximum materialized request bytes.
203
+ AiInputByteLimit max_input_bytes = 4 [(validate) = true];
204
+
205
+ // Maximum received response bytes.
206
+ AiOutputByteLimit max_output_bytes = 5 [(validate) = true];
207
+
208
+ // Optional generation output token limit; absent for decisions and unsupported profiles.
209
+ AiOutputTokenLimit max_output_tokens = 6 [(validate) = true];
210
+ }
211
+
212
+ // Provider-reported counts; absent fields mean unknown rather than zero.
213
+ message AiUsage {
214
+ // Input tokens when supplied by the provider.
215
+ AiTokenCount input_tokens = 1 [(validate) = true];
216
+
217
+ // Output tokens when supplied by the provider.
218
+ AiTokenCount output_tokens = 2 [(validate) = true];
219
+ }
220
+
221
+ // Provider or local service identifier, not an application deployment name.
222
+ message AiProviderName {
223
+ string value = 1 [(required) = true];
224
+ }
225
+
226
+ // Verified provider account or local execution identity.
227
+ message AiAccountIdentity {
228
+ string value = 1 [(required) = true];
229
+ }
230
+
231
+ // Credential-free canonical endpoint identity.
232
+ message AiEndpointIdentity {
233
+ string value = 1 [(required) = true];
234
+ }
235
+
236
+ // Concrete provider model name, independent of application deployment names.
237
+ message AiProviderModelName {
238
+ string value = 1 [(required) = true];
239
+ }
240
+
241
+ // Non-secret identity established for an authenticated model connection.
242
+ message AiConnectionIdentity {
243
+ // Provider or local service identifier.
244
+ AiProviderName provider = 1 [
245
+ (required) = true,
246
+ (validate) = true
247
+ ];
248
+
249
+ // Verified account or local execution identity.
250
+ AiAccountIdentity account = 2 [
251
+ (required) = true,
252
+ (validate) = true
253
+ ];
254
+
255
+ // Credential-free canonical endpoint identity.
256
+ AiEndpointIdentity endpoint = 3 [
257
+ (required) = true,
258
+ (validate) = true
259
+ ];
260
+
261
+ // Concrete provider model name.
262
+ AiProviderModelName model = 4 [
263
+ (required) = true,
264
+ (validate) = true
265
+ ];
266
+ }
267
+
268
+ // Safe category for a model or tool outcome.
269
+ enum AiOutcome {
270
+ // No outcome was recorded.
271
+ AI_OUTCOME_UNSPECIFIED = 0;
272
+
273
+ // Validated result was admitted.
274
+ AI_OUTCOME_ADMITTED = 1;
275
+
276
+ // Received content failed validation.
277
+ AI_OUTCOME_INVALID_OUTPUT = 2;
278
+
279
+ // Provider refused the request.
280
+ AI_OUTCOME_REFUSED = 3;
281
+
282
+ // Operational failure has a safe diagnostic.
283
+ AI_OUTCOME_FAILED = 4;
284
+
285
+ // A dispatched external action has an unknown outcome.
286
+ AI_OUTCOME_UNKNOWN = 5;
287
+
288
+ // A complete generation response proposed external tool calls without admitting application output.
289
+ // This closes only the physical attempt; the logical operation remains active.
290
+ AI_OUTCOME_TOOL_REQUESTED = 6;
291
+ }
292
+
293
+ // Safe operational failure category for an Agent model operation.
294
+ enum AiFailureCode {
295
+ // No failure category was supplied.
296
+ AI_FAILURE_CODE_UNSPECIFIED = 0;
297
+
298
+ // Typed input or application facts were invalid.
299
+ INVALID_INPUT = 1;
300
+
301
+ // Deployment cannot support the declared capability.
302
+ UNSUPPORTED_CAPABILITY = 2;
303
+
304
+ // Authenticated connection is unavailable.
305
+ AUTHENTICATION_REQUIRED = 3;
306
+
307
+ // Provider rejected the request rate.
308
+ RATE_LIMITED = 4;
309
+
310
+ // Provider or tool is temporarily unavailable.
311
+ UNAVAILABLE = 5;
312
+
313
+ // Provider refused an otherwise valid request.
314
+ REFUSED = 6;
315
+
316
+ // Received candidate could not be admitted.
317
+ INVALID_OUTPUT = 7;
318
+
319
+ // Physical, tool, time or byte budget was exhausted.
320
+ BUDGET_EXCEEDED = 8;
321
+
322
+ // External tool failed without an admitted result.
323
+ TOOL_FAILED = 9;
324
+
325
+ // A dispatched write tool has an unresolved outcome.
326
+ TOOL_OUTCOME_UNKNOWN = 10;
327
+
328
+ // Invocation was cancelled before completion.
329
+ CANCELLED = 11;
330
+
331
+ // Accepted absolute deadline expired.
332
+ DEADLINE_EXCEEDED = 12;
333
+ }