@agent-native/core 0.182.1 → 0.182.2-nightly-20260917210345

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 (66) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/clips/app/root.tsx +59 -10
  3. package/corpus/templates/clips/changelog/2026-09-17-desktop-popover-closes-when-clicking-away.md +6 -0
  4. package/corpus/templates/clips/changelog/2026-09-17-self-hosted-extension-sign-in.md +6 -0
  5. package/corpus/templates/clips/chrome-extension/src/background.ts +45 -25
  6. package/corpus/templates/clips/chrome-extension/src/content-script.ts +43 -0
  7. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +55 -6
  8. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +1 -0
  9. package/corpus/templates/design/actions/add-localhost-screens.ts +54 -22
  10. package/corpus/templates/design/actions/apply-visual-edit.ts +1 -0
  11. package/corpus/templates/design/actions/create-design-from-template.ts +50 -35
  12. package/corpus/templates/design/actions/create-design-version.ts +21 -0
  13. package/corpus/templates/design/actions/create-file.ts +35 -33
  14. package/corpus/templates/design/actions/delete-design.ts +29 -28
  15. package/corpus/templates/design/actions/delete-file.ts +154 -23
  16. package/corpus/templates/design/actions/generate-design.ts +28 -16
  17. package/corpus/templates/design/actions/get-component-details.ts +187 -33
  18. package/corpus/templates/design/actions/get-design-version.ts +9 -1
  19. package/corpus/templates/design/actions/go-to-main-component.ts +37 -35
  20. package/corpus/templates/design/actions/index-components.ts +241 -126
  21. package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +12 -9
  22. package/corpus/templates/design/actions/present-design-variants.ts +68 -72
  23. package/corpus/templates/design/actions/rename-component.ts +294 -0
  24. package/corpus/templates/design/actions/rename-screen.ts +10 -10
  25. package/corpus/templates/design/actions/update-file.ts +327 -330
  26. package/corpus/templates/design/actions/update-screen-source.ts +2 -43
  27. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +1 -0
  28. package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +8 -1
  29. package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +55 -33
  30. package/corpus/templates/design/app/components/design/code-workbench/workspace/create-providers.ts +2 -0
  31. package/corpus/templates/design/app/components/design/code-workbench/workspace/inline-provider.ts +4 -2
  32. package/corpus/templates/design/app/components/design/edit-panel/element-classification.ts +5 -1
  33. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +57 -9
  34. package/corpus/templates/design/app/components/design/types.ts +1 -0
  35. package/corpus/templates/design/app/hooks/use-design-versions.ts +3 -2
  36. package/corpus/templates/design/app/i18n-breakpoints.ts +0 -110
  37. package/corpus/templates/design/app/i18n-data.ts +0 -10
  38. package/corpus/templates/design/app/pages/DesignEditor.tsx +250 -107
  39. package/corpus/templates/design/app/pages/design-editor/commands/apply-file-content-update.ts +2 -0
  40. package/corpus/templates/design/app/pages/design-editor/commands/delete-files.ts +69 -47
  41. package/corpus/templates/design/app/pages/design-editor/commands/redo.ts +8 -1
  42. package/corpus/templates/design/app/pages/design-editor/commands/save-file-content.ts +107 -2
  43. package/corpus/templates/design/app/pages/design-editor/commands/undo.ts +26 -1
  44. package/corpus/templates/design/app/pages/design-editor/editor-state.ts +63 -2
  45. package/corpus/templates/design/app/pages/design-editor/nudge-intent.ts +74 -22
  46. package/corpus/templates/design/app/pages/design-editor/source-publication.ts +14 -2
  47. package/corpus/templates/design/changelog/2026-09-16-design-components-retain-linked-identities-when-edited-and-d.md +6 -0
  48. package/corpus/templates/design/changelog/2026-09-17-screen-deletion-is-immediate-and-undoable-with-history-that-.md +6 -0
  49. package/corpus/templates/design/e2e/fixtures/design-component-react/index.html +98 -0
  50. package/corpus/templates/design/e2e/fixtures/design-component-react/inline-component.html +65 -0
  51. package/corpus/templates/design/server/lib/design-data-mutation.ts +9 -5
  52. package/corpus/templates/design/server/lib/design-snapshot.ts +28 -16
  53. package/corpus/templates/design/server/lib/design-versions.ts +208 -130
  54. package/corpus/templates/design/server/lib/fusion-screens.ts +46 -20
  55. package/corpus/templates/design/server/lib/import-design-files.ts +5 -1
  56. package/corpus/templates/design/server/lib/localhost-connection.ts +54 -0
  57. package/corpus/templates/design/server/source-workspace.ts +412 -356
  58. package/corpus/templates/design/shared/component-library.ts +36 -6
  59. package/corpus/templates/design/shared/component-model.ts +8 -2
  60. package/dist/automation/index.d.ts +1 -1
  61. package/dist/client/chat/agentkit-protocol.js +148 -34
  62. package/dist/collab/struct-routes.d.ts +1 -1
  63. package/dist/progress/routes.d.ts +1 -1
  64. package/dist/server/core-routes-plugin.d.ts +1 -1
  65. package/package.json +4 -4
  66. package/corpus/templates/design/app/components/design/editor/PendingScreenDeletionDialog.tsx +0 -66
@@ -22,7 +22,11 @@ import {
22
22
  buildCodeLayerProjection,
23
23
  type CodeLayerSource,
24
24
  } from "./code-layer.js";
25
- import { componentNameFor, isComponentInstance } from "./component-model.js";
25
+ import {
26
+ COMPONENT_ID_ATTR,
27
+ COMPONENT_REF_ATTR,
28
+ componentNameFor,
29
+ } from "./component-model.js";
26
30
 
27
31
  export interface ComponentLibraryFile {
28
32
  id: string;
@@ -34,6 +38,10 @@ export interface ComponentLibraryFile {
34
38
  export interface ComponentLibraryEntry {
35
39
  /** Component name from `data-agent-native-component`. */
36
40
  name: string;
41
+ /** Opaque id on a canonical component root, when present. */
42
+ componentId?: string;
43
+ /** Opaque id referenced by a linked component instance, when present. */
44
+ componentRef?: string;
37
45
  fileId: string;
38
46
  filename: string;
39
47
  /** `data-agent-native-node-id` (or fallback) of the instance root. */
@@ -50,7 +58,12 @@ export interface ComponentLibraryEntry {
50
58
  export function scanComponentLibrary(
51
59
  files: ComponentLibraryFile[],
52
60
  ): ComponentLibraryEntry[] {
53
- const entries: ComponentLibraryEntry[] = [];
61
+ const entries: Array<
62
+ Omit<ComponentLibraryEntry, "name"> & {
63
+ name?: string;
64
+ }
65
+ > = [];
66
+ const namesByIdentity = new Map<string, string>();
54
67
 
55
68
  for (const file of files) {
56
69
  const html = file.content ?? "";
@@ -68,9 +81,15 @@ export function scanComponentLibrary(
68
81
  });
69
82
 
70
83
  for (const node of projection.nodes) {
71
- if (!isComponentInstance(node)) continue;
72
- const name = componentNameFor(node);
73
- if (!name) continue;
84
+ const name = componentNameFor(node) ?? undefined;
85
+ const componentId =
86
+ node.dataAttributes[COMPONENT_ID_ATTR]?.trim() || undefined;
87
+ const componentRef =
88
+ node.dataAttributes[COMPONENT_REF_ATTR]?.trim() || undefined;
89
+ if (!name && !componentId && !componentRef) continue;
90
+
91
+ if (name && componentId) namesByIdentity.set(componentId, name);
92
+ if (name && componentRef) namesByIdentity.set(componentRef, name);
74
93
 
75
94
  // `node.id` is an ephemeral id scoped to this one projection call — it
76
95
  // is NOT the same as the durable `data-agent-native-node-id` attribute
@@ -85,6 +104,8 @@ export function scanComponentLibrary(
85
104
 
86
105
  entries.push({
87
106
  name,
107
+ componentId,
108
+ componentRef,
88
109
  fileId: file.id,
89
110
  filename: file.filename,
90
111
  nodeId,
@@ -93,7 +114,16 @@ export function scanComponentLibrary(
93
114
  }
94
115
  }
95
116
 
96
- return entries;
117
+ return entries.flatMap((entry) => {
118
+ const name =
119
+ entry.name ??
120
+ (entry.componentRef
121
+ ? namesByIdentity.get(entry.componentRef)
122
+ : entry.componentId
123
+ ? namesByIdentity.get(entry.componentId)
124
+ : undefined);
125
+ return name ? [{ ...entry, name }] : [];
126
+ });
97
127
  }
98
128
 
99
129
  /**
@@ -44,6 +44,10 @@ export const COMPONENT_OVERRIDES_ATTR = "data-agent-native-component-overrides";
44
44
  /** Prefix for simple prop attributes stamped next to the component root. */
45
45
  export const COMPONENT_PROP_PREFIX = "data-agent-native-prop-";
46
46
 
47
+ export function componentIndexId(designId: string, name: string): string {
48
+ return `ci_${designId}_${name.toLowerCase().replace(/[^a-z0-9]/g, "_")}`;
49
+ }
50
+
47
51
  // ─── Extracted prop value ─────────────────────────────────────────────────────
48
52
 
49
53
  export interface ComponentPropValue {
@@ -228,14 +232,16 @@ export function instanceFromNode(
228
232
  const alpineDataRaw = node.attributes["x-data"];
229
233
  const alpineData =
230
234
  typeof alpineDataRaw === "string" ? alpineDataRaw : undefined;
235
+ const stableNodeId =
236
+ node.dataAttributes["data-agent-native-node-id"]?.trim() || node.id;
231
237
 
232
238
  return {
233
- instanceId: node.id,
239
+ instanceId: stableNodeId,
234
240
  name,
235
241
  props: extractProps(node),
236
242
  alpineData,
237
243
  selector: node.selector,
238
- nodeId: node.id,
244
+ nodeId: stableNodeId,
239
245
  componentIndexId,
240
246
  componentId: node.dataAttributes[COMPONENT_ID_ATTR]?.trim() || undefined,
241
247
  componentRef: node.dataAttributes[COMPONENT_REF_ATTR]?.trim() || undefined,
@@ -186,8 +186,8 @@ export declare function createAutomationCallbackHandler(runtime: AutomationRunti
186
186
  duplicate?: undefined;
187
187
  eventId?: undefined;
188
188
  } | {
189
- error?: undefined;
190
189
  accepted: boolean;
191
190
  duplicate: boolean;
192
191
  eventId: string;
192
+ error?: undefined;
193
193
  }>;
@@ -1,4 +1,7 @@
1
1
  import { AGENTKIT_PROTOCOL_VERSION, AgentProtocolValidationError, approvalResponseFromResume, createCapabilityUnavailableError, createCapabilityUnsupportedError, inferAgentActivityKind, negotiateAgentKitProtocolVersion, resumeEntryFromApproval, resumeOptionId, } from "@agent-native/agentkit/protocol";
2
+ function isTerminalRunStatus(status) {
3
+ return (status === "completed" || status === "failed" || status === "cancelled");
4
+ }
2
5
  const TOOL_RESULT_MEDIA_TYPE = "application/x-agent-native-tool-result";
3
6
  const TOOL_CALL_MEDIA_TYPE = "application/x-agent-native-tool-call";
4
7
  const RUNTIME_PART_MEDIA_TYPE = "application/x-agent-native-runtime-part";
@@ -905,12 +908,7 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
905
908
  }
906
909
  function append(run, event) {
907
910
  const lastType = run.events.at(-1)?.type;
908
- if (lastType === "run.completed" ||
909
- lastType === "run.failed" ||
910
- lastType === "run.cancelled") {
911
- return;
912
- }
913
- const terminalActivityStatus = event.type === "run.completed" ||
911
+ const terminalStatus = event.type === "run.completed" ||
914
912
  (event.type === "run.status" && event.status === "completed")
915
913
  ? "completed"
916
914
  : event.type === "run.failed" ||
@@ -920,20 +918,32 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
920
918
  (event.type === "run.status" && event.status === "cancelled")
921
919
  ? "cancelled"
922
920
  : undefined;
923
- if (terminalActivityStatus && run.activeActivities.size > 0) {
924
- const completedAt = event.occurredAt ?? now();
925
- for (const activity of [...run.activeActivities.values()]) {
926
- append(run, {
927
- type: "activity.completed",
928
- occurredAt: completedAt,
929
- metadata: event.metadata,
930
- activity: {
931
- ...activity,
932
- status: terminalActivityStatus,
933
- completedAt,
934
- },
935
- });
921
+ const terminalFollowup = run.terminal &&
922
+ lastType === "run.status" &&
923
+ ((run.status === "completed" && event.type === "run.completed") ||
924
+ (run.status === "failed" && event.type === "run.failed") ||
925
+ (run.status === "cancelled" && event.type === "run.cancelled"));
926
+ if (lastType === "run.completed" ||
927
+ lastType === "run.failed" ||
928
+ lastType === "run.cancelled") {
929
+ return;
930
+ }
931
+ if (run.terminal &&
932
+ run.terminalAppendDepth === 0 &&
933
+ !terminalFollowup &&
934
+ !(terminalStatus && !isTerminalRunStatus(run.status))) {
935
+ return;
936
+ }
937
+ if (terminalStatus && run.terminalAppendDepth === 0) {
938
+ run.terminalAppendDepth = 1;
939
+ try {
940
+ appendTerminalFollowups(run, event, terminalStatus);
941
+ append(run, event);
936
942
  }
943
+ finally {
944
+ run.terminalAppendDepth = 0;
945
+ }
946
+ return;
937
947
  }
938
948
  const { occurredAt: eventTime, ...payload } = event;
939
949
  const sequence = run.sequence + 1;
@@ -948,6 +958,10 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
948
958
  metadata: mergeProtocolMetadata(run.metadata, event.metadata),
949
959
  };
950
960
  run.events.push(protocolEvent);
961
+ if (protocolEvent.type === "message.completed" &&
962
+ protocolEvent.message.id === run.activeMessageId) {
963
+ run.activeMessageCompleted = true;
964
+ }
951
965
  if (protocolEvent.type === "activity.started" ||
952
966
  protocolEvent.type === "activity.updated" ||
953
967
  protocolEvent.type === "activity.completed") {
@@ -958,6 +972,17 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
958
972
  run.activeActivities.delete(protocolEvent.activity.id);
959
973
  }
960
974
  }
975
+ if (protocolEvent.type === "tool.started") {
976
+ run.activeTools.set(protocolEvent.toolCall.id, protocolEvent.toolCall);
977
+ }
978
+ else if (protocolEvent.type === "tool.updated") {
979
+ if (protocolEvent.toolCall.status === "running") {
980
+ run.activeTools.set(protocolEvent.toolCall.id, protocolEvent.toolCall);
981
+ }
982
+ else {
983
+ run.activeTools.delete(protocolEvent.toolCall.id);
984
+ }
985
+ }
961
986
  if (run.events.length > maxRetainedEvents) {
962
987
  run.events.splice(0, run.events.length - maxRetainedEvents);
963
988
  run.firstRetainedSequence = run.events[0]?.sequence ?? run.sequence + 1;
@@ -965,6 +990,15 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
965
990
  let becameTerminal = false;
966
991
  if (protocolEvent.type === "run.status") {
967
992
  run.status = protocolEvent.status;
993
+ if (protocolEvent.status === "completed" ||
994
+ protocolEvent.status === "failed" ||
995
+ protocolEvent.status === "cancelled") {
996
+ run.completedAt = protocolEvent.occurredAt;
997
+ run.terminalAtMs = timeMs(protocolEvent.occurredAt);
998
+ run.actions.clear();
999
+ run.terminal = true;
1000
+ becameTerminal = true;
1001
+ }
968
1002
  }
969
1003
  else if (protocolEvent.type === "run.started") {
970
1004
  run.startedAt = protocolEvent.occurredAt;
@@ -973,7 +1007,11 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
973
1007
  run.status = "completed";
974
1008
  run.completedAt = protocolEvent.occurredAt;
975
1009
  run.terminalAtMs = timeMs(protocolEvent.occurredAt);
1010
+ if (protocolEvent.usage !== undefined) {
1011
+ run.usage = protocolEvent.usage;
1012
+ }
976
1013
  run.actions.clear();
1014
+ run.terminal = true;
977
1015
  becameTerminal = true;
978
1016
  }
979
1017
  else if (protocolEvent.type === "run.cancelled") {
@@ -981,6 +1019,7 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
981
1019
  run.completedAt = protocolEvent.occurredAt;
982
1020
  run.terminalAtMs = timeMs(protocolEvent.occurredAt);
983
1021
  run.actions.clear();
1022
+ run.terminal = true;
984
1023
  becameTerminal = true;
985
1024
  }
986
1025
  else if (protocolEvent.type === "run.failed") {
@@ -989,6 +1028,7 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
989
1028
  run.terminalAtMs = timeMs(protocolEvent.occurredAt);
990
1029
  run.error = protocolEvent.error;
991
1030
  run.actions.clear();
1031
+ run.terminal = true;
992
1032
  becameTerminal = true;
993
1033
  }
994
1034
  for (const listener of run.listeners)
@@ -996,6 +1036,82 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
996
1036
  if (becameTerminal)
997
1037
  pruneRetainedRuns(run.terminalAtMs);
998
1038
  }
1039
+ function appendTerminalFollowups(run, event, terminalStatus) {
1040
+ if (run.activeMessageId && !run.activeMessageCompleted) {
1041
+ append(run, {
1042
+ type: "message.completed",
1043
+ occurredAt: event.occurredAt ?? now(),
1044
+ metadata: event.metadata,
1045
+ message: {
1046
+ id: run.activeMessageId,
1047
+ role: "assistant",
1048
+ status: terminalStatus === "completed" ? "complete" : "error",
1049
+ parts: [],
1050
+ },
1051
+ });
1052
+ }
1053
+ const terminalActivityStatus = terminalStatus;
1054
+ const terminalToolStatus = terminalActivityStatus;
1055
+ if (terminalToolStatus && run.activeTools.size > 0) {
1056
+ const terminalError = terminalToolStatus === "failed" &&
1057
+ event.error &&
1058
+ typeof event.error === "object"
1059
+ ? event.error
1060
+ : undefined;
1061
+ for (const tool of [...run.activeTools.values()]) {
1062
+ append(run, {
1063
+ type: "tool.updated",
1064
+ occurredAt: event.occurredAt ?? now(),
1065
+ metadata: event.metadata,
1066
+ toolCall: {
1067
+ ...tool,
1068
+ status: terminalToolStatus,
1069
+ ...(terminalError ? { error: terminalError } : {}),
1070
+ },
1071
+ });
1072
+ }
1073
+ }
1074
+ if (terminalToolStatus && run.actions.size > 0) {
1075
+ const actionStatus = terminalToolStatus === "completed"
1076
+ ? "completed"
1077
+ : terminalToolStatus === "cancelled"
1078
+ ? "cancelled"
1079
+ : "failed";
1080
+ const actionError = actionStatus === "failed"
1081
+ ? {
1082
+ code: "run_terminated",
1083
+ message: "The run ended before the action reported a result.",
1084
+ }
1085
+ : undefined;
1086
+ for (const invocation of [...run.actions.values()]) {
1087
+ append(run, {
1088
+ type: actionStatus === "completed" ? "action.completed" : "action.failed",
1089
+ occurredAt: event.occurredAt ?? now(),
1090
+ metadata: event.metadata,
1091
+ result: {
1092
+ invocationId: invocation.id,
1093
+ status: actionStatus,
1094
+ ...(actionError ? { error: actionError } : {}),
1095
+ },
1096
+ });
1097
+ }
1098
+ }
1099
+ if (terminalActivityStatus && run.activeActivities.size > 0) {
1100
+ const completedAt = event.occurredAt ?? now();
1101
+ for (const activity of [...run.activeActivities.values()]) {
1102
+ append(run, {
1103
+ type: "activity.completed",
1104
+ occurredAt: completedAt,
1105
+ metadata: event.metadata,
1106
+ activity: {
1107
+ ...activity,
1108
+ status: terminalActivityStatus,
1109
+ completedAt,
1110
+ },
1111
+ });
1112
+ }
1113
+ }
1114
+ }
999
1115
  function runtimeEventToProtocolEvents(run, event) {
1000
1116
  const base = {
1001
1117
  occurredAt: event.timestamp,
@@ -1004,6 +1120,7 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
1004
1120
  switch (event.type) {
1005
1121
  case "message-start":
1006
1122
  run.activeMessageId = event.message.id;
1123
+ run.activeMessageCompleted = false;
1007
1124
  return [
1008
1125
  {
1009
1126
  type: "message.created",
@@ -1012,6 +1129,8 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
1012
1129
  },
1013
1130
  ];
1014
1131
  case "message-delta":
1132
+ run.activeMessageId = event.messageId;
1133
+ run.activeMessageCompleted = false;
1015
1134
  if (event.delta.type === "text") {
1016
1135
  return [
1017
1136
  {
@@ -1047,6 +1166,7 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
1047
1166
  ];
1048
1167
  case "message-done":
1049
1168
  run.activeMessageId = event.message.id;
1169
+ run.activeMessageCompleted = true;
1050
1170
  return [
1051
1171
  {
1052
1172
  type: "message.completed",
@@ -1767,8 +1887,11 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
1767
1887
  lastAccessedAtMs: timeMs(),
1768
1888
  activeReaders: 0,
1769
1889
  metadata: runMetadata,
1890
+ activeMessageCompleted: false,
1770
1891
  actions: new Map(),
1892
+ activeTools: new Map(),
1771
1893
  activeActivities: new Map(),
1894
+ terminalAppendDepth: 0,
1772
1895
  pumpPromise: null,
1773
1896
  continuationPromise: null,
1774
1897
  streamClosed: false,
@@ -1818,6 +1941,7 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
1818
1941
  usage: run.usage,
1819
1942
  error: run.error,
1820
1943
  metadata: run.metadata,
1944
+ activeMessageId: run.activeMessageId,
1821
1945
  };
1822
1946
  },
1823
1947
  async cancelRun(input) {
@@ -1851,19 +1975,8 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
1851
1975
  }
1852
1976
  run.waitingForContinuation = false;
1853
1977
  run.pendingApprovalId = undefined;
1854
- if (streamWasClosed) {
1855
- const completedAt = now();
1856
- run.status = "cancelled";
1857
- run.completedAt = completedAt;
1858
- run.terminalAtMs = timeMs(completedAt);
1859
- run.actions.clear();
1860
- run.activeActivities.clear();
1861
- pruneRetainedRuns(run.terminalAtMs);
1862
- }
1863
- else {
1864
- append(run, { type: "run.status", status: "cancelled" });
1865
- append(run, { type: "run.cancelled" });
1866
- }
1978
+ append(run, { type: "run.status", status: "cancelled" });
1979
+ append(run, { type: "run.cancelled" });
1867
1980
  },
1868
1981
  async dispose() {
1869
1982
  if (disposed)
@@ -2076,8 +2189,11 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
2076
2189
  activeReaders: 0,
2077
2190
  metadata: replacementMetadata,
2078
2191
  activeMessageId: run.activeMessageId,
2192
+ activeMessageCompleted: run.activeMessageCompleted,
2079
2193
  actions: new Map(run.actions),
2194
+ activeTools: new Map(run.activeTools),
2080
2195
  activeActivities: new Map(run.activeActivities),
2196
+ terminalAppendDepth: 0,
2081
2197
  pumpPromise: null,
2082
2198
  continuationPromise: null,
2083
2199
  streamClosed: false,
@@ -2160,8 +2276,6 @@ export function createAgentKitProtocolAdapter(runtime, options = {}) {
2160
2276
  run.waitingForContinuation = false;
2161
2277
  run.pendingConnectionRequestId = undefined;
2162
2278
  run.streamClosed = true;
2163
- run.terminal = true;
2164
- run.terminalAtMs = timeMs();
2165
2279
  append(run, { type: "run.status", status: "failed" });
2166
2280
  append(run, {
2167
2281
  type: "run.failed",
@@ -13,8 +13,8 @@
13
13
  * Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
14
14
  */
15
15
  export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
16
- error: string;
17
16
  ok?: undefined;
17
+ error: string;
18
18
  } | {
19
19
  error?: undefined;
20
20
  ok: boolean;
@@ -15,6 +15,6 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- ok: boolean;
19
18
  error?: undefined;
19
+ ok: boolean;
20
20
  }>>;
@@ -408,8 +408,8 @@ export declare function createPublicRemoteAgentsHandler(discover?: PublicAgentDi
408
408
  error: string;
409
409
  agents?: undefined;
410
410
  } | {
411
- agents: Omit<import("./agent-discovery.js").DiscoveredAgent, "auth" | "kind">[];
412
411
  error?: undefined;
412
+ agents: Omit<import("./agent-discovery.js").DiscoveredAgent, "auth" | "kind">[];
413
413
  }>>;
414
414
  export declare function getBuilderConnectErrorDisposition(error: unknown, connectAttemptId: string | null): "correlated" | "legacy" | null;
415
415
  export declare function getBuilderConnectErrorKey(ownerEmail: string, connectAttemptId?: string | null): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.182.1",
3
+ "version": "0.182.2-nightly-20260917210345",
4
4
  "description": "The agentic application framework for building autonomous agents with intuitive UIs",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -486,9 +486,9 @@
486
486
  "yaml": "^2.9.0",
487
487
  "yjs": "^13.6.32",
488
488
  "zod": "^4.3.6",
489
- "@agent-native/agentkit": "^0.2.4",
490
- "@agent-native/recap-cli": "0.5.34",
491
- "@agent-native/toolkit": "^0.20.4"
489
+ "@agent-native/agentkit": "^0.2.5-nightly-20260917210345",
490
+ "@agent-native/toolkit": "^0.20.5-nightly-20260917210345",
491
+ "@agent-native/recap-cli": "0.5.34"
492
492
  },
493
493
  "devDependencies": {
494
494
  "@ai-sdk/anthropic": "^3.0.71",
@@ -1,66 +0,0 @@
1
- import { useT } from "@agent-native/core/client/i18n";
2
-
3
- import {
4
- AlertDialog,
5
- AlertDialogAction,
6
- AlertDialogCancel,
7
- AlertDialogContent,
8
- AlertDialogDescription,
9
- AlertDialogFooter,
10
- AlertDialogHeader,
11
- AlertDialogTitle,
12
- } from "@/components/ui/alert-dialog";
13
- import type { DesignFile } from "@/pages/design-editor/types";
14
-
15
- export function PendingScreenDeletionDialog({
16
- pendingScreenDeletion,
17
- onCancel,
18
- onConfirm,
19
- confirming = false,
20
- }: {
21
- pendingScreenDeletion: { files: DesignFile[] } | null;
22
- onCancel: () => void;
23
- onConfirm: () => void;
24
- confirming?: boolean;
25
- }) {
26
- const t = useT();
27
- return (
28
- <AlertDialog open={pendingScreenDeletion !== null}>
29
- <AlertDialogContent>
30
- <AlertDialogHeader>
31
- <AlertDialogTitle>
32
- {pendingScreenDeletion?.files.length === 1
33
- ? t("designEditor.screenDeletion.titleOne")
34
- : t("designEditor.screenDeletion.titleMany", {
35
- count: pendingScreenDeletion?.files.length ?? 0,
36
- })}
37
- </AlertDialogTitle>
38
- <AlertDialogDescription>
39
- {pendingScreenDeletion?.files.length === 1
40
- ? t("designEditor.screenDeletion.descriptionOne", {
41
- filename: pendingScreenDeletion.files[0]?.filename ?? "",
42
- })
43
- : t("designEditor.screenDeletion.descriptionMany")}
44
- </AlertDialogDescription>
45
- </AlertDialogHeader>
46
- <AlertDialogFooter>
47
- <AlertDialogCancel onClick={onCancel} disabled={confirming}>
48
- {t("designEditor.screenDeletion.cancel")}
49
- </AlertDialogCancel>
50
- <AlertDialogAction
51
- className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
52
- disabled={confirming}
53
- onClick={(event) => {
54
- event.preventDefault();
55
- onConfirm();
56
- }}
57
- >
58
- {confirming
59
- ? "Removing…" /* i18n-ignore */
60
- : t("designEditor.screenDeletion.confirm")}
61
- </AlertDialogAction>
62
- </AlertDialogFooter>
63
- </AlertDialogContent>
64
- </AlertDialog>
65
- );
66
- }