Skip to content

Export coding-agent package path helpers #5415

@any-victor

Description

@any-victor

What do you want to change?

Export the existing coding-agent package asset path helpers from the current public root API (@earendil-works/pi-coding-agent).

The package root already re-exports getAgentDir and VERSION from ./config.ts. This request is to add the adjacent helpers from the same source file to that existing root export:

No new package subpath is required.

Why?

Extensions that need to reproduce Pi's built-in system prompt need the same package asset paths that Pi uses internally. The helpers already exist in packages/coding-agent/src/config.ts, but the public root export only exposes getAgentDir and VERSION from that module today.

Deep-importing the built config module is not a supported workaround: the package exports map exposes only . and ./hooks, so Node and Bun reject unsupported deep imports such as @earendil-works/pi-coding-agent/dist/config at runtime.

Without a public export, extension authors have to copy path-resolution logic or rely on filesystem traversal outside the package API.

How? (optional)

Extend the existing root export in packages/coding-agent/src/index.ts:

export {
  getAgentDir,
  getDocsPath,
  getExamplesPath,
  getPackageDir,
  getReadmePath,
  VERSION,
} from "./config.ts";

Metadata

Metadata

Assignees

Labels

inprogressIssue is being worked on

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions