@agent-native/core 0.107.0 → 0.107.1

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 (131) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +10 -0
  3. package/corpus/core/docs/content/integrations.mdx +27 -27
  4. package/corpus/core/package.json +1 -1
  5. package/corpus/core/src/agent/production-agent.ts +19 -0
  6. package/corpus/core/src/agent/run-store.ts +98 -2
  7. package/corpus/core/src/client/AssistantChat.tsx +13 -0
  8. package/corpus/core/src/client/CommandMenu.tsx +5 -0
  9. package/corpus/core/src/client/active-run-state.ts +34 -0
  10. package/corpus/core/src/client/agent-chat-adapter.ts +4 -0
  11. package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +41 -11
  12. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +27 -9
  13. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +45 -0
  14. package/corpus/core/src/client/sharing/ShareButton.tsx +30 -9
  15. package/corpus/core/src/client/use-agent-chat-home-handoff.ts +2 -2
  16. package/corpus/core/src/localization/default-messages.ts +4 -1
  17. package/corpus/core/src/secrets/register-framework-secrets.ts +28 -0
  18. package/corpus/core/src/server/agent-chat-plugin.ts +29 -1
  19. package/corpus/core/src/vite/client.ts +24 -0
  20. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +29 -21
  21. package/corpus/templates/analytics/AGENTS.md +8 -0
  22. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +1 -1
  23. package/corpus/templates/analytics/actions/update-dashboard.ts +6 -2
  24. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +35 -7
  25. package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -3
  26. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +11 -1
  27. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/extension-slot.ts +11 -0
  28. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +27 -0
  29. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +6 -0
  30. package/corpus/templates/analytics/changelog/2026-07-17-dashboard-extension-boxes.md +6 -0
  31. package/corpus/templates/analytics/server/lib/agent-readable-resource-context.ts +8 -0
  32. package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -0
  33. package/corpus/templates/assets/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  34. package/corpus/templates/brain/app/hooks/use-navigation-state.ts +6 -1
  35. package/corpus/templates/brain/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  36. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
  37. package/corpus/templates/calendar/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  38. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  39. package/corpus/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  40. package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
  41. package/corpus/templates/clips/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  42. package/corpus/templates/content/actions/_content-space-access.ts +45 -2
  43. package/corpus/templates/content/actions/create-content-database.ts +41 -7
  44. package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
  45. package/corpus/templates/content/app/root.tsx +1 -10
  46. package/corpus/templates/content/changelog/2026-07-17-creating-a-database-now-completes-reliably-in-hosted-workspa.md +6 -0
  47. package/corpus/templates/content/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  48. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +4 -1
  49. package/corpus/templates/dispatch/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  50. package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -4
  51. package/corpus/templates/forms/app/components/ui/popover.tsx +25 -1
  52. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +6 -1
  53. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +13 -10
  54. package/corpus/templates/forms/app/root.tsx +6 -1
  55. package/corpus/templates/forms/changelog/2026-07-17-form-builder-popovers-stay-within-the-viewport.md +6 -0
  56. package/corpus/templates/forms/changelog/2026-07-17-form-editor-loading-matches-current-sidebar-free-layout.md +6 -0
  57. package/corpus/templates/forms/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  58. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -1
  59. package/corpus/templates/mail/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  60. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +14 -3
  61. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +8 -1
  62. package/corpus/templates/plan/app/root.tsx +0 -2
  63. package/corpus/templates/plan/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  64. package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
  65. package/corpus/templates/slides/app/context/DeckContext.tsx +23 -23
  66. package/corpus/templates/slides/changelog/2026-07-17-duplicated-slides-now-stay-in-the-deck.md +6 -0
  67. package/corpus/templates/slides/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  68. package/corpus/templates/tasks/app/components/layout/Layout.tsx +2 -13
  69. package/corpus/templates/tasks/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it.md +6 -0
  70. package/dist/agent/production-agent.d.ts.map +1 -1
  71. package/dist/agent/production-agent.js +13 -1
  72. package/dist/agent/production-agent.js.map +1 -1
  73. package/dist/agent/run-store.d.ts +17 -0
  74. package/dist/agent/run-store.d.ts.map +1 -1
  75. package/dist/agent/run-store.js +84 -2
  76. package/dist/agent/run-store.js.map +1 -1
  77. package/dist/client/AssistantChat.d.ts.map +1 -1
  78. package/dist/client/AssistantChat.js +10 -1
  79. package/dist/client/AssistantChat.js.map +1 -1
  80. package/dist/client/CommandMenu.d.ts.map +1 -1
  81. package/dist/client/CommandMenu.js +4 -0
  82. package/dist/client/CommandMenu.js.map +1 -1
  83. package/dist/client/active-run-state.d.ts +7 -0
  84. package/dist/client/active-run-state.d.ts.map +1 -1
  85. package/dist/client/active-run-state.js +28 -0
  86. package/dist/client/active-run-state.js.map +1 -1
  87. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  88. package/dist/client/agent-chat-adapter.js +4 -1
  89. package/dist/client/agent-chat-adapter.js.map +1 -1
  90. package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
  91. package/dist/client/resources/McpConnectionSuggestion.js +27 -8
  92. package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
  93. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
  94. package/dist/client/resources/McpIntegrationDialog.js +4 -2
  95. package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
  96. package/dist/client/resources/mcp-integration-catalog.d.ts +6 -0
  97. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  98. package/dist/client/resources/mcp-integration-catalog.js +33 -0
  99. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  100. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  101. package/dist/client/sharing/ShareButton.js +15 -12
  102. package/dist/client/sharing/ShareButton.js.map +1 -1
  103. package/dist/client/use-agent-chat-home-handoff.d.ts +1 -1
  104. package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
  105. package/dist/client/use-agent-chat-home-handoff.js +1 -1
  106. package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
  107. package/dist/collab/awareness.d.ts +2 -2
  108. package/dist/collab/awareness.d.ts.map +1 -1
  109. package/dist/collab/routes.d.ts +1 -1
  110. package/dist/collab/struct-routes.d.ts +1 -1
  111. package/dist/localization/default-messages.d.ts +2 -0
  112. package/dist/localization/default-messages.d.ts.map +1 -1
  113. package/dist/localization/default-messages.js +3 -1
  114. package/dist/localization/default-messages.js.map +1 -1
  115. package/dist/observability/routes.d.ts +5 -5
  116. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  117. package/dist/secrets/register-framework-secrets.js +25 -0
  118. package/dist/secrets/register-framework-secrets.js.map +1 -1
  119. package/dist/secrets/routes.d.ts +9 -9
  120. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  121. package/dist/server/agent-chat-plugin.js +23 -1
  122. package/dist/server/agent-chat-plugin.js.map +1 -1
  123. package/dist/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  124. package/dist/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  125. package/dist/vite/client.d.ts.map +1 -1
  126. package/dist/vite/client.js +20 -0
  127. package/dist/vite/client.js.map +1 -1
  128. package/docs/content/integrations.mdx +27 -27
  129. package/package.json +1 -1
  130. package/src/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  131. package/src/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- ok?: undefined;
38
37
  status?: undefined;
38
+ ok?: undefined;
39
39
  } | {
40
- error?: undefined;
41
40
  ok: boolean;
42
41
  status: string;
42
+ error?: undefined;
43
43
  } | {
44
- ok?: undefined;
45
44
  error: string;
46
45
  removed?: undefined;
46
+ ok?: undefined;
47
47
  } | {
48
- error?: undefined;
49
48
  ok: boolean;
50
49
  removed: boolean;
50
+ error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — re-run the validator against the
54
54
  * current stored value without changing anything. Useful for the "Test" button.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
- ok?: undefined;
58
57
  error: string;
59
58
  note?: undefined;
59
+ ok?: undefined;
60
60
  } | {
61
- error?: undefined;
62
61
  ok: boolean;
63
62
  note?: undefined;
64
- } | {
65
63
  error?: undefined;
64
+ } | {
66
65
  ok: boolean;
67
66
  note: string;
67
+ error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,12 +95,12 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
- error?: undefined;
99
98
  ok: boolean;
100
99
  key: string;
101
- } | {
102
100
  error?: undefined;
101
+ } | {
103
102
  ok: boolean;
104
103
  removed: boolean;
104
+ error?: undefined;
105
105
  }>>;
106
106
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-chat-plugin.d.ts","sourceRoot":"","sources":["../../src/server/agent-chat-plugin.ts"],"names":[],"mappings":"AA+IA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACL,yBAAyB,EACzB,KAAK,6BAA6B,EACnC,MAAM,+BAA+B,CAAC;AAkCvC,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,YAAY,EAAE,6BAA6B,EAAE,CAAC;AAuB9C,OAAO,EACL,0BAA0B,EAK1B,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EAE1B,MAAM,oCAAoC,CAAC;AAW5C,OAAO,EACL,gCAAgC,EAOjC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,M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,CAAC"}
@@ -11,7 +11,7 @@ import { AGENT_CHAT_BACKGROUND_RUN_FIELD, AGENT_CHAT_PROCESS_RUN_PATH, backgroun
11
11
  import { resolveEngine, createAnthropicEngine, getStoredModelForEngine, normalizeModelForEngine, getAgentEngineEntry, isAgentEnginePackageInstalled, isStoredEngineUsableForRequest, listAgentEngines, registerBuiltinEngines, } from "../agent/engine/index.js";
12
12
  import { createProductionAgentHandler, actionsToEngineTools, executeAgentToolCall, toolCallCacheKey, getActiveRunForThreadAsync, abortRunDurably, subscribeToRun, } from "../agent/production-agent.js";
13
13
  import { callerHasRunAccess, callerHasThreadAccess, } from "../agent/run-ownership.js";
14
- import { readBackgroundRunClaim } from "../agent/run-store.js";
14
+ import { markTurnAborted, readBackgroundRunClaim } from "../agent/run-store.js";
15
15
  import { buildCurrentTimeUserContext, buildRuntimeContextPrompt, } from "../agent/runtime-context.js";
16
16
  import { buildAssistantMessage, buildUserMessage, extractThreadMeta, foldAssistantTurn, mergeThreadDataForClientSave, upsertUserMessage, } from "../agent/thread-data-builder.js";
17
17
  import { attachToolSearch } from "../agent/tool-search.js";
@@ -3293,6 +3293,25 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
3293
3293
  const canViewThread = (threadId) => callerHasThreadAccess(owner, threadId, "viewer", { orgId });
3294
3294
  const canViewRun = (runId) => callerHasRunAccess(owner, runId, "viewer", { orgId });
3295
3295
  const canEditRun = (runId) => callerHasRunAccess(owner, runId, "editor", { orgId });
3296
+ const canEditThread = (threadId) => callerHasThreadAccess(owner, threadId, "editor", { orgId });
3297
+ // Route: POST /runs/turn/:turnId/abort
3298
+ // Covers the short window where the client has sent a turn but the
3299
+ // server has not yet created its background run id.
3300
+ const turnAbortMatch = url.match(/\/runs\/turn\/([^/?]+)\/abort/) ||
3301
+ url.match(/^\/turn\/([^/?]+)\/abort/);
3302
+ if (turnAbortMatch && method === "POST") {
3303
+ const turnId = decodeURIComponent(turnAbortMatch[1]);
3304
+ const body = await readBody(event).catch(() => null);
3305
+ const threadId = typeof body?.threadId === "string" ? body.threadId : "";
3306
+ if (!/^[a-zA-Z0-9_-]{1,160}$/.test(turnId) ||
3307
+ !threadId ||
3308
+ !(await canEditThread(threadId))) {
3309
+ setResponseStatus(event, 404);
3310
+ return { error: "Run not found" };
3311
+ }
3312
+ await markTurnAborted(threadId, turnId);
3313
+ return { ok: true };
3314
+ }
3296
3315
  // Route: GET /runs/list?goalId=agent-team|agent-harness
3297
3316
  // Returns background agents in the Code hub-compatible run shape.
3298
3317
  const listMatch = url.match(/\/runs\/list(?:[/?]|$)/) ||
@@ -4143,6 +4162,9 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
4143
4162
  }
4144
4163
  workerBody = {
4145
4164
  ...parsedPayload,
4165
+ ...(prepared.body.internalContinuation === true
4166
+ ? { internalContinuation: true }
4167
+ : {}),
4146
4168
  [AGENT_CHAT_BACKGROUND_RUN_FIELD]: preparedMarker,
4147
4169
  };
4148
4170
  }