chamba 0.1.0 → 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.
- package/README.md +50 -2
- package/dist/cli.js +662 -161
- package/dist/server.js +355 -111
- package/inject/annotate.js +18 -49
- package/package.json +6 -7
- package/skill/SKILL.md +67 -187
- package/web/assets/highlighted-body-OFNGDK62-Bn4Eu7CG.js +1 -0
- package/web/assets/index-B9DI4F1Z.js +202 -0
- package/web/assets/index-DK_n6CTo.css +2 -0
- package/web/assets/mermaid-GHXKKRXX-CEMduc-U.js +1 -0
- package/web/index.html +17 -2
- package/web/assets/abnfDiagram-VRR7QNED-aw1_rWFY.js +0 -1
- package/web/assets/arc-BMhSK0Sy.js +0 -1
- package/web/assets/architectureDiagram-ZJ3FMSHR-BZDcNKY3.js +0 -36
- package/web/assets/blockDiagram-677ZJIJ3-CLVR_gtH.js +0 -132
- package/web/assets/c4Diagram-LMCZKHZV-YjWWkNOJ.js +0 -10
- package/web/assets/channel-8ymR7Shm.js +0 -1
- package/web/assets/chunk-2Q5K7J3B-Bd9qqRl0.js +0 -1
- package/web/assets/chunk-32BRIVSS-Cq9EhooX.js +0 -1
- package/web/assets/chunk-5VM5RSS4-DYxyelz5.js +0 -15
- package/web/assets/chunk-EX3LRPZG-COaiqIlv.js +0 -231
- package/web/assets/chunk-JWPE2WC7-CMWXKnkF.js +0 -1
- package/web/assets/chunk-MOJQB5TN-BRzAoPL7.js +0 -88
- package/web/assets/chunk-RYQCIY6F-BRght6pl.js +0 -1
- package/web/assets/chunk-V7JOEXUC-BlbCYGxG.js +0 -206
- package/web/assets/chunk-VR4S4FIN-CPoKxaoM.js +0 -1
- package/web/assets/chunk-XXDRQBXY-DeNDfu5r.js +0 -1
- package/web/assets/classDiagram-OUVF2IWQ-g3gy3kDO.js +0 -1
- package/web/assets/classDiagram-v2-EOCWNBFH-g3gy3kDO.js +0 -1
- package/web/assets/cose-bilkent-JH36ORCC-C_V1sCw0.js +0 -1
- package/web/assets/cynefin-VYW2F7L2-CtWqChj_.js +0 -178
- package/web/assets/cynefinDiagram-TSTJHNR4-Q0g7rhQg.js +0 -62
- package/web/assets/cytoscape.esm-DTSO7Bv0.js +0 -331
- package/web/assets/dagre-VKFMJZFB-spMt8V5o.js +0 -4
- package/web/assets/defaultLocale-DX6XiGOO.js +0 -1
- package/web/assets/diagram-FQU43EPY-CF7kRW9U.js +0 -3
- package/web/assets/diagram-G47NLZAW-B-5ygaqt.js +0 -24
- package/web/assets/diagram-NH7WQ7WH-CdOGPV2-.js +0 -24
- package/web/assets/diagram-OA4YK3LP-D1_1pb2t.js +0 -30
- package/web/assets/diagram-WEI45ONY-gD_xjCgB.js +0 -41
- package/web/assets/ebnfDiagram-CCIWWBDH-aW4E-V1v.js +0 -1
- package/web/assets/erDiagram-Q63AITRT-BWndxFVg.js +0 -85
- package/web/assets/flowDiagram-23GEKE2U-CVc37qLo.js +0 -156
- package/web/assets/ganttDiagram-NO4QXBWP-DV-2BraZ.js +0 -292
- package/web/assets/gitGraphDiagram-IHSO6WYX-YCy7dADs.js +0 -106
- package/web/assets/graph-C9eacEi8.js +0 -1
- package/web/assets/highlighted-body-OFNGDK62-q_mVDG84.js +0 -1
- package/web/assets/index-BG6acTBk.css +0 -1
- package/web/assets/index-CBBSnvKL.js +0 -335
- package/web/assets/infoDiagram-FWYZ7A6U-ig4wRILz.js +0 -2
- package/web/assets/init-Gi6I4Gst.js +0 -1
- package/web/assets/ishikawaDiagram-FXEZZL3T-BE8nJNWr.js +0 -70
- package/web/assets/journeyDiagram-5HDEW3XC-_olL4LFF.js +0 -139
- package/web/assets/kanban-definition-HUTT4EX6-DTFmbw9d.js +0 -89
- package/web/assets/katex-C5jXJg4s.js +0 -257
- package/web/assets/layout-DEXfKzaS.js +0 -1
- package/web/assets/linear-CbmtQHdI.js +0 -1
- package/web/assets/map-Czzmt4hB.js +0 -1
- package/web/assets/mermaid.core-CyLpSBwh.js +0 -314
- package/web/assets/mindmap-definition-LN4V7U3C-BFXQ_blT.js +0 -96
- package/web/assets/ordinal-Cboi1Yqb.js +0 -1
- package/web/assets/pegDiagram-2B236MQR-BzFkomCY.js +0 -1
- package/web/assets/pieDiagram-ENE6RG2P-r6gWlwuV.js +0 -39
- package/web/assets/quadrantDiagram-ABIIQ3AL-DTFxtS0e.js +0 -7
- package/web/assets/railroadDiagram-RFXS5EU6-CbZAYLVe.js +0 -1
- package/web/assets/requirementDiagram-TGXJPOKE-DzGi5GvN.js +0 -84
- package/web/assets/sankeyDiagram-HTMAVEWB-CBWOwAUD.js +0 -40
- package/web/assets/sequenceDiagram-DBY2YBRQ-QX9rQ9ow.js +0 -162
- package/web/assets/sizeCapture-X5ZJPWSS-X8SU5JUW.js +0 -1
- package/web/assets/stateDiagram-2N3HPSRC-kQgWzKK8.js +0 -1
- package/web/assets/stateDiagram-v2-6OUMAXLB-2kXWc9Fv.js +0 -1
- package/web/assets/swimlanes-5IMT3BWC-eKT1_uaa.js +0 -2
- package/web/assets/swimlanesDiagram-G3AALYLV-B5i-k7ui.js +0 -8
- package/web/assets/timeline-definition-FHXFAJF6-BRKXt19C.js +0 -120
- package/web/assets/vennDiagram-L72KCM5P-C-mbeAXb.js +0 -34
- package/web/assets/wardleyDiagram-EHGQE667-Doojx4Uh.js +0 -78
- package/web/assets/xychartDiagram-FW5EYKEG-CQZh8Trp.js +0 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# chamba
|
|
2
2
|
|
|
3
|
-
A browser workspace
|
|
3
|
+
A browser workspace beside your terminal coding agent - a rich parallel interface to the terminal chat.
|
|
4
4
|
|
|
5
5
|
## Quick start
|
|
6
6
|
|
|
@@ -10,10 +10,58 @@ Install the skill for your agent:
|
|
|
10
10
|
npx chamba@latest skill install
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Then, in your agent, run `/chamba` (or ask it to "open chamba").
|
|
13
|
+
Then, in your agent, run `/chamba` (or ask it to "open chamba").
|
|
14
|
+
It opens a browser workspace where you read rendered markdown, paste screenshots the agent can read, point at UI in the app tab, and view rich HTML pages the agent renders in the Illustration tab.
|
|
15
|
+
|
|
16
|
+
The browser is a second conversation beside the terminal: a background `chamba poll` keeps the agent listening for browser input while it stays available in the terminal, and each channel is answered where it was asked.
|
|
14
17
|
|
|
15
18
|
Add `--global` to install the skill for every project (`~/.claude/skills`).
|
|
16
19
|
|
|
20
|
+
## Testing
|
|
21
|
+
|
|
22
|
+
`pnpm check` is the full gate: typecheck (the packages plus the test sources, via `tsconfig.test.json`), lint, both builds (`inject`, `web`), then `pnpm test` and `pnpm test:e2e:flake`.
|
|
23
|
+
`pnpm test` runs Vitest's two projects (`unit` + `integration`).
|
|
24
|
+
`pnpm test:e2e` runs the Playwright suite once; `pnpm test:e2e:flake` repeats it three times with no retries so an intermittent failure cannot hide, and is the e2e variant the gate runs on every push.
|
|
25
|
+
`pnpm test:e2e:video` runs the suite once and records a video of every flow under `test-results/e2e/`, for watching the browser interactions.
|
|
26
|
+
|
|
27
|
+
| Path | Covers | Run by |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `packages/*/src/**/*.test.ts` | Unit tests colocated with each package (`shared`, `server`, `cli`, `inject`): pure schema and logic. | `pnpm test` (Vitest `unit` project, parallel). |
|
|
30
|
+
| `tests/integration/` | Integration: real server and CLI processes over real ports and the WebSocket transport (roundtrip, durability, annotations, attachments, issues, pages, references, binding, init, lifecycle). Shared helpers live in `tests/support/`. | `pnpm test` (Vitest `integration` project, sequential forks with long timeouts, since parallel port binding would flake). |
|
|
31
|
+
| `tests/e2e/` | End-to-end: a real browser drives the production web build against a real server and CLI, proving the human and agent exchange renders live. | `pnpm test:e2e` (Playwright, serial; `pretest:e2e` installs the browser first). |
|
|
32
|
+
| `tests/fixtures/` | Sample apps for the "Your app" surface: a Vite + React app on port 4001 and a Next.js app on port 4002. The e2e suite drives the React app as a cross-origin annotation target; both are runnable by hand for manual exploration. | `pnpm fixture:react`, `pnpm fixture:next` (see `tests/fixtures/README.md`). |
|
|
33
|
+
|
|
34
|
+
The e2e browser runs inside the dev container, which provides the Chromium system libraries and fonts it needs.
|
|
35
|
+
|
|
36
|
+
## Local package testing
|
|
37
|
+
|
|
38
|
+
`pnpm -s chamba` drives the working copy: it runs the source under tsx (no build) and resolves only inside this repo, so it is always the local version, never the published package.
|
|
39
|
+
|
|
40
|
+
### One command
|
|
41
|
+
|
|
42
|
+
From the repo root:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
pnpm try:chamba
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
It waits until the Next fixture is serving `:4002`, then drops you straight into a sandbox session in the same terminal tab.
|
|
49
|
+
This tab never starts the fixture itself, so it can never leave one running in the background.
|
|
50
|
+
If nothing is serving `:4002` yet, it prints the command to start the fixture and waits; open a separate tab in the repo root, run `pnpm dev:next` (or `pnpm re:dev:next` for a clean reinstall first), and this tab continues on its own once the port is up.
|
|
51
|
+
|
|
52
|
+
### The individual pieces
|
|
53
|
+
|
|
54
|
+
Each runs from the repo root; add `-w` (`pnpm -w dev:next`) to run it from any subdir.
|
|
55
|
+
|
|
56
|
+
- `pnpm dev:next` - Next fixture on `:4002` (fast; assumes deps are installed via `pnpm install`).
|
|
57
|
+
- `pnpm re:dev:next` - clean build dirs, reinstall, then the same (the container shadows `node_modules`, so this matters for a truly fresh run).
|
|
58
|
+
- `pnpm fixtures:stop` - stop the fixture dev servers (React on `:4001`, Next on `:4002`). Run it where the fixture runs (host or container); it kills only the fixture processes, never Docker's port forwarder.
|
|
59
|
+
- `npx totopo` - start the workspace's sandbox session; runs from anywhere under the repo.
|
|
60
|
+
- `pnpm -s chamba open` - inside the session, opens chamba and prints its URL.
|
|
61
|
+
|
|
62
|
+
Confirm the workspace publishes chamba's port with `CHAMBA_HOST=0.0.0.0` and `CHAMBA_PORT=4319`; the fixture's inject script targets `:4319`.
|
|
63
|
+
Then open the printed chamba URL, point the "Your app" tab at `:4002`, and do real work: paste a screenshot, annotate, ask the agent to show an illustration page.
|
|
64
|
+
|
|
17
65
|
---
|
|
18
66
|
|
|
19
67
|
A personal tool, published as-is with no stability promises.
|