@agent-native/core 0.84.12 → 0.84.14
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 +19 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/durable-background.ts +42 -5
- package/corpus/core/src/agent/production-agent.ts +72 -10
- package/corpus/core/src/agent/run-manager.ts +84 -4
- package/corpus/core/src/agent/run-store.ts +55 -11
- package/corpus/core/src/chat-threads/store.ts +2 -0
- package/corpus/core/src/cli/skills.ts +10 -6
- package/corpus/core/src/client/AssistantChat.tsx +40 -9
- package/corpus/core/src/client/agent-chat-adapter.ts +44 -5
- package/corpus/core/src/client/blocks/library/diagram.tsx +3 -3
- package/corpus/core/src/client/chat/message-components.tsx +17 -0
- package/corpus/core/src/client/chat/run-recovery.tsx +52 -44
- package/corpus/core/src/client/chat/tool-call-display.tsx +7 -2
- package/corpus/core/src/observability/traces.ts +17 -3
- package/corpus/core/src/server/agent-chat-plugin.ts +12 -1
- package/corpus/core/src/shared/streaming-text-smoothing.ts +10 -5
- package/corpus/core/src/styles/blocks.css +44 -1
- package/corpus/templates/clips/app/components/library/recording-card.tsx +14 -4
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +10 -12
- package/corpus/templates/clips/app/hooks/use-library.ts +7 -4
- package/corpus/templates/clips/app/lib/recording-status.ts +32 -0
- package/corpus/templates/clips/changelog/2026-07-01-chrome-extension-recordings-stream-uploads-while-recording.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-01-dictation-keeps-listening-through-natural-pauses-and-gives-c.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-01-redoing-a-paused-desktop-recording-no-longer-leaves-the-recording-controls-disabled.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-01-stalled-clip-uploads-now-update-in-the-library-and-surface-as-failed.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +8 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +61 -16
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +36 -18
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +99 -27
- package/corpus/templates/clips/desktop/src/overlays/flow-bar.tsx +4 -43
- package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +3 -0
- package/corpus/templates/clips/desktop/src/styles.css +5 -48
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +4 -5
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +15 -6
- package/corpus/templates/design/AGENTS.md +8 -4
- package/corpus/templates/design/actions/create-design.ts +1 -0
- package/corpus/templates/design/actions/duplicate-design.ts +3 -1
- package/corpus/templates/design/actions/edit-design.ts +43 -13
- package/corpus/templates/design/actions/generate-design.ts +5 -1
- package/corpus/templates/design/actions/present-design-variants.ts +17 -12
- 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-org-members-can-see-design-projects-created-in-their-workspace.md +6 -0
- package/corpus/templates/design/server/plugins/db.ts +9 -0
- package/corpus/templates/plan/app/components/plan/wireframe/html-artboard.css +44 -1
- package/corpus/templates/plan/changelog/2026-07-01-visual-plan-and-recap-diagram-labels-now-wrap-inside-their-b.md +6 -0
- package/dist/agent/durable-background.d.ts +3 -0
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +33 -3
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/production-agent.d.ts +1 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +55 -9
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +2 -0
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +68 -5
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +9 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +47 -11
- package/dist/agent/run-store.js.map +1 -1
- package/dist/chat-threads/store.d.ts +1 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +2 -0
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +10 -6
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +10 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +26 -8
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +40 -5
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/library/diagram.js +3 -3
- package/dist/client/blocks/library/diagram.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +3 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +16 -2
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +15 -10
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +1 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +3 -2
- package/dist/client/chat/tool-call-display.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 +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +6 -6
- package/dist/observability/traces.d.ts +5 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +9 -3
- package/dist/observability/traces.js.map +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/server/agent-chat-plugin.d.ts +2 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +8 -3
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/streaming-text-smoothing.d.ts.map +1 -1
- package/dist/shared/streaming-text-smoothing.js +8 -5
- package/dist/shared/streaming-text-smoothing.js.map +1 -1
- package/dist/styles/blocks.css +44 -1
- 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;AAksChB;;;;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,CA6/ClB"}
|
|
@@ -621,6 +621,19 @@ function lastActivityTool(trail) {
|
|
|
621
621
|
}
|
|
622
622
|
return undefined;
|
|
623
623
|
}
|
|
624
|
+
function formatActivityTrail(trail) {
|
|
625
|
+
const items = trail
|
|
626
|
+
.slice(-8)
|
|
627
|
+
.map((entry) => {
|
|
628
|
+
const label = entry.label.replace(/\s+/g, " ").trim();
|
|
629
|
+
const tool = entry.tool?.replace(/\s+/g, " ").trim();
|
|
630
|
+
if (label && tool && label !== tool)
|
|
631
|
+
return `${label} (${tool})`;
|
|
632
|
+
return label || tool || "";
|
|
633
|
+
})
|
|
634
|
+
.filter(Boolean);
|
|
635
|
+
return items.length > 0 ? items.join(" > ") : undefined;
|
|
636
|
+
}
|
|
624
637
|
function lastUnresolvedToolActivity(content) {
|
|
625
638
|
for (let i = content.length - 1; i >= 0; i--) {
|
|
626
639
|
const part = content[i];
|
|
@@ -717,9 +730,9 @@ function incrementalActionGuidance(tool) {
|
|
|
717
730
|
return "create a compact working v1 with `create-extension`, then use focused `update-extension` edits for refinements";
|
|
718
731
|
case "generate-design":
|
|
719
732
|
case "update-design":
|
|
720
|
-
return
|
|
733
|
+
return 'if an existing design file or snapshot is already in history, especially after a Design variant pick, stop retrying `generate-design`: call `get-design-snapshot` for the selected file, then call `edit-design` once on that same `fileId` (`mode: "replace-file"` for a compact full-file replacement, or search/replace for smaller edits). Use `generate-design` only for a brand-new compact first file when no target file exists yet';
|
|
721
734
|
case "present-design-variants":
|
|
722
|
-
return
|
|
735
|
+
return 'call `present-design-variants` with concise labels, descriptions, accent colors, and feature bullets; omit large `content` HTML when needed so the action can render compact representative screens. After the user picks a direction, delete unchosen screens, snapshot the selected `fileId`, and refine that same file with `edit-design` (`mode: "replace-file"` for placeholder expansion). Do not call `generate-design` after the variant pick';
|
|
723
736
|
case "create-visual-plan":
|
|
724
737
|
case "create-ui-plan":
|
|
725
738
|
case "create-plan-design":
|
|
@@ -1112,12 +1125,32 @@ export function createAgentChatAdapter(options) {
|
|
|
1112
1125
|
let visibleContinuationPrefix = [];
|
|
1113
1126
|
let lastAutoContinueReason = null;
|
|
1114
1127
|
let lastRecoverableRunError = null;
|
|
1128
|
+
let lastActivityTrail = [];
|
|
1115
1129
|
const attemptedRunIds = [];
|
|
1116
1130
|
let authRecoveryAttempted = false;
|
|
1117
1131
|
let continuationToolCallCounter = 0;
|
|
1118
1132
|
const nextContinuationToolCallId = () => `continuation_tc_${++continuationToolCallCounter}`;
|
|
1133
|
+
const runDebugContextDetails = () => {
|
|
1134
|
+
const pageOrigin = typeof window !== "undefined" && window.location?.origin
|
|
1135
|
+
? window.location.origin
|
|
1136
|
+
: "";
|
|
1137
|
+
return [
|
|
1138
|
+
`api_url: ${apiUrl}`,
|
|
1139
|
+
pageOrigin ? `page_origin: ${pageOrigin}` : "",
|
|
1140
|
+
tabId ? `tab_id: ${tabId}` : "",
|
|
1141
|
+
threadId ? `thread_id: ${threadId}` : "",
|
|
1142
|
+
`turn_id: ${turnId}`,
|
|
1143
|
+
runId ? `current_run: ${runId}` : "",
|
|
1144
|
+
attemptedRunIds.length > 0
|
|
1145
|
+
? `attempted_runs: ${attemptedRunIds.join(", ")}`
|
|
1146
|
+
: "",
|
|
1147
|
+
]
|
|
1148
|
+
.filter(Boolean)
|
|
1149
|
+
.join("\n");
|
|
1150
|
+
};
|
|
1119
1151
|
const connectionRecoveryDetails = () => {
|
|
1120
1152
|
return [
|
|
1153
|
+
runDebugContextDetails(),
|
|
1121
1154
|
lastAutoContinueReason
|
|
1122
1155
|
? `last_auto_continue_reason: ${lastAutoContinueReason}`
|
|
1123
1156
|
: "",
|
|
@@ -1139,10 +1172,10 @@ export function createAgentChatAdapter(options) {
|
|
|
1139
1172
|
lastPreparingToolName
|
|
1140
1173
|
? `last_preparing_tool: ${lastPreparingToolName}`
|
|
1141
1174
|
: "",
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
? `attempted_runs: ${attemptedRunIds.join(", ")}`
|
|
1175
|
+
formatActivityTrail(lastActivityTrail)
|
|
1176
|
+
? `activity_trail: ${formatActivityTrail(lastActivityTrail)}`
|
|
1145
1177
|
: "",
|
|
1178
|
+
`total_transient_continuations: ${totalTransientContinuationAttempts}`,
|
|
1146
1179
|
]
|
|
1147
1180
|
.filter(Boolean)
|
|
1148
1181
|
.join("\n");
|
|
@@ -1217,6 +1250,7 @@ export function createAgentChatAdapter(options) {
|
|
|
1217
1250
|
lastSeq,
|
|
1218
1251
|
contentParts: content.length,
|
|
1219
1252
|
attemptedRunIds: [...attemptedRunIds],
|
|
1253
|
+
activityTrail: [...lastActivityTrail],
|
|
1220
1254
|
startupRecoveryAttempts,
|
|
1221
1255
|
staleRunContinuationAttempts,
|
|
1222
1256
|
stalledTransientContinuationAttempts,
|
|
@@ -1465,6 +1499,7 @@ export function createAgentChatAdapter(options) {
|
|
|
1465
1499
|
};
|
|
1466
1500
|
const prepareAutoContinuation = (signal) => {
|
|
1467
1501
|
lastAutoContinueReason = signal.reason;
|
|
1502
|
+
lastActivityTrail = [...signal.activityTrail];
|
|
1468
1503
|
if (signal.errorInfo) {
|
|
1469
1504
|
lastRecoverableRunError = signal.errorInfo;
|
|
1470
1505
|
}
|