@youdie006/prodex 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.
- package/LICENSE +21 -0
- package/README.md +418 -0
- package/dist/banner.d.ts +5 -0
- package/dist/banner.js +47 -0
- package/dist/banner.js.map +1 -0
- package/dist/bundle.d.ts +15 -0
- package/dist/bundle.js +30 -0
- package/dist/bundle.js.map +1 -0
- package/dist/chatgpt-browser.d.ts +119 -0
- package/dist/chatgpt-browser.js +857 -0
- package/dist/chatgpt-browser.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +3502 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +58 -0
- package/dist/config.js +277 -0
- package/dist/config.js.map +1 -0
- package/dist/http-mcp.d.ts +20 -0
- package/dist/http-mcp.js +236 -0
- package/dist/http-mcp.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-tools.d.ts +395 -0
- package/dist/mcp-tools.js +167 -0
- package/dist/mcp-tools.js.map +1 -0
- package/dist/mcp.d.ts +37 -0
- package/dist/mcp.js +229 -0
- package/dist/mcp.js.map +1 -0
- package/dist/repo-write.d.ts +47 -0
- package/dist/repo-write.js +427 -0
- package/dist/repo-write.js.map +1 -0
- package/dist/repo.d.ts +27 -0
- package/dist/repo.js +386 -0
- package/dist/repo.js.map +1 -0
- package/dist/safe-file.d.ts +25 -0
- package/dist/safe-file.js +295 -0
- package/dist/safe-file.js.map +1 -0
- package/dist/schema.d.ts +402 -0
- package/dist/schema.js +109 -0
- package/dist/schema.js.map +1 -0
- package/dist/store.d.ts +157 -0
- package/dist/store.js +1402 -0
- package/dist/store.js.map +1 -0
- package/docs/claude.md +130 -0
- package/docs/clients.md +75 -0
- package/docs/http-mcp.md +223 -0
- package/package.json +67 -0
- package/scripts/release-check.mjs +436 -0
- package/scripts/release-pack.mjs +481 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 prodex 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,418 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="assets/cli-banner.png" alt="PROdex — local bridge so Codex, Claude and other agents share ChatGPT Pro" width="820" />
|
|
4
|
+
|
|
5
|
+
**Local bridge so Codex, Claude, and other coding agents can share your logged-in ChatGPT Pro — with durable receipts.**
|
|
6
|
+
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](package.json)
|
|
9
|
+
[](https://github.com/youdie006/prodex/actions/workflows/ci.yml)
|
|
10
|
+
[](#)
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
`prodex` is a local receipt bus plus MCP bridge for coordinating Codex execution with ChatGPT Pro/Projects and Claude.
|
|
17
|
+
|
|
18
|
+
The goal is not to turn ChatGPT Pro into a public API. The goal is to make Codex the main workbench while keeping durable receipts for every outside consult or handoff:
|
|
19
|
+
|
|
20
|
+
- Ask ChatGPT Pro from Codex when a stronger planning/review pass is useful.
|
|
21
|
+
- Let ChatGPT Projects hand structured tasks to Codex/local tools through an optional HTTP MCP bridge.
|
|
22
|
+
- Let Claude create/fetch the same tasks through stdio MCP.
|
|
23
|
+
- Keep durable records of what was asked, what was returned, and what Codex did with it.
|
|
24
|
+
|
|
25
|
+
## Core Shape
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Codex
|
|
29
|
+
| pro ask preview / tasks / mcp
|
|
30
|
+
v
|
|
31
|
+
prodex local bridge + .bridge receipts
|
|
32
|
+
| ^
|
|
33
|
+
| optional explicit | optional HTTP/stdin MCP
|
|
34
|
+
| pro browser consult |
|
|
35
|
+
v |
|
|
36
|
+
ChatGPT Pro ChatGPT Projects / Claude
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Operating Rules
|
|
40
|
+
|
|
41
|
+
- Manual-first: each ChatGPT Pro consult should be user-initiated or clearly tied to the current task.
|
|
42
|
+
- Browser automation is optional and explicit: use it only through `pro browser ...`, with a real visible logged-in browser session.
|
|
43
|
+
- Stop on blockers: login, captcha, rate limit, Cloudflare, permission, and model-limit states stop the workflow.
|
|
44
|
+
- No bypass: no hidden API, cookie extraction, stealth automation, proxies, or captcha solving.
|
|
45
|
+
- Low volume: no batch prompting or recurring loops that make ChatGPT Pro behave like an API server.
|
|
46
|
+
- Local only: do not expose account access, browser sessions, or bridge endpoints to other users.
|
|
47
|
+
- Local debug port: the visible-browser adapter uses Chrome's `--remote-debugging-port`, which is unauthenticated but bound to `127.0.0.1` only and live only while that browser is open.
|
|
48
|
+
|
|
49
|
+
## Components
|
|
50
|
+
|
|
51
|
+
- `docs/clients.md`: connect Cursor, Gemini CLI, Codex, Claude, and other MCP agents to the ChatGPT Pro bridge.
|
|
52
|
+
- `docs/http-mcp.md`: ChatGPT Project HTTP MCP setup and safety notes.
|
|
53
|
+
- `docs/claude.md`: Claude stdio MCP setup and tool notes.
|
|
54
|
+
- `.bridge/`: local task/result/session/artifact/receipt storage.
|
|
55
|
+
|
|
56
|
+
## Package Surface
|
|
57
|
+
|
|
58
|
+
The npm package is CLI-only for now. The supported public surfaces are the `prodex` command, the stdio MCP server, and the optional HTTP MCP server. JavaScript imports from `prodex` or `prodex/dist/*` are intentionally not exported until a library API is designed and documented.
|
|
59
|
+
|
|
60
|
+
## v0.2 Status
|
|
61
|
+
|
|
62
|
+
Implemented:
|
|
63
|
+
|
|
64
|
+
- Versioned `.bridge` ledger schemas for tasks, results, sessions, and receipts.
|
|
65
|
+
- CLI commands for task creation/listing/inspection/claiming/completion/blocking and result display.
|
|
66
|
+
- `pro ask` and `pro latest` for Codex-first consult previews and review receipts.
|
|
67
|
+
- `sessions list` and `sessions show` for inspecting dry-run, running, done, or blocked consult sessions.
|
|
68
|
+
- `receipts list` and `receipts show` for inspecting the local action ledger without exposing legacy inline write payloads.
|
|
69
|
+
- Ledger MCP tools for creating, claiming, completing, blocking, and inspecting task/result/session/receipt records from Claude or ChatGPT Projects.
|
|
70
|
+
- Read-only result artifact fetch for Pro consult and generic MCP handoff artifacts explicitly listed on result records.
|
|
71
|
+
- Explicit local reseal for legacy signed result receipts after reviewing the current result payload.
|
|
72
|
+
- `pro browser login/check/smoke/ask` for the optional visible browser adapter.
|
|
73
|
+
- Claude-compatible stdio MCP server through `prodex mcp`.
|
|
74
|
+
- ChatGPT Developer Mode-style Streamable HTTP MCP server through `prodex setup` and `prodex start`.
|
|
75
|
+
- Read-only repo tools for bounded file reads and ripgrep search.
|
|
76
|
+
- Receipt-gated repo write/stage tools for existing text files: dry-run first, apply only with matching git HEAD and preimage hash, then stage only reviewed applied receipts.
|
|
77
|
+
- `doctor` local health check for `.bridge`, redacted config loading, receipt-backed write/apply/stage, and the real HTTP MCP tool catalog.
|
|
78
|
+
|
|
79
|
+
Not implemented:
|
|
80
|
+
|
|
81
|
+
- Hidden ChatGPT endpoints.
|
|
82
|
+
- Cookie, token, localStorage, or sessionStorage extraction.
|
|
83
|
+
- Direct ungated write tools.
|
|
84
|
+
- Shell execution tools.
|
|
85
|
+
- Automatic public tunnel setup.
|
|
86
|
+
|
|
87
|
+
## Quick Start
|
|
88
|
+
|
|
89
|
+
Requires Node.js 20 or newer, `git`, and `ripgrep` (`rg`) on PATH. The optional visible-browser adapter also needs a Chromium-family browser (`google-chrome`, `chromium`, `chromium-browser`, `microsoft-edge`, `brave-browser`) or `PRODEX_CHROME=/path/to/browser`.
|
|
90
|
+
|
|
91
|
+
Install from npm — **note the scope**. The unscoped `prodex` on npm is an unrelated third-party package; do **not** install it. Use the scoped name:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npm install -g @youdie006/prodex
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The `prodex` command is then on your PATH:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
prodex onboard
|
|
101
|
+
prodex init
|
|
102
|
+
prodex doctor
|
|
103
|
+
prodex pro ask --cwd /absolute/path/to/your/repo "Review the project positioning"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
For a source checkout:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
cd /absolute/path/to/prodex
|
|
110
|
+
npm install
|
|
111
|
+
npm run build
|
|
112
|
+
SOURCE_CLI="/absolute/path/to/prodex/dist/cli.js"
|
|
113
|
+
node "$SOURCE_CLI" onboard --source-cli "$SOURCE_CLI"
|
|
114
|
+
node "$SOURCE_CLI" init
|
|
115
|
+
node "$SOURCE_CLI" doctor --source-cli "$SOURCE_CLI"
|
|
116
|
+
node "$SOURCE_CLI" pro ask --cwd /absolute/path/to/your/repo "Review the project positioning"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The examples below use the installed `prodex` binary. In a source checkout, replace `prodex` with `node /absolute/path/to/prodex/dist/cli.js` after building, and pass `--source-cli /absolute/path/to/prodex/dist/cli.js` to onboarding, browser, prompt, and local MCP troubleshooting commands so their follow-up guidance stays in source-checkout form.
|
|
120
|
+
`onboard` prints the Claude, ChatGPT Project, and optional ChatGPT Pro consult commands without changing local state.
|
|
121
|
+
|
|
122
|
+
`init` creates the local `.bridge/` ledger directories and ignore rules. On a source checkout it may also add `node_modules/` and `dist/` to the repo root `.gitignore` so local dependencies and build output stay out of git.
|
|
123
|
+
Run `init` from the repo root, or use `prodex init --cwd /absolute/path/to/your/repo` from elsewhere.
|
|
124
|
+
|
|
125
|
+
`pro ask` is a dry-run/manual preview. It does not drive a logged-in browser; `pro ask --send` is rejected so accidental sends do not happen through the preview alias. Use `pro browser ask` when you explicitly want the visible browser adapter.
|
|
126
|
+
Run `pro ask` and `pro browser ask` from the repo root, or pass `--cwd /absolute/path/to/your/repo` so `--file` paths and `.bridge` records resolve to the intended project. If you generated commands with `onboard --cwd`, those commands already include the target cwd.
|
|
127
|
+
Bridge inspection and task handoff commands such as `pro browser check`, `pro latest`, `pro show`, `tasks create/list/show/claim/complete/block`, `results show`, `results artifact`, `receipts show`, and `sessions show` can also be run from elsewhere with `--cwd /absolute/path/to/your/repo`.
|
|
128
|
+
When the file exists and you want it included, add it explicitly, for example `prodex pro ask --cwd /absolute/path/to/your/repo --file README.md "Review the project positioning"`.
|
|
129
|
+
If your prompt itself starts with flag-like text, put `--` before the prompt. This applies to both preview and visible-browser sends, for example `prodex pro ask -- --strict mode review` or `prodex pro browser ask -- --strict mode review`.
|
|
130
|
+
|
|
131
|
+
## First Pro Login
|
|
132
|
+
|
|
133
|
+
Use this only when you explicitly want to use your logged-in ChatGPT Pro web session.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
prodex pro browser login --dry-run
|
|
137
|
+
prodex pro browser login
|
|
138
|
+
prodex pro browser help
|
|
139
|
+
prodex pro browser check
|
|
140
|
+
prodex pro browser smoke --cwd /absolute/path/to/your/repo
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
If you use a non-default debug port or Chrome profile, pass it to `login`; the printed follow-up `check` and `smoke` commands keep the matching `--port`. If you launch from outside the repo you want to inspect, pass `--cwd /absolute/path/to/your/repo` to `login`, `check`, or `smoke` so the command targets the same bridge. On slower first launches, add `--launch-timeout-ms 12000`.
|
|
144
|
+
|
|
145
|
+
For a source checkout, keep the follow-up commands in source-checkout form too:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
cd /absolute/path/to/prodex
|
|
149
|
+
SOURCE_CLI="/absolute/path/to/prodex/dist/cli.js"
|
|
150
|
+
node "$SOURCE_CLI" pro browser login --dry-run --source-cli "$SOURCE_CLI"
|
|
151
|
+
node "$SOURCE_CLI" pro browser login --source-cli "$SOURCE_CLI"
|
|
152
|
+
node "$SOURCE_CLI" pro browser help --source-cli "$SOURCE_CLI"
|
|
153
|
+
node "$SOURCE_CLI" pro browser check --source-cli "$SOURCE_CLI"
|
|
154
|
+
node "$SOURCE_CLI" pro browser smoke --source-cli "$SOURCE_CLI" --cwd /absolute/path/to/your/repo
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
What happens:
|
|
158
|
+
|
|
159
|
+
- `login --dry-run` prints the dedicated Chrome profile, debug URL, and next commands without opening a browser.
|
|
160
|
+
- `login` opens that dedicated Chrome profile at ChatGPT.
|
|
161
|
+
- You log in manually in the visible browser.
|
|
162
|
+
- If ChatGPT asks for captcha, Cloudflare/human verification, permission, or account verification, handle it in that browser.
|
|
163
|
+
- If ChatGPT shows a usage limit, message limit, model limit, or rate limit, wait for the reset or choose an available model in the browser.
|
|
164
|
+
- Open a normal ChatGPT chat or the intended Project/thread so the prompt composer is visible.
|
|
165
|
+
- Pick the Pro/Thinking model you want in the ChatGPT UI.
|
|
166
|
+
- The login stays in the dedicated profile:
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
~/.local/share/prodex/chrome-chatgpt-pro
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
You can close that Chrome window after check/smoke or when you are done. The next time you need it, run `pro browser login` or `pro browser check` again. `check` will tell you what to do if the browser is closed.
|
|
173
|
+
|
|
174
|
+
Actual explicit visible-browser consult:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
cd /absolute/path/to/your/repo
|
|
178
|
+
prodex pro browser ask --cwd /absolute/path/to/your/repo --file README.md "Review the project positioning"
|
|
179
|
+
prodex pro latest
|
|
180
|
+
prodex results show latest
|
|
181
|
+
prodex results artifact latest
|
|
182
|
+
prodex sessions show latest
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
This uses the currently available ChatGPT web session and model selection. It is not a hidden API client, and it does not read cookies, tokens, localStorage, or sessionStorage.
|
|
186
|
+
|
|
187
|
+
For a source checkout, keep the explicit send and inspection commands source-aware too:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
cd /absolute/path/to/prodex
|
|
191
|
+
SOURCE_CLI="/absolute/path/to/prodex/dist/cli.js"
|
|
192
|
+
node "$SOURCE_CLI" pro browser ask --source-cli "$SOURCE_CLI" --cwd /absolute/path/to/your/repo --file README.md "Review the project positioning"
|
|
193
|
+
node "$SOURCE_CLI" pro latest --source-cli "$SOURCE_CLI"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Pass `--source-cli /absolute/path/to/prodex/dist/cli.js` to `pro browser ask`, `pro list`, `pro latest`, or `pro show <task-id|latest>` so blocked consults display source-checkout retry commands instead of installed-binary commands.
|
|
197
|
+
|
|
198
|
+
Each explicit browser consult creates a `.bridge` task and `.bridge/sessions` record before sending. If the visible browser is blocked by login, captcha, permission, or usage limits, the task is completed as a blocked consult so `prodex pro latest` still shows what happened, including the blocker code and next step; the failed command also prints the recorded task id plus `pro show`/`pro latest` inspection commands. Successful answers are normally saved as result artifacts under `.bridge/artifacts/pro-consults/` before the task result is finalized; if artifact or receipt recording fails after an answer is received, the answer is still completed as the result summary with a warning, and fatal finalization failures print the received answer before exiting. If a Pro answer is too large for `bridge_fetch_result_artifact`, it stays in the result summary with `answer_artifact_warning` and no unfetchable artifact is listed. Generic MCP handoff result artifacts can be stored under `.bridge/artifacts/results/`; `bridge_fetch_result_artifact` only reads artifacts explicitly listed on the result record, and newly finalized result artifacts are checked against the sha256 recorded at finalization time.
|
|
199
|
+
|
|
200
|
+
If an older local result is reported as untrusted because a locally signed legacy `task_completed` receipt is missing `result_sha256`, review `.bridge/results/<task-id>.json` yourself first, then run:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
prodex results reseal <task-id> --confirm-current-result
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
This writes a new local `task_completed` receipt for the current result payload. Prefer the explicit task id you just reviewed; `latest` is accepted for convenience but resolves from the current raw result list at execution time. It does not reseal unsigned receipts, forged receipts, or receipts that already point at a different result digest.
|
|
207
|
+
|
|
208
|
+
To send into a specific visible Project or thread, open that ChatGPT URL in the dedicated browser first, confirm it is the right destination, then pass the same URL:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
prodex pro browser ask --cwd /absolute/path/to/your/repo --target-url "https://chatgpt.com/c/..." --confirm-target --file README.md "Review this in this thread"
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
`prodex` does not silently switch Projects or threads. If the visible ChatGPT tab is not already on the confirmed URL, the send is refused.
|
|
215
|
+
If more than one ChatGPT tab or window is visible or visibility cannot be verified for extra ChatGPT tabs, an untargeted browser send is also refused; close the extra ChatGPT windows or use `--target-url ... --confirm-target`.
|
|
216
|
+
|
|
217
|
+
For optional ChatGPT Project -> local handoff, start the HTTP MCP bridge:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
prodex setup --token-ttl-hours 24
|
|
221
|
+
prodex start
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
`setup` writes `.bridge/config.local.json` and ensures `.bridge/.gitignore` covers local task/result/session/receipt/artifact/config files. `setup`, `start`, and `status` redact the URL token by default.
|
|
225
|
+
The HTTP MCP listener is loopback-only: `setup --host` accepts local loopback hosts such as `127.0.0.1` or `localhost`, not public interfaces like `0.0.0.0`.
|
|
226
|
+
`start` reads the saved setup profile when the server process starts. If you rerun `setup` to change the listener or rotate the token, restart `prodex start` so the running server uses the new profile. `status --show-token --url-only` prints the saved local MCP URL, while `tunnel url` formats your supplied public tunnel URL with the saved token; it does not create or inspect the tunnel.
|
|
227
|
+
|
|
228
|
+
Run these commands from the repo root, or add `--cwd /absolute/path/to/your/repo` to `setup`, `start`, `status`, `doctor`, `tunnel url`, and bridge inspection commands. For example:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
prodex setup --cwd /absolute/path/to/your/repo --token-ttl-hours 24
|
|
232
|
+
prodex start --cwd /absolute/path/to/your/repo
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
For a source checkout, keep the source CLI path on runtime/status commands too so recovery hints stay copyable:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
node dist/cli.js start --cwd /absolute/path/to/your/repo --source-cli /absolute/path/to/prodex/dist/cli.js
|
|
239
|
+
node dist/cli.js status --cwd /absolute/path/to/your/repo --source-cli /absolute/path/to/prodex/dist/cli.js --show-token --url-only
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Token-bearing MCP URLs are secrets. They authorize all enabled bridge tools, including repo read, search, write dry-run/apply, and stage-reviewed-paths tools. Use the next command only when you are ready to paste the URL into your own trusted private ChatGPT Project/App configuration:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
prodex status --show-token --url-only
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
`status --show-token` requires a token with an expiry, so run `setup --token-ttl-hours <hours>` before asking for a paste-ready URL. The URL token is stored only in `.bridge/config.local.json`, which is ignored by git. Rotate it with `setup` when you no longer need that URL. If you intentionally created a non-expiring token for local-only debugging, `status --show-token` refuses to reveal it unless you also pass `--unsafe-show-non-expiring-token`. `doctor` and `pro browser check` also print `config_warning` when the saved token is non-expiring.
|
|
249
|
+
|
|
250
|
+
After adding the MCP URL to ChatGPT, generate a paste-ready verification prompt:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
prodex project prompt
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
For a source checkout, pass the same built CLI path so the prompt's local follow-up commands are also source-checkout commands:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
node dist/cli.js project prompt --cwd /absolute/path/to/your/repo --source-cli /absolute/path/to/prodex/dist/cli.js
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Paste that prompt into the ChatGPT Project. It asks ChatGPT to call `bridge_create_task`, `bridge_list_tasks`, and `bridge_get_task`, then wait while you complete the verification task locally:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
prodex tasks list --status new --cwd /absolute/path/to/your/repo
|
|
266
|
+
prodex tasks show <task-id> --cwd /absolute/path/to/your/repo
|
|
267
|
+
prodex tasks complete <task-id> --cwd /absolute/path/to/your/repo --summary "prodex MCP verification result" --artifact .bridge/artifacts/results/mcp-verification.md="prodex MCP verification artifact"
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
After the local completion command succeeds, reply to ChatGPT with `local completion done`. The generated prompt then asks ChatGPT to call `bridge_fetch_result` for the same task id, call `bridge_fetch_result_artifact` for every listed result artifact path, and report whether it can read both the verification result summary and artifact content.
|
|
271
|
+
|
|
272
|
+
The generated prompt also includes local `status --cwd ...` and `doctor --cwd ...` troubleshooting commands in case the Project cannot see or call the MCP tools. Source-checkout prompts keep `--source-cli` on those troubleshooting commands too.
|
|
273
|
+
|
|
274
|
+
If ChatGPT cannot reach `127.0.0.1` from its app runtime, keep `prodex start` local and put your own tunnel in front of it only after creating a short-lived token. `prodex` does not create the tunnel for you, but it can format the public MCP URL safely.
|
|
275
|
+
|
|
276
|
+
Public tunnel MCP URLs are also secrets. They authorize all enabled bridge tools, including repo read, search, write dry-run/apply, and stage-reviewed-paths tools. Use the next command only when you are ready to paste the public URL into your own trusted private MCP client configuration:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
prodex tunnel url --public-url "https://your-tunnel.example" --show-token --url-only
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
See [docs/http-mcp.md](docs/http-mcp.md) for the full ChatGPT Project HTTP MCP setup flow and safety notes.
|
|
283
|
+
|
|
284
|
+
The MCP write path is intentionally narrow:
|
|
285
|
+
|
|
286
|
+
- `repo_write_file_dry_run` previews an existing repo-relative text-file replacement, stores hashes/diff in a receipt, and stores replacement text under `.bridge/artifacts/repo-writes/`.
|
|
287
|
+
- `repo_write_file_apply` applies that receipt only when the current git HEAD and file preimage hash still match.
|
|
288
|
+
- `repo_stage_reviewed_paths` stages only files whose applied write receipts still match the current git HEAD and file content.
|
|
289
|
+
- Sensitive local paths such as `.bridge`, `.git`, `.env*`, `node_modules`, and `dist` are rejected.
|
|
290
|
+
- No shell execution or direct ungated staging tool is exposed.
|
|
291
|
+
|
|
292
|
+
For local task-bus smoke tests:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
cd /absolute/path/to/your/repo
|
|
296
|
+
prodex doctor
|
|
297
|
+
prodex tasks create --cwd /absolute/path/to/your/repo --title "Review plan" --prompt "Review this architecture"
|
|
298
|
+
prodex tasks list --cwd /absolute/path/to/your/repo
|
|
299
|
+
prodex tasks show latest --cwd /absolute/path/to/your/repo
|
|
300
|
+
prodex tasks block <task-id> --cwd /absolute/path/to/your/repo --summary "Blocked reason" --code manual_blocker --next-step "What to do next" --retryable
|
|
301
|
+
prodex pro ask --dry-run --cwd /absolute/path/to/your/repo --file README.md "Review the project positioning"
|
|
302
|
+
prodex sessions list
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
`doctor` stays local: it does not open ChatGPT or a browser. It creates isolated temp workspaces for the write/apply/stage smoke and HTTP MCP smoke, then confirms the expected bridge/repo tools are visible and that task create/list/get/claim/complete/block/fetch/list-results works over the MCP protocol.
|
|
306
|
+
|
|
307
|
+
During local development, you can run the TypeScript source directly:
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
npm run dev -- tasks list
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Release Checks
|
|
314
|
+
|
|
315
|
+
GitHub Actions runs `npm ci`, `npm run release:check`, and `npm run release:verify` on pushes to `main` and pull requests. The workflow installs `ripgrep` because the repo-search smoke checks require `rg`. It verifies release readiness only; it does not publish anything.
|
|
316
|
+
|
|
317
|
+
Before sharing a package tarball, run:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
npm run smoke:package
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
This packs the project, installs the tarball into a temporary consumer project, runs the installed `prodex` binary, verifies HTTP MCP onboarding through installed token-TTL `setup`/`status`/configured `doctor`/`tunnel url`/`start`, checks `/health`, connects to the installed `/mcp` endpoint, lists tools, calls `bridge_create_task`, verifies explicit `--cwd` task storage, exercises the installed HTTP MCP repo write dry-run/apply/stage flow, exercises the installed HTTP MCP task completion/blocking/result/artifact fetch flow including tampered artifact rejection, verifies installed HTTP MCP receipt/session list/fetch tools, verifies the installed `release-pack` script and `prodex release pack` CLI success paths for normalized publish tarballs, runs `npm publish --dry-run` against those normalized tarballs, verifies git-ready release-pack output includes the tarball publish lifecycle warning and guarded `release_pack_publish` command, verifies installed release git blockers for no remote, dirty worktrees, detached HEAD, no upstream, unpushed, upstream gone, behind, and diverged states, verifies `release pack` blocks publish guidance for those unsafe git states, verifies the package is CLI-only by blocking unsupported deep imports, verifies the installed stdio MCP server exposes the expected tool catalog, exercises the installed stdio MCP repo write dry-run/apply/stage flow, verifies installed stdio oversized repo_search failure output, verifies installed stdio non-git write failure output, exercises the installed stdio MCP task completion/blocking/result/artifact fetch flow including tampered artifact rejection, and verifies installed stdio MCP receipt/session list/fetch tools.
|
|
324
|
+
|
|
325
|
+
To run the full release verification sequence:
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
npm run release:verify
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
This runs tests, typecheck, build, package smoke, and `doctor` without weakening the publish guard.
|
|
332
|
+
|
|
333
|
+
If direct `npm pack` is blocked because a WSL/Windows mount reports normal source files as executable, build the publish tarball from a temporary Linux staging directory:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
prodex release pack --pack-destination /tmp/prodex-release
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
For a source checkout, use the built CLI with `--source-cli` so follow-up commands stay in source-checkout form:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
cd /absolute/path/to/prodex
|
|
343
|
+
SOURCE_CLI="/absolute/path/to/prodex/dist/cli.js"
|
|
344
|
+
node "$SOURCE_CLI" release pack --source-cli "$SOURCE_CLI" --pack-destination /tmp/prodex-release
|
|
345
|
+
node "$SOURCE_CLI" release status --source-cli "$SOURCE_CLI"
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
The npm script is equivalent when you only need the tarball:
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
npm run release:pack -- --pack-destination /tmp/prodex-release
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
For source-checkout release commands, prefer the CLI wrapper when you want follow-up guidance to stay in `node dist/cli.js ... --source-cli` form. The npm script creates the same normalized tarball, but it cannot know which source CLI path should appear in later recovery commands.
|
|
355
|
+
|
|
356
|
+
`release pack` does not publish anything. It still refuses missing publish metadata, non-regular or hard-linked packed files, and missing package release checks; it only normalizes packed file modes in the staging copy so package `bin` entries remain executable and other packed files become regular `0644` files. Run `npm run release:verify` and the matching status command before publishing the tarball it creates: `prodex release status` for installed-package use, or `node /absolute/path/to/prodex/dist/cli.js release status --source-cli /absolute/path/to/prodex/dist/cli.js` from a source checkout. When the tarball is ready, `release pack` prints `release_pack_git` and `release_pack_git_next` lines before publish guidance so git remote/upstream blockers stay visible. It always prints `npm publish --dry-run <tarball>` for inspecting the exact tarball. Tarball publish commands bypass npm `prepublishOnly`, so `release pack` prints `release_pack_publish_guard` before `npm publish <tarball>`; run the dry-run command first, then publish only that verified tarball if it succeeds. If git readiness is blocked, it prints `release_pack_publish_blocked` instead.
|
|
357
|
+
|
|
358
|
+
Add `--keep-workdir` to `prodex release pack`, `node /absolute/path/to/prodex/dist/cli.js release pack --source-cli /absolute/path/to/prodex/dist/cli.js --pack-destination <dir>`, or `npm run release:pack -- ...` when you need to inspect the temporary normalized staging directory.
|
|
359
|
+
|
|
360
|
+
To see the current publish blocker and next step from the CLI:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
prodex release status
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
It reports package metadata blockers, pack file-mode, non-regular file, or hard-link blockers when package identity is readable, and local git readiness, including a dirty worktree, detached HEAD, missing git remote, branch without upstream tracking, upstream is gone, branch divergence, unpushed local commits, or a branch behind upstream. For a new public repo, create the remote yourself, then run `git remote add origin <git-url>` and `git push -u origin <branch>`; `release status` prints those handoff commands when the local git state is missing a remote or upstream.
|
|
367
|
+
|
|
368
|
+
Before publishing to npm, make sure `package.json` has an npm-publishable `name` and valid semver `version`, keep the explicit MIT `license` metadata and matching `LICENSE` regular file, and make sure `package.json` does not have `private: true`. `release:check` treats missing or malformed package identity and `private: true` as publish blockers because npm will refuse to publish those packages. It also rejects a `LICENSE` path that is a directory, symlink, or hard link, rejects non-regular or symlinked packed files, blocks packed files with unexpected executable modes outside package `bin` entries, and rejects hard-linked packed files. If you are on a WSL/Windows mount that reports every file as executable, publish from a Linux filesystem, fix mount metadata/chmod first, or use `prodex release pack --pack-destination <dir>` after release verification to create the tarball from normalized staging files. From a source checkout, use `node /absolute/path/to/prodex/dist/cli.js release pack --source-cli /absolute/path/to/prodex/dist/cli.js --pack-destination <dir>` for the same normalized tarball plus source-aware follow-up guidance. Source-tree `npm publish` is intentionally guarded by `prepublishOnly`; it runs:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
npm run release:check
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
If package metadata stops being publishable, `release:check` fails with a metadata error instead of letting an accidental public publish proceed. Use `npm run release:verify` when you only want local verification without claiming publish readiness.
|
|
375
|
+
|
|
376
|
+
## Claude MCP
|
|
377
|
+
|
|
378
|
+
If `prodex` is installed and on your PATH, generate the Claude MCP config JSON:
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
prodex claude config --cwd /absolute/path/to/your/repo
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
It prints this token-free config:
|
|
385
|
+
|
|
386
|
+
```json
|
|
387
|
+
{
|
|
388
|
+
"mcpServers": {
|
|
389
|
+
"prodex": {
|
|
390
|
+
"command": "prodex",
|
|
391
|
+
"args": ["mcp", "--cwd", "/absolute/path/to/your/repo"]
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
For a source checkout, first run `npm install && npm run build`, then generate a `node dist/cli.js` config:
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
node dist/cli.js claude config --cwd /absolute/path/to/your/repo --source-cli /absolute/path/to/prodex/dist/cli.js
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
See [docs/claude.md](docs/claude.md) for Claude Desktop and Claude Code notes.
|
|
404
|
+
Both generated configs point Claude at the same `mcp --cwd /absolute/path/to/your/repo` server args.
|
|
405
|
+
|
|
406
|
+
After adding the MCP server in Claude, generate a paste-ready verification prompt:
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
prodex claude prompt --cwd /absolute/path/to/your/repo
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
For a source checkout, include the built CLI path:
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
node dist/cli.js claude prompt --cwd /absolute/path/to/your/repo --source-cli /absolute/path/to/prodex/dist/cli.js
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
The generated prompt asks Claude to create and read a bridge task only; it does not request write, stage, shell, browser, or tunnel actions. It also includes local `claude config --cwd ...` and `doctor --cwd ...` troubleshooting commands in case Claude cannot see or call the MCP tools. Source-checkout prompts keep `--source-cli` on those troubleshooting commands too.
|
package/dist/banner.d.ts
ADDED
package/dist/banner.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// ANSI Shadow figlet rows, split into the "PRO" group and the "dex" group so each
|
|
2
|
+
// can be colored independently. Both groups keep a fixed per-row width so the
|
|
3
|
+
// halves line up when concatenated.
|
|
4
|
+
const PRO_ROWS = [
|
|
5
|
+
"██████╗ ██████╗ ██████╗ ",
|
|
6
|
+
"██╔══██╗██╔══██╗██╔═══██╗",
|
|
7
|
+
"██████╔╝██████╔╝██║ ██║",
|
|
8
|
+
"██╔═══╝ ██╔══██╗██║ ██║",
|
|
9
|
+
"██║ ██║ ██║╚██████╔╝",
|
|
10
|
+
"╚═╝ ╚═╝ ╚═╝ ╚═════╝ "
|
|
11
|
+
];
|
|
12
|
+
const DEX_ROWS = [
|
|
13
|
+
"██████╗ ███████╗██╗ ██╗",
|
|
14
|
+
"██╔══██╗██╔════╝╚██╗██╔╝",
|
|
15
|
+
"██║ ██║█████╗ ╚███╔╝ ",
|
|
16
|
+
"██║ ██║██╔══╝ ██╔██╗ ",
|
|
17
|
+
"██████╔╝███████╗██╔╝ ██╗",
|
|
18
|
+
"╚═════╝ ╚══════╝╚═╝ ╚═╝ "
|
|
19
|
+
];
|
|
20
|
+
const ESC = "";
|
|
21
|
+
const RED = `${ESC}[38;2;190;28;28m`; // PRO — #BE1C1C
|
|
22
|
+
const DEX = `${ESC}[38;2;210;213;219m`; // dex — light graphite (visible on dark terminals)
|
|
23
|
+
const DIM = `${ESC}[38;2;140;144;150m`; // tagline
|
|
24
|
+
const RESET = `${ESC}[0m`;
|
|
25
|
+
const TAGLINE = "Local bridge so Codex, Claude & other agents share ChatGPT Pro";
|
|
26
|
+
export function renderBanner(options = {}) {
|
|
27
|
+
const color = options.color ?? true;
|
|
28
|
+
const rows = [];
|
|
29
|
+
for (let i = 0; i < PRO_ROWS.length; i++) {
|
|
30
|
+
const pro = PRO_ROWS[i];
|
|
31
|
+
const dex = DEX_ROWS[i];
|
|
32
|
+
rows.push(color ? `${RED}${pro}${DEX}${dex}${RESET}` : `${pro}${dex}`);
|
|
33
|
+
}
|
|
34
|
+
rows.push("");
|
|
35
|
+
rows.push(color ? ` ${DIM}${TAGLINE}${RESET}` : ` ${TAGLINE}`);
|
|
36
|
+
return rows.join("\n");
|
|
37
|
+
}
|
|
38
|
+
// Decide whether to colorize based on the environment (honors NO_COLOR, FORCE_COLOR, TTY).
|
|
39
|
+
export function shouldColorize(env = process.env, isTty = process.stdout.isTTY) {
|
|
40
|
+
if (env.NO_COLOR !== undefined && env.NO_COLOR !== "")
|
|
41
|
+
return false;
|
|
42
|
+
// FORCE_COLOR set to "0" disables color even on a TTY (conventional contract); any other non-empty value forces it on.
|
|
43
|
+
if (env.FORCE_COLOR !== undefined && env.FORCE_COLOR !== "")
|
|
44
|
+
return env.FORCE_COLOR !== "0";
|
|
45
|
+
return Boolean(isTty);
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banner.js","sourceRoot":"","sources":["../src/banner.ts"],"names":[],"mappings":"AAKA,kFAAkF;AAClF,8EAA8E;AAC9E,oCAAoC;AACpC,MAAM,QAAQ,GAAG;IACf,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC;AAEF,MAAM,QAAQ,GAAG;IACf,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,2BAA2B;CAC5B,CAAC;AAEF,MAAM,GAAG,GAAG,GAAG,CAAC;AAChB,MAAM,GAAG,GAAG,GAAG,GAAG,kBAAkB,CAAC,CAAC,gBAAgB;AACtD,MAAM,GAAG,GAAG,GAAG,GAAG,oBAAoB,CAAC,CAAC,mDAAmD;AAC3F,MAAM,GAAG,GAAG,GAAG,GAAG,oBAAoB,CAAC,CAAC,UAAU;AAClD,MAAM,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;AAE1B,MAAM,OAAO,GAAG,gEAAgE,CAAC;AAEjF,MAAM,UAAU,YAAY,CAAC,UAAyB,EAAE;IACtD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC;IACpC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;IACjE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,cAAc,CAAC,MAAyB,OAAO,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK;IAC/F,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,GAAG,CAAC,QAAQ,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;IACpE,uHAAuH;IACvH,IAAI,GAAG,CAAC,WAAW,KAAK,SAAS,IAAI,GAAG,CAAC,WAAW,KAAK,EAAE;QAAE,OAAO,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC;IAC5F,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC"}
|
package/dist/bundle.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type BridgeFile } from "./schema.js";
|
|
2
|
+
export interface DryRunBundleInput {
|
|
3
|
+
prompt: string;
|
|
4
|
+
files: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface DryRunBundle {
|
|
7
|
+
schema_version: 1;
|
|
8
|
+
id: string;
|
|
9
|
+
mode: "manual_copy";
|
|
10
|
+
prompt: string;
|
|
11
|
+
files: BridgeFile[];
|
|
12
|
+
text: string;
|
|
13
|
+
created_at: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function buildDryRunBundle(root: string, input: DryRunBundleInput): Promise<DryRunBundle>;
|
package/dist/bundle.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { makeBridgeId, nowIso, SCHEMA_VERSION } from "./schema.js";
|
|
3
|
+
import { readRepoFile } from "./repo.js";
|
|
4
|
+
export async function buildDryRunBundle(root, input) {
|
|
5
|
+
const sections = [
|
|
6
|
+
"# prodex consult dry run",
|
|
7
|
+
"",
|
|
8
|
+
"This preview was not sent anywhere.",
|
|
9
|
+
"",
|
|
10
|
+
"## Prompt",
|
|
11
|
+
"",
|
|
12
|
+
input.prompt.trim()
|
|
13
|
+
];
|
|
14
|
+
const files = [];
|
|
15
|
+
for (const file of input.files) {
|
|
16
|
+
const content = await readRepoFile(root, file, { maxLines: 500 });
|
|
17
|
+
files.push({ path: file, role: "context", bytes: Buffer.byteLength(content.content, "utf8") });
|
|
18
|
+
sections.push("", `## File: ${file}`, "", "```text", content.content, "```");
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
schema_version: SCHEMA_VERSION,
|
|
22
|
+
id: makeBridgeId("sess", `${randomUUID().slice(0, 8)}-${input.prompt}`),
|
|
23
|
+
mode: "manual_copy",
|
|
24
|
+
prompt: input.prompt,
|
|
25
|
+
files,
|
|
26
|
+
text: sections.join("\n"),
|
|
27
|
+
created_at: nowIso()
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAmB,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAiBzC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAY,EAAE,KAAwB;IAC5E,MAAM,QAAQ,GAAa;QACzB,0BAA0B;QAC1B,EAAE;QACF,qCAAqC;QACrC,EAAE;QACF,WAAW;QACX,EAAE;QACF,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;KACpB,CAAC;IACF,MAAM,KAAK,GAAiB,EAAE,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;QAClE,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QAC/F,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO;QACL,cAAc,EAAE,cAAc;QAC9B,EAAE,EAAE,YAAY,CAAC,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACvE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK;QACL,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACzB,UAAU,EAAE,MAAM,EAAE;KACrB,CAAC;AACJ,CAAC"}
|