feat(harness): integrate pi runtime into desktop app#3469
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
| const oauthEnvironment: Record<string, string> = { | ||
| POSTHOG_OAUTH_CREDENTIALS: JSON.stringify(oauthCredentials), | ||
| }; | ||
| const childEnvironment: Record<string, string> = { | ||
| ...env, | ||
| ...oauthEnvironment, | ||
| }; | ||
|
|
There was a problem hiding this comment.
Child Credentials Diverge After Refresh
The child receives a one-time copy of the desktop access and refresh tokens. If the provider rotates refresh tokens and the parent refreshes first, the long-running child retains the invalidated token and its next refresh fails even though the desktop remains signed in, interrupting the Pi session.
a4f25c4 to
cd593d5
Compare
745cd4b to
b8845b7
Compare
b8845b7 to
9485f63
Compare
cd593d5 to
84dccb9
Compare
84dccb9 to
0e925bf
Compare
9485f63 to
401dd8d
Compare
ed3507d to
3185f38
Compare
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 3 · PR risk: 0/10 |
fc88402 to
32ed95f
Compare
8c9355a to
8af4881
Compare
0e925bf to
3c236f3
Compare
8af4881 to
75ec760
Compare
3c236f3 to
7388b0d
Compare
75ec760 to
dfb6df0
Compare
7388b0d to
1e4cd6d
Compare
dfb6df0 to
98059aa
Compare
tatoalo
left a comment
There was a problem hiding this comment.
can we end up in a situation in which Pi tasks can start a competing ACP session and thus create some problems? If we are starting from the "simple" task view that's fine as well for now I guess
| await this.deps.piRunner.create({ | ||
| taskId: task.id, | ||
| cwd, | ||
| prompt: input.content ?? "", | ||
| model: input.model, |
There was a problem hiding this comment.
I believe we are missing the exec modes here?
Merge activity
|
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
98059aa to
fb86dd5
Compare
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |

This sets up all the wiring needed to run Pi in the desktop app. We use a dummy conversation view, which is replaced by the
ChatThreadin the next PR.it also alters
taskmetadatato store pi session files, for local dev. this is probably a temporary solutionALTER TABLE `task_metadata` ADD `pi_session_file` text;