Upgrade @oh-my-pi SDK packages to 18.16.0 #219
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck#219
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
omp-deck embeds the omp SDK (
@oh-my-pi/pi-coding-agent,@oh-my-pi/pi-ai,@oh-my-pi/pi-tui), currently pinned exactly to18.10.1. The newest release on npm is18.16.0for all three. Upgrade all three, keep exact pins, and carry the local SDK patch (patches/@oh-my-pi%2Fpi-coding-agent@18.10.1.patch) forward unchanged in intent. Upstream 18.16.0 still lackssystemPromptTemplateforwarding insrc/task/executor.ts, so the patch is still required.Plan
Context
Bump the three SDK packages from 18.10.1 to 18.16.0 with exact pins. Regenerate the pi-coding-agent patch against 18.16.0 with the same changes. Keep typecheck, tests and the server boot green.
Approach
Bump pins. In root
package.json(dependencies:@oh-my-pi/pi-ai,@oh-my-pi/pi-coding-agent,@oh-my-pi/pi-tui) and inapps/server/package.json(the same three keys), change"18.10.1"to"18.16.0". Keep exact versions, with no^.Rebase the patch. Temporarily remove the
patchedDependenciesentry so the install succeeds, then runbun install. Next runbun patch @oh-my-pi/pi-coding-agent@18.16.0and re-apply every hunk of the old patch file to the same paths in the new package:src/prompts/system/orchestrate-notice.md: rule 1 and the "Yielding between in-scope phases" anti-pattern line.src/prompts/system/plan-mode-active.md: the "Ground every claim" paragraph, the "in-scope exploration" wording (2 places), and the<critical>turn-end list adding option 3 plus the "boundary stop is not a failure" sentence.src/prompts/system/plan-mode-tool-decision-reminder.md: the full replacement body shown in the old patch.src/prompts/system/project-prompt.md: the two<critical>bullets.src/sdk.ts: addsystemPromptTemplate: options.systemPromptTemplate,next tocontextFiles,in thecreateAgentSessionScopedtool-session object.src/session/agent-session.ts: removethis.#toolChoiceQueue.pushOnce("required", { label: "plan-mode-decision" });and addwriteToolName: "write",to theplanModeToolDecisionReminderPromptrender args.src/task/executor.ts: addsystemPromptTemplate?: string;(with its doc comment) toExecutorOptionsaftercontextFiles?, and passsystemPromptTemplate: options.systemPromptTemplate,aftercontextFiles: options.contextFiles,in therunSubprocesscreateAgentSession call.src/task/structured-subagent.ts: addsystemPromptTemplate: session.systemPromptTemplate,aftercontextFiles:inbuildExecutorOptions.src/tools/index.ts: addsystemPromptTemplate?: string;(with its doc comment) toToolSessionaftercustomToolPaths?.If upstream has moved or reworded the anchor text, apply the same semantic change at the new location. If upstream already contains a change, skip that hunk. Commit with
bun patch --commit. The result ispatches/@oh-my-pi%2Fpi-coding-agent@18.16.0.patchand apatchedDependencieskey"@oh-my-pi/pi-coding-agent@18.16.0". Delete the old 18.10.1 patch file.Fix compile breaks. Run
bun run typecheck. Fix any SDK API drift inapps/server/src/**(the route layer imports the SDK only throughapps/server/src/bridgeand the tool files), following the 18.16.0 types. Do not add compatibility shims.Lockfile. Commit the updated
bun.lockso the frozen install in theDockerfileand CI succeeds.Verification
bun install --frozen-lockfilein the repo root succeeds with no "lockfile had changes" message and applies the patch without errors.node_modules/@oh-my-pi/pi-coding-agent/package.jsonshows version18.16.0, andgrep -n systemPromptTemplate node_modules/@oh-my-pi/pi-coding-agent/src/task/executor.tsfinds the patched lines.bun run typecheckpasses, andbun testinapps/serverpasses.bun run build && bun run startboots. Open a session in the web UI, enter plan mode and end a turn with plain text: there is no forced tool call, and the reminder text matches the patched version.