@autohq/cli 0.1.509 → 0.1.510
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-bridge.js +1 -31
- package/dist/index.js +3640 -1812
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -30866,7 +30866,7 @@ Object.assign(lookup, {
|
|
|
30866
30866
|
// package.json
|
|
30867
30867
|
var package_default = {
|
|
30868
30868
|
name: "@autohq/cli",
|
|
30869
|
-
version: "0.1.
|
|
30869
|
+
version: "0.1.510",
|
|
30870
30870
|
license: "SEE LICENSE IN README.md",
|
|
30871
30871
|
publishConfig: {
|
|
30872
30872
|
access: "public"
|
|
@@ -38771,37 +38771,7 @@ var ProjectUsageResponseSchema = external_exports.object({
|
|
|
38771
38771
|
byRequester: external_exports.array(ProjectUsageRequesterSummarySchema),
|
|
38772
38772
|
sharedSessions: external_exports.array(ProjectUsageSharedSessionSchema),
|
|
38773
38773
|
daily: external_exports.array(ProjectUsageDayPointSchema)
|
|
38774
|
-
}).superRefine((usage, context) => {
|
|
38775
|
-
if (!billedCostUsdReconciles(usage.byRequester, usage.totals.billedCostUsd)) {
|
|
38776
|
-
context.addIssue({
|
|
38777
|
-
code: "custom",
|
|
38778
|
-
message: "Requester spend must reconcile to project spend",
|
|
38779
|
-
path: ["byRequester"]
|
|
38780
|
-
});
|
|
38781
|
-
}
|
|
38782
|
-
usage.sharedSessions.forEach((session, index) => {
|
|
38783
|
-
if (!billedCostUsdReconciles(
|
|
38784
|
-
session.requesters,
|
|
38785
|
-
session.totals.billedCostUsd
|
|
38786
|
-
)) {
|
|
38787
|
-
context.addIssue({
|
|
38788
|
-
code: "custom",
|
|
38789
|
-
message: "Requester spend must reconcile to shared-session spend",
|
|
38790
|
-
path: ["sharedSessions", index, "requesters"]
|
|
38791
|
-
});
|
|
38792
|
-
}
|
|
38793
|
-
});
|
|
38794
38774
|
});
|
|
38795
|
-
var USD_RECONCILIATION_TOLERANCE = 1e-8;
|
|
38796
|
-
function billedCostUsdReconciles(rows, expectedTotal) {
|
|
38797
|
-
return Math.abs(sumBilledCostUsd(rows) - roundUsd(expectedTotal)) <= USD_RECONCILIATION_TOLERANCE;
|
|
38798
|
-
}
|
|
38799
|
-
function sumBilledCostUsd(rows) {
|
|
38800
|
-
return roundUsd(rows.reduce((total, row) => total + row.billedCostUsd, 0));
|
|
38801
|
-
}
|
|
38802
|
-
function roundUsd(value2) {
|
|
38803
|
-
return Number(value2.toFixed(10));
|
|
38804
|
-
}
|
|
38805
38775
|
|
|
38806
38776
|
// ../../packages/schemas/src/user-subscriptions.ts
|
|
38807
38777
|
var ATTRIBUTION_COLD_BOUNDARY_IDLE_MS = 5 * 6e4;
|