@gakim-digital/dexter-bridge 0.13.10 → 0.13.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gakim-digital/dexter-bridge",
3
- "version": "0.13.10",
3
+ "version": "0.13.11",
4
4
  "description": "Local bridge for InstaWebAI and Dexter — runs Codex, Claude Code, or OpenCode on your machine.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,6 +31,11 @@ export const FRAMER_ERROR_FIXES = [
31
31
  || /to virtual (rich-text|textBlock) node/i.test(error.message),
32
32
  fix: 'Text styling belongs on the text runs, not on the text layer\'s frame. Set it in the same patch that sets the text, or style the TextRun children as the tree API guidance describes.',
33
33
  },
34
+ {
35
+ id: 'rich-text-field-blocks',
36
+ matches: (error) => /^\$control__/.test(error.property) && /TextBlock/.test(error.message),
37
+ fix: 'A rich text field or control takes plain text, not a list of blocks. Set it to the first paragraph\'s plain text, then insert each further heading, paragraph, and list with tree.insert, using parent "<layer or item id>/<field id>" and a tag on every TextBlock, as the preloaded rich text guidance shows. Insert long text a few sections per framer_edit. Do not put the whole text in one plain-text value: it becomes a single paragraph and loses every heading.',
38
+ },
34
39
  {
35
40
  id: 'layout-template-controls',
36
41
  matches: (error) => /layout-template-controlled properties/i.test(error.message),
@@ -39,6 +39,7 @@ const GUIDANCE_PATHS = [
39
39
  'references/script/node-properties/part-1.md',
40
40
  'references/script/node-properties/part-2.md',
41
41
  'references/script/project-apis/part-1.md',
42
+ 'references/project/rich-text/part-1.md',
42
43
  ];
43
44
  const CONTEXT_PATH = 'context.md';
44
45
  const PRELOADED_PATHS = new Set([CONTEXT_PATH, ...GUIDANCE_PATHS]);
package/src/protocol.js CHANGED
@@ -506,12 +506,13 @@ export function buildFramerOutcomePrompt(outcome = {}, product, promptContext =
506
506
  'Framer lays out only some pages for Dexter. On the others a measure comes back unmeasured: there are no numbers, so judge sizes and spacing from a screenshot and do not change layers because of a measure that was not taken. An unmeasured requirement is not a failure. When framer_measure is among your tools, it measures the page open in the user\'s editor, and framer_verify already uses it.',
507
507
  'If one visual detail, such as a gradient, an effect, or the stacking of layers, still does not look right after two attempts, keep the closest version, finish the rest of the task, and name the difference in your summary. Do not run diagnostic experiments on the user\'s canvas, such as test colours or throwaway layers.',
508
508
  'For depth and 3D, set native transforms with api.tree inside framer_edit, as described in the Framer guidance Transforms section: perspective on the parent, preserve3d on a container whose children must stay in 3D space, rotateX, rotateY, rotateZ, translateZ, and transformOrigin on the moving layers, and backfaceVisibility for flip faces. Rotations without a parent perspective render flat. Spend 3D on one signature moment, such as a tilted product mockup, layered card stack, flip card, or hover tilt; keep text readable, reduce or flatten the effect on smaller breakpoints, and confirm it in a screenshot. Do not fake 3D with images or code components when native transforms can achieve it.',
509
+ 'Each tool call has to fit in one of your responses, so add long text such as a legal page or an article a few sections per framer_edit.',
509
510
  'You decide when the run is complete. Avoid repeated inspection of unchanged evidence and stop when the requested outcome has been implemented and verified.',
510
511
  'Dexter will not perform a second design verification after you finish. Structural verification must be described honestly and must never be called runtime-tested unless an interaction was actually exercised.',
511
512
  'Return blocked only when Framer authorization is missing or you need a decision the user has not made yet. Otherwise return completed once you have done what can be done. When part of the request cannot be done, or the user said to leave something as it is, explaining plainly what you did, what is left, and why is a complete answer.',
512
513
  'A greeting, thanks, or question that needs no project change is not blocked: answer it in summary without reading or editing the project and return completed.',
513
514
  'Set projectChanged to true only when this run applied a change to the Framer project, and list the ids of the layers you changed in changedNodeIds. The summary must describe only changes that were applied. If a requirement is still not met, or you could not find or change something, name it plainly in the summary; never describe it as done.',
514
- 'Some requests need something beyond the layers you may change, such as photos on other pages, a component shared across the site, or site-wide styles. If the user has not decided about it yet, ask one plain question that names it and what changing it affects, and return blocked; when they agree, Dexter gives you that reach in the next run. If they already said no, or told you what to do in that case, do not ask again: do what you can within what you may change, and explain plainly what is in the way, such as which shared setting causes it. Never mention access, scope, permissions, grants, or authorization.',
515
+ 'The open page and the selected layers show where the user is working. Start there, but they do not limit what you may change: when the user\'s words are about another page, a component shared across the site, the site-wide header, navigation, or footer, or site-wide styles, change those too, and say in your summary what else the change affects. Ask first, with one plain question that names it and what changing it affects, and return blocked, only when a shared change would also alter places the user did not mention and they have not decided about it. If they already said no, or told you what to do in that case, do not ask again: do what you can, and explain plainly what is in the way, such as which shared setting causes it. Never mention access, scope, permissions, grants, or authorization.',
515
516
  'Deleting CMS collections, items, or fields, or pages, needs the user\'s clear permission in this conversation; context.permissions.deleteContent is true when they gave it. A request to change, fix, or replace content is not permission to delete it. Without it, ask one plain question naming exactly what you would delete and return blocked, before building any replacement for it.',
516
517
  'If you changed layers before asking a question, say in your summary what you changed.',
517
518
  'When you return blocked, write the question itself in summary, since summary is what the user reads; blockedReason is a short note for Dexter.',
@@ -530,7 +531,7 @@ export function buildFramerOutcomePrompt(outcome = {}, product, promptContext =
530
531
  const task = [
531
532
  ...(selectionFirst
532
533
  ? [
533
- 'This is a selection-first run. Start from the selected nodes: they show what the user is pointing at. When the user\'s words name other layers on this page, or the setting they asked about sits on a parent of the selection, change that too, within the reach in the assignment.',
534
+ 'This is a selection-first run. Start from the selected nodes: they show what the user is pointing at. When the user\'s words name other layers or pages, or the setting they asked about sits on a parent of the selection, change that too.',
534
535
  'Use a focused live Framer read of the selected nodes and their descendants before editing when you need current details.',
535
536
  'Prefer focused inspection. Expand beyond the selected subtree only when a concrete dependency requires it.',
536
537
  'Batch related canvas edits when practical, but make as many repair batches as the verified result genuinely requires.',
@@ -132,7 +132,7 @@ function codexOutcomeInstructions(product, { platform = null } = {}) {
132
132
  return [
133
133
  `You are an autonomous Framer harness embedded inside ${name}.`,
134
134
  'Work directly in the connected Framer project through Framer MCP. Programs use api.tree. There is no framer global.',
135
- 'When selected nodes are supplied, start with them and reuse their supplied snapshot. They show what the user is pointing at; the user\'s words decide what to change, within the reach in the assignment.',
135
+ 'When selected nodes are supplied, start with them and reuse their supplied snapshot. They show what the user is pointing at; the user\'s words decide what to change.',
136
136
  'Prefer focused inspection and batched edits, but use as many reads, repairs, and verification passes as the work genuinely requires.',
137
137
  'You own the full Framer loop: inspect, edit, read diagnostics, verify the actual result, repair concrete failures, and decide when the request is complete.',
138
138
  'Avoid repeated inspection of unchanged evidence and avoid broad project inspection unless a concrete dependency requires it.',