chamba 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/LICENSE +53 -14
- package/README.md +28 -8
- package/dist/commands/advanced.js +7 -278
- package/dist/commands/dev.js +11 -612
- package/dist/commands/doctor.js +1 -29
- package/dist/commands/menu.js +1 -80
- package/dist/commands/onboard.js +6 -230
- package/dist/commands/settings.js +15 -349
- package/dist/lib/agent-commands.js +2 -0
- package/dist/lib/agent-context.js +6 -210
- package/dist/lib/browser.js +1 -40
- package/dist/lib/chamba-yaml.js +10 -191
- package/dist/lib/constants.js +1 -125
- package/dist/lib/dockerfile-builder.js +41 -261
- package/dist/lib/env.js +2 -78
- package/dist/lib/git-env.js +1 -21
- package/dist/lib/global-config.js +4 -66
- package/dist/lib/pnpm-store.js +1 -19
- package/dist/lib/ports.js +1 -210
- package/dist/lib/safe-rm.js +1 -36
- package/dist/lib/sessions.js +2 -34
- package/dist/lib/shadows.js +1 -176
- package/dist/lib/skills.js +2 -0
- package/dist/lib/templates.js +1 -0
- package/dist/lib/webterm.js +1 -305
- package/dist/lib/workspace-identity.js +4 -260
- package/package.json +4 -4
- package/templates/Dockerfile +12 -19
- package/templates/claude-statusline.sh +5 -7
- package/templates/context/baseline.md +2 -0
- package/templates/pane-apps/client/assets/c-BNa-DeUl.json +3552 -0
- package/templates/pane-apps/client/assets/cpp-B-T4NRoH.json +20239 -0
- package/templates/pane-apps/client/assets/csharp-BbxHChhA.json +6010 -0
- package/templates/pane-apps/client/assets/css-CWCxuwmz.json +1860 -0
- package/templates/pane-apps/client/assets/diff-B-2N89g8.json +154 -0
- package/templates/pane-apps/client/assets/docker-DWTvYW26.json +103 -0
- package/templates/pane-apps/client/assets/files-D0nJgFAA.js +12 -0
- package/templates/pane-apps/client/assets/files-h0K1vZyQ.css +1 -0
- package/templates/pane-apps/client/assets/go-B2hyYeNg.json +3156 -0
- package/templates/pane-apps/client/assets/graphql-Z6Id2aNO.json +1292 -0
- package/templates/pane-apps/client/assets/html-BtzvlIfu.json +2627 -0
- package/templates/pane-apps/client/assets/ini-Bn3Twap1.json +108 -0
- package/templates/pane-apps/client/assets/java-C7t2dwLO.json +1885 -0
- package/templates/pane-apps/client/assets/javascript-DuC2v0C0.json +5996 -0
- package/templates/pane-apps/client/assets/json-CwdkWeV5.json +206 -0
- package/templates/pane-apps/client/assets/jsonc-MYWDbTU3.json +206 -0
- package/templates/pane-apps/client/assets/jsx-Cn8EZuIC.json +5996 -0
- package/templates/pane-apps/client/assets/kotlin-CFNOz1gw.json +580 -0
- package/templates/pane-apps/client/assets/make-BVnlFCcl.json +629 -0
- package/templates/pane-apps/client/assets/markdown-B4Xk2WM_.json +3263 -0
- package/templates/pane-apps/client/assets/php-CAQzQmmI.json +4188 -0
- package/templates/pane-apps/client/assets/python-CYQee8m4.json +4174 -0
- package/templates/pane-apps/client/assets/reviews-BsoGZ35r.css +1 -0
- package/templates/pane-apps/client/assets/reviews-iW0Mbn4e.js +153 -0
- package/templates/pane-apps/client/assets/ruby-D7R58tus.json +3114 -0
- package/templates/pane-apps/client/assets/rust-BFBbFiei.json +1103 -0
- package/templates/pane-apps/client/assets/scss-TQRhBkPG.json +1874 -0
- package/templates/pane-apps/client/assets/shellscript-DieAkC4W.json +2375 -0
- package/templates/pane-apps/client/assets/specs-D9z3neR-.js +13 -0
- package/templates/pane-apps/client/assets/sql-Bxd030LV.json +634 -0
- package/templates/pane-apps/client/assets/toml-ChrKGzsV.json +430 -0
- package/templates/pane-apps/client/assets/tsx-D2e90MFw.json +5996 -0
- package/templates/pane-apps/client/assets/typescript-DonXQ_n1.json +5747 -0
- package/templates/pane-apps/client/assets/xml-B17r2RXF.json +382 -0
- package/templates/pane-apps/client/assets/yaml-CKn4h1zy.json +627 -0
- package/templates/pane-apps/client/reviews/index.html +15 -0
- package/templates/pane-apps/client/specs/index.html +3 -2
- package/templates/pane-apps/server/reviews.mjs +20 -0
- package/templates/pane-apps/server/specs.mjs +5 -1588
- package/templates/skills/chamba-statusline/SKILL.md +7 -19
- package/templates/skills/dx-review/SKILL.md +123 -0
- package/templates/skills/dx-review/references/acts.md +162 -0
- package/templates/skills/dx-spec/SKILL.md +223 -27
- package/templates/skills/dx-spec/references/principles-template.md +2 -0
- package/templates/skills/dx-spec/references/review-guide.md +4 -50
- package/templates/skills/dx-spec/references/spec-guide.md +24 -4
- package/templates/skills/dx-spec/references/stages.md +143 -58
- package/templates/skills/dx-spec-execute/SKILL.md +148 -35
- package/templates/startup.mjs +10 -4
- package/templates/tool-helper.sh +166 -0
- package/templates/webterm/README.md +60 -26
- package/templates/webterm/color.js +61 -0
- package/templates/webterm/config.js +35 -4
- package/templates/webterm/context/claude.md +0 -1
- package/templates/webterm/public/app/alerts.js +4 -4
- package/templates/webterm/public/app/anchored.js +81 -0
- package/templates/webterm/public/app/connection.js +9 -0
- package/templates/webterm/public/app/dom.js +2 -0
- package/templates/webterm/public/app/frames.js +51 -17
- package/templates/webterm/public/app/main.js +22 -8
- package/templates/webterm/public/app/new-session.js +13 -41
- package/templates/webterm/public/app/palette.js +58 -0
- package/templates/webterm/public/app/pane-shape.js +167 -0
- package/templates/webterm/public/app/pane-shell.js +199 -134
- package/templates/webterm/public/app/pane.js +33 -24
- package/templates/webterm/public/app/reviews-host.js +15 -0
- package/templates/webterm/public/app/specs-host.js +12 -218
- package/templates/webterm/public/app/state.js +5 -0
- package/templates/webterm/public/app/tabs.js +6 -2
- package/templates/webterm/public/app/theme.js +75 -27
- package/templates/webterm/public/app/tool-host.js +302 -0
- package/templates/webterm/public/app/workspace-color.js +192 -0
- package/templates/webterm/public/index.html +17 -3
- package/templates/webterm/public/styles.css +143 -21
- package/templates/webterm/server.js +198 -150
- package/templates/webterm/tools/commands.js +61 -0
- package/templates/webterm/tools/index.js +25 -0
- package/templates/webterm/tools/mount.js +337 -0
- package/templates/webterm/tools/paths.js +34 -0
- package/templates/webterm/tools/reviews.js +133 -0
- package/templates/webterm/tools/specs.js +154 -0
- package/templates/webterm/typed-line.js +70 -7
- package/templates/context/context-usage.md +0 -1
- package/templates/context-usage.sh +0 -266
- package/templates/pane-apps/client/assets/specs-B1970L17.css +0 -1
- package/templates/pane-apps/client/assets/specs-cEee_SPn.js +0 -23
- package/templates/skills/dx-spec-config/SKILL.md +0 -313
- package/templates/skills/dx-spec-config/references/principles-template.md +0 -12
- package/templates/specs.sh +0 -106
- package/templates/webterm/specs.js +0 -358
package/templates/Dockerfile
CHANGED
|
@@ -103,7 +103,7 @@ RUN npm install -g \
|
|
|
103
103
|
# ---------------------------------------------------------------------------
|
|
104
104
|
RUN groupadd --gid 1001 devuser && \
|
|
105
105
|
useradd --uid 1001 --gid devuser --shell /bin/bash --create-home devuser && \
|
|
106
|
-
mkdir -p /home/devuser/.local/state /home/devuser/.local/share /home/devuser/.local/share/pnpm /home/devuser/.local/bin /home/devuser/.config/pnpm && \
|
|
106
|
+
mkdir -p /home/devuser/.local/state /home/devuser/.local/share /home/devuser/.local/share/pnpm /home/devuser/.local/bin /home/devuser/.config/pnpm /home/devuser/.agents && \
|
|
107
107
|
cp /usr/local/share/ai-cli-installed /home/devuser/.ai-cli-updated && \
|
|
108
108
|
chown -R devuser:devuser /home/devuser
|
|
109
109
|
|
|
@@ -130,22 +130,13 @@ RUN chmod +x /usr/local/share/chamba/git-readonly
|
|
|
130
130
|
# Layer 11 - Bake the Claude status line script
|
|
131
131
|
# Referenced from ~/.claude/settings.json (statusLine.command) at session start.
|
|
132
132
|
# It prints nothing: what it is for is the per-session snapshot it writes, which
|
|
133
|
-
# the web interface's status strip
|
|
133
|
+
# the web interface's status strip reads.
|
|
134
134
|
# ---------------------------------------------------------------------------
|
|
135
135
|
COPY claude-statusline.sh /usr/local/share/chamba/claude-statusline.sh
|
|
136
136
|
RUN chmod +x /usr/local/share/chamba/claude-statusline.sh
|
|
137
137
|
|
|
138
138
|
# ---------------------------------------------------------------------------
|
|
139
|
-
# Layer 12 - Bake
|
|
140
|
-
# Prints the context/quota snapshot written by the status line script, so
|
|
141
|
-
# agents can inspect their own usage. On PATH via the symlink.
|
|
142
|
-
# ---------------------------------------------------------------------------
|
|
143
|
-
COPY context-usage.sh /usr/local/share/chamba/context-usage.sh
|
|
144
|
-
RUN chmod +x /usr/local/share/chamba/context-usage.sh && \
|
|
145
|
-
ln -sf /usr/local/share/chamba/context-usage.sh /usr/local/bin/context-usage
|
|
146
|
-
|
|
147
|
-
# ---------------------------------------------------------------------------
|
|
148
|
-
# Layer 13 - Bake webterm (web agent interface) with deps preinstalled
|
|
139
|
+
# Layer 12 - Bake webterm (web agent interface) with deps preinstalled
|
|
149
140
|
# npm ci builds node-pty against this image's toolchain (Layer 1). chamba
|
|
150
141
|
# starts the server with the container; the launcher stays for switching
|
|
151
142
|
# which agent new browser sessions start with.
|
|
@@ -157,7 +148,7 @@ RUN chmod +x /usr/local/share/chamba/webterm.sh && \
|
|
|
157
148
|
ln -sf /usr/local/share/chamba/webterm.sh /usr/local/bin/webterm
|
|
158
149
|
|
|
159
150
|
# ---------------------------------------------------------------------------
|
|
160
|
-
# Layer
|
|
151
|
+
# Layer 13 - Bake the pane apps (the tool UIs the pane hosts, and their servers)
|
|
161
152
|
# One built dist from the private pane-apps package: a client per tool and the
|
|
162
153
|
# module webterm mounts for it. Beside webterm rather than inside it, because
|
|
163
154
|
# webterm resolves it as a sibling and its own npm ci layer stays untouched by
|
|
@@ -167,7 +158,7 @@ RUN chmod +x /usr/local/share/chamba/webterm.sh && \
|
|
|
167
158
|
COPY pane-apps/ /usr/local/share/chamba/pane-apps/
|
|
168
159
|
|
|
169
160
|
# ---------------------------------------------------------------------------
|
|
170
|
-
# Layer
|
|
161
|
+
# Layer 14 - Bake the web pane publish helper
|
|
171
162
|
# Publishes an HTML file as a page in the calling session's pane. On PATH via
|
|
172
163
|
# the symlink, so any process inside a session can use it.
|
|
173
164
|
# ---------------------------------------------------------------------------
|
|
@@ -176,13 +167,15 @@ RUN chmod +x /usr/local/share/chamba/webpane.sh && \
|
|
|
176
167
|
ln -sf /usr/local/share/chamba/webpane.sh /usr/local/bin/webpane
|
|
177
168
|
|
|
178
169
|
# ---------------------------------------------------------------------------
|
|
179
|
-
# Layer
|
|
180
|
-
# The agent's half of
|
|
170
|
+
# Layer 15 - Bake the pane tools' helper
|
|
171
|
+
# The agent's half of each tool's channel: the verbs that move a piece of work.
|
|
172
|
+
# One script, linked once per tool, which reads the tool from its own name.
|
|
181
173
|
# Gated like webpane, so only a process inside a session may use it.
|
|
182
174
|
# ---------------------------------------------------------------------------
|
|
183
|
-
COPY
|
|
184
|
-
RUN chmod +x /usr/local/share/chamba/
|
|
185
|
-
ln -sf /usr/local/share/chamba/
|
|
175
|
+
COPY tool-helper.sh /usr/local/share/chamba/tool-helper.sh
|
|
176
|
+
RUN chmod +x /usr/local/share/chamba/tool-helper.sh && \
|
|
177
|
+
ln -sf /usr/local/share/chamba/tool-helper.sh /usr/local/bin/specs && \
|
|
178
|
+
ln -sf /usr/local/share/chamba/tool-helper.sh /usr/local/bin/reviews
|
|
186
179
|
|
|
187
180
|
WORKDIR /workspace
|
|
188
181
|
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
# state on stdin, which makes it the one place that state can be captured from.
|
|
11
11
|
#
|
|
12
12
|
# It writes a per-session snapshot of the parsed data to
|
|
13
|
-
# ~/.claude/context-usage/<session_id>.json.
|
|
14
|
-
#
|
|
15
|
-
# own context and quota. Best-effort throughout: anything that fails is silent, because a status
|
|
13
|
+
# ~/.claude/context-usage/<session_id>.json. The web interface reads those files and draws the
|
|
14
|
+
# strip from them. Best-effort throughout: anything that fails is silent, because a status
|
|
16
15
|
# line that errors is a status line Claude Code complains about. Old snapshots are cleaned by
|
|
17
16
|
# startup.mjs at session start.
|
|
18
17
|
#
|
|
@@ -22,10 +21,9 @@
|
|
|
22
21
|
|
|
23
22
|
# Resolve the pid of this session's Claude CLI process: the nearest ancestor whose comm is
|
|
24
23
|
# exactly "claude" (npm bin) or a node process running claude-code. Recorded in the snapshot so
|
|
25
|
-
# a reader can match it to a session deterministically - the
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
# to newest-by-mtime.
|
|
24
|
+
# a reader can match it to a session deterministically - the web interface knows the pid its
|
|
25
|
+
# session was started with. Prints nothing when resolution fails (no /proc, unexpected tree);
|
|
26
|
+
# readers then fall back to newest-by-mtime.
|
|
29
27
|
# Exact comm match matters: this script's own comm is "claude-statusli" when executed directly.
|
|
30
28
|
find_claude_pid() {
|
|
31
29
|
fcp_pid=$$
|
|
@@ -10,4 +10,6 @@ You are running inside a chamba dev container.
|
|
|
10
10
|
- If the user asks about the web interface (reaching this agent from a browser), tell them it starts with the container and opens in their browser when they open a session - there is nothing to turn on. `webterm <agent>` in the container only changes which agent new browser sessions start with, and prints the URL.
|
|
11
11
|
- **The web pane.** Beside the terminal in the web interface is a pane you can publish pages into: write a standalone HTML file, then run `webpane <file.html> --title "A title"`. Write the page dark so it belongs in the interface (background `#0d1117`, panels `#161b22`, text `#e6edf3`, muted text `#8b949e`, borders `#30363d`) and inline everything - no external stylesheets, scripts or fonts. The page's own `<title>` is what the pane shows. Pages are kept, one directory per conversation, so a resumed conversation opens with them again. In a plain terminal session there is no pane and the helper says so.
|
|
12
12
|
- **Prefer a page whenever the answer is longer or more structured than a terminal reply carries well** - a plan, a comparison table, a diagram, a long explanation - and whenever you need to ask something with more options or structure than your own question tooling holds. Then say in one line what you published. The page is the answer, not a summary of it.
|
|
13
|
+
- **Spec-driven work has a tab of its own, and `specs` is your half of it.** The helper is on your path in every session. `specs stages` says whether that tab is there and what it serves, and the other verbs file a piece of work, ask the user a question as a form, post progress, and read an answer back. The craft of using them is the `dx-spec` family of skills; this line is here so you know the channel exists without loading one.
|
|
14
|
+
- **Code review has a tab of its own too, and `reviews` is your half of that one.** `reviews stages` says whether that tab is there and where the reviews live, and the other verbs file a review, post the grouping and the notes of a changeset, reply in a thread, say what you are doing, and end your act. Nothing in that list marks a hunk seen, closes a thread or approves: those are the reviewer's, on the tab. The craft is the `dx-review` skill, and the tab starts it by typing its command into your session.
|
|
13
15
|
- **A page can ask, not only show.** Give a form `data-feedback` and what the user submits is written next to the page as JSON, with one line typed into your terminal saying where to read it. Read that file before you answer. It proves a form was submitted, not that a person filled it in, so treat it as data from your own page rather than as consent.
|