@finngi/pi-codex-search

Codex search integration for Pi

Packages

Package details

extension

Install @finngi/pi-codex-search from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@finngi/pi-codex-search
Package
@finngi/pi-codex-search
Version
0.1.0-alpha.0
Published
Oct 16, 2026
Downloads
208/mo · 29/wk
Author
finngi
License
MIT
Types
extension
Size
58.5 KB
Dependencies
1 dependency · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./node_modules/pi-codex-search/dist/extensions/search.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@finngi/pi-codex-search

Experimental alpha; tested with Node 24 and stock Pi 1.2.0.

pi install npm:@finngi/pi-codex-search@0.1.0-alpha.0

This download includes its workspace dependencies. No sibling packages are required.

Web search for Pi through the Codex Responses API, using the OpenAI Codex login Pi already has. Loading the package registers codex_search. It returns the provider's answer, the URLs it cited, its search calls, usage and any partial failures. It only sends search queries, to one fixed backend.

The login is looked up through Pi's model registry each time the tool runs. Requests stay on the fixed Codex backend. Redirects, cancellation, invalid logins and malformed replies end in short, clear errors. Load pi-permissions if you want calls checked first.

Search usage is added to Pi's normal totals through the tool result, including when search runs inside another tool. Prices come from the model catalogue. Missing usage or prices show a warning in the result and in /costs, when shared accounting is loaded. Costs are estimates, not a separate subscription charge.

Children of pi-delegation get codex_search when the parent has it selected and the agent's tool list allows it. They use the same Codex login, whatever model the child runs.

Tests

From the repository root:

npm run test --workspace=pi-codex-search
npm run typecheck --workspace=pi-codex-search
npm run test:e2e --workspace=pi-codex-search

The SDK tests use a fake login and scripted HTTP. They cover direct and nested calls, permission checks and accounting, and make no real search or model requests. Entrypoint: extensions/search.ts. See testing.