Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Preserve reference input and output bytes on every platform.
apps/maple-agent/pi-conformance/** -text
38 changes: 32 additions & 6 deletions .github/workflows/agent-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
timeout-minutes: 5
outputs:
agent: ${{ steps.classify.outputs.agent }}
pi_reference: ${{ steps.classify.outputs.pi_reference }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
Expand All @@ -49,30 +50,55 @@ jobs:
HEAD_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
run: |
set -euo pipefail
enable_agent() { echo 'agent=true' >> "$GITHUB_OUTPUT"; }
enable_checks() {
echo 'agent=true' >> "$GITHUB_OUTPUT"
echo 'pi_reference=true' >> "$GITHUB_OUTPUT"
}
case "$GITHUB_EVENT_NAME" in
pull_request) separator='...' ;;
push)
separator='..'
if [[ "$BASE_SHA" =~ ^0+$ ]]; then
enable_agent
enable_checks
exit 0
fi
;;
*) enable_agent; exit 0 ;;
*) enable_checks; exit 0 ;;
esac
if ! git cat-file -e "${BASE_SHA}^{commit}" || ! git cat-file -e "${HEAD_SHA}^{commit}"; then
enable_agent
enable_checks
exit 0
fi
changed_paths="$(mktemp)"
trap 'rm -f "$changed_paths"' EXIT
if ! git diff --no-renames --name-only -z "${BASE_SHA}${separator}${HEAD_SHA}" > "$changed_paths"; then
enable_agent
enable_checks
elif ! python3 scripts/ci/agent_change_detection.py < "$changed_paths" >> "$GITHUB_OUTPUT"; then
enable_agent
enable_checks
fi

pi-reference:
name: Pi reference corpus
needs: changes
if: ${{ always() && !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.pi_reference != 'false') }}
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Install pinned Nix environment
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
with:
github-token: ""

- name: Upstream Pi tests at the pin
run: nix build ./pi-conformance#upstream-tests -L --no-link --no-update-lock-file

- name: Committed corpus equals a fresh recording
run: nix build ./pi-conformance#checks.x86_64-linux.corpus-fresh -L --no-link --no-update-lock-file

desktop:
name: Agent (${{ matrix.os }})
needs: changes
Expand Down
123 changes: 123 additions & 0 deletions apps/maple-agent/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion apps/maple-agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
[workspace]
resolver = "2"
members = ["crates/maple-agent", "crates/maple-billing", "app"]
members = [
"crates/maple-agent",
"crates/maple-billing",
"crates/pi-ai",
"crates/pi-agent-core",
"crates/pi-coding-agent",
"crates/pi-mcp",
"crates/pi-testkit",
"crates/pi-conformance",
"app",
]

[workspace.package]
edition = "2024"
Expand Down
21 changes: 21 additions & 0 deletions apps/maple-agent/crates/PI-LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Mario Zechner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading