@venturewild/workspace 0.1.14 → 0.2.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.
Files changed (37) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +112 -112
  3. package/package.json +83 -76
  4. package/server/bin/wild-workspace.mjs +825 -763
  5. package/server/src/agent.mjs +453 -386
  6. package/server/src/bazaar/core.mjs +579 -0
  7. package/server/src/bazaar/index.mjs +75 -0
  8. package/server/src/bazaar/mcp-server.mjs +328 -0
  9. package/server/src/bazaar/mock-tickup.mjs +97 -0
  10. package/server/src/bazaar/preview-server.mjs +95 -0
  11. package/server/src/bazaar/seed-recipes/customer-feedback-form/know-how.md +23 -0
  12. package/server/src/bazaar/seed-recipes/customer-feedback-form/recipe.json +24 -0
  13. package/server/src/bazaar/seed-recipes/landing-page-launch/know-how.md +29 -0
  14. package/server/src/bazaar/seed-recipes/landing-page-launch/recipe.json +25 -0
  15. package/server/src/bazaar/seed-recipes/personal-portfolio/know-how.md +21 -0
  16. package/server/src/bazaar/seed-recipes/personal-portfolio/recipe.json +24 -0
  17. package/server/src/bazaar/seed-recipes/receipt-sorter/know-how.md +31 -0
  18. package/server/src/bazaar/seed-recipes/receipt-sorter/recipe.json +25 -0
  19. package/server/src/bazaar/seed-recipes/tickup-hr-matching/know-how.md +79 -0
  20. package/server/src/bazaar/seed-recipes/tickup-hr-matching/recipe.json +32 -0
  21. package/server/src/canvas/core.mjs +324 -0
  22. package/server/src/canvas/index.mjs +42 -0
  23. package/server/src/canvas/mcp-server.mjs +253 -0
  24. package/server/src/config.mjs +365 -365
  25. package/server/src/daemon-supervisor.mjs +216 -216
  26. package/server/src/inbox.mjs +86 -86
  27. package/server/src/index.mjs +1948 -1721
  28. package/server/src/logpaths.mjs +98 -98
  29. package/server/src/service.mjs +419 -419
  30. package/server/src/share.mjs +182 -148
  31. package/server/src/sync.mjs +248 -248
  32. package/server/src/turn-mcp.mjs +46 -0
  33. package/web/dist/assets/index-DVWgeTl_.js +91 -0
  34. package/web/dist/assets/index-Dl0VT5e6.css +1 -0
  35. package/web/dist/index.html +2 -2
  36. package/web/dist/assets/index-Bj-mdLGj.css +0 -1
  37. package/web/dist/assets/index-Dc6jo84c.js +0 -89
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 VentureWild
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 VentureWild
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 CHANGED
@@ -1,112 +1,112 @@
1
- # wild-workspace — Claude Code Web
2
-
3
- A Replit/Lovable-style **chat-first** browser UI that wraps the AI agent already installed on your machine (Claude Code by default; Gemini / GLM / Codex if present).
4
-
5
- > v0.1.1 — chat-first workspace + bmo-sync daemon (npm) + per-user proxy (b-ii) live. Implements PRD §5.5 (workspace-platform-prd.md v0.10).
6
-
7
- ## Quick start
8
-
9
- ```bash
10
- # recommended — global install from npm
11
- npm i -g @venturewild/workspace
12
- wild-workspace
13
- ```
14
-
15
- A global install pulls the matching **bmo-sync daemon** binary automatically for
16
- win32-x64 / darwin-x64 / darwin-arm64 / linux-x64 (shipped as `optionalDependencies`).
17
-
18
- To build from source instead (dev path):
19
-
20
- ```bash
21
- # install dependencies & web build
22
- npm install
23
- npm run build
24
-
25
- # launch
26
- node server/src/index.mjs
27
- # or after `npm install -g .`
28
- wild-workspace
29
- ```
30
-
31
- Opens `http://localhost:5173` in your default browser.
32
-
33
- ## What's in here
34
-
35
- ```
36
- wild-workspace/
37
- ├── server/ # Node.js Hono server + WebSocket bridge
38
- │ ├── bin/
39
- │ │ └── wild-workspace.mjs # CLI entry (the `bin` field)
40
- │ └── src/
41
- │ ├── index.mjs # server bootstrap
42
- │ ├── config.mjs # config + role definitions
43
- │ ├── agent.mjs # claude / gemini / glm / codex subprocess wrapper
44
- │ ├── account.mjs # login / account + slug claim
45
- │ ├── share.mjs # JWT share-token mint + verify
46
- │ ├── inbox.mjs # .wild/inbox.md watcher
47
- │ ├── fs.mjs # workspace file tree (collapsed by default)
48
- │ ├── activity.mjs # AI activity event bus
49
- │ ├── preview.mjs # dev-server port detection
50
- │ ├── sync.mjs # bmo-sync wiring
51
- │ ├── daemon-bin.mjs # resolves the platform daemon binary
52
- │ └── routes/ # REST + WS endpoints
53
- ├── web/ # React + Vite frontend
54
- │ └── src/
55
- │ ├── App.jsx # role-flagged React tree (partner / viewer / client)
56
- │ ├── components/ # Chat, Preview, FileTree, Onboarding, ShareDialog…
57
- │ └── state/ # session + chat stores
58
- ├── vw-proxy/ # Cloudflare Worker — public *.venturewild.llc front door
59
- ├── landing/ # marketing / landing page (Cloudflare Pages)
60
- └── docs/ # design notes (incl. b-ii-proxy-plan.md / -design.md)
61
- ```
62
-
63
- ## The three roles (AR-19)
64
-
65
- | Role | URL pattern | What they see |
66
- |---|---|---|
67
- | **partner** | `http://localhost:5173` | Chat + preview + file tree + terminal toggle + inbox + share + deploy |
68
- | **partner (published)** | `https://<user>.venturewild.llc` | Your workspace, live on your claimed per-user subdomain (e.g. `tuananh.venturewild.llc`) |
69
- | **viewer** | `https://<user>.venturewild.llc/<wsid>?t=<token>` | Chat history (read-only) + preview + presence + activity stream |
70
- | **client** | `https://workspace.<client>.com` | Chat + preview + "request changes" only |
71
-
72
- Same React tree, role-gated visibility (AR-19).
73
-
74
- ## AR-17: wrap don't embed
75
-
76
- We don't ship an AI agent. `server/src/agent.mjs` spawns `claude` (or `gemini` / `glm` / `codex` if installed) as a subprocess and pipes stdout/stderr through WebSocket to the chat UI. The wrapped agent's modes mirror automatically (AR-18). (The one native binary we *do* bundle is the bmo-sync daemon — see below.)
77
-
78
- ## bmo-sync daemon + per-user URLs
79
-
80
- The workspace bundles the **bmo-sync daemon** (run as a subprocess) which links your
81
- local workspace to a per-user subdomain `https://<user>.venturewild.llc`:
82
-
83
- ```
84
- browser → vw-proxy (Cloudflare Worker on *.venturewild.llc)
85
- → bmo-sync (Fly, bmo-sync.fly.dev) → your daemon → local workspace server
86
- ```
87
-
88
- The Worker reads the `Host` header, resolves the slug via bmo-sync, and forwards to
89
- the bmo-sync Fly origin, which proxies to your most-recently-connected daemon. A
90
- **claimed** slug serves your live workspace (e.g. `tuananh.venturewild.llc` → 200); an
91
- **unclaimed** slug 302-redirects to the landing page (e.g. `apple.venturewild.llc`).
92
-
93
- The daemon ships via npm `optionalDependencies` (`@venturewild/workspace-daemon-*@0.1.0`
94
- for win32-x64 / darwin-x64 / darwin-arm64 / linux-x64), resolved at launch by
95
- `server/src/daemon-bin.mjs`. Shipped + verified live as of 2026-05-30; see
96
- [`docs/b-ii-proxy-plan.md`](docs/b-ii-proxy-plan.md),
97
- [`docs/b-ii-proxy-design.md`](docs/b-ii-proxy-design.md), and
98
- [`docs/ECOSYSTEM.md`](docs/ECOSYSTEM.md).
99
-
100
- ## Rich chat rendering
101
-
102
- The chat is the product (AR-16), so it renders like one:
103
-
104
- - **Markdown** — agent replies render as GitHub-flavored markdown (`Markdown.jsx`).
105
- - **Syntax-highlighted code** — fenced code blocks via prism-react-renderer, with a copy button.
106
- - **Tool cards** — each tool call (`Read`, `Edit`, `Bash`, …) renders as a compact card with a running/done/error status (`ToolCard.jsx`).
107
- - **Inline diffs** — `Edit` / `Write` / `MultiEdit` show a red/green line diff right in the chat (`DiffView.jsx`).
108
- - **Live streaming** — text streams token-by-token from the rebuilt `agent.mjs` stream-json parser, with a per-turn cost + token footer.
109
-
110
- ## License
111
-
112
- MIT — VentureWild.
1
+ # wild-workspace — Claude Code Web
2
+
3
+ A Replit/Lovable-style **chat-first** browser UI that wraps the AI agent already installed on your machine (Claude Code by default; Gemini / GLM / Codex if present).
4
+
5
+ > v0.1.1 — chat-first workspace + bmo-sync daemon (npm) + per-user proxy (b-ii) live. Implements PRD §5.5 (workspace-platform-prd.md v0.10).
6
+
7
+ ## Quick start
8
+
9
+ ```bash
10
+ # recommended — global install from npm
11
+ npm i -g @venturewild/workspace
12
+ wild-workspace
13
+ ```
14
+
15
+ A global install pulls the matching **bmo-sync daemon** binary automatically for
16
+ win32-x64 / darwin-x64 / darwin-arm64 / linux-x64 (shipped as `optionalDependencies`).
17
+
18
+ To build from source instead (dev path):
19
+
20
+ ```bash
21
+ # install dependencies & web build
22
+ npm install
23
+ npm run build
24
+
25
+ # launch
26
+ node server/src/index.mjs
27
+ # or after `npm install -g .`
28
+ wild-workspace
29
+ ```
30
+
31
+ Opens `http://localhost:5173` in your default browser.
32
+
33
+ ## What's in here
34
+
35
+ ```
36
+ wild-workspace/
37
+ ├── server/ # Node.js Hono server + WebSocket bridge
38
+ │ ├── bin/
39
+ │ │ └── wild-workspace.mjs # CLI entry (the `bin` field)
40
+ │ └── src/
41
+ │ ├── index.mjs # server bootstrap
42
+ │ ├── config.mjs # config + role definitions
43
+ │ ├── agent.mjs # claude / gemini / glm / codex subprocess wrapper
44
+ │ ├── account.mjs # login / account + slug claim
45
+ │ ├── share.mjs # JWT share-token mint + verify
46
+ │ ├── inbox.mjs # .wild/inbox.md watcher
47
+ │ ├── fs.mjs # workspace file tree (collapsed by default)
48
+ │ ├── activity.mjs # AI activity event bus
49
+ │ ├── preview.mjs # dev-server port detection
50
+ │ ├── sync.mjs # bmo-sync wiring
51
+ │ ├── daemon-bin.mjs # resolves the platform daemon binary
52
+ │ └── routes/ # REST + WS endpoints
53
+ ├── web/ # React + Vite frontend
54
+ │ └── src/
55
+ │ ├── App.jsx # role-flagged React tree (partner / viewer / client)
56
+ │ ├── components/ # Chat, Preview, FileTree, Onboarding, ShareDialog…
57
+ │ └── state/ # session + chat stores
58
+ ├── vw-proxy/ # Cloudflare Worker — public *.venturewild.llc front door
59
+ ├── landing/ # marketing / landing page (Cloudflare Pages)
60
+ └── docs/ # design notes (incl. b-ii-proxy-plan.md / -design.md)
61
+ ```
62
+
63
+ ## The three roles (AR-19)
64
+
65
+ | Role | URL pattern | What they see |
66
+ |---|---|---|
67
+ | **partner** | `http://localhost:5173` | Chat + preview + file tree + terminal toggle + inbox + share + deploy |
68
+ | **partner (published)** | `https://<user>.venturewild.llc` | Your workspace, live on your claimed per-user subdomain (e.g. `tuananh.venturewild.llc`) |
69
+ | **viewer** | `https://<user>.venturewild.llc/<wsid>?t=<token>` | Chat history (read-only) + preview + presence + activity stream |
70
+ | **client** | `https://workspace.<client>.com` | Chat + preview + "request changes" only |
71
+
72
+ Same React tree, role-gated visibility (AR-19).
73
+
74
+ ## AR-17: wrap don't embed
75
+
76
+ We don't ship an AI agent. `server/src/agent.mjs` spawns `claude` (or `gemini` / `glm` / `codex` if installed) as a subprocess and pipes stdout/stderr through WebSocket to the chat UI. The wrapped agent's modes mirror automatically (AR-18). (The one native binary we *do* bundle is the bmo-sync daemon — see below.)
77
+
78
+ ## bmo-sync daemon + per-user URLs
79
+
80
+ The workspace bundles the **bmo-sync daemon** (run as a subprocess) which links your
81
+ local workspace to a per-user subdomain `https://<user>.venturewild.llc`:
82
+
83
+ ```
84
+ browser → vw-proxy (Cloudflare Worker on *.venturewild.llc)
85
+ → bmo-sync (Fly, bmo-sync.fly.dev) → your daemon → local workspace server
86
+ ```
87
+
88
+ The Worker reads the `Host` header, resolves the slug via bmo-sync, and forwards to
89
+ the bmo-sync Fly origin, which proxies to your most-recently-connected daemon. A
90
+ **claimed** slug serves your live workspace (e.g. `tuananh.venturewild.llc` → 200); an
91
+ **unclaimed** slug 302-redirects to the landing page (e.g. `apple.venturewild.llc`).
92
+
93
+ The daemon ships via npm `optionalDependencies` (`@venturewild/workspace-daemon-*@0.1.0`
94
+ for win32-x64 / darwin-x64 / darwin-arm64 / linux-x64), resolved at launch by
95
+ `server/src/daemon-bin.mjs`. Shipped + verified live as of 2026-05-30; see
96
+ [`docs/b-ii-proxy-plan.md`](docs/b-ii-proxy-plan.md),
97
+ [`docs/b-ii-proxy-design.md`](docs/b-ii-proxy-design.md), and
98
+ [`docs/ECOSYSTEM.md`](docs/ECOSYSTEM.md).
99
+
100
+ ## Rich chat rendering
101
+
102
+ The chat is the product (AR-16), so it renders like one:
103
+
104
+ - **Markdown** — agent replies render as GitHub-flavored markdown (`Markdown.jsx`).
105
+ - **Syntax-highlighted code** — fenced code blocks via prism-react-renderer, with a copy button.
106
+ - **Tool cards** — each tool call (`Read`, `Edit`, `Bash`, …) renders as a compact card with a running/done/error status (`ToolCard.jsx`).
107
+ - **Inline diffs** — `Edit` / `Write` / `MultiEdit` show a red/green line diff right in the chat (`DiffView.jsx`).
108
+ - **Live streaming** — text streams token-by-token from the rebuilt `agent.mjs` stream-json parser, with a per-turn cost + token footer.
109
+
110
+ ## License
111
+
112
+ MIT — VentureWild.
package/package.json CHANGED
@@ -1,76 +1,83 @@
1
- {
2
- "name": "@venturewild/workspace",
3
- "version": "0.1.14",
4
- "description": "Claude Code Web — Replit/Lovable-style chat-first browser UI that wraps the AI agent already installed on your machine.",
5
- "license": "MIT",
6
- "bin": {
7
- "wild-workspace": "./server/bin/wild-workspace.mjs"
8
- },
9
- "files": [
10
- "server/bin",
11
- "server/src",
12
- "web/dist",
13
- "README.md",
14
- "LICENSE"
15
- ],
16
- "engines": {
17
- "node": ">=18.0.0"
18
- },
19
- "scripts": {
20
- "dev": "concurrently -k -n server,web -c blue,magenta \"npm:dev:server\" \"npm:dev:web\"",
21
- "dev:server": "node --watch server/src/index.mjs",
22
- "dev:web": "vite --config web/vite.config.mjs",
23
- "build": "npm run build:web",
24
- "build:web": "vite build --config web/vite.config.mjs",
25
- "prepublishOnly": "npm run build",
26
- "start": "node server/src/index.mjs",
27
- "test": "vitest run",
28
- "test:watch": "vitest",
29
- "lint": "eslint . --ext .mjs,.js,.jsx || echo 'skipping (eslint not configured)'"
30
- },
31
- "dependencies": {
32
- "@hono/node-server": "^1.13.0",
33
- "chokidar": "^4.0.0",
34
- "hono": "^4.6.0",
35
- "jose": "^5.9.0",
36
- "mime-types": "^2.1.0",
37
- "nanoid": "^5.0.0",
38
- "open": "^10.1.0",
39
- "ws": "^8.18.0"
40
- },
41
- "optionalDependencies": {
42
- "@venturewild/workspace-daemon-win32-x64": "0.1.2",
43
- "@venturewild/workspace-daemon-darwin-x64": "0.1.2",
44
- "@venturewild/workspace-daemon-darwin-arm64": "0.1.2",
45
- "@venturewild/workspace-daemon-linux-x64": "0.1.2",
46
- "@homebridge/node-pty-prebuilt-multiarch": "0.13.1"
47
- },
48
- "devDependencies": {
49
- "@vitejs/plugin-react": "^4.3.0",
50
- "concurrently": "^9.0.0",
51
- "diff": "^9.0.0",
52
- "playwright": "^1.48.0",
53
- "prism-react-renderer": "^2.4.1",
54
- "react": "^18.3.0",
55
- "react-dom": "^18.3.0",
56
- "react-markdown": "^10.1.0",
57
- "remark-gfm": "^4.0.1",
58
- "supertest": "^7.0.0",
59
- "vite": "^5.4.0",
60
- "vitest": "^2.1.0"
61
- },
62
- "repository": {
63
- "type": "git",
64
- "url": "https://github.com/chunin1103/wild-workspace"
65
- },
66
- "keywords": [
67
- "ai",
68
- "claude",
69
- "claude-code",
70
- "workspace",
71
- "replit",
72
- "lovable",
73
- "wild",
74
- "venturewild"
75
- ]
76
- }
1
+ {
2
+ "name": "@venturewild/workspace",
3
+ "version": "0.2.0",
4
+ "description": "Claude Code Web — Replit/Lovable-style chat-first browser UI that wraps the AI agent already installed on your machine.",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "wild-workspace": "./server/bin/wild-workspace.mjs"
8
+ },
9
+ "files": [
10
+ "server/bin",
11
+ "server/src",
12
+ "web/dist",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "engines": {
17
+ "node": ">=18.0.0"
18
+ },
19
+ "scripts": {
20
+ "dev": "concurrently -k -n server,web -c blue,magenta \"npm:dev:server\" \"npm:dev:web\"",
21
+ "dev:server": "node --watch server/src/index.mjs",
22
+ "dev:web": "vite --config web/vite.config.mjs",
23
+ "build": "npm run build:web",
24
+ "build:web": "vite build --config web/vite.config.mjs",
25
+ "prepublishOnly": "npm run build",
26
+ "start": "node server/src/index.mjs",
27
+ "test": "vitest run",
28
+ "test:web": "vitest run web/test",
29
+ "test:server": "vitest run server/test",
30
+ "test:watch": "vitest",
31
+ "lint": "eslint . --ext .mjs,.js,.jsx || echo 'skipping (eslint not configured)'"
32
+ },
33
+ "dependencies": {
34
+ "@hono/node-server": "^1.13.0",
35
+ "chokidar": "^4.0.0",
36
+ "hono": "^4.6.0",
37
+ "jose": "^5.9.0",
38
+ "mime-types": "^2.1.0",
39
+ "nanoid": "^5.0.0",
40
+ "open": "^10.1.0",
41
+ "ws": "^8.18.0"
42
+ },
43
+ "optionalDependencies": {
44
+ "@homebridge/node-pty-prebuilt-multiarch": "0.13.1",
45
+ "@venturewild/workspace-daemon-darwin-arm64": "0.1.2",
46
+ "@venturewild/workspace-daemon-darwin-x64": "0.1.2",
47
+ "@venturewild/workspace-daemon-linux-x64": "0.1.2",
48
+ "@venturewild/workspace-daemon-win32-x64": "0.1.2"
49
+ },
50
+ "devDependencies": {
51
+ "@testing-library/jest-dom": "^6.9.1",
52
+ "@testing-library/react": "^16.3.2",
53
+ "@testing-library/user-event": "^14.6.1",
54
+ "@vitejs/plugin-react": "^4.3.0",
55
+ "concurrently": "^9.0.0",
56
+ "diff": "^9.0.0",
57
+ "jsdom": "^29.1.1",
58
+ "playwright": "^1.48.0",
59
+ "prism-react-renderer": "^2.4.1",
60
+ "react": "^18.3.0",
61
+ "react-dom": "^18.3.0",
62
+ "react-grid-layout": "^2.2.3",
63
+ "react-markdown": "^10.1.0",
64
+ "remark-gfm": "^4.0.1",
65
+ "supertest": "^7.0.0",
66
+ "vite": "^5.4.0",
67
+ "vitest": "^2.1.0"
68
+ },
69
+ "repository": {
70
+ "type": "git",
71
+ "url": "https://github.com/chunin1103/wild-workspace"
72
+ },
73
+ "keywords": [
74
+ "ai",
75
+ "claude",
76
+ "claude-code",
77
+ "workspace",
78
+ "replit",
79
+ "lovable",
80
+ "wild",
81
+ "venturewild"
82
+ ]
83
+ }