@agent-native/core 0.92.7 → 0.92.9
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 +18 -0
- package/corpus/core/docs/content/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/ar-SA/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/ar-SA/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/de-DE/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/de-DE/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/es-ES/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/es-ES/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/fr-FR/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/fr-FR/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/hi-IN/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/hi-IN/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/hi-IN/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/ja-JP/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/ja-JP/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/ja-JP/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/ko-KR/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/ko-KR/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/ko-KR/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/pt-BR/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/pt-BR/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/zh-CN/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/zh-CN/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/locales/zh-TW/a2a-protocol.mdx +12 -0
- package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -0
- package/corpus/core/docs/content/pr-visual-recap.mdx +3 -3
- package/corpus/core/docs/content/pure-agent-apps.mdx +22 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/engine/builtin.ts +1 -1
- package/corpus/core/src/agent/model-config.ts +30 -30
- package/corpus/core/src/agent/production-agent.ts +129 -7
- package/corpus/core/src/cli/design-connect.ts +438 -83
- package/corpus/core/src/cli/recap.ts +17 -3
- package/corpus/core/src/client/AgentPanel.tsx +8 -1
- package/corpus/core/src/client/agent-chat-adapter.ts +12 -7
- package/corpus/core/src/client/composer/TiptapComposer.tsx +1 -1
- package/corpus/core/src/client/index.ts +4 -0
- package/corpus/core/src/client/org/TeamPage.tsx +41 -26
- package/corpus/core/src/client/use-action.ts +113 -1
- package/corpus/core/src/db/client.ts +12 -2
- package/corpus/core/src/db/create-get-db.ts +4 -1
- package/corpus/core/src/scripts/agent-engines/manage-agent-engine.ts +1 -1
- package/corpus/core/src/scripts/agent-engines/set-agent-engine.ts +1 -1
- package/corpus/core/src/server/ssr-handler.ts +7 -0
- package/corpus/core/src/server/transcribe-voice.ts +1 -1
- package/corpus/core/src/usage/store.ts +13 -4
- package/corpus/core/src/vite/client.ts +38 -1
- package/corpus/templates/analytics/AGENTS.md +3 -0
- package/corpus/templates/analytics/actions/get-data-program.ts +78 -0
- package/corpus/templates/analytics/actions/list-data-programs.ts +49 -0
- package/corpus/templates/analytics/app/global.css +11 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +163 -17
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/analytics/app/i18n-data.ts +20 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +96 -3
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +3 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +61 -4
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +40 -2
- package/corpus/templates/analytics/changelog/2026-07-09-analytics-no-longer-forgets-successful-data-queries-when-a-l.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-09-dashboard-charts-keep-consistent-spacing-when-they-stack-ver.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-09-dashboard-charts-tables-and-extensions-can-be-selected-and-d.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-09-long-running-analytics-requests-now-recover-automatically-wh.md +6 -0
- package/corpus/templates/analytics/server/db/index.ts +6 -0
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +1 -7
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +102 -15
- package/corpus/templates/content/app/hooks/use-content-database.ts +52 -0
- package/corpus/templates/content/app/hooks/use-document-properties.ts +50 -6
- package/corpus/templates/content/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/content/app/i18n-data.ts +28 -0
- package/corpus/templates/content/changelog/2026-07-09-notion-conflict-warnings-no-longer-flash-during-normal-synce.md +6 -0
- package/corpus/templates/content/changelog/2026-07-09-property-menus-and-delete-confirmations-now-open-visibly-and.md +6 -0
- package/corpus/templates/content/server/lib/notion-sync.ts +130 -28
- package/corpus/templates/design/actions/add-breakpoint.ts +48 -68
- package/corpus/templates/design/actions/add-localhost-screens.ts +496 -61
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +2 -18
- package/corpus/templates/design/actions/apply-design-token-edit.ts +51 -82
- package/corpus/templates/design/actions/apply-tweaks.ts +63 -41
- package/corpus/templates/design/actions/capture-design-state.ts +2 -2
- package/corpus/templates/design/actions/connect-localhost.ts +58 -12
- package/corpus/templates/design/actions/create-component.ts +2 -18
- package/corpus/templates/design/actions/create-design-branch.ts +38 -18
- package/corpus/templates/design/actions/create-fusion-app.ts +15 -11
- package/corpus/templates/design/actions/delete-file.ts +19 -34
- package/corpus/templates/design/actions/deploy-design-preview.ts +59 -27
- package/corpus/templates/design/actions/deploy-fusion-app.ts +22 -15
- package/corpus/templates/design/actions/export-pdf.ts +2 -1
- package/corpus/templates/design/actions/export-zip.ts +9 -3
- package/corpus/templates/design/actions/generate-design.ts +107 -70
- package/corpus/templates/design/actions/get-component-details.ts +2 -18
- package/corpus/templates/design/actions/get-design-branch-diff.ts +2 -3
- package/corpus/templates/design/actions/get-design-surface-index.ts +2 -18
- package/corpus/templates/design/actions/get-design.ts +2 -1
- package/corpus/templates/design/actions/grant-localhost-write-consent.ts +7 -1
- package/corpus/templates/design/actions/import-design-tokens.ts +114 -76
- package/corpus/templates/design/actions/index-components.ts +2 -18
- package/corpus/templates/design/actions/list-design-source-capabilities.ts +23 -28
- package/corpus/templates/design/actions/list-local-files.ts +9 -2
- package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +82 -98
- package/corpus/templates/design/actions/open-component-source.ts +2 -18
- package/corpus/templates/design/actions/open-visual-edit.ts +19 -1
- package/corpus/templates/design/actions/present-design-variants.ts +70 -70
- package/corpus/templates/design/actions/preview-component-prop-edit.ts +4 -14
- package/corpus/templates/design/actions/read-local-file.ts +9 -2
- package/corpus/templates/design/actions/remove-breakpoint.ts +40 -61
- package/corpus/templates/design/actions/rename-screen.ts +425 -0
- package/corpus/templates/design/actions/request-localhost-write-consent.ts +12 -2
- package/corpus/templates/design/actions/revoke-localhost-write-consent.ts +9 -2
- package/corpus/templates/design/actions/sync-fusion-app.ts +56 -39
- package/corpus/templates/design/actions/update-design.ts +376 -61
- package/corpus/templates/design/actions/update-file.ts +455 -188
- package/corpus/templates/design/actions/write-local-file.ts +10 -2
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +685 -608
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +43 -15
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +576 -2015
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +62 -14
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +263 -25
- package/corpus/templates/design/app/components/design/design-canvas/annotation-submit.ts +34 -0
- package/corpus/templates/design/app/components/design/design-canvas/coordinate-transforms.ts +40 -0
- package/corpus/templates/design/app/components/design/design-canvas/creation.ts +47 -0
- package/corpus/templates/design/app/components/design/design-canvas/element-payload.ts +27 -0
- package/corpus/templates/design/app/components/design/design-canvas/embedded-frame.ts +62 -0
- package/corpus/templates/design/app/components/design/design-canvas/external-preview.ts +137 -0
- package/corpus/templates/design/app/components/design/design-canvas/file-drop.ts +10 -0
- package/corpus/templates/design/app/components/design/design-canvas/hit-test.ts +23 -0
- package/corpus/templates/design/app/components/design/design-canvas/iframe-events.ts +23 -0
- package/corpus/templates/design/app/components/design/design-canvas/iframe-pan.ts +177 -0
- package/corpus/templates/design/app/components/design/design-canvas/motion-types.ts +7 -0
- package/corpus/templates/design/app/components/design/design-canvas/pending-text-edit.ts +62 -0
- package/corpus/templates/design/app/components/design/index.ts +2 -2
- package/corpus/templates/design/app/components/design/multi-screen/canvas-tools.ts +100 -0
- package/corpus/templates/design/app/components/design/multi-screen/coordinate-transforms.ts +81 -0
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +23 -13
- package/corpus/templates/design/app/components/design/multi-screen/culling.ts +238 -19
- package/corpus/templates/design/app/components/design/multi-screen/draft-primitives.ts +424 -0
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +341 -0
- package/corpus/templates/design/app/components/design/multi-screen/iframe-targeting.ts +52 -0
- package/corpus/templates/design/app/components/design/multi-screen/overview-layout.ts +62 -0
- package/corpus/templates/design/app/components/design/multi-screen/primitive-drop-target.ts +283 -0
- package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +272 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +5 -1
- package/corpus/templates/design/app/components/design/multi-screen/wheel-gesture-state.ts +12 -0
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +325 -84
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +15 -1
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +119 -47
- package/corpus/templates/design/app/i18n/zh-TW.ts +9 -0
- package/corpus/templates/design/app/i18n-data.ts +223 -0
- package/corpus/templates/design/app/lib/design-save-outbox.ts +379 -0
- package/corpus/templates/design/app/lib/png-clipboard.ts +113 -0
- package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +229 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +918 -0
- package/corpus/templates/design/app/pages/design-editor/collab-sync.ts +43 -0
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +336 -0
- package/corpus/templates/design/app/pages/design-editor/data-operations.ts +270 -0
- package/corpus/templates/design/app/pages/design-editor/dom-guards.ts +24 -0
- package/corpus/templates/design/app/pages/design-editor/dom-utils.ts +11 -0
- package/corpus/templates/design/app/pages/design-editor/editor-session.ts +20 -0
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +408 -0
- package/corpus/templates/design/app/pages/design-editor/export-capture.ts +115 -0
- package/corpus/templates/design/app/pages/design-editor/geometry-persistence.ts +93 -0
- package/corpus/templates/design/app/pages/design-editor/history.ts +169 -0
- package/corpus/templates/design/app/pages/design-editor/layout-operations.ts +185 -0
- package/corpus/templates/design/app/pages/design-editor/motion-state.ts +309 -0
- package/corpus/templates/design/app/pages/design-editor/overview-camera.ts +438 -0
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +510 -0
- package/corpus/templates/design/app/pages/design-editor/portable-style.ts +115 -0
- package/corpus/templates/design/app/pages/design-editor/selection-state.ts +337 -0
- package/corpus/templates/design/app/pages/design-editor/style-utils.ts +5 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +92 -0
- package/corpus/templates/design/app/pages/design-editor/tweak-save.ts +87 -0
- package/corpus/templates/design/app/pages/design-editor/types.ts +36 -0
- package/corpus/templates/design/app/routes/design.$id.tsx +11 -1
- package/corpus/templates/design/changelog/2026-07-09-design-edits-canvas-positions-tools-and-tab-context-now-pers.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-figma-style-shortcuts-drawing-annotations-and-cross-screen-d.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-hand-and-scale-tools-now-keep-their-active-toolbar-identity-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-large-multi-screen-designs-now-stay-responsive-during-long-c.md +6 -0
- package/corpus/templates/design/changelog/2026-07-09-layer-drags-now-land-exactly-where-the-insertion-indicator-s.md +6 -0
- package/corpus/templates/design/server/db/index.ts +2 -52
- package/corpus/templates/design/server/db/schema.ts +16 -0
- package/corpus/templates/design/server/lib/design-data-access.ts +70 -0
- package/corpus/templates/design/server/lib/design-data-mutation.ts +249 -0
- package/corpus/templates/design/server/lib/fusion-screens.ts +89 -76
- package/corpus/templates/design/server/lib/import-design-files.ts +76 -35
- package/corpus/templates/design/server/lib/verify-write-grant.ts +7 -2
- package/corpus/templates/design/server/plugins/db.ts +19 -0
- package/corpus/templates/design/server/source-workspace.ts +12 -13
- package/corpus/templates/design/shared/resolve-tweaks.ts +15 -0
- package/corpus/templates/design/shared/screen-rename.ts +42 -0
- package/corpus/templates/design/shared/source-mode.ts +84 -4
- package/dist/agent/engine/builder-engine.d.ts +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builtin.js +1 -1
- package/dist/agent/engine/builtin.js.map +1 -1
- package/dist/agent/model-config.d.ts +9 -9
- package/dist/agent/model-config.d.ts.map +1 -1
- package/dist/agent/model-config.js +30 -30
- package/dist/agent/model-config.js.map +1 -1
- package/dist/agent/production-agent.d.ts +60 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +106 -7
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/design-connect.d.ts +30 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +359 -75
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +13 -3
- package/dist/cli/recap.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +6 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +10 -5
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +1 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +6 -5
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/use-action.d.ts +32 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +68 -1
- package/dist/client/use-action.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db/client.d.ts +3 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +7 -2
- package/dist/db/client.js.map +1 -1
- package/dist/db/create-get-db.d.ts.map +1 -1
- package/dist/db/create-get-db.js +2 -2
- package/dist/db/create-get-db.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/scripts/agent-engines/manage-agent-engine.js +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +7 -0
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/server/transcribe-voice.js +1 -1
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/usage/store.d.ts.map +1 -1
- package/dist/usage/store.js +13 -4
- package/dist/usage/store.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +36 -1
- package/dist/vite/client.js.map +1 -1
- package/docs/content/a2a-protocol.mdx +12 -0
- package/docs/content/locales/ar-SA/a2a-protocol.mdx +12 -0
- package/docs/content/locales/ar-SA/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/de-DE/a2a-protocol.mdx +12 -0
- package/docs/content/locales/de-DE/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/es-ES/a2a-protocol.mdx +12 -0
- package/docs/content/locales/es-ES/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/fr-FR/a2a-protocol.mdx +12 -0
- package/docs/content/locales/fr-FR/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/hi-IN/a2a-protocol.mdx +12 -0
- package/docs/content/locales/hi-IN/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/hi-IN/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/ja-JP/a2a-protocol.mdx +12 -0
- package/docs/content/locales/ja-JP/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/ja-JP/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/ko-KR/a2a-protocol.mdx +12 -0
- package/docs/content/locales/ko-KR/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/ko-KR/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/pt-BR/a2a-protocol.mdx +12 -0
- package/docs/content/locales/pt-BR/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/zh-CN/a2a-protocol.mdx +12 -0
- package/docs/content/locales/zh-CN/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -0
- package/docs/content/locales/zh-TW/a2a-protocol.mdx +12 -0
- package/docs/content/locales/zh-TW/pr-visual-recap.mdx +3 -3
- package/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -0
- package/docs/content/pr-visual-recap.mdx +3 -3
- package/docs/content/pure-agent-apps.mdx +22 -0
- package/package.json +2 -2
|
@@ -10,10 +10,12 @@ import { nanoid } from "nanoid";
|
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
mergeCanvasFramePlacements,
|
|
13
|
+
parseCanvasFrameGeometryById,
|
|
13
14
|
type CanvasFramePlacement,
|
|
14
15
|
} from "../../shared/canvas-frames.js";
|
|
15
16
|
import { annotateScreenHtmlForPersist } from "../../shared/screen-annotation.js";
|
|
16
17
|
import { getDb, schema } from "../db/index.js";
|
|
18
|
+
import { mutateDesignData } from "./design-data-mutation.js";
|
|
17
19
|
|
|
18
20
|
const DEFAULT_FRAME_WIDTH = 1440;
|
|
19
21
|
const DEFAULT_FRAME_HEIGHT = 900;
|
|
@@ -51,6 +53,10 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
51
53
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
function jsonValuesEqual(left: unknown, right: unknown): boolean {
|
|
57
|
+
return JSON.stringify(left) === JSON.stringify(right);
|
|
58
|
+
}
|
|
59
|
+
|
|
54
60
|
function stringFromState(value: unknown, key: string): string | undefined {
|
|
55
61
|
return isRecord(value) && typeof value[key] === "string"
|
|
56
62
|
? (value[key] as string)
|
|
@@ -73,16 +79,6 @@ export async function resolveImportDesignId(
|
|
|
73
79
|
return designId;
|
|
74
80
|
}
|
|
75
81
|
|
|
76
|
-
function parseJson(value: string | null | undefined): Record<string, unknown> {
|
|
77
|
-
if (!value) return {};
|
|
78
|
-
try {
|
|
79
|
-
const parsed = JSON.parse(value);
|
|
80
|
-
return isRecord(parsed) ? parsed : {};
|
|
81
|
-
} catch {
|
|
82
|
-
return {};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
82
|
export function sanitizeImportedFilename(filename: string): string {
|
|
87
83
|
const trimmed = filename.trim();
|
|
88
84
|
if (!trimmed || trimmed.includes("..") || /[\\/]/.test(trimmed)) {
|
|
@@ -194,6 +190,8 @@ export async function saveImportedDesignFiles(
|
|
|
194
190
|
const now = new Date().toISOString();
|
|
195
191
|
const savedFiles: SavedImportedDesignFile[] = [];
|
|
196
192
|
const seedRecords: Array<{ id: string; content: string }> = [];
|
|
193
|
+
const placements: CanvasFramePlacement[] = [];
|
|
194
|
+
const metadataByFileId = new Map<string, Record<string, unknown>>();
|
|
197
195
|
let placedFrames:
|
|
198
196
|
| Array<{
|
|
199
197
|
fileId: string;
|
|
@@ -202,6 +200,15 @@ export async function saveImportedDesignFiles(
|
|
|
202
200
|
}>
|
|
203
201
|
| undefined;
|
|
204
202
|
|
|
203
|
+
// Preserve the old all-or-nothing behavior for already-invalid data as far
|
|
204
|
+
// as the shared mutation boundary permits: validate before inserting files,
|
|
205
|
+
// then re-run the real intent against the latest revision after file work.
|
|
206
|
+
await mutateDesignData({
|
|
207
|
+
designId,
|
|
208
|
+
mutate: (current) => current,
|
|
209
|
+
isApplied: () => true,
|
|
210
|
+
});
|
|
211
|
+
|
|
205
212
|
await db.transaction(async (tx) => {
|
|
206
213
|
const [design] = await tx
|
|
207
214
|
.select()
|
|
@@ -215,11 +222,6 @@ export async function saveImportedDesignFiles(
|
|
|
215
222
|
.from(schema.designFiles)
|
|
216
223
|
.where(eq(schema.designFiles.designId, designId));
|
|
217
224
|
const usedFilenames = new Set(existingFiles.map((file) => file.filename));
|
|
218
|
-
const prevData = parseJson(design.data);
|
|
219
|
-
const previousMetadata = isRecord(prevData.screenMetadata)
|
|
220
|
-
? { ...prevData.screenMetadata }
|
|
221
|
-
: {};
|
|
222
|
-
const placements: CanvasFramePlacement[] = [];
|
|
223
225
|
let nextFrameX = 0;
|
|
224
226
|
|
|
225
227
|
for (let index = 0; index < input.files.length; index += 1) {
|
|
@@ -274,7 +276,7 @@ export async function saveImportedDesignFiles(
|
|
|
274
276
|
height,
|
|
275
277
|
...file.source,
|
|
276
278
|
};
|
|
277
|
-
|
|
279
|
+
metadataByFileId.set(fileId, source);
|
|
278
280
|
savedFiles.push({
|
|
279
281
|
id: fileId,
|
|
280
282
|
filename,
|
|
@@ -282,26 +284,65 @@ export async function saveImportedDesignFiles(
|
|
|
282
284
|
source,
|
|
283
285
|
});
|
|
284
286
|
}
|
|
287
|
+
});
|
|
285
288
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
289
|
+
await mutateDesignData({
|
|
290
|
+
designId,
|
|
291
|
+
mutate: (current, { updatedAt }) => {
|
|
292
|
+
const previousMetadata = isRecord(current.screenMetadata)
|
|
293
|
+
? { ...current.screenMetadata }
|
|
294
|
+
: {};
|
|
295
|
+
for (const [fileId, metadata] of metadataByFileId) {
|
|
296
|
+
previousMetadata[fileId] = metadata;
|
|
297
|
+
}
|
|
298
|
+
const mergedFrames = mergeCanvasFramePlacements({
|
|
299
|
+
existing: current.canvasFrames,
|
|
300
|
+
placements,
|
|
301
|
+
resolveFileId: (placement) => placement.fileId,
|
|
302
|
+
});
|
|
303
|
+
placedFrames = mergedFrames.placedFrames;
|
|
304
|
+
return {
|
|
305
|
+
...current,
|
|
306
|
+
sourceMode: "import",
|
|
307
|
+
canvasFrames: mergedFrames.canvasFrames,
|
|
308
|
+
screenMetadata: previousMetadata,
|
|
309
|
+
updatedAt,
|
|
310
|
+
};
|
|
311
|
+
},
|
|
312
|
+
isApplied: (current) => {
|
|
313
|
+
if (current.sourceMode !== "import") return false;
|
|
314
|
+
const currentFrames = parseCanvasFrameGeometryById(current.canvasFrames);
|
|
315
|
+
const currentMetadata = isRecord(current.screenMetadata)
|
|
316
|
+
? current.screenMetadata
|
|
317
|
+
: {};
|
|
318
|
+
return savedFiles.every((file) => {
|
|
319
|
+
const frame = currentFrames[file.id];
|
|
320
|
+
const metadata = currentMetadata[file.id];
|
|
321
|
+
const placement = placements.find(
|
|
322
|
+
(candidate) => candidate.fileId === file.id,
|
|
323
|
+
);
|
|
324
|
+
const expectedFrame = placement
|
|
325
|
+
? {
|
|
326
|
+
x: placement.x,
|
|
327
|
+
y: placement.y,
|
|
328
|
+
width: placement.width,
|
|
329
|
+
height: placement.height,
|
|
330
|
+
z: placement.z,
|
|
331
|
+
}
|
|
332
|
+
: null;
|
|
333
|
+
return (
|
|
334
|
+
frame !== undefined &&
|
|
335
|
+
expectedFrame !== null &&
|
|
336
|
+
Object.entries(expectedFrame).every(
|
|
337
|
+
([key, value]) => frame[key as keyof typeof frame] === value,
|
|
338
|
+
) &&
|
|
339
|
+
isRecord(metadata) &&
|
|
340
|
+
Object.entries(file.source ?? {}).every(([key, value]) =>
|
|
341
|
+
jsonValuesEqual(metadata[key], value),
|
|
342
|
+
)
|
|
343
|
+
);
|
|
344
|
+
});
|
|
345
|
+
},
|
|
305
346
|
});
|
|
306
347
|
|
|
307
348
|
for (const record of seedRecords) {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
|
|
18
|
-
import { and, eq } from "drizzle-orm";
|
|
18
|
+
import { and, eq, isNull } from "drizzle-orm";
|
|
19
19
|
|
|
20
20
|
import { getDb, schema } from "../db/index.js";
|
|
21
21
|
|
|
@@ -24,6 +24,8 @@ export interface WriteGrantContext {
|
|
|
24
24
|
connectionId: string;
|
|
25
25
|
/** Email of the currently authenticated user (from request context). */
|
|
26
26
|
ownerEmail: string;
|
|
27
|
+
/** Active organization. Null denotes the user's personal workspace. */
|
|
28
|
+
orgId: string | null;
|
|
27
29
|
/** Target path relative to rootPath (or absolute — validated either way). */
|
|
28
30
|
targetPath: string;
|
|
29
31
|
}
|
|
@@ -41,7 +43,7 @@ export interface WriteGrantResult {
|
|
|
41
43
|
export async function verifyWriteGrant(
|
|
42
44
|
ctx: WriteGrantContext,
|
|
43
45
|
): Promise<WriteGrantResult> {
|
|
44
|
-
const { designId, connectionId, ownerEmail, targetPath } = ctx;
|
|
46
|
+
const { designId, connectionId, ownerEmail, orgId, targetPath } = ctx;
|
|
45
47
|
|
|
46
48
|
const db = getDb();
|
|
47
49
|
const [grant] = await db
|
|
@@ -52,6 +54,9 @@ export async function verifyWriteGrant(
|
|
|
52
54
|
eq(schema.designLocalhostWriteGrants.designId, designId),
|
|
53
55
|
eq(schema.designLocalhostWriteGrants.connectionId, connectionId),
|
|
54
56
|
eq(schema.designLocalhostWriteGrants.ownerEmail, ownerEmail),
|
|
57
|
+
orgId
|
|
58
|
+
? eq(schema.designLocalhostWriteGrants.orgId, orgId)
|
|
59
|
+
: isNull(schema.designLocalhostWriteGrants.orgId),
|
|
55
60
|
),
|
|
56
61
|
)
|
|
57
62
|
.limit(1);
|
|
@@ -258,6 +258,7 @@ CREATE INDEX IF NOT EXISTS design_system_shares_resource_principal_idx ON design
|
|
|
258
258
|
capabilities TEXT NOT NULL DEFAULT '[]',
|
|
259
259
|
status TEXT NOT NULL DEFAULT 'connected',
|
|
260
260
|
last_seen_at TEXT,
|
|
261
|
+
preview_token TEXT,
|
|
261
262
|
bridge_token TEXT,
|
|
262
263
|
owner_email TEXT NOT NULL DEFAULT 'local@localhost',
|
|
263
264
|
org_id TEXT,
|
|
@@ -265,6 +266,7 @@ CREATE INDEX IF NOT EXISTS design_system_shares_resource_principal_idx ON design
|
|
|
265
266
|
updated_at TEXT DEFAULT (datetime('now'))
|
|
266
267
|
);
|
|
267
268
|
ALTER TABLE design_localhost_connections ADD COLUMN IF NOT EXISTS bridge_token TEXT;
|
|
269
|
+
ALTER TABLE design_localhost_connections ADD COLUMN IF NOT EXISTS preview_token TEXT;
|
|
268
270
|
CREATE TABLE IF NOT EXISTS design_localhost_write_grants (
|
|
269
271
|
id TEXT PRIMARY KEY,
|
|
270
272
|
design_id TEXT NOT NULL,
|
|
@@ -323,6 +325,23 @@ CREATE INDEX IF NOT EXISTS motion_timeline_owner_org_updated_idx ON motion_timel
|
|
|
323
325
|
visibility TEXT NOT NULL DEFAULT 'private'
|
|
324
326
|
)`,
|
|
325
327
|
},
|
|
328
|
+
{
|
|
329
|
+
version: 20,
|
|
330
|
+
name: "design-data-operation-revisions",
|
|
331
|
+
sql: `ALTER TABLE designs ADD COLUMN IF NOT EXISTS data_operation_revisions TEXT NOT NULL DEFAULT '{}'`,
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
version: 21,
|
|
335
|
+
name: "design-file-content-operation-revisions",
|
|
336
|
+
sql: `ALTER TABLE design_files ADD COLUMN IF NOT EXISTS content_operation_source TEXT;
|
|
337
|
+
ALTER TABLE design_files ADD COLUMN IF NOT EXISTS content_operation_revision INTEGER;
|
|
338
|
+
ALTER TABLE design_files ADD COLUMN IF NOT EXISTS content_operation_result_hash TEXT`,
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
version: 22,
|
|
342
|
+
name: "design-localhost-preview-token",
|
|
343
|
+
sql: `ALTER TABLE design_localhost_connections ADD COLUMN IF NOT EXISTS preview_token TEXT`,
|
|
344
|
+
},
|
|
326
345
|
],
|
|
327
346
|
{ table: "design_migrations" },
|
|
328
347
|
);
|
|
@@ -8,7 +8,7 @@ import { assertAccess, resolveAccess } from "@agent-native/core/sharing";
|
|
|
8
8
|
import { eq } from "drizzle-orm";
|
|
9
9
|
|
|
10
10
|
import { isBoardFile } from "../shared/board-file.js";
|
|
11
|
-
import {
|
|
11
|
+
import { designSourceTypeFromData } from "../shared/source-mode.js";
|
|
12
12
|
import type { DesignSourceType } from "../shared/source-mode.js";
|
|
13
13
|
import {
|
|
14
14
|
languageForSourcePath,
|
|
@@ -107,17 +107,7 @@ export interface SourceWorkspaceContext {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
function parseDesignDataSourceType(value: unknown): DesignSourceType {
|
|
110
|
-
|
|
111
|
-
try {
|
|
112
|
-
const parsed: unknown = JSON.parse(value);
|
|
113
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
114
|
-
const raw = (parsed as Record<string, unknown>).sourceType;
|
|
115
|
-
return normalizeDesignSourceType(raw) ?? "inline";
|
|
116
|
-
}
|
|
117
|
-
} catch {
|
|
118
|
-
// Invalid design data falls back to inline, matching existing actions.
|
|
119
|
-
}
|
|
120
|
-
return "inline";
|
|
110
|
+
return designSourceTypeFromData(value);
|
|
121
111
|
}
|
|
122
112
|
|
|
123
113
|
function parseDesignDataBoardFileId(value: unknown): string | null {
|
|
@@ -302,7 +292,16 @@ export async function writeInlineSourceFile(args: {
|
|
|
302
292
|
|
|
303
293
|
await db
|
|
304
294
|
.update(schema.designFiles)
|
|
305
|
-
.set({
|
|
295
|
+
.set({
|
|
296
|
+
content: authoritativeContent,
|
|
297
|
+
updatedAt,
|
|
298
|
+
// This action/agent write is outside the browser save sequence. Break
|
|
299
|
+
// that lineage so a later tab revision must pass its ordinary content
|
|
300
|
+
// hash guard instead of inheriting a stale same-source bypass.
|
|
301
|
+
contentOperationSource: null,
|
|
302
|
+
contentOperationRevision: null,
|
|
303
|
+
contentOperationResultHash: null,
|
|
304
|
+
})
|
|
306
305
|
.where(eq(schema.designFiles.id, args.file.id));
|
|
307
306
|
|
|
308
307
|
await db
|
|
@@ -16,9 +16,24 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { TweakDefinition } from "./api.js";
|
|
19
|
+
import { sourceContentHash } from "./source-workspace.js";
|
|
19
20
|
|
|
20
21
|
export type TweakSelections = Record<string, string | number | boolean>;
|
|
21
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Stable optimistic-concurrency token for the persisted selection map.
|
|
25
|
+
* Object insertion order is not semantic, so sort keys before hashing to keep
|
|
26
|
+
* browser and server comparisons byte-identical.
|
|
27
|
+
*/
|
|
28
|
+
export function tweakSelectionsHash(
|
|
29
|
+
selections: Readonly<Record<string, unknown>>,
|
|
30
|
+
): string {
|
|
31
|
+
const canonicalEntries = Object.keys(selections)
|
|
32
|
+
.sort()
|
|
33
|
+
.map((key) => [key, selections[key]]);
|
|
34
|
+
return sourceContentHash(JSON.stringify(canonicalEntries));
|
|
35
|
+
}
|
|
36
|
+
|
|
22
37
|
/**
|
|
23
38
|
* Resolve tweak definitions + a selection map to concrete CSS custom-property
|
|
24
39
|
* assignments. Rules (must match the editor's historical inline behavior):
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the persisted filename for a screen rename without dropping its
|
|
3
|
+
* current extension. The Layers panel edits the display name (normally just
|
|
4
|
+
* the stem), while design_files.filename remains the routable identifier.
|
|
5
|
+
*/
|
|
6
|
+
export function renameFilenamePreservingExtension(
|
|
7
|
+
currentFilename: string,
|
|
8
|
+
typedName: string,
|
|
9
|
+
): string {
|
|
10
|
+
const trimmed = typedName.trim();
|
|
11
|
+
if (!trimmed) return currentFilename;
|
|
12
|
+
|
|
13
|
+
const dot = currentFilename.lastIndexOf(".");
|
|
14
|
+
const currentExtension = dot > 0 ? currentFilename.slice(dot) : "";
|
|
15
|
+
if (
|
|
16
|
+
currentExtension &&
|
|
17
|
+
trimmed.toLowerCase().endsWith(currentExtension.toLowerCase())
|
|
18
|
+
) {
|
|
19
|
+
return trimmed;
|
|
20
|
+
}
|
|
21
|
+
return currentExtension ? `${trimmed}${currentExtension}` : trimmed;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Rewrite exact quoted `data-screen` attribute values while preserving the
|
|
26
|
+
* source document's quote and whitespace style. This deliberately operates on
|
|
27
|
+
* the serialized HTML instead of parsing/serializing the whole document, which
|
|
28
|
+
* would create a large unrelated formatting diff for a one-attribute rename.
|
|
29
|
+
*/
|
|
30
|
+
export function replaceDataScreenReferences(
|
|
31
|
+
content: string,
|
|
32
|
+
oldFilename: string,
|
|
33
|
+
newFilename: string,
|
|
34
|
+
): string {
|
|
35
|
+
if (oldFilename === newFilename) return content;
|
|
36
|
+
const escaped = oldFilename.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
37
|
+
const pattern = new RegExp(
|
|
38
|
+
`((?:^|[\\s<])data-screen\\s*=\\s*)(["'])${escaped}\\2`,
|
|
39
|
+
"gm",
|
|
40
|
+
);
|
|
41
|
+
return content.replace(pattern, `$1$2${newFilename}$2`);
|
|
42
|
+
}
|
|
@@ -365,11 +365,74 @@ export function normalizeDesignSourceType(
|
|
|
365
365
|
return null;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
+
/**
|
|
369
|
+
* Resolve the source tier stored in a design's JSON data blob.
|
|
370
|
+
*
|
|
371
|
+
* `sourceType` is the canonical field. Early localhost/fusion writers used
|
|
372
|
+
* `sourceMode`, though, and those persisted designs must not silently fall
|
|
373
|
+
* back to inline editing. Accepting both here gives actions and workspace
|
|
374
|
+
* providers one migration-safe gate instead of open-coding subtly different
|
|
375
|
+
* JSON parsing at every call site.
|
|
376
|
+
*/
|
|
377
|
+
export function designSourceTypeFromData(
|
|
378
|
+
value: unknown,
|
|
379
|
+
fallback: DesignSourceType = "inline",
|
|
380
|
+
): DesignSourceType {
|
|
381
|
+
let parsed = value;
|
|
382
|
+
if (typeof parsed === "string") {
|
|
383
|
+
const direct = normalizeDesignSourceType(parsed);
|
|
384
|
+
if (direct) return direct;
|
|
385
|
+
try {
|
|
386
|
+
parsed = JSON.parse(parsed) as unknown;
|
|
387
|
+
} catch {
|
|
388
|
+
return fallback;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
392
|
+
return fallback;
|
|
393
|
+
}
|
|
394
|
+
const data = parsed as Record<string, unknown>;
|
|
395
|
+
return (
|
|
396
|
+
normalizeDesignSourceType(data.sourceType) ??
|
|
397
|
+
normalizeDesignSourceType(data.sourceMode) ??
|
|
398
|
+
fallback
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export function designConnectionIdFromData(value: unknown): string | undefined {
|
|
403
|
+
let parsed = value;
|
|
404
|
+
if (typeof parsed === "string") {
|
|
405
|
+
try {
|
|
406
|
+
parsed = JSON.parse(parsed) as unknown;
|
|
407
|
+
} catch {
|
|
408
|
+
return undefined;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
412
|
+
return undefined;
|
|
413
|
+
}
|
|
414
|
+
const data = parsed as Record<string, unknown>;
|
|
415
|
+
if (typeof data.connectionId === "string" && data.connectionId) {
|
|
416
|
+
return data.connectionId;
|
|
417
|
+
}
|
|
418
|
+
for (const metadataKey of ["screenMetadata", "localhostScreens"] as const) {
|
|
419
|
+
const metadata = data[metadataKey];
|
|
420
|
+
if (!metadata || typeof metadata !== "object" || Array.isArray(metadata)) {
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
for (const entry of Object.values(metadata as Record<string, unknown>)) {
|
|
424
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) continue;
|
|
425
|
+
const connectionId = (entry as Record<string, unknown>).connectionId;
|
|
426
|
+
if (typeof connectionId === "string" && connectionId) {
|
|
427
|
+
return connectionId;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return undefined;
|
|
432
|
+
}
|
|
433
|
+
|
|
368
434
|
export function makeLocalhostRouteId(path: string): string {
|
|
369
435
|
const normalized = path.trim() || "/";
|
|
370
|
-
if (normalized === "/") return "route-root";
|
|
371
|
-
// Pure wildcard routes ("/*", "/**") collapse to a single id.
|
|
372
|
-
if (/^\/\*+$/.test(normalized)) return "route-wildcard";
|
|
373
436
|
// Encode structural characters distinctly BEFORE collapsing non-alphanumerics,
|
|
374
437
|
// otherwise paths like "/design/:id" and "/design-id", or "/users" and
|
|
375
438
|
// "/users/*", produce identical ids and silently overwrite each other in the
|
|
@@ -382,7 +445,24 @@ export function makeLocalhostRouteId(path: string): string {
|
|
|
382
445
|
.replace(/[^a-zA-Z0-9]+/g, "-")
|
|
383
446
|
.replace(/^-+|-+$/g, "")
|
|
384
447
|
.toLowerCase();
|
|
385
|
-
|
|
448
|
+
// Slugs are readable but lossy. Hash every normalized path so separators,
|
|
449
|
+
// reserved words, router syntax, and query-state variants remain distinct.
|
|
450
|
+
const readable =
|
|
451
|
+
normalized === "/"
|
|
452
|
+
? "root"
|
|
453
|
+
: /^\/\*+$/.test(normalized) || !slug
|
|
454
|
+
? "wildcard"
|
|
455
|
+
: slug;
|
|
456
|
+
return `route-${readable}-${stableRoutePathHash(normalized)}`;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
function stableRoutePathHash(value: string): string {
|
|
460
|
+
let hash = 0xcbf29ce484222325n;
|
|
461
|
+
for (const character of value) {
|
|
462
|
+
hash ^= BigInt(character.codePointAt(0)!);
|
|
463
|
+
hash = BigInt.asUintN(64, hash * 0x100000001b3n);
|
|
464
|
+
}
|
|
465
|
+
return hash.toString(36);
|
|
386
466
|
}
|
|
387
467
|
|
|
388
468
|
export function titleFromRoutePath(path: string): string {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type { AgentEngine, EngineCapabilities } from "./types.js";
|
|
16
16
|
export declare const BUILDER_CAPABILITIES: EngineCapabilities;
|
|
17
|
-
export declare const BUILDER_SUPPORTED_MODELS: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-
|
|
17
|
+
export declare const BUILDER_SUPPORTED_MODELS: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-6-terra", "gpt-5-6-luna", "gemini-3-1-pro", "gemini-3-5-flash", "gemini-3-1-flash-lite"];
|
|
18
18
|
export declare const BUILDER_DEFAULT_MODEL: "claude-sonnet-4-6" | "claude-sonnet-5";
|
|
19
19
|
export declare function createBuilderEngine(_config?: Record<string, unknown>): AgentEngine;
|
|
20
20
|
//# sourceMappingURL=builder-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-engine.d.ts","sourceRoot":"","sources":["../../../src/agent/engine/builder-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAyBH,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,oBAAoB,EAAE,kBAMlC,CAAC;AAEF,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"builder-engine.d.ts","sourceRoot":"","sources":["../../../src/agent/engine/builder-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAyBH,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,oBAAoB,EAAE,kBAMlC,CAAC;AAEF,eAAO,MAAM,wBAAwB,2MAAuC,CAAC;AAkB7E,eAAO,MAAM,qBAAqB,yCAAoC,CAAC;AA4uBvE,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,WAAW,CAEb"}
|
|
@@ -67,7 +67,7 @@ export function registerBuiltinEngines() {
|
|
|
67
67
|
const providerDescriptions = {
|
|
68
68
|
anthropic: "Claude models through the Vercel AI SDK. Supports thinking and caching via AI SDK providerOptions.",
|
|
69
69
|
openai: "OpenAI GPT models via the Vercel AI SDK. Requires OPENAI_API_KEY.",
|
|
70
|
-
openrouter: "300+ models from Anthropic, OpenAI, Google, Z.ai, and more routed through a single endpoint. Use model IDs like 'anthropic/claude-sonnet-5', 'openai/gpt-5.
|
|
70
|
+
openrouter: "300+ models from Anthropic, OpenAI, Google, Z.ai, and more routed through a single endpoint. Use model IDs like 'anthropic/claude-sonnet-5', 'openai/gpt-5.6-sol', or 'z-ai/glm-5.2'. Requires OPENROUTER_API_KEY.",
|
|
71
71
|
google: "Google Gemini models via the Vercel AI SDK. Requires GOOGLE_GENERATIVE_AI_API_KEY.",
|
|
72
72
|
groq: "Groq LPU inference via the Vercel AI SDK. Requires GROQ_API_KEY.",
|
|
73
73
|
mistral: "Mistral models via the Vercel AI SDK. Requires MISTRAL_API_KEY.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../../src/agent/engine/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,GAElB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,IAAI,WAAW,GAAG,KAAK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CAAC,QAAQ,CAAC;YAC5C,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC;SACxD,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["/**\n * Registers built-in agent engines (anthropic, ai-sdk:*) into the global registry.\n *\n * This module is imported once at server startup via the agent-chat plugin.\n * Additional engines can be registered by calling registerAgentEngine() from\n * any server plugin after startup.\n */\n\nimport {\n createAISDKEngine,\n PROVIDER_CAPABILITIES,\n PROVIDER_DEFAULT_MODELS,\n PROVIDER_SUPPORTED_MODELS,\n PROVIDER_ENV_VARS,\n PROVIDER_PACKAGES,\n type AISDKProvider,\n} from \"./ai-sdk-engine.js\";\nimport {\n createAnthropicEngine,\n ANTHROPIC_CAPABILITIES,\n ANTHROPIC_DEFAULT_MODEL,\n ANTHROPIC_SUPPORTED_MODELS,\n} from \"./anthropic-engine.js\";\nimport {\n createBuilderEngine,\n BUILDER_CAPABILITIES,\n BUILDER_DEFAULT_MODEL,\n BUILDER_SUPPORTED_MODELS,\n} from \"./builder-engine.js\";\nimport { registerAgentEngine } from \"./registry.js\";\n\nlet _registered = false;\n\n/**\n * Register all built-in engines. Safe to call multiple times (idempotent).\n */\nexport function registerBuiltinEngines(): void {\n if (_registered) return;\n _registered = true;\n\n // ── Builder.io managed gateway ─────────────────────────────────────────────\n // Registered first so detectEngineFromEnv picks it when both Builder keys\n // are set — Builder is the managed path we want everyone on long-term.\n // Users who prefer BYO keys can opt out via AGENT_ENGINE_PREFER_BYO_KEY=true,\n // which drops Builder to the fallback slot in detectEngineFromEnv.\n registerAgentEngine({\n name: \"builder\",\n label: \"Builder.io Gateway\",\n description:\n \"Managed LLM access via Builder.io — Claude, GPT, Gemini, and more through a single connection.\",\n capabilities: BUILDER_CAPABILITIES,\n defaultModel: BUILDER_DEFAULT_MODEL,\n supportedModels: BUILDER_SUPPORTED_MODELS,\n requiredEnvVars: [\"BUILDER_PRIVATE_KEY\", \"BUILDER_PUBLIC_KEY\"],\n create: (config) => createBuilderEngine(config),\n });\n\n // ── Anthropic ──────────────────────────────────────────────────────────────\n registerAgentEngine({\n name: \"anthropic\",\n label: \"Claude\",\n description:\n \"Anthropic's SDK — best-in-class Claude models with full feature support (thinking, prompt caching, vision, computer use).\",\n capabilities: ANTHROPIC_CAPABILITIES,\n defaultModel: ANTHROPIC_DEFAULT_MODEL,\n supportedModels: ANTHROPIC_SUPPORTED_MODELS,\n requiredEnvVars: [\"ANTHROPIC_API_KEY\"],\n create: (config) => createAnthropicEngine(config),\n });\n\n // ── Vercel AI SDK providers ────────────────────────────────────────────────\n const aiSdkProviders: AISDKProvider[] = [\n \"anthropic\",\n \"openai\",\n \"openrouter\",\n \"google\",\n \"groq\",\n \"mistral\",\n \"cohere\",\n \"ollama\",\n ];\n\n const providerLabels: Record<AISDKProvider, string> = {\n anthropic: \"Claude\",\n openai: \"OpenAI\",\n openrouter: \"OpenRouter\",\n google: \"Gemini\",\n groq: \"Groq\",\n mistral: \"Mistral\",\n cohere: \"Cohere\",\n ollama: \"Ollama\",\n };\n\n const providerDescriptions: Record<AISDKProvider, string> = {\n anthropic:\n \"Claude models through the Vercel AI SDK. Supports thinking and caching via AI SDK providerOptions.\",\n openai: \"OpenAI GPT models via the Vercel AI SDK. Requires OPENAI_API_KEY.\",\n openrouter:\n \"300+ models from Anthropic, OpenAI, Google, Z.ai, and more routed through a single endpoint. Use model IDs like 'anthropic/claude-sonnet-5', 'openai/gpt-5.6-sol', or 'z-ai/glm-5.2'. Requires OPENROUTER_API_KEY.\",\n google:\n \"Google Gemini models via the Vercel AI SDK. Requires GOOGLE_GENERATIVE_AI_API_KEY.\",\n groq: \"Groq LPU inference via the Vercel AI SDK. Requires GROQ_API_KEY.\",\n mistral: \"Mistral models via the Vercel AI SDK. Requires MISTRAL_API_KEY.\",\n cohere:\n \"Cohere Command models via the Vercel AI SDK. Requires COHERE_API_KEY.\",\n ollama: \"Local Ollama models via the Vercel AI SDK. No API key required.\",\n };\n\n for (const provider of aiSdkProviders) {\n registerAgentEngine({\n name: `ai-sdk:${provider}`,\n label: providerLabels[provider],\n description: providerDescriptions[provider],\n installPackage: `ai ${PROVIDER_PACKAGES[provider]}`,\n capabilities: PROVIDER_CAPABILITIES[provider],\n defaultModel: PROVIDER_DEFAULT_MODELS[provider],\n supportedModels: PROVIDER_SUPPORTED_MODELS[provider],\n requiredEnvVars: PROVIDER_ENV_VARS[provider],\n create: (config) => createAISDKEngine(provider, config),\n });\n }\n}\n"]}
|
|
@@ -26,7 +26,7 @@ export declare const CLAUDE_SONNET_MODEL_LABEL: string;
|
|
|
26
26
|
export declare const AGENT_MODEL_CONFIG: {
|
|
27
27
|
readonly builder: {
|
|
28
28
|
readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
|
|
29
|
-
readonly supportedModels: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-
|
|
29
|
+
readonly supportedModels: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-6-terra", "gpt-5-6-luna", "gemini-3-1-pro", "gemini-3-5-flash", "gemini-3-1-flash-lite"];
|
|
30
30
|
};
|
|
31
31
|
readonly anthropic: {
|
|
32
32
|
readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
|
|
@@ -38,12 +38,12 @@ export declare const AGENT_MODEL_CONFIG: {
|
|
|
38
38
|
readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5-20251001"];
|
|
39
39
|
};
|
|
40
40
|
readonly openai: {
|
|
41
|
-
readonly defaultModel: "gpt-5.
|
|
42
|
-
readonly supportedModels: readonly ["gpt-5.
|
|
41
|
+
readonly defaultModel: "gpt-5.6-sol";
|
|
42
|
+
readonly supportedModels: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"];
|
|
43
43
|
};
|
|
44
44
|
readonly openrouter: {
|
|
45
45
|
readonly defaultModel: string;
|
|
46
|
-
readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6" | "anthropic/claude-sonnet-5", string, "openai/gpt-5.
|
|
46
|
+
readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6" | "anthropic/claude-sonnet-5", string, "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "google/gemini-2.5-flash", "z-ai/glm-5.2"];
|
|
47
47
|
};
|
|
48
48
|
readonly google: {
|
|
49
49
|
readonly defaultModel: "gemini-3.5-flash";
|
|
@@ -69,7 +69,7 @@ export declare const AGENT_MODEL_CONFIG: {
|
|
|
69
69
|
};
|
|
70
70
|
export declare const BUILDER_MODEL_CONFIG: {
|
|
71
71
|
readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
|
|
72
|
-
readonly supportedModels: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-
|
|
72
|
+
readonly supportedModels: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-6-terra", "gpt-5-6-luna", "gemini-3-1-pro", "gemini-3-5-flash", "gemini-3-1-flash-lite"];
|
|
73
73
|
};
|
|
74
74
|
export declare const ANTHROPIC_MODEL_CONFIG: {
|
|
75
75
|
readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
|
|
@@ -81,12 +81,12 @@ export declare const AI_SDK_MODEL_CONFIG: {
|
|
|
81
81
|
readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5-20251001"];
|
|
82
82
|
};
|
|
83
83
|
readonly openai: {
|
|
84
|
-
readonly defaultModel: "gpt-5.
|
|
85
|
-
readonly supportedModels: readonly ["gpt-5.
|
|
84
|
+
readonly defaultModel: "gpt-5.6-sol";
|
|
85
|
+
readonly supportedModels: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"];
|
|
86
86
|
};
|
|
87
87
|
readonly openrouter: {
|
|
88
88
|
readonly defaultModel: string;
|
|
89
|
-
readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6" | "anthropic/claude-sonnet-5", string, "openai/gpt-5.
|
|
89
|
+
readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6" | "anthropic/claude-sonnet-5", string, "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "google/gemini-2.5-flash", "z-ai/glm-5.2"];
|
|
90
90
|
};
|
|
91
91
|
readonly google: {
|
|
92
92
|
readonly defaultModel: "gemini-3.5-flash";
|
|
@@ -111,6 +111,6 @@ export declare const AI_SDK_MODEL_CONFIG: {
|
|
|
111
111
|
};
|
|
112
112
|
export type AISDKProvider = keyof typeof AI_SDK_MODEL_CONFIG;
|
|
113
113
|
export declare const DEFAULT_MODEL: "claude-sonnet-4-6" | "claude-sonnet-5";
|
|
114
|
-
export declare const DEFAULT_OPENAI_MODEL: "gpt-5.
|
|
114
|
+
export declare const DEFAULT_OPENAI_MODEL: "gpt-5.6-sol";
|
|
115
115
|
export declare const DEFAULT_ANTHROPIC_MODEL: "claude-sonnet-4-6" | "claude-sonnet-5";
|
|
116
116
|
//# sourceMappingURL=model-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-config.d.ts","sourceRoot":"","sources":["../../src/agent/model-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoEH;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAuChE;
|
|
1
|
+
{"version":3,"file":"model-config.d.ts","sourceRoot":"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