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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 50 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@ permissions:

jobs:
test:
name: Node ${{ matrix.node-version }}
name: Node ${{ matrix.node-version }}${{ matrix.label }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
node-version: [22.19.0, 24]
include:
- node-version: 22.19.0
pi-version: locked
label: ""
- node-version: 24
pi-version: locked
label: ""
- node-version: 22.19.0
pi-version: 0.84.3
label: " (Pi 0.84.3)"
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand All @@ -29,8 +38,46 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.14
- name: Install dependencies
- name: Install locked dependencies
if: matrix.pi-version == 'locked'
run: bun install --frozen-lockfile
- name: Pin minimum supported Pi family
if: matrix.pi-version != 'locked'
env:
PI_VERSION: ${{ matrix.pi-version }}
run: |
node --input-type=module -e '
import { readFileSync, writeFileSync } from "node:fs";
const path = "package.json";
const manifest = JSON.parse(readFileSync(path, "utf8"));
const packages = ["agent-core", "ai", "client", "coding-agent", "protocol", "telemetry", "tui"]
.map((name) => `@earendil-works/pi-${name}`);
manifest.overrides = {
...manifest.overrides,
...Object.fromEntries(packages.map((name) => [name, process.env.PI_VERSION])),
};
writeFileSync(path, `${JSON.stringify(manifest, null, 2)}\n`);
'
bun install
git restore package.json
- name: Verify minimum supported Pi family
if: matrix.pi-version != 'locked'
env:
EXPECTED_PI_VERSION: ${{ matrix.pi-version }}
run: |
node --input-type=module -e '
import { execFileSync } from "node:child_process";
const packages = ["agent-core", "ai", "client", "coding-agent", "protocol", "telemetry", "tui"]
.map((name) => `@earendil-works/pi-${name}`);
const output = execFileSync("bun", ["pm", "ls", "--all"], { encoding: "utf8" });
const resolved = [...output.matchAll(/(@earendil-works\/pi-(?:agent-core|ai|client|coding-agent|protocol|telemetry|tui))@(\d+\.\d+\.\d+)/g)]
.map(([, name, version]) => ({ name, version }));
const missing = packages.filter((name) => !resolved.some((entry) => entry.name === name));
const mismatches = resolved.filter((entry) => entry.version !== process.env.EXPECTED_PI_VERSION);
if (missing.length || mismatches.length) {
throw new Error(`Expected the full Pi family at ${process.env.EXPECTED_PI_VERSION}; missing=${JSON.stringify(missing)} mismatches=${JSON.stringify(mismatches)}`);
}
'
- run: bun run check
- run: bun run test
- name: Smoke-test Pi package discovery
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<p align="center">
<a href="https://www.npmjs.com/package/@tt-a1i/openpi"><img alt="npm version" src="https://img.shields.io/npm/v/@tt-a1i/openpi?style=flat-square&color=cb3837"></a>
<a href="https://github.com/openpi-dev/openpi/actions/workflows/ci.yml"><img alt="CI status" src="https://github.com/openpi-dev/openpi/actions/workflows/ci.yml/badge.svg"></a>
<a href="https://github.com/earendil-works/pi-mono"><img alt="Pi 0.84.1+" src="https://img.shields.io/badge/Pi-0.84.1%2B-2f81f7?style=flat-square"></a>
<a href="https://github.com/earendil-works/pi-mono"><img alt="Pi 0.84.3+" src="https://img.shields.io/badge/Pi-0.84.3%2B-2f81f7?style=flat-square"></a>
<img alt="Node.js 22.19+" src="https://img.shields.io/badge/Node.js-22.19%2B-3fb950?style=flat-square&logo=nodedotjs&logoColor=white">
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-3fb950?style=flat-square"></a>
</p>
Expand Down Expand Up @@ -445,7 +445,7 @@ Footer 布局以 `footerLines` 作为唯一持久化格式。旧版 `footerItems

### 安装要求与来源

- Pi `0.84.1` 或更新版本;
- Pi `0.84.3` 或更新版本;
- Node.js `22.19.0` 或更新版本;
- npm 安装:`pi install npm:@tt-a1i/openpi`;
- GitHub 安装:`pi install git:github.com/openpi-dev/openpi`。
Expand Down
36 changes: 11 additions & 25 deletions bun.lock

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

Loading
Loading