wp-studio 1.7.10 → 1.7.11
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.
- package/dist/cli/{_events-BcapW3eh.mjs → _events-B8xQ_baD.mjs} +4 -5
- package/dist/cli/appdata-D-luHxJU.mjs +19 -0
- package/dist/cli/{certificate-manager-SVYcCL_i.mjs → certificate-manager-v-yNLDFJ.mjs} +134 -15
- package/dist/cli/{delete-D1924O3o.mjs → delete-BG-E-HsW.mjs} +3 -3
- package/dist/cli/{helpers-oQuItT8n.mjs → helpers-CIAgfdq8.mjs} +2 -2
- package/dist/cli/{index-4lan3TI_.mjs → index-Bej4fL6n.mjs} +31 -4
- package/dist/cli/{index-BjzOJKPi.mjs → index-Dhun0W1n.mjs} +90 -52
- package/dist/cli/{index-DRQnCQvM.mjs → index-ul3DeWvy.mjs} +1308 -1109
- package/dist/cli/{list-DOFyyV1f.mjs → list-ck0oK4vb.mjs} +3 -3
- package/dist/cli/{login-BtPZeZ4G.mjs → login-Dz63Zdfn.mjs} +3 -3
- package/dist/cli/{logout-Cr631QzG.mjs → logout-CLUKQeZh.mjs} +2 -3
- package/dist/cli/main.mjs +2 -2
- package/dist/cli/{paths-CqXGLB7R.mjs → paths-D7DniT1Q.mjs} +7 -6
- package/dist/cli/plugin/skills/rank-me-up/SKILL.md +166 -0
- package/dist/cli/plugin/skills/site-spec/SKILL.md +4 -0
- package/dist/cli/process-manager-daemon.mjs +29 -5
- package/dist/cli/{process-manager-ipc-BisO0qtU.mjs → process-manager-ipc-GCdebuBH.mjs} +4 -1
- package/dist/cli/proxy-daemon.mjs +1 -1
- package/dist/cli/{prune-pm-logs-COryxqeo.mjs → prune-pm-logs-Dm_Bwi7l.mjs} +1 -1
- package/dist/cli/{resume-BwDwdJtq.mjs → resume-BSIOJnyM.mjs} +4 -15
- package/dist/cli/{rewrite-wp-cli-post-content-2zlfFnKT.mjs → rewrite-wp-cli-post-content-Beo5_Ojo.mjs} +32 -531
- package/dist/cli/{set-D5eeqHbp.mjs → set-CtDZnARG.mjs} +2 -3
- package/dist/cli/{set-DYnzUz_G.mjs → set-PJvs-Yw5.mjs} +4 -5
- package/dist/cli/{status-DNvMZBqD.mjs → status-DU07aAtD.mjs} +2 -2
- package/dist/cli/well-known-paths-QcSJNi_l.mjs +95 -0
- package/dist/cli/wordpress-server-child.mjs +5 -3
- package/dist/cli/{wp-DD2-QiiP.mjs → wp-_X-h-yuW.mjs} +2 -2
- package/dist/cli/wp-files/latest/available-site-translations.json +1 -1
- package/dist/cli/wp-files/sqlite-database-integration/admin-page.php +1 -2
- package/dist/cli/wp-files/sqlite-database-integration/constants.php +0 -5
- package/dist/cli/wp-files/sqlite-database-integration/load.php +1 -1
- package/dist/cli/wp-files/sqlite-database-integration/readme.txt +6 -3
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/database/sqlite/class-wp-pdo-mysql-on-sqlite.php +22 -3
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/database/version.php +1 -1
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php +41 -89
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/db.php +2 -24
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/install-functions.php +7 -16
- package/package.json +2 -1
- package/dist/cli/well-known-paths-BYA1Bw5o.mjs +0 -214
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-lexer.php +0 -2575
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-pdo-user-defined-functions.php +0 -899
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-query-rewriter.php +0 -343
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-token.php +0 -327
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php +0 -4543
- package/dist/cli/wp-files/sqlite-database-integration/wp-includes/sqlite/php-polyfills.php +0 -68
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { l as listAiSessions, g as getAiSessionsRootDirectory } from "./paths-
|
|
1
|
+
import { l as listAiSessions, g as getAiSessionsRootDirectory } from "./paths-D7DniT1Q.mjs";
|
|
2
2
|
import { __ } from "@wordpress/i18n";
|
|
3
|
-
import { d as displaySessionsCompact } from "./helpers-
|
|
4
|
-
import { L as LoggerError,
|
|
3
|
+
import { d as displaySessionsCompact } from "./helpers-CIAgfdq8.mjs";
|
|
4
|
+
import { L as LoggerError, c as Logger } from "./certificate-manager-v-yNLDFJ.mjs";
|
|
5
5
|
const logger = new Logger();
|
|
6
6
|
async function runCommand(format) {
|
|
7
7
|
const sessions = await listAiSessions(getAiSessionsRootDirectory());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { input } from "@inquirer/prompts";
|
|
2
|
-
import {
|
|
3
|
-
import { A as AUTH_EVENTS } from "./certificate-manager-
|
|
4
|
-
import { r as readAuthToken, A as AuthCommandLoggerAction, p as getAppLocale, o as openBrowser, g as getUserInfo, u as updateSharedConfig, q as emitCliEvent } from "./index-
|
|
2
|
+
import { s as PROTOCOL_PREFIX, t as CLIENT_ID, u as DEFAULT_TOKEN_LIFETIME_MS } from "./well-known-paths-QcSJNi_l.mjs";
|
|
3
|
+
import { c as Logger, L as LoggerError, A as AUTH_EVENTS } from "./certificate-manager-v-yNLDFJ.mjs";
|
|
4
|
+
import { r as readAuthToken, A as AuthCommandLoggerAction, p as getAppLocale, o as openBrowser, g as getUserInfo, u as updateSharedConfig, q as emitCliEvent } from "./index-ul3DeWvy.mjs";
|
|
5
5
|
import { __, sprintf } from "@wordpress/i18n";
|
|
6
6
|
const SCOPES = "global";
|
|
7
7
|
const REDIRECT_URI = `${PROTOCOL_PREFIX}://auth`;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { A as AUTH_EVENTS } from "./certificate-manager-
|
|
2
|
-
import { A as AuthCommandLoggerAction, r as readAuthToken, s as revokeAuthToken, u as updateSharedConfig, q as emitCliEvent } from "./index-
|
|
1
|
+
import { c as Logger, L as LoggerError, A as AUTH_EVENTS } from "./certificate-manager-v-yNLDFJ.mjs";
|
|
2
|
+
import { A as AuthCommandLoggerAction, r as readAuthToken, s as revokeAuthToken, u as updateSharedConfig, q as emitCliEvent } from "./index-ul3DeWvy.mjs";
|
|
3
3
|
import { __ } from "@wordpress/i18n";
|
|
4
|
-
import { d as Logger, L as LoggerError } from "./well-known-paths-BYA1Bw5o.mjs";
|
|
5
4
|
async function runCommand() {
|
|
6
5
|
const logger = new Logger();
|
|
7
6
|
logger.reportStart(AuthCommandLoggerAction.LOGOUT, __("Logging out…"));
|
package/dist/cli/main.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "node:path";
|
|
3
|
-
import "./index-
|
|
3
|
+
import "./index-ul3DeWvy.mjs";
|
|
4
4
|
import "@wordpress/i18n";
|
|
5
5
|
import "semver";
|
|
6
6
|
import "yargs";
|
|
7
|
-
import "./certificate-manager-
|
|
7
|
+
import "./certificate-manager-v-yNLDFJ.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "crypto";
|
|
2
2
|
import fs from "fs/promises";
|
|
3
3
|
import path__default from "path";
|
|
4
|
-
import {
|
|
4
|
+
import { g as getAppdataDirectory } from "./appdata-D-luHxJU.mjs";
|
|
5
5
|
const SESSION_FILE_EXTENSION = ".jsonl";
|
|
6
6
|
const SESSION_ID_REGEX = /\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b/i;
|
|
7
7
|
function buildAiSessionFileName(startedAt, sessionId) {
|
|
@@ -35,6 +35,7 @@ async function readAiSessionSummaryFromEvents(filePath, events) {
|
|
|
35
35
|
let ownerSiteName;
|
|
36
36
|
let selectedSiteName;
|
|
37
37
|
let activeEnvironment = "local";
|
|
38
|
+
let lastSelectedWpcomSiteId;
|
|
38
39
|
let endReason;
|
|
39
40
|
let eventCount = 0;
|
|
40
41
|
for (const event of events) {
|
|
@@ -51,14 +52,13 @@ async function readAiSessionSummaryFromEvents(filePath, events) {
|
|
|
51
52
|
}
|
|
52
53
|
if (event.type === "site.selected") {
|
|
53
54
|
selectedSiteName = event.siteName;
|
|
54
|
-
|
|
55
|
+
const isLive = event.remote === true;
|
|
56
|
+
activeEnvironment = isLive ? "live" : "local";
|
|
57
|
+
lastSelectedWpcomSiteId = isLive ? event.wpcomSiteId : void 0;
|
|
58
|
+
if (ownerSitePath === void 0 && !isLive) {
|
|
55
59
|
ownerSitePath = event.sitePath;
|
|
56
60
|
ownerSiteName = event.siteName;
|
|
57
61
|
}
|
|
58
|
-
activeEnvironment = event.remote === true ? "live" : "local";
|
|
59
|
-
}
|
|
60
|
-
if (event.type === "environment.selected") {
|
|
61
|
-
activeEnvironment = event.environment;
|
|
62
62
|
}
|
|
63
63
|
if (event.type === "user.message" && event.source === "prompt" && !firstPrompt) {
|
|
64
64
|
firstPrompt = event.text;
|
|
@@ -85,6 +85,7 @@ async function readAiSessionSummaryFromEvents(filePath, events) {
|
|
|
85
85
|
ownerSiteName,
|
|
86
86
|
selectedSiteName,
|
|
87
87
|
activeEnvironment,
|
|
88
|
+
lastSelectedWpcomSiteId,
|
|
88
89
|
endReason,
|
|
89
90
|
eventCount
|
|
90
91
|
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rank-me-up
|
|
3
|
+
description: Run an on-page SEO audit on a WordPress site and get actionable recommendations to improve search visibility.
|
|
4
|
+
user-invokable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SEO Audit
|
|
8
|
+
|
|
9
|
+
Run an on-page SEO audit on a WordPress site to surface missing meta tags, broken heading structure, alt-text gaps, missing structured data, and indexing issues — then provide concrete, ordered fixes.
|
|
10
|
+
|
|
11
|
+
## How to Run
|
|
12
|
+
|
|
13
|
+
1. Determine which site to audit. If the user hasn't specified, ask them or use the site from the current context.
|
|
14
|
+
2. Ensure the site is running (use `site_start` if needed).
|
|
15
|
+
3. Call `rank_me_up` with the site name and path (defaults to `/`).
|
|
16
|
+
4. **Inspect the SEO toolchain already on the site** (mandatory before suggesting plugin installs — see "Check Active Plugins First" below).
|
|
17
|
+
5. Analyze the results using the interpretation guide.
|
|
18
|
+
6. Present a prioritized list of fixes — most impactful first — with the specific change to make, routed through whatever plugin is already active.
|
|
19
|
+
|
|
20
|
+
## Check Active Plugins First
|
|
21
|
+
|
|
22
|
+
The audit only sees rendered HTML — it can't tell *why* a tag is missing. Before recommending an install, find out what's already wired up. Skipping this step leads to dumb suggestions like "install Jetpack" when Jetpack is already active and just needs a module enabled.
|
|
23
|
+
|
|
24
|
+
**Step 1 — list active plugins:**
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
wp_cli: plugin list --status=active --field=name
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Look for known SEO providers:
|
|
31
|
+
|
|
32
|
+
| Slug | Plugin |
|
|
33
|
+
|------|--------|
|
|
34
|
+
| `jetpack` | Jetpack (preferred — see below) |
|
|
35
|
+
| `wordpress-seo` | Yoast SEO |
|
|
36
|
+
| `seo-by-rank-math` | Rank Math |
|
|
37
|
+
| `all-in-one-seo-pack` | All in One SEO |
|
|
38
|
+
| `wp-seopress` | SEOPress |
|
|
39
|
+
| `the-seo-framework` | The SEO Framework |
|
|
40
|
+
|
|
41
|
+
**Step 2 — if Jetpack is active, list its enabled modules** (Jetpack is modular; SEO features live in the `seo-tools` module and don't run unless that specific module is on):
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
wp_cli: jetpack module list
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then map the audit findings:
|
|
48
|
+
|
|
49
|
+
- **Jetpack active + `seo-tools` module active** → don't install anything. Tell the user the issue is in *configuration* (e.g. empty default title format, missing per-post meta description). Point them at **Jetpack → Settings → Traffic → SEO Tools** in `wp-admin`.
|
|
50
|
+
- **Jetpack active + `seo-tools` module inactive** → enable the module instead of installing a new plugin:
|
|
51
|
+
```
|
|
52
|
+
wp_cli: jetpack module activate seo-tools
|
|
53
|
+
```
|
|
54
|
+
Then re-run `rank_me_up` to confirm the tags appear.
|
|
55
|
+
- **Another SEO plugin active** → don't recommend installing Jetpack on top of it (two SEO plugins fight over the same `<head>` tags). Surface the *settings page* for the active plugin instead — e.g. for Yoast: **SEO → Search Appearance**; for Rank Math: **Rank Math → Titles & Meta**.
|
|
56
|
+
- **No SEO plugin active** → recommend installing Jetpack. See "Recommended SEO Plugin" below.
|
|
57
|
+
|
|
58
|
+
**Also worth checking for non-plugin fixes:**
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
wp_cli: option get blog_public
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If it returns `0`, the site has "Discourage search engines" enabled — no plugin can override that. Fix with `wp option update blog_public 1`.
|
|
65
|
+
|
|
66
|
+
## Interpreting Results
|
|
67
|
+
|
|
68
|
+
### Title and Meta Description
|
|
69
|
+
|
|
70
|
+
| Field | Recommended | Issue |
|
|
71
|
+
|-------|-------------|-------|
|
|
72
|
+
| `title` | 30–60 chars | Missing, too short (< 20), or too long (> 70) gets truncated in SERPs |
|
|
73
|
+
| `description` | 70–160 chars | Missing means Google generates one for you, often poorly |
|
|
74
|
+
| `canonical` | Self-referencing absolute URL | Missing causes duplicate-content risk |
|
|
75
|
+
| `robots` | absent or `index, follow` | `noindex` blocks the page from search results |
|
|
76
|
+
| `viewport` | `width=device-width, initial-scale=1` | Missing breaks mobile usability ranking signal |
|
|
77
|
+
| `htmlLang` | Present (e.g. `en-US`) | Missing hurts internationalization and accessibility |
|
|
78
|
+
|
|
79
|
+
### Headings
|
|
80
|
+
|
|
81
|
+
- **Exactly 1 `h1`** per page. 0 means the page has no clear topic; 2+ dilutes the signal.
|
|
82
|
+
- **No skipped levels** (e.g. `h2 → h4`). Skipped levels confuse screen readers and weaken topical structure.
|
|
83
|
+
- The `h1` text should reflect the page's primary search intent.
|
|
84
|
+
|
|
85
|
+
### Images
|
|
86
|
+
|
|
87
|
+
- Every `img` should have an `alt` attribute. `withoutAlt` (missing entirely) is worse than `emptyAlt` (decorative).
|
|
88
|
+
- Empty `alt=""` is correct only for decorative images. Content images need descriptive alt text.
|
|
89
|
+
- Use the `missingAltUrls` list to identify which images to fix first.
|
|
90
|
+
|
|
91
|
+
### Social Tags (Open Graph & Twitter)
|
|
92
|
+
|
|
93
|
+
Required for good link previews on social media:
|
|
94
|
+
- **Open Graph**: `og:title`, `og:description`, `og:image`, `og:url`, `og:type`
|
|
95
|
+
- **Twitter**: `twitter:card` (typically `summary_large_image`), `twitter:title`, `twitter:description`, `twitter:image`
|
|
96
|
+
|
|
97
|
+
Missing OG tags don't hurt rankings directly but kill click-through from social shares.
|
|
98
|
+
|
|
99
|
+
### Structured Data (JSON-LD)
|
|
100
|
+
|
|
101
|
+
- `jsonLdCount: 0` means no rich-result eligibility. Add at minimum `WebSite` and `Organization` schema sitewide.
|
|
102
|
+
- For specific page types, add `Article`, `Product`, `FAQPage`, `BreadcrumbList`, `LocalBusiness`, etc.
|
|
103
|
+
|
|
104
|
+
### Resources
|
|
105
|
+
|
|
106
|
+
- **`robotsTxtFound: false`**: WordPress generates a virtual one — usually fine, but a real file gives more control.
|
|
107
|
+
- **`robotsTxtBlocksAll: true`**: CRITICAL — `Disallow: /` blocks all crawlers. Often a forgotten "Discourage search engines" setting in WP Admin → Reading.
|
|
108
|
+
- **`sitemapFound: false`**: Install Jetpack and enable its SEO Tools module, or enable WP core's sitemap (`/wp-sitemap.xml`). See "Recommended SEO Plugin" below.
|
|
109
|
+
|
|
110
|
+
### Links
|
|
111
|
+
|
|
112
|
+
- Many `emptyText` links (anchors with no visible text, no `aria-label`, no alt-text image) hurt accessibility and SEO. Use the `emptyTextHrefs` list to fix.
|
|
113
|
+
- A high `nofollow` count on internal links wastes link equity — internal links should generally be `dofollow`.
|
|
114
|
+
|
|
115
|
+
## Recommended SEO Plugin: Jetpack
|
|
116
|
+
|
|
117
|
+
**Only reach this section after running the "Check Active Plugins First" step and confirming no SEO plugin is active.**
|
|
118
|
+
|
|
119
|
+
**Install, activate, and enable the SEO module:**
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
wp_cli: plugin install jetpack --activate
|
|
123
|
+
wp_cli: jetpack module activate seo-tools
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**What the `seo-tools` module covers:**
|
|
127
|
+
|
|
128
|
+
- Custom page title formats (front page, post, page, archive, etc.)
|
|
129
|
+
- Custom meta descriptions per post/page
|
|
130
|
+
- Open Graph + Twitter Card tags (including `twitter:card`, `og:image`, etc.)
|
|
131
|
+
- XML sitemap at `/sitemap.xml` (auto-submitted to WordPress.com)
|
|
132
|
+
- Verification tag support (Google, Bing, Pinterest, Yandex)
|
|
133
|
+
|
|
134
|
+
**Plan note:** Jetpack's *Advanced SEO Tools* (custom title formats + per-post meta descriptions) require a paid Jetpack plan (Security, Complete, or the standalone Jetpack SEO add-on). Basic social meta + sitemap are available on the free tier. If the user is on free and needs per-post meta descriptions, tell them upfront so they can decide whether to upgrade.
|
|
135
|
+
|
|
136
|
+
**Fallback:** Only suggest alternatives (Yoast SEO, Rank Math, AIOSEO) if the user explicitly rejects Jetpack.
|
|
137
|
+
|
|
138
|
+
## Common WordPress Recommendations
|
|
139
|
+
|
|
140
|
+
Based on the metrics, suggest specific actions. Route each fix through whatever you discovered in "Check Active Plugins First" — don't recommend installing a plugin that's already active or telling the user to configure one that isn't.
|
|
141
|
+
|
|
142
|
+
- **Missing title/description**:
|
|
143
|
+
- *Jetpack active + `seo-tools` on*: user needs to *configure* title formats at **Jetpack → Settings → Traffic → SEO Tools** and fill meta descriptions per-post (paid plan required for per-post).
|
|
144
|
+
- *Jetpack active + `seo-tools` off*: `wp_cli: jetpack module activate seo-tools`.
|
|
145
|
+
- *Another SEO plugin active*: point to its title/meta settings page — don't install Jetpack on top.
|
|
146
|
+
- *Nothing active*: install Jetpack (see "Recommended SEO Plugin" above).
|
|
147
|
+
- *Plugins refused*: set the title via theme `wp_title()` and description via a `<meta>` tag in `header.php` / a block theme template part.
|
|
148
|
+
- **Missing canonical**: Any SEO plugin (Jetpack, Yoast, Rank Math, AIOSEO) handles this automatically once active. Without one, add `<link rel="canonical" href="<?php echo esc_url( wp_get_canonical_url() ); ?>">` to the head.
|
|
149
|
+
- **Wrong h1 count**: Audit the active block theme's templates — site title is often wrapped in an `h1` on every page. Use `h2` for the site title on inner pages, reserve `h1` for the page title. This is a theme fix; no SEO plugin will correct it.
|
|
150
|
+
- **Missing alt text**: Content fix, not a plugin fix. Run `wp media list --field=ID` and update via `wp post update`, or train content editors to add alt text on upload.
|
|
151
|
+
- **Missing OG / Twitter tags**:
|
|
152
|
+
- *Jetpack active + `seo-tools` on*: OG/Twitter should already be emitted — re-check the HTML; if still missing, inspect for a conflicting plugin stripping them.
|
|
153
|
+
- *Jetpack active + `seo-tools` off*: enable the module.
|
|
154
|
+
- *Another SEO plugin active*: enable its social-meta feature (Yoast: **SEO → Social**; Rank Math: **Rank Math → Titles & Meta → Social Meta**).
|
|
155
|
+
- *Nothing active*: install Jetpack, or hook into `wp_head` to emit tags manually.
|
|
156
|
+
- **No JSON-LD**: WordPress core does not emit JSON-LD. Jetpack adds basic `WebSite` / `SearchAction` markup when the `seo-tools` module is on. For richer schemas (Product, FAQ, Article, BreadcrumbList) use a dedicated schema plugin (e.g. Yoast/Rank Math handle these) or custom `wp_head` output.
|
|
157
|
+
- **`robotsTxtBlocksAll: true`**: Run `wp_cli: option update blog_public 1` to undo the "Discourage search engines" setting. No plugin can override this.
|
|
158
|
+
- **Missing sitemap**: Verify `blog_public` is `1` first. Then check `/wp-sitemap.xml` (WP core since 5.5) or `/sitemap.xml` (Jetpack). If Jetpack is active but the sitemap is missing, enable the `seo-tools` module. If another SEO plugin is active, it may have disabled core sitemaps in favor of its own — check its sitemap settings.
|
|
159
|
+
- **Missing viewport meta**: Theme bug — add `<meta name="viewport" content="width=device-width, initial-scale=1">` in the `<head>`. Not a plugin concern.
|
|
160
|
+
- **Missing `htmlLang`**: Theme should output `<html <?php language_attributes(); ?>>` (block themes do this automatically; classic themes need it added). Not a plugin concern.
|
|
161
|
+
|
|
162
|
+
## Important Notes
|
|
163
|
+
|
|
164
|
+
- This is an **on-page audit of a local dev site**. It does NOT measure rankings, traffic, backlinks, or Core Web Vitals (use `need_for_speed` for performance signals).
|
|
165
|
+
- Search engines won't crawl a local Studio site, so this is purely about preparing the site for production. Pair fixes with `site_push` or `preview_create` to validate on a public URL.
|
|
166
|
+
- For content-quality SEO (keyword targeting, search intent, content depth), the audit can only flag structural gaps — not whether the content is *good*. Combine with editorial review.
|
|
@@ -27,6 +27,10 @@ After the user provides the name, use AskUserQuestion for:
|
|
|
27
27
|
|
|
28
28
|
Call `site_create` with the provided name and use the layout preference to guide all subsequent design decisions.
|
|
29
29
|
|
|
30
|
+
## After site_create returns
|
|
31
|
+
|
|
32
|
+
The turn immediately after `site_create` is the biggest source of perceived hangs. Acknowledge the site in ≤2 lines of prose, then make your next tool call a small one — `site_info`, or a single ≤50-line first `Write`. Do NOT scaffold the theme, chain multiple Writes, or write a long design-plan essay in this turn. Grow the build across many small turns (see the "Working cadence" section of the system prompt).
|
|
33
|
+
|
|
30
34
|
## When to Skip Discovery
|
|
31
35
|
|
|
32
36
|
Do NOT ask questions if:
|
|
@@ -3,9 +3,11 @@ import fs__default, { createWriteStream } from "fs";
|
|
|
3
3
|
import path__default from "path";
|
|
4
4
|
import readline from "readline";
|
|
5
5
|
import semver from "semver";
|
|
6
|
-
import { g as SocketServer, b as PROCESS_MANAGER_CONTROL_SOCKET_PATH, a as PROCESS_MANAGER_EVENTS_SOCKET_PATH, h as PROCESS_MANAGER_LOGS_DIR, i as daemonRequestSchema, f as daemonEventSchema } from "./process-manager-ipc-
|
|
6
|
+
import { g as SocketServer, b as PROCESS_MANAGER_CONTROL_SOCKET_PATH, a as PROCESS_MANAGER_EVENTS_SOCKET_PATH, h as PROCESS_MANAGER_LOGS_DIR, i as daemonRequestSchema, f as daemonEventSchema } from "./process-manager-ipc-GCdebuBH.mjs";
|
|
7
7
|
const SOCKET_TIMEOUT_MS = 2500;
|
|
8
8
|
const STOP_TIMEOUT_MS = 5e3;
|
|
9
|
+
const STDERR_BUFFER_MAX_LINES = 100;
|
|
10
|
+
const STDERR_BUFFER_MAX_BYTES = 16 * 1024;
|
|
9
11
|
function formatLogDateTag(date) {
|
|
10
12
|
const year = date.getFullYear();
|
|
11
13
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
@@ -168,11 +170,15 @@ class ProcessManagerDaemon {
|
|
|
168
170
|
stderrLogPath,
|
|
169
171
|
stdoutStream,
|
|
170
172
|
stderrStream,
|
|
173
|
+
stderrBuffer: [],
|
|
174
|
+
stderrBufferBytes: 0,
|
|
171
175
|
settled: false
|
|
172
176
|
};
|
|
173
177
|
this.managedProcesses.set(pmId, managedProcess);
|
|
174
178
|
this.pipeOutputWithTimestamp(child.stdout, stdoutStream);
|
|
175
|
-
this.pipeOutputWithTimestamp(child.stderr, stderrStream)
|
|
179
|
+
this.pipeOutputWithTimestamp(child.stderr, stderrStream, (line) => {
|
|
180
|
+
this.recordStderrLine(managedProcess, line);
|
|
181
|
+
});
|
|
176
182
|
child.on("message", (raw) => {
|
|
177
183
|
const event = daemonEventSchema.safeParse({
|
|
178
184
|
type: "process-message",
|
|
@@ -186,7 +192,11 @@ class ProcessManagerDaemon {
|
|
|
186
192
|
}
|
|
187
193
|
});
|
|
188
194
|
child.on("error", (error) => {
|
|
189
|
-
|
|
195
|
+
const errorText = error.stack ?? error.message;
|
|
196
|
+
writeTimestampedLines(stderrStream, errorText);
|
|
197
|
+
for (const line of errorText.split("\n")) {
|
|
198
|
+
this.recordStderrLine(managedProcess, line);
|
|
199
|
+
}
|
|
190
200
|
void this.handleProcessExit(managedProcess);
|
|
191
201
|
});
|
|
192
202
|
child.on("exit", () => {
|
|
@@ -233,11 +243,13 @@ class ProcessManagerDaemon {
|
|
|
233
243
|
this.managedProcesses.delete(managedProcess.pmId);
|
|
234
244
|
managedProcess.stdoutStream.end();
|
|
235
245
|
managedProcess.stderrStream.end();
|
|
246
|
+
const stderrTail = managedProcess.stderrBuffer.join("\n");
|
|
236
247
|
await this.broadcastEvent({
|
|
237
248
|
type: "process-event",
|
|
238
249
|
payload: {
|
|
239
250
|
process: { name: managedProcess.name, pm_id: managedProcess.pmId },
|
|
240
|
-
event: "exit"
|
|
251
|
+
event: "exit",
|
|
252
|
+
...stderrTail ? { stderrTail } : {}
|
|
241
253
|
}
|
|
242
254
|
});
|
|
243
255
|
}
|
|
@@ -262,7 +274,7 @@ class ProcessManagerDaemon {
|
|
|
262
274
|
async broadcastEvent(event) {
|
|
263
275
|
this.eventsServer.broadcast(event);
|
|
264
276
|
}
|
|
265
|
-
pipeOutputWithTimestamp(input, target) {
|
|
277
|
+
pipeOutputWithTimestamp(input, target, onLine) {
|
|
266
278
|
if (!input) {
|
|
267
279
|
return;
|
|
268
280
|
}
|
|
@@ -272,8 +284,20 @@ class ProcessManagerDaemon {
|
|
|
272
284
|
});
|
|
273
285
|
lineReader.on("line", (line) => {
|
|
274
286
|
void target.write(timestampLogLine(line));
|
|
287
|
+
onLine?.(line);
|
|
275
288
|
});
|
|
276
289
|
}
|
|
290
|
+
recordStderrLine(managedProcess, line) {
|
|
291
|
+
managedProcess.stderrBuffer.push(line);
|
|
292
|
+
managedProcess.stderrBufferBytes += Buffer.byteLength(line, "utf8") + 1;
|
|
293
|
+
while (managedProcess.stderrBuffer.length > STDERR_BUFFER_MAX_LINES || managedProcess.stderrBufferBytes > STDERR_BUFFER_MAX_BYTES) {
|
|
294
|
+
const dropped = managedProcess.stderrBuffer.shift();
|
|
295
|
+
if (dropped === void 0) {
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
managedProcess.stderrBufferBytes -= Buffer.byteLength(dropped, "utf8") + 1;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
277
301
|
toProcessDescription(managedProcess) {
|
|
278
302
|
if (managedProcess.status === "stopped") {
|
|
279
303
|
return {
|
|
@@ -417,7 +417,10 @@ const processEventSchema = z.object({
|
|
|
417
417
|
z.literal("online"),
|
|
418
418
|
z.literal("restart"),
|
|
419
419
|
z.literal("stop")
|
|
420
|
-
])
|
|
420
|
+
]),
|
|
421
|
+
// Tail of the child's stderr captured during this invocation. Only populated on `exit`
|
|
422
|
+
// events; undefined for any other event.
|
|
423
|
+
stderrTail: z.string().optional()
|
|
421
424
|
});
|
|
422
425
|
const daemonProcessEventSchema = z.object({
|
|
423
426
|
type: z.literal("process-event"),
|
|
@@ -3,7 +3,7 @@ import require$$1 from "https";
|
|
|
3
3
|
import { createSecureContext } from "node:tls";
|
|
4
4
|
import { domainToASCII } from "node:url";
|
|
5
5
|
import httpProxy from "http-proxy";
|
|
6
|
-
import {
|
|
6
|
+
import { n as generateSiteCertificate, r as readCliConfig } from "./certificate-manager-v-yNLDFJ.mjs";
|
|
7
7
|
let httpProxyServer = null;
|
|
8
8
|
let httpsProxyServer = null;
|
|
9
9
|
let isHttpProxyRunning = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs__default from "fs";
|
|
2
2
|
import path__default from "path";
|
|
3
|
-
import { h as PROCESS_MANAGER_LOGS_DIR } from "./process-manager-ipc-
|
|
3
|
+
import { h as PROCESS_MANAGER_LOGS_DIR } from "./process-manager-ipc-GCdebuBH.mjs";
|
|
4
4
|
const RETENTION_DAYS = 14;
|
|
5
5
|
const MS_PER_DAY = 24 * 60 * 60 * 1e3;
|
|
6
6
|
const LOG_FILE_REGEX = /^.+-(?:out|error)(?:-\d{8})?\.log$/;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as listAiSessions, g as getAiSessionsRootDirectory, a as loadAiSession } from "./paths-
|
|
1
|
+
import { l as listAiSessions, g as getAiSessionsRootDirectory, a as loadAiSession } from "./paths-D7DniT1Q.mjs";
|
|
2
2
|
import { __ } from "@wordpress/i18n";
|
|
3
|
-
import { J as JsonAdapter, A as AiChatUI, r as runCommand$1 } from "./index-
|
|
4
|
-
import { c as chooseSessionForAction } from "./helpers-
|
|
5
|
-
import { L as LoggerError,
|
|
3
|
+
import { J as JsonAdapter, A as AiChatUI, r as runCommand$1 } from "./index-Dhun0W1n.mjs";
|
|
4
|
+
import { c as chooseSessionForAction } from "./helpers-CIAgfdq8.mjs";
|
|
5
|
+
import { L as LoggerError, c as Logger } from "./certificate-manager-v-yNLDFJ.mjs";
|
|
6
6
|
function resolveActiveSiteFromEvents(events) {
|
|
7
7
|
let state;
|
|
8
8
|
for (const event of events) {
|
|
@@ -14,17 +14,6 @@ function resolveActiveSiteFromEvents(events) {
|
|
|
14
14
|
url: event.url,
|
|
15
15
|
wpcomSiteId: event.wpcomSiteId
|
|
16
16
|
};
|
|
17
|
-
continue;
|
|
18
|
-
}
|
|
19
|
-
if (event.type === "environment.selected" && state) {
|
|
20
|
-
const isLive = event.environment === "live";
|
|
21
|
-
state = {
|
|
22
|
-
name: state.name,
|
|
23
|
-
path: state.path,
|
|
24
|
-
remote: isLive,
|
|
25
|
-
url: isLive ? event.url : void 0,
|
|
26
|
-
wpcomSiteId: isLive ? event.wpcomSiteId : void 0
|
|
27
|
-
};
|
|
28
17
|
}
|
|
29
18
|
}
|
|
30
19
|
return state;
|