framer-dalton 0.0.26 → 0.0.28
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/dist/cli.js +271 -411
- package/dist/start-relay-server.js +161 -57
- package/docs/skills/framer-project.md +127 -87
- package/docs/skills/framer.md +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -4,15 +4,15 @@ import path7 from 'path';
|
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import crypto, { randomUUID } from 'crypto';
|
|
6
6
|
import http from 'http';
|
|
7
|
-
import { spawn, execFile } from 'child_process';
|
|
7
|
+
import { spawn, execFile, execFileSync } from 'child_process';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import
|
|
9
|
+
import os2 from 'os';
|
|
10
10
|
import { ErrorCode, FramerAPIError } from 'framer-api';
|
|
11
11
|
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.
|
|
15
|
+
/* @framer/ai CLI v0.0.28 */
|
|
16
16
|
var __defProp = Object.defineProperty;
|
|
17
17
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
18
18
|
|
|
@@ -100,9 +100,9 @@ function getConfigDir() {
|
|
|
100
100
|
return path7.join(process.env.XDG_CONFIG_HOME, "framer");
|
|
101
101
|
}
|
|
102
102
|
if (process.platform === "win32") {
|
|
103
|
-
return path7.join(process.env.APPDATA ||
|
|
103
|
+
return path7.join(process.env.APPDATA || os2.homedir(), "framer");
|
|
104
104
|
}
|
|
105
|
-
return path7.join(
|
|
105
|
+
return path7.join(os2.homedir(), ".config", "framer");
|
|
106
106
|
}
|
|
107
107
|
__name(getConfigDir, "getConfigDir");
|
|
108
108
|
function ensureConfigDir() {
|
|
@@ -375,15 +375,59 @@ __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.
|
|
378
|
+
"0.0.28"
|
|
379
379
|
);
|
|
380
380
|
var trackingEndpoint = "https://events.framer.com/track";
|
|
381
381
|
var inProgressTrackings = /* @__PURE__ */ new Set();
|
|
382
|
-
|
|
382
|
+
var cachedSharedFields;
|
|
383
|
+
function getOsName(platform) {
|
|
384
|
+
switch (platform) {
|
|
385
|
+
case "darwin":
|
|
386
|
+
return "macos";
|
|
387
|
+
case "win32":
|
|
388
|
+
return "windows";
|
|
389
|
+
case "linux":
|
|
390
|
+
return "linux";
|
|
391
|
+
default:
|
|
392
|
+
return "unknown";
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
__name(getOsName, "getOsName");
|
|
396
|
+
function getMacOsVersion() {
|
|
397
|
+
try {
|
|
398
|
+
const version = execFileSync("/usr/bin/sw_vers", ["-productVersion"], {
|
|
399
|
+
encoding: "utf8",
|
|
400
|
+
timeout: 1e3
|
|
401
|
+
}).trim();
|
|
402
|
+
return version || "unknown";
|
|
403
|
+
} catch {
|
|
404
|
+
return "unknown";
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
__name(getMacOsVersion, "getMacOsVersion");
|
|
408
|
+
function getOsVersion(platform) {
|
|
409
|
+
if (platform === "darwin") return getMacOsVersion();
|
|
410
|
+
const version = os2.release().trim();
|
|
411
|
+
return version || "unknown";
|
|
412
|
+
}
|
|
413
|
+
__name(getOsVersion, "getOsVersion");
|
|
414
|
+
function getOsMetadata() {
|
|
415
|
+
const platform = os2.platform();
|
|
416
|
+
const arch = os2.arch();
|
|
383
417
|
return {
|
|
418
|
+
arch: arch || "unknown",
|
|
419
|
+
osName: getOsName(platform),
|
|
420
|
+
osVersion: getOsVersion(platform)
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
__name(getOsMetadata, "getOsMetadata");
|
|
424
|
+
function sharedFields() {
|
|
425
|
+
cachedSharedFields ??= {
|
|
384
426
|
machineId: getMachineId(),
|
|
385
|
-
cliVersion: VERSION
|
|
427
|
+
cliVersion: VERSION,
|
|
428
|
+
...getOsMetadata()
|
|
386
429
|
};
|
|
430
|
+
return cachedSharedFields;
|
|
387
431
|
}
|
|
388
432
|
__name(sharedFields, "sharedFields");
|
|
389
433
|
function wrapEvent(event) {
|
|
@@ -396,16 +440,19 @@ function wrapEvent(event) {
|
|
|
396
440
|
};
|
|
397
441
|
}
|
|
398
442
|
__name(wrapEvent, "wrapEvent");
|
|
399
|
-
function postEvent(
|
|
443
|
+
function postEvent(createEvent) {
|
|
400
444
|
if (!isTelemetryEnabled()) return false;
|
|
401
445
|
if (process.env.NODE_ENV === "test" && true) return false;
|
|
446
|
+
const event = createEvent();
|
|
447
|
+
const body = JSON.stringify([wrapEvent(event)]);
|
|
448
|
+
debug("tracking", `sending ${event.event} to ${trackingEndpoint}: ${body}`);
|
|
402
449
|
const promise = fetch(trackingEndpoint, {
|
|
403
450
|
method: "POST",
|
|
404
451
|
headers: {
|
|
405
452
|
"Content-Type": "application/json",
|
|
406
453
|
"User-Agent": `framer-dalton/${VERSION}`
|
|
407
454
|
},
|
|
408
|
-
body
|
|
455
|
+
body,
|
|
409
456
|
signal: AbortSignal.timeout(
|
|
410
457
|
5e3
|
|
411
458
|
/* 5 seconds */
|
|
@@ -434,35 +481,43 @@ function waitForTrackingToFinish() {
|
|
|
434
481
|
}
|
|
435
482
|
__name(waitForTrackingToFinish, "waitForTrackingToFinish");
|
|
436
483
|
function trackAuthStart(payload) {
|
|
437
|
-
postEvent(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
484
|
+
postEvent(
|
|
485
|
+
() => ({
|
|
486
|
+
event: "local_agents_auth_start",
|
|
487
|
+
...sharedFields(),
|
|
488
|
+
...payload
|
|
489
|
+
})
|
|
490
|
+
);
|
|
442
491
|
}
|
|
443
492
|
__name(trackAuthStart, "trackAuthStart");
|
|
444
493
|
function trackAuthSuccess(payload) {
|
|
445
|
-
postEvent(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
494
|
+
postEvent(
|
|
495
|
+
() => ({
|
|
496
|
+
event: "local_agents_auth_success",
|
|
497
|
+
...sharedFields(),
|
|
498
|
+
...payload
|
|
499
|
+
})
|
|
500
|
+
);
|
|
450
501
|
}
|
|
451
502
|
__name(trackAuthSuccess, "trackAuthSuccess");
|
|
452
503
|
function trackSkillsInstall(payload) {
|
|
453
|
-
postEvent(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
504
|
+
postEvent(
|
|
505
|
+
() => ({
|
|
506
|
+
event: "local_agents_skills_install",
|
|
507
|
+
...sharedFields(),
|
|
508
|
+
...payload
|
|
509
|
+
})
|
|
510
|
+
);
|
|
458
511
|
}
|
|
459
512
|
__name(trackSkillsInstall, "trackSkillsInstall");
|
|
460
513
|
function trackError(payload) {
|
|
461
|
-
postEvent(
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
514
|
+
postEvent(
|
|
515
|
+
() => ({
|
|
516
|
+
event: "local_agents_error",
|
|
517
|
+
...sharedFields(),
|
|
518
|
+
...payload
|
|
519
|
+
})
|
|
520
|
+
);
|
|
466
521
|
}
|
|
467
522
|
__name(trackError, "trackError");
|
|
468
523
|
|
|
@@ -11036,6 +11091,10 @@ var classes = {
|
|
|
11036
11091
|
name: "framer",
|
|
11037
11092
|
description: ""
|
|
11038
11093
|
},
|
|
11094
|
+
frameragentapi: {
|
|
11095
|
+
name: "FramerAgentAPI",
|
|
11096
|
+
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"`).'
|
|
11097
|
+
},
|
|
11039
11098
|
framerapierror: {
|
|
11040
11099
|
name: "FramerAPIError",
|
|
11041
11100
|
description: ""
|
|
@@ -13260,179 +13319,11 @@ var methodsByCategory = {
|
|
|
13260
13319
|
}
|
|
13261
13320
|
],
|
|
13262
13321
|
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
13322
|
{
|
|
13355
13323
|
name: "[$framerApiOnly.ping]",
|
|
13356
13324
|
category: "framer",
|
|
13357
13325
|
signature: "[$framerApiOnly.ping](): Promise<void>",
|
|
13358
|
-
description: "Liveness round-trip: resolves once Vekter's plugin handler answers. Used by the headless
|
|
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.',
|
|
13326
|
+
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
13327
|
references: []
|
|
13437
13328
|
},
|
|
13438
13329
|
{
|
|
@@ -13516,11 +13407,11 @@ var methodsByCategory = {
|
|
|
13516
13407
|
references: ["AddTextOptions"]
|
|
13517
13408
|
},
|
|
13518
13409
|
{
|
|
13519
|
-
name: "
|
|
13410
|
+
name: "agent",
|
|
13520
13411
|
category: "framer",
|
|
13521
|
-
signature: "
|
|
13522
|
-
description: '
|
|
13523
|
-
references: []
|
|
13412
|
+
signature: "agent: FramerAgentAPI",
|
|
13413
|
+
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"`).',
|
|
13414
|
+
references: ["FramerAgentAPI"]
|
|
13524
13415
|
},
|
|
13525
13416
|
{
|
|
13526
13417
|
name: "cloneNode",
|
|
@@ -13529,16 +13420,6 @@ var methodsByCategory = {
|
|
|
13529
13420
|
description: "Clone a node.\n@category canvas",
|
|
13530
13421
|
references: ["AnyNode"]
|
|
13531
13422
|
},
|
|
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
13423
|
{
|
|
13543
13424
|
name: "createCodeFile",
|
|
13544
13425
|
category: "framer",
|
|
@@ -13637,34 +13518,6 @@ var methodsByCategory = {
|
|
|
13637
13518
|
description: "",
|
|
13638
13519
|
references: []
|
|
13639
13520
|
},
|
|
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
13521
|
{
|
|
13669
13522
|
name: "getCanvasRoot",
|
|
13670
13523
|
category: "framer",
|
|
@@ -13777,13 +13630,6 @@ var methodsByCategory = {
|
|
|
13777
13630
|
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
13631
|
references: ["Font"]
|
|
13779
13632
|
},
|
|
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
13633
|
{
|
|
13788
13634
|
name: "getImage",
|
|
13789
13635
|
category: "framer",
|
|
@@ -13833,27 +13679,6 @@ var methodsByCategory = {
|
|
|
13833
13679
|
description: "Get a node by its id.\n@category canvas",
|
|
13834
13680
|
references: ["AnyNode"]
|
|
13835
13681
|
},
|
|
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
13682
|
{
|
|
13858
13683
|
name: "getNodesWithAttribute",
|
|
13859
13684
|
category: "framer",
|
|
@@ -13882,13 +13707,6 @@ var methodsByCategory = {
|
|
|
13882
13707
|
description: "Get the parent of a node.\n@category canvas",
|
|
13883
13708
|
references: ["AnyNode"]
|
|
13884
13709
|
},
|
|
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
13710
|
{
|
|
13893
13711
|
name: "getProjectInfo",
|
|
13894
13712
|
category: "framer",
|
|
@@ -13917,13 +13735,6 @@ var methodsByCategory = {
|
|
|
13917
13735
|
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
13736
|
references: ["Redirect"]
|
|
13919
13737
|
},
|
|
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
13738
|
{
|
|
13928
13739
|
name: "getText",
|
|
13929
13740
|
category: "framer",
|
|
@@ -13952,13 +13763,6 @@ var methodsByCategory = {
|
|
|
13952
13763
|
description: "Get all available vector sets.\n\n@alpha",
|
|
13953
13764
|
references: ["VectorSet"]
|
|
13954
13765
|
},
|
|
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
13766
|
{
|
|
13963
13767
|
name: "mode",
|
|
13964
13768
|
category: "framer",
|
|
@@ -13966,18 +13770,11 @@ var methodsByCategory = {
|
|
|
13966
13770
|
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
13771
|
references: ["Mode"]
|
|
13968
13772
|
},
|
|
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
13773
|
{
|
|
13977
13774
|
name: "ping",
|
|
13978
13775
|
category: "framer",
|
|
13979
13776
|
signature: "ping(): Promise<void>",
|
|
13980
|
-
description: "Liveness round-trip: resolves once Vekter's plugin handler answers. Used by the headless
|
|
13777
|
+
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
13778
|
references: []
|
|
13982
13779
|
},
|
|
13983
13780
|
{
|
|
@@ -13987,62 +13784,6 @@ var methodsByCategory = {
|
|
|
13987
13784
|
description: "",
|
|
13988
13785
|
references: ["PublishResult"]
|
|
13989
13786
|
},
|
|
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
13787
|
{
|
|
14047
13788
|
name: "rejectAllPending",
|
|
14048
13789
|
category: "framer",
|
|
@@ -14071,23 +13812,6 @@ var methodsByCategory = {
|
|
|
14071
13812
|
description: "",
|
|
14072
13813
|
references: []
|
|
14073
13814
|
},
|
|
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
13815
|
{
|
|
14092
13816
|
name: "screenshot",
|
|
14093
13817
|
category: "framer",
|
|
@@ -14095,20 +13819,6 @@ var methodsByCategory = {
|
|
|
14095
13819
|
description: "",
|
|
14096
13820
|
references: ["ScreenshotOptions", "ScreenshotResult"]
|
|
14097
13821
|
},
|
|
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
13822
|
{
|
|
14113
13823
|
name: "sessionId",
|
|
14114
13824
|
category: "framer",
|
|
@@ -14179,26 +13889,6 @@ var methodsByCategory = {
|
|
|
14179
13889
|
description: "Set the text of the current selection or insert it onto the canvas.\n@category canvas",
|
|
14180
13890
|
references: []
|
|
14181
13891
|
},
|
|
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
13892
|
{
|
|
14203
13893
|
name: "typecheckCode",
|
|
14204
13894
|
category: "framer",
|
|
@@ -14235,6 +13925,176 @@ var methodsByCategory = {
|
|
|
14235
13925
|
references: ["NamedImageAssetInput", "ImageAsset"]
|
|
14236
13926
|
}
|
|
14237
13927
|
],
|
|
13928
|
+
frameragentapi: [
|
|
13929
|
+
{
|
|
13930
|
+
name: "applyChanges",
|
|
13931
|
+
category: "FramerAgentAPI",
|
|
13932
|
+
signature: "applyChanges(dsl: string, options?: { pagePath?: string; }): Promise<void>",
|
|
13933
|
+
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.',
|
|
13934
|
+
references: []
|
|
13935
|
+
},
|
|
13936
|
+
{
|
|
13937
|
+
name: "flattenComponentInstance",
|
|
13938
|
+
category: "FramerAgentAPI",
|
|
13939
|
+
signature: "flattenComponentInstance(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13940
|
+
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.',
|
|
13941
|
+
references: []
|
|
13942
|
+
},
|
|
13943
|
+
{
|
|
13944
|
+
name: "getAncestors",
|
|
13945
|
+
category: "FramerAgentAPI",
|
|
13946
|
+
signature: "getAncestors(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13947
|
+
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.',
|
|
13948
|
+
references: []
|
|
13949
|
+
},
|
|
13950
|
+
{
|
|
13951
|
+
name: "getContext",
|
|
13952
|
+
category: "FramerAgentAPI",
|
|
13953
|
+
signature: "getContext(options?: { pagePath?: string; }): Promise<string>",
|
|
13954
|
+
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.',
|
|
13955
|
+
references: []
|
|
13956
|
+
},
|
|
13957
|
+
{
|
|
13958
|
+
name: "getGroundNode",
|
|
13959
|
+
category: "FramerAgentAPI",
|
|
13960
|
+
signature: "getGroundNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13961
|
+
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.',
|
|
13962
|
+
references: []
|
|
13963
|
+
},
|
|
13964
|
+
{
|
|
13965
|
+
name: "getNode",
|
|
13966
|
+
category: "FramerAgentAPI",
|
|
13967
|
+
signature: "getNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13968
|
+
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.',
|
|
13969
|
+
references: []
|
|
13970
|
+
},
|
|
13971
|
+
{
|
|
13972
|
+
name: "getNodes",
|
|
13973
|
+
category: "FramerAgentAPI",
|
|
13974
|
+
signature: "getNodes(input: { ids: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13975
|
+
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.',
|
|
13976
|
+
references: []
|
|
13977
|
+
},
|
|
13978
|
+
{
|
|
13979
|
+
name: "getNodesOfTypes",
|
|
13980
|
+
category: "FramerAgentAPI",
|
|
13981
|
+
signature: "getNodesOfTypes(input: { types: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13982
|
+
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.',
|
|
13983
|
+
references: []
|
|
13984
|
+
},
|
|
13985
|
+
{
|
|
13986
|
+
name: "getParentNode",
|
|
13987
|
+
category: "FramerAgentAPI",
|
|
13988
|
+
signature: "getParentNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13989
|
+
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.',
|
|
13990
|
+
references: []
|
|
13991
|
+
},
|
|
13992
|
+
{
|
|
13993
|
+
name: "getScopeNode",
|
|
13994
|
+
category: "FramerAgentAPI",
|
|
13995
|
+
signature: "getScopeNode(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13996
|
+
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.',
|
|
13997
|
+
references: []
|
|
13998
|
+
},
|
|
13999
|
+
{
|
|
14000
|
+
name: "getSystemPrompt",
|
|
14001
|
+
category: "FramerAgentAPI",
|
|
14002
|
+
signature: "getSystemPrompt(): Promise<string>",
|
|
14003
|
+
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.",
|
|
14004
|
+
references: []
|
|
14005
|
+
},
|
|
14006
|
+
{
|
|
14007
|
+
name: "makeExternalComponentLocal",
|
|
14008
|
+
category: "FramerAgentAPI",
|
|
14009
|
+
signature: "makeExternalComponentLocal(input: { id: string; replaceAll?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14010
|
+
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.',
|
|
14011
|
+
references: []
|
|
14012
|
+
},
|
|
14013
|
+
{
|
|
14014
|
+
name: "paginate",
|
|
14015
|
+
category: "FramerAgentAPI",
|
|
14016
|
+
signature: "paginate(input: { items: readonly unknown[]; keyName?: never; cursor?: never; } | { keyName: string; cursor: number; items?: never; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14017
|
+
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`.',
|
|
14018
|
+
references: []
|
|
14019
|
+
},
|
|
14020
|
+
{
|
|
14021
|
+
name: "publish",
|
|
14022
|
+
category: "FramerAgentAPI",
|
|
14023
|
+
signature: "publish(input?: Record<string, unknown>): Promise<unknown>",
|
|
14024
|
+
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.",
|
|
14025
|
+
references: []
|
|
14026
|
+
},
|
|
14027
|
+
{
|
|
14028
|
+
name: "queryImages",
|
|
14029
|
+
category: "FramerAgentAPI",
|
|
14030
|
+
signature: "queryImages(input: Record<string, unknown>): Promise<unknown>",
|
|
14031
|
+
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.',
|
|
14032
|
+
references: []
|
|
14033
|
+
},
|
|
14034
|
+
{
|
|
14035
|
+
name: "readComponentControls",
|
|
14036
|
+
category: "FramerAgentAPI",
|
|
14037
|
+
signature: "readComponentControls(input: { componentIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14038
|
+
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.',
|
|
14039
|
+
references: []
|
|
14040
|
+
},
|
|
14041
|
+
{
|
|
14042
|
+
name: "readIcons",
|
|
14043
|
+
category: "FramerAgentAPI",
|
|
14044
|
+
signature: "readIcons(input: { iconSetName: string; }, options?: { pagePath?: string; }): Promise<string[]>",
|
|
14045
|
+
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.',
|
|
14046
|
+
references: []
|
|
14047
|
+
},
|
|
14048
|
+
{
|
|
14049
|
+
name: "readIconSetControls",
|
|
14050
|
+
category: "FramerAgentAPI",
|
|
14051
|
+
signature: "readIconSetControls(input: { iconSetNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14052
|
+
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.',
|
|
14053
|
+
references: []
|
|
14054
|
+
},
|
|
14055
|
+
{
|
|
14056
|
+
name: "readLayoutTemplateControls",
|
|
14057
|
+
category: "FramerAgentAPI",
|
|
14058
|
+
signature: "readLayoutTemplateControls(input: { layoutTemplateIds: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14059
|
+
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.',
|
|
14060
|
+
references: []
|
|
14061
|
+
},
|
|
14062
|
+
{
|
|
14063
|
+
name: "readProject",
|
|
14064
|
+
category: "FramerAgentAPI",
|
|
14065
|
+
signature: "readProject(queries: Record<string, unknown>[], options?: { pagePath?: string; }): Promise<{ results: unknown[]; }>",
|
|
14066
|
+
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.',
|
|
14067
|
+
references: []
|
|
14068
|
+
},
|
|
14069
|
+
{
|
|
14070
|
+
name: "readShaderControls",
|
|
14071
|
+
category: "FramerAgentAPI",
|
|
14072
|
+
signature: "readShaderControls(input: { shaderNames: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14073
|
+
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.',
|
|
14074
|
+
references: []
|
|
14075
|
+
},
|
|
14076
|
+
{
|
|
14077
|
+
name: "reviewChanges",
|
|
14078
|
+
category: "FramerAgentAPI",
|
|
14079
|
+
signature: "reviewChanges(options?: { pagePath?: string; }): Promise<unknown>",
|
|
14080
|
+
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.",
|
|
14081
|
+
references: []
|
|
14082
|
+
},
|
|
14083
|
+
{
|
|
14084
|
+
name: "serialize",
|
|
14085
|
+
category: "FramerAgentAPI",
|
|
14086
|
+
signature: "serialize(input: { id: string; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14087
|
+
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.',
|
|
14088
|
+
references: []
|
|
14089
|
+
},
|
|
14090
|
+
{
|
|
14091
|
+
name: "serializeNodes",
|
|
14092
|
+
category: "FramerAgentAPI",
|
|
14093
|
+
signature: "serializeNodes(input: { ids: readonly string[]; depth?: number; attributeFilter?: readonly string[]; ancestorPath?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
14094
|
+
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.',
|
|
14095
|
+
references: []
|
|
14096
|
+
}
|
|
14097
|
+
],
|
|
14238
14098
|
framerapierror: [
|
|
14239
14099
|
{
|
|
14240
14100
|
name: "recentMethods",
|
|
@@ -16625,7 +16485,7 @@ async function waitForClaudeCodeSkillDiscovery() {
|
|
|
16625
16485
|
);
|
|
16626
16486
|
}
|
|
16627
16487
|
__name(waitForClaudeCodeSkillDiscovery, "waitForClaudeCodeSkillDiscovery");
|
|
16628
|
-
var FRAMER_TEMPORARY_DIR = path7.join(
|
|
16488
|
+
var FRAMER_TEMPORARY_DIR = path7.join(os2.tmpdir(), "framer");
|
|
16629
16489
|
function ensureTemporaryDir() {
|
|
16630
16490
|
fs7.mkdirSync(FRAMER_TEMPORARY_DIR, { recursive: true });
|
|
16631
16491
|
}
|
|
@@ -16720,7 +16580,7 @@ function cleanupLegacyCanvasEditingSkills(skillRoots = getDefaultSkillRoots()) {
|
|
|
16720
16580
|
}
|
|
16721
16581
|
__name(cleanupLegacyCanvasEditingSkills, "cleanupLegacyCanvasEditingSkills");
|
|
16722
16582
|
function getDefaultSkillRoots() {
|
|
16723
|
-
const home =
|
|
16583
|
+
const home = os2.homedir();
|
|
16724
16584
|
return [
|
|
16725
16585
|
path7.join(home, ".agents", "skills"),
|
|
16726
16586
|
path7.join(home, ".claude", "skills")
|
|
@@ -16829,7 +16689,7 @@ async function getAgentSystemPrompt(sessionId) {
|
|
|
16829
16689
|
debug("exec", "getAgentSystemPrompt: calling relay...");
|
|
16830
16690
|
const result = await client.exec.mutate({
|
|
16831
16691
|
sessionId,
|
|
16832
|
-
code: "return await framer.
|
|
16692
|
+
code: "return await framer.agent.getSystemPrompt();",
|
|
16833
16693
|
cwd: process.cwd()
|
|
16834
16694
|
});
|
|
16835
16695
|
debug("exec", "getAgentSystemPrompt: relay responded");
|
|
@@ -16845,7 +16705,7 @@ async function getAgentContext(sessionId) {
|
|
|
16845
16705
|
debug("exec", "getAgentContext: calling relay...");
|
|
16846
16706
|
const result = await client.exec.mutate({
|
|
16847
16707
|
sessionId,
|
|
16848
|
-
code: "return await framer.
|
|
16708
|
+
code: "return await framer.agent.getContext({ pagePath: '/' });",
|
|
16849
16709
|
cwd: process.cwd()
|
|
16850
16710
|
});
|
|
16851
16711
|
debug("exec", "getAgentContext: relay responded");
|
|
@@ -16999,7 +16859,7 @@ program.command("apply-changes").description("Apply canvas DSL changes to a page
|
|
|
16999
16859
|
).requiredOption("-e, --eval <dsl>", "DSL string to apply").option("-p, --page <path>", "Target page path", "/").action(async (options) => {
|
|
17000
16860
|
const { session: sessionId, eval: dsl, page: pagePath } = options;
|
|
17001
16861
|
const code = `
|
|
17002
|
-
const result = await framer.
|
|
16862
|
+
const result = await framer.agent.applyChanges(${JSON.stringify(dsl)}, { pagePath: ${JSON.stringify(pagePath)} });
|
|
17003
16863
|
if (result) console.log(JSON.stringify(result, null, 2));
|
|
17004
16864
|
`;
|
|
17005
16865
|
await execAndPrint(sessionId, code);
|
|
@@ -17022,7 +16882,7 @@ program.command("read-project").description("Read project state for a page").req
|
|
|
17022
16882
|
process.exit(1);
|
|
17023
16883
|
}
|
|
17024
16884
|
const code = `
|
|
17025
|
-
const result = await framer.
|
|
16885
|
+
const result = await framer.agent.readProject(${JSON.stringify(queries)}, { pagePath: ${JSON.stringify(pagePath)} });
|
|
17026
16886
|
if (result) console.log(JSON.stringify(result, null, 2));
|
|
17027
16887
|
`;
|
|
17028
16888
|
await execAndPrint(sessionId, code);
|