@hansenexus/hud 0.1.0 → 0.2.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.
- package/README.md +42 -23
- package/dist/index.d.ts +39 -0
- package/dist/index.js +399 -0
- package/package.json +45 -136
- package/chunk-0cj8dkk7.js +0 -127
- package/chunk-1atxwdhw.js +0 -48
- package/chunk-24vrg16w.js +0 -39
- package/chunk-3j9sm249.js +0 -26
- package/chunk-50pq4sg6.js +0 -41
- package/chunk-5gtx3pza.js +0 -9
- package/chunk-6gw4x08j.js +0 -264
- package/chunk-6jt8yg4m.js +0 -117
- package/chunk-71se605m.js +0 -85
- package/chunk-82nm9wcg.js +0 -316
- package/chunk-8tam7r3h.js +0 -68
- package/chunk-babjpqkb.js +0 -52
- package/chunk-c5y856ad.js +0 -98
- package/chunk-ghxh8926.js +0 -172
- package/chunk-hc2g0n35.js +0 -24
- package/chunk-k0vr8dsy.js +0 -179
- package/chunk-k50yfp5d.js +0 -166
- package/chunk-kyeb6qeq.js +0 -95
- package/chunk-msqkkqw7.js +0 -140
- package/chunk-nm82wr8r.js +0 -58
- package/chunk-r06bpmy6.js +0 -79
- package/chunk-t9eh4t0b.js +0 -89
- package/chunk-tf774c4w.js +0 -115
- package/chunk-v086j53b.js +0 -19
- package/chunk-wspz08q7.js +0 -67
- package/chunk-xezxydm3.js +0 -47
- package/chunk-xjn0896g.js +0 -574
- package/chunk-xztw0xyt.js +0 -113
- package/chunk-zzrpd92r.js +0 -172
- package/core/access.d.mts +0 -53
- package/core/access.js +0 -27
- package/core/api-types.d.mts +0 -146
- package/core/api-types.js +0 -9
- package/core/capabilities.d.mts +0 -27
- package/core/capabilities.js +0 -14
- package/core/capture-buffer.d.mts +0 -37
- package/core/capture-buffer.js +0 -9
- package/core/force-state.d.mts +0 -68
- package/core/force-state.js +0 -21
- package/core/mock-cookie.d.mts +0 -30
- package/core/mock-cookie.js +0 -15
- package/core/types.d.mts +0 -59
- package/core/types.js +0 -9
- package/hud-provider.d.mts +0 -38
- package/hud-provider.js +0 -15
- package/hud.d.mts +0 -15
- package/hud.js +0 -18
- package/index.d.mts +0 -94
- package/index.js +0 -170
- package/lazy-panel.d.mts +0 -28
- package/lazy-panel.js +0 -11
- package/panels/cicd-panel.d.mts +0 -9
- package/panels/cicd-panel.js +0 -13
- package/panels/debug-info-panel.d.mts +0 -21
- package/panels/debug-info-panel.js +0 -9
- package/panels/dispatch-panel.d.mts +0 -10
- package/panels/dispatch-panel.js +0 -14
- package/panels/env-info-panel.d.mts +0 -9
- package/panels/env-info-panel.js +0 -12
- package/panels/feature-flags-panel.d.mts +0 -26
- package/panels/feature-flags-panel.js +0 -9
- package/panels/force-state-panel.d.mts +0 -11
- package/panels/force-state-panel.js +0 -113
- package/panels/info-row.d.mts +0 -21
- package/panels/info-row.js +0 -14
- package/panels/mock-seed-panel.d.mts +0 -15
- package/panels/mock-seed-panel.js +0 -14
- package/panels/network-console-panel.d.mts +0 -6
- package/panels/network-console-panel.js +0 -9
- package/panels/role-switcher-panel.d.mts +0 -28
- package/panels/role-switcher-panel.js +0 -9
- package/panels/sessions-panel.d.mts +0 -6
- package/panels/sessions-panel.js +0 -13
- package/panels/tokens-panel.d.mts +0 -38
- package/panels/tokens-panel.js +0 -9
- package/panels/unlock-panel.d.mts +0 -33
- package/panels/unlock-panel.js +0 -14
- package/panels/variants-panel.d.mts +0 -51
- package/panels/variants-panel.js +0 -12
- package/panels/vitals-panel.d.mts +0 -11
- package/panels/vitals-panel.js +0 -15
- package/server/guard.d.mts +0 -42
- package/server/guard.js +0 -12
- package/server/unlock.d.mts +0 -28
- package/server/unlock.js +0 -108
- package/state-boundary.d.mts +0 -25
- package/state-boundary.js +0 -54
package/core/types.d.mts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { LucideIcon } from 'lucide-react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Where the hud believes it is running. Resolved by `resolveHudEnv()` —
|
|
6
|
-
* explicit `NEXT_PUBLIC_HUD_ENV` wins over heuristics because k3s deploys
|
|
7
|
-
* have no `VERCEL_ENV` (staging is only detectable if the overlay says so).
|
|
8
|
-
*/
|
|
9
|
-
type HudEnv = "development" | "preview" | "staging" | "production" | "disabled";
|
|
10
|
-
/**
|
|
11
|
-
* Literal the CI bundle gate greps for in every app's client chunks
|
|
12
|
-
* (`scripts/ci/assert-no-hud-in-bundle.sh`). It is rendered as an attribute
|
|
13
|
-
* on the hud's chrome so a bundler cannot drop it while keeping the hud, and
|
|
14
|
-
* so the check has a marker that is unmistakably deliberate rather than an
|
|
15
|
-
* incidental string that a refactor could rename away.
|
|
16
|
-
*/
|
|
17
|
-
declare const HUD_BUNDLE_MARKER = "__HN_HUD_BUNDLE_MARKER__";
|
|
18
|
-
declare const HUD_CAPABILITIES: readonly ["observe.app", "observe.estate", "cicd.read", "cicd.trigger", "inject.seed", "mock.toggle", "auth.impersonate", "dispatch.local", "dispatch.hermes", "variants.switch", "variants.vote", "variants.generate", "state.force"];
|
|
19
|
-
type HudCapability = (typeof HUD_CAPABILITIES)[number];
|
|
20
|
-
interface HudPanel {
|
|
21
|
-
id: string;
|
|
22
|
-
label: string;
|
|
23
|
-
icon: LucideIcon;
|
|
24
|
-
/** Required capability — the panel is dropped when the env's matrix denies it. */
|
|
25
|
-
capability: HudCapability;
|
|
26
|
-
content: ReactNode;
|
|
27
|
-
/** Lower sorts first in the tab bar. Default 0. */
|
|
28
|
-
order?: number;
|
|
29
|
-
}
|
|
30
|
-
interface HudConfig {
|
|
31
|
-
/** App slug as used in k8s/app-config.json (e.g. "console"). */
|
|
32
|
-
appSlug: string;
|
|
33
|
-
/** Toolbar display name. Working title until the naming vote lands. */
|
|
34
|
-
name?: string;
|
|
35
|
-
/** localStorage key for drawer height/tab persistence. Default `${appSlug}-hud`. */
|
|
36
|
-
storageKey?: string;
|
|
37
|
-
/** Drawer hotkey (Cmd/Ctrl+Shift+<key>). Default "h"; null disables. */
|
|
38
|
-
shortcutKey?: string | null;
|
|
39
|
-
/** Base path of the hud hub routes. Default "/api/hud" (same-origin proxy). */
|
|
40
|
-
apiBase?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Source guesses for the element grabber (e.g. from the app's dev-routes
|
|
43
|
-
* or variant-preview manifest). Hints only — the dispatched session does
|
|
44
|
-
* the real lookup.
|
|
45
|
-
*/
|
|
46
|
-
componentHints?: Array<{
|
|
47
|
-
name: string;
|
|
48
|
-
path: string;
|
|
49
|
-
}>;
|
|
50
|
-
/** FAB/drawer visual theme, passed through to @hn-monorepo/dev-tools. */
|
|
51
|
-
appearance?: "default" | "bauhaus";
|
|
52
|
-
/**
|
|
53
|
-
* Render the hud's own FAB (default true). Apps that already run a
|
|
54
|
-
* FloatingDockProvider set this false and register a dock item instead.
|
|
55
|
-
*/
|
|
56
|
-
showFab?: boolean;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export { HUD_BUNDLE_MARKER, HUD_CAPABILITIES, type HudCapability, type HudConfig, type HudEnv, type HudPanel };
|
package/core/types.js
DELETED
package/hud-provider.d.mts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { HudConfig, HudEnv, HudPanel, HudCapability } from './core/types.mjs';
|
|
4
|
-
import 'lucide-react';
|
|
5
|
-
|
|
6
|
-
interface HudPanelSource {
|
|
7
|
-
panels: HudPanel[];
|
|
8
|
-
/** Lower sorts first. Default 0. */
|
|
9
|
-
order?: number;
|
|
10
|
-
}
|
|
11
|
-
interface HudContextValue {
|
|
12
|
-
config: HudConfig;
|
|
13
|
-
env: HudEnv;
|
|
14
|
-
name: string;
|
|
15
|
-
can: (capability: HudCapability) => boolean;
|
|
16
|
-
/** Capability-filtered, order-sorted union of prop panels + registered sources. */
|
|
17
|
-
panels: HudPanel[];
|
|
18
|
-
registerSource: (id: string, source: HudPanelSource) => void;
|
|
19
|
-
unregisterSource: (id: string) => void;
|
|
20
|
-
}
|
|
21
|
-
interface HudProviderProps {
|
|
22
|
-
config: HudConfig;
|
|
23
|
-
env: HudEnv;
|
|
24
|
-
panels?: HudPanel[];
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
}
|
|
27
|
-
declare function HudProvider({ config, env, panels: basePanels, children }: HudProviderProps): react.JSX.Element;
|
|
28
|
-
declare function useHud(): HudContextValue;
|
|
29
|
-
declare function useHudSafe(): HudContextValue | null;
|
|
30
|
-
/**
|
|
31
|
-
* Contribute panels from any layout/page below the provider — mirrors
|
|
32
|
-
* dev-tools' `useRegisterDockItems`. Pass a memo-stable `panels` array; the
|
|
33
|
-
* source is replaced on change and removed on unmount, so calling with an
|
|
34
|
-
* empty array is safe (rules-of-hooks friendly).
|
|
35
|
-
*/
|
|
36
|
-
declare function useRegisterHudPanels(id: string, panels: HudPanel[], order?: number): void;
|
|
37
|
-
|
|
38
|
-
export { HudProvider, type HudProviderProps, useHud, useHudSafe, useRegisterHudPanels };
|
package/hud-provider.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HudProvider,
|
|
3
|
-
useHud,
|
|
4
|
-
useHudSafe,
|
|
5
|
-
useRegisterHudPanels
|
|
6
|
-
} from "./chunk-wspz08q7.js";
|
|
7
|
-
import"./chunk-babjpqkb.js";
|
|
8
|
-
import"./chunk-v086j53b.js";
|
|
9
|
-
import"./chunk-5gtx3pza.js";
|
|
10
|
-
export {
|
|
11
|
-
useRegisterHudPanels,
|
|
12
|
-
useHudSafe,
|
|
13
|
-
useHud,
|
|
14
|
-
HudProvider
|
|
15
|
-
};
|
package/hud.d.mts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { HudConfig, HudPanel } from './core/types.mjs';
|
|
3
|
-
import 'lucide-react';
|
|
4
|
-
|
|
5
|
-
interface HudProps {
|
|
6
|
-
config: HudConfig;
|
|
7
|
-
panels?: HudPanel[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The hud shell: env gate → drawer state → FAB + tabbed drawer. Mount once
|
|
11
|
-
* per app via a `ssr: false` dynamic import (see console's hud-loader).
|
|
12
|
-
*/
|
|
13
|
-
declare function Hud({ config, panels }: HudProps): react.JSX.Element | null;
|
|
14
|
-
|
|
15
|
-
export { Hud, type HudProps };
|
package/hud.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Hud
|
|
3
|
-
} from "./chunk-xjn0896g.js";
|
|
4
|
-
import"./chunk-msqkkqw7.js";
|
|
5
|
-
import"./chunk-82nm9wcg.js";
|
|
6
|
-
import"./chunk-ghxh8926.js";
|
|
7
|
-
import"./chunk-xezxydm3.js";
|
|
8
|
-
import"./chunk-24vrg16w.js";
|
|
9
|
-
import"./chunk-r06bpmy6.js";
|
|
10
|
-
import"./chunk-wspz08q7.js";
|
|
11
|
-
import"./chunk-kyeb6qeq.js";
|
|
12
|
-
import"./chunk-xztw0xyt.js";
|
|
13
|
-
import"./chunk-babjpqkb.js";
|
|
14
|
-
import"./chunk-v086j53b.js";
|
|
15
|
-
import"./chunk-5gtx3pza.js";
|
|
16
|
-
export {
|
|
17
|
-
Hud
|
|
18
|
-
};
|
package/index.d.mts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { HudBridgeInfo, HudDispatchPayload, HudAnchor, HudComponentHint } from './core/api-types.mjs';
|
|
2
|
-
export { HudCicdDeployed, HudCicdResponse, HudCicdRun, HudDispatchRequest, HudDispatchResponse, HudDispatchTarget, HudSeedDescriptor, HudSeedRequest, HudSeedResponse, HudSessionInfo, HudSignozResponse } from './core/api-types.mjs';
|
|
3
|
-
export { HUD_UNLOCK_COOKIE, HudAccess, hudRequiresUnlock, hudUnlockTtlMs, resolveHudAccess } from './core/access.mjs';
|
|
4
|
-
export { CAPABILITY_MATRIX, hasCapability, isHudVisible, resolveHudEnv } from './core/capabilities.mjs';
|
|
5
|
-
export { CaptureBuffer, CaptureEntry, CaptureKind, captureBuffer } from './core/capture-buffer.mjs';
|
|
6
|
-
export { HUD_MOCK_COOKIE, hudMockCookieString, isHudMockEnabled, readHudMockCookie, setHudMockCookie } from './core/mock-cookie.mjs';
|
|
7
|
-
import { HudConfig, HudEnv } from './core/types.mjs';
|
|
8
|
-
export { HUD_BUNDLE_MARKER, HUD_CAPABILITIES, HudCapability, HudPanel } from './core/types.mjs';
|
|
9
|
-
export { Hud, HudProps } from './hud.mjs';
|
|
10
|
-
export { HudProvider, HudProviderProps, useHud, useHudSafe, useRegisterHudPanels } from './hud-provider.mjs';
|
|
11
|
-
export { HudPanelMeta, hudLazyPanel } from './lazy-panel.mjs';
|
|
12
|
-
export { CicdPanel } from './panels/cicd-panel.mjs';
|
|
13
|
-
export { DebugInfoPanel, DebugInfoPanelProps, HudUserInfo } from './panels/debug-info-panel.mjs';
|
|
14
|
-
export { DispatchPanel } from './panels/dispatch-panel.mjs';
|
|
15
|
-
export { EnvInfoPanel } from './panels/env-info-panel.mjs';
|
|
16
|
-
export { FeatureFlagsPanel, HudFlagDescriptor, HudFlagsAdapter } from './panels/feature-flags-panel.mjs';
|
|
17
|
-
export { InfoRow, LoadingSpinner, PanelSection, ShortcutRow } from './panels/info-row.mjs';
|
|
18
|
-
export { MockSeedPanel } from './panels/mock-seed-panel.mjs';
|
|
19
|
-
export { NetworkConsolePanel } from './panels/network-console-panel.mjs';
|
|
20
|
-
export { HudRoleAdapter, HudRoleDescriptor, RoleSwitcherPanel } from './panels/role-switcher-panel.mjs';
|
|
21
|
-
export { SessionsPanel } from './panels/sessions-panel.mjs';
|
|
22
|
-
export { HudTokenDescriptor, HudTokenGroup, HudTokensAdapter, TokensPanel } from './panels/tokens-panel.mjs';
|
|
23
|
-
export { HudUnlockPanel, HudUnlockPanelProps, HudUnlockState, useHudUnlock } from './panels/unlock-panel.mjs';
|
|
24
|
-
export { HudGenerateRequest, HudGenerateResult, HudVariantCategory, HudVariantsAdapter, VariantsPanel } from './panels/variants-panel.mjs';
|
|
25
|
-
export { VitalsPanel, getVitalsSnapshot } from './panels/vitals-panel.mjs';
|
|
26
|
-
import 'lucide-react';
|
|
27
|
-
import 'react';
|
|
28
|
-
|
|
29
|
-
declare function getBridgeInfo(apiBase: string): Promise<HudBridgeInfo | null>;
|
|
30
|
-
declare function resetBridgeInfo(): void;
|
|
31
|
-
declare function bridgeFetch(info: HudBridgeInfo, path: string, init?: RequestInit): Promise<Response>;
|
|
32
|
-
|
|
33
|
-
declare function installCapture(): void;
|
|
34
|
-
declare function uninstallCapture(): void;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Module-level grabber state. Lives outside React because the drawer (and
|
|
38
|
-
* with it every panel) unmounts while grabbing — the dispatch panel closes
|
|
39
|
-
* the drawer, the controller in the always-mounted shell does the DOM work,
|
|
40
|
-
* and the payload must survive the round trip.
|
|
41
|
-
*/
|
|
42
|
-
interface GrabberState {
|
|
43
|
-
mode: "idle" | "grabbing";
|
|
44
|
-
payload: HudDispatchPayload | null;
|
|
45
|
-
}
|
|
46
|
-
declare function getGrabberState(): GrabberState;
|
|
47
|
-
declare function subscribeGrabber(listener: () => void): () => void;
|
|
48
|
-
declare function startGrab(): void;
|
|
49
|
-
declare function cancelGrab(): void;
|
|
50
|
-
declare function completeGrab(payload: HudDispatchPayload): void;
|
|
51
|
-
declare function clearGrabbedPayload(): void;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* CSS-ish path from `root` down to `el` — originally console's design-comments,
|
|
55
|
-
* by way of the HUD grabber. Canonical home; `@hn-monorepo/hud` re-exports it.
|
|
56
|
-
*/
|
|
57
|
-
declare function buildAnchorSelector(el: Element, root: Element): string;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Viewport-relative anchor for a grab that is dispatched immediately.
|
|
61
|
-
*
|
|
62
|
-
* Correct here and only here: the payload is sent within the second, so the
|
|
63
|
-
* scroll offset it was measured at is still the one on screen. Anything that
|
|
64
|
-
* PERSISTS a position needs `capturePinAnchor` from
|
|
65
|
-
* `@hn-monorepo/review-kit/anchor`, which stores document-relative fractions —
|
|
66
|
-
* reload at a different scroll offset and these percentages point elsewhere.
|
|
67
|
-
*/
|
|
68
|
-
declare function buildAnchor(el: Element): HudAnchor;
|
|
69
|
-
/**
|
|
70
|
-
* Score manifest entries against the current route + anchor label. Pure
|
|
71
|
-
* token overlap — a hint, not a resolution; the dispatched session does the
|
|
72
|
-
* real source lookup (console's design-review dispatch proves that works).
|
|
73
|
-
*/
|
|
74
|
-
declare function matchComponentHints(hints: HudComponentHint[] | undefined, route: string, label: string, max?: number): HudComponentHint[];
|
|
75
|
-
declare function buildDispatchPayload(input: {
|
|
76
|
-
config: HudConfig;
|
|
77
|
-
env: HudEnv;
|
|
78
|
-
anchor: HudAnchor;
|
|
79
|
-
vitals: Record<string, number>;
|
|
80
|
-
}): HudDispatchPayload;
|
|
81
|
-
|
|
82
|
-
interface PollState<T> {
|
|
83
|
-
data?: T;
|
|
84
|
-
error?: string;
|
|
85
|
-
loading: boolean;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Minimal JSON polling for hud panels — deliberately not SWR to keep the
|
|
89
|
-
* package dependency-light. Pauses while the tab is hidden; a redirect
|
|
90
|
-
* (auth wall) or non-JSON response surfaces as a readable error.
|
|
91
|
-
*/
|
|
92
|
-
declare function usePoll<T>(url: string | null, intervalMs?: number): PollState<T>;
|
|
93
|
-
|
|
94
|
-
export { HudAnchor, HudBridgeInfo, HudComponentHint, HudConfig, HudDispatchPayload, HudEnv, bridgeFetch, buildAnchor, buildAnchorSelector, buildDispatchPayload, cancelGrab, clearGrabbedPayload, completeGrab, getBridgeInfo, getGrabberState, installCapture, matchComponentHints, resetBridgeInfo, startGrab, subscribeGrabber, uninstallCapture, usePoll };
|
package/index.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EnvInfoPanel
|
|
3
|
-
} from "./chunk-0cj8dkk7.js";
|
|
4
|
-
import {
|
|
5
|
-
DispatchPanel
|
|
6
|
-
} from "./chunk-6gw4x08j.js";
|
|
7
|
-
import {
|
|
8
|
-
SessionsPanel
|
|
9
|
-
} from "./chunk-t9eh4t0b.js";
|
|
10
|
-
import {
|
|
11
|
-
NetworkConsolePanel
|
|
12
|
-
} from "./chunk-tf774c4w.js";
|
|
13
|
-
import {
|
|
14
|
-
FeatureFlagsPanel
|
|
15
|
-
} from "./chunk-71se605m.js";
|
|
16
|
-
import {
|
|
17
|
-
MockSeedPanel
|
|
18
|
-
} from "./chunk-k0vr8dsy.js";
|
|
19
|
-
import {
|
|
20
|
-
bridgeFetch,
|
|
21
|
-
getBridgeInfo,
|
|
22
|
-
resetBridgeInfo
|
|
23
|
-
} from "./chunk-50pq4sg6.js";
|
|
24
|
-
import {
|
|
25
|
-
CicdPanel
|
|
26
|
-
} from "./chunk-zzrpd92r.js";
|
|
27
|
-
import {
|
|
28
|
-
VariantsPanel
|
|
29
|
-
} from "./chunk-k50yfp5d.js";
|
|
30
|
-
import {
|
|
31
|
-
TokensPanel
|
|
32
|
-
} from "./chunk-nm82wr8r.js";
|
|
33
|
-
import {
|
|
34
|
-
RoleSwitcherPanel
|
|
35
|
-
} from "./chunk-6jt8yg4m.js";
|
|
36
|
-
import {
|
|
37
|
-
DebugInfoPanel
|
|
38
|
-
} from "./chunk-8tam7r3h.js";
|
|
39
|
-
import {
|
|
40
|
-
Hud,
|
|
41
|
-
buildAnchor,
|
|
42
|
-
buildAnchorSelector,
|
|
43
|
-
buildDispatchPayload,
|
|
44
|
-
installCapture,
|
|
45
|
-
matchComponentHints,
|
|
46
|
-
uninstallCapture
|
|
47
|
-
} from "./chunk-xjn0896g.js";
|
|
48
|
-
import {
|
|
49
|
-
HudUnlockPanel,
|
|
50
|
-
useHudUnlock
|
|
51
|
-
} from "./chunk-msqkkqw7.js";
|
|
52
|
-
import {
|
|
53
|
-
cancelGrab,
|
|
54
|
-
clearGrabbedPayload,
|
|
55
|
-
completeGrab,
|
|
56
|
-
getGrabberState,
|
|
57
|
-
startGrab,
|
|
58
|
-
subscribeGrabber
|
|
59
|
-
} from "./chunk-82nm9wcg.js";
|
|
60
|
-
import {
|
|
61
|
-
VitalsPanel,
|
|
62
|
-
getVitalsSnapshot
|
|
63
|
-
} from "./chunk-ghxh8926.js";
|
|
64
|
-
import {
|
|
65
|
-
usePoll
|
|
66
|
-
} from "./chunk-xezxydm3.js";
|
|
67
|
-
import {
|
|
68
|
-
CaptureBuffer,
|
|
69
|
-
captureBuffer
|
|
70
|
-
} from "./chunk-24vrg16w.js";
|
|
71
|
-
import {
|
|
72
|
-
HUD_UNLOCK_COOKIE,
|
|
73
|
-
hudRequiresUnlock,
|
|
74
|
-
hudUnlockTtlMs,
|
|
75
|
-
resolveHudAccess
|
|
76
|
-
} from "./chunk-r06bpmy6.js";
|
|
77
|
-
import {
|
|
78
|
-
HudProvider,
|
|
79
|
-
useHud,
|
|
80
|
-
useHudSafe,
|
|
81
|
-
useRegisterHudPanels
|
|
82
|
-
} from "./chunk-wspz08q7.js";
|
|
83
|
-
import {
|
|
84
|
-
hudLazyPanel
|
|
85
|
-
} from "./chunk-3j9sm249.js";
|
|
86
|
-
import {
|
|
87
|
-
InfoRow,
|
|
88
|
-
LoadingSpinner,
|
|
89
|
-
PanelSection,
|
|
90
|
-
ShortcutRow
|
|
91
|
-
} from "./chunk-kyeb6qeq.js";
|
|
92
|
-
import"./chunk-xztw0xyt.js";
|
|
93
|
-
import {
|
|
94
|
-
HUD_MOCK_COOKIE,
|
|
95
|
-
hudMockCookieString,
|
|
96
|
-
isHudMockEnabled,
|
|
97
|
-
readHudMockCookie,
|
|
98
|
-
setHudMockCookie
|
|
99
|
-
} from "./chunk-hc2g0n35.js";
|
|
100
|
-
import {
|
|
101
|
-
CAPABILITY_MATRIX,
|
|
102
|
-
hasCapability,
|
|
103
|
-
isHudVisible,
|
|
104
|
-
resolveHudEnv
|
|
105
|
-
} from "./chunk-babjpqkb.js";
|
|
106
|
-
import {
|
|
107
|
-
HUD_BUNDLE_MARKER,
|
|
108
|
-
HUD_CAPABILITIES
|
|
109
|
-
} from "./chunk-v086j53b.js";
|
|
110
|
-
import"./chunk-5gtx3pza.js";
|
|
111
|
-
export {
|
|
112
|
-
useRegisterHudPanels,
|
|
113
|
-
usePoll,
|
|
114
|
-
useHudUnlock,
|
|
115
|
-
useHudSafe,
|
|
116
|
-
useHud,
|
|
117
|
-
uninstallCapture,
|
|
118
|
-
subscribeGrabber,
|
|
119
|
-
startGrab,
|
|
120
|
-
setHudMockCookie,
|
|
121
|
-
resolveHudEnv,
|
|
122
|
-
resolveHudAccess,
|
|
123
|
-
resetBridgeInfo,
|
|
124
|
-
readHudMockCookie,
|
|
125
|
-
matchComponentHints,
|
|
126
|
-
isHudVisible,
|
|
127
|
-
isHudMockEnabled,
|
|
128
|
-
installCapture,
|
|
129
|
-
hudUnlockTtlMs,
|
|
130
|
-
hudRequiresUnlock,
|
|
131
|
-
hudMockCookieString,
|
|
132
|
-
hudLazyPanel,
|
|
133
|
-
hasCapability,
|
|
134
|
-
getVitalsSnapshot,
|
|
135
|
-
getGrabberState,
|
|
136
|
-
getBridgeInfo,
|
|
137
|
-
completeGrab,
|
|
138
|
-
clearGrabbedPayload,
|
|
139
|
-
captureBuffer,
|
|
140
|
-
cancelGrab,
|
|
141
|
-
buildDispatchPayload,
|
|
142
|
-
buildAnchorSelector,
|
|
143
|
-
buildAnchor,
|
|
144
|
-
bridgeFetch,
|
|
145
|
-
VitalsPanel,
|
|
146
|
-
VariantsPanel,
|
|
147
|
-
TokensPanel,
|
|
148
|
-
ShortcutRow,
|
|
149
|
-
SessionsPanel,
|
|
150
|
-
RoleSwitcherPanel,
|
|
151
|
-
PanelSection,
|
|
152
|
-
NetworkConsolePanel,
|
|
153
|
-
MockSeedPanel,
|
|
154
|
-
LoadingSpinner,
|
|
155
|
-
InfoRow,
|
|
156
|
-
HudUnlockPanel,
|
|
157
|
-
HudProvider,
|
|
158
|
-
Hud,
|
|
159
|
-
HUD_UNLOCK_COOKIE,
|
|
160
|
-
HUD_MOCK_COOKIE,
|
|
161
|
-
HUD_CAPABILITIES,
|
|
162
|
-
HUD_BUNDLE_MARKER,
|
|
163
|
-
FeatureFlagsPanel,
|
|
164
|
-
EnvInfoPanel,
|
|
165
|
-
DispatchPanel,
|
|
166
|
-
DebugInfoPanel,
|
|
167
|
-
CicdPanel,
|
|
168
|
-
CaptureBuffer,
|
|
169
|
-
CAPABILITY_MATRIX
|
|
170
|
-
};
|
package/lazy-panel.d.mts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { HudPanel, HudEnv } from './core/types.mjs';
|
|
3
|
-
import 'lucide-react';
|
|
4
|
-
|
|
5
|
-
type HudPanelMeta = Omit<HudPanel, "content">;
|
|
6
|
-
/**
|
|
7
|
-
* Declare a panel whose code is only fetched where its capability is granted.
|
|
8
|
-
*
|
|
9
|
-
* The provider already drops panels the tier denies, but that happens at
|
|
10
|
-
* render, and the panel's module is still in the graph, so an observe-only
|
|
11
|
-
* production hud downloads the dispatch, seed and impersonation panels it can
|
|
12
|
-
* never open. Returning `null` here instead keeps `lazy()`'s `import()`
|
|
13
|
-
* unreached, so the bundler emits those panels as separate chunks and the
|
|
14
|
-
* browser never asks for them.
|
|
15
|
-
*
|
|
16
|
-
* Callers spread the result and filter: the array shape stays declarative.
|
|
17
|
-
*
|
|
18
|
-
* ```tsx
|
|
19
|
-
* const PANELS = [
|
|
20
|
-
* { id: "env", ..., content: <EnvInfoPanel /> },
|
|
21
|
-
* hudLazyPanel(HUD_ENV, { id: "dispatch", ..., capability: "dispatch.hermes" },
|
|
22
|
-
* () => import("@hn-monorepo/hud/panels/dispatch-panel").then((m) => m.DispatchPanel)),
|
|
23
|
-
* ].filter((panel): panel is HudPanel => panel !== null);
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
declare function hudLazyPanel(meta: HudPanelMeta, load: () => Promise<ComponentType>, env?: HudEnv): HudPanel | null;
|
|
27
|
-
|
|
28
|
-
export { type HudPanelMeta, hudLazyPanel };
|
package/lazy-panel.js
DELETED
package/panels/cicd-panel.d.mts
DELETED
package/panels/cicd-panel.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CicdPanel
|
|
3
|
-
} from "../chunk-zzrpd92r.js";
|
|
4
|
-
import"../chunk-xezxydm3.js";
|
|
5
|
-
import"../chunk-wspz08q7.js";
|
|
6
|
-
import"../chunk-kyeb6qeq.js";
|
|
7
|
-
import"../chunk-xztw0xyt.js";
|
|
8
|
-
import"../chunk-babjpqkb.js";
|
|
9
|
-
import"../chunk-v086j53b.js";
|
|
10
|
-
import"../chunk-5gtx3pza.js";
|
|
11
|
-
export {
|
|
12
|
-
CicdPanel
|
|
13
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
interface HudUserInfo {
|
|
4
|
-
name?: string;
|
|
5
|
-
email?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
role?: string;
|
|
8
|
-
/** App-specific extras (organization, tier, locale, …). */
|
|
9
|
-
extra?: Record<string, string>;
|
|
10
|
-
}
|
|
11
|
-
interface DebugInfoPanelProps {
|
|
12
|
-
user?: HudUserInfo;
|
|
13
|
-
isLoading?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Session + environment snapshot. Harvested from nexus-lms' dev toolbar and
|
|
17
|
-
* genericized: the app feeds its user via props instead of app hooks.
|
|
18
|
-
*/
|
|
19
|
-
declare function DebugInfoPanel({ user, isLoading }: DebugInfoPanelProps): react.JSX.Element;
|
|
20
|
-
|
|
21
|
-
export { DebugInfoPanel, type DebugInfoPanelProps, type HudUserInfo };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Element grabber → agent dispatch. Local Claude runs go through docket via
|
|
5
|
-
* the bridge (no second dispatcher); queue markers are the human-in-loop
|
|
6
|
-
* fallback; Hermes goes through the console hub.
|
|
7
|
-
*/
|
|
8
|
-
declare function DispatchPanel(): react.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { DispatchPanel };
|
package/panels/dispatch-panel.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DispatchPanel
|
|
3
|
-
} from "../chunk-6gw4x08j.js";
|
|
4
|
-
import"../chunk-50pq4sg6.js";
|
|
5
|
-
import"../chunk-82nm9wcg.js";
|
|
6
|
-
import"../chunk-wspz08q7.js";
|
|
7
|
-
import"../chunk-kyeb6qeq.js";
|
|
8
|
-
import"../chunk-xztw0xyt.js";
|
|
9
|
-
import"../chunk-babjpqkb.js";
|
|
10
|
-
import"../chunk-v086j53b.js";
|
|
11
|
-
import"../chunk-5gtx3pza.js";
|
|
12
|
-
export {
|
|
13
|
-
DispatchPanel
|
|
14
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* What runs here right now: app, resolved hud env, build context, and the
|
|
5
|
-
* live capability matrix column — the canonical first tab of every hud.
|
|
6
|
-
*/
|
|
7
|
-
declare function EnvInfoPanel(): react.JSX.Element;
|
|
8
|
-
|
|
9
|
-
export { EnvInfoPanel };
|
package/panels/env-info-panel.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EnvInfoPanel
|
|
3
|
-
} from "../chunk-0cj8dkk7.js";
|
|
4
|
-
import"../chunk-wspz08q7.js";
|
|
5
|
-
import"../chunk-kyeb6qeq.js";
|
|
6
|
-
import"../chunk-xztw0xyt.js";
|
|
7
|
-
import"../chunk-babjpqkb.js";
|
|
8
|
-
import"../chunk-v086j53b.js";
|
|
9
|
-
import"../chunk-5gtx3pza.js";
|
|
10
|
-
export {
|
|
11
|
-
EnvInfoPanel
|
|
12
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
interface HudFlagDescriptor {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
category?: string;
|
|
8
|
-
defaultValue: boolean;
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface HudFlagsAdapter {
|
|
12
|
-
flags: HudFlagDescriptor[];
|
|
13
|
-
isLoading?: boolean;
|
|
14
|
-
onToggle: (flagId: string) => Promise<void> | void;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Feature-flag switches over an app-provided adapter. Harvested from
|
|
18
|
-
* nexus-lms' dev toolbar; the per-app FLAG_REGISTRY + admin hook moved
|
|
19
|
-
* behind `HudFlagsAdapter` (flag registries are still per-app — see the
|
|
20
|
-
* hud plan's deferred consolidation item).
|
|
21
|
-
*/
|
|
22
|
-
declare function FeatureFlagsPanel({ adapter }: {
|
|
23
|
-
adapter: HudFlagsAdapter;
|
|
24
|
-
}): react.JSX.Element;
|
|
25
|
-
|
|
26
|
-
export { FeatureFlagsPanel, type HudFlagDescriptor, type HudFlagsAdapter };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Toggles every mounted state boundary (`StateBoundary` from
|
|
5
|
-
* `@hn-monorepo/hud/state-boundary`) between its real state and a forced
|
|
6
|
-
* loading, empty or error. Toggles live in memory: a reload returns every
|
|
7
|
-
* boundary to auto, so a forgotten toggle cannot outlive the tab's page.
|
|
8
|
-
*/
|
|
9
|
-
declare function ForceStatePanel(): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { ForceStatePanel };
|