diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c28c784..59520bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,3 +40,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.AUTO_PR_TOKEN }} NPM_CONFIG_PROVENANCE: 'true' run: npx semantic-release + + - name: Notify homebrew tap + run: | + VERSION=$(node -p "require('./package.json').version") + curl -s --fail -X POST \ + -H "Authorization: token ${{ secrets.AUTO_PR_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/node9-ai/homebrew-node9/dispatches \ + -d "$(jq -n --arg v "$VERSION" '{event_type:"new-release",client_payload:{version:$v}}')" diff --git a/README.md b/README.md index aa6371b..9ebb62a 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,11 @@ Security posture is resolved using a strict 5-tier waterfall: ## šŸš€ Quick Start ```bash +# Recommended — via Homebrew (macOS / Linux) +brew tap node9-ai/node9 +brew install node9 + +# Or via npm npm install -g @node9/proxy # 1. Setup protection for your favorite agent @@ -316,6 +321,12 @@ A corporate policy has locked this action. You must click the "Approve" button i --- +## šŸ”— Related + +- [node9-python](https://github.com/node9-ai/node9-python) — Python SDK for Node9 + +--- + ## šŸ¢ Enterprise & Compliance Node9 Pro provides **Governance Locking**, **SAML/SSO**, and **VPC Deployment**. diff --git a/src/cli.ts b/src/cli.ts index 5cb3f32..cb9e160 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1306,15 +1306,26 @@ program program .command('undo') .description( - 'Revert files to a pre-AI snapshot. Shows a diff and asks for confirmation before reverting. Use --steps N to go back N actions.' + 'Revert files to a pre-AI snapshot. Shows a diff and asks for confirmation before reverting. Use --steps N to go back N actions, --all to include snapshots from other directories.' ) .option('--steps ', 'Number of snapshots to go back (default: 1)', '1') - .action(async (options: { steps: string }) => { + .option('--all', 'Show snapshots from all directories, not just the current one') + .action(async (options: { steps: string; all?: boolean }) => { const steps = Math.max(1, parseInt(options.steps, 10) || 1); - const history = getSnapshotHistory(); + const allHistory = getSnapshotHistory(); + const history = options.all ? allHistory : allHistory.filter((s) => s.cwd === process.cwd()); if (history.length === 0) { - console.log(chalk.yellow('\nā„¹ļø No undo snapshots found.\n')); + if (!options.all && allHistory.length > 0) { + console.log( + chalk.yellow( + `\nā„¹ļø No snapshots found for the current directory (${process.cwd()}).\n` + + ` Run ${chalk.cyan('node9 undo --all')} to see snapshots from all projects.\n` + ) + ); + } else { + console.log(chalk.yellow('\nā„¹ļø No undo snapshots found.\n')); + } return; }