@agent-native/core 0.80.9 → 0.80.10
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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +7 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/design-connect.ts +28 -2
- package/corpus/core/src/cli/skills.ts +45 -24
- package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +717 -0
- package/corpus/templates/design/actions/add-breakpoint.ts +143 -0
- package/corpus/templates/design/actions/add-localhost-screens.ts +5 -0
- package/corpus/templates/design/actions/apply-a11y-fix.ts +317 -0
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +433 -0
- package/corpus/templates/design/actions/apply-design-state.ts +200 -0
- package/corpus/templates/design/actions/apply-design-token-edit.ts +202 -0
- package/corpus/templates/design/actions/apply-motion-edit.ts +450 -0
- package/corpus/templates/design/actions/apply-shader-fill.ts +404 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +191 -5
- package/corpus/templates/design/actions/capture-design-state.ts +224 -0
- package/corpus/templates/design/actions/connect-builder-app.ts +162 -0
- package/corpus/templates/design/actions/create-component.ts +447 -0
- package/corpus/templates/design/actions/create-design-branch.ts +263 -0
- package/corpus/templates/design/actions/create-design-state.ts +162 -0
- package/corpus/templates/design/actions/delete-design-state.ts +55 -0
- package/corpus/templates/design/actions/deploy-design-preview.ts +275 -0
- package/corpus/templates/design/actions/get-component-details.ts +242 -0
- package/corpus/templates/design/actions/get-design-branch-diff.ts +362 -0
- package/corpus/templates/design/actions/get-design-review.ts +314 -0
- package/corpus/templates/design/actions/get-design-surface-index.ts +582 -0
- package/corpus/templates/design/actions/get-motion-timeline.ts +99 -0
- package/corpus/templates/design/actions/index-components.ts +258 -0
- package/corpus/templates/design/actions/index-design-tokens.ts +273 -0
- package/corpus/templates/design/actions/list-design-extensions.ts +309 -0
- package/corpus/templates/design/actions/list-design-source-capabilities.ts +153 -0
- package/corpus/templates/design/actions/list-design-states.ts +72 -0
- package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +298 -0
- package/corpus/templates/design/actions/open-component-source.ts +237 -0
- package/corpus/templates/design/actions/preview-component-prop-edit.ts +254 -0
- package/corpus/templates/design/actions/preview-design-token-edit.ts +113 -0
- package/corpus/templates/design/actions/preview-shader-fill.ts +189 -0
- package/corpus/templates/design/actions/remove-breakpoint.ts +103 -0
- package/corpus/templates/design/actions/remove-motion-timeline.ts +196 -0
- package/corpus/templates/design/actions/run-design-audit.ts +421 -0
- package/corpus/templates/design/actions/run-design-extension-action.ts +284 -0
- package/corpus/templates/design/actions/set-active-breakpoint.ts +39 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +1414 -71
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +632 -43
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1391 -52
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +4 -3
- package/corpus/templates/design/app/components/design/LocalSourceEditBanner.tsx +157 -0
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1062 -0
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1052 -98
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +759 -0
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +579 -0
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +573 -0
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +241 -0
- package/corpus/templates/design/app/components/design/index.ts +16 -0
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +15 -6
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +66 -3
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +145 -0
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +42 -12
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +131 -0
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -1
- package/corpus/templates/design/app/i18n/zh-TW.ts +31 -0
- package/corpus/templates/design/app/i18n-data.ts +269 -0
- package/corpus/templates/design/app/pages/DesignEditor.tsx +2478 -386
- package/corpus/templates/design/changelog/2026-06-29-added-a-review-panel-in-the-design-editor-s-inspector-with-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-copying-and-pasting-layers-no-longer-shows-success-notificat.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-device-presets-in-all-screens-view-resize-the-selected-previ.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-and-canvas-drags-keep-the-layer-list-stable-while-chan.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-moves-can-be-undone-and-redone-without-flashing-the-ca.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-previews-use-a-single-blue-hover-border-in-all-screen.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-selected-containers-show-draggable-padding-and-gap-guides-on.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-design-editor-adds-a-studio-layer-with-tokens-respon.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-accessibility-findings-now-offer-a-one-click-fix.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-component-instances-now-have-editable-props-in-the-inspe.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-inspect-code-now-shows-the-elements-opening-tag-at-a-gla.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-shader-fill-presets-can-now-be-applied-to-an-element.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-motion-timeline-can-now-add-a-track-to-any-element-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-visual-editor-selection-layer-paint-and-drawing-controls-are-more-reliable.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +10 -4
- package/corpus/templates/design/server/db/schema.ts +123 -0
- package/corpus/templates/design/server/plugins/db.ts +90 -0
- package/corpus/templates/design/shared/builder-app.ts +297 -0
- package/corpus/templates/design/shared/capability-resolver.ts +123 -0
- package/corpus/templates/design/shared/capture-sanitize.ts +70 -0
- package/corpus/templates/design/shared/code-layer.ts +1016 -71
- package/corpus/templates/design/shared/component-model.ts +239 -0
- package/corpus/templates/design/shared/design-review.ts +275 -0
- package/corpus/templates/design/shared/design-source-capabilities.ts +286 -0
- package/corpus/templates/design/shared/design-state.ts +112 -0
- package/corpus/templates/design/shared/design-surface-index.ts +258 -0
- package/corpus/templates/design/shared/motion-compiler.ts +278 -0
- package/corpus/templates/design/shared/motion-timeline.ts +193 -0
- package/corpus/templates/design/shared/responsive-classes.ts +452 -0
- package/corpus/templates/design/shared/shader-fill.ts +323 -0
- package/corpus/templates/design/shared/source-mode.ts +245 -0
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +6 -2
- package/corpus/templates/plan/changelog/2026-06-29-plan-canvases-open-without-an-initial-pan-and-zoom-flicker.md +6 -0
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +28 -2
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +37 -21
- package/dist/cli/skills.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +7 -7
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +1 -1
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.80.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d26a679: Design connect: document the per-element provenance contract (`data-source-file` / `data-source-line` / `data-source-column` / `data-component-name`, plus `data-loc` shorthand) used to map a selected element back to its source location, and surface it in `design connect --help`. The `resolveNodeToFile` bridge capability now carries a reason string describing this contract.
|
|
8
|
+
- d26a679: Harden the app-backed skill installer for visual-plan feedback: built-in skill folders now stage writes before replacing existing installs, include first-time install command metadata, and make `skills update` point first-time users to `skills add` for setup and MCP registration.
|
|
9
|
+
|
|
3
10
|
## 0.80.9
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.10",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -367,7 +367,14 @@ export async function prepareDesignConnectManifest(
|
|
|
367
367
|
reason:
|
|
368
368
|
operation === "writeFile"
|
|
369
369
|
? "The bridge advertises the contract before enabling local file writes."
|
|
370
|
-
:
|
|
370
|
+
: operation === "resolveNodeToFile"
|
|
371
|
+
? // resolveNodeToFile maps a runtime DOM node id (from the editor's
|
|
372
|
+
// 'select' payload) to { file, line, component } provenance. The
|
|
373
|
+
// bridge endpoint exists; per-element provenance data must be
|
|
374
|
+
// emitted by the connected app at build time — see the provenance
|
|
375
|
+
// note in the help text below.
|
|
376
|
+
"Requires the connected app to emit data-source-file / data-source-line / data-component-name attributes (e.g. via @vitejs/plugin-react jsxDEV or a Babel source plugin)."
|
|
377
|
+
: undefined,
|
|
371
378
|
})),
|
|
372
379
|
};
|
|
373
380
|
}
|
|
@@ -442,7 +449,26 @@ Options:
|
|
|
442
449
|
--route-manifest <path> Non-destructive route manifest output path
|
|
443
450
|
--json Print the manifest JSON and exit
|
|
444
451
|
--once Prepare/scaffold the manifest and exit
|
|
445
|
-
--dry-run Print what would be exposed without writing files
|
|
452
|
+
--dry-run Print what would be exposed without writing files
|
|
453
|
+
|
|
454
|
+
Element provenance (resolveNodeToFile):
|
|
455
|
+
The design editor can map a selected DOM element back to its source file,
|
|
456
|
+
line, and React component name when the connected app emits provenance
|
|
457
|
+
attributes at build time. Add one of the following to your app's build:
|
|
458
|
+
|
|
459
|
+
• @vitejs/plugin-react with jsxDEV enabled (development mode default):
|
|
460
|
+
Sets data-source-file and data-source-line on each JSX element
|
|
461
|
+
automatically when using the Babel transform.
|
|
462
|
+
|
|
463
|
+
• A Babel source plugin (e.g. babel-plugin-react-source or a custom plugin):
|
|
464
|
+
Emits data-source-file="src/Button.tsx" data-source-line="12"
|
|
465
|
+
data-source-column="4" data-component-name="Button" on each element.
|
|
466
|
+
|
|
467
|
+
• data-loc="src/Button.tsx:12:4" shorthand attribute (Babel source convention):
|
|
468
|
+
The bridge parses this as { sourceFile, line, column } automatically.
|
|
469
|
+
|
|
470
|
+
Without these attributes the editor still works; provenance is simply absent.
|
|
471
|
+
Cross-origin localhost iframes cannot be read regardless of attributes (CSP).`);
|
|
446
472
|
}
|
|
447
473
|
|
|
448
474
|
export async function runDesign(argv: string[]) {
|
|
@@ -3073,6 +3073,7 @@ interface SkillInstallMetadata {
|
|
|
3073
3073
|
contentHash: string;
|
|
3074
3074
|
mcpUrl: string;
|
|
3075
3075
|
installedAt: string;
|
|
3076
|
+
installCommand: string;
|
|
3076
3077
|
updateCommand: string;
|
|
3077
3078
|
planMode?: PlanInstallMode;
|
|
3078
3079
|
}
|
|
@@ -3489,30 +3490,48 @@ function writeSkillFolder(
|
|
|
3489
3490
|
bundle: SkillFolderBundle,
|
|
3490
3491
|
installedAt = new Date().toISOString(),
|
|
3491
3492
|
): void {
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
3497
|
-
fs.writeFileSync(target, content, "utf-8");
|
|
3498
|
-
}
|
|
3499
|
-
const metadata: SkillInstallMetadata = {
|
|
3500
|
-
schemaVersion: 1,
|
|
3501
|
-
source: "agent-native",
|
|
3502
|
-
appSkillId: bundle.appSkillId,
|
|
3503
|
-
displayName: bundle.displayName,
|
|
3504
|
-
skillName: bundle.skillName,
|
|
3505
|
-
contentHash: bundle.contentHash,
|
|
3506
|
-
mcpUrl: bundle.mcpUrl,
|
|
3507
|
-
installedAt,
|
|
3508
|
-
updateCommand: `npx @agent-native/core@latest skills update ${bundle.skillName}`,
|
|
3509
|
-
...(bundle.planMode ? { planMode: bundle.planMode } : {}),
|
|
3510
|
-
};
|
|
3511
|
-
fs.writeFileSync(
|
|
3512
|
-
path.join(dir, AGENT_NATIVE_SKILL_METADATA_FILE),
|
|
3513
|
-
`${JSON.stringify(metadata, null, 2)}\n`,
|
|
3514
|
-
"utf-8",
|
|
3493
|
+
const parent = path.dirname(dir);
|
|
3494
|
+
const tempDir = path.join(
|
|
3495
|
+
parent,
|
|
3496
|
+
`.${path.basename(dir)}.${process.pid}.${Date.now()}.tmp`,
|
|
3515
3497
|
);
|
|
3498
|
+
try {
|
|
3499
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
3500
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
3501
|
+
for (const [rel, content] of Object.entries(bundle.files)) {
|
|
3502
|
+
const target = path.join(tempDir, rel);
|
|
3503
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
3504
|
+
fs.writeFileSync(target, content, "utf-8");
|
|
3505
|
+
}
|
|
3506
|
+
const metadata: SkillInstallMetadata = {
|
|
3507
|
+
schemaVersion: 1,
|
|
3508
|
+
source: "agent-native",
|
|
3509
|
+
appSkillId: bundle.appSkillId,
|
|
3510
|
+
displayName: bundle.displayName,
|
|
3511
|
+
skillName: bundle.skillName,
|
|
3512
|
+
contentHash: bundle.contentHash,
|
|
3513
|
+
mcpUrl: bundle.mcpUrl,
|
|
3514
|
+
installedAt,
|
|
3515
|
+
installCommand: `npx @agent-native/core@latest skills add ${bundle.skillName}`,
|
|
3516
|
+
updateCommand: `npx @agent-native/core@latest skills update ${bundle.skillName}`,
|
|
3517
|
+
...(bundle.planMode ? { planMode: bundle.planMode } : {}),
|
|
3518
|
+
};
|
|
3519
|
+
fs.writeFileSync(
|
|
3520
|
+
path.join(tempDir, AGENT_NATIVE_SKILL_METADATA_FILE),
|
|
3521
|
+
`${JSON.stringify(metadata, null, 2)}\n`,
|
|
3522
|
+
"utf-8",
|
|
3523
|
+
);
|
|
3524
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
3525
|
+
fs.renameSync(tempDir, dir);
|
|
3526
|
+
} catch (error: any) {
|
|
3527
|
+
try {
|
|
3528
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
3529
|
+
} catch {}
|
|
3530
|
+
throw new Error(
|
|
3531
|
+
`Cannot write Agent Native skill folder ${dir}: ${error?.message ?? error}`,
|
|
3532
|
+
{ cause: error },
|
|
3533
|
+
);
|
|
3534
|
+
}
|
|
3516
3535
|
}
|
|
3517
3536
|
|
|
3518
3537
|
function isJsonRecord(value: unknown): value is Record<string, unknown> {
|
|
@@ -6228,7 +6247,9 @@ function runSkillsStatusOrUpdate(
|
|
|
6228
6247
|
const target = parsed.target ? ` for ${parsed.target}` : "";
|
|
6229
6248
|
const hint = isScaffoldGuidanceTarget(parsed.target)
|
|
6230
6249
|
? `Run this from a generated Agent Native app or workspace root.\n`
|
|
6231
|
-
:
|
|
6250
|
+
: update
|
|
6251
|
+
? `The update command only refreshes skill folders that already exist; it does not do first-time install, MCP registration, or auth. Run "npx @agent-native/core@latest skills add ${parsed.target ?? "visual-plan"}" for one-step setup.\n`
|
|
6252
|
+
: `Run "npx @agent-native/core@latest skills add ${parsed.target ?? "visual-plan"}" to install one.\n`;
|
|
6232
6253
|
process.stdout.write(
|
|
6233
6254
|
`No installed Agent Native skill copies found${target}.\n${hint}`,
|
|
6234
6255
|
);
|