@indigoai-us/hq-cloud 6.15.4 → 6.15.6

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 (150) hide show
  1. package/dist/cli/push-scan-exclusions.test.d.ts +2 -0
  2. package/dist/cli/push-scan-exclusions.test.d.ts.map +1 -0
  3. package/dist/cli/push-scan-exclusions.test.js +87 -0
  4. package/dist/cli/push-scan-exclusions.test.js.map +1 -0
  5. package/dist/cli/rescue-exec-bit-preserve.test.js +8 -0
  6. package/dist/cli/rescue-exec-bit-preserve.test.js.map +1 -1
  7. package/dist/cli/share.d.ts.map +1 -1
  8. package/dist/cli/share.js +21 -1
  9. package/dist/cli/share.js.map +1 -1
  10. package/dist/cli/share.test.js +82 -0
  11. package/dist/cli/share.test.js.map +1 -1
  12. package/dist/cli/sync.d.ts +23 -0
  13. package/dist/cli/sync.d.ts.map +1 -1
  14. package/dist/cli/sync.js +9 -0
  15. package/dist/cli/sync.js.map +1 -1
  16. package/dist/lib/net-errors.d.ts.map +1 -1
  17. package/dist/lib/net-errors.js +4 -0
  18. package/dist/lib/net-errors.js.map +1 -1
  19. package/dist/machine-auth.test.js +7 -1
  20. package/dist/machine-auth.test.js.map +1 -1
  21. package/dist/object-io.d.ts +21 -0
  22. package/dist/object-io.d.ts.map +1 -1
  23. package/dist/object-io.js +229 -77
  24. package/dist/object-io.js.map +1 -1
  25. package/dist/object-io.test.js +211 -1
  26. package/dist/object-io.test.js.map +1 -1
  27. package/dist/outposts/billing.d.ts +41 -0
  28. package/dist/outposts/billing.d.ts.map +1 -0
  29. package/dist/outposts/billing.js +53 -0
  30. package/dist/outposts/billing.js.map +1 -0
  31. package/dist/outposts/cli-billing.d.ts +59 -0
  32. package/dist/outposts/cli-billing.d.ts.map +1 -0
  33. package/dist/outposts/cli-billing.js +93 -0
  34. package/dist/outposts/cli-billing.js.map +1 -0
  35. package/dist/outposts/cli.d.ts +13 -0
  36. package/dist/outposts/cli.d.ts.map +1 -0
  37. package/dist/outposts/cli.js +13 -0
  38. package/dist/outposts/cli.js.map +1 -0
  39. package/dist/outposts/client.d.ts +140 -0
  40. package/dist/outposts/client.d.ts.map +1 -0
  41. package/dist/outposts/client.js +271 -0
  42. package/dist/outposts/client.js.map +1 -0
  43. package/dist/outposts/client.test.d.ts +9 -0
  44. package/dist/outposts/client.test.d.ts.map +1 -0
  45. package/dist/outposts/client.test.js +226 -0
  46. package/dist/outposts/client.test.js.map +1 -0
  47. package/dist/outposts/command.d.ts +74 -0
  48. package/dist/outposts/command.d.ts.map +1 -0
  49. package/dist/outposts/command.js +661 -0
  50. package/dist/outposts/command.js.map +1 -0
  51. package/dist/outposts/command.test.d.ts +18 -0
  52. package/dist/outposts/command.test.d.ts.map +1 -0
  53. package/dist/outposts/command.test.js +933 -0
  54. package/dist/outposts/command.test.js.map +1 -0
  55. package/dist/outposts/errors.d.ts +32 -0
  56. package/dist/outposts/errors.d.ts.map +1 -0
  57. package/dist/outposts/errors.js +72 -0
  58. package/dist/outposts/errors.js.map +1 -0
  59. package/dist/outposts/heartbeat-command.d.ts +106 -0
  60. package/dist/outposts/heartbeat-command.d.ts.map +1 -0
  61. package/dist/outposts/heartbeat-command.js +186 -0
  62. package/dist/outposts/heartbeat-command.js.map +1 -0
  63. package/dist/outposts/host-deps.d.ts +49 -0
  64. package/dist/outposts/host-deps.d.ts.map +1 -0
  65. package/dist/outposts/host-deps.js +93 -0
  66. package/dist/outposts/host-deps.js.map +1 -0
  67. package/dist/outposts/index.d.ts +36 -0
  68. package/dist/outposts/index.d.ts.map +1 -0
  69. package/dist/outposts/index.js +32 -0
  70. package/dist/outposts/index.js.map +1 -0
  71. package/dist/outposts/node.d.ts +23 -0
  72. package/dist/outposts/node.d.ts.map +1 -0
  73. package/dist/outposts/node.js +22 -0
  74. package/dist/outposts/node.js.map +1 -0
  75. package/dist/outposts/remote-command.d.ts +30 -0
  76. package/dist/outposts/remote-command.d.ts.map +1 -0
  77. package/dist/outposts/remote-command.js +39 -0
  78. package/dist/outposts/remote-command.js.map +1 -0
  79. package/dist/outposts/replica-sync.d.ts +40 -0
  80. package/dist/outposts/replica-sync.d.ts.map +1 -0
  81. package/dist/outposts/replica-sync.js +188 -0
  82. package/dist/outposts/replica-sync.js.map +1 -0
  83. package/dist/outposts/replica-sync.test.d.ts +2 -0
  84. package/dist/outposts/replica-sync.test.d.ts.map +1 -0
  85. package/dist/outposts/replica-sync.test.js +224 -0
  86. package/dist/outposts/replica-sync.test.js.map +1 -0
  87. package/dist/outposts/self-deploy.d.ts +47 -0
  88. package/dist/outposts/self-deploy.d.ts.map +1 -0
  89. package/dist/outposts/self-deploy.js +188 -0
  90. package/dist/outposts/self-deploy.js.map +1 -0
  91. package/dist/outposts/self-deploy.test.d.ts +2 -0
  92. package/dist/outposts/self-deploy.test.d.ts.map +1 -0
  93. package/dist/outposts/self-deploy.test.js +186 -0
  94. package/dist/outposts/self-deploy.test.js.map +1 -0
  95. package/dist/outposts/session-heartbeat-bounds.test.d.ts +25 -0
  96. package/dist/outposts/session-heartbeat-bounds.test.d.ts.map +1 -0
  97. package/dist/outposts/session-heartbeat-bounds.test.js +156 -0
  98. package/dist/outposts/session-heartbeat-bounds.test.js.map +1 -0
  99. package/dist/outposts/session-heartbeat-guard.test.d.ts +16 -0
  100. package/dist/outposts/session-heartbeat-guard.test.d.ts.map +1 -0
  101. package/dist/outposts/session-heartbeat-guard.test.js +88 -0
  102. package/dist/outposts/session-heartbeat-guard.test.js.map +1 -0
  103. package/dist/outposts/session-heartbeat-publisher.d.ts +76 -0
  104. package/dist/outposts/session-heartbeat-publisher.d.ts.map +1 -0
  105. package/dist/outposts/session-heartbeat-publisher.js +117 -0
  106. package/dist/outposts/session-heartbeat-publisher.js.map +1 -0
  107. package/dist/outposts/session-heartbeat-publisher.test.d.ts +10 -0
  108. package/dist/outposts/session-heartbeat-publisher.test.d.ts.map +1 -0
  109. package/dist/outposts/session-heartbeat-publisher.test.js +153 -0
  110. package/dist/outposts/session-heartbeat-publisher.test.js.map +1 -0
  111. package/dist/outposts/session-heartbeat-retain-guard.test.d.ts +18 -0
  112. package/dist/outposts/session-heartbeat-retain-guard.test.d.ts.map +1 -0
  113. package/dist/outposts/session-heartbeat-retain-guard.test.js +106 -0
  114. package/dist/outposts/session-heartbeat-retain-guard.test.js.map +1 -0
  115. package/dist/outposts/session-heartbeat.d.ts +210 -0
  116. package/dist/outposts/session-heartbeat.d.ts.map +1 -0
  117. package/dist/outposts/session-heartbeat.js +657 -0
  118. package/dist/outposts/session-heartbeat.js.map +1 -0
  119. package/dist/outposts/session-heartbeat.test.d.ts +11 -0
  120. package/dist/outposts/session-heartbeat.test.d.ts.map +1 -0
  121. package/dist/outposts/session-heartbeat.test.js +370 -0
  122. package/dist/outposts/session-heartbeat.test.js.map +1 -0
  123. package/dist/outposts/ssh.d.ts +29 -0
  124. package/dist/outposts/ssh.d.ts.map +1 -0
  125. package/dist/outposts/ssh.js +66 -0
  126. package/dist/outposts/ssh.js.map +1 -0
  127. package/dist/outposts/transport.d.ts +76 -0
  128. package/dist/outposts/transport.d.ts.map +1 -0
  129. package/dist/outposts/transport.js +91 -0
  130. package/dist/outposts/transport.js.map +1 -0
  131. package/dist/outposts/transport.test.d.ts +10 -0
  132. package/dist/outposts/transport.test.d.ts.map +1 -0
  133. package/dist/outposts/transport.test.js +116 -0
  134. package/dist/outposts/transport.test.js.map +1 -0
  135. package/dist/outposts/types.d.ts +125 -0
  136. package/dist/outposts/types.d.ts.map +1 -0
  137. package/dist/outposts/types.js +13 -0
  138. package/dist/outposts/types.js.map +1 -0
  139. package/dist/personal-vault.d.ts +69 -0
  140. package/dist/personal-vault.d.ts.map +1 -1
  141. package/dist/personal-vault.js +100 -0
  142. package/dist/personal-vault.js.map +1 -1
  143. package/dist/personal-vault.test.js +140 -1
  144. package/dist/personal-vault.test.js.map +1 -1
  145. package/dist/s3.d.ts.map +1 -1
  146. package/dist/s3.js +62 -0
  147. package/dist/s3.js.map +1 -1
  148. package/dist/s3.test.js +126 -0
  149. package/dist/s3.test.js.map +1 -1
  150. package/package.json +39 -3
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Billing gate for paid provisioning — the portable half.
3
+ *
4
+ * hq-pro enforces billing server-side: a provision call for a resource whose
5
+ * payer has no usable card returns `402` with a `billing` payload carrying a
6
+ * `setup` action that names EXACTLY which checkout endpoint to hit. That endpoint
7
+ * returns `{ url }` — a Stripe-hosted card-capture link.
8
+ *
9
+ * This module holds the parts with no terminal in them: the prices, the
10
+ * formatter, and the link mint. The prose that talks to a human (confirm a
11
+ * charge, explain a decline) lives in `./cli-billing.ts`, so a Next.js consumer
12
+ * can render the same facts in its own UI without inheriting `chalk` or
13
+ * `process.exit`.
14
+ *
15
+ * Prices mirror hq-console's authoritative constants (`src/lib/billing-pricing.ts`):
16
+ * amounts are in the smallest currency unit (US cents) to match Stripe's wire shape.
17
+ */
18
+ import type { OutpostTokenSource } from "./client.js";
19
+ import type { OutpostTransport } from "./transport.js";
20
+ import type { BillingSetupAction } from "./types.js";
21
+ /** Per-Agent monthly list price, in cents ($100.00 / agent / month). */
22
+ export declare const AGENT_PRICE_CENTS = 10000;
23
+ /** Per-Outpost monthly list price, in cents ($80.00 / Outpost / month). */
24
+ export declare const OUTPOST_PRICE_CENTS = 8000;
25
+ /** A resource whose provisioning incurs a recurring charge. */
26
+ export type PaidResource = "agent" | "Outpost";
27
+ /** Render a cents amount as a `$X.YZ` USD string. */
28
+ export declare function formatUsd(cents: number): string;
29
+ /**
30
+ * Mint a Stripe-hosted card-capture link for a {@link BillingSetupAction}.
31
+ * Returns the hosted URL the payer opens to add or replace a card.
32
+ *
33
+ * Throws on a non-2xx — the caller decides how to surface it. Never swallows.
34
+ */
35
+ export declare function mintPaymentLink(options: {
36
+ transport: OutpostTransport;
37
+ token: OutpostTokenSource;
38
+ setup: BillingSetupAction;
39
+ baseUrl?: string;
40
+ }): Promise<string>;
41
+ //# sourceMappingURL=billing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/outposts/billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AAEzC,+DAA+D;AAC/D,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/C,qDAAqD;AACrD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BlB"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Billing gate for paid provisioning — the portable half.
3
+ *
4
+ * hq-pro enforces billing server-side: a provision call for a resource whose
5
+ * payer has no usable card returns `402` with a `billing` payload carrying a
6
+ * `setup` action that names EXACTLY which checkout endpoint to hit. That endpoint
7
+ * returns `{ url }` — a Stripe-hosted card-capture link.
8
+ *
9
+ * This module holds the parts with no terminal in them: the prices, the
10
+ * formatter, and the link mint. The prose that talks to a human (confirm a
11
+ * charge, explain a decline) lives in `./cli-billing.ts`, so a Next.js consumer
12
+ * can render the same facts in its own UI without inheriting `chalk` or
13
+ * `process.exit`.
14
+ *
15
+ * Prices mirror hq-console's authoritative constants (`src/lib/billing-pricing.ts`):
16
+ * amounts are in the smallest currency unit (US cents) to match Stripe's wire shape.
17
+ */
18
+ /** Per-Agent monthly list price, in cents ($100.00 / agent / month). */
19
+ export const AGENT_PRICE_CENTS = 10_000;
20
+ /** Per-Outpost monthly list price, in cents ($80.00 / Outpost / month). */
21
+ export const OUTPOST_PRICE_CENTS = 8_000;
22
+ /** Render a cents amount as a `$X.YZ` USD string. */
23
+ export function formatUsd(cents) {
24
+ return `$${(Math.max(0, Math.round(cents)) / 100).toFixed(2)}`;
25
+ }
26
+ /**
27
+ * Mint a Stripe-hosted card-capture link for a {@link BillingSetupAction}.
28
+ * Returns the hosted URL the payer opens to add or replace a card.
29
+ *
30
+ * Throws on a non-2xx — the caller decides how to surface it. Never swallows.
31
+ */
32
+ export async function mintPaymentLink(options) {
33
+ const token = typeof options.token === "function" ? await options.token() : options.token;
34
+ const res = await options.transport({
35
+ token,
36
+ path: options.setup.path,
37
+ method: "POST",
38
+ body: options.setup.body?.companyUid
39
+ ? { companyUid: options.setup.body.companyUid }
40
+ : {},
41
+ ...(options.baseUrl ? { baseUrl: options.baseUrl } : {}),
42
+ });
43
+ if (!res.ok) {
44
+ const body = (await res.json().catch(() => ({})));
45
+ throw new Error(`Failed to mint a payment link: ${body.error ?? body.message ?? res.statusText}`);
46
+ }
47
+ const data = (await res.json());
48
+ if (!data.url) {
49
+ throw new Error("Payment link response did not include a checkout URL.");
50
+ }
51
+ return data.url;
52
+ }
53
+ //# sourceMappingURL=billing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/outposts/billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,wEAAwE;AACxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACxC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAKzC,qDAAqD;AACrD,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,IAAI,CAAC,IAAI,CA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AAC;QACd,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC;AAClB,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Terminal-facing half of the billing gate: the prose that talks to a human.
3
+ *
4
+ * Split from `./billing.ts` so a Next.js consumer can use the prices, the
5
+ * formatter, and the link mint without inheriting `chalk` or `process.exit`.
6
+ *
7
+ * Everything here is full prose rather than terse status output — a recurring
8
+ * charge and a declined card are exactly the moments where more words are the
9
+ * right call.
10
+ */
11
+ import { type PaidResource } from "./billing.js";
12
+ import type { OutpostTokenSource } from "./client.js";
13
+ import type { OutpostTransport } from "./transport.js";
14
+ import type { BillingErrorPayload } from "./types.js";
15
+ /**
16
+ * Gate a paid provisioning call behind an explicit, informed `--yes`.
17
+ *
18
+ * Prints the monthly charge in full and exits non-zero when the caller has not
19
+ * passed `--yes`. Returns normally once approved so the caller proceeds.
20
+ */
21
+ export declare function confirmChargeOrExit(opts: {
22
+ resource: PaidResource;
23
+ unitCents: number;
24
+ quantity?: number;
25
+ yes?: boolean;
26
+ }): void;
27
+ /** The transport + token pair every billing surface needs to mint a link. */
28
+ export interface BillingSurfaceContext {
29
+ transport: OutpostTransport;
30
+ token: OutpostTokenSource;
31
+ baseUrl?: string;
32
+ }
33
+ /**
34
+ * The provision was blocked because the payer has no card on file.
35
+ *
36
+ * Mints the card-capture link the backend pointed us at and prints a plain,
37
+ * shareable message so the user can add a card — or hand the link to whoever owns
38
+ * billing — and re-run. Returns the URL, or `null` when the server gave no `setup`
39
+ * action to act on. Never prints tokens or secrets.
40
+ */
41
+ export declare function surfaceBillingRequired(ctx: BillingSurfaceContext, billing: BillingErrorPayload): Promise<string | null>;
42
+ /**
43
+ * Status-aware surface for a 402 billing block.
44
+ *
45
+ * hq-pro's envelope carries two distinct remediations that must never be
46
+ * conflated (mirroring the server's own classification):
47
+ *
48
+ * - `payment_failed` — a card EXISTS and the charge was DECLINED. The server's
49
+ * `message` already carries the friendly decline copy ("Your card was
50
+ * declined…", "insufficient funds", …). Telling this user "No card on file"
51
+ * sends them down the wrong remediation path entirely (observed live
52
+ * 2026-07-20: a declined $80 Outpost proration surfaced as "no card",
53
+ * triggering a hunt for a missing card that existed). The capture link still
54
+ * surfaces — as the way to UPDATE the card.
55
+ * - anything else (`billing_required`) — genuinely no usable card on file; the
56
+ * add-a-card copy is correct.
57
+ */
58
+ export declare function surfaceBillingBlocked(ctx: BillingSurfaceContext, billing: BillingErrorPayload, serverMessage?: string): Promise<string | null>;
59
+ //# sourceMappingURL=cli-billing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-billing.d.ts","sourceRoot":"","sources":["../../src/outposts/cli-billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,GAAG,IAAI,CAwBP;AAED,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,qBAAqB,EAC1B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAoBxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,qBAAqB,EAC1B,OAAO,EAAE,mBAAmB,EAC5B,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA0BxB"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Terminal-facing half of the billing gate: the prose that talks to a human.
3
+ *
4
+ * Split from `./billing.ts` so a Next.js consumer can use the prices, the
5
+ * formatter, and the link mint without inheriting `chalk` or `process.exit`.
6
+ *
7
+ * Everything here is full prose rather than terse status output — a recurring
8
+ * charge and a declined card are exactly the moments where more words are the
9
+ * right call.
10
+ */
11
+ import chalk from "chalk";
12
+ import { formatUsd, mintPaymentLink } from "./billing.js";
13
+ /**
14
+ * Gate a paid provisioning call behind an explicit, informed `--yes`.
15
+ *
16
+ * Prints the monthly charge in full and exits non-zero when the caller has not
17
+ * passed `--yes`. Returns normally once approved so the caller proceeds.
18
+ */
19
+ export function confirmChargeOrExit(opts) {
20
+ const quantity = opts.quantity ?? 1;
21
+ const total = opts.unitCents * quantity;
22
+ const each = quantity > 1 ? ` (${formatUsd(opts.unitCents)} each × ${quantity})` : "";
23
+ const noun = quantity > 1 ? `${opts.resource}s` : opts.resource;
24
+ const article = /^[aeiou]/i.test(opts.resource) ? "an" : "a";
25
+ const subject = quantity > 1 ? `${quantity} ${noun}` : `${article} ${noun}`;
26
+ if (!opts.yes) {
27
+ console.error(chalk.yellow(`Provisioning ${subject} adds a recurring charge of ` +
28
+ `${formatUsd(total)}/month${each} to the payer on file. This is a ` +
29
+ `paid resource.\n` +
30
+ `Re-run with --yes to confirm you want to incur this charge.`));
31
+ process.exit(1);
32
+ }
33
+ console.log(chalk.dim(`Confirmed: ${formatUsd(total)}/month for ${quantity} ${noun}. Provisioning…`));
34
+ }
35
+ /**
36
+ * The provision was blocked because the payer has no card on file.
37
+ *
38
+ * Mints the card-capture link the backend pointed us at and prints a plain,
39
+ * shareable message so the user can add a card — or hand the link to whoever owns
40
+ * billing — and re-run. Returns the URL, or `null` when the server gave no `setup`
41
+ * action to act on. Never prints tokens or secrets.
42
+ */
43
+ export async function surfaceBillingRequired(ctx, billing) {
44
+ if (!billing.setup) {
45
+ console.error(chalk.yellow("Provisioning is blocked on billing, but the server didn't return a " +
46
+ "payment link. Add a card in the console billing page, then re-run."));
47
+ return null;
48
+ }
49
+ const url = await mintPaymentLink({ ...ctx, setup: billing.setup });
50
+ console.log(chalk.yellow("No card on file — provisioning is blocked until one is added."));
51
+ console.log("Add a card here (safe to share with whoever owns billing):\n " +
52
+ chalk.cyan(url));
53
+ console.log(chalk.dim("Once a card is added, re-run the same command."));
54
+ return url;
55
+ }
56
+ /**
57
+ * Status-aware surface for a 402 billing block.
58
+ *
59
+ * hq-pro's envelope carries two distinct remediations that must never be
60
+ * conflated (mirroring the server's own classification):
61
+ *
62
+ * - `payment_failed` — a card EXISTS and the charge was DECLINED. The server's
63
+ * `message` already carries the friendly decline copy ("Your card was
64
+ * declined…", "insufficient funds", …). Telling this user "No card on file"
65
+ * sends them down the wrong remediation path entirely (observed live
66
+ * 2026-07-20: a declined $80 Outpost proration surfaced as "no card",
67
+ * triggering a hunt for a missing card that existed). The capture link still
68
+ * surfaces — as the way to UPDATE the card.
69
+ * - anything else (`billing_required`) — genuinely no usable card on file; the
70
+ * add-a-card copy is correct.
71
+ */
72
+ export async function surfaceBillingBlocked(ctx, billing, serverMessage) {
73
+ if (billing.status !== "payment_failed") {
74
+ return surfaceBillingRequired(ctx, billing);
75
+ }
76
+ console.error(chalk.yellow(serverMessage?.trim() ||
77
+ "Your payment failed. Try a different card or contact your bank."));
78
+ if (!billing.setup)
79
+ return null;
80
+ try {
81
+ const url = await mintPaymentLink({ ...ctx, setup: billing.setup });
82
+ console.log("Update or replace the card here (safe to share with whoever owns billing):\n " +
83
+ chalk.cyan(url));
84
+ console.log(chalk.dim("Once the payment method is sorted, re-run the same command."));
85
+ return url;
86
+ }
87
+ catch {
88
+ // Link minting is best-effort on the decline path — the decline reason above
89
+ // is the essential part, and the console billing page also works.
90
+ return null;
91
+ }
92
+ }
93
+ //# sourceMappingURL=cli-billing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-billing.js","sourceRoot":"","sources":["../../src/outposts/cli-billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAqB,MAAM,cAAc,CAAC;AAK7E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAKnC;IACC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IACxC,MAAM,IAAI,GACR,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3E,MAAM,IAAI,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAChE,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IAC7D,MAAM,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;IAC5E,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,MAAM,CACV,gBAAgB,OAAO,8BAA8B;YACnD,GAAG,SAAS,CAAC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EAAE,IAAI,EAAE;QACnB,iEAAiE,CACpE,CACF,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,eAAe,CAAC,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACpE,OAAO,CAAC,GAAG,CACT,gFAAgF;YAC9E,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAClB,CAAC;QACF,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,GAAG,CAAC,6DAA6D,CAAC,CACzE,CAAC;QACF,OAAO,GAAG,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACP,6EAA6E;QAC7E,kEAAkE;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `@indigoai-us/hq-cloud/outposts/cli` — the `hq outposts` command tree.
3
+ *
4
+ * Depends on `commander` and `chalk` and calls `process.exit`, so it is only for a
5
+ * host CLI. hq-cli mounts it by passing its own auth and HTTP seams; nothing else
6
+ * should import this.
7
+ */
8
+ export { registerOutpostsCommand } from "./command.js";
9
+ export type { OutpostsCommandDeps } from "./command.js";
10
+ export { registerHeartbeatCommand } from "./heartbeat-command.js";
11
+ export { confirmChargeOrExit, surfaceBillingRequired, surfaceBillingBlocked, } from "./cli-billing.js";
12
+ export type { BillingSurfaceContext } from "./cli-billing.js";
13
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/outposts/cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAIlE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `@indigoai-us/hq-cloud/outposts/cli` — the `hq outposts` command tree.
3
+ *
4
+ * Depends on `commander` and `chalk` and calls `process.exit`, so it is only for a
5
+ * host CLI. hq-cli mounts it by passing its own auth and HTTP seams; nothing else
6
+ * should import this.
7
+ */
8
+ export { registerOutpostsCommand } from "./command.js";
9
+ export { registerHeartbeatCommand } from "./heartbeat-command.js";
10
+ // Shared billing prose. `hq agents` provisioning renders the same confirmation and
11
+ // decline copy, so it is exported rather than kept private to the outposts tree.
12
+ export { confirmChargeOrExit, surfaceBillingRequired, surfaceBillingBlocked, } from "./cli-billing.js";
13
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/outposts/cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE,mFAAmF;AACnF,iFAAiF;AACjF,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * `OutpostsClient` — typed client for the hq-pro `/outpost/*` control plane.
3
+ *
4
+ * These are the same routes hq-console's outpost panel calls and the same ones
5
+ * `hq outposts` drives, so this class is the single implementation of the wire
6
+ * contract for every first-party surface.
7
+ *
8
+ * Portable: the only things it touches are its injected transport, its injected
9
+ * token source, and `setTimeout`. No Node built-ins, no filesystem, no
10
+ * `process.exit`, no module-level side effects — safe to import from a Next.js
11
+ * server action, a route handler, or an edge function.
12
+ *
13
+ * Outposts are PERSONAL / caller-scoped: hq-pro keys every route on the caller's
14
+ * Cognito sub, so no method takes a company. `outpostId` selects a specific box;
15
+ * omitting it targets the caller's primary slot.
16
+ *
17
+ * Every non-2xx throws {@link OutpostHttpError} — nothing is swallowed, and the
18
+ * server's `step` is preserved so callers can distinguish a retryable
19
+ * `teardown-incomplete` from a real failure.
20
+ */
21
+ import type { OutpostRequest, OutpostTransport } from "./transport.js";
22
+ import type { OutpostExecAsyncResult, OutpostExecResult, OutpostExecStage, OutpostExecSubmission, OutpostSshAccess, OutpostSummary, ProvisionOutpostInput } from "./types.js";
23
+ /**
24
+ * A bearer token, or a function that resolves one per request.
25
+ *
26
+ * The function form is the important one: hq-cli passes `ensureCognitoToken`, so
27
+ * a long-lived client re-resolves a refreshed token instead of pinning the one
28
+ * that happened to be valid at construction. A Next.js app passes a closure over
29
+ * its session.
30
+ */
31
+ export type OutpostTokenSource = string | (() => string | Promise<string>);
32
+ export interface OutpostsClientOptions {
33
+ /** How requests reach the control plane. See `createOutpostTransport`. */
34
+ transport: OutpostTransport;
35
+ /** Bearer token, or a resolver called once per request. */
36
+ token: OutpostTokenSource;
37
+ /** Origin override passed through to the transport on every request. */
38
+ baseUrl?: string;
39
+ }
40
+ /** Tuning for {@link OutpostsClient.waitForExecResult}. */
41
+ export interface WaitForExecOptions {
42
+ /** First poll delay in ms. Defaults to 500. */
43
+ initialPollMs?: number;
44
+ /** Ceiling for the exponential backoff in ms. Defaults to 5000. */
45
+ maxPollMs?: number;
46
+ /** Abort the wait. The in-flight poll rejects with the abort reason. */
47
+ signal?: AbortSignal;
48
+ }
49
+ /** The widest AWS-RunShellScript `executionTimeout`, in seconds (48h). */
50
+ export declare const EXEC_MAX_TIMEOUT_SECONDS = 172800;
51
+ export declare class OutpostsClient {
52
+ private readonly transport;
53
+ private readonly tokenSource;
54
+ private readonly baseUrl?;
55
+ constructor(options: OutpostsClientOptions);
56
+ /** Resolve the bearer token for one request. */
57
+ private token;
58
+ /**
59
+ * Authenticated JSON round-trip. Throws {@link OutpostHttpError} on any
60
+ * non-2xx, decoding hq-pro's `{ error | message, step }` envelope for the
61
+ * reason plus the two structural envelopes (`billing`, `capped`) that carry no
62
+ * message at all.
63
+ */
64
+ request<T>(options: Omit<OutpostRequest, "token" | "baseUrl">): Promise<T>;
65
+ /**
66
+ * Provision the caller's Outpost.
67
+ *
68
+ * `refreshToken` lets the box authenticate AS the caller — the same body
69
+ * hq-console's `provisionMyOutpost` sends. It travels over HTTPS and is never
70
+ * logged.
71
+ *
72
+ * No duplicate is ever created: a caller already at their per-person cap gets a
73
+ * `409` whose body lists their existing boxes, surfaced here as an
74
+ * `OutpostHttpError` carrying `capped`. hq-pro checks the cap BEFORE activation
75
+ * billing, so a capped call is never charged.
76
+ *
77
+ * A payer with no usable card gets a `402` carrying `billing`.
78
+ */
79
+ provision(input: ProvisionOutpostInput): Promise<Record<string, unknown>>;
80
+ /** Every Outpost the caller owns. */
81
+ list(): Promise<OutpostSummary[]>;
82
+ /** Live detail for one box. */
83
+ status(outpostId?: string): Promise<Record<string, unknown>>;
84
+ /** Enable (or retry) Codex on a box. */
85
+ enableCodex(outpostId?: string): Promise<Record<string, unknown>>;
86
+ /** Ask the box to mint a fresh Claude login URL. */
87
+ regenerateLoginUrl(outpostId?: string): Promise<Record<string, unknown>>;
88
+ /**
89
+ * Hand the box the one-time Claude sign-in code from the login URL. hq-pro
90
+ * stores it as the row's pending code; the box polls for it, feeds it to
91
+ * `claude`, and flips itself `awaiting-claude-login → ready`.
92
+ */
93
+ submitLoginCode(code: string, outpostId?: string): Promise<Record<string, unknown>>;
94
+ /**
95
+ * Permanently destroy a box and its cloud resources.
96
+ *
97
+ * Idempotent: a `409` / `step: "teardown-incomplete"` means the gateway's
98
+ * timeout fired while the Lambda kept working. The row is preserved — re-issue
99
+ * the same call to finish.
100
+ */
101
+ destroy(outpostId?: string): Promise<Record<string, unknown>>;
102
+ /**
103
+ * Run a one-shot shell command via server-brokered SSM (no SSH). Synchronous,
104
+ * so it is bounded by the API gateway's ~20s cap — use the submit/result pair
105
+ * for anything longer.
106
+ *
107
+ * A `step: "platform-unsupported"` error means the box is Lightsail and has no
108
+ * SSM agent; fall back to SSH via {@link sshAccess}.
109
+ */
110
+ exec(command: string, outpostId?: string): Promise<OutpostExecResult>;
111
+ /** Presign an input upload for an asynchronous command. */
112
+ stageExecInput(outpostId?: string): Promise<OutpostExecStage>;
113
+ /** Submit an asynchronous command; returns as soon as SSM accepts it. */
114
+ submitExec(command: string, outpostId?: string, timeoutSeconds?: number): Promise<OutpostExecSubmission>;
115
+ /**
116
+ * Poll an asynchronous command once. Streams arrive only once `done`.
117
+ *
118
+ * `signal` aborts the in-flight request itself — not just the caller's wait —
119
+ * so a slow or hung poll is cancelled rather than left pending.
120
+ */
121
+ fetchExecResult(commandId: string, outpostId?: string, signal?: AbortSignal): Promise<OutpostExecAsyncResult>;
122
+ /**
123
+ * Poll until an asynchronous command reaches a terminal state, backing off
124
+ * exponentially.
125
+ *
126
+ * A `429` is treated as back-pressure and retried — the command is still
127
+ * running, and giving up on a rate limit would strand a job that is fine. Any
128
+ * other error propagates.
129
+ */
130
+ waitForExecResult(commandId: string, outpostId?: string, options?: WaitForExecOptions): Promise<OutpostExecAsyncResult>;
131
+ /**
132
+ * Fetch SSH connection info + key for a box and open the caller's IP on its SSH
133
+ * port. The route exists to reach a Lightsail box, which has no SSM agent.
134
+ *
135
+ * The result carries a PEM private key. Treat it as a credential: never log it,
136
+ * never return it to a browser, and write it only to a mode-0600 file.
137
+ */
138
+ sshAccess(outpostId?: string): Promise<OutpostSshAccess>;
139
+ }
140
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/outposts/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EACV,sBAAsB,EACtB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