chamba 0.3.0 → 0.4.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 +21 -0
- package/README.md +47 -44
- package/bin/chamba.js +212 -0
- package/dist/commands/advanced.js +278 -0
- package/dist/commands/dev.js +619 -0
- package/dist/commands/doctor.js +29 -0
- package/dist/commands/menu.js +80 -0
- package/dist/commands/onboard.js +229 -0
- package/dist/commands/settings.js +349 -0
- package/dist/lib/agent-context.js +177 -0
- package/dist/lib/browser.js +40 -0
- package/dist/lib/chamba-yaml.js +191 -0
- package/dist/lib/constants.js +135 -0
- package/dist/lib/dockerfile-builder.js +267 -0
- package/dist/lib/env.js +78 -0
- package/dist/lib/global-config.js +66 -0
- package/dist/lib/pnpm-store.js +19 -0
- package/dist/lib/ports.js +210 -0
- package/dist/lib/safe-rm.js +26 -0
- package/dist/lib/sessions.js +34 -0
- package/dist/lib/shadows.js +174 -0
- package/dist/lib/webterm.js +490 -0
- package/dist/lib/workspace-identity.js +260 -0
- package/package.json +61 -24
- package/schema/chamba.schema.json +65 -0
- package/templates/.dockerignore +3 -0
- package/templates/Dockerfile +173 -0
- package/templates/claude-statusline.sh +120 -0
- package/templates/context/baseline.md +13 -0
- package/templates/context/context-usage.md +1 -0
- package/templates/context/git-mode-local.md +1 -0
- package/templates/context/git-mode-strict.md +1 -0
- package/templates/context/git-mode-unrestricted.md +1 -0
- package/templates/context/git-unavailable.md +1 -0
- package/templates/context/shadow-paths.md +3 -0
- package/templates/context-usage.sh +249 -0
- package/templates/git-readonly-wrapper.mjs +309 -0
- package/templates/npmrc +2 -0
- package/templates/pnpm-config.yaml +9 -0
- package/templates/runtime-constants.mjs +18 -0
- package/templates/skills/chamba-statusline/SKILL.md +79 -0
- package/templates/skills/context-usage/SKILL.md +53 -0
- package/templates/skills/web-pane/SKILL.md +62 -0
- package/templates/startup-git-mode.mjs +145 -0
- package/templates/startup.mjs +333 -0
- package/templates/webpane.sh +126 -0
- package/templates/webterm/README.md +157 -0
- package/templates/webterm/artifacts.js +583 -0
- package/templates/webterm/config.js +269 -0
- package/templates/webterm/context/claude.md +14 -0
- package/templates/webterm/conversation.js +248 -0
- package/templates/webterm/package-lock.json +884 -0
- package/templates/webterm/package.json +17 -0
- package/templates/webterm/pane.js +156 -0
- package/templates/webterm/proc.js +89 -0
- package/templates/webterm/public/app/alerts.js +472 -0
- package/templates/webterm/public/app/cards.js +123 -0
- package/templates/webterm/public/app/clipboard.js +229 -0
- package/templates/webterm/public/app/composer.js +226 -0
- package/templates/webterm/public/app/connection.js +342 -0
- package/templates/webterm/public/app/dictation.js +98 -0
- package/templates/webterm/public/app/dom.js +37 -0
- package/templates/webterm/public/app/drafts.js +244 -0
- package/templates/webterm/public/app/frames.js +166 -0
- package/templates/webterm/public/app/main.js +82 -0
- package/templates/webterm/public/app/new-session.js +188 -0
- package/templates/webterm/public/app/note.js +24 -0
- package/templates/webterm/public/app/pane-frame.js +166 -0
- package/templates/webterm/public/app/pane.js +353 -0
- package/templates/webterm/public/app/state.js +51 -0
- package/templates/webterm/public/app/status-strip.js +170 -0
- package/templates/webterm/public/app/tabs.js +475 -0
- package/templates/webterm/public/app/terminal.js +102 -0
- package/templates/webterm/public/app/theme.js +46 -0
- package/templates/webterm/public/favicon.svg +21 -0
- package/templates/webterm/public/index.html +105 -0
- package/templates/webterm/public/styles.css +1193 -0
- package/templates/webterm/server.js +1142 -0
- package/templates/webterm/sessions.js +515 -0
- package/templates/webterm/snapshot.js +135 -0
- package/templates/webterm.sh +167 -0
- package/dist/cli.js +0 -1691
- package/dist/server.js +0 -1919
- package/inject/annotate.js +0 -18
- package/skill/README.md +0 -12
- package/skill/SKILL.md +0 -93
- package/web/assets/highlighted-body-OFNGDK62-Bn4Eu7CG.js +0 -1
- package/web/assets/index-B9DI4F1Z.js +0 -202
- package/web/assets/index-DK_n6CTo.css +0 -2
- package/web/assets/mermaid-GHXKKRXX-CEMduc-U.js +0 -1
- package/web/index.html +0 -28
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<!-- A security control, not a convenience. This window's URL carries the interface key, and a page the
|
|
5
|
+
web pane renders in an iframe has no URL of its own: it falls back to THIS document's base URL, which
|
|
6
|
+
its own scripts can read as document.baseURI. Declaring a base here is what makes that fallback the
|
|
7
|
+
bare origin instead of a URL with the key on it. Every URL on this page is root-absolute, so it
|
|
8
|
+
changes nothing else. See app/pane-frame.js for the rest of the frame's model. -->
|
|
9
|
+
<base href="/" />
|
|
10
|
+
<meta charset="utf-8" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<title>chamba</title>
|
|
13
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
14
|
+
<link rel="stylesheet" href="/vendor/xterm/xterm.css" />
|
|
15
|
+
<link rel="stylesheet" href="/styles.css" />
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<!-- Session bar: one tab per live agent in this container, rendered by app/tabs.js. -->
|
|
19
|
+
<nav id="tabbar"></nav>
|
|
20
|
+
|
|
21
|
+
<div id="middle">
|
|
22
|
+
<div id="termwrap">
|
|
23
|
+
<main id="term"></main>
|
|
24
|
+
<!-- Take over / end session / limit reached, scoped to the terminal area. -->
|
|
25
|
+
<div id="overlay"><div id="card" class="card"></div></div>
|
|
26
|
+
<!-- Transient status ("copied 3 lines", upload and dictation errors), floating so it shifts nothing. -->
|
|
27
|
+
<span id="note"></span>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- The web pane, rendered by app/pane.js: the pages this session's agent published, with the chips
|
|
31
|
+
bar and the counter drawn out here by the interface, and the page itself inside a sandboxed
|
|
32
|
+
frame. Both it and its drag handle are hidden until the session has a page. -->
|
|
33
|
+
<div id="grip" hidden></div>
|
|
34
|
+
<aside id="pane" hidden>
|
|
35
|
+
<div id="pagebar">
|
|
36
|
+
<button type="button" id="pane-prev" class="pane-nav" title="Older pages" aria-label="Older pages" hidden>‹</button>
|
|
37
|
+
<div id="chips"></div>
|
|
38
|
+
<button type="button" id="pane-next" class="pane-nav" title="Newer pages" aria-label="Newer pages" hidden>›</button>
|
|
39
|
+
<span id="page-count"></span>
|
|
40
|
+
<!-- An arrow into the pane's own edge: put it away, that way. Inline because this bar is static
|
|
41
|
+
chrome, unlike the session bar's icons, which are drawn per frame. -->
|
|
42
|
+
<button type="button" id="pane-collapse" class="pane-nav" title="Collapse the web pane" aria-label="Collapse the web pane">
|
|
43
|
+
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
44
|
+
<path d="M4 12h11" />
|
|
45
|
+
<path d="M11 8l4 4-4 4" />
|
|
46
|
+
<path d="M20 5v14" />
|
|
47
|
+
</svg>
|
|
48
|
+
</button>
|
|
49
|
+
</div>
|
|
50
|
+
<div id="page-doc"></div>
|
|
51
|
+
<button type="button" id="spine" title="Open the web pane" aria-label="Open the web pane">
|
|
52
|
+
<span class="label"><span id="spine-badge" hidden></span> Web pane</span>
|
|
53
|
+
</button>
|
|
54
|
+
</aside>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- The status strip, drawn by app/status-strip.js from the snapshot the attached session's status line
|
|
58
|
+
wrote: model and effort, context against the window, quota left with its recharge countdown, and the
|
|
59
|
+
Claude Code version. Hidden until that session has a snapshot, and no session but a claude one ever
|
|
60
|
+
does. -->
|
|
61
|
+
<div id="strip" hidden></div>
|
|
62
|
+
|
|
63
|
+
<section id="composer">
|
|
64
|
+
<div id="input-wrap">
|
|
65
|
+
<textarea id="input" rows="2" placeholder="Type a message. Paste or drop an image. Enter sends, Shift+Enter for a newline, Up recalls the last one."></textarea>
|
|
66
|
+
<div id="composer-actions">
|
|
67
|
+
<button type="button" id="attach" class="icon-btn" title="Attach an image" aria-label="Attach an image">
|
|
68
|
+
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
69
|
+
<title>Attach an image</title>
|
|
70
|
+
<path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" />
|
|
71
|
+
</svg>
|
|
72
|
+
</button>
|
|
73
|
+
<button type="button" id="mic" class="icon-btn" title="Dictate" aria-label="Dictate">
|
|
74
|
+
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
75
|
+
<title>Dictate</title>
|
|
76
|
+
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" />
|
|
77
|
+
<path d="M19 10v2a7 7 0 0 1-14 0v-2" />
|
|
78
|
+
<line x1="12" y1="19" x2="12" y2="23" />
|
|
79
|
+
<line x1="8" y1="23" x2="16" y2="23" />
|
|
80
|
+
</svg>
|
|
81
|
+
</button>
|
|
82
|
+
<button type="button" id="send" class="icon-btn primary" title="Send (Enter)" aria-label="Send">
|
|
83
|
+
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
84
|
+
<title>Send</title>
|
|
85
|
+
<line x1="22" y1="2" x2="11" y2="13" />
|
|
86
|
+
<polygon points="22 2 15 22 11 13 2 9 22 2" />
|
|
87
|
+
</svg>
|
|
88
|
+
</button>
|
|
89
|
+
<input type="file" id="file-input" accept="image/*" hidden />
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</section>
|
|
93
|
+
|
|
94
|
+
<!-- Page-level curtain: the one state for "this window cannot do anything at all" - the container is
|
|
95
|
+
gone, its key is no longer the live one, or it is being stopped. It covers the bar, the terminal
|
|
96
|
+
and the composer on purpose, so nothing on a dead page still takes clicks. -->
|
|
97
|
+
<div id="curtain"><div id="curtain-card" class="card"></div></div>
|
|
98
|
+
|
|
99
|
+
<script src="/vendor/xterm/xterm.js"></script>
|
|
100
|
+
<script src="/vendor/xterm-fit/addon-fit.js"></script>
|
|
101
|
+
<!-- The page is ES modules under /app/, no build step. xterm and its fit addon above are plain scripts and
|
|
102
|
+
are on window by the time a module runs, since a module script is deferred. -->
|
|
103
|
+
<script type="module" src="/app/main.js"></script>
|
|
104
|
+
</body>
|
|
105
|
+
</html>
|