# Third-party notices

## OpenAI Codex

The `apply_patch` grammar, parser behavior, line matching, mutation semantics, result formatting, diff rendering, standalone image-generation behavior, standalone web-search behavior, tool schemas, and compatibility scenarios in this package are adapted for Pi from the public OpenAI Codex implementation.

OpenAI Codex, Copyright 2025 OpenAI

OpenAI Codex is licensed under the Apache License, Version 2.0. A copy is included at [`LICENSES/Apache-2.0.txt`](LICENSES/Apache-2.0.txt).

Source: <https://github.com/openai/codex>

## Pi AI

Selected OpenAI Codex transport, Responses stream processing, and history serialization methods are adapted from `@earendil-works/pi-ai`. History serialization follows the Pi 0.86.0 transcript contract.

Pi AI, Copyright (c) 2025 Mario Zechner

Pi AI is licensed under the MIT License. A copy is included at [`LICENSES/pi-ai-MIT.txt`](LICENSES/pi-ai-MIT.txt).

Source: <https://github.com/earendil-works/pi/tree/main/packages/ai>

## node-pty

Persistent `exec_command` sessions use `node-pty`.

node-pty contributors, Copyright (c) 2012-2015 Christopher Jeffrey,
Copyright (c) 2016 Daniel Imms, and Copyright (c) 2018-present Microsoft
Corporation

node-pty is licensed under the MIT License. A copy is included at
[`LICENSES/node-pty-MIT.txt`](LICENSES/node-pty-MIT.txt).

Source: <https://github.com/microsoft/node-pty>

## tree-sitter and tree-sitter-bash

Shell-text `apply_patch` detection uses the Tree-sitter runtime and Bash
grammar.

tree-sitter, Copyright (c) 2014 maxbrunsfeld

tree-sitter-bash, Copyright (c) 2017 Max Brunsfeld

Both packages are licensed under the MIT License. Copies are included at
[`LICENSES/tree-sitter-MIT.txt`](LICENSES/tree-sitter-MIT.txt).

Sources:

- <https://github.com/tree-sitter/node-tree-sitter>
- <https://github.com/tree-sitter/tree-sitter-bash>
