@legioncodeinc/hive 0.2.1 → 0.3.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 (108) hide show
  1. package/README.md +2 -2
  2. package/dist/daemon/dashboard/app.js +26 -25
  3. package/dist/daemon/dashboard/host.d.ts +7 -0
  4. package/dist/daemon/dashboard/host.js +16 -0
  5. package/dist/daemon/dashboard/host.js.map +1 -1
  6. package/dist/daemon/dashboard/web-assets.d.ts +2 -0
  7. package/dist/daemon/dashboard/web-assets.js +19 -0
  8. package/dist/daemon/dashboard/web-assets.js.map +1 -1
  9. package/dist/daemon/gate.d.ts +2 -2
  10. package/dist/daemon/gate.js +15 -4
  11. package/dist/daemon/gate.js.map +1 -1
  12. package/dist/daemon/installer/bin-resolver.d.ts +34 -0
  13. package/dist/daemon/installer/bin-resolver.js +86 -0
  14. package/dist/daemon/installer/bin-resolver.js.map +1 -0
  15. package/dist/daemon/installer/config.d.ts +63 -0
  16. package/dist/daemon/installer/config.js +74 -0
  17. package/dist/daemon/installer/config.js.map +1 -0
  18. package/dist/daemon/installer/detection.d.ts +20 -0
  19. package/dist/daemon/installer/detection.js +73 -0
  20. package/dist/daemon/installer/detection.js.map +1 -0
  21. package/dist/daemon/installer/funnel-telemetry.d.ts +54 -0
  22. package/dist/daemon/installer/funnel-telemetry.js +134 -0
  23. package/dist/daemon/installer/funnel-telemetry.js.map +1 -0
  24. package/dist/daemon/installer/index.d.ts +12 -0
  25. package/dist/daemon/installer/index.js +10 -0
  26. package/dist/daemon/installer/index.js.map +1 -0
  27. package/dist/daemon/installer/install-state.d.ts +50 -0
  28. package/dist/daemon/installer/install-state.js +142 -0
  29. package/dist/daemon/installer/install-state.js.map +1 -0
  30. package/dist/daemon/installer/manifest-snapshot.json +25 -0
  31. package/dist/daemon/installer/manifest.d.ts +47 -0
  32. package/dist/daemon/installer/manifest.js +103 -0
  33. package/dist/daemon/installer/manifest.js.map +1 -0
  34. package/dist/daemon/installer/products.d.ts +33 -0
  35. package/dist/daemon/installer/products.js +42 -0
  36. package/dist/daemon/installer/products.js.map +1 -0
  37. package/dist/daemon/installer/routes.d.ts +43 -0
  38. package/dist/daemon/installer/routes.js +201 -0
  39. package/dist/daemon/installer/routes.js.map +1 -0
  40. package/dist/daemon/installer/security.d.ts +33 -0
  41. package/dist/daemon/installer/security.js +80 -0
  42. package/dist/daemon/installer/security.js.map +1 -0
  43. package/dist/daemon/installer/spawn.d.ts +48 -0
  44. package/dist/daemon/installer/spawn.js +51 -0
  45. package/dist/daemon/installer/spawn.js.map +1 -0
  46. package/dist/daemon/installer/token.d.ts +23 -0
  47. package/dist/daemon/installer/token.js +56 -0
  48. package/dist/daemon/installer/token.js.map +1 -0
  49. package/dist/daemon/server.d.ts +6 -0
  50. package/dist/daemon/server.js +7 -0
  51. package/dist/daemon/server.js.map +1 -1
  52. package/dist/dashboard/web/app.js +42 -20
  53. package/dist/dashboard/web/app.js.map +1 -1
  54. package/dist/dashboard/web/boot-route.d.ts +11 -7
  55. package/dist/dashboard/web/boot-route.js +12 -6
  56. package/dist/dashboard/web/boot-route.js.map +1 -1
  57. package/dist/dashboard/web/main.js +2 -1
  58. package/dist/dashboard/web/main.js.map +1 -1
  59. package/dist/dashboard/web/onboarding/advanced-picker.d.ts +16 -0
  60. package/dist/dashboard/web/onboarding/advanced-picker.js +59 -0
  61. package/dist/dashboard/web/onboarding/advanced-picker.js.map +1 -0
  62. package/dist/dashboard/web/onboarding/contracts.d.ts +188 -0
  63. package/dist/dashboard/web/onboarding/contracts.js +161 -0
  64. package/dist/dashboard/web/onboarding/contracts.js.map +1 -0
  65. package/dist/dashboard/web/onboarding/health-view.d.ts +17 -0
  66. package/dist/dashboard/web/onboarding/health-view.js +79 -0
  67. package/dist/dashboard/web/onboarding/health-view.js.map +1 -0
  68. package/dist/dashboard/web/onboarding/install-card.d.ts +27 -0
  69. package/dist/dashboard/web/onboarding/install-card.js +170 -0
  70. package/dist/dashboard/web/onboarding/install-card.js.map +1 -0
  71. package/dist/dashboard/web/onboarding/login-step.d.ts +29 -0
  72. package/dist/dashboard/web/onboarding/login-step.js +104 -0
  73. package/dist/dashboard/web/onboarding/login-step.js.map +1 -0
  74. package/dist/dashboard/web/onboarding/onboarding-client.d.ts +52 -0
  75. package/dist/dashboard/web/onboarding/onboarding-client.js +133 -0
  76. package/dist/dashboard/web/onboarding/onboarding-client.js.map +1 -0
  77. package/dist/dashboard/web/onboarding/onboarding-hero.d.ts +24 -0
  78. package/dist/dashboard/web/onboarding/onboarding-hero.js +70 -0
  79. package/dist/dashboard/web/onboarding/onboarding-hero.js.map +1 -0
  80. package/dist/dashboard/web/onboarding/onboarding-screen.d.ts +43 -0
  81. package/dist/dashboard/web/onboarding/onboarding-screen.js +161 -0
  82. package/dist/dashboard/web/onboarding/onboarding-screen.js.map +1 -0
  83. package/dist/dashboard/web/onboarding/onboarding-selection-store.d.ts +20 -0
  84. package/dist/dashboard/web/onboarding/onboarding-selection-store.js +76 -0
  85. package/dist/dashboard/web/onboarding/onboarding-selection-store.js.map +1 -0
  86. package/dist/dashboard/web/onboarding/product-copy.d.ts +40 -0
  87. package/dist/dashboard/web/onboarding/product-copy.js +70 -0
  88. package/dist/dashboard/web/onboarding/product-copy.js.map +1 -0
  89. package/dist/dashboard/web/onboarding/use-install-dwell.d.ts +22 -0
  90. package/dist/dashboard/web/onboarding/use-install-dwell.js +37 -0
  91. package/dist/dashboard/web/onboarding/use-install-dwell.js.map +1 -0
  92. package/dist/dashboard/web/onboarding/use-onboarding-token.d.ts +9 -0
  93. package/dist/dashboard/web/onboarding/use-onboarding-token.js +34 -0
  94. package/dist/dashboard/web/onboarding/use-onboarding-token.js.map +1 -0
  95. package/dist/dashboard/web/route-daemon-owner.d.ts +7 -0
  96. package/dist/dashboard/web/route-daemon-owner.js +15 -0
  97. package/dist/dashboard/web/route-daemon-owner.js.map +1 -0
  98. package/dist/dashboard/web/wire.d.ts +1 -1
  99. package/dist/shared/onboarding-types.d.ts +79 -0
  100. package/dist/shared/onboarding-types.js +12 -0
  101. package/dist/shared/onboarding-types.js.map +1 -0
  102. package/dist/telemetry/emit.d.ts +30 -3
  103. package/dist/telemetry/emit.js +25 -2
  104. package/dist/telemetry/emit.js.map +1 -1
  105. package/dist/telemetry/onboarding-session-ledger.d.ts +31 -0
  106. package/dist/telemetry/onboarding-session-ledger.js +78 -0
  107. package/dist/telemetry/onboarding-session-ledger.js.map +1 -0
  108. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboarding-screen.js","sourceRoot":"","sources":["../../../../src/dashboard/web/onboarding/onboarding-screen.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACN,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAGjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAyB,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAY1C,yFAAyF;AACzF,SAAS,kBAAkB,CAAC,KAAoC;IAC/D,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAA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K,CAAC,CAAC;YACzC,MAAM,gBAAgB,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC;YAC3G,OAAO,CACN,KAAC,WAAW,IAEX,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,cAAc,EACzB,UAAU,EAAE,UAAU,IANjB,OAAO,CAOX,CACF,CAAC;QACH,CAAC;QACD,KAAK,QAAQ;YACZ,OAAO,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAI,CAAC;QACjF,KAAK,OAAO;YACX,OAAO,KAAC,SAAS,IAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,GAAI,CAAC;QACvH,OAAO,CAAC,CAAC,CAAC;YACT,MAAM,UAAU,GAAU,KAAK,CAAC;YAChC,OAAO,UAAU,CAAC;QACnB,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Session-scoped memory of the product subset the operator chose (Standard = the whole fleet,
3
+ * Advanced = exactly the checked products). PRD-009b ob-AC-16 resume honesty: without this, an
4
+ * interrupted Advanced install resumes from `remainingProducts(detection)`, which is every
5
+ * not-installed product, so a product the operator explicitly DESELECTED would be silently
6
+ * reinstalled on re-entry. Persisting the choice lets `buildResumeQueue` exclude a not-installed
7
+ * product the operator never asked for, while still resuming any product that is genuinely
8
+ * mid-flight or failed (those are in-flight facts, not assumptions).
9
+ *
10
+ * Storage is `sessionStorage` (per browser session, cleared when the tab closes) and every access
11
+ * is guarded: a missing `window`, a storage exception (private mode, quota, disabled), or a
12
+ * malformed value all degrade to "no memory" rather than throwing into the onboarding flow.
13
+ */
14
+ import { type InstallableProduct } from "./contracts.js";
15
+ /** Persist the chosen installable subset (order-normalized to the fixed order, de-duplicated). */
16
+ export declare function persistSelection(selected: readonly InstallableProduct[]): void;
17
+ /** Read the persisted subset, or null when nothing valid is stored. */
18
+ export declare function readSelection(): readonly InstallableProduct[] | null;
19
+ /** Drop the persisted subset (call when onboarding reaches a terminal state). */
20
+ export declare function clearSelection(): void;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Session-scoped memory of the product subset the operator chose (Standard = the whole fleet,
3
+ * Advanced = exactly the checked products). PRD-009b ob-AC-16 resume honesty: without this, an
4
+ * interrupted Advanced install resumes from `remainingProducts(detection)`, which is every
5
+ * not-installed product, so a product the operator explicitly DESELECTED would be silently
6
+ * reinstalled on re-entry. Persisting the choice lets `buildResumeQueue` exclude a not-installed
7
+ * product the operator never asked for, while still resuming any product that is genuinely
8
+ * mid-flight or failed (those are in-flight facts, not assumptions).
9
+ *
10
+ * Storage is `sessionStorage` (per browser session, cleared when the tab closes) and every access
11
+ * is guarded: a missing `window`, a storage exception (private mode, quota, disabled), or a
12
+ * malformed value all degrade to "no memory" rather than throwing into the onboarding flow.
13
+ */
14
+ import { FIXED_PRODUCT_ORDER, isInstallableProduct } from "./contracts.js";
15
+ const SELECTION_KEY = "hive-onboarding-selection";
16
+ function storage() {
17
+ try {
18
+ if (typeof window === "undefined")
19
+ return null;
20
+ return window.sessionStorage;
21
+ }
22
+ catch {
23
+ return null;
24
+ }
25
+ }
26
+ /** Persist the chosen installable subset (order-normalized to the fixed order, de-duplicated). */
27
+ export function persistSelection(selected) {
28
+ const store = storage();
29
+ if (store === null)
30
+ return;
31
+ const normalized = FIXED_PRODUCT_ORDER.filter((p) => selected.includes(p));
32
+ try {
33
+ store.setItem(SELECTION_KEY, JSON.stringify(normalized));
34
+ }
35
+ catch {
36
+ // A storage write failure is non-fatal: resume simply falls back to the conservative path.
37
+ }
38
+ }
39
+ /** Read the persisted subset, or null when nothing valid is stored. */
40
+ export function readSelection() {
41
+ const store = storage();
42
+ if (store === null)
43
+ return null;
44
+ let raw;
45
+ try {
46
+ raw = store.getItem(SELECTION_KEY);
47
+ }
48
+ catch {
49
+ return null;
50
+ }
51
+ if (raw === null)
52
+ return null;
53
+ try {
54
+ const parsed = JSON.parse(raw);
55
+ if (!Array.isArray(parsed))
56
+ return null;
57
+ const products = parsed.filter((v) => typeof v === "string" && isInstallableProduct(v));
58
+ return products.length > 0 ? FIXED_PRODUCT_ORDER.filter((p) => products.includes(p)) : null;
59
+ }
60
+ catch {
61
+ return null;
62
+ }
63
+ }
64
+ /** Drop the persisted subset (call when onboarding reaches a terminal state). */
65
+ export function clearSelection() {
66
+ const store = storage();
67
+ if (store === null)
68
+ return;
69
+ try {
70
+ store.removeItem(SELECTION_KEY);
71
+ }
72
+ catch {
73
+ // Non-fatal.
74
+ }
75
+ }
76
+ //# sourceMappingURL=onboarding-selection-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboarding-selection-store.js","sourceRoot":"","sources":["../../../../src/dashboard/web/onboarding/onboarding-selection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAA2B,MAAM,gBAAgB,CAAC;AAEpG,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAElD,SAAS,OAAO;IACf,IAAI,CAAC;QACJ,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC;QAC/C,OAAO,MAAM,CAAC,cAAc,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,gBAAgB,CAAC,QAAuC;IACvE,MAAM,KAAK,GAAG,OAAO,EAAE,CAAC;IACxB,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO;IAC3B,MAAM,UAAU,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EA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KAAK,GAAG,OAAO,EAAE,CAAC;IACxB,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO;IAC3B,IAAI,CAAC;QACJ,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACR,aAAa;IACd,CAAC;AACF,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The onboarding CONTENT layer, PRD-009b ob-AC-8/ob-AC-10. Per-product benefit copy (drafted from
3
+ * each sibling repo's README voice: `honeycomb/README.md`, `doctor/README.md`, `nectar/README.md`)
4
+ * plus the npm-safety reassurance every install card carries and the Doctor-deselect warning the
5
+ * Advanced picker shows (ob-AC-7). Kept as data, not JSX, so copy review never touches a component.
6
+ */
7
+ import type { InstallableProduct, OnboardingProduct } from "./contracts.js";
8
+ export interface ProductCopy {
9
+ readonly title: string;
10
+ /** A punchy, honest headline (drafted from the product's README hero line). */
11
+ readonly headline: string;
12
+ /** Two short supporting lines, concrete, no invented claims. */
13
+ readonly lines: readonly [string, string];
14
+ /** Doctor carries the `Recommended` badge in the Advanced picker (ob-AC-7). */
15
+ readonly recommended: boolean;
16
+ }
17
+ /**
18
+ * Drafted verbatim from each product's README (see the task report for the source lines this
19
+ * copy distills): Doctor's "watchdog that keeps your agents' brain alive" + repair-ladder pitch,
20
+ * Honeycomb's "shared, persistent memory" + skillify/propagation pitch, Nectar's "stable identity
21
+ * that survives refactors" + the fourth-recall-arm pitch. Honest and concrete, no invented claims.
22
+ */
23
+ export declare const PRODUCT_COPY: Record<InstallableProduct, ProductCopy>;
24
+ /**
25
+ * ob-AC-10, the npm-safety reassurance every install card carries, verbatim. Checkably true for
26
+ * all four packages (`@legioncodeinc/{honeycomb,doctor,hive,nectar}` each publish with npm Trusted
27
+ * Publishing OIDC provenance per the parent PRD's overview), so this never overstates the claim.
28
+ */
29
+ export declare const NPM_SAFETY_COPY = "Installed straight from the public npm registry. Every package here is signed and provenance verified through npm Trusted Publishing (OIDC), so what installs is exactly what we published.";
30
+ /** ob-AC-7, shown when Doctor is deselected in the Advanced picker. */
31
+ export declare const DOCTOR_DESELECT_WARNING = "Without Doctor, nothing restarts your daemons after a crash or reboot.";
32
+ /**
33
+ * Resolve a product's brand mark URL. Honeycomb keeps its existing top-level, `assetBase`-relative
34
+ * route (`host.ts`'s `DASHBOARD_LOGO_PATH`, unchanged by this PRD); Doctor, Hive, and Nectar are
35
+ * served by the daemon agent at the new fixed `/assets/brand/<name>-mark.svg` route (see the task
36
+ * brief), independent of `assetBase`.
37
+ */
38
+ export declare function productLogoUrl(product: OnboardingProduct, assetBase: string): string;
39
+ /** The install-stage vocabulary (ob-AC-9): a short human label per stage, never a percentage. */
40
+ export declare const INSTALL_STAGE_LABEL: Record<"resolving" | "downloading" | "linking" | "registering_service" | "completed" | "failed", string>;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * The onboarding CONTENT layer, PRD-009b ob-AC-8/ob-AC-10. Per-product benefit copy (drafted from
3
+ * each sibling repo's README voice: `honeycomb/README.md`, `doctor/README.md`, `nectar/README.md`)
4
+ * plus the npm-safety reassurance every install card carries and the Doctor-deselect warning the
5
+ * Advanced picker shows (ob-AC-7). Kept as data, not JSX, so copy review never touches a component.
6
+ */
7
+ /**
8
+ * Drafted verbatim from each product's README (see the task report for the source lines this
9
+ * copy distills): Doctor's "watchdog that keeps your agents' brain alive" + repair-ladder pitch,
10
+ * Honeycomb's "shared, persistent memory" + skillify/propagation pitch, Nectar's "stable identity
11
+ * that survives refactors" + the fourth-recall-arm pitch. Honest and concrete, no invented claims.
12
+ */
13
+ export const PRODUCT_COPY = {
14
+ doctor: {
15
+ title: "Doctor",
16
+ headline: "Doctor keeps your daemons alive while you are not looking.",
17
+ lines: [
18
+ "Restarts a crashed daemon, then climbs an escalating repair ladder if a plain restart is not enough.",
19
+ "Runs OS-supervised so it starts on boot and survives its own crashes too.",
20
+ ],
21
+ recommended: true,
22
+ },
23
+ honeycomb: {
24
+ title: "Honeycomb",
25
+ headline: "Honeycomb is the shared memory your agents keep across sessions.",
26
+ lines: [
27
+ "Captures what happens on every turn and recalls it in any harness, on any machine.",
28
+ "Mines reusable skills from real sessions and propagates them to your whole team automatically.",
29
+ ],
30
+ recommended: false,
31
+ },
32
+ nectar: {
33
+ title: "Nectar",
34
+ headline: "Nectar gives every file in your repo an identity that survives refactors.",
35
+ lines: [
36
+ "Tracks files through renames and moves, so memory tied to an old path never goes stale.",
37
+ "Feeds Honeycomb's recall a fourth arm, so asking where the login logic lives actually works.",
38
+ ],
39
+ recommended: false,
40
+ },
41
+ };
42
+ /**
43
+ * ob-AC-10, the npm-safety reassurance every install card carries, verbatim. Checkably true for
44
+ * all four packages (`@legioncodeinc/{honeycomb,doctor,hive,nectar}` each publish with npm Trusted
45
+ * Publishing OIDC provenance per the parent PRD's overview), so this never overstates the claim.
46
+ */
47
+ export const NPM_SAFETY_COPY = "Installed straight from the public npm registry. Every package here is signed and provenance verified through npm Trusted Publishing (OIDC), so what installs is exactly what we published.";
48
+ /** ob-AC-7, shown when Doctor is deselected in the Advanced picker. */
49
+ export const DOCTOR_DESELECT_WARNING = "Without Doctor, nothing restarts your daemons after a crash or reboot.";
50
+ /**
51
+ * Resolve a product's brand mark URL. Honeycomb keeps its existing top-level, `assetBase`-relative
52
+ * route (`host.ts`'s `DASHBOARD_LOGO_PATH`, unchanged by this PRD); Doctor, Hive, and Nectar are
53
+ * served by the daemon agent at the new fixed `/assets/brand/<name>-mark.svg` route (see the task
54
+ * brief), independent of `assetBase`.
55
+ */
56
+ export function productLogoUrl(product, assetBase) {
57
+ if (product === "honeycomb")
58
+ return `${assetBase}/honeycomb-memory-cluster.svg`;
59
+ return `/assets/brand/${product}-mark.svg`;
60
+ }
61
+ /** The install-stage vocabulary (ob-AC-9): a short human label per stage, never a percentage. */
62
+ export const INSTALL_STAGE_LABEL = {
63
+ resolving: "Resolving the package",
64
+ downloading: "Downloading from npm",
65
+ linking: "Linking the binary",
66
+ registering_service: "Registering the service",
67
+ completed: "Installed",
68
+ failed: "Installation failed",
69
+ };
70
+ //# sourceMappingURL=product-copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-copy.js","sourceRoot":"","sources":["../../../../src/dashboard/web/onboarding/product-copy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAA4C;IACpE,MAAM,EAAE;QACP,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,4DAA4D;QACtE,KAAK,EAAE;YACN,sGAAsG;YACtG,2EAA2E;SAC3E;QACD,WAAW,EAAE,IAAI;KACjB;IACD,SAAS,EAAE;QACV,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,kEAAkE;QAC5E,KAAK,EAAE;YACN,oFAAoF;YACpF,gGAAgG;SAChG;QACD,WAAW,EAAE,KAAK;KAClB;IACD,MAAM,EAAE;QACP,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,2EAA2E;QACrF,KAAK,EAAE;YACN,yFAAyF;YACzF,8FAA8F;SAC9F;QACD,WAAW,EAAE,KAAK;KAClB;CACD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAC3B,6LAA6L,CAAC;AAE/L,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,wEAAwE,CAAC;AAEhH;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,OAA0B,EAAE,SAAiB;IAC3E,IAAI,OAAO,KAAK,WAAW;QAAE,OAAO,GAAG,SAAS,+BAA+B,CAAC;IAChF,OAAO,iBAAiB,OAAO,WAAW,CAAC;AAC5C,CAAC;AAED,iGAAiG;AACjG,MAAM,CAAC,MAAM,mBAAmB,GAG5B;IACH,SAAS,EAAE,uBAAuB;IAClC,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,oBAAoB;IAC7B,mBAAmB,EAAE,yBAAyB;IAC9C,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,qBAAqB;CAC7B,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The install card's MINIMUM DWELL hook, PRD-009b ob-AC-11. Each product card must display for a
3
+ * minimum of ~30 seconds even when the install finishes sooner; a longer install simply holds the
4
+ * card until its own terminal state. The dwell timer NEVER masks a failure, this hook only ever
5
+ * gates the advance-on-SUCCESS path; a failed card renders its error immediately regardless of how
6
+ * much dwell time has elapsed (the caller never calls this hook's `ready` with a failure in mind).
7
+ */
8
+ /** ob-AC-11's "~30 seconds" as a duration. Overridable so tests never wait 30 real seconds. */
9
+ export declare const DEFAULT_MIN_DWELL_MS = 30000;
10
+ export interface UseInstallDwellOptions {
11
+ /** Called exactly once, after `ready` has been true for the remaining minimum-dwell duration. */
12
+ readonly onDwellSatisfied: () => void;
13
+ /** Overrides {@link DEFAULT_MIN_DWELL_MS} (a test injects a short window). */
14
+ readonly minDwellMs?: number;
15
+ }
16
+ /**
17
+ * `ready` flips true once the install reaches its `completed` terminal state. The card's mount
18
+ * time is the dwell clock's start (installs begin the instant a card mounts), so a completion that
19
+ * lands at second 6 still holds the card until second 30; a completion that lands at second 40 has
20
+ * already satisfied the dwell and advances immediately.
21
+ */
22
+ export declare function useInstallDwell(ready: boolean, options: UseInstallDwellOptions): void;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The install card's MINIMUM DWELL hook, PRD-009b ob-AC-11. Each product card must display for a
3
+ * minimum of ~30 seconds even when the install finishes sooner; a longer install simply holds the
4
+ * card until its own terminal state. The dwell timer NEVER masks a failure, this hook only ever
5
+ * gates the advance-on-SUCCESS path; a failed card renders its error immediately regardless of how
6
+ * much dwell time has elapsed (the caller never calls this hook's `ready` with a failure in mind).
7
+ */
8
+ import React from "react";
9
+ /** ob-AC-11's "~30 seconds" as a duration. Overridable so tests never wait 30 real seconds. */
10
+ export const DEFAULT_MIN_DWELL_MS = 30_000;
11
+ /**
12
+ * `ready` flips true once the install reaches its `completed` terminal state. The card's mount
13
+ * time is the dwell clock's start (installs begin the instant a card mounts), so a completion that
14
+ * lands at second 6 still holds the card until second 30; a completion that lands at second 40 has
15
+ * already satisfied the dwell and advances immediately.
16
+ */
17
+ export function useInstallDwell(ready, options) {
18
+ const { minDwellMs = DEFAULT_MIN_DWELL_MS } = options;
19
+ const startedAtRef = React.useRef(Date.now());
20
+ const firedRef = React.useRef(false);
21
+ // Read through a ref so a caller passing a fresh `onDwellSatisfied` closure every render never
22
+ // re-triggers the scheduling effect below (only `ready`/`minDwellMs` should do that).
23
+ const onDwellSatisfiedRef = React.useRef(options.onDwellSatisfied);
24
+ onDwellSatisfiedRef.current = options.onDwellSatisfied;
25
+ React.useEffect(() => {
26
+ if (!ready || firedRef.current)
27
+ return;
28
+ const elapsed = Date.now() - startedAtRef.current;
29
+ const remaining = Math.max(0, minDwellMs - elapsed);
30
+ const id = setTimeout(() => {
31
+ firedRef.current = true;
32
+ onDwellSatisfiedRef.current();
33
+ }, remaining);
34
+ return () => clearTimeout(id);
35
+ }, [ready, minDwellMs]);
36
+ }
37
+ //# sourceMappingURL=use-install-dwell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-install-dwell.js","sourceRoot":"","sources":["../../../../src/dashboard/web/onboarding/use-install-dwell.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,+FAA+F;AAC/F,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAS3C;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc,EAAE,OAA+B;IAC9E,MAAM,EAAE,UAAU,GAAG,oBAAoB,EAAE,GAAG,OAAO,CAAC;IACtD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAS,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAErC,+FAA+F;IAC/F,sFAAsF;IACtF,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnE,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAEvD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,OAAO;YAAE,OAAO;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;QACpD,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE;YAC1B,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;YACxB,mBAAmB,CAAC,OAAO,EAAE,CAAC;QAC/B,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The one-time onboarding TOKEN hook, PRD-009b implementation note. The bootstrap mints the token
3
+ * and hands it to the browser via `/onboarding?t=...`; this hook reads it ONCE on mount, keeps it
4
+ * in React state (memory only) for the page's lifetime, and immediately strips it from the visible
5
+ * URL via `history.replaceState` so casual screen-sharing never exposes it. The read+strip is a side
6
+ * effect, so it runs inside `useEffect` (not a `useState` lazy initializer), render must stay pure.
7
+ */
8
+ /** Read `?t=` once, strip it from the visible URL, and return the token (`""` until read / if absent). */
9
+ export declare function useOnboardingToken(): string;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The one-time onboarding TOKEN hook, PRD-009b implementation note. The bootstrap mints the token
3
+ * and hands it to the browser via `/onboarding?t=...`; this hook reads it ONCE on mount, keeps it
4
+ * in React state (memory only) for the page's lifetime, and immediately strips it from the visible
5
+ * URL via `history.replaceState` so casual screen-sharing never exposes it. The read+strip is a side
6
+ * effect, so it runs inside `useEffect` (not a `useState` lazy initializer), render must stay pure.
7
+ */
8
+ import React from "react";
9
+ const TOKEN_QUERY_PARAM = "t";
10
+ /** Read `?t=` once, strip it from the visible URL, and return the token (`""` until read / if absent). */
11
+ export function useOnboardingToken() {
12
+ const [token, setToken] = React.useState("");
13
+ React.useEffect(() => {
14
+ if (typeof window === "undefined")
15
+ return;
16
+ const params = new URLSearchParams(window.location.search);
17
+ const fromUrl = params.get(TOKEN_QUERY_PARAM);
18
+ if (fromUrl === null || fromUrl === "")
19
+ return;
20
+ setToken(fromUrl);
21
+ // Move it out of the visible URL (PRD implementation note), the token stays in memory only.
22
+ try {
23
+ const url = new URL(window.location.href);
24
+ url.searchParams.delete(TOKEN_QUERY_PARAM);
25
+ window.history.replaceState(null, "", `${url.pathname}${url.search}${url.hash}`);
26
+ }
27
+ catch {
28
+ // A `history` API failure (e.g. an unusual embedding context) must never block the flow ,
29
+ // the token still landed in state; only the cosmetic URL scrub is skipped.
30
+ }
31
+ }, []);
32
+ return token;
33
+ }
34
+ //# sourceMappingURL=use-onboarding-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-onboarding-token.js","sourceRoot":"","sources":["../../../../src/dashboard/web/onboarding/use-onboarding-token.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,iBAAiB,GAAG,GAAY,CAAC;AAEvC,0GAA0G;AAC1G,MAAM,UAAU,kBAAkB;IACjC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE7C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO;QAC1C,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAC9C,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,EAAE;YAAE,OAAO;QAE/C,QAAQ,CAAC,OAAO,CAAC,CAAC;QAElB,4FAA4F;QAC5F,IAAI,CAAC;YACJ,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1C,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;YAC3C,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QAClF,CAAC;QAAC,MAAM,CAAC;YACR,0FAA0F;YAC1F,2EAA2E;QAC5E,CAAC;IACF,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAK,CAAC;AACd,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { DaemonName } from "../../shared/daemon-routing.js";
2
+ /**
3
+ * Resolve which workload daemon owns the active dashboard route's data plane. Used by the shell's
4
+ * per-owner connectivity gate (PRD-001c c-AC-3): only pages owned by a down daemon swap for the
5
+ * ConnectivityBanner; sibling routes keep rendering via their own fail-soft panels.
6
+ */
7
+ export declare function resolveRouteDaemonOwner(route: string): DaemonName;
@@ -0,0 +1,15 @@
1
+ /** Dashboard routes whose primary wire endpoints are owned by nectar (hive-graph proxy). */
2
+ const NECTAR_ROUTE_PREFIXES = ["/hive-graph"];
3
+ /**
4
+ * Resolve which workload daemon owns the active dashboard route's data plane. Used by the shell's
5
+ * per-owner connectivity gate (PRD-001c c-AC-3): only pages owned by a down daemon swap for the
6
+ * ConnectivityBanner; sibling routes keep rendering via their own fail-soft panels.
7
+ */
8
+ export function resolveRouteDaemonOwner(route) {
9
+ for (const prefix of NECTAR_ROUTE_PREFIXES) {
10
+ if (route === prefix || route.startsWith(`${prefix}/`))
11
+ return "nectar";
12
+ }
13
+ return "honeycomb";
14
+ }
15
+ //# sourceMappingURL=route-daemon-owner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-daemon-owner.js","sourceRoot":"","sources":["../../../src/dashboard/web/route-daemon-owner.ts"],"names":[],"mappings":"AAEA,4FAA4F;AAC5F,MAAM,qBAAqB,GAAG,CAAC,aAAa,CAAU,CAAC;AAEvD;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACpD,KAAK,MAAM,MAAM,IAAI,qBAAqB,EAAE,CAAC;QAC5C,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,MAAM,GAAG,CAAC;YAAE,OAAO,QAAQ,CAAC;IACzE,CAAC;IACD,OAAO,WAAW,CAAC;AACpB,CAAC"}
@@ -1311,9 +1311,9 @@ export declare const SetupStateSchema: z.ZodObject<{
1311
1311
  hivemind: z.ZodCatch<z.ZodBoolean>;
1312
1312
  }, z.core.$strip>>;
1313
1313
  phase: z.ZodCatch<z.ZodEnum<{
1314
+ linking: "linking";
1314
1315
  installed: "installed";
1315
1316
  fresh: "fresh";
1316
- linking: "linking";
1317
1317
  linked: "linked";
1318
1318
  migrating: "migrating";
1319
1319
  migrated: "migrated";
@@ -0,0 +1,79 @@
1
+ /**
2
+ * PRD-009a: the LOCKED API contract for the `/api/onboarding/*` installer surface.
3
+ *
4
+ * These types are the single shared contract between the daemon-side installer service
5
+ * (`src/daemon/installer/`) and the onboarding UI (`src/dashboard/web/onboarding/`, owned by
6
+ * PRD-009b). The UI builds against this exact shape, so any change here is a contract change.
7
+ *
8
+ * Nothing in this module reaches persistence: the installer's only durable artifact is the
9
+ * one-time onboarding token file, and even that is out of band from these wire types.
10
+ */
11
+ import type { FleetStatusResponse } from "./fleet-readiness.js";
12
+ /** The four fleet product slugs (is-AC-3). The install allowlist is derived from this closed set. */
13
+ export type ProductSlug = "honeycomb" | "doctor" | "hive" | "nectar";
14
+ /**
15
+ * The three installable-via-portal products. `hive` is intentionally excluded: it is the daemon
16
+ * serving this very endpoint, so it is never a portal install target (a request for it is a 400).
17
+ */
18
+ export type InstallableProduct = "doctor" | "honeycomb" | "nectar";
19
+ /** The closed set of install stages streamed over SSE (is-AC-11). Never a percentage (is-AC-12). */
20
+ export type InstallStage = "resolving" | "downloading" | "linking" | "registering_service" | "completed" | "failed";
21
+ /** The closed detection state set for a product (is-AC-2). */
22
+ export type ProductDetectionState = "not_installed" | "installed" | "install_in_progress" | "install_failed";
23
+ /** A bounded, truthful failure record: the stage it failed at plus a summary (is-AC-17). */
24
+ export interface InstallError {
25
+ readonly stage: InstallStage;
26
+ readonly summary: string;
27
+ }
28
+ /** One product's detection result: its state, the installed version when known, and any last error. */
29
+ export interface ProductDetection {
30
+ readonly state: ProductDetectionState;
31
+ readonly version?: string;
32
+ readonly error?: InstallError;
33
+ }
34
+ /** `GET /api/onboarding/detect` -> the per-product detection map (is-AC-1/2). */
35
+ export interface DetectResponse {
36
+ readonly products: Record<ProductSlug, ProductDetection>;
37
+ }
38
+ /** `POST /api/onboarding/install` body. Only the product slug crosses the wire (is-AC-4). */
39
+ export interface InstallRequest {
40
+ readonly product: InstallableProduct;
41
+ }
42
+ /** `POST /api/onboarding/install` -> 202 when an install was started (or attached to). */
43
+ export interface InstallAcceptedResponse {
44
+ readonly product: InstallableProduct;
45
+ readonly state: "install_in_progress";
46
+ }
47
+ /** `POST /api/onboarding/install` -> 200 short-circuit when already installed at the pinned version (is-AC-15). */
48
+ export interface InstallShortCircuitResponse {
49
+ readonly product: InstallableProduct;
50
+ readonly state: "installed";
51
+ }
52
+ export type InstallResponse = InstallAcceptedResponse | InstallShortCircuitResponse;
53
+ /**
54
+ * `POST /api/onboarding/install` -> 409 refusal (is-AC-5). `unpublished`: the manifest marks the
55
+ * product `published:false`. `manifest_unresolved`: neither the network manifest nor the bundled
56
+ * snapshot yields a shape-valid `packageName@version`. Never a fall-through to `@latest`.
57
+ */
58
+ export interface InstallRefusalResponse {
59
+ readonly error: "unpublished" | "manifest_unresolved";
60
+ }
61
+ /** One SSE progress frame (is-AC-11). `detail` is an optional bounded human string, never a percent. */
62
+ export interface ProgressEvent {
63
+ readonly stage: InstallStage;
64
+ readonly detail?: string;
65
+ }
66
+ /** `GET /api/onboarding/health` -> the fleet readiness projection reused from fleet-status (is-AC-18). */
67
+ export interface HealthResponse {
68
+ readonly ready: boolean;
69
+ readonly status: FleetStatusResponse;
70
+ }
71
+ /**
72
+ * `POST /api/onboarding/event` body: a funnel event name plus optional flat string properties.
73
+ * The daemon validates the token and records the call; wiring it to telemetry emission is Wave 2
74
+ * (PRD-009c), so nothing is emitted here yet.
75
+ */
76
+ export interface OnboardingEventRequest {
77
+ readonly event: string;
78
+ readonly properties?: Record<string, string>;
79
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * PRD-009a: the LOCKED API contract for the `/api/onboarding/*` installer surface.
3
+ *
4
+ * These types are the single shared contract between the daemon-side installer service
5
+ * (`src/daemon/installer/`) and the onboarding UI (`src/dashboard/web/onboarding/`, owned by
6
+ * PRD-009b). The UI builds against this exact shape, so any change here is a contract change.
7
+ *
8
+ * Nothing in this module reaches persistence: the installer's only durable artifact is the
9
+ * one-time onboarding token file, and even that is out of band from these wire types.
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=onboarding-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboarding-types.js","sourceRoot":"","sources":["../../src/shared/onboarding-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -74,17 +74,44 @@ export declare const LEDGER_FILENAME: "telemetry.json";
74
74
  * path at all, so nothing else can egress.
75
75
  */
76
76
  export declare const ALLOWED_PROPERTY_KEYS: readonly ["package", "version", "os", "arch", "node"];
77
+ /** Funnel-only property keys extending the lifecycle allow-list (PRD-009c tm-AC-4). */
78
+ export declare const FUNNEL_PROPERTY_KEYS: readonly ["mode", "product", "failure_stage"];
77
79
  /** One allow-listed property key. */
78
80
  export type AllowedPropertyKey = (typeof ALLOWED_PROPERTY_KEYS)[number];
81
+ /** One funnel-specific property key. */
82
+ export type FunnelPropertyKey = (typeof FUNNEL_PROPERTY_KEYS)[number];
79
83
  /** The allow-listed property bag: the EXACT shape that may leave the machine. */
80
84
  export type AllowedProperties = Record<AllowedPropertyKey, string>;
85
+ /** The full telemetry property bag: lifecycle keys plus optional closed funnel keys. */
86
+ export type TelemetryProperties = AllowedProperties & Partial<Record<FunnelPropertyKey, string>>;
81
87
  /**
82
88
  * Assemble the allow-listed payload: the package name, the build version, and coarse platform facts
83
89
  * (OS family, CPU arch, node version). Never a hostname, a path, or any machine-identifying string.
84
90
  */
85
91
  export declare function buildAllowedProperties(version: string): AllowedProperties;
86
- /** The four hive lifecycle events. This union is the whole event vocabulary of this module. */
92
+ /**
93
+ * Merge validated funnel extras into the base allow-listed payload. Unknown keys are dropped; invalid
94
+ * enum values are dropped. Lifecycle events pass no extras.
95
+ */
96
+ export declare function buildTelemetryProperties(version: string, extras?: FunnelExtras): TelemetryProperties;
97
+ /** The four hive lifecycle events. */
87
98
  export type HiveTelemetryEvent = "hive_installed" | "hive_uninstalled" | "hive_first_run" | "hive_updated";
99
+ /** Onboarding funnel events (PRD-009c). Emitted daemon-side through this same chokepoint. */
100
+ export type OnboardingFunnelEvent = "onboarding_started" | "mode_selected" | "login_shown" | "dashboard_reached" | "product_install_started" | "product_install_completed" | "product_install_failed" | "health_check_passed" | "login_completed";
101
+ /** The closed event vocabulary that may egress through {@link emitTelemetry}. */
102
+ export type TelemetryEvent = HiveTelemetryEvent | OnboardingFunnelEvent;
103
+ /** Closed funnel `mode` values (tm-AC-4). */
104
+ export type FunnelMode = "standard" | "advanced";
105
+ /** Closed funnel product slugs for install events (tm-AC-4). */
106
+ export type FunnelProduct = "doctor" | "honeycomb" | "nectar";
107
+ /** Closed failure-stage discriminators on `product_install_failed` (tm-AC-4). */
108
+ export type FunnelFailureStage = "resolving" | "downloading" | "linking" | "registering_service";
109
+ /** Optional funnel extras validated before they join the allow-listed payload. */
110
+ export interface FunnelExtras {
111
+ readonly mode?: FunnelMode;
112
+ readonly product?: FunnelProduct;
113
+ readonly failure_stage?: FunnelFailureStage;
114
+ }
88
115
  /**
89
116
  * The dedupe ledger persisted at `${stateDir}/telemetry.json`. `reported` maps a dedupe key (an event
90
117
  * name, or `event@version` for `hive_updated`) to the ISO timestamp it was sent. `lastSeenVersion`
@@ -156,7 +183,7 @@ export interface EmitOutcome {
156
183
  /** When `sent` is false, why. Absent when `sent` is true. */
157
184
  readonly skipped?: EmitSkipReason;
158
185
  /** The allow-listed payload that was built (present whether or not it was sent). */
159
- readonly properties: AllowedProperties;
186
+ readonly properties: TelemetryProperties;
160
187
  }
161
188
  /** The per-emit options. */
162
189
  export interface EmitOptions {
@@ -173,7 +200,7 @@ export interface EmitOptions {
173
200
  * 2xx the dedupe key (when supplied) is recorded in the ledger. NEVER throws and NEVER changes a CLI
174
201
  * verb's exit code: it resolves an {@link EmitOutcome} the caller may inspect or ignore.
175
202
  */
176
- export declare function emitTelemetry(event: HiveTelemetryEvent, opts?: EmitOptions, deps?: EmitDeps): Promise<EmitOutcome>;
203
+ export declare function emitTelemetry(event: TelemetryEvent, opts?: EmitOptions, deps?: EmitDeps, extras?: FunnelExtras): Promise<EmitOutcome>;
177
204
  /** Emit `hive_installed` after a successful `install-service`. Deduped once per machine. */
178
205
  export declare function emitInstalled(deps?: EmitDeps): Promise<EmitOutcome>;
179
206
  /**
@@ -22,6 +22,7 @@ const SHARED_INSTALL_ID_PATH = join(HONEYCOMB_HOME_DIR, "install-id");
22
22
  const INSTALL_ID_FILENAME = "install-id";
23
23
  const LEDGER_FILENAME = "telemetry.json";
24
24
  const ALLOWED_PROPERTY_KEYS = ["package", "version", "os", "arch", "node"];
25
+ const FUNNEL_PROPERTY_KEYS = ["mode", "product", "failure_stage"];
25
26
  function buildAllowedProperties(version) {
26
27
  return {
27
28
  package: "hive",
@@ -31,6 +32,26 @@ function buildAllowedProperties(version) {
31
32
  node: process.version
32
33
  };
33
34
  }
35
+ function buildTelemetryProperties(version, extras = {}) {
36
+ const base = buildAllowedProperties(version);
37
+ const out = { ...base };
38
+ if (extras.mode !== void 0 && FUNNEL_MODES.has(extras.mode))
39
+ out.mode = extras.mode;
40
+ if (extras.product !== void 0 && FUNNEL_PRODUCTS.has(extras.product))
41
+ out.product = extras.product;
42
+ if (extras.failure_stage !== void 0 && FUNNEL_FAILURE_STAGES.has(extras.failure_stage)) {
43
+ out.failure_stage = extras.failure_stage;
44
+ }
45
+ return out;
46
+ }
47
+ const FUNNEL_MODES = /* @__PURE__ */ new Set(["standard", "advanced"]);
48
+ const FUNNEL_PRODUCTS = /* @__PURE__ */ new Set(["doctor", "honeycomb", "nectar"]);
49
+ const FUNNEL_FAILURE_STAGES = /* @__PURE__ */ new Set([
50
+ "resolving",
51
+ "downloading",
52
+ "linking",
53
+ "registering_service"
54
+ ]);
34
55
  function emptyLedger() {
35
56
  return { reported: {} };
36
57
  }
@@ -84,11 +105,11 @@ function resolveDistinctId(deps = {}) {
84
105
  return generated;
85
106
  }
86
107
  const DEFAULT_EMIT_TIMEOUT_MS = 2e3;
87
- async function emitTelemetry(event, opts = {}, deps = {}) {
108
+ async function emitTelemetry(event, opts = {}, deps = {}, extras = {}) {
88
109
  const env = deps.env ?? process.env;
89
110
  const key = deps.posthogKey ?? POSTHOG_KEY;
90
111
  const version = deps.version ?? HIVE_VERSION;
91
- const properties = buildAllowedProperties(version);
112
+ const properties = buildTelemetryProperties(version, extras);
92
113
  if (key.length === 0)
93
114
  return { sent: false, skipped: "disabled", properties };
94
115
  if (isOptedOut(env))
@@ -176,6 +197,7 @@ export {
176
197
  DEFAULT_EMIT_TIMEOUT_MS,
177
198
  ENV_DO_NOT_TRACK,
178
199
  ENV_TELEMETRY,
200
+ FUNNEL_PROPERTY_KEYS,
179
201
  HIVE_STATE_DIR,
180
202
  INSTALL_ID_FILENAME,
181
203
  LEDGER_FILENAME,
@@ -184,6 +206,7 @@ export {
184
206
  POSTHOG_KEY,
185
207
  SHARED_INSTALL_ID_PATH,
186
208
  buildAllowedProperties,
209
+ buildTelemetryProperties,
187
210
  captureUrl,
188
211
  emitInstalled,
189
212
  emitTelemetry,