The public surface
This page is the 1.0 public-surface freeze (#701, #280): everything that
crosses the install boundary of the @gadhs/pi distribution, its tier,
and the rule governing changes to it
(Stability from 1.0).
-
stable: bound by SemVer from
@gadhs/pi1.0.0. Covers config files and their keys, slash commands and tools, environment variables an operator sets, the bus channels a sibling extension consumes, the versioned wires, and@gadhs/pi’s own exports (@gadhs/pi/bus-rules.json` and@gadhs/pi/package.json). Breaking changes require a major version of@gadhs/piand a=== Breakingsection inCHANGELOG.adoc. -
internal: may change in any release with no semver promise. Covers all ten private sibling workspace packages and their exports (they are not published standalone, #836), names pi sets for a child process, facts read from the environment, and the records below.
-
upstream: owned elsewhere and pinned: pi’s own settings, tools and variables, `@gotgenes/pi-permission-system’s events, and the pivot wire.
tools/lib/test/public-surface.test.mjs holds this page and the code
in step during validate (tools/lib/public-surface.mjs):
-
Names: each kind is read from shipped root-level
.tsand.mjsfiles and compared against this page; any item missing on either side failsvalidate. -
Tools and slash commands: each package that registers stable tools or commands holds their names, parameter schemas (prose descriptions stripped) and command descriptions against a committed
test/fixtures/surface.jsonrecord;validatechecks that the recorded sets match the page’sstablerows. -
Bus channels and wires: every
stablebus channel and wire constant has acontract: <item>test asserting its payload shape or version refusal;validatefails when astablerow has none. -
Package exports: every
.tsfile targeted by a package’sexportsmap carries the internal-export notice in its header comment;validatefails when a target omits it.
The records at the end are listed, not checked.
Configuration files
Per-user files under the agent dir (~/.pi/agent, or
$PI_CODING_AGENT_DIR).
| Item | Defined in | Documented in | Tier |
|---|---|---|---|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
pi-subagents' own; read by |
upstream |
|
|
|
internal |
The modes overlay’s keys are the two summary tables in
Workflow Modes (ModesConfig, ModeDescriptor), which
this check holds to OVERLAY_KEYS in pi-modes/config.ts. Every block with a fixed key set refuses an unknown key by name;
modelRoles refuses unknown role names (accepting the known roles,
mode:<id> for a declared mode, and helper:<name>, #1040); and the two
maps keyed by the operator’s own names (permission,
subagentPolicy.profiles) take any key. The other files' keys:
gadhs-pi-workflow.json-
reviewTimeoutMs,reviewContextMaxFileBytes,reviewContextMaxTotalBytes,reviewContextMaxFiles,reviewSnapshotMaxCalls,reviewSnapshotMaxBytes,planReviewSnapshotMaxCalls,planReviewSnapshotMaxBytes,reviewThinking,commitReviewer,planSecondReviewer,coAuthorEmail,reviewDataPaths. gadhs-pi-agents.json-
models,maxTurns. gadhs-pi-remote.json-
relay,boxName,spaces(allow),agent. pi-ssh.json-
autoForward,node. gadhs-pi-shellcheck.json-
enabled,block,warn,ignore,timeoutMs,binary. vertex-models.json-
models,defaults(contextWindow,maxTokens,input,cost),adcRetry(intervalMs,maxWaitMs),project. subagents.json-
consumedSessionRetentionMinutes, the one key pi-modes reads.
Slash commands
| Item | Defined in | Documented in | Tier |
|---|---|---|---|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
Tools
| Item | Defined in | Documented in | Tier |
|---|---|---|---|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
pi’s own, re-registered by |
upstream |
|
|
pi’s own, re-registered by |
upstream |
|
|
pi’s own, re-registered by |
upstream |
|
|
pi’s own, re-registered by |
upstream |
|
|
pi’s own, re-registered by |
upstream |
|
|
pi’s own, re-registered by |
upstream |
|
|
pi’s own, re-registered sequential by |
upstream |
|
|
pi’s own, re-registered by |
upstream |
Environment variables
Every variable a shipped source reads. A row ending in * is a family
read through one template.
| Item | Defined in | Documented in | Tier |
|---|---|---|---|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
this page |
stable |
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
the same two: the token’s other name |
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
pi’s own: the agent dir |
pi’s docs |
upstream |
|
read only to find where pi-web-access keeps |
upstream |
|
|
|
upstream |
|
|
pi’s own: no downloads ( |
pi’s docs |
upstream |
|
set by pi for its bash; forwarded to a remote by |
internal |
|
|
set by pi; forwarded by |
internal |
|
|
set by pi; forwarded by |
internal |
|
|
set by pi; forwarded by |
internal |
|
|
|
internal |
|
|
|
internal |
|
|
|
this page |
internal |
|
|
internal |
|
|
|
internal |
|
|
|
this page |
internal |
|
|
internal |
|
|
|
this page |
internal |
|
|
this page |
internal |
|
|
this page |
internal |
|
|
this page |
internal |
|
|
this page |
internal |
|
the home directory, where the platform gives it so |
this page |
internal |
|
|
internal |
|
|
extended and read where pi’s own bin dir is placed |
this page |
internal |
|
|
this page |
internal |
Bus channels
pi’s event bus, pi.events: one per extension runtime, synchronous.
| Item | Defined in | Documented in | Tier |
|---|---|---|---|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
stable |
|
|
|
this page |
internal |
|
|
internal |
|
|
|
this page |
internal |
|
|
this page |
upstream |
|
|
this page |
upstream |
|
|
this page |
upstream |
Wires
| Item | Defined in | Documented in | Tier |
|---|---|---|---|
|
|
stable |
|
|
|
stable |
|
|
|
upstream |
A change to a wire frame that a peer on the previous version does not read bumps the constant; the row above and the constant’s comment record each version.
Package exports
Only @gadhs/pi is published (#836). Its exports map exposes
./bus-rules.json (stable, pinned by pivot-msg) and ./package.json,
and its pi.extensions list the built shims of the workspace extensions
below and of the three vendored upstream extensions.
The ten sibling packages are private to the workspace (private: true)
and move in lockstep with @gadhs/pi’s version. Siblings import from one
another only inside the workspace, checked by `tsc, and every exported
.ts target carries the internal-export notice in its header comment
(checked by validate).
| Item | Defined in | Documented in | Tier |
|---|---|---|---|
|
|
stable: |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
|
|
|
internal: private workspace package (bundled into |
Records
What pi and these packages write for a person to read back. They are named so a reader of a session file or a log knows what wrote a line, not as a promise, and they are not checked: they change with every feature. All internal.
- Session entries
-
gadhs-recap(the turn recap),gadhs-adjudication(a non-allow decision’s trace),gadhs-subagent(a helper’s trace),gadhs-pi-modes(the mode a session was in),gadhs-monitor-record,gadhs-question-record,gadhs-time-posted; and the message typesgadhs-detach-hint,gadhs-poll-hint,gadhs-job,gadhs-monitor,gadhs-monitor-lost,gadhs-msg-wake,gadhs-msg-notice,gadhs-question-renumbered,gadhs-repeat-warning,gadhs-yield-reminder. - The review log
-
the
gadhs_*recordsnode tools/task.mjs verdictsreads, for examplegadhs_mode_rule.verdict,gadhs_mode_judge.verdict,gadhs_mode_registry.verdict,gadhs_pending.answered. - The diagnostics stream
-
the
debugLogevent names (session.start,run.settled,tool.ran,git_guard.,pi_remote.and the rest);/diagreads them.