aicodeman 1.44.0 → 1.46.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 +32 -8
- package/dist/agent-codex-identity.d.ts +26 -0
- package/dist/agent-codex-identity.d.ts.map +1 -0
- package/dist/agent-codex-identity.js +253 -0
- package/dist/agent-codex-identity.js.map +1 -0
- package/dist/agent-inspection.d.ts +32 -0
- package/dist/agent-inspection.d.ts.map +1 -0
- package/dist/agent-inspection.js +196 -0
- package/dist/agent-inspection.js.map +1 -0
- package/dist/agent-staging.d.ts +130 -0
- package/dist/agent-staging.d.ts.map +1 -0
- package/dist/agent-staging.js +312 -0
- package/dist/agent-staging.js.map +1 -0
- package/dist/case-rename.d.ts +65 -0
- package/dist/case-rename.d.ts.map +1 -0
- package/dist/case-rename.js +198 -0
- package/dist/case-rename.js.map +1 -0
- package/dist/cli-agent.d.ts +91 -3
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +501 -44
- package/dist/cli-agent.js.map +1 -1
- package/dist/cli-history.d.ts +20 -0
- package/dist/cli-history.d.ts.map +1 -0
- package/dist/cli-history.js +61 -0
- package/dist/cli-history.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -1
- package/dist/cli.js.map +1 -1
- package/dist/codex-rollout-format.d.ts +66 -0
- package/dist/codex-rollout-format.d.ts.map +1 -0
- package/dist/codex-rollout-format.js +111 -0
- package/dist/codex-rollout-format.js.map +1 -0
- package/dist/codex-transcript.d.ts +3 -0
- package/dist/codex-transcript.d.ts.map +1 -1
- package/dist/codex-transcript.js +13 -41
- package/dist/codex-transcript.js.map +1 -1
- package/dist/config/auth-config.d.ts +16 -1
- package/dist/config/auth-config.d.ts.map +1 -1
- package/dist/config/auth-config.js +16 -1
- package/dist/config/auth-config.js.map +1 -1
- package/dist/config/cli-registry/schema.d.ts +12 -7
- package/dist/config/cli-registry/schema.d.ts.map +1 -1
- package/dist/config/cli-registry/schema.js +26 -0
- package/dist/config/cli-registry/schema.js.map +1 -1
- package/dist/config/cli-registry/stock.d.ts.map +1 -1
- package/dist/config/cli-registry/stock.js +40 -1
- package/dist/config/cli-registry/stock.js.map +1 -1
- package/dist/config/cli-registry/types.d.ts +57 -0
- package/dist/config/cli-registry/types.d.ts.map +1 -1
- package/dist/config/server-timing.d.ts +6 -0
- package/dist/config/server-timing.d.ts.map +1 -1
- package/dist/config/server-timing.js +9 -0
- package/dist/config/server-timing.js.map +1 -1
- package/dist/daemon-control.d.ts +1 -0
- package/dist/daemon-control.d.ts.map +1 -1
- package/dist/daemon-control.js +2 -0
- package/dist/daemon-control.js.map +1 -1
- package/dist/deepseek-transcript.d.ts +9 -7
- package/dist/deepseek-transcript.d.ts.map +1 -1
- package/dist/deepseek-transcript.js +9 -7
- package/dist/deepseek-transcript.js.map +1 -1
- package/dist/docker-hosts.d.ts +8 -0
- package/dist/docker-hosts.d.ts.map +1 -1
- package/dist/docker-hosts.js +29 -0
- package/dist/docker-hosts.js.map +1 -1
- package/dist/git-fetch-scheduler.d.ts +124 -0
- package/dist/git-fetch-scheduler.d.ts.map +1 -0
- package/dist/git-fetch-scheduler.js +249 -0
- package/dist/git-fetch-scheduler.js.map +1 -0
- package/dist/git-fetch.d.ts +241 -0
- package/dist/git-fetch.d.ts.map +1 -0
- package/dist/git-fetch.js +392 -0
- package/dist/git-fetch.js.map +1 -0
- package/dist/git-workspace-status.d.ts +36 -1
- package/dist/git-workspace-status.d.ts.map +1 -1
- package/dist/git-workspace-status.js +42 -5
- package/dist/git-workspace-status.js.map +1 -1
- package/dist/hooks-config.d.ts +14 -2
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +39 -3
- package/dist/hooks-config.js.map +1 -1
- package/dist/host-sensors.d.ts +115 -0
- package/dist/host-sensors.d.ts.map +1 -0
- package/dist/host-sensors.js +457 -0
- package/dist/host-sensors.js.map +1 -0
- package/dist/local-history.d.ts +71 -0
- package/dist/local-history.d.ts.map +1 -0
- package/dist/local-history.js +750 -0
- package/dist/local-history.js.map +1 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +2 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/mux-interface.d.ts +5 -2
- package/dist/mux-interface.d.ts.map +1 -1
- package/dist/prompt-cache-keepwarm.d.ts.map +1 -1
- package/dist/prompt-cache-keepwarm.js +5 -3
- package/dist/prompt-cache-keepwarm.js.map +1 -1
- package/dist/remote-hosts.d.ts +7 -0
- package/dist/remote-hosts.d.ts.map +1 -1
- package/dist/remote-hosts.js +17 -3
- package/dist/remote-hosts.js.map +1 -1
- package/dist/remote-pane-history.d.ts.map +1 -1
- package/dist/remote-pane-history.js +2 -2
- package/dist/remote-pane-history.js.map +1 -1
- package/dist/session.d.ts +113 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +354 -13
- package/dist/session.js.map +1 -1
- package/dist/terminal-input-classifier.d.ts +8 -0
- package/dist/terminal-input-classifier.d.ts.map +1 -0
- package/dist/terminal-input-classifier.js +60 -0
- package/dist/terminal-input-classifier.js.map +1 -0
- package/dist/tmux-manager.d.ts +30 -4
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +101 -21
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-prefix-table.d.ts +37 -5
- package/dist/tmux-prefix-table.d.ts.map +1 -1
- package/dist/tmux-prefix-table.js +40 -5
- package/dist/tmux-prefix-table.js.map +1 -1
- package/dist/tui/tui-app.d.ts +8 -1
- package/dist/tui/tui-app.d.ts.map +1 -1
- package/dist/tui/tui-app.js +49 -12
- package/dist/tui/tui-app.js.map +1 -1
- package/dist/tui/tui-client.d.ts +90 -3
- package/dist/tui/tui-client.d.ts.map +1 -1
- package/dist/tui/tui-client.js +195 -26
- package/dist/tui/tui-client.js.map +1 -1
- package/dist/types/session.d.ts +15 -0
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js.map +1 -1
- package/dist/web/agent-inbox-persistence.d.ts +52 -0
- package/dist/web/agent-inbox-persistence.d.ts.map +1 -0
- package/dist/web/agent-inbox-persistence.js +139 -0
- package/dist/web/agent-inbox-persistence.js.map +1 -0
- package/dist/web/agent-inbox.d.ts +140 -0
- package/dist/web/agent-inbox.d.ts.map +1 -0
- package/dist/web/agent-inbox.js +258 -0
- package/dist/web/agent-inbox.js.map +1 -0
- package/dist/web/middleware/auth.d.ts +2 -0
- package/dist/web/middleware/auth.d.ts.map +1 -1
- package/dist/web/middleware/auth.js +145 -52
- package/dist/web/middleware/auth.js.map +1 -1
- package/dist/web/network-auth-policy.d.ts +13 -3
- package/dist/web/network-auth-policy.d.ts.map +1 -1
- package/dist/web/network-auth-policy.js +15 -3
- package/dist/web/network-auth-policy.js.map +1 -1
- package/dist/web/ports/infra-port.d.ts +2 -0
- package/dist/web/ports/infra-port.d.ts.map +1 -1
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/app.3093527f.js +43 -0
- package/dist/web/public/app.3093527f.js.br +0 -0
- package/dist/web/public/app.3093527f.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/{constants.4866ecc3.js → constants.affcdde6.js} +622 -12
- package/dist/web/public/constants.affcdde6.js.br +0 -0
- package/dist/web/public/constants.affcdde6.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/git-status-ui.js +88 -5
- package/dist/web/public/git-status-ui.js.br +0 -0
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/header-divider.eb2d2463.js +1 -0
- package/dist/web/public/header-divider.eb2d2463.js.br +0 -0
- package/dist/web/public/header-divider.eb2d2463.js.gz +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/host-wake-ui.js.gz +0 -0
- package/dist/web/public/i18n.70265257.js +2 -0
- package/dist/web/public/i18n.70265257.js.br +0 -0
- package/dist/web/public/i18n.70265257.js.gz +0 -0
- package/dist/web/public/image-input.941386e7.js.gz +0 -0
- package/dist/web/public/index.html +170 -16
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.4e8b20ac.js.gz +0 -0
- package/dist/web/public/{mobile-handlers.44adaa07.js → mobile-handlers.f7c3f692.js} +26 -2
- package/dist/web/public/mobile-handlers.f7c3f692.js.br +0 -0
- package/dist/web/public/mobile-handlers.f7c3f692.js.gz +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.1bbd2d67.css +1 -0
- package/dist/web/public/mobile.1bbd2d67.css.br +0 -0
- package/dist/web/public/mobile.1bbd2d67.css.gz +0 -0
- package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.cbb24ba1.js → panels-ui.4a56ee63.js} +76 -70
- package/dist/web/public/panels-ui.4a56ee63.js.br +0 -0
- package/dist/web/public/panels-ui.4a56ee63.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/reboot-restore-ui.js.gz +0 -0
- package/dist/web/public/respawn-ui.d7adcf6a.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/session-ui.186f9419.js +106 -0
- package/dist/web/public/session-ui.186f9419.js.br +0 -0
- package/dist/web/public/session-ui.186f9419.js.gz +0 -0
- package/dist/web/public/settings-ui.a191154e.js +106 -0
- package/dist/web/public/settings-ui.a191154e.js.br +0 -0
- package/dist/web/public/settings-ui.a191154e.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
- package/dist/web/public/styles.7238eae8.css +1 -0
- package/dist/web/public/styles.7238eae8.css.br +0 -0
- package/dist/web/public/styles.7238eae8.css.gz +0 -0
- package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
- package/dist/web/public/sw.js +2 -2
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
- package/dist/web/public/{tab-rail-resize.7157e0bd.js → tab-rail-resize.b5cdceaf.js} +1 -1
- package/dist/web/public/tab-rail-resize.b5cdceaf.js.br +0 -0
- package/dist/web/public/tab-rail-resize.b5cdceaf.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js +10 -1
- package/dist/web/public/terminal-tile.js.br +0 -0
- package/dist/web/public/terminal-tile.js.gz +0 -0
- package/dist/web/public/terminal-ui.7e787829.js +4 -0
- package/dist/web/public/terminal-ui.7e787829.js.br +0 -0
- package/dist/web/public/terminal-ui.7e787829.js.gz +0 -0
- package/dist/web/public/tile-grid.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/{xterm-predictive-echo.ae5e3d5d.js → xterm-predictive-echo.276b11d9.js} +1 -1
- package/dist/web/public/vendor/xterm-predictive-echo.276b11d9.js.br +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.276b11d9.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.1be42307.js +5 -0
- package/dist/web/public/vendor/xterm-zerolag-input.1be42307.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.1be42307.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/public/whats-new.json +9 -9
- package/dist/web/route-helpers.d.ts +57 -6
- package/dist/web/route-helpers.d.ts.map +1 -1
- package/dist/web/route-helpers.js +72 -4
- package/dist/web/route-helpers.js.map +1 -1
- package/dist/web/routes/agent-session-routes.d.ts +20 -0
- package/dist/web/routes/agent-session-routes.d.ts.map +1 -0
- package/dist/web/routes/agent-session-routes.js +160 -0
- package/dist/web/routes/agent-session-routes.js.map +1 -0
- package/dist/web/routes/case-routes.d.ts.map +1 -1
- package/dist/web/routes/case-routes.js +203 -16
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/config-backup-routes.js +2 -2
- package/dist/web/routes/config-backup-routes.js.map +1 -1
- package/dist/web/routes/git-status-routes.d.ts +21 -7
- package/dist/web/routes/git-status-routes.d.ts.map +1 -1
- package/dist/web/routes/git-status-routes.js +78 -12
- package/dist/web/routes/git-status-routes.js.map +1 -1
- package/dist/web/routes/inbox-routes.d.ts +43 -0
- package/dist/web/routes/inbox-routes.d.ts.map +1 -0
- package/dist/web/routes/inbox-routes.js +148 -0
- package/dist/web/routes/inbox-routes.js.map +1 -0
- package/dist/web/routes/index.d.ts +2 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +2 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/ralph-routes.d.ts.map +1 -1
- package/dist/web/routes/ralph-routes.js +7 -16
- package/dist/web/routes/ralph-routes.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +120 -74
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +107 -59
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/routes/ws-routes.d.ts +5 -0
- package/dist/web/routes/ws-routes.d.ts.map +1 -1
- package/dist/web/routes/ws-routes.js +84 -47
- package/dist/web/routes/ws-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +56 -7
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +88 -1
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/sensitive-path.d.ts.map +1 -1
- package/dist/web/sensitive-path.js +2 -0
- package/dist/web/sensitive-path.js.map +1 -1
- package/dist/web/server.d.ts +7 -2
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +144 -16
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-wait-registry.d.ts +48 -4
- package/dist/web/session-wait-registry.d.ts.map +1 -1
- package/dist/web/session-wait-registry.js +144 -6
- package/dist/web/session-wait-registry.js.map +1 -1
- package/dist/web/settings-writer.d.ts +47 -0
- package/dist/web/settings-writer.d.ts.map +1 -0
- package/dist/web/settings-writer.js +110 -0
- package/dist/web/settings-writer.js.map +1 -0
- package/dist/web/sse-events.d.ts +4 -1
- package/dist/web/sse-events.d.ts.map +1 -1
- package/dist/web/sse-events.js +4 -1
- package/dist/web/sse-events.js.map +1 -1
- package/package.json +1 -1
- package/skills/codeman/SKILL.md +30 -8
- package/skills/codeman/preamble.sh +3 -3
- package/skills/codeman/reference/endpoints.md +24 -3
- package/skills/codeman/reference/history.md +84 -0
- package/skills/codeman/reference/inspection-and-staging.md +152 -0
- package/skills/codeman/reference/messaging.md +1 -1
- package/skills/codeman/reference/verbs.md +65 -3
- package/dist/web/public/app.9314ee60.js +0 -43
- package/dist/web/public/app.9314ee60.js.br +0 -0
- package/dist/web/public/app.9314ee60.js.gz +0 -0
- package/dist/web/public/constants.4866ecc3.js.br +0 -0
- package/dist/web/public/constants.4866ecc3.js.gz +0 -0
- package/dist/web/public/i18n.22ca902b.js +0 -2
- package/dist/web/public/i18n.22ca902b.js.br +0 -0
- package/dist/web/public/i18n.22ca902b.js.gz +0 -0
- package/dist/web/public/mobile-handlers.44adaa07.js.br +0 -0
- package/dist/web/public/mobile-handlers.44adaa07.js.gz +0 -0
- package/dist/web/public/mobile.12fb18de.css +0 -1
- package/dist/web/public/mobile.12fb18de.css.br +0 -0
- package/dist/web/public/mobile.12fb18de.css.gz +0 -0
- package/dist/web/public/panels-ui.cbb24ba1.js.br +0 -0
- package/dist/web/public/panels-ui.cbb24ba1.js.gz +0 -0
- package/dist/web/public/session-ui.9c1f009b.js +0 -104
- package/dist/web/public/session-ui.9c1f009b.js.br +0 -0
- package/dist/web/public/session-ui.9c1f009b.js.gz +0 -0
- package/dist/web/public/settings-ui.fea9ddae.js +0 -106
- package/dist/web/public/settings-ui.fea9ddae.js.br +0 -0
- package/dist/web/public/settings-ui.fea9ddae.js.gz +0 -0
- package/dist/web/public/styles.e096fcd6.css +0 -1
- package/dist/web/public/styles.e096fcd6.css.br +0 -0
- package/dist/web/public/styles.e096fcd6.css.gz +0 -0
- package/dist/web/public/tab-rail-resize.7157e0bd.js.br +0 -0
- package/dist/web/public/tab-rail-resize.7157e0bd.js.gz +0 -0
- package/dist/web/public/terminal-ui.68dbd352.js +0 -2
- package/dist/web/public/terminal-ui.68dbd352.js.br +0 -0
- package/dist/web/public/terminal-ui.68dbd352.js.gz +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.ae5e3d5d.js.br +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.ae5e3d5d.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js +0 -4
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.gz +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Shape helpers for Codex rollout JSONL lines, shared by the two
|
|
3
|
+
* readers of `~/.codex/sessions`: the Past Sessions scanner
|
|
4
|
+
* (`codex-transcript.ts`, previews only) and the offline history reader
|
|
5
|
+
* (`local-history.ts`, whole conversations).
|
|
6
|
+
*
|
|
7
|
+
* Both readers must agree on three facts, so they live here once:
|
|
8
|
+
*
|
|
9
|
+
* - where the store is (`$CODEX_HOME/sessions`, else `~/.codex/sessions`);
|
|
10
|
+
* - which line shapes carry a user or assistant message;
|
|
11
|
+
* - which `response_item` user rows are injected context rather than input.
|
|
12
|
+
*
|
|
13
|
+
* ## The message shapes
|
|
14
|
+
*
|
|
15
|
+
* Codex has written conversation text under three shapes:
|
|
16
|
+
*
|
|
17
|
+
* - `event_msg` / `user_message` and `agent_message`, written by every version
|
|
18
|
+
* seen so far. `agent_message` carries a `phase` (`commentary` or
|
|
19
|
+
* `final_answer`); `user_message` carries none.
|
|
20
|
+
* - `event_msg` / `item_completed` with an `item.type` of `UserMessage` or
|
|
21
|
+
* `AgentMessage`, written by newer versions (0.152.1 and later).
|
|
22
|
+
* - `response_item` rows with `role: 'user'` or `'assistant'`. These are what
|
|
23
|
+
* the model saw, so the user rows mix real input with injected context.
|
|
24
|
+
*
|
|
25
|
+
* ## The injected-context rule
|
|
26
|
+
*
|
|
27
|
+
* Codex injects context as `response_item` user rows that start with a Markdown
|
|
28
|
+
* heading (`# AGENTS.md instructions for ...`) or an XML-style tag
|
|
29
|
+
* (`<environment_context>`, `<recommended_plugins>`, `<subagent_notification>`,
|
|
30
|
+
* `<skill>`, `<turn_aborted>`, `<image ...>`, `<codex_internal_context ...>`).
|
|
31
|
+
* Measured on a store of 2,916 rollouts (codex 0.120 to 0.163), every
|
|
32
|
+
* `response_item` user row with either prefix and no event twin was injected;
|
|
33
|
+
* the real prompts that start with `#` all have a `user_message` or
|
|
34
|
+
* `UserMessage` event twin, which this rule never filters. A fixed list of tag
|
|
35
|
+
* names would leak every wrapper Codex adds later (`<recommended_plugins>`
|
|
36
|
+
* alone was 1,355 rows on that store), so the rule is the prefix.
|
|
37
|
+
*
|
|
38
|
+
* @module codex-rollout-format
|
|
39
|
+
*/
|
|
40
|
+
/** Codex's home directory: `$CODEX_HOME`, else `~/.codex`, exactly as codex resolves it. */
|
|
41
|
+
export declare function codexHomeDir(): string;
|
|
42
|
+
/** The rollout store under {@link codexHomeDir}. */
|
|
43
|
+
export declare function codexSessionsRoot(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Flatten Codex message content, which is a string or an array of blocks.
|
|
46
|
+
* Only blocks carrying a string `text` contribute (images and skills do not).
|
|
47
|
+
* Not trimmed: callers that want a preview trim.
|
|
48
|
+
*/
|
|
49
|
+
export declare function codexContentText(content: unknown): string;
|
|
50
|
+
/** Injected context rather than typed input. Applies to `response_item` user rows only. */
|
|
51
|
+
export declare function isCodexInjectedContext(text: string): boolean;
|
|
52
|
+
/** One rollout line's user or assistant message, whichever shape carried it. */
|
|
53
|
+
export interface CodexLineMessage {
|
|
54
|
+
role: 'user' | 'assistant';
|
|
55
|
+
/** Untrimmed text, never empty. */
|
|
56
|
+
text: string;
|
|
57
|
+
/** `event` = user_message/agent_message, `item` = item_completed, `response` = response_item. */
|
|
58
|
+
shape: 'event' | 'item' | 'response';
|
|
59
|
+
/** Codex's own phase (`commentary` / `final_answer`) when the line carries one. */
|
|
60
|
+
phase?: string;
|
|
61
|
+
/** A `response_item` user row: may be injected context, see {@link isCodexInjectedContext}. */
|
|
62
|
+
injectionProne: boolean;
|
|
63
|
+
}
|
|
64
|
+
/** The message a parsed rollout line carries, or null for every other line. */
|
|
65
|
+
export declare function codexMessageFromLine(entry: unknown): CodexLineMessage | null;
|
|
66
|
+
//# sourceMappingURL=codex-rollout-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-rollout-format.d.ts","sourceRoot":"","sources":["../src/codex-rollout-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAKH,4FAA4F;AAC5F,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,oDAAoD;AACpD,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAUzD;AAED,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,iGAAiG;IACjG,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;IACrC,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+FAA+F;IAC/F,cAAc,EAAE,OAAO,CAAC;CACzB;AAUD,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CA6B5E"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Shape helpers for Codex rollout JSONL lines, shared by the two
|
|
3
|
+
* readers of `~/.codex/sessions`: the Past Sessions scanner
|
|
4
|
+
* (`codex-transcript.ts`, previews only) and the offline history reader
|
|
5
|
+
* (`local-history.ts`, whole conversations).
|
|
6
|
+
*
|
|
7
|
+
* Both readers must agree on three facts, so they live here once:
|
|
8
|
+
*
|
|
9
|
+
* - where the store is (`$CODEX_HOME/sessions`, else `~/.codex/sessions`);
|
|
10
|
+
* - which line shapes carry a user or assistant message;
|
|
11
|
+
* - which `response_item` user rows are injected context rather than input.
|
|
12
|
+
*
|
|
13
|
+
* ## The message shapes
|
|
14
|
+
*
|
|
15
|
+
* Codex has written conversation text under three shapes:
|
|
16
|
+
*
|
|
17
|
+
* - `event_msg` / `user_message` and `agent_message`, written by every version
|
|
18
|
+
* seen so far. `agent_message` carries a `phase` (`commentary` or
|
|
19
|
+
* `final_answer`); `user_message` carries none.
|
|
20
|
+
* - `event_msg` / `item_completed` with an `item.type` of `UserMessage` or
|
|
21
|
+
* `AgentMessage`, written by newer versions (0.152.1 and later).
|
|
22
|
+
* - `response_item` rows with `role: 'user'` or `'assistant'`. These are what
|
|
23
|
+
* the model saw, so the user rows mix real input with injected context.
|
|
24
|
+
*
|
|
25
|
+
* ## The injected-context rule
|
|
26
|
+
*
|
|
27
|
+
* Codex injects context as `response_item` user rows that start with a Markdown
|
|
28
|
+
* heading (`# AGENTS.md instructions for ...`) or an XML-style tag
|
|
29
|
+
* (`<environment_context>`, `<recommended_plugins>`, `<subagent_notification>`,
|
|
30
|
+
* `<skill>`, `<turn_aborted>`, `<image ...>`, `<codex_internal_context ...>`).
|
|
31
|
+
* Measured on a store of 2,916 rollouts (codex 0.120 to 0.163), every
|
|
32
|
+
* `response_item` user row with either prefix and no event twin was injected;
|
|
33
|
+
* the real prompts that start with `#` all have a `user_message` or
|
|
34
|
+
* `UserMessage` event twin, which this rule never filters. A fixed list of tag
|
|
35
|
+
* names would leak every wrapper Codex adds later (`<recommended_plugins>`
|
|
36
|
+
* alone was 1,355 rows on that store), so the rule is the prefix.
|
|
37
|
+
*
|
|
38
|
+
* @module codex-rollout-format
|
|
39
|
+
*/
|
|
40
|
+
import { homedir } from 'node:os';
|
|
41
|
+
import { join } from 'node:path';
|
|
42
|
+
/** Codex's home directory: `$CODEX_HOME`, else `~/.codex`, exactly as codex resolves it. */
|
|
43
|
+
export function codexHomeDir() {
|
|
44
|
+
return process.env.CODEX_HOME || join(homedir(), '.codex');
|
|
45
|
+
}
|
|
46
|
+
/** The rollout store under {@link codexHomeDir}. */
|
|
47
|
+
export function codexSessionsRoot() {
|
|
48
|
+
return join(codexHomeDir(), 'sessions');
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Flatten Codex message content, which is a string or an array of blocks.
|
|
52
|
+
* Only blocks carrying a string `text` contribute (images and skills do not).
|
|
53
|
+
* Not trimmed: callers that want a preview trim.
|
|
54
|
+
*/
|
|
55
|
+
export function codexContentText(content) {
|
|
56
|
+
if (typeof content === 'string')
|
|
57
|
+
return content;
|
|
58
|
+
if (!Array.isArray(content))
|
|
59
|
+
return '';
|
|
60
|
+
return content
|
|
61
|
+
.filter((b) => !!b && typeof b === 'object' && typeof b.text === 'string')
|
|
62
|
+
.map((b) => b.text)
|
|
63
|
+
.filter(Boolean)
|
|
64
|
+
.join('\n');
|
|
65
|
+
}
|
|
66
|
+
/** Injected context rather than typed input. Applies to `response_item` user rows only. */
|
|
67
|
+
export function isCodexInjectedContext(text) {
|
|
68
|
+
const start = text.trimStart();
|
|
69
|
+
return start.startsWith('#') || start.startsWith('<');
|
|
70
|
+
}
|
|
71
|
+
function record(value) {
|
|
72
|
+
return value && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
73
|
+
}
|
|
74
|
+
function phaseOf(value) {
|
|
75
|
+
return typeof value === 'string' && value ? value : undefined;
|
|
76
|
+
}
|
|
77
|
+
/** The message a parsed rollout line carries, or null for every other line. */
|
|
78
|
+
export function codexMessageFromLine(entry) {
|
|
79
|
+
const e = record(entry);
|
|
80
|
+
const p = record(e.payload);
|
|
81
|
+
let role;
|
|
82
|
+
let text = '';
|
|
83
|
+
let shape = 'event';
|
|
84
|
+
let phase;
|
|
85
|
+
if (e.type === 'event_msg') {
|
|
86
|
+
if (p.type === 'user_message' || p.type === 'agent_message') {
|
|
87
|
+
role = p.type === 'user_message' ? 'user' : 'assistant';
|
|
88
|
+
text = codexContentText(p.message);
|
|
89
|
+
phase = phaseOf(p.phase);
|
|
90
|
+
}
|
|
91
|
+
else if (p.type === 'item_completed') {
|
|
92
|
+
const item = record(p.item);
|
|
93
|
+
if (item.type === 'UserMessage' || item.type === 'AgentMessage') {
|
|
94
|
+
role = item.type === 'UserMessage' ? 'user' : 'assistant';
|
|
95
|
+
shape = 'item';
|
|
96
|
+
text = codexContentText(item.content);
|
|
97
|
+
phase = phaseOf(item.phase);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (e.type === 'response_item' && (p.role === 'user' || p.role === 'assistant')) {
|
|
102
|
+
role = p.role;
|
|
103
|
+
shape = 'response';
|
|
104
|
+
text = codexContentText(p.content);
|
|
105
|
+
phase = phaseOf(p.phase);
|
|
106
|
+
}
|
|
107
|
+
if (!role || !text)
|
|
108
|
+
return null;
|
|
109
|
+
return { role, text, shape, phase, injectionProne: shape === 'response' && role === 'user' };
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=codex-rollout-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-rollout-format.js","sourceRoot":"","sources":["../src/codex-rollout-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,4FAA4F;AAC5F,MAAM,UAAU,YAAY;IAC1B,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC7D,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,iBAAiB;IAC/B,OAAO,IAAI,CAAC,YAAY,EAAE,EAAE,UAAU,CAAC,CAAC;AAC1C,CAAC;AAED;;;;GAI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,IAAI,GAAG,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACnC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IACD,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,KAAK,UAAU,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;AAC/F,CAAC"}
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
* summaries), so they are read only when neither shape above appears, and
|
|
38
38
|
* the obvious injections are dropped.
|
|
39
39
|
*
|
|
40
|
+
* The shapes, the injected-context rule and the store location live in
|
|
41
|
+
* `codex-rollout-format.ts`, shared with the offline reader `local-history.ts`.
|
|
42
|
+
*
|
|
40
43
|
* @module codex-transcript
|
|
41
44
|
*/
|
|
42
45
|
export interface CodexHistorySession {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-transcript.d.ts","sourceRoot":"","sources":["../src/codex-transcript.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"codex-transcript.d.ts","sourceRoot":"","sources":["../src/codex-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAyCH,MAAM,WAAW,mBAAmB;IAClC,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA4LD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAgC/E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAOvF;AAED,mDAAmD;AACnD,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|
package/dist/codex-transcript.js
CHANGED
|
@@ -37,11 +37,14 @@
|
|
|
37
37
|
* summaries), so they are read only when neither shape above appears, and
|
|
38
38
|
* the obvious injections are dropped.
|
|
39
39
|
*
|
|
40
|
+
* The shapes, the injected-context rule and the store location live in
|
|
41
|
+
* `codex-rollout-format.ts`, shared with the offline reader `local-history.ts`.
|
|
42
|
+
*
|
|
40
43
|
* @module codex-transcript
|
|
41
44
|
*/
|
|
42
45
|
import { open, readdir, stat } from 'node:fs/promises';
|
|
43
|
-
import { homedir } from 'node:os';
|
|
44
46
|
import { join } from 'node:path';
|
|
47
|
+
import { codexMessageFromLine, codexSessionsRoot, isCodexInjectedContext as isInjectedContext, } from './codex-rollout-format.js';
|
|
45
48
|
import { LRUMap } from './utils/lru-map.js';
|
|
46
49
|
/** Covers `session_meta` (~19 KiB) plus the first user message (~69 KiB behind it). */
|
|
47
50
|
const HEAD_BYTES = 131072;
|
|
@@ -95,10 +98,6 @@ function shouldCacheIdentity(identity, fileSize) {
|
|
|
95
98
|
return false;
|
|
96
99
|
return identity.firstPrompt !== undefined || fileSize >= HEAD_BYTES;
|
|
97
100
|
}
|
|
98
|
-
function codexSessionsRoot() {
|
|
99
|
-
const home = process.env.CODEX_HOME || join(homedir(), '.codex');
|
|
100
|
-
return join(home, 'sessions');
|
|
101
|
-
}
|
|
102
101
|
/** Read at most `bytes` from the front of a file. Returns '' when unreadable. */
|
|
103
102
|
async function readHead(path, bytes) {
|
|
104
103
|
const fh = await open(path, 'r').catch(() => null);
|
|
@@ -141,44 +140,17 @@ async function readTail(path, size, bytes) {
|
|
|
141
140
|
await fh.close().catch(() => { });
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
|
-
/** Flatten codex's message content, which is a string or an array of text blocks. */
|
|
145
|
-
function contentText(content) {
|
|
146
|
-
if (typeof content === 'string')
|
|
147
|
-
return content.trim();
|
|
148
|
-
if (!Array.isArray(content))
|
|
149
|
-
return '';
|
|
150
|
-
return content
|
|
151
|
-
.filter((b) => !!b && typeof b === 'object' && typeof b.text === 'string')
|
|
152
|
-
.map((b) => b.text)
|
|
153
|
-
.join('\n')
|
|
154
|
-
.trim();
|
|
155
|
-
}
|
|
156
|
-
/** One line's user-prompt text, whichever of the three shapes it is. */
|
|
157
|
-
function userPromptFromLine(entry) {
|
|
158
|
-
const p = entry.payload;
|
|
159
|
-
if (!p)
|
|
160
|
-
return null;
|
|
161
|
-
if (entry.type === 'event_msg' && p.type === 'item_completed' && p.item?.type === 'UserMessage') {
|
|
162
|
-
const text = contentText(p.item.content);
|
|
163
|
-
return text ? { text, injectionProne: false } : null;
|
|
164
|
-
}
|
|
165
|
-
if (entry.type === 'event_msg' && p.type === 'user_message') {
|
|
166
|
-
const text = typeof p.message === 'string' ? p.message.trim() : contentText(p.message);
|
|
167
|
-
return text ? { text, injectionProne: false } : null;
|
|
168
|
-
}
|
|
169
|
-
if (entry.type === 'response_item' && p.role === 'user') {
|
|
170
|
-
const text = contentText(p.content);
|
|
171
|
-
return text ? { text, injectionProne: true } : null;
|
|
172
|
-
}
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
143
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
144
|
+
* One line's user-prompt text, whichever of the three shapes it is. The shapes
|
|
145
|
+
* and the injected-context rule are shared with the offline history reader
|
|
146
|
+
* (`codex-rollout-format.ts`), so the two never disagree about what a prompt is.
|
|
179
147
|
*/
|
|
180
|
-
function
|
|
181
|
-
|
|
148
|
+
function userPromptFromLine(entry) {
|
|
149
|
+
const message = codexMessageFromLine(entry);
|
|
150
|
+
if (!message || message.role !== 'user')
|
|
151
|
+
return null;
|
|
152
|
+
const text = message.text.trim();
|
|
153
|
+
return text ? { text, injectionProne: message.injectionProne } : null;
|
|
182
154
|
}
|
|
183
155
|
/** Collapse to one line and cap, so a row carries a title rather than an essay. */
|
|
184
156
|
function asPreview(text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-transcript.js","sourceRoot":"","sources":["../src/codex-transcript.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"codex-transcript.js","sourceRoot":"","sources":["../src/codex-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,IAAI,iBAAiB,GAC5C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,uFAAuF;AACvF,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,qFAAqF;AACrF,MAAM,UAAU,GAAG,KAAK,CAAC;AAEzB;;;;GAIG;AACH,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,kFAAkF;AAClF,MAAM,cAAc,GAAG,CAAC,CAAC;AAEzB,8EAA8E;AAC9E,MAAM,iBAAiB,GAAG,GAAG,CAAC;AA+B9B;;;;;;;;;;;;;;GAcG;AACH,MAAM,aAAa,GAAG,IAAI,MAAM,CAA0B,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAE7E;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAAC,QAAyB,EAAE,QAAgB;IACtE,IAAI,CAAC,QAAQ,CAAC,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AU,IAAI,QAAQ,CAAC,WAAW;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAA2B;IAChE,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/D,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,yBAAyB;IACvC,aAAa,CAAC,KAAK,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -10,8 +10,23 @@
|
|
|
10
10
|
export declare const AUTH_SESSION_TTL_MS: number;
|
|
11
11
|
/** Max concurrent auth sessions per server */
|
|
12
12
|
export declare const MAX_AUTH_SESSIONS = 100;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Max failed auth attempts per bucket before 429 rejection. Applies to the
|
|
15
|
+
* single-user per-IP bucket, the hook-secret bucket and two multi-user buckets:
|
|
16
|
+
* the (username, IP) gate, checked before the scrypt verify, and the
|
|
17
|
+
* per-username bucket, checked after it.
|
|
18
|
+
*/
|
|
14
19
|
export declare const AUTH_FAILURE_MAX = 10;
|
|
20
|
+
/**
|
|
21
|
+
* Max failed login attempts per client IP for the multi-user pre-gate, which
|
|
22
|
+
* runs before the scrypt verify and so refuses even a correct password once
|
|
23
|
+
* reached. It bounds scrypt cost from one source and is wider than
|
|
24
|
+
* AUTH_FAILURE_MAX because one egress IP (NAT, a tunnel) can carry many users'
|
|
25
|
+
* failures. Verified guesses against any one account are capped by the
|
|
26
|
+
* (username, IP) gate at AUTH_FAILURE_MAX, not by this. Single-user mode does
|
|
27
|
+
* not use this.
|
|
28
|
+
*/
|
|
29
|
+
export declare const AUTH_IP_FAILURE_MAX = 50;
|
|
15
30
|
/** Failed auth attempt tracking window (ms) */
|
|
16
31
|
export declare const AUTH_FAILURE_WINDOW_MS: number;
|
|
17
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-config.d.ts","sourceRoot":"","sources":["../../src/config/auth-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,QAAsB,CAAC;AAEvD,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAMrC
|
|
1
|
+
{"version":3,"file":"auth-config.d.ts","sourceRoot":"","sources":["../../src/config/auth-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,QAAsB,CAAC;AAEvD,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAMrC;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,+CAA+C;AAC/C,eAAO,MAAM,sBAAsB,QAAiB,CAAC;AAMrD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC"}
|
|
@@ -16,8 +16,23 @@ export const MAX_AUTH_SESSIONS = 100;
|
|
|
16
16
|
// ============================================================================
|
|
17
17
|
// Rate Limiting
|
|
18
18
|
// ============================================================================
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Max failed auth attempts per bucket before 429 rejection. Applies to the
|
|
21
|
+
* single-user per-IP bucket, the hook-secret bucket and two multi-user buckets:
|
|
22
|
+
* the (username, IP) gate, checked before the scrypt verify, and the
|
|
23
|
+
* per-username bucket, checked after it.
|
|
24
|
+
*/
|
|
20
25
|
export const AUTH_FAILURE_MAX = 10;
|
|
26
|
+
/**
|
|
27
|
+
* Max failed login attempts per client IP for the multi-user pre-gate, which
|
|
28
|
+
* runs before the scrypt verify and so refuses even a correct password once
|
|
29
|
+
* reached. It bounds scrypt cost from one source and is wider than
|
|
30
|
+
* AUTH_FAILURE_MAX because one egress IP (NAT, a tunnel) can carry many users'
|
|
31
|
+
* failures. Verified guesses against any one account are capped by the
|
|
32
|
+
* (username, IP) gate at AUTH_FAILURE_MAX, not by this. Single-user mode does
|
|
33
|
+
* not use this.
|
|
34
|
+
*/
|
|
35
|
+
export const AUTH_IP_FAILURE_MAX = 50;
|
|
21
36
|
/** Failed auth attempt tracking window (ms) */
|
|
22
37
|
export const AUTH_FAILURE_WINDOW_MS = 15 * 60 * 1000;
|
|
23
38
|
// ============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-config.js","sourceRoot":"","sources":["../../src/config/auth-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E
|
|
1
|
+
{"version":3,"file":"auth-config.js","sourceRoot":"","sources":["../../src/config/auth-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAErD,+EAA+E;AAC/E,QAAQ;AACR,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC"}
|
|
@@ -23,8 +23,8 @@ export declare const CliEntrySchema: z.ZodObject<{
|
|
|
23
23
|
stock: z.ZodBoolean;
|
|
24
24
|
order: z.ZodNumber;
|
|
25
25
|
kind: z.ZodEnum<{
|
|
26
|
-
shell: "shell";
|
|
27
26
|
agent: "agent";
|
|
27
|
+
shell: "shell";
|
|
28
28
|
}>;
|
|
29
29
|
discovery: z.ZodObject<{
|
|
30
30
|
binaries: z.ZodArray<z.ZodString>;
|
|
@@ -98,9 +98,9 @@ export declare const CliEntrySchema: z.ZodObject<{
|
|
|
98
98
|
value: z.ZodString;
|
|
99
99
|
quote: z.ZodOptional<z.ZodEnum<{
|
|
100
100
|
auto: "auto";
|
|
101
|
-
single: "single";
|
|
102
101
|
bare: "bare";
|
|
103
102
|
double: "double";
|
|
103
|
+
single: "single";
|
|
104
104
|
}>>;
|
|
105
105
|
when: z.ZodOptional<z.ZodType<import("./types.js").Cond, unknown, z.core.$ZodTypeInternals<import("./types.js").Cond, unknown>>>;
|
|
106
106
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -108,18 +108,18 @@ export declare const CliEntrySchema: z.ZodObject<{
|
|
|
108
108
|
valueFrom: z.ZodString;
|
|
109
109
|
quote: z.ZodOptional<z.ZodEnum<{
|
|
110
110
|
auto: "auto";
|
|
111
|
-
single: "single";
|
|
112
111
|
bare: "bare";
|
|
113
112
|
double: "double";
|
|
113
|
+
single: "single";
|
|
114
114
|
}>>;
|
|
115
115
|
when: z.ZodOptional<z.ZodType<import("./types.js").Cond, unknown, z.core.$ZodTypeInternals<import("./types.js").Cond, unknown>>>;
|
|
116
116
|
}, z.core.$strict>, z.ZodObject<{
|
|
117
117
|
valueFrom: z.ZodString;
|
|
118
118
|
quote: z.ZodOptional<z.ZodEnum<{
|
|
119
119
|
auto: "auto";
|
|
120
|
-
single: "single";
|
|
121
120
|
bare: "bare";
|
|
122
121
|
double: "double";
|
|
122
|
+
single: "single";
|
|
123
123
|
}>>;
|
|
124
124
|
when: z.ZodOptional<z.ZodType<import("./types.js").Cond, unknown, z.core.$ZodTypeInternals<import("./types.js").Cond, unknown>>>;
|
|
125
125
|
}, z.core.$strict>]>>;
|
|
@@ -185,9 +185,9 @@ export declare const CliEntrySchema: z.ZodObject<{
|
|
|
185
185
|
}>;
|
|
186
186
|
echo: z.ZodObject<{
|
|
187
187
|
policy: z.ZodEnum<{
|
|
188
|
-
off: "off";
|
|
189
188
|
buffer: "buffer";
|
|
190
189
|
predict: "predict";
|
|
190
|
+
off: "off";
|
|
191
191
|
}>;
|
|
192
192
|
anchor: z.ZodUnion<readonly [z.ZodObject<{
|
|
193
193
|
kind: z.ZodLiteral<"glyph">;
|
|
@@ -209,9 +209,10 @@ export declare const CliEntrySchema: z.ZodObject<{
|
|
|
209
209
|
minVersion: z.ZodOptional<z.ZodString>;
|
|
210
210
|
}, z.core.$strict>;
|
|
211
211
|
transcriptPageKeys: z.ZodOptional<z.ZodBoolean>;
|
|
212
|
+
keyboardHold: z.ZodOptional<z.ZodLiteral<"inline">>;
|
|
212
213
|
keyboardAccessory: z.ZodEnum<{
|
|
213
|
-
shell: "shell";
|
|
214
214
|
agent: "agent";
|
|
215
|
+
shell: "shell";
|
|
215
216
|
}>;
|
|
216
217
|
privilegedCommandGate: z.ZodBoolean;
|
|
217
218
|
startMode: z.ZodEnum<{
|
|
@@ -238,11 +239,15 @@ export declare const CliEntrySchema: z.ZodObject<{
|
|
|
238
239
|
awaitingLine: z.ZodOptional<z.ZodString>;
|
|
239
240
|
blockedLine: z.ZodOptional<z.ZodString>;
|
|
240
241
|
blockedLines: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
composerFooterLine: z.ZodOptional<z.ZodString>;
|
|
243
|
+
composerPopupLine: z.ZodOptional<z.ZodString>;
|
|
244
|
+
composerCommandPrefixes: z.ZodOptional<z.ZodString>;
|
|
245
|
+
composerCompletionSigils: z.ZodOptional<z.ZodString>;
|
|
241
246
|
}, z.core.$strict>>;
|
|
242
247
|
model: z.ZodObject<{
|
|
243
248
|
source: z.ZodEnum<{
|
|
244
|
-
none: "none";
|
|
245
249
|
flag: "flag";
|
|
250
|
+
none: "none";
|
|
246
251
|
"claude-settings-file": "claude-settings-file";
|
|
247
252
|
}>;
|
|
248
253
|
param: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/config/cli-registry/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,6FAA6F;AAC7F,eAAO,MAAM,gBAAgB,+CAAmF,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/config/cli-registry/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,6FAA6F;AAC7F,eAAO,MAAM,gBAAgB,+CAAmF,CAAC;AAimBjH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiHvB,CAAC;AAEL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -276,6 +276,9 @@ const capabilitiesSchema = z
|
|
|
276
276
|
// the CLI to page its own transcript. Distinct from wheelForward (SGR reports).
|
|
277
277
|
// Optional: absent means no paging, the safe default for an unmeasured CLI.
|
|
278
278
|
transcriptPageKeys: z.boolean().optional(),
|
|
279
|
+
// Keep the PTY's rows while a phone keyboard is up (inline renderers only).
|
|
280
|
+
// Optional: absent means the keyboard resizes, the safe default.
|
|
281
|
+
keyboardHold: z.literal('inline').optional(),
|
|
279
282
|
keyboardAccessory: z.enum(['agent', 'shell']),
|
|
280
283
|
privilegedCommandGate: z.boolean(),
|
|
281
284
|
startMode: z.enum(['interactive', 'shell']),
|
|
@@ -347,6 +350,29 @@ const capabilitiesSchema = z
|
|
|
347
350
|
// marker but never the footer. Still bounded, since it is also how much text the
|
|
348
351
|
// pattern runs over.
|
|
349
352
|
blockedLines: z.number().int().min(1).max(24).optional(),
|
|
353
|
+
// Same guard again: run over the rows under the composer each time guarded
|
|
354
|
+
// input reads the pane, and ~/.codeman/clis.json can set it.
|
|
355
|
+
composerFooterLine: z
|
|
356
|
+
.string()
|
|
357
|
+
.min(1)
|
|
358
|
+
.refine((src) => compileVersionRegex(src) !== null, 'composerFooterLine must be a regex compileVersionRegex() accepts: at most 200 characters, no nested quantifiers')
|
|
359
|
+
.optional(),
|
|
360
|
+
// Same guard again: run over the rows just above the composer by the same reads.
|
|
361
|
+
composerPopupLine: z
|
|
362
|
+
.string()
|
|
363
|
+
.min(1)
|
|
364
|
+
.refine((src) => compileVersionRegex(src) !== null, 'composerPopupLine must be a regex compileVersionRegex() accepts: at most 200 characters, no nested quantifiers')
|
|
365
|
+
.optional(),
|
|
366
|
+
// Single ASCII punctuation characters, never letters, digits or whitespace: each one
|
|
367
|
+
// refuses every message that starts (or whose last word starts) with it.
|
|
368
|
+
composerCommandPrefixes: z
|
|
369
|
+
.string()
|
|
370
|
+
.regex(/^[!-/:-@[-`{-~]{1,8}$/, 'composerCommandPrefixes must be 1 to 8 ASCII punctuation characters')
|
|
371
|
+
.optional(),
|
|
372
|
+
composerCompletionSigils: z
|
|
373
|
+
.string()
|
|
374
|
+
.regex(/^[!-/:-@[-`{-~]{1,8}$/, 'composerCompletionSigils must be 1 to 8 ASCII punctuation characters')
|
|
375
|
+
.optional(),
|
|
350
376
|
})
|
|
351
377
|
.strict()
|
|
352
378
|
// A window with nothing to search is a typo, not a configuration. Refused at LOAD
|