@stigmer/protos 0.3.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/ai/stigmer/agentic/agentexecution/v1/command_connect.js +2 -2
  2. package/ai/stigmer/agentic/agentexecution/v1/command_connect.js.map +1 -1
  3. package/ai/stigmer/agentic/agentexecution/v1/command_pb.d.ts +2 -2
  4. package/ai/stigmer/agentic/agentexecution/v1/command_pb.js +1 -1
  5. package/ai/stigmer/agentic/agentexecution/v1/command_pb.js.map +1 -1
  6. package/ai/stigmer/agentic/agentexecution/v1/enum_pb.d.ts +38 -0
  7. package/ai/stigmer/agentic/agentexecution/v1/enum_pb.js +41 -2
  8. package/ai/stigmer/agentic/agentexecution/v1/enum_pb.js.map +1 -1
  9. package/ai/stigmer/agentic/agentexecution/v1/io_pb.d.ts +167 -58
  10. package/ai/stigmer/agentic/agentexecution/v1/io_pb.js +44 -24
  11. package/ai/stigmer/agentic/agentexecution/v1/io_pb.js.map +1 -1
  12. package/ai/stigmer/agentic/agentexecution/v1/message_pb.d.ts +0 -10
  13. package/ai/stigmer/agentic/agentexecution/v1/message_pb.js +1 -2
  14. package/ai/stigmer/agentic/agentexecution/v1/message_pb.js.map +1 -1
  15. package/ai/stigmer/agentic/agentexecution/v1/query_connect.d.ts +14 -1
  16. package/ai/stigmer/agentic/agentexecution/v1/query_connect.js +15 -2
  17. package/ai/stigmer/agentic/agentexecution/v1/query_connect.js.map +1 -1
  18. package/ai/stigmer/agentic/agentexecution/v1/query_pb.d.ts +14 -2
  19. package/ai/stigmer/agentic/agentexecution/v1/query_pb.js +1 -1
  20. package/ai/stigmer/agentic/agentexecution/v1/query_pb.js.map +1 -1
  21. package/ai/stigmer/agentic/agentexecution/v1/usage_pb.d.ts +701 -262
  22. package/ai/stigmer/agentic/agentexecution/v1/usage_pb.js +271 -9
  23. package/ai/stigmer/agentic/agentexecution/v1/usage_pb.js.map +1 -1
  24. package/ai/stigmer/billing/v1/billing_account_pb.d.ts +245 -0
  25. package/ai/stigmer/billing/v1/billing_account_pb.js +31 -0
  26. package/ai/stigmer/billing/v1/billing_account_pb.js.map +1 -0
  27. package/ai/stigmer/billing/v1/command_connect.d.ts +135 -0
  28. package/ai/stigmer/billing/v1/command_connect.js +144 -0
  29. package/ai/stigmer/billing/v1/command_connect.js.map +1 -0
  30. package/ai/stigmer/billing/v1/command_pb.d.ts +132 -0
  31. package/ai/stigmer/billing/v1/command_pb.js +23 -0
  32. package/ai/stigmer/billing/v1/command_pb.js.map +1 -0
  33. package/ai/stigmer/billing/v1/credit_pb.d.ts +492 -0
  34. package/ai/stigmer/billing/v1/credit_pb.js +47 -0
  35. package/ai/stigmer/billing/v1/credit_pb.js.map +1 -0
  36. package/ai/stigmer/billing/v1/enum_pb.d.ts +318 -0
  37. package/ai/stigmer/billing/v1/enum_pb.js +329 -0
  38. package/ai/stigmer/billing/v1/enum_pb.js.map +1 -0
  39. package/ai/stigmer/billing/v1/io_pb.d.ts +801 -0
  40. package/ai/stigmer/billing/v1/io_pb.js +130 -0
  41. package/ai/stigmer/billing/v1/io_pb.js.map +1 -0
  42. package/ai/stigmer/billing/v1/policy_pb.d.ts +138 -0
  43. package/ai/stigmer/billing/v1/policy_pb.js +20 -0
  44. package/ai/stigmer/billing/v1/policy_pb.js.map +1 -0
  45. package/ai/stigmer/billing/v1/query_connect.d.ts +68 -0
  46. package/ai/stigmer/billing/v1/query_connect.js +76 -0
  47. package/ai/stigmer/billing/v1/query_connect.js.map +1 -0
  48. package/ai/stigmer/billing/v1/query_pb.d.ts +67 -0
  49. package/ai/stigmer/billing/v1/query_pb.js +20 -0
  50. package/ai/stigmer/billing/v1/query_pb.js.map +1 -0
  51. package/ai/stigmer/iam/identityaccount/v1/command_connect.d.ts +9 -9
  52. package/ai/stigmer/iam/identityaccount/v1/command_connect.js +12 -12
  53. package/ai/stigmer/iam/identityaccount/v1/command_connect.js.map +1 -1
  54. package/ai/stigmer/iam/identityaccount/v1/command_pb.d.ts +11 -11
  55. package/ai/stigmer/iam/identityaccount/v1/command_pb.js +1 -1
  56. package/ai/stigmer/iam/identityaccount/v1/command_pb.js.map +1 -1
  57. package/ai/stigmer/iam/v1/enum_pb.d.ts +18 -1
  58. package/ai/stigmer/iam/v1/enum_pb.js +18 -1
  59. package/ai/stigmer/iam/v1/enum_pb.js.map +1 -1
  60. package/package.json +1 -1
@@ -0,0 +1,801 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
2
+ import type { ProxyTiming, TokenUsage, UsageCompletionStatus } from "../../agentic/agentexecution/v1/usage_pb.js";
3
+ import type { CreditLedgerEntry } from "./credit_pb.js";
4
+ import type { LedgerEntryType } from "./enum_pb.js";
5
+ import type { PageInfo } from "../../commons/rpc/pagination_pb.js";
6
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
7
+ import type { Message } from "@bufbuild/protobuf";
8
+ /**
9
+ * Describes the file ai/stigmer/billing/v1/io.proto.
10
+ */
11
+ export declare const file_ai_stigmer_billing_v1_io: GenFile;
12
+ /**
13
+ * GetOrCreateBillingAccountInput initiates billing for an organization.
14
+ * Idempotent: returns the existing account if one already exists.
15
+ *
16
+ * @generated from message ai.stigmer.billing.v1.GetOrCreateBillingAccountInput
17
+ */
18
+ export type GetOrCreateBillingAccountInput = Message<"ai.stigmer.billing.v1.GetOrCreateBillingAccountInput"> & {
19
+ /**
20
+ * @generated from field: string org_id = 1;
21
+ */
22
+ orgId: string;
23
+ };
24
+ /**
25
+ * Describes the message ai.stigmer.billing.v1.GetOrCreateBillingAccountInput.
26
+ * Use `create(GetOrCreateBillingAccountInputSchema)` to create a new message.
27
+ */
28
+ export declare const GetOrCreateBillingAccountInputSchema: GenMessage<GetOrCreateBillingAccountInput>;
29
+ /**
30
+ * AdjustCreditsInput allows platform admins to manually add or remove credits.
31
+ *
32
+ * @generated from message ai.stigmer.billing.v1.AdjustCreditsInput
33
+ */
34
+ export type AdjustCreditsInput = Message<"ai.stigmer.billing.v1.AdjustCreditsInput"> & {
35
+ /**
36
+ * @generated from field: string org_id = 1;
37
+ */
38
+ orgId: string;
39
+ /**
40
+ * Positive to add credits, negative to remove.
41
+ *
42
+ * @generated from field: int64 amount_micros = 2;
43
+ */
44
+ amountMicros: bigint;
45
+ /**
46
+ * Human-readable reason for the adjustment (audit trail).
47
+ *
48
+ * @generated from field: string reason = 3;
49
+ */
50
+ reason: string;
51
+ /**
52
+ * Client-supplied deduplication key to prevent double-processing.
53
+ *
54
+ * @generated from field: string idempotency_key = 4;
55
+ */
56
+ idempotencyKey: string;
57
+ };
58
+ /**
59
+ * Describes the message ai.stigmer.billing.v1.AdjustCreditsInput.
60
+ * Use `create(AdjustCreditsInputSchema)` to create a new message.
61
+ */
62
+ export declare const AdjustCreditsInputSchema: GenMessage<AdjustCreditsInput>;
63
+ /**
64
+ * AuthorizeExecutionInput requests a credit reservation before execution starts.
65
+ *
66
+ * @generated from message ai.stigmer.billing.v1.AuthorizeExecutionInput
67
+ */
68
+ export type AuthorizeExecutionInput = Message<"ai.stigmer.billing.v1.AuthorizeExecutionInput"> & {
69
+ /**
70
+ * @generated from field: string org_id = 1;
71
+ */
72
+ orgId: string;
73
+ /**
74
+ * @generated from field: string execution_id = 2;
75
+ */
76
+ executionId: string;
77
+ /**
78
+ * Execution harness ("native" or "cursor").
79
+ *
80
+ * @generated from field: string harness = 3;
81
+ */
82
+ harness: string;
83
+ /**
84
+ * Expected maximum cost. The system may reserve less if balance is limited.
85
+ *
86
+ * @generated from field: int64 expected_cost_cap_micros = 4;
87
+ */
88
+ expectedCostCapMicros: bigint;
89
+ };
90
+ /**
91
+ * Describes the message ai.stigmer.billing.v1.AuthorizeExecutionInput.
92
+ * Use `create(AuthorizeExecutionInputSchema)` to create a new message.
93
+ */
94
+ export declare const AuthorizeExecutionInputSchema: GenMessage<AuthorizeExecutionInput>;
95
+ /**
96
+ * AuthorizeExecutionResponse indicates whether the execution may proceed.
97
+ *
98
+ * @generated from message ai.stigmer.billing.v1.AuthorizeExecutionResponse
99
+ */
100
+ export type AuthorizeExecutionResponse = Message<"ai.stigmer.billing.v1.AuthorizeExecutionResponse"> & {
101
+ /**
102
+ * Whether the execution is authorized to start.
103
+ *
104
+ * @generated from field: bool authorized = 1;
105
+ */
106
+ authorized: boolean;
107
+ /**
108
+ * Reservation ID for tracking. Empty if authorization was denied.
109
+ *
110
+ * @generated from field: string reservation_id = 2;
111
+ */
112
+ reservationId: string;
113
+ /**
114
+ * Micro-USD actually reserved (may be less than requested).
115
+ *
116
+ * @generated from field: int64 reserved_micros = 3;
117
+ */
118
+ reservedMicros: bigint;
119
+ /**
120
+ * Balance available after the reservation was placed.
121
+ *
122
+ * @generated from field: int64 available_balance_micros = 4;
123
+ */
124
+ availableBalanceMicros: bigint;
125
+ /**
126
+ * Reason for denial, if authorized is false.
127
+ *
128
+ * @generated from field: string denial_reason = 5;
129
+ */
130
+ denialReason: string;
131
+ };
132
+ /**
133
+ * Describes the message ai.stigmer.billing.v1.AuthorizeExecutionResponse.
134
+ * Use `create(AuthorizeExecutionResponseSchema)` to create a new message.
135
+ */
136
+ export declare const AuthorizeExecutionResponseSchema: GenMessage<AuthorizeExecutionResponse>;
137
+ /**
138
+ * RecordLlmCallUsageInput carries proxy-observed data for a single LLM call.
139
+ * The billing service computes cost server-side from the model registry —
140
+ * the caller never provides cost figures.
141
+ *
142
+ * Deduplicated by (execution_id, sequence, metering_source).
143
+ *
144
+ * @generated from message ai.stigmer.billing.v1.RecordLlmCallUsageInput
145
+ */
146
+ export type RecordLlmCallUsageInput = Message<"ai.stigmer.billing.v1.RecordLlmCallUsageInput"> & {
147
+ /**
148
+ * @generated from field: string execution_id = 1;
149
+ */
150
+ executionId: string;
151
+ /**
152
+ * 1-based call ordering within the execution.
153
+ *
154
+ * @generated from field: int32 sequence = 2;
155
+ */
156
+ sequence: number;
157
+ /**
158
+ * Provider identifier (e.g., "openai", "anthropic", "cursor").
159
+ *
160
+ * @generated from field: string provider = 3;
161
+ */
162
+ provider: string;
163
+ /**
164
+ * Model as reported by the provider in the response.
165
+ *
166
+ * @generated from field: string resolved_model = 4;
167
+ */
168
+ resolvedModel: string;
169
+ /**
170
+ * Model as requested by the caller (may differ from resolved_model for aliases).
171
+ *
172
+ * @generated from field: string requested_model = 5;
173
+ */
174
+ requestedModel: string;
175
+ /**
176
+ * Token usage extracted from the provider's SSE stream.
177
+ *
178
+ * @generated from field: ai.stigmer.agentic.agentexecution.v1.TokenUsage tokens = 6;
179
+ */
180
+ tokens?: TokenUsage;
181
+ /**
182
+ * Status of usage extraction.
183
+ *
184
+ * @generated from field: ai.stigmer.agentic.agentexecution.v1.UsageCompletionStatus usage_status = 7;
185
+ */
186
+ usageStatus: UsageCompletionStatus;
187
+ /**
188
+ * Provider request ID from response headers.
189
+ *
190
+ * @generated from field: string provider_request_id = 8;
191
+ */
192
+ providerRequestId: string;
193
+ /**
194
+ * HTTP status code from the upstream provider.
195
+ *
196
+ * @generated from field: int32 http_status_code = 9;
197
+ */
198
+ httpStatusCode: number;
199
+ /**
200
+ * Whether the response was streamed (SSE).
201
+ *
202
+ * @generated from field: bool streaming = 10;
203
+ */
204
+ streaming: boolean;
205
+ /**
206
+ * Provider's finish reason (e.g., "end_turn", "stop").
207
+ *
208
+ * @generated from field: string finish_reason = 11;
209
+ */
210
+ finishReason: string;
211
+ /**
212
+ * Proxy-observed timing for this call.
213
+ *
214
+ * @generated from field: ai.stigmer.agentic.agentexecution.v1.ProxyTiming proxy_timing = 12;
215
+ */
216
+ proxyTiming?: ProxyTiming;
217
+ /**
218
+ * Raw provider usage JSON for audit/debug.
219
+ *
220
+ * @generated from field: string provider_usage_json = 13;
221
+ */
222
+ providerUsageJson: string;
223
+ };
224
+ /**
225
+ * Describes the message ai.stigmer.billing.v1.RecordLlmCallUsageInput.
226
+ * Use `create(RecordLlmCallUsageInputSchema)` to create a new message.
227
+ */
228
+ export declare const RecordLlmCallUsageInputSchema: GenMessage<RecordLlmCallUsageInput>;
229
+ /**
230
+ * RecordLlmCallUsageResponse returns the cost result so callers can
231
+ * observe what was recorded without querying separately.
232
+ *
233
+ * @generated from message ai.stigmer.billing.v1.RecordLlmCallUsageResponse
234
+ */
235
+ export type RecordLlmCallUsageResponse = Message<"ai.stigmer.billing.v1.RecordLlmCallUsageResponse"> & {
236
+ /**
237
+ * ID of the created LlmCallUsageRecord.
238
+ *
239
+ * @generated from field: string usage_record_id = 1;
240
+ */
241
+ usageRecordId: string;
242
+ /**
243
+ * Provider cost computed server-side from the model registry.
244
+ *
245
+ * @generated from field: int64 provider_cost_micros = 2;
246
+ */
247
+ providerCostMicros: bigint;
248
+ /**
249
+ * Amount debited from customer credits (after markup policy).
250
+ *
251
+ * @generated from field: int64 customer_billable_amount_micros = 3;
252
+ */
253
+ customerBillableAmountMicros: bigint;
254
+ /**
255
+ * Whether this call was billable (complete usage + non-zero cost).
256
+ *
257
+ * @generated from field: bool is_billable = 4;
258
+ */
259
+ isBillable: boolean;
260
+ /**
261
+ * True if this was a duplicate (idempotency key already existed).
262
+ *
263
+ * @generated from field: bool is_duplicate = 5;
264
+ */
265
+ isDuplicate: boolean;
266
+ };
267
+ /**
268
+ * Describes the message ai.stigmer.billing.v1.RecordLlmCallUsageResponse.
269
+ * Use `create(RecordLlmCallUsageResponseSchema)` to create a new message.
270
+ */
271
+ export declare const RecordLlmCallUsageResponseSchema: GenMessage<RecordLlmCallUsageResponse>;
272
+ /**
273
+ * FinalizeExecutionInput settles the billing for a completed execution.
274
+ * Releases unused reservation credits and produces the final billing record.
275
+ *
276
+ * @generated from message ai.stigmer.billing.v1.FinalizeExecutionInput
277
+ */
278
+ export type FinalizeExecutionInput = Message<"ai.stigmer.billing.v1.FinalizeExecutionInput"> & {
279
+ /**
280
+ * @generated from field: string execution_id = 1;
281
+ */
282
+ executionId: string;
283
+ };
284
+ /**
285
+ * Describes the message ai.stigmer.billing.v1.FinalizeExecutionInput.
286
+ * Use `create(FinalizeExecutionInputSchema)` to create a new message.
287
+ */
288
+ export declare const FinalizeExecutionInputSchema: GenMessage<FinalizeExecutionInput>;
289
+ /**
290
+ * FinalizeExecutionResponse summarizes the execution's billing outcome.
291
+ *
292
+ * @generated from message ai.stigmer.billing.v1.FinalizeExecutionResponse
293
+ */
294
+ export type FinalizeExecutionResponse = Message<"ai.stigmer.billing.v1.FinalizeExecutionResponse"> & {
295
+ /**
296
+ * Total provider cost across all LLM calls in the execution.
297
+ *
298
+ * @generated from field: int64 total_provider_cost_micros = 1;
299
+ */
300
+ totalProviderCostMicros: bigint;
301
+ /**
302
+ * Total amount charged to the customer across all LLM calls.
303
+ *
304
+ * @generated from field: int64 total_billable_amount_micros = 2;
305
+ */
306
+ totalBillableAmountMicros: bigint;
307
+ /**
308
+ * Micro-USD released back to available balance from the reservation.
309
+ *
310
+ * @generated from field: int64 released_reservation_micros = 3;
311
+ */
312
+ releasedReservationMicros: bigint;
313
+ /**
314
+ * Number of LLM calls billed in this execution.
315
+ *
316
+ * @generated from field: int32 billed_call_count = 4;
317
+ */
318
+ billedCallCount: number;
319
+ };
320
+ /**
321
+ * Describes the message ai.stigmer.billing.v1.FinalizeExecutionResponse.
322
+ * Use `create(FinalizeExecutionResponseSchema)` to create a new message.
323
+ */
324
+ export declare const FinalizeExecutionResponseSchema: GenMessage<FinalizeExecutionResponse>;
325
+ /**
326
+ * CreateCreditCheckoutSessionInput initiates a Stripe Checkout purchase
327
+ * for a credit pack.
328
+ *
329
+ * The server creates a Stripe Checkout Session and returns the URL for
330
+ * the client to redirect the user. The caller's email is resolved from
331
+ * their identity account for Stripe Customer creation.
332
+ *
333
+ * @generated from message ai.stigmer.billing.v1.CreateCreditCheckoutSessionInput
334
+ */
335
+ export type CreateCreditCheckoutSessionInput = Message<"ai.stigmer.billing.v1.CreateCreditCheckoutSessionInput"> & {
336
+ /**
337
+ * @generated from field: string org_id = 1;
338
+ */
339
+ orgId: string;
340
+ /**
341
+ * Credit pack to purchase (e.g., "starter", "growth", "team").
342
+ *
343
+ * @generated from field: string pack_id = 2;
344
+ */
345
+ packId: string;
346
+ /**
347
+ * URL to redirect to after successful payment.
348
+ *
349
+ * @generated from field: string success_url = 3;
350
+ */
351
+ successUrl: string;
352
+ /**
353
+ * URL to redirect to if the user cancels checkout.
354
+ *
355
+ * @generated from field: string cancel_url = 4;
356
+ */
357
+ cancelUrl: string;
358
+ };
359
+ /**
360
+ * Describes the message ai.stigmer.billing.v1.CreateCreditCheckoutSessionInput.
361
+ * Use `create(CreateCreditCheckoutSessionInputSchema)` to create a new message.
362
+ */
363
+ export declare const CreateCreditCheckoutSessionInputSchema: GenMessage<CreateCreditCheckoutSessionInput>;
364
+ /**
365
+ * CreateCreditCheckoutSessionResponse returns the Stripe Checkout URL
366
+ * and purchase tracking identifiers.
367
+ *
368
+ * @generated from message ai.stigmer.billing.v1.CreateCreditCheckoutSessionResponse
369
+ */
370
+ export type CreateCreditCheckoutSessionResponse = Message<"ai.stigmer.billing.v1.CreateCreditCheckoutSessionResponse"> & {
371
+ /**
372
+ * Stripe-hosted checkout page URL. Redirect the user here.
373
+ *
374
+ * @generated from field: string checkout_url = 1;
375
+ */
376
+ checkoutUrl: string;
377
+ /**
378
+ * Internal purchase ID for tracking this transaction.
379
+ *
380
+ * @generated from field: string purchase_id = 2;
381
+ */
382
+ purchaseId: string;
383
+ /**
384
+ * Stripe Checkout Session ID.
385
+ *
386
+ * @generated from field: string checkout_session_id = 3;
387
+ */
388
+ checkoutSessionId: string;
389
+ };
390
+ /**
391
+ * Describes the message ai.stigmer.billing.v1.CreateCreditCheckoutSessionResponse.
392
+ * Use `create(CreateCreditCheckoutSessionResponseSchema)` to create a new message.
393
+ */
394
+ export declare const CreateCreditCheckoutSessionResponseSchema: GenMessage<CreateCreditCheckoutSessionResponse>;
395
+ /**
396
+ * CreateBillingPortalSessionInput opens a Stripe Customer Portal session
397
+ * for payment method management.
398
+ *
399
+ * The portal allows the user to add, update, or remove payment methods
400
+ * without leaving the Stigmer billing flow. The return_url controls where
401
+ * Stripe redirects after the user finishes.
402
+ *
403
+ * @generated from message ai.stigmer.billing.v1.CreateBillingPortalSessionInput
404
+ */
405
+ export type CreateBillingPortalSessionInput = Message<"ai.stigmer.billing.v1.CreateBillingPortalSessionInput"> & {
406
+ /**
407
+ * @generated from field: string org_id = 1;
408
+ */
409
+ orgId: string;
410
+ /**
411
+ * URL to redirect to after the user exits the Stripe Customer Portal.
412
+ *
413
+ * @generated from field: string return_url = 2;
414
+ */
415
+ returnUrl: string;
416
+ };
417
+ /**
418
+ * Describes the message ai.stigmer.billing.v1.CreateBillingPortalSessionInput.
419
+ * Use `create(CreateBillingPortalSessionInputSchema)` to create a new message.
420
+ */
421
+ export declare const CreateBillingPortalSessionInputSchema: GenMessage<CreateBillingPortalSessionInput>;
422
+ /**
423
+ * CreateBillingPortalSessionResponse returns the Stripe-hosted Portal URL.
424
+ *
425
+ * @generated from message ai.stigmer.billing.v1.CreateBillingPortalSessionResponse
426
+ */
427
+ export type CreateBillingPortalSessionResponse = Message<"ai.stigmer.billing.v1.CreateBillingPortalSessionResponse"> & {
428
+ /**
429
+ * Stripe Customer Portal URL. Redirect the user here.
430
+ *
431
+ * @generated from field: string portal_url = 1;
432
+ */
433
+ portalUrl: string;
434
+ };
435
+ /**
436
+ * Describes the message ai.stigmer.billing.v1.CreateBillingPortalSessionResponse.
437
+ * Use `create(CreateBillingPortalSessionResponseSchema)` to create a new message.
438
+ */
439
+ export declare const CreateBillingPortalSessionResponseSchema: GenMessage<CreateBillingPortalSessionResponse>;
440
+ /**
441
+ * SetAutoRechargeConfigInput configures automatic credit top-up for an org.
442
+ *
443
+ * When enabled, the billing system charges the account's saved payment
444
+ * method whenever the available balance drops below threshold_micros.
445
+ * The charge amount is fixed per event (recharge_amount_micros), capped
446
+ * at monthly_cap_micros per calendar month.
447
+ *
448
+ * Enabling requires an active account with a saved payment method.
449
+ * Disabling preserves the configuration for easy re-enablement.
450
+ *
451
+ * @generated from message ai.stigmer.billing.v1.SetAutoRechargeConfigInput
452
+ */
453
+ export type SetAutoRechargeConfigInput = Message<"ai.stigmer.billing.v1.SetAutoRechargeConfigInput"> & {
454
+ /**
455
+ * @generated from field: string org_id = 1;
456
+ */
457
+ orgId: string;
458
+ /**
459
+ * Whether to enable auto-recharge.
460
+ *
461
+ * @generated from field: bool enabled = 2;
462
+ */
463
+ enabled: boolean;
464
+ /**
465
+ * Trigger recharge when available balance drops below this amount.
466
+ *
467
+ * @generated from field: int64 threshold_micros = 3;
468
+ */
469
+ thresholdMicros: bigint;
470
+ /**
471
+ * Fixed amount to charge per recharge event.
472
+ *
473
+ * @generated from field: int64 recharge_amount_micros = 4;
474
+ */
475
+ rechargeAmountMicros: bigint;
476
+ /**
477
+ * Maximum total auto-recharge spend per calendar month.
478
+ *
479
+ * @generated from field: int64 monthly_cap_micros = 5;
480
+ */
481
+ monthlyCapMicros: bigint;
482
+ };
483
+ /**
484
+ * Describes the message ai.stigmer.billing.v1.SetAutoRechargeConfigInput.
485
+ * Use `create(SetAutoRechargeConfigInputSchema)` to create a new message.
486
+ */
487
+ export declare const SetAutoRechargeConfigInputSchema: GenMessage<SetAutoRechargeConfigInput>;
488
+ /**
489
+ * GetBillingAccountInput retrieves the billing account for an organization.
490
+ *
491
+ * @generated from message ai.stigmer.billing.v1.GetBillingAccountInput
492
+ */
493
+ export type GetBillingAccountInput = Message<"ai.stigmer.billing.v1.GetBillingAccountInput"> & {
494
+ /**
495
+ * @generated from field: string org_id = 1;
496
+ */
497
+ orgId: string;
498
+ };
499
+ /**
500
+ * Describes the message ai.stigmer.billing.v1.GetBillingAccountInput.
501
+ * Use `create(GetBillingAccountInputSchema)` to create a new message.
502
+ */
503
+ export declare const GetBillingAccountInputSchema: GenMessage<GetBillingAccountInput>;
504
+ /**
505
+ * GetCreditBalanceInput retrieves just the balance breakdown.
506
+ *
507
+ * @generated from message ai.stigmer.billing.v1.GetCreditBalanceInput
508
+ */
509
+ export type GetCreditBalanceInput = Message<"ai.stigmer.billing.v1.GetCreditBalanceInput"> & {
510
+ /**
511
+ * @generated from field: string org_id = 1;
512
+ */
513
+ orgId: string;
514
+ };
515
+ /**
516
+ * Describes the message ai.stigmer.billing.v1.GetCreditBalanceInput.
517
+ * Use `create(GetCreditBalanceInputSchema)` to create a new message.
518
+ */
519
+ export declare const GetCreditBalanceInputSchema: GenMessage<GetCreditBalanceInput>;
520
+ /**
521
+ * GetCreditLedgerInput retrieves paginated ledger entries with optional filters.
522
+ *
523
+ * @generated from message ai.stigmer.billing.v1.GetCreditLedgerInput
524
+ */
525
+ export type GetCreditLedgerInput = Message<"ai.stigmer.billing.v1.GetCreditLedgerInput"> & {
526
+ /**
527
+ * @generated from field: string org_id = 1;
528
+ */
529
+ orgId: string;
530
+ /**
531
+ * Pagination parameters.
532
+ *
533
+ * @generated from field: ai.stigmer.commons.rpc.PageInfo page = 2;
534
+ */
535
+ page?: PageInfo;
536
+ /**
537
+ * Filter to specific entry types. Empty means all types.
538
+ *
539
+ * @generated from field: repeated ai.stigmer.billing.v1.LedgerEntryType type_filter = 3;
540
+ */
541
+ typeFilter: LedgerEntryType[];
542
+ /**
543
+ * Filter to entries on or after this timestamp.
544
+ *
545
+ * @generated from field: google.protobuf.Timestamp start_time = 4;
546
+ */
547
+ startTime?: Timestamp;
548
+ /**
549
+ * Filter to entries on or before this timestamp.
550
+ *
551
+ * @generated from field: google.protobuf.Timestamp end_time = 5;
552
+ */
553
+ endTime?: Timestamp;
554
+ };
555
+ /**
556
+ * Describes the message ai.stigmer.billing.v1.GetCreditLedgerInput.
557
+ * Use `create(GetCreditLedgerInputSchema)` to create a new message.
558
+ */
559
+ export declare const GetCreditLedgerInputSchema: GenMessage<GetCreditLedgerInput>;
560
+ /**
561
+ * CreditLedgerResponse is a paginated list of ledger entries.
562
+ *
563
+ * @generated from message ai.stigmer.billing.v1.CreditLedgerResponse
564
+ */
565
+ export type CreditLedgerResponse = Message<"ai.stigmer.billing.v1.CreditLedgerResponse"> & {
566
+ /**
567
+ * @generated from field: repeated ai.stigmer.billing.v1.CreditLedgerEntry entries = 1;
568
+ */
569
+ entries: CreditLedgerEntry[];
570
+ /**
571
+ * @generated from field: int32 total_pages = 2;
572
+ */
573
+ totalPages: number;
574
+ };
575
+ /**
576
+ * Describes the message ai.stigmer.billing.v1.CreditLedgerResponse.
577
+ * Use `create(CreditLedgerResponseSchema)` to create a new message.
578
+ */
579
+ export declare const CreditLedgerResponseSchema: GenMessage<CreditLedgerResponse>;
580
+ /**
581
+ * GetBillingUsageReportInput requests an aggregated billing usage report.
582
+ *
583
+ * @generated from message ai.stigmer.billing.v1.GetBillingUsageReportInput
584
+ */
585
+ export type GetBillingUsageReportInput = Message<"ai.stigmer.billing.v1.GetBillingUsageReportInput"> & {
586
+ /**
587
+ * @generated from field: string org_id = 1;
588
+ */
589
+ orgId: string;
590
+ /**
591
+ * Start of the reporting period.
592
+ *
593
+ * @generated from field: google.protobuf.Timestamp start_time = 2;
594
+ */
595
+ startTime?: Timestamp;
596
+ /**
597
+ * End of the reporting period.
598
+ *
599
+ * @generated from field: google.protobuf.Timestamp end_time = 3;
600
+ */
601
+ endTime?: Timestamp;
602
+ };
603
+ /**
604
+ * Describes the message ai.stigmer.billing.v1.GetBillingUsageReportInput.
605
+ * Use `create(GetBillingUsageReportInputSchema)` to create a new message.
606
+ */
607
+ export declare const GetBillingUsageReportInputSchema: GenMessage<GetBillingUsageReportInput>;
608
+ /**
609
+ * BillingUsageReportResponse provides aggregated spend data for the period.
610
+ *
611
+ * @generated from message ai.stigmer.billing.v1.BillingUsageReportResponse
612
+ */
613
+ export type BillingUsageReportResponse = Message<"ai.stigmer.billing.v1.BillingUsageReportResponse"> & {
614
+ /**
615
+ * Total provider cost in the period.
616
+ *
617
+ * @generated from field: int64 total_provider_cost_micros = 1;
618
+ */
619
+ totalProviderCostMicros: bigint;
620
+ /**
621
+ * Total amount billed to the customer in the period.
622
+ *
623
+ * @generated from field: int64 total_billable_amount_micros = 2;
624
+ */
625
+ totalBillableAmountMicros: bigint;
626
+ /**
627
+ * Number of executions in the period.
628
+ *
629
+ * @generated from field: int32 execution_count = 3;
630
+ */
631
+ executionCount: number;
632
+ /**
633
+ * Number of LLM calls in the period.
634
+ *
635
+ * @generated from field: int32 llm_call_count = 4;
636
+ */
637
+ llmCallCount: number;
638
+ /**
639
+ * Breakdown by model.
640
+ *
641
+ * @generated from field: repeated ai.stigmer.billing.v1.ModelBillingBreakdown model_breakdown = 5;
642
+ */
643
+ modelBreakdown: ModelBillingBreakdown[];
644
+ };
645
+ /**
646
+ * Describes the message ai.stigmer.billing.v1.BillingUsageReportResponse.
647
+ * Use `create(BillingUsageReportResponseSchema)` to create a new message.
648
+ */
649
+ export declare const BillingUsageReportResponseSchema: GenMessage<BillingUsageReportResponse>;
650
+ /**
651
+ * ModelBillingBreakdown aggregates billing data for a single model.
652
+ *
653
+ * @generated from message ai.stigmer.billing.v1.ModelBillingBreakdown
654
+ */
655
+ export type ModelBillingBreakdown = Message<"ai.stigmer.billing.v1.ModelBillingBreakdown"> & {
656
+ /**
657
+ * @generated from field: string model = 1;
658
+ */
659
+ model: string;
660
+ /**
661
+ * @generated from field: string harness = 2;
662
+ */
663
+ harness: string;
664
+ /**
665
+ * @generated from field: string cost_tier = 3;
666
+ */
667
+ costTier: string;
668
+ /**
669
+ * @generated from field: int64 provider_cost_micros = 4;
670
+ */
671
+ providerCostMicros: bigint;
672
+ /**
673
+ * @generated from field: int64 billable_amount_micros = 5;
674
+ */
675
+ billableAmountMicros: bigint;
676
+ /**
677
+ * @generated from field: int32 call_count = 6;
678
+ */
679
+ callCount: number;
680
+ };
681
+ /**
682
+ * Describes the message ai.stigmer.billing.v1.ModelBillingBreakdown.
683
+ * Use `create(ModelBillingBreakdownSchema)` to create a new message.
684
+ */
685
+ export declare const ModelBillingBreakdownSchema: GenMessage<ModelBillingBreakdown>;
686
+ /**
687
+ * GetCustomerModelPricingInput requests the customer-facing price list.
688
+ *
689
+ * @generated from message ai.stigmer.billing.v1.GetCustomerModelPricingInput
690
+ */
691
+ export type GetCustomerModelPricingInput = Message<"ai.stigmer.billing.v1.GetCustomerModelPricingInput"> & {
692
+ /**
693
+ * Organization ID. Used to resolve org-specific policy overrides.
694
+ * When empty, returns default pricing.
695
+ *
696
+ * @generated from field: string org_id = 1;
697
+ */
698
+ orgId: string;
699
+ };
700
+ /**
701
+ * Describes the message ai.stigmer.billing.v1.GetCustomerModelPricingInput.
702
+ * Use `create(GetCustomerModelPricingInputSchema)` to create a new message.
703
+ */
704
+ export declare const GetCustomerModelPricingInputSchema: GenMessage<GetCustomerModelPricingInput>;
705
+ /**
706
+ * CustomerModelPricingResponse returns the customer-visible price for each model.
707
+ *
708
+ * @generated from message ai.stigmer.billing.v1.CustomerModelPricingResponse
709
+ */
710
+ export type CustomerModelPricingResponse = Message<"ai.stigmer.billing.v1.CustomerModelPricingResponse"> & {
711
+ /**
712
+ * @generated from field: repeated ai.stigmer.billing.v1.CustomerModelPricingEntry entries = 1;
713
+ */
714
+ entries: CustomerModelPricingEntry[];
715
+ };
716
+ /**
717
+ * Describes the message ai.stigmer.billing.v1.CustomerModelPricingResponse.
718
+ * Use `create(CustomerModelPricingResponseSchema)` to create a new message.
719
+ */
720
+ export declare const CustomerModelPricingResponseSchema: GenMessage<CustomerModelPricingResponse>;
721
+ /**
722
+ * CustomerModelPricingEntry is the customer-facing price for one model.
723
+ *
724
+ * Prices are in micro-USD per million tokens, with markup already applied.
725
+ * These are what the customer pays, not what Stigmer pays the provider.
726
+ *
727
+ * @generated from message ai.stigmer.billing.v1.CustomerModelPricingEntry
728
+ */
729
+ export type CustomerModelPricingEntry = Message<"ai.stigmer.billing.v1.CustomerModelPricingEntry"> & {
730
+ /**
731
+ * Model identifier matching model-registry.json.
732
+ *
733
+ * @generated from field: string model_id = 1;
734
+ */
735
+ modelId: string;
736
+ /**
737
+ * Human-readable model name.
738
+ *
739
+ * @generated from field: string display_name = 2;
740
+ */
741
+ displayName: string;
742
+ /**
743
+ * LLM provider (e.g., "anthropic", "openai").
744
+ *
745
+ * @generated from field: string provider = 3;
746
+ */
747
+ provider: string;
748
+ /**
749
+ * Execution harness ("native" or "cursor").
750
+ *
751
+ * @generated from field: string harness = 4;
752
+ */
753
+ harness: string;
754
+ /**
755
+ * Model cost tier ("economy", "standard", "premium").
756
+ *
757
+ * @generated from field: string cost_tier = 5;
758
+ */
759
+ costTier: string;
760
+ /**
761
+ * Customer price per million input tokens, in micro-USD.
762
+ *
763
+ * @generated from field: int64 input_price_micros_per_million = 6;
764
+ */
765
+ inputPriceMicrosPerMillion: bigint;
766
+ /**
767
+ * Customer price per million output tokens, in micro-USD.
768
+ *
769
+ * @generated from field: int64 output_price_micros_per_million = 7;
770
+ */
771
+ outputPriceMicrosPerMillion: bigint;
772
+ /**
773
+ * Customer price per million cache write tokens, in micro-USD.
774
+ *
775
+ * @generated from field: int64 cache_creation_price_micros_per_million = 8;
776
+ */
777
+ cacheCreationPriceMicrosPerMillion: bigint;
778
+ /**
779
+ * Customer price per million cache read tokens, in micro-USD.
780
+ *
781
+ * @generated from field: int64 cache_read_price_micros_per_million = 9;
782
+ */
783
+ cacheReadPriceMicrosPerMillion: bigint;
784
+ /**
785
+ * Billing policy that produced these prices.
786
+ *
787
+ * @generated from field: string pricing_policy_id = 10;
788
+ */
789
+ pricingPolicyId: string;
790
+ /**
791
+ * Markup applied, in basis points.
792
+ *
793
+ * @generated from field: int32 markup_basis_points = 11;
794
+ */
795
+ markupBasisPoints: number;
796
+ };
797
+ /**
798
+ * Describes the message ai.stigmer.billing.v1.CustomerModelPricingEntry.
799
+ * Use `create(CustomerModelPricingEntrySchema)` to create a new message.
800
+ */
801
+ export declare const CustomerModelPricingEntrySchema: GenMessage<CustomerModelPricingEntry>;