@chosengeneration/light-code 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Light Code contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # Light Code
2
+
3
+ A minimal agentic coding assistant, served to your browser from a local Node server.
4
+
5
+ Same agent as the [Light Code VS Code extension](https://marketplace.visualstudio.com/items?itemName=ChosenGeneration.light-code-vscode),
6
+ same config format, no editor required.
7
+
8
+ ```bash
9
+ npx @chosengeneration/light-code
10
+ ```
11
+
12
+ That starts a server on `127.0.0.1`, opens your browser, and works in the current folder.
13
+
14
+ ```bash
15
+ npx @chosengeneration/light-code --workspace /path/to/repo
16
+ npx @chosengeneration/light-code --port 7100 --no-open
17
+ npx @chosengeneration/light-code --help
18
+ ```
19
+
20
+ ## What it does
21
+
22
+ A chat UI with a small set of agent tools and nothing else:
23
+
24
+ - **Read and search** — `read_file`, `list_files`, `search_files` (ripgrep-backed)
25
+ - **Edit** — `write_to_file` and `apply_diff`, with a computed diff shown before anything
26
+ is written
27
+ - **Run commands** — in a real shell, one approval at a time
28
+ - **MCP tools** — stdio and Streamable HTTP servers, each tool individually toggleable
29
+ - **Ask a stronger model** — optional; consults the Claude CLI read-only for hard problems
30
+
31
+ Any OpenAI-compatible, Anthropic, or Gemini endpoint. Several named profiles, switchable
32
+ from the composer. Mutual-TLS and client-credentials auth for corporate gateways.
33
+
34
+ ## What it does not do
35
+
36
+ No telemetry, no update checks, no remote assets, and **no default endpoints** — a fresh
37
+ install contacts nothing until you configure a provider. Every host it ever talks to is one
38
+ you typed in.
39
+
40
+ It does **not** sandbox the code it runs. Shell commands, MCP servers and anything else the
41
+ agent executes on your instruction run with your privileges, exactly as if you had typed
42
+ them. The approval gate is what stands between the model and your machine; there is no
43
+ second layer behind it.
44
+
45
+ ## Security
46
+
47
+ Loopback is not a security boundary — any page you have open can send requests to
48
+ `127.0.0.1`. So the session is protected properly:
49
+
50
+ - Bound to the literal `127.0.0.1`, never `localhost`
51
+ - A single-use launch token in the URL fragment, exchanged for a session token that only
52
+ ever travels in an `Authorization` header — never a cookie, which is what CSRF exploits
53
+ - `Origin` and `Host` checked on every request, for CSRF and DNS rebinding respectively
54
+ - A strict CSP whose `connect-src 'self'` and `img-src 'self' data:` stop model output from
55
+ exfiltrating your screen through an image URL
56
+
57
+ Config, secrets and history live under your OS application-data directory, per user.
58
+ **Secrets are stored in an owner-only file, not an OS keychain** — the extension gets
59
+ DPAPI/Keychain through VS Code, the server has no equivalent without a native module, and
60
+ the UI says which backend is active rather than implying the stronger one.
61
+
62
+ ## Hosting it for a team
63
+
64
+ Possible, and the identity seam is built — but **read
65
+ [docs/hosting.md](https://github.com/chosengenerationdev/light-code/blob/main/docs/hosting.md)
66
+ first.** The agent runs commands as the *service account*, so single sign-on gives you
67
+ attribution and per-user storage but not privilege isolation. Until there is one OS account
68
+ or container per session, a shared deployment is only appropriate where every user is
69
+ already trusted with everything every other user can reach.
70
+
71
+ ## Licence
72
+
73
+ MIT.