@lacneu/wix-openclaw 0.4.0 → 0.5.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.
- package/CHANGELOG.md +84 -0
- package/README.md +78 -4
- package/dist/config.js +7 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +131 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/tools/_query.d.ts +1 -1
- package/dist/tools/_query.js +3 -0
- package/dist/tools/_query.js.map +1 -1
- package/dist/tools/accessibility.d.ts +132 -0
- package/dist/tools/accessibility.js +740 -0
- package/dist/tools/accessibility.js.map +1 -0
- package/dist/types.d.ts +5 -1
- package/dist/wix-client.js +10 -0
- package/dist/wix-client.js.map +1 -1
- package/openclaw.plugin.json +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.0] - 2026-08-29
|
|
11
|
+
|
|
12
|
+
Six accessibility tools, off by default behind **their own** switch. The 0.4
|
|
13
|
+
line could correct a site's SEO tags and say nothing about whether the site
|
|
14
|
+
could be used with a screen reader; Wix runs an accessibility scan of its own,
|
|
15
|
+
and this release reads it.
|
|
16
|
+
|
|
17
|
+
Nothing in this family writes to the site, so there are no tokens and no
|
|
18
|
+
refusals here. The discipline moved instead to what an answer is allowed to
|
|
19
|
+
CLAIM — see below.
|
|
20
|
+
|
|
21
|
+
### Added — Accessibility: Wix runs the scan, this reads the result
|
|
22
|
+
|
|
23
|
+
> Developer Preview, and **off by default behind its own switch**,
|
|
24
|
+
> `enableAccessibilityTools`. Nothing in this family writes to the site.
|
|
25
|
+
|
|
26
|
+
Six tools: `wix_a11y_list_page_collections`, `wix_a11y_run_scan`,
|
|
27
|
+
`wix_a11y_get_scan`, `wix_a11y_get_latest_scan`,
|
|
28
|
+
`wix_a11y_list_page_summaries` and `wix_a11y_list_findings`.
|
|
29
|
+
|
|
30
|
+
### The discipline moves, because the danger moved
|
|
31
|
+
|
|
32
|
+
The SEO writes needed tokens because they destroyed the previous value of what
|
|
33
|
+
they wrote. Nothing here destroys anything — so the way this family hurts a user
|
|
34
|
+
is different, and Wix names it: **a page is clear only when it has no findings,
|
|
35
|
+
its page status is completed, and its coverage confirms the relevant checks
|
|
36
|
+
ran**. A page that failed to scan reports zero findings too, because nothing was
|
|
37
|
+
read.
|
|
38
|
+
|
|
39
|
+
So no answer here can be skimmed into a clean one. Page summaries carry `clear`,
|
|
40
|
+
valued `true`, `false` or `"unknown"`, instead of a bare count — and a `true`
|
|
41
|
+
comes with `clearFor`, naming the checks it is true for, because coverage says
|
|
42
|
+
which checks ran, not that the right ones did. The `"unknown"` pages are
|
|
43
|
+
counted for you. A scan reports `resultIsWhole`;
|
|
44
|
+
`PARTIALLY_COMPLETED` never collapses into success, a running scan says its
|
|
45
|
+
numbers are progress rather than a result, and a failed scan refuses to be a
|
|
46
|
+
result at all. An unfiltered empty findings list says that an absent finding is
|
|
47
|
+
not a rule that passed.
|
|
48
|
+
|
|
49
|
+
### `attempt` is what tells a retry apart from a new scan
|
|
50
|
+
|
|
51
|
+
Wix takes a caller-generated idempotency key so a lost response cannot create
|
|
52
|
+
duplicate work, and requires a **new** key for a genuinely new scan — verifying
|
|
53
|
+
a fix is a new scan, not a retry. The key is derived from the site, the target
|
|
54
|
+
and the `attempt` label the caller passes. A random key per call would satisfy
|
|
55
|
+
the schema and make the guarantee inert against a 5-per-minute limit; deriving
|
|
56
|
+
it from the target alone would turn every verification into a retry that hands
|
|
57
|
+
back the stale result.
|
|
58
|
+
|
|
59
|
+
### Recovery paths that would otherwise be unreachable
|
|
60
|
+
|
|
61
|
+
`SCAN_ALREADY_IN_PROGRESS` and `SCAN_STATE_UNKNOWN` carry a scan id the caller
|
|
62
|
+
is meant to poll. Left inside a thrown message, the only move an agent has left
|
|
63
|
+
is to start a duplicate — so those errors return the id and the instruction not
|
|
64
|
+
to. `SCAN_SIZE_LIMIT_EXCEEDED` returns with an explicit ban on describing the
|
|
65
|
+
site as fully scanned.
|
|
66
|
+
|
|
67
|
+
### The SDK view is not the wire view
|
|
68
|
+
|
|
69
|
+
The Wix SDK renames three keys coming back from REST — `id` → `_id`,
|
|
70
|
+
`createdDate` → `_createdDate`, `updatedDate` → `_updatedDate`. This plugin
|
|
71
|
+
speaks REST directly, so the wire says `id`. Every field name here was taken
|
|
72
|
+
from the SDK typings, which made that rename the one place the typings are not
|
|
73
|
+
the contract: reading `_id` returned `undefined` on every real call, so a
|
|
74
|
+
started scan handed back no id and the polling flow had nothing to poll. The
|
|
75
|
+
tests agreed, because the fixtures had been shaped from the same typings.
|
|
76
|
+
|
|
77
|
+
Query encoding came from the same source and had the same shape of trap: Wix's
|
|
78
|
+
serialiser flattens nested objects to dotted keys (`filter.severity`) but emits
|
|
79
|
+
a repeated field as a **repeated key** (`filter.categories=A&filter.categories=B`).
|
|
80
|
+
An indexed `filter.categories.0` is a different parameter, and a filter the API
|
|
81
|
+
ignores returns unfiltered findings that the tool would then label filtered.
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
|
|
85
|
+
- **A raw NUL byte had been written into a source file.** It was a legitimate
|
|
86
|
+
HMAC separator written the wrong way, and its effect was not on the running
|
|
87
|
+
code: `grep` treats a file containing NUL as binary and answers **nothing**,
|
|
88
|
+
silently, so searches reported symbols absent that were present. Written as
|
|
89
|
+
an escape now, and a guard rejects any raw control character in `src/` and
|
|
90
|
+
`test/` — the same class as a stray U+2028 that once landed in a test regex.
|
|
91
|
+
- Stale counts in the SEO opt-in comments in `src/config.ts` and the manifest
|
|
92
|
+
test, still saying four tools write irreversibly when eleven do.
|
|
93
|
+
|
|
10
94
|
## [0.4.0] - 2026-08-29
|
|
11
95
|
|
|
12
96
|
Ten more `wix_seo_*` tools, still **off by default**, close the other half of
|
package/README.md
CHANGED
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
## Overview
|
|
16
16
|
|
|
17
17
|
`wix-openclaw` is an OpenClaw plugin that lets your agent operate a Wix site
|
|
18
|
-
through the official Wix REST API. It registers
|
|
19
|
-
Wix products (Blog, CMS Data, Forms, Bookings, Contacts, Events, Reviews,
|
|
20
|
-
Multilingual, Sites, Site Media
|
|
21
|
-
turns loose textual briefs into structured markdown artefacts.
|
|
18
|
+
through the official Wix REST API. It registers **50 tools by default** across a
|
|
19
|
+
dozen Wix products (Blog, CMS Data, Forms, Bookings, Contacts, Events, Reviews,
|
|
20
|
+
FAQ, Multilingual, Sites, Site Media), plus a `wix_design_brief` helper that
|
|
21
|
+
turns loose textual briefs into structured markdown artefacts. Two families are
|
|
22
|
+
opt-in and add to that: SEO (`enableSeoTools`, 19 tools) and accessibility
|
|
23
|
+
(`enableAccessibilityTools`, 6 tools) — **75 with both**.
|
|
22
24
|
|
|
23
25
|
Every tool funnels through a single authenticated HTTP client that:
|
|
24
26
|
|
|
@@ -190,6 +192,18 @@ the target site:
|
|
|
190
192
|
each of the eleven writing tools refuses until what it would destroy, be it a
|
|
191
193
|
redirect, a tag or a template, has been named and acknowledged.
|
|
192
194
|
|
|
195
|
+
- [ ] **Manage Accessibility Scans** — **only if you set
|
|
196
|
+
`enableAccessibilityTools: true`**, which registers six tools. None of them
|
|
197
|
+
writes to the site: Wix runs the scan, the plugin reads the result. **The
|
|
198
|
+
scope identifier for this permission is not published in the API reference
|
|
199
|
+
and is NOT recorded here** — the last time this README guessed a Wix
|
|
200
|
+
permission name it invented one that does not exist, so this line stays empty
|
|
201
|
+
until the exact label is read off the Wix permissions page. Note that reading
|
|
202
|
+
page collections or past results does **not** prove the key may start a scan:
|
|
203
|
+
Wix states that starting one needs this permission specifically, and answers
|
|
204
|
+
`403` / `PERMISSION_DENIED` otherwise — which the tools surface as a
|
|
205
|
+
permission problem, never as an empty site.
|
|
206
|
+
|
|
193
207
|
- [ ] **Pricing Plans** — if you sell subscription packages
|
|
194
208
|
- [ ] **Wix Stores** + **Wix eCommerce** — if you sell physical/digital
|
|
195
209
|
products. Without these, the `wix_*` tools that touch e-commerce
|
|
@@ -241,6 +255,7 @@ columns and remove the matching tools from your agent's allow-list.
|
|
|
241
255
|
| `wix_faq_*` | Manage FAQ | FAQ tooling |
|
|
242
256
|
| `wix_multilingual_*` | Multilingual Translation Schema Read | Translation reads |
|
|
243
257
|
| `wix_seo_*` (all nineteen) | Manage SEO (`SCOPE.PROMOTE.MANAGE-SEO`) | SEO audit **and** redirect changes — Wix has no read-only SEO scope, so this one permission covers both |
|
|
258
|
+
| `wix_a11y_*` (all six) | Manage Accessibility Scans (identifier not published — read it off the Wix permissions page) | Starting a scan. Reading collections or stored results does not imply it |
|
|
244
259
|
| `wix_design_brief` | _(none — no API call)_ | Always |
|
|
245
260
|
|
|
246
261
|
### Wix app installation requirements
|
|
@@ -565,6 +580,65 @@ delete it, then create it carrying **every** field over — an omitted field is
|
|
|
565
580
|
filled with its default, not its previous value. To find one, list them all and
|
|
566
581
|
filter client-side.
|
|
567
582
|
|
|
583
|
+
### Accessibility
|
|
584
|
+
|
|
585
|
+
> **Developer Preview, and OFF by default — separately from SEO.** The Wix
|
|
586
|
+
> Accessibility Scans endpoints are in Developer Preview and may change without
|
|
587
|
+
> notice. Nothing here writes to the site, so there is no approval to give and
|
|
588
|
+
> nothing to undo; the switch exists because starting a scan needs its own Wix
|
|
589
|
+
> permission, which the SEO scope does not grant. Set
|
|
590
|
+
> `enableAccessibilityTools: true` to opt in.
|
|
591
|
+
> _Contract read from the public Introduction, Sample Flows and agent Skill
|
|
592
|
+
> pages, and from the published SDK package
|
|
593
|
+
> `@wix/auto_sdk_accessibility_accessibility-scans`, whose own host mapping
|
|
594
|
+
> gives the REST prefix `/accessibility/v1/accessibility-scans` verbatim. The
|
|
595
|
+
> per-method reference pages are listed in the Wix menu but return 404, so no
|
|
596
|
+
> field name here was taken from a rendered page — verified 2026-08-29._
|
|
597
|
+
|
|
598
|
+
Wix runs the scan; these tools start it and read what it found.
|
|
599
|
+
|
|
600
|
+
| Tool | What it does | Approval | Validated |
|
|
601
|
+
|---|---|---|---|
|
|
602
|
+
| `wix_a11y_list_page_collections` | The page collections this site supports right now — pass a `collectionId` back unchanged | — | schema |
|
|
603
|
+
| `wix_a11y_run_scan` | Start a scan of one target: the site, one page, or one collection. Returns a scan id immediately | — | schema |
|
|
604
|
+
| `wix_a11y_get_scan` | Poll target: lifecycle, progress, aggregate totals. No pages, no findings | — | schema |
|
|
605
|
+
| `wix_a11y_get_latest_scan` | The most recent stored scan for a target, without starting a new one | — | schema |
|
|
606
|
+
| `wix_a11y_list_page_summaries` | Every discovered page, including clear ones and ones that failed to scan | — | schema |
|
|
607
|
+
| `wix_a11y_list_findings` | The actionable findings, filterable by page, rule, severity or category | — | schema |
|
|
608
|
+
|
|
609
|
+
**What makes a page clear, and why it takes three conditions.**
|
|
610
|
+
|
|
611
|
+
Wix states it plainly: a page is clear only when it has no findings, **its page
|
|
612
|
+
status is completed**, and **its coverage confirms the relevant checks ran**. A
|
|
613
|
+
page that failed to scan also reports zero findings — because nothing was read,
|
|
614
|
+
not because nothing is wrong. So every page summary carries `clear`, valued
|
|
615
|
+
`true`, `false` or `"unknown"`, rather than a bare count — with `clearFor`
|
|
616
|
+
naming the checks a `true` is true *for* — a scan reports `resultIsWhole`, and
|
|
617
|
+
`PARTIALLY_COMPLETED` never collapses into success. The
|
|
618
|
+
failure mode this family has is not data loss, it is an agent reporting a clean
|
|
619
|
+
site from an incomplete scan.
|
|
620
|
+
|
|
621
|
+
**Scans are asynchronous, and these tools do not wait.** `wix_a11y_run_scan`
|
|
622
|
+
returns a scan id; poll `wix_a11y_get_scan` after `suggestedPollIntervalSeconds`
|
|
623
|
+
(every 5 seconds when absent) until the status is terminal. A tool that blocked
|
|
624
|
+
for the length of a site scan would be the wrong shape for an agent turn.
|
|
625
|
+
|
|
626
|
+
**`attempt` is what tells a retry apart from a new scan.** Wix takes a
|
|
627
|
+
caller-generated idempotency key so a lost response cannot create duplicate
|
|
628
|
+
work, and requires a *new* key for a genuinely new scan. The plugin derives that
|
|
629
|
+
key from the site, the target and the `attempt` label you pass: reuse the label
|
|
630
|
+
to retry, change it to scan again. A random key per call would satisfy the
|
|
631
|
+
schema and make the whole guarantee inert.
|
|
632
|
+
|
|
633
|
+
**Limits worth knowing.** Runs are capped at 5 per minute per site; a multi-page
|
|
634
|
+
scan covers at most 300 pages and answers `SCAN_SIZE_LIMIT_EXCEEDED` beyond that
|
|
635
|
+
— after which the site must never be described as fully scanned. Stored results
|
|
636
|
+
are kept about six months, and `resultsExpirationDate` says exactly when. A
|
|
637
|
+
published site is scanned from its published version, an unpublished one from
|
|
638
|
+
its latest saved version — the opposite way round from the SEO tag reads above.
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
568
642
|
### Design
|
|
569
643
|
|
|
570
644
|
| Tool | What it does | Approval | Validated |
|
package/dist/config.js
CHANGED
|
@@ -69,10 +69,16 @@ export function resolveConfig(cfg = {}) {
|
|
|
69
69
|
enabled: cfg.enabled !== false,
|
|
70
70
|
// OPT-IN, unlike every other tool group. The Wix SEO endpoints are in
|
|
71
71
|
// Developer Preview: Wix may change them at any time and says they
|
|
72
|
-
// "shouldn't be used on live sites".
|
|
72
|
+
// "shouldn't be used on live sites". Eleven of these tools also write
|
|
73
73
|
// irreversibly to a live site the moment they succeed. Defaulting them on
|
|
74
74
|
// would enable that on every existing install without anyone deciding to.
|
|
75
75
|
enableSeoTools: cfg.enableSeoTools === true,
|
|
76
|
+
// A SEPARATE SWITCH, not a sub-case of the SEO one. These tools destroy
|
|
77
|
+
// nothing, but starting a scan needs its own Wix permission that the SEO
|
|
78
|
+
// scope does not grant — so an install that turned SEO on has not thereby
|
|
79
|
+
// decided anything about this, and folding the two together would enable a
|
|
80
|
+
// family of calls that would only fail with 403.
|
|
81
|
+
enableAccessibilityTools: cfg.enableAccessibilityTools === true,
|
|
76
82
|
apiKey,
|
|
77
83
|
accountId,
|
|
78
84
|
allowedSiteIds,
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,EAAE;AACF,2EAA2E;AAC3E,6DAA6D;AAQ7D;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAI,KAAQ;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,IAAY,EAAE,EAAE;QACvD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC,CAAiB,CAAC;AACrB,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,wBAAwB;IACxB,oBAAoB;IACpB,uBAAuB;IACvB,sBAAsB;IACtB,qBAAqB;IACrB,yBAAyB;IACzB,qBAAqB;IACrB,sBAAsB;IACtB,yBAAyB;IACzB,sEAAsE;IACtE,6EAA6E;IAC7E,2EAA2E;IAC3E,6EAA6E;IAC7E,6DAA6D;IAC7D,yBAAyB;IACzB,yBAAyB;IACzB,+BAA+B;IAC/B,+BAA+B;IAC/B,uEAAuE;IACvE,wEAAwE;IACxE,uBAAuB;IACvB,4BAA4B;IAC5B,yBAAyB;IACzB,uBAAuB;IACvB,qBAAqB;IACrB,wBAAwB;IACxB,uBAAuB;CACxB,CAAC;AAEF,MAAM,gBAAgB,GAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3E;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAuB,EAAE;IAEzB,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,CAAC,S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E;QACtE,mEAAmE;QACnE,sEAAsE;QACtE,0EAA0E;QAC1E,0EAA0E;QAC1E,cAAc,EAAE,GAAG,CAAC,cAAc,KAAK,IAAI;QAC3C,wEAAwE;QACxE,yEAAyE;QACzE,0EAA0E;QAC1E,2EAA2E;QAC3E,iDAAiD;QACjD,wBAAwB,EAAE,GAAG,CAAC,wBAAwB,KAAK,IAAI;QAC/D,MAAM;QACN,SAAS;QACT,cAAc;QACd,aAAa;QACb,gBAAgB,EAAE,IAAI,GAAG,CAAC,gBAAgB,CAAC;QAC3C,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type { ResolvedWixConfig, WixPluginConfig, WixRequestOptions, } from "./t
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function buildAllTools(client: WixClient, options?: {
|
|
20
20
|
seo?: boolean;
|
|
21
|
+
accessibility?: boolean;
|
|
21
22
|
}): ({
|
|
22
23
|
name: string;
|
|
23
24
|
description: string;
|
|
@@ -1546,6 +1547,136 @@ export declare function buildAllTools(client: WixClient, options?: {
|
|
|
1546
1547
|
data?: unknown;
|
|
1547
1548
|
error?: string;
|
|
1548
1549
|
}>>;
|
|
1550
|
+
} | {
|
|
1551
|
+
name: string;
|
|
1552
|
+
description: string;
|
|
1553
|
+
label: string;
|
|
1554
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1555
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1556
|
+
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1557
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
1558
|
+
}>;
|
|
1559
|
+
execute: (toolCallId: string, params: {
|
|
1560
|
+
siteId?: string | undefined;
|
|
1561
|
+
limit?: number | undefined;
|
|
1562
|
+
cursor?: string | undefined;
|
|
1563
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1564
|
+
status: "ok" | "failed";
|
|
1565
|
+
data?: unknown;
|
|
1566
|
+
error?: string;
|
|
1567
|
+
}>>;
|
|
1568
|
+
} | {
|
|
1569
|
+
name: string;
|
|
1570
|
+
description: string;
|
|
1571
|
+
label: string;
|
|
1572
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1573
|
+
attempt: import("@sinclair/typebox").TString;
|
|
1574
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1575
|
+
fullSite: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1576
|
+
pageId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1577
|
+
pageUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1578
|
+
collectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1579
|
+
}>;
|
|
1580
|
+
execute: (toolCallId: string, params: {
|
|
1581
|
+
siteId?: string | undefined;
|
|
1582
|
+
pageId?: string | undefined;
|
|
1583
|
+
fullSite?: boolean | undefined;
|
|
1584
|
+
pageUrl?: string | undefined;
|
|
1585
|
+
collectionId?: string | undefined;
|
|
1586
|
+
attempt: string;
|
|
1587
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1588
|
+
status: "ok" | "failed";
|
|
1589
|
+
data?: unknown;
|
|
1590
|
+
error?: string;
|
|
1591
|
+
}>>;
|
|
1592
|
+
} | {
|
|
1593
|
+
name: string;
|
|
1594
|
+
description: string;
|
|
1595
|
+
label: string;
|
|
1596
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1597
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1598
|
+
scanId: import("@sinclair/typebox").TString;
|
|
1599
|
+
}>;
|
|
1600
|
+
execute: (toolCallId: string, params: {
|
|
1601
|
+
siteId?: string | undefined;
|
|
1602
|
+
scanId: string;
|
|
1603
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1604
|
+
status: "ok" | "failed";
|
|
1605
|
+
data?: unknown;
|
|
1606
|
+
error?: string;
|
|
1607
|
+
}>>;
|
|
1608
|
+
} | {
|
|
1609
|
+
name: string;
|
|
1610
|
+
description: string;
|
|
1611
|
+
label: string;
|
|
1612
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1613
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1614
|
+
fullSite: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1615
|
+
pageId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1616
|
+
pageUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1617
|
+
collectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1618
|
+
}>;
|
|
1619
|
+
execute: (toolCallId: string, params: {
|
|
1620
|
+
siteId?: string | undefined;
|
|
1621
|
+
pageId?: string | undefined;
|
|
1622
|
+
fullSite?: boolean | undefined;
|
|
1623
|
+
pageUrl?: string | undefined;
|
|
1624
|
+
collectionId?: string | undefined;
|
|
1625
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1626
|
+
status: "ok" | "failed";
|
|
1627
|
+
data?: unknown;
|
|
1628
|
+
error?: string;
|
|
1629
|
+
}>>;
|
|
1630
|
+
} | {
|
|
1631
|
+
name: string;
|
|
1632
|
+
description: string;
|
|
1633
|
+
label: string;
|
|
1634
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1635
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1636
|
+
scanId: import("@sinclair/typebox").TString;
|
|
1637
|
+
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1638
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
1639
|
+
}>;
|
|
1640
|
+
execute: (toolCallId: string, params: {
|
|
1641
|
+
siteId?: string | undefined;
|
|
1642
|
+
limit?: number | undefined;
|
|
1643
|
+
cursor?: string | undefined;
|
|
1644
|
+
scanId: string;
|
|
1645
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1646
|
+
status: "ok" | "failed";
|
|
1647
|
+
data?: unknown;
|
|
1648
|
+
error?: string;
|
|
1649
|
+
}>>;
|
|
1650
|
+
} | {
|
|
1651
|
+
name: string;
|
|
1652
|
+
description: string;
|
|
1653
|
+
label: string;
|
|
1654
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1655
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1656
|
+
scanId: import("@sinclair/typebox").TString;
|
|
1657
|
+
pageId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1658
|
+
pageUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1659
|
+
ruleId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1660
|
+
severity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1661
|
+
categories: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
1662
|
+
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1663
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
1664
|
+
}>;
|
|
1665
|
+
execute: (toolCallId: string, params: {
|
|
1666
|
+
siteId?: string | undefined;
|
|
1667
|
+
severity?: string | undefined;
|
|
1668
|
+
limit?: number | undefined;
|
|
1669
|
+
cursor?: string | undefined;
|
|
1670
|
+
pageId?: string | undefined;
|
|
1671
|
+
pageUrl?: string | undefined;
|
|
1672
|
+
categories?: string[] | undefined;
|
|
1673
|
+
ruleId?: string | undefined;
|
|
1674
|
+
scanId: string;
|
|
1675
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1676
|
+
status: "ok" | "failed";
|
|
1677
|
+
data?: unknown;
|
|
1678
|
+
error?: string;
|
|
1679
|
+
}>>;
|
|
1549
1680
|
} | {
|
|
1550
1681
|
name: string;
|
|
1551
1682
|
description: string;
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { buildMediaTools } from "./tools/media.js";
|
|
|
30
30
|
import { buildMultilingualTools } from "./tools/multilingual.js";
|
|
31
31
|
import { buildReviewsTools } from "./tools/reviews.js";
|
|
32
32
|
import { buildSeoTools } from "./tools/seo.js";
|
|
33
|
+
import { buildAccessibilityTools } from "./tools/accessibility.js";
|
|
33
34
|
import { buildSiteTools } from "./tools/site.js";
|
|
34
35
|
import { WixClient } from "./wix-client.js";
|
|
35
36
|
// Re-export helpers so tests can pull them without re-importing every
|
|
@@ -65,6 +66,10 @@ export function buildAllTools(client, options = {}) {
|
|
|
65
66
|
// Developer Preview upstream, and half of them write irreversibly: opted
|
|
66
67
|
// into per install, never on by default.
|
|
67
68
|
...(options.seo === true ? buildSeoTools(client) : []),
|
|
69
|
+
// Developer Preview upstream too, but nothing here writes: the opt-in
|
|
70
|
+
// exists because starting a scan needs a permission of its own, and
|
|
71
|
+
// because the endpoints may change without notice.
|
|
72
|
+
...(options.accessibility === true ? buildAccessibilityTools(client) : []),
|
|
68
73
|
...buildDesignTools(client),
|
|
69
74
|
];
|
|
70
75
|
}
|
|
@@ -87,7 +92,16 @@ export function registerWixPlugin(api) {
|
|
|
87
92
|
api.logger.warn("wix-openclaw: allowedSiteIds is empty — every site-scoped call will be rejected. Add at least one site UUID to enable.");
|
|
88
93
|
}
|
|
89
94
|
const client = new WixClient(config, api.logger);
|
|
90
|
-
const allTools = buildAllTools(client, {
|
|
95
|
+
const allTools = buildAllTools(client, {
|
|
96
|
+
seo: config.enableSeoTools,
|
|
97
|
+
accessibility: config.enableAccessibilityTools,
|
|
98
|
+
});
|
|
99
|
+
if (!config.enableAccessibilityTools) {
|
|
100
|
+
api.logger.info("wix-openclaw: accessibility tools not registered — the Wix Accessibility " +
|
|
101
|
+
"Scans endpoints are in Developer Preview and starting a scan needs the " +
|
|
102
|
+
"Wix `Manage Accessibility Scans` permission. Set " +
|
|
103
|
+
"config.enableAccessibilityTools to true to opt in.");
|
|
104
|
+
}
|
|
91
105
|
if (!config.enableSeoTools) {
|
|
92
106
|
api.logger.info("wix-openclaw: SEO tools not registered — the Wix SEO endpoints are in " +
|
|
93
107
|
"Developer Preview and may change without notice. Set " +
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,6BAA6B;AAC7B,EAAE;AACF,kBAAkB;AAClB,kEAAkE;AAClE,mEAAmE;AACnE,uEAAuE;AACvE,+CAA+C;AAC/C,kEAAkE;AAClE,sEAAsE;AACtE,+CAA+C;AAC/C,kEAAkE;AAClE,sEAAsE;AACtE,8BAA8B;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,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AAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAClB,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CACP,yBAAyB,CAAC,QAAQ,CAAC,IAAI,CAAC;QACxC,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CACrC,CAAC;IACJ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,GAAG,CAAC,MAAM,CAAC,IAAI,CACb,iBAAiB,OAAO,CAAC,MAAM,qDAAqD;YAClF,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,+CAA+C;YACpE,wCAAwC,CAC3C,CAAC;IACJ,CAAC;AACH,CAAC;AAED,4EAA4E;AAC5E,gFAAgF;AAChF,6EAA6E;AAC7E,0EAA0E;AAC1E,kCAAkC;AAClC,MAAM,SAAS,GAAyC,iBAAiB,CAAC;IACxE,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,KAAK;IACX,WAAW,EACT,qLAAqL;IACvL,QAAQ,CAAC,GAAG;QACV,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/dist/tools/_query.d.ts
CHANGED
|
@@ -114,4 +114,4 @@ export declare function buildGetPagingQuery(paging: WixGetPagingEnvelope | undef
|
|
|
114
114
|
* Drop `undefined`, `null`, and empty-string entries from a query
|
|
115
115
|
* record so they don't end up as `?key=undefined` after serialisation.
|
|
116
116
|
*/
|
|
117
|
-
export declare function compactQuery(q: Record<string, string | number | boolean | undefined | null>): Record<string, string | number | boolean | undefined>;
|
|
117
|
+
export declare function compactQuery(q: Record<string, string | number | boolean | undefined | null | (string | number)[]>): Record<string, string | number | boolean | undefined | (string | number)[]>;
|
package/dist/tools/_query.js
CHANGED
|
@@ -233,6 +233,9 @@ export function compactQuery(q) {
|
|
|
233
233
|
for (const [k, v] of Object.entries(q)) {
|
|
234
234
|
if (v === undefined || v === null || v === "")
|
|
235
235
|
continue;
|
|
236
|
+
// An EMPTY array is an absent filter, not a filter matching nothing.
|
|
237
|
+
if (Array.isArray(v) && v.length === 0)
|
|
238
|
+
continue;
|
|
236
239
|
out[k] = v;
|
|
237
240
|
}
|
|
238
241
|
return out;
|
package/dist/tools/_query.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_query.js","sourceRoot":"","sources":["../../src/tools/_query.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,yCAAyC;AACzC,EAAE;AACF,kEAAkE;AAClE,yEAAyE;AACzE,+CAA+C;AAC/C,yEAAyE;AACzE,uEAAuE;AACvE,sBAAsB;AACtB,0HAA0H;AAC1H,EAAE;AACF,sEAAsE;AACtE,qEAAqE;AACrE,sEAAsE;AACtE,sEAAsE;AACtE,gBAAgB;AAChB,EAAE;AACF,kEAAkE;AAClE,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,uEAAuE;AACvE,uEAAuE;AACvE,2DAA2D;AAC3D,EAAE;AACF,uEAAuE;AACvE,wDAAwD;AACxD,mEAAmE;AACnE,gEAAgE;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,yDAAyD;KACvE,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,QAAQ,CAClB,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE;QACtD,WAAW,EAAE,2CAA2C;KACzD,CAAC,CACH;CACF,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,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,UAAU,YAAY,CAC1B,CAGC;IAKD,MAAM,GAAG,GAGL,EAAE,CAAC;IACP,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE;YAAE,SAAS;QACxD,qEAAqE;QACrE,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACjD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { type WixClient } from "../wix-client.js";
|
|
2
|
+
export declare function buildAccessibilityTools(client: WixClient): ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
label: string;
|
|
6
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
7
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
+
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
10
|
+
}>;
|
|
11
|
+
execute: (toolCallId: string, params: {
|
|
12
|
+
siteId?: string | undefined;
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
cursor?: string | undefined;
|
|
15
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
16
|
+
status: "ok" | "failed";
|
|
17
|
+
data?: unknown;
|
|
18
|
+
error?: string;
|
|
19
|
+
}>>;
|
|
20
|
+
} | {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
label: string;
|
|
24
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
25
|
+
attempt: import("@sinclair/typebox").TString;
|
|
26
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
27
|
+
fullSite: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
28
|
+
pageId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
|
+
pageUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
|
+
collectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31
|
+
}>;
|
|
32
|
+
execute: (toolCallId: string, params: {
|
|
33
|
+
siteId?: string | undefined;
|
|
34
|
+
pageId?: string | undefined;
|
|
35
|
+
fullSite?: boolean | undefined;
|
|
36
|
+
pageUrl?: string | undefined;
|
|
37
|
+
collectionId?: string | undefined;
|
|
38
|
+
attempt: string;
|
|
39
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
40
|
+
status: "ok" | "failed";
|
|
41
|
+
data?: unknown;
|
|
42
|
+
error?: string;
|
|
43
|
+
}>>;
|
|
44
|
+
} | {
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
label: string;
|
|
48
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
49
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
50
|
+
scanId: import("@sinclair/typebox").TString;
|
|
51
|
+
}>;
|
|
52
|
+
execute: (toolCallId: string, params: {
|
|
53
|
+
siteId?: string | undefined;
|
|
54
|
+
scanId: string;
|
|
55
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
56
|
+
status: "ok" | "failed";
|
|
57
|
+
data?: unknown;
|
|
58
|
+
error?: string;
|
|
59
|
+
}>>;
|
|
60
|
+
} | {
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
label: string;
|
|
64
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
65
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
66
|
+
fullSite: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
67
|
+
pageId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
68
|
+
pageUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
69
|
+
collectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
70
|
+
}>;
|
|
71
|
+
execute: (toolCallId: string, params: {
|
|
72
|
+
siteId?: string | undefined;
|
|
73
|
+
pageId?: string | undefined;
|
|
74
|
+
fullSite?: boolean | undefined;
|
|
75
|
+
pageUrl?: string | undefined;
|
|
76
|
+
collectionId?: string | undefined;
|
|
77
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
78
|
+
status: "ok" | "failed";
|
|
79
|
+
data?: unknown;
|
|
80
|
+
error?: string;
|
|
81
|
+
}>>;
|
|
82
|
+
} | {
|
|
83
|
+
name: string;
|
|
84
|
+
description: string;
|
|
85
|
+
label: string;
|
|
86
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
87
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
88
|
+
scanId: import("@sinclair/typebox").TString;
|
|
89
|
+
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
90
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
91
|
+
}>;
|
|
92
|
+
execute: (toolCallId: string, params: {
|
|
93
|
+
siteId?: string | undefined;
|
|
94
|
+
limit?: number | undefined;
|
|
95
|
+
cursor?: string | undefined;
|
|
96
|
+
scanId: string;
|
|
97
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
98
|
+
status: "ok" | "failed";
|
|
99
|
+
data?: unknown;
|
|
100
|
+
error?: string;
|
|
101
|
+
}>>;
|
|
102
|
+
} | {
|
|
103
|
+
name: string;
|
|
104
|
+
description: string;
|
|
105
|
+
label: string;
|
|
106
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
107
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
108
|
+
scanId: import("@sinclair/typebox").TString;
|
|
109
|
+
pageId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
110
|
+
pageUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
111
|
+
ruleId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
112
|
+
severity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
113
|
+
categories: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
114
|
+
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
115
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
116
|
+
}>;
|
|
117
|
+
execute: (toolCallId: string, params: {
|
|
118
|
+
siteId?: string | undefined;
|
|
119
|
+
severity?: string | undefined;
|
|
120
|
+
limit?: number | undefined;
|
|
121
|
+
cursor?: string | undefined;
|
|
122
|
+
pageId?: string | undefined;
|
|
123
|
+
pageUrl?: string | undefined;
|
|
124
|
+
categories?: string[] | undefined;
|
|
125
|
+
ruleId?: string | undefined;
|
|
126
|
+
scanId: string;
|
|
127
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
128
|
+
status: "ok" | "failed";
|
|
129
|
+
data?: unknown;
|
|
130
|
+
error?: string;
|
|
131
|
+
}>>;
|
|
132
|
+
})[];
|