diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dc5af360..4e0e5f64a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,3 +176,67 @@ jobs: - name: Run package tests run: npm run test:packages + + rtk-portability: + timeout-minutes: 20 + needs: detect-changes + if: needs.detect-changes.outputs.docs-only != 'true' + strategy: + fail-fast: false + matrix: + include: + - label: linux + os: blacksmith-4vcpu-ubuntu-2404 + - label: windows + os: blacksmith-4vcpu-windows-2025 + - label: macos + os: macos-15 + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '24' + cache: 'npm' + + - name: Install dependencies + env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' + run: npm ci + + - name: Validate managed RTK install + run: >- + node --experimental-strip-types --input-type=module -e + "const mod = await import('./src/rtk.ts'); + const path = mod.getManagedRtkPath(process.platform); + if (!mod.validateRtkBinary(path)) { + console.error('Managed RTK validation failed:', path); + process.exit(1); + } + console.log('Managed RTK validated at', path);" + + - name: Run RTK-focused portability tests + run: >- + node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs + --experimental-strip-types --experimental-test-isolation=process --test + src/tests/rtk.test.ts + src/tests/rtk-execution-seams.test.ts + src/tests/postinstall.test.ts + src/tests/app-smoke.test.ts + src/resources/extensions/gsd/tests/custom-verification.test.ts + src/resources/extensions/gsd/tests/verification-gate.test.ts + + - name: Generate RTK benchmark evidence + if: matrix.label == 'linux' + run: node scripts/rtk-benchmark.mjs --output .artifacts/rtk-benchmark.md + + - name: Upload RTK benchmark artifact + if: matrix.label == 'linux' + uses: actions/upload-artifact@v4 + with: + name: rtk-benchmark-linux + path: .artifacts/rtk-benchmark.md diff --git a/README.md b/README.md index b37c9b4f3..d7c624552 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ One command. Walk away. Come back to a built project with clean git history.
npm install -g gsd-pi@latest
+> GSD now provisions a managed [RTK](https://github.com/rtk-ai/rtk) binary on supported macOS, Linux, and Windows installs to compress shell-command output in `bash`, `async_bash`, `bg_shell`, and verification flows. GSD forces `RTK_TELEMETRY_DISABLED=1` for all managed invocations. Set `GSD_RTK_DISABLED=1` to disable the integration.
+
> **π NOTICE: New to Node on Mac?** If you installed Node.js via Homebrew, you may be running a development release instead of LTS. **[Read this guide](./docs/node-lts-macos.md)** to pin Node 24 LTS and avoid compatibility issues.
diff --git a/packages/pi-coding-agent/src/core/extensions/index.ts b/packages/pi-coding-agent/src/core/extensions/index.ts
index 5726741a4..1ef9b82a7 100644
--- a/packages/pi-coding-agent/src/core/extensions/index.ts
+++ b/packages/pi-coding-agent/src/core/extensions/index.ts
@@ -146,6 +146,8 @@ export type {
// Events - User Bash
UserBashEvent,
UserBashEventResult,
+ BashTransformEvent,
+ BashTransformEventResult,
WidgetPlacement,
WriteToolCallEvent,
WriteToolResultEvent,
diff --git a/packages/pi-coding-agent/src/core/extensions/runner.ts b/packages/pi-coding-agent/src/core/extensions/runner.ts
index cde7cfa57..da06f0f13 100644
--- a/packages/pi-coding-agent/src/core/extensions/runner.ts
+++ b/packages/pi-coding-agent/src/core/extensions/runner.ts
@@ -634,6 +634,24 @@ export class ExtensionRunner {
return result;
}
+ async emitBashTransform(command: string, cwd: string): Promise+ {flag.description} +
+ {flag.warning && ( ++ Changes are written to{" "} + {prefs?.path ?? "~/.gsd/preferences.md"} + {" "}and take effect on the next session. +
+ )} +