@lacneu/wix-openclaw 0.2.2 → 0.4.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/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  // wix-openclaw — Wix REST API plugin for OpenClaw.
2
2
  //
3
- // Exposes ~50 tools spanning Blog, CMS Data, Forms, Contacts, Bookings,
4
- // Events, Reviews, FAQ, Multilingual, plus a `wix_design_brief` helper.
3
+ // Exposes ~60 tools spanning Blog, CMS Data, Forms, Contacts, Bookings,
4
+ // Events, Reviews, FAQ, Multilingual, SEO (audit + URL redirects), plus a
5
+ // `wix_design_brief` helper.
5
6
  //
6
7
  // Security model:
7
8
  // 1. Site whitelist — every site-scoped call is checked against
@@ -15,7 +16,7 @@
15
16
  // plugin config (with `${ENV_VAR}` substitution), never from the
16
17
  // LLM's parameter space.
17
18
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
18
- import { resolveConfig } from "./config.js";
19
+ import { DEFAULT_APPROVAL_REQUIRED, resolveConfig } from "./config.js";
19
20
  import { createApprovalHook } from "./hooks/approval.js";
20
21
  import { buildBlogTools } from "./tools/blog.js";
21
22
  import { buildBookingsTools } from "./tools/bookings.js";
@@ -28,6 +29,7 @@ import { buildFormsTools } from "./tools/forms.js";
28
29
  import { buildMediaTools } from "./tools/media.js";
29
30
  import { buildMultilingualTools } from "./tools/multilingual.js";
30
31
  import { buildReviewsTools } from "./tools/reviews.js";
32
+ import { buildSeoTools } from "./tools/seo.js";
31
33
  import { buildSiteTools } from "./tools/site.js";
32
34
  import { WixClient } from "./wix-client.js";
33
35
  // Re-export helpers so tests can pull them without re-importing every
@@ -36,6 +38,36 @@ import { WixClient } from "./wix-client.js";
36
38
  export { resolveConfig, resolveEnv } from "./config.js";
37
39
  export { createApprovalHook } from "./hooks/approval.js";
38
40
  export { WixClient, WixApiError, WixSiteNotAllowedError, } from "./wix-client.js";
41
+ /**
42
+ * Every tool this plugin registers, in one place.
43
+ *
44
+ * THE SINGLE ENUMERATION. It was written twice — once here and once in the
45
+ * manifest test — and a whole new domain (SEO) was added to registration while
46
+ * the test kept checking the old list, so its guards passed over the new tools
47
+ * without seeing them. A test that maintains its own copy of what it checks
48
+ * stops checking the moment the two drift.
49
+ *
50
+ * Order doesn't matter to the runtime; the grouping is for log clarity.
51
+ */
52
+ export function buildAllTools(client, options = {}) {
53
+ return [
54
+ ...buildBlogTools(client),
55
+ ...buildMediaTools(client),
56
+ ...buildSiteTools(client),
57
+ ...buildDataTools(client),
58
+ ...buildFormsTools(client),
59
+ ...buildContactsTools(client),
60
+ ...buildBookingsTools(client),
61
+ ...buildEventsTools(client),
62
+ ...buildReviewsTools(client),
63
+ ...buildFaqTools(client),
64
+ ...buildMultilingualTools(client),
65
+ // Developer Preview upstream, and half of them write irreversibly: opted
66
+ // into per install, never on by default.
67
+ ...(options.seo === true ? buildSeoTools(client) : []),
68
+ ...buildDesignTools(client),
69
+ ];
70
+ }
39
71
  /**
40
72
  * Register every Wix tool against the provided plugin API. Exposed so
41
73
  * tests can drive the registration with a fake API surface.
@@ -55,21 +87,12 @@ export function registerWixPlugin(api) {
55
87
  api.logger.warn("wix-openclaw: allowedSiteIds is empty — every site-scoped call will be rejected. Add at least one site UUID to enable.");
56
88
  }
57
89
  const client = new WixClient(config, api.logger);
58
- // Order doesn't matter for tools we group by domain for log clarity.
59
- const allTools = [
60
- ...buildBlogTools(client),
61
- ...buildMediaTools(client),
62
- ...buildSiteTools(client),
63
- ...buildDataTools(client),
64
- ...buildFormsTools(client),
65
- ...buildContactsTools(client),
66
- ...buildBookingsTools(client),
67
- ...buildEventsTools(client),
68
- ...buildReviewsTools(client),
69
- ...buildFaqTools(client),
70
- ...buildMultilingualTools(client),
71
- ...buildDesignTools(client),
72
- ];
90
+ const allTools = buildAllTools(client, { seo: config.enableSeoTools });
91
+ if (!config.enableSeoTools) {
92
+ api.logger.info("wix-openclaw: SEO tools not registered — the Wix SEO endpoints are in " +
93
+ "Developer Preview and may change without notice. Set " +
94
+ "config.enableSeoTools to true to opt in.");
95
+ }
73
96
  for (const tool of allTools) {
74
97
  // The SDK exposes `registerTool(tool: AnyAgentTool, opts?)`. Our
75
98
  // factory output is shape-compatible (name, description, parameters,
@@ -85,8 +108,28 @@ export function registerWixPlugin(api) {
85
108
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
109
  api.on("before_tool_call", approvalHandler);
87
110
  api.logger.info(`wix-openclaw: ready — ${allTools.length} tools registered, ${config.approvalRequired.size} approval-gated, ${config.allowedSiteIds.length} allowed site(s)`);
111
+ // SAID, NOT SILENTLY FIXED. An install that carries an explicit
112
+ // `approvalRequired` keeps it — that list may be a deliberate choice (a
113
+ // client that cannot render approval prompts has to empty it). But an
114
+ // upgrade also inherits a list written before these tools existed, and the
115
+ // difference between the two is invisible from here. So the gap is named at
116
+ // boot rather than closed behind the operator's back or left unmentioned.
117
+ const ungated = allTools
118
+ .map((t) => t.name)
119
+ .filter((name) => DEFAULT_APPROVAL_REQUIRED.includes(name) &&
120
+ !config.approvalRequired.has(name));
121
+ if (ungated.length > 0) {
122
+ api.logger.warn(`wix-openclaw: ${ungated.length} destructive tool(s) registered WITHOUT approval — ` +
123
+ `${ungated.join(", ")}. They are gated by default; this instance's ` +
124
+ "`approvalRequired` does not list them.");
125
+ }
88
126
  }
89
- export default definePluginEntry({
127
+ // ANNOTATED, NOT INFERRED. The inferred type of this default export reaches
128
+ // into an openclaw build-internal chunk (`plugin-entry-*.js`), which TypeScript
129
+ // cannot name from a declaration file — `error TS2742`, and only against the
130
+ // current SDK. Naming it through the imported factory keeps the reference
131
+ // inside the declared dependency.
132
+ const wixPlugin = definePluginEntry({
90
133
  id: "wix-openclaw",
91
134
  name: "Wix",
92
135
  description: "Wix REST API plugin for OpenClaw — manage blog, CMS data, forms, bookings, contacts, events, FAQ on a single Wix site with site_id whitelist and approval gating on destructive ops",
@@ -94,4 +137,5 @@ export default definePluginEntry({
94
137
  registerWixPlugin(api);
95
138
  },
96
139
  });
140
+ export default wixPlugin;
97
141
  //# sourceMappingURL=index.js.map
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,wEAAwE;AACxE,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,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,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,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,sEAAsE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AAI,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"}
@@ -1,6 +1,30 @@
1
1
  import type { Static, TSchema } from "@sinclair/typebox";
2
- import type { AgentToolResult } from "@mariozechner/pi-agent-core";
3
2
  import { type WixClient } from "../wix-client.js";
3
+ /**
4
+ * The tool-result shape `api.registerTool` consumes — DECLARED HERE, not
5
+ * imported.
6
+ *
7
+ * It used to come from `@mariozechner/pi-agent-core`, a package this plugin
8
+ * never declared: it was reachable only because `openclaw` happened to depend
9
+ * on it. Upstream dropped it after 2026.5.x, so the import resolved on a
10
+ * machine holding an older tree and nowhere else.
11
+ *
12
+ * `openclaw/plugin-sdk/agent-core` re-exports the same type, but that subpath
13
+ * only exists from 2026.5.28 onwards while this plugin supports `>=2026.5.0` —
14
+ * importing it would silently drop the bottom of the declared range. Mirroring
15
+ * the contract locally holds across the whole of it, and the structural check
16
+ * still happens where it matters: at `registerTool`, against whichever version
17
+ * of the SDK is installed.
18
+ *
19
+ * Narrower than upstream's on purpose: these tools return text and nothing else.
20
+ */
21
+ export interface WixToolResult<T> {
22
+ content: {
23
+ type: "text";
24
+ text: string;
25
+ }[];
26
+ details: T;
27
+ }
4
28
  /**
5
29
  * Definition for a single Wix tool. Generic over the TypeBox schema so the
6
30
  * `execute` body sees fully typed params.
@@ -32,7 +56,7 @@ export declare function defineWixTool<TSchema_ extends TSchema>(def: WixToolDefi
32
56
  description: string;
33
57
  label: string;
34
58
  parameters: TSchema_;
35
- execute: (toolCallId: string, params: Static<TSchema_>, signal?: AbortSignal) => Promise<AgentToolResult<{
59
+ execute: (toolCallId: string, params: Static<TSchema_>, signal?: AbortSignal) => Promise<WixToolResult<{
36
60
  status: "ok" | "failed";
37
61
  data?: unknown;
38
62
  error?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"_factory.js","sourceRoot":"","sources":["../../src/tools/_factory.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,EAAE;AACF,4BAA4B;AAC5B,oEAAoE;AACpE,yEAAyE;AACzE,0EAA0E;AAC1E,uBAAuB;AACvB,EAAE;AACF,qEAAqE;AACrE,wEAAwE;AACxE,wCAAwC;AAKxC,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAkB,MAAM,kBAAkB,CAAC;AA4BvF;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAgC,EAChC,MAAiB;IAYjB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,CAAC;IAEpC,OAAO;QACL,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,KAAK;QACL,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM;YACvC,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;gBACnD,MAAM,IAAI,GACR,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS;oBACjC,CAAC,CAAC,IAAI;oBACN,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ;wBACx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AI,EAAE;iBAChC,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,kEAAkE;gBAClE,yDAAyD;gBACzD,IAAI,GAAG,YAAY,sBAAsB,EAAE,CAAC;oBAC1C,OAAO;wBACL,OAAO,EAAE;4BACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,CAAC,OAAO,EAAE,EAAE;yBAClD;wBACD,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE;qBAClD,CAAC;gBACJ,CAAC;gBACD,IAAI,GAAG,YAAY,WAAW,EAAE,CAAC;oBAC/B,OAAO;wBACL,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAM;gCACZ,IAAI,EAAE,kBAAkB,GAAG,CAAC,MAAM,MAAM,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;6BACxE;yBACF;wBACD,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE;qBAClD,CAAC;gBACJ,CAAC;gBACD,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC7D,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,EAAE,EAAE,CAAC;oBAClD,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;iBAC1C,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -24,7 +24,7 @@ export declare function buildBlogTools(client: WixClient): ({
24
24
  } | undefined;
25
25
  status?: "UNPUBLISHED" | "PUBLISHED" | "SCHEDULED" | "IN_REVIEW" | "ALL" | undefined;
26
26
  fieldsets?: ("URL" | "INTERNAL_ID" | "CONTENT" | "RICH_CONTENT" | "TRANSLATIONS" | "GENERATED_EXCERPT" | "COUNTERS" | "CONTENT_TEXT")[] | undefined;
27
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
27
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
28
28
  status: "ok" | "failed";
29
29
  data?: unknown;
30
30
  error?: string;
@@ -42,7 +42,7 @@ export declare function buildBlogTools(client: WixClient): ({
42
42
  siteId?: string | undefined;
43
43
  fieldsets?: ("URL" | "INTERNAL_ID" | "CONTENT" | "RICH_CONTENT" | "TRANSLATIONS" | "GENERATED_EXCERPT" | "COUNTERS" | "CONTENT_TEXT")[] | undefined;
44
44
  draftPostId: string;
45
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
45
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
46
46
  status: "ok" | "failed";
47
47
  data?: unknown;
48
48
  error?: string;
@@ -80,7 +80,7 @@ export declare function buildBlogTools(client: WixClient): ({
80
80
  slug?: string | undefined;
81
81
  seoData?: unknown;
82
82
  title: string;
83
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
83
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
84
84
  status: "ok" | "failed";
85
85
  data?: unknown;
86
86
  error?: string;
@@ -112,7 +112,7 @@ export declare function buildBlogTools(client: WixClient): ({
112
112
  seoData?: unknown;
113
113
  fieldMask?: string[] | undefined;
114
114
  draftPostId: string;
115
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
115
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
116
116
  status: "ok" | "failed";
117
117
  data?: unknown;
118
118
  error?: string;
@@ -128,7 +128,7 @@ export declare function buildBlogTools(client: WixClient): ({
128
128
  execute: (toolCallId: string, params: {
129
129
  siteId?: string | undefined;
130
130
  draftPostId: string;
131
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
131
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
132
132
  status: "ok" | "failed";
133
133
  data?: unknown;
134
134
  error?: string;
@@ -153,6 +153,7 @@ export declare function buildBlogTools(client: WixClient): ({
153
153
  }>;
154
154
  execute: (toolCallId: string, params: {
155
155
  sort?: "PUBLISHED_DATE_ASC" | "PUBLISHED_DATE_DESC" | "VIEW_COUNT_ASC" | "VIEW_COUNT_DESC" | "LIKE_COUNT_ASC" | "LIKE_COUNT_DESC" | undefined;
156
+ language?: string | undefined;
156
157
  siteId?: string | undefined;
157
158
  paging?: {
158
159
  limit?: number | undefined;
@@ -163,8 +164,7 @@ export declare function buildBlogTools(client: WixClient): ({
163
164
  tagIds?: string[] | undefined;
164
165
  categoryIds?: string[] | undefined;
165
166
  featured?: boolean | undefined;
166
- language?: string | undefined;
167
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
167
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
168
168
  status: "ok" | "failed";
169
169
  data?: unknown;
170
170
  error?: string;
@@ -182,7 +182,7 @@ export declare function buildBlogTools(client: WixClient): ({
182
182
  siteId?: string | undefined;
183
183
  fieldsets?: ("URL" | "INTERNAL_ID" | "CONTENT" | "RICH_CONTENT" | "TRANSLATIONS" | "GENERATED_EXCERPT" | "COUNTERS" | "CONTENT_TEXT")[] | undefined;
184
184
  postId: string;
185
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
185
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
186
186
  status: "ok" | "failed";
187
187
  data?: unknown;
188
188
  error?: string;
@@ -198,7 +198,7 @@ export declare function buildBlogTools(client: WixClient): ({
198
198
  execute: (toolCallId: string, params: {
199
199
  siteId?: string | undefined;
200
200
  postId: string;
201
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
201
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
202
202
  status: "ok" | "failed";
203
203
  data?: unknown;
204
204
  error?: string;
@@ -217,14 +217,14 @@ export declare function buildBlogTools(client: WixClient): ({
217
217
  }>>;
218
218
  }>;
219
219
  execute: (toolCallId: string, params: {
220
+ language?: string | undefined;
220
221
  siteId?: string | undefined;
221
222
  paging?: {
222
223
  limit?: number | undefined;
223
224
  offset?: number | undefined;
224
225
  cursor?: string | undefined;
225
226
  } | undefined;
226
- language?: string | undefined;
227
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
227
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
228
228
  status: "ok" | "failed";
229
229
  data?: unknown;
230
230
  error?: string;
@@ -36,7 +36,7 @@ export declare function buildBookingsTools(client: WixClient): ({
36
36
  cursor?: string | undefined;
37
37
  } | undefined;
38
38
  fields?: string[] | undefined;
39
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
39
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
40
40
  status: "ok" | "failed";
41
41
  data?: unknown;
42
42
  error?: string;
@@ -52,7 +52,7 @@ export declare function buildBookingsTools(client: WixClient): ({
52
52
  execute: (toolCallId: string, params: {
53
53
  siteId?: string | undefined;
54
54
  bookingId: string;
55
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
55
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
56
56
  status: "ok" | "failed";
57
57
  data?: unknown;
58
58
  error?: string;
@@ -68,7 +68,7 @@ export declare function buildBookingsTools(client: WixClient): ({
68
68
  execute: (toolCallId: string, params: {
69
69
  siteId?: string | undefined;
70
70
  booking: unknown;
71
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
71
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
72
72
  status: "ok" | "failed";
73
73
  data?: unknown;
74
74
  error?: string;
@@ -86,7 +86,7 @@ export declare function buildBookingsTools(client: WixClient): ({
86
86
  siteId?: string | undefined;
87
87
  bookingId: string;
88
88
  slot: unknown;
89
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
89
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
90
90
  status: "ok" | "failed";
91
91
  data?: unknown;
92
92
  error?: string;
@@ -104,7 +104,7 @@ export declare function buildBookingsTools(client: WixClient): ({
104
104
  siteId?: string | undefined;
105
105
  notifyParticipants?: boolean | undefined;
106
106
  bookingId: string;
107
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
107
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
108
108
  status: "ok" | "failed";
109
109
  data?: unknown;
110
110
  error?: string;
@@ -38,7 +38,7 @@ export declare function buildContactsTools(client: WixClient): ({
38
38
  } | undefined;
39
39
  fields?: string[] | undefined;
40
40
  search?: string | undefined;
41
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
41
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
42
42
  status: "ok" | "failed";
43
43
  data?: unknown;
44
44
  error?: string;
@@ -54,7 +54,7 @@ export declare function buildContactsTools(client: WixClient): ({
54
54
  execute: (toolCallId: string, params: {
55
55
  siteId?: string | undefined;
56
56
  contactId: string;
57
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
57
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
58
58
  status: "ok" | "failed";
59
59
  data?: unknown;
60
60
  error?: string;
@@ -128,7 +128,7 @@ export declare function buildContactsTools(client: WixClient): ({
128
128
  } | undefined;
129
129
  extendedFields?: unknown;
130
130
  };
131
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
131
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
132
132
  status: "ok" | "failed";
133
133
  data?: unknown;
134
134
  error?: string;
@@ -208,7 +208,7 @@ export declare function buildContactsTools(client: WixClient): ({
208
208
  extendedFields?: unknown;
209
209
  };
210
210
  contactId: string;
211
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
211
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
212
212
  status: "ok" | "failed";
213
213
  data?: unknown;
214
214
  error?: string;
@@ -226,7 +226,7 @@ export declare function buildContactsTools(client: WixClient): ({
226
226
  siteId?: string | undefined;
227
227
  labelKeys: string[];
228
228
  contactId: string;
229
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
229
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
230
230
  status: "ok" | "failed";
231
231
  data?: unknown;
232
232
  error?: string;
@@ -18,7 +18,7 @@ export declare function buildDataTools(client: WixClient): ({
18
18
  offset?: number | undefined;
19
19
  cursor?: string | undefined;
20
20
  } | undefined;
21
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
21
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
22
22
  status: "ok" | "failed";
23
23
  data?: unknown;
24
24
  error?: string;
@@ -62,7 +62,7 @@ export declare function buildDataTools(client: WixClient): ({
62
62
  } | undefined;
63
63
  fields?: string[] | undefined;
64
64
  dataCollectionId: string;
65
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
65
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
66
66
  status: "ok" | "failed";
67
67
  data?: unknown;
68
68
  error?: string;
@@ -80,7 +80,7 @@ export declare function buildDataTools(client: WixClient): ({
80
80
  siteId?: string | undefined;
81
81
  dataCollectionId: string;
82
82
  dataItemId: string;
83
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
83
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
84
84
  status: "ok" | "failed";
85
85
  data?: unknown;
86
86
  error?: string;
@@ -98,7 +98,7 @@ export declare function buildDataTools(client: WixClient): ({
98
98
  siteId?: string | undefined;
99
99
  dataCollectionId: string;
100
100
  dataItem: unknown;
101
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
101
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
102
102
  status: "ok" | "failed";
103
103
  data?: unknown;
104
104
  error?: string;
@@ -118,7 +118,7 @@ export declare function buildDataTools(client: WixClient): ({
118
118
  dataCollectionId: string;
119
119
  dataItemId: string;
120
120
  dataItem: unknown;
121
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
121
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
122
122
  status: "ok" | "failed";
123
123
  data?: unknown;
124
124
  error?: string;
@@ -24,7 +24,7 @@ export declare function buildDesignTools(_client: WixClient): {
24
24
  preferredColors?: string[] | undefined;
25
25
  preferredFonts?: string[] | undefined;
26
26
  brief: string;
27
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
27
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
28
28
  status: "ok" | "failed";
29
29
  data?: unknown;
30
30
  error?: string;
@@ -38,7 +38,7 @@ export declare function buildEventsTools(client: WixClient): ({
38
38
  } | undefined;
39
39
  fields?: string[] | undefined;
40
40
  status?: "UPCOMING" | "STARTED" | "ENDED" | "CANCELED" | undefined;
41
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
41
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
42
42
  status: "ok" | "failed";
43
43
  data?: unknown;
44
44
  error?: string;
@@ -54,7 +54,7 @@ export declare function buildEventsTools(client: WixClient): ({
54
54
  execute: (toolCallId: string, params: {
55
55
  siteId?: string | undefined;
56
56
  eventId: string;
57
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
57
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
58
58
  status: "ok" | "failed";
59
59
  data?: unknown;
60
60
  error?: string;
@@ -98,7 +98,7 @@ export declare function buildEventsTools(client: WixClient): ({
98
98
  } | undefined;
99
99
  fields?: string[] | undefined;
100
100
  eventId: string;
101
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
101
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
102
102
  status: "ok" | "failed";
103
103
  data?: unknown;
104
104
  error?: string;
@@ -18,7 +18,7 @@ export declare function buildFaqTools(client: WixClient): ({
18
18
  offset?: number | undefined;
19
19
  cursor?: string | undefined;
20
20
  } | undefined;
21
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
21
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
22
22
  status: "ok" | "failed";
23
23
  data?: unknown;
24
24
  error?: string;
@@ -44,7 +44,7 @@ export declare function buildFaqTools(client: WixClient): ({
44
44
  cursor?: string | undefined;
45
45
  } | undefined;
46
46
  categoryId?: string | undefined;
47
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
47
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
48
48
  status: "ok" | "failed";
49
49
  data?: unknown;
50
50
  error?: string;
@@ -64,7 +64,7 @@ export declare function buildFaqTools(client: WixClient): ({
64
64
  categoryId?: string | undefined;
65
65
  question: string;
66
66
  answer: string;
67
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
67
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
68
68
  status: "ok" | "failed";
69
69
  data?: unknown;
70
70
  error?: string;
@@ -86,7 +86,7 @@ export declare function buildFaqTools(client: WixClient): ({
86
86
  question?: string | undefined;
87
87
  answer?: string | undefined;
88
88
  questionId: string;
89
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
89
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
90
90
  status: "ok" | "failed";
91
91
  data?: unknown;
92
92
  error?: string;
@@ -102,7 +102,7 @@ export declare function buildFaqTools(client: WixClient): ({
102
102
  execute: (toolCallId: string, params: {
103
103
  siteId?: string | undefined;
104
104
  questionId: string;
105
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
105
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
106
106
  status: "ok" | "failed";
107
107
  data?: unknown;
108
108
  error?: string;
@@ -42,7 +42,7 @@ export declare function buildFormsTools(client: WixClient): ({
42
42
  status?: "PENDING" | "CONFIRMED" | "PAYMENT_WAITING" | "PAYMENT_CANCELED" | undefined;
43
43
  namespace?: string | undefined;
44
44
  formId?: string | undefined;
45
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
45
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
46
46
  status: "ok" | "failed";
47
47
  data?: unknown;
48
48
  error?: string;
@@ -58,7 +58,7 @@ export declare function buildFormsTools(client: WixClient): ({
58
58
  execute: (toolCallId: string, params: {
59
59
  siteId?: string | undefined;
60
60
  submissionId: string;
61
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
61
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
62
62
  status: "ok" | "failed";
63
63
  data?: unknown;
64
64
  error?: string;
@@ -18,7 +18,7 @@ export declare function buildMediaTools(client: WixClient): ({
18
18
  parentFolderId?: string | undefined;
19
19
  labels?: string[] | undefined;
20
20
  url: string;
21
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
21
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
22
22
  status: "ok" | "failed";
23
23
  data?: unknown;
24
24
  error?: string;
@@ -46,7 +46,7 @@ export declare function buildMediaTools(client: WixClient): ({
46
46
  } | undefined;
47
47
  parentFolderId?: string | undefined;
48
48
  mediaTypes?: ("IMAGE" | "VIDEO" | "AUDIO" | "DOCUMENT" | "ARCHIVE")[] | undefined;
49
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
49
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
50
50
  status: "ok" | "failed";
51
51
  data?: unknown;
52
52
  error?: string;
@@ -36,7 +36,7 @@ export declare function buildMultilingualTools(client: WixClient): ({
36
36
  cursor?: string | undefined;
37
37
  } | undefined;
38
38
  fields?: string[] | undefined;
39
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
39
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
40
40
  status: "ok" | "failed";
41
41
  data?: unknown;
42
42
  error?: string;
@@ -50,7 +50,7 @@ export declare function buildMultilingualTools(client: WixClient): ({
50
50
  }>;
51
51
  execute: (toolCallId: string, params: {
52
52
  siteId?: string | undefined;
53
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
53
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
54
54
  status: "ok" | "failed";
55
55
  data?: unknown;
56
56
  error?: string;
@@ -38,7 +38,7 @@ export declare function buildReviewsTools(client: WixClient): ({
38
38
  } | undefined;
39
39
  fields?: string[] | undefined;
40
40
  moderationStatus?: "PENDING" | "APPROVED" | "REJECTED" | undefined;
41
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
41
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
42
42
  status: "ok" | "failed";
43
43
  data?: unknown;
44
44
  error?: string;
@@ -54,7 +54,7 @@ export declare function buildReviewsTools(client: WixClient): ({
54
54
  execute: (toolCallId: string, params: {
55
55
  siteId?: string | undefined;
56
56
  reviewId: string;
57
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
57
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
58
58
  status: "ok" | "failed";
59
59
  data?: unknown;
60
60
  error?: string;
@@ -74,7 +74,7 @@ export declare function buildReviewsTools(client: WixClient): ({
74
74
  reason?: string | undefined;
75
75
  reviewId: string;
76
76
  decision: "APPROVED" | "REJECTED";
77
- }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
77
+ }, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
78
78
  status: "ok" | "failed";
79
79
  data?: unknown;
80
80
  error?: string;