@agent-native/core 0.84.1 → 0.84.2
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 +7 -0
- package/corpus/core/docs/design/durable-agent-runs.md +34 -35
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/engine/builder-engine.ts +81 -9
- package/corpus/core/src/agent/run-manager.ts +8 -7
- package/corpus/core/src/cli/design-connect.ts +175 -0
- package/corpus/core/src/cli/skills.ts +5 -7
- package/corpus/core/src/client/AgentPanel.tsx +8 -0
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +4 -1
- package/corpus/core/src/client/agent-chat-adapter.ts +45 -15
- package/corpus/core/src/client/sse-event-processor.ts +31 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +15 -17
- package/corpus/templates/design/actions/apply-motion-edit.ts +50 -18
- package/corpus/templates/design/actions/get-motion-timeline.ts +4 -14
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +156 -12
- package/corpus/templates/design/app/components/design/MotionDock.tsx +2 -3
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +217 -75
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +39 -39
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +558 -37
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +75 -3
- package/corpus/templates/design/app/components/design/types.ts +13 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +17 -0
- package/corpus/templates/design/app/i18n-data.ts +245 -0
- package/corpus/templates/design/app/pages/DesignEditor.tsx +762 -153
- package/corpus/templates/design/changelog/2026-06-30-copying-or-dragging-screen-elements-onto-the-infinite-canvas.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-questions-now-use-tighter-editor-typography-and-contr.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-element-drags-can-be-cancelled-with-escape-before-they-commi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-pending-visual-style-edits-now-warn-before-you-leave-the-edi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-visual-style-drags-stay-live-while-pending-edits-can-be-appl.md +6 -0
- package/corpus/templates/design/changelog/2026-07-01-design-chat-no-longer-shows-a-redundant-context-tab-above-the-composer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-01-motion-track-creation-no-longer-fails-in-local-editors.md +6 -0
- package/corpus/templates/design/server/plugins/db.ts +10 -0
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +61 -10
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/run-manager.d.ts +8 -7
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +8 -7
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/cli/design-connect.d.ts +2 -0
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +140 -0
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +5 -7
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +5 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +4 -4
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts +3 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +2 -2
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +37 -14
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +14 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +21 -5
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +2 -2
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +15 -17
- package/docs/design/durable-agent-runs.md +34 -35
- package/package.json +1 -1
- package/src/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +15 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-chat-adapter.d.ts","sourceRoot":"","sources":["../../src/client/agent-chat-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;AAMhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-chat-adapter.d.ts","sourceRoot":"","sources":["../../src/client/agent-chat-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;AAMhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAkBrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,oBAAoB;AAC9B;;;;GAIG;AACD,KAAK;AACP,0EAA0E;GACxE,WAAW,CAAC;AAmmChB;;;;GAIG;AACH;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC3C,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC5C,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;KAAE,CAAC;IACrD,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,CAAA;KAAE,CAAC;IAC3D,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,6BAA6B,GACtC,gBAAgB,CAswClB"}
|
|
@@ -1044,6 +1044,7 @@ export function createAgentChatAdapter(options) {
|
|
|
1044
1044
|
const structuredContinuationFragments = [];
|
|
1045
1045
|
let visibleContinuationPrefix = [];
|
|
1046
1046
|
let lastAutoContinueReason = null;
|
|
1047
|
+
let lastRecoverableRunError = null;
|
|
1047
1048
|
const attemptedRunIds = [];
|
|
1048
1049
|
let authRecoveryAttempted = false;
|
|
1049
1050
|
let continuationToolCallCounter = 0;
|
|
@@ -1053,6 +1054,12 @@ export function createAgentChatAdapter(options) {
|
|
|
1053
1054
|
lastAutoContinueReason
|
|
1054
1055
|
? `last_auto_continue_reason: ${lastAutoContinueReason}`
|
|
1055
1056
|
: "",
|
|
1057
|
+
lastRecoverableRunError?.errorCode
|
|
1058
|
+
? `last_recoverable_error_code: ${lastRecoverableRunError.errorCode}`
|
|
1059
|
+
: "",
|
|
1060
|
+
lastRecoverableRunError?.message
|
|
1061
|
+
? `last_recoverable_error: ${lastRecoverableRunError.message}`
|
|
1062
|
+
: "",
|
|
1056
1063
|
`stale_run_continuations: ${staleRunContinuationAttempts}`,
|
|
1057
1064
|
`stalled_transient_continuations: ${stalledTransientContinuationAttempts}`,
|
|
1058
1065
|
`empty_transient_continuations: ${emptyTransientContinuationAttempts}`,
|
|
@@ -1307,6 +1314,9 @@ export function createAgentChatAdapter(options) {
|
|
|
1307
1314
|
};
|
|
1308
1315
|
const prepareAutoContinuation = (signal) => {
|
|
1309
1316
|
lastAutoContinueReason = signal.reason;
|
|
1317
|
+
if (signal.errorInfo) {
|
|
1318
|
+
lastRecoverableRunError = signal.errorInfo;
|
|
1319
|
+
}
|
|
1310
1320
|
const isTransient = signal.reason !== "loop_limit";
|
|
1311
1321
|
const visibleContent = visibleContentForContinuation();
|
|
1312
1322
|
const currentPartialHistory = contentToContinuationHistory(visibleContent);
|
|
@@ -1315,13 +1325,12 @@ export function createAgentChatAdapter(options) {
|
|
|
1315
1325
|
// whitespace-only output cannot keep the run alive indefinitely.
|
|
1316
1326
|
const madeContentProgress = hasContinuationProgress(visibleContent);
|
|
1317
1327
|
// An action was streamed but has not returned yet (a tool_start with
|
|
1318
|
-
// no tool_done)
|
|
1319
|
-
//
|
|
1320
|
-
//
|
|
1321
|
-
//
|
|
1322
|
-
//
|
|
1323
|
-
const hasInFlightTool = hasInFlightToolCall(visibleContent)
|
|
1324
|
-
Boolean(lastActivityTool(signal.activityTrail));
|
|
1328
|
+
// no tool_done). This is durable enough to survive continuation: the
|
|
1329
|
+
// server already emitted a real tool call. A tool-scoped activity
|
|
1330
|
+
// card ("Preparing generate-design") is useful UI, but it happens
|
|
1331
|
+
// before tool_start; treating it as progress caused silent retry
|
|
1332
|
+
// loops when the LLM timed out while assembling a large tool input.
|
|
1333
|
+
const hasInFlightTool = hasInFlightToolCall(visibleContent);
|
|
1325
1334
|
// Either real output or an actively-running tool counts as progress
|
|
1326
1335
|
// for the stalled/empty caps.
|
|
1327
1336
|
const madeProgress = madeContentProgress || hasInFlightTool;
|
|
@@ -1761,15 +1770,25 @@ export function createAgentChatAdapter(options) {
|
|
|
1761
1770
|
}
|
|
1762
1771
|
const continuation = prepareAutoContinuation(err);
|
|
1763
1772
|
if (!continuation.ok) {
|
|
1764
|
-
const
|
|
1773
|
+
const preservedError = err.errorInfo ?? lastRecoverableRunError ?? null;
|
|
1774
|
+
const message = preservedError?.message ??
|
|
1775
|
+
exhaustedRecoveryMessage(err.reason);
|
|
1776
|
+
const details = [
|
|
1777
|
+
preservedError?.details,
|
|
1778
|
+
connectionRecoveryDetails(),
|
|
1779
|
+
]
|
|
1780
|
+
.filter(Boolean)
|
|
1781
|
+
.join("\n\n");
|
|
1782
|
+
const errorCode = preservedError?.errorCode ?? "connection_error";
|
|
1765
1783
|
captureChatClientError(err, "auto-continuation-exhausted", {
|
|
1766
1784
|
autoContinueReason: err.reason,
|
|
1785
|
+
...(errorCode ? { errorCode } : {}),
|
|
1767
1786
|
});
|
|
1768
1787
|
const runError = {
|
|
1769
1788
|
message,
|
|
1770
|
-
details:
|
|
1771
|
-
errorCode
|
|
1772
|
-
recoverable: true,
|
|
1789
|
+
...(details ? { details } : {}),
|
|
1790
|
+
errorCode,
|
|
1791
|
+
recoverable: preservedError?.recoverable ?? true,
|
|
1773
1792
|
...(runId ? { runId } : {}),
|
|
1774
1793
|
};
|
|
1775
1794
|
if (typeof window !== "undefined") {
|
|
@@ -1777,10 +1796,12 @@ export function createAgentChatAdapter(options) {
|
|
|
1777
1796
|
detail: { ...runError, tabId },
|
|
1778
1797
|
}));
|
|
1779
1798
|
}
|
|
1780
|
-
settleInterruptedToolCalls(content
|
|
1799
|
+
settleInterruptedToolCalls(content, undefined, {
|
|
1800
|
+
includeActivity: true,
|
|
1801
|
+
});
|
|
1781
1802
|
content.push({
|
|
1782
1803
|
type: "text",
|
|
1783
|
-
text:
|
|
1804
|
+
text: formatChatErrorText(message, preservedError?.upgradeUrl, errorCode),
|
|
1784
1805
|
});
|
|
1785
1806
|
yield {
|
|
1786
1807
|
content: [...content],
|
|
@@ -1913,7 +1934,9 @@ export function createAgentChatAdapter(options) {
|
|
|
1913
1934
|
detail: { ...runError, tabId },
|
|
1914
1935
|
}));
|
|
1915
1936
|
}
|
|
1916
|
-
settleInterruptedToolCalls(content
|
|
1937
|
+
settleInterruptedToolCalls(content, undefined, {
|
|
1938
|
+
includeActivity: true,
|
|
1939
|
+
});
|
|
1917
1940
|
content.push({
|
|
1918
1941
|
type: "text",
|
|
1919
1942
|
text: `Something went wrong: ${message}`,
|