framer-dalton 0.0.26 → 0.0.27

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 CHANGED
@@ -23,7 +23,7 @@ The CLI and the installed skills are meant to work together. There are three ski
23
23
  1. Running `npx framer-dalton@latest setup` will install the base `framer` and `framer-code-components` skills.
24
24
  2. The frontmatter of `framer-code-components` tells agents to always load `framer` and the generated project skill first.
25
25
  3. The frontmatter of `framer` tells agents to run `npx framer-dalton@latest setup` BEFORE loading the skill. This command will auto-update the cli and update the skill files.
26
- 4. Creating a new session for a project will create a `framer-project-<project id>` file. This file contains the latest agent system prompt from `framer.getAgentSystemPrompt` and the latest project context from `framer.getAgentContext`. Agents must load this project-specific skill immediately after creating a session before doing any connected-project work.
26
+ 4. Creating a new session for a project will create a `framer-project-<project id>` file. This file contains the latest agent system prompt from `framer.agent.getSystemPrompt` and the latest project context from `framer.agent.getContext`. Agents must load this project-specific skill immediately after creating a session before doing any connected-project work.
27
27
 
28
28
  ## Local Development
29
29
 
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import net from 'net';
12
12
  import { fileURLToPath } from 'url';
13
13
  import { createTRPCClient, httpLink } from '@trpc/client';
14
14
 
15
- /* @framer/ai CLI v0.0.26 */
15
+ /* @framer/ai CLI v0.0.27 */
16
16
  var __defProp = Object.defineProperty;
17
17
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
18
18
 
@@ -375,7 +375,7 @@ __name(markTelemetryNoticeShown, "markTelemetryNoticeShown");
375
375
  // src/version.ts
376
376
  var VERSION = (
377
377
  // typeof is used to ensure this can be used just via tsx or node etc. without build
378
- "0.0.26"
378
+ "0.0.27"
379
379
  );
380
380
  var trackingEndpoint = "https://events.framer.com/track";
381
381
  var inProgressTrackings = /* @__PURE__ */ new Set();
@@ -11036,6 +11036,10 @@ var classes = {
11036
11036
  name: "framer",
11037
11037
  description: ""
11038
11038
  },
11039
+ frameragentapi: {
11040
+ name: "FramerAgentAPI",
11041
+ description: 'Agent-specific methods exposed by framer-api as its agent namespace.\n\nEach method delegates to the corresponding wire-protocol name on the engine\n(e.g. `agent.publish(...)` invokes `"publishForAgent"`).'
11042
+ },
11039
11043
  framerapierror: {
11040
11044
  name: "FramerAPIError",
11041
11045
  description: ""
@@ -13260,179 +13264,11 @@ var methodsByCategory = {
13260
13264
  }
13261
13265
  ],
13262
13266
  framer: [
13263
- {
13264
- name: "[$framerApiOnly.applyAgentChanges]",
13265
- category: "framer",
13266
- signature: "[$framerApiOnly.applyAgentChanges](dsl: string, options?: { pagePath?: string; }): Promise<void>",
13267
- 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 getAgentSystemPrompt}.\nEach call is scoped to a single page.\n\n@param dsl - A string of commands separated by `;`. See {@link getAgentSystemPrompt} for syntax.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.',
13268
- references: []
13269
- },
13270
- {
13271
- name: "[$framerApiOnly.flattenComponentInstanceForAgent]",
13272
- category: "framer",
13273
- signature: "[$framerApiOnly.flattenComponentInstanceForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13274
- description: 'Flattens a local component instance into raw editable layers.\n\n@param input - `{ id }`: the id of the component instance to flatten.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The flatten result \u2014 `success` with a `replacementId`, or `blocked` with a reason.',
13275
- references: []
13276
- },
13277
- {
13278
- name: "[$framerApiOnly.getAgentContext]",
13279
- category: "framer",
13280
- signature: "[$framerApiOnly.getAgentContext](options?: { pagePath?: string; }): Promise<string>",
13281
- description: 'Returns the dynamic project context as a string.\n\nThe context includes project-specific data:\n- **Available fonts** \u2014 font families loaded in the project.\n- **Components** \u2014 component names and their controls.\n- **Design tokens** \u2014 color tokens defined in the project.\n- **Style presets** \u2014 text style presets defined in the project.\n- **Icon sets** \u2014 available icon sets and their definitions.\n\nThis data changes per project and page. Pair with the static prompt\nfrom {@link getAgentSystemPrompt} for complete agent context.\n\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns A string containing the project context.',
13282
- references: []
13283
- },
13284
- {
13285
- name: "[$framerApiOnly.getAgentSystemPrompt]",
13286
- category: "framer",
13287
- signature: "[$framerApiOnly.getAgentSystemPrompt](): Promise<string>",
13288
- description: "Returns the static agent system prompt as a string.\n\nThe prompt includes:\n- **Command reference** \u2014 syntax for adding, updating, removing, moving, and duplicating nodes.\n- **Design rules** \u2014 spacing, layout, typography, and responsive design guidance.\n- **Examples** \u2014 common UI patterns expressed as commands.\n- **`readProjectForAgent` query reference** \u2014 available query types and their parameters.\n\nThis is the sole documentation for the command syntax used by {@link applyAgentChanges}\nand the query types used by {@link readProjectForAgent}.\n\nThe prompt is static and does not depend on any specific project.\nCall {@link getAgentContext} to get the project-specific context.\n\n@returns A string containing the agent system prompt.",
13289
- references: []
13290
- },
13291
- {
13292
- name: "[$framerApiOnly.getAncestorsForAgent]",
13293
- category: "framer",
13294
- signature: "[$framerApiOnly.getAncestorsForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13295
- description: 'Get every ancestor of a node, from the direct parent up to the page root.\n\n@param input - `{ id }`: the id of the node to start from.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The ancestors ordered from closest parent to the page root.',
13296
- references: []
13297
- },
13298
- {
13299
- name: "[$framerApiOnly.getGroundNodeForAgent]",
13300
- category: "framer",
13301
- signature: "[$framerApiOnly.getGroundNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13302
- description: 'Get the top-level node on the canvas that contains the given node.\n\n@param input - `{ id }`: the id of a descendant node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The top-level node, or `null` if none applies.',
13303
- references: []
13304
- },
13305
- {
13306
- name: "[$framerApiOnly.getNodeForAgent]",
13307
- category: "framer",
13308
- signature: "[$framerApiOnly.getNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13309
- description: 'Get a single node on the page, including its children.\n\n@param input - `{ id }`: the id of the node to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The node, or `null` if no node with that id exists on the page.',
13310
- references: []
13311
- },
13312
- {
13313
- name: "[$framerApiOnly.getNodesForAgent]",
13314
- category: "framer",
13315
- signature: "[$framerApiOnly.getNodesForAgent](input: { ids: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13316
- description: 'Get multiple nodes on the page, including their children.\nIds that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }`: the ids of the nodes to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The nodes that were found, in input order.',
13317
- references: []
13318
- },
13319
- {
13320
- name: "[$framerApiOnly.getNodesOfTypesForAgent]",
13321
- category: "framer",
13322
- signature: "[$framerApiOnly.getNodesOfTypesForAgent](input: { types: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13323
- description: 'Get every node on the page of one or more kinds (e.g. `"FrameNode"`, `"RichTextNode"`, `"ComponentInstanceNode"`).\n\n@param input - `{ types }`: the node kinds to match.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching nodes without their children.',
13324
- references: []
13325
- },
13326
- {
13327
- name: "[$framerApiOnly.getParentNodeForAgent]",
13328
- category: "framer",
13329
- signature: "[$framerApiOnly.getParentNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13330
- description: 'Get the direct parent of a node.\n\n@param input - `{ id }`: the id of the child node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The parent node, or `null` if the node has no parent or doesn\'t exist.',
13331
- references: []
13332
- },
13333
- {
13334
- name: "[$framerApiOnly.getScopeNodeForAgent]",
13335
- category: "framer",
13336
- signature: "[$framerApiOnly.getScopeNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13337
- description: 'Get the scope node (page or component) that contains the given node.\n\n@param input - `{ id }`: the id of a node inside the scope.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The enclosing scope node, or `null` if the node isn\'t in any scope.',
13338
- references: []
13339
- },
13340
- {
13341
- name: "[$framerApiOnly.makeExternalComponentLocalForAgent]",
13342
- category: "framer",
13343
- signature: "[$framerApiOnly.makeExternalComponentLocalForAgent](input: { id: string; replaceAll?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
13344
- description: 'Converts an external component into a local project component.\n\n@param input - `{ id, replaceAll? }`: the id of the external instance, and whether to replace all instances.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns `success` (with the local component name), `needs_confirmation` (retry with `replaceAll`), or `blocked` with a reason.',
13345
- references: []
13346
- },
13347
- {
13348
- name: "[$framerApiOnly.paginateForAgent]",
13349
- category: "framer",
13350
- signature: "[$framerApiOnly.paginateForAgent](input: { items: readonly unknown[]; keyName?: never; cursor?: never; } | { keyName: string; cursor: number; items?: never; }, options?: { pagePath?: string; }): Promise<unknown>",
13351
- description: 'Paginate a large array of values across multiple calls. The cursor is\nopaque and only valid within the same headless session and page.\n\n- First page: pass `{ items }`.\n- Continuation: pass `{ keyName, cursor }` using values returned by a previous call.\n\n@param input - `{ items }` for a fresh array, or `{ keyName, cursor }` for continuation.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The current page, including `keyName`, `cursor`, `results`, `totalResults`, and (if more pages remain) `nextCursor`.',
13352
- references: []
13353
- },
13354
13267
  {
13355
13268
  name: "[$framerApiOnly.ping]",
13356
13269
  category: "framer",
13357
13270
  signature: "[$framerApiOnly.ping](): Promise<void>",
13358
- description: "Liveness round-trip: resolves once Vekter's plugin handler answers. Used by the headless\n backend to verify the transport actually routes, not just that the page is alive.",
13359
- references: []
13360
- },
13361
- {
13362
- name: "[$framerApiOnly.publishForAgent]",
13363
- category: "framer",
13364
- signature: "[$framerApiOnly.publishForAgent](input?: Record<string, unknown>): Promise<unknown>",
13365
- description: "Executes the publish flow on behalf of an agent.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Action-discriminated input object (preview / confirm_publish / deploy_to_production).\n@returns The action's result \u2014 status, publish URLs, and any errors, warnings, or changes.",
13366
- references: []
13367
- },
13368
- {
13369
- name: "[$framerApiOnly.queryImagesForAgent]",
13370
- category: "framer",
13371
- signature: "[$framerApiOnly.queryImagesForAgent](input: Record<string, unknown>): Promise<unknown>",
13372
- description: 'Searches for stock images to use on the canvas (e.g. `"FrameNode"` `fill` values). Returns\ncandidate images with preview thumbnails and a `url` field for each. The returned URLs are\nregistered as trusted for this session so they can be applied directly via `fill="<url>"`\nin a subsequent {@link applyAgentChanges} DSL command. Without calling this method first,\nexternal image URLs are rejected at apply time.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Search input object (source / query / count / orientation).\n@returns An object describing the candidates or an error.',
13373
- references: []
13374
- },
13375
- {
13376
- name: "[$framerApiOnly.readComponentControlsForAgent]",
13377
- category: "framer",
13378
- signature: "[$framerApiOnly.readComponentControlsForAgent](input: { componentIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13379
- description: "@alpha",
13380
- references: []
13381
- },
13382
- {
13383
- name: "[$framerApiOnly.readIconSetControlsForAgent]",
13384
- category: "framer",
13385
- signature: "[$framerApiOnly.readIconSetControlsForAgent](input: { iconSetNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13386
- description: "@alpha",
13387
- references: []
13388
- },
13389
- {
13390
- name: "[$framerApiOnly.readIconsForAgent]",
13391
- category: "framer",
13392
- signature: "[$framerApiOnly.readIconsForAgent](input: { iconSetName: string; }, options?: { pagePath?: string; }): Promise<string[]>",
13393
- description: "@alpha",
13394
- references: []
13395
- },
13396
- {
13397
- name: "[$framerApiOnly.readLayoutTemplateControlsForAgent]",
13398
- category: "framer",
13399
- signature: "[$framerApiOnly.readLayoutTemplateControlsForAgent](input: { layoutTemplateIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13400
- description: "@alpha",
13401
- references: []
13402
- },
13403
- {
13404
- name: "[$framerApiOnly.readProjectForAgent]",
13405
- category: "framer",
13406
- signature: "[$framerApiOnly.readProjectForAgent](queries: Record<string, unknown>[], options?: { pagePath?: string; }): Promise<{ results: unknown[]; }>",
13407
- description: 'Reads project state by executing an array of queries against the project.\n\nReturns one result per query. Available query types and their parameters\nare documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param queries - Array of query objects. See {@link getAgentSystemPrompt} for available types.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns An object with a `results` array, one entry per query.',
13408
- references: []
13409
- },
13410
- {
13411
- name: "[$framerApiOnly.readShaderControlsForAgent]",
13412
- category: "framer",
13413
- signature: "[$framerApiOnly.readShaderControlsForAgent](input: { shaderNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13414
- description: "@alpha",
13415
- references: []
13416
- },
13417
- {
13418
- name: "[$framerApiOnly.reviewChangesForAgent]",
13419
- category: "framer",
13420
- signature: "[$framerApiOnly.reviewChangesForAgent](options?: { pagePath?: string; }): Promise<unknown>",
13421
- description: "Reviews changes made by prior {@link applyAgentChanges} calls in this session.\n\nConsumes accumulated diagnostics from the session's agent context.\n\n@param options.pagePath - Target page path (e.g. `\"/about\"`). Defaults to the active page.\n@returns The session's accumulated changes, errors, warnings, and deferred trait reports.",
13422
- references: []
13423
- },
13424
- {
13425
- name: "[$framerApiOnly.serializeForAgent]",
13426
- category: "framer",
13427
- signature: "[$framerApiOnly.serializeForAgent](input: { id: string; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
13428
- description: 'Serialize a single node on the page.\n\n@param input - `{ id }` plus optional serialization options:\n - `depth` \u2014 limit how many descendant levels to include.\n - `attributeFilter` \u2014 only return the listed attributes per node.\n - `ancestorPath` \u2014 also return the path of ancestors up to the page root.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The serialized node, or `null` if no node with that id exists on the page.',
13429
- references: []
13430
- },
13431
- {
13432
- name: "[$framerApiOnly.serializeNodesForAgent]",
13433
- category: "framer",
13434
- signature: "[$framerApiOnly.serializeNodesForAgent](input: { ids: readonly string[]; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
13435
- description: 'Serialize multiple nodes on the page. Ids that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }` plus optional serialization options:\n - `depth` \u2014 limit how many descendant levels to include.\n - `attributeFilter` \u2014 only return the listed attributes per node.\n - `ancestorPath` \u2014 also return the path of ancestors up to the page root.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The serialized nodes that were found, in input order.',
13271
+ description: "Liveness round-trip: resolves once Vekter's plugin handler answers. Used by the headless backend to verify the transport actually routes, not just that the page is alive.",
13436
13272
  references: []
13437
13273
  },
13438
13274
  {
@@ -13516,11 +13352,11 @@ var methodsByCategory = {
13516
13352
  references: ["AddTextOptions"]
13517
13353
  },
13518
13354
  {
13519
- name: "applyAgentChanges",
13355
+ name: "agent",
13520
13356
  category: "framer",
13521
- signature: "applyAgentChanges(dsl: string, options?: { pagePath?: string; }): Promise<void>",
13522
- 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 getAgentSystemPrompt}.\nEach call is scoped to a single page.\n\n@param dsl - A string of commands separated by `;`. See {@link getAgentSystemPrompt} for syntax.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.',
13523
- references: []
13357
+ signature: "agent: FramerAgentAPI",
13358
+ description: 'Agent-specific methods exposed by framer-api as its agent namespace.\n\nEach method delegates to the corresponding wire-protocol name on the engine\n(e.g. `agent.publish(...)` invokes `"publishForAgent"`).',
13359
+ references: ["FramerAgentAPI"]
13524
13360
  },
13525
13361
  {
13526
13362
  name: "cloneNode",
@@ -13529,16 +13365,6 @@ var methodsByCategory = {
13529
13365
  description: "Clone a node.\n@category canvas",
13530
13366
  references: ["AnyNode"]
13531
13367
  },
13532
- {
13533
- name: "continueAgentConversation",
13534
- category: "framer",
13535
- signature: "continueAgentConversation(prompt: string, options: ContinueAgentConversationOptions): Promise<ContinueAgentConversationResult>",
13536
- description: "",
13537
- references: [
13538
- "ContinueAgentConversationOptions",
13539
- "ContinueAgentConversationResult"
13540
- ]
13541
- },
13542
13368
  {
13543
13369
  name: "createCodeFile",
13544
13370
  category: "framer",
@@ -13637,34 +13463,6 @@ var methodsByCategory = {
13637
13463
  description: "",
13638
13464
  references: []
13639
13465
  },
13640
- {
13641
- name: "flattenComponentInstanceForAgent",
13642
- category: "framer",
13643
- signature: "flattenComponentInstanceForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13644
- description: 'Flattens a local component instance into raw editable layers.\n\n@param input - `{ id }`: the id of the component instance to flatten.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The flatten result \u2014 `success` with a `replacementId`, or `blocked` with a reason.',
13645
- references: []
13646
- },
13647
- {
13648
- name: "getAgentContext",
13649
- category: "framer",
13650
- signature: "getAgentContext(options?: { pagePath?: string; }): Promise<string>",
13651
- description: 'Returns the dynamic project context as a string.\n\nThe context includes project-specific data:\n- **Available fonts** \u2014 font families loaded in the project.\n- **Components** \u2014 component names and their controls.\n- **Design tokens** \u2014 color tokens defined in the project.\n- **Style presets** \u2014 text style presets defined in the project.\n- **Icon sets** \u2014 available icon sets and their definitions.\n\nThis data changes per project and page. Pair with the static prompt\nfrom {@link getAgentSystemPrompt} for complete agent context.\n\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns A string containing the project context.',
13652
- references: []
13653
- },
13654
- {
13655
- name: "getAgentSystemPrompt",
13656
- category: "framer",
13657
- signature: "getAgentSystemPrompt(): Promise<string>",
13658
- description: "Returns the static agent system prompt as a string.\n\nThe prompt includes:\n- **Command reference** \u2014 syntax for adding, updating, removing, moving, and duplicating nodes.\n- **Design rules** \u2014 spacing, layout, typography, and responsive design guidance.\n- **Examples** \u2014 common UI patterns expressed as commands.\n- **`readProjectForAgent` query reference** \u2014 available query types and their parameters.\n\nThis is the sole documentation for the command syntax used by {@link applyAgentChanges}\nand the query types used by {@link readProjectForAgent}.\n\nThe prompt is static and does not depend on any specific project.\nCall {@link getAgentContext} to get the project-specific context.\n\n@returns A string containing the agent system prompt.",
13659
- references: []
13660
- },
13661
- {
13662
- name: "getAncestorsForAgent",
13663
- category: "framer",
13664
- signature: "getAncestorsForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13665
- description: 'Get every ancestor of a node, from the direct parent up to the page root.\n\n@param input - `{ id }`: the id of the node to start from.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The ancestors ordered from closest parent to the page root.',
13666
- references: []
13667
- },
13668
13466
  {
13669
13467
  name: "getCanvasRoot",
13670
13468
  category: "framer",
@@ -13777,13 +13575,6 @@ var methodsByCategory = {
13777
13575
  description: "Get all available fonts.\n\nUnlike the Font Picker which groups fonts by typeface, this lists\nindividual fonts for each weight and style (each representing a separate\nfont file).\n\nNote: Custom fonts are not available to plugins.\n\n@returns An array of all available fonts.\n\n@example\n```ts\nconst fonts = await framer.getFonts()\n```\n@category canvas",
13778
13576
  references: ["Font"]
13779
13577
  },
13780
- {
13781
- name: "getGroundNodeForAgent",
13782
- category: "framer",
13783
- signature: "getGroundNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13784
- description: 'Get the top-level node on the canvas that contains the given node.\n\n@param input - `{ id }`: the id of a descendant node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The top-level node, or `null` if none applies.',
13785
- references: []
13786
- },
13787
13578
  {
13788
13579
  name: "getImage",
13789
13580
  category: "framer",
@@ -13833,27 +13624,6 @@ var methodsByCategory = {
13833
13624
  description: "Get a node by its id.\n@category canvas",
13834
13625
  references: ["AnyNode"]
13835
13626
  },
13836
- {
13837
- name: "getNodeForAgent",
13838
- category: "framer",
13839
- signature: "getNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13840
- description: 'Get a single node on the page, including its children.\n\n@param input - `{ id }`: the id of the node to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The node, or `null` if no node with that id exists on the page.',
13841
- references: []
13842
- },
13843
- {
13844
- name: "getNodesForAgent",
13845
- category: "framer",
13846
- signature: "getNodesForAgent(input: { ids: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13847
- description: 'Get multiple nodes on the page, including their children.\nIds that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }`: the ids of the nodes to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The nodes that were found, in input order.',
13848
- references: []
13849
- },
13850
- {
13851
- name: "getNodesOfTypesForAgent",
13852
- category: "framer",
13853
- signature: "getNodesOfTypesForAgent(input: { types: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13854
- description: 'Get every node on the page of one or more kinds (e.g. `"FrameNode"`, `"RichTextNode"`, `"ComponentInstanceNode"`).\n\n@param input - `{ types }`: the node kinds to match.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching nodes without their children.',
13855
- references: []
13856
- },
13857
13627
  {
13858
13628
  name: "getNodesWithAttribute",
13859
13629
  category: "framer",
@@ -13882,13 +13652,6 @@ var methodsByCategory = {
13882
13652
  description: "Get the parent of a node.\n@category canvas",
13883
13653
  references: ["AnyNode"]
13884
13654
  },
13885
- {
13886
- name: "getParentNodeForAgent",
13887
- category: "framer",
13888
- signature: "getParentNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13889
- description: 'Get the direct parent of a node.\n\n@param input - `{ id }`: the id of the child node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The parent node, or `null` if the node has no parent or doesn\'t exist.',
13890
- references: []
13891
- },
13892
13655
  {
13893
13656
  name: "getProjectInfo",
13894
13657
  category: "framer",
@@ -13917,13 +13680,6 @@ var methodsByCategory = {
13917
13680
  description: "Get all Redirects in the project.\n\n@returns All of the Redirects in the project.\n\n@example\n```ts\nconst redirects = await framer.getRedirects()\n```\n@category settings",
13918
13681
  references: ["Redirect"]
13919
13682
  },
13920
- {
13921
- name: "getScopeNodeForAgent",
13922
- category: "framer",
13923
- signature: "getScopeNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13924
- description: 'Get the scope node (page or component) that contains the given node.\n\n@param input - `{ id }`: the id of a node inside the scope.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The enclosing scope node, or `null` if the node isn\'t in any scope.',
13925
- references: []
13926
- },
13927
13683
  {
13928
13684
  name: "getText",
13929
13685
  category: "framer",
@@ -13952,13 +13708,6 @@ var methodsByCategory = {
13952
13708
  description: "Get all available vector sets.\n\n@alpha",
13953
13709
  references: ["VectorSet"]
13954
13710
  },
13955
- {
13956
- name: "makeExternalComponentLocalForAgent",
13957
- category: "framer",
13958
- signature: "makeExternalComponentLocalForAgent(input: { id: string; replaceAll?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
13959
- description: 'Converts an external component into a local project component.\n\n@param input - `{ id, replaceAll? }`: the id of the external instance, and whether to replace all instances.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns `success` (with the local component name), `needs_confirmation` (retry with `replaceAll`), or `blocked` with a reason.',
13960
- references: []
13961
- },
13962
13711
  {
13963
13712
  name: "mode",
13964
13713
  category: "framer",
@@ -13966,18 +13715,11 @@ var methodsByCategory = {
13966
13715
  description: 'Get the current mode.\n\nA plugin can launch in a special mode where only a subset of the API is\nallowed. The mode is set when the plugin launches and never changes while\nthe plugin is active.\n\n@example\n```ts\nif (framer.mode === "image" || framer.mode === "editImage") {\n // Do image mode specific logic\n return\n}\n```\n@category settings',
13967
13716
  references: ["Mode"]
13968
13717
  },
13969
- {
13970
- name: "paginateForAgent",
13971
- category: "framer",
13972
- signature: "paginateForAgent(input: { items: readonly unknown[]; keyName?: never; cursor?: never; } | { keyName: string; cursor: number; items?: never; }, options?: { pagePath?: string; }): Promise<unknown>",
13973
- description: 'Paginate a large array of values across multiple calls. The cursor is\nopaque and only valid within the same headless session and page.\n\n- First page: pass `{ items }`.\n- Continuation: pass `{ keyName, cursor }` using values returned by a previous call.\n\n@param input - `{ items }` for a fresh array, or `{ keyName, cursor }` for continuation.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The current page, including `keyName`, `cursor`, `results`, `totalResults`, and (if more pages remain) `nextCursor`.',
13974
- references: []
13975
- },
13976
13718
  {
13977
13719
  name: "ping",
13978
13720
  category: "framer",
13979
13721
  signature: "ping(): Promise<void>",
13980
- description: "Liveness round-trip: resolves once Vekter's plugin handler answers. Used by the headless\n backend to verify the transport actually routes, not just that the page is alive.",
13722
+ description: "Liveness round-trip: resolves once Vekter's plugin handler answers. Used by the headless backend to verify the transport actually routes, not just that the page is alive.",
13981
13723
  references: []
13982
13724
  },
13983
13725
  {
@@ -13987,62 +13729,6 @@ var methodsByCategory = {
13987
13729
  description: "",
13988
13730
  references: ["PublishResult"]
13989
13731
  },
13990
- {
13991
- name: "publishForAgent",
13992
- category: "framer",
13993
- signature: "publishForAgent(input?: Record<string, unknown>): Promise<unknown>",
13994
- description: "Executes the publish flow on behalf of an agent.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Action-discriminated input object (preview / confirm_publish / deploy_to_production).\n@returns The action's result \u2014 status, publish URLs, and any errors, warnings, or changes.",
13995
- references: []
13996
- },
13997
- {
13998
- name: "queryImagesForAgent",
13999
- category: "framer",
14000
- signature: "queryImagesForAgent(input: Record<string, unknown>): Promise<unknown>",
14001
- description: 'Searches for stock images to use on the canvas (e.g. `"FrameNode"` `fill` values). Returns\ncandidate images with preview thumbnails and a `url` field for each. The returned URLs are\nregistered as trusted for this session so they can be applied directly via `fill="<url>"`\nin a subsequent {@link applyAgentChanges} DSL command. Without calling this method first,\nexternal image URLs are rejected at apply time.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Search input object (source / query / count / orientation).\n@returns An object describing the candidates or an error.',
14002
- references: []
14003
- },
14004
- {
14005
- name: "readComponentControlsForAgent",
14006
- category: "framer",
14007
- signature: "readComponentControlsForAgent(input: { componentIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
14008
- description: "@alpha",
14009
- references: []
14010
- },
14011
- {
14012
- name: "readIconSetControlsForAgent",
14013
- category: "framer",
14014
- signature: "readIconSetControlsForAgent(input: { iconSetNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
14015
- description: "@alpha",
14016
- references: []
14017
- },
14018
- {
14019
- name: "readIconsForAgent",
14020
- category: "framer",
14021
- signature: "readIconsForAgent(input: { iconSetName: string; }, options?: { pagePath?: string; }): Promise<string[]>",
14022
- description: "@alpha",
14023
- references: []
14024
- },
14025
- {
14026
- name: "readLayoutTemplateControlsForAgent",
14027
- category: "framer",
14028
- signature: "readLayoutTemplateControlsForAgent(input: { layoutTemplateIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
14029
- description: "@alpha",
14030
- references: []
14031
- },
14032
- {
14033
- name: "readProjectForAgent",
14034
- category: "framer",
14035
- signature: "readProjectForAgent(queries: Record<string, unknown>[], options?: { pagePath?: string; }): Promise<{ results: unknown[]; }>",
14036
- description: 'Reads project state by executing an array of queries against the project.\n\nReturns one result per query. Available query types and their parameters\nare documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param queries - Array of query objects. See {@link getAgentSystemPrompt} for available types.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns An object with a `results` array, one entry per query.',
14037
- references: []
14038
- },
14039
- {
14040
- name: "readShaderControlsForAgent",
14041
- category: "framer",
14042
- signature: "readShaderControlsForAgent(input: { shaderNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
14043
- description: "@alpha",
14044
- references: []
14045
- },
14046
13732
  {
14047
13733
  name: "rejectAllPending",
14048
13734
  category: "framer",
@@ -14071,23 +13757,6 @@ var methodsByCategory = {
14071
13757
  description: "",
14072
13758
  references: []
14073
13759
  },
14074
- {
14075
- name: "reviewChangesForAgent",
14076
- category: "framer",
14077
- signature: "reviewChangesForAgent(options?: { pagePath?: string; }): Promise<unknown>",
14078
- description: "Reviews changes made by prior {@link applyAgentChanges} calls in this session.\n\nConsumes accumulated diagnostics from the session's agent context.\n\n@param options.pagePath - Target page path (e.g. `\"/about\"`). Defaults to the active page.\n@returns The session's accumulated changes, errors, warnings, and deferred trait reports.",
14079
- references: []
14080
- },
14081
- {
14082
- name: "runSupervisorAgentCommand",
14083
- category: "framer",
14084
- signature: "runSupervisorAgentCommand(options: RunSupervisorAgentCommandOptions): Promise<RunSupervisorAgentCommandResult>",
14085
- description: "",
14086
- references: [
14087
- "RunSupervisorAgentCommandOptions",
14088
- "RunSupervisorAgentCommandResult"
14089
- ]
14090
- },
14091
13760
  {
14092
13761
  name: "screenshot",
14093
13762
  category: "framer",
@@ -14095,20 +13764,6 @@ var methodsByCategory = {
14095
13764
  description: "",
14096
13765
  references: ["ScreenshotOptions", "ScreenshotResult"]
14097
13766
  },
14098
- {
14099
- name: "serializeForAgent",
14100
- category: "framer",
14101
- signature: "serializeForAgent(input: { id: string; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
14102
- description: 'Serialize a single node on the page.\n\n@param input - `{ id }` plus optional serialization options:\n - `depth` \u2014 limit how many descendant levels to include.\n - `attributeFilter` \u2014 only return the listed attributes per node.\n - `ancestorPath` \u2014 also return the path of ancestors up to the page root.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The serialized node, or `null` if no node with that id exists on the page.',
14103
- references: []
14104
- },
14105
- {
14106
- name: "serializeNodesForAgent",
14107
- category: "framer",
14108
- signature: "serializeNodesForAgent(input: { ids: readonly string[]; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
14109
- description: 'Serialize multiple nodes on the page. Ids that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }` plus optional serialization options:\n - `depth` \u2014 limit how many descendant levels to include.\n - `attributeFilter` \u2014 only return the listed attributes per node.\n - `ancestorPath` \u2014 also return the path of ancestors up to the page root.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The serialized nodes that were found, in input order.',
14110
- references: []
14111
- },
14112
13767
  {
14113
13768
  name: "sessionId",
14114
13769
  category: "framer",
@@ -14179,26 +13834,6 @@ var methodsByCategory = {
14179
13834
  description: "Set the text of the current selection or insert it onto the canvas.\n@category canvas",
14180
13835
  references: []
14181
13836
  },
14182
- {
14183
- name: "startAgentConversation",
14184
- category: "framer",
14185
- signature: "startAgentConversation(prompt: string, options?: StartAgentConversationOptions): Promise<StartAgentConversationResult>",
14186
- description: "",
14187
- references: [
14188
- "StartAgentConversationOptions",
14189
- "StartAgentConversationResult"
14190
- ]
14191
- },
14192
- {
14193
- name: "submitAgentClarification",
14194
- category: "framer",
14195
- signature: "submitAgentClarification(options: SubmitAgentClarificationOptions): Promise<SubmitAgentClarificationResult>",
14196
- description: "",
14197
- references: [
14198
- "SubmitAgentClarificationOptions",
14199
- "SubmitAgentClarificationResult"
14200
- ]
14201
- },
14202
13837
  {
14203
13838
  name: "typecheckCode",
14204
13839
  category: "framer",
@@ -14235,6 +13870,176 @@ var methodsByCategory = {
14235
13870
  references: ["NamedImageAssetInput", "ImageAsset"]
14236
13871
  }
14237
13872
  ],
13873
+ frameragentapi: [
13874
+ {
13875
+ name: "applyChanges",
13876
+ category: "FramerAgentAPI",
13877
+ signature: "applyChanges(dsl: string, options?: { pagePath?: string; }): Promise<void>",
13878
+ 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\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.',
13879
+ references: []
13880
+ },
13881
+ {
13882
+ name: "flattenComponentInstance",
13883
+ category: "FramerAgentAPI",
13884
+ signature: "flattenComponentInstance(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13885
+ description: 'Flattens a local component instance into raw editable layers.\n\n@param input - `{ id }`: the id of the component instance to flatten.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The flatten result \u2014 `success` with a `replacementId`, or `blocked` with a reason.',
13886
+ references: []
13887
+ },
13888
+ {
13889
+ name: "getAncestors",
13890
+ category: "FramerAgentAPI",
13891
+ signature: "getAncestors(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13892
+ description: 'Get every ancestor of a node, from the direct parent up to the page root.\n\n@param input - `{ id }`: the id of the node to start from.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The ancestors ordered from closest parent to the page root.',
13893
+ references: []
13894
+ },
13895
+ {
13896
+ name: "getContext",
13897
+ category: "FramerAgentAPI",
13898
+ signature: "getContext(options?: { pagePath?: string; }): Promise<string>",
13899
+ description: 'Returns the dynamic project context as a string.\n\nThe context includes project-specific data:\n- **Available fonts** \u2014 font families loaded in the project.\n- **Components** \u2014 component names and their controls.\n- **Design tokens** \u2014 color tokens defined in the project.\n- **Style presets** \u2014 text style presets defined in the project.\n- **Icon sets** \u2014 available icon sets and their definitions.\n\nThis data changes per project and page. Pair with the static prompt\nfrom {@link getSystemPrompt} for complete agent context.\n\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns A string containing the project context.',
13900
+ references: []
13901
+ },
13902
+ {
13903
+ name: "getGroundNode",
13904
+ category: "FramerAgentAPI",
13905
+ signature: "getGroundNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13906
+ description: 'Get the top-level node on the canvas that contains the given node.\n\n@param input - `{ id }`: the id of a descendant node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The top-level node, or `null` if none applies.',
13907
+ references: []
13908
+ },
13909
+ {
13910
+ name: "getNode",
13911
+ category: "FramerAgentAPI",
13912
+ signature: "getNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13913
+ description: 'Get a single node on the page, including its children.\n\n@param input - `{ id }`: the id of the node to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The node, or `null` if no node with that id exists on the page.',
13914
+ references: []
13915
+ },
13916
+ {
13917
+ name: "getNodes",
13918
+ category: "FramerAgentAPI",
13919
+ signature: "getNodes(input: { ids: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13920
+ description: 'Get multiple nodes on the page, including their children.\nIds that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }`: the ids of the nodes to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The nodes that were found, in input order.',
13921
+ references: []
13922
+ },
13923
+ {
13924
+ name: "getNodesOfTypes",
13925
+ category: "FramerAgentAPI",
13926
+ signature: "getNodesOfTypes(input: { types: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13927
+ description: 'Get every node on the page of one or more kinds (e.g. `"FrameNode"`, `"RichTextNode"`, `"ComponentInstanceNode"`).\n\n@param input - `{ types }`: the node kinds to match.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching nodes without their children.',
13928
+ references: []
13929
+ },
13930
+ {
13931
+ name: "getParentNode",
13932
+ category: "FramerAgentAPI",
13933
+ signature: "getParentNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13934
+ description: 'Get the direct parent of a node.\n\n@param input - `{ id }`: the id of the child node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The parent node, or `null` if the node has no parent or doesn\'t exist.',
13935
+ references: []
13936
+ },
13937
+ {
13938
+ name: "getScopeNode",
13939
+ category: "FramerAgentAPI",
13940
+ signature: "getScopeNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
13941
+ description: 'Get the scope node (page or component) that contains the given node.\n\n@param input - `{ id }`: the id of a node inside the scope.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The enclosing scope node, or `null` if the node isn\'t in any scope.',
13942
+ references: []
13943
+ },
13944
+ {
13945
+ name: "getSystemPrompt",
13946
+ category: "FramerAgentAPI",
13947
+ signature: "getSystemPrompt(): Promise<string>",
13948
+ description: "Returns the static agent system prompt as a string.\n\nThe prompt includes:\n- **Command reference** \u2014 syntax for adding, updating, removing, moving, and duplicating nodes.\n- **Design rules** \u2014 spacing, layout, typography, and responsive design guidance.\n- **Examples** \u2014 common UI patterns expressed as commands.\n- **`readProject` query reference** \u2014 available query types and their parameters.\n\nThis is the sole documentation for the command syntax used by {@link applyChanges}\nand the query types used by {@link readProject}.\n\nThe prompt is static and does not depend on any specific project.\nCall {@link getContext} to get the project-specific context.\n\n@returns A string containing the agent system prompt.",
13949
+ references: []
13950
+ },
13951
+ {
13952
+ name: "makeExternalComponentLocal",
13953
+ category: "FramerAgentAPI",
13954
+ signature: "makeExternalComponentLocal(input: { id: string; replaceAll?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
13955
+ description: 'Converts an external component into a local project component.\n\n@param input - `{ id, replaceAll? }`: the id of the external instance, and whether to replace all instances.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns `success` (with the local component name), `needs_confirmation` (retry with `replaceAll`), or `blocked` with a reason.',
13956
+ references: []
13957
+ },
13958
+ {
13959
+ name: "paginate",
13960
+ category: "FramerAgentAPI",
13961
+ signature: "paginate(input: { items: readonly unknown[]; keyName?: never; cursor?: never; } | { keyName: string; cursor: number; items?: never; }, options?: { pagePath?: string; }): Promise<unknown>",
13962
+ description: 'Paginate a large array of values across multiple calls. The cursor is\nopaque and only valid within the same headless session and page.\n\n- First page: pass `{ items }`.\n- Continuation: pass `{ keyName, cursor }` using values returned by a previous call.\n\n@param input - `{ items }` for a fresh array, or `{ keyName, cursor }` for continuation.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The current page, including `keyName`, `cursor`, `results`, `totalResults`, and (if more pages remain) `nextCursor`.',
13963
+ references: []
13964
+ },
13965
+ {
13966
+ name: "publish",
13967
+ category: "FramerAgentAPI",
13968
+ signature: "publish(input?: Record<string, unknown>): Promise<unknown>",
13969
+ description: "Executes the publish flow on behalf of an agent.\n\nThe input schema is documented in the string returned by {@link getSystemPrompt}.\n\n@param input - Action-discriminated input object (preview / confirm_publish / deploy_to_production).\n@returns The action's result \u2014 status, publish URLs, and any errors, warnings, or changes.",
13970
+ references: []
13971
+ },
13972
+ {
13973
+ name: "queryImages",
13974
+ category: "FramerAgentAPI",
13975
+ signature: "queryImages(input: Record<string, unknown>): Promise<unknown>",
13976
+ description: 'Searches for stock images to use on the canvas (e.g. `"FrameNode"` `fill` values). Returns\ncandidate images with preview thumbnails and a `url` field for each. The returned URLs are\nregistered as trusted for this session so they can be applied directly via `fill="<url>"`\nin a subsequent {@link applyChanges} DSL command. Without calling this method first,\nexternal image URLs are rejected at apply time.\n\nThe input schema is documented in the string returned by {@link getSystemPrompt}.\n\n@param input - Search input object (source / query / count / orientation).\n@returns An object describing the candidates or an error.',
13977
+ references: []
13978
+ },
13979
+ {
13980
+ name: "readComponentControls",
13981
+ category: "FramerAgentAPI",
13982
+ signature: "readComponentControls(input: { componentIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13983
+ description: 'Reads control definitions for project components.\n\n@param input - `{ componentIds }`: component ids from project context or previous reads.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching component control definitions.',
13984
+ references: []
13985
+ },
13986
+ {
13987
+ name: "readIcons",
13988
+ category: "FramerAgentAPI",
13989
+ signature: "readIcons(input: { iconSetName: string; }, options?: { pagePath?: string; }): Promise<string[]>",
13990
+ description: 'Reads exact icon names for an icon set.\n\n@param input - `{ iconSetName }`: icon set name from project context or previous reads.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The available icon names in that set.',
13991
+ references: []
13992
+ },
13993
+ {
13994
+ name: "readIconSetControls",
13995
+ category: "FramerAgentAPI",
13996
+ signature: "readIconSetControls(input: { iconSetNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
13997
+ description: 'Reads icon-set control definitions.\n\n@param input - `{ iconSetNames }`: icon set names from project context or previous reads.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching icon-set control definitions.',
13998
+ references: []
13999
+ },
14000
+ {
14001
+ name: "readLayoutTemplateControls",
14002
+ category: "FramerAgentAPI",
14003
+ signature: "readLayoutTemplateControls(input: { layoutTemplateIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
14004
+ description: 'Reads layout-template control definitions.\n\n@param input - `{ layoutTemplateIds }`: layout template ids from project context or previous reads.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching layout-template control definitions.',
14005
+ references: []
14006
+ },
14007
+ {
14008
+ name: "readProject",
14009
+ category: "FramerAgentAPI",
14010
+ signature: "readProject(queries: Record<string, unknown>[], options?: { pagePath?: string; }): Promise<{ results: unknown[]; }>",
14011
+ description: 'Reads project state by executing an array of queries against the project.\n\nReturns one result per query. Available query types and their parameters\nare documented in the string returned by {@link getSystemPrompt}.\n\n@param queries - Array of query objects. See {@link getSystemPrompt} for available types.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns An object with a `results` array, one entry per query.',
14012
+ references: []
14013
+ },
14014
+ {
14015
+ name: "readShaderControls",
14016
+ category: "FramerAgentAPI",
14017
+ signature: "readShaderControls(input: { shaderNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
14018
+ description: 'Reads shader control definitions.\n\n@param input - `{ shaderNames }`: shader names from project context or previous reads.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching shader control definitions.',
14019
+ references: []
14020
+ },
14021
+ {
14022
+ name: "reviewChanges",
14023
+ category: "FramerAgentAPI",
14024
+ signature: "reviewChanges(options?: { pagePath?: string; }): Promise<unknown>",
14025
+ description: "Reviews changes made by prior {@link applyChanges} calls in this session.\n\nConsumes accumulated diagnostics from the session's agent context.\n\n@param options.pagePath - Target page path (e.g. `\"/about\"`). Defaults to the active page.\n@returns The session's accumulated changes, errors, warnings, and deferred trait reports.",
14026
+ references: []
14027
+ },
14028
+ {
14029
+ name: "serialize",
14030
+ category: "FramerAgentAPI",
14031
+ signature: "serialize(input: { id: string; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
14032
+ description: 'Serialize a single node on the page.\n\n@param input - `{ id }` plus optional serialization options:\n - `depth` \u2014 limit how many descendant levels to include.\n - `attributeFilter` \u2014 only return the listed attributes per node.\n - `ancestorPath` \u2014 also return the path of ancestors up to the page root.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The serialized node, or `null` if no node with that id exists on the page.',
14033
+ references: []
14034
+ },
14035
+ {
14036
+ name: "serializeNodes",
14037
+ category: "FramerAgentAPI",
14038
+ signature: "serializeNodes(input: { ids: readonly string[]; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
14039
+ description: 'Serialize multiple nodes on the page. Ids that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }` plus optional serialization options:\n - `depth` \u2014 limit how many descendant levels to include.\n - `attributeFilter` \u2014 only return the listed attributes per node.\n - `ancestorPath` \u2014 also return the path of ancestors up to the page root.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The serialized nodes that were found, in input order.',
14040
+ references: []
14041
+ }
14042
+ ],
14238
14043
  framerapierror: [
14239
14044
  {
14240
14045
  name: "recentMethods",
@@ -16829,7 +16634,7 @@ async function getAgentSystemPrompt(sessionId) {
16829
16634
  debug("exec", "getAgentSystemPrompt: calling relay...");
16830
16635
  const result = await client.exec.mutate({
16831
16636
  sessionId,
16832
- code: "return await framer.getAgentSystemPrompt();",
16637
+ code: "return await framer.agent.getSystemPrompt();",
16833
16638
  cwd: process.cwd()
16834
16639
  });
16835
16640
  debug("exec", "getAgentSystemPrompt: relay responded");
@@ -16845,7 +16650,7 @@ async function getAgentContext(sessionId) {
16845
16650
  debug("exec", "getAgentContext: calling relay...");
16846
16651
  const result = await client.exec.mutate({
16847
16652
  sessionId,
16848
- code: "return await framer.getAgentContext({ pagePath: '/' });",
16653
+ code: "return await framer.agent.getContext({ pagePath: '/' });",
16849
16654
  cwd: process.cwd()
16850
16655
  });
16851
16656
  debug("exec", "getAgentContext: relay responded");
@@ -16999,7 +16804,7 @@ program.command("apply-changes").description("Apply canvas DSL changes to a page
16999
16804
  ).requiredOption("-e, --eval <dsl>", "DSL string to apply").option("-p, --page <path>", "Target page path", "/").action(async (options) => {
17000
16805
  const { session: sessionId, eval: dsl, page: pagePath } = options;
17001
16806
  const code = `
17002
- const result = await framer.applyAgentChanges(${JSON.stringify(dsl)}, { pagePath: ${JSON.stringify(pagePath)} });
16807
+ const result = await framer.agent.applyChanges(${JSON.stringify(dsl)}, { pagePath: ${JSON.stringify(pagePath)} });
17003
16808
  if (result) console.log(JSON.stringify(result, null, 2));
17004
16809
  `;
17005
16810
  await execAndPrint(sessionId, code);
@@ -17022,7 +16827,7 @@ program.command("read-project").description("Read project state for a page").req
17022
16827
  process.exit(1);
17023
16828
  }
17024
16829
  const code = `
17025
- const result = await framer.readProjectForAgent(${JSON.stringify(queries)}, { pagePath: ${JSON.stringify(pagePath)} });
16830
+ const result = await framer.agent.readProject(${JSON.stringify(queries)}, { pagePath: ${JSON.stringify(pagePath)} });
17026
16831
  if (result) console.log(JSON.stringify(result, null, 2));
17027
16832
  `;
17028
16833
  await execAndPrint(sessionId, code);
@@ -14,7 +14,7 @@ import { z } from 'zod';
14
14
  import { createRequire } from 'module';
15
15
  import * as vm from 'vm';
16
16
 
17
- /* @framer/ai relay server v0.0.26 */
17
+ /* @framer/ai relay server v0.0.27 */
18
18
  var __defProp = Object.defineProperty;
19
19
  var __knownSymbol = (name2, symbol) => (symbol = Symbol[name2]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name2);
20
20
  var __typeError = (msg) => {
@@ -160,7 +160,7 @@ __name(debug, "debug");
160
160
  // src/version.ts
161
161
  var VERSION = (
162
162
  // typeof is used to ensure this can be used just via tsx or node etc. without build
163
- "0.0.26"
163
+ "0.0.27"
164
164
  );
165
165
 
166
166
  // src/relay-client.ts
@@ -36,16 +36,20 @@ Always save results you'll need again. Don't repeat API calls.
36
36
 
37
37
  ## Method Selection
38
38
 
39
- Use agent-specific methods whenever a plugin API method and an agent method overlap:
39
+ Choose the highest-priority interface available for the task:
40
40
 
41
- - Use `readProjectForAgent`, `getNodeForAgent`, `getNodesForAgent`, `getNodesOfTypesForAgent`, `getScopeNodeForAgent`, `getGroundNodeForAgent`, `getParentNodeForAgent`, `getAncestorsForAgent`, `serializeForAgent`, `serializeNodesForAgent`, and `paginateForAgent` for project tree reads.
42
- - Use `readComponentControlsForAgent`, `readIconSetControlsForAgent`, `readIconsForAgent`, `readLayoutTemplateControlsForAgent`, and `readShaderControlsForAgent` for reading the controls of components, icon sets, icons, layout templates, and shaders.
43
- - Use `applyAgentChanges` for page and layout edits. Do not use low-level node APIs like `createNode`, `setAttributes`, or `setRect` for design/layout work.
44
- - Use `publishForAgent` for publishing. Do not use `publish`, `getDeployments`, or `deploy` for normal agent publishing flows.
41
+ 1. Subcommands, such as `framer-dalton read-project` and `framer-dalton apply-changes`
42
+ 2. Agent-specific methods, such as `framer.agent.readProject`, `framer.agent.applyChanges`, and `framer.agent.publish`
43
+ 3. Generic plugin API methods, such as top-level `framer.*` methods
45
44
 
46
- Use the plugin API for capabilities that do not have an agent-specific counterpart, such as code file management, localization, and redirects.
45
+ - Use `framer.agent.readProject`, `framer.agent.getNode`, `framer.agent.getNodes`, `framer.agent.getNodesOfTypes`, `framer.agent.getScopeNode`, `framer.agent.getGroundNode`, `framer.agent.getParentNode`, `framer.agent.getAncestors`, `framer.agent.serialize`, `framer.agent.serializeNodes`, and `framer.agent.paginate` for project tree reads.
46
+ - Use `framer.agent.readComponentControls`, `framer.agent.readIconSetControls`, `framer.agent.readIcons`, `framer.agent.readLayoutTemplateControls`, and `framer.agent.readShaderControls` for reading the controls of components, icon sets, icons, layout templates, and shaders.
47
+ - Use `framer.agent.applyChanges` for page and layout edits. Do not use low-level node APIs like `createNode`, `setAttributes`, or `setRect` for design/layout work.
48
+ - Use `framer.agent.publish` for publishing. Do not use `publish`, `getDeployments`, or `deploy` for normal agent publishing flows.
47
49
 
48
- During normal task execution, do not call `framer.getAgentSystemPrompt()` or `framer.getAgentContext()`. This skill already includes their output.
50
+ Use generic plugin API methods only for capabilities that do not have a subcommand or agent-specific counterpart, such as code file management, localization, and redirects.
51
+
52
+ During normal task execution, do not call `framer.agent.getSystemPrompt()` or `framer.agent.getContext()`. This skill already includes their output.
49
53
 
50
54
  ## Core Usage Principles
51
55
 
@@ -100,15 +104,15 @@ Store anything you'll reference again.
100
104
 
101
105
  Use this approach only if the user asks for it. Do not mention this approach to the user otherwise.
102
106
 
103
- This approach is called “Prompt the Framer agent”. With this approach, use `framer.startAgentConversation()` to start a stateful design subagent. Keep the `conversationId` it returns in `state`, and call `framer.continueAgentConversation()` with it to continue the same design task.
107
+ This approach is called “Prompt the Framer agent”. With this approach, use `framer.agent.startConversation()` to start a stateful design subagent. Keep the `conversationId` it returns in `state`, and call `framer.agent.continueConversation()` with it to continue the same design task.
104
108
 
105
- Do not call `framer.getAgentSystemPrompt()` or `framer.getAgentContext()` or `framer.applyAgentChanges()` with this approach.
109
+ Do not call `framer.agent.getSystemPrompt()` or `framer.agent.getContext()` or `framer.agent.applyChanges()` with this approach.
106
110
 
107
111
  Example:
108
112
 
109
113
  ```js
110
114
  state.agent ??= {};
111
- const first = await framer.startAgentConversation(
115
+ const first = await framer.agent.startConversation(
112
116
  "Build me a landing page based on the attached screenshot",
113
117
  {
114
118
  pagePath: "/",
@@ -119,7 +123,7 @@ const first = await framer.startAgentConversation(
119
123
  state.agent.conversationId = first.conversationId;
120
124
  console.log(first.responseMessages);
121
125
 
122
- const second = await framer.continueAgentConversation("Now make it pink", {
126
+ const second = await framer.agent.continueConversation("Now make it pink", {
123
127
  conversationId: state.agent.conversationId,
124
128
  selectionNodeIds: ["someNodeId"],
125
129
  // imageUrls: [...],
@@ -171,7 +175,7 @@ npx framer-dalton docs ScreenshotOptions # Show type + recursively expa
171
175
 
172
176
  Collections are Framer's CMS. Each collection has fields (columns) and items (rows). Use the plugin Collection API (the methods below) for collection schema and item CRUD.
173
177
 
174
- **Exception — CMS Collection Lists.** The in-canvas construct that *renders* a collection as a repeating list of cards (the "Collection List" / repeater) is an agent/page concern. Build and edit those through `readProjectForAgent` and `applyAgentChanges`, not the plugin API. Use the plugin Collection API to read available collections and field schema first, then use `applyAgentChanges` to add the list.
178
+ **Exception — CMS Collection Lists.** The in-canvas construct that *renders* a collection as a repeating list of cards (the "Collection List" / repeater) is an agent/page concern. Build and edit those through `framer.agent.readProject` and `framer.agent.applyChanges`, not the plugin API. Use the plugin Collection API to read available collections and field schema first, then use `framer.agent.applyChanges` to add the list.
175
179
 
176
180
  #### Reading Collections
177
181
 
@@ -275,14 +279,14 @@ await item.remove();
275
279
 
276
280
  ### Working with Images
277
281
 
278
- Canvas editing accepts image URLs directly when setting an image fill, so the typical task is to obtain a URL and use it directly with `applyAgentChanges`.
282
+ Canvas editing accepts image URLs directly when setting an image fill, so the typical task is to obtain a URL and use it directly with `framer.agent.applyChanges`.
279
283
 
280
284
  There are three sources you'll typically pull URLs from:
281
285
 
282
- **Stock photography.** Use `framer.queryImagesForAgent` to source candidates and stash the URL you want:
286
+ **Stock photography.** Use `framer.agent.queryImages` to source candidates and stash the URL you want:
283
287
 
284
288
  ```js
285
- const { results } = await framer.queryImagesForAgent({
289
+ const { results } = await framer.agent.queryImages({
286
290
  source: "unsplash",
287
291
  query: "snow-capped mountains",
288
292
  count: 4,
@@ -303,7 +307,7 @@ state.heroUrl = (await framer.uploadImage({
303
307
  **An image already on the canvas.** Read the node and reuse its existing image URL:
304
308
 
305
309
  ```js
306
- const node = await framer.getNodeForAgent({ id: "<image-node-id>" });
310
+ const node = await framer.agent.getNode({ id: "<image-node-id>" });
307
311
  state.heroUrl = node.attributes.fill;
308
312
  ```
309
313
 
@@ -343,7 +347,7 @@ console.log(state.diagnostics);
343
347
  state.component = state.codeFile.exports.find(
344
348
  (exportItem) => exportItem.type === "component" && exportItem.isDefaultExport,
345
349
  );
346
- await framer.applyAgentChanges(
350
+ await framer.agent.applyChanges(
347
351
  `+ComponentInstanceNode badge parent="wrapper" component="${state.component.componentId}"; SET badge width=120 height=48;`,
348
352
  { pagePath: "/" },
349
353
  );
@@ -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, 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'.
5
5
  **Mandatory precondition**: run `npx framer-dalton@latest setup` and let it complete **BEFORE** loading this skill.
6
6
  allowed-tools: ["Bash(npx framer-dalton:*)", "Bash(npx framer-dalton@latest:*)", "Read({{FRAMER_TEMPORARY_DIR}}/*)", "Write({{FRAMER_TEMPORARY_DIR}}/*)"]
7
7
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-dalton",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "type": "module",
5
5
  "bin": "./dist/cli.js",
6
6
  "main": "./dist/cli.js",
@@ -24,7 +24,7 @@
24
24
  "@trpc/client": "^11.17.0",
25
25
  "@trpc/server": "^11.17.0",
26
26
  "commander": "^12.1.0",
27
- "framer-api": "^0.1.14-beta",
27
+ "framer-api": "0.1.14",
28
28
  "zod": "^4.4.3"
29
29
  },
30
30
  "devDependencies": {