@spendguard/sdk 0.5.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/CHANGELOG.md +190 -0
- package/LICENSE_NOTICES.md +127 -0
- package/README.md +151 -0
- package/dist/adapter-D9T3yEEw.d.ts +3441 -0
- package/dist/cache-DOnw8QtJ.d.ts +1164 -0
- package/dist/cache.d.ts +6 -0
- package/dist/cache.js +74 -0
- package/dist/client.d.ts +6 -0
- package/dist/client.js +4815 -0
- package/dist/errors.d.ts +269 -0
- package/dist/errors.js +148 -0
- package/dist/ids.d.ts +69 -0
- package/dist/ids.js +61 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +5295 -0
- package/dist/otel.d.ts +118 -0
- package/dist/otel.js +84 -0
- package/dist/pricing/demo.d.ts +26 -0
- package/dist/pricing/demo.js +138 -0
- package/dist/pricing.d.ts +70 -0
- package/dist/pricing.js +92 -0
- package/dist/promptHash.d.ts +23 -0
- package/dist/promptHash.js +25 -0
- package/dist/proto.d.ts +609 -0
- package/dist/proto.js +3055 -0
- package/dist/retry.d.ts +121 -0
- package/dist/retry.js +92 -0
- package/dist/runPlan.d.ts +69 -0
- package/dist/runPlan.js +35 -0
- package/fixtures/cross-language/v1.json +327 -0
- package/package.json +123 -0
|
@@ -0,0 +1,3441 @@
|
|
|
1
|
+
import { ServiceType } from '@protobuf-ts/runtime-rpc';
|
|
2
|
+
import { MessageType, JsonWriteOptions, JsonValue, JsonReadOptions } from '@protobuf-ts/runtime';
|
|
3
|
+
|
|
4
|
+
declare class Timestamp$Type extends MessageType<Timestamp> {
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new `Timestamp` for the current time.
|
|
8
|
+
*/
|
|
9
|
+
now(): Timestamp;
|
|
10
|
+
/**
|
|
11
|
+
* Converts a `Timestamp` to a JavaScript Date.
|
|
12
|
+
*/
|
|
13
|
+
toDate(message: Timestamp): Date;
|
|
14
|
+
/**
|
|
15
|
+
* Converts a JavaScript Date to a `Timestamp`.
|
|
16
|
+
*/
|
|
17
|
+
fromDate(date: Date): Timestamp;
|
|
18
|
+
/**
|
|
19
|
+
* In JSON format, the `Timestamp` type is encoded as a string
|
|
20
|
+
* in the RFC 3339 format.
|
|
21
|
+
*/
|
|
22
|
+
internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue;
|
|
23
|
+
/**
|
|
24
|
+
* In JSON format, the `Timestamp` type is encoded as a string
|
|
25
|
+
* in the RFC 3339 format.
|
|
26
|
+
*/
|
|
27
|
+
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A Timestamp represents a point in time independent of any time zone or local
|
|
31
|
+
* calendar, encoded as a count of seconds and fractions of seconds at
|
|
32
|
+
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
|
33
|
+
* January 1, 1970, in the proleptic Gregorian calendar which extends the
|
|
34
|
+
* Gregorian calendar backwards to year one.
|
|
35
|
+
*
|
|
36
|
+
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
|
37
|
+
* second table is needed for interpretation, using a [24-hour linear
|
|
38
|
+
* smear](https://developers.google.com/time/smear).
|
|
39
|
+
*
|
|
40
|
+
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
|
41
|
+
* restricting to that range, we ensure that we can convert to and from [RFC
|
|
42
|
+
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
|
43
|
+
*
|
|
44
|
+
* # Examples
|
|
45
|
+
*
|
|
46
|
+
* Example 1: Compute Timestamp from POSIX `time()`.
|
|
47
|
+
*
|
|
48
|
+
* Timestamp timestamp;
|
|
49
|
+
* timestamp.set_seconds(time(NULL));
|
|
50
|
+
* timestamp.set_nanos(0);
|
|
51
|
+
*
|
|
52
|
+
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
|
53
|
+
*
|
|
54
|
+
* struct timeval tv;
|
|
55
|
+
* gettimeofday(&tv, NULL);
|
|
56
|
+
*
|
|
57
|
+
* Timestamp timestamp;
|
|
58
|
+
* timestamp.set_seconds(tv.tv_sec);
|
|
59
|
+
* timestamp.set_nanos(tv.tv_usec * 1000);
|
|
60
|
+
*
|
|
61
|
+
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
|
62
|
+
*
|
|
63
|
+
* FILETIME ft;
|
|
64
|
+
* GetSystemTimeAsFileTime(&ft);
|
|
65
|
+
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
|
66
|
+
*
|
|
67
|
+
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
|
68
|
+
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
|
69
|
+
* Timestamp timestamp;
|
|
70
|
+
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
|
71
|
+
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
|
72
|
+
*
|
|
73
|
+
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
|
74
|
+
*
|
|
75
|
+
* long millis = System.currentTimeMillis();
|
|
76
|
+
*
|
|
77
|
+
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
|
78
|
+
* .setNanos((int) ((millis % 1000) * 1000000)).build();
|
|
79
|
+
*
|
|
80
|
+
* Example 5: Compute Timestamp from Java `Instant.now()`.
|
|
81
|
+
*
|
|
82
|
+
* Instant now = Instant.now();
|
|
83
|
+
*
|
|
84
|
+
* Timestamp timestamp =
|
|
85
|
+
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
|
86
|
+
* .setNanos(now.getNano()).build();
|
|
87
|
+
*
|
|
88
|
+
* Example 6: Compute Timestamp from current time in Python.
|
|
89
|
+
*
|
|
90
|
+
* timestamp = Timestamp()
|
|
91
|
+
* timestamp.GetCurrentTime()
|
|
92
|
+
*
|
|
93
|
+
* # JSON Mapping
|
|
94
|
+
*
|
|
95
|
+
* In JSON format, the Timestamp type is encoded as a string in the
|
|
96
|
+
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
|
97
|
+
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
|
98
|
+
* where {year} is always expressed using four digits while {month}, {day},
|
|
99
|
+
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
100
|
+
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
101
|
+
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
102
|
+
* is required. A ProtoJSON serializer should always use UTC (as indicated by
|
|
103
|
+
* "Z") when printing the Timestamp type and a ProtoJSON parser should be
|
|
104
|
+
* able to accept both UTC and other timezones (as indicated by an offset).
|
|
105
|
+
*
|
|
106
|
+
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
107
|
+
* 01:30 UTC on January 15, 2017.
|
|
108
|
+
*
|
|
109
|
+
* In JavaScript, one can convert a Date object to this format using the
|
|
110
|
+
* standard
|
|
111
|
+
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
112
|
+
* method. In Python, a standard `datetime.datetime` object can be converted
|
|
113
|
+
* to this format using
|
|
114
|
+
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
115
|
+
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
116
|
+
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
117
|
+
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
|
118
|
+
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
119
|
+
*
|
|
120
|
+
*
|
|
121
|
+
* @generated from protobuf message google.protobuf.Timestamp
|
|
122
|
+
*/
|
|
123
|
+
interface Timestamp {
|
|
124
|
+
/**
|
|
125
|
+
* Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
|
|
126
|
+
* be between -62135596800 and 253402300799 inclusive (which corresponds to
|
|
127
|
+
* 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
|
|
128
|
+
*
|
|
129
|
+
* @generated from protobuf field: int64 seconds = 1
|
|
130
|
+
*/
|
|
131
|
+
seconds: string;
|
|
132
|
+
/**
|
|
133
|
+
* Non-negative fractions of a second at nanosecond resolution. This field is
|
|
134
|
+
* the nanosecond portion of the duration, not an alternative to seconds.
|
|
135
|
+
* Negative second values with fractions must still have non-negative nanos
|
|
136
|
+
* values that count forward in time. Must be between 0 and 999,999,999
|
|
137
|
+
* inclusive.
|
|
138
|
+
*
|
|
139
|
+
* @generated from protobuf field: int32 nanos = 2
|
|
140
|
+
*/
|
|
141
|
+
nanos: number;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @generated MessageType for protobuf message google.protobuf.Timestamp
|
|
145
|
+
*/
|
|
146
|
+
declare const Timestamp: Timestamp$Type;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Convenience kind for client-side validation; canonical truth is unit_id.
|
|
150
|
+
*
|
|
151
|
+
* @generated from protobuf enum spendguard.common.v1.UnitRef.Kind
|
|
152
|
+
*/
|
|
153
|
+
declare enum UnitRef_Kind {
|
|
154
|
+
/**
|
|
155
|
+
* @generated from protobuf enum value: KIND_UNSPECIFIED = 0;
|
|
156
|
+
*/
|
|
157
|
+
KIND_UNSPECIFIED = 0,
|
|
158
|
+
/**
|
|
159
|
+
* @generated from protobuf enum value: MONETARY = 1;
|
|
160
|
+
*/
|
|
161
|
+
MONETARY = 1,
|
|
162
|
+
/**
|
|
163
|
+
* @generated from protobuf enum value: TOKEN = 2;
|
|
164
|
+
*/
|
|
165
|
+
TOKEN = 2,
|
|
166
|
+
/**
|
|
167
|
+
* @generated from protobuf enum value: CREDIT = 3;
|
|
168
|
+
*/
|
|
169
|
+
CREDIT = 3,
|
|
170
|
+
/**
|
|
171
|
+
* @generated from protobuf enum value: NON_MONETARY = 4;
|
|
172
|
+
*/
|
|
173
|
+
NON_MONETARY = 4
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Status code retained in minimal replay (per Ledger §7 minimal_replay_response).
|
|
177
|
+
* For terminal states this conveys the final disposition; for in-progress
|
|
178
|
+
* operations this conveys the latest known posting_state code.
|
|
179
|
+
*
|
|
180
|
+
* @generated from protobuf enum spendguard.common.v1.Replay.StatusCode
|
|
181
|
+
*/
|
|
182
|
+
declare enum Replay_StatusCode {
|
|
183
|
+
/**
|
|
184
|
+
* @generated from protobuf enum value: STATUS_CODE_UNSPECIFIED = 0;
|
|
185
|
+
*/
|
|
186
|
+
STATUS_CODE_UNSPECIFIED = 0,
|
|
187
|
+
/**
|
|
188
|
+
* ledger_transactions.posting_state = 'posted'
|
|
189
|
+
*
|
|
190
|
+
* @generated from protobuf enum value: POSTED = 1;
|
|
191
|
+
*/
|
|
192
|
+
POSTED = 1,
|
|
193
|
+
/**
|
|
194
|
+
* ledger_transactions.posting_state = 'voided'
|
|
195
|
+
*
|
|
196
|
+
* @generated from protobuf enum value: VOIDED = 2;
|
|
197
|
+
*/
|
|
198
|
+
VOIDED = 2,
|
|
199
|
+
/**
|
|
200
|
+
* ledger_transactions.posting_state = 'pending'
|
|
201
|
+
*
|
|
202
|
+
* @generated from protobuf enum value: PENDING = 3;
|
|
203
|
+
*/
|
|
204
|
+
PENDING = 3
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* @generated from protobuf enum spendguard.common.v1.Error.Code
|
|
208
|
+
*/
|
|
209
|
+
declare enum Error_Code {
|
|
210
|
+
/**
|
|
211
|
+
* @generated from protobuf enum value: CODE_UNSPECIFIED = 0;
|
|
212
|
+
*/
|
|
213
|
+
CODE_UNSPECIFIED = 0,
|
|
214
|
+
/**
|
|
215
|
+
* @generated from protobuf enum value: FENCING_EPOCH_STALE = 1;
|
|
216
|
+
*/
|
|
217
|
+
FENCING_EPOCH_STALE = 1,
|
|
218
|
+
/**
|
|
219
|
+
* @generated from protobuf enum value: LOCK_ORDER_TOKEN_MISMATCH = 2;
|
|
220
|
+
*/
|
|
221
|
+
LOCK_ORDER_TOKEN_MISMATCH = 2,
|
|
222
|
+
/**
|
|
223
|
+
* @generated from protobuf enum value: PRICING_VERSION_UNKNOWN = 3;
|
|
224
|
+
*/
|
|
225
|
+
PRICING_VERSION_UNKNOWN = 3,
|
|
226
|
+
/**
|
|
227
|
+
* @generated from protobuf enum value: UNIT_NORMALIZATION_REQUIRED = 4;
|
|
228
|
+
*/
|
|
229
|
+
UNIT_NORMALIZATION_REQUIRED = 4,
|
|
230
|
+
/**
|
|
231
|
+
* @generated from protobuf enum value: BUDGET_EXHAUSTED = 5;
|
|
232
|
+
*/
|
|
233
|
+
BUDGET_EXHAUSTED = 5,
|
|
234
|
+
/**
|
|
235
|
+
* @generated from protobuf enum value: DEADLOCK_TIMEOUT = 6;
|
|
236
|
+
*/
|
|
237
|
+
DEADLOCK_TIMEOUT = 6,
|
|
238
|
+
/**
|
|
239
|
+
* @generated from protobuf enum value: SYNC_REPLICA_UNAVAILABLE = 7;
|
|
240
|
+
*/
|
|
241
|
+
SYNC_REPLICA_UNAVAILABLE = 7,
|
|
242
|
+
/**
|
|
243
|
+
* @generated from protobuf enum value: TENANT_DISABLED = 8;
|
|
244
|
+
*/
|
|
245
|
+
TENANT_DISABLED = 8,
|
|
246
|
+
/**
|
|
247
|
+
* @generated from protobuf enum value: SCHEMA_BUNDLE_UNKNOWN = 9;
|
|
248
|
+
*/
|
|
249
|
+
SCHEMA_BUNDLE_UNKNOWN = 9,
|
|
250
|
+
/**
|
|
251
|
+
* @generated from protobuf enum value: SIGNATURE_INVALID = 10;
|
|
252
|
+
*/
|
|
253
|
+
SIGNATURE_INVALID = 10,
|
|
254
|
+
/**
|
|
255
|
+
* @generated from protobuf enum value: AUDIT_INVARIANT_VIOLATED = 11;
|
|
256
|
+
*/
|
|
257
|
+
AUDIT_INVARIANT_VIOLATED = 11,
|
|
258
|
+
/**
|
|
259
|
+
* @generated from protobuf enum value: DUPLICATE_DECISION_EVENT = 12;
|
|
260
|
+
*/
|
|
261
|
+
DUPLICATE_DECISION_EVENT = 12,
|
|
262
|
+
/**
|
|
263
|
+
* Phase 2B Step 7: commit lifecycle (Contract §5 / Ledger §10).
|
|
264
|
+
*
|
|
265
|
+
* @generated from protobuf enum value: RESERVATION_STATE_CONFLICT = 13;
|
|
266
|
+
*/
|
|
267
|
+
RESERVATION_STATE_CONFLICT = 13,
|
|
268
|
+
/**
|
|
269
|
+
* @generated from protobuf enum value: PRICING_FREEZE_MISMATCH = 14;
|
|
270
|
+
*/
|
|
271
|
+
PRICING_FREEZE_MISMATCH = 14,
|
|
272
|
+
/**
|
|
273
|
+
* @generated from protobuf enum value: OVERRUN_RESERVATION = 15;
|
|
274
|
+
*/
|
|
275
|
+
OVERRUN_RESERVATION = 15,
|
|
276
|
+
/**
|
|
277
|
+
* @generated from protobuf enum value: RESERVATION_TTL_EXPIRED = 16;
|
|
278
|
+
*/
|
|
279
|
+
RESERVATION_TTL_EXPIRED = 16,
|
|
280
|
+
/**
|
|
281
|
+
* @generated from protobuf enum value: MULTI_RESERVATION_COMMIT_DEFERRED = 17;
|
|
282
|
+
*/
|
|
283
|
+
MULTI_RESERVATION_COMMIT_DEFERRED = 17,
|
|
284
|
+
/**
|
|
285
|
+
* @generated from protobuf enum value: IDEMPOTENCY_CONFLICT = 18;
|
|
286
|
+
*/
|
|
287
|
+
IDEMPOTENCY_CONFLICT = 18
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* @generated from protobuf enum spendguard.common.v1.BudgetClaim.Direction
|
|
291
|
+
*/
|
|
292
|
+
declare enum BudgetClaim_Direction {
|
|
293
|
+
/**
|
|
294
|
+
* @generated from protobuf enum value: DIRECTION_UNSPECIFIED = 0;
|
|
295
|
+
*/
|
|
296
|
+
DIRECTION_UNSPECIFIED = 0,
|
|
297
|
+
/**
|
|
298
|
+
* @generated from protobuf enum value: DEBIT = 1;
|
|
299
|
+
*/
|
|
300
|
+
DEBIT = 1,
|
|
301
|
+
/**
|
|
302
|
+
* @generated from protobuf enum value: CREDIT = 2;
|
|
303
|
+
*/
|
|
304
|
+
CREDIT = 2
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Cap evaluation outcome carried to the adapter.
|
|
308
|
+
*
|
|
309
|
+
* @generated from protobuf enum spendguard.common.v1.SubscriptionMeter.CapDecision
|
|
310
|
+
*/
|
|
311
|
+
declare enum SubscriptionMeter_CapDecision {
|
|
312
|
+
/**
|
|
313
|
+
* @generated from protobuf enum value: CAP_DECISION_UNSPECIFIED = 0;
|
|
314
|
+
*/
|
|
315
|
+
CAP_DECISION_UNSPECIFIED = 0,
|
|
316
|
+
/**
|
|
317
|
+
* @generated from protobuf enum value: CAP_PASS = 1;
|
|
318
|
+
*/
|
|
319
|
+
CAP_PASS = 1,
|
|
320
|
+
/**
|
|
321
|
+
* @generated from protobuf enum value: CAP_SOFT_ALERT = 2;
|
|
322
|
+
*/
|
|
323
|
+
CAP_SOFT_ALERT = 2,
|
|
324
|
+
/**
|
|
325
|
+
* synthetic 429
|
|
326
|
+
*
|
|
327
|
+
* @generated from protobuf enum value: CAP_HARD_BLOCK = 3;
|
|
328
|
+
*/
|
|
329
|
+
CAP_HARD_BLOCK = 3
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Reservation source: tags an audit_outbox row so dashboards and
|
|
333
|
+
* importers can tell BYOK-charged (real ledger entry) rows apart from
|
|
334
|
+
* subscription-meter (advisory; no ledger entry) rows.
|
|
335
|
+
*
|
|
336
|
+
* Wire-compat: additive enum. RESERVATION_SOURCE_UNSPECIFIED = 0
|
|
337
|
+
* preserves wire-compat for clients emitted before D13. Legacy rows
|
|
338
|
+
* default to BYOK at the audit_outbox column level (NOT NULL DEFAULT
|
|
339
|
+
* 'byok' per migration 0044).
|
|
340
|
+
*
|
|
341
|
+
* @generated from protobuf enum spendguard.common.v1.ReservationSource
|
|
342
|
+
*/
|
|
343
|
+
declare enum ReservationSource {
|
|
344
|
+
/**
|
|
345
|
+
* @generated from protobuf enum value: RESERVATION_SOURCE_UNSPECIFIED = 0;
|
|
346
|
+
*/
|
|
347
|
+
UNSPECIFIED = 0,
|
|
348
|
+
/**
|
|
349
|
+
* @generated from protobuf enum value: RESERVATION_SOURCE_BYOK = 1;
|
|
350
|
+
*/
|
|
351
|
+
BYOK = 1,
|
|
352
|
+
/**
|
|
353
|
+
* @generated from protobuf enum value: RESERVATION_SOURCE_SUBSCRIPTION_METER = 2;
|
|
354
|
+
*/
|
|
355
|
+
SUBSCRIPTION_METER = 2
|
|
356
|
+
}
|
|
357
|
+
declare class TraceContext$Type extends MessageType<TraceContext> {
|
|
358
|
+
constructor();
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* W3C trace context (per Trace §3.1).
|
|
362
|
+
*
|
|
363
|
+
* @generated from protobuf message spendguard.common.v1.TraceContext
|
|
364
|
+
*/
|
|
365
|
+
interface TraceContext {
|
|
366
|
+
/**
|
|
367
|
+
* 16-byte lowercase hex (e.g., "0af7651916cd43dd8448eb211c80319c").
|
|
368
|
+
*
|
|
369
|
+
* @generated from protobuf field: string trace_id = 1
|
|
370
|
+
*/
|
|
371
|
+
traceId: string;
|
|
372
|
+
/**
|
|
373
|
+
* 8-byte lowercase hex (e.g., "00f067aa0ba902b7").
|
|
374
|
+
*
|
|
375
|
+
* @generated from protobuf field: string span_id = 2
|
|
376
|
+
*/
|
|
377
|
+
spanId: string;
|
|
378
|
+
/**
|
|
379
|
+
* Optional; required when not_root_span.
|
|
380
|
+
*
|
|
381
|
+
* @generated from protobuf field: string parent_span_id = 3
|
|
382
|
+
*/
|
|
383
|
+
parentSpanId: string;
|
|
384
|
+
/**
|
|
385
|
+
* W3C trace state (RFC 9.4); opaque vendor-specific string.
|
|
386
|
+
*
|
|
387
|
+
* @generated from protobuf field: string trace_state = 4
|
|
388
|
+
*/
|
|
389
|
+
traceState: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @generated MessageType for protobuf message spendguard.common.v1.TraceContext
|
|
393
|
+
*/
|
|
394
|
+
declare const TraceContext: TraceContext$Type;
|
|
395
|
+
declare class SpendGuardIds$Type extends MessageType<SpendGuardIds> {
|
|
396
|
+
constructor();
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* SpendGuard canonical IDs (per Trace §3.2).
|
|
400
|
+
*
|
|
401
|
+
* All IDs are UUID v7 (RFC 9562) for monotonic time-ordering.
|
|
402
|
+
*
|
|
403
|
+
* @generated from protobuf message spendguard.common.v1.SpendGuardIds
|
|
404
|
+
*/
|
|
405
|
+
interface SpendGuardIds {
|
|
406
|
+
/**
|
|
407
|
+
* @generated from protobuf field: string run_id = 1
|
|
408
|
+
*/
|
|
409
|
+
runId: string;
|
|
410
|
+
/**
|
|
411
|
+
* @generated from protobuf field: string step_id = 2
|
|
412
|
+
*/
|
|
413
|
+
stepId: string;
|
|
414
|
+
/**
|
|
415
|
+
* @generated from protobuf field: string llm_call_id = 3
|
|
416
|
+
*/
|
|
417
|
+
llmCallId: string;
|
|
418
|
+
/**
|
|
419
|
+
* @generated from protobuf field: string tool_call_id = 4
|
|
420
|
+
*/
|
|
421
|
+
toolCallId: string;
|
|
422
|
+
/**
|
|
423
|
+
* @generated from protobuf field: string decision_id = 5
|
|
424
|
+
*/
|
|
425
|
+
decisionId: string;
|
|
426
|
+
/**
|
|
427
|
+
* @generated from protobuf field: string snapshot_id = 6
|
|
428
|
+
*/
|
|
429
|
+
snapshotId: string;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* @generated MessageType for protobuf message spendguard.common.v1.SpendGuardIds
|
|
433
|
+
*/
|
|
434
|
+
declare const SpendGuardIds: SpendGuardIds$Type;
|
|
435
|
+
declare class UnitRef$Type extends MessageType<UnitRef> {
|
|
436
|
+
constructor();
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Unit reference (per Contract §12.1 Money type).
|
|
440
|
+
*
|
|
441
|
+
* Atomic amounts are interpreted relative to a unit's `scale` from Ledger
|
|
442
|
+
* `ledger_units` (e.g., USD scale=6 -> 1 USD = 1_000_000 atomic).
|
|
443
|
+
*
|
|
444
|
+
* Canonical truth is `unit_id` (FK to ledger_units). Convenience fields below
|
|
445
|
+
* are echoed for client-side validation only; ledger derives semantics from
|
|
446
|
+
* unit_id.
|
|
447
|
+
*
|
|
448
|
+
* @generated from protobuf message spendguard.common.v1.UnitRef
|
|
449
|
+
*/
|
|
450
|
+
interface UnitRef {
|
|
451
|
+
/**
|
|
452
|
+
* FK to ledger_units.unit_id (UUID v7 string).
|
|
453
|
+
*
|
|
454
|
+
* @generated from protobuf field: string unit_id = 1
|
|
455
|
+
*/
|
|
456
|
+
unitId: string;
|
|
457
|
+
/**
|
|
458
|
+
* @generated from protobuf field: spendguard.common.v1.UnitRef.Kind kind = 2
|
|
459
|
+
*/
|
|
460
|
+
kind: UnitRef_Kind;
|
|
461
|
+
/**
|
|
462
|
+
* ISO 4217 (when MONETARY); empty otherwise.
|
|
463
|
+
*
|
|
464
|
+
* @generated from protobuf field: string currency = 3
|
|
465
|
+
*/
|
|
466
|
+
currency: string;
|
|
467
|
+
/**
|
|
468
|
+
* Token / credit / non_monetary unit_name (when not MONETARY).
|
|
469
|
+
*
|
|
470
|
+
* @generated from protobuf field: string unit_name = 4
|
|
471
|
+
*/
|
|
472
|
+
unitName: string;
|
|
473
|
+
/**
|
|
474
|
+
* Token-kind discriminator (per Contract §12.1; required when kind == TOKEN).
|
|
475
|
+
* Examples: "input", "output", "reasoning", "cached_input", "total".
|
|
476
|
+
*
|
|
477
|
+
* @generated from protobuf field: string token_kind = 5
|
|
478
|
+
*/
|
|
479
|
+
tokenKind: string;
|
|
480
|
+
/**
|
|
481
|
+
* Model family (per Contract §12.1; required when kind == TOKEN).
|
|
482
|
+
* Tokens of different model families are NOT comparable.
|
|
483
|
+
*
|
|
484
|
+
* @generated from protobuf field: string model_family = 6
|
|
485
|
+
*/
|
|
486
|
+
modelFamily: string;
|
|
487
|
+
/**
|
|
488
|
+
* Credit program identifier (per Contract §12.1; required when kind == CREDIT).
|
|
489
|
+
*
|
|
490
|
+
* @generated from protobuf field: string credit_program = 7
|
|
491
|
+
*/
|
|
492
|
+
creditProgram: string;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* @generated MessageType for protobuf message spendguard.common.v1.UnitRef
|
|
496
|
+
*/
|
|
497
|
+
declare const UnitRef: UnitRef$Type;
|
|
498
|
+
declare class Amount$Type extends MessageType<Amount> {
|
|
499
|
+
constructor();
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Atomic amount as decimal string for NUMERIC(38,0) precision.
|
|
503
|
+
*
|
|
504
|
+
* Per Ledger §3: cross-unit comparison forbidden; conversion only at
|
|
505
|
+
* explicit normalization step.
|
|
506
|
+
*
|
|
507
|
+
* @generated from protobuf message spendguard.common.v1.Amount
|
|
508
|
+
*/
|
|
509
|
+
interface Amount {
|
|
510
|
+
/**
|
|
511
|
+
* Decimal string, no scientific notation, no thousand separators.
|
|
512
|
+
* Example: "1000000" (= 1.000000 USD when unit.scale=6).
|
|
513
|
+
*
|
|
514
|
+
* @generated from protobuf field: string atomic = 1
|
|
515
|
+
*/
|
|
516
|
+
atomic: string;
|
|
517
|
+
/**
|
|
518
|
+
* @generated from protobuf field: spendguard.common.v1.UnitRef unit = 2
|
|
519
|
+
*/
|
|
520
|
+
unit?: UnitRef;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* @generated MessageType for protobuf message spendguard.common.v1.Amount
|
|
524
|
+
*/
|
|
525
|
+
declare const Amount: Amount$Type;
|
|
526
|
+
declare class PricingFreeze$Type extends MessageType<PricingFreeze> {
|
|
527
|
+
constructor();
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Pricing freeze (per Ledger §13 three-layer freeze).
|
|
531
|
+
*
|
|
532
|
+
* @generated from protobuf message spendguard.common.v1.PricingFreeze
|
|
533
|
+
*/
|
|
534
|
+
interface PricingFreeze {
|
|
535
|
+
/**
|
|
536
|
+
* @generated from protobuf field: string pricing_version = 1
|
|
537
|
+
*/
|
|
538
|
+
pricingVersion: string;
|
|
539
|
+
/**
|
|
540
|
+
* @generated from protobuf field: bytes price_snapshot_hash = 2
|
|
541
|
+
*/
|
|
542
|
+
priceSnapshotHash: Uint8Array;
|
|
543
|
+
/**
|
|
544
|
+
* @generated from protobuf field: string fx_rate_version = 3
|
|
545
|
+
*/
|
|
546
|
+
fxRateVersion: string;
|
|
547
|
+
/**
|
|
548
|
+
* @generated from protobuf field: string unit_conversion_version = 4
|
|
549
|
+
*/
|
|
550
|
+
unitConversionVersion: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* @generated MessageType for protobuf message spendguard.common.v1.PricingFreeze
|
|
554
|
+
*/
|
|
555
|
+
declare const PricingFreeze: PricingFreeze$Type;
|
|
556
|
+
declare class Fencing$Type extends MessageType<Fencing> {
|
|
557
|
+
constructor();
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* @generated from protobuf message spendguard.common.v1.Fencing
|
|
561
|
+
*/
|
|
562
|
+
interface Fencing {
|
|
563
|
+
/**
|
|
564
|
+
* @generated from protobuf field: uint64 epoch = 1
|
|
565
|
+
*/
|
|
566
|
+
epoch: string;
|
|
567
|
+
/**
|
|
568
|
+
* @generated from protobuf field: string scope_id = 2
|
|
569
|
+
*/
|
|
570
|
+
scopeId: string;
|
|
571
|
+
/**
|
|
572
|
+
* @generated from protobuf field: string workload_instance_id = 3
|
|
573
|
+
*/
|
|
574
|
+
workloadInstanceId: string;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* @generated MessageType for protobuf message spendguard.common.v1.Fencing
|
|
578
|
+
*/
|
|
579
|
+
declare const Fencing: Fencing$Type;
|
|
580
|
+
declare class Replay$Type extends MessageType<Replay> {
|
|
581
|
+
constructor();
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Minimal replay response — returned after replay window full payload expired.
|
|
585
|
+
*
|
|
586
|
+
* Per Ledger §7: contains no PII / full prompts / encryption keys; only
|
|
587
|
+
* status code, timestamps, and compact resource references.
|
|
588
|
+
*
|
|
589
|
+
* @generated from protobuf message spendguard.common.v1.Replay
|
|
590
|
+
*/
|
|
591
|
+
interface Replay {
|
|
592
|
+
/**
|
|
593
|
+
* @generated from protobuf field: string ledger_transaction_id = 1
|
|
594
|
+
*/
|
|
595
|
+
ledgerTransactionId: string;
|
|
596
|
+
/**
|
|
597
|
+
* @generated from protobuf field: string operation_kind = 2
|
|
598
|
+
*/
|
|
599
|
+
operationKind: string;
|
|
600
|
+
/**
|
|
601
|
+
* @generated from protobuf field: string audit_decision_event_id = 3
|
|
602
|
+
*/
|
|
603
|
+
auditDecisionEventId: string;
|
|
604
|
+
/**
|
|
605
|
+
* @generated from protobuf field: google.protobuf.Timestamp recorded_at = 4
|
|
606
|
+
*/
|
|
607
|
+
recordedAt?: Timestamp;
|
|
608
|
+
/**
|
|
609
|
+
* Operation-specific compact reference; e.g., reservation_set_id for
|
|
610
|
+
* ReserveSet, refund_credit_event_id for RefundCredit.
|
|
611
|
+
*
|
|
612
|
+
* @generated from protobuf field: string operation_id = 5
|
|
613
|
+
*/
|
|
614
|
+
operationId: string;
|
|
615
|
+
/**
|
|
616
|
+
* @generated from protobuf field: spendguard.common.v1.Replay.StatusCode status_code = 6
|
|
617
|
+
*/
|
|
618
|
+
statusCode: Replay_StatusCode;
|
|
619
|
+
/**
|
|
620
|
+
* ORIGINAL decision_id from the first call (per Contract §6 / Ledger §7
|
|
621
|
+
* idempotency — same idempotency_key MUST surface the same decision_id
|
|
622
|
+
* across retries). Sidecar uses this on the Replay branch to anchor its
|
|
623
|
+
* response to the original decision, not its locally-minted retry value.
|
|
624
|
+
* Not PII; a server-minted UUID7 identifier.
|
|
625
|
+
*
|
|
626
|
+
* @generated from protobuf field: string decision_id = 7
|
|
627
|
+
*/
|
|
628
|
+
decisionId: string;
|
|
629
|
+
/**
|
|
630
|
+
* ORIGINAL projection-side identifiers from the first call, IN CANONICAL
|
|
631
|
+
* ORDER (matching the original Success response order — i.e., claim
|
|
632
|
+
* ordinal). For ReserveSet these are the reservation_ids; for other
|
|
633
|
+
* operations operation-specific (empty for ones that have no per-row
|
|
634
|
+
* projection ids). Required so the adapter sees the same set of resource
|
|
635
|
+
* handles, in the same order, across retries.
|
|
636
|
+
* Not PII; server-minted UUIDs.
|
|
637
|
+
*
|
|
638
|
+
* @generated from protobuf field: repeated string projection_ids = 8
|
|
639
|
+
*/
|
|
640
|
+
projectionIds: string[];
|
|
641
|
+
/**
|
|
642
|
+
* ORIGINAL TTL anchor from the first call. For ReserveSet, this is the
|
|
643
|
+
* reservation's ttl_expires_at (the wallclock-derived expiry stored at
|
|
644
|
+
* first-success). The sidecar mirrors this back to the adapter on Replay
|
|
645
|
+
* so that the loser of a concurrent same-key race observes the same TTL
|
|
646
|
+
* as the winner instead of recomputing locally and returning a different
|
|
647
|
+
* wallclock value.
|
|
648
|
+
*
|
|
649
|
+
* @generated from protobuf field: google.protobuf.Timestamp ttl_expires_at = 9
|
|
650
|
+
*/
|
|
651
|
+
ttlExpiresAt?: Timestamp;
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* @generated MessageType for protobuf message spendguard.common.v1.Replay
|
|
655
|
+
*/
|
|
656
|
+
declare const Replay: Replay$Type;
|
|
657
|
+
declare class FullResponsePayload$Type extends MessageType<FullResponsePayload> {
|
|
658
|
+
constructor();
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Full response payload — first-success-only; subject to retention policy.
|
|
662
|
+
*
|
|
663
|
+
* Per Ledger §7: tenant-policy retention (default 24h, max 30d Phase 1).
|
|
664
|
+
*
|
|
665
|
+
* @generated from protobuf message spendguard.common.v1.FullResponsePayload
|
|
666
|
+
*/
|
|
667
|
+
interface FullResponsePayload {
|
|
668
|
+
/**
|
|
669
|
+
* Operation-specific full payload; opaque protobuf Any encoded here.
|
|
670
|
+
*
|
|
671
|
+
* @generated from protobuf field: bytes payload = 1
|
|
672
|
+
*/
|
|
673
|
+
payload: Uint8Array;
|
|
674
|
+
/**
|
|
675
|
+
* @generated from protobuf field: google.protobuf.Timestamp expires_at = 2
|
|
676
|
+
*/
|
|
677
|
+
expiresAt?: Timestamp;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* @generated MessageType for protobuf message spendguard.common.v1.FullResponsePayload
|
|
681
|
+
*/
|
|
682
|
+
declare const FullResponsePayload: FullResponsePayload$Type;
|
|
683
|
+
declare class Error$Type extends MessageType<Error> {
|
|
684
|
+
constructor();
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* @generated from protobuf message spendguard.common.v1.Error
|
|
688
|
+
*/
|
|
689
|
+
interface Error {
|
|
690
|
+
/**
|
|
691
|
+
* @generated from protobuf field: spendguard.common.v1.Error.Code code = 1
|
|
692
|
+
*/
|
|
693
|
+
code: Error_Code;
|
|
694
|
+
/**
|
|
695
|
+
* @generated from protobuf field: string message = 2
|
|
696
|
+
*/
|
|
697
|
+
message: string;
|
|
698
|
+
/**
|
|
699
|
+
* @generated from protobuf field: map<string, string> details = 3
|
|
700
|
+
*/
|
|
701
|
+
details: {
|
|
702
|
+
[key: string]: string;
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* @generated MessageType for protobuf message spendguard.common.v1.Error
|
|
707
|
+
*/
|
|
708
|
+
declare const Error: Error$Type;
|
|
709
|
+
declare class BudgetClaim$Type extends MessageType<BudgetClaim> {
|
|
710
|
+
constructor();
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* @generated from protobuf message spendguard.common.v1.BudgetClaim
|
|
714
|
+
*/
|
|
715
|
+
interface BudgetClaim {
|
|
716
|
+
/**
|
|
717
|
+
* @generated from protobuf field: string budget_id = 1
|
|
718
|
+
*/
|
|
719
|
+
budgetId: string;
|
|
720
|
+
/**
|
|
721
|
+
* @generated from protobuf field: spendguard.common.v1.UnitRef unit = 2
|
|
722
|
+
*/
|
|
723
|
+
unit?: UnitRef;
|
|
724
|
+
/**
|
|
725
|
+
* NUMERIC(38,0) decimal string.
|
|
726
|
+
*
|
|
727
|
+
* @generated from protobuf field: string amount_atomic = 3
|
|
728
|
+
*/
|
|
729
|
+
amountAtomic: string;
|
|
730
|
+
/**
|
|
731
|
+
* @generated from protobuf field: spendguard.common.v1.BudgetClaim.Direction direction = 4
|
|
732
|
+
*/
|
|
733
|
+
direction: BudgetClaim_Direction;
|
|
734
|
+
/**
|
|
735
|
+
* @generated from protobuf field: string window_instance_id = 5
|
|
736
|
+
*/
|
|
737
|
+
windowInstanceId: string;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* @generated MessageType for protobuf message spendguard.common.v1.BudgetClaim
|
|
741
|
+
*/
|
|
742
|
+
declare const BudgetClaim: BudgetClaim$Type;
|
|
743
|
+
declare class LockOrderToken$Type extends MessageType<LockOrderToken> {
|
|
744
|
+
constructor();
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Server derives if omitted; validates if provided.
|
|
748
|
+
*
|
|
749
|
+
* Derivation:
|
|
750
|
+
* sorted_tuple = sort_lex_by(claims, key=(budget_id, unit.unit_id))
|
|
751
|
+
* canonical = ",".join(f"{c.budget_id}:{c.unit.unit_id}" for c in sorted_tuple)
|
|
752
|
+
* token = "v1:" + hex(sha256(canonical))
|
|
753
|
+
*
|
|
754
|
+
* @generated from protobuf message spendguard.common.v1.LockOrderToken
|
|
755
|
+
*/
|
|
756
|
+
interface LockOrderToken {
|
|
757
|
+
/**
|
|
758
|
+
* @generated from protobuf field: string value = 1
|
|
759
|
+
*/
|
|
760
|
+
value: string;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* @generated MessageType for protobuf message spendguard.common.v1.LockOrderToken
|
|
764
|
+
*/
|
|
765
|
+
declare const LockOrderToken: LockOrderToken$Type;
|
|
766
|
+
declare class CloudEvent$Type extends MessageType<CloudEvent> {
|
|
767
|
+
constructor();
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* CloudEvents 1.0 envelope (structured mode).
|
|
771
|
+
*
|
|
772
|
+
* `data` is opaque payload bytes; type-specific schema lives in canonical
|
|
773
|
+
* schema bundle (Trace §12).
|
|
774
|
+
*
|
|
775
|
+
* @generated from protobuf message spendguard.common.v1.CloudEvent
|
|
776
|
+
*/
|
|
777
|
+
interface CloudEvent {
|
|
778
|
+
/**
|
|
779
|
+
* Always "1.0".
|
|
780
|
+
*
|
|
781
|
+
* @generated from protobuf field: string specversion = 1
|
|
782
|
+
*/
|
|
783
|
+
specversion: string;
|
|
784
|
+
/**
|
|
785
|
+
* Event type, e.g.:
|
|
786
|
+
* spendguard.audit.decision
|
|
787
|
+
* spendguard.audit.outcome
|
|
788
|
+
* spendguard.ledger.reservation
|
|
789
|
+
* spendguard.ledger.commit
|
|
790
|
+
* spendguard.ledger.release
|
|
791
|
+
* spendguard.approval.requested
|
|
792
|
+
* spendguard.approval.granted
|
|
793
|
+
* spendguard.approval.denied
|
|
794
|
+
* spendguard.approval.expired
|
|
795
|
+
* spendguard.rollback
|
|
796
|
+
* spendguard.tombstone
|
|
797
|
+
* spendguard.refund.credit_received
|
|
798
|
+
* spendguard.dispute.requested
|
|
799
|
+
* spendguard.dispute.granted
|
|
800
|
+
* spendguard.dispute.denied
|
|
801
|
+
* spendguard.dispute.withdrawn
|
|
802
|
+
* spendguard.dispute.resolved
|
|
803
|
+
* spendguard.region_failover_promoted
|
|
804
|
+
* spendguard.ledger.invoice_reconciled
|
|
805
|
+
* spendguard.ledger.reconciliation_run
|
|
806
|
+
*
|
|
807
|
+
* @generated from protobuf field: string type = 2
|
|
808
|
+
*/
|
|
809
|
+
type: string;
|
|
810
|
+
/**
|
|
811
|
+
* @generated from protobuf field: string source = 3
|
|
812
|
+
*/
|
|
813
|
+
source: string;
|
|
814
|
+
/**
|
|
815
|
+
* event_id (UUID v7 string); required to be globally unique for dedupe.
|
|
816
|
+
*
|
|
817
|
+
* @generated from protobuf field: string id = 4
|
|
818
|
+
*/
|
|
819
|
+
id: string;
|
|
820
|
+
/**
|
|
821
|
+
* @generated from protobuf field: google.protobuf.Timestamp time = 5
|
|
822
|
+
*/
|
|
823
|
+
time?: Timestamp;
|
|
824
|
+
/**
|
|
825
|
+
* Per Trace §7.5 CloudEvents 1.0 envelope: canonical encoding is
|
|
826
|
+
* "application/json" for the `data` field. The `data` field is bytes
|
|
827
|
+
* here (proto3 limitation); content MUST be a JSON document encoded
|
|
828
|
+
* UTF-8 unless `datacontenttype` advertises a different encoding.
|
|
829
|
+
*
|
|
830
|
+
* @generated from protobuf field: string datacontenttype = 6
|
|
831
|
+
*/
|
|
832
|
+
datacontenttype: string;
|
|
833
|
+
/**
|
|
834
|
+
* @generated from protobuf field: bytes data = 7
|
|
835
|
+
*/
|
|
836
|
+
data: Uint8Array;
|
|
837
|
+
/**
|
|
838
|
+
* SpendGuard extension attributes (per Trace §7.5 spendguard.* extensions).
|
|
839
|
+
*
|
|
840
|
+
* @generated from protobuf field: string tenant_id = 100
|
|
841
|
+
*/
|
|
842
|
+
tenantId: string;
|
|
843
|
+
/**
|
|
844
|
+
* @generated from protobuf field: string run_id = 101
|
|
845
|
+
*/
|
|
846
|
+
runId: string;
|
|
847
|
+
/**
|
|
848
|
+
* @generated from protobuf field: string decision_id = 102
|
|
849
|
+
*/
|
|
850
|
+
decisionId: string;
|
|
851
|
+
/**
|
|
852
|
+
* @generated from protobuf field: string schema_bundle_id = 103
|
|
853
|
+
*/
|
|
854
|
+
schemaBundleId: string;
|
|
855
|
+
/**
|
|
856
|
+
* Producer signing (per Trace §13).
|
|
857
|
+
*
|
|
858
|
+
* @generated from protobuf field: string producer_id = 200
|
|
859
|
+
*/
|
|
860
|
+
producerId: string;
|
|
861
|
+
/**
|
|
862
|
+
* @generated from protobuf field: uint64 producer_sequence = 201
|
|
863
|
+
*/
|
|
864
|
+
producerSequence: string;
|
|
865
|
+
/**
|
|
866
|
+
* @generated from protobuf field: bytes producer_signature = 202
|
|
867
|
+
*/
|
|
868
|
+
producerSignature: Uint8Array;
|
|
869
|
+
/**
|
|
870
|
+
* @generated from protobuf field: string signing_key_id = 203
|
|
871
|
+
*/
|
|
872
|
+
signingKeyId: string;
|
|
873
|
+
/**
|
|
874
|
+
* Decision-side prediction columns (11 per spec §2.1).
|
|
875
|
+
*
|
|
876
|
+
* @generated from protobuf field: int64 predicted_a_tokens = 300
|
|
877
|
+
*/
|
|
878
|
+
predictedATokens: string;
|
|
879
|
+
/**
|
|
880
|
+
* @generated from protobuf field: int64 predicted_b_tokens = 301
|
|
881
|
+
*/
|
|
882
|
+
predictedBTokens: string;
|
|
883
|
+
/**
|
|
884
|
+
* @generated from protobuf field: int64 predicted_c_tokens = 302
|
|
885
|
+
*/
|
|
886
|
+
predictedCTokens: string;
|
|
887
|
+
/**
|
|
888
|
+
* @generated from protobuf field: string reserved_strategy = 303
|
|
889
|
+
*/
|
|
890
|
+
reservedStrategy: string;
|
|
891
|
+
/**
|
|
892
|
+
* @generated from protobuf field: string prediction_strategy_used = 304
|
|
893
|
+
*/
|
|
894
|
+
predictionStrategyUsed: string;
|
|
895
|
+
/**
|
|
896
|
+
* @generated from protobuf field: string prediction_policy_used = 305
|
|
897
|
+
*/
|
|
898
|
+
predictionPolicyUsed: string;
|
|
899
|
+
/**
|
|
900
|
+
* @generated from protobuf field: string tokenizer_tier = 306
|
|
901
|
+
*/
|
|
902
|
+
tokenizerTier: string;
|
|
903
|
+
/**
|
|
904
|
+
* @generated from protobuf field: string tokenizer_version_id = 307
|
|
905
|
+
*/
|
|
906
|
+
tokenizerVersionId: string;
|
|
907
|
+
/**
|
|
908
|
+
* @generated from protobuf field: float prediction_confidence = 308
|
|
909
|
+
*/
|
|
910
|
+
predictionConfidence: number;
|
|
911
|
+
/**
|
|
912
|
+
* Round-3 fix M3: int32 → int64 to match audit_outbox.prediction_sample_size
|
|
913
|
+
* (BIGINT) and audit_outbox.predicted_b_tokens (BIGINT). Eliminates the
|
|
914
|
+
* 2^31 overflow surface on multi-year aggregations without a CHECK
|
|
915
|
+
* constraint workaround. Per round-2 fix M4 the SQL side is already
|
|
916
|
+
* BIGINT — this aligns the wire to match.
|
|
917
|
+
*
|
|
918
|
+
* @generated from protobuf field: int64 prediction_sample_size = 309
|
|
919
|
+
*/
|
|
920
|
+
predictionSampleSize: string;
|
|
921
|
+
/**
|
|
922
|
+
* @generated from protobuf field: string cold_start_layer_used = 310
|
|
923
|
+
*/
|
|
924
|
+
coldStartLayerUsed: string;
|
|
925
|
+
/**
|
|
926
|
+
* Run-level projection columns (3 per spec §2.2).
|
|
927
|
+
* NUMERIC(38,0) serialized as int64 here (assumes < 2^63 atomic units;
|
|
928
|
+
* for larger budgets a future v2 may switch to string per Money type).
|
|
929
|
+
*
|
|
930
|
+
* @generated from protobuf field: int64 run_projection_at_decision_atomic = 311
|
|
931
|
+
*/
|
|
932
|
+
runProjectionAtDecisionAtomic: string;
|
|
933
|
+
/**
|
|
934
|
+
* @generated from protobuf field: int32 run_predicted_remaining_steps = 312
|
|
935
|
+
*/
|
|
936
|
+
runPredictedRemainingSteps: number;
|
|
937
|
+
/**
|
|
938
|
+
* Round-4 fix M1: int32 → int64 to match audit_outbox.run_steps_completed_so_far
|
|
939
|
+
* (BIGINT per round-2 fix M4 anticipating multi-year aggregation). Wire-
|
|
940
|
+
* compatible with the round-3 int32 encoding because non-negative
|
|
941
|
+
* values use identical varint wire bytes per proto3 spec; tag 313
|
|
942
|
+
* therefore stays at 313 without a version bump.
|
|
943
|
+
*
|
|
944
|
+
* @generated from protobuf field: int64 run_steps_completed_so_far = 313
|
|
945
|
+
*/
|
|
946
|
+
runStepsCompletedSoFar: string;
|
|
947
|
+
/**
|
|
948
|
+
* Commit-side actual columns (4 per spec §2.3). Only on .outcome events.
|
|
949
|
+
*
|
|
950
|
+
* @generated from protobuf field: int64 actual_input_tokens = 314
|
|
951
|
+
*/
|
|
952
|
+
actualInputTokens: string;
|
|
953
|
+
/**
|
|
954
|
+
* @generated from protobuf field: int64 actual_output_tokens = 315
|
|
955
|
+
*/
|
|
956
|
+
actualOutputTokens: string;
|
|
957
|
+
/**
|
|
958
|
+
* @generated from protobuf field: float delta_b_ratio = 316
|
|
959
|
+
*/
|
|
960
|
+
deltaBRatio: number;
|
|
961
|
+
/**
|
|
962
|
+
* @generated from protobuf field: float delta_c_ratio = 317
|
|
963
|
+
*/
|
|
964
|
+
deltaCRatio: number;
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
967
|
+
* @generated MessageType for protobuf message spendguard.common.v1.CloudEvent
|
|
968
|
+
*/
|
|
969
|
+
declare const CloudEvent: CloudEvent$Type;
|
|
970
|
+
declare class SchemaBundleRef$Type extends MessageType<SchemaBundleRef> {
|
|
971
|
+
constructor();
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* @generated from protobuf message spendguard.common.v1.SchemaBundleRef
|
|
975
|
+
*/
|
|
976
|
+
interface SchemaBundleRef {
|
|
977
|
+
/**
|
|
978
|
+
* @generated from protobuf field: string schema_bundle_id = 1
|
|
979
|
+
*/
|
|
980
|
+
schemaBundleId: string;
|
|
981
|
+
/**
|
|
982
|
+
* @generated from protobuf field: bytes schema_bundle_hash = 2
|
|
983
|
+
*/
|
|
984
|
+
schemaBundleHash: Uint8Array;
|
|
985
|
+
/**
|
|
986
|
+
* @generated from protobuf field: string canonical_schema_version = 3
|
|
987
|
+
*/
|
|
988
|
+
canonicalSchemaVersion: string;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* @generated MessageType for protobuf message spendguard.common.v1.SchemaBundleRef
|
|
992
|
+
*/
|
|
993
|
+
declare const SchemaBundleRef: SchemaBundleRef$Type;
|
|
994
|
+
declare class ContractBundleRef$Type extends MessageType<ContractBundleRef> {
|
|
995
|
+
constructor();
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* @generated from protobuf message spendguard.common.v1.ContractBundleRef
|
|
999
|
+
*/
|
|
1000
|
+
interface ContractBundleRef {
|
|
1001
|
+
/**
|
|
1002
|
+
* @generated from protobuf field: string bundle_id = 1
|
|
1003
|
+
*/
|
|
1004
|
+
bundleId: string;
|
|
1005
|
+
/**
|
|
1006
|
+
* @generated from protobuf field: bytes bundle_hash = 2
|
|
1007
|
+
*/
|
|
1008
|
+
bundleHash: Uint8Array;
|
|
1009
|
+
/**
|
|
1010
|
+
* @generated from protobuf field: bytes bundle_signature = 3
|
|
1011
|
+
*/
|
|
1012
|
+
bundleSignature: Uint8Array;
|
|
1013
|
+
/**
|
|
1014
|
+
* @generated from protobuf field: string signing_key_id = 4
|
|
1015
|
+
*/
|
|
1016
|
+
signingKeyId: string;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* @generated MessageType for protobuf message spendguard.common.v1.ContractBundleRef
|
|
1020
|
+
*/
|
|
1021
|
+
declare const ContractBundleRef: ContractBundleRef$Type;
|
|
1022
|
+
declare class Idempotency$Type extends MessageType<Idempotency> {
|
|
1023
|
+
constructor();
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* @generated from protobuf message spendguard.common.v1.Idempotency
|
|
1027
|
+
*/
|
|
1028
|
+
interface Idempotency {
|
|
1029
|
+
/**
|
|
1030
|
+
* Caller-supplied idempotency key; scoped to (tenant_id, operation_kind).
|
|
1031
|
+
*
|
|
1032
|
+
* @generated from protobuf field: string key = 1
|
|
1033
|
+
*/
|
|
1034
|
+
key: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* sha256 of canonical request body for replay-on-retry consistency check.
|
|
1037
|
+
*
|
|
1038
|
+
* @generated from protobuf field: bytes request_hash = 2
|
|
1039
|
+
*/
|
|
1040
|
+
requestHash: Uint8Array;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* @generated MessageType for protobuf message spendguard.common.v1.Idempotency
|
|
1044
|
+
*/
|
|
1045
|
+
declare const Idempotency: Idempotency$Type;
|
|
1046
|
+
declare class SubscriptionMeter$Type extends MessageType<SubscriptionMeter> {
|
|
1047
|
+
constructor();
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Subscription meter snapshot — returned to the adapter when the
|
|
1051
|
+
* classifier routes a request through the subscription meter path.
|
|
1052
|
+
* All values are best-effort retail-price estimates in micro-USD.
|
|
1053
|
+
*
|
|
1054
|
+
* The sidecar does NOT write ledger_entries for these rows; the
|
|
1055
|
+
* canonical record lives in `subscription_meters` (migration 0044).
|
|
1056
|
+
*
|
|
1057
|
+
* @generated from protobuf message spendguard.common.v1.SubscriptionMeter
|
|
1058
|
+
*/
|
|
1059
|
+
interface SubscriptionMeter {
|
|
1060
|
+
/**
|
|
1061
|
+
* The plan that produced this meter row.
|
|
1062
|
+
*
|
|
1063
|
+
* @generated from protobuf field: string plan = 1
|
|
1064
|
+
*/
|
|
1065
|
+
plan: string;
|
|
1066
|
+
/**
|
|
1067
|
+
* Current period (UTC calendar month default).
|
|
1068
|
+
*
|
|
1069
|
+
* @generated from protobuf field: google.protobuf.Timestamp period_start = 2
|
|
1070
|
+
*/
|
|
1071
|
+
periodStart?: Timestamp;
|
|
1072
|
+
/**
|
|
1073
|
+
* @generated from protobuf field: google.protobuf.Timestamp period_end = 3
|
|
1074
|
+
*/
|
|
1075
|
+
periodEnd?: Timestamp;
|
|
1076
|
+
/**
|
|
1077
|
+
* Atomic counters (micro-USD).
|
|
1078
|
+
*
|
|
1079
|
+
* @generated from protobuf field: int64 consumed_atomic = 4
|
|
1080
|
+
*/
|
|
1081
|
+
consumedAtomic: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* @generated from protobuf field: int64 monthly_cap_atomic = 5
|
|
1084
|
+
*/
|
|
1085
|
+
monthlyCapAtomic: string;
|
|
1086
|
+
/**
|
|
1087
|
+
* @generated from protobuf field: int64 alert_at_atomic = 6
|
|
1088
|
+
*/
|
|
1089
|
+
alertAtAtomic: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* 0 means "no hard cap" — kept as int64 (not optional) so legacy
|
|
1092
|
+
* decoders read 0 = soft mode.
|
|
1093
|
+
*
|
|
1094
|
+
* @generated from protobuf field: int64 hard_cap_at_atomic = 7
|
|
1095
|
+
*/
|
|
1096
|
+
hardCapAtAtomic: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* @generated from protobuf field: spendguard.common.v1.SubscriptionMeter.CapDecision cap_decision = 8
|
|
1099
|
+
*/
|
|
1100
|
+
capDecision: SubscriptionMeter_CapDecision;
|
|
1101
|
+
/**
|
|
1102
|
+
* For hard-cap blocks only — seconds until window reset, bounded at
|
|
1103
|
+
* 86400 (24h) per design §4.5 to prevent CLIs hanging > 24h.
|
|
1104
|
+
*
|
|
1105
|
+
* @generated from protobuf field: int64 retry_after_seconds = 9
|
|
1106
|
+
*/
|
|
1107
|
+
retryAfterSeconds: string;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* @generated MessageType for protobuf message spendguard.common.v1.SubscriptionMeter
|
|
1111
|
+
*/
|
|
1112
|
+
declare const SubscriptionMeter: SubscriptionMeter$Type;
|
|
1113
|
+
|
|
1114
|
+
declare const common_Amount: typeof Amount;
|
|
1115
|
+
declare const common_BudgetClaim: typeof BudgetClaim;
|
|
1116
|
+
type common_BudgetClaim_Direction = BudgetClaim_Direction;
|
|
1117
|
+
declare const common_BudgetClaim_Direction: typeof BudgetClaim_Direction;
|
|
1118
|
+
declare const common_CloudEvent: typeof CloudEvent;
|
|
1119
|
+
declare const common_ContractBundleRef: typeof ContractBundleRef;
|
|
1120
|
+
declare const common_Error: typeof Error;
|
|
1121
|
+
type common_Error_Code = Error_Code;
|
|
1122
|
+
declare const common_Error_Code: typeof Error_Code;
|
|
1123
|
+
declare const common_Fencing: typeof Fencing;
|
|
1124
|
+
declare const common_FullResponsePayload: typeof FullResponsePayload;
|
|
1125
|
+
declare const common_Idempotency: typeof Idempotency;
|
|
1126
|
+
declare const common_LockOrderToken: typeof LockOrderToken;
|
|
1127
|
+
declare const common_PricingFreeze: typeof PricingFreeze;
|
|
1128
|
+
declare const common_Replay: typeof Replay;
|
|
1129
|
+
type common_Replay_StatusCode = Replay_StatusCode;
|
|
1130
|
+
declare const common_Replay_StatusCode: typeof Replay_StatusCode;
|
|
1131
|
+
type common_ReservationSource = ReservationSource;
|
|
1132
|
+
declare const common_ReservationSource: typeof ReservationSource;
|
|
1133
|
+
declare const common_SchemaBundleRef: typeof SchemaBundleRef;
|
|
1134
|
+
declare const common_SpendGuardIds: typeof SpendGuardIds;
|
|
1135
|
+
declare const common_SubscriptionMeter: typeof SubscriptionMeter;
|
|
1136
|
+
type common_SubscriptionMeter_CapDecision = SubscriptionMeter_CapDecision;
|
|
1137
|
+
declare const common_SubscriptionMeter_CapDecision: typeof SubscriptionMeter_CapDecision;
|
|
1138
|
+
declare const common_TraceContext: typeof TraceContext;
|
|
1139
|
+
declare const common_UnitRef: typeof UnitRef;
|
|
1140
|
+
type common_UnitRef_Kind = UnitRef_Kind;
|
|
1141
|
+
declare const common_UnitRef_Kind: typeof UnitRef_Kind;
|
|
1142
|
+
declare namespace common {
|
|
1143
|
+
export { common_Amount as Amount, common_BudgetClaim as BudgetClaim, common_BudgetClaim_Direction as BudgetClaim_Direction, common_CloudEvent as CloudEvent, common_ContractBundleRef as ContractBundleRef, common_Error as Error, common_Error_Code as Error_Code, common_Fencing as Fencing, common_FullResponsePayload as FullResponsePayload, common_Idempotency as Idempotency, common_LockOrderToken as LockOrderToken, common_PricingFreeze as PricingFreeze, common_Replay as Replay, common_Replay_StatusCode as Replay_StatusCode, common_ReservationSource as ReservationSource, common_SchemaBundleRef as SchemaBundleRef, common_SpendGuardIds as SpendGuardIds, common_SubscriptionMeter as SubscriptionMeter, common_SubscriptionMeter_CapDecision as SubscriptionMeter_CapDecision, common_TraceContext as TraceContext, common_UnitRef as UnitRef, common_UnitRef_Kind as UnitRef_Kind };
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* Represents a JSON `null`.
|
|
1148
|
+
*
|
|
1149
|
+
* `NullValue` is a sentinel, using an enum with only one value to represent
|
|
1150
|
+
* the null value for the `Value` type union.
|
|
1151
|
+
*
|
|
1152
|
+
* A field of type `NullValue` with any value other than `0` is considered
|
|
1153
|
+
* invalid. Most ProtoJSON serializers will emit a Value with a `null_value` set
|
|
1154
|
+
* as a JSON `null` regardless of the integer value, and so will round trip to
|
|
1155
|
+
* a `0` value.
|
|
1156
|
+
*
|
|
1157
|
+
* @generated from protobuf enum google.protobuf.NullValue
|
|
1158
|
+
*/
|
|
1159
|
+
declare enum NullValue {
|
|
1160
|
+
/**
|
|
1161
|
+
* Null value.
|
|
1162
|
+
*
|
|
1163
|
+
* @generated from protobuf enum value: NULL_VALUE = 0;
|
|
1164
|
+
*/
|
|
1165
|
+
NULL_VALUE = 0
|
|
1166
|
+
}
|
|
1167
|
+
declare class Struct$Type extends MessageType<Struct> {
|
|
1168
|
+
constructor();
|
|
1169
|
+
/**
|
|
1170
|
+
* Encode `Struct` to JSON object.
|
|
1171
|
+
*/
|
|
1172
|
+
internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue;
|
|
1173
|
+
/**
|
|
1174
|
+
* Decode `Struct` from JSON object.
|
|
1175
|
+
*/
|
|
1176
|
+
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct;
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Represents a JSON object.
|
|
1180
|
+
*
|
|
1181
|
+
* An unordered key-value map, intending to perfectly capture the semantics of a
|
|
1182
|
+
* JSON object. This enables parsing any arbitrary JSON payload as a message
|
|
1183
|
+
* field in ProtoJSON format.
|
|
1184
|
+
*
|
|
1185
|
+
* This follows RFC 8259 guidelines for interoperable JSON: notably this type
|
|
1186
|
+
* cannot represent large Int64 values or `NaN`/`Infinity` numbers,
|
|
1187
|
+
* since the JSON format generally does not support those values in its number
|
|
1188
|
+
* type.
|
|
1189
|
+
*
|
|
1190
|
+
* If you do not intend to parse arbitrary JSON into your message, a custom
|
|
1191
|
+
* typed message should be preferred instead of using this type.
|
|
1192
|
+
*
|
|
1193
|
+
* @generated from protobuf message google.protobuf.Struct
|
|
1194
|
+
*/
|
|
1195
|
+
interface Struct {
|
|
1196
|
+
/**
|
|
1197
|
+
* Unordered map of dynamically typed values.
|
|
1198
|
+
*
|
|
1199
|
+
* @generated from protobuf field: map<string, google.protobuf.Value> fields = 1
|
|
1200
|
+
*/
|
|
1201
|
+
fields: {
|
|
1202
|
+
[key: string]: Value;
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* @generated MessageType for protobuf message google.protobuf.Struct
|
|
1207
|
+
*/
|
|
1208
|
+
declare const Struct: Struct$Type;
|
|
1209
|
+
declare class Value$Type extends MessageType<Value> {
|
|
1210
|
+
constructor();
|
|
1211
|
+
/**
|
|
1212
|
+
* Encode `Value` to JSON value.
|
|
1213
|
+
*/
|
|
1214
|
+
internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue;
|
|
1215
|
+
/**
|
|
1216
|
+
* Decode `Value` from JSON value.
|
|
1217
|
+
*/
|
|
1218
|
+
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value;
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Represents a JSON value.
|
|
1222
|
+
*
|
|
1223
|
+
* `Value` represents a dynamically typed value which can be either
|
|
1224
|
+
* null, a number, a string, a boolean, a recursive struct value, or a
|
|
1225
|
+
* list of values. A producer of value is expected to set one of these
|
|
1226
|
+
* variants. Absence of any variant is an invalid state.
|
|
1227
|
+
*
|
|
1228
|
+
* @generated from protobuf message google.protobuf.Value
|
|
1229
|
+
*/
|
|
1230
|
+
interface Value {
|
|
1231
|
+
/**
|
|
1232
|
+
* The kind of value.
|
|
1233
|
+
*
|
|
1234
|
+
* @generated from protobuf oneof: kind
|
|
1235
|
+
*/
|
|
1236
|
+
kind: {
|
|
1237
|
+
oneofKind: "nullValue";
|
|
1238
|
+
/**
|
|
1239
|
+
* Represents a JSON `null`.
|
|
1240
|
+
*
|
|
1241
|
+
* @generated from protobuf field: google.protobuf.NullValue null_value = 1
|
|
1242
|
+
*/
|
|
1243
|
+
nullValue: NullValue;
|
|
1244
|
+
} | {
|
|
1245
|
+
oneofKind: "numberValue";
|
|
1246
|
+
/**
|
|
1247
|
+
* Represents a JSON number. Must not be `NaN`, `Infinity` or
|
|
1248
|
+
* `-Infinity`, since those are not supported in JSON. This also cannot
|
|
1249
|
+
* represent large Int64 values, since JSON format generally does not
|
|
1250
|
+
* support them in its number type.
|
|
1251
|
+
*
|
|
1252
|
+
* @generated from protobuf field: double number_value = 2
|
|
1253
|
+
*/
|
|
1254
|
+
numberValue: number;
|
|
1255
|
+
} | {
|
|
1256
|
+
oneofKind: "stringValue";
|
|
1257
|
+
/**
|
|
1258
|
+
* Represents a JSON string.
|
|
1259
|
+
*
|
|
1260
|
+
* @generated from protobuf field: string string_value = 3
|
|
1261
|
+
*/
|
|
1262
|
+
stringValue: string;
|
|
1263
|
+
} | {
|
|
1264
|
+
oneofKind: "boolValue";
|
|
1265
|
+
/**
|
|
1266
|
+
* Represents a JSON boolean (`true` or `false` literal in JSON).
|
|
1267
|
+
*
|
|
1268
|
+
* @generated from protobuf field: bool bool_value = 4
|
|
1269
|
+
*/
|
|
1270
|
+
boolValue: boolean;
|
|
1271
|
+
} | {
|
|
1272
|
+
oneofKind: "structValue";
|
|
1273
|
+
/**
|
|
1274
|
+
* Represents a JSON object.
|
|
1275
|
+
*
|
|
1276
|
+
* @generated from protobuf field: google.protobuf.Struct struct_value = 5
|
|
1277
|
+
*/
|
|
1278
|
+
structValue: Struct;
|
|
1279
|
+
} | {
|
|
1280
|
+
oneofKind: "listValue";
|
|
1281
|
+
/**
|
|
1282
|
+
* Represents a JSON array.
|
|
1283
|
+
*
|
|
1284
|
+
* @generated from protobuf field: google.protobuf.ListValue list_value = 6
|
|
1285
|
+
*/
|
|
1286
|
+
listValue: ListValue;
|
|
1287
|
+
} | {
|
|
1288
|
+
oneofKind: undefined;
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* @generated MessageType for protobuf message google.protobuf.Value
|
|
1293
|
+
*/
|
|
1294
|
+
declare const Value: Value$Type;
|
|
1295
|
+
declare class ListValue$Type extends MessageType<ListValue> {
|
|
1296
|
+
constructor();
|
|
1297
|
+
/**
|
|
1298
|
+
* Encode `ListValue` to JSON array.
|
|
1299
|
+
*/
|
|
1300
|
+
internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue;
|
|
1301
|
+
/**
|
|
1302
|
+
* Decode `ListValue` from JSON array.
|
|
1303
|
+
*/
|
|
1304
|
+
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue;
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Represents a JSON array.
|
|
1308
|
+
*
|
|
1309
|
+
* @generated from protobuf message google.protobuf.ListValue
|
|
1310
|
+
*/
|
|
1311
|
+
interface ListValue {
|
|
1312
|
+
/**
|
|
1313
|
+
* Repeated field of dynamically typed values.
|
|
1314
|
+
*
|
|
1315
|
+
* @generated from protobuf field: repeated google.protobuf.Value values = 1
|
|
1316
|
+
*/
|
|
1317
|
+
values: Value[];
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* @generated MessageType for protobuf message google.protobuf.ListValue
|
|
1321
|
+
*/
|
|
1322
|
+
declare const ListValue: ListValue$Type;
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.HandshakeRequest.CapabilityLevel
|
|
1326
|
+
*/
|
|
1327
|
+
declare enum HandshakeRequest_CapabilityLevel {
|
|
1328
|
+
/**
|
|
1329
|
+
* @generated from protobuf enum value: CAPABILITY_LEVEL_UNSPECIFIED = 0;
|
|
1330
|
+
*/
|
|
1331
|
+
CAPABILITY_LEVEL_UNSPECIFIED = 0,
|
|
1332
|
+
/**
|
|
1333
|
+
* OTel ingest only; no enforcement
|
|
1334
|
+
*
|
|
1335
|
+
* @generated from protobuf enum value: L0_INGEST = 16;
|
|
1336
|
+
*/
|
|
1337
|
+
L0_INGEST = 16,
|
|
1338
|
+
/**
|
|
1339
|
+
* @generated from protobuf enum value: L1_LLM_CALL = 32;
|
|
1340
|
+
*/
|
|
1341
|
+
L1_LLM_CALL = 32,
|
|
1342
|
+
/**
|
|
1343
|
+
* @generated from protobuf enum value: L2_STEP = 48;
|
|
1344
|
+
*/
|
|
1345
|
+
L2_STEP = 48,
|
|
1346
|
+
/**
|
|
1347
|
+
* full step-boundary enforcement
|
|
1348
|
+
*
|
|
1349
|
+
* @generated from protobuf enum value: L3_POLICY_HOOK = 64;
|
|
1350
|
+
*/
|
|
1351
|
+
L3_POLICY_HOOK = 64,
|
|
1352
|
+
/**
|
|
1353
|
+
* research-grade; not Phase 1
|
|
1354
|
+
*
|
|
1355
|
+
* @generated from protobuf enum value: L4_RUNTIME_NATIVE = 80;
|
|
1356
|
+
*/
|
|
1357
|
+
L4_RUNTIME_NATIVE = 80
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Trigger point (per Contract §15).
|
|
1361
|
+
*
|
|
1362
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.DecisionRequest.Trigger
|
|
1363
|
+
*/
|
|
1364
|
+
declare enum DecisionRequest_Trigger {
|
|
1365
|
+
/**
|
|
1366
|
+
* @generated from protobuf enum value: TRIGGER_UNSPECIFIED = 0;
|
|
1367
|
+
*/
|
|
1368
|
+
TRIGGER_UNSPECIFIED = 0,
|
|
1369
|
+
/**
|
|
1370
|
+
* @generated from protobuf enum value: RUN_PRE = 1;
|
|
1371
|
+
*/
|
|
1372
|
+
RUN_PRE = 1,
|
|
1373
|
+
/**
|
|
1374
|
+
* @generated from protobuf enum value: AGENT_STEP_PRE = 2;
|
|
1375
|
+
*/
|
|
1376
|
+
AGENT_STEP_PRE = 2,
|
|
1377
|
+
/**
|
|
1378
|
+
* @generated from protobuf enum value: LLM_CALL_PRE = 3;
|
|
1379
|
+
*/
|
|
1380
|
+
LLM_CALL_PRE = 3,
|
|
1381
|
+
/**
|
|
1382
|
+
* @generated from protobuf enum value: TOOL_CALL_PRE = 4;
|
|
1383
|
+
*/
|
|
1384
|
+
TOOL_CALL_PRE = 4
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Final decision (per Contract §11 effect schema).
|
|
1388
|
+
*
|
|
1389
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.DecisionResponse.Decision
|
|
1390
|
+
*/
|
|
1391
|
+
declare enum DecisionResponse_Decision {
|
|
1392
|
+
/**
|
|
1393
|
+
* @generated from protobuf enum value: DECISION_UNSPECIFIED = 0;
|
|
1394
|
+
*/
|
|
1395
|
+
DECISION_UNSPECIFIED = 0,
|
|
1396
|
+
/**
|
|
1397
|
+
* @generated from protobuf enum value: CONTINUE = 1;
|
|
1398
|
+
*/
|
|
1399
|
+
CONTINUE = 1,
|
|
1400
|
+
/**
|
|
1401
|
+
* @generated from protobuf enum value: DEGRADE = 2;
|
|
1402
|
+
*/
|
|
1403
|
+
DEGRADE = 2,
|
|
1404
|
+
/**
|
|
1405
|
+
* @generated from protobuf enum value: SKIP = 3;
|
|
1406
|
+
*/
|
|
1407
|
+
SKIP = 3,
|
|
1408
|
+
/**
|
|
1409
|
+
* @generated from protobuf enum value: STOP = 4;
|
|
1410
|
+
*/
|
|
1411
|
+
STOP = 4,
|
|
1412
|
+
/**
|
|
1413
|
+
* @generated from protobuf enum value: REQUIRE_APPROVAL = 5;
|
|
1414
|
+
*/
|
|
1415
|
+
REQUIRE_APPROVAL = 5,
|
|
1416
|
+
/**
|
|
1417
|
+
* === v1alpha2 additive change ===
|
|
1418
|
+
* Explicit decision when stop is driven by run projection, distinct
|
|
1419
|
+
* from per-call STOP. Effect lattice still maps to STOP for old
|
|
1420
|
+
* consumers (per Contract DSL v1alpha2 §3.4); the new field
|
|
1421
|
+
* `run_code_triggered` carries the RUN_* code explicitly so SIEM /
|
|
1422
|
+
* dashboard filters can distinguish "per-call stop" from
|
|
1423
|
+
* "run-projection stop" without reading `reason_codes`. STOP
|
|
1424
|
+
* semantics are completely identical to v1alpha1 STOP; this enum
|
|
1425
|
+
* value exists for first-class dashboard categorisation.
|
|
1426
|
+
*
|
|
1427
|
+
* Backwards compat (per contract-dsl-spec-v1alpha2.md §6.1 +
|
|
1428
|
+
* §8.1): v1alpha1 sidecar binaries cannot emit this value
|
|
1429
|
+
* (their loader refuses v1alpha2 contract bundles via
|
|
1430
|
+
* capability_required mismatch). Old clients that deserialize an
|
|
1431
|
+
* unknown enum value as DECISION_UNSPECIFIED must fail closed, not
|
|
1432
|
+
* gracefully continue; supported SDKs map STOP_RUN_PROJECTION to
|
|
1433
|
+
* the same terminal exception path as STOP. SLICE_09 lights this
|
|
1434
|
+
* enum up when run_cost_projector is wired.
|
|
1435
|
+
*
|
|
1436
|
+
* @generated from protobuf enum value: STOP_RUN_PROJECTION = 6;
|
|
1437
|
+
*/
|
|
1438
|
+
STOP_RUN_PROJECTION = 6
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.PublishOutcomeRequest.Outcome
|
|
1442
|
+
*/
|
|
1443
|
+
declare enum PublishOutcomeRequest_Outcome {
|
|
1444
|
+
/**
|
|
1445
|
+
* @generated from protobuf enum value: OUTCOME_UNSPECIFIED = 0;
|
|
1446
|
+
*/
|
|
1447
|
+
OUTCOME_UNSPECIFIED = 0,
|
|
1448
|
+
/**
|
|
1449
|
+
* mutation applied to runtime request
|
|
1450
|
+
*
|
|
1451
|
+
* @generated from protobuf enum value: APPLIED = 1;
|
|
1452
|
+
*/
|
|
1453
|
+
APPLIED = 1,
|
|
1454
|
+
/**
|
|
1455
|
+
* continue / skip / stop with no mutation
|
|
1456
|
+
*
|
|
1457
|
+
* @generated from protobuf enum value: APPLIED_NOOP = 2;
|
|
1458
|
+
*/
|
|
1459
|
+
APPLIED_NOOP = 2,
|
|
1460
|
+
/**
|
|
1461
|
+
* adapter could not apply (rolled back)
|
|
1462
|
+
*
|
|
1463
|
+
* @generated from protobuf enum value: APPLY_FAILED = 3;
|
|
1464
|
+
*/
|
|
1465
|
+
APPLY_FAILED = 3,
|
|
1466
|
+
/**
|
|
1467
|
+
* @generated from protobuf enum value: APPROVAL_GRANTED = 4;
|
|
1468
|
+
*/
|
|
1469
|
+
APPROVAL_GRANTED = 4,
|
|
1470
|
+
/**
|
|
1471
|
+
* @generated from protobuf enum value: APPROVAL_DENIED = 5;
|
|
1472
|
+
*/
|
|
1473
|
+
APPROVAL_DENIED = 5,
|
|
1474
|
+
/**
|
|
1475
|
+
* @generated from protobuf enum value: APPROVAL_TIMED_OUT = 6;
|
|
1476
|
+
*/
|
|
1477
|
+
APPROVAL_TIMED_OUT = 6
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.TraceEvent.EventKind
|
|
1481
|
+
*/
|
|
1482
|
+
declare enum TraceEvent_EventKind {
|
|
1483
|
+
/**
|
|
1484
|
+
* @generated from protobuf enum value: EVENT_KIND_UNSPECIFIED = 0;
|
|
1485
|
+
*/
|
|
1486
|
+
EVENT_KIND_UNSPECIFIED = 0,
|
|
1487
|
+
/**
|
|
1488
|
+
* @generated from protobuf enum value: RUN_START = 1;
|
|
1489
|
+
*/
|
|
1490
|
+
RUN_START = 1,
|
|
1491
|
+
/**
|
|
1492
|
+
* @generated from protobuf enum value: RUN_END = 2;
|
|
1493
|
+
*/
|
|
1494
|
+
RUN_END = 2,
|
|
1495
|
+
/**
|
|
1496
|
+
* @generated from protobuf enum value: AGENT_STEP_POST = 3;
|
|
1497
|
+
*/
|
|
1498
|
+
AGENT_STEP_POST = 3,
|
|
1499
|
+
/**
|
|
1500
|
+
* also drives commit lifecycle
|
|
1501
|
+
*
|
|
1502
|
+
* @generated from protobuf enum value: LLM_CALL_POST = 4;
|
|
1503
|
+
*/
|
|
1504
|
+
LLM_CALL_POST = 4,
|
|
1505
|
+
/**
|
|
1506
|
+
* @generated from protobuf enum value: TOOL_CALL_POST = 5;
|
|
1507
|
+
*/
|
|
1508
|
+
TOOL_CALL_POST = 5,
|
|
1509
|
+
/**
|
|
1510
|
+
* @generated from protobuf enum value: SPAN_DELTA = 6;
|
|
1511
|
+
*/
|
|
1512
|
+
SPAN_DELTA = 6,
|
|
1513
|
+
/**
|
|
1514
|
+
* @generated from protobuf enum value: APPROVAL_LIFECYCLE = 7;
|
|
1515
|
+
*/
|
|
1516
|
+
APPROVAL_LIFECYCLE = 7,
|
|
1517
|
+
/**
|
|
1518
|
+
* @generated from protobuf enum value: ROLLBACK = 8;
|
|
1519
|
+
*/
|
|
1520
|
+
ROLLBACK = 8
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Final outcome from the LLM call (success / error / etc.).
|
|
1524
|
+
*
|
|
1525
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.LlmCallPostPayload.Outcome
|
|
1526
|
+
*/
|
|
1527
|
+
declare enum LlmCallPostPayload_Outcome {
|
|
1528
|
+
/**
|
|
1529
|
+
* @generated from protobuf enum value: OUTCOME_UNSPECIFIED = 0;
|
|
1530
|
+
*/
|
|
1531
|
+
OUTCOME_UNSPECIFIED = 0,
|
|
1532
|
+
/**
|
|
1533
|
+
* @generated from protobuf enum value: SUCCESS = 1;
|
|
1534
|
+
*/
|
|
1535
|
+
SUCCESS = 1,
|
|
1536
|
+
/**
|
|
1537
|
+
* @generated from protobuf enum value: PROVIDER_ERROR = 2;
|
|
1538
|
+
*/
|
|
1539
|
+
PROVIDER_ERROR = 2,
|
|
1540
|
+
/**
|
|
1541
|
+
* @generated from protobuf enum value: CLIENT_TIMEOUT = 3;
|
|
1542
|
+
*/
|
|
1543
|
+
CLIENT_TIMEOUT = 3,
|
|
1544
|
+
/**
|
|
1545
|
+
* @generated from protobuf enum value: RUN_ABORTED = 4;
|
|
1546
|
+
*/
|
|
1547
|
+
RUN_ABORTED = 4
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.ApprovalLifecyclePayload.State
|
|
1551
|
+
*/
|
|
1552
|
+
declare enum ApprovalLifecyclePayload_State {
|
|
1553
|
+
/**
|
|
1554
|
+
* @generated from protobuf enum value: STATE_UNSPECIFIED = 0;
|
|
1555
|
+
*/
|
|
1556
|
+
STATE_UNSPECIFIED = 0,
|
|
1557
|
+
/**
|
|
1558
|
+
* @generated from protobuf enum value: REQUESTED = 1;
|
|
1559
|
+
*/
|
|
1560
|
+
REQUESTED = 1,
|
|
1561
|
+
/**
|
|
1562
|
+
* @generated from protobuf enum value: GRANTED = 2;
|
|
1563
|
+
*/
|
|
1564
|
+
GRANTED = 2,
|
|
1565
|
+
/**
|
|
1566
|
+
* @generated from protobuf enum value: DENIED = 3;
|
|
1567
|
+
*/
|
|
1568
|
+
DENIED = 3,
|
|
1569
|
+
/**
|
|
1570
|
+
* @generated from protobuf enum value: EXPIRED = 4;
|
|
1571
|
+
*/
|
|
1572
|
+
EXPIRED = 4
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.TraceEventAck.Status
|
|
1576
|
+
*/
|
|
1577
|
+
declare enum TraceEventAck_Status {
|
|
1578
|
+
/**
|
|
1579
|
+
* @generated from protobuf enum value: STATUS_UNSPECIFIED = 0;
|
|
1580
|
+
*/
|
|
1581
|
+
STATUS_UNSPECIFIED = 0,
|
|
1582
|
+
/**
|
|
1583
|
+
* @generated from protobuf enum value: ACCEPTED = 1;
|
|
1584
|
+
*/
|
|
1585
|
+
ACCEPTED = 1,
|
|
1586
|
+
/**
|
|
1587
|
+
* @generated from protobuf enum value: QUARANTINED = 2;
|
|
1588
|
+
*/
|
|
1589
|
+
QUARANTINED = 2,
|
|
1590
|
+
/**
|
|
1591
|
+
* @generated from protobuf enum value: REJECTED = 3;
|
|
1592
|
+
*/
|
|
1593
|
+
REJECTED = 3
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.DrainSignal.Phase
|
|
1597
|
+
*/
|
|
1598
|
+
declare enum DrainSignal_Phase {
|
|
1599
|
+
/**
|
|
1600
|
+
* @generated from protobuf enum value: PHASE_UNSPECIFIED = 0;
|
|
1601
|
+
*/
|
|
1602
|
+
PHASE_UNSPECIFIED = 0,
|
|
1603
|
+
/**
|
|
1604
|
+
* stop accepting new decisions
|
|
1605
|
+
*
|
|
1606
|
+
* @generated from protobuf enum value: DRAIN_INITIATED = 1;
|
|
1607
|
+
*/
|
|
1608
|
+
DRAIN_INITIATED = 1,
|
|
1609
|
+
/**
|
|
1610
|
+
* @generated from protobuf enum value: DRAIN_TIMEOUT_APPROACHING = 2;
|
|
1611
|
+
*/
|
|
1612
|
+
DRAIN_TIMEOUT_APPROACHING = 2,
|
|
1613
|
+
/**
|
|
1614
|
+
* @generated from protobuf enum value: DRAIN_COMPLETE = 3;
|
|
1615
|
+
*/
|
|
1616
|
+
DRAIN_COMPLETE = 3
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* @generated from protobuf enum spendguard.sidecar_adapter.v1.CommitSessionDeltaRequest.Outcome
|
|
1620
|
+
*/
|
|
1621
|
+
declare enum CommitSessionDeltaRequest_Outcome {
|
|
1622
|
+
/**
|
|
1623
|
+
* @generated from protobuf enum value: OUTCOME_UNSPECIFIED = 0;
|
|
1624
|
+
*/
|
|
1625
|
+
OUTCOME_UNSPECIFIED = 0,
|
|
1626
|
+
/**
|
|
1627
|
+
* @generated from protobuf enum value: SUCCESS = 1;
|
|
1628
|
+
*/
|
|
1629
|
+
SUCCESS = 1,
|
|
1630
|
+
/**
|
|
1631
|
+
* @generated from protobuf enum value: PROVIDER_ERROR = 2;
|
|
1632
|
+
*/
|
|
1633
|
+
PROVIDER_ERROR = 2,
|
|
1634
|
+
/**
|
|
1635
|
+
* @generated from protobuf enum value: CLIENT_TIMEOUT = 3;
|
|
1636
|
+
*/
|
|
1637
|
+
CLIENT_TIMEOUT = 3,
|
|
1638
|
+
/**
|
|
1639
|
+
* @generated from protobuf enum value: RUN_ABORTED = 4;
|
|
1640
|
+
*/
|
|
1641
|
+
RUN_ABORTED = 4
|
|
1642
|
+
}
|
|
1643
|
+
declare class ResumeAfterApprovalRequest$Type extends MessageType<ResumeAfterApprovalRequest> {
|
|
1644
|
+
constructor();
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ResumeAfterApprovalRequest
|
|
1648
|
+
*/
|
|
1649
|
+
interface ResumeAfterApprovalRequest {
|
|
1650
|
+
/**
|
|
1651
|
+
* Original decision that returned REQUIRE_APPROVAL.
|
|
1652
|
+
*
|
|
1653
|
+
* @generated from protobuf field: string tenant_id = 1
|
|
1654
|
+
*/
|
|
1655
|
+
tenantId: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* @generated from protobuf field: string decision_id = 2
|
|
1658
|
+
*/
|
|
1659
|
+
decisionId: string;
|
|
1660
|
+
/**
|
|
1661
|
+
* The approval the adapter is resuming. Must match an existing
|
|
1662
|
+
* approval_requests row scoped to (tenant_id, decision_id).
|
|
1663
|
+
*
|
|
1664
|
+
* @generated from protobuf field: string approval_id = 3
|
|
1665
|
+
*/
|
|
1666
|
+
approvalId: string;
|
|
1667
|
+
/**
|
|
1668
|
+
* Adapter-supplied identity for fencing + idempotency. Same as
|
|
1669
|
+
* DecisionRequest's analogous fields.
|
|
1670
|
+
*
|
|
1671
|
+
* @generated from protobuf field: string workload_instance_id = 4
|
|
1672
|
+
*/
|
|
1673
|
+
workloadInstanceId: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* @generated from protobuf field: string session_id = 5
|
|
1676
|
+
*/
|
|
1677
|
+
sessionId: string;
|
|
1678
|
+
}
|
|
1679
|
+
/**
|
|
1680
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ResumeAfterApprovalRequest
|
|
1681
|
+
*/
|
|
1682
|
+
declare const ResumeAfterApprovalRequest: ResumeAfterApprovalRequest$Type;
|
|
1683
|
+
declare class ResumeAfterApprovalResponse$Type extends MessageType<ResumeAfterApprovalResponse> {
|
|
1684
|
+
constructor();
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ResumeAfterApprovalResponse
|
|
1688
|
+
*/
|
|
1689
|
+
interface ResumeAfterApprovalResponse {
|
|
1690
|
+
/**
|
|
1691
|
+
* @generated from protobuf oneof: outcome
|
|
1692
|
+
*/
|
|
1693
|
+
outcome: {
|
|
1694
|
+
oneofKind: "decision";
|
|
1695
|
+
/**
|
|
1696
|
+
* Approval was `approved`; sidecar re-ran Contract + Reserve and
|
|
1697
|
+
* returns the standard DecisionResponse (Continue + reservation
|
|
1698
|
+
* ids, OR Stop if a fresh Ledger check failed).
|
|
1699
|
+
*
|
|
1700
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.DecisionResponse decision = 1
|
|
1701
|
+
*/
|
|
1702
|
+
decision: DecisionResponse;
|
|
1703
|
+
} | {
|
|
1704
|
+
oneofKind: "denied";
|
|
1705
|
+
/**
|
|
1706
|
+
* Approval was `denied`; the audit deny-decision row has been
|
|
1707
|
+
* emitted; adapter raises a typed deny exception.
|
|
1708
|
+
*
|
|
1709
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.ResumeAfterApprovalDenied denied = 2
|
|
1710
|
+
*/
|
|
1711
|
+
denied: ResumeAfterApprovalDenied;
|
|
1712
|
+
} | {
|
|
1713
|
+
oneofKind: "error";
|
|
1714
|
+
/**
|
|
1715
|
+
* Approval was in a non-terminal state (pending) OR a terminal
|
|
1716
|
+
* non-actionable state (expired / cancelled). Adapter raises a
|
|
1717
|
+
* typed "still waiting" or "unresolvable" exception.
|
|
1718
|
+
*
|
|
1719
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 3
|
|
1720
|
+
*/
|
|
1721
|
+
error: Error;
|
|
1722
|
+
} | {
|
|
1723
|
+
oneofKind: undefined;
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ResumeAfterApprovalResponse
|
|
1728
|
+
*/
|
|
1729
|
+
declare const ResumeAfterApprovalResponse: ResumeAfterApprovalResponse$Type;
|
|
1730
|
+
declare class ResumeAfterApprovalDenied$Type extends MessageType<ResumeAfterApprovalDenied> {
|
|
1731
|
+
constructor();
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ResumeAfterApprovalDenied
|
|
1735
|
+
*/
|
|
1736
|
+
interface ResumeAfterApprovalDenied {
|
|
1737
|
+
/**
|
|
1738
|
+
* The deny audit row's event id (so the adapter can correlate
|
|
1739
|
+
* logs).
|
|
1740
|
+
*
|
|
1741
|
+
* @generated from protobuf field: string audit_decision_event_id = 1
|
|
1742
|
+
*/
|
|
1743
|
+
auditDecisionEventId: string;
|
|
1744
|
+
/**
|
|
1745
|
+
* Free-form reason from approver (resolution_reason).
|
|
1746
|
+
*
|
|
1747
|
+
* @generated from protobuf field: string approver_reason = 2
|
|
1748
|
+
*/
|
|
1749
|
+
approverReason: string;
|
|
1750
|
+
/**
|
|
1751
|
+
* Approver identity (for application-level audit log).
|
|
1752
|
+
*
|
|
1753
|
+
* @generated from protobuf field: string approver_subject = 3
|
|
1754
|
+
*/
|
|
1755
|
+
approverSubject: string;
|
|
1756
|
+
/**
|
|
1757
|
+
* Matched contract rules that drove REQUIRE_APPROVAL in the first
|
|
1758
|
+
* place, so the adapter can render a useful error.
|
|
1759
|
+
*
|
|
1760
|
+
* @generated from protobuf field: repeated string matched_rule_ids = 4
|
|
1761
|
+
*/
|
|
1762
|
+
matchedRuleIds: string[];
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ResumeAfterApprovalDenied
|
|
1766
|
+
*/
|
|
1767
|
+
declare const ResumeAfterApprovalDenied: ResumeAfterApprovalDenied$Type;
|
|
1768
|
+
declare class HandshakeRequest$Type extends MessageType<HandshakeRequest> {
|
|
1769
|
+
constructor();
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.HandshakeRequest
|
|
1773
|
+
*/
|
|
1774
|
+
interface HandshakeRequest {
|
|
1775
|
+
/**
|
|
1776
|
+
* @generated from protobuf field: string sdk_version = 1
|
|
1777
|
+
*/
|
|
1778
|
+
sdkVersion: string;
|
|
1779
|
+
/**
|
|
1780
|
+
* @generated from protobuf field: string runtime_kind = 2
|
|
1781
|
+
*/
|
|
1782
|
+
runtimeKind: string;
|
|
1783
|
+
/**
|
|
1784
|
+
* @generated from protobuf field: string runtime_version = 3
|
|
1785
|
+
*/
|
|
1786
|
+
runtimeVersion: string;
|
|
1787
|
+
/**
|
|
1788
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.HandshakeRequest.CapabilityLevel capability_level = 4
|
|
1789
|
+
*/
|
|
1790
|
+
capabilityLevel: HandshakeRequest_CapabilityLevel;
|
|
1791
|
+
/**
|
|
1792
|
+
* Tenant assertion (sidecar verifies vs SO_PEERCRED + signed manifest).
|
|
1793
|
+
*
|
|
1794
|
+
* @generated from protobuf field: string tenant_id_assertion = 5
|
|
1795
|
+
*/
|
|
1796
|
+
tenantIdAssertion: string;
|
|
1797
|
+
/**
|
|
1798
|
+
* @generated from protobuf field: string workload_instance_id = 6
|
|
1799
|
+
*/
|
|
1800
|
+
workloadInstanceId: string;
|
|
1801
|
+
/**
|
|
1802
|
+
* @generated from protobuf field: uint32 protocol_version = 7
|
|
1803
|
+
*/
|
|
1804
|
+
protocolVersion: number;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.HandshakeRequest
|
|
1808
|
+
*/
|
|
1809
|
+
declare const HandshakeRequest: HandshakeRequest$Type;
|
|
1810
|
+
declare class HandshakeResponse$Type extends MessageType<HandshakeResponse> {
|
|
1811
|
+
constructor();
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.HandshakeResponse
|
|
1815
|
+
*/
|
|
1816
|
+
interface HandshakeResponse {
|
|
1817
|
+
/**
|
|
1818
|
+
* @generated from protobuf field: string sidecar_version = 1
|
|
1819
|
+
*/
|
|
1820
|
+
sidecarVersion: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* @generated from protobuf field: spendguard.common.v1.SchemaBundleRef schema_bundle = 2
|
|
1823
|
+
*/
|
|
1824
|
+
schemaBundle?: SchemaBundleRef;
|
|
1825
|
+
/**
|
|
1826
|
+
* @generated from protobuf field: spendguard.common.v1.ContractBundleRef contract_bundle = 3
|
|
1827
|
+
*/
|
|
1828
|
+
contractBundle?: ContractBundleRef;
|
|
1829
|
+
/**
|
|
1830
|
+
* Capability required by loaded contract (per Sidecar §3.3).
|
|
1831
|
+
* If higher than adapter's capability_level → adapter MUST refuse to load.
|
|
1832
|
+
*
|
|
1833
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.HandshakeRequest.CapabilityLevel capability_required = 4
|
|
1834
|
+
*/
|
|
1835
|
+
capabilityRequired: HandshakeRequest_CapabilityLevel;
|
|
1836
|
+
/**
|
|
1837
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.HandshakeResponse.KeyEpochs active_key_epochs = 5
|
|
1838
|
+
*/
|
|
1839
|
+
activeKeyEpochs?: HandshakeResponse_KeyEpochs;
|
|
1840
|
+
/**
|
|
1841
|
+
* @generated from protobuf field: uint32 protocol_version = 6
|
|
1842
|
+
*/
|
|
1843
|
+
protocolVersion: number;
|
|
1844
|
+
/**
|
|
1845
|
+
* Negotiated session identifiers; adapter must include in subsequent RPCs.
|
|
1846
|
+
*
|
|
1847
|
+
* @generated from protobuf field: string session_id = 7
|
|
1848
|
+
*/
|
|
1849
|
+
sessionId: string;
|
|
1850
|
+
/**
|
|
1851
|
+
* === Sidecar announcement signature (per Sidecar §5 + Stage 2 §12.1) ===
|
|
1852
|
+
*
|
|
1853
|
+
* Sidecar signs the canonical encoding of all fields above (sidecar_version,
|
|
1854
|
+
* schema_bundle, contract_bundle, capability_required, active_key_epochs,
|
|
1855
|
+
* protocol_version, session_id) using the platform-issued sidecar workload
|
|
1856
|
+
* key. Adapter verifies against the Helm-pinned root CA bundle chain.
|
|
1857
|
+
* Required for Phase 1; without this the adapter cannot trust handshake
|
|
1858
|
+
* claims about bundle/capability state.
|
|
1859
|
+
*
|
|
1860
|
+
* @generated from protobuf field: string signing_key_id = 8
|
|
1861
|
+
*/
|
|
1862
|
+
signingKeyId: string;
|
|
1863
|
+
/**
|
|
1864
|
+
* @generated from protobuf field: bytes announcement_signature = 9
|
|
1865
|
+
*/
|
|
1866
|
+
announcementSignature: Uint8Array;
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.HandshakeResponse
|
|
1870
|
+
*/
|
|
1871
|
+
declare const HandshakeResponse: HandshakeResponse$Type;
|
|
1872
|
+
declare class HandshakeResponse_KeyEpochs$Type extends MessageType<HandshakeResponse_KeyEpochs> {
|
|
1873
|
+
constructor();
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* Active key epochs (per Sidecar §5 v1.1 patch + Trace §6 dual_read).
|
|
1877
|
+
*
|
|
1878
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.HandshakeResponse.KeyEpochs
|
|
1879
|
+
*/
|
|
1880
|
+
interface HandshakeResponse_KeyEpochs {
|
|
1881
|
+
/**
|
|
1882
|
+
* @generated from protobuf field: repeated string producer_signing_key_epochs = 1
|
|
1883
|
+
*/
|
|
1884
|
+
producerSigningKeyEpochs: string[];
|
|
1885
|
+
/**
|
|
1886
|
+
* @generated from protobuf field: repeated string hmac_tenant_salt_epochs = 2
|
|
1887
|
+
*/
|
|
1888
|
+
hmacTenantSaltEpochs: string[];
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.HandshakeResponse.KeyEpochs
|
|
1892
|
+
*/
|
|
1893
|
+
declare const HandshakeResponse_KeyEpochs: HandshakeResponse_KeyEpochs$Type;
|
|
1894
|
+
declare class ClaimEstimate$Type extends MessageType<ClaimEstimate> {
|
|
1895
|
+
constructor();
|
|
1896
|
+
}
|
|
1897
|
+
/**
|
|
1898
|
+
* ============================================================================
|
|
1899
|
+
* ClaimEstimate — egress_proxy / SDK supplied prediction metadata (SLICE_10).
|
|
1900
|
+
* ============================================================================
|
|
1901
|
+
*
|
|
1902
|
+
* All 17 prediction columns the audit chain expects per
|
|
1903
|
+
* `audit-chain-prediction-extension-v1alpha1.md` §2.1+§2.2.
|
|
1904
|
+
*
|
|
1905
|
+
* Field-tag layout:
|
|
1906
|
+
* 1..15 — hot-path fields (single-byte varint).
|
|
1907
|
+
* 16.. — additive / cold metadata.
|
|
1908
|
+
*
|
|
1909
|
+
* Sentinel semantics mirror the CloudEvent extension attributes
|
|
1910
|
+
* (`spendguard/common/v1/common.proto` tags 300-317):
|
|
1911
|
+
* * predicted_b_tokens = 0 → Strategy B null (cache miss → L1 cold-start
|
|
1912
|
+
* fall back to A as reservation)
|
|
1913
|
+
* * predicted_c_tokens = 0 → Strategy C null (no plugin OR plugin
|
|
1914
|
+
* returned no signal)
|
|
1915
|
+
* * prediction_confidence = 0.0 → Strategy A row (NULL on SQL side)
|
|
1916
|
+
* * cold_start_layer_used = "" → warm path (no cold-start fallback)
|
|
1917
|
+
* * tokenizer_version_id = "" → Tier 3 fallback (heuristic, no
|
|
1918
|
+
* versioned encoder)
|
|
1919
|
+
* * run_predicted_remaining_steps = -1 → projector unreachable
|
|
1920
|
+
* * run_steps_completed_so_far = 0 → run is at first call (cold cache)
|
|
1921
|
+
* * run_code_triggered = "" → no RUN_* code emitted
|
|
1922
|
+
*
|
|
1923
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ClaimEstimate
|
|
1924
|
+
*/
|
|
1925
|
+
interface ClaimEstimate {
|
|
1926
|
+
/**
|
|
1927
|
+
* ── Tokenizer ───────────────────────────────────────────────────────────
|
|
1928
|
+
* Tier 2 = local exact BPE; Tier 3 = chars/4 heuristic fallback.
|
|
1929
|
+
*
|
|
1930
|
+
* @generated from protobuf field: string tokenizer_tier = 1
|
|
1931
|
+
*/
|
|
1932
|
+
tokenizerTier: string;
|
|
1933
|
+
/**
|
|
1934
|
+
* @generated from protobuf field: string tokenizer_version_id = 2
|
|
1935
|
+
*/
|
|
1936
|
+
tokenizerVersionId: string;
|
|
1937
|
+
/**
|
|
1938
|
+
* @generated from protobuf field: int64 input_tokens = 3
|
|
1939
|
+
*/
|
|
1940
|
+
inputTokens: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* ── Output predictor — Strategy A/B/C ──────────────────────────────────
|
|
1943
|
+
*
|
|
1944
|
+
* @generated from protobuf field: int64 predicted_a_tokens = 4
|
|
1945
|
+
*/
|
|
1946
|
+
predictedATokens: string;
|
|
1947
|
+
/**
|
|
1948
|
+
* @generated from protobuf field: int64 predicted_b_tokens = 5
|
|
1949
|
+
*/
|
|
1950
|
+
predictedBTokens: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* @generated from protobuf field: int64 predicted_c_tokens = 6
|
|
1953
|
+
*/
|
|
1954
|
+
predictedCTokens: string;
|
|
1955
|
+
/**
|
|
1956
|
+
* @generated from protobuf field: string reserved_strategy = 7
|
|
1957
|
+
*/
|
|
1958
|
+
reservedStrategy: string;
|
|
1959
|
+
/**
|
|
1960
|
+
* @generated from protobuf field: string prediction_strategy_used = 8
|
|
1961
|
+
*/
|
|
1962
|
+
predictionStrategyUsed: string;
|
|
1963
|
+
/**
|
|
1964
|
+
* @generated from protobuf field: string prediction_policy_used = 9
|
|
1965
|
+
*/
|
|
1966
|
+
predictionPolicyUsed: string;
|
|
1967
|
+
/**
|
|
1968
|
+
* @generated from protobuf field: float prediction_confidence = 10
|
|
1969
|
+
*/
|
|
1970
|
+
predictionConfidence: number;
|
|
1971
|
+
/**
|
|
1972
|
+
* @generated from protobuf field: int64 prediction_sample_size = 11
|
|
1973
|
+
*/
|
|
1974
|
+
predictionSampleSize: string;
|
|
1975
|
+
/**
|
|
1976
|
+
* @generated from protobuf field: string cold_start_layer_used = 12
|
|
1977
|
+
*/
|
|
1978
|
+
coldStartLayerUsed: string;
|
|
1979
|
+
/**
|
|
1980
|
+
* ── Classifier + prompt-class fingerprint ──────────────────────────────
|
|
1981
|
+
* Spec §8.2: fingerprint capture both predictor's view + caller's view.
|
|
1982
|
+
*
|
|
1983
|
+
* @generated from protobuf field: string classifier_version = 13
|
|
1984
|
+
*/
|
|
1985
|
+
classifierVersion: string;
|
|
1986
|
+
/**
|
|
1987
|
+
* @generated from protobuf field: string fingerprint_version = 14
|
|
1988
|
+
*/
|
|
1989
|
+
fingerprintVersion: string;
|
|
1990
|
+
/**
|
|
1991
|
+
* @generated from protobuf field: string prompt_class_fingerprint = 15
|
|
1992
|
+
*/
|
|
1993
|
+
promptClassFingerprint: string;
|
|
1994
|
+
/**
|
|
1995
|
+
* ── Run-cost projector — 3 run-level audit cols ───────────────────────
|
|
1996
|
+
*
|
|
1997
|
+
* @generated from protobuf field: int64 run_projection_at_decision_atomic = 16
|
|
1998
|
+
*/
|
|
1999
|
+
runProjectionAtDecisionAtomic: string;
|
|
2000
|
+
/**
|
|
2001
|
+
* @generated from protobuf field: int32 run_predicted_remaining_steps = 17
|
|
2002
|
+
*/
|
|
2003
|
+
runPredictedRemainingSteps: number;
|
|
2004
|
+
/**
|
|
2005
|
+
* @generated from protobuf field: int64 run_steps_completed_so_far = 18
|
|
2006
|
+
*/
|
|
2007
|
+
runStepsCompletedSoFar: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* @generated from protobuf field: string run_code_triggered = 19
|
|
2010
|
+
*/
|
|
2011
|
+
runCodeTriggered: string;
|
|
2012
|
+
/**
|
|
2013
|
+
* Aggregator mirror fields (canonical_events 0018). These are not
|
|
2014
|
+
* common.v1 CloudEvent tag-300 fields, so sidecar copies them into
|
|
2015
|
+
* the signed CloudEvent data JSON for canonical_ingest to mirror.
|
|
2016
|
+
*
|
|
2017
|
+
* @generated from protobuf field: string model = 20
|
|
2018
|
+
*/
|
|
2019
|
+
model: string;
|
|
2020
|
+
/**
|
|
2021
|
+
* @generated from protobuf field: string prompt_class = 21
|
|
2022
|
+
*/
|
|
2023
|
+
promptClass: string;
|
|
2024
|
+
}
|
|
2025
|
+
/**
|
|
2026
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ClaimEstimate
|
|
2027
|
+
*/
|
|
2028
|
+
declare const ClaimEstimate: ClaimEstimate$Type;
|
|
2029
|
+
declare class DecisionRequest$Type extends MessageType<DecisionRequest> {
|
|
2030
|
+
constructor();
|
|
2031
|
+
}
|
|
2032
|
+
/**
|
|
2033
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.DecisionRequest
|
|
2034
|
+
*/
|
|
2035
|
+
interface DecisionRequest {
|
|
2036
|
+
/**
|
|
2037
|
+
* @generated from protobuf field: string session_id = 1
|
|
2038
|
+
*/
|
|
2039
|
+
sessionId: string;
|
|
2040
|
+
/**
|
|
2041
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.DecisionRequest.Trigger trigger = 2
|
|
2042
|
+
*/
|
|
2043
|
+
trigger: DecisionRequest_Trigger;
|
|
2044
|
+
/**
|
|
2045
|
+
* W3C trace context + spendguard IDs (per Trace §3).
|
|
2046
|
+
*
|
|
2047
|
+
* @generated from protobuf field: spendguard.common.v1.TraceContext trace = 3
|
|
2048
|
+
*/
|
|
2049
|
+
trace?: TraceContext;
|
|
2050
|
+
/**
|
|
2051
|
+
* @generated from protobuf field: spendguard.common.v1.SpendGuardIds ids = 4
|
|
2052
|
+
*/
|
|
2053
|
+
ids?: SpendGuardIds;
|
|
2054
|
+
/**
|
|
2055
|
+
* Route classification (per Contract §scope).
|
|
2056
|
+
*
|
|
2057
|
+
* @generated from protobuf field: string route = 5
|
|
2058
|
+
*/
|
|
2059
|
+
route: string;
|
|
2060
|
+
/**
|
|
2061
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.DecisionRequest.Inputs inputs = 6
|
|
2062
|
+
*/
|
|
2063
|
+
inputs?: DecisionRequest_Inputs;
|
|
2064
|
+
/**
|
|
2065
|
+
* Sub-agent context (per Contract §8) — filled if child agent.
|
|
2066
|
+
*
|
|
2067
|
+
* @generated from protobuf field: string parent_run_id = 7
|
|
2068
|
+
*/
|
|
2069
|
+
parentRunId: string;
|
|
2070
|
+
/**
|
|
2071
|
+
* @generated from protobuf field: string budget_grant_jti = 8
|
|
2072
|
+
*/
|
|
2073
|
+
budgetGrantJti: string;
|
|
2074
|
+
/**
|
|
2075
|
+
* Idempotency at the trigger level; sidecar may return same decision twice.
|
|
2076
|
+
*
|
|
2077
|
+
* @generated from protobuf field: spendguard.common.v1.Idempotency idempotency = 9
|
|
2078
|
+
*/
|
|
2079
|
+
idempotency?: Idempotency;
|
|
2080
|
+
/**
|
|
2081
|
+
* === SLICE_09 additive: Signal 3 pass-through ===
|
|
2082
|
+
*
|
|
2083
|
+
* SDK with_run_plan decorator (SLICE_12) writes this into the
|
|
2084
|
+
* request_decision metadata; sidecar passes through to
|
|
2085
|
+
* run_cost_projector.Project per run-cost-projector-spec-v1alpha1.md §5.
|
|
2086
|
+
*
|
|
2087
|
+
* Wire-compat per proto3 additive evolution: v1alpha1 clients send 0
|
|
2088
|
+
* (proto3 default), which the projector treats as "Signal 3 inactive"
|
|
2089
|
+
* per spec §5.2. v1alpha2 clients with the SDK decorator send a
|
|
2090
|
+
* positive integer naming the total planned LLM + tool steps.
|
|
2091
|
+
*
|
|
2092
|
+
* Tag 17 chosen as the next stable tag after the v1alpha2 run_code_
|
|
2093
|
+
* triggered field (tag 16 on DecisionResponse). DecisionRequest tags
|
|
2094
|
+
* 10-15 are reserved for future hot-path fields per
|
|
2095
|
+
* common.proto §field-number convention.
|
|
2096
|
+
*
|
|
2097
|
+
* SLICE_02 stubbed RUN_* code pass-through but did NOT add this field
|
|
2098
|
+
* (no projector to consume it); SLICE_09 lands the field + activates
|
|
2099
|
+
* the projector wire. Field cap 10000 enforced server-side at
|
|
2100
|
+
* run_cost_projector validation (services/run_cost_projector/src/
|
|
2101
|
+
* server.rs MAX_PLANNED_STEPS).
|
|
2102
|
+
*
|
|
2103
|
+
* @generated from protobuf field: int32 planned_steps_hint = 17
|
|
2104
|
+
*/
|
|
2105
|
+
plannedStepsHint: number;
|
|
2106
|
+
/**
|
|
2107
|
+
* === D13 COV_61 additive: subscription meter reservation source ===
|
|
2108
|
+
*
|
|
2109
|
+
* When the egress_proxy / SDK classifier routes a request through the
|
|
2110
|
+
* subscription-meter path (Claude Code Pro / Codex on ChatGPT Plus),
|
|
2111
|
+
* it flags this field so the sidecar skips ledger_entries +
|
|
2112
|
+
* reservations writes and only writes the audit_outbox row tagged
|
|
2113
|
+
* `reservation_source = subscription_meter`.
|
|
2114
|
+
*
|
|
2115
|
+
* Wire-compat: proto3 default 0 = RESERVATION_SOURCE_UNSPECIFIED is
|
|
2116
|
+
* treated as BYOK by the sidecar (legacy behaviour).
|
|
2117
|
+
*
|
|
2118
|
+
* Tag 18: next stable tag after planned_steps_hint (17).
|
|
2119
|
+
*
|
|
2120
|
+
* @generated from protobuf field: spendguard.common.v1.ReservationSource reservation_source = 18
|
|
2121
|
+
*/
|
|
2122
|
+
reservationSource: ReservationSource;
|
|
2123
|
+
/**
|
|
2124
|
+
* === D13 COV_62 additive: meter-only estimate request ===
|
|
2125
|
+
*
|
|
2126
|
+
* When true, the sidecar runs in meter-only mode: it computes the
|
|
2127
|
+
* meter snapshot (via subscription_meter::meter_only_estimate) and
|
|
2128
|
+
* returns it in DecisionResponse.subscription_meter, but NEVER calls
|
|
2129
|
+
* the ledger. Only meaningful when reservation_source ==
|
|
2130
|
+
* RESERVATION_SOURCE_SUBSCRIPTION_METER.
|
|
2131
|
+
*
|
|
2132
|
+
* @generated from protobuf field: bool meter_only_estimate = 19
|
|
2133
|
+
*/
|
|
2134
|
+
meterOnlyEstimate: boolean;
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.DecisionRequest
|
|
2138
|
+
*/
|
|
2139
|
+
declare const DecisionRequest: DecisionRequest$Type;
|
|
2140
|
+
declare class DecisionRequest_Inputs$Type extends MessageType<DecisionRequest_Inputs> {
|
|
2141
|
+
constructor();
|
|
2142
|
+
}
|
|
2143
|
+
/**
|
|
2144
|
+
* Inputs schema (per Contract §12; pre-normalized to canonical units).
|
|
2145
|
+
* Hot-path: NO Platform Pricing DB query here (Stage 2 §9.4).
|
|
2146
|
+
*
|
|
2147
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.DecisionRequest.Inputs
|
|
2148
|
+
*/
|
|
2149
|
+
interface DecisionRequest_Inputs {
|
|
2150
|
+
/**
|
|
2151
|
+
* Estimated cost projection for this decision boundary.
|
|
2152
|
+
* Sidecar normalized via cached pricing schema (in-process, < 1ms).
|
|
2153
|
+
*
|
|
2154
|
+
* @generated from protobuf field: repeated spendguard.common.v1.BudgetClaim projected_claims = 1
|
|
2155
|
+
*/
|
|
2156
|
+
projectedClaims: BudgetClaim[];
|
|
2157
|
+
/**
|
|
2158
|
+
* Risk band hints (per Contract §14): p50 / p90 / p95 / p99.
|
|
2159
|
+
*
|
|
2160
|
+
* @generated from protobuf field: string projected_p50_atomic = 2
|
|
2161
|
+
*/
|
|
2162
|
+
projectedP50Atomic: string;
|
|
2163
|
+
/**
|
|
2164
|
+
* @generated from protobuf field: string projected_p90_atomic = 3
|
|
2165
|
+
*/
|
|
2166
|
+
projectedP90Atomic: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* @generated from protobuf field: string projected_p95_atomic = 4
|
|
2169
|
+
*/
|
|
2170
|
+
projectedP95Atomic: string;
|
|
2171
|
+
/**
|
|
2172
|
+
* @generated from protobuf field: string projected_p99_atomic = 5
|
|
2173
|
+
*/
|
|
2174
|
+
projectedP99Atomic: string;
|
|
2175
|
+
/**
|
|
2176
|
+
* @generated from protobuf field: spendguard.common.v1.UnitRef projected_unit = 6
|
|
2177
|
+
*/
|
|
2178
|
+
projectedUnit?: UnitRef;
|
|
2179
|
+
/**
|
|
2180
|
+
* Free-form runtime metadata (kept opaque server-side).
|
|
2181
|
+
*
|
|
2182
|
+
* @generated from protobuf field: google.protobuf.Struct runtime_metadata = 7
|
|
2183
|
+
*/
|
|
2184
|
+
runtimeMetadata?: Struct;
|
|
2185
|
+
/**
|
|
2186
|
+
* === SLICE_10 additive: ClaimEstimate enrichment ===
|
|
2187
|
+
*
|
|
2188
|
+
* egress_proxy (after SLICE_10) calls tokenizer library + output_predictor
|
|
2189
|
+
* + run_cost_projector BEFORE constructing this DecisionRequest, and
|
|
2190
|
+
* attaches the full prediction metadata here. The sidecar reads these
|
|
2191
|
+
* values into the audit_decision CloudEvent (common.v1 tags 300-313)
|
|
2192
|
+
* so the audit chain carries the entire prediction story end-to-end.
|
|
2193
|
+
*
|
|
2194
|
+
* Wire-compat per proto3 additive evolution:
|
|
2195
|
+
* * SLICE_09 and earlier producers (SDK wrapper, legacy egress_proxy)
|
|
2196
|
+
* omit this field; sidecar treats it as "estimate not supplied" and
|
|
2197
|
+
* leaves the prediction CloudEvent tags at proto3 defaults (existing
|
|
2198
|
+
* behaviour — Strategy A imputed locally if needed in legacy path,
|
|
2199
|
+
* audit row prediction fields = NULL).
|
|
2200
|
+
* * SLICE_10 egress_proxy / SLICE_12 SDK populate this field; sidecar
|
|
2201
|
+
* reads the values verbatim into the CloudEvent.
|
|
2202
|
+
*
|
|
2203
|
+
* Tag 8 (next free in Inputs); additive.
|
|
2204
|
+
*
|
|
2205
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.ClaimEstimate claim_estimate = 8
|
|
2206
|
+
*/
|
|
2207
|
+
claimEstimate?: ClaimEstimate;
|
|
2208
|
+
}
|
|
2209
|
+
/**
|
|
2210
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.DecisionRequest.Inputs
|
|
2211
|
+
*/
|
|
2212
|
+
declare const DecisionRequest_Inputs: DecisionRequest_Inputs$Type;
|
|
2213
|
+
declare class DecisionResponse$Type extends MessageType<DecisionResponse> {
|
|
2214
|
+
constructor();
|
|
2215
|
+
}
|
|
2216
|
+
/**
|
|
2217
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.DecisionResponse
|
|
2218
|
+
*/
|
|
2219
|
+
interface DecisionResponse {
|
|
2220
|
+
/**
|
|
2221
|
+
* @generated from protobuf field: string decision_id = 1
|
|
2222
|
+
*/
|
|
2223
|
+
decisionId: string;
|
|
2224
|
+
/**
|
|
2225
|
+
* @generated from protobuf field: string audit_decision_event_id = 2
|
|
2226
|
+
*/
|
|
2227
|
+
auditDecisionEventId: string;
|
|
2228
|
+
/**
|
|
2229
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.DecisionResponse.Decision decision = 3
|
|
2230
|
+
*/
|
|
2231
|
+
decision: DecisionResponse_Decision;
|
|
2232
|
+
/**
|
|
2233
|
+
* @generated from protobuf field: repeated string reason_codes = 4
|
|
2234
|
+
*/
|
|
2235
|
+
reasonCodes: string[];
|
|
2236
|
+
/**
|
|
2237
|
+
* @generated from protobuf field: repeated string matched_rule_ids = 5
|
|
2238
|
+
*/
|
|
2239
|
+
matchedRuleIds: string[];
|
|
2240
|
+
/**
|
|
2241
|
+
* Mutation patch (per Contract §11; RFC 6902 restricted).
|
|
2242
|
+
* Only present if decision == DEGRADE.
|
|
2243
|
+
*
|
|
2244
|
+
* @generated from protobuf field: string mutation_patch_json = 6
|
|
2245
|
+
*/
|
|
2246
|
+
mutationPatchJson: string;
|
|
2247
|
+
/**
|
|
2248
|
+
* Idempotency key for adapter.apply_mutation (per Stage 2 §4.6).
|
|
2249
|
+
* Same effect_hash → same mutation; replay safe.
|
|
2250
|
+
*
|
|
2251
|
+
* @generated from protobuf field: bytes effect_hash = 7
|
|
2252
|
+
*/
|
|
2253
|
+
effectHash: Uint8Array;
|
|
2254
|
+
/**
|
|
2255
|
+
* Reservation context — effect already reserved + audit committed.
|
|
2256
|
+
*
|
|
2257
|
+
* @generated from protobuf field: string ledger_transaction_id = 8
|
|
2258
|
+
*/
|
|
2259
|
+
ledgerTransactionId: string;
|
|
2260
|
+
/**
|
|
2261
|
+
* @generated from protobuf field: repeated string reservation_ids = 9
|
|
2262
|
+
*/
|
|
2263
|
+
reservationIds: string[];
|
|
2264
|
+
/**
|
|
2265
|
+
* @generated from protobuf field: google.protobuf.Timestamp ttl_expires_at = 10
|
|
2266
|
+
*/
|
|
2267
|
+
ttlExpiresAt?: Timestamp;
|
|
2268
|
+
/**
|
|
2269
|
+
* For REQUIRE_APPROVAL: approval_request_id + ttl + approver scope.
|
|
2270
|
+
*
|
|
2271
|
+
* @generated from protobuf field: string approval_request_id = 11
|
|
2272
|
+
*/
|
|
2273
|
+
approvalRequestId: string;
|
|
2274
|
+
/**
|
|
2275
|
+
* @generated from protobuf field: google.protobuf.Timestamp approval_ttl = 12
|
|
2276
|
+
*/
|
|
2277
|
+
approvalTtl?: Timestamp;
|
|
2278
|
+
/**
|
|
2279
|
+
* @generated from protobuf field: string approver_role = 13
|
|
2280
|
+
*/
|
|
2281
|
+
approverRole: string;
|
|
2282
|
+
/**
|
|
2283
|
+
* For STOP: terminal (per Contract §11).
|
|
2284
|
+
*
|
|
2285
|
+
* @generated from protobuf field: bool terminal = 14
|
|
2286
|
+
*/
|
|
2287
|
+
terminal: boolean;
|
|
2288
|
+
/**
|
|
2289
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 15
|
|
2290
|
+
*/
|
|
2291
|
+
error?: Error;
|
|
2292
|
+
/**
|
|
2293
|
+
* === v1alpha2 additive change ===
|
|
2294
|
+
* Which RUN_* decision code triggered this decision, if any. One of:
|
|
2295
|
+
* - "" (per-call decision; no RUN_* match)
|
|
2296
|
+
* - "RUN_BUDGET_PROJECTION_EXCEEDED" (per contract-dsl-v1alpha2 §3.1)
|
|
2297
|
+
* - "RUN_DRIFT_DETECTED" (per contract-dsl-v1alpha2 §3.2)
|
|
2298
|
+
* - "RUN_STEPS_EXCEEDED" (per contract-dsl-v1alpha2 §3.3)
|
|
2299
|
+
*
|
|
2300
|
+
* Tag 16 chosen as next available; v1alpha1 reserved tags 1-15 for
|
|
2301
|
+
* hot-path fields (per common.proto §field-number convention).
|
|
2302
|
+
* Wire-compat with v1alpha1 clients: proto3 default = "" (field
|
|
2303
|
+
* absent), so old clients silently ignore.
|
|
2304
|
+
*
|
|
2305
|
+
* SLICE_02 (this slice) wires the field through DecisionResponse but
|
|
2306
|
+
* the value is only populated by SLICE_09's run_cost_projector
|
|
2307
|
+
* integration. SLICE_02-time decoders should treat empty-string as
|
|
2308
|
+
* "no RUN_* triggered" and not as an error.
|
|
2309
|
+
*
|
|
2310
|
+
* @generated from protobuf field: string run_code_triggered = 16
|
|
2311
|
+
*/
|
|
2312
|
+
runCodeTriggered: string;
|
|
2313
|
+
/**
|
|
2314
|
+
* === D13 COV_61 additive: subscription meter snapshot ===
|
|
2315
|
+
*
|
|
2316
|
+
* Populated only when the request's reservation_source == SUBSCRIPTION_METER.
|
|
2317
|
+
* Carries the current period counters and the cap evaluation outcome
|
|
2318
|
+
* so the adapter can short-circuit on hard-cap blocks (synthetic 429)
|
|
2319
|
+
* without re-querying the sidecar.
|
|
2320
|
+
*
|
|
2321
|
+
* Wire-compat: proto3 default absent message; legacy decoders ignore.
|
|
2322
|
+
* Tag 17: next stable after run_code_triggered (16).
|
|
2323
|
+
*
|
|
2324
|
+
* @generated from protobuf field: spendguard.common.v1.SubscriptionMeter subscription_meter = 17
|
|
2325
|
+
*/
|
|
2326
|
+
subscriptionMeter?: SubscriptionMeter;
|
|
2327
|
+
}
|
|
2328
|
+
/**
|
|
2329
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.DecisionResponse
|
|
2330
|
+
*/
|
|
2331
|
+
declare const DecisionResponse: DecisionResponse$Type;
|
|
2332
|
+
declare class PublishOutcomeRequest$Type extends MessageType<PublishOutcomeRequest> {
|
|
2333
|
+
constructor();
|
|
2334
|
+
}
|
|
2335
|
+
/**
|
|
2336
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.PublishOutcomeRequest
|
|
2337
|
+
*/
|
|
2338
|
+
interface PublishOutcomeRequest {
|
|
2339
|
+
/**
|
|
2340
|
+
* @generated from protobuf field: string session_id = 1
|
|
2341
|
+
*/
|
|
2342
|
+
sessionId: string;
|
|
2343
|
+
/**
|
|
2344
|
+
* @generated from protobuf field: string decision_id = 2
|
|
2345
|
+
*/
|
|
2346
|
+
decisionId: string;
|
|
2347
|
+
/**
|
|
2348
|
+
* @generated from protobuf field: bytes effect_hash = 3
|
|
2349
|
+
*/
|
|
2350
|
+
effectHash: Uint8Array;
|
|
2351
|
+
/**
|
|
2352
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.PublishOutcomeRequest.Outcome outcome = 4
|
|
2353
|
+
*/
|
|
2354
|
+
outcome: PublishOutcomeRequest_Outcome;
|
|
2355
|
+
/**
|
|
2356
|
+
* @generated from protobuf field: string adapter_error = 5
|
|
2357
|
+
*/
|
|
2358
|
+
adapterError: string;
|
|
2359
|
+
}
|
|
2360
|
+
/**
|
|
2361
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.PublishOutcomeRequest
|
|
2362
|
+
*/
|
|
2363
|
+
declare const PublishOutcomeRequest: PublishOutcomeRequest$Type;
|
|
2364
|
+
declare class PublishOutcomeResponse$Type extends MessageType<PublishOutcomeResponse> {
|
|
2365
|
+
constructor();
|
|
2366
|
+
}
|
|
2367
|
+
/**
|
|
2368
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.PublishOutcomeResponse
|
|
2369
|
+
*/
|
|
2370
|
+
interface PublishOutcomeResponse {
|
|
2371
|
+
/**
|
|
2372
|
+
* Audit outcome event id (CloudEvent recorded in audit_outbox).
|
|
2373
|
+
*
|
|
2374
|
+
* @generated from protobuf field: string audit_outcome_event_id = 1
|
|
2375
|
+
*/
|
|
2376
|
+
auditOutcomeEventId: string;
|
|
2377
|
+
/**
|
|
2378
|
+
* @generated from protobuf field: google.protobuf.Timestamp recorded_at = 2
|
|
2379
|
+
*/
|
|
2380
|
+
recordedAt?: Timestamp;
|
|
2381
|
+
/**
|
|
2382
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 3
|
|
2383
|
+
*/
|
|
2384
|
+
error?: Error;
|
|
2385
|
+
}
|
|
2386
|
+
/**
|
|
2387
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.PublishOutcomeResponse
|
|
2388
|
+
*/
|
|
2389
|
+
declare const PublishOutcomeResponse: PublishOutcomeResponse$Type;
|
|
2390
|
+
declare class TraceEvent$Type extends MessageType<TraceEvent> {
|
|
2391
|
+
constructor();
|
|
2392
|
+
}
|
|
2393
|
+
/**
|
|
2394
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.TraceEvent
|
|
2395
|
+
*/
|
|
2396
|
+
interface TraceEvent {
|
|
2397
|
+
/**
|
|
2398
|
+
* @generated from protobuf field: string session_id = 1
|
|
2399
|
+
*/
|
|
2400
|
+
sessionId: string;
|
|
2401
|
+
/**
|
|
2402
|
+
* @generated from protobuf field: spendguard.common.v1.TraceContext trace = 2
|
|
2403
|
+
*/
|
|
2404
|
+
trace?: TraceContext;
|
|
2405
|
+
/**
|
|
2406
|
+
* @generated from protobuf field: spendguard.common.v1.SpendGuardIds ids = 3
|
|
2407
|
+
*/
|
|
2408
|
+
ids?: SpendGuardIds;
|
|
2409
|
+
/**
|
|
2410
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.TraceEvent.EventKind kind = 4
|
|
2411
|
+
*/
|
|
2412
|
+
kind: TraceEvent_EventKind;
|
|
2413
|
+
/**
|
|
2414
|
+
* @generated from protobuf field: google.protobuf.Timestamp event_time = 5
|
|
2415
|
+
*/
|
|
2416
|
+
eventTime?: Timestamp;
|
|
2417
|
+
/**
|
|
2418
|
+
* Event-kind-specific payload; oneof guarantees typed schema rather than
|
|
2419
|
+
* free-form Struct (Codex review patch — typed LlmCallPost was missing).
|
|
2420
|
+
*
|
|
2421
|
+
* @generated from protobuf oneof: payload
|
|
2422
|
+
*/
|
|
2423
|
+
payload: {
|
|
2424
|
+
oneofKind: "generic";
|
|
2425
|
+
/**
|
|
2426
|
+
* @generated from protobuf field: google.protobuf.Struct generic = 6
|
|
2427
|
+
*/
|
|
2428
|
+
generic: Struct;
|
|
2429
|
+
} | {
|
|
2430
|
+
oneofKind: "llmCallPost";
|
|
2431
|
+
/**
|
|
2432
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.LlmCallPostPayload llm_call_post = 8
|
|
2433
|
+
*/
|
|
2434
|
+
llmCallPost: LlmCallPostPayload;
|
|
2435
|
+
} | {
|
|
2436
|
+
oneofKind: "approval";
|
|
2437
|
+
/**
|
|
2438
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.ApprovalLifecyclePayload approval = 9
|
|
2439
|
+
*/
|
|
2440
|
+
approval: ApprovalLifecyclePayload;
|
|
2441
|
+
} | {
|
|
2442
|
+
oneofKind: "rollback";
|
|
2443
|
+
/**
|
|
2444
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.RollbackPayload rollback = 10
|
|
2445
|
+
*/
|
|
2446
|
+
rollback: RollbackPayload;
|
|
2447
|
+
} | {
|
|
2448
|
+
oneofKind: undefined;
|
|
2449
|
+
};
|
|
2450
|
+
/**
|
|
2451
|
+
* Provider response metadata blob — kept for raw provider-specific headers
|
|
2452
|
+
* not captured by typed LlmCallPostPayload. Optional; canonical truth is
|
|
2453
|
+
* in `llm_call_post.provider_reported`.
|
|
2454
|
+
*
|
|
2455
|
+
* @generated from protobuf field: string provider_response_metadata = 7
|
|
2456
|
+
*/
|
|
2457
|
+
providerResponseMetadata: string;
|
|
2458
|
+
}
|
|
2459
|
+
/**
|
|
2460
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.TraceEvent
|
|
2461
|
+
*/
|
|
2462
|
+
declare const TraceEvent: TraceEvent$Type;
|
|
2463
|
+
declare class LlmCallPostPayload$Type extends MessageType<LlmCallPostPayload> {
|
|
2464
|
+
constructor();
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* LLM call post payload (per Contract §6 stage 7 commit_or_release driver).
|
|
2468
|
+
*
|
|
2469
|
+
* When sidecar receives this, it triggers either CommitEstimated (if no
|
|
2470
|
+
* provider response yet — uses risk.p90), or ProviderReport (when provider
|
|
2471
|
+
* response usage is in this payload), against the underlying ledger
|
|
2472
|
+
* reservation.
|
|
2473
|
+
*
|
|
2474
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.LlmCallPostPayload
|
|
2475
|
+
*/
|
|
2476
|
+
interface LlmCallPostPayload {
|
|
2477
|
+
/**
|
|
2478
|
+
* Reservation to commit/release; obtained from the sidecar's prior
|
|
2479
|
+
* DecisionResponse for the same llm_call_id.
|
|
2480
|
+
*
|
|
2481
|
+
* @generated from protobuf field: string reservation_id = 1
|
|
2482
|
+
*/
|
|
2483
|
+
reservationId: string;
|
|
2484
|
+
/**
|
|
2485
|
+
* Provider-reported usage (when available; commit_state == provider_reported).
|
|
2486
|
+
* Atomic amount as decimal string for NUMERIC(38,0).
|
|
2487
|
+
*
|
|
2488
|
+
* @generated from protobuf field: string provider_reported_amount_atomic = 2
|
|
2489
|
+
*/
|
|
2490
|
+
providerReportedAmountAtomic: string;
|
|
2491
|
+
/**
|
|
2492
|
+
* @generated from protobuf field: spendguard.common.v1.UnitRef unit = 3
|
|
2493
|
+
*/
|
|
2494
|
+
unit?: UnitRef;
|
|
2495
|
+
/**
|
|
2496
|
+
* Pricing context — should match the cached contract bundle at decision
|
|
2497
|
+
* time. Sidecar validates equality against ledger.pricing_snapshots.
|
|
2498
|
+
*
|
|
2499
|
+
* @generated from protobuf field: spendguard.common.v1.PricingFreeze pricing = 4
|
|
2500
|
+
*/
|
|
2501
|
+
pricing?: PricingFreeze;
|
|
2502
|
+
/**
|
|
2503
|
+
* Provider raw event id for idempotent dedupe (where applicable).
|
|
2504
|
+
*
|
|
2505
|
+
* @generated from protobuf field: string provider_event_id = 5
|
|
2506
|
+
*/
|
|
2507
|
+
providerEventId: string;
|
|
2508
|
+
/**
|
|
2509
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.LlmCallPostPayload.Outcome outcome = 6
|
|
2510
|
+
*/
|
|
2511
|
+
outcome: LlmCallPostPayload_Outcome;
|
|
2512
|
+
/**
|
|
2513
|
+
* Phase 2B Step 7 (Contract §5 commit_state_machine): adapter-supplied
|
|
2514
|
+
* estimated atomic amount that drives the CommitEstimated path. Mutually
|
|
2515
|
+
* exclusive with `provider_reported_amount_atomic` (field 2).
|
|
2516
|
+
*
|
|
2517
|
+
* * estimated_amount_atomic non-empty + outcome=SUCCESS
|
|
2518
|
+
* -> sidecar calls Ledger.CommitEstimated with this amount as the
|
|
2519
|
+
* estimated_amount; ledger transitions reservation 'reserved' ->
|
|
2520
|
+
* 'committed' and releases the residual back to available_budget.
|
|
2521
|
+
* * provider_reported_amount_atomic non-empty
|
|
2522
|
+
* -> sidecar calls Ledger.ProviderReport (deferred to Step 8 in this
|
|
2523
|
+
* POC; sidecar returns UNIMPLEMENTED in TraceEventAck.error).
|
|
2524
|
+
* * both empty + outcome=SUCCESS
|
|
2525
|
+
* -> rejected (no commit amount supplied).
|
|
2526
|
+
* * both non-empty
|
|
2527
|
+
* -> rejected (mutually exclusive paths).
|
|
2528
|
+
* * outcome != SUCCESS
|
|
2529
|
+
* -> rejected (Release path deferred; reservation will TTL-release).
|
|
2530
|
+
*
|
|
2531
|
+
* NUMERIC(38,0) decimal string, same encoding as the provider-reported
|
|
2532
|
+
* field. Required when the caller wants the CommitEstimated path.
|
|
2533
|
+
*
|
|
2534
|
+
* @generated from protobuf field: string estimated_amount_atomic = 7
|
|
2535
|
+
*/
|
|
2536
|
+
estimatedAmountAtomic: string;
|
|
2537
|
+
/**
|
|
2538
|
+
* Optional provider-observed token totals for audit calibration.
|
|
2539
|
+
*
|
|
2540
|
+
* Proto3 optional is intentional: omitted means the producer did not
|
|
2541
|
+
* observe real usage and the audit mirror MUST remain SQL NULL. A
|
|
2542
|
+
* present value of 0 is an explicit provider-observed zero and is
|
|
2543
|
+
* preserved by canonical_ingest / audit_outbox mirror code.
|
|
2544
|
+
*
|
|
2545
|
+
* @generated from protobuf field: optional int64 actual_input_tokens = 8
|
|
2546
|
+
*/
|
|
2547
|
+
actualInputTokens?: string;
|
|
2548
|
+
/**
|
|
2549
|
+
* @generated from protobuf field: optional int64 actual_output_tokens = 9
|
|
2550
|
+
*/
|
|
2551
|
+
actualOutputTokens?: string;
|
|
2552
|
+
/**
|
|
2553
|
+
* Optional calibration ratios computed by the adapter when it has both
|
|
2554
|
+
* actual usage and the prediction it wants to compare. Omitted means
|
|
2555
|
+
* "not applicable"; 0.0 is still treated as unset by mirror code
|
|
2556
|
+
* because a zero denominator/no Strategy B-C path is the dominant
|
|
2557
|
+
* sentinel in the audit-chain extension.
|
|
2558
|
+
*
|
|
2559
|
+
* @generated from protobuf field: optional float delta_b_ratio = 10
|
|
2560
|
+
*/
|
|
2561
|
+
deltaBRatio?: number;
|
|
2562
|
+
/**
|
|
2563
|
+
* @generated from protobuf field: optional float delta_c_ratio = 11
|
|
2564
|
+
*/
|
|
2565
|
+
deltaCRatio?: number;
|
|
2566
|
+
}
|
|
2567
|
+
/**
|
|
2568
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.LlmCallPostPayload
|
|
2569
|
+
*/
|
|
2570
|
+
declare const LlmCallPostPayload: LlmCallPostPayload$Type;
|
|
2571
|
+
declare class ApprovalLifecyclePayload$Type extends MessageType<ApprovalLifecyclePayload> {
|
|
2572
|
+
constructor();
|
|
2573
|
+
}
|
|
2574
|
+
/**
|
|
2575
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ApprovalLifecyclePayload
|
|
2576
|
+
*/
|
|
2577
|
+
interface ApprovalLifecyclePayload {
|
|
2578
|
+
/**
|
|
2579
|
+
* @generated from protobuf field: string approval_request_id = 1
|
|
2580
|
+
*/
|
|
2581
|
+
approvalRequestId: string;
|
|
2582
|
+
/**
|
|
2583
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.ApprovalLifecyclePayload.State state = 2
|
|
2584
|
+
*/
|
|
2585
|
+
state: ApprovalLifecyclePayload_State;
|
|
2586
|
+
/**
|
|
2587
|
+
* @generated from protobuf field: string approver = 3
|
|
2588
|
+
*/
|
|
2589
|
+
approver: string;
|
|
2590
|
+
/**
|
|
2591
|
+
* @generated from protobuf field: google.protobuf.Timestamp deadline = 4
|
|
2592
|
+
*/
|
|
2593
|
+
deadline?: Timestamp;
|
|
2594
|
+
}
|
|
2595
|
+
/**
|
|
2596
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ApprovalLifecyclePayload
|
|
2597
|
+
*/
|
|
2598
|
+
declare const ApprovalLifecyclePayload: ApprovalLifecyclePayload$Type;
|
|
2599
|
+
declare class RollbackPayload$Type extends MessageType<RollbackPayload> {
|
|
2600
|
+
constructor();
|
|
2601
|
+
}
|
|
2602
|
+
/**
|
|
2603
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.RollbackPayload
|
|
2604
|
+
*/
|
|
2605
|
+
interface RollbackPayload {
|
|
2606
|
+
/**
|
|
2607
|
+
* @generated from protobuf field: string ledger_transaction_id = 1
|
|
2608
|
+
*/
|
|
2609
|
+
ledgerTransactionId: string;
|
|
2610
|
+
/**
|
|
2611
|
+
* @generated from protobuf field: string reason_code = 2
|
|
2612
|
+
*/
|
|
2613
|
+
reasonCode: string;
|
|
2614
|
+
/**
|
|
2615
|
+
* @generated from protobuf field: string compensating_ledger_transaction_id = 3
|
|
2616
|
+
*/
|
|
2617
|
+
compensatingLedgerTransactionId: string;
|
|
2618
|
+
}
|
|
2619
|
+
/**
|
|
2620
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.RollbackPayload
|
|
2621
|
+
*/
|
|
2622
|
+
declare const RollbackPayload: RollbackPayload$Type;
|
|
2623
|
+
declare class TraceEventAck$Type extends MessageType<TraceEventAck> {
|
|
2624
|
+
constructor();
|
|
2625
|
+
}
|
|
2626
|
+
/**
|
|
2627
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.TraceEventAck
|
|
2628
|
+
*/
|
|
2629
|
+
interface TraceEventAck {
|
|
2630
|
+
/**
|
|
2631
|
+
* @generated from protobuf field: string event_id = 1
|
|
2632
|
+
*/
|
|
2633
|
+
eventId: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.TraceEventAck.Status status = 2
|
|
2636
|
+
*/
|
|
2637
|
+
status: TraceEventAck_Status;
|
|
2638
|
+
/**
|
|
2639
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 3
|
|
2640
|
+
*/
|
|
2641
|
+
error?: Error;
|
|
2642
|
+
}
|
|
2643
|
+
/**
|
|
2644
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.TraceEventAck
|
|
2645
|
+
*/
|
|
2646
|
+
declare const TraceEventAck: TraceEventAck$Type;
|
|
2647
|
+
declare class IssueBudgetGrantRequest$Type extends MessageType<IssueBudgetGrantRequest> {
|
|
2648
|
+
constructor();
|
|
2649
|
+
}
|
|
2650
|
+
/**
|
|
2651
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.IssueBudgetGrantRequest
|
|
2652
|
+
*/
|
|
2653
|
+
interface IssueBudgetGrantRequest {
|
|
2654
|
+
/**
|
|
2655
|
+
* @generated from protobuf field: string session_id = 1
|
|
2656
|
+
*/
|
|
2657
|
+
sessionId: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* @generated from protobuf field: string parent_run_id = 2
|
|
2660
|
+
*/
|
|
2661
|
+
parentRunId: string;
|
|
2662
|
+
/**
|
|
2663
|
+
* @generated from protobuf field: string child_workload_kind = 3
|
|
2664
|
+
*/
|
|
2665
|
+
childWorkloadKind: string;
|
|
2666
|
+
/**
|
|
2667
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.IssueBudgetGrantRequest.Scope scope = 4
|
|
2668
|
+
*/
|
|
2669
|
+
scope?: IssueBudgetGrantRequest_Scope;
|
|
2670
|
+
}
|
|
2671
|
+
/**
|
|
2672
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.IssueBudgetGrantRequest
|
|
2673
|
+
*/
|
|
2674
|
+
declare const IssueBudgetGrantRequest: IssueBudgetGrantRequest$Type;
|
|
2675
|
+
declare class IssueBudgetGrantRequest_Scope$Type extends MessageType<IssueBudgetGrantRequest_Scope> {
|
|
2676
|
+
constructor();
|
|
2677
|
+
}
|
|
2678
|
+
/**
|
|
2679
|
+
* Delegation scope.
|
|
2680
|
+
*
|
|
2681
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.IssueBudgetGrantRequest.Scope
|
|
2682
|
+
*/
|
|
2683
|
+
interface IssueBudgetGrantRequest_Scope {
|
|
2684
|
+
/**
|
|
2685
|
+
* @generated from protobuf field: repeated string allowed_routes = 1
|
|
2686
|
+
*/
|
|
2687
|
+
allowedRoutes: string[];
|
|
2688
|
+
/**
|
|
2689
|
+
* @generated from protobuf field: repeated string allowed_runtimes = 2
|
|
2690
|
+
*/
|
|
2691
|
+
allowedRuntimes: string[];
|
|
2692
|
+
/**
|
|
2693
|
+
* @generated from protobuf field: string max_amount_atomic = 3
|
|
2694
|
+
*/
|
|
2695
|
+
maxAmountAtomic: string;
|
|
2696
|
+
/**
|
|
2697
|
+
* @generated from protobuf field: spendguard.common.v1.UnitRef max_amount_unit = 4
|
|
2698
|
+
*/
|
|
2699
|
+
maxAmountUnit?: UnitRef;
|
|
2700
|
+
/**
|
|
2701
|
+
* @generated from protobuf field: google.protobuf.Timestamp expires_at = 5
|
|
2702
|
+
*/
|
|
2703
|
+
expiresAt?: Timestamp;
|
|
2704
|
+
/**
|
|
2705
|
+
* Required JWT custom claim per Contract §8 grant.claims.
|
|
2706
|
+
* Identifies the parent reservation backing this delegation; child
|
|
2707
|
+
* agent's first ReserveSet recheck verifies budget headroom against
|
|
2708
|
+
* this reservation's ledger state.
|
|
2709
|
+
*
|
|
2710
|
+
* @generated from protobuf field: string reservation_id = 6
|
|
2711
|
+
*/
|
|
2712
|
+
reservationId: string;
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.IssueBudgetGrantRequest.Scope
|
|
2716
|
+
*/
|
|
2717
|
+
declare const IssueBudgetGrantRequest_Scope: IssueBudgetGrantRequest_Scope$Type;
|
|
2718
|
+
declare class IssueBudgetGrantResponse$Type extends MessageType<IssueBudgetGrantResponse> {
|
|
2719
|
+
constructor();
|
|
2720
|
+
}
|
|
2721
|
+
/**
|
|
2722
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.IssueBudgetGrantResponse
|
|
2723
|
+
*/
|
|
2724
|
+
interface IssueBudgetGrantResponse {
|
|
2725
|
+
/**
|
|
2726
|
+
* RFC 9068 JWT access token; ed25519-signed.
|
|
2727
|
+
*
|
|
2728
|
+
* @generated from protobuf field: string jwt_grant = 1
|
|
2729
|
+
*/
|
|
2730
|
+
jwtGrant: string;
|
|
2731
|
+
/**
|
|
2732
|
+
* @generated from protobuf field: string grant_jti = 2
|
|
2733
|
+
*/
|
|
2734
|
+
grantJti: string;
|
|
2735
|
+
/**
|
|
2736
|
+
* @generated from protobuf field: google.protobuf.Timestamp issued_at = 3
|
|
2737
|
+
*/
|
|
2738
|
+
issuedAt?: Timestamp;
|
|
2739
|
+
/**
|
|
2740
|
+
* @generated from protobuf field: google.protobuf.Timestamp expires_at = 4
|
|
2741
|
+
*/
|
|
2742
|
+
expiresAt?: Timestamp;
|
|
2743
|
+
}
|
|
2744
|
+
/**
|
|
2745
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.IssueBudgetGrantResponse
|
|
2746
|
+
*/
|
|
2747
|
+
declare const IssueBudgetGrantResponse: IssueBudgetGrantResponse$Type;
|
|
2748
|
+
declare class RevokeBudgetGrantRequest$Type extends MessageType<RevokeBudgetGrantRequest> {
|
|
2749
|
+
constructor();
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.RevokeBudgetGrantRequest
|
|
2753
|
+
*/
|
|
2754
|
+
interface RevokeBudgetGrantRequest {
|
|
2755
|
+
/**
|
|
2756
|
+
* @generated from protobuf field: string session_id = 1
|
|
2757
|
+
*/
|
|
2758
|
+
sessionId: string;
|
|
2759
|
+
/**
|
|
2760
|
+
* @generated from protobuf field: string grant_jti = 2
|
|
2761
|
+
*/
|
|
2762
|
+
grantJti: string;
|
|
2763
|
+
/**
|
|
2764
|
+
* @generated from protobuf field: string reason = 3
|
|
2765
|
+
*/
|
|
2766
|
+
reason: string;
|
|
2767
|
+
}
|
|
2768
|
+
/**
|
|
2769
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.RevokeBudgetGrantRequest
|
|
2770
|
+
*/
|
|
2771
|
+
declare const RevokeBudgetGrantRequest: RevokeBudgetGrantRequest$Type;
|
|
2772
|
+
declare class RevokeBudgetGrantResponse$Type extends MessageType<RevokeBudgetGrantResponse> {
|
|
2773
|
+
constructor();
|
|
2774
|
+
}
|
|
2775
|
+
/**
|
|
2776
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.RevokeBudgetGrantResponse
|
|
2777
|
+
*/
|
|
2778
|
+
interface RevokeBudgetGrantResponse {
|
|
2779
|
+
/**
|
|
2780
|
+
* @generated from protobuf field: bool revoked = 1
|
|
2781
|
+
*/
|
|
2782
|
+
revoked: boolean;
|
|
2783
|
+
/**
|
|
2784
|
+
* @generated from protobuf field: google.protobuf.Timestamp revoked_at = 2
|
|
2785
|
+
*/
|
|
2786
|
+
revokedAt?: Timestamp;
|
|
2787
|
+
}
|
|
2788
|
+
/**
|
|
2789
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.RevokeBudgetGrantResponse
|
|
2790
|
+
*/
|
|
2791
|
+
declare const RevokeBudgetGrantResponse: RevokeBudgetGrantResponse$Type;
|
|
2792
|
+
declare class ConsumeBudgetGrantRequest$Type extends MessageType<ConsumeBudgetGrantRequest> {
|
|
2793
|
+
constructor();
|
|
2794
|
+
}
|
|
2795
|
+
/**
|
|
2796
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ConsumeBudgetGrantRequest
|
|
2797
|
+
*/
|
|
2798
|
+
interface ConsumeBudgetGrantRequest {
|
|
2799
|
+
/**
|
|
2800
|
+
* @generated from protobuf field: string session_id = 1
|
|
2801
|
+
*/
|
|
2802
|
+
sessionId: string;
|
|
2803
|
+
/**
|
|
2804
|
+
* @generated from protobuf field: string jwt_grant = 2
|
|
2805
|
+
*/
|
|
2806
|
+
jwtGrant: string;
|
|
2807
|
+
}
|
|
2808
|
+
/**
|
|
2809
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ConsumeBudgetGrantRequest
|
|
2810
|
+
*/
|
|
2811
|
+
declare const ConsumeBudgetGrantRequest: ConsumeBudgetGrantRequest$Type;
|
|
2812
|
+
declare class ConsumeBudgetGrantResponse$Type extends MessageType<ConsumeBudgetGrantResponse> {
|
|
2813
|
+
constructor();
|
|
2814
|
+
}
|
|
2815
|
+
/**
|
|
2816
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ConsumeBudgetGrantResponse
|
|
2817
|
+
*/
|
|
2818
|
+
interface ConsumeBudgetGrantResponse {
|
|
2819
|
+
/**
|
|
2820
|
+
* @generated from protobuf field: bool accepted = 1
|
|
2821
|
+
*/
|
|
2822
|
+
accepted: boolean;
|
|
2823
|
+
/**
|
|
2824
|
+
* @generated from protobuf field: string parent_run_id = 2
|
|
2825
|
+
*/
|
|
2826
|
+
parentRunId: string;
|
|
2827
|
+
/**
|
|
2828
|
+
* @generated from protobuf field: string parent_tenant_id = 3
|
|
2829
|
+
*/
|
|
2830
|
+
parentTenantId: string;
|
|
2831
|
+
/**
|
|
2832
|
+
* @generated from protobuf field: google.protobuf.Timestamp expires_at = 4
|
|
2833
|
+
*/
|
|
2834
|
+
expiresAt?: Timestamp;
|
|
2835
|
+
/**
|
|
2836
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 5
|
|
2837
|
+
*/
|
|
2838
|
+
error?: Error;
|
|
2839
|
+
}
|
|
2840
|
+
/**
|
|
2841
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ConsumeBudgetGrantResponse
|
|
2842
|
+
*/
|
|
2843
|
+
declare const ConsumeBudgetGrantResponse: ConsumeBudgetGrantResponse$Type;
|
|
2844
|
+
declare class DrainSubscribeRequest$Type extends MessageType<DrainSubscribeRequest> {
|
|
2845
|
+
constructor();
|
|
2846
|
+
}
|
|
2847
|
+
/**
|
|
2848
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.DrainSubscribeRequest
|
|
2849
|
+
*/
|
|
2850
|
+
interface DrainSubscribeRequest {
|
|
2851
|
+
/**
|
|
2852
|
+
* @generated from protobuf field: string session_id = 1
|
|
2853
|
+
*/
|
|
2854
|
+
sessionId: string;
|
|
2855
|
+
}
|
|
2856
|
+
/**
|
|
2857
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.DrainSubscribeRequest
|
|
2858
|
+
*/
|
|
2859
|
+
declare const DrainSubscribeRequest: DrainSubscribeRequest$Type;
|
|
2860
|
+
declare class DrainSignal$Type extends MessageType<DrainSignal> {
|
|
2861
|
+
constructor();
|
|
2862
|
+
}
|
|
2863
|
+
/**
|
|
2864
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.DrainSignal
|
|
2865
|
+
*/
|
|
2866
|
+
interface DrainSignal {
|
|
2867
|
+
/**
|
|
2868
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.DrainSignal.Phase phase = 1
|
|
2869
|
+
*/
|
|
2870
|
+
phase: DrainSignal_Phase;
|
|
2871
|
+
/**
|
|
2872
|
+
* @generated from protobuf field: google.protobuf.Timestamp deadline = 2
|
|
2873
|
+
*/
|
|
2874
|
+
deadline?: Timestamp;
|
|
2875
|
+
/**
|
|
2876
|
+
* @generated from protobuf field: string drain_trigger = 3
|
|
2877
|
+
*/
|
|
2878
|
+
drainTrigger: string;
|
|
2879
|
+
}
|
|
2880
|
+
/**
|
|
2881
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.DrainSignal
|
|
2882
|
+
*/
|
|
2883
|
+
declare const DrainSignal: DrainSignal$Type;
|
|
2884
|
+
declare class ReleaseReservationRequest$Type extends MessageType<ReleaseReservationRequest> {
|
|
2885
|
+
constructor();
|
|
2886
|
+
}
|
|
2887
|
+
/**
|
|
2888
|
+
* Field-tag layout: ASP Draft-01 §4 canonical fields hold tags 1-3
|
|
2889
|
+
* verbatim. SpendGuard extensions (tenant assertion, fencing identity)
|
|
2890
|
+
* live at tags 100+ so a Draft-01-generated client wire-serializes
|
|
2891
|
+
* identically. Tags 4-99 are reserved for future Draft-01 additions.
|
|
2892
|
+
*
|
|
2893
|
+
* ── ASP Draft-01 §4 canonical fields ─────────────────────────────────
|
|
2894
|
+
*
|
|
2895
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReleaseReservationRequest
|
|
2896
|
+
*/
|
|
2897
|
+
interface ReleaseReservationRequest {
|
|
2898
|
+
/**
|
|
2899
|
+
* The reservation to release. UUIDv7 from a prior ReserveResponse's
|
|
2900
|
+
* reservation_ids. Released independently per-reservation: callers
|
|
2901
|
+
* holding multiple reservations under one decision MUST call
|
|
2902
|
+
* ReleaseReservation once per reservation_id.
|
|
2903
|
+
*
|
|
2904
|
+
* @generated from protobuf field: string reservation_id = 1
|
|
2905
|
+
*/
|
|
2906
|
+
reservationId: string;
|
|
2907
|
+
/**
|
|
2908
|
+
* Idempotency key for retries. The (reservation_id, idempotency_key)
|
|
2909
|
+
* pair is the dedup key per ASP Draft-01 §3.3:
|
|
2910
|
+
* - same pair + identical body → return original outcome
|
|
2911
|
+
* - same pair + different body → REPLAY_CONFLICT (gRPC Status)
|
|
2912
|
+
* - different idempotency_key against a terminal reservation
|
|
2913
|
+
* → RESERVATION_SETTLED / RESERVATION_RELEASED (gRPC Status)
|
|
2914
|
+
*
|
|
2915
|
+
* @generated from protobuf field: string idempotency_key = 2
|
|
2916
|
+
*/
|
|
2917
|
+
idempotencyKey: string;
|
|
2918
|
+
/**
|
|
2919
|
+
* Free-form reason codes per ASP Draft-01 §4. Optional but
|
|
2920
|
+
* RECOMMENDED. SpendGuard maps known values to its internal
|
|
2921
|
+
* ReleaseReason enum; unknown values default to EXPLICIT.
|
|
2922
|
+
* Known mappings (aligned with the EmitTraceEvents implicit path):
|
|
2923
|
+
* "provider_error" | "runtime_error" | "client_timeout"
|
|
2924
|
+
* → RuntimeError
|
|
2925
|
+
* "run_aborted" | "run_cancelled"
|
|
2926
|
+
* → RunAborted
|
|
2927
|
+
* anything else
|
|
2928
|
+
* → Explicit
|
|
2929
|
+
*
|
|
2930
|
+
* @generated from protobuf field: repeated string reason_codes = 3
|
|
2931
|
+
*/
|
|
2932
|
+
reasonCodes: string[];
|
|
2933
|
+
/**
|
|
2934
|
+
* Tenant scope assertion. If non-empty MUST match the sidecar's
|
|
2935
|
+
* configured tenant_id (permission_denied on mismatch). If empty the
|
|
2936
|
+
* sidecar's own tenant_id is used implicitly. Same discipline as
|
|
2937
|
+
* Handshake.tenant_id_assertion.
|
|
2938
|
+
*
|
|
2939
|
+
* @generated from protobuf field: string tenant_id = 100
|
|
2940
|
+
*/
|
|
2941
|
+
tenantId: string;
|
|
2942
|
+
/**
|
|
2943
|
+
* Adapter identity for fencing parity with the original Reserve.
|
|
2944
|
+
* If empty, sidecar config defaults are used. Fencing epoch is
|
|
2945
|
+
* checked inside run_release regardless.
|
|
2946
|
+
*
|
|
2947
|
+
* @generated from protobuf field: string workload_instance_id = 101
|
|
2948
|
+
*/
|
|
2949
|
+
workloadInstanceId: string;
|
|
2950
|
+
/**
|
|
2951
|
+
* @generated from protobuf field: string session_id = 102
|
|
2952
|
+
*/
|
|
2953
|
+
sessionId: string;
|
|
2954
|
+
}
|
|
2955
|
+
/**
|
|
2956
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReleaseReservationRequest
|
|
2957
|
+
*/
|
|
2958
|
+
declare const ReleaseReservationRequest: ReleaseReservationRequest$Type;
|
|
2959
|
+
declare class ReleaseReservationResponse$Type extends MessageType<ReleaseReservationResponse> {
|
|
2960
|
+
constructor();
|
|
2961
|
+
}
|
|
2962
|
+
/**
|
|
2963
|
+
* Errors are returned via gRPC Status (standard tonic / Draft-01
|
|
2964
|
+
* idiom), not embedded in the response body. Maps:
|
|
2965
|
+
* ReservationStateConflict → Status::failed_precondition
|
|
2966
|
+
* ReservationTtlExpired → Status::failed_precondition
|
|
2967
|
+
* FencingEpochStale → Status::failed_precondition
|
|
2968
|
+
* IdempotencyConflict → Status::failed_precondition
|
|
2969
|
+
* (unknown reservation) → Status::not_found
|
|
2970
|
+
* (tenant mismatch) → Status::permission_denied
|
|
2971
|
+
* (invalid UUID) → Status::invalid_argument
|
|
2972
|
+
*
|
|
2973
|
+
* ── ASP Draft-01 §4 canonical field ──────────────────────────────────
|
|
2974
|
+
*
|
|
2975
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReleaseReservationResponse
|
|
2976
|
+
*/
|
|
2977
|
+
interface ReleaseReservationResponse {
|
|
2978
|
+
/**
|
|
2979
|
+
* Detached Ed25519 signature of the emitted audit.release CloudEvent.
|
|
2980
|
+
* The full event lands in the audit chain via canonical_ingest; this
|
|
2981
|
+
* signature lets the adapter pin the response to the receipt. Same-
|
|
2982
|
+
* process idempotent replay returns the original signature while the
|
|
2983
|
+
* sidecar replay cache is warm; cache miss returns empty bytes rather
|
|
2984
|
+
* than a signature over a retry event that was not persisted.
|
|
2985
|
+
*
|
|
2986
|
+
* @generated from protobuf field: bytes audit_event_signature = 1
|
|
2987
|
+
*/
|
|
2988
|
+
auditEventSignature: Uint8Array;
|
|
2989
|
+
/**
|
|
2990
|
+
* Ledger transaction that recorded the release.
|
|
2991
|
+
*
|
|
2992
|
+
* @generated from protobuf field: string ledger_transaction_id = 100
|
|
2993
|
+
*/
|
|
2994
|
+
ledgerTransactionId: string;
|
|
2995
|
+
/**
|
|
2996
|
+
* Reservations released by this call (single-element array in the
|
|
2997
|
+
* current single-reservation-per-call model; kept as repeated for
|
|
2998
|
+
* forward compatibility with a future batch-release form).
|
|
2999
|
+
*
|
|
3000
|
+
* @generated from protobuf field: repeated string released_reservation_ids = 101
|
|
3001
|
+
*/
|
|
3002
|
+
releasedReservationIds: string[];
|
|
3003
|
+
}
|
|
3004
|
+
/**
|
|
3005
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReleaseReservationResponse
|
|
3006
|
+
*/
|
|
3007
|
+
declare const ReleaseReservationResponse: ReleaseReservationResponse$Type;
|
|
3008
|
+
declare class ReserveSessionRequest$Type extends MessageType<ReserveSessionRequest> {
|
|
3009
|
+
constructor();
|
|
3010
|
+
}
|
|
3011
|
+
/**
|
|
3012
|
+
* Field-tag layout locked by D41 session reservation substrate design.md §5:
|
|
3013
|
+
* tags 1..10 are the required request fields in design order.
|
|
3014
|
+
*
|
|
3015
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReserveSessionRequest
|
|
3016
|
+
*/
|
|
3017
|
+
interface ReserveSessionRequest {
|
|
3018
|
+
/**
|
|
3019
|
+
* @generated from protobuf field: string tenant_id = 1
|
|
3020
|
+
*/
|
|
3021
|
+
tenantId: string;
|
|
3022
|
+
/**
|
|
3023
|
+
* @generated from protobuf field: string budget_id = 2
|
|
3024
|
+
*/
|
|
3025
|
+
budgetId: string;
|
|
3026
|
+
/**
|
|
3027
|
+
* @generated from protobuf field: string window_instance_id = 3
|
|
3028
|
+
*/
|
|
3029
|
+
windowInstanceId: string;
|
|
3030
|
+
/**
|
|
3031
|
+
* @generated from protobuf field: spendguard.common.v1.UnitRef unit = 4
|
|
3032
|
+
*/
|
|
3033
|
+
unit?: UnitRef;
|
|
3034
|
+
/**
|
|
3035
|
+
* @generated from protobuf field: spendguard.common.v1.PricingFreeze pricing = 5
|
|
3036
|
+
*/
|
|
3037
|
+
pricing?: PricingFreeze;
|
|
3038
|
+
/**
|
|
3039
|
+
* @generated from protobuf field: string session_id = 6
|
|
3040
|
+
*/
|
|
3041
|
+
sessionId: string;
|
|
3042
|
+
/**
|
|
3043
|
+
* @generated from protobuf field: string route = 7
|
|
3044
|
+
*/
|
|
3045
|
+
route: string;
|
|
3046
|
+
/**
|
|
3047
|
+
* @generated from protobuf field: string estimated_amount_atomic = 8
|
|
3048
|
+
*/
|
|
3049
|
+
estimatedAmountAtomic: string;
|
|
3050
|
+
/**
|
|
3051
|
+
* @generated from protobuf field: uint32 ttl_seconds = 9
|
|
3052
|
+
*/
|
|
3053
|
+
ttlSeconds: number;
|
|
3054
|
+
/**
|
|
3055
|
+
* @generated from protobuf field: string idempotency_key = 10
|
|
3056
|
+
*/
|
|
3057
|
+
idempotencyKey: string;
|
|
3058
|
+
}
|
|
3059
|
+
/**
|
|
3060
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReserveSessionRequest
|
|
3061
|
+
*/
|
|
3062
|
+
declare const ReserveSessionRequest: ReserveSessionRequest$Type;
|
|
3063
|
+
declare class ReserveSessionOutcome$Type extends MessageType<ReserveSessionOutcome> {
|
|
3064
|
+
constructor();
|
|
3065
|
+
}
|
|
3066
|
+
/**
|
|
3067
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReserveSessionOutcome
|
|
3068
|
+
*/
|
|
3069
|
+
interface ReserveSessionOutcome {
|
|
3070
|
+
/**
|
|
3071
|
+
* @generated from protobuf oneof: outcome
|
|
3072
|
+
*/
|
|
3073
|
+
outcome: {
|
|
3074
|
+
oneofKind: "accepted";
|
|
3075
|
+
/**
|
|
3076
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.ReserveSessionAccepted accepted = 1
|
|
3077
|
+
*/
|
|
3078
|
+
accepted: ReserveSessionAccepted;
|
|
3079
|
+
} | {
|
|
3080
|
+
oneofKind: "denied";
|
|
3081
|
+
/**
|
|
3082
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.ReserveSessionDenied denied = 2
|
|
3083
|
+
*/
|
|
3084
|
+
denied: ReserveSessionDenied;
|
|
3085
|
+
} | {
|
|
3086
|
+
oneofKind: "error";
|
|
3087
|
+
/**
|
|
3088
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 3
|
|
3089
|
+
*/
|
|
3090
|
+
error: Error;
|
|
3091
|
+
} | {
|
|
3092
|
+
oneofKind: undefined;
|
|
3093
|
+
};
|
|
3094
|
+
}
|
|
3095
|
+
/**
|
|
3096
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReserveSessionOutcome
|
|
3097
|
+
*/
|
|
3098
|
+
declare const ReserveSessionOutcome: ReserveSessionOutcome$Type;
|
|
3099
|
+
declare class ReserveSessionAccepted$Type extends MessageType<ReserveSessionAccepted> {
|
|
3100
|
+
constructor();
|
|
3101
|
+
}
|
|
3102
|
+
/**
|
|
3103
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReserveSessionAccepted
|
|
3104
|
+
*/
|
|
3105
|
+
interface ReserveSessionAccepted {
|
|
3106
|
+
/**
|
|
3107
|
+
* @generated from protobuf field: string session_reservation_id = 1
|
|
3108
|
+
*/
|
|
3109
|
+
sessionReservationId: string;
|
|
3110
|
+
/**
|
|
3111
|
+
* @generated from protobuf field: string ledger_transaction_id = 2
|
|
3112
|
+
*/
|
|
3113
|
+
ledgerTransactionId: string;
|
|
3114
|
+
/**
|
|
3115
|
+
* @generated from protobuf field: string audit_session_event_id = 3
|
|
3116
|
+
*/
|
|
3117
|
+
auditSessionEventId: string;
|
|
3118
|
+
/**
|
|
3119
|
+
* @generated from protobuf field: google.protobuf.Timestamp ttl_expires_at = 4
|
|
3120
|
+
*/
|
|
3121
|
+
ttlExpiresAt?: Timestamp;
|
|
3122
|
+
/**
|
|
3123
|
+
* @generated from protobuf field: string reserved_amount_atomic = 5
|
|
3124
|
+
*/
|
|
3125
|
+
reservedAmountAtomic: string;
|
|
3126
|
+
/**
|
|
3127
|
+
* @generated from protobuf field: string remaining_amount_atomic = 6
|
|
3128
|
+
*/
|
|
3129
|
+
remainingAmountAtomic: string;
|
|
3130
|
+
}
|
|
3131
|
+
/**
|
|
3132
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReserveSessionAccepted
|
|
3133
|
+
*/
|
|
3134
|
+
declare const ReserveSessionAccepted: ReserveSessionAccepted$Type;
|
|
3135
|
+
declare class ReserveSessionDenied$Type extends MessageType<ReserveSessionDenied> {
|
|
3136
|
+
constructor();
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReserveSessionDenied
|
|
3140
|
+
*/
|
|
3141
|
+
interface ReserveSessionDenied {
|
|
3142
|
+
/**
|
|
3143
|
+
* @generated from protobuf field: string audit_session_event_id = 1
|
|
3144
|
+
*/
|
|
3145
|
+
auditSessionEventId: string;
|
|
3146
|
+
/**
|
|
3147
|
+
* @generated from protobuf field: repeated string reason_codes = 2
|
|
3148
|
+
*/
|
|
3149
|
+
reasonCodes: string[];
|
|
3150
|
+
/**
|
|
3151
|
+
* @generated from protobuf field: repeated string matched_rule_ids = 3
|
|
3152
|
+
*/
|
|
3153
|
+
matchedRuleIds: string[];
|
|
3154
|
+
/**
|
|
3155
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 4
|
|
3156
|
+
*/
|
|
3157
|
+
error?: Error;
|
|
3158
|
+
}
|
|
3159
|
+
/**
|
|
3160
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReserveSessionDenied
|
|
3161
|
+
*/
|
|
3162
|
+
declare const ReserveSessionDenied: ReserveSessionDenied$Type;
|
|
3163
|
+
declare class CommitSessionDeltaRequest$Type extends MessageType<CommitSessionDeltaRequest> {
|
|
3164
|
+
constructor();
|
|
3165
|
+
}
|
|
3166
|
+
/**
|
|
3167
|
+
* Field-tag layout locked by D41 session reservation substrate design.md §5:
|
|
3168
|
+
* tags 1..6 are the required request fields in design order.
|
|
3169
|
+
*
|
|
3170
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.CommitSessionDeltaRequest
|
|
3171
|
+
*/
|
|
3172
|
+
interface CommitSessionDeltaRequest {
|
|
3173
|
+
/**
|
|
3174
|
+
* @generated from protobuf field: string session_reservation_id = 1
|
|
3175
|
+
*/
|
|
3176
|
+
sessionReservationId: string;
|
|
3177
|
+
/**
|
|
3178
|
+
* @generated from protobuf field: string streaming_commit_id = 2
|
|
3179
|
+
*/
|
|
3180
|
+
streamingCommitId: string;
|
|
3181
|
+
/**
|
|
3182
|
+
* @generated from protobuf field: string amount_atomic_delta = 3
|
|
3183
|
+
*/
|
|
3184
|
+
amountAtomicDelta: string;
|
|
3185
|
+
/**
|
|
3186
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.CommitSessionDeltaRequest.Outcome outcome = 4
|
|
3187
|
+
*/
|
|
3188
|
+
outcome: CommitSessionDeltaRequest_Outcome;
|
|
3189
|
+
/**
|
|
3190
|
+
* @generated from protobuf field: google.protobuf.Timestamp event_time = 5
|
|
3191
|
+
*/
|
|
3192
|
+
eventTime?: Timestamp;
|
|
3193
|
+
/**
|
|
3194
|
+
* @generated from protobuf field: string idempotency_key = 6
|
|
3195
|
+
*/
|
|
3196
|
+
idempotencyKey: string;
|
|
3197
|
+
}
|
|
3198
|
+
/**
|
|
3199
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.CommitSessionDeltaRequest
|
|
3200
|
+
*/
|
|
3201
|
+
declare const CommitSessionDeltaRequest: CommitSessionDeltaRequest$Type;
|
|
3202
|
+
declare class CommitSessionDeltaOutcome$Type extends MessageType<CommitSessionDeltaOutcome> {
|
|
3203
|
+
constructor();
|
|
3204
|
+
}
|
|
3205
|
+
/**
|
|
3206
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.CommitSessionDeltaOutcome
|
|
3207
|
+
*/
|
|
3208
|
+
interface CommitSessionDeltaOutcome {
|
|
3209
|
+
/**
|
|
3210
|
+
* @generated from protobuf oneof: outcome
|
|
3211
|
+
*/
|
|
3212
|
+
outcome: {
|
|
3213
|
+
oneofKind: "accepted";
|
|
3214
|
+
/**
|
|
3215
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.CommitSessionDeltaAccepted accepted = 1
|
|
3216
|
+
*/
|
|
3217
|
+
accepted: CommitSessionDeltaAccepted;
|
|
3218
|
+
} | {
|
|
3219
|
+
oneofKind: "error";
|
|
3220
|
+
/**
|
|
3221
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 2
|
|
3222
|
+
*/
|
|
3223
|
+
error: Error;
|
|
3224
|
+
} | {
|
|
3225
|
+
oneofKind: undefined;
|
|
3226
|
+
};
|
|
3227
|
+
}
|
|
3228
|
+
/**
|
|
3229
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.CommitSessionDeltaOutcome
|
|
3230
|
+
*/
|
|
3231
|
+
declare const CommitSessionDeltaOutcome: CommitSessionDeltaOutcome$Type;
|
|
3232
|
+
declare class CommitSessionDeltaAccepted$Type extends MessageType<CommitSessionDeltaAccepted> {
|
|
3233
|
+
constructor();
|
|
3234
|
+
}
|
|
3235
|
+
/**
|
|
3236
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.CommitSessionDeltaAccepted
|
|
3237
|
+
*/
|
|
3238
|
+
interface CommitSessionDeltaAccepted {
|
|
3239
|
+
/**
|
|
3240
|
+
* @generated from protobuf field: string session_reservation_id = 1
|
|
3241
|
+
*/
|
|
3242
|
+
sessionReservationId: string;
|
|
3243
|
+
/**
|
|
3244
|
+
* @generated from protobuf field: string streaming_commit_id = 2
|
|
3245
|
+
*/
|
|
3246
|
+
streamingCommitId: string;
|
|
3247
|
+
/**
|
|
3248
|
+
* @generated from protobuf field: string ledger_transaction_id = 3
|
|
3249
|
+
*/
|
|
3250
|
+
ledgerTransactionId: string;
|
|
3251
|
+
/**
|
|
3252
|
+
* @generated from protobuf field: string audit_session_event_id = 4
|
|
3253
|
+
*/
|
|
3254
|
+
auditSessionEventId: string;
|
|
3255
|
+
/**
|
|
3256
|
+
* @generated from protobuf field: string committed_delta_atomic = 5
|
|
3257
|
+
*/
|
|
3258
|
+
committedDeltaAtomic: string;
|
|
3259
|
+
/**
|
|
3260
|
+
* @generated from protobuf field: string cumulative_committed_atomic = 6
|
|
3261
|
+
*/
|
|
3262
|
+
cumulativeCommittedAtomic: string;
|
|
3263
|
+
/**
|
|
3264
|
+
* @generated from protobuf field: string remaining_amount_atomic = 7
|
|
3265
|
+
*/
|
|
3266
|
+
remainingAmountAtomic: string;
|
|
3267
|
+
/**
|
|
3268
|
+
* @generated from protobuf field: google.protobuf.Timestamp recorded_at = 8
|
|
3269
|
+
*/
|
|
3270
|
+
recordedAt?: Timestamp;
|
|
3271
|
+
}
|
|
3272
|
+
/**
|
|
3273
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.CommitSessionDeltaAccepted
|
|
3274
|
+
*/
|
|
3275
|
+
declare const CommitSessionDeltaAccepted: CommitSessionDeltaAccepted$Type;
|
|
3276
|
+
declare class ReleaseSessionRequest$Type extends MessageType<ReleaseSessionRequest> {
|
|
3277
|
+
constructor();
|
|
3278
|
+
}
|
|
3279
|
+
/**
|
|
3280
|
+
* Field-tag layout locked by D41 session reservation substrate design.md §5:
|
|
3281
|
+
* tags 1..4 are the required request fields in design order.
|
|
3282
|
+
*
|
|
3283
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReleaseSessionRequest
|
|
3284
|
+
*/
|
|
3285
|
+
interface ReleaseSessionRequest {
|
|
3286
|
+
/**
|
|
3287
|
+
* @generated from protobuf field: string session_reservation_id = 1
|
|
3288
|
+
*/
|
|
3289
|
+
sessionReservationId: string;
|
|
3290
|
+
/**
|
|
3291
|
+
* @generated from protobuf field: string reason_code = 2
|
|
3292
|
+
*/
|
|
3293
|
+
reasonCode: string;
|
|
3294
|
+
/**
|
|
3295
|
+
* @generated from protobuf field: google.protobuf.Timestamp event_time = 3
|
|
3296
|
+
*/
|
|
3297
|
+
eventTime?: Timestamp;
|
|
3298
|
+
/**
|
|
3299
|
+
* @generated from protobuf field: string idempotency_key = 4
|
|
3300
|
+
*/
|
|
3301
|
+
idempotencyKey: string;
|
|
3302
|
+
}
|
|
3303
|
+
/**
|
|
3304
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReleaseSessionRequest
|
|
3305
|
+
*/
|
|
3306
|
+
declare const ReleaseSessionRequest: ReleaseSessionRequest$Type;
|
|
3307
|
+
declare class ReleaseSessionOutcome$Type extends MessageType<ReleaseSessionOutcome> {
|
|
3308
|
+
constructor();
|
|
3309
|
+
}
|
|
3310
|
+
/**
|
|
3311
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReleaseSessionOutcome
|
|
3312
|
+
*/
|
|
3313
|
+
interface ReleaseSessionOutcome {
|
|
3314
|
+
/**
|
|
3315
|
+
* @generated from protobuf oneof: outcome
|
|
3316
|
+
*/
|
|
3317
|
+
outcome: {
|
|
3318
|
+
oneofKind: "accepted";
|
|
3319
|
+
/**
|
|
3320
|
+
* @generated from protobuf field: spendguard.sidecar_adapter.v1.ReleaseSessionAccepted accepted = 1
|
|
3321
|
+
*/
|
|
3322
|
+
accepted: ReleaseSessionAccepted;
|
|
3323
|
+
} | {
|
|
3324
|
+
oneofKind: "error";
|
|
3325
|
+
/**
|
|
3326
|
+
* @generated from protobuf field: spendguard.common.v1.Error error = 2
|
|
3327
|
+
*/
|
|
3328
|
+
error: Error;
|
|
3329
|
+
} | {
|
|
3330
|
+
oneofKind: undefined;
|
|
3331
|
+
};
|
|
3332
|
+
}
|
|
3333
|
+
/**
|
|
3334
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReleaseSessionOutcome
|
|
3335
|
+
*/
|
|
3336
|
+
declare const ReleaseSessionOutcome: ReleaseSessionOutcome$Type;
|
|
3337
|
+
declare class ReleaseSessionAccepted$Type extends MessageType<ReleaseSessionAccepted> {
|
|
3338
|
+
constructor();
|
|
3339
|
+
}
|
|
3340
|
+
/**
|
|
3341
|
+
* @generated from protobuf message spendguard.sidecar_adapter.v1.ReleaseSessionAccepted
|
|
3342
|
+
*/
|
|
3343
|
+
interface ReleaseSessionAccepted {
|
|
3344
|
+
/**
|
|
3345
|
+
* @generated from protobuf field: string session_reservation_id = 1
|
|
3346
|
+
*/
|
|
3347
|
+
sessionReservationId: string;
|
|
3348
|
+
/**
|
|
3349
|
+
* @generated from protobuf field: string ledger_transaction_id = 2
|
|
3350
|
+
*/
|
|
3351
|
+
ledgerTransactionId: string;
|
|
3352
|
+
/**
|
|
3353
|
+
* @generated from protobuf field: string audit_session_event_id = 3
|
|
3354
|
+
*/
|
|
3355
|
+
auditSessionEventId: string;
|
|
3356
|
+
/**
|
|
3357
|
+
* @generated from protobuf field: string released_amount_atomic = 4
|
|
3358
|
+
*/
|
|
3359
|
+
releasedAmountAtomic: string;
|
|
3360
|
+
/**
|
|
3361
|
+
* @generated from protobuf field: string committed_amount_atomic = 5
|
|
3362
|
+
*/
|
|
3363
|
+
committedAmountAtomic: string;
|
|
3364
|
+
/**
|
|
3365
|
+
* @generated from protobuf field: google.protobuf.Timestamp recorded_at = 6
|
|
3366
|
+
*/
|
|
3367
|
+
recordedAt?: Timestamp;
|
|
3368
|
+
}
|
|
3369
|
+
/**
|
|
3370
|
+
* @generated MessageType for protobuf message spendguard.sidecar_adapter.v1.ReleaseSessionAccepted
|
|
3371
|
+
*/
|
|
3372
|
+
declare const ReleaseSessionAccepted: ReleaseSessionAccepted$Type;
|
|
3373
|
+
/**
|
|
3374
|
+
* @generated ServiceType for protobuf service spendguard.sidecar_adapter.v1.SidecarAdapter
|
|
3375
|
+
*/
|
|
3376
|
+
declare const SidecarAdapter: ServiceType;
|
|
3377
|
+
|
|
3378
|
+
declare const adapter_ApprovalLifecyclePayload: typeof ApprovalLifecyclePayload;
|
|
3379
|
+
type adapter_ApprovalLifecyclePayload_State = ApprovalLifecyclePayload_State;
|
|
3380
|
+
declare const adapter_ApprovalLifecyclePayload_State: typeof ApprovalLifecyclePayload_State;
|
|
3381
|
+
declare const adapter_ClaimEstimate: typeof ClaimEstimate;
|
|
3382
|
+
declare const adapter_CommitSessionDeltaAccepted: typeof CommitSessionDeltaAccepted;
|
|
3383
|
+
declare const adapter_CommitSessionDeltaOutcome: typeof CommitSessionDeltaOutcome;
|
|
3384
|
+
declare const adapter_CommitSessionDeltaRequest: typeof CommitSessionDeltaRequest;
|
|
3385
|
+
type adapter_CommitSessionDeltaRequest_Outcome = CommitSessionDeltaRequest_Outcome;
|
|
3386
|
+
declare const adapter_CommitSessionDeltaRequest_Outcome: typeof CommitSessionDeltaRequest_Outcome;
|
|
3387
|
+
declare const adapter_ConsumeBudgetGrantRequest: typeof ConsumeBudgetGrantRequest;
|
|
3388
|
+
declare const adapter_ConsumeBudgetGrantResponse: typeof ConsumeBudgetGrantResponse;
|
|
3389
|
+
declare const adapter_DecisionRequest: typeof DecisionRequest;
|
|
3390
|
+
declare const adapter_DecisionRequest_Inputs: typeof DecisionRequest_Inputs;
|
|
3391
|
+
type adapter_DecisionRequest_Trigger = DecisionRequest_Trigger;
|
|
3392
|
+
declare const adapter_DecisionRequest_Trigger: typeof DecisionRequest_Trigger;
|
|
3393
|
+
declare const adapter_DecisionResponse: typeof DecisionResponse;
|
|
3394
|
+
type adapter_DecisionResponse_Decision = DecisionResponse_Decision;
|
|
3395
|
+
declare const adapter_DecisionResponse_Decision: typeof DecisionResponse_Decision;
|
|
3396
|
+
declare const adapter_DrainSignal: typeof DrainSignal;
|
|
3397
|
+
type adapter_DrainSignal_Phase = DrainSignal_Phase;
|
|
3398
|
+
declare const adapter_DrainSignal_Phase: typeof DrainSignal_Phase;
|
|
3399
|
+
declare const adapter_DrainSubscribeRequest: typeof DrainSubscribeRequest;
|
|
3400
|
+
declare const adapter_HandshakeRequest: typeof HandshakeRequest;
|
|
3401
|
+
type adapter_HandshakeRequest_CapabilityLevel = HandshakeRequest_CapabilityLevel;
|
|
3402
|
+
declare const adapter_HandshakeRequest_CapabilityLevel: typeof HandshakeRequest_CapabilityLevel;
|
|
3403
|
+
declare const adapter_HandshakeResponse: typeof HandshakeResponse;
|
|
3404
|
+
declare const adapter_HandshakeResponse_KeyEpochs: typeof HandshakeResponse_KeyEpochs;
|
|
3405
|
+
declare const adapter_IssueBudgetGrantRequest: typeof IssueBudgetGrantRequest;
|
|
3406
|
+
declare const adapter_IssueBudgetGrantRequest_Scope: typeof IssueBudgetGrantRequest_Scope;
|
|
3407
|
+
declare const adapter_IssueBudgetGrantResponse: typeof IssueBudgetGrantResponse;
|
|
3408
|
+
declare const adapter_LlmCallPostPayload: typeof LlmCallPostPayload;
|
|
3409
|
+
type adapter_LlmCallPostPayload_Outcome = LlmCallPostPayload_Outcome;
|
|
3410
|
+
declare const adapter_LlmCallPostPayload_Outcome: typeof LlmCallPostPayload_Outcome;
|
|
3411
|
+
declare const adapter_PublishOutcomeRequest: typeof PublishOutcomeRequest;
|
|
3412
|
+
type adapter_PublishOutcomeRequest_Outcome = PublishOutcomeRequest_Outcome;
|
|
3413
|
+
declare const adapter_PublishOutcomeRequest_Outcome: typeof PublishOutcomeRequest_Outcome;
|
|
3414
|
+
declare const adapter_PublishOutcomeResponse: typeof PublishOutcomeResponse;
|
|
3415
|
+
declare const adapter_ReleaseReservationRequest: typeof ReleaseReservationRequest;
|
|
3416
|
+
declare const adapter_ReleaseReservationResponse: typeof ReleaseReservationResponse;
|
|
3417
|
+
declare const adapter_ReleaseSessionAccepted: typeof ReleaseSessionAccepted;
|
|
3418
|
+
declare const adapter_ReleaseSessionOutcome: typeof ReleaseSessionOutcome;
|
|
3419
|
+
declare const adapter_ReleaseSessionRequest: typeof ReleaseSessionRequest;
|
|
3420
|
+
declare const adapter_ReserveSessionAccepted: typeof ReserveSessionAccepted;
|
|
3421
|
+
declare const adapter_ReserveSessionDenied: typeof ReserveSessionDenied;
|
|
3422
|
+
declare const adapter_ReserveSessionOutcome: typeof ReserveSessionOutcome;
|
|
3423
|
+
declare const adapter_ReserveSessionRequest: typeof ReserveSessionRequest;
|
|
3424
|
+
declare const adapter_ResumeAfterApprovalDenied: typeof ResumeAfterApprovalDenied;
|
|
3425
|
+
declare const adapter_ResumeAfterApprovalRequest: typeof ResumeAfterApprovalRequest;
|
|
3426
|
+
declare const adapter_ResumeAfterApprovalResponse: typeof ResumeAfterApprovalResponse;
|
|
3427
|
+
declare const adapter_RevokeBudgetGrantRequest: typeof RevokeBudgetGrantRequest;
|
|
3428
|
+
declare const adapter_RevokeBudgetGrantResponse: typeof RevokeBudgetGrantResponse;
|
|
3429
|
+
declare const adapter_RollbackPayload: typeof RollbackPayload;
|
|
3430
|
+
declare const adapter_SidecarAdapter: typeof SidecarAdapter;
|
|
3431
|
+
declare const adapter_TraceEvent: typeof TraceEvent;
|
|
3432
|
+
declare const adapter_TraceEventAck: typeof TraceEventAck;
|
|
3433
|
+
type adapter_TraceEventAck_Status = TraceEventAck_Status;
|
|
3434
|
+
declare const adapter_TraceEventAck_Status: typeof TraceEventAck_Status;
|
|
3435
|
+
type adapter_TraceEvent_EventKind = TraceEvent_EventKind;
|
|
3436
|
+
declare const adapter_TraceEvent_EventKind: typeof TraceEvent_EventKind;
|
|
3437
|
+
declare namespace adapter {
|
|
3438
|
+
export { adapter_ApprovalLifecyclePayload as ApprovalLifecyclePayload, adapter_ApprovalLifecyclePayload_State as ApprovalLifecyclePayload_State, adapter_ClaimEstimate as ClaimEstimate, adapter_CommitSessionDeltaAccepted as CommitSessionDeltaAccepted, adapter_CommitSessionDeltaOutcome as CommitSessionDeltaOutcome, adapter_CommitSessionDeltaRequest as CommitSessionDeltaRequest, adapter_CommitSessionDeltaRequest_Outcome as CommitSessionDeltaRequest_Outcome, adapter_ConsumeBudgetGrantRequest as ConsumeBudgetGrantRequest, adapter_ConsumeBudgetGrantResponse as ConsumeBudgetGrantResponse, adapter_DecisionRequest as DecisionRequest, adapter_DecisionRequest_Inputs as DecisionRequest_Inputs, adapter_DecisionRequest_Trigger as DecisionRequest_Trigger, adapter_DecisionResponse as DecisionResponse, adapter_DecisionResponse_Decision as DecisionResponse_Decision, adapter_DrainSignal as DrainSignal, adapter_DrainSignal_Phase as DrainSignal_Phase, adapter_DrainSubscribeRequest as DrainSubscribeRequest, adapter_HandshakeRequest as HandshakeRequest, adapter_HandshakeRequest_CapabilityLevel as HandshakeRequest_CapabilityLevel, adapter_HandshakeResponse as HandshakeResponse, adapter_HandshakeResponse_KeyEpochs as HandshakeResponse_KeyEpochs, adapter_IssueBudgetGrantRequest as IssueBudgetGrantRequest, adapter_IssueBudgetGrantRequest_Scope as IssueBudgetGrantRequest_Scope, adapter_IssueBudgetGrantResponse as IssueBudgetGrantResponse, adapter_LlmCallPostPayload as LlmCallPostPayload, adapter_LlmCallPostPayload_Outcome as LlmCallPostPayload_Outcome, adapter_PublishOutcomeRequest as PublishOutcomeRequest, adapter_PublishOutcomeRequest_Outcome as PublishOutcomeRequest_Outcome, adapter_PublishOutcomeResponse as PublishOutcomeResponse, adapter_ReleaseReservationRequest as ReleaseReservationRequest, adapter_ReleaseReservationResponse as ReleaseReservationResponse, adapter_ReleaseSessionAccepted as ReleaseSessionAccepted, adapter_ReleaseSessionOutcome as ReleaseSessionOutcome, adapter_ReleaseSessionRequest as ReleaseSessionRequest, adapter_ReserveSessionAccepted as ReserveSessionAccepted, adapter_ReserveSessionDenied as ReserveSessionDenied, adapter_ReserveSessionOutcome as ReserveSessionOutcome, adapter_ReserveSessionRequest as ReserveSessionRequest, adapter_ResumeAfterApprovalDenied as ResumeAfterApprovalDenied, adapter_ResumeAfterApprovalRequest as ResumeAfterApprovalRequest, adapter_ResumeAfterApprovalResponse as ResumeAfterApprovalResponse, adapter_RevokeBudgetGrantRequest as RevokeBudgetGrantRequest, adapter_RevokeBudgetGrantResponse as RevokeBudgetGrantResponse, adapter_RollbackPayload as RollbackPayload, adapter_SidecarAdapter as SidecarAdapter, adapter_TraceEvent as TraceEvent, adapter_TraceEventAck as TraceEventAck, adapter_TraceEventAck_Status as TraceEventAck_Status, adapter_TraceEvent_EventKind as TraceEvent_EventKind };
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
export { CommitSessionDeltaRequest as C, DecisionRequest as D, Error as E, HandshakeRequest as H, IssueBudgetGrantRequest as I, PublishOutcomeRequest as P, ReleaseSessionRequest as R, Timestamp as T, ReserveSessionRequest as a, HandshakeResponse as b, DecisionResponse as c, PublishOutcomeResponse as d, TraceEvent as e, TraceEventAck as f, IssueBudgetGrantResponse as g, RevokeBudgetGrantRequest as h, RevokeBudgetGrantResponse as i, ConsumeBudgetGrantRequest as j, ConsumeBudgetGrantResponse as k, DrainSubscribeRequest as l, DrainSignal as m, ResumeAfterApprovalRequest as n, ResumeAfterApprovalResponse as o, ReleaseReservationRequest as p, ReleaseReservationResponse as q, ReserveSessionOutcome as r, CommitSessionDeltaOutcome as s, ReleaseSessionOutcome as t, adapter as u, common as v };
|