Repository navigation
PiG 0.9.0
PiG 0.9.0 is a Pi-catch-up, fix, extension-SDK and MCP OAuth release. It follows Pi 1.7.0 (fb0fe823), advancing from the prior Pi pin shipped in PiG 0.8.0. It follows PiG 0.8.0, with 24 additions, 9 changes and 54 recorded fixes in CHANGELOG.md (54 bug-fix ledger entries with fixedIn: 0.9.0: 49 PiG defects and 5 Pi fixes ported). Install it with go install github.com/MichaelKinsy/PiG/cmd/pig@latest or npm i -g @pi-in-go/pig, or download the pig, pig-standard or pig-acp archives attached to this release.
PiG is a faithful Go implementation of Pi, the reference implementation. Pi's behavior is the contract, and every place PiG differs is a numbered divergence. PiG is not an official Pi project, and Pi's maintainers have not endorsed it. It was created by Michael Kinsy and originally developed at Hewlett Packard Enterprise.
This is a minor release because it catches up to Pi 1.7.0 (including pi-image, Chord Protocol v2, --agent-dir, and removal of install telemetry), adds Microsoft Entra multi-tenant MCP OAuth discovery (D662/D663), adds opt-in Tier B derivative-harness hooks (D91, D664, D665), and removes deprecated chord/sync epochs, durable nested park structs, and Chord v1 variants. Read "Upgrading" before you update Go code or rebuild extensions.
Thanks
This release includes fixes driven by your reports:
- @jihongwei reported #575, where resuming a JSONL session with large custom entries eagerly retained raw lines and decoded payloads on the heap and could OOM.
- @zochari reported #588, where native-SDK custom editors that delegate to the host editor dropped the
/slash-command autocomplete dropdown. - @xinaps-dev reported #567, where a live
kit.Loaderreturned from a custom entry, message or tool view renderer stayed frozen on its first frame inside a caching transcript container. - @edersohe reported #260 (model list parity; the final bundled catalog alignment and dynamic Radius classifier/image catalogs close out the remaining gap).
Fixes for reported issues
- #575. Opening a file-backed v3 session now indexes
customandbranch_summaryentries lazily by file offset, length, hash and base metadata instead of eagerly decoding and retaining both the raw JSONL line and decoded payload on the heap. Standard-shaped oversizedcustomlines (>4 MiB) stream in constant memory without buffering the whole line, and redundant raw JSON copies are stripped from canonical resident entries. - #588. Native-SDK custom editors (
ctx.SetEditorComponentin Go, Python, Rust and Common Lisp) that delegate to the host editor now flush and refresh slash-command autocomplete when typing/and complete onTab, instead of dropping queued flushes underEditor.forwards(). - #567. A live
kit.Loaderreturned from anEntryViewRenderer,MessageViewRendererorToolViewRenderernow animates inside a caching transcript container instead of staying frozen on its first frame. - 0.8.0 deferred fixes (both resolved). RPC extension UI reply ordering now waits off the read loop until the originating command batch's replies are written (matching Pi's microtask ordering without deadlocking), and extension-installed editor slash completion races are resolved.
- Safety and resilience. Evicted history chunk reloads validate each record length before narrowing to
uint32(preventing oversized-record wraparound). Temp-file open/write/close failures in bash tool output,!shell execution, external editor launch and TUI crash logging no longer crash or drop output, and surfaceFullOutputError/full_output_erroracross sessions, RPC and all four SDKs.
Pi 1.7.0 catch-up
PiG 0.9.0 pins Pi 1.7.0 (fb0fe823).
- Images, classifiers and providers. Adds the
pi-imageAPI (ai.GenerateImages,PiImageRequest,PiImageResponse) withUsage.ImageOutput/ModelCost.ImageOutputpricing across Go, Python, Rust and Common Lisp SDKs. Adds thepi-decisionclassifier API (ClassifyPiDecision) andClassifierResult.ResponseID. Adds dynamic Radius gatewayimageanddecisioncatalogs,xhighthinking on Gemini 4 Hydrogen and Neon, GitHub Copilotgpt-6-luna-decisionsandreasoning_opaquereplay with prompt-cache preservation across effort/tool changes, and Bedrock Kimi K3 / GLM 5.3 updates. - CLI, terminal and Program Resume (OSC 7577). Adds
--agent-dir <dir>(applied before subcommands and carried into resume commands). Adds Program Resume via OSC 7577: in terminals settingOSC7577_TOKEN, interactive mode reports the session resume command (including restriction and resource flags) and stripsOSC7577_TOKENfrom child environments at startup. Adds per-notice visibility settings (notices.cacheMisses,notices.cacheWarming,notices.compactionCosts,notices.reasoningDrops) under Notices in/settings,BlockedKind(permission,question,auth) on OSC 7501 dialogs, and removes install telemetry reporting (/api/report-install,enableInstallTelemetry,PI_TELEMETRY/PIG_TELEMETRY). - Chord Protocol v2 and Durable. Ports Chord Protocol v2 (
ProtocolVersion = 2) withgrantablestate,admit/allow/deny,Bound.Granted,Self.Follow,TuiScope.Live,Plugins.Apply/ApplyWith, commit-indexed shared live reads, andFileSystemSyncRemote. Moveschord/nextnode/plugins,chord/nextnode/workersanddurableto tagged unions (RolloutHost,PluginSource,SeriesResult,Compiled,ToolPark,FoundSlot,CompactionDecision,SignalState,CommitResult). Upgrades Durable's TinyGo runtime to v0.44.0. - MCP and auth. Exports
mcp.CreateMcpResultSchemaandmcp.ToMcpModelContent. Adds Microsoft Entra ID multi-tenant v2.0 OpenID discovery and RFC 9207 callback tenant-UUID matching (D662) so MCP OAuth sign-in works with Microsoft Work IQ, Fabric and Azure MCP servers, plus--oauth-auth-server-metadata-urland--oauth-scopeonpig mcp add(D663). Storedauth.json!commandfailures now render asstored key did not resolvein/loginwithout synchronous blocking. - Process cleanup.
env/daemonnow tears down every process in a terminal or command session across process groups on shell exit or close (pidfdon Linux,getsidon macOS/Unix), leaving detachedsetsidsessions untouched.
Extension SDKs & Piglets
- Derivative-harness hooks (
D91,D664,D665). Adds opt-in recursive child sessions bounded byDefaultMaxChildSessionDepth = 8, extension MCP resource host calls (ListMcpResources,ListMcpResourceTemplates,ReadMcpResource), and prompt-only token accounting (agent.CalculatePromptTokens,ContextUsageEstimate.PromptTokens). Extends theD91frontend seam with opt-in structured transcript primitives (StructuredTranscriptSession,Toast,AssistantTurn,TurnUsage,FormCard,Env.SubmitForm,Env.Interrupt) and inlineui.formDialog/sdk.Context.FormDialog(with plain-terminal fallback). Adds opt-in tool argument hooks (PrepareArguments,PrepareArgumentsRaw,LenientValidation,IntentField, throttledOnPartialArgspreviews) and Piglet manifest UX defaults (settings,themes,keybindings,ShortcutDecl.{Action,Global}). - Piglet builds and release archives.
pig buildnow raises the mergedgo.modgodirective to the highest version required by any fused member module.pig-acparchives update to@pi-in-go/pigpen-acp0.2.4.
Upgrading
Every breaking change and removal from 0.8.0 is listed below. Run pig extension upgrade to diagnose removed install-telemetry methods (RuleInstallTelemetryRemoved).
- Install telemetry removed.
enableInstallTelemetry,PI_TELEMETRY,PIG_TELEMETRY,PIG_INSTALL_TELEMETRY_URL, andSettingsManager.{Get,Set}EnableInstallTelemetryare removed across Go, Python, Rust and Common Lisp SDKs (Pi v1.7.0). chord/syncwriter epochs removed. Remove any references toStaleEpoch,PutStaleEpoch,UploadResult.Epoch,UploadOptions.Epoch,PutBatchResult.EpochandPutBatchOptions.Epoch(retired upstream).- Chord v1
variantsremoved.variants/useVariantAPIs are replaced by Chord Protocol v2grantable/admit/useLive. - Tagged unions in
chord/nextnodeanddurable.durable.ToolParkSleepanddurable.ToolParkWaitare nowToolParkKindconstants on flatdurable.ToolPark;harness.CompactionDecision.Declineis replaced byKind == CompactionDeclineandSummary string;SubmitInmethods ondurable.ConversationHandle,durable/harnessanddurable/core/driverare renamed toAdmit.RolloutHostKindstring values change to"reloaded"/"failed"and worker reload failures sendFromWorkerReloadFailed. - Deprecations.
showCacheMissNoticesandSettingsManager.{Get,Set}ShowCacheMissNoticesare deprecated in favor ofnotices.*(SettingsManager.GetNotices/SetNotice);coding/mcpext.{CreateMcpResultSchema,ToModelContent}are deprecated in favor ofmcp.{CreateMcpResultSchema,ToMcpModelContent}.
Known differences
Every intentional difference between PiG and Pi is tracked as a numbered divergence record in docs/parity/DIVERGENCES.md (214 files under docs/parity/divergences/) and additive PiG features in docs/additive-features.md. This release adds D662 (Microsoft Entra multi-tenant v2.0 MCP OAuth discovery and RFC 9207 callback matching) and additive records D663, D664 and D665.
Parity inventories at Pi 1.7.0: 1,064 / 1,067 intended-portable monorepo files ported (99.7%; 544 / 545 across the four core packages, 99.8%), 1,060 upstream test files ported (0 partial, 0 pending), and 15,593 / 15,593 semantic interface IDs closed (0 gaps).
Full changelog
See CHANGELOG.md (0.9.0 section).