@radicool/throughline 0.21.1 → 0.21.2
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/README.md +1 -1
- package/adapters/codex/prompts/figma-environment-setup.md +14 -5
- package/adapters/cursor/.cursor/rules/figma-environment-setup.mdc +14 -5
- package/adapters/generic/skills/figma-environment-setup/SKILL.md +14 -5
- package/package.json +1 -1
- package/scripts/adapters/read-sources.mjs +7 -1
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Everything above was created during a single working session and synced directly
|
|
|
82
82
|
|
|
83
83
|
ThroughLine runs one local server, and it doesn't upload anything itself.
|
|
84
84
|
|
|
85
|
-
- **One local MCP server.** Installing the plugin registers [`figma-console-mcp`](https://www.npmjs.com/package/figma-console-mcp), pinned to version 1.40.8, which your agent starts on your computer with `npx`. It reaches the Figma desktop app through the Desktop Bridge plugin you run in Figma. That's how ThroughLine reads and writes your file.
|
|
85
|
+
- **One local MCP server.** Installing the plugin registers [`figma-console-mcp`](https://www.npmjs.com/package/figma-console-mcp), pinned to version 1.40.8, which your agent starts on your computer with `npx`. It reaches the Figma desktop app through the Desktop Bridge plugin you run in Figma. That's how ThroughLine reads and writes your file. For the Figma calls the bridge can't make, it uses a Figma access token if you give it one. Claude Code asks for the token as a plugin setting and keeps it in your system's secure credential store. It's optional. The Cursor, Codex and generic installs read it from `FIGMA_ACCESS_TOKEN` instead.
|
|
86
86
|
- **Files in your repo.** The skills write design-system files where you point them: token sources, the Style Dictionary build, components, stories, `design-system.json`, and the proof records in `design-system/proof/`. The helper scripts they install read and write local files and make no network calls.
|
|
87
87
|
- **Chromatic, if you choose it.** Setting up Chromatic adds a CI workflow that uploads your Storybook to your Chromatic project, using a `CHROMATIC_PROJECT_TOKEN` you place yourself. Skip that step and nothing goes to Chromatic.
|
|
88
88
|
|
|
@@ -272,11 +272,20 @@ them through it:
|
|
|
272
272
|
|
|
273
273
|
**Secret-handling rule (non-negotiable):** the token value must never pass
|
|
274
274
|
through the chat. Do not ask the user to paste it to you. Instead, tell them
|
|
275
|
-
exactly where it goes
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
exactly where it goes and have them place it there themselves:
|
|
276
|
+
|
|
277
|
+
- **Installed as a plugin through `/plugin`:** run `/plugin`, open the
|
|
278
|
+
**Installed** tab, select ThroughLine, and choose **Configure options**. The
|
|
279
|
+
token goes in the **Figma access token** field, which masks it and keeps it in
|
|
280
|
+
the system's secure credential store. The plugin may already have asked for it
|
|
281
|
+
when it was first turned on. A `FIGMA_ACCESS_TOKEN` set in their shell is not
|
|
282
|
+
read in this case.
|
|
283
|
+
- **Otherwise:** the MCP configuration reads it from an environment variable
|
|
284
|
+
named `FIGMA_ACCESS_TOKEN`; follow the setup notes for their agent.
|
|
285
|
+
|
|
286
|
+
If they're unsure where that is, walk them to it, but you never see or handle
|
|
287
|
+
the token. Reassure them this is normal and good — their password-like token
|
|
288
|
+
stays theirs.
|
|
280
289
|
|
|
281
290
|
### 4c. Run the desktop bridge plugin and pair
|
|
282
291
|
|
|
@@ -276,11 +276,20 @@ them through it:
|
|
|
276
276
|
|
|
277
277
|
**Secret-handling rule (non-negotiable):** the token value must never pass
|
|
278
278
|
through the chat. Do not ask the user to paste it to you. Instead, tell them
|
|
279
|
-
exactly where it goes
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
279
|
+
exactly where it goes and have them place it there themselves:
|
|
280
|
+
|
|
281
|
+
- **Installed as a plugin through `/plugin`:** run `/plugin`, open the
|
|
282
|
+
**Installed** tab, select ThroughLine, and choose **Configure options**. The
|
|
283
|
+
token goes in the **Figma access token** field, which masks it and keeps it in
|
|
284
|
+
the system's secure credential store. The plugin may already have asked for it
|
|
285
|
+
when it was first turned on. A `FIGMA_ACCESS_TOKEN` set in their shell is not
|
|
286
|
+
read in this case.
|
|
287
|
+
- **Otherwise:** the MCP configuration reads it from an environment variable
|
|
288
|
+
named `FIGMA_ACCESS_TOKEN`; follow the setup notes for their agent.
|
|
289
|
+
|
|
290
|
+
If they're unsure where that is, walk them to it, but you never see or handle
|
|
291
|
+
the token. Reassure them this is normal and good — their password-like token
|
|
292
|
+
stays theirs.
|
|
284
293
|
|
|
285
294
|
### 4c. Run the desktop bridge plugin and pair
|
|
286
295
|
|
|
@@ -272,11 +272,20 @@ them through it:
|
|
|
272
272
|
|
|
273
273
|
**Secret-handling rule (non-negotiable):** the token value must never pass
|
|
274
274
|
through the chat. Do not ask the user to paste it to you. Instead, tell them
|
|
275
|
-
exactly where it goes
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
exactly where it goes and have them place it there themselves:
|
|
276
|
+
|
|
277
|
+
- **Installed as a plugin through `/plugin`:** run `/plugin`, open the
|
|
278
|
+
**Installed** tab, select ThroughLine, and choose **Configure options**. The
|
|
279
|
+
token goes in the **Figma access token** field, which masks it and keeps it in
|
|
280
|
+
the system's secure credential store. The plugin may already have asked for it
|
|
281
|
+
when it was first turned on. A `FIGMA_ACCESS_TOKEN` set in their shell is not
|
|
282
|
+
read in this case.
|
|
283
|
+
- **Otherwise:** the MCP configuration reads it from an environment variable
|
|
284
|
+
named `FIGMA_ACCESS_TOKEN`; follow the setup notes for their agent.
|
|
285
|
+
|
|
286
|
+
If they're unsure where that is, walk them to it, but you never see or handle
|
|
287
|
+
the token. Reassure them this is normal and good — their password-like token
|
|
288
|
+
stays theirs.
|
|
280
289
|
|
|
281
290
|
### 4c. Run the desktop bridge plugin and pair
|
|
282
291
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radicool/throughline",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "Build a complete design system end to end — author in Figma, sync tokens to code, generate Storybook. Usable from Claude Code, Cursor, Codex, or any AGENTS.md agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,9 +21,15 @@ function readJson(path) {
|
|
|
21
21
|
return JSON.parse(readFileSync(path, 'utf8'));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
// `${user_config.KEY}` only resolves inside Claude Code; other agents read the
|
|
25
|
+
// same value from the environment variable of the uppercased key.
|
|
26
|
+
export function userConfigToEnv(text) {
|
|
27
|
+
return text.replace(/\$\{user_config\.([A-Za-z_][A-Za-z0-9_]*)\}/g, (_, key) => `\${${key.toUpperCase()}}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
export function readSources(repoRoot) {
|
|
25
31
|
const plugin = readJson(join(repoRoot, '.claude-plugin', 'plugin.json'));
|
|
26
|
-
const mcp =
|
|
32
|
+
const mcp = JSON.parse(userConfigToEnv(readFileSync(join(repoRoot, '.mcp.json'), 'utf8')));
|
|
27
33
|
|
|
28
34
|
const skillsDir = join(repoRoot, 'skills');
|
|
29
35
|
const skills = readdirSync(skillsDir, { withFileTypes: true })
|