@agent-native/core 0.196.0 → 0.196.1-nightly-20260928200103

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 (41) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/clips/actions/create-recording.ts +1 -1
  3. package/corpus/templates/clips/actions/lib/auto-title-candidates.ts +42 -0
  4. package/corpus/templates/clips/actions/lib/create-recording-schema.ts +1 -1
  5. package/corpus/templates/clips/actions/lib/transcript-text.ts +16 -0
  6. package/corpus/templates/clips/actions/list-ai-requests.ts +49 -31
  7. package/corpus/templates/clips/actions/list-recordings.ts +2 -4
  8. package/corpus/templates/clips/actions/list-transactional-email-ai-requests.ts +12 -6
  9. package/corpus/templates/clips/actions/regenerate-title.ts +4 -1
  10. package/corpus/templates/clips/actions/request-transcript.ts +1 -1
  11. package/corpus/templates/clips/actions/save-browser-transcript.ts +1 -1
  12. package/corpus/templates/clips/app/components/editable-recording-title.tsx +1 -1
  13. package/corpus/templates/clips/app/components/library/recording-card.tsx +1 -1
  14. package/corpus/templates/clips/app/hooks/use-auto-title.ts +194 -219
  15. package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +2 -1
  16. package/corpus/templates/clips/app/routes/share.$shareId.tsx +1 -1
  17. package/corpus/templates/clips/server/lib/transactional-email-store.ts +42 -2
  18. package/corpus/templates/clips/shared/ai-request-status.ts +6 -0
  19. package/corpus/templates/clips/{actions/lib → shared}/title-source.ts +9 -2
  20. package/dist/agent/production-agent.js +2 -0
  21. package/dist/agent/run-manager.d.ts +2 -0
  22. package/dist/agent/run-manager.js +9 -2
  23. package/dist/agent/thread-data-builder.d.ts +1 -0
  24. package/dist/agent/thread-data-builder.js +148 -0
  25. package/dist/automation/index.d.ts +1 -1
  26. package/dist/chat-threads/store.d.ts +1 -0
  27. package/dist/chat-threads/store.js +244 -21
  28. package/dist/client/AgentKitAssistantChat.js +23 -12
  29. package/dist/client/chat/agentkit-agent-native.js +409 -8
  30. package/dist/client/chat/agentkit-protocol.js +3 -0
  31. package/dist/collab/awareness.d.ts +2 -2
  32. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  33. package/dist/notifications/routes.d.ts +3 -3
  34. package/dist/observability/routes.d.ts +2 -2
  35. package/dist/resources/handlers.d.ts +1 -1
  36. package/dist/server/agent-chat-plugin.d.ts +2 -0
  37. package/dist/server/agent-chat-plugin.js +12 -7
  38. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  39. package/dist/server/agent-engine-ollama-models-route.d.ts +2 -2
  40. package/dist/server/realtime-token.d.ts +1 -1
  41. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
2
+ error?: undefined;
2
3
  count: number;
3
4
  updated?: undefined;
4
- error?: undefined;
5
5
  ok?: undefined;
6
6
  } | {
7
+ error?: undefined;
7
8
  count?: undefined;
8
9
  updated: number;
9
- error?: undefined;
10
10
  ok?: undefined;
11
11
  } | {
12
12
  count?: undefined;
@@ -14,8 +14,8 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
14
14
  error: string;
15
15
  ok?: undefined;
16
16
  } | {
17
+ error?: undefined;
17
18
  count?: undefined;
18
19
  updated?: undefined;
19
20
  ok: boolean;
20
- error?: undefined;
21
21
  }>>;
@@ -20,8 +20,8 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
20
20
  thumbsUpRate: number;
21
21
  avgEvalScore: number;
22
22
  } | {
23
- error?: undefined;
24
23
  id?: undefined;
24
+ error?: undefined;
25
25
  summary: import("./types.js").TraceSummary;
26
26
  spans: import("./types.js").TraceSpan[];
27
27
  ok?: undefined;
@@ -38,8 +38,8 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
38
38
  error: any;
39
39
  ok?: undefined;
40
40
  } | {
41
- error?: undefined;
42
41
  id?: undefined;
42
+ error?: undefined;
43
43
  summary?: undefined;
44
44
  spans?: undefined;
45
45
  ok: boolean;
@@ -39,8 +39,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
39
39
  error: string;
40
40
  }>;
41
41
  export declare function handleDeleteResource(event: any): Promise<{
42
- error: string;
43
42
  ok?: undefined;
43
+ error: string;
44
44
  } | {
45
45
  error?: undefined;
46
46
  ok: boolean;
@@ -1,6 +1,7 @@
1
1
  import type { Message as A2AMessage } from "../a2a/types.js";
2
2
  import { type ActionEntry, type AgentActionSurfaceDetails, type AgentActionSurfaceResolution } from "../agent/production-agent.js";
3
3
  import type { ActiveRun } from "../agent/run-manager.js";
4
+ import { foldAssistantTurn } from "../agent/thread-data-builder.js";
4
5
  import type { AgentChatEvent, AgentChatScope } from "../agent/types.js";
5
6
  import type { ResolvedKeyReference } from "../secrets/substitution.js";
6
7
  import { handleSharedThreadRequest, type SharedThreadRouteDependencies } from "./agent-chat/shared-thread.js";
@@ -43,6 +44,7 @@ export { finalizeClaimedAgentChatProcessRunFailure };
43
44
  export declare function runPostAgentTurnAutosave(callback: AgentChatPluginOptions["onAgentTurnComplete"] | undefined, scope: AgentChatScope | null | undefined, run: ActiveRun): Promise<void>;
44
45
  export declare function runPostAgentRunComplete(callback: AgentChatPluginOptions["onAgentRunComplete"] | undefined, scope: AgentChatScope | null | undefined, run: ActiveRun): Promise<void>;
45
46
  export declare function runPreAgentTurnAutosave(callback: AgentChatPluginOptions["onAgentTurnStart"] | undefined, scope: AgentChatScope | null | undefined, run: Pick<ActiveRun, "threadId" | "runId">): Promise<void>;
47
+ export declare function foldAgentChatRunCompletion(repo: unknown, assistantMsg: Parameters<typeof foldAssistantTurn>[1], run: Pick<ActiveRun, "runId" | "turnId" | "parentId" | "agentKitApprovalContinuation">): any;
46
48
  /**
47
49
  * The model this mount runs with, when the caller does not pass one per request.
48
50
  *
@@ -234,6 +234,14 @@ export async function runPreAgentTurnAutosave(callback, scope, run) {
234
234
  console.error("[agent-chat] pre-agent-turn autosave failed:", error);
235
235
  }
236
236
  }
237
+ export function foldAgentChatRunCompletion(repo, assistantMsg, run) {
238
+ return foldAssistantTurn(repo, assistantMsg, {
239
+ runId: run.runId,
240
+ turnId: run.turnId,
241
+ parentId: run.parentId,
242
+ agentKitOwnsContinuation: run.agentKitApprovalContinuation === true,
243
+ });
244
+ }
237
245
  /**
238
246
  * The model this mount runs with, when the caller does not pass one per request.
239
247
  *
@@ -2624,13 +2632,7 @@ export function createAgentChatPlugin(options) {
2624
2632
  }
2625
2633
  if (!Array.isArray(repo.messages))
2626
2634
  repo.messages = [];
2627
- repo = foldAssistantTurn(repo, assistantMsg, {
2628
- runId: run.runId,
2629
- turnId: typeof run.turnId === "string" && run.turnId
2630
- ? run.turnId
2631
- : undefined,
2632
- parentId: run.parentId,
2633
- });
2635
+ repo = foldAgentChatRunCompletion(repo, assistantMsg, run);
2634
2636
  // Store debug metadata so we can inspect what the LLM actually
2635
2637
  // received (system prompt, model, engine) when diagnosing issues.
2636
2638
  const runCtx = getRequestRunContext();
@@ -5036,6 +5038,9 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
5036
5038
  title: typeof r.title === "string" ? r.title : "",
5037
5039
  preview: typeof r.preview === "string" ? r.preview : "",
5038
5040
  messageCount,
5041
+ ...(typeof r.fromMessageId === "string"
5042
+ ? { fromMessageId: r.fromMessageId }
5043
+ : {}),
5039
5044
  ...(Object.prototype.hasOwnProperty.call(r, "scope")
5040
5045
  ? { scope: parseScopeFromBody(r.scope) }
5041
5046
  : {}),
@@ -65,8 +65,8 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
65
65
  error: any;
66
66
  code: any;
67
67
  } | {
68
- error?: undefined;
69
68
  errorCode?: undefined;
69
+ error?: undefined;
70
70
  code?: undefined;
71
71
  ok: boolean;
72
72
  key: string;
@@ -1,9 +1,9 @@
1
1
  export declare function createAgentEngineOllamaModelsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
2
2
  error: string;
3
- models?: undefined;
4
3
  ok?: undefined;
4
+ models?: undefined;
5
5
  } | {
6
+ error?: undefined;
6
7
  ok: boolean;
7
8
  models: string[];
8
- error?: undefined;
9
9
  }>>;
@@ -54,8 +54,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
54
54
  expiresAt?: undefined;
55
55
  ttlSeconds?: undefined;
56
56
  } | {
57
+ error?: undefined;
57
58
  token: string;
58
59
  expiresAt: string;
59
60
  ttlSeconds: number;
60
- error?: undefined;
61
61
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.196.0",
3
+ "version": "0.196.1-nightly-20260928200103",
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": {