PiSharp.Codemode
1.6.0.1
dotnet add package PiSharp.Codemode --version 1.6.0.1
NuGet\Install-Package PiSharp.Codemode -Version 1.6.0.1
<PackageReference Include="PiSharp.Codemode" Version="1.6.0.1" />
<PackageVersion Include="PiSharp.Codemode" Version="1.6.0.1" />
<PackageReference Include="PiSharp.Codemode" />
paket add PiSharp.Codemode --version 1.6.0.1
#r "nuget: PiSharp.Codemode, 1.6.0.1"
#:package PiSharp.Codemode@1.6.0.1
#addin nuget:?package=PiSharp.Codemode&version=1.6.0.1
#tool nuget:?package=PiSharp.Codemode&version=1.6.0.1
PiSharp
PiSharp 1.6.0.1 (release candidate; latest published release: 1.6.0) targets Pi v1.6.0 and Pi Durable 1.6.0. The 1.6.0.1 release notes cover PiSharp.Extensions.AI, PiSharp.Templates, DiagnosticsTelemetry, Tier-1 [Experimental] graduation (decision 0017), Durable 1.6.0 end-to-end signal and workflow wiring, JsonlStorage byte-offset indexing, ChordStore SQLite group commit, four-transport retry classification (decision 0016), and the CLI packaging diet. The 1.6.0 release notes cover the Pi v1.6.0 sync. Source validation, package qualification and publication evidence are recorded separately.
The 1.6.0.1 package set contains 29 libraries plus the CLI tool and PiSharp.Templates (31 packages; 1.6.0 published 28 libraries plus the CLI = 29 packages), adding PiSharp.Extensions.AI and PiSharp.Templates alongside the experimental PiSharp.Chord, PiSharp.Chord.Hosting, PiSharp.Durable.Store, PiSharp.Env.Protocol and PiSharp.Env libraries introduced in 1.5.0.1. See package admission for dependencies, opt-in diagnostics and the external package-consumer gate. Native daemon ZIPs from the earlier 1.5.0.1 release retain their own release assets and qualification records; they are separate from the 1.6.0.x NuGet packages. Windows PTY creation remains explicitly unsupported; live provider accounts, real SSH hosts and physical macOS key behavior retain separate qualification boundaries.
PiSharp is a native .NET 10 / C# port of the Pi coding agent, pinned to commit faac585884ae2c013a6b1400f3e9e77f10b34bac. The accepted source validation, source applicability map and decision 0015 record scope, breaking changes and limitations. The earlier 1.5.2 release remains on Pi v1.5.2, with its accepted source validation and decision 0014; the 1.5.0.1 release remains on Pi v1.5.0, and its historical applicability and the Parity page retain their evidence. A fourth version number marks a C#-only patch.
Install the published CLI with dotnet tool install -g PiSharp.Cli --version 1.6.0 (or 1.6.0.1 once published) and run pisharp as you would run pi. It takes Pi's command line and reads Pi's files in ~/.pi/agent and .pi: settings, credentials, models, MCP servers, context files, skills, prompt templates, themes, extensions and sessions. It provides Pi v1.6.0 chat APIs and provider catalogs, the built-in tools (with images), codemode and tool_search, interactive mode and slash commands, and print, JSON and RPC modes, subject to the documented compatibility differences. Native C# extensions load from the same folders. PiSharp 1.6.0.x installs the pinned Pi 1.6.0 packages for TypeScript extensions under the reviewed runtime attribution policy. The historical 1.5.0 release notes retain that release's package inventory and limitations.
pisharp durable and the PiSharp.Durable, PiSharp.Durable.Tools and PiSharp.Durable.Sqlite packages ship as experimental: a port of Pi's durable agent harness whose sessions survive a crash, following pi-durable v1.6.0. The command, its session format and the libraries' API may change in any release, and PiSharp 1.2.0.x can't continue a session that 1.5.0 has opened; see the durable guide. PiSharp.Telemetry, new in 1.5.0, is experimental too: a port of Pi's telemetry contract (plus an opt-in DiagnosticsTelemetry ActivitySource/Meter bridge in 1.6.0.1) that records only what a host asks for and sends nothing. PiSharp's own additions from 1.2.0.2 include the experimental media library and tools, service tiers (--tier, /tier; graduated to stable in 1.6.0.1 per decision 0017), questions and plan mode in pisharp durable, and pisharp durable serve, which runs a durable device.
PiSharp.CustomAgents, with PiSharp.CustomAgents.JavaScript and PiSharp.CustomAgents.Scripting, is an experimental library on that harness, packaged from 1.2.0.2:
- custom agents in C#, with tools written in C#, JavaScript, C# scripts or plugin DLLs, which can change while the agents run;
- a ready-made
web_searchtool over Brave Search, Tavily, Firecrawl, or the hosted search of OpenAI, Anthropic, xAI or OpenRouter, and X (Twitter) search through xAI; - workflows of typed actions over one shared Data object: code, model calls with structured output, or agent runs;
- subagents that message the orchestrator and each other.
Runs resume after a crash. Decision 0012 describes the design.
Two samples run on scripted models or a real provider:
- CustomAgents.Examples runs the library's features one by one.
- CustomAgents.Research is a research team: a lead agent splits a topic between researcher subagents, which search X and the web in parallel, and merges their findings into one Markdown report.
Documentation is at pisharp.ai. The full-parity work is tracked in full-parity-v1.1.0.md and full-parity-progress.json, the Pi 1.2.0 sync in decision 0006 and the Pi 1.5.0 sync in decision 0013.
Explore 62 runnable agent samples: practical workflows, fixture demos, live model integration, and automated model/pricing and NuGet vulnerability maintainers. Each sample includes inputs, documentation, and focused verification.
Native validation tooling
Use the .NET SDK version pinned in global.json. The retained native test runner consumes separately prepared, exactly pinned source and build receipts through SourceManifest, SourceManifestSha256, PermittedBuildReceipt, and PermittedBuildReceiptSha256. It validates and runs those existing products; it does not restore, rebuild, or publish them. The preparation tool separately requires an explicit source manifest, runtime allocation, and finite execution budget.
These historical preparation and recapture tools intentionally fail closed when their exact inputs are unavailable. Private qualification receipts are not transferable authority for this public checkout. The export includes source and portable fixture integrity checks, but does not claim that this public tree or the complete native gate was executed. A direct SDK project build is a separate operation and has not been certified by export metadata checks. See public snapshot provenance for the source basis, derivative fixture rules, and bounded historical results.
Provider fixtures distinguish authored contract cases from captured observations. Path-normalized public derivatives are labeled as such; they must not be treated as original raw wire evidence or whole-provider equivalence.
Design
- A native C# core that runs without Node.js.
- Native C# extensions through a dedicated extension SDK.
- A Node.js bridge for Pi's TypeScript extensions; Node.js is only needed when an extension uses it.
Read the architecture and implementation strategy and the planning index for the phases.
Explicit session imports and exports
The CLI accepts explicit source and new destination paths. session migrate converts supported legacy records using an explicit v1 ID plan; session copy --format native-exact preserves valid current source bytes; --format current-jsonl emits current records with transformation receipts. --format native-archive-exact preserves a complete future or damaged source as inert archival data. Existing destinations are never overwritten. See the command contract for complete arguments and the P4-05 milestone for qualification status.
Upstream baseline and attribution
The canonical upstream is earendil-works/pi. The current release baseline is v1.6.0, commit faac585884ae2c013a6b1400f3e9e77f10b34bac, in the target lock. The published 1.5.2 release retains its v1.5.2 pin, commit b4afdddf44e059c67ccf5097e5317d913521b470, in the preserved lock, and the 1.5.0.1 release its v1.5.0 pin in its preserved lock; planning started from v0.99.1, commit d86654abb8862e201933517d6f1fce9f88dd117f.
Upstream Pi is MIT-licensed. Its license at the planning baseline identifies Copyright (c) 2025 Mario Zechner. Public upstream contracts and behavior inform this implementation; applicable attribution is retained in third-party notices. No private project code or context is used.
PiSharp is an independent project; no upstream endorsement is claimed.
Contributing
Planning feedback and documentation improvements are welcome. Read CONTRIBUTING.md before proposing changes.
License
PiSharp's original contributions are available under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Jint (= 4.16.3)
- PiSharp.Contracts (= 1.6.0.1)
- PiSharp.Extensions.Abstractions (= 1.6.0.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on PiSharp.Codemode:
| Package | Downloads |
|---|---|
|
PiSharp.Durable.Tools
EXPERIMENTAL. Execution environment, coding tools, tool_search and code mode for PiSharp.Durable. The API may change in any release; opt in by suppressing PISHARP_DURABLE001. |
|
|
PiSharp.CustomAgents.JavaScript
EXPERIMENTAL. JavaScript tools and workflow actions for PiSharp.CustomAgents, in PiSharp.Codemode's Jint sandbox, with durable code mode for scripts that call tools. The API may change in any release; opt in by suppressing PISHARP_AGENTS001 and PISHARP_DURABLE001. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.0.1 | 44 | 11/23/2026 |
| 1.6.0 | 57 | 11/23/2026 |
| 1.5.2 | 110 | 11/12/2026 |
| 1.5.0.1 | 108 | 11/9/2026 |
| 1.5.0 | 113 | 11/6/2026 |
| 1.2.0.2 | 125 | 11/2/2026 |
| 1.2.0.1 | 113 | 10/17/2026 |
| 1.2.0 | 101 | 10/16/2026 |
| 1.1.0.7 | 100 | 10/15/2026 |
| 1.1.0.6 | 102 | 10/11/2026 |
| 1.1.0.5 | 103 | 10/10/2026 |
| 1.1.0.3 | 95 | 10/10/2026 |
| 1.1.0.2 | 93 | 10/10/2026 |