@wix/ditto-codegen-public 1.0.275 → 1.0.276

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/out.js CHANGED
@@ -11736,7 +11736,9 @@ This is non-negotiable \u2014 V1 and V3 are NOT backwards compatible.
11736
11736
  **MCP Tools to use for discovery:**
11737
11737
  - \`SearchWixSDKDocumentation\` - SDK methods and APIs (**Always use maxResults: 5**)
11738
11738
  - \`ReadFullDocsArticle\` - Full documentation when needed (only if search results need more detail)
11739
- - \`ReadFullDocsMethodSchema\` - **Always call this** for any SDK method you plan to use. The schema is the source of truth for parameter shapes. Code examples may have incorrect call signatures.`;
11739
+ - \`ReadFullDocsMethodSchema\` - **Always call this** for any SDK method you plan to use. The schema is the source of truth for parameter shapes. Code examples may have incorrect call signatures.
11740
+
11741
+ \u26A0\uFE0F MANDATORY when using WDS: Invoke the wds-docs skill FIRST to get correct imports.`;
11740
11742
  }
11741
11743
  });
11742
11744
 
@@ -11760,7 +11762,6 @@ MINIMIZE TEXT OUTPUT \u2014 CRITICAL:
11760
11762
  TOOL USAGE:
11761
11763
  - \`validate\` for all validation (tsc + build). Do NOT load the \`wix-cli-app-validation\` skill.
11762
11764
  - \`uuid\` to generate UUIDs (supports count param for multiple). Do NOT use bash.
11763
- - \`wds-lookup\` for WDS component props, examples, and icons. Do NOT load the \`wds-docs\` skill.
11764
11765
  - \`batch-write\` to create new files. NEVER use \`write\` for new files (corrupts newlines).
11765
11766
  - \`batch-read\` to read multiple files at once.
11766
11767
  - \`multiedit\` to apply multiple edits across files. Use \`edit\` only for a single edit to one file.
@@ -11770,7 +11771,7 @@ TOOL USAGE:
11770
11771
 
11771
11772
  IMPLEMENTATION WORKFLOW:
11772
11773
  1. **Plan**: Determine extension types using the orchestrator rule. Generate ALL UUIDs upfront.
11773
- 2. **Load skills**: Load ALL needed extension skills + call \`wds-lookup\` \u2014 all in a SINGLE step.
11774
+ 2. **Load skills**: Load ALL needed extension skills.
11774
11775
  3. **Build**: Create each extension using \`batch-write\`. Build all extensions before registering.
11775
11776
  4. **Register**: Register all extensions in \`src/extensions.ts\`.
11776
11777
  5. **Validate**: Run \`validate\` with installDeps: true ONCE. Fix any errors and re-validate.
@@ -11957,8 +11958,7 @@ var require_config = __commonJS({
11957
11958
  ]: {
11958
11959
  "*": "allow",
11959
11960
  "wix-cli-orchestrator": "deny",
11960
- "wix-cli-app-validation": "deny",
11961
- "wds-docs": "deny"
11961
+ "wix-cli-app-validation": "deny"
11962
11962
  },
11963
11963
  task: "deny",
11964
11964
  doom_loop: "allow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.275",
3
+ "version": "1.0.276",
4
4
  "description": "AI-powered Wix CLI app generator - standalone executable",
5
5
  "scripts": {
6
6
  "build": "node build.mjs",
@@ -27,5 +27,5 @@
27
27
  "@wix/ditto-codegen": "1.0.0",
28
28
  "esbuild": "^0.27.2"
29
29
  },
30
- "falconPackageHash": "352869c28ac83ecb225859390e89cd550320daaf41e71cbf9168f85e"
30
+ "falconPackageHash": "1212d652bb6c9d6de4f66f9514bac8f1a1c1f570af023d50dcc95d30"
31
31
  }
@@ -1,134 +0,0 @@
1
- import { tool } from "@opencode-ai/plugin";
2
- import { readFile, readdir } from "fs/promises";
3
- import { join } from "path";
4
- const MAX_EXAMPLE_LINES = 80;
5
-
6
- const stripBlankLines = (s: string): string =>
7
- s.split("\n").filter((l) => l.trim().length > 0).join("\n");
8
-
9
- function parseComponentNames(files: string[]): string[] {
10
- const names = new Set<string>();
11
- for (const f of files) {
12
- const m = f.match(/^(.+?)(Props|Examples)\.md$/);
13
- if (m) names.add(m[1]);
14
- }
15
- return [...names].sort();
16
- }
17
-
18
- function trimExamples(raw: string): string {
19
- const lines = raw.split("\n");
20
- const headers: number[] = [];
21
- lines.forEach((l, i) => {
22
- if (l.startsWith("### ")) headers.push(i);
23
- });
24
- const end =
25
- headers.length > 2
26
- ? headers[2]
27
- : Math.min(lines.length, MAX_EXAMPLE_LINES);
28
- return lines.slice(0, end).join("\n");
29
- }
30
-
31
- export default tool({
32
- description:
33
- "Look up Wix Design System (WDS) component props, examples, and icons. " +
34
- "Use this INSTEAD of the wds-docs skill. " +
35
- "Pass component names to get their props (lightweight). " +
36
- "Pass example names ONLY for complex components where you need usage patterns. " +
37
- "Set listAll/listIcons to discover available components/icons. " +
38
- "Combine all in one call. NEVER look up the same component twice.",
39
- args: {
40
- listAll: tool.schema
41
- .boolean()
42
- .optional()
43
- .describe("List all available WDS component names."),
44
- components: tool.schema
45
- .array(tool.schema.string())
46
- .optional()
47
- .describe(
48
- "Component names to get PROPS for, e.g. ['Table', 'Input'].",
49
- ),
50
- examples: tool.schema
51
- .array(tool.schema.string())
52
- .optional()
53
- .describe(
54
- "Component names to get EXAMPLES for. Only use for complex/unfamiliar components.",
55
- ),
56
- listIcons: tool.schema
57
- .boolean()
58
- .optional()
59
- .describe("List all available WDS icon names."),
60
- },
61
- async execute(args, context) {
62
- const docsPath = join(
63
- context.directory,
64
- "node_modules",
65
- "@wix",
66
- "design-system",
67
- "dist",
68
- "docs",
69
- );
70
- const compsDir = join(docsPath, "components");
71
- const sections: string[] = [];
72
-
73
- if (args.listAll) {
74
- try {
75
- const files = await readdir(compsDir);
76
- const names = parseComponentNames(files);
77
- sections.push(
78
- `## Available WDS Components (${names.length})\n${names.join(", ")}`,
79
- );
80
- } catch (e) {
81
- const msg = e instanceof Error ? e.message : String(e);
82
- sections.push(`ERROR listing components: ${msg}`);
83
- }
84
- }
85
-
86
- if (args.components?.length) {
87
- for (const comp of args.components) {
88
- try {
89
- const raw = await readFile(
90
- join(compsDir, `${comp}Props.md`),
91
- "utf-8",
92
- );
93
- sections.push(`## ${comp} Props\n${raw}`);
94
- } catch {
95
- sections.push(`## ${comp} Props\nNot found: ${comp}Props.md`);
96
- }
97
- }
98
- }
99
-
100
- if (args.examples?.length) {
101
- for (const comp of args.examples) {
102
- try {
103
- const raw = await readFile(
104
- join(compsDir, `${comp}Examples.md`),
105
- "utf-8",
106
- );
107
- sections.push(`## ${comp} Examples\n${trimExamples(raw)}`);
108
- } catch {
109
- sections.push(`## ${comp} Examples\nNot found: ${comp}Examples.md`);
110
- }
111
- }
112
- }
113
-
114
- if (args.listIcons) {
115
- try {
116
- const iconsMd = await readFile(join(docsPath, "icons.md"), "utf-8");
117
- sections.push(iconsMd);
118
- } catch (e) {
119
- const msg = e instanceof Error ? e.message : String(e);
120
- sections.push(`ERROR reading icons.md: ${msg}`);
121
- }
122
- }
123
-
124
- if (!sections.length) {
125
- return "No query provided. Pass listAll, components, examples, or listIcons.";
126
- }
127
-
128
- return stripBlankLines(
129
- "IMPORTS: Components from '@wix/design-system', icons from '@wix/wix-ui-icons-common'.\n" +
130
- "CSS: import '@wix/design-system/styles.global.css';\n\n" +
131
- sections.join("\n\n"),
132
- );
133
- },
134
- });