@agent-native/core 0.84.9 → 0.84.10
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 +6 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/skills.ts +6 -3
- package/corpus/core/src/client/agent-chat-adapter.ts +31 -11
- package/corpus/templates/design/actions/get-design-snapshot.ts +41 -4
- package/corpus/templates/design/actions/present-design-variants.ts +21 -6
- package/corpus/templates/design/app/hooks/use-question-flow.ts +2 -2
- package/corpus/templates/design/app/pages/DesignEditor.tsx +2 -2
- package/corpus/templates/design/changelog/2026-07-01-improved-variant-pick-follow-ups-so-selected-directions-cont.md +6 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +6 -3
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +26 -11
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +3 -3
- package/package.json +1 -1
|
@@ -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;AAkBrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,oBAAoB;AAC9B;;;;GAIG;AACD,KAAK;AACP,0EAA0E;GACxE,WAAW,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;AAmrChB;;;;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,CAq+ClB"}
|
|
@@ -535,14 +535,28 @@ function hasContinuationProgress(content) {
|
|
|
535
535
|
? part.text.trim().length > 0
|
|
536
536
|
: part.result !== undefined);
|
|
537
537
|
}
|
|
538
|
-
|
|
538
|
+
const COMPLETED_TOOL_TIMEOUT_NAME_RE = /^(add|apply|archive|capture|create|delete|deploy|duplicate|edit|generate|grant|insert|migrate|move|present|publish|remove|rename|reorder|revoke|save|send|set|sync|trash|update|write)(-|$)/;
|
|
539
|
+
const COMPLETED_TOOL_TIMEOUT_NAME_ALLOWLIST = new Set([
|
|
540
|
+
"connect-assets-mcp",
|
|
541
|
+
"import-design-tokens",
|
|
542
|
+
]);
|
|
543
|
+
function isCompletedToolTimeoutCandidate(part) {
|
|
544
|
+
if (part.completedSideEffect === false)
|
|
545
|
+
return false;
|
|
546
|
+
if (part.completedSideEffect === true)
|
|
547
|
+
return true;
|
|
548
|
+
const toolName = part.toolName.toLowerCase();
|
|
549
|
+
return (COMPLETED_TOOL_TIMEOUT_NAME_ALLOWLIST.has(toolName) ||
|
|
550
|
+
COMPLETED_TOOL_TIMEOUT_NAME_RE.test(toolName));
|
|
551
|
+
}
|
|
552
|
+
function lastCompletedTimeoutCandidateTool(content) {
|
|
539
553
|
for (let i = content.length - 1; i >= 0; i--) {
|
|
540
554
|
const part = content[i];
|
|
541
555
|
if (part.type === "tool-call" &&
|
|
542
556
|
part.activity !== true &&
|
|
543
557
|
part.result !== undefined &&
|
|
544
558
|
part.isError !== true &&
|
|
545
|
-
part
|
|
559
|
+
isCompletedToolTimeoutCandidate(part)) {
|
|
546
560
|
return part;
|
|
547
561
|
}
|
|
548
562
|
}
|
|
@@ -1468,7 +1482,7 @@ export function createAgentChatAdapter(options) {
|
|
|
1468
1482
|
// before tool_start; treating it as progress caused silent retry
|
|
1469
1483
|
// loops when the LLM timed out while assembling a large tool input.
|
|
1470
1484
|
const hasInFlightTool = hasInFlightToolCall(visibleContent);
|
|
1471
|
-
const
|
|
1485
|
+
const completedTool = lastCompletedTimeoutCandidateTool(content);
|
|
1472
1486
|
// Either real output or an actively-running tool counts as progress
|
|
1473
1487
|
// for the stalled/empty caps.
|
|
1474
1488
|
const madeProgress = madeContentProgress || hasInFlightTool;
|
|
@@ -1553,20 +1567,21 @@ export function createAgentChatAdapter(options) {
|
|
|
1553
1567
|
}
|
|
1554
1568
|
else {
|
|
1555
1569
|
totalTransientContinuationAttempts += 1;
|
|
1556
|
-
// If a
|
|
1557
|
-
//
|
|
1558
|
-
//
|
|
1559
|
-
//
|
|
1560
|
-
//
|
|
1561
|
-
|
|
1562
|
-
|
|
1570
|
+
// If a tool already completed, do not turn a missing closing
|
|
1571
|
+
// sentence into a scary connection failure. Give the model one
|
|
1572
|
+
// continuation opportunity (the completed tool itself counts as
|
|
1573
|
+
// progress on the first timeout); if the follow-up produces no new
|
|
1574
|
+
// content, stop locally with a clear completed-tool warning.
|
|
1575
|
+
if (signal.reason === "run_timeout" &&
|
|
1576
|
+
completedTool &&
|
|
1563
1577
|
!hasInFlightToolCall(content) &&
|
|
1578
|
+
!currentPreparingToolName &&
|
|
1564
1579
|
!madeContentProgress &&
|
|
1565
1580
|
!hasInFlightTool) {
|
|
1566
1581
|
return {
|
|
1567
1582
|
ok: false,
|
|
1568
1583
|
resetVisibleContent: false,
|
|
1569
|
-
completedToolName:
|
|
1584
|
+
completedToolName: completedTool.toolName,
|
|
1570
1585
|
};
|
|
1571
1586
|
}
|
|
1572
1587
|
// Bail when the same write tool is stuck in-flight across too many
|