@christiandoxa/prodex 0.193.0 → 0.194.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 (2) hide show
  1. package/README.md +87 -6
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -143,7 +143,7 @@ If you install from source, make sure the `codex` binary in your `PATH` is alrea
143
143
 
144
144
  ## Optional tools
145
145
 
146
- `prodex` can run without RTK, SQZ, token-savior, claw-compactor, or Presidio.
146
+ `prodex` can run without RTK, SQZ, token-savior, claw-compactor, or Presidio. `prodex-memory` is built in and is enabled by Super mode as a local-first memory MCP server.
147
147
 
148
148
  Install them only if you want to use commands such as:
149
149
 
@@ -155,6 +155,8 @@ prodex rtk
155
155
  prodex sqz
156
156
  prodex tokensavior
157
157
  prodex clawcompactor
158
+ prodex mem
159
+ prodex s doctor
158
160
  prodex presidio doctor
159
161
  prodex presidio redact --text "My phone is 212-555-1234"
160
162
  prodex gateway --provider gemini
@@ -164,6 +166,72 @@ prodex super
164
166
 
165
167
  </details>
166
168
 
169
+ <details>
170
+ <summary>Prodex memory mode</summary>
171
+
172
+ ```bash
173
+ prodex s
174
+ prodex super
175
+ prodex caveman mem
176
+ prodex s doctor
177
+ ```
178
+
179
+ `prodex s` runs Codex with the built-in `prodex-memory` MCP server registered in the temporary overlay `CODEX_HOME`.
180
+ The base Codex profile stays unchanged; memory state is owned by Prodex.
181
+ Use `prodex caveman mem` when you want only Caveman plus the local memory MCP overlay, without the full Super stack.
182
+
183
+ `prodex-memory` provides Mem0-style local memory without Mem0 Cloud, Mem0 CLI, or `MEM0_API_KEY`.
184
+ By default it stores memories in a SQLite database under `PRODEX_HOME`:
185
+
186
+ ```text
187
+ $PRODEX_HOME/memory/prodex-memory.sqlite
188
+ ```
189
+
190
+ `prodex s` asks the Presidio prompt first, then asks whether to use managed Mem0 memory. Empty input or `n` keeps the lightweight SQLite backend. Answer `y` or pass `--mem0` to start the managed Mem0 OSS Docker server. Use `--no-mem0` to skip that prompt non-interactively.
191
+
192
+ The default SQLite path remains the fastest OOTB memory path:
193
+
194
+ - no Mem0 Cloud endpoint
195
+ - no `MEM0_API_KEY`
196
+ - no user-visible Mem0 auth
197
+ - local SQLite storage
198
+ - MCP tools exposed as `prodex-memory`
199
+
200
+ Managed Mem0 mode requires Docker Compose (`docker compose` or `docker-compose`). It does not require a Mem0 Cloud token or a user-supplied provider API key for the default memory path. OpenAI-compatible API-key profiles, `--url` local providers, and supported provider bridges can provide richer upstream LLM/embedding behavior; otherwise Prodex falls back to local embeddings for Mem0.
201
+
202
+ <details>
203
+ <summary>Managed Mem0 internals</summary>
204
+
205
+ Managed Mem0 mode is still local-first:
206
+
207
+ - Prodex clones `https://github.com/mem0ai/mem0` under `$PRODEX_HOME/mem0` if needed.
208
+ - Prodex writes the Mem0 server `.env` with generated local `ADMIN_API_KEY`, `JWT_SECRET`, and Postgres password.
209
+ - Mem0 auth stays enabled; Prodex keeps the local API key internal and injects it only into the temporary MCP overlay.
210
+ - Mem0 receives `OPENAI_BASE_URL=http://host.docker.internal:<prodex-gateway-port>/v1`.
211
+ - Mem0 receives an internal Prodex gateway bearer token as `OPENAI_API_KEY`.
212
+ - The gateway selects an efficient memory LLM when available, preferring nano/mini models, and defaults embeddings to `text-embedding-3-small`.
213
+ - If no upstream API-key profile is available, the internal gateway still serves deterministic local embeddings for Mem0 and disables generation endpoints for that Mem0-only gateway.
214
+ - Prodex writes raw/no-infer memories by default, so the managed path does not spend LLM quota for memory extraction.
215
+ - No Mem0 Cloud endpoint and no user-managed `MEM0_API_KEY` are used.
216
+
217
+ </details>
218
+
219
+ <details>
220
+ <summary>Memory diagnostics</summary>
221
+
222
+ Use `prodex s doctor` to verify that the built-in memory store can be opened before launching Codex. The hidden MCP server can also be launched directly for diagnostics:
223
+
224
+ ```bash
225
+ prodex s doctor
226
+ prodex __memory-mcp --store /tmp/prodex-memory.sqlite
227
+ ```
228
+
229
+ Mem0 Cloud's official MCP endpoint is intentionally not part of Prodex Super's default path. Configure it manually only when you explicitly want Mem0 Platform auth and are willing to manage `MEM0_API_KEY` yourself.
230
+
231
+ </details>
232
+
233
+ </details>
234
+
167
235
  <details>
168
236
  <summary>Install RTK</summary>
169
237
 
@@ -370,6 +438,8 @@ docker run -d --name presidio-analyzer -p 5002:3000 mcr.microsoft.com/presidio-a
370
438
  docker run -d --name presidio-anonymizer -p 5001:3000 mcr.microsoft.com/presidio-anonymizer:latest
371
439
  ```
372
440
 
441
+ When Super mode opts into Presidio and the default local endpoints are not healthy, Prodex now tries to start these Docker containers automatically before launching Codex. Set `PRODEX_PRESIDIO_AUTO_START=0` to disable that best-effort auto-start and only use the configured endpoints.
442
+
373
443
  Source checkout with Compose:
374
444
 
375
445
  ```bash
@@ -521,22 +591,28 @@ prodex s expose
521
591
  `prodex super` expands to:
522
592
 
523
593
  ```bash
524
- prodex caveman rtk sqz tokensavior clawcompactor --full-access
594
+ prodex caveman rtk sqz tokensavior clawcompactor mem --full-access
525
595
  ```
526
596
 
527
597
  Before launch, Super asks whether to add Presidio redaction. Empty input or `n` keeps the expansion above. If you answer `y`, it is equivalent to:
528
598
 
529
599
  ```bash
530
- prodex caveman rtk sqz tokensavior clawcompactor presidio --full-access
600
+ prodex caveman rtk sqz tokensavior clawcompactor mem presidio --full-access
531
601
  ```
532
602
 
533
603
  Use `prodex super --presidio` to enable Presidio without prompting, or `prodex super --no-presidio` to skip the prompt and keep Presidio disabled. Presidio enables runtime request-body and WebSocket text redaction through local Presidio for the session. The runtime uses `presidio.toml` endpoints when configured, falls back to `http://localhost:5002` and `http://localhost:5001`, and honors `fail_mode = "open"` or `"closed"`.
534
604
 
605
+ After the Presidio prompt, Super asks whether to use managed Mem0 memory. Empty input or `n` keeps the built-in SQLite-backed `prodex-memory` MCP backend. Answer `y` or pass `--mem0` to start the managed Mem0 OSS Docker server, route its OpenAI-compatible calls through a session-local Prodex gateway, and inject the local Mem0 API key into the temporary Codex MCP config. Use `--no-mem0` to skip the prompt. This path does not use Mem0 Cloud or `MEM0_API_KEY`; Docker Compose is required, and Prodex falls back to local embeddings when no upstream provider API key is available.
606
+
607
+ Super prints prelaunch progress for runtime proxy setup, Presidio auto-start/checks, and managed Mem0 Docker startup. The output happens before Codex starts; runtime notices still go to logs once the TUI is running.
608
+
535
609
  Full access maps to Codex's sandbox-bypass launch flag. Use it only when you intentionally want Codex to run without the normal approval and sandbox protections.
536
610
 
611
+ Use `prodex s doctor` to inspect the Super optimizer stack without launching Codex. Add `--json` for machine-readable output, `--strict` to exit non-zero when any optimizer check is unavailable, and `--presidio` to include local Presidio Analyzer/Anonymizer health checks. `prodex s --dry-run` also prints the same optimizer matrix for the launch preview.
612
+
537
613
  Use `prodex s expose` when you need to reach the live Super terminal from a browser. Prodex starts a local PTY bridge protected by a high-entropy access token, launches `cloudflared tunnel --protocol http2 --url ...` when `cloudflared` is available, and prints both the loopback and Cloudflare quick-tunnel URLs. The browser tab can close without stopping the session; reopening the same token URL reconnects to the existing PTY and replays recent scrollback. Add `--no-tunnel` for local-only access, `--max-clients N` to cap simultaneous browsers, or `--command 'prodex s --no-presidio'` to choose the initial terminal command.
538
614
 
539
- Super's built-in optimization stack is deliberately local and deterministic. It preloads Caveman, exposes an overlay `rtk` wrapper plus RTK auto-wrappers for common noisy commands when RTK is installed, auto-registers `sqz-mcp` and `token-savior` MCP servers when those binaries are already on `PATH` or in a managed `prodex-optimizers` checkout, exposes `sqz` and `claw-compactor` wrappers when those commands/checkouts are discoverable, invokes a trusted one-shot `prodex-claw-compactor-sessionstart` SessionStart benchmark probe when Claw-Compactor is available, falls back to a temporary shadow `MEMORY.md` when the workspace has no Markdown memory files, then uses Smart Context Autopilot through a dedicated runtime proxy for lower-token request shaping. The probe delegates to `prodex-claw-compactor-auto "$(pwd)"` and uses a marker under `CODEX_HOME` so Codex conversation restarts do not replay it. Presidio redaction is added to that proxy only when you opt in at the prompt. Prodex passes token-savior cache and stats paths under `PRODEX_HOME` (default `~/.prodex`) so compatible token-savior versions keep generated state out of worktrees.
615
+ Super's built-in optimization stack is deliberately local and deterministic. It preloads Caveman, exposes an overlay `rtk` wrapper plus RTK auto-wrappers for common noisy commands when RTK is installed, auto-registers `sqz-mcp`, `token-savior`, and built-in `prodex-memory` MCP servers, exposes `sqz` and `claw-compactor` wrappers when those commands/checkouts are discoverable, invokes a trusted one-shot `prodex-claw-compactor-sessionstart` SessionStart benchmark probe when Claw-Compactor is available, falls back to a temporary shadow `MEMORY.md` when the workspace has no Markdown memory files, then uses Smart Context Autopilot through a dedicated runtime proxy for lower-token request shaping. The probe delegates to `prodex-claw-compactor-auto "$(pwd)"` and uses a marker under `CODEX_HOME` so Codex conversation restarts do not replay it. Presidio redaction is added to that proxy only when you opt in at the prompt. Prodex passes token-savior cache, stats paths, and local memory under `PRODEX_HOME` (default `~/.prodex`) so compatible token-savior versions and memory state stay out of worktrees.
540
616
 
541
617
  Super instructs Codex to use the whole local optimizer stack where it fits the task, not just RTK:
542
618
 
@@ -544,9 +620,11 @@ Super instructs Codex to use the whole local optimizer stack where it fits the t
544
620
  - SQZ works downstream/context-side through the auto-registered `prodex-sqz` MCP server. Use it for repeated workspace reads, large text blobs, long command outputs that need reuse, and long-session context compression instead of emitting the same full content again.
545
621
  - token-savior handles symbol lookup, caller/context navigation, duplicate/dead-code checks, and API-impact searches before broad source reads.
546
622
  - claw-compactor handles workspace-level summary or benchmark requests through `prodex-claw-compactor` / `prodex-claw-compactor-auto`; treat its output as overview context and reread exact source before edits.
623
+ - prodex-memory provides local Mem0-style memory through the default SQLite backend, or through managed Mem0 OSS Docker when you opt in with the Super prompt or `--mem0`; neither path uses Mem0 Cloud auth or `MEM0_API_KEY`.
547
624
  - Presidio stays optional and only runs when you opt in with the Super prompt or `--presidio`.
548
625
 
549
626
  Managed optimizer checkouts are discovered from `PRODEX_OPTIMIZERS_HOME`, `$XDG_DATA_HOME/prodex-optimizers`, then `~/.local/share/prodex-optimizers`.
627
+ The generated `SUPER_OPTIMIZERS.md` overlay includes an `Available Now` section so the model can see which MCP servers and wrappers were actually discovered for that session.
550
628
 
551
629
  </details>
552
630
 
@@ -693,7 +771,10 @@ prodex rtk
693
771
  prodex sqz
694
772
  prodex tokensavior
695
773
  prodex clawcompactor
774
+ prodex mem
696
775
  prodex caveman --dry-run
776
+ prodex s doctor
777
+ prodex s doctor --json --strict
697
778
  prodex caveman --profile main
698
779
  prodex caveman exec "review this repo in caveman mode"
699
780
  prodex caveman 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9
@@ -701,7 +782,7 @@ prodex caveman 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9
701
782
 
702
783
  `prodex caveman` runs Codex with a temporary overlay `CODEX_HOME`, so the base profile home stays unchanged after the session ends.
703
784
 
704
- Add optimizer prefixes before Codex args when you want Prodex to inject a specific launch overlay for that session: `rtk`, `sqz`, `tokensavior`, `clawcompactor`, or `presidio`. Top-level shortcuts such as `prodex rtk` and `prodex sqz` map to `prodex caveman <prefix>`.
785
+ Add optimizer prefixes before Codex args when you want Prodex to inject a specific launch overlay for that session: `rtk`, `sqz`, `tokensavior`, `clawcompactor`, `mem`, or `presidio`. Top-level shortcuts such as `prodex rtk`, `prodex sqz`, and `prodex mem` map to `prodex caveman <prefix>`.
705
786
 
706
787
  RTK is still an external binary. Install it separately if `rtk gain` is unavailable.
707
788
 
@@ -786,7 +867,7 @@ Gemini Live realtime websocket translation remains available for compatible call
786
867
 
787
868
  Run `npm run test:gemini-schema` after changing Gemini request, response, SSE, semantic compact, exact-output, tool-schema, or Live translation. Run `PRODEX_LIVE_GEMINI=1 npm run test:gemini-live` for a credentialed end-to-end Gemini adapter smoke request; set `PRODEX_BIN` or `PRODEX_LIVE_GEMINI_MODEL` to override the binary or model. Add `PRODEX_LIVE_GEMINI_EXTENDED=1` for command-output-only, file edit, `apply_patch`, reference-repo clone/inspection, optional-tool update discipline, semantic compact, and explicit `exec resume` checks. Add `PRODEX_LIVE_GEMINI_MCP=1` and/or `PRODEX_LIVE_GEMINI_MULTIMODAL=1` when the local environment should also exercise MCP and image-input paths.
788
869
 
789
- Before launch, Super asks whether to add Presidio redaction. Empty input or `n` keeps Presidio disabled; answer `y` or pass `--presidio` to add the `presidio` prefix. Use `--no-presidio` to make the disabled choice explicit for non-interactive use.
870
+ Before launch, Super asks whether to add Presidio redaction. Empty input or `n` keeps Presidio disabled; answer `y` or pass `--presidio` to add the `presidio` prefix. Use `--no-presidio` to make the disabled choice explicit for non-interactive use. Super then asks whether to use managed Mem0 memory. Empty input or `n` keeps the built-in SQLite memory backend; answer `y` or pass `--mem0` to start the managed Mem0 OSS Docker server and route its OpenAI-compatible calls through Prodex gateway. Use `--no-mem0` to skip that prompt.
790
871
 
791
872
  Prodex now supports multi-language Presidio redaction, including automatic detection and multi-language merging. The runtime uses `presidio.toml` endpoints and language configuration when available, falling back to `http://localhost:5002` and `http://localhost:5001` for Analyzer/Anonymizer URLs, and English (`en`) for language if not specified. It honors `fail_mode = "open"` or `"closed"`.
792
873
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christiandoxa/prodex",
3
- "version": "0.193.0",
3
+ "version": "0.194.0",
4
4
  "description": "Safe multi-account auto-rotate for Codex CLI with isolated CODEX_HOME profiles",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -16,12 +16,12 @@
16
16
  "@openai/codex": "latest"
17
17
  },
18
18
  "optionalDependencies": {
19
- "@christiandoxa/prodex-linux-x64": "0.193.0",
20
- "@christiandoxa/prodex-linux-arm64": "0.193.0",
21
- "@christiandoxa/prodex-darwin-x64": "0.193.0",
22
- "@christiandoxa/prodex-darwin-arm64": "0.193.0",
23
- "@christiandoxa/prodex-win32-x64": "0.193.0",
24
- "@christiandoxa/prodex-win32-arm64": "0.193.0",
19
+ "@christiandoxa/prodex-linux-x64": "0.194.0",
20
+ "@christiandoxa/prodex-linux-arm64": "0.194.0",
21
+ "@christiandoxa/prodex-darwin-x64": "0.194.0",
22
+ "@christiandoxa/prodex-darwin-arm64": "0.194.0",
23
+ "@christiandoxa/prodex-win32-x64": "0.194.0",
24
+ "@christiandoxa/prodex-win32-arm64": "0.194.0",
25
25
  "@openai/codex-linux-x64": "npm:@openai/codex@linux-x64",
26
26
  "@openai/codex-linux-arm64": "npm:@openai/codex@linux-arm64",
27
27
  "@openai/codex-darwin-x64": "npm:@openai/codex@darwin-x64",