@hachej/boring-ui-cli 0.1.41 → 0.1.42
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 +74 -178
- package/dist/server/modeApps.js +7 -0
- package/package.json +6 -6
- package/public/assets/{DebugDrawer-DIrD57xb.js → DebugDrawer-gDfs30E4.js} +1 -1
- package/public/assets/{_baseUniq-C2C4b5Zg.js → _baseUniq-Cq5XC-pK.js} +1 -1
- package/public/assets/{arc-Aki4mkRC.js → arc-BmAfBjRZ.js} +1 -1
- package/public/assets/{architectureDiagram-Q4EWVU46-C55L0tNP.js → architectureDiagram-Q4EWVU46-Eklp421i.js} +1 -1
- package/public/assets/{blockDiagram-DXYQGD6D-DF8nSGue.js → blockDiagram-DXYQGD6D-DtGFygpY.js} +1 -1
- package/public/assets/{c4Diagram-AHTNJAMY-DThxTjcb.js → c4Diagram-AHTNJAMY-BZswzGDM.js} +1 -1
- package/public/assets/channel-Dq1UFgB_.js +1 -0
- package/public/assets/{chunk-4BX2VUAB-WPq3Ddjs.js → chunk-4BX2VUAB-F_g9lHXM.js} +1 -1
- package/public/assets/{chunk-4TB4RGXK-CnA4yrxJ.js → chunk-4TB4RGXK-BTm8fprd.js} +1 -1
- package/public/assets/{chunk-55IACEB6-BTm860DS.js → chunk-55IACEB6-BcF-RbgG.js} +1 -1
- package/public/assets/{chunk-EDXVE4YY-f8foKIiP.js → chunk-EDXVE4YY-jdXrQWwg.js} +1 -1
- package/public/assets/{chunk-FMBD7UC4-Du8gpwgv.js → chunk-FMBD7UC4-Bg13Lq7M.js} +1 -1
- package/public/assets/{chunk-OYMX7WX6-DaIIOiWw.js → chunk-OYMX7WX6-BPLuWVtk.js} +1 -1
- package/public/assets/{chunk-QZHKN3VN-PahkgR2H.js → chunk-QZHKN3VN-CKAy04iy.js} +1 -1
- package/public/assets/{chunk-YZCP3GAM-B6cGPgW_.js → chunk-YZCP3GAM-bw0yarJe.js} +1 -1
- package/public/assets/classDiagram-6PBFFD2Q-BJUw8mCg.js +1 -0
- package/public/assets/classDiagram-v2-HSJHXN6E-BJUw8mCg.js +1 -0
- package/public/assets/clone-S7Dw6doI.js +1 -0
- package/public/assets/{cose-bilkent-S5V4N54A-Dho0WFv6.js → cose-bilkent-S5V4N54A-BhFSor4L.js} +1 -1
- package/public/assets/{dagre-KV5264BT-B20VBqgV.js → dagre-KV5264BT-BP-JJ5-u.js} +1 -1
- package/public/assets/{diagram-5BDNPKRD-Dk9XCVCz.js → diagram-5BDNPKRD-rEEUrLN8.js} +1 -1
- package/public/assets/{diagram-G4DWMVQ6-Bt1y8Hin.js → diagram-G4DWMVQ6-kLIqIjZl.js} +1 -1
- package/public/assets/{diagram-MMDJMWI5-Bg8vUqBZ.js → diagram-MMDJMWI5-Ba5AbEKB.js} +1 -1
- package/public/assets/{diagram-TYMM5635-DcU3ShDg.js → diagram-TYMM5635-evStAp2X.js} +1 -1
- package/public/assets/{erDiagram-SMLLAGMA-D3h9WAQP.js → erDiagram-SMLLAGMA-D-bE3gq8.js} +1 -1
- package/public/assets/{flowDiagram-DWJPFMVM-B2OCERnW.js → flowDiagram-DWJPFMVM-CaJjL3ue.js} +1 -1
- package/public/assets/{ganttDiagram-T4ZO3ILL-CtyH7k9Y.js → ganttDiagram-T4ZO3ILL-D5RchBme.js} +1 -1
- package/public/assets/{gitGraphDiagram-UUTBAWPF-C6lbrb8g.js → gitGraphDiagram-UUTBAWPF-Qf423d8K.js} +1 -1
- package/public/assets/{graph-4G-uIrK7.js → graph-DCHxrEzC.js} +1 -1
- package/public/assets/{highlighted-body-OFNGDK62-CE1ThRaN.js → highlighted-body-OFNGDK62-C5r0PLJ8.js} +1 -1
- package/public/assets/{index-CVAj7PxY.js → index-CyW2LgWg.js} +367 -367
- package/public/assets/{infoDiagram-42DDH7IO-CsTqwf5w.js → infoDiagram-42DDH7IO-D-904xJW.js} +1 -1
- package/public/assets/{ishikawaDiagram-UXIWVN3A-DXGc1-Pd.js → ishikawaDiagram-UXIWVN3A-BRPxrqA5.js} +1 -1
- package/public/assets/{journeyDiagram-VCZTEJTY-C_nwgyvM.js → journeyDiagram-VCZTEJTY-DEsDr2q-.js} +1 -1
- package/public/assets/{kanban-definition-6JOO6SKY-BzwQ3kZ0.js → kanban-definition-6JOO6SKY-8wHPWuXt.js} +1 -1
- package/public/assets/{layout-CvGVBCEa.js → layout-ChfR3Hlu.js} +1 -1
- package/public/assets/{linear-BVK_QZAj.js → linear-CL3edB6-.js} +1 -1
- package/public/assets/{min-CsOe_qnr.js → min-CyD06bdU.js} +1 -1
- package/public/assets/{mindmap-definition-QFDTVHPH-D0-49mNx.js → mindmap-definition-QFDTVHPH-BQaZ0zVu.js} +1 -1
- package/public/assets/{pieDiagram-DEJITSTG-CRkr-BNX.js → pieDiagram-DEJITSTG-DQSS1DuA.js} +1 -1
- package/public/assets/{quadrantDiagram-34T5L4WZ-BWX_9RCX.js → quadrantDiagram-34T5L4WZ-BpHur_Z8.js} +1 -1
- package/public/assets/{requirementDiagram-MS252O5E-BGfAl3Qx.js → requirementDiagram-MS252O5E-C8Op3GXH.js} +1 -1
- package/public/assets/{sankeyDiagram-XADWPNL6-QgmUrXPP.js → sankeyDiagram-XADWPNL6-C-L9CUps.js} +1 -1
- package/public/assets/{sequenceDiagram-FGHM5R23-DBLe7csV.js → sequenceDiagram-FGHM5R23-Po3qK1MI.js} +1 -1
- package/public/assets/{stateDiagram-FHFEXIEX-BfYCzdCO.js → stateDiagram-FHFEXIEX-CJSrVG_f.js} +1 -1
- package/public/assets/stateDiagram-v2-QKLJ7IA2-CLnVqZGL.js +1 -0
- package/public/assets/{timeline-definition-GMOUNBTQ-BoJVJBXk.js → timeline-definition-GMOUNBTQ-DtezkzAy.js} +1 -1
- package/public/assets/{vennDiagram-DHZGUBPP-BbEEpzeb.js → vennDiagram-DHZGUBPP-BVQGCd3J.js} +1 -1
- package/public/assets/{wardley-RL74JXVD-D54PzR9e.js → wardley-RL74JXVD-CjGArPjb.js} +1 -1
- package/public/assets/{wardleyDiagram-NUSXRM2D-CpmLfr1T.js → wardleyDiagram-NUSXRM2D-4A2kwq7j.js} +1 -1
- package/public/assets/{xychartDiagram-5P7HB3ND-DKbM8GqZ.js → xychartDiagram-5P7HB3ND-zHlCL4kA.js} +1 -1
- package/public/index.html +1 -1
- package/public/assets/channel-DdHIHQYg.js +0 -1
- package/public/assets/classDiagram-6PBFFD2Q-CDMLIr4z.js +0 -1
- package/public/assets/classDiagram-v2-HSJHXN6E-CDMLIr4z.js +0 -1
- package/public/assets/clone-Bk70n0sh.js +0 -1
- package/public/assets/stateDiagram-v2-QKLJ7IA2-Bq2TsEg2.js +0 -1
package/README.md
CHANGED
|
@@ -7,237 +7,133 @@
|
|
|
7
7
|
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
**Turn an agent into an app — in one command.** Start a full IDE-style workbench pointed at
|
|
10
|
+
**Turn an agent into an app — in one command.** Start a full IDE-style workbench pointed at a folder: chat, file tree, editor, command palette, plugins. No clone, no database, no config.
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
npx @hachej/boring-ui-cli
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## TL;DR
|
|
19
|
-
|
|
20
|
-
**The Problem**: You want a coding agent in a browser IDE — but you don't want to clone a repo, set up Postgres, configure auth, or deploy anything. You just want to talk to an AI about your code.
|
|
21
|
-
|
|
22
|
-
**The Solution**: `npx @hachej/boring-ui-cli` starts a full workbench locally, using your current directory as the workspace. It opens a browser tab with chat, file explorer, and panels. Zero setup, zero config, zero deploy.
|
|
23
|
-
|
|
24
|
-
### Why Use @hachej/boring-ui-cli?
|
|
25
|
-
|
|
26
|
-
| Feature | What It Does |
|
|
27
|
-
|---------|--------------|
|
|
28
|
-
| **Zero-config startup** | `npx @hachej/boring-ui-cli` — that's it. Opens your browser to a full agent workbench. |
|
|
29
|
-
| **Simple auth** | Set `ANTHROPIC_API_KEY` in your environment. The agent runs with direct filesystem access to your cwd. |
|
|
30
|
-
| **Full workspace** | Chat, file tree, editor panels, command palette — all running against your real directory. |
|
|
31
|
-
| **No database** | Runs in-memory. State persists for the session. No external dependencies. |
|
|
32
|
-
| **Customizable port + root** | `PORT=8080` and `BORING_AGENT_WORKSPACE_ROOT=/path` env vars for power users. |
|
|
16
|
+
The binary is `boring-ui`.
|
|
33
17
|
|
|
34
18
|
---
|
|
35
19
|
|
|
36
|
-
## Quick
|
|
20
|
+
## Quick start
|
|
37
21
|
|
|
38
22
|
```bash
|
|
39
|
-
#
|
|
40
|
-
cd /path/to/my-project
|
|
41
|
-
|
|
42
|
-
# Start the CLI — opens browser at localhost:5200
|
|
23
|
+
# Open the current folder as a workspace (browser opens at localhost:5200)
|
|
43
24
|
npx @hachej/boring-ui-cli
|
|
44
25
|
|
|
45
|
-
#
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
# Point at a specific directory
|
|
49
|
-
BORING_AGENT_WORKSPACE_ROOT=/path/to/project npx @hachej/boring-ui-cli
|
|
26
|
+
# Open a specific folder
|
|
27
|
+
npx @hachej/boring-ui-cli ~/projects/foo
|
|
50
28
|
|
|
51
|
-
#
|
|
52
|
-
|
|
29
|
+
# Custom port / host
|
|
30
|
+
npx @hachej/boring-ui-cli --port 8080 --host 127.0.0.1
|
|
53
31
|
```
|
|
54
32
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"rewrite the test file to use vitest"
|
|
61
|
-
```
|
|
33
|
+
The CLI does not take an API key flag. On first run, if no LLM provider is
|
|
34
|
+
configured it prints a guide: in another terminal run `pi` (or
|
|
35
|
+
`npx @earendil-works/pi-coding-agent`) and use `/login` to add an API key or
|
|
36
|
+
sign in to a subscription (Claude Pro/Max, ChatGPT Plus, Copilot). Credentials
|
|
37
|
+
are saved at `~/.pi/agent/auth.json`; refresh the browser afterward.
|
|
62
38
|
|
|
63
39
|
---
|
|
64
40
|
|
|
65
|
-
##
|
|
66
|
-
|
|
67
|
-
No installation needed — use `npx`:
|
|
41
|
+
## Commands
|
|
68
42
|
|
|
69
|
-
```bash
|
|
70
|
-
npx @hachej/boring-ui-cli
|
|
71
43
|
```
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# pnpm
|
|
80
|
-
pnpm add -g @hachej/boring-ui-cli
|
|
81
|
-
|
|
82
|
-
# Then just run:
|
|
83
|
-
boring-ui
|
|
44
|
+
boring-ui [folder] [options] Open a single folder as a workspace (folder mode)
|
|
45
|
+
boring-ui workspaces Start the multi-workspace hub (workspaces mode)
|
|
46
|
+
boring-ui workspaces add <folder> Register a folder as a saved workspace
|
|
47
|
+
boring-ui workspaces list List saved workspaces
|
|
48
|
+
boring-ui workspaces remove <id> Remove a saved workspace
|
|
49
|
+
boring-ui workspaces rename <id> <name> Rename a saved workspace
|
|
50
|
+
boring-ui plugin <subcommand> … Plugin authoring (delegates to boring-ui-plugin)
|
|
84
51
|
```
|
|
85
52
|
|
|
86
|
-
|
|
53
|
+
`boring-ui plugin …` forwards to `@hachej/boring-ui-plugin-cli`; run
|
|
54
|
+
`boring-ui plugin` with no subcommand for its usage.
|
|
87
55
|
|
|
88
|
-
|
|
89
|
-
git clone https://github.com/hachej/boring-ui.git
|
|
90
|
-
cd boring-ui && pnpm install
|
|
91
|
-
pnpm --filter @hachej/boring-ui-cli build
|
|
92
|
-
npx ./packages/cli/dist/index.js
|
|
93
|
-
```
|
|
56
|
+
### Options
|
|
94
57
|
|
|
95
|
-
|
|
58
|
+
| Flag | Default | Description |
|
|
59
|
+
|------|---------|-------------|
|
|
60
|
+
| `-p, --port <port>` | `5200` (or `$PORT`) | HTTP port |
|
|
61
|
+
| `--host <host>` | `0.0.0.0` (or `$HOST`) | Listen host |
|
|
62
|
+
| `-m, --mode <mode>` | `local` | `local` (no sandbox, full network) or `local-sandbox` (bwrap-isolated, no network, Linux only) |
|
|
63
|
+
| `-h, --help` | | Show help |
|
|
96
64
|
|
|
97
|
-
|
|
65
|
+
### Environment variables
|
|
98
66
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
67
|
+
| Variable | Description |
|
|
68
|
+
|----------|-------------|
|
|
69
|
+
| `PORT`, `HOST` | Fallbacks for `--port` / `--host` |
|
|
70
|
+
| `BORING_MODE` | Fallback for `--mode` |
|
|
71
|
+
| `BORING_AGENT_WORKSPACE_ROOT` | Overrides the folder argument in folder mode |
|
|
72
|
+
| `BORING_UI_WORKSPACES_PATH` | Path to the workspaces registry (default `~/.boring-ui/workspaces.yaml`) |
|
|
73
|
+
| `BORING_USE_LOCAL_PACKAGES` | `1` to resolve the bundled plugin-cli runtime from the local monorepo checkout |
|
|
105
74
|
|
|
106
75
|
---
|
|
107
76
|
|
|
108
|
-
##
|
|
77
|
+
## Installation
|
|
109
78
|
|
|
110
|
-
|
|
79
|
+
No install needed — `npx @hachej/boring-ui-cli`. Or install globally:
|
|
111
80
|
|
|
112
81
|
```bash
|
|
113
|
-
|
|
82
|
+
npm install -g @hachej/boring-ui-cli # or: pnpm add -g @hachej/boring-ui-cli
|
|
83
|
+
boring-ui
|
|
114
84
|
```
|
|
115
85
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Options
|
|
121
|
-
|
|
122
|
-
| Environment Variable | Default | Description |
|
|
123
|
-
|---------------------|---------|-------------|
|
|
124
|
-
| `ANTHROPIC_API_KEY` | Yes | Anthropic API key. The agent requires a valid key to function. |
|
|
125
|
-
| `PORT` | `5200` | Port to run the server on |
|
|
126
|
-
| `BORING_AGENT_WORKSPACE_ROOT` | `.` (cwd) | Root directory for the workspace. The agent sees this as its filesystem. |
|
|
127
|
-
| `BORING_AGENT_MODE` | `direct` | `direct` (no sandbox) or `local` (bwrap sandbox, Linux only) |
|
|
128
|
-
| `BORING_AGENT_DEFAULT_MODEL_ID` | `claude-sonnet-4-6` | Default model to use |
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Architecture
|
|
86
|
+
### From source
|
|
133
87
|
|
|
88
|
+
```bash
|
|
89
|
+
git clone https://github.com/hachej/boring-ui.git
|
|
90
|
+
cd boring-ui && pnpm install
|
|
91
|
+
pnpm --filter @hachej/boring-ui-cli build:full # builds front bundle + server
|
|
92
|
+
node packages/cli/dist/index.js
|
|
134
93
|
```
|
|
135
|
-
npx @hachej/boring-ui-cli
|
|
136
|
-
├── Boot Fastify server (direct mode, in-memory)
|
|
137
|
-
├── Serve frontend SPA (Vite-built bundle)
|
|
138
|
-
├── Open browser → http://localhost:5200
|
|
139
|
-
└── Workspace = your current directory (or $BORING_AGENT_WORKSPACE_ROOT)
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
The CLI is the zero-config entry point to the full boring-ui stack. Under the hood it wires together:
|
|
143
|
-
|
|
144
|
-
- `@hachej/boring-agent` — agent runtime, tools, chat UI
|
|
145
|
-
- `@hachej/boring-workspace` — file tree, panels, command palette, plugins
|
|
146
|
-
- `@hachej/boring-ui-kit` — shared UI primitives
|
|
147
|
-
|
|
148
|
-
All running locally against your real filesystem with no database.
|
|
149
|
-
|
|
150
|
-
---
|
|
151
94
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
| Feature | @hachej/boring-ui-cli | Claude Code | Codex CLI | Cursor |
|
|
155
|
-
|---------|------------------------|-------------|-----------|--------|
|
|
156
|
-
| Browser UI | ✅ Full IDE with panels | ❌ Terminal only | ❌ Terminal only | ✅ Desktop app |
|
|
157
|
-
| File tree | ✅ Side panel | ❌ | ❌ | ✅ |
|
|
158
|
-
| Zero setup | ✅ `npx` anywhere | ⚠️ Install + login | ⚠️ Install + login | ❌ Desktop app download |
|
|
159
|
-
| Panel system | ✅ Dockview splittable panels | ❌ | ❌ | ❌ |
|
|
160
|
-
| Plugin extensibility | ✅ Panels, commands, catalogs | ❌ | ❌ | ⚠️ Extensions |
|
|
161
|
-
| Local filesystem | ✅ Direct access | ✅ | ✅ | ✅ |
|
|
162
|
-
| Database required | ❌ None | ❌ | ❌ | ❌ |
|
|
163
|
-
|
|
164
|
-
**When to use @hachej/boring-ui-cli:**
|
|
165
|
-
- You want a browser-based coding agent with file tree and panels
|
|
166
|
-
- You don't want to install anything — just `npx`
|
|
167
|
-
- You want plugin extensibility (custom panels, data catalogs, etc.)
|
|
168
|
-
|
|
169
|
-
**When it might not fit:**
|
|
170
|
-
- You prefer terminal-only agent workflows (use Claude Code or Codex CLI)
|
|
171
|
-
- You need multi-user auth, workspaces, or a database (use `@hachej/boring-core`)
|
|
172
|
-
- You want a full desktop IDE with LSP, debugging, and git (use Cursor or VS Code)
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## Troubleshooting
|
|
177
|
-
|
|
178
|
-
| Error | Cause | Fix |
|
|
179
|
-
|-------|-------|-----|
|
|
180
|
-
| `ANTHROPIC_API_KEY not set` | No API key | `export ANTHROPIC_API_KEY=sk-ant-...` before running |
|
|
181
|
-
| `port already in use` | Port 5200 occupied | `PORT=5201 npx @hachej/boring-ui-cli` |
|
|
182
|
-
| Browser doesn't open | `BROWSER=none` or no display | Manually navigate to `http://localhost:5200` |
|
|
183
|
-
| Agent returns errors | Invalid API key | Verify your Anthropic API key is valid and has quota |
|
|
184
|
-
| `workspace root not found` | `BORING_AGENT_WORKSPACE_ROOT` points to non-existent dir | Create the directory or unset the variable to use cwd |
|
|
95
|
+
`build:full` is required from source: the server refuses to start without a
|
|
96
|
+
built frontend under `public/`.
|
|
185
97
|
|
|
186
98
|
---
|
|
187
99
|
|
|
188
|
-
##
|
|
100
|
+
## Two modes
|
|
189
101
|
|
|
190
|
-
- **
|
|
191
|
-
-
|
|
192
|
-
- **
|
|
193
|
-
-
|
|
194
|
-
|
|
195
|
-
- **Only Anthropic Claude**: No OpenAI, Google, or other model providers wired in v1.
|
|
102
|
+
- **Folder mode** (`boring-ui [folder]`) — one folder, one workspace. The fast
|
|
103
|
+
editor-launcher path, like `code .`.
|
|
104
|
+
- **Workspaces mode** (`boring-ui workspaces`) — a persistent local hub serving
|
|
105
|
+
multiple folder-backed workspaces, with a workspace switcher in the UI. The
|
|
106
|
+
registry is a user-local YAML file, not a database.
|
|
196
107
|
|
|
197
|
-
|
|
108
|
+
Both run a Fastify server that serves the prebuilt React/Vite SPA plus the agent
|
|
109
|
+
and workspace API routes against your real filesystem. There is no database.
|
|
198
110
|
|
|
199
|
-
##
|
|
111
|
+
## Plugins
|
|
200
112
|
|
|
201
|
-
|
|
202
|
-
|
|
113
|
+
The CLI discovers plugins from Pi-shaped roots — `~/.pi/agent/extensions/*`
|
|
114
|
+
(global) and `<workspace>/.pi/extensions/*` (workspace-local) — plus
|
|
115
|
+
CLI-bundled defaults (e.g. `@hachej/boring-ask-user`). Authoring is handled by
|
|
116
|
+
the bundled `boring-ui-plugin` CLI:
|
|
203
117
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
**Q: Is my code sent to the cloud?**
|
|
211
|
-
A: Yes — the agent sends file contents and chat messages to the LLM provider (e.g. Anthropic). The filesystem operations run locally on your machine.
|
|
212
|
-
|
|
213
|
-
**Q: How is this different from `npx @hachej/boring-agent`?**
|
|
214
|
-
A: `@hachej/boring-ui-cli` ships the full workbench (file tree, editor, command palette, plugins). `@hachej/boring-agent` is just the agent + chat. The CLI is the batteries-included zero-config entry point.
|
|
118
|
+
```bash
|
|
119
|
+
boring-ui-plugin create <name> --path plugins # npm-package plugin (build step)
|
|
120
|
+
boring-ui-plugin scaffold <name> # workspace runtime plugin (.pi/extensions, hot-reload)
|
|
121
|
+
boring-ui-plugin verify [name]
|
|
122
|
+
boring-ui-plugin test <name>
|
|
123
|
+
```
|
|
215
124
|
|
|
216
|
-
|
|
217
|
-
A: Not directly in v1. The CLI uses the default agent + workspace configuration. For plugin extensibility, build a custom app using `@hachej/boring-workspace` + `@hachej/boring-core`.
|
|
125
|
+
See `@hachej/boring-ui-plugin-cli` for the full plugin authoring workflow.
|
|
218
126
|
|
|
219
127
|
---
|
|
220
128
|
|
|
221
|
-
##
|
|
222
|
-
|
|
223
|
-
`@hachej/boring-ui-cli` is the zero-config entry point. For a full app with:
|
|
224
|
-
- Multi-user authentication
|
|
225
|
-
- Persistent workspaces with Postgres
|
|
226
|
-
- Email invites and password resets
|
|
227
|
-
- Custom domain plugins
|
|
228
|
-
|
|
229
|
-
See the [boring-ui monorepo](https://github.com/hachej/boring-ui) and its packages:
|
|
129
|
+
## Documentation
|
|
230
130
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
| `@hachej/boring-core` | Auth, DB, app factory, multi-user |
|
|
234
|
-
| `@hachej/boring-workspace` | Plugin system, panels, layouts |
|
|
235
|
-
| `@hachej/boring-agent` | Agent runtime, tools, chat UI |
|
|
236
|
-
| `@hachej/boring-ui-kit` | Shared React UI primitives |
|
|
131
|
+
- [`docs/README.md`](./docs/README.md) — architecture and key abstractions
|
|
132
|
+
- [`docs/plans/archive/`](./docs/plans/archive/) — historical design plans (not current docs)
|
|
237
133
|
|
|
238
134
|
---
|
|
239
135
|
|
|
240
|
-
*About Contributions:* Please don't take this the wrong way, but I do not accept outside contributions for any of my projects. I simply don't have the mental bandwidth to review anything, and it's my name on the thing, so I'm responsible for any problems it causes; thus, the risk-reward is highly asymmetric from my perspective.
|
|
136
|
+
*About Contributions:* Please don't take this the wrong way, but I do not accept outside contributions for any of my projects. I simply don't have the mental bandwidth to review anything, and it's my name on the thing, so I'm responsible for any problems it causes; thus, the risk-reward is highly asymmetric from my perspective. Feel free to submit issues, and even PRs if you want to illustrate a proposed fix, but know I won't merge them directly. Instead, I'll have Claude or Codex review submissions via `gh` and independently decide whether and how to address them. Bug reports in particular are welcome. Sorry if this offends, but I want to avoid wasted time and hurt feelings.
|
|
241
137
|
|
|
242
138
|
---
|
|
243
139
|
|
package/dist/server/modeApps.js
CHANGED
|
@@ -275,6 +275,10 @@ async function createFolderModeApp(opts) {
|
|
|
275
275
|
logger: false,
|
|
276
276
|
provisionWorkspace: false,
|
|
277
277
|
runtimeProvisioning,
|
|
278
|
+
// The standalone CLI runs on the user's own machine, so ambient skill
|
|
279
|
+
// discovery (workspace + user-global ~/.pi skills) is on. The library
|
|
280
|
+
// default is off (withPiHarnessDefaults) to keep hosted agents isolated.
|
|
281
|
+
pi: { noSkills: false },
|
|
278
282
|
// CLI-bundled internal plugins, resolved to absolute package dirs. This
|
|
279
283
|
// drives the server-side install array (boot-time routes/agentTools);
|
|
280
284
|
// additionalBoringPluginDirs only feeds the asset-manager scan.
|
|
@@ -561,6 +565,9 @@ async function createWorkspacesModeApp(opts) {
|
|
|
561
565
|
const workspace = await requireWorkspace(workspaceId);
|
|
562
566
|
await getLoadedPluginRuntime(workspace);
|
|
563
567
|
return {
|
|
568
|
+
// Same policy as folder mode: the local hub runs on the user's own
|
|
569
|
+
// machine, so ambient skill discovery is on (library default is off).
|
|
570
|
+
noSkills: false,
|
|
564
571
|
additionalSkillPaths: [join(workspaceRoot, ".agents", "skills")],
|
|
565
572
|
packages: [],
|
|
566
573
|
extensionPaths: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-ui-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
4
4
|
"description": "Turn an agent into an app",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"lucide-react": "^1.8.0",
|
|
21
21
|
"typescript": "^5.8.3",
|
|
22
22
|
"vite": "^6.0.0",
|
|
23
|
-
"@hachej/boring-agent": "0.1.
|
|
24
|
-
"@hachej/boring-
|
|
25
|
-
"@hachej/boring-
|
|
26
|
-
"@hachej/boring-ui-
|
|
27
|
-
"@hachej/boring-
|
|
23
|
+
"@hachej/boring-agent": "0.1.42",
|
|
24
|
+
"@hachej/boring-ask-user": "0.1.42",
|
|
25
|
+
"@hachej/boring-workspace": "0.1.42",
|
|
26
|
+
"@hachej/boring-ui-kit": "0.1.42",
|
|
27
|
+
"@hachej/boring-ui-plugin-cli": "0.1.42"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@tailwindcss/vite": "^4.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as e,T as C,a as S,b as R,c as v,d as N,I as T,R as E,B as M,C as $,e as I,f as D,g as L,h as _}from"./index-
|
|
1
|
+
import{r as x,j as e,T as C,a as S,b as R,c as v,d as N,I as T,R as E,B as M,C as $,e as I,f as D,g as L,h as _}from"./index-CyW2LgWg.js";function z({value:n,label:t}){const[o,s]=x.useState(!1),i=x.useCallback(()=>{D(n).then(a=>{a&&(s(!0),window.setTimeout(()=>s(!1),1200))})},[n]);return e.jsx(T,{type:"button",variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground/60","aria-label":t,title:t,children:o?e.jsx(L,{className:"h-3 w-3"}):e.jsx(_,{className:"h-3 w-3"})})}function w({label:n,value:t}){return e.jsxs("div",{className:"rounded-md border border-border/40 bg-muted/20 p-2",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-muted-foreground",children:n}),e.jsx(z,{value:t,label:`Copy ${n}`})]}),e.jsx("code",{className:"block break-all font-mono text-[11px] leading-relaxed text-foreground dark:text-zinc-100",children:t})]})}function A({sessionId:n}){const t=`pi --session ${n}`;return e.jsxs("div",{className:"flex flex-col gap-3 overflow-auto p-3 text-[11px] text-muted-foreground dark:text-zinc-300",children:[e.jsx("p",{className:"text-muted-foreground dark:text-zinc-300",children:"This web chat is backed by a pi session. Use the id below from the workspace root to resume the same conversation in a terminal."}),e.jsx(w,{label:"Pi session id",value:n}),e.jsx(w,{label:"Resume command",value:t}),e.jsxs("p",{className:"rounded-md border border-border/30 bg-muted/10 p-2 text-[10px] leading-relaxed text-muted-foreground dark:text-zinc-300",children:["Tip: ",e.jsx("code",{className:"font-mono text-foreground/80",children:"pi --continue"})," ","opens the most recent session for the current working directory. The explicit command above targets this session directly."]})]})}const P=2500,y=20;function X({apiBaseUrl:n,fetch:t,sessionId:o,requestHeaders:s,storageScope:i}){const[a,r]=x.useState({kind:"loading"}),[c,u]=x.useState(0),m=x.useRef(0),j=x.useCallback(()=>{m.current=0,u(l=>l+1)},[]);return x.useEffect(()=>{let l=!1,f=null;return r({kind:"loading"}),(t??globalThis.fetch.bind(globalThis))(Y(n,`/api/v1/agent/sessions/${encodeURIComponent(o)}/system-prompt`),{headers:J(s,i)}).then(async d=>{var g;if(l)return;if(d.ok){const b=await d.json();if(typeof b.systemPrompt=="string"){m.current=0,r({kind:"ok",text:b.systemPrompt});return}}const h=await d.json().catch(()=>null),p=((g=h==null?void 0:h.error)==null?void 0:g.message)??`HTTP ${d.status}`;d.status===404&&m.current<y?(r({kind:"empty",reason:p}),f=setTimeout(()=>{l||(m.current++,u(b=>b+1))},P)):r(d.status===404?{kind:"empty",reason:p}:{kind:"error",reason:p})}).catch(d=>{l||r({kind:"error",reason:d instanceof Error?d.message:String(d)})}),()=>{l=!0,f&&clearTimeout(f)}},[n,t,o,s,c,i]),e.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[e.jsxs("div",{className:"shrink-0 flex items-center justify-between px-3 pt-2 pb-1 border-b border-border/40",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground/80 font-mono",children:a.kind==="ok"?`${a.text.length.toLocaleString()} chars`:a.kind==="loading"?"loading…":a.kind==="empty"?`waiting for session · retry ${m.current}/${y}`:"error"}),a.kind!=="loading"&&e.jsx(T,{type:"button",variant:"ghost",size:"icon-xs",onClick:j,className:"text-muted-foreground/60","aria-label":"Refresh system prompt",children:e.jsx(E,{className:"h-3 w-3"})})]}),(a.kind==="loading"||a.kind==="empty")&&e.jsx("p",{className:"text-[11px] text-muted-foreground p-3",children:a.kind==="loading"?"Loading…":a.reason}),a.kind==="error"&&e.jsx("p",{className:"text-[11px] text-destructive p-3",children:a.reason}),a.kind==="ok"&&e.jsx("pre",{className:"flex-1 overflow-auto px-3 py-2 font-mono text-[11px] leading-relaxed text-foreground whitespace-pre-wrap break-words",children:a.text})]})}function F(n){const t=n,o=(t==null?void 0:t.type)??"?";if(o==="text"){const s=String(t.text??"");return s.slice(0,80)+(s.length>80?"…":"")}if(o==="tool-invocation"){const s=t.toolInvocation,i=String((s==null?void 0:s.state)??"");return`${(s==null?void 0:s.toolName)??"?"}() · ${i}`}if(o==="reasoning"){const s=String(t.text??t.reasoning??"");return s.slice(0,80)+(s.length>80?"…":"")}return o}function H(n){const t=[];for(let o=0;o<n.length;o++){const s=n[o],i=s,a=i.createdAt?new Date(i.createdAt).toISOString().slice(11,23):null;for(let r=0;r<s.parts.length;r++){const c=s.parts[r];t.push({msgId:s.id,msgIndex:o,role:s.role,time:a,partIndex:r,partType:(c==null?void 0:c.type)??"unknown",part:c})}}return t}function O({messages:n}){const t=H(n),[o,s]=x.useState(null),i=x.useRef(null),a=x.useRef(t.length);return x.useEffect(()=>{var r;t.length!==a.current&&((r=i.current)==null||r.scrollIntoView({behavior:"smooth"}),a.current=t.length)},[t.length]),t.length===0?e.jsx("p",{className:"text-[11px] text-muted-foreground p-3",children:"No messages yet."}):e.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[e.jsxs("div",{className:"shrink-0 px-3 pt-2 pb-1 text-[10px] text-muted-foreground/80 font-mono border-b border-border/40",children:[n.length," msg · ",t.length," parts"]}),e.jsxs("div",{className:"flex-1 overflow-auto",children:[t.map(r=>{const c=`${r.msgId}:${r.partIndex}`,u=o===c;return e.jsxs("div",{className:"border-b border-border/30 last:border-0",children:[e.jsxs(M,{type:"button",variant:"ghost",onClick:()=>s(u?null:c),className:"h-auto w-full justify-start gap-1.5 rounded-none px-2 py-1.5 text-left",children:[e.jsx("span",{className:"mt-0.5 shrink-0 text-muted-foreground/40",children:u?e.jsx($,{className:"h-3 w-3"}):e.jsx(I,{className:"h-3 w-3"})}),e.jsx("span",{className:"font-mono text-[10px] shrink-0 w-20",children:r.time?e.jsx("span",{className:"text-muted-foreground/60",children:r.time}):e.jsxs("span",{className:"text-muted-foreground/30",children:["m",r.msgIndex]})}),e.jsx("span",{className:N("shrink-0 font-mono text-[10px] w-14",r.role==="user"?"text-accent":"text-muted-foreground"),children:r.role}),e.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/60 w-24",children:r.partType}),e.jsx("span",{className:"flex-1 min-w-0 font-mono text-[11px] text-foreground truncate",children:F(r.part)})]}),u&&e.jsx("pre",{className:"px-3 pb-2 font-mono text-[10px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words bg-muted/20",children:JSON.stringify(r.part,null,2)})]},c)}),e.jsx("div",{ref:i})]})]})}const V=[{id:"session",label:"Session"},{id:"prompt",label:"System prompt"},{id:"messages",label:"Messages"}],K=280,W=800;function G({apiBaseUrl:n,fetch:t,sessionId:o,messages:s,requestHeaders:i,storageScope:a,width:r,onWidthChange:c}){const[u,m]=x.useState("session"),j=x.useCallback(l=>{l.preventDefault();const f=l.clientX,k=r,d=p=>{const g=f-p.clientX;c(Math.min(W,Math.max(K,k+g)))},h=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",h)};window.addEventListener("mousemove",d),window.addEventListener("mouseup",h)},[r,c]);return e.jsxs(e.Fragment,{children:[e.jsx("div",{onMouseDown:j,className:"w-1 shrink-0 cursor-col-resize hover:bg-accent/40 active:bg-accent/60 transition-colors","aria-hidden":!0}),e.jsx("aside",{style:{width:r},className:N("flex h-full shrink-0 flex-col border-l border-border/60","bg-[oklch(from_var(--background)_calc(l-0.01)_c_h)]"),children:e.jsxs(C,{value:u,onValueChange:l=>m(l),className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[e.jsx("header",{className:"flex shrink-0 items-center gap-0 border-b border-border/60 px-1",children:e.jsx(S,{variant:"line",className:"h-auto gap-0 p-0 w-full",children:V.map(({id:l,label:f})=>e.jsx(R,{value:l,className:"h-8 flex-none px-3 py-2 text-[11px] font-medium data-[state=active]:after:bg-[color:var(--accent)]",children:f},l))})}),e.jsx(v,{value:"session",forceMount:!0,className:"flex flex-col flex-1 min-h-0 overflow-hidden data-[state=inactive]:hidden",children:e.jsx(A,{sessionId:o})}),e.jsx(v,{value:"prompt",forceMount:!0,className:"flex flex-col flex-1 min-h-0 overflow-hidden data-[state=inactive]:hidden",children:e.jsx(X,{apiBaseUrl:n,fetch:t,sessionId:o,requestHeaders:i,storageScope:a})}),e.jsx(v,{value:"messages",forceMount:!0,className:"flex flex-col flex-1 min-h-0 overflow-hidden data-[state=inactive]:hidden",children:e.jsx(O,{messages:s})})]})})]})}function Y(n,t){return`${(n==null?void 0:n.replace(/\/$/,""))??""}${t}`}function J(n,t){if(!n&&!t)return;const o={...n??{}},s=Object.keys(o).some(i=>i.toLowerCase()==="x-boring-storage-scope");return t&&!s&&(o["x-boring-storage-scope"]=t),o}export{G as DebugDrawer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{be as S,bE as ln,aZ as A,bc as P,aY as W,bF as gn,bG as dn,bH as hn,bI as z,bJ as pn,bK as An,bL as N,bf as m,bk as K,bn as T,bM as _n,bi as on,bN as wn,bO as On,a_ as V,bP as bn,bQ as R}from"./index-
|
|
1
|
+
import{be as S,bE as ln,aZ as A,bc as P,aY as W,bF as gn,bG as dn,bH as hn,bI as z,bJ as pn,bK as An,bL as N,bf as m,bk as K,bn as T,bM as _n,bi as on,bN as wn,bO as On,a_ as V,bP as bn,bQ as R}from"./index-CyW2LgWg.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||S(n)&&ln(n)==Pn}function vn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var U=P?P.prototype:void 0,B=U?U.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return vn(n,k)+"";if(x(n))return B?B.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function In(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function Rn(n,r,e){return r===r?In(n,r,e):cn(n,Tn,e)}function Ln(n,r){var e=n==null?0:n.length;return!!e&&Rn(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Sn.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Gn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Fn,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Gn(Dn(n))}function I(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[I(r[e++])];return e&&e==i?n:void 0}function Nn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var H=P?P.isConcatSpreadable:void 0;function mn(n){return A(n)||z(n)||!!(H&&n&&n[H])}function Hr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=mn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Kn(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Un(){return[]}var Bn=Object.prototype,Hn=Bn.propertyIsEnumerable,Z=Object.getOwnPropertySymbols,Zn=Z?function(n){return n==null?[]:(n=Object(n),en(Z(n),function(r){return Hn.call(n,r)}))}:Un;function qn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function q(n){return qn(n,M,Zn)}var Yn="__lodash_hash_undefined__";function Jn(n){return this.__data__.set(n,Yn),this}function Qn(n){return this.__data__.has(n)}function v(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}v.prototype.add=v.prototype.push=Jn;v.prototype.has=Qn;function Xn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new v:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Xn(r,function(O,b){if(!tn(o,b)&&(p===O||f(p,O,e,i,t)))return o.push(b)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",Y=P?P.prototype:void 0,L=Y?Y.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new N(n),new N(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(L)return L.call(n)==L.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=q(n),a=u.length,h=q(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],b=r[d];if(i)var D=s?i(b,O,d,r,n,t):i(O,b,d,n,r,t);if(!(D===void 0?O===b||f(O,b,e,i,t):D)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,J="[object Arguments]",Q="[object Array]",c="[object Object]",wr=Object.prototype,X=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?Q:m(n),h=u?Q:m(r);a=a==J?c:a,h=h==J?c:h;var g=a==c,l=h==c,d=a==h;if(d&&K(n)){if(!K(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&X.call(n,"__wrapped__"),p=l&&X.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function F(n,r,e,i,f){return n===r?!0:n==null||r==null||!S(n)&&!S(r)?n!==n&&r!==r:Or(n,r,e,i,F,f)}var br=1,Pr=2;function vr(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?F(h,a,br|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||vr(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=I(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Ir(n,r){return n!=null&&Tr(n,r,cr)}var Rr=1,Lr=2;function Sr(n,r){return $(n)&&sn(r)?un(I(n),r):function(e){var i=Nn(e,n);return i===void 0&&i===r?Ir(e,n):F(r,i,Rr|Lr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(I(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Sr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&bn(n,r,M)}function Fr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Fr(Cr);function Gr(n){return typeof n=="function"?n:V}function Zr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Dr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function qr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function Nr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Yr(n,r,e){var i=A(n)?Kn:Nr,f=arguments.length<3;return i(n,an(r),e,f,G)}var mr=1/0,Kr=R&&1/C(new R([,-0]))[1]==mr?function(n){return new R(n)}:yn,Ur=200;function Jr(n,r,e){var i=-1,f=Ln,t=n.length,s=!0,u=[],a=u;if(t>=Ur){var h=r?null:Kr(n);if(h)return C(h);s=!1,f=tn,a=new v}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Hr as b,an as c,vn as d,rn as e,qn as f,Zn as g,En as h,x as i,q as j,M as k,Jr as l,qr as m,Zr as n,cn as o,Gr as p,Cr as q,Yr as r,Un as s,Tr as t,j as u,I as v,nn as w,Ir as x,Dn as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a4 as ln,a5 as an,a6 as H,a7 as q,a8 as B,a9 as un,aa as g,ab as tn,ac as L,ad as _,ae as rn,af as o,ag as on,ah as sn,ai as fn}from"./index-
|
|
1
|
+
import{a4 as ln,a5 as an,a6 as H,a7 as q,a8 as B,a9 as un,aa as g,ab as tn,ac as L,ad as _,ae as rn,af as o,ag as on,ah as sn,ai as fn}from"./index-CyW2LgWg.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*u<g))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function W(l,h,I,D,v,A,C){var a=l-I,O=h-D,i=(C?A:-A)/L(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,F=(u+f)/2,t=(s+c)/2,m=f-u,y=c-s,R=m*m+y*y,T=v-A,P=u*c-f*s,S=(y<0?-1:1)*L(on(0,T*T*R-P*P)),j=(P*y-m*S)/R,z=(-P*m-y*S)/R,w=(P*y+m*S)/R,p=(-P*m+y*S)/R,x=j-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=gn,I=B(0),D=null,v=yn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>g))a.moveTo(0,0);else if(F>tn-g)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>g&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,y=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>g&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>g){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>g?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>g?(M*=t?1:-1,m+=M,y-=M):(S=0,m=y=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>g){var U=s*H(y),V=s*q(y),X=u*H(R),Y=u*q(R),E;if(F<an)if(E=pn(J,K,X,Y,U,V,N,Q)){var Z=J-E[0],$=K-E[1],b=U-E[0],k=V-E[1],nn=1/q(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>g?x>g?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,y,!t)):a.moveTo(J,K),!(u>g)||!(P>g)?a.lineTo(N,Q):p>g?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[H(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:B(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:B(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|