takomi 2.1.12 → 2.1.13
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.
|
@@ -27,6 +27,48 @@ Use this skill only for **React-family** projects. If the repo is not React-base
|
|
|
27
27
|
- `scripts/build-manual-handoff-template.mjs`
|
|
28
28
|
Generate a manual handoff markdown file for the user.
|
|
29
29
|
|
|
30
|
+
## Raw Code Resolution Standard
|
|
31
|
+
|
|
32
|
+
Do not derive 21st.dev CDN source URLs by string concatenation or by manually modifying the community page URL.
|
|
33
|
+
|
|
34
|
+
Always treat the user-facing 21st.dev component page as the source of truth, then resolve it into metadata before fetching code.
|
|
35
|
+
|
|
36
|
+
### Required workflow
|
|
37
|
+
1. Start with the 21st.dev community component URL.
|
|
38
|
+
2. Run the resolver script on that page URL.
|
|
39
|
+
3. Read `codeUrl` and `demoCodeUrl` from the resolver output.
|
|
40
|
+
4. Fetch source from those returned URLs.
|
|
41
|
+
5. Only fall back to manual copy/paste if resolution succeeds but raw source cannot be fetched in the current environment.
|
|
42
|
+
|
|
43
|
+
### Command
|
|
44
|
+
```bash
|
|
45
|
+
node scripts/resolve-21st-component.mjs --url "<21st-component-url>" --json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Why this rule exists
|
|
49
|
+
21st.dev community URLs do not always map cleanly to CDN paths. Mismatches can include:
|
|
50
|
+
- author slug differences between page URL and CDN path
|
|
51
|
+
- internal user IDs in CDN paths instead of public author names
|
|
52
|
+
- timestamped filenames such as `code.1748367465506.tsx`
|
|
53
|
+
- version query params such as `?v=1`
|
|
54
|
+
- demo paths that are not reliably predictable
|
|
55
|
+
|
|
56
|
+
Because of this, the correct standard is:
|
|
57
|
+
|
|
58
|
+
**community page URL -> resolve metadata -> fetch `codeUrl` / `demoCodeUrl`**
|
|
59
|
+
|
|
60
|
+
not:
|
|
61
|
+
|
|
62
|
+
**community page URL -> manually transform into CDN URL**
|
|
63
|
+
|
|
64
|
+
### Manual fallback rule
|
|
65
|
+
If the resolver returns metadata but the environment cannot fetch the raw source files, ask the user for one of these:
|
|
66
|
+
- pasted code from the 21st.dev Copy Code action
|
|
67
|
+
- downloaded component source
|
|
68
|
+
- permission to use an alternate environment that can fetch the returned CDN URLs
|
|
69
|
+
|
|
70
|
+
This resolution step is mandatory in both Auto mode and Manual mode whenever the environment allows it.
|
|
71
|
+
|
|
30
72
|
## Mode Router
|
|
31
73
|
|
|
32
74
|
### Use Auto mode when
|
|
@@ -107,6 +149,8 @@ Prefer:
|
|
|
107
149
|
|
|
108
150
|
### Step 6: Fetch source and integrate
|
|
109
151
|
|
|
152
|
+
Fetch component/demo source from the resolved `codeUrl` and `demoCodeUrl` values. Do not guess CDN paths manually.
|
|
153
|
+
|
|
110
154
|
Fetch component/demo source from CDN URLs:
|
|
111
155
|
|
|
112
156
|
```bash
|
|
@@ -173,7 +217,8 @@ Do not make the user re-explain the same page structure if the handoff already c
|
|
|
173
217
|
|
|
174
218
|
For each returned section:
|
|
175
219
|
- resolve the component URL if present
|
|
176
|
-
-
|
|
220
|
+
- read normalized metadata first, especially `codeUrl`, `demoCodeUrl`, and dependencies
|
|
221
|
+
- fetch source from the resolved raw URLs when needed
|
|
177
222
|
- merge copied prompt/code information with repo context
|
|
178
223
|
- install dependencies
|
|
179
224
|
- adapt imports, component paths, and utility functions to the current repo
|
|
@@ -190,6 +235,7 @@ For each returned section:
|
|
|
190
235
|
|
|
191
236
|
- Bad reference URL or blocked crawl: switch to Manual mode and generate a handoff template.
|
|
192
237
|
- 21st.dev page resolves but source URLs are missing: use the copied prompt path or ask for the component's copied prompt/code only for that section.
|
|
238
|
+
- Resolver succeeds but the environment cannot fetch the raw CDN URLs: ask the user for pasted Copy Code output, downloaded source, or permission to use another environment for fetch.
|
|
193
239
|
- Non-React target repo: explain the limitation and stop.
|
|
194
240
|
|
|
195
241
|
## Output Defaults
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "takomi",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.13",
|
|
4
4
|
"description": "🎯 Stop wrestling with AI. Start building with purpose. The artisan's toolkit for agent workflows, Codex skills, and original Takomi capabilities like 21st.dev integration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|