@autohq/cli 0.1.379 → 0.1.380
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 +31 -4
- package/dist/index.js +32 -5
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23492,7 +23492,7 @@ Object.assign(lookup, {
|
|
|
23492
23492
|
// package.json
|
|
23493
23493
|
var package_default = {
|
|
23494
23494
|
name: "@autohq/cli",
|
|
23495
|
-
version: "0.1.
|
|
23495
|
+
version: "0.1.380",
|
|
23496
23496
|
license: "SEE LICENSE IN README.md",
|
|
23497
23497
|
publishConfig: {
|
|
23498
23498
|
access: "public"
|
|
@@ -28123,6 +28123,10 @@ var CreditEventTypeSchema = external_exports.enum(CREDIT_EVENT_TYPES);
|
|
|
28123
28123
|
var UsdAmountSchema = external_exports.number().finite();
|
|
28124
28124
|
var NonNegativeUsdSchema = external_exports.number().finite().nonnegative();
|
|
28125
28125
|
var PositiveUsdSchema = external_exports.number().finite().positive();
|
|
28126
|
+
var MIN_CREDIT_PURCHASE_USD = 5;
|
|
28127
|
+
var MAX_CREDIT_PURCHASE_USD = 1e4;
|
|
28128
|
+
var wholeCents = (value2) => Math.abs(value2 * 100 - Math.round(value2 * 100)) < 1e-6;
|
|
28129
|
+
var ChargeableUsdSchema = PositiveUsdSchema.min(MIN_CREDIT_PURCHASE_USD).max(MAX_CREDIT_PURCHASE_USD).refine(wholeCents, "amount must be a whole number of cents");
|
|
28126
28130
|
var CreditEventSchema = external_exports.object({
|
|
28127
28131
|
organizationId: OrganizationIdSchema,
|
|
28128
28132
|
type: CreditEventTypeSchema,
|
|
@@ -28130,7 +28134,11 @@ var CreditEventSchema = external_exports.object({
|
|
|
28130
28134
|
description: external_exports.string().trim().min(1).nullable().default(null),
|
|
28131
28135
|
// The acting user for manual purchases/adjustments; null for system-issued
|
|
28132
28136
|
// rows (signup grants, auto-top-ups).
|
|
28133
|
-
createdByUserId: external_exports.string().trim().min(1).nullable().default(null)
|
|
28137
|
+
createdByUserId: external_exports.string().trim().min(1).nullable().default(null),
|
|
28138
|
+
// External payment reference (e.g. a Stripe payment intent id). Unique in
|
|
28139
|
+
// the ledger, so payment-driven mints are idempotent: a webhook retry or a
|
|
28140
|
+
// sync-plus-webhook race inserts once and no-ops after.
|
|
28141
|
+
externalRef: external_exports.string().trim().min(1).nullable().default(null)
|
|
28134
28142
|
}).refine(
|
|
28135
28143
|
(event) => event.type === "adjustment" || event.amountUsd > 0,
|
|
28136
28144
|
"Only adjustment credit events may carry a non-positive amount"
|
|
@@ -28142,6 +28150,7 @@ var CreditEventRecordSchema = external_exports.object({
|
|
|
28142
28150
|
amountUsd: UsdAmountSchema,
|
|
28143
28151
|
description: external_exports.string().trim().min(1).nullable(),
|
|
28144
28152
|
createdByUserId: external_exports.string().trim().min(1).nullable(),
|
|
28153
|
+
externalRef: external_exports.string().trim().min(1).nullable(),
|
|
28145
28154
|
createdAt: external_exports.string().datetime()
|
|
28146
28155
|
});
|
|
28147
28156
|
var SPENDING_LIMIT_WINDOWS = ["day", "month"];
|
|
@@ -28159,14 +28168,24 @@ var OrganizationBillingSettingsSchema = external_exports.object({
|
|
|
28159
28168
|
// Balance at or below the threshold triggers a top-up of the configured
|
|
28160
28169
|
// amount. Both must be set for auto-top-up to arm.
|
|
28161
28170
|
autoTopUpThresholdUsd: NonNegativeUsdSchema.nullable(),
|
|
28162
|
-
autoTopUpAmountUsd: PositiveUsdSchema.nullable()
|
|
28171
|
+
autoTopUpAmountUsd: PositiveUsdSchema.nullable(),
|
|
28172
|
+
// Stripe linkage, set by the payment flow (never by the settings PATCH):
|
|
28173
|
+
// the org's Stripe customer, and the saved card auto-top-up charges
|
|
28174
|
+
// off-session. A non-null payment method is what "card on file" means.
|
|
28175
|
+
stripeCustomerId: external_exports.string().trim().min(1).nullable(),
|
|
28176
|
+
stripeDefaultPaymentMethodId: external_exports.string().trim().min(1).nullable()
|
|
28163
28177
|
});
|
|
28164
28178
|
var UpdateOrganizationBillingSettingsRequestSchema = external_exports.object({
|
|
28165
28179
|
spendLimitDayUsd: PositiveUsdSchema.nullable().optional(),
|
|
28166
28180
|
spendLimitMonthUsd: PositiveUsdSchema.nullable().optional(),
|
|
28167
28181
|
autoTopUpEnabled: external_exports.boolean().optional(),
|
|
28168
28182
|
autoTopUpThresholdUsd: NonNegativeUsdSchema.nullable().optional(),
|
|
28169
|
-
|
|
28183
|
+
// The top-up amount is charged to a real card, so it carries the same
|
|
28184
|
+
// bounds as a purchase: whole cents (Stripe charges integer cents; a
|
|
28185
|
+
// fractional-cent amount would make the charge and the mint disagree
|
|
28186
|
+
// forever) and the purchase floor/cap (Stripe rejects sub-$0.50 charges,
|
|
28187
|
+
// which would otherwise disarm auto-top-up on first trigger).
|
|
28188
|
+
autoTopUpAmountUsd: ChargeableUsdSchema.nullable().optional()
|
|
28170
28189
|
}).strict();
|
|
28171
28190
|
var OrganizationCreditsResponseSchema = external_exports.object({
|
|
28172
28191
|
organizationId: OrganizationIdSchema,
|
|
@@ -28179,6 +28198,14 @@ var AddOrganizationCreditsRequestSchema = external_exports.object({
|
|
|
28179
28198
|
amountUsd: PositiveUsdSchema.max(1e4),
|
|
28180
28199
|
description: external_exports.string().trim().min(1).max(500).optional()
|
|
28181
28200
|
}).strict();
|
|
28201
|
+
var ReturnPathSchema = external_exports.string().trim().min(1).max(2e3).regex(/^\/(?!\/)/, "returnPath must be an absolute in-app path");
|
|
28202
|
+
var CreateCreditPurchaseRequestSchema = external_exports.object({
|
|
28203
|
+
amountUsd: ChargeableUsdSchema,
|
|
28204
|
+
returnPath: ReturnPathSchema
|
|
28205
|
+
}).strict();
|
|
28206
|
+
var CreateBillingPortalSessionRequestSchema = external_exports.object({
|
|
28207
|
+
returnPath: ReturnPathSchema
|
|
28208
|
+
}).strict();
|
|
28182
28209
|
|
|
28183
28210
|
// ../../packages/schemas/src/pricing.ts
|
|
28184
28211
|
var RATE_CARD_2026_06_23 = {
|
package/dist/index.js
CHANGED
|
@@ -19729,7 +19729,7 @@ var init_organization_settings = __esm({
|
|
|
19729
19729
|
});
|
|
19730
19730
|
|
|
19731
19731
|
// ../../packages/schemas/src/billing.ts
|
|
19732
|
-
var FEE_CARD_2026_07_06, BILLING_FEE_CARDS, CURRENT_BILLING_FEE_VERSION, CREDIT_EVENT_TYPES, CreditEventTypeSchema, UsdAmountSchema, NonNegativeUsdSchema, PositiveUsdSchema, CreditEventSchema, CreditEventRecordSchema, SPENDING_LIMIT_WINDOWS, SpendingLimitWindowSchema, BilledSpendWindowsSchema, OrganizationBillingSettingsSchema, UpdateOrganizationBillingSettingsRequestSchema, OrganizationCreditsResponseSchema, AddOrganizationCreditsRequestSchema;
|
|
19732
|
+
var FEE_CARD_2026_07_06, BILLING_FEE_CARDS, CURRENT_BILLING_FEE_VERSION, CREDIT_EVENT_TYPES, CreditEventTypeSchema, UsdAmountSchema, NonNegativeUsdSchema, PositiveUsdSchema, MIN_CREDIT_PURCHASE_USD, MAX_CREDIT_PURCHASE_USD, wholeCents, ChargeableUsdSchema, CreditEventSchema, CreditEventRecordSchema, SPENDING_LIMIT_WINDOWS, SpendingLimitWindowSchema, BilledSpendWindowsSchema, OrganizationBillingSettingsSchema, UpdateOrganizationBillingSettingsRequestSchema, OrganizationCreditsResponseSchema, AddOrganizationCreditsRequestSchema, ReturnPathSchema, CreateCreditPurchaseRequestSchema, CreateBillingPortalSessionRequestSchema;
|
|
19733
19733
|
var init_billing = __esm({
|
|
19734
19734
|
"../../packages/schemas/src/billing.ts"() {
|
|
19735
19735
|
"use strict";
|
|
@@ -19754,6 +19754,10 @@ var init_billing = __esm({
|
|
|
19754
19754
|
UsdAmountSchema = external_exports.number().finite();
|
|
19755
19755
|
NonNegativeUsdSchema = external_exports.number().finite().nonnegative();
|
|
19756
19756
|
PositiveUsdSchema = external_exports.number().finite().positive();
|
|
19757
|
+
MIN_CREDIT_PURCHASE_USD = 5;
|
|
19758
|
+
MAX_CREDIT_PURCHASE_USD = 1e4;
|
|
19759
|
+
wholeCents = (value) => Math.abs(value * 100 - Math.round(value * 100)) < 1e-6;
|
|
19760
|
+
ChargeableUsdSchema = PositiveUsdSchema.min(MIN_CREDIT_PURCHASE_USD).max(MAX_CREDIT_PURCHASE_USD).refine(wholeCents, "amount must be a whole number of cents");
|
|
19757
19761
|
CreditEventSchema = external_exports.object({
|
|
19758
19762
|
organizationId: OrganizationIdSchema,
|
|
19759
19763
|
type: CreditEventTypeSchema,
|
|
@@ -19761,7 +19765,11 @@ var init_billing = __esm({
|
|
|
19761
19765
|
description: external_exports.string().trim().min(1).nullable().default(null),
|
|
19762
19766
|
// The acting user for manual purchases/adjustments; null for system-issued
|
|
19763
19767
|
// rows (signup grants, auto-top-ups).
|
|
19764
|
-
createdByUserId: external_exports.string().trim().min(1).nullable().default(null)
|
|
19768
|
+
createdByUserId: external_exports.string().trim().min(1).nullable().default(null),
|
|
19769
|
+
// External payment reference (e.g. a Stripe payment intent id). Unique in
|
|
19770
|
+
// the ledger, so payment-driven mints are idempotent: a webhook retry or a
|
|
19771
|
+
// sync-plus-webhook race inserts once and no-ops after.
|
|
19772
|
+
externalRef: external_exports.string().trim().min(1).nullable().default(null)
|
|
19765
19773
|
}).refine(
|
|
19766
19774
|
(event) => event.type === "adjustment" || event.amountUsd > 0,
|
|
19767
19775
|
"Only adjustment credit events may carry a non-positive amount"
|
|
@@ -19773,6 +19781,7 @@ var init_billing = __esm({
|
|
|
19773
19781
|
amountUsd: UsdAmountSchema,
|
|
19774
19782
|
description: external_exports.string().trim().min(1).nullable(),
|
|
19775
19783
|
createdByUserId: external_exports.string().trim().min(1).nullable(),
|
|
19784
|
+
externalRef: external_exports.string().trim().min(1).nullable(),
|
|
19776
19785
|
createdAt: external_exports.string().datetime()
|
|
19777
19786
|
});
|
|
19778
19787
|
SPENDING_LIMIT_WINDOWS = ["day", "month"];
|
|
@@ -19790,14 +19799,24 @@ var init_billing = __esm({
|
|
|
19790
19799
|
// Balance at or below the threshold triggers a top-up of the configured
|
|
19791
19800
|
// amount. Both must be set for auto-top-up to arm.
|
|
19792
19801
|
autoTopUpThresholdUsd: NonNegativeUsdSchema.nullable(),
|
|
19793
|
-
autoTopUpAmountUsd: PositiveUsdSchema.nullable()
|
|
19802
|
+
autoTopUpAmountUsd: PositiveUsdSchema.nullable(),
|
|
19803
|
+
// Stripe linkage, set by the payment flow (never by the settings PATCH):
|
|
19804
|
+
// the org's Stripe customer, and the saved card auto-top-up charges
|
|
19805
|
+
// off-session. A non-null payment method is what "card on file" means.
|
|
19806
|
+
stripeCustomerId: external_exports.string().trim().min(1).nullable(),
|
|
19807
|
+
stripeDefaultPaymentMethodId: external_exports.string().trim().min(1).nullable()
|
|
19794
19808
|
});
|
|
19795
19809
|
UpdateOrganizationBillingSettingsRequestSchema = external_exports.object({
|
|
19796
19810
|
spendLimitDayUsd: PositiveUsdSchema.nullable().optional(),
|
|
19797
19811
|
spendLimitMonthUsd: PositiveUsdSchema.nullable().optional(),
|
|
19798
19812
|
autoTopUpEnabled: external_exports.boolean().optional(),
|
|
19799
19813
|
autoTopUpThresholdUsd: NonNegativeUsdSchema.nullable().optional(),
|
|
19800
|
-
|
|
19814
|
+
// The top-up amount is charged to a real card, so it carries the same
|
|
19815
|
+
// bounds as a purchase: whole cents (Stripe charges integer cents; a
|
|
19816
|
+
// fractional-cent amount would make the charge and the mint disagree
|
|
19817
|
+
// forever) and the purchase floor/cap (Stripe rejects sub-$0.50 charges,
|
|
19818
|
+
// which would otherwise disarm auto-top-up on first trigger).
|
|
19819
|
+
autoTopUpAmountUsd: ChargeableUsdSchema.nullable().optional()
|
|
19801
19820
|
}).strict();
|
|
19802
19821
|
OrganizationCreditsResponseSchema = external_exports.object({
|
|
19803
19822
|
organizationId: OrganizationIdSchema,
|
|
@@ -19810,6 +19829,14 @@ var init_billing = __esm({
|
|
|
19810
19829
|
amountUsd: PositiveUsdSchema.max(1e4),
|
|
19811
19830
|
description: external_exports.string().trim().min(1).max(500).optional()
|
|
19812
19831
|
}).strict();
|
|
19832
|
+
ReturnPathSchema = external_exports.string().trim().min(1).max(2e3).regex(/^\/(?!\/)/, "returnPath must be an absolute in-app path");
|
|
19833
|
+
CreateCreditPurchaseRequestSchema = external_exports.object({
|
|
19834
|
+
amountUsd: ChargeableUsdSchema,
|
|
19835
|
+
returnPath: ReturnPathSchema
|
|
19836
|
+
}).strict();
|
|
19837
|
+
CreateBillingPortalSessionRequestSchema = external_exports.object({
|
|
19838
|
+
returnPath: ReturnPathSchema
|
|
19839
|
+
}).strict();
|
|
19813
19840
|
}
|
|
19814
19841
|
});
|
|
19815
19842
|
|
|
@@ -32618,7 +32645,7 @@ var init_package = __esm({
|
|
|
32618
32645
|
"package.json"() {
|
|
32619
32646
|
package_default = {
|
|
32620
32647
|
name: "@autohq/cli",
|
|
32621
|
-
version: "0.1.
|
|
32648
|
+
version: "0.1.380",
|
|
32622
32649
|
license: "SEE LICENSE IN README.md",
|
|
32623
32650
|
publishConfig: {
|
|
32624
32651
|
access: "public"
|