@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
|
@@ -138,11 +138,11 @@ npx @agent-native/core@latest recap doctor
|
|
|
138
138
|
|
|
139
139
|
除了后端之外,两个存储库变量还可以调整代理的运行方式:
|
|
140
140
|
|
|
141
|
-
- **`VISUAL_RECAP_MODEL`** 固定传递给 CLI (`--model`) 的模型 — 例如 `gpt-5.
|
|
141
|
+
- **`VISUAL_RECAP_MODEL`** 固定传递给 CLI (`--model`) 的模型 — 例如 `gpt-5.6-sol` 用于 Codex,或 Claude 模型 ID。保留其未设置以使用 CLI 自己的默认模型。
|
|
142
142
|
- **`VISUAL_RECAP_REASONING`** 设置推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。适用于Codex后端; Claude 的推理是模型驱动的,因此该变量被忽略。
|
|
143
143
|
- **`VISUAL_RECAP_SKILL_SOURCE`** 控制提示新鲜度:`auto`/unset 使用最新的捆绑技能指南,而 `repo` 固定到已提交的存储库本地 `visual-recap` 技能文件夹。
|
|
144
144
|
|
|
145
|
-
例如,要在 Codex 和 GPT-5.
|
|
145
|
+
例如,要在 Codex 和 GPT-5.6 Sol 上以高推理运行回顾,请设置存储库变量 `VISUAL_RECAP_AGENT=codex`、`VISUAL_RECAP_MODEL=gpt-5.6-sol` 和 `VISUAL_RECAP_REASONING=high`。
|
|
146
146
|
|
|
147
147
|
## 秘密和变量
|
|
148
148
|
|
|
@@ -191,7 +191,7 @@ npx @agent-native/core@latest recap setup
|
|
|
191
191
|
| ------------------------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
192
192
|
| `OPENAI_API_KEY` | — | 秘密。与 `VISUAL_RECAP_AGENT=codex` 一起设置以使用 Codex 运行回顾。 |
|
|
193
193
|
| `VISUAL_RECAP_AGENT` | `claude` | 变量。选择编码代理后端(`claude` 或 `codex`)。 |
|
|
194
|
-
| `VISUAL_RECAP_MODEL` | 每个CLI的默认值 | 变量。固定模型 - 例如`gpt-5.
|
|
194
|
+
| `VISUAL_RECAP_MODEL` | 每个CLI的默认值 | 变量。固定模型 - 例如`gpt-5.6-sol` 表示 Codex,或 Claude 型号 ID。取消设置使用 CLI 自己的默认值。 |
|
|
195
195
|
| `VISUAL_RECAP_REASONING` | 每个模型的默认值 | 变量。推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。适用于Codex后端。 |
|
|
196
196
|
| `RECAP_CLI_VERSION` | `latest` | 变量。固定工作流程安装的 `@agent-native/core` CLI 版本 - 例如`1.5.0`。参见[Version pinning](#version-pinning-copy-variant)。 |
|
|
197
197
|
| `PLAN_RECAP_APP_URL` | `https://plan.agent-native.com` | 秘密。仅当在不同来源自行托管计划应用时。 |
|
|
@@ -66,6 +66,10 @@ Automation-first app 是无浏览器的 Agent-Native app,用于 scheduled jobs
|
|
|
66
66
|
|
|
67
67
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
68
68
|
|
|
69
|
+
## 稍后添加聊天 {#add-chat-later}
|
|
70
|
+
|
|
71
|
+
`--headless` 只选择初始 scaffold;没有可将现有仅 actions 项目原地转换为聊天应用的 `agent-native` 命令。当用户需要浏览器对话时,请将 [Chat 模板](/docs/template-chat) 用作迁移参考:保留 actions、SQL 数据、instructions 和 skills,并添加浏览器 shell、server plugins、`<AgentChatSurface>` 以及加载现有 actions 的 chat plugin。验证 `pnpm typecheck`,并完成一次调用现有 action 的聊天。`agent-native add` 用于 integration blueprints,不用于此转换。
|
|
72
|
+
|
|
69
73
|
## 下一步是什么
|
|
70
74
|
|
|
71
75
|
- [**Agent Surfaces — Headless**](/docs/agent-surfaces#headless) — 完整的无头决策指南和 API
|
|
@@ -436,6 +436,18 @@ const client = new A2AClient(url, process.env.A2A_API_KEY);
|
|
|
436
436
|
|
|
437
437
|
JWT 驗證(`server.ts` 中的 `verifyA2AToken`)接受使用全域 `A2A_SECRET` 或透過權杖的 `org_domain` 聲明從 SQL 尋找的組織範圍秘密簽名的權杖,並在存在時強制執行權杖自己的 `aud`/`iss` 聲明。
|
|
438
438
|
|
|
439
|
+
### 組織密鑰同步 {#organization-secret-sync}
|
|
440
|
+
|
|
441
|
+
**組織 → 跨應用程式驗證**設定會管理組織範圍的密鑰,用來驗證同一組織中個別部署的應用程式之間的委派。它不是使用者登入或 Cross-App SSO 設定。此密鑰補充部署的 `A2A_SECRET`:具有 `org_domain` 宣告的 A2A JWT 可使用相符組織的密鑰驗證。
|
|
442
|
+
|
|
443
|
+
組織擁有者應為每個參與的應用程式提供相同的允許電子郵件網域與相同的組織範圍密鑰:
|
|
444
|
+
|
|
445
|
+
1. 在第一個應用程式中,從**組織 → 跨應用程式驗證**產生或顯示密鑰。
|
|
446
|
+
2. 在每個其他應用程式中,選擇**從另一個應用程式貼上密鑰**並貼上該值。首次連線必須進行這個手動步驟:尚未擁有該密鑰的應用程式無法驗證遠端同步要求。
|
|
447
|
+
3. 應用程式共用此密鑰後,使用**同步到應用程式**將後續更新推送至已連線且已探索到的應用程式。結果會回報無法更新的應用程式。
|
|
448
|
+
|
|
449
|
+
當您**重新產生**密鑰時,設定 UI 會立即同步它,並使用先前的密鑰簽署更新,讓已連線的應用程式可以驗證變更。如果某個應用程式錯過該同步,請在其中手動貼上新密鑰,然後再次同步。請像對待其他憑證一樣對待此密鑰:不要將它放入用戶端程式碼、日誌或第三方用戶端設定中。
|
|
450
|
+
|
|
439
451
|
## 繼續 {#continuations}
|
|
440
452
|
|
|
441
453
|
當代理呼叫未立即返回的遠端 A2A 對等點時,框架會輪詢 `tasks/get` 直到工作解決。這是透過 `A2AClient.sendAndWait` 連線的,這是 `callAgent()` 幫助程式使用的預設模式。
|
|
@@ -138,11 +138,11 @@ npx @agent-native/core@latest recap doctor
|
|
|
138
138
|
|
|
139
139
|
除了後端之外,兩個儲存庫變數還可以調整代理的執行方式:
|
|
140
140
|
|
|
141
|
-
- **`VISUAL_RECAP_MODEL`** 固定傳遞給 CLI (`--model`) 的模型 — 例如 `gpt-5.
|
|
141
|
+
- **`VISUAL_RECAP_MODEL`** 固定傳遞給 CLI (`--model`) 的模型 — 例如 `gpt-5.6-sol` 用於 Codex,或 Claude 模型 ID。保留其未設定以使用 CLI 自己的預設模型。
|
|
142
142
|
- **`VISUAL_RECAP_REASONING`** 設定推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。適用於Codex後端; Claude 的推理是模型驅動的,因此該變數被忽略。
|
|
143
143
|
- **`VISUAL_RECAP_SKILL_SOURCE`** 控制提示新鮮度:`auto`/unset 使用最新的捆綁技能指南,而 `repo` 固定到已提交的儲存庫本機 `visual-recap` 技能資料夾。
|
|
144
144
|
|
|
145
|
-
例如,要在 Codex 和 GPT-5.
|
|
145
|
+
例如,要在 Codex 和 GPT-5.6 Sol 上以高推理執行回顧,請設定儲存庫變數 `VISUAL_RECAP_AGENT=codex`、`VISUAL_RECAP_MODEL=gpt-5.6-sol` 和 `VISUAL_RECAP_REASONING=high`。
|
|
146
146
|
|
|
147
147
|
## 秘密和變數
|
|
148
148
|
|
|
@@ -191,7 +191,7 @@ npx @agent-native/core@latest recap setup
|
|
|
191
191
|
| ------------------------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
192
192
|
| `OPENAI_API_KEY` | — | 秘密。與 `VISUAL_RECAP_AGENT=codex` 一起設定以使用 Codex 執行回顧。 |
|
|
193
193
|
| `VISUAL_RECAP_AGENT` | `claude` | 變數。選取編碼代理後端(`claude` 或 `codex`)。 |
|
|
194
|
-
| `VISUAL_RECAP_MODEL` | 每個 CLI 的預設值 | 變數。固定模型 - 例如`gpt-5.
|
|
194
|
+
| `VISUAL_RECAP_MODEL` | 每個 CLI 的預設值 | 變數。固定模型 - 例如`gpt-5.6-sol` 表示 Codex,或 Claude 型號 ID。取消設定使用 CLI 自己的預設值。 |
|
|
195
195
|
| `VISUAL_RECAP_REASONING` | 每個模型的預設值 | 變數。推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。適用於Codex後端。 |
|
|
196
196
|
| `RECAP_CLI_VERSION` | `latest` | 變數。固定工作流程安裝的 `@agent-native/core` CLI 版本 - 例如`1.5.0`。參見[Version pinning](#version-pinning-copy-variant)。 |
|
|
197
197
|
| `PLAN_RECAP_APP_URL` | `https://plan.agent-native.com` | 秘密。僅當在不同來源自行託管計畫應用時。 |
|
|
@@ -66,6 +66,10 @@ Automation-first app 是無瀏覽器的 Agent-Native app,用於 scheduled jobs
|
|
|
66
66
|
|
|
67
67
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
68
68
|
|
|
69
|
+
## 稍後新增聊天 {#add-chat-later}
|
|
70
|
+
|
|
71
|
+
`--headless` 只會選擇初始 scaffold;沒有可將現有僅 actions 專案原地轉換為聊天應用程式的 `agent-native` 命令。當使用者需要瀏覽器對話時,請將 [Chat 範本](/docs/template-chat) 作為遷移參考:保留 actions、SQL 資料、instructions 和 skills,並新增瀏覽器 shell、server plugins、`<AgentChatSurface>` 與載入現有 actions 的 chat plugin。請驗證 `pnpm typecheck`,並完成一次呼叫現有 action 的聊天。`agent-native add` 用於 integration blueprints,不用於此轉換。
|
|
72
|
+
|
|
69
73
|
## 下一步是什麼
|
|
70
74
|
|
|
71
75
|
- [**Agent Surfaces — Headless**](/docs/agent-surfaces#headless) — 完整的無頭決策指南和 API
|
|
@@ -138,11 +138,11 @@ If the variable is unset, the action uses `claude`.
|
|
|
138
138
|
|
|
139
139
|
Beyond the backend, two repository variables tune _how_ the agent runs:
|
|
140
140
|
|
|
141
|
-
- **`VISUAL_RECAP_MODEL`** pins the model passed to the CLI (`--model`) — for example `gpt-5.
|
|
141
|
+
- **`VISUAL_RECAP_MODEL`** pins the model passed to the CLI (`--model`) — for example `gpt-5.6-sol` for Codex, or a Claude model id. Leave it unset to use the CLI's own default model.
|
|
142
142
|
- **`VISUAL_RECAP_REASONING`** sets the reasoning depth: `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. It applies to the Codex backend; Claude's reasoning is model-driven, so this variable is ignored there.
|
|
143
143
|
- **`VISUAL_RECAP_SKILL_SOURCE`** controls prompt freshness: `auto`/unset uses the latest bundled skill guidance, while `repo` pins to the committed repo-local `visual-recap` skill folder.
|
|
144
144
|
|
|
145
|
-
For example, to run the recap on Codex with GPT-5.
|
|
145
|
+
For example, to run the recap on Codex with GPT-5.6 Sol at high reasoning, set the repository variables `VISUAL_RECAP_AGENT=codex`, `VISUAL_RECAP_MODEL=gpt-5.6-sol`, and `VISUAL_RECAP_REASONING=high`.
|
|
146
146
|
|
|
147
147
|
## Secrets and variables
|
|
148
148
|
|
|
@@ -191,7 +191,7 @@ real token.
|
|
|
191
191
|
| ------------------------ | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
192
192
|
| `OPENAI_API_KEY` | — | Secret. Set together with `VISUAL_RECAP_AGENT=codex` to run the recap with Codex instead. |
|
|
193
193
|
| `VISUAL_RECAP_AGENT` | `claude` | Variable. Selects the coding-agent backend (`claude` or `codex`). |
|
|
194
|
-
| `VISUAL_RECAP_MODEL` | each CLI's default | Variable. Pins the model — e.g. `gpt-5.
|
|
194
|
+
| `VISUAL_RECAP_MODEL` | each CLI's default | Variable. Pins the model — e.g. `gpt-5.6-sol` for Codex, or a Claude model id. Unset uses the CLI's own default. |
|
|
195
195
|
| `VISUAL_RECAP_REASONING` | each model's default | Variable. Reasoning depth: `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. Applies to the Codex backend. |
|
|
196
196
|
| `RECAP_CLI_VERSION` | `latest` | Variable. Pins the `@agent-native/core` CLI version the workflow installs — e.g. `1.5.0`. See [Version pinning](#version-pinning-copy-variant). |
|
|
197
197
|
| `PLAN_RECAP_APP_URL` | `https://plan.agent-native.com` | Secret. Only when self-hosting the Plans app at a different origin. |
|
|
@@ -91,6 +91,28 @@ The `--headless` flag only chooses the initial scaffold. It does not choose a
|
|
|
91
91
|
different architecture. You can later move the same `actions/`, instructions,
|
|
92
92
|
skills, and SQL state into a chat app or full application surface.
|
|
93
93
|
|
|
94
|
+
## Add chat later {#add-chat-later}
|
|
95
|
+
|
|
96
|
+
`--headless` is not a permanent runtime mode, and there is no `agent-native`
|
|
97
|
+
command that converts an existing action-only project into a chat app in place.
|
|
98
|
+
When people need a browser conversation surface, use the [Chat template](/docs/template-chat)
|
|
99
|
+
as the migration reference and keep the durable action and database contract:
|
|
100
|
+
|
|
101
|
+
1. Scaffold a temporary Chat app with the framework version you are migrating
|
|
102
|
+
to: `npx @agent-native/core@latest create my-chat-reference --template chat`.
|
|
103
|
+
2. Bring its browser shell, server plugins, and UI dependencies into the
|
|
104
|
+
existing project. In particular, add the full-page `<AgentChatSurface>` and
|
|
105
|
+
an `agent-chat` plugin that loads the existing action registry.
|
|
106
|
+
3. Keep your action names, Zod schemas, SQL data, instructions, and skills.
|
|
107
|
+
Chat calls those same actions; it does not replace them.
|
|
108
|
+
4. Verify both surfaces: run `pnpm typecheck`, start the browser app with
|
|
109
|
+
`pnpm dev`, then complete one chat turn that calls an existing action.
|
|
110
|
+
|
|
111
|
+
Use `agent-native add` for integration blueprints, not for this conversion.
|
|
112
|
+
Choose chat when people need conversational steering, approvals, or durable
|
|
113
|
+
thread history; add app pages when they need to browse, compare, edit, or share
|
|
114
|
+
persistent objects.
|
|
115
|
+
|
|
94
116
|
## What to add next {#whats-next}
|
|
95
117
|
|
|
96
118
|
- [**Getting Started**](/docs/getting-started) — the chat-first tutorial from action to inline result to durable page
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.92.
|
|
3
|
+
"version": "0.92.9",
|
|
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": {
|
|
@@ -96,7 +96,7 @@ export function registerBuiltinEngines(): void {
|
|
|
96
96
|
"Claude models through the Vercel AI SDK. Supports thinking and caching via AI SDK providerOptions.",
|
|
97
97
|
openai: "OpenAI GPT models via the Vercel AI SDK. Requires OPENAI_API_KEY.",
|
|
98
98
|
openrouter:
|
|
99
|
-
"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.
|
|
99
|
+
"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.",
|
|
100
100
|
google:
|
|
101
101
|
"Google Gemini models via the Vercel AI SDK. Requires GOOGLE_GENERATIVE_AI_API_KEY.",
|
|
102
102
|
groq: "Groq LPU inference via the Vercel AI SDK. Requires GROQ_API_KEY.",
|
|
@@ -11,14 +11,13 @@
|
|
|
11
11
|
//
|
|
12
12
|
// Sources (June 2026):
|
|
13
13
|
// Anthropic https://platform.claude.com/docs/en/about-claude/models/overview
|
|
14
|
-
// OpenAI https://developers.openai.com/api/docs/models/gpt-5.
|
|
15
|
-
// https://developers.openai.com/api/docs/models/gpt-5.4
|
|
14
|
+
// OpenAI https://developers.openai.com/api/docs/models/gpt-5.6
|
|
16
15
|
// Google https://ai.google.dev/gemini-api/docs/models
|
|
17
16
|
// OpenRouter https://openrouter.ai/api/v1/models
|
|
18
17
|
//
|
|
19
18
|
// Family defaults (used when a model id isn't listed explicitly):
|
|
20
19
|
// claude-* → 200_000 (Haiku 4.5 and earlier models)
|
|
21
|
-
// gpt-5* → 1_050_000 (GPT-5.
|
|
20
|
+
// gpt-5* → 1_050_000 (GPT-5.6 Sol/Terra flagship context)
|
|
22
21
|
// gemini-2* / gemini-3* → 1_048_576
|
|
23
22
|
// everything else → 128_000 (safe conservative floor)
|
|
24
23
|
//
|
|
@@ -37,9 +36,9 @@ const MODEL_CONTEXT_WINDOWS: Record<string, number> = {
|
|
|
37
36
|
"claude-haiku-4-5-20251001": 200_000,
|
|
38
37
|
|
|
39
38
|
// ── Builder gateway OpenAI IDs (dot→dash) ────────────────────────────────
|
|
40
|
-
"gpt-5-
|
|
41
|
-
"gpt-5-
|
|
42
|
-
"gpt-5-
|
|
39
|
+
"gpt-5-6-sol": 1_050_000,
|
|
40
|
+
"gpt-5-6-terra": 1_050_000,
|
|
41
|
+
"gpt-5-6-luna": 400_000,
|
|
43
42
|
|
|
44
43
|
// ── Gemini (Builder gateway IDs) ─────────────────────────────────────────
|
|
45
44
|
"gemini-3-1-pro": 1_048_576,
|
|
@@ -52,15 +51,16 @@ const MODEL_CONTEXT_WINDOWS: Record<string, number> = {
|
|
|
52
51
|
"anthropic/claude-opus-4.7": 1_000_000,
|
|
53
52
|
"anthropic/claude-sonnet-5": 1_000_000,
|
|
54
53
|
"anthropic/claude-sonnet-4.6": 1_000_000,
|
|
55
|
-
"openai/gpt-5.
|
|
56
|
-
"openai/gpt-5.
|
|
54
|
+
"openai/gpt-5.6-sol": 1_050_000,
|
|
55
|
+
"openai/gpt-5.6-terra": 1_050_000,
|
|
56
|
+
"openai/gpt-5.6-luna": 1_050_000,
|
|
57
57
|
"google/gemini-2.5-flash": 1_048_576,
|
|
58
58
|
"z-ai/glm-5.2": 1_048_576,
|
|
59
59
|
|
|
60
60
|
// ── AI-SDK native OpenAI IDs ──────────────────────────────────────────────
|
|
61
|
-
"gpt-5.
|
|
62
|
-
"gpt-5.
|
|
63
|
-
"gpt-5.
|
|
61
|
+
"gpt-5.6-sol": 1_050_000,
|
|
62
|
+
"gpt-5.6-terra": 1_050_000,
|
|
63
|
+
"gpt-5.6-luna": 400_000,
|
|
64
64
|
|
|
65
65
|
// ── AI-SDK native Google IDs ──────────────────────────────────────────────
|
|
66
66
|
"gemini-3.5-flash": 1_048_576,
|
|
@@ -127,15 +127,13 @@ export function getContextWindowForModel(modelId: string): number {
|
|
|
127
127
|
// Anthropic https://platform.claude.com/docs/en/docs/about-claude/models/overview
|
|
128
128
|
// (Fable 5 / Opus 4.8 / Opus 4.7 / Sonnet 5 / Sonnet 4.6 = 128K;
|
|
129
129
|
// Haiku 4.5 / Sonnet 4.5 / Opus 4.5 = 64K)
|
|
130
|
-
// OpenAI https://developers.openai.com/api/docs/models/gpt-5.
|
|
131
|
-
//
|
|
132
|
-
// https://developers.openai.com/api/docs/models/gpt-5.4-mini
|
|
133
|
-
// (GPT-5.5 / GPT-5.4 / GPT-5.4-mini = 128K)
|
|
130
|
+
// OpenAI https://developers.openai.com/api/docs/models/gpt-5.6
|
|
131
|
+
// (GPT-5.6 Sol / Terra / Luna = 40K)
|
|
134
132
|
//
|
|
135
133
|
// Family defaults (used when a model id isn't listed explicitly):
|
|
136
134
|
// claude flagship (fable-5 / opus-4.6+ / sonnet-5 / sonnet-4.6) → 128_000
|
|
137
135
|
// claude-* (Haiku 4.5, older/unknown Claude ids) → 64_000
|
|
138
|
-
// gpt-5* → 128_000
|
|
136
|
+
// gpt-5* → 128_000 (safe fallback)
|
|
139
137
|
// everything else → 64_000
|
|
140
138
|
// (safe conservative ceiling that matches the previous global clamp)
|
|
141
139
|
// ---------------------------------------------------------------------------
|
|
@@ -151,9 +149,9 @@ const MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = {
|
|
|
151
149
|
"claude-haiku-4-5-20251001": 64_000,
|
|
152
150
|
|
|
153
151
|
// ── Builder gateway OpenAI IDs (dot→dash) ────────────────────────────────
|
|
154
|
-
"gpt-5-
|
|
155
|
-
"gpt-5-
|
|
156
|
-
"gpt-5-
|
|
152
|
+
"gpt-5-6-sol": 40_000,
|
|
153
|
+
"gpt-5-6-terra": 40_000,
|
|
154
|
+
"gpt-5-6-luna": 40_000,
|
|
157
155
|
|
|
158
156
|
// ── OpenRouter model IDs ──────────────────────────────────────────────────
|
|
159
157
|
"anthropic/claude-fable-5": 128_000,
|
|
@@ -161,13 +159,14 @@ const MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = {
|
|
|
161
159
|
"anthropic/claude-opus-4.7": 128_000,
|
|
162
160
|
"anthropic/claude-sonnet-5": 128_000,
|
|
163
161
|
"anthropic/claude-sonnet-4.6": 128_000,
|
|
164
|
-
"openai/gpt-5.
|
|
165
|
-
"openai/gpt-5.
|
|
162
|
+
"openai/gpt-5.6-sol": 40_000,
|
|
163
|
+
"openai/gpt-5.6-terra": 40_000,
|
|
164
|
+
"openai/gpt-5.6-luna": 128_000,
|
|
166
165
|
|
|
167
166
|
// ── AI-SDK native OpenAI IDs ──────────────────────────────────────────────
|
|
168
|
-
"gpt-5.
|
|
169
|
-
"gpt-5.
|
|
170
|
-
"gpt-5.
|
|
167
|
+
"gpt-5.6-sol": 40_000,
|
|
168
|
+
"gpt-5.6-terra": 40_000,
|
|
169
|
+
"gpt-5.6-luna": 40_000,
|
|
171
170
|
};
|
|
172
171
|
|
|
173
172
|
/**
|
|
@@ -243,7 +242,7 @@ function openRouterModelId(provider: string, model: string): string {
|
|
|
243
242
|
return `${provider}/${model}`;
|
|
244
243
|
}
|
|
245
244
|
|
|
246
|
-
const FRAMEWORK_DEFAULT_OPENAI_MODEL = "gpt-5.
|
|
245
|
+
const FRAMEWORK_DEFAULT_OPENAI_MODEL = "gpt-5.6-sol";
|
|
247
246
|
const FRAMEWORK_DEFAULT_BUILDER_MODEL = ANTHROPIC_DEFAULT_MODEL_ID;
|
|
248
247
|
const FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL = builderGatewayModelId(
|
|
249
248
|
FRAMEWORK_DEFAULT_OPENAI_MODEL,
|
|
@@ -262,8 +261,8 @@ export const AGENT_MODEL_CONFIG = {
|
|
|
262
261
|
CLAUDE_SONNET_MODEL_ID,
|
|
263
262
|
"claude-haiku-4-5",
|
|
264
263
|
FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL,
|
|
265
|
-
"gpt-5-
|
|
266
|
-
"gpt-5-
|
|
264
|
+
"gpt-5-6-terra",
|
|
265
|
+
"gpt-5-6-luna",
|
|
267
266
|
"gemini-3-1-pro",
|
|
268
267
|
"gemini-3-5-flash",
|
|
269
268
|
"gemini-3-1-flash-lite",
|
|
@@ -292,8 +291,8 @@ export const AGENT_MODEL_CONFIG = {
|
|
|
292
291
|
defaultModel: FRAMEWORK_DEFAULT_OPENAI_MODEL,
|
|
293
292
|
supportedModels: [
|
|
294
293
|
FRAMEWORK_DEFAULT_OPENAI_MODEL,
|
|
295
|
-
"gpt-5.
|
|
296
|
-
"gpt-5.
|
|
294
|
+
"gpt-5.6-terra",
|
|
295
|
+
"gpt-5.6-luna",
|
|
297
296
|
],
|
|
298
297
|
},
|
|
299
298
|
openrouter: {
|
|
@@ -303,7 +302,8 @@ export const AGENT_MODEL_CONFIG = {
|
|
|
303
302
|
"anthropic/claude-opus-4.8",
|
|
304
303
|
OPENROUTER_CLAUDE_SONNET_MODEL_ID,
|
|
305
304
|
FRAMEWORK_DEFAULT_OPENROUTER_MODEL,
|
|
306
|
-
"openai/gpt-5.
|
|
305
|
+
"openai/gpt-5.6-terra",
|
|
306
|
+
"openai/gpt-5.6-luna",
|
|
307
307
|
// Current stable Gemini on OpenRouter (2.5 Flash is GA)
|
|
308
308
|
"google/gemini-2.5-flash",
|
|
309
309
|
"z-ai/glm-5.2",
|
|
@@ -2840,6 +2840,25 @@ export async function runAgentLoop(opts: {
|
|
|
2840
2840
|
try {
|
|
2841
2841
|
const priorEvents = await getCurrentTurnEventsForThread(opts.threadId);
|
|
2842
2842
|
if (priorEvents.length > 0) {
|
|
2843
|
+
// A logical turn can span multiple background continuation runs. Final
|
|
2844
|
+
// response guards must see successful reads from earlier chunks, not
|
|
2845
|
+
// only tools executed after the latest handoff. Otherwise a guard can
|
|
2846
|
+
// reject a grounded answer (or a successfully-created artifact) after
|
|
2847
|
+
// the evidence-producing query completed in a predecessor run.
|
|
2848
|
+
for (const event of priorEvents) {
|
|
2849
|
+
if (event.type === "tool_start") {
|
|
2850
|
+
toolCallHistory.push({
|
|
2851
|
+
name: event.tool,
|
|
2852
|
+
input: event.input,
|
|
2853
|
+
});
|
|
2854
|
+
} else if (event.type === "tool_done") {
|
|
2855
|
+
toolResultHistory.push({
|
|
2856
|
+
name: event.tool,
|
|
2857
|
+
content: event.result,
|
|
2858
|
+
isError: event.isError === true,
|
|
2859
|
+
});
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2843
2862
|
toolCallJournal = classifyToolCallJournal(priorEvents);
|
|
2844
2863
|
}
|
|
2845
2864
|
} catch {
|
|
@@ -3790,7 +3809,7 @@ export async function runAgentLoop(opts: {
|
|
|
3790
3809
|
tool: toolCall.name,
|
|
3791
3810
|
input: toolCall.input as Record<string, unknown>,
|
|
3792
3811
|
result,
|
|
3793
|
-
completedSideEffect:
|
|
3812
|
+
completedSideEffect: true,
|
|
3794
3813
|
});
|
|
3795
3814
|
recordToolResult(result, false);
|
|
3796
3815
|
return {
|
|
@@ -3844,6 +3863,7 @@ export async function runAgentLoop(opts: {
|
|
|
3844
3863
|
tool: toolCall.name,
|
|
3845
3864
|
input: toolCall.input as Record<string, unknown>,
|
|
3846
3865
|
result,
|
|
3866
|
+
completedSideEffect: true,
|
|
3847
3867
|
...(actionEntry.chatUI ? { chatUI: actionEntry.chatUI } : {}),
|
|
3848
3868
|
});
|
|
3849
3869
|
recordToolResult(result, false);
|
|
@@ -4951,6 +4971,73 @@ export interface ChainServerDrivenContinuationDeps {
|
|
|
4951
4971
|
sleep?: (ms: number) => Promise<void>;
|
|
4952
4972
|
}
|
|
4953
4973
|
|
|
4974
|
+
/** Retry-budget sizing for one `chainServerDrivenContinuation` dispatch. */
|
|
4975
|
+
export interface ContinuationDispatchBudget {
|
|
4976
|
+
maxDispatchAttempts: number;
|
|
4977
|
+
dispatchResponseTimeoutMs: number;
|
|
4978
|
+
/** Cap (ms) on the per-gap exponential backoff. `Infinity` preserves the
|
|
4979
|
+
* original uncapped `500 * 2 ** attempt` schedule for the two budgets
|
|
4980
|
+
* that predate this cap (their attempt counts are low enough it never
|
|
4981
|
+
* mattered); only the larger proven-in-background-function budget uses a
|
|
4982
|
+
* real cap so its extra attempts don't add unbounded backoff. */
|
|
4983
|
+
backoffCapMs: number;
|
|
4984
|
+
}
|
|
4985
|
+
|
|
4986
|
+
/**
|
|
4987
|
+
* Sizes the dispatch retry budget by *remaining wall-clock capacity*, not by
|
|
4988
|
+
* dispatch TARGET — the two are independent concerns. `chainViaDurableBackground`
|
|
4989
|
+
* only picks where the dispatch goes (see `continuationDispatchPath` above);
|
|
4990
|
+
* this picks how hard to retry getting it there.
|
|
4991
|
+
*
|
|
4992
|
+
* Three cases:
|
|
4993
|
+
* - `chainViaDurableBackground === true`: the durable worker chain dispatching
|
|
4994
|
+
* to the Netlify background function url. Unchanged: 3 attempts / 15s.
|
|
4995
|
+
* - `chainViaDurableBackground === false` and
|
|
4996
|
+
* `workerProvenInBackgroundFunction === true`: a worker PROVEN (by runtime
|
|
4997
|
+
* function name, see `shouldUseBackgroundFunctionTimeoutForWorker`) to
|
|
4998
|
+
* already be executing inside a real `-background` function — it was
|
|
4999
|
+
* forced onto the regular-function dispatch target only because a
|
|
5000
|
+
* background function cannot invoke its own URL from within a live
|
|
5001
|
+
* invocation (see the caller's `&& !runsInBackgroundFunction` comment),
|
|
5002
|
+
* NOT because it lacks time or a connected-client fallback. This worker
|
|
5003
|
+
* has up to `BACKGROUND_SOFT_TIMEOUT_CEILING_MS` (13min) of soft-timeout
|
|
5004
|
+
* budget behind it and up to Netlify's ~15min hard function limit ahead —
|
|
5005
|
+
* roughly 2 minutes of remaining wall clock — and, being a background
|
|
5006
|
+
* worker, NO connected client to fall back on if the handoff is dropped.
|
|
5007
|
+
* Demoting it to the foreground's 2-attempt/10s budget is exactly the bug
|
|
5008
|
+
* this type documents: 5 attempts / 15s response timeout, with backoff
|
|
5009
|
+
* capped at 4s/gap (500ms, 1s, 2s, 4s across the 4 gaps ≈ 7.5s total).
|
|
5010
|
+
* Worst case: 5 × 15s dispatch + ~7.5s backoff ≈ 82.5s, safely inside the
|
|
5011
|
+
* ~2min of remaining budget before the function's hard kill.
|
|
5012
|
+
* - Otherwise: a true foreground caller not proven in a background
|
|
5013
|
+
* function. Unchanged: 2 attempts / 10s — it has a live connected client
|
|
5014
|
+
* as a fallback (the terminal `auto_continue` event still reaches it).
|
|
5015
|
+
*/
|
|
5016
|
+
export function resolveContinuationDispatchBudget(opts: {
|
|
5017
|
+
chainViaDurableBackground: boolean;
|
|
5018
|
+
workerProvenInBackgroundFunction: boolean;
|
|
5019
|
+
}): ContinuationDispatchBudget {
|
|
5020
|
+
if (opts.chainViaDurableBackground) {
|
|
5021
|
+
return {
|
|
5022
|
+
maxDispatchAttempts: 3,
|
|
5023
|
+
dispatchResponseTimeoutMs: 15_000,
|
|
5024
|
+
backoffCapMs: Infinity,
|
|
5025
|
+
};
|
|
5026
|
+
}
|
|
5027
|
+
if (opts.workerProvenInBackgroundFunction) {
|
|
5028
|
+
return {
|
|
5029
|
+
maxDispatchAttempts: 5,
|
|
5030
|
+
dispatchResponseTimeoutMs: 15_000,
|
|
5031
|
+
backoffCapMs: 4_000,
|
|
5032
|
+
};
|
|
5033
|
+
}
|
|
5034
|
+
return {
|
|
5035
|
+
maxDispatchAttempts: 2,
|
|
5036
|
+
dispatchResponseTimeoutMs: 10_000,
|
|
5037
|
+
backoffCapMs: Infinity,
|
|
5038
|
+
};
|
|
5039
|
+
}
|
|
5040
|
+
|
|
4954
5041
|
/**
|
|
4955
5042
|
* Server-driven continuation handoff for a chunk that hit its soft-timeout
|
|
4956
5043
|
* boundary still unfinished: mint the next chunk's runId, PRE-INSERT its run
|
|
@@ -4980,7 +5067,14 @@ export interface ChainServerDrivenContinuationDeps {
|
|
|
4980
5067
|
* a dead handoff — after a failed/timed-out attempt the successor's
|
|
4981
5068
|
* ATOMIC CLAIM is consulted (`readBackgroundRunClaim`): a row that
|
|
4982
5069
|
* flipped to `background-processing` (or already went terminal) proves
|
|
4983
|
-
* the handoff landed, so no retry is fired.
|
|
5070
|
+
* the handoff landed, so no retry is fired.
|
|
5071
|
+
*
|
|
5072
|
+
* `chainViaDurableBackground` does NOT alone determine the retry BUDGET —
|
|
5073
|
+
* see `resolveContinuationDispatchBudget` and `workerProvenInBackgroundFunction`
|
|
5074
|
+
* below: a worker forced onto this same `false` target because it is proven
|
|
5075
|
+
* to already be inside a real background function gets a materially larger
|
|
5076
|
+
* budget than a true foreground caller, since it has no connected-client
|
|
5077
|
+
* fallback and minutes of remaining wall clock instead of seconds.
|
|
4984
5078
|
*
|
|
4985
5079
|
* Never throws — all failure paths are handled (recorded + marked) inside.
|
|
4986
5080
|
*/
|
|
@@ -4994,6 +5088,13 @@ export async function chainServerDrivenContinuation(opts: {
|
|
|
4994
5088
|
requestBody: Record<string, unknown>;
|
|
4995
5089
|
backgroundContinuationCount: number;
|
|
4996
5090
|
chainViaDurableBackground: boolean;
|
|
5091
|
+
/** True only when this worker is PROVEN (by runtime function name) to
|
|
5092
|
+
* already be executing inside a real Netlify `-background` function —
|
|
5093
|
+
* distinct from `chainViaDurableBackground`, which is forced `false` for
|
|
5094
|
+
* this exact worker (it cannot dispatch to its own function URL from a
|
|
5095
|
+
* live invocation). Widens the retry budget; does NOT change the dispatch
|
|
5096
|
+
* target. See `resolveContinuationDispatchBudget`. Defaults to `false`. */
|
|
5097
|
+
workerProvenInBackgroundFunction?: boolean;
|
|
4997
5098
|
deps?: ChainServerDrivenContinuationDeps;
|
|
4998
5099
|
}): Promise<void> {
|
|
4999
5100
|
const d = {
|
|
@@ -5060,10 +5161,13 @@ export async function chainServerDrivenContinuation(opts: {
|
|
|
5060
5161
|
: AGENT_CHAT_PROCESS_RUN_PATH;
|
|
5061
5162
|
const continuationExpectsNetlifyBackgroundFunction =
|
|
5062
5163
|
dispatchPathTargetsNetlifyBackgroundFunction(continuationDispatchPath);
|
|
5063
|
-
const
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5164
|
+
const dispatchBudget = resolveContinuationDispatchBudget({
|
|
5165
|
+
chainViaDurableBackground: opts.chainViaDurableBackground,
|
|
5166
|
+
workerProvenInBackgroundFunction:
|
|
5167
|
+
opts.workerProvenInBackgroundFunction === true,
|
|
5168
|
+
});
|
|
5169
|
+
const maxDispatchAttempts = dispatchBudget.maxDispatchAttempts;
|
|
5170
|
+
const dispatchResponseTimeoutMs = dispatchBudget.dispatchResponseTimeoutMs;
|
|
5067
5171
|
const continuationMarker = {
|
|
5068
5172
|
runId: nextRunId,
|
|
5069
5173
|
turnId: effectiveTurnId,
|
|
@@ -5147,7 +5251,17 @@ export async function chainServerDrivenContinuation(opts: {
|
|
|
5147
5251
|
) {
|
|
5148
5252
|
try {
|
|
5149
5253
|
if (attempt > 0) {
|
|
5150
|
-
|
|
5254
|
+
// Uncapped budgets (durable-background and true-foreground) keep
|
|
5255
|
+
// the original `500 * 2 ** attempt` schedule unchanged. The capped
|
|
5256
|
+
// budget (proven-in-background-function) instead uses a schedule
|
|
5257
|
+
// starting at 500ms and doubling per gap, capped at
|
|
5258
|
+
// `backoffCapMs` — see `resolveContinuationDispatchBudget` for why
|
|
5259
|
+
// this stays well inside the worker's remaining wall clock even
|
|
5260
|
+
// with 5 attempts.
|
|
5261
|
+
const backoffMs = Number.isFinite(dispatchBudget.backoffCapMs)
|
|
5262
|
+
? Math.min(500 * 2 ** (attempt - 1), dispatchBudget.backoffCapMs)
|
|
5263
|
+
: 500 * 2 ** attempt;
|
|
5264
|
+
await d.sleep(backoffMs);
|
|
5151
5265
|
// Keep the pre-inserted successor row visibly alive while we
|
|
5152
5266
|
// retry: the awaited attempts + backoff can outlast
|
|
5153
5267
|
// UNCLAIMED_BACKGROUND_RUN_GRACE_MS (25s), and without a fresh
|
|
@@ -6599,6 +6713,14 @@ export function createProductionAgentHandler(
|
|
|
6599
6713
|
isAgentChatDurableBackgroundEnabled({
|
|
6600
6714
|
appOptIn: options.durableBackgroundRuns === true,
|
|
6601
6715
|
}) && !runsInBackgroundFunction,
|
|
6716
|
+
// Only changes the retry BUDGET, never the dispatch target
|
|
6717
|
+
// above: a worker proven in a real background function has
|
|
6718
|
+
// minutes of remaining wall clock and no connected-client
|
|
6719
|
+
// fallback, so it must not be demoted to the foreground's
|
|
6720
|
+
// 2-attempt budget just because it was forced onto the
|
|
6721
|
+
// regular-function dispatch target. See
|
|
6722
|
+
// `resolveContinuationDispatchBudget`.
|
|
6723
|
+
workerProvenInBackgroundFunction: runsInBackgroundFunction,
|
|
6602
6724
|
});
|
|
6603
6725
|
}
|
|
6604
6726
|
} finally {
|