@pageai/ralph-loop 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,25 @@
1
1
  # **Critical Steering Work**
2
2
 
3
- Go to the source code directory and install dependencies.
3
+ ## Ensure the sandbox is running correctly
4
4
 
5
- Check that Playwright is installed, then start the dev server and take a screenshot.
6
- Save the screenshot to the .agent/screenshots directory.
5
+ This sandbox runs emulated aarch64 Linux. Apply as needed:
6
+
7
+ - **Node >= 22 (if required):** Install nvm, persist to `/etc/sandbox-persistent.sh` with `unset NPM_CONFIG_PREFIX` before
8
+ the nvm source line. Never add bash_completion to that file.
9
+
10
+ - **Native binary SIGILL crashes (npm):** `npm install` may produce broken arm64 binaries (esbuild, rollup, tailwindcss oxide, unrs resolver, etc). Fix: `npm pack <pkg>@<same-version>`, extract tarball, copy the binary over the installed one.
11
+
12
+ - **If using TanStack Start:** Check that `src/integrations/tanstack-query/root-provider.tsx` has a default export
13
+ wrapping children with `QueryClientProvider`. The starter template ships without it, causing a 500 on load.
14
+
15
+ - **If using any React-based project:** Install all shadcn/ui components: run npx shadcn@latest add --all in the project root (where components.json exists). Accept all defaults when prompted.
16
+
17
+ ## Main Tasks
18
+
19
+ Install dependencies, then install Playwright system dependencies: `sudo npx playwright install-deps chromium 2>&1`
20
+
21
+ Start the dev server and take a screenshot. Save it to the `.agent/screenshots` directory.
22
+
23
+ ---
24
+
25
+ After you complete this work, exit with message `Steering complete`.
package/.mcp.json CHANGED
@@ -6,7 +6,10 @@
6
6
  "args": [
7
7
  "-y",
8
8
  "@playwright/mcp@latest",
9
- "--headless"
9
+ "--headless",
10
+ "--no-sandbox",
11
+ "--executable-path",
12
+ "/home/agent/.cache/ms-playwright/chromium-1208/chrome-linux/chrome"
10
13
  ],
11
14
  "env": {}
12
15
  },
package/README.md CHANGED
@@ -41,7 +41,7 @@ This is an implementation that actually works, containing a hackable script so y
41
41
  I recommend using a CLI to bootstrap your project with the necessary tools and dependencies, e.g.:
42
42
 
43
43
  ```bash
44
- npx @tanstack/cli create lib --add-ons shadcn,eslint,form,tanstack-query --no-git
44
+ npx @tanstack/cli create lib --add-ons shadcn,eslint,form,tanstack-query --no-git --no-install
45
45
  ```
46
46
 
47
47
  > If you must start from a blank slate, which is not recommended, see [Starting from scratch](#starting-from-scratch). You can also go for a more barebone start by running `npx create-vite@latest src --template react-ts`
package/bin/cli.js CHANGED
@@ -12,6 +12,7 @@ const { execSync } = require('child_process');
12
12
  const display = require('./lib/display');
13
13
  const { copyFile, copyDir, mergeDir, exists, ensureDir } = require('./lib/copy');
14
14
  const { isGitRepo, initGitRepo } = require('./lib/git');
15
+ const { isShadcnProject, installAllComponents } = require('./lib/shadcn');
15
16
 
16
17
  const PACKAGE_ROOT = path.resolve(__dirname, '..');
17
18
  const TARGET_DIR = process.cwd();
@@ -343,6 +344,16 @@ async function main() {
343
344
  }
344
345
  }
345
346
 
347
+ // Install all shadcn/ui components if project uses shadcn
348
+ const appDirPath = path.join(TARGET_DIR, appDir);
349
+ if (isShadcnProject(appDirPath)) {
350
+ try {
351
+ installAllComponents(appDirPath);
352
+ } catch {
353
+ // Non-critical — continue setup even if shadcn install fails
354
+ }
355
+ }
356
+
346
357
  // Success message
347
358
  display.showComplete();
348
359
  clack.outro('Happy looping!');
@@ -0,0 +1,44 @@
1
+ /**
2
+ * shadcn/ui module for Ralph Loop CLI
3
+ * Detects shadcn config and installs all components
4
+ */
5
+
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+ const { execSync } = require('child_process');
9
+ const { exists } = require('./copy');
10
+
11
+ const SHADCN_SCHEMA = 'https://ui.shadcn.com/schema.json';
12
+
13
+ /**
14
+ * Checks if a directory has a shadcn components.json with the expected schema
15
+ * @param {string} dir - Directory path to check
16
+ * @returns {boolean}
17
+ */
18
+ function isShadcnProject(dir) {
19
+ const configPath = path.join(dir, 'components.json');
20
+ if (!exists(configPath)) return false;
21
+
22
+ try {
23
+ const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
24
+ return config.$schema === SHADCN_SCHEMA;
25
+ } catch {
26
+ return false;
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Installs all shadcn/ui components in the given directory
32
+ * @param {string} dir - Directory path to run the install in
33
+ */
34
+ function installAllComponents(dir) {
35
+ execSync('npx shadcn@latest add --all --yes 2>&1', {
36
+ cwd: dir,
37
+ stdio: 'pipe',
38
+ });
39
+ }
40
+
41
+ module.exports = {
42
+ isShadcnProject,
43
+ installAllComponents,
44
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageai/ralph-loop",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },