@agent-native/core 0.126.0 → 0.127.3

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.
Files changed (181) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +83 -0
  3. package/corpus/core/docs/content/external-agents-catalog.mdx +14 -11
  4. package/corpus/core/docs/content/mcp-protocol.mdx +9 -4
  5. package/corpus/core/package.json +1 -1
  6. package/corpus/core/src/a2a/index.ts +2 -0
  7. package/corpus/core/src/agent/production-agent.ts +6 -1
  8. package/corpus/core/src/agent/run-manager.ts +37 -0
  9. package/corpus/core/src/agent/run-store.ts +18 -0
  10. package/corpus/core/src/cli/template-sync.ts +96 -0
  11. package/corpus/core/src/client/MultiTabAssistantChat.tsx +75 -43
  12. package/corpus/core/src/client/agent-chat.ts +19 -1
  13. package/corpus/core/src/client/chat/tool-call-display.tsx +25 -0
  14. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +23 -0
  15. package/corpus/core/src/client/settings/AgentsSection.tsx +565 -71
  16. package/corpus/core/src/client/settings/SecretsSection.tsx +71 -36
  17. package/corpus/core/src/client/use-chat-models.ts +54 -37
  18. package/corpus/core/src/localization/default-messages.ts +11 -0
  19. package/corpus/core/src/mcp/ask-app-task-handle.ts +183 -0
  20. package/corpus/core/src/mcp/builtin-tools.ts +146 -34
  21. package/corpus/core/src/server/agent-capabilities.ts +8 -1
  22. package/corpus/core/src/server/agent-chat-plugin.ts +17 -0
  23. package/corpus/core/src/server/agent-discovery.ts +1 -1
  24. package/corpus/core/src/server/agent-peer-probe.ts +133 -0
  25. package/corpus/core/src/server/builder-design-systems.ts +1 -1
  26. package/corpus/core/src/server/core-routes-plugin.ts +67 -0
  27. package/corpus/core/src/shared/mcp-embed-headers.ts +4 -0
  28. package/corpus/core/src/templates/chat/_gitignore +2 -0
  29. package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +159 -119
  30. package/corpus/templates/chat/_gitignore +2 -0
  31. package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +23 -0
  32. package/corpus/templates/design/actions/create-file.ts +15 -0
  33. package/corpus/templates/design/actions/generate-design.ts +40 -0
  34. package/corpus/templates/design/actions/present-design-variants.ts +16 -0
  35. package/corpus/templates/design/app/hooks/use-question-flow.ts +21 -1
  36. package/corpus/templates/design/app/pages/design-editor/save-failure.ts +7 -1
  37. package/corpus/templates/design/changelog/2026-07-28-generated-designs-with-malformed-html-are-now-rejected-at-sa.md +6 -0
  38. package/corpus/templates/design/changelog/2026-07-28-the-model-you-pick-when-starting-a-new-design-is-now-used-fo.md +6 -0
  39. package/corpus/templates/design/server/source-workspace.ts +1 -0
  40. package/corpus/templates/design/shared/html-integrity.ts +608 -18
  41. package/corpus/templates/dispatch/changelog/2026-07-28-pending-apps-are-hidden-by-default-and-app-ownership-details.md +6 -0
  42. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -6
  43. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +5 -1
  44. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +5 -0
  45. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +31 -8
  46. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +15 -0
  47. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +78 -8
  48. package/corpus/templates/slides/app/components/presentation/PresenterView.tsx +179 -0
  49. package/corpus/templates/slides/app/components/presentation/present-channel.ts +15 -0
  50. package/corpus/templates/slides/app/i18n/en-US.ts +10 -1
  51. package/corpus/templates/slides/app/lib/export-google-slides-client.ts +67 -0
  52. package/corpus/templates/slides/app/lib/export-pptx-client.ts +16 -3
  53. package/corpus/templates/slides/app/pages/DeckEditor.tsx +11 -0
  54. package/corpus/templates/slides/app/pages/Presentation.tsx +11 -3
  55. package/corpus/templates/slides/changelog/2026-07-28-export-to-google-slides-now-creates-the-deck-directly-in-you.md +6 -0
  56. package/corpus/templates/slides/changelog/2026-07-28-opening-a-presentation-link-directly-no-longer-bounces-back-.md +6 -0
  57. package/corpus/templates/slides/changelog/2026-07-28-presenter-view-open-a-second-window-while-presenting-to-see-.md +6 -0
  58. package/corpus/templates/slides/server/routes/api/exports/google-slides.post.ts +90 -0
  59. package/corpus/toolkit/CHANGELOG.md +6 -0
  60. package/corpus/toolkit/package.json +1 -1
  61. package/corpus/toolkit/src/composer/TiptapComposer.tsx +143 -111
  62. package/corpus/toolkit/src/composer/runtime-adapters.tsx +2 -0
  63. package/dist/a2a/index.d.ts +2 -0
  64. package/dist/a2a/index.d.ts.map +1 -1
  65. package/dist/a2a/index.js +1 -0
  66. package/dist/a2a/index.js.map +1 -1
  67. package/dist/agent/production-agent.d.ts +2 -2
  68. package/dist/agent/production-agent.d.ts.map +1 -1
  69. package/dist/agent/production-agent.js +6 -3
  70. package/dist/agent/production-agent.js.map +1 -1
  71. package/dist/agent/run-manager.d.ts +11 -0
  72. package/dist/agent/run-manager.d.ts.map +1 -1
  73. package/dist/agent/run-manager.js +34 -1
  74. package/dist/agent/run-manager.js.map +1 -1
  75. package/dist/agent/run-store.d.ts +8 -0
  76. package/dist/agent/run-store.d.ts.map +1 -1
  77. package/dist/agent/run-store.js +16 -0
  78. package/dist/agent/run-store.js.map +1 -1
  79. package/dist/cli/template-sync.d.ts.map +1 -1
  80. package/dist/cli/template-sync.js +88 -0
  81. package/dist/cli/template-sync.js.map +1 -1
  82. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  83. package/dist/client/MultiTabAssistantChat.js +60 -31
  84. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  85. package/dist/client/agent-chat.d.ts +6 -0
  86. package/dist/client/agent-chat.d.ts.map +1 -1
  87. package/dist/client/agent-chat.js +13 -1
  88. package/dist/client/agent-chat.js.map +1 -1
  89. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  90. package/dist/client/chat/tool-call-display.js +14 -0
  91. package/dist/client/chat/tool-call-display.js.map +1 -1
  92. package/dist/client/resources/mcp-integration-catalog.d.ts +6 -0
  93. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  94. package/dist/client/resources/mcp-integration-catalog.js +16 -0
  95. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  96. package/dist/client/settings/AgentsSection.d.ts.map +1 -1
  97. package/dist/client/settings/AgentsSection.js +250 -30
  98. package/dist/client/settings/AgentsSection.js.map +1 -1
  99. package/dist/client/settings/SecretsSection.d.ts.map +1 -1
  100. package/dist/client/settings/SecretsSection.js +16 -2
  101. package/dist/client/settings/SecretsSection.js.map +1 -1
  102. package/dist/client/use-chat-models.d.ts.map +1 -1
  103. package/dist/client/use-chat-models.js +46 -27
  104. package/dist/client/use-chat-models.js.map +1 -1
  105. package/dist/collab/routes.d.ts +2 -2
  106. package/dist/collab/struct-routes.d.ts +1 -1
  107. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  108. package/dist/localization/default-messages.d.ts +9 -0
  109. package/dist/localization/default-messages.d.ts.map +1 -1
  110. package/dist/localization/default-messages.js +9 -0
  111. package/dist/localization/default-messages.js.map +1 -1
  112. package/dist/mcp/ask-app-task-handle.d.ts +25 -0
  113. package/dist/mcp/ask-app-task-handle.d.ts.map +1 -0
  114. package/dist/mcp/ask-app-task-handle.js +136 -0
  115. package/dist/mcp/ask-app-task-handle.js.map +1 -0
  116. package/dist/mcp/builtin-tools.d.ts +3 -3
  117. package/dist/mcp/builtin-tools.d.ts.map +1 -1
  118. package/dist/mcp/builtin-tools.js +115 -38
  119. package/dist/mcp/builtin-tools.js.map +1 -1
  120. package/dist/observability/routes.d.ts +3 -3
  121. package/dist/progress/routes.d.ts +1 -1
  122. package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
  123. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  124. package/dist/resources/handlers.d.ts +1 -1
  125. package/dist/secrets/routes.d.ts +9 -9
  126. package/dist/server/agent-capabilities.d.ts +7 -1
  127. package/dist/server/agent-capabilities.d.ts.map +1 -1
  128. package/dist/server/agent-capabilities.js +1 -0
  129. package/dist/server/agent-capabilities.js.map +1 -1
  130. package/dist/server/agent-chat-plugin.d.ts +7 -0
  131. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  132. package/dist/server/agent-chat-plugin.js +16 -1
  133. package/dist/server/agent-chat-plugin.js.map +1 -1
  134. package/dist/server/agent-discovery.d.ts +1 -0
  135. package/dist/server/agent-discovery.d.ts.map +1 -1
  136. package/dist/server/agent-discovery.js +1 -1
  137. package/dist/server/agent-discovery.js.map +1 -1
  138. package/dist/server/agent-peer-probe.d.ts +37 -0
  139. package/dist/server/agent-peer-probe.d.ts.map +1 -0
  140. package/dist/server/agent-peer-probe.js +90 -0
  141. package/dist/server/agent-peer-probe.js.map +1 -0
  142. package/dist/server/builder-design-systems.js +1 -1
  143. package/dist/server/builder-design-systems.js.map +1 -1
  144. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  145. package/dist/server/core-routes-plugin.js +53 -0
  146. package/dist/server/core-routes-plugin.js.map +1 -1
  147. package/dist/server/realtime-token.d.ts +1 -1
  148. package/dist/server/transcribe-voice.d.ts +1 -1
  149. package/dist/shared/mcp-embed-headers.d.ts +1 -0
  150. package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
  151. package/dist/shared/mcp-embed-headers.js +4 -0
  152. package/dist/shared/mcp-embed-headers.js.map +1 -1
  153. package/dist/templates/chat/_gitignore +2 -0
  154. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +159 -119
  155. package/docs/content/external-agents-catalog.mdx +14 -11
  156. package/docs/content/mcp-protocol.mdx +9 -4
  157. package/package.json +2 -2
  158. package/src/a2a/index.ts +2 -0
  159. package/src/agent/production-agent.ts +6 -1
  160. package/src/agent/run-manager.ts +37 -0
  161. package/src/agent/run-store.ts +18 -0
  162. package/src/cli/template-sync.ts +96 -0
  163. package/src/client/MultiTabAssistantChat.tsx +75 -43
  164. package/src/client/agent-chat.ts +19 -1
  165. package/src/client/chat/tool-call-display.tsx +25 -0
  166. package/src/client/resources/mcp-integration-catalog.ts +23 -0
  167. package/src/client/settings/AgentsSection.tsx +565 -71
  168. package/src/client/settings/SecretsSection.tsx +71 -36
  169. package/src/client/use-chat-models.ts +54 -37
  170. package/src/localization/default-messages.ts +11 -0
  171. package/src/mcp/ask-app-task-handle.ts +183 -0
  172. package/src/mcp/builtin-tools.ts +146 -34
  173. package/src/server/agent-capabilities.ts +8 -1
  174. package/src/server/agent-chat-plugin.ts +17 -0
  175. package/src/server/agent-discovery.ts +1 -1
  176. package/src/server/agent-peer-probe.ts +133 -0
  177. package/src/server/builder-design-systems.ts +1 -1
  178. package/src/server/core-routes-plugin.ts +67 -0
  179. package/src/shared/mcp-embed-headers.ts +4 -0
  180. package/src/templates/chat/_gitignore +2 -0
  181. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +159 -119
@@ -3,14 +3,28 @@ import {
3
3
  useGuidedQuestionFlow,
4
4
  type GuidedQuestionAnswers,
5
5
  } from "@agent-native/core/client/agent-chat";
6
+ import { type PromptComposerSubmitOptions } from "@agent-native/core/client/composer";
6
7
  import { useCallback } from "react";
7
8
 
8
9
  import { sendToDesignAgentChat } from "@/lib/agent-chat";
9
10
 
11
+ export interface QuestionFlowModelSelection {
12
+ model?: string;
13
+ engine?: string;
14
+ effort?: PromptComposerSubmitOptions["effort"];
15
+ }
16
+
10
17
  interface UseQuestionFlowOptions {
11
18
  enabled?: boolean;
12
19
  continuationTabId?: string | null;
13
20
  onContinue?: (tabId: string) => void;
21
+ /**
22
+ * The model this generation started with, read AT SEND TIME. The continuation
23
+ * is the turn that generates and it opens a fresh thread, which has no
24
+ * override to inherit. A getter, not a value: the caller's source is a ref
25
+ * filled after render, so a snapshot taken here would be the pre-kickoff one.
26
+ */
27
+ getModelSelection?: () => QuestionFlowModelSelection | null | undefined;
14
28
  }
15
29
 
16
30
  function designQuestionsStateKey(designId: string | undefined): string {
@@ -32,6 +46,7 @@ export function useQuestionFlow(
32
46
  enabled = true,
33
47
  continuationTabId,
34
48
  onContinue,
49
+ getModelSelection,
35
50
  }: UseQuestionFlowOptions = {},
36
51
  ) {
37
52
  const stateKey = designQuestionsStateKey(designId);
@@ -65,6 +80,8 @@ export function useQuestionFlow(
65
80
 
66
81
  const sendContinuation = useCallback(
67
82
  (message: string, context?: string) => {
83
+ const selection = getModelSelection?.() ?? {};
84
+ const { model, engine, effort } = selection;
68
85
  // Always request `newTab` (mirroring useAgentGenerating.submit's
69
86
  // default). Without it, when there is no continuationTabId yet the
70
87
  // message goes to whatever tab is currently active, but the id we
@@ -83,11 +100,14 @@ export function useQuestionFlow(
83
100
  submit: true,
84
101
  newTab: true,
85
102
  ...(continuationTabId ? { tabId: continuationTabId } : {}),
103
+ ...(model ? { model } : {}),
104
+ ...(engine ? { engine } : {}),
105
+ ...(effort ? { effort } : {}),
86
106
  });
87
107
  onContinue?.(tabId);
88
108
  flow.clear();
89
109
  },
90
- [continuationTabId, flow, onContinue],
110
+ [continuationTabId, designId, flow, getModelSelection, onContinue],
91
111
  );
92
112
 
93
113
  const handleSubmit = useCallback(
@@ -1,4 +1,7 @@
1
- import { isDesignHtmlIntegrityError } from "@shared/html-integrity";
1
+ import {
2
+ DESIGN_HTML_INTEGRITY_SUMMARY,
3
+ isDesignHtmlIntegrityError,
4
+ } from "@shared/html-integrity";
2
5
 
3
6
  export type DesignSaveFailureKind =
4
7
  | "offline"
@@ -14,6 +17,9 @@ function errorField(error: unknown, field: string): unknown {
14
17
  }
15
18
 
16
19
  export function designSaveErrorMessage(error: unknown): string | null {
20
+ // Integrity errors carry located, agent-facing guidance in `message`. Toasts
21
+ // get the summary instead; the two audiences need different text.
22
+ if (isDesignHtmlIntegrityError(error)) return DESIGN_HTML_INTEGRITY_SUMMARY;
17
23
  const message = errorField(error, "message");
18
24
  if (typeof message !== "string" || !message.trim()) return null;
19
25
  return message.replace(/^DESIGN_HTML_INTEGRITY:\s*/, "");
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-28
4
+ ---
5
+
6
+ Generated designs with malformed HTML are now rejected at save with the exact line and character to fix, instead of persisting and rendering broken.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-28
4
+ ---
5
+
6
+ The model you pick when starting a new design is now used for the design's first generation turn instead of falling back to the default model.
@@ -361,6 +361,7 @@ export async function writeInlineSourceFile(args: {
361
361
  previousContent: current.content,
362
362
  nextContent: args.content,
363
363
  fileType: currentFile.fileType ?? args.file.fileType ?? "html",
364
+ filename: currentFile.filename ?? args.file.filename,
364
365
  });
365
366
 
366
367
  if (await hasCollabState(args.file.id)) {