@agent-finops/core 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/actionPlanner.d.ts +140 -0
- package/dist/actionPlanner.js +938 -0
- package/dist/actionVerification.d.ts +1240 -0
- package/dist/actionVerification.js +1028 -0
- package/dist/activitySnapshot.d.ts +142 -50
- package/dist/activitySnapshot.js +145 -6
- package/dist/activitySnapshotCache.d.ts +8 -1
- package/dist/activitySnapshotCache.js +103 -7
- package/dist/agentDraftToken.d.ts +80 -0
- package/dist/agentDraftToken.js +188 -0
- package/dist/agentEconomicsReceipt.d.ts +74 -74
- package/dist/agentLoopContract.d.ts +27 -0
- package/dist/agentLoopContract.js +36 -0
- package/dist/glance.d.ts +27 -1
- package/dist/glance.js +151 -12
- package/dist/guidedAnswer.d.ts +51 -0
- package/dist/guidedAnswer.js +352 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +13 -1
- package/dist/localAgentFormats/gemini.js +2 -2
- package/dist/localAgentFormats/registry.js +6 -2
- package/dist/localAgentFormats/runtimeRegistry.js +5 -2
- package/dist/localAgentFormats/types.d.ts +2 -1
- package/dist/localAgentLogs.d.ts +362 -3
- package/dist/localAgentLogs.js +1964 -165
- package/dist/modelPricing.d.ts +1 -1
- package/dist/modelPricing.js +1 -1
- package/dist/projectEconomics.d.ts +617 -0
- package/dist/projectEconomics.js +620 -0
- package/dist/projectEconomicsBuilder.d.ts +89 -0
- package/dist/projectEconomicsBuilder.js +473 -0
- package/dist/projectIndexStore.d.ts +545 -0
- package/dist/projectIndexStore.js +606 -0
- package/dist/providerConnectors.d.ts +161 -1
- package/dist/providerConnectors.js +406 -11
- package/dist/qualitativeIndexCache.d.ts +494 -0
- package/dist/qualitativeIndexCache.js +930 -0
- package/dist/resultCard.d.ts +350 -0
- package/dist/resultCard.js +604 -0
- package/dist/runtimeCommands.d.ts +36 -0
- package/dist/runtimeCommands.js +50 -0
- package/dist/scanGuard.d.ts +3 -1
- package/dist/scanGuard.js +164 -4
- package/dist/schema.d.ts +33 -31
- package/dist/schema.js +9 -1
- package/dist/sessionVitals.d.ts +145 -0
- package/dist/sessionVitals.js +521 -0
- package/dist/toolInvocations.d.ts +40 -1
- package/dist/toolInvocations.js +101 -20
- package/package.json +1 -1
|
@@ -41,6 +41,18 @@ export type ActivitySnapshotBuildInput = {
|
|
|
41
41
|
/** Explicit provider-billed overage records; must also be trusted. */
|
|
42
42
|
billedOverageRecordIds?: readonly string[];
|
|
43
43
|
providerCoverage?: readonly ActivitySnapshotProviderCoverageInput[];
|
|
44
|
+
/**
|
|
45
|
+
* C-lane §2.1: provider-billed subscriptions with no local agent (cursor).
|
|
46
|
+
* The builder includes a billed30d amount only when the supplied window is
|
|
47
|
+
* "verified"; anything else is degraded to a missing window (writer-side
|
|
48
|
+
* lock — the renderer re-checks independently).
|
|
49
|
+
*/
|
|
50
|
+
providerSubscriptions?: readonly {
|
|
51
|
+
provider: ActivitySnapshotProvider;
|
|
52
|
+
planLabel: string | null;
|
|
53
|
+
committedUsdPerMonth: number | null;
|
|
54
|
+
billed30d?: ActivitySnapshotBilledWindow;
|
|
55
|
+
}[];
|
|
44
56
|
pricingAsOf?: string;
|
|
45
57
|
/** Deliberately accepts only false; a runtime true is rejected as defense in depth. */
|
|
46
58
|
sampleData?: false;
|
|
@@ -54,9 +66,9 @@ export declare const activitySnapshotApiEquivalentWindowSchema: z.ZodObject<{
|
|
|
54
66
|
missing: "missing";
|
|
55
67
|
}>;
|
|
56
68
|
coverage: z.ZodEnum<{
|
|
69
|
+
missing: "missing";
|
|
57
70
|
complete: "complete";
|
|
58
71
|
partial: "partial";
|
|
59
|
-
missing: "missing";
|
|
60
72
|
}>;
|
|
61
73
|
}, z.core.$strict>;
|
|
62
74
|
export type ActivitySnapshotApiEquivalentWindow = z.infer<typeof activitySnapshotApiEquivalentWindowSchema>;
|
|
@@ -65,13 +77,13 @@ export declare const activitySnapshotBilledWindowSchema: z.ZodObject<{
|
|
|
65
77
|
recordCount: z.ZodNumber;
|
|
66
78
|
basis: z.ZodLiteral<"provider_billed">;
|
|
67
79
|
financialEvidence: z.ZodEnum<{
|
|
68
|
-
missing: "missing";
|
|
69
80
|
verified: "verified";
|
|
81
|
+
missing: "missing";
|
|
70
82
|
}>;
|
|
71
83
|
coverage: z.ZodEnum<{
|
|
84
|
+
missing: "missing";
|
|
72
85
|
complete: "complete";
|
|
73
86
|
partial: "partial";
|
|
74
|
-
missing: "missing";
|
|
75
87
|
}>;
|
|
76
88
|
}, z.core.$strict>;
|
|
77
89
|
export type ActivitySnapshotBilledWindow = z.infer<typeof activitySnapshotBilledWindowSchema>;
|
|
@@ -85,9 +97,9 @@ export declare const activitySnapshotApiEquivalentWindowsSchema: z.ZodObject<{
|
|
|
85
97
|
missing: "missing";
|
|
86
98
|
}>;
|
|
87
99
|
coverage: z.ZodEnum<{
|
|
100
|
+
missing: "missing";
|
|
88
101
|
complete: "complete";
|
|
89
102
|
partial: "partial";
|
|
90
|
-
missing: "missing";
|
|
91
103
|
}>;
|
|
92
104
|
}, z.core.$strict>;
|
|
93
105
|
sevenDays: z.ZodObject<{
|
|
@@ -99,9 +111,9 @@ export declare const activitySnapshotApiEquivalentWindowsSchema: z.ZodObject<{
|
|
|
99
111
|
missing: "missing";
|
|
100
112
|
}>;
|
|
101
113
|
coverage: z.ZodEnum<{
|
|
114
|
+
missing: "missing";
|
|
102
115
|
complete: "complete";
|
|
103
116
|
partial: "partial";
|
|
104
|
-
missing: "missing";
|
|
105
117
|
}>;
|
|
106
118
|
}, z.core.$strict>;
|
|
107
119
|
thirtyDays: z.ZodObject<{
|
|
@@ -113,9 +125,9 @@ export declare const activitySnapshotApiEquivalentWindowsSchema: z.ZodObject<{
|
|
|
113
125
|
missing: "missing";
|
|
114
126
|
}>;
|
|
115
127
|
coverage: z.ZodEnum<{
|
|
128
|
+
missing: "missing";
|
|
116
129
|
complete: "complete";
|
|
117
130
|
partial: "partial";
|
|
118
|
-
missing: "missing";
|
|
119
131
|
}>;
|
|
120
132
|
}, z.core.$strict>;
|
|
121
133
|
}, z.core.$strict>;
|
|
@@ -126,13 +138,13 @@ export declare const activitySnapshotBilledWindowsSchema: z.ZodObject<{
|
|
|
126
138
|
recordCount: z.ZodNumber;
|
|
127
139
|
basis: z.ZodLiteral<"provider_billed">;
|
|
128
140
|
financialEvidence: z.ZodEnum<{
|
|
129
|
-
missing: "missing";
|
|
130
141
|
verified: "verified";
|
|
142
|
+
missing: "missing";
|
|
131
143
|
}>;
|
|
132
144
|
coverage: z.ZodEnum<{
|
|
145
|
+
missing: "missing";
|
|
133
146
|
complete: "complete";
|
|
134
147
|
partial: "partial";
|
|
135
|
-
missing: "missing";
|
|
136
148
|
}>;
|
|
137
149
|
}, z.core.$strict>;
|
|
138
150
|
sevenDays: z.ZodObject<{
|
|
@@ -140,13 +152,13 @@ export declare const activitySnapshotBilledWindowsSchema: z.ZodObject<{
|
|
|
140
152
|
recordCount: z.ZodNumber;
|
|
141
153
|
basis: z.ZodLiteral<"provider_billed">;
|
|
142
154
|
financialEvidence: z.ZodEnum<{
|
|
143
|
-
missing: "missing";
|
|
144
155
|
verified: "verified";
|
|
156
|
+
missing: "missing";
|
|
145
157
|
}>;
|
|
146
158
|
coverage: z.ZodEnum<{
|
|
159
|
+
missing: "missing";
|
|
147
160
|
complete: "complete";
|
|
148
161
|
partial: "partial";
|
|
149
|
-
missing: "missing";
|
|
150
162
|
}>;
|
|
151
163
|
}, z.core.$strict>;
|
|
152
164
|
thirtyDays: z.ZodObject<{
|
|
@@ -154,13 +166,13 @@ export declare const activitySnapshotBilledWindowsSchema: z.ZodObject<{
|
|
|
154
166
|
recordCount: z.ZodNumber;
|
|
155
167
|
basis: z.ZodLiteral<"provider_billed">;
|
|
156
168
|
financialEvidence: z.ZodEnum<{
|
|
157
|
-
missing: "missing";
|
|
158
169
|
verified: "verified";
|
|
170
|
+
missing: "missing";
|
|
159
171
|
}>;
|
|
160
172
|
coverage: z.ZodEnum<{
|
|
173
|
+
missing: "missing";
|
|
161
174
|
complete: "complete";
|
|
162
175
|
partial: "partial";
|
|
163
|
-
missing: "missing";
|
|
164
176
|
}>;
|
|
165
177
|
}, z.core.$strict>;
|
|
166
178
|
}, z.core.$strict>;
|
|
@@ -181,12 +193,13 @@ export declare const activitySnapshotSubscriptionAgentSchema: z.ZodObject<{
|
|
|
181
193
|
agent: z.ZodString & z.ZodType<ActivitySnapshotAgent, string, z.core.$ZodTypeInternals<ActivitySnapshotAgent, string>>;
|
|
182
194
|
billing: z.ZodLiteral<"subscription">;
|
|
183
195
|
planId: z.ZodNullable<z.ZodEnum<{
|
|
184
|
-
"claude-pro": "claude-pro";
|
|
185
|
-
"claude-max-5x": "claude-max-5x";
|
|
186
196
|
"claude-max-20x": "claude-max-20x";
|
|
197
|
+
"claude-max-5x": "claude-max-5x";
|
|
198
|
+
"claude-pro": "claude-pro";
|
|
187
199
|
"chatgpt-plus": "chatgpt-plus";
|
|
188
200
|
"chatgpt-pro": "chatgpt-pro";
|
|
189
201
|
}>>;
|
|
202
|
+
committedUsdPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
190
203
|
apiEquivalent: z.ZodObject<{
|
|
191
204
|
oneDay: z.ZodObject<{
|
|
192
205
|
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
@@ -197,9 +210,9 @@ export declare const activitySnapshotSubscriptionAgentSchema: z.ZodObject<{
|
|
|
197
210
|
missing: "missing";
|
|
198
211
|
}>;
|
|
199
212
|
coverage: z.ZodEnum<{
|
|
213
|
+
missing: "missing";
|
|
200
214
|
complete: "complete";
|
|
201
215
|
partial: "partial";
|
|
202
|
-
missing: "missing";
|
|
203
216
|
}>;
|
|
204
217
|
}, z.core.$strict>;
|
|
205
218
|
sevenDays: z.ZodObject<{
|
|
@@ -211,9 +224,9 @@ export declare const activitySnapshotSubscriptionAgentSchema: z.ZodObject<{
|
|
|
211
224
|
missing: "missing";
|
|
212
225
|
}>;
|
|
213
226
|
coverage: z.ZodEnum<{
|
|
227
|
+
missing: "missing";
|
|
214
228
|
complete: "complete";
|
|
215
229
|
partial: "partial";
|
|
216
|
-
missing: "missing";
|
|
217
230
|
}>;
|
|
218
231
|
}, z.core.$strict>;
|
|
219
232
|
thirtyDays: z.ZodObject<{
|
|
@@ -225,9 +238,9 @@ export declare const activitySnapshotSubscriptionAgentSchema: z.ZodObject<{
|
|
|
225
238
|
missing: "missing";
|
|
226
239
|
}>;
|
|
227
240
|
coverage: z.ZodEnum<{
|
|
241
|
+
missing: "missing";
|
|
228
242
|
complete: "complete";
|
|
229
243
|
partial: "partial";
|
|
230
|
-
missing: "missing";
|
|
231
244
|
}>;
|
|
232
245
|
}, z.core.$strict>;
|
|
233
246
|
}, z.core.$strict>;
|
|
@@ -247,6 +260,47 @@ export declare const activitySnapshotSubscriptionAgentSchema: z.ZodObject<{
|
|
|
247
260
|
}>>;
|
|
248
261
|
}, z.core.$strict>;
|
|
249
262
|
export type ActivitySnapshotSubscriptionAgent = z.infer<typeof activitySnapshotSubscriptionAgentSchema>;
|
|
263
|
+
/**
|
|
264
|
+
* C-lane §2.1: a provider-billed subscription with no local agent (cursor
|
|
265
|
+
* today). The writer includes a billed30d amount ONLY when its financial
|
|
266
|
+
* evidence is "verified"; the renderer independently drops anything else
|
|
267
|
+
* (double lock: estimated/unverified provider dollars can never reach a
|
|
268
|
+
* statusline segment).
|
|
269
|
+
*/
|
|
270
|
+
export declare const activitySnapshotProviderSubscriptionSchema: z.ZodObject<{
|
|
271
|
+
provider: z.ZodEnum<{
|
|
272
|
+
anthropic: "anthropic";
|
|
273
|
+
openai: "openai";
|
|
274
|
+
cursor: "cursor";
|
|
275
|
+
other: "other";
|
|
276
|
+
"github-copilot": "github-copilot";
|
|
277
|
+
}>;
|
|
278
|
+
billing: z.ZodLiteral<"subscription">;
|
|
279
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
280
|
+
committedUsdPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
281
|
+
billed30d: z.ZodObject<{
|
|
282
|
+
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
283
|
+
recordCount: z.ZodNumber;
|
|
284
|
+
basis: z.ZodLiteral<"provider_billed">;
|
|
285
|
+
financialEvidence: z.ZodEnum<{
|
|
286
|
+
verified: "verified";
|
|
287
|
+
missing: "missing";
|
|
288
|
+
}>;
|
|
289
|
+
coverage: z.ZodEnum<{
|
|
290
|
+
missing: "missing";
|
|
291
|
+
complete: "complete";
|
|
292
|
+
partial: "partial";
|
|
293
|
+
}>;
|
|
294
|
+
}, z.core.$strict>;
|
|
295
|
+
}, z.core.$strict>;
|
|
296
|
+
export type ActivitySnapshotProviderSubscription = z.infer<typeof activitySnapshotProviderSubscriptionSchema>;
|
|
297
|
+
/** C-lane §2.1: the committed $/mo total across every detected subscription. */
|
|
298
|
+
export declare const activitySnapshotCommittedTotalSchema: z.ZodObject<{
|
|
299
|
+
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
300
|
+
pricedSubs: z.ZodNumber;
|
|
301
|
+
totalSubs: z.ZodNumber;
|
|
302
|
+
}, z.core.$strict>;
|
|
303
|
+
export type ActivitySnapshotCommittedTotal = z.infer<typeof activitySnapshotCommittedTotalSchema>;
|
|
250
304
|
export declare const activitySnapshotOverageSchema: z.ZodObject<{
|
|
251
305
|
amountUsd: z.ZodNumber;
|
|
252
306
|
currency: z.ZodLiteral<"USD">;
|
|
@@ -276,17 +330,17 @@ export declare const activitySnapshotCoverageSchema: z.ZodObject<{
|
|
|
276
330
|
nonFinancialBytesPrefiltered: z.ZodNumber;
|
|
277
331
|
jsonlValidationCoverage: z.ZodEnum<{
|
|
278
332
|
complete: "complete";
|
|
279
|
-
financial_events_only: "financial_events_only";
|
|
280
333
|
not_reported: "not_reported";
|
|
334
|
+
financial_events_only: "financial_events_only";
|
|
281
335
|
}>;
|
|
282
336
|
}, z.core.$strict>>;
|
|
283
337
|
providers: z.ZodArray<z.ZodObject<{
|
|
284
338
|
provider: z.ZodEnum<{
|
|
285
|
-
openai: "openai";
|
|
286
339
|
anthropic: "anthropic";
|
|
340
|
+
openai: "openai";
|
|
287
341
|
cursor: "cursor";
|
|
288
|
-
"github-copilot": "github-copilot";
|
|
289
342
|
other: "other";
|
|
343
|
+
"github-copilot": "github-copilot";
|
|
290
344
|
}>;
|
|
291
345
|
status: z.ZodEnum<{
|
|
292
346
|
error: "error";
|
|
@@ -320,7 +374,7 @@ export declare const activitySnapshotCoverageSchema: z.ZodObject<{
|
|
|
320
374
|
export type ActivitySnapshotCoverage = z.infer<typeof activitySnapshotCoverageSchema>;
|
|
321
375
|
export declare const activitySnapshotSchema: z.ZodObject<{
|
|
322
376
|
kind: z.ZodLiteral<"aibill.activity_snapshot">;
|
|
323
|
-
schemaVersion: z.ZodLiteral<
|
|
377
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
324
378
|
currency: z.ZodLiteral<"USD">;
|
|
325
379
|
asOf: z.ZodString;
|
|
326
380
|
generatedAt: z.ZodString;
|
|
@@ -331,33 +385,34 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
331
385
|
}, z.core.$strict>, z.ZodObject<{
|
|
332
386
|
status: z.ZodLiteral<"error">;
|
|
333
387
|
errorCode: z.ZodEnum<{
|
|
388
|
+
unknown: "unknown";
|
|
389
|
+
timeout: "timeout";
|
|
334
390
|
scan_failed: "scan_failed";
|
|
335
391
|
source_unreadable: "source_unreadable";
|
|
336
392
|
invalid_evidence: "invalid_evidence";
|
|
337
|
-
timeout: "timeout";
|
|
338
393
|
cache_write_failed: "cache_write_failed";
|
|
339
|
-
unknown: "unknown";
|
|
340
394
|
}>;
|
|
341
395
|
}, z.core.$strict>], "status">;
|
|
342
396
|
mode: z.ZodEnum<{
|
|
343
|
-
|
|
397
|
+
error: "error";
|
|
398
|
+
empty: "empty";
|
|
344
399
|
subscription: "subscription";
|
|
400
|
+
metered: "metered";
|
|
345
401
|
mixed: "mixed";
|
|
346
402
|
unresolved: "unresolved";
|
|
347
|
-
empty: "empty";
|
|
348
|
-
error: "error";
|
|
349
403
|
}>;
|
|
350
404
|
subscription: z.ZodNullable<z.ZodObject<{
|
|
351
405
|
agents: z.ZodArray<z.ZodObject<{
|
|
352
406
|
agent: z.ZodString & z.ZodType<ActivitySnapshotAgent, string, z.core.$ZodTypeInternals<ActivitySnapshotAgent, string>>;
|
|
353
407
|
billing: z.ZodLiteral<"subscription">;
|
|
354
408
|
planId: z.ZodNullable<z.ZodEnum<{
|
|
355
|
-
"claude-pro": "claude-pro";
|
|
356
|
-
"claude-max-5x": "claude-max-5x";
|
|
357
409
|
"claude-max-20x": "claude-max-20x";
|
|
410
|
+
"claude-max-5x": "claude-max-5x";
|
|
411
|
+
"claude-pro": "claude-pro";
|
|
358
412
|
"chatgpt-plus": "chatgpt-plus";
|
|
359
413
|
"chatgpt-pro": "chatgpt-pro";
|
|
360
414
|
}>>;
|
|
415
|
+
committedUsdPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
361
416
|
apiEquivalent: z.ZodObject<{
|
|
362
417
|
oneDay: z.ZodObject<{
|
|
363
418
|
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
@@ -368,9 +423,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
368
423
|
missing: "missing";
|
|
369
424
|
}>;
|
|
370
425
|
coverage: z.ZodEnum<{
|
|
426
|
+
missing: "missing";
|
|
371
427
|
complete: "complete";
|
|
372
428
|
partial: "partial";
|
|
373
|
-
missing: "missing";
|
|
374
429
|
}>;
|
|
375
430
|
}, z.core.$strict>;
|
|
376
431
|
sevenDays: z.ZodObject<{
|
|
@@ -382,9 +437,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
382
437
|
missing: "missing";
|
|
383
438
|
}>;
|
|
384
439
|
coverage: z.ZodEnum<{
|
|
440
|
+
missing: "missing";
|
|
385
441
|
complete: "complete";
|
|
386
442
|
partial: "partial";
|
|
387
|
-
missing: "missing";
|
|
388
443
|
}>;
|
|
389
444
|
}, z.core.$strict>;
|
|
390
445
|
thirtyDays: z.ZodObject<{
|
|
@@ -396,9 +451,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
396
451
|
missing: "missing";
|
|
397
452
|
}>;
|
|
398
453
|
coverage: z.ZodEnum<{
|
|
454
|
+
missing: "missing";
|
|
399
455
|
complete: "complete";
|
|
400
456
|
partial: "partial";
|
|
401
|
-
missing: "missing";
|
|
402
457
|
}>;
|
|
403
458
|
}, z.core.$strict>;
|
|
404
459
|
}, z.core.$strict>;
|
|
@@ -423,9 +478,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
423
478
|
agent: z.ZodString & z.ZodType<ActivitySnapshotAgent, string, z.core.$ZodTypeInternals<ActivitySnapshotAgent, string>>;
|
|
424
479
|
billing: z.ZodLiteral<"api_key">;
|
|
425
480
|
planId: z.ZodNullable<z.ZodEnum<{
|
|
426
|
-
"claude-pro": "claude-pro";
|
|
427
|
-
"claude-max-5x": "claude-max-5x";
|
|
428
481
|
"claude-max-20x": "claude-max-20x";
|
|
482
|
+
"claude-max-5x": "claude-max-5x";
|
|
483
|
+
"claude-pro": "claude-pro";
|
|
429
484
|
"chatgpt-plus": "chatgpt-plus";
|
|
430
485
|
"chatgpt-pro": "chatgpt-pro";
|
|
431
486
|
}>>;
|
|
@@ -440,9 +495,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
440
495
|
missing: "missing";
|
|
441
496
|
}>;
|
|
442
497
|
coverage: z.ZodEnum<{
|
|
498
|
+
missing: "missing";
|
|
443
499
|
complete: "complete";
|
|
444
500
|
partial: "partial";
|
|
445
|
-
missing: "missing";
|
|
446
501
|
}>;
|
|
447
502
|
}, z.core.$strict>;
|
|
448
503
|
sevenDays: z.ZodObject<{
|
|
@@ -454,9 +509,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
454
509
|
missing: "missing";
|
|
455
510
|
}>;
|
|
456
511
|
coverage: z.ZodEnum<{
|
|
512
|
+
missing: "missing";
|
|
457
513
|
complete: "complete";
|
|
458
514
|
partial: "partial";
|
|
459
|
-
missing: "missing";
|
|
460
515
|
}>;
|
|
461
516
|
}, z.core.$strict>;
|
|
462
517
|
thirtyDays: z.ZodObject<{
|
|
@@ -468,9 +523,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
468
523
|
missing: "missing";
|
|
469
524
|
}>;
|
|
470
525
|
coverage: z.ZodEnum<{
|
|
526
|
+
missing: "missing";
|
|
471
527
|
complete: "complete";
|
|
472
528
|
partial: "partial";
|
|
473
|
-
missing: "missing";
|
|
474
529
|
}>;
|
|
475
530
|
}, z.core.$strict>;
|
|
476
531
|
}, z.core.$strict>;
|
|
@@ -480,13 +535,13 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
480
535
|
recordCount: z.ZodNumber;
|
|
481
536
|
basis: z.ZodLiteral<"provider_billed">;
|
|
482
537
|
financialEvidence: z.ZodEnum<{
|
|
483
|
-
missing: "missing";
|
|
484
538
|
verified: "verified";
|
|
539
|
+
missing: "missing";
|
|
485
540
|
}>;
|
|
486
541
|
coverage: z.ZodEnum<{
|
|
542
|
+
missing: "missing";
|
|
487
543
|
complete: "complete";
|
|
488
544
|
partial: "partial";
|
|
489
|
-
missing: "missing";
|
|
490
545
|
}>;
|
|
491
546
|
}, z.core.$strict>;
|
|
492
547
|
sevenDays: z.ZodObject<{
|
|
@@ -494,13 +549,13 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
494
549
|
recordCount: z.ZodNumber;
|
|
495
550
|
basis: z.ZodLiteral<"provider_billed">;
|
|
496
551
|
financialEvidence: z.ZodEnum<{
|
|
497
|
-
missing: "missing";
|
|
498
552
|
verified: "verified";
|
|
553
|
+
missing: "missing";
|
|
499
554
|
}>;
|
|
500
555
|
coverage: z.ZodEnum<{
|
|
556
|
+
missing: "missing";
|
|
501
557
|
complete: "complete";
|
|
502
558
|
partial: "partial";
|
|
503
|
-
missing: "missing";
|
|
504
559
|
}>;
|
|
505
560
|
}, z.core.$strict>;
|
|
506
561
|
thirtyDays: z.ZodObject<{
|
|
@@ -508,13 +563,13 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
508
563
|
recordCount: z.ZodNumber;
|
|
509
564
|
basis: z.ZodLiteral<"provider_billed">;
|
|
510
565
|
financialEvidence: z.ZodEnum<{
|
|
511
|
-
missing: "missing";
|
|
512
566
|
verified: "verified";
|
|
567
|
+
missing: "missing";
|
|
513
568
|
}>;
|
|
514
569
|
coverage: z.ZodEnum<{
|
|
570
|
+
missing: "missing";
|
|
515
571
|
complete: "complete";
|
|
516
572
|
partial: "partial";
|
|
517
|
-
missing: "missing";
|
|
518
573
|
}>;
|
|
519
574
|
}, z.core.$strict>;
|
|
520
575
|
}, z.core.$strict>;
|
|
@@ -524,9 +579,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
524
579
|
agent: z.ZodString & z.ZodType<ActivitySnapshotAgent, string, z.core.$ZodTypeInternals<ActivitySnapshotAgent, string>>;
|
|
525
580
|
billing: z.ZodLiteral<"unknown">;
|
|
526
581
|
planId: z.ZodNullable<z.ZodEnum<{
|
|
527
|
-
"claude-pro": "claude-pro";
|
|
528
|
-
"claude-max-5x": "claude-max-5x";
|
|
529
582
|
"claude-max-20x": "claude-max-20x";
|
|
583
|
+
"claude-max-5x": "claude-max-5x";
|
|
584
|
+
"claude-pro": "claude-pro";
|
|
530
585
|
"chatgpt-plus": "chatgpt-plus";
|
|
531
586
|
"chatgpt-pro": "chatgpt-pro";
|
|
532
587
|
}>>;
|
|
@@ -541,9 +596,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
541
596
|
missing: "missing";
|
|
542
597
|
}>;
|
|
543
598
|
coverage: z.ZodEnum<{
|
|
599
|
+
missing: "missing";
|
|
544
600
|
complete: "complete";
|
|
545
601
|
partial: "partial";
|
|
546
|
-
missing: "missing";
|
|
547
602
|
}>;
|
|
548
603
|
}, z.core.$strict>;
|
|
549
604
|
sevenDays: z.ZodObject<{
|
|
@@ -555,9 +610,9 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
555
610
|
missing: "missing";
|
|
556
611
|
}>;
|
|
557
612
|
coverage: z.ZodEnum<{
|
|
613
|
+
missing: "missing";
|
|
558
614
|
complete: "complete";
|
|
559
615
|
partial: "partial";
|
|
560
|
-
missing: "missing";
|
|
561
616
|
}>;
|
|
562
617
|
}, z.core.$strict>;
|
|
563
618
|
thirtyDays: z.ZodObject<{
|
|
@@ -569,13 +624,44 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
569
624
|
missing: "missing";
|
|
570
625
|
}>;
|
|
571
626
|
coverage: z.ZodEnum<{
|
|
627
|
+
missing: "missing";
|
|
572
628
|
complete: "complete";
|
|
573
629
|
partial: "partial";
|
|
574
|
-
missing: "missing";
|
|
575
630
|
}>;
|
|
576
631
|
}, z.core.$strict>;
|
|
577
632
|
}, z.core.$strict>;
|
|
578
633
|
}, z.core.$strict>>;
|
|
634
|
+
providers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
635
|
+
provider: z.ZodEnum<{
|
|
636
|
+
anthropic: "anthropic";
|
|
637
|
+
openai: "openai";
|
|
638
|
+
cursor: "cursor";
|
|
639
|
+
other: "other";
|
|
640
|
+
"github-copilot": "github-copilot";
|
|
641
|
+
}>;
|
|
642
|
+
billing: z.ZodLiteral<"subscription">;
|
|
643
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
644
|
+
committedUsdPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
645
|
+
billed30d: z.ZodObject<{
|
|
646
|
+
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
647
|
+
recordCount: z.ZodNumber;
|
|
648
|
+
basis: z.ZodLiteral<"provider_billed">;
|
|
649
|
+
financialEvidence: z.ZodEnum<{
|
|
650
|
+
verified: "verified";
|
|
651
|
+
missing: "missing";
|
|
652
|
+
}>;
|
|
653
|
+
coverage: z.ZodEnum<{
|
|
654
|
+
missing: "missing";
|
|
655
|
+
complete: "complete";
|
|
656
|
+
partial: "partial";
|
|
657
|
+
}>;
|
|
658
|
+
}, z.core.$strict>;
|
|
659
|
+
}, z.core.$strict>>>;
|
|
660
|
+
committedTotal: z.ZodObject<{
|
|
661
|
+
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
662
|
+
pricedSubs: z.ZodNumber;
|
|
663
|
+
totalSubs: z.ZodNumber;
|
|
664
|
+
}, z.core.$strict>;
|
|
579
665
|
overage: z.ZodNullable<z.ZodObject<{
|
|
580
666
|
amountUsd: z.ZodNumber;
|
|
581
667
|
currency: z.ZodLiteral<"USD">;
|
|
@@ -604,17 +690,17 @@ export declare const activitySnapshotSchema: z.ZodObject<{
|
|
|
604
690
|
nonFinancialBytesPrefiltered: z.ZodNumber;
|
|
605
691
|
jsonlValidationCoverage: z.ZodEnum<{
|
|
606
692
|
complete: "complete";
|
|
607
|
-
financial_events_only: "financial_events_only";
|
|
608
693
|
not_reported: "not_reported";
|
|
694
|
+
financial_events_only: "financial_events_only";
|
|
609
695
|
}>;
|
|
610
696
|
}, z.core.$strict>>;
|
|
611
697
|
providers: z.ZodArray<z.ZodObject<{
|
|
612
698
|
provider: z.ZodEnum<{
|
|
613
|
-
openai: "openai";
|
|
614
699
|
anthropic: "anthropic";
|
|
700
|
+
openai: "openai";
|
|
615
701
|
cursor: "cursor";
|
|
616
|
-
"github-copilot": "github-copilot";
|
|
617
702
|
other: "other";
|
|
703
|
+
"github-copilot": "github-copilot";
|
|
618
704
|
}>;
|
|
619
705
|
status: z.ZodEnum<{
|
|
620
706
|
error: "error";
|
|
@@ -654,6 +740,12 @@ export type ActivitySnapshot = z.infer<typeof activitySnapshotSchema>;
|
|
|
654
740
|
* IDs already validated by the external connected-state trust receipt.
|
|
655
741
|
*/
|
|
656
742
|
export declare function buildActivitySnapshot(input: ActivitySnapshotBuildInput): ActivitySnapshot;
|
|
743
|
+
/**
|
|
744
|
+
* The v1 dual-write payload (C-lane §2.1 fleet back-compat): today's fields
|
|
745
|
+
* only, so an already-installed v1 runner keeps rendering fresh data instead
|
|
746
|
+
* of decaying into permanent staleness. Exact v1 key set; no v2 fields.
|
|
747
|
+
*/
|
|
748
|
+
export declare function activitySnapshotV1Payload(snapshot: ActivitySnapshot): Record<string, unknown>;
|
|
657
749
|
/** A bounded no-evidence state for an initial failed refresh. */
|
|
658
750
|
export declare function createActivitySnapshotError(attemptedAt: string, errorCode: ActivitySnapshotRefreshErrorCode): ActivitySnapshot;
|
|
659
751
|
//# sourceMappingURL=activitySnapshot.d.ts.map
|