@agent-native/core 0.101.5 → 0.101.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +12 -0
- package/corpus/core/docs/content/locales/ar-SA/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.mdx +2 -2
- package/corpus/core/docs/content/pure-agent-apps.mdx +58 -14
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/artifact-response.ts +255 -12
- package/corpus/core/src/agent/thread-data-builder.ts +84 -11
- package/corpus/core/src/integrations/a2a-continuation-processor.ts +99 -7
- package/corpus/core/src/integrations/adapters/discord.ts +3 -1
- package/corpus/core/src/integrations/adapters/email.ts +4 -1
- package/corpus/core/src/integrations/adapters/google-docs.ts +4 -1
- package/corpus/core/src/integrations/adapters/microsoft-teams.ts +3 -1
- package/corpus/core/src/integrations/adapters/slack.ts +38 -9
- package/corpus/core/src/integrations/adapters/telegram.ts +32 -10
- package/corpus/core/src/integrations/adapters/whatsapp.ts +5 -1
- package/corpus/core/src/integrations/index.ts +1 -0
- package/corpus/core/src/integrations/types.ts +9 -2
- package/corpus/core/src/integrations/webhook-handler.ts +69 -45
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +1 -0
- package/corpus/templates/analytics/AGENTS.md +6 -0
- package/corpus/templates/analytics/README.md +1 -1
- package/corpus/templates/analytics/actions/data-source-status.ts +19 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +5 -1
- package/corpus/templates/analytics/app/routes/_index.tsx +2 -2
- package/corpus/templates/analytics/changelog/2026-07-14-analytics-chat-guides-you-to-connect-a-data-source-with-a-di.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-14-analytics-landing-pages-now-clearly-position-the-app-as-an-o.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-15-daily-dashboard-emails-now-include-the-complete-dashboard-sc.md +6 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +8 -1
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +64 -12
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +15 -3
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +364 -4
- package/corpus/templates/clips/app/components/dictate/vocabulary-section.tsx +1 -0
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +12 -9
- package/corpus/templates/clips/app/components/library/library-layout.tsx +19 -16
- package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +13 -9
- package/corpus/templates/clips/changelog/2026-07-15-folders-and-sidebar-links-are-clickable-again-immediately-af.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-15-hovering-a-truncated-folder-name-now-shows-the-full-name.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-15-space-creation-controls-are-now-shown-only-to-organization-a.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-15-vocabulary-terms-can-now-be-deleted-from-the-dictation-dicti.md +6 -0
- package/corpus/templates/clips/desktop/src/styles.css +23 -1
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +49 -7
- package/corpus/templates/clips/server/lib/recordings.ts +5 -2
- package/corpus/templates/content/.agents/skills/content/SKILL.md +31 -0
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +35 -21
- package/corpus/templates/content/AGENTS.md +29 -7
- package/corpus/templates/content/actions/_database-source-utils.ts +30 -16
- package/corpus/templates/content/actions/_database-utils.ts +15 -1
- package/corpus/templates/content/actions/_local-file-documents.ts +53 -1
- package/corpus/templates/content/actions/_property-utils.ts +7 -1
- package/corpus/templates/content/actions/configure-document-property.ts +11 -0
- package/corpus/templates/content/actions/create-content-database.ts +11 -0
- package/corpus/templates/content/actions/create-document.ts +9 -0
- package/corpus/templates/content/actions/create-inline-content-database.ts +3 -0
- package/corpus/templates/content/actions/export-content-source.ts +1 -0
- package/corpus/templates/content/actions/get-content-database.ts +13 -1
- package/corpus/templates/content/actions/get-document.ts +12 -2
- package/corpus/templates/content/actions/import-content-source.ts +6 -0
- package/corpus/templates/content/actions/list-documents.ts +3 -0
- package/corpus/templates/content/actions/pull-document.ts +2 -0
- package/corpus/templates/content/actions/search-documents.ts +5 -1
- package/corpus/templates/content/actions/update-document.ts +16 -1
- package/corpus/templates/content/actions/view-screen.ts +15 -2
- package/corpus/templates/content/app/components/editor/DescriptionField.tsx +121 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +14 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +223 -34
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +56 -8
- package/corpus/templates/content/app/i18n/zh-TW.ts +5 -0
- package/corpus/templates/content/app/i18n-data.ts +52 -0
- package/corpus/templates/content/changelog/2026-07-14-pages-and-databases-can-describe-themselves-with-guidance-fo.md +6 -0
- package/corpus/templates/content/changelog/2026-07-14-slack-follow-ups-now-retain-created-content-identity-and-per.md +6 -0
- package/corpus/templates/content/server/db/schema.ts +4 -0
- package/corpus/templates/content/server/lib/document-context.ts +76 -0
- package/corpus/templates/content/server/lib/public-documents.ts +3 -0
- package/corpus/templates/content/server/plugins/db.ts +6 -0
- package/corpus/templates/content/server/routes/api/document-agent-context.json.get.ts +5 -0
- package/corpus/templates/content/shared/api.ts +17 -0
- package/corpus/templates/content/shared/content-source.ts +7 -0
- package/corpus/templates/content/shared/properties.ts +2 -0
- package/dist/a2a/artifact-response.d.ts +15 -0
- package/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +204 -5
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +6 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +71 -8
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/integrations/a2a-continuation-processor.d.ts.map +1 -1
- package/dist/integrations/a2a-continuation-processor.js +72 -6
- package/dist/integrations/a2a-continuation-processor.js.map +1 -1
- package/dist/integrations/adapters/discord.d.ts.map +1 -1
- package/dist/integrations/adapters/discord.js +1 -0
- package/dist/integrations/adapters/discord.js.map +1 -1
- package/dist/integrations/adapters/email.d.ts.map +1 -1
- package/dist/integrations/adapters/email.js +2 -0
- package/dist/integrations/adapters/email.js.map +1 -1
- package/dist/integrations/adapters/google-docs.d.ts.map +1 -1
- package/dist/integrations/adapters/google-docs.js +2 -0
- package/dist/integrations/adapters/google-docs.js.map +1 -1
- package/dist/integrations/adapters/microsoft-teams.d.ts.map +1 -1
- package/dist/integrations/adapters/microsoft-teams.js +1 -0
- package/dist/integrations/adapters/microsoft-teams.js.map +1 -1
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +21 -6
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +11 -2
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/adapters/whatsapp.d.ts.map +1 -1
- package/dist/integrations/adapters/whatsapp.js +3 -0
- package/dist/integrations/adapters/whatsapp.js.map +1 -1
- package/dist/integrations/index.d.ts +1 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/types.d.ts +8 -2
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +40 -43
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +1 -0
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/docs/content/locales/ar-SA/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/de-DE/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/es-ES/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/fr-FR/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/hi-IN/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/ja-JP/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/ko-KR/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/pt-BR/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/zh-CN/pure-agent-apps.mdx +2 -2
- package/docs/content/locales/zh-TW/pure-agent-apps.mdx +2 -2
- package/docs/content/pure-agent-apps.mdx +58 -14
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ Edit local Markdown/MDX files, generate rich interactive custom blocks, and draf
|
|
|
91
91
|
|
|
92
92
|
<a href="https://agent-native.com/templates/analytics"><img src="https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F4933a80cc3134d7e874631f688be828a?format=webp&width=800" alt="Analytics app" width="100%" /></a>
|
|
93
93
|
|
|
94
|
-
**
|
|
94
|
+
**Open-Source Alternative to Amplitude and FullStory**
|
|
95
95
|
|
|
96
96
|
Connect analytics data sources, prompt for real charts, and build reusable dashboards.
|
|
97
97
|
|
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.101.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 70caa6f: Preserve participant-visible integration replies and verified artifact identities so threaded corrections can reliably target resources after renames.
|
|
8
|
+
|
|
9
|
+
## 0.101.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- dd47e0a: Clarify how to add a UI later while preserving a headless app's shared action and data contract.
|
|
14
|
+
|
|
3
15
|
## 0.101.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -68,9 +68,9 @@ Automation-first app هو Agent-Native app بلا متصفح من أجل schedul
|
|
|
68
68
|
|
|
69
69
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
70
70
|
|
|
71
|
-
## أضف
|
|
71
|
+
## أضف واجهة مستخدم لاحقاً {#add-chat-later}
|
|
72
72
|
|
|
73
|
-
يختار `--headless` السقالة الأولية فقط، ولا يوجد أمر `agent-native` يحوّل مشروعاً قائماً بلا واجهة إلى تطبيق
|
|
73
|
+
يختار `--headless` السقالة الأولية فقط، ولا يوجد أمر `agent-native` يحوّل مشروعاً قائماً بلا واجهة إلى تطبيق متصفح في مكانه. عندما يحتاج الأشخاص إلى واجهة مستخدم، استخدم [قالب Chat](/docs/template-chat) كمرجع للترحيل: احتفظ بالـ actions وبيانات SQL والتعليمات والمهارات، ثم أضف shell المتصفح وserver plugins. وإذا كانت الواجهة محادثة، أضف `<AgentChatSurface>` وplugin للدردشة يحمّل actions الحالية. تحقّق من `pnpm typecheck` ومن تدفق واجهة يستدعي action قائمة. استخدم `agent-native add` لمخططات التكامل، لا لهذا التحويل.
|
|
74
74
|
|
|
75
75
|
## ما هي الخطوة التالية
|
|
76
76
|
|
|
@@ -70,9 +70,9 @@ Die Box, das Gerüst, der Repo-Zugriff und die Lauffreigabe sind jetzt an einem
|
|
|
70
70
|
|
|
71
71
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## Später eine UI hinzufügen {#add-chat-later}
|
|
74
74
|
|
|
75
|
-
`--headless` wählt nur das anfängliche Scaffold; es gibt keinen `agent-native`-Befehl, der ein bestehendes action-only-Projekt direkt in eine
|
|
75
|
+
`--headless` wählt nur das anfängliche Scaffold; es gibt keinen `agent-native`-Befehl, der ein bestehendes action-only-Projekt direkt in eine Browser-App umwandelt. Wenn Menschen eine UI brauchen, nutze das [Chat-Template](/docs/template-chat) als Migrationsreferenz: Behalte Actions, SQL-Daten, Anweisungen und Skills bei und übernimm Browser-Shell und Server-Plugins. Für eine Chat-Oberfläche kommen `<AgentChatSurface>` und ein Chat-Plugin hinzu, das die vorhandenen Actions lädt. Prüfe `pnpm typecheck` und einen UI-Ablauf, der eine vorhandene Action aufruft. `agent-native add` ist für Integrations-Blaupausen gedacht, nicht für diese Umwandlung.
|
|
76
76
|
|
|
77
77
|
## Was kommt als nächstes
|
|
78
78
|
|
|
@@ -70,9 +70,9 @@ la caja, el andamio, el acceso al repositorio y el uso compartido de ejecuciones
|
|
|
70
70
|
|
|
71
71
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
72
72
|
|
|
73
|
-
## Añade
|
|
73
|
+
## Añade una UI más adelante {#add-chat-later}
|
|
74
74
|
|
|
75
|
-
`--headless` solo elige el scaffold inicial; no hay un comando de `agent-native` que convierta en el sitio un proyecto existente solo de acciones en una app de
|
|
75
|
+
`--headless` solo elige el scaffold inicial; no hay un comando de `agent-native` que convierta en el sitio un proyecto existente solo de acciones en una app de navegador. Cuando las personas necesiten una UI, usa la [plantilla Chat](/docs/template-chat) como referencia de migración: conserva las actions, los datos SQL, las instrucciones y las skills, y añade el shell del navegador y los plugins de servidor. Para una superficie de chat, añade `<AgentChatSurface>` y un plugin de chat que cargue las actions existentes. Comprueba `pnpm typecheck` y un flujo de UI que llame una action existente. `agent-native add` es para planos de integración, no para esta conversión.
|
|
76
76
|
|
|
77
77
|
## ¿Qué sigue?
|
|
78
78
|
|
|
@@ -68,9 +68,9 @@ la boîte, l'échafaudage, l'accès au dépôt et le partage d'exécution se tro
|
|
|
68
68
|
|
|
69
69
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
70
70
|
|
|
71
|
-
## Ajouter
|
|
71
|
+
## Ajouter une UI plus tard {#add-chat-later}
|
|
72
72
|
|
|
73
|
-
`--headless` choisit seulement le scaffold initial ; aucune commande `agent-native` ne convertit directement un projet existant fondé uniquement sur des actions en application
|
|
73
|
+
`--headless` choisit seulement le scaffold initial ; aucune commande `agent-native` ne convertit directement un projet existant fondé uniquement sur des actions en application navigateur. Quand les personnes ont besoin d'une UI, utilisez le [modèle Chat](/docs/template-chat) comme référence de migration : conservez les actions, les données SQL, les instructions et les skills, puis ajoutez le shell navigateur et les plugins serveur. Pour une surface de chat, ajoutez `<AgentChatSurface>` et un plugin de chat qui charge les actions existantes. Vérifiez `pnpm typecheck` et un flux UI appelant une action existante. `agent-native add` sert aux blueprints d'intégration, pas à cette conversion.
|
|
74
74
|
|
|
75
75
|
## Quelle est la prochaine étape
|
|
76
76
|
|
|
@@ -68,9 +68,9 @@ Automation-first app scheduled jobs, queues, scripts, integration workers और
|
|
|
68
68
|
|
|
69
69
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
70
70
|
|
|
71
|
-
## बाद में
|
|
71
|
+
## बाद में UI जोड़ें {#add-chat-later}
|
|
72
72
|
|
|
73
|
-
`--headless` केवल शुरुआती scaffold चुनता है; कोई `agent-native` command किसी मौजूदा action-only project को in-place
|
|
73
|
+
`--headless` केवल शुरुआती scaffold चुनता है; कोई `agent-native` command किसी मौजूदा action-only project को in-place browser app में नहीं बदलती। जब लोगों को UI चाहिए, [Chat template](/docs/template-chat) को migration reference की तरह उपयोग करें: actions, SQL data, instructions और skills रखें, फिर browser shell और server plugins जोड़ें। Chat surface के लिए `<AgentChatSurface>` और मौजूदा actions लोड करने वाला chat plugin भी जोड़ें। `pnpm typecheck` और एक ऐसा UI flow जाँचें जो किसी मौजूदा action को call करे। `agent-native add` integration blueprints के लिए है, इस conversion के लिए नहीं।
|
|
74
74
|
|
|
75
75
|
## आगे क्या है
|
|
76
76
|
|
|
@@ -68,9 +68,9 @@ Automation-first app は、scheduled jobs、queues、scripts、integration worke
|
|
|
68
68
|
|
|
69
69
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
70
70
|
|
|
71
|
-
##
|
|
71
|
+
## 後から UI を追加する {#add-chat-later}
|
|
72
72
|
|
|
73
|
-
`--headless` が選ぶのは初期 scaffold だけで、既存の action-only
|
|
73
|
+
`--headless` が選ぶのは初期 scaffold だけで、既存の action-only プロジェクトをその場でブラウザーアプリに変換する `agent-native` コマンドはありません。UI が必要になったら、移行の参照として [Chat template](/docs/template-chat) を使います。actions、SQL データ、instructions、skills は保持し、browser shell と server plugins を追加してください。チャット surface には `<AgentChatSurface>` と既存 actions を読み込む chat plugin も追加します。`pnpm typecheck` と既存 action を呼ぶ UI フローを確認します。`agent-native add` は integration blueprints 用であり、この変換用ではありません。
|
|
74
74
|
|
|
75
75
|
## 次は何ですか
|
|
76
76
|
|
|
@@ -66,9 +66,9 @@ Automation-first app은 scheduled jobs, queues, scripts, integration workers, ex
|
|
|
66
66
|
|
|
67
67
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
68
68
|
|
|
69
|
-
## 나중에
|
|
69
|
+
## 나중에 UI 추가하기 {#add-chat-later}
|
|
70
70
|
|
|
71
|
-
`--headless`는 초기 scaffold만 선택하며, 기존 action-only 프로젝트를 제자리에서
|
|
71
|
+
`--headless`는 초기 scaffold만 선택하며, 기존 action-only 프로젝트를 제자리에서 브라우저 앱으로 변환하는 `agent-native` 명령은 없습니다. UI가 필요해지면 [Chat 템플릿](/docs/template-chat)을 마이그레이션 기준으로 사용하세요. actions, SQL 데이터, instructions, skills를 유지하고 browser shell과 server plugins를 추가합니다. Chat surface에는 `<AgentChatSurface>`와 기존 actions를 로드하는 chat plugin도 추가합니다. `pnpm typecheck`와 기존 action을 호출하는 UI flow를 확인하세요. `agent-native add`는 이 변환이 아니라 integration blueprints용입니다.
|
|
72
72
|
|
|
73
73
|
## 다음 단계
|
|
74
74
|
|
|
@@ -68,9 +68,9 @@ a caixa, o scaffold, o acesso ao repositório e o compartilhamento de execução
|
|
|
68
68
|
|
|
69
69
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
70
70
|
|
|
71
|
-
## Adicione
|
|
71
|
+
## Adicione uma UI depois {#add-chat-later}
|
|
72
72
|
|
|
73
|
-
`--headless` escolhe somente o scaffold inicial; não há um comando `agent-native` que converta no lugar um projeto existente apenas com actions em um app de
|
|
73
|
+
`--headless` escolhe somente o scaffold inicial; não há um comando `agent-native` que converta no lugar um projeto existente apenas com actions em um app de navegador. Quando as pessoas precisarem de uma UI, use o [template Chat](/docs/template-chat) como referência de migração: mantenha as actions, os dados SQL, as instructions e as skills e adicione o shell do navegador e os server plugins. Para uma superfície de chat, adicione `<AgentChatSurface>` e um chat plugin que carregue as actions existentes. Verifique `pnpm typecheck` e um fluxo de UI que chame uma action existente. `agent-native add` é para integration blueprints, não para essa conversão.
|
|
74
74
|
|
|
75
75
|
## O que vem a seguir
|
|
76
76
|
|
|
@@ -66,9 +66,9 @@ Automation-first app 是无浏览器的 Agent-Native app,用于 scheduled jobs
|
|
|
66
66
|
|
|
67
67
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## 稍后添加 UI {#add-chat-later}
|
|
70
70
|
|
|
71
|
-
`--headless` 只选择初始 scaffold;没有可将现有仅 actions
|
|
71
|
+
`--headless` 只选择初始 scaffold;没有可将现有仅 actions 项目原地转换为浏览器应用的 `agent-native` 命令。当用户需要 UI 时,请将 [Chat 模板](/docs/template-chat) 用作迁移参考:保留 actions、SQL 数据、instructions 和 skills,并添加浏览器 shell 和 server plugins。对于聊天界面,再添加 `<AgentChatSurface>` 以及加载现有 actions 的 chat plugin。验证 `pnpm typecheck`,并完成一次调用现有 action 的 UI 流程。`agent-native add` 用于 integration blueprints,不用于此转换。
|
|
72
72
|
|
|
73
73
|
## 下一步是什么
|
|
74
74
|
|
|
@@ -66,9 +66,9 @@ Automation-first app 是無瀏覽器的 Agent-Native app,用於 scheduled jobs
|
|
|
66
66
|
|
|
67
67
|
→ [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## 稍後新增 UI {#add-chat-later}
|
|
70
70
|
|
|
71
|
-
`--headless` 只會選擇初始 scaffold;沒有可將現有僅 actions
|
|
71
|
+
`--headless` 只會選擇初始 scaffold;沒有可將現有僅 actions 專案原地轉換為瀏覽器應用程式的 `agent-native` 命令。當使用者需要 UI 時,請將 [Chat 範本](/docs/template-chat) 作為遷移參考:保留 actions、SQL 資料、instructions 和 skills,並新增瀏覽器 shell 與 server plugins。對於聊天介面,再新增 `<AgentChatSurface>` 與載入現有 actions 的 chat plugin。請驗證 `pnpm typecheck`,並完成一次呼叫現有 action 的 UI 流程。`agent-native add` 用於 integration blueprints,不用於此轉換。
|
|
72
72
|
|
|
73
73
|
## 下一步是什麼
|
|
74
74
|
|
|
@@ -95,22 +95,66 @@ The `--headless` flag only chooses the initial scaffold. It does not choose a
|
|
|
95
95
|
different architecture. You can later move the same `actions/`, instructions,
|
|
96
96
|
skills, and SQL state into a chat app or full application surface.
|
|
97
97
|
|
|
98
|
-
## Add
|
|
98
|
+
## Add a UI later {#add-chat-later}
|
|
99
99
|
|
|
100
100
|
`--headless` is not a permanent runtime mode, and there is no `agent-native`
|
|
101
|
-
command that converts an existing action-only project into a
|
|
102
|
-
When people need a
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
101
|
+
command that converts an existing action-only project into a browser app in
|
|
102
|
+
place. When people need a UI, use the [Chat template](/docs/template-chat) as
|
|
103
|
+
the migration reference and keep the durable action and database contract:
|
|
104
|
+
|
|
105
|
+
<Diagram id="doc-block-ui-later" title="One contract, multiple surfaces" summary={"Start with a headless workflow, then add a browser UI without rewriting the actions, data, instructions, or skills underneath."}>
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<div class="diagram-ui-path">
|
|
109
|
+
<div class="diagram-panel" data-rough>
|
|
110
|
+
<span class="diagram-pill accent">Start headless</span
|
|
111
|
+
><small class="diagram-muted">jobs · CLI · external agents</small>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
114
|
+
<div class="diagram-panel" data-rough>
|
|
115
|
+
<span class="diagram-pill">Add a UI</span
|
|
116
|
+
><small class="diagram-muted">chat · routes · durable pages</small>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
119
|
+
<div class="diagram-panel ok" data-rough>
|
|
120
|
+
<span class="diagram-pill ok">Keep the contract</span
|
|
121
|
+
><small class="diagram-muted">actions · SQL · instructions · skills</small>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```css
|
|
127
|
+
.diagram-ui-path {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
gap: 14px;
|
|
132
|
+
flex-wrap: wrap;
|
|
133
|
+
}
|
|
134
|
+
.diagram-ui-path .diagram-panel {
|
|
135
|
+
display: flex;
|
|
136
|
+
min-width: 150px;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 4px;
|
|
140
|
+
text-align: center;
|
|
141
|
+
}
|
|
142
|
+
.diagram-ui-path .diagram-arrow {
|
|
143
|
+
font-size: 22px;
|
|
144
|
+
line-height: 1;
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
</Diagram>
|
|
149
|
+
|
|
150
|
+
1. Scaffold the first workflow with `npx @agent-native/core@latest create my-agent --headless`.
|
|
151
|
+
2. When a browser surface becomes useful, bring in the template's shell, server
|
|
152
|
+
plugins, and UI dependencies. For chat, that includes `<AgentChatSurface>`
|
|
153
|
+
and an `agent-chat` plugin that loads the existing action registry.
|
|
154
|
+
3. Keep your action names, Zod schemas, SQL data, instructions, and skills. A
|
|
155
|
+
UI calls those same actions; it does not replace them.
|
|
156
|
+
4. Verify both surfaces with `pnpm typecheck`, `pnpm dev`, and one UI flow that
|
|
157
|
+
calls an existing action.
|
|
114
158
|
|
|
115
159
|
Use `agent-native add` for integration blueprints, not for this conversion.
|
|
116
160
|
Choose chat when people need conversational steering, approvals, or durable
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.101.
|
|
3
|
+
"version": "0.101.7",
|
|
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": {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
2
|
+
|
|
1
3
|
export interface A2AToolResultSummary {
|
|
2
4
|
tool: string;
|
|
3
5
|
result: string;
|
|
@@ -6,6 +8,121 @@ export interface A2AToolResultSummary {
|
|
|
6
8
|
export interface A2AArtifactResponseOptions {
|
|
7
9
|
baseUrl?: string;
|
|
8
10
|
includeReferencedArtifacts?: boolean;
|
|
11
|
+
includePersistedArtifactMarker?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface A2AArtifactIdentity {
|
|
15
|
+
resourceType:
|
|
16
|
+
| "document"
|
|
17
|
+
| "deck"
|
|
18
|
+
| "dashboard"
|
|
19
|
+
| "analysis"
|
|
20
|
+
| "image"
|
|
21
|
+
| "design"
|
|
22
|
+
| "monitor"
|
|
23
|
+
| "form";
|
|
24
|
+
id: string;
|
|
25
|
+
sourceAction: string;
|
|
26
|
+
titleAtAction?: string;
|
|
27
|
+
url?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const ARTIFACT_IDENTITY_WRITE_TOOLS = new Set([
|
|
31
|
+
"save-monitor",
|
|
32
|
+
"create-form",
|
|
33
|
+
"submit-content-database-form",
|
|
34
|
+
"add-database-item",
|
|
35
|
+
"create-document",
|
|
36
|
+
"update-document",
|
|
37
|
+
"create-deck",
|
|
38
|
+
"duplicate-deck",
|
|
39
|
+
"add-slide",
|
|
40
|
+
"update-dashboard",
|
|
41
|
+
"rename-dashboard",
|
|
42
|
+
"save-analysis",
|
|
43
|
+
"generate-image",
|
|
44
|
+
"edit-image",
|
|
45
|
+
"refine-image",
|
|
46
|
+
"restyle-image",
|
|
47
|
+
"save-generated-image",
|
|
48
|
+
"save-generated-asset",
|
|
49
|
+
"export-image",
|
|
50
|
+
"export-asset",
|
|
51
|
+
"generate-image-batch",
|
|
52
|
+
"create-design",
|
|
53
|
+
"generate-design",
|
|
54
|
+
"create-file",
|
|
55
|
+
"duplicate-design",
|
|
56
|
+
]);
|
|
57
|
+
|
|
58
|
+
const PERSISTED_ARTIFACT_MARKER = "agent-native:persisted-artifacts=";
|
|
59
|
+
const PERSISTED_ARTIFACT_MARKER_PATTERN =
|
|
60
|
+
/\s*<!--\s*agent-native:persisted-artifacts=[A-Za-z0-9_-]+\.[a-f0-9]{64}\s*-->/g;
|
|
61
|
+
const ARTIFACT_RESOURCE_TYPES = new Set<A2AArtifactIdentity["resourceType"]>([
|
|
62
|
+
"document",
|
|
63
|
+
"deck",
|
|
64
|
+
"dashboard",
|
|
65
|
+
"analysis",
|
|
66
|
+
"image",
|
|
67
|
+
"design",
|
|
68
|
+
"monitor",
|
|
69
|
+
"form",
|
|
70
|
+
]);
|
|
71
|
+
|
|
72
|
+
function persistedArtifactIdentitiesFromMarker(
|
|
73
|
+
result: string,
|
|
74
|
+
): A2AArtifactIdentity[] {
|
|
75
|
+
const secret = process.env.A2A_SECRET;
|
|
76
|
+
if (!secret) return [];
|
|
77
|
+
const match = result.match(
|
|
78
|
+
/<!--\s*agent-native:persisted-artifacts=([A-Za-z0-9_-]+)\.([a-f0-9]{64})\s*-->/,
|
|
79
|
+
);
|
|
80
|
+
if (!match) return [];
|
|
81
|
+
try {
|
|
82
|
+
const payload = match[1];
|
|
83
|
+
const expected = createHmac("sha256", secret).update(payload).digest();
|
|
84
|
+
const supplied = Buffer.from(match[2], "hex");
|
|
85
|
+
if (
|
|
86
|
+
supplied.length !== expected.length ||
|
|
87
|
+
!timingSafeEqual(supplied, expected)
|
|
88
|
+
) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
const parsed = JSON.parse(Buffer.from(payload, "base64url").toString());
|
|
92
|
+
if (!Array.isArray(parsed)) return [];
|
|
93
|
+
return parsed
|
|
94
|
+
.slice(0, 12)
|
|
95
|
+
.filter((identity): identity is A2AArtifactIdentity => {
|
|
96
|
+
const item = asRecord(identity);
|
|
97
|
+
return (
|
|
98
|
+
!!item &&
|
|
99
|
+
ARTIFACT_RESOURCE_TYPES.has(
|
|
100
|
+
item.resourceType as A2AArtifactIdentity["resourceType"],
|
|
101
|
+
) &&
|
|
102
|
+
typeof item.id === "string" &&
|
|
103
|
+
typeof item.sourceAction === "string"
|
|
104
|
+
);
|
|
105
|
+
});
|
|
106
|
+
} catch {
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function withPersistedArtifactMarker(
|
|
112
|
+
text: string,
|
|
113
|
+
toolResults: A2AToolResultSummary[],
|
|
114
|
+
): string {
|
|
115
|
+
const identities = extractA2AArtifactIdentities(toolResults).slice(0, 12);
|
|
116
|
+
const secret = process.env.A2A_SECRET;
|
|
117
|
+
if (identities.length === 0 || !secret) return text;
|
|
118
|
+
const payload = Buffer.from(JSON.stringify(identities)).toString("base64url");
|
|
119
|
+
const signature = createHmac("sha256", secret).update(payload).digest("hex");
|
|
120
|
+
const marker = `<!-- ${PERSISTED_ARTIFACT_MARKER}${payload}.${signature} -->`;
|
|
121
|
+
return text ? `${text}\n\n${marker}` : marker;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function stripA2APersistedArtifactMarkers(text: string): string {
|
|
125
|
+
return text.replace(PERSISTED_ARTIFACT_MARKER_PATTERN, "").trim();
|
|
9
126
|
}
|
|
10
127
|
|
|
11
128
|
interface CreatedDocumentArtifact {
|
|
@@ -617,15 +734,25 @@ function collectArtifacts(results: A2AToolResultSummary[]): {
|
|
|
617
734
|
|
|
618
735
|
if (
|
|
619
736
|
toolResult.tool === "generate-image" ||
|
|
737
|
+
toolResult.tool === "edit-image" ||
|
|
620
738
|
toolResult.tool === "refine-image" ||
|
|
739
|
+
toolResult.tool === "restyle-image" ||
|
|
621
740
|
toolResult.tool === "get-asset" ||
|
|
622
741
|
toolResult.tool === "save-generated-image" ||
|
|
742
|
+
toolResult.tool === "save-generated-asset" ||
|
|
623
743
|
toolResult.tool === "export-image"
|
|
624
744
|
) {
|
|
625
745
|
addImageArtifact(images, parsed);
|
|
626
746
|
continue;
|
|
627
747
|
}
|
|
628
748
|
|
|
749
|
+
if (toolResult.tool === "export-asset") {
|
|
750
|
+
if (stringValue(parsed.artifactType) === "image") {
|
|
751
|
+
addImageArtifact(images, parsed);
|
|
752
|
+
}
|
|
753
|
+
continue;
|
|
754
|
+
}
|
|
755
|
+
|
|
629
756
|
if (toolResult.tool === "generate-image-batch") {
|
|
630
757
|
if (Array.isArray(parsed.images)) {
|
|
631
758
|
for (const item of parsed.images) {
|
|
@@ -730,6 +857,114 @@ function collectArtifacts(results: A2AToolResultSummary[]): {
|
|
|
730
857
|
};
|
|
731
858
|
}
|
|
732
859
|
|
|
860
|
+
/**
|
|
861
|
+
* Extract a compact, verified identity ledger from successful artifact tools.
|
|
862
|
+
* The ledger deliberately excludes raw tool results so it is safe to retain in
|
|
863
|
+
* long-lived thread context and stable even when a resource is later renamed.
|
|
864
|
+
*/
|
|
865
|
+
export function extractA2AArtifactIdentities(
|
|
866
|
+
results: A2AToolResultSummary[],
|
|
867
|
+
): A2AArtifactIdentity[] {
|
|
868
|
+
const identities = new Map<string, A2AArtifactIdentity>();
|
|
869
|
+
|
|
870
|
+
const remember = (identity: A2AArtifactIdentity) => {
|
|
871
|
+
identities.set(`${identity.resourceType}:${identity.id}`, identity);
|
|
872
|
+
};
|
|
873
|
+
|
|
874
|
+
for (const result of results) {
|
|
875
|
+
if (result.tool === "call-agent") {
|
|
876
|
+
for (const identity of persistedArtifactIdentitiesFromMarker(
|
|
877
|
+
result.result,
|
|
878
|
+
)) {
|
|
879
|
+
remember({ ...identity, sourceAction: "call-agent" });
|
|
880
|
+
}
|
|
881
|
+
continue;
|
|
882
|
+
}
|
|
883
|
+
if (!ARTIFACT_IDENTITY_WRITE_TOOLS.has(result.tool)) continue;
|
|
884
|
+
const artifacts = collectArtifacts([result]);
|
|
885
|
+
for (const document of artifacts.documents) {
|
|
886
|
+
remember({
|
|
887
|
+
resourceType: "document",
|
|
888
|
+
id: document.id,
|
|
889
|
+
sourceAction: result.tool,
|
|
890
|
+
titleAtAction: document.title,
|
|
891
|
+
url: document.url,
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
for (const deck of artifacts.decks) {
|
|
895
|
+
remember({
|
|
896
|
+
resourceType: "deck",
|
|
897
|
+
id: deck.id,
|
|
898
|
+
sourceAction: result.tool,
|
|
899
|
+
url: deck.url,
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
for (const dashboard of artifacts.dashboards) {
|
|
903
|
+
remember({
|
|
904
|
+
resourceType: "dashboard",
|
|
905
|
+
id: dashboard.id,
|
|
906
|
+
sourceAction: result.tool,
|
|
907
|
+
titleAtAction: dashboard.title,
|
|
908
|
+
url: dashboard.url,
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
for (const analysis of artifacts.analyses) {
|
|
912
|
+
remember({
|
|
913
|
+
resourceType: "analysis",
|
|
914
|
+
id: analysis.id,
|
|
915
|
+
sourceAction: result.tool,
|
|
916
|
+
titleAtAction: analysis.title,
|
|
917
|
+
url: analysis.url,
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
for (const image of artifacts.images) {
|
|
921
|
+
remember({
|
|
922
|
+
resourceType: "image",
|
|
923
|
+
id: image.id,
|
|
924
|
+
sourceAction: result.tool,
|
|
925
|
+
titleAtAction: image.title,
|
|
926
|
+
url: image.url,
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
for (const design of artifacts.designShells) {
|
|
930
|
+
remember({
|
|
931
|
+
resourceType: "design",
|
|
932
|
+
id: design.id,
|
|
933
|
+
sourceAction: result.tool,
|
|
934
|
+
titleAtAction: design.title,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
for (const design of artifacts.generatedDesigns) {
|
|
938
|
+
remember({
|
|
939
|
+
resourceType: "design",
|
|
940
|
+
id: design.id,
|
|
941
|
+
sourceAction: result.tool,
|
|
942
|
+
url: design.url,
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
for (const monitor of artifacts.monitors) {
|
|
946
|
+
remember({
|
|
947
|
+
resourceType: "monitor",
|
|
948
|
+
id: monitor.id,
|
|
949
|
+
sourceAction: result.tool,
|
|
950
|
+
titleAtAction: monitor.name,
|
|
951
|
+
url: monitor.url,
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
for (const form of artifacts.forms) {
|
|
955
|
+
remember({
|
|
956
|
+
resourceType: "form",
|
|
957
|
+
id: form.id,
|
|
958
|
+
sourceAction: result.tool,
|
|
959
|
+
titleAtAction: form.title,
|
|
960
|
+
url: form.url,
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
return [...identities.values()];
|
|
966
|
+
}
|
|
967
|
+
|
|
733
968
|
type DownstreamArtifact =
|
|
734
969
|
| { kind: "deck"; id: string; url: string }
|
|
735
970
|
| { kind: "document"; id: string; url: string; title?: string }
|
|
@@ -1131,6 +1366,10 @@ export function appendA2AArtifactLinks(
|
|
|
1131
1366
|
const baseUrl = normalizeBaseUrl(options.baseUrl);
|
|
1132
1367
|
const includeReferencedArtifacts =
|
|
1133
1368
|
options.includeReferencedArtifacts ?? false;
|
|
1369
|
+
const finalize = (value: string) =>
|
|
1370
|
+
options.includePersistedArtifactMarker
|
|
1371
|
+
? withPersistedArtifactMarker(value, toolResults)
|
|
1372
|
+
: value;
|
|
1134
1373
|
const {
|
|
1135
1374
|
documents,
|
|
1136
1375
|
decks,
|
|
@@ -1160,7 +1399,7 @@ export function appendA2AArtifactLinks(
|
|
|
1160
1399
|
) ||
|
|
1161
1400
|
/\b(?:done|created|ready|here(?:'s| is)|complete|finished)\b/i.test(text))
|
|
1162
1401
|
) {
|
|
1163
|
-
return formatIncompleteDesignMessage(incompleteShells);
|
|
1402
|
+
return finalize(formatIncompleteDesignMessage(incompleteShells));
|
|
1164
1403
|
}
|
|
1165
1404
|
|
|
1166
1405
|
const unverifiedRefs = findUnverifiedArtifactReferences(
|
|
@@ -1174,15 +1413,17 @@ export function appendA2AArtifactLinks(
|
|
|
1174
1413
|
generatedDesigns,
|
|
1175
1414
|
);
|
|
1176
1415
|
if (unverifiedRefs.length > 0) {
|
|
1177
|
-
return
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1416
|
+
return finalize(
|
|
1417
|
+
formatUnverifiedArtifactMessage(
|
|
1418
|
+
unverifiedRefs,
|
|
1419
|
+
documents,
|
|
1420
|
+
decks,
|
|
1421
|
+
dashboards,
|
|
1422
|
+
analyses,
|
|
1423
|
+
images,
|
|
1424
|
+
generatedDesigns,
|
|
1425
|
+
baseUrl,
|
|
1426
|
+
),
|
|
1186
1427
|
);
|
|
1187
1428
|
}
|
|
1188
1429
|
|
|
@@ -1258,9 +1499,11 @@ export function appendA2AArtifactLinks(
|
|
|
1258
1499
|
}
|
|
1259
1500
|
}
|
|
1260
1501
|
|
|
1261
|
-
if (missingLines.length === 0)
|
|
1502
|
+
if (missingLines.length === 0) {
|
|
1503
|
+
return finalize(text);
|
|
1504
|
+
}
|
|
1262
1505
|
const artifactBlock = `Artifacts:\n${missingLines.join("\n")}`;
|
|
1263
|
-
return text ? `${text}\n\n${artifactBlock}` : artifactBlock;
|
|
1506
|
+
return finalize(text ? `${text}\n\n${artifactBlock}` : artifactBlock);
|
|
1264
1507
|
}
|
|
1265
1508
|
|
|
1266
1509
|
export function buildA2ARecoverableArtifactMessage(
|