@christiandoxa/prodex 0.270.0 → 0.273.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/README.md +41 -558
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -147,508 +147,63 @@ If you install from source, make sure the `codex` binary in your `PATH` is alrea
|
|
|
147
147
|
|
|
148
148
|
## Optional tools
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
Prodex Super keeps a deliberately small optional stack:
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
- [RTK](https://github.com/rtk-ai/rtk) for noisy shell output.
|
|
153
|
+
- [Codebase Memory MCP](https://github.com/DeusData/codebase-memory-mcp) for structural code navigation.
|
|
154
|
+
- [Ponytail](https://github.com/DietrichGebert/ponytail) for minimal-implementation guidance.
|
|
155
|
+
- [Presidio](https://github.com/data-privacy-stack/presidio) for opt-in PII redaction.
|
|
153
156
|
|
|
154
|
-
|
|
155
|
-
<summary>Optional tool commands</summary>
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
prodex rtk
|
|
159
|
-
prodex sqz
|
|
160
|
-
prodex tokensavior
|
|
161
|
-
prodex clawcompactor
|
|
162
|
-
prodex ponytail
|
|
163
|
-
prodex mem
|
|
164
|
-
prodex s doctor
|
|
165
|
-
prodex presidio doctor
|
|
166
|
-
prodex presidio redact --text "My phone is 212-555-1234"
|
|
167
|
-
prodex gateway --provider gemini
|
|
168
|
-
prodex s
|
|
169
|
-
prodex super
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
</details>
|
|
173
|
-
|
|
174
|
-
<details>
|
|
175
|
-
<summary>Install Ponytail</summary>
|
|
176
|
-
|
|
177
|
-
Ponytail is used by `prodex ponytail` and by Super mode when a Ponytail checkout is available under a managed optimizer root. Prodex installs the checkout into the temporary Codex overlay marketplace/cache for that session, enables `ponytail@ponytail`, and leaves the base Codex profile unchanged.
|
|
178
|
-
|
|
179
|
-
Recommended source checkout:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
git clone https://github.com/DietrichGebert/ponytail.git ~/.local/share/prodex-optimizers/ponytail
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Then launch:
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
prodex ponytail
|
|
189
|
-
prodex caveman ponytail
|
|
190
|
-
prodex rtk caveman ponytail
|
|
191
|
-
prodex s
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Ponytail's Codex plugin uses Node.js lifecycle hooks. If `node` is not on the non-interactive shell `PATH`, Ponytail skills remain installed but the always-on hook activation may stay quiet.
|
|
195
|
-
|
|
196
|
-
</details>
|
|
157
|
+
Caveman and Smart Context are built into Prodex. Prodex runs without every external tool above; missing tools are skipped instead of blocking launch.
|
|
197
158
|
|
|
198
159
|
<details>
|
|
199
|
-
<summary>
|
|
200
|
-
|
|
201
|
-
`prodex-inspect` exposes read-only MCP tools for agent-side diagnostics:
|
|
202
|
-
|
|
203
|
-
- `prodex_status`: Prodex paths, active profile, profile count, binding counts, and version.
|
|
204
|
-
- `prodex_profiles`: configured profiles without secrets.
|
|
205
|
-
- `prodex_latest_runtime_log`: latest runtime log pointer plus a bounded tail excerpt.
|
|
160
|
+
<summary>Install and verify the Super tools</summary>
|
|
206
161
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
prodex __inspect-mcp
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
</details>
|
|
214
|
-
|
|
215
|
-
<details>
|
|
216
|
-
<summary>Prodex memory mode (advanced)</summary>
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
prodex s
|
|
220
|
-
prodex super
|
|
221
|
-
prodex caveman mem
|
|
222
|
-
prodex s doctor
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
`prodex s` leaves `prodex-memory` disabled unless you opt in.
|
|
226
|
-
The base Codex profile stays unchanged; memory state is owned by Prodex.
|
|
227
|
-
Use `prodex caveman mem` when you want only Caveman plus the local memory MCP server, without the full Super stack.
|
|
228
|
-
|
|
229
|
-
`prodex-memory` provides Mem0-style local memory without Mem0 Cloud, Mem0 CLI, or `MEM0_API_KEY`.
|
|
230
|
-
The local `mem` prefix stores memories in a SQLite database under `PRODEX_HOME`:
|
|
231
|
-
|
|
232
|
-
```text
|
|
233
|
-
$PRODEX_HOME/memory/prodex-memory.sqlite
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
`prodex s` asks the Presidio prompt first, then asks whether to enable prodex-memory through managed Mem0 Docker. Empty input or `n` leaves the memory MCP disabled. Answer `y` or pass `--mem0` to start the managed Mem0 OSS Docker server. Use `--no-mem0` to skip that prompt non-interactively, or `prodex s mem` / `prodex caveman mem` / `prodex mem` for the lightweight SQLite backend.
|
|
237
|
-
|
|
238
|
-
The SQLite path remains the fastest OOTB memory path when you request memory:
|
|
239
|
-
|
|
240
|
-
- no Mem0 Cloud endpoint
|
|
241
|
-
- no `MEM0_API_KEY`
|
|
242
|
-
- no user-visible Mem0 auth
|
|
243
|
-
- local SQLite storage
|
|
244
|
-
- MCP tools exposed as `prodex-memory`
|
|
245
|
-
|
|
246
|
-
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.
|
|
247
|
-
|
|
248
|
-
<details>
|
|
249
|
-
<summary>Managed Mem0 internals (advanced)</summary>
|
|
250
|
-
|
|
251
|
-
Managed Mem0 mode is still local-first:
|
|
252
|
-
|
|
253
|
-
- Prodex clones `https://github.com/mem0ai/mem0` under `$PRODEX_HOME/mem0` if needed.
|
|
254
|
-
- Prodex writes the Mem0 server `.env` with generated local `ADMIN_API_KEY`, `JWT_SECRET`, and Postgres password.
|
|
255
|
-
- Mem0 auth stays enabled; Prodex keeps the local API key internal and injects it only into the temporary MCP overlay.
|
|
256
|
-
- Mem0 receives `OPENAI_BASE_URL=http://host.docker.internal:<prodex-gateway-port>/v1`.
|
|
257
|
-
- Mem0 receives an internal Prodex gateway bearer token as `OPENAI_API_KEY`.
|
|
258
|
-
- The gateway selects an efficient memory LLM when available, preferring nano/mini models, and defaults embeddings to `text-embedding-3-small`.
|
|
259
|
-
- 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.
|
|
260
|
-
- Prodex writes raw/no-infer memories by default, so the managed path does not spend LLM quota for memory extraction.
|
|
261
|
-
- No Mem0 Cloud endpoint and no user-managed `MEM0_API_KEY` are used.
|
|
262
|
-
|
|
263
|
-
</details>
|
|
264
|
-
|
|
265
|
-
<details>
|
|
266
|
-
<summary>Memory diagnostics (advanced)</summary>
|
|
267
|
-
|
|
268
|
-
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:
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
prodex s doctor
|
|
272
|
-
prodex __memory-mcp --store /tmp/prodex-memory.sqlite
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
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.
|
|
276
|
-
|
|
277
|
-
</details>
|
|
278
|
-
|
|
279
|
-
</details>
|
|
280
|
-
|
|
281
|
-
<details>
|
|
282
|
-
<summary>Install RTK</summary>
|
|
283
|
-
|
|
284
|
-
RTK is used by the `rtk` variants and by my daily `prodex s` / `prodex super` workflow.
|
|
285
|
-
|
|
286
|
-
### Homebrew
|
|
162
|
+
RTK:
|
|
287
163
|
|
|
288
164
|
```bash
|
|
289
165
|
brew install rtk-ai/tap/rtk
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
### Linux/macOS quick install
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | sh
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
If it installs to `~/.local/bin`, make sure that directory is in your `PATH`:
|
|
299
|
-
|
|
300
|
-
```bash
|
|
301
|
-
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
For Zsh:
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
### Cargo
|
|
311
|
-
|
|
312
|
-
```bash
|
|
166
|
+
# or
|
|
313
167
|
cargo install --git https://github.com/rtk-ai/rtk rtk
|
|
314
|
-
```
|
|
315
168
|
|
|
316
|
-
### Verify RTK
|
|
317
|
-
|
|
318
|
-
```bash
|
|
319
169
|
rtk --version
|
|
320
170
|
rtk gain
|
|
321
171
|
```
|
|
322
172
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
Remove it and reinstall from the Git URL:
|
|
326
|
-
|
|
327
|
-
```bash
|
|
328
|
-
cargo uninstall rtk
|
|
329
|
-
cargo install --git https://github.com/rtk-ai/rtk rtk
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### Initialize RTK
|
|
333
|
-
|
|
334
|
-
For Codex:
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
rtk init -g --codex
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
For Claude Code:
|
|
341
|
-
|
|
342
|
-
```bash
|
|
343
|
-
rtk init -g
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
Then restart your coding tool.
|
|
347
|
-
|
|
348
|
-
</details>
|
|
349
|
-
|
|
350
|
-
<details>
|
|
351
|
-
<summary>Install SQZ</summary>
|
|
352
|
-
|
|
353
|
-
SQZ is used by `prodex sqz` and by Super mode when the `sqz-mcp` binary is available on `PATH` or under a managed optimizer checkout.
|
|
354
|
-
|
|
355
|
-
Recommended Linux/macOS install:
|
|
356
|
-
|
|
357
|
-
```bash
|
|
358
|
-
curl -fsSL https://raw.githubusercontent.com/ojuschugh1/sqz/main/install.sh | sh
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
Windows PowerShell:
|
|
362
|
-
|
|
363
|
-
```powershell
|
|
364
|
-
irm https://raw.githubusercontent.com/ojuschugh1/sqz/main/install.ps1 | iex
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
Alternative npm install:
|
|
368
|
-
|
|
369
|
-
```bash
|
|
370
|
-
npm install -g sqz-cli
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
Optional source install:
|
|
374
|
-
|
|
375
|
-
```bash
|
|
376
|
-
cargo install sqz-cli
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
Initialize hooks if you also want SQZ outside Prodex:
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
sqz init --global
|
|
383
|
-
# or only for the current project
|
|
384
|
-
sqz init
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
Verify:
|
|
388
|
-
|
|
389
|
-
```bash
|
|
390
|
-
sqz --version
|
|
391
|
-
sqz gain
|
|
392
|
-
which sqz-mcp
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
Prodex auto-registers `prodex-sqz` for Prodex overlay sessions when `sqz-mcp` is discoverable.
|
|
396
|
-
|
|
397
|
-
</details>
|
|
398
|
-
|
|
399
|
-
<details>
|
|
400
|
-
<summary>Install token-savior</summary>
|
|
401
|
-
|
|
402
|
-
token-savior is used by `prodex tokensavior` and by Super mode when the `token-savior` binary is available on `PATH` or under a managed optimizer checkout.
|
|
403
|
-
|
|
404
|
-
Recommended isolated install:
|
|
405
|
-
|
|
406
|
-
```bash
|
|
407
|
-
git clone https://github.com/Mibayy/token-savior ~/.local/share/prodex-optimizers/token-savior
|
|
408
|
-
python3.12 -m venv ~/.local/share/prodex-optimizers/token-savior/.venv
|
|
409
|
-
~/.local/share/prodex-optimizers/token-savior/.venv/bin/pip install -e "$HOME/.local/share/prodex-optimizers/token-savior[mcp]"
|
|
410
|
-
ln -sf ~/.local/share/prodex-optimizers/token-savior/.venv/bin/token-savior ~/.local/bin/token-savior
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
Use a stable Python interpreter supported by token-savior dependencies, such as Python 3.11, 3.12, or 3.13. Avoid pointing this MCP server at experimental Python releases unless its native dependencies already support them.
|
|
414
|
-
|
|
415
|
-
Make sure `~/.local/bin` is on `PATH`:
|
|
416
|
-
|
|
417
|
-
```bash
|
|
418
|
-
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
If you use Zsh:
|
|
422
|
-
|
|
423
|
-
```bash
|
|
424
|
-
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
Verify:
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
token-savior --help
|
|
431
|
-
which token-savior
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
Prodex handles MCP registration for its own overlay session when it can find the binary, so you do not need to manually edit `.mcp.json` just for `prodex super`.
|
|
435
|
-
|
|
436
|
-
</details>
|
|
437
|
-
|
|
438
|
-
<details>
|
|
439
|
-
<summary>Install Codebase Memory MCP</summary>
|
|
440
|
-
|
|
441
|
-
Codebase Memory MCP is used by Super mode when the `codebase-memory-mcp` binary is available on `PATH` or under a managed optimizer checkout. Prodex auto-registers it as `codebase-memory-mcp` for `prodex s` / `prodex super` overlay sessions and routes its cache under `PRODEX_HOME`.
|
|
442
|
-
|
|
443
|
-
Install the upstream binary:
|
|
173
|
+
Codebase Memory MCP:
|
|
444
174
|
|
|
445
175
|
```bash
|
|
446
176
|
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --skip-config
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
Or use a managed checkout:
|
|
450
|
-
|
|
451
|
-
```bash
|
|
452
|
-
git clone https://github.com/DeusData/codebase-memory-mcp.git ~/.local/share/prodex-optimizers/codebase-memory-mcp
|
|
453
|
-
cd ~/.local/share/prodex-optimizers/codebase-memory-mcp
|
|
454
|
-
scripts/build.sh
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
Verify:
|
|
458
|
-
|
|
459
|
-
```bash
|
|
460
177
|
codebase-memory-mcp --help
|
|
461
|
-
prodex s doctor
|
|
462
178
|
```
|
|
463
179
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
```bash
|
|
467
|
-
CBM_CACHE_DIR="${PRODEX_HOME:-$HOME/.prodex}/optimizer-state/codebase-memory/cache" codebase-memory-mcp config set auto_index true
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
</details>
|
|
471
|
-
|
|
472
|
-
<details>
|
|
473
|
-
<summary>Install claw-compactor</summary>
|
|
474
|
-
|
|
475
|
-
claw-compactor is used by `prodex clawcompactor` and by Super mode as a deterministic/local context compaction aid. When discoverable, Super installs `prodex-claw-compactor` and `prodex-claw-compactor-auto` wrappers plus a trusted one-shot SessionStart probe wrapper. The startup probe is disabled by default so Codex launch is not delayed; opt in with `PRODEX_CLAW_SESSIONSTART_TIMEOUT_SECONDS=<seconds>` when you want it to run `claw-compactor benchmark <workspace> --json` through Prodex's compatibility wrapper. It uses a marker under `CODEX_HOME` to avoid replay after Codex conversation restarts. If the workspace has no Markdown memory files, Prodex benchmarks a temporary shadow workspace with a synthetic `MEMORY.md` summary instead of writing into the original directory.
|
|
476
|
-
|
|
477
|
-
Recommended source install:
|
|
180
|
+
Ponytail:
|
|
478
181
|
|
|
479
182
|
```bash
|
|
480
|
-
git clone https://github.com/
|
|
481
|
-
|
|
482
|
-
~/.local/claw-compactor-venv/bin/pip install -e "$HOME/.local/share/claw-compactor[accurate]"
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
If you only need exact token counting for the scripts:
|
|
486
|
-
|
|
487
|
-
```bash
|
|
488
|
-
~/.local/claw-compactor-venv/bin/pip install tiktoken
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
Expose the checkout to Prodex's managed optimizer discovery:
|
|
492
|
-
|
|
493
|
-
```bash
|
|
494
|
-
mkdir -p ~/.local/share/prodex-optimizers
|
|
495
|
-
ln -sfn ~/.local/share/claw-compactor ~/.local/share/prodex-optimizers/claw-compactor
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
Quick non-destructive benchmark:
|
|
499
|
-
|
|
500
|
-
```bash
|
|
501
|
-
python3 ~/.local/share/claw-compactor/scripts/mem_compress.py /path/to/workspace benchmark
|
|
183
|
+
git clone https://github.com/DietrichGebert/ponytail.git ~/.local/share/prodex-optimizers/ponytail
|
|
184
|
+
prodex ponytail
|
|
502
185
|
```
|
|
503
186
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
<details>
|
|
507
|
-
<summary>Install Presidio</summary>
|
|
508
|
-
|
|
509
|
-
Presidio is used by `prodex presidio` and by the optional Super-mode privacy prompt. It runs as local Analyzer and Anonymizer HTTP services.
|
|
510
|
-
|
|
511
|
-
### English-only quick install
|
|
187
|
+
Prodex installs Ponytail only into the temporary overlay for that session. The base Codex profile remains unchanged.
|
|
512
188
|
|
|
513
|
-
|
|
189
|
+
Presidio English services:
|
|
514
190
|
|
|
515
191
|
```bash
|
|
516
|
-
docker pull mcr.microsoft.com/presidio-analyzer
|
|
517
|
-
docker pull mcr.microsoft.com/presidio-anonymizer
|
|
518
|
-
|
|
519
192
|
docker run -d --name presidio-analyzer -p 5002:3000 mcr.microsoft.com/presidio-analyzer:latest
|
|
520
193
|
docker run -d --name presidio-anonymizer -p 5001:3000 mcr.microsoft.com/presidio-anonymizer:latest
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
<details>
|
|
524
|
-
<summary>English + Indonesian install (advanced)</summary>
|
|
525
|
-
|
|
526
|
-
Prodex can route requests with `--language-mode auto --languages en,id`, but Indonesian (`id`) detection only works if the Analyzer supports Indonesian NLP configuration and recognizers. The default Microsoft Analyzer image is usually English-only, so build a custom Analyzer and keep the standard Anonymizer.
|
|
527
|
-
|
|
528
|
-
Minimal local Analyzer example:
|
|
529
|
-
|
|
530
|
-
```bash
|
|
531
|
-
mkdir -p ~/.local/share/presidio-id-analyzer
|
|
532
|
-
cd ~/.local/share/presidio-id-analyzer
|
|
533
|
-
|
|
534
|
-
cat > Dockerfile <<'EOF'
|
|
535
|
-
FROM python:3.11-slim
|
|
536
|
-
RUN pip install --no-cache-dir flask gunicorn presidio-analyzer spacy \
|
|
537
|
-
&& python -m spacy download en_core_web_sm \
|
|
538
|
-
&& python -m spacy download xx_ent_wiki_sm
|
|
539
|
-
WORKDIR /app
|
|
540
|
-
COPY app.py /app/app.py
|
|
541
|
-
CMD ["gunicorn", "-b", "0.0.0.0:3000", "app:app"]
|
|
542
|
-
EOF
|
|
543
|
-
|
|
544
|
-
cat > app.py <<'EOF'
|
|
545
|
-
from flask import Flask, jsonify, request
|
|
546
|
-
from presidio_analyzer import AnalyzerEngine, Pattern, PatternRecognizer, RecognizerRegistry
|
|
547
|
-
from presidio_analyzer.nlp_engine import NlpEngineProvider
|
|
548
|
-
from presidio_analyzer.predefined_recognizers import EmailRecognizer, UrlRecognizer
|
|
549
|
-
|
|
550
|
-
nlp_config = {
|
|
551
|
-
"nlp_engine_name": "spacy",
|
|
552
|
-
"models": [
|
|
553
|
-
{"lang_code": "en", "model_name": "en_core_web_sm"},
|
|
554
|
-
{"lang_code": "id", "model_name": "xx_ent_wiki_sm"},
|
|
555
|
-
],
|
|
556
|
-
}
|
|
557
|
-
nlp_engine = NlpEngineProvider(nlp_configuration=nlp_config).create_engine()
|
|
558
|
-
registry = RecognizerRegistry(supported_languages=["en", "id"])
|
|
559
|
-
registry.load_predefined_recognizers(nlp_engine=nlp_engine, languages=["en", "id"])
|
|
560
|
-
registry.add_recognizer(EmailRecognizer(supported_language="id"))
|
|
561
|
-
registry.add_recognizer(UrlRecognizer(supported_language="id"))
|
|
562
|
-
|
|
563
|
-
registry.add_recognizer(PatternRecognizer(
|
|
564
|
-
supported_entity="PHONE_NUMBER",
|
|
565
|
-
language="id",
|
|
566
|
-
patterns=[Pattern("id mobile phone", r"(?<!\d)(?:\+62|62|0)8[1-9][\d\s.-]{7,13}\d(?!\d)", 0.75)],
|
|
567
|
-
context=["telepon", "nomor", "hp", "ponsel"],
|
|
568
|
-
))
|
|
569
|
-
registry.add_recognizer(PatternRecognizer(
|
|
570
|
-
supported_entity="ID_INDONESIA_NIK",
|
|
571
|
-
language="id",
|
|
572
|
-
patterns=[Pattern("nik", r"(?<!\d)\d{16}(?!\d)", 0.75)],
|
|
573
|
-
context=["nik", "ktp"],
|
|
574
|
-
))
|
|
575
|
-
registry.add_recognizer(PatternRecognizer(
|
|
576
|
-
supported_entity="ID_INDONESIA_NPWP",
|
|
577
|
-
language="id",
|
|
578
|
-
patterns=[Pattern("npwp", r"(?<!\d)\d{2}\.?\d{3}\.?\d{3}\.?\d[-.]?\d{3}\.?\d{3}(?!\d)", 0.75)],
|
|
579
|
-
context=["npwp", "pajak"],
|
|
580
|
-
))
|
|
581
|
-
registry.add_recognizer(PatternRecognizer(
|
|
582
|
-
supported_entity="PERSON",
|
|
583
|
-
language="id",
|
|
584
|
-
patterns=[Pattern("nama saya", r"(?i)\b(?:nama saya|saya bernama|nama)\s+[A-Z][A-Za-z.'-]*(?:\s+[A-Z][A-Za-z.'-]*){0,3}", 0.85)],
|
|
585
|
-
context=["nama", "saya", "bernama"],
|
|
586
|
-
))
|
|
587
|
-
|
|
588
|
-
analyzer = AnalyzerEngine(
|
|
589
|
-
nlp_engine=nlp_engine,
|
|
590
|
-
registry=registry,
|
|
591
|
-
supported_languages=["en", "id"],
|
|
592
|
-
)
|
|
593
|
-
app = Flask(__name__)
|
|
594
|
-
|
|
595
|
-
@app.get("/health")
|
|
596
|
-
def health():
|
|
597
|
-
return jsonify({"status": "ok"})
|
|
598
|
-
|
|
599
|
-
@app.post("/analyze")
|
|
600
|
-
def analyze():
|
|
601
|
-
body = request.get_json(force=True)
|
|
602
|
-
results = analyzer.analyze(
|
|
603
|
-
text=body["text"],
|
|
604
|
-
language=body.get("language", "en"),
|
|
605
|
-
entities=body.get("entities"),
|
|
606
|
-
score_threshold=body.get("score_threshold", 0),
|
|
607
|
-
)
|
|
608
|
-
return jsonify([result.to_dict() for result in results])
|
|
609
|
-
EOF
|
|
610
|
-
|
|
611
|
-
docker build -t prodex-presidio-analyzer-id:latest .
|
|
612
|
-
docker rm -f presidio-analyzer presidio-anonymizer 2>/dev/null || true
|
|
613
|
-
docker run -d --name presidio-analyzer -p 5002:3000 prodex-presidio-analyzer-id:latest
|
|
614
|
-
docker run -d --name presidio-anonymizer -p 5001:3000 mcr.microsoft.com/presidio-anonymizer:latest
|
|
615
|
-
|
|
616
|
-
prodex presidio enable --language-mode auto --languages en,id
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
This example keeps built-in recognizers such as `EMAIL_ADDRESS` and `URL`, adds Indonesian phone numbers, NIK, NPWP, and context-based `PERSON` detection for text like `Nama saya Budi`.
|
|
620
|
-
|
|
621
|
-
</details>
|
|
622
|
-
|
|
623
|
-
### Verify
|
|
624
|
-
|
|
625
|
-
```bash
|
|
194
|
+
prodex presidio enable --language-mode fixed --languages en
|
|
626
195
|
prodex presidio doctor --json
|
|
627
|
-
prodex presidio redact --language en --text "My name is John Smith and my phone is 212-555-1234."
|
|
628
|
-
prodex presidio redact --language id --text "Nama saya Budi dan nomor telepon saya adalah 0812-3456-7890."
|
|
629
|
-
prodex presidio redact --language id --text "NIK saya 3171010101900001 dan email saya budi@example.com."
|
|
630
196
|
```
|
|
631
197
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
### Use with `prodex s`
|
|
635
|
-
|
|
636
|
-
Once `prodex presidio enable --language-mode auto --languages en,id` is configured and the custom Analyzer plus Anonymizer containers are healthy, run `prodex s` and answer `y` to the Presidio prompt. That is enough to enable runtime request-body and WebSocket text-frame redaction for the session. Use `--presidio` to enable it non-interactively or `--no-presidio` to skip it.
|
|
637
|
-
|
|
638
|
-
If the endpoints are unhealthy, Prodex may auto-start the default Microsoft containers. Those are English-only unless your custom Analyzer image/container is already configured and running. Set `PRODEX_PRESIDIO_AUTO_START=0` to disable best-effort auto-start and only use configured endpoints.
|
|
639
|
-
|
|
640
|
-
<details>
|
|
641
|
-
<summary>Docker Desktop context note</summary>
|
|
198
|
+
The standard Analyzer image is English-only. Indonesian detection requires an Analyzer configured with Indonesian NLP models and recognizers before enabling `--language-mode auto --languages en,id`.
|
|
642
199
|
|
|
643
|
-
|
|
200
|
+
Verify the complete stack:
|
|
644
201
|
|
|
645
202
|
```bash
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
docker --context desktop-linux ps -a --filter name=presidio
|
|
203
|
+
prodex s doctor --presidio --strict
|
|
204
|
+
prodex s
|
|
649
205
|
```
|
|
650
206
|
|
|
651
|
-
</details>
|
|
652
207
|
</details>
|
|
653
208
|
|
|
654
209
|
## Quick start
|
|
@@ -748,97 +303,39 @@ This reads the installed Kiro CLI state from the local auth database, snapshots
|
|
|
748
303
|
|
|
749
304
|
## Daily command: `prodex s`
|
|
750
305
|
|
|
751
|
-
|
|
752
|
-
<summary>Runs Codex with Caveman, RTK, and local optimizer guidance</summary>
|
|
753
|
-
|
|
754
|
-
For daily work, I use:
|
|
755
|
-
|
|
756
|
-
```bash
|
|
757
|
-
prodex s
|
|
758
|
-
```
|
|
759
|
-
|
|
760
|
-
`prodex s` is an alias for:
|
|
761
|
-
|
|
762
|
-
```bash
|
|
763
|
-
prodex super
|
|
764
|
-
```
|
|
306
|
+
`prodex s` is the daily alias for `prodex super`. It enables:
|
|
765
307
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
-
|
|
771
|
-
-
|
|
772
|
-
- full-access launch mode
|
|
773
|
-
- Smart Context Autopilot in the runtime proxy
|
|
774
|
-
- deterministic/local accommodation for `sqz`, `token-savior`, and `claw-compactor` low-token workflows
|
|
308
|
+
- Caveman and Ponytail.
|
|
309
|
+
- RTK shell-output guidance.
|
|
310
|
+
- Codebase Memory MCP when installed.
|
|
311
|
+
- Smart Context Autopilot.
|
|
312
|
+
- launch-time full access.
|
|
313
|
+
- optional Presidio redaction.
|
|
775
314
|
|
|
776
315
|
```bash
|
|
777
316
|
prodex s
|
|
778
317
|
prodex s exec "review this repo"
|
|
318
|
+
prodex s doctor --strict
|
|
319
|
+
prodex s doctor --presidio --strict
|
|
779
320
|
prodex s expose
|
|
780
321
|
```
|
|
781
322
|
|
|
782
|
-
`prodex super` expands to:
|
|
783
|
-
|
|
784
|
-
```bash
|
|
785
|
-
prodex caveman rtk sqz tokensavior clawcompactor ponytail --full-access
|
|
786
|
-
```
|
|
787
|
-
|
|
788
323
|
<details>
|
|
789
|
-
<summary>
|
|
324
|
+
<summary>Super launch details</summary>
|
|
790
325
|
|
|
791
|
-
|
|
326
|
+
The effective launch is:
|
|
792
327
|
|
|
793
328
|
```bash
|
|
794
|
-
prodex caveman rtk
|
|
329
|
+
prodex caveman rtk ponytail --full-access
|
|
795
330
|
```
|
|
796
331
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
After the Presidio prompt, Super asks whether to enable prodex-memory through managed Mem0 Docker. Empty input or `n` leaves `prodex-memory` disabled, so Codex will not wait for that MCP server. 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. Use the `mem` optimizer prefix for local SQLite memory. 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.
|
|
800
|
-
|
|
801
|
-
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.
|
|
332
|
+
Answer `y` at the Presidio prompt, or pass `--presidio`, to add runtime PII redaction. Use `--no-presidio` for non-interactive launches. Full access maps to Codex's sandbox bypass and trusts only the launch directory for that session.
|
|
802
333
|
|
|
803
|
-
|
|
334
|
+
`prodex s expose` starts a token-protected browser terminal and uses a Cloudflare quick tunnel when `cloudflared` is available. Add `--no-tunnel` for loopback-only access.
|
|
804
335
|
|
|
805
|
-
|
|
336
|
+
Smart Context preserves continuation metadata and critical signals while applying deterministic, validated context rewriting. See [docs/smart-context.md](docs/smart-context.md) for its safety model and rollout controls.
|
|
806
337
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
</details>
|
|
810
|
-
|
|
811
|
-
<details>
|
|
812
|
-
<summary>Super optimizer internals (advanced)</summary>
|
|
813
|
-
|
|
814
|
-
Super's built-in optimization stack is deliberately local and deterministic. It preloads Caveman, exposes a Prodex overlay `rtk` PATH wrapper plus RTK auto-wrappers for common noisy commands when RTK is installed, auto-registers built-in `prodex-inspect` plus discovered `sqz-mcp`, `token-savior`, and `codebase-memory-mcp` MCP servers, exposes `sqz` and `claw-compactor` wrapper commands when those commands/checkouts are discoverable, installs a trusted one-shot `prodex-claw-compactor-sessionstart` SessionStart benchmark probe wrapper when Claw-Compactor is available, then uses Smart Context Autopilot through a dedicated runtime proxy for lower-token request shaping. The claw startup probe is disabled by default so Codex launch is not delayed; opt in with `PRODEX_CLAW_SESSIONSTART_TIMEOUT_SECONDS=<seconds>`. When enabled, it delegates to `prodex-claw-compactor-auto "$(pwd)"`, uses a marker under `CODEX_HOME` so Codex conversation restarts do not replay it, and falls back to a temporary shadow `MEMORY.md` when the workspace has no Markdown memory files. Presidio redaction and prodex-memory are added only when you opt in. Prodex routes optional-tool state under `PRODEX_HOME` (default `~/.prodex`), including SQZ XDG state, token-savior cache/stats, Codebase Memory cache/config, claw-compactor HOME/XDG state, RTK analytics paths, and local memory, so compatible optimizer metadata stays out of worktrees.
|
|
815
|
-
|
|
816
|
-
Smart Context treats protocol and continuation metadata as exact control-plane data while allowing independent context payload segments to remain eligible for deterministic lossless or artifact-backed rewriting. Explicit exact mode still makes the complete request pass through. Missing artifact references are handled as segment-local rehydration failures: the dependent reference is preserved and recorded, budgets tighten, and unrelated payload segments may still be optimized when validation proves continuation identifiers, tool-call structure, critical signals, and JSON integrity are intact.
|
|
817
|
-
|
|
818
|
-
Smart Context budgeting is model-relative: it calculates pressure from effective used tokens against the usable context window after output reserve, records pressure bands and estimator confidence, and tightens behavior when runtime token accounting is uncertain. Context window selection prefers explicit launch config, then a versioned provider/model registry, then observed runtime accounting and conservative fallback behavior.
|
|
819
|
-
|
|
820
|
-
Smart Context rollout controls are local environment flags. `PRODEX_SMART_CONTEXT_CANARY_PERCENT=N` deterministically applies rewriting only for the selected percentage of requests, while canary-out requests pass through unchanged and log `rollout_canary_out`. `PRODEX_SMART_CONTEXT_SHADOW=1` computes Smart Context diagnostics and telemetry while returning the original request upstream. Explicit exact mode still bypasses rollout and remains full pass-through.
|
|
821
|
-
|
|
822
|
-
Smart Context replay evaluation is modeled in the runtime proxy so saved JSON corpora can be scored deterministically against the rollout gate: median token reduction, long-session coverage, success regression, continuation/tool/critical-signal integrity, unresolved mandatory artifact references, JSON corruption, rewrite overhead, and full-request fallback rate.
|
|
823
|
-
|
|
824
|
-
See [`docs/smart-context.md`](docs/smart-context.md) for the safety model, telemetry fields, rollout flags, migration note, and current replay benchmark report.
|
|
825
|
-
|
|
826
|
-
Super instructs Codex to use the available local optimizer stack where it fits the task, not just RTK:
|
|
827
|
-
|
|
828
|
-
- RTK works upstream/input-side. Use visible `rtk <cmd>` for noisy terminal commands before their output enters the model context, such as `git diff`, `cargo test`, `npm test`, build logs, and package-manager output. Prodex also auto-wraps common noisy commands as a fallback when RTK is installed, but that fallback does not make the TUI show an `rtk` prefix.
|
|
829
|
-
- SQZ works downstream/context-side through the auto-registered `prodex-sqz` MCP server when `sqz-mcp` is available. 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.
|
|
830
|
-
- token-savior handles symbol lookup, caller/context navigation, duplicate/dead-code checks, and API-impact searches before broad source reads when token-savior is available.
|
|
831
|
-
- codebase-memory-mcp handles structural codebase graph queries such as architecture, call chains, impact analysis, dead-code lookup, and cross-service links when the binary is available.
|
|
832
|
-
- prodex-inspect provides read-only MCP diagnostics for Prodex status, profiles, and latest runtime log tail.
|
|
833
|
-
- claw-compactor handles workspace-level summary or benchmark requests through `prodex-claw-compactor` / `prodex-claw-compactor-auto` when available; treat its output as overview context and reread exact source before edits.
|
|
834
|
-
- Ponytail loads the local `DietrichGebert/ponytail` Codex plugin into the temporary overlay when the checkout exists under a managed optimizer root, adding smallest-correct-implementation pressure without changing the base Codex profile.
|
|
835
|
-
- prodex-memory provides local Mem0-style memory through the `mem` prefix with SQLite, 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`.
|
|
836
|
-
- Presidio stays optional and only runs when you opt in with the Super prompt or `--presidio`.
|
|
837
|
-
|
|
838
|
-
Managed optimizer checkouts are discovered from `PRODEX_OPTIMIZERS_HOME`, `$XDG_DATA_HOME/prodex-optimizers`, then `~/.local/share/prodex-optimizers`. Put Ponytail at `~/.local/share/prodex-optimizers/ponytail` with `git clone https://github.com/DietrichGebert/ponytail.git ~/.local/share/prodex-optimizers/ponytail`.
|
|
839
|
-
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.
|
|
840
|
-
|
|
841
|
-
</details>
|
|
338
|
+
Managed optimizer roots are checked in this order: `PRODEX_OPTIMIZERS_HOME`, `$XDG_DATA_HOME/prodex-optimizers`, then `~/.local/share/prodex-optimizers`.
|
|
842
339
|
|
|
843
340
|
</details>
|
|
844
341
|
|
|
@@ -1035,11 +532,7 @@ prodex exec "review this repo"
|
|
|
1035
532
|
```bash
|
|
1036
533
|
prodex caveman
|
|
1037
534
|
prodex rtk
|
|
1038
|
-
prodex sqz
|
|
1039
|
-
prodex tokensavior
|
|
1040
|
-
prodex clawcompactor
|
|
1041
535
|
prodex ponytail
|
|
1042
|
-
prodex mem
|
|
1043
536
|
prodex caveman --dry-run
|
|
1044
537
|
prodex s doctor
|
|
1045
538
|
prodex s doctor --json --strict
|
|
@@ -1050,7 +543,7 @@ prodex caveman 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9
|
|
|
1050
543
|
|
|
1051
544
|
`prodex caveman` runs Codex with Caveman mode active in a temporary Prodex overlay `CODEX_HOME`, so the base profile home stays unchanged after the session ends.
|
|
1052
545
|
|
|
1053
|
-
Add
|
|
546
|
+
Add `rtk`, `ponytail`, or `presidio` before Codex args to enable that session surface. The `prodex rtk` and `prodex ponytail` shortcuts map to `prodex caveman <prefix>`.
|
|
1054
547
|
|
|
1055
548
|
RTK is still an external binary. Install it separately if `rtk gain` is unavailable.
|
|
1056
549
|
|
|
@@ -1183,13 +676,11 @@ Run `npm run test:gemini-schema` after changing Gemini request, response, SSE, s
|
|
|
1183
676
|
</details>
|
|
1184
677
|
|
|
1185
678
|
<details>
|
|
1186
|
-
<summary>Presidio
|
|
1187
|
-
|
|
1188
|
-
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 enable prodex-memory through managed Mem0 Docker. Empty input or `n` leaves prodex-memory disabled; 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, or the `mem` prefix for local SQLite memory.
|
|
679
|
+
<summary>Presidio internals (advanced)</summary>
|
|
1189
680
|
|
|
1190
|
-
|
|
681
|
+
Super asks once whether to enable Presidio. Empty input or `n` keeps it disabled; use `--presidio` or `--no-presidio` for non-interactive launches.
|
|
1191
682
|
|
|
1192
|
-
|
|
683
|
+
The runtime reads Analyzer, Anonymizer, language, and `fail_mode` settings from `presidio.toml`:
|
|
1193
684
|
|
|
1194
685
|
```toml
|
|
1195
686
|
enabled = true
|
|
@@ -1200,15 +691,7 @@ languages = ["en", "id"]
|
|
|
1200
691
|
fail_mode = "open"
|
|
1201
692
|
```
|
|
1202
693
|
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
It keeps exact pass-through for continuation-sensitive requests. When safe, it uses adaptive token budgeting, artifact-backed large tool outputs, duplicate suppression, blob/noise detection, stable cache-friendly context framing, and critical-signal self-checks to reduce token load without dropping failure details.
|
|
1206
|
-
|
|
1207
|
-
The Super optimization stack is meant to stay deterministic and local by default. It auto-registers `sqz-mcp`, `token-savior`, and `codebase-memory-mcp` MCP servers when those binaries are already on `PATH` or in a managed `prodex-optimizers` checkout, loads Ponytail from a managed checkout when available, exposes `sqz` and `claw-compactor` wrappers when discoverable, routes compatible optimizer cache/state under `PRODEX_HOME` instead of the workspace, and uses a dedicated runtime proxy for local compaction, stable references, and lower-token context shaping rather than hidden remote summarization.
|
|
1208
|
-
|
|
1209
|
-
RTK handles upstream/input command output before it enters the context window, using visible `rtk <cmd>` commands and overlay auto-wrappers when available. Auto-wrappers are only a backstop; write `rtk <cmd>` explicitly when you want the TUI/transcript to show RTK usage. SQZ handles downstream/context reuse after content is already in the session, using `prodex-sqz` when the MCP server is available.
|
|
1210
|
-
|
|
1211
|
-
Managed optimizer checkouts are discovered from `PRODEX_OPTIMIZERS_HOME`, `$XDG_DATA_HOME/prodex-optimizers`, then `~/.local/share/prodex-optimizers`; Ponytail is expected at `ponytail/` inside one of those roots.
|
|
694
|
+
The standard Microsoft Analyzer image is English-only. Indonesian detection requires an Analyzer with Indonesian models and recognizers. Presidio quality depends on that service configuration.
|
|
1212
695
|
|
|
1213
696
|
</details>
|
|
1214
697
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christiandoxa/prodex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.273.0",
|
|
4
4
|
"description": "Multi-provider Codex wrapper with OpenAI quota-aware routing and Claude Code support",
|
|
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.
|
|
20
|
-
"@christiandoxa/prodex-linux-arm64": "0.
|
|
21
|
-
"@christiandoxa/prodex-darwin-x64": "0.
|
|
22
|
-
"@christiandoxa/prodex-darwin-arm64": "0.
|
|
23
|
-
"@christiandoxa/prodex-win32-x64": "0.
|
|
24
|
-
"@christiandoxa/prodex-win32-arm64": "0.
|
|
19
|
+
"@christiandoxa/prodex-linux-x64": "0.273.0",
|
|
20
|
+
"@christiandoxa/prodex-linux-arm64": "0.273.0",
|
|
21
|
+
"@christiandoxa/prodex-darwin-x64": "0.273.0",
|
|
22
|
+
"@christiandoxa/prodex-darwin-arm64": "0.273.0",
|
|
23
|
+
"@christiandoxa/prodex-win32-x64": "0.273.0",
|
|
24
|
+
"@christiandoxa/prodex-win32-arm64": "0.273.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",
|