@hansenexus/hud 0.7.0 → 0.8.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 +111 -14
- package/dist/{access-Bc709qpl.d.ts → access-CwPCPsv0.d.ts} +1 -1
- package/dist/auto/runtime.d.ts +9 -9
- package/dist/auto.d.ts +2 -2
- package/dist/auto.js +1 -1
- package/dist/cli.js +34 -1
- package/dist/{define-hud-DTv3njuU.d.ts → define-hud-B0aFXrcK.d.ts} +1 -1
- package/dist/{design-BXG1a4we.js → design-BIXY1-Ex.js} +26 -8
- package/dist/{force-state-panel-mu-txJnA.js → force-state-panel-D5oDydLs.js} +1 -1
- package/dist/{handler-DMzSTqyG.d.ts → handler-BmFhaA2D.d.ts} +1 -1
- package/dist/{index-C3wzZS3o.d.ts → index-5B7foZut.d.ts} +2 -2
- package/dist/{index-D-hI-DRJ.d.ts → index-B2KCKkN0.d.ts} +1 -1
- package/dist/index-B7qaEUgh.d.ts +44 -0
- package/dist/{index-CQXiuMZQ.d.ts → index-BGFyuJyN.d.ts} +1 -1
- package/dist/{index-Caohnz3B.d.ts → index-BeqWehuh.d.ts} +38 -10
- package/dist/{index-BJJoAXJ2.d.ts → index-BqKysxTq.d.ts} +1 -1
- package/dist/{index-DLCSLWW4.d.ts → index-D97Fnoie.d.ts} +2 -2
- package/dist/{index-BR5OB7DO.d.ts → index-DS0yT0c-.d.ts} +1 -1
- package/dist/{index-BNoPbSYD.d.ts → index-DvlCkGB1.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +45 -196
- package/dist/navigation-CX6AXm7H.js +176 -0
- package/dist/next.d.ts +4 -1
- package/dist/next.js +12 -1
- package/dist/obstacles-CCmRFTcZ.js +176 -0
- package/dist/plugins/a11y.d.ts +1 -1
- package/dist/plugins/access/server.d.ts +3 -3
- package/dist/plugins/access.d.ts +2 -2
- package/dist/plugins/agent/server.js +1 -1
- package/dist/plugins/agent.d.ts +2 -2
- package/dist/plugins/capture.d.ts +2 -2
- package/dist/plugins/data/server.d.ts +1 -1
- package/dist/plugins/data/server.js +1 -1
- package/dist/plugins/data.d.ts +1 -1
- package/dist/plugins/design/server.d.ts +55 -15
- package/dist/plugins/design/server.js +187 -122
- package/dist/plugins/design.d.ts +3 -3
- package/dist/plugins/design.js +1 -1
- package/dist/plugins/inspect.d.ts +1 -1
- package/dist/plugins/observe.d.ts +1 -1
- package/dist/plugins/ops/server.d.ts +1 -1
- package/dist/plugins/ops.d.ts +1 -1
- package/dist/plugins/routes/server.d.ts +1 -1
- package/dist/plugins/routes.d.ts +3 -3
- package/dist/plugins/routes.js +381 -52
- package/dist/plugins/seo.d.ts +1 -1
- package/dist/plugins/vitals.d.ts +1 -1
- package/dist/{plugins-BZT-1LBe.d.ts → plugins-pL2CoWzI.d.ts} +7 -0
- package/dist/same-origin-BHuZO1_H.js +36 -0
- package/dist/server.d.ts +2 -2
- package/dist/store.d.ts +1 -1
- package/dist/store.js +1 -1
- package/dist/{meta-C_G7MB5w.d.ts → types-Dc6JWZR7.d.ts} +6 -6
- package/dist/variant-bar-BzZ0ln-C.js +768 -0
- package/dist/variant-picks-Byc0hC8a.js +144 -0
- package/dist/variants-export-vEtZ-OGC.js +75 -0
- package/dist/{variants-panel-B6zWcknV.js → variants-panel-D23v5KIp.js} +71 -54
- package/dist/variants-types-BOsZ5fDz.js +65 -0
- package/dist/variants-types-VkW7vFZF.d.ts +139 -0
- package/dist/variants.d.ts +1 -1
- package/dist/variants.js +1 -1
- package/dist/vite.d.ts +2 -2
- package/package.json +1 -1
- package/dist/index-B1vHAY9p.d.ts +0 -20
- package/dist/same-origin-BGet22CC.js +0 -21
- package/dist/variants-types-CcRf119M.d.ts +0 -63
package/package.json
CHANGED
package/dist/index-B1vHAY9p.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { u as HudPluginProps } from "./plugins-BZT-1LBe.js";
|
|
2
|
-
//#region src/plugins/routes/routes-panel.d.ts
|
|
3
|
-
declare function RoutesPanel({ ctx }: HudPluginProps): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/plugins/routes/index.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Route index: every page of the app's `app/` tree, dynamic segments filled
|
|
8
|
-
* from the fixtures the server half knows, one click away. Client half; the
|
|
9
|
-
* scanner lives in `@hansenexus/hud/plugins/routes/server`, which also feeds
|
|
10
|
-
* the `hud sweep` CLI.
|
|
11
|
-
*/
|
|
12
|
-
declare function routes(): {
|
|
13
|
-
readonly id: "routes";
|
|
14
|
-
readonly title: "Routes";
|
|
15
|
-
readonly capability: "routes.read";
|
|
16
|
-
readonly icon: import("react").ComponentType;
|
|
17
|
-
readonly panel: typeof RoutesPanel;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { routes as t };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//#region src/server/same-origin.ts
|
|
2
|
-
/**
|
|
3
|
-
* Refuses a state-changing request from another origin. A page elsewhere must
|
|
4
|
-
* not be able to write through the developer's browser: a JSON content type
|
|
5
|
-
* forces a CORS preflight that HUD routes never answer, and `Sec-Fetch-Site`
|
|
6
|
-
* rejects cross-site requests outright where the browser sends it.
|
|
7
|
-
*/
|
|
8
|
-
function refuseCrossSite(request) {
|
|
9
|
-
const site = request.headers.get("sec-fetch-site");
|
|
10
|
-
if (site && site !== "same-origin" && site !== "none") return Response.json({
|
|
11
|
-
ok: false,
|
|
12
|
-
error: "cross-site request refused"
|
|
13
|
-
}, { status: 403 });
|
|
14
|
-
if (!request.headers.get("content-type")?.toLowerCase().startsWith("application/json")) return Response.json({
|
|
15
|
-
ok: false,
|
|
16
|
-
error: "expected application/json"
|
|
17
|
-
}, { status: 415 });
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { refuseCrossSite as t };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
//#region src/plugins/design/variants-types.d.ts
|
|
2
|
-
/** Wire types shared by the Variants panel and `variantsServer()`. */
|
|
3
|
-
/** The store collection scores and decisions live in: `.hud/variants.json` with `file()`. */
|
|
4
|
-
declare const VARIANTS_COLLECTION = "variants";
|
|
5
|
-
type VariantStatus = "open" | "decided" | "rejected";
|
|
6
|
-
/**
|
|
7
|
-
* One variant's record. The store keys it `<group>:<id>`; an agent writes
|
|
8
|
-
* `score`, `rationale` and `scoredBy`, Decide writes `status` and `decidedAt`.
|
|
9
|
-
* Everything but `group` and `id` is optional, since the file is edited by hand.
|
|
10
|
-
*/
|
|
11
|
-
interface VariantRecord {
|
|
12
|
-
group: string;
|
|
13
|
-
id: string;
|
|
14
|
-
label?: string;
|
|
15
|
-
status?: VariantStatus;
|
|
16
|
-
/** Higher is better; the panel ranks by it. */
|
|
17
|
-
score?: number;
|
|
18
|
-
rationale?: string;
|
|
19
|
-
/** Who scored it, e.g. `claude-code`. */
|
|
20
|
-
scoredBy?: string;
|
|
21
|
-
/** ISO timestamp set by Decide on the winner. */
|
|
22
|
-
decidedAt?: string;
|
|
23
|
-
}
|
|
24
|
-
/** `GET <apiBase>/variants/`. */
|
|
25
|
-
interface VariantsListResponse {
|
|
26
|
-
ok: true;
|
|
27
|
-
records: VariantRecord[];
|
|
28
|
-
}
|
|
29
|
-
/** `POST <apiBase>/variants/:group/decide`. */
|
|
30
|
-
interface DecideBody {
|
|
31
|
-
/** The winner. */
|
|
32
|
-
id: string;
|
|
33
|
-
/** The group's label, for the brief. */
|
|
34
|
-
label?: string;
|
|
35
|
-
/** Every variant of the group as the page registers it, so losers get a record too. */
|
|
36
|
-
variants?: {
|
|
37
|
-
id: string;
|
|
38
|
-
label: string;
|
|
39
|
-
}[];
|
|
40
|
-
}
|
|
41
|
-
interface DecideResponse {
|
|
42
|
-
ok: true;
|
|
43
|
-
group: string;
|
|
44
|
-
id: string;
|
|
45
|
-
decidedAt: string;
|
|
46
|
-
/** The queued cleanup brief, or null when no dispatch provider is configured. */
|
|
47
|
-
queued: {
|
|
48
|
-
target: string;
|
|
49
|
-
runId: string;
|
|
50
|
-
detail?: string;
|
|
51
|
-
} | null;
|
|
52
|
-
/** The decision stuck but the brief did not go out. */
|
|
53
|
-
queueError?: string;
|
|
54
|
-
}
|
|
55
|
-
declare function recordKey(group: string, id: string): string;
|
|
56
|
-
/**
|
|
57
|
-
* A store entry as a `VariantRecord`: group and id come from the fields, or
|
|
58
|
-
* from a `<group>:<id>` key when the file omits them. Unknown fields are
|
|
59
|
-
* dropped, wrong types ignored; null when neither names the variant.
|
|
60
|
-
*/
|
|
61
|
-
declare function toVariantRecord(id: string, value: unknown): VariantRecord | null;
|
|
62
|
-
//#endregion
|
|
63
|
-
export { VariantStatus as a, toVariantRecord as c, VariantRecord as i, DecideResponse as n, VariantsListResponse as o, VARIANTS_COLLECTION as r, recordKey as s, DecideBody as t };
|