@agent-native/core 0.211.0 → 0.211.1-nightly-20261020213022

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 (52) hide show
  1. package/dist/cli/template-baseline.js +18 -5
  2. package/dist/cli/template-sync.js +100 -19
  3. package/dist/collab/__fixtures__/live-copy-tasks.d.ts +1 -0
  4. package/dist/collab/__fixtures__/live-copy-tasks.js +92 -0
  5. package/dist/collab/awareness.d.ts +2 -2
  6. package/dist/collab/bounded-task-bundle.d.ts +17 -0
  7. package/dist/collab/bounded-task-bundle.js +39 -0
  8. package/dist/collab/bounded-task-source.d.ts +14 -0
  9. package/dist/collab/bounded-task-source.js +8 -0
  10. package/dist/collab/bounded-tasks.d.ts +67 -0
  11. package/dist/collab/bounded-tasks.js +439 -0
  12. package/dist/collab/index.d.ts +5 -2
  13. package/dist/collab/index.js +5 -2
  14. package/dist/collab/live-copy-tasks.d.ts +80 -0
  15. package/dist/collab/live-copy-tasks.js +330 -0
  16. package/dist/collab/live-copy.d.ts +188 -0
  17. package/dist/collab/live-copy.js +415 -0
  18. package/dist/collab/routes.d.ts +6 -1
  19. package/dist/collab/routes.js +24 -8
  20. package/dist/collab/storage.d.ts +53 -1
  21. package/dist/collab/storage.js +93 -5
  22. package/dist/collab/ydoc-manager.d.ts +92 -3
  23. package/dist/collab/ydoc-manager.js +447 -38
  24. package/dist/db/client.d.ts +6 -0
  25. package/dist/db/client.js +25 -5
  26. package/dist/deploy/build.js +2 -0
  27. package/dist/extensions/actions.js +1 -0
  28. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  29. package/dist/jobs/actions/manage-recurring-job.d.ts +1 -1
  30. package/dist/mcp/agent-connected.js +5 -1
  31. package/dist/mcp/build-server.js +39 -10
  32. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  33. package/dist/org/handlers.d.ts +1 -1
  34. package/dist/org/index.d.ts +1 -1
  35. package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
  36. package/dist/provider-api/actions/provider-api.d.ts +11 -11
  37. package/dist/resources/handlers.d.ts +1 -1
  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/collab-plugin.d.ts +10 -1
  41. package/dist/server/collab-plugin.js +89 -20
  42. package/dist/server/realtime-token.d.ts +1 -1
  43. package/dist/shared/optional-node-builtins.d.ts +1 -0
  44. package/dist/shared/optional-node-builtins.js +3 -0
  45. package/dist/tracking/providers.d.ts +1 -0
  46. package/dist/tracking/providers.js +2 -1
  47. package/dist/triggers/actions/manage-automation.d.ts +2 -2
  48. package/dist/vite/bounded-task-plugin.d.ts +22 -0
  49. package/dist/vite/bounded-task-plugin.js +44 -0
  50. package/dist/vite/client.js +2 -0
  51. package/dist/vitest-config.js +3 -0
  52. package/package.json +4 -3
package/dist/db/client.js CHANGED
@@ -1720,12 +1720,32 @@ export function annotateMissingTable(err, sql) {
1720
1720
  return err;
1721
1721
  }
1722
1722
  const scopedDbExec = new AsyncLocalStorage();
1723
+ const transactionCallbacks = new AsyncLocalStorage();
1723
1724
  export function withDbExec(exec, run) {
1724
1725
  return scopedDbExec.run(guardSchemaMutations(exec), run);
1725
1726
  }
1726
1727
  export function getScopedDbExec() {
1727
1728
  return scopedDbExec.getStore();
1728
1729
  }
1730
+ /**
1731
+ * True while a `getDbExec().transaction()` callback runs. That callback leaves
1732
+ * `getScopedDbExec()` unset, so code that must not run inside a caller's
1733
+ * transaction asks this as well.
1734
+ */
1735
+ export function insideDbTransactionCallback() {
1736
+ return transactionCallbacks.getStore()?.active === true;
1737
+ }
1738
+ async function inTransactionCallback(run) {
1739
+ const callback = { active: true };
1740
+ try {
1741
+ return await transactionCallbacks.run(callback, run);
1742
+ }
1743
+ finally {
1744
+ // Work the callback started and left running inherits this store; once
1745
+ // the callback settles, that work is no longer inside the transaction.
1746
+ callback.active = false;
1747
+ }
1748
+ }
1729
1749
  export function getDbExec() {
1730
1750
  const scoped = scopedDbExec.getStore();
1731
1751
  if (scoped)
@@ -1784,13 +1804,13 @@ export function getDbExec() {
1784
1804
  if (!currentExec.transaction) {
1785
1805
  throw new Error("This database does not support transactions.");
1786
1806
  }
1787
- return currentExec.transaction((tx) => fn({
1807
+ return currentExec.transaction((tx) => inTransactionCallback(() => fn({
1788
1808
  execute: (s) => {
1789
1809
  assertSchemaMutationAllowed(s);
1790
1810
  return tx.execute(sanitize(s));
1791
1811
  },
1792
1812
  transaction: tx.transaction?.bind(tx),
1793
- }));
1813
+ })));
1794
1814
  }
1795
1815
  : undefined,
1796
1816
  };
@@ -1806,19 +1826,19 @@ export function getDbExec() {
1806
1826
  const exec = await initializeProxy();
1807
1827
  Object.assign(proxy, createInitializedProxy(exec));
1808
1828
  if (exec.transaction) {
1809
- return exec.transaction((tx) => fn({
1829
+ return exec.transaction((tx) => inTransactionCallback(() => fn({
1810
1830
  execute: (s) => {
1811
1831
  assertSchemaMutationAllowed(s);
1812
1832
  return tx.execute(sanitize(s));
1813
1833
  },
1814
1834
  transaction: tx.transaction?.bind(tx),
1815
- }));
1835
+ })));
1816
1836
  }
1817
1837
  if (exec.atomicBatch) {
1818
1838
  throw new Error("This database supports atomic batches, not interactive transactions.");
1819
1839
  }
1820
1840
  const wrapper = createInitializedProxy(exec);
1821
- return explicitTransaction(wrapper.execute.bind(wrapper))(fn);
1841
+ return explicitTransaction(wrapper.execute.bind(wrapper))((tx) => inTransactionCallback(() => fn(tx)));
1822
1842
  },
1823
1843
  async atomicBatch(statements) {
1824
1844
  for (const statement of statements) {
@@ -28,6 +28,7 @@ import { AGENT_NATIVE_SOCIAL_IMAGE_ALT, AGENT_NATIVE_SOCIAL_IMAGE_CACHE_BUSTER,
28
28
  import { workspaceAppAudienceFromEnv, workspaceAppAudienceFromPackageJson, workspaceAppRouteAccessFromEnv, workspaceAppRouteAccessFromPackageJson, } from "../shared/workspace-app-audience.js";
29
29
  import { generateActionRegistryForProject } from "../vite/action-types-plugin.js";
30
30
  import { createAgentNativeConfigContext, loadResolvedAgentNativeConfig, readAgentNativeBuildConfigMarker, resolveFirstRunOnboardingBuildReplacement, resolveHarnessBuildReplacement, } from "../vite/agent-native-config-loader.js";
31
+ import { boundedTaskSourcePlugin } from "../vite/bounded-task-plugin.js";
31
32
  import { createSentryServerSourceMapUploadPlugins } from "../vite/sentry-source-maps.js";
32
33
  import { cloneServerBundleForFunction, copyDir, pruneSsrIslandFromRewritingClone, readPackageManifest, SERVERLESS_BROWSER_RUNTIME_PACKAGES, } from "./function-bundle.js";
33
34
  import { collectImmutableAssetPaths, IMMUTABLE_ASSET_CACHE_CONTROL, IMMUTABLE_ASSET_CACHE_HEADERS, prefixAssetPath, } from "./immutable-assets.js";
@@ -4863,6 +4864,7 @@ export default bundle;
4863
4864
  ? [createCloudflareModuleStubPlugin()]
4864
4865
  : []),
4865
4866
  createBrowserOnlyServerStubPlugin(),
4867
+ boundedTaskSourcePlugin(),
4866
4868
  ...sentryServerSourceMapPlugins,
4867
4869
  ...(enterpriseAuthAdaptersEnabled
4868
4870
  ? []
@@ -905,6 +905,7 @@ export function createExtensionActionEntries() {
905
905
  items: result.rows ?? [],
906
906
  };
907
907
  },
908
+ readOnly: true,
908
909
  },
909
910
  "delete-extension": {
910
911
  tool: {
@@ -33,9 +33,9 @@ declare const _default: import("../../action.js").ActionDefinition<{
33
33
  idempotencyKey: string;
34
34
  deleted: boolean;
35
35
  } | {
36
+ id?: undefined;
36
37
  error: string;
37
38
  url?: undefined;
38
- id?: undefined;
39
39
  provider?: undefined;
40
40
  configured?: undefined;
41
41
  } | {
@@ -45,8 +45,8 @@ declare const _default: import("../../action.js").ActionDefinition<{
45
45
  configured?: undefined;
46
46
  error?: undefined;
47
47
  } | {
48
- url?: undefined;
49
48
  id?: undefined;
49
+ url?: undefined;
50
50
  provider?: undefined;
51
51
  error: string;
52
52
  configured: boolean;
@@ -11,9 +11,9 @@ declare const _default: import("../../action.js").ActionDefinition<{
11
11
  enabled?: undefined;
12
12
  nextRun?: undefined;
13
13
  } | {
14
- deleted?: undefined;
15
14
  name: string;
16
15
  enabled: boolean;
17
16
  nextRun: string;
17
+ deleted?: undefined;
18
18
  }>;
19
19
  export default _default;
@@ -3,6 +3,7 @@ import { CLIENTS } from "../cli/mcp-config-writers.js";
3
3
  import { mutateSetting } from "../settings/store.js";
4
4
  import { normalizeTrackingDimension } from "../shared/analytics-events.js";
5
5
  import { resolveMcpConnectHostId } from "../shared/mcp-connect-content.js";
6
+ import { AGENT_NATIVE_ANALYTICS_PROVIDER } from "../tracking/providers.js";
6
7
  import { isTrackingSuppressed, listTrackingProviders, track, } from "../tracking/registry.js";
7
8
  import { detectVendorClient } from "./analytics.js";
8
9
  import { connectAppLabel, connectEnvironment } from "./connect-app-label.js";
@@ -21,7 +22,10 @@ export async function trackAgentConnected(input) {
21
22
  // Everything runs inside the try: the connection is already committed, so a
22
23
  // tracking or configuration failure must not turn it into a failed response.
23
24
  try {
24
- if (listTrackingProviders().length === 0 ||
25
+ // The claim is permanent, so take it only when first-party analytics will
26
+ // receive the event; a vendor-only claim would hide every later reconnect
27
+ // from first-party analytics once it is enabled.
28
+ if (!listTrackingProviders().includes(AGENT_NATIVE_ANALYTICS_PROVIDER) ||
25
29
  isTrackingSuppressed(input.email))
26
30
  return "disabled";
27
31
  const app = connectionApp(input.origin, input.appId);
@@ -132,8 +132,11 @@ function scopeToolSearchToAdvertised(advertised, advertisable) {
132
132
  },
133
133
  };
134
134
  }
135
- function withoutExternalOptOuts(actions) {
136
- return Object.fromEntries(Object.entries(actions).filter(([, entry]) => isActionExposedToExternalAgents(entry)));
135
+ // The operator's `denyActions` veto lives here with the action's own opt-out,
136
+ // so no catalog branch, `tool-search` or `tools/call` path has to remember it.
137
+ function withoutExternalOptOuts(config, actions) {
138
+ const denyNames = externalAgentDenySet(config);
139
+ return Object.fromEntries(Object.entries(actions).filter(([name, entry]) => !denyNames.has(name) && isActionExposedToExternalAgents(entry)));
137
140
  }
138
141
  /**
139
142
  * Converts an action's input schema the first time a request needs it, and
@@ -211,7 +214,7 @@ export function validateMcpDirectoryProfile(config, sourceActions = config.produ
211
214
  if (new Set(names).size !== names.length) {
212
215
  throw new McpDirectoryProfileValidationError("[agent-native] MCP directory catalog cannot contain duplicate tool names.");
213
216
  }
214
- const actions = withoutExternalOptOuts(withoutToolSearch(sourceActions));
217
+ const actions = withoutExternalOptOuts(config, withoutToolSearch(sourceActions));
215
218
  const reserved = new Set([
216
219
  ...COMPACT_MCP_APP_CATALOG_BUILTINS,
217
220
  "ask-agent",
@@ -249,6 +252,20 @@ export function validateMcpDirectoryProfile(config, sourceActions = config.produ
249
252
  }
250
253
  }
251
254
  const profile = config.directoryProfile;
255
+ // Widget grants can name actions hidden from the agent surface, which the
256
+ // filter above never sees.
257
+ const denyNames = externalAgentDenySet(config);
258
+ const deniedWidgetAction = [
259
+ ...(profile?.widgetReadOnlyActions ?? []),
260
+ ...(profile?.widgetReadPublicActions ?? []),
261
+ ...(profile?.widgetReadPrivateActions ?? []),
262
+ ...(profile?.widgetReadAuthenticatedActions ?? []),
263
+ ...Object.keys(profile?.widgetReadActionArguments ?? {}),
264
+ ...Object.keys(profile?.widgetWriteActionArguments ?? {}),
265
+ ].find((name) => denyNames.has(name));
266
+ if (deniedWidgetAction) {
267
+ throw new McpDirectoryProfileValidationError(`[agent-native] MCP directory widget action "${deniedWidgetAction}" is listed in externalAgents.denyActions.`);
268
+ }
252
269
  const widgetActionNames = names.filter((name) => Boolean(actions[name]?.mcpApp?.resource));
253
270
  const widgetReadOnlyActions = new Set(profile?.widgetReadOnlyActions ?? []);
254
271
  const widgetReadPublicActions = new Set(profile?.widgetReadPublicActions ?? []);
@@ -1962,7 +1979,13 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
1962
1979
  const mergedActions = appCatalog || directoryCatalog
1963
1980
  ? baseActions
1964
1981
  : mergeBuiltinTools(config, baseActions, requestMeta);
1965
- const actions = withoutExternalOptOuts(flatCatalog ? withoutToolSearch(mergedActions) : mergedActions);
1982
+ const actions = withoutExternalOptOuts(config, flatCatalog ? withoutToolSearch(mergedActions) : mergedActions);
1983
+ // Tools built outside the action map (`ask-agent`, `create_embed_session`)
1984
+ // never pass through the filter above, so tools/list and tools/call refuse a
1985
+ // denied name too. `ask-agent` runs `ask_app`, so denying either removes it.
1986
+ const deniedToolNames = externalAgentDenySet(config);
1987
+ if (deniedToolNames.has("ask_app"))
1988
+ deniedToolNames.add("ask-agent");
1966
1989
  const { isAdvertisable, advertisable, inputSchema: advertisedInputSchema, } = advertisedInputSchemas(actions);
1967
1990
  const scopeVisibleActions = Object.fromEntries(Object.entries(actions).filter(([, entry]) => isActionVisibleForOAuthScope(entry, effectiveIdentity?.oauthScopes)));
1968
1991
  const orgIdPromise = resolveMcpIdentityOrgId(effectiveIdentity);
@@ -1996,7 +2019,6 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
1996
2019
  ...declaredMcpToolNames(visibleActions),
1997
2020
  ...autoReadNames,
1998
2021
  ]);
1999
- const denyNames = externalAgentDenySet(config);
2000
2022
  const automaticConnectorPolicyActive = config.externalAgents?.authenticatedReads === "auto";
2001
2023
  const connectorCatalogActive = !appCatalog &&
2002
2024
  !fullCatalogRequested &&
@@ -2006,15 +2028,12 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
2006
2028
  const writesAreAskAppOnly = externalAgentWritesAreAskAppOnly(config);
2007
2029
  const preserveCompactActions = config.connectorCatalog === undefined && !automaticConnectorPolicyActive;
2008
2030
  const advertisedActionsBeforeToolSearchScope = appCatalog
2009
- ? Object.fromEntries(Object.entries(visibleActions).filter(([name]) => !denyNames.has(name)))
2031
+ ? visibleActions
2010
2032
  : directoryCatalog
2011
2033
  ? Object.fromEntries(Object.entries(visibleActions).filter(([name, entry]) => connectorNames.has(name) &&
2012
- !denyNames.has(name) &&
2013
2034
  (!writesAreAskAppOnly || isMcpReadOnlyTool(entry))))
2014
2035
  : connectorCatalogActive
2015
2036
  ? Object.fromEntries(Object.entries(visibleActions).filter(([name, entry]) => {
2016
- if (denyNames.has(name))
2017
- return false;
2018
2037
  if (COMPACT_MCP_APP_CATALOG_BUILTINS.has(name))
2019
2038
  return true;
2020
2039
  if (!connectorNames.has(name) &&
@@ -2326,7 +2345,7 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
2326
2345
  });
2327
2346
  }
2328
2347
  tools.sort((a, b) => compareMcpCatalogValues(a.name, b.name));
2329
- return { tools };
2348
+ return { tools: tools.filter((tool) => !deniedToolNames.has(tool.name)) };
2330
2349
  });
2331
2350
  trackMcpToolsList(analyticsContext(request, ctx), {
2332
2351
  toolNames: result.tools.map((tool) => tool.name),
@@ -2368,6 +2387,16 @@ export async function createMCPServerForRequest(config, identity, requestMeta) {
2368
2387
  : undefined;
2369
2388
  const result = await withToolCallContext(async () => {
2370
2389
  const { name, arguments: args } = request.params;
2390
+ if (deniedToolNames.has(name)) {
2391
+ failure = {
2392
+ errorType: "unknown_tool",
2393
+ errorMessage: `Unknown tool: ${name}`,
2394
+ };
2395
+ return {
2396
+ content: [{ type: "text", text: `Unknown tool: ${name}` }],
2397
+ isError: true,
2398
+ };
2399
+ }
2371
2400
  try {
2372
2401
  const { allowedActions } = await resolveServiceGrant();
2373
2402
  assertServicePrincipalMayCall(allowedActions, name);
@@ -140,13 +140,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
140
140
  clientHint?: undefined;
141
141
  timestamp?: undefined;
142
142
  chapterId?: undefined;
143
- count?: undefined;
144
143
  startAt?: undefined;
145
144
  endAt?: undefined;
146
145
  reason?: undefined;
147
146
  includeMicrophone?: undefined;
148
147
  includeSystemAudio?: undefined;
149
148
  requestId?: undefined;
149
+ count?: undefined;
150
150
  };
151
151
  required?: undefined;
152
152
  };
@@ -171,13 +171,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
171
171
  clientHint?: undefined;
172
172
  timestamp?: undefined;
173
173
  chapterId?: undefined;
174
- count?: undefined;
175
174
  startAt?: undefined;
176
175
  endAt?: undefined;
177
176
  reason?: undefined;
178
177
  includeMicrophone?: undefined;
179
178
  includeSystemAudio?: undefined;
180
179
  requestId?: undefined;
180
+ count?: undefined;
181
181
  };
182
182
  required?: undefined;
183
183
  };
@@ -196,13 +196,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
196
196
  clientHint?: undefined;
197
197
  timestamp?: undefined;
198
198
  chapterId?: undefined;
199
- count?: undefined;
200
199
  startAt?: undefined;
201
200
  endAt?: undefined;
202
201
  reason?: undefined;
203
202
  includeMicrophone?: undefined;
204
203
  includeSystemAudio?: undefined;
205
204
  requestId?: undefined;
205
+ count?: undefined;
206
206
  };
207
207
  required?: undefined;
208
208
  };
@@ -231,13 +231,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
231
231
  };
232
232
  timestamp?: undefined;
233
233
  chapterId?: undefined;
234
- count?: undefined;
235
234
  startAt?: undefined;
236
235
  endAt?: undefined;
237
236
  reason?: undefined;
238
237
  includeMicrophone?: undefined;
239
238
  includeSystemAudio?: undefined;
240
239
  requestId?: undefined;
240
+ count?: undefined;
241
241
  };
242
242
  };
243
243
  } | {
@@ -260,12 +260,12 @@ export declare function screenMemoryMcpToolDefinitions(): ({
260
260
  description: string;
261
261
  };
262
262
  chapterId?: undefined;
263
- count?: undefined;
264
263
  startAt?: undefined;
265
264
  endAt?: undefined;
266
265
  includeMicrophone?: undefined;
267
266
  includeSystemAudio?: undefined;
268
267
  requestId?: undefined;
268
+ count?: undefined;
269
269
  };
270
270
  };
271
271
  } | {
@@ -317,7 +317,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
317
317
  clientHint?: undefined;
318
318
  timestamp?: undefined;
319
319
  chapterId?: undefined;
320
- count?: undefined;
321
320
  startAt: {
322
321
  type: string;
323
322
  description: string;
@@ -337,6 +336,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
337
336
  type: string;
338
337
  };
339
338
  requestId?: undefined;
339
+ count?: undefined;
340
340
  };
341
341
  };
342
342
  } | {
@@ -352,7 +352,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
352
352
  clientHint?: undefined;
353
353
  timestamp?: undefined;
354
354
  chapterId?: undefined;
355
- count?: undefined;
356
355
  startAt?: undefined;
357
356
  endAt?: undefined;
358
357
  reason?: undefined;
@@ -361,6 +360,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
361
360
  requestId: {
362
361
  type: string;
363
362
  };
363
+ count?: undefined;
364
364
  };
365
365
  };
366
366
  })[];
@@ -73,9 +73,9 @@ export declare const setWorkspaceAppDefaultVisibilityHandler: import("h3").Event
73
73
  }>>;
74
74
  export declare const createOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
75
75
  success: boolean;
76
+ id?: undefined;
76
77
  name?: undefined;
77
78
  role?: undefined;
78
- id?: undefined;
79
79
  } | {
80
80
  success?: undefined;
81
81
  id: string;
@@ -163,9 +163,9 @@ export declare const getMyOrgHandler: import("h3").EventHandlerWithFetch<import(
163
163
  }>>;
164
164
  export declare const createOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
165
165
  success: boolean;
166
+ id?: undefined;
166
167
  name?: undefined;
167
168
  role?: undefined;
168
- id?: undefined;
169
169
  } | {
170
170
  success?: undefined;
171
171
  id: string;
@@ -77,6 +77,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
77
77
  }, z.core.$strip>>, {
78
78
  message?: undefined;
79
79
  id?: undefined;
80
+ deleted?: undefined;
81
+ found?: undefined;
80
82
  providers: {
81
83
  id: string;
82
84
  label: string;
@@ -88,46 +90,44 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
88
90
  }[];
89
91
  count: number;
90
92
  provider?: undefined;
91
- found?: undefined;
92
- deleted?: undefined;
93
93
  registered?: undefined;
94
94
  label?: undefined;
95
95
  } | {
96
96
  message?: undefined;
97
97
  id?: undefined;
98
- providers?: undefined;
99
98
  count?: undefined;
99
+ deleted?: undefined;
100
+ providers?: undefined;
100
101
  found: boolean;
101
102
  provider: import("../custom-registry.js").CustomProviderConfig;
102
- deleted?: undefined;
103
103
  registered?: undefined;
104
104
  label?: undefined;
105
105
  } | {
106
106
  message?: undefined;
107
- providers?: undefined;
108
107
  count?: undefined;
108
+ deleted?: undefined;
109
+ providers?: undefined;
109
110
  provider?: undefined;
110
111
  found: boolean;
111
112
  id: string;
112
- deleted?: undefined;
113
113
  registered?: undefined;
114
114
  label?: undefined;
115
115
  } | {
116
116
  message?: undefined;
117
- providers?: undefined;
118
117
  count?: undefined;
119
- provider?: undefined;
120
118
  found?: undefined;
119
+ providers?: undefined;
120
+ provider?: undefined;
121
121
  deleted: boolean;
122
122
  id: string;
123
123
  registered?: undefined;
124
124
  label?: undefined;
125
125
  } | {
126
- providers?: undefined;
127
126
  count?: undefined;
128
- provider?: undefined;
129
- found?: undefined;
130
127
  deleted?: undefined;
128
+ found?: undefined;
129
+ providers?: undefined;
130
+ provider?: undefined;
131
131
  registered: boolean;
132
132
  id: string;
133
133
  label: string;
@@ -316,9 +316,11 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
316
316
  notes?: string | undefined;
317
317
  scope?: "org" | "user" | undefined;
318
318
  }, {
319
- provider?: undefined;
320
319
  id?: undefined;
320
+ provider?: undefined;
321
+ message?: undefined;
321
322
  deleted?: undefined;
323
+ found?: undefined;
322
324
  providers: {
323
325
  id: string;
324
326
  label: string;
@@ -329,46 +331,44 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
329
331
  updatedAt: number;
330
332
  }[];
331
333
  count: number;
332
- found?: undefined;
333
334
  registered?: undefined;
334
335
  label?: undefined;
335
- message?: undefined;
336
336
  } | {
337
337
  id?: undefined;
338
+ count?: undefined;
339
+ message?: undefined;
338
340
  deleted?: undefined;
339
341
  providers?: undefined;
340
- count?: undefined;
341
342
  found: boolean;
342
343
  provider: import("../custom-registry.js").CustomProviderConfig;
343
344
  registered?: undefined;
344
345
  label?: undefined;
345
- message?: undefined;
346
346
  } | {
347
347
  provider?: undefined;
348
+ count?: undefined;
349
+ message?: undefined;
348
350
  deleted?: undefined;
349
351
  providers?: undefined;
350
- count?: undefined;
351
352
  found: boolean;
352
353
  id: string;
353
354
  registered?: undefined;
354
355
  label?: undefined;
355
- message?: undefined;
356
356
  } | {
357
357
  provider?: undefined;
358
- providers?: undefined;
359
358
  count?: undefined;
359
+ message?: undefined;
360
360
  found?: undefined;
361
+ providers?: undefined;
361
362
  deleted: boolean;
362
363
  id: string;
363
364
  registered?: undefined;
364
365
  label?: undefined;
365
- message?: undefined;
366
366
  } | {
367
367
  provider?: undefined;
368
- deleted?: undefined;
369
- providers?: undefined;
370
368
  count?: undefined;
369
+ deleted?: undefined;
371
370
  found?: undefined;
371
+ providers?: undefined;
372
372
  registered: boolean;
373
373
  id: string;
374
374
  label: string;
@@ -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
- ok?: undefined;
43
42
  error: string;
43
+ ok?: undefined;
44
44
  } | {
45
45
  error?: undefined;
46
46
  ok: boolean;
@@ -67,12 +67,12 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
67
67
  code: any;
68
68
  } | {
69
69
  errorCode?: undefined;
70
+ error?: undefined;
70
71
  code?: undefined;
71
72
  ok: boolean;
72
73
  key: string;
73
74
  baseUrlKey?: string;
74
75
  scope: AgentEngineApiKeyScope;
75
76
  defaultModel?: import("./agent-engine-default-model-route.js").SavedKeyDefaultModelOutcome;
76
- error?: undefined;
77
77
  }>>;
78
78
  export {};
@@ -1,9 +1,9 @@
1
1
  export declare function createAgentEngineOllamaModelsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
2
2
  error: string;
3
- ok?: undefined;
4
3
  models?: undefined;
4
+ ok?: undefined;
5
5
  } | {
6
- error?: undefined;
7
6
  ok: boolean;
8
7
  models: string[];
8
+ error?: undefined;
9
9
  }>>;
@@ -1,3 +1,4 @@
1
+ import { LiveCopyError, type LiveCopyBinding } from "../collab/live-copy.js";
1
2
  import { type DbExec } from "../db/client.js";
2
3
  type NitroPluginDef = (nitroApp: any) => void | Promise<void>;
3
4
  export type CollabResourceIdResolver = (docId: string) => string | null | Promise<string | null>;
@@ -22,7 +23,14 @@ export interface CollabPluginOptions {
22
23
  idColumn?: string;
23
24
  autoSeed?: boolean;
24
25
  resolveSourceIdFromCollabDocumentId?: (docId: string) => string;
25
- onContentSync?: (docId: string, text: string) => Promise<void>;
26
+ /**
27
+ * Documents this binding covers are live copies: each update commits with
28
+ * its derived text, and the text, JSON and search-replace routes refuse
29
+ * them. Requires `autoSeed: false`; seed with `seedLiveCopy`. Passing the
30
+ * binding here also imports it at server start, so the refusal holds from
31
+ * the first request rather than from whenever an action first loads it.
32
+ */
33
+ liveCopy?: LiveCopyBinding;
26
34
  contentType?: "text" | "json";
27
35
  jsonColumn?: string;
28
36
  access?: CollabAccess;
@@ -48,5 +56,6 @@ export declare function createCollabSourceSeeder(options: {
48
56
  seed: (docId: string, source: string, client?: DbExec) => Promise<void>;
49
57
  withLock?: (docId: string, run: (client?: DbExec) => Promise<void>) => Promise<void>;
50
58
  }): (docId: string) => Promise<void>;
59
+ export declare function liveCopyErrorStatus(error: LiveCopyError): number;
51
60
  export declare function createCollabPlugin(options?: CollabPluginOptions): NitroPluginDef;
52
61
  export {};