@framer/agent 0.0.38 → 0.0.39
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/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import { fileURLToPath } from 'url';
|
|
|
13
13
|
import net from 'net';
|
|
14
14
|
import { createTRPCClient, httpLink } from '@trpc/client';
|
|
15
15
|
|
|
16
|
-
/* @framer/ai CLI v0.0.
|
|
16
|
+
/* @framer/ai CLI v0.0.39 */
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
18
18
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
19
19
|
|
|
@@ -397,7 +397,7 @@ __name(markTelemetryNoticeShown, "markTelemetryNoticeShown");
|
|
|
397
397
|
// src/version.ts
|
|
398
398
|
var VERSION = (
|
|
399
399
|
// typeof is used to ensure this can be used just via tsx or node etc. without build
|
|
400
|
-
"0.0.
|
|
400
|
+
"0.0.39"
|
|
401
401
|
);
|
|
402
402
|
var trackingEndpoint = "https://events.framer.com/track";
|
|
403
403
|
var inProgressTrackings = /* @__PURE__ */ new Set();
|
|
@@ -4391,6 +4391,12 @@ var types = {
|
|
|
4391
4391
|
type: "FontStyle$1 | null",
|
|
4392
4392
|
description: "",
|
|
4393
4393
|
optional: false
|
|
4394
|
+
},
|
|
4395
|
+
{
|
|
4396
|
+
name: "url",
|
|
4397
|
+
type: "string | null",
|
|
4398
|
+
description: "",
|
|
4399
|
+
optional: false
|
|
4394
4400
|
}
|
|
4395
4401
|
]
|
|
4396
4402
|
},
|
|
@@ -7690,12 +7696,6 @@ var types = {
|
|
|
7690
7696
|
description: "@alpha",
|
|
7691
7697
|
optional: false
|
|
7692
7698
|
},
|
|
7693
|
-
{
|
|
7694
|
-
name: "reviewChangesForAgent",
|
|
7695
|
-
type: "(options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7696
|
-
description: "@alpha",
|
|
7697
|
-
optional: false
|
|
7698
|
-
},
|
|
7699
7699
|
{
|
|
7700
7700
|
name: "flattenComponentInstanceForAgent",
|
|
7701
7701
|
type: "(input: {\n id: string;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
@@ -13059,6 +13059,13 @@ var methodsByCategory = {
|
|
|
13059
13059
|
description: "Specifies if the font is normal or _italic_.\n\nNote: This will be `null` for custom fonts since their weight isn't\ncalculated.",
|
|
13060
13060
|
references: ["FontStyle$1"]
|
|
13061
13061
|
},
|
|
13062
|
+
{
|
|
13063
|
+
name: "url",
|
|
13064
|
+
category: "Font",
|
|
13065
|
+
signature: "url: string | null",
|
|
13066
|
+
description: "URL of the font's primary file, which can be used to render the font\n(for example in an `@font-face` rule). Intended for previewing a font;\nit may not cover every unicode range on its own.\n\n`null` when the font has no downloadable source file.",
|
|
13067
|
+
references: []
|
|
13068
|
+
},
|
|
13062
13069
|
{
|
|
13063
13070
|
name: "weight",
|
|
13064
13071
|
category: "Font",
|
|
@@ -14252,7 +14259,7 @@ var methodsByCategory = {
|
|
|
14252
14259
|
name: "applyChanges",
|
|
14253
14260
|
category: "FramerAgentAPI",
|
|
14254
14261
|
signature: "applyChanges(dsl: string, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14255
|
-
description: 'Applies commands to the canvas to create, update, remove, move, or duplicate nodes.\n\nThe command syntax is documented in the string returned by {@link getSystemPrompt}.\nEach call is scoped to a single page.\n\nCommands that fail (including syntax errors) are reported in the result\'s `errors`\nwithout blocking the remaining commands
|
|
14262
|
+
description: 'Applies commands to the canvas to create, update, remove, move, or duplicate nodes.\n\nThe command syntax is documented in the string returned by {@link getSystemPrompt}.\nEach call is scoped to a single page.\n\nCommands that fail (including syntax errors) are reported in the result\'s `errors`\nwithout blocking the remaining commands.\n\nThe result schema is documented in the string returned by {@link getSystemPrompt}.\n\n@param dsl - A string of commands separated by `;`. See {@link getSystemPrompt} for syntax.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The command status and errors, and the canonical system ids of created nodes.',
|
|
14256
14263
|
references: []
|
|
14257
14264
|
},
|
|
14258
14265
|
{
|
|
@@ -14493,13 +14500,6 @@ var methodsByCategory = {
|
|
|
14493
14500
|
description: 'Replaces text within a text-like node.\n\n@param input - `{ id, searchText, replaceText }`: the target node id, text to find, and replacement text.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns `true` when text was replaced, or `false` when no matching text was found.',
|
|
14494
14501
|
references: []
|
|
14495
14502
|
},
|
|
14496
|
-
{
|
|
14497
|
-
name: "reviewChanges",
|
|
14498
|
-
category: "FramerAgentAPI",
|
|
14499
|
-
signature: "reviewChanges(): Promise<unknown>",
|
|
14500
|
-
description: "Reviews changes made by prior {@link applyChanges} calls in this session.\n\nConsumes accumulated diagnostics from the session's agent context. Command errors\nalready returned by {@link applyChanges} are not repeated here.\n\n@returns The session's accumulated changes, errors, warnings, and deferred trait reports.",
|
|
14501
|
-
references: []
|
|
14502
|
-
},
|
|
14503
14503
|
{
|
|
14504
14504
|
name: "serialize",
|
|
14505
14505
|
category: "FramerAgentAPI",
|
|
@@ -15,7 +15,7 @@ import { createRequire } from 'module';
|
|
|
15
15
|
import * as vm from 'vm';
|
|
16
16
|
import isWsl from 'is-wsl';
|
|
17
17
|
|
|
18
|
-
/* @framer/ai relay server v0.0.
|
|
18
|
+
/* @framer/ai relay server v0.0.39 */
|
|
19
19
|
var __defProp = Object.defineProperty;
|
|
20
20
|
var __knownSymbol = (name2, symbol) => (symbol = Symbol[name2]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name2);
|
|
21
21
|
var __typeError = (msg) => {
|
|
@@ -200,7 +200,7 @@ __name(debug, "debug");
|
|
|
200
200
|
// src/version.ts
|
|
201
201
|
var VERSION = (
|
|
202
202
|
// typeof is used to ensure this can be used just via tsx or node etc. without build
|
|
203
|
-
"0.0.
|
|
203
|
+
"0.0.39"
|
|
204
204
|
);
|
|
205
205
|
|
|
206
206
|
// src/relay-client.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framer/agent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
4
4
|
"description": "CLI and skills for connecting your AI agents to Framer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/cli.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@trpc/client": "^11.17.0",
|
|
26
26
|
"@trpc/server": "^11.17.0",
|
|
27
27
|
"commander": "^12.1.0",
|
|
28
|
-
"framer-api": "^0.1.
|
|
28
|
+
"framer-api": "^0.1.24",
|
|
29
29
|
"is-wsl": "^3.1.1",
|
|
30
30
|
"zod": "^4.4.3"
|
|
31
31
|
},
|
package/skills/framer/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: framer
|
|
3
3
|
description: >
|
|
4
|
-
Use when the user wants to design, edit, or publish a website or web page — creating layouts, editing sections, updating text or images, managing CMS collections and content, syncing external data, creating or modifying code components, managing color and text styles, handling localization, or publishing deployments. Trigger when the user mentions Framer, references their website or web pages, asks to edit designs, update site content, or work with any Framer project — even if they don't explicitly say 'Framer'.
|
|
4
|
+
Use when the user wants to design, edit, analyze, or publish a website or web page — creating layouts, editing sections, updating text or images, querying site analytics, managing CMS collections and content, syncing external data, creating or modifying code components, managing color and text styles, handling localization, or publishing deployments. Trigger when the user mentions Framer, references their website or web pages, asks to edit designs, update site content, analyze site traffic or conversions, or work with any Framer project — even if they don't explicitly say 'Framer'.
|
|
5
5
|
**Mandatory precondition**: run `{{FRAMER_AGENT_COMMAND}}@latest setup` and let it complete **BEFORE** loading this skill.
|
|
6
6
|
allowed-tools:
|
|
7
7
|
- 'Bash({{FRAMER_AGENT_COMMAND}}:*)'
|
|
@@ -22,6 +22,7 @@ If you didn't run this command before loading the skill, run it now:
|
|
|
22
22
|
What you can do with the Framer CLI:
|
|
23
23
|
|
|
24
24
|
- **Canvas Editing**: For design tasks — creating or editing pages, sections, layouts, recreating designs from screenshots, etc.
|
|
25
|
+
- **Analytics**: Query traffic, visitors, page views, conversions, and events.
|
|
25
26
|
- **CMS**: Create, read, update, delete collections and items. Sync external databases.
|
|
26
27
|
- **Styles**: Manage color and text styles. Sync design systems.
|
|
27
28
|
- **Code Components**: Create, edit, type-check, and add custom React components to the canvas.
|
|
@@ -93,7 +94,7 @@ projects/<safeProjectId>/
|
|
|
93
94
|
The generated `project-inventory.md` includes a snapshot of project context from `framer.agent.getContext()`, including pages, components, CMS data, styles, fonts, icons, and IDs when available.
|
|
94
95
|
The source template for generated project files lives at `projects/__template__/`. Files ending in `.template.md` are rendered into generated files without the `.template` marker.
|
|
95
96
|
|
|
96
|
-
Before
|
|
97
|
+
Before starting any task, read `projects/<safeProjectId>/index.md` first. It contains a **task map**: read every item marked required in its "Always" row, including `prompt/critical-reminders.md`, then the row that matches your work — and every additional row a multi-domain task touches. The map routes you to the exact `prompt/` sections, `recipes.md` entries, and implementation guides for that task; read only what the map points to.
|
|
97
98
|
|
|
98
99
|
Read `projects/<safeProjectId>/project-inventory.md` before using project-specific IDs, page paths, component names, CMS collection names, style preset names, or icon names. Treat it as a generated snapshot; when the project may have changed, use `{{FRAMER_AGENT_COMMAND}}@latest read-project` for fresh live project state.
|
|
99
100
|
|
|
@@ -145,15 +146,30 @@ Prefer `framer.agent.*` methods over regular plugin API methods when an agent-sp
|
|
|
145
146
|
|
|
146
147
|
### Execute Code
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
Name files `<sessionId>-<short-summary>.js`, for example `1-read-collections.js`.
|
|
149
|
+
For multiline or non-trivial code, use one `exec` call and send the code on stdin. In POSIX shells, use a quoted heredoc so the shell cannot expand `$`, backticks, or command substitutions in the JavaScript:
|
|
151
150
|
|
|
152
151
|
```bash
|
|
153
|
-
{{FRAMER_AGENT_COMMAND}}@latest exec -s 1
|
|
152
|
+
{{FRAMER_AGENT_COMMAND}}@latest exec -s 1 <<'FRAMER_EXEC'
|
|
153
|
+
const collections = await framer.getCollections();
|
|
154
|
+
state.collections = collections;
|
|
155
|
+
console.log(collections);
|
|
156
|
+
FRAMER_EXEC
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
In Windows PowerShell, use the equivalent single-quoted here-string to prevent interpolation and pipe it to `exec`:
|
|
160
|
+
|
|
161
|
+
```powershell
|
|
162
|
+
@'
|
|
163
|
+
const projectInfo = await framer.getProjectInfo();
|
|
164
|
+
console.log(projectInfo);
|
|
165
|
+
'@ | {{FRAMER_AGENT_COMMAND}}@latest exec -s 1
|
|
154
166
|
```
|
|
155
167
|
|
|
156
|
-
For short snippets,
|
|
168
|
+
For genuinely short snippets, use `-e <code>`:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
{{FRAMER_AGENT_COMMAND}}@latest exec -s 1 -e 'console.log(await framer.getProjectInfo())'
|
|
172
|
+
```
|
|
157
173
|
|
|
158
174
|
### Use `state`
|
|
159
175
|
|
|
@@ -16,9 +16,10 @@ This `index.md` is the map. Read the **Always** row first — it is the core fou
|
|
|
16
16
|
|
|
17
17
|
| Doing… | Read before you start |
|
|
18
18
|
|---|---|
|
|
19
|
-
| **Always — every change** | All files are required: [[prompt/core-principles.md]] (layout, spacing, width, fills, overflow) · [[prompt/core-examples.md]] (worked DSL patterns) · [[prompt/implementation-strategy.md]] (pick creation/edit/recreation, write a design plan, settle reusable-systems + site-metadata) · [[prompt/updating-the-project.md]] (DSL grammar) · [[prompt/tools.md]] (
|
|
19
|
+
| **Always — every change** | All files are required: [[prompt/core-principles.md]] (layout, spacing, width, fills, overflow) · [[prompt/core-examples.md]] (worked DSL patterns) · [[prompt/implementation-strategy.md]] (pick creation/edit/recreation, write a design plan, settle reusable-systems + site-metadata) · [[prompt/updating-the-project.md]] (DSL grammar) · [[prompt/tools.md]] (available tools and when to use them). House rules: [[prompt/overview.md]], [[prompt/guardrails.md]], [[prompt/critical-reminders.md]]. |
|
|
20
20
|
| **Pages / sections** — create, redesign, add sections, visual polish, review | + [[prompt/design-rules.md]] · [[prompt/how-projects-work.md]] §Layout Recipe + §Width Rules + §Links |
|
|
21
21
|
| **Responsive breakpoints** | [[recipes.md]] § Responsive breakpoints · [[prompt/how-projects-work.md]] §Layout Recipe (rules 7–8) |
|
|
22
|
+
| **Analytics** — traffic, visitors, page views, conversions, events | guide **Analytics** |
|
|
22
23
|
| **CMS** — collections, items, fields, collection lists, CMS-backed content | [[prompt/how-projects-work.md]] §CMS · [[prompt/updating-the-project.md]] (variable/CMS DSL) · guide **CMS Collection Lists** |
|
|
23
24
|
| **CMS detail pages** | [[prompt/how-projects-work.md]] §CMS detail pages · guide **CMS Detail Pages** |
|
|
24
25
|
| **Components / variants / icons** | [[prompt/how-projects-work.md]] §Components + §Icons · guide **Buttons** or others as needed |
|