beam-alpha 0.1.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.
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Public types for `@blueprint/dev` — hand-written and copied to dist, so the
3
+ * package's type surface never leaks internal imports (`@blueprint/shared`,
4
+ * node builtins) into a consumer's typecheck. Keep in step with
5
+ * `src/index.ts`; the starter's own `tsc` is the drift check.
6
+ */
7
+
8
+ /**
9
+ * Deliberately not vite's `Plugin`: naming it would bind this package to one
10
+ * physical vite installation, and with the package `file:`-linked (the dev
11
+ * repo, a pnpm workspace) the consumer's vite is a *different copy* whose
12
+ * private types don't unify. `{ name }` is the structural subset every vite
13
+ * accepts in `plugins: []`.
14
+ */
15
+ export interface BlueprintPlugin {
16
+ name: string
17
+ }
18
+
19
+ export interface BlueprintOptions {
20
+ /**
21
+ * Register `.blueprint/` as a Tailwind content source by appending
22
+ * `@source` to the entry stylesheet, so utility classes used only in
23
+ * sandbox files compile. On by default; the injection only happens when the
24
+ * folder exists and the stylesheet imports tailwindcss.
25
+ */
26
+ tailwindSource?: boolean
27
+ /**
28
+ * Stamp `data-bp-source="file:line"` on host JSX elements (dev serve only).
29
+ * On by default.
30
+ */
31
+ sourceIds?: boolean
32
+ /**
33
+ * Let Blueprint start a coding agent for this project. Off by default:
34
+ * this mounts `/__blueprint/api/runner/*`, routes that spawn the agent CLI
35
+ * you already have installed, with your login, in this project's root.
36
+ *
37
+ * `true` runs the first installed agent Blueprint knows; a name
38
+ * (`'claude'`, `'gemini'`, …) picks one; an object names the agent and its
39
+ * permission posture. Starting a turn, answering its permission prompts
40
+ * and changing the posture need the code the dev server prints in its
41
+ * terminal — any script on the dev origin shares the page, so the page
42
+ * alone is never enough.
43
+ *
44
+ * `permissionMode`: `'inherit'` (default) runs under your own Claude Code
45
+ * permission settings; `'auto'` adds `--permission-mode auto`. The
46
+ * canvas's Permissions row records the same choice in
47
+ * `.blueprint/agent.json`, which wins over this option.
48
+ */
49
+ agent?: boolean | string | { name?: string; permissionMode?: 'inherit' | 'auto' }
50
+ /**
51
+ * Require the code the dev server prints in its terminal before a
52
+ * privileged call — starting a turn, answering an approval, changing the
53
+ * permission posture, writing editor config. On by default.
54
+ *
55
+ * The code never enters the browser except through your hands, which is
56
+ * what separates you from every other script on your app's origin. Set it
57
+ * to `false` and no code is minted and none is asked for: anything running
58
+ * on the dev origin can then start your agent and approve its edits and
59
+ * commands. Right for a project whose page you trust as much as your
60
+ * terminal; wrong for anything else.
61
+ */
62
+ controlCode?: boolean
63
+ }
64
+
65
+ /**
66
+ * The Blueprint dev plugin: the canvas at `/__blueprint`, the probe in every
67
+ * served page (dormant unless the page is a Blueprint frame), virtual sandbox
68
+ * routes, and the pin/source transforms. Serve-only by construction — emits
69
+ * nothing into production builds.
70
+ *
71
+ * Put it FIRST in the plugins array: `plugins: [blueprint(), react(), tailwindcss()]`.
72
+ */
73
+ export declare function blueprint(options?: BlueprintOptions): BlueprintPlugin[]
74
+ export default blueprint