@richhardry/codor 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +293 -0
- package/bin/codor.mjs +7 -0
- package/node_modules/@codor/adapter-antigravity/dist/adapter.d.ts +41 -0
- package/node_modules/@codor/adapter-antigravity/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/adapter-antigravity/dist/adapter.js +275 -0
- package/node_modules/@codor/adapter-antigravity/dist/adapter.js.map +1 -0
- package/node_modules/@codor/adapter-antigravity/dist/index.d.ts +2 -0
- package/node_modules/@codor/adapter-antigravity/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/adapter-antigravity/dist/index.js +2 -0
- package/node_modules/@codor/adapter-antigravity/dist/index.js.map +1 -0
- package/node_modules/@codor/adapter-antigravity/package.json +18 -0
- package/node_modules/@codor/adapter-claude-code/dist/adapter.d.ts +94 -0
- package/node_modules/@codor/adapter-claude-code/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/adapter.js +785 -0
- package/node_modules/@codor/adapter-claude-code/dist/adapter.js.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/index.d.ts +8 -0
- package/node_modules/@codor/adapter-claude-code/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/index.js +5 -0
- package/node_modules/@codor/adapter-claude-code/dist/index.js.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/limits-probe.d.ts +18 -0
- package/node_modules/@codor/adapter-claude-code/dist/limits-probe.d.ts.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/limits-probe.js +67 -0
- package/node_modules/@codor/adapter-claude-code/dist/limits-probe.js.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/peek.d.ts +3 -0
- package/node_modules/@codor/adapter-claude-code/dist/peek.d.ts.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/peek.js +128 -0
- package/node_modules/@codor/adapter-claude-code/dist/peek.js.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/query.d.ts +9 -0
- package/node_modules/@codor/adapter-claude-code/dist/query.d.ts.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/query.js +7 -0
- package/node_modules/@codor/adapter-claude-code/dist/query.js.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/translate.d.ts +40 -0
- package/node_modules/@codor/adapter-claude-code/dist/translate.d.ts.map +1 -0
- package/node_modules/@codor/adapter-claude-code/dist/translate.js +505 -0
- package/node_modules/@codor/adapter-claude-code/dist/translate.js.map +1 -0
- package/node_modules/@codor/adapter-claude-code/package.json +18 -0
- package/node_modules/@codor/adapter-codex/dist/adapter.d.ts +105 -0
- package/node_modules/@codor/adapter-codex/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/adapter.js +625 -0
- package/node_modules/@codor/adapter-codex/dist/adapter.js.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/app-server-transport.d.ts +39 -0
- package/node_modules/@codor/adapter-codex/dist/app-server-transport.d.ts.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/app-server-transport.js +186 -0
- package/node_modules/@codor/adapter-codex/dist/app-server-transport.js.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/index.d.ts +8 -0
- package/node_modules/@codor/adapter-codex/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/index.js +5 -0
- package/node_modules/@codor/adapter-codex/dist/index.js.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/limits-probe.d.ts +18 -0
- package/node_modules/@codor/adapter-codex/dist/limits-probe.d.ts.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/limits-probe.js +87 -0
- package/node_modules/@codor/adapter-codex/dist/limits-probe.js.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/peek.d.ts +3 -0
- package/node_modules/@codor/adapter-codex/dist/peek.d.ts.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/peek.js +98 -0
- package/node_modules/@codor/adapter-codex/dist/peek.js.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/translate.d.ts +17 -0
- package/node_modules/@codor/adapter-codex/dist/translate.d.ts.map +1 -0
- package/node_modules/@codor/adapter-codex/dist/translate.js +286 -0
- package/node_modules/@codor/adapter-codex/dist/translate.js.map +1 -0
- package/node_modules/@codor/adapter-codex/package.json +17 -0
- package/node_modules/@codor/adapter-copilot/dist/adapter.d.ts +40 -0
- package/node_modules/@codor/adapter-copilot/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/adapter-copilot/dist/adapter.js +190 -0
- package/node_modules/@codor/adapter-copilot/dist/adapter.js.map +1 -0
- package/node_modules/@codor/adapter-copilot/dist/index.d.ts +4 -0
- package/node_modules/@codor/adapter-copilot/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/adapter-copilot/dist/index.js +3 -0
- package/node_modules/@codor/adapter-copilot/dist/index.js.map +1 -0
- package/node_modules/@codor/adapter-copilot/dist/translate.d.ts +11 -0
- package/node_modules/@codor/adapter-copilot/dist/translate.d.ts.map +1 -0
- package/node_modules/@codor/adapter-copilot/dist/translate.js +184 -0
- package/node_modules/@codor/adapter-copilot/dist/translate.js.map +1 -0
- package/node_modules/@codor/adapter-copilot/package.json +18 -0
- package/node_modules/@codor/adapter-cursor/dist/adapter.d.ts +32 -0
- package/node_modules/@codor/adapter-cursor/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/adapter-cursor/dist/adapter.js +179 -0
- package/node_modules/@codor/adapter-cursor/dist/adapter.js.map +1 -0
- package/node_modules/@codor/adapter-cursor/dist/index.d.ts +9 -0
- package/node_modules/@codor/adapter-cursor/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/adapter-cursor/dist/index.js +8 -0
- package/node_modules/@codor/adapter-cursor/dist/index.js.map +1 -0
- package/node_modules/@codor/adapter-cursor/dist/translate.d.ts +15 -0
- package/node_modules/@codor/adapter-cursor/dist/translate.d.ts.map +1 -0
- package/node_modules/@codor/adapter-cursor/dist/translate.js +164 -0
- package/node_modules/@codor/adapter-cursor/dist/translate.js.map +1 -0
- package/node_modules/@codor/adapter-cursor/package.json +17 -0
- package/node_modules/@codor/adapter-gemini/dist/adapter.d.ts +36 -0
- package/node_modules/@codor/adapter-gemini/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/adapter-gemini/dist/adapter.js +245 -0
- package/node_modules/@codor/adapter-gemini/dist/adapter.js.map +1 -0
- package/node_modules/@codor/adapter-gemini/dist/index.d.ts +4 -0
- package/node_modules/@codor/adapter-gemini/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/adapter-gemini/dist/index.js +3 -0
- package/node_modules/@codor/adapter-gemini/dist/index.js.map +1 -0
- package/node_modules/@codor/adapter-gemini/dist/translate.d.ts +12 -0
- package/node_modules/@codor/adapter-gemini/dist/translate.d.ts.map +1 -0
- package/node_modules/@codor/adapter-gemini/dist/translate.js +123 -0
- package/node_modules/@codor/adapter-gemini/dist/translate.js.map +1 -0
- package/node_modules/@codor/adapter-gemini/package.json +18 -0
- package/node_modules/@codor/adapter-opencode/dist/adapter.d.ts +42 -0
- package/node_modules/@codor/adapter-opencode/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/adapter-opencode/dist/adapter.js +240 -0
- package/node_modules/@codor/adapter-opencode/dist/adapter.js.map +1 -0
- package/node_modules/@codor/adapter-opencode/dist/index.d.ts +4 -0
- package/node_modules/@codor/adapter-opencode/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/adapter-opencode/dist/index.js +3 -0
- package/node_modules/@codor/adapter-opencode/dist/index.js.map +1 -0
- package/node_modules/@codor/adapter-opencode/dist/translate.d.ts +12 -0
- package/node_modules/@codor/adapter-opencode/dist/translate.d.ts.map +1 -0
- package/node_modules/@codor/adapter-opencode/dist/translate.js +144 -0
- package/node_modules/@codor/adapter-opencode/dist/translate.js.map +1 -0
- package/node_modules/@codor/adapter-opencode/package.json +18 -0
- package/node_modules/@codor/cli/dist/artifact.d.ts +33 -0
- package/node_modules/@codor/cli/dist/artifact.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/artifact.js +183 -0
- package/node_modules/@codor/cli/dist/artifact.js.map +1 -0
- package/node_modules/@codor/cli/dist/attach.d.ts +25 -0
- package/node_modules/@codor/cli/dist/attach.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/attach.js +133 -0
- package/node_modules/@codor/cli/dist/attach.js.map +1 -0
- package/node_modules/@codor/cli/dist/connection.d.ts +21 -0
- package/node_modules/@codor/cli/dist/connection.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/connection.js +130 -0
- package/node_modules/@codor/cli/dist/connection.js.map +1 -0
- package/node_modules/@codor/cli/dist/detect.d.ts +14 -0
- package/node_modules/@codor/cli/dist/detect.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/detect.js +99 -0
- package/node_modules/@codor/cli/dist/detect.js.map +1 -0
- package/node_modules/@codor/cli/dist/index.d.ts +17 -0
- package/node_modules/@codor/cli/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/index.js +24 -0
- package/node_modules/@codor/cli/dist/index.js.map +1 -0
- package/node_modules/@codor/cli/dist/mirror.d.ts +4 -0
- package/node_modules/@codor/cli/dist/mirror.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/mirror.js +93 -0
- package/node_modules/@codor/cli/dist/mirror.js.map +1 -0
- package/node_modules/@codor/cli/dist/program.d.ts +17 -0
- package/node_modules/@codor/cli/dist/program.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/program.js +1068 -0
- package/node_modules/@codor/cli/dist/program.js.map +1 -0
- package/node_modules/@codor/cli/dist/runtime-install.d.ts +61 -0
- package/node_modules/@codor/cli/dist/runtime-install.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/runtime-install.js +122 -0
- package/node_modules/@codor/cli/dist/runtime-install.js.map +1 -0
- package/node_modules/@codor/cli/dist/runtime-paths.d.ts +24 -0
- package/node_modules/@codor/cli/dist/runtime-paths.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/runtime-paths.js +69 -0
- package/node_modules/@codor/cli/dist/runtime-paths.js.map +1 -0
- package/node_modules/@codor/cli/dist/setup-flow.d.ts +69 -0
- package/node_modules/@codor/cli/dist/setup-flow.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/setup-flow.js +110 -0
- package/node_modules/@codor/cli/dist/setup-flow.js.map +1 -0
- package/node_modules/@codor/cli/dist/setup-session.d.ts +105 -0
- package/node_modules/@codor/cli/dist/setup-session.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/setup-session.js +346 -0
- package/node_modules/@codor/cli/dist/setup-session.js.map +1 -0
- package/node_modules/@codor/cli/dist/setup-ui.d.ts +93 -0
- package/node_modules/@codor/cli/dist/setup-ui.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/setup-ui.js +249 -0
- package/node_modules/@codor/cli/dist/setup-ui.js.map +1 -0
- package/node_modules/@codor/cli/dist/setup.d.ts +108 -0
- package/node_modules/@codor/cli/dist/setup.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/setup.js +878 -0
- package/node_modules/@codor/cli/dist/setup.js.map +1 -0
- package/node_modules/@codor/cli/dist/terminal-keys.d.ts +26 -0
- package/node_modules/@codor/cli/dist/terminal-keys.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/terminal-keys.js +70 -0
- package/node_modules/@codor/cli/dist/terminal-keys.js.map +1 -0
- package/node_modules/@codor/cli/dist/terminal-qr.d.ts +2 -0
- package/node_modules/@codor/cli/dist/terminal-qr.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/terminal-qr.js +30 -0
- package/node_modules/@codor/cli/dist/terminal-qr.js.map +1 -0
- package/node_modules/@codor/cli/dist/up.d.ts +52 -0
- package/node_modules/@codor/cli/dist/up.d.ts.map +1 -0
- package/node_modules/@codor/cli/dist/up.js +178 -0
- package/node_modules/@codor/cli/dist/up.js.map +1 -0
- package/node_modules/@codor/cli/package.json +24 -0
- package/node_modules/@codor/cli/packaging/systemd/codor.service +21 -0
- package/node_modules/@codor/cli/runtime/web/assets/LandingPage-BOmG5kSw.js +31 -0
- package/node_modules/@codor/cli/runtime/web/assets/LedgerPage-CecuTS8-.js +1 -0
- package/node_modules/@codor/cli/runtime/web/assets/NoChannels-CYiBXGQd.js +11 -0
- package/node_modules/@codor/cli/runtime/web/assets/PairingCodeInput-Cr6XDWx-.js +1 -0
- package/node_modules/@codor/cli/runtime/web/assets/PairingPage-CQBWNA2L.js +6 -0
- package/node_modules/@codor/cli/runtime/web/assets/SettingsPage-DGLbSXE7.js +16 -0
- package/node_modules/@codor/cli/runtime/web/assets/StartupUnavailable-DdQBHip_.js +1 -0
- package/node_modules/@codor/cli/runtime/web/assets/arrow-left-BOpjMuRi.js +6 -0
- package/node_modules/@codor/cli/runtime/web/assets/browser-BWQYNOsD.js +6 -0
- package/node_modules/@codor/cli/runtime/web/assets/graph-toBZHlC0.js +1 -0
- package/node_modules/@codor/cli/runtime/web/assets/index-Cxi54Xim.js +408 -0
- package/node_modules/@codor/cli/runtime/web/assets/index-DjwJakJC.css +1 -0
- package/node_modules/@codor/cli/runtime/web/assets/qr-DpynCwP9.js +8 -0
- package/node_modules/@codor/cli/runtime/web/assets/react-C8w-UNLI.js +32 -0
- package/node_modules/@codor/cli/runtime/web/assets/sodium-DtsvMzX9.js +1 -0
- package/node_modules/@codor/cli/runtime/web/codor-192.png +0 -0
- package/node_modules/@codor/cli/runtime/web/codor-512.png +0 -0
- package/node_modules/@codor/cli/runtime/web/codor-apple-touch-180.png +0 -0
- package/node_modules/@codor/cli/runtime/web/codor-favicon.svg +86 -0
- package/node_modules/@codor/cli/runtime/web/codor-mark.svg +86 -0
- package/node_modules/@codor/cli/runtime/web/codor-maskable-512.png +0 -0
- package/node_modules/@codor/cli/runtime/web/codor-og.png +0 -0
- package/node_modules/@codor/cli/runtime/web/fonts/BitcountPropSingle-latin.woff2 +0 -0
- package/node_modules/@codor/cli/runtime/web/fonts/Geist-Variable.woff2 +0 -0
- package/node_modules/@codor/cli/runtime/web/fonts/GeistMono-Variable.woff2 +0 -0
- package/node_modules/@codor/cli/runtime/web/fonts/OFL.txt +93 -0
- package/node_modules/@codor/cli/runtime/web/index.html +53 -0
- package/node_modules/@codor/cli/runtime/web/manifest.webmanifest +1 -0
- package/node_modules/@codor/cli/runtime/web/sw.js +2 -0
- package/node_modules/@codor/protocol/dist/adapter.d.ts +118 -0
- package/node_modules/@codor/protocol/dist/adapter.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/adapter.js +15 -0
- package/node_modules/@codor/protocol/dist/adapter.js.map +1 -0
- package/node_modules/@codor/protocol/dist/body.d.ts +14 -0
- package/node_modules/@codor/protocol/dist/body.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/body.js +50 -0
- package/node_modules/@codor/protocol/dist/body.js.map +1 -0
- package/node_modules/@codor/protocol/dist/changelog.d.ts +30 -0
- package/node_modules/@codor/protocol/dist/changelog.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/changelog.js +19 -0
- package/node_modules/@codor/protocol/dist/changelog.js.map +1 -0
- package/node_modules/@codor/protocol/dist/default-recipient.d.ts +8 -0
- package/node_modules/@codor/protocol/dist/default-recipient.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/default-recipient.js +19 -0
- package/node_modules/@codor/protocol/dist/default-recipient.js.map +1 -0
- package/node_modules/@codor/protocol/dist/delivery.d.ts +42 -0
- package/node_modules/@codor/protocol/dist/delivery.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/delivery.js +44 -0
- package/node_modules/@codor/protocol/dist/delivery.js.map +1 -0
- package/node_modules/@codor/protocol/dist/events.d.ts +284 -0
- package/node_modules/@codor/protocol/dist/events.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/events.js +150 -0
- package/node_modules/@codor/protocol/dist/events.js.map +1 -0
- package/node_modules/@codor/protocol/dist/ids.d.ts +19 -0
- package/node_modules/@codor/protocol/dist/ids.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/ids.js +27 -0
- package/node_modules/@codor/protocol/dist/ids.js.map +1 -0
- package/node_modules/@codor/protocol/dist/index.d.ts +14 -0
- package/node_modules/@codor/protocol/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/index.js +14 -0
- package/node_modules/@codor/protocol/dist/index.js.map +1 -0
- package/node_modules/@codor/protocol/dist/interaction.d.ts +45 -0
- package/node_modules/@codor/protocol/dist/interaction.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/interaction.js +33 -0
- package/node_modules/@codor/protocol/dist/interaction.js.map +1 -0
- package/node_modules/@codor/protocol/dist/member.d.ts +146 -0
- package/node_modules/@codor/protocol/dist/member.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/member.js +169 -0
- package/node_modules/@codor/protocol/dist/member.js.map +1 -0
- package/node_modules/@codor/protocol/dist/message.d.ts +166 -0
- package/node_modules/@codor/protocol/dist/message.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/message.js +95 -0
- package/node_modules/@codor/protocol/dist/message.js.map +1 -0
- package/node_modules/@codor/protocol/dist/observability.d.ts +80 -0
- package/node_modules/@codor/protocol/dist/observability.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/observability.js +41 -0
- package/node_modules/@codor/protocol/dist/observability.js.map +1 -0
- package/node_modules/@codor/protocol/dist/room.d.ts +430 -0
- package/node_modules/@codor/protocol/dist/room.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/room.js +142 -0
- package/node_modules/@codor/protocol/dist/room.js.map +1 -0
- package/node_modules/@codor/protocol/dist/ws.d.ts +1348 -0
- package/node_modules/@codor/protocol/dist/ws.d.ts.map +1 -0
- package/node_modules/@codor/protocol/dist/ws.js +282 -0
- package/node_modules/@codor/protocol/dist/ws.js.map +1 -0
- package/node_modules/@codor/protocol/package.json +17 -0
- package/node_modules/@codor/switchboard/dist/adapter-registry.d.ts +14 -0
- package/node_modules/@codor/switchboard/dist/adapter-registry.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/adapter-registry.js +175 -0
- package/node_modules/@codor/switchboard/dist/adapter-registry.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/authorization.d.ts +13 -0
- package/node_modules/@codor/switchboard/dist/authorization.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/authorization.js +96 -0
- package/node_modules/@codor/switchboard/dist/authorization.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/blobs.d.ts +17 -0
- package/node_modules/@codor/switchboard/dist/blobs.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/blobs.js +54 -0
- package/node_modules/@codor/switchboard/dist/blobs.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/collaboration.d.ts +115 -0
- package/node_modules/@codor/switchboard/dist/collaboration.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/collaboration.js +123 -0
- package/node_modules/@codor/switchboard/dist/collaboration.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/continuation.d.ts +33 -0
- package/node_modules/@codor/switchboard/dist/continuation.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/continuation.js +177 -0
- package/node_modules/@codor/switchboard/dist/continuation.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.d.ts +22 -0
- package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.js +92 -0
- package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/challenge.d.ts +37 -0
- package/node_modules/@codor/switchboard/dist/crypto/challenge.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/challenge.js +132 -0
- package/node_modules/@codor/switchboard/dist/crypto/challenge.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/keys.d.ts +41 -0
- package/node_modules/@codor/switchboard/dist/crypto/keys.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/keys.js +145 -0
- package/node_modules/@codor/switchboard/dist/crypto/keys.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/pairing.d.ts +53 -0
- package/node_modules/@codor/switchboard/dist/crypto/pairing.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/pairing.js +182 -0
- package/node_modules/@codor/switchboard/dist/crypto/pairing.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/roomkeys.d.ts +30 -0
- package/node_modules/@codor/switchboard/dist/crypto/roomkeys.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/crypto/roomkeys.js +101 -0
- package/node_modules/@codor/switchboard/dist/crypto/roomkeys.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/daemon.d.ts +545 -0
- package/node_modules/@codor/switchboard/dist/daemon.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/daemon.js +3907 -0
- package/node_modules/@codor/switchboard/dist/daemon.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/fake-adapter.d.ts +103 -0
- package/node_modules/@codor/switchboard/dist/fake-adapter.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/fake-adapter.js +228 -0
- package/node_modules/@codor/switchboard/dist/fake-adapter.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/index.d.ts +44 -0
- package/node_modules/@codor/switchboard/dist/index.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/index.js +24 -0
- package/node_modules/@codor/switchboard/dist/index.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/ledger/resolve.d.ts +12 -0
- package/node_modules/@codor/switchboard/dist/ledger/resolve.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/ledger/resolve.js +17 -0
- package/node_modules/@codor/switchboard/dist/ledger/resolve.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/ledger/vault.d.ts +47 -0
- package/node_modules/@codor/switchboard/dist/ledger/vault.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/ledger/vault.js +175 -0
- package/node_modules/@codor/switchboard/dist/ledger/vault.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/ledger/watch.d.ts +73 -0
- package/node_modules/@codor/switchboard/dist/ledger/watch.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/ledger/watch.js +232 -0
- package/node_modules/@codor/switchboard/dist/ledger/watch.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/local-dirs.d.ts +14 -0
- package/node_modules/@codor/switchboard/dist/local-dirs.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/local-dirs.js +40 -0
- package/node_modules/@codor/switchboard/dist/local-dirs.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/local-socket.d.ts +3 -0
- package/node_modules/@codor/switchboard/dist/local-socket.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/local-socket.js +16 -0
- package/node_modules/@codor/switchboard/dist/local-socket.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/pricing.d.ts +32 -0
- package/node_modules/@codor/switchboard/dist/pricing.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/pricing.js +64 -0
- package/node_modules/@codor/switchboard/dist/pricing.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/process-liveness.d.ts +2 -0
- package/node_modules/@codor/switchboard/dist/process-liveness.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/process-liveness.js +9 -0
- package/node_modules/@codor/switchboard/dist/process-liveness.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/push/producer.d.ts +54 -0
- package/node_modules/@codor/switchboard/dist/push/producer.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/push/producer.js +168 -0
- package/node_modules/@codor/switchboard/dist/push/producer.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/push/subscriptions.d.ts +29 -0
- package/node_modules/@codor/switchboard/dist/push/subscriptions.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/push/subscriptions.js +83 -0
- package/node_modules/@codor/switchboard/dist/push/subscriptions.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/redact.d.ts +11 -0
- package/node_modules/@codor/switchboard/dist/redact.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/redact.js +65 -0
- package/node_modules/@codor/switchboard/dist/redact.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/residency.d.ts +110 -0
- package/node_modules/@codor/switchboard/dist/residency.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/residency.js +587 -0
- package/node_modules/@codor/switchboard/dist/residency.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/router.d.ts +120 -0
- package/node_modules/@codor/switchboard/dist/router.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/router.js +198 -0
- package/node_modules/@codor/switchboard/dist/router.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/server.d.ts +50 -0
- package/node_modules/@codor/switchboard/dist/server.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/server.js +1425 -0
- package/node_modules/@codor/switchboard/dist/server.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/store.d.ts +534 -0
- package/node_modules/@codor/switchboard/dist/store.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/store.js +2625 -0
- package/node_modules/@codor/switchboard/dist/store.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/transport/hyperswarm.d.ts +59 -0
- package/node_modules/@codor/switchboard/dist/transport/hyperswarm.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/transport/hyperswarm.js +183 -0
- package/node_modules/@codor/switchboard/dist/transport/hyperswarm.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/transport/peer.d.ts +87 -0
- package/node_modules/@codor/switchboard/dist/transport/peer.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/transport/peer.js +316 -0
- package/node_modules/@codor/switchboard/dist/transport/peer.js.map +1 -0
- package/node_modules/@codor/switchboard/dist/working-directory.d.ts +2 -0
- package/node_modules/@codor/switchboard/dist/working-directory.d.ts.map +1 -0
- package/node_modules/@codor/switchboard/dist/working-directory.js +26 -0
- package/node_modules/@codor/switchboard/dist/working-directory.js.map +1 -0
- package/node_modules/@codor/switchboard/package.json +33 -0
- package/package.json +58 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
2
|
+
export interface CodexAppServerSpawnContext {
|
|
3
|
+
command: string;
|
|
4
|
+
cwd: string;
|
|
5
|
+
env: NodeJS.ProcessEnv;
|
|
6
|
+
}
|
|
7
|
+
export type CodexAppServerFactory = (context: CodexAppServerSpawnContext) => Promise<ChildProcessWithoutNullStreams>;
|
|
8
|
+
export type CodexAppServerNotificationHandler = (method: string, params: unknown) => void;
|
|
9
|
+
export type CodexAppServerRequestHandler = (params: unknown, requestId: number) => unknown | Promise<unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* Spawn the installed Codex app-server without probing it. The app-server is
|
|
12
|
+
* retained by the adapter, so its stdin remains open across turn/start calls.
|
|
13
|
+
*/
|
|
14
|
+
export declare function spawnCodexAppServer(context: CodexAppServerSpawnContext): Promise<ChildProcessWithoutNullStreams>;
|
|
15
|
+
/** Minimal JSONL JSON-RPC transport for Codex app-server 0.144.5. */
|
|
16
|
+
export declare class CodexAppServerClient {
|
|
17
|
+
readonly child: ChildProcessWithoutNullStreams;
|
|
18
|
+
private readonly onClose;
|
|
19
|
+
private readonly lines;
|
|
20
|
+
private readonly pending;
|
|
21
|
+
private readonly requestHandlers;
|
|
22
|
+
private notificationHandler;
|
|
23
|
+
private nextId;
|
|
24
|
+
private disposed;
|
|
25
|
+
private closed;
|
|
26
|
+
private stderrBuffer;
|
|
27
|
+
constructor(child: ChildProcessWithoutNullStreams, onClose: (error: Error) => void);
|
|
28
|
+
setNotificationHandler(handler: CodexAppServerNotificationHandler): void;
|
|
29
|
+
setRequestHandler(method: string, handler: CodexAppServerRequestHandler): void;
|
|
30
|
+
request(method: string, params?: unknown, timeoutMs?: number): Promise<unknown>;
|
|
31
|
+
notify(method: string, params?: unknown): void;
|
|
32
|
+
dispose(): void;
|
|
33
|
+
stderr(): string;
|
|
34
|
+
private write;
|
|
35
|
+
private handleLine;
|
|
36
|
+
private rejectPending;
|
|
37
|
+
private closeWith;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=app-server-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-server-transport.d.ts","sourceRoot":"","sources":["../src/app-server-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,8BAA8B,EAEpC,MAAM,oBAAoB,CAAC;AAc5B,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACxB;AAED,MAAM,MAAM,qBAAqB,GAAG,CAClC,OAAO,EAAE,0BAA0B,KAChC,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAE7C,MAAM,MAAM,iCAAiC,GAAG,CAC9C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,KACZ,IAAI,CAAC;AAEV,MAAM,MAAM,4BAA4B,GAAG,CACzC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,KACd,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAOhC;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,8BAA8B,CAAC,CAqBzC;AAED,qEAAqE;AACrE,qBAAa,oBAAoB;IAW7B,QAAQ,CAAC,KAAK,EAAE,8BAA8B;IAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAX1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqC;IAC7D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmD;IACnF,OAAO,CAAC,mBAAmB,CAAkD;IAC7E,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,YAAY,CAAM;gBAGf,KAAK,EAAE,8BAA8B,EAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAmBlD,sBAAsB,CAAC,OAAO,EAAE,iCAAiC,GAAG,IAAI;IAIxE,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,4BAA4B,GAAG,IAAI;IAI9E,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,SAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;IAqB3F,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;IAK9C,OAAO,IAAI,IAAI;IAWf,MAAM,IAAI,MAAM;IAIhB,OAAO,CAAC,KAAK;YAIC,UAAU;IAuDxB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,SAAS;CAOlB"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { spawn, } from 'node:child_process';
|
|
2
|
+
import { createInterface } from 'node:readline';
|
|
3
|
+
const REQUEST_TIMEOUT_MS = 30_000;
|
|
4
|
+
const STDERR_LIMIT = 8 * 1024;
|
|
5
|
+
function isRecord(value) {
|
|
6
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
7
|
+
}
|
|
8
|
+
// harn:assume codex-app-server-contract-is-pinned-to-0-144-5 ref=codex-app-server-transport
|
|
9
|
+
/**
|
|
10
|
+
* Spawn the installed Codex app-server without probing it. The app-server is
|
|
11
|
+
* retained by the adapter, so its stdin remains open across turn/start calls.
|
|
12
|
+
*/
|
|
13
|
+
export function spawnCodexAppServer(context) {
|
|
14
|
+
return new Promise((resolve, reject) => {
|
|
15
|
+
const child = spawn(context.command, ['app-server'], {
|
|
16
|
+
cwd: context.cwd,
|
|
17
|
+
env: context.env,
|
|
18
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
19
|
+
// stdin EOF on daemon exit is the final ownership boundary. Unlike the
|
|
20
|
+
// old per-turn driver, interruption is an RPC and needs no process group.
|
|
21
|
+
detached: false,
|
|
22
|
+
});
|
|
23
|
+
const onError = (error) => {
|
|
24
|
+
child.off('spawn', onSpawn);
|
|
25
|
+
reject(error);
|
|
26
|
+
};
|
|
27
|
+
const onSpawn = () => {
|
|
28
|
+
child.off('error', onError);
|
|
29
|
+
resolve(child);
|
|
30
|
+
};
|
|
31
|
+
child.once('error', onError);
|
|
32
|
+
child.once('spawn', onSpawn);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Minimal JSONL JSON-RPC transport for Codex app-server 0.144.5. */
|
|
36
|
+
export class CodexAppServerClient {
|
|
37
|
+
child;
|
|
38
|
+
onClose;
|
|
39
|
+
lines;
|
|
40
|
+
pending = new Map();
|
|
41
|
+
requestHandlers = new Map();
|
|
42
|
+
notificationHandler = null;
|
|
43
|
+
nextId = 1;
|
|
44
|
+
disposed = false;
|
|
45
|
+
closed = false;
|
|
46
|
+
stderrBuffer = '';
|
|
47
|
+
constructor(child, onClose) {
|
|
48
|
+
this.child = child;
|
|
49
|
+
this.onClose = onClose;
|
|
50
|
+
this.lines = createInterface({ input: child.stdout });
|
|
51
|
+
this.lines.on('line', (line) => void this.handleLine(line));
|
|
52
|
+
child.stderr.setEncoding('utf8');
|
|
53
|
+
child.stderr.on('data', (chunk) => {
|
|
54
|
+
this.stderrBuffer = `${this.stderrBuffer}${chunk}`.slice(-STDERR_LIMIT);
|
|
55
|
+
});
|
|
56
|
+
child.stdin.on('error', (error) => this.closeWith(error));
|
|
57
|
+
child.stdout.on('error', (error) => this.closeWith(error));
|
|
58
|
+
child.stderr.on('error', (error) => this.closeWith(error));
|
|
59
|
+
child.on('error', (error) => this.closeWith(error));
|
|
60
|
+
child.on('exit', (code, signal) => {
|
|
61
|
+
const suffix = this.stderrBuffer.trim();
|
|
62
|
+
const detail = `Codex app-server exited with code ${String(code)} and signal ${String(signal)}`;
|
|
63
|
+
this.closeWith(new Error(suffix === '' ? detail : `${detail}\n${suffix}`));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
setNotificationHandler(handler) {
|
|
67
|
+
this.notificationHandler = handler;
|
|
68
|
+
}
|
|
69
|
+
setRequestHandler(method, handler) {
|
|
70
|
+
this.requestHandlers.set(method, handler);
|
|
71
|
+
}
|
|
72
|
+
request(method, params, timeoutMs = REQUEST_TIMEOUT_MS) {
|
|
73
|
+
if (this.closed || this.disposed) {
|
|
74
|
+
return Promise.reject(new Error('Codex app-server client is closed'));
|
|
75
|
+
}
|
|
76
|
+
const id = this.nextId++;
|
|
77
|
+
return new Promise((resolve, reject) => {
|
|
78
|
+
const timer = setTimeout(() => {
|
|
79
|
+
this.pending.delete(id);
|
|
80
|
+
reject(new Error(`Codex app-server request '${method}' timed out`));
|
|
81
|
+
}, timeoutMs);
|
|
82
|
+
this.pending.set(id, { resolve, reject, timer });
|
|
83
|
+
try {
|
|
84
|
+
this.write({ id, method, ...(params !== undefined && { params }) });
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
clearTimeout(timer);
|
|
88
|
+
this.pending.delete(id);
|
|
89
|
+
reject(error instanceof Error ? error : new Error(String(error)));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
notify(method, params) {
|
|
94
|
+
if (this.closed || this.disposed)
|
|
95
|
+
throw new Error('Codex app-server client is closed');
|
|
96
|
+
this.write({ method, ...(params !== undefined && { params }) });
|
|
97
|
+
}
|
|
98
|
+
dispose() {
|
|
99
|
+
if (this.disposed)
|
|
100
|
+
return;
|
|
101
|
+
this.disposed = true;
|
|
102
|
+
this.lines.close();
|
|
103
|
+
this.rejectPending(new Error('Codex app-server client was disposed'));
|
|
104
|
+
this.child.stdin.end();
|
|
105
|
+
if (this.child.exitCode === null && this.child.signalCode === null) {
|
|
106
|
+
this.child.kill('SIGTERM');
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
stderr() {
|
|
110
|
+
return this.stderrBuffer.trim();
|
|
111
|
+
}
|
|
112
|
+
write(message) {
|
|
113
|
+
this.child.stdin.write(`${JSON.stringify(message)}\n`);
|
|
114
|
+
}
|
|
115
|
+
async handleLine(line) {
|
|
116
|
+
let message;
|
|
117
|
+
try {
|
|
118
|
+
message = JSON.parse(line);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (!isRecord(message))
|
|
124
|
+
return;
|
|
125
|
+
if (typeof message.id === 'number' && typeof message.method === 'string') {
|
|
126
|
+
const handler = this.requestHandlers.get(message.method);
|
|
127
|
+
if (handler === undefined) {
|
|
128
|
+
this.write({
|
|
129
|
+
id: message.id,
|
|
130
|
+
error: { code: -32601, message: `Unsupported server request: ${message.method}` },
|
|
131
|
+
});
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
const result = await handler(message.params, message.id);
|
|
136
|
+
this.write({ id: message.id, result });
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
this.write({
|
|
140
|
+
id: message.id,
|
|
141
|
+
error: {
|
|
142
|
+
code: -32603,
|
|
143
|
+
message: error instanceof Error ? error.message : String(error),
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (typeof message.id === 'number') {
|
|
150
|
+
const pending = this.pending.get(message.id);
|
|
151
|
+
if (pending === undefined)
|
|
152
|
+
return;
|
|
153
|
+
clearTimeout(pending.timer);
|
|
154
|
+
this.pending.delete(message.id);
|
|
155
|
+
if (isRecord(message.error)) {
|
|
156
|
+
pending.reject(new Error(typeof message.error.message === 'string'
|
|
157
|
+
? message.error.message
|
|
158
|
+
: 'Codex app-server request failed'));
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
pending.resolve(message.result);
|
|
162
|
+
}
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
if (typeof message.method === 'string') {
|
|
166
|
+
this.notificationHandler?.(message.method, message.params);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
rejectPending(error) {
|
|
170
|
+
for (const pending of this.pending.values()) {
|
|
171
|
+
clearTimeout(pending.timer);
|
|
172
|
+
pending.reject(error);
|
|
173
|
+
}
|
|
174
|
+
this.pending.clear();
|
|
175
|
+
}
|
|
176
|
+
closeWith(error) {
|
|
177
|
+
if (this.closed || this.disposed)
|
|
178
|
+
return;
|
|
179
|
+
this.closed = true;
|
|
180
|
+
this.lines.close();
|
|
181
|
+
this.rejectPending(error);
|
|
182
|
+
this.onClose(error);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// harn:end codex-app-server-contract-is-pinned-to-0-144-5
|
|
186
|
+
//# sourceMappingURL=app-server-transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-server-transport.js","sourceRoot":"","sources":["../src/app-server-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,GACN,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAuC,MAAM,eAAe,CAAC;AAErF,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,CAAC;AA8B9B,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,4FAA4F;AAC5F;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAmC;IAEnC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO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,QAAQ;YAAE,OAAO;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;CACF;AACD,0DAA0D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { CodexAdapter, codexPolicyOptions, } from './adapter.js';
|
|
2
|
+
export type { CodexAdapterOptions, CodexPolicyOptions } from './adapter.js';
|
|
3
|
+
export { CodexAppServerClient, spawnCodexAppServer, } from './app-server-transport.js';
|
|
4
|
+
export type { CodexAppServerFactory, CodexAppServerSpawnContext, } from './app-server-transport.js';
|
|
5
|
+
export { agentUsageFromTokenUsage, createTurnTranslator, } from './translate.js';
|
|
6
|
+
export type { CodexTranslatorContext, TurnTranslator, } from './translate.js';
|
|
7
|
+
export { peekCodexContextUsage } from './peek.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,sBAAsB,EACtB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { CodexAdapter, codexPolicyOptions, } from './adapter.js';
|
|
2
|
+
export { CodexAppServerClient, spawnCodexAppServer, } from './app-server-transport.js';
|
|
3
|
+
export { agentUsageFromTokenUsage, createTurnTranslator, } from './translate.js';
|
|
4
|
+
export { peekCodexContextUsage } from './peek.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AgentLimit } from '@codor/protocol';
|
|
2
|
+
export declare const CODEX_USAGE_URL = "https://chatgpt.com/backend-api/wham/usage";
|
|
3
|
+
export interface LimitsProbeResponse {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
status?: number;
|
|
6
|
+
json(): Promise<unknown>;
|
|
7
|
+
}
|
|
8
|
+
export type LimitsProbeFetcher = (url: string, init: {
|
|
9
|
+
method: 'GET';
|
|
10
|
+
headers: Record<string, string>;
|
|
11
|
+
}) => Promise<LimitsProbeResponse>;
|
|
12
|
+
export interface CodexLimitsProbeOptions {
|
|
13
|
+
credentialsPath?: string;
|
|
14
|
+
fetcher?: LimitsProbeFetcher;
|
|
15
|
+
}
|
|
16
|
+
/** Reads Codex's own auth file and asks only ChatGPT's usage endpoint. */
|
|
17
|
+
export declare function probeCodexLimits(options?: CodexLimitsProbeOptions): Promise<AgentLimit[] | undefined>;
|
|
18
|
+
//# sourceMappingURL=limits-probe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits-probe.d.ts","sourceRoot":"","sources":["../src/limits-probe.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,eAAO,MAAM,eAAe,+CAA+C,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1B;AAED,MAAM,MAAM,kBAAkB,GAAG,CAC/B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,KACrD,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AA2DD,0EAA0E;AAC1E,wBAAsB,gBAAgB,CACpC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,UAAU,EAAE,GAAG,SAAS,CAAC,CAuBnC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
export const CODEX_USAGE_URL = 'https://chatgpt.com/backend-api/wham/usage';
|
|
5
|
+
const record = (value) => typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
6
|
+
? value
|
|
7
|
+
: undefined;
|
|
8
|
+
async function credentials(path) {
|
|
9
|
+
try {
|
|
10
|
+
const auth = record(JSON.parse(await readFile(path, 'utf8')));
|
|
11
|
+
const tokens = record(auth?.tokens);
|
|
12
|
+
const accessToken = tokens?.access_token ?? auth?.access_token;
|
|
13
|
+
const accountId = tokens?.account_id ?? auth?.account_id;
|
|
14
|
+
return typeof accessToken === 'string' && accessToken !== ''
|
|
15
|
+
&& typeof accountId === 'string' && accountId !== ''
|
|
16
|
+
? { accessToken, accountId }
|
|
17
|
+
: undefined;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function resetTimestamp(value) {
|
|
24
|
+
if (typeof value === 'number' && Number.isFinite(value) && value >= 0) {
|
|
25
|
+
return new Date(value * 1000).toISOString();
|
|
26
|
+
}
|
|
27
|
+
return typeof value === 'string' && value !== '' && Number.isFinite(Date.parse(value))
|
|
28
|
+
? value
|
|
29
|
+
: undefined;
|
|
30
|
+
}
|
|
31
|
+
function windowName(seconds) {
|
|
32
|
+
if (seconds === 5 * 60 * 60)
|
|
33
|
+
return 'five_hour';
|
|
34
|
+
if (seconds === 7 * 24 * 60 * 60)
|
|
35
|
+
return 'seven_day';
|
|
36
|
+
return `${String(Math.round(seconds / 60))}_minute`;
|
|
37
|
+
}
|
|
38
|
+
function mapWindow(value) {
|
|
39
|
+
const source = record(value);
|
|
40
|
+
if (!source)
|
|
41
|
+
return undefined;
|
|
42
|
+
const seconds = source.limit_window_seconds;
|
|
43
|
+
if (typeof seconds !== 'number' || !Number.isFinite(seconds) || seconds <= 0)
|
|
44
|
+
return undefined;
|
|
45
|
+
const used = typeof source.used_percent === 'number'
|
|
46
|
+
&& Number.isFinite(source.used_percent)
|
|
47
|
+
&& source.used_percent >= 0
|
|
48
|
+
&& source.used_percent <= 100
|
|
49
|
+
? source.used_percent
|
|
50
|
+
: undefined;
|
|
51
|
+
const resetsAt = resetTimestamp(source.reset_at);
|
|
52
|
+
if (used === undefined && resetsAt === undefined)
|
|
53
|
+
return undefined;
|
|
54
|
+
return {
|
|
55
|
+
window: windowName(seconds),
|
|
56
|
+
...(used !== undefined && { used_percent: used }),
|
|
57
|
+
...(resetsAt !== undefined && { resets_at: resetsAt }),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** Reads Codex's own auth file and asks only ChatGPT's usage endpoint. */
|
|
61
|
+
export async function probeCodexLimits(options = {}) {
|
|
62
|
+
const credentialsPath = options.credentialsPath
|
|
63
|
+
?? join(process.env.CODEX_HOME ?? join(homedir(), '.codex'), 'auth.json');
|
|
64
|
+
const credential = await credentials(credentialsPath);
|
|
65
|
+
if (credential === undefined)
|
|
66
|
+
return undefined;
|
|
67
|
+
const fetcher = options.fetcher ?? ((url, init) => fetch(url, init));
|
|
68
|
+
const response = await fetcher(CODEX_USAGE_URL, {
|
|
69
|
+
method: 'GET',
|
|
70
|
+
headers: {
|
|
71
|
+
Authorization: `Bearer ${credential.accessToken}`,
|
|
72
|
+
'ChatGPT-Account-Id': credential.accountId,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
if (!response.ok)
|
|
76
|
+
throw new Error(`Codex usage probe failed (${String(response.status ?? 'unknown')})`);
|
|
77
|
+
const payload = record(await response.json());
|
|
78
|
+
// The live endpoint nests windows under rate_limit (singular, verified
|
|
79
|
+
// 2026-07-17); older shapes used rate_limits — accept both.
|
|
80
|
+
const rateLimits = record(payload?.rate_limit) ?? record(payload?.rate_limits);
|
|
81
|
+
const limits = [
|
|
82
|
+
mapWindow(rateLimits?.primary_window),
|
|
83
|
+
mapWindow(rateLimits?.secondary_window),
|
|
84
|
+
].filter((limit) => limit !== undefined);
|
|
85
|
+
return limits.length > 0 ? limits : undefined;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=limits-probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits-probe.js","sourceRoot":"","sources":["../src/limits-probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,MAAM,CAAC,MAAM,eAAe,GAAG,4CAA4C,CAAC;A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cAAc,CAAC;QACrC,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;KACxC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAuB,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peek.d.ts","sourceRoot":"","sources":["../src/peek.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiE9D,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAyBrF"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { openSync, readSync, fstatSync, closeSync, readdirSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
// harn:assume context-peek-reads-session-artifacts ref=codex-context-peek
|
|
5
|
+
/**
|
|
6
|
+
* Estimate a codex thread's current context WITHOUT running a turn. Locates
|
|
7
|
+
* the rollout file for the thread id under CODEX_HOME/sessions/YYYY/MM/DD/
|
|
8
|
+
* and reads the tail for the last token_count event:
|
|
9
|
+
* info.last_token_usage.total_tokens is the context as of the thread's last
|
|
10
|
+
* activity and info.model_context_window is the engine-reported ceiling —
|
|
11
|
+
* both survive activity codor never saw. Returns undefined when artifacts
|
|
12
|
+
* are missing or unreadable — never guesses.
|
|
13
|
+
*/
|
|
14
|
+
const TAIL_BYTES = 256 * 1024;
|
|
15
|
+
function sessionsRoot() {
|
|
16
|
+
return join(process.env.CODEX_HOME ?? join(homedir(), '.codex'), 'sessions');
|
|
17
|
+
}
|
|
18
|
+
function rolloutFile(session_ref) {
|
|
19
|
+
const root = sessionsRoot();
|
|
20
|
+
const stack = [root];
|
|
21
|
+
while (stack.length > 0) {
|
|
22
|
+
const dir = stack.pop();
|
|
23
|
+
let entries;
|
|
24
|
+
try {
|
|
25
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
for (const entry of entries) {
|
|
31
|
+
const path = join(dir, entry.name);
|
|
32
|
+
if (entry.isDirectory())
|
|
33
|
+
stack.push(path);
|
|
34
|
+
else if (entry.name.endsWith(`${session_ref}.jsonl`))
|
|
35
|
+
return path;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
function readTail(path) {
|
|
41
|
+
let fd;
|
|
42
|
+
try {
|
|
43
|
+
fd = openSync(path, 'r');
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const size = fstatSync(fd).size;
|
|
50
|
+
const start = Math.max(0, size - TAIL_BYTES);
|
|
51
|
+
const buffer = Buffer.alloc(size - start);
|
|
52
|
+
readSync(fd, buffer, 0, buffer.length, start);
|
|
53
|
+
const lines = buffer.toString('utf8').split('\n');
|
|
54
|
+
if (start > 0)
|
|
55
|
+
lines.shift();
|
|
56
|
+
return lines;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
finally {
|
|
62
|
+
closeSync(fd);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function positiveInt(value) {
|
|
66
|
+
return typeof value === 'number' && Number.isSafeInteger(value) && value > 0 ? value : undefined;
|
|
67
|
+
}
|
|
68
|
+
export function peekCodexContextUsage(session_ref) {
|
|
69
|
+
const path = rolloutFile(session_ref);
|
|
70
|
+
if (path === undefined)
|
|
71
|
+
return undefined;
|
|
72
|
+
const lines = readTail(path);
|
|
73
|
+
if (lines === undefined)
|
|
74
|
+
return undefined;
|
|
75
|
+
let used;
|
|
76
|
+
let max;
|
|
77
|
+
for (const line of lines) {
|
|
78
|
+
if (!line.includes('"token_count"'))
|
|
79
|
+
continue;
|
|
80
|
+
let entry;
|
|
81
|
+
try {
|
|
82
|
+
entry = JSON.parse(line);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (entry.payload?.type !== 'token_count')
|
|
88
|
+
continue;
|
|
89
|
+
const info = entry.payload.info;
|
|
90
|
+
used = positiveInt(info?.last_token_usage?.total_tokens) ?? used;
|
|
91
|
+
max = positiveInt(info?.model_context_window) ?? max;
|
|
92
|
+
}
|
|
93
|
+
if (used === undefined || max === undefined)
|
|
94
|
+
return undefined;
|
|
95
|
+
return { contextWindowMaxTokens: max, contextWindowUsedTokens: used, estimated: true };
|
|
96
|
+
}
|
|
97
|
+
// harn:end context-peek-reads-session-artifacts
|
|
98
|
+
//# sourceMappingURL=peek.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peek.js","sourceRoot":"","sources":["../src/peek.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAY,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,0EAA0E;AAC1E;;;;;;;;GAQG;AAEH,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC;AAE9B,SAAS,YAAY;IACnB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,WAAW,CAAC,WAAuB;IAC1C,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,MAAM,KAAK,GAAG,C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IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,gBAAgB,EAAE,YAAY,CAAC,IAAI,IAAI,CAAC;QACjE,GAAG,GAAG,WAAW,CAAC,IAAI,EAAE,oBAAoB,CAAC,IAAI,GAAG,CAAC;IACvD,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9D,OAAO,EAAE,sBAAsB,EAAE,GAAG,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AACzF,CAAC;AACD,gDAAgD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgentUsage, WireEvent } from '@codor/protocol';
|
|
2
|
+
export interface CodexTranslatorContext {
|
|
3
|
+
latestUsage?: AgentUsage;
|
|
4
|
+
}
|
|
5
|
+
export interface TurnTranslator {
|
|
6
|
+
push(method: string, params: unknown): WireEvent[];
|
|
7
|
+
end(fallback?: {
|
|
8
|
+
status: 'failed' | 'interrupted';
|
|
9
|
+
error?: string;
|
|
10
|
+
}): WireEvent[];
|
|
11
|
+
turnId(): string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/** Exact Codex 0.144.5 camelCase tokenUsage mapping; no historical aliases. */
|
|
14
|
+
export declare function agentUsageFromTokenUsage(tokenUsage: unknown): AgentUsage | undefined;
|
|
15
|
+
/** One app-server turn translator. Shared context carries only latest usage. */
|
|
16
|
+
export declare function createTurnTranslator(context?: CodexTranslatorContext): TurnTranslator;
|
|
17
|
+
//# sourceMappingURL=translate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate.d.ts","sourceRoot":"","sources":["../src/translate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM7D,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,SAAS,EAAE,CAAC;IACnD,GAAG,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,EAAE,QAAQ,GAAG,aAAa,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,EAAE,CAAC;IAClF,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC;CAC9B;AA4DD,+EAA+E;AAC/E,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAkBpF;AAID,gFAAgF;AAChF,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,sBAA2B,GACnC,cAAc,CA8MhB"}
|