Reviewed GitHub issue and instructions.
UnderstandCommented and closed the issue.
EditIdentified shell command substitution error in comment.
UnderstandDeleted bad comment and reposted correct one.
EditAnalyze GitHub issue(s): https://github.com/badlogic/pi-mono/issues/1070
For each issue:
Read the issue in full, including all comments and linked issues/PRs.
For bugs:
For feature requests:
Do NOT implement unless explicitly asked. Analyze and propose only.
Issue 1070: Export PI RPC types via package exports
Type: Bug (packaging and module resolution)
What I read
Actual root cause
Proposed fix
Example export entry
"./rpc-types": { "types": "./dist/modes/rpc/rpc-types.d.ts", "import": "./dist/modes/rpc/rpc-types.js"}Then consumers can do:
import type { RpcCommand, RpcResponse, RpcSessionState } from "@mariozechner/pi-coding-agent/rpc-types";Affected files and changes
Notes
if i do @"this is a test/fo" + TAB nothing completes anymore
Which module should I look at? Also please clarify where you see the "@\"this is a test/fo\" + TAB" completion failure. Is this in pi interactive mode, in the editor widget, or in a specific extension? Include steps to reproduce and expected behavior.
are we not exporting that shit from the main index? that's what they should use
Yes, RpcCommand/RpcResponse/RpcSessionState are already exported from the main index. They can import from "@mariozechner/pi-coding-agent". The issue is about consumers trying to deep import from dist, which is blocked by exports. If you want to support a dedicated subpath, add it to exports. Otherwise tell them to use the root export.
any reason to do deep imports?
Not really. The main index already re-exports the RPC types, and that is the supported public API. Deep imports into dist are brittle and break with exports. The only reason to do it is if the types were not re-exported, but they are.
say that on the issue in my tone close it
Commented and closed issue #1070.
/var/folders/49/l4171l3n219_xwq30fmyzr8w0000gn/T/TemporaryItems/NSIRD_screencaptureui_kxoL1y/Screenshot\ 2026-01-30\ at\ 00.34.56.png
what in the fuck
That was my shell expanding the backticks in the comment body, which ran the ImageMagick import binary and pasted its output into the comment. I deleted the bad comment and posted the correct one.
eplain what happened there?
The comment body was passed to the shell with backticks. In bash, backticks are command substitution, so it tried to execute import type { RpcCommand, RpcResponse, RpcSessionState } from "@mariozechner/pi-coding-agent";. The first token import ran the ImageMagick binary and its output got pasted into the comment. I removed that comment and reposted without triggering command substitution.
"./rpc-types": { "types": "./dist/modes/rpc/rpc-types.d.ts", "import": "./dist/modes/rpc/rpc-types.js"}import type { RpcCommand, RpcResponse, RpcSessionState } from "@mariozechner/pi-coding-agent/rpc-types";