@agent-native/core 0.209.0-nightly-20261014124140 → 0.209.0
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/dist/agent/production-agent.d.ts +8 -0
- package/dist/agent/production-agent.js +68 -3
- package/dist/agent/strict-tool-input.d.ts +4 -0
- package/dist/agent/strict-tool-input.js +26 -0
- package/dist/agent/types.d.ts +7 -0
- package/dist/cli/skills-content/turn-into-app-attachments.d.ts +1 -1
- package/dist/cli/skills-content/turn-into-app-attachments.js +1 -3
- package/dist/cli/skills-content/turn-into-app-skill.d.ts +2 -2
- package/dist/cli/skills-content/turn-into-app-skill.js +15 -10
- package/dist/client/chat/agentkit-protocol.js +2 -0
- package/dist/client/chat/runtime.d.ts +1 -0
- package/dist/client/chat/runtime.js +35 -3
- package/dist/collab/routes.d.ts +2 -2
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/mcp/actions/call-mcp-tool.js +1 -1
- package/dist/mcp-client/app-api.d.ts +3 -0
- package/dist/mcp-client/app-api.js +8 -1
- package/dist/mcp-client/index.d.ts +7 -2
- package/dist/mcp-client/index.js +10 -4
- package/dist/mcp-client/manager.d.ts +16 -1
- package/dist/mcp-client/manager.js +35 -7
- package/dist/mcp-client/routes.js +9 -4
- package/dist/observability/metrics.d.ts +2 -0
- package/dist/observability/metrics.js +15 -1
- package/dist/observability/traces.js +8 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
- package/dist/provider-api/actions/provider-api.d.ts +10 -10
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-chat/additional-actions.d.ts +45 -0
- package/dist/server/agent-chat/additional-actions.js +707 -0
- package/dist/server/agent-chat/mcp-glue.d.ts +3 -1
- package/dist/server/agent-chat/mcp-glue.js +12 -1
- package/dist/server/agent-chat/plugin-options.d.ts +27 -0
- package/dist/server/agent-chat-plugin.js +59 -14
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-ollama-models-route.d.ts +2 -2
- package/dist/server/better-auth-instance.js +108 -18
- package/dist/server/builder-browser.d.ts +4 -2
- package/dist/server/builder-browser.js +21 -16
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/shared/data-url.d.ts +2 -0
- package/dist/shared/data-url.js +12 -0
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/attachments.md +1 -3
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +13 -8
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/source-brief.md +2 -2
- package/docs/content/agent-surfaces.mdx +61 -0
- package/docs/content/observability.mdx +2 -0
- package/package.json +5 -4
- package/src/templates/workspace-core/.agents/skills/turn-into-app/references/attachments.md +1 -3
- package/src/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +13 -8
- package/src/templates/workspace-core/.agents/skills/turn-into-app/references/source-brief.md +2 -2
|
@@ -311,10 +311,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
+
message?: undefined;
|
|
314
315
|
id?: undefined;
|
|
315
316
|
deleted?: undefined;
|
|
316
|
-
message?: undefined;
|
|
317
|
-
found?: undefined;
|
|
318
317
|
providers: {
|
|
319
318
|
id: string;
|
|
320
319
|
label: string;
|
|
@@ -326,44 +325,45 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
326
325
|
}[];
|
|
327
326
|
count: number;
|
|
328
327
|
provider?: undefined;
|
|
328
|
+
found?: undefined;
|
|
329
329
|
registered?: undefined;
|
|
330
330
|
label?: undefined;
|
|
331
331
|
} | {
|
|
332
|
+
message?: undefined;
|
|
332
333
|
id?: undefined;
|
|
333
334
|
deleted?: undefined;
|
|
334
|
-
count?: undefined;
|
|
335
|
-
message?: undefined;
|
|
336
335
|
providers?: undefined;
|
|
336
|
+
count?: undefined;
|
|
337
337
|
found: boolean;
|
|
338
338
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
339
339
|
registered?: undefined;
|
|
340
340
|
label?: undefined;
|
|
341
341
|
} | {
|
|
342
|
-
deleted?: undefined;
|
|
343
|
-
count?: undefined;
|
|
344
342
|
message?: undefined;
|
|
343
|
+
deleted?: undefined;
|
|
345
344
|
providers?: undefined;
|
|
345
|
+
count?: undefined;
|
|
346
346
|
provider?: undefined;
|
|
347
347
|
found: boolean;
|
|
348
348
|
id: string;
|
|
349
349
|
registered?: undefined;
|
|
350
350
|
label?: undefined;
|
|
351
351
|
} | {
|
|
352
|
-
count?: undefined;
|
|
353
352
|
message?: undefined;
|
|
354
|
-
found?: undefined;
|
|
355
353
|
providers?: undefined;
|
|
354
|
+
count?: undefined;
|
|
356
355
|
provider?: undefined;
|
|
356
|
+
found?: undefined;
|
|
357
357
|
deleted: boolean;
|
|
358
358
|
id: string;
|
|
359
359
|
registered?: undefined;
|
|
360
360
|
label?: undefined;
|
|
361
361
|
} | {
|
|
362
362
|
deleted?: undefined;
|
|
363
|
-
count?: undefined;
|
|
364
|
-
found?: undefined;
|
|
365
363
|
providers?: undefined;
|
|
364
|
+
count?: undefined;
|
|
366
365
|
provider?: undefined;
|
|
366
|
+
found?: undefined;
|
|
367
367
|
registered: boolean;
|
|
368
368
|
id: string;
|
|
369
369
|
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;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ActionEntry } from "../../agent/production-agent.js";
|
|
2
|
+
/**
|
|
3
|
+
* The agent loop a request runs on: interactive chat (production or dev), an
|
|
4
|
+
* A2A task, or an MCP `ask_app` call.
|
|
5
|
+
*/
|
|
6
|
+
export type AgentChatAdditionalActionsSurface = "chat" | "a2a" | "mcp";
|
|
7
|
+
/** Surfaces an app must opt into before its additional actions reach them. */
|
|
8
|
+
export type AgentChatAdditionalActionsExternalSurface = Exclude<AgentChatAdditionalActionsSurface, "chat">;
|
|
9
|
+
export interface AgentChatAdditionalActionsDetails {
|
|
10
|
+
surface: AgentChatAdditionalActionsSurface;
|
|
11
|
+
/** The H3 event. Absent for `mcp`, which runs outside a chat handler. */
|
|
12
|
+
event?: any;
|
|
13
|
+
ownerEmail: string;
|
|
14
|
+
orgId: string | null;
|
|
15
|
+
}
|
|
16
|
+
export type ResolveAgentChatAdditionalActions = (details: AgentChatAdditionalActionsDetails) => Record<string, ActionEntry> | Promise<Record<string, ActionEntry>>;
|
|
17
|
+
export interface AppAdditionalActionsConfig {
|
|
18
|
+
resolver: ResolveAgentChatAdditionalActions | undefined;
|
|
19
|
+
/** Surfaces besides chat the app opted into. */
|
|
20
|
+
externalSurfaces: readonly AgentChatAdditionalActionsExternalSurface[];
|
|
21
|
+
/**
|
|
22
|
+
* True for every name any surface can dispatch to a framework, template, or
|
|
23
|
+
* dev implementation, including names the current surface leaves out.
|
|
24
|
+
*/
|
|
25
|
+
isReservedName: (name: string) => boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function normalizeAdditionalActionSurfaces(surfaces: readonly string[] | undefined): AgentChatAdditionalActionsExternalSurface[];
|
|
28
|
+
/**
|
|
29
|
+
* Runs the app's `resolveAdditionalActions` once for one request and returns
|
|
30
|
+
* the entries that may join that request's registry.
|
|
31
|
+
*
|
|
32
|
+
* Everything the app returns is untrusted: it may carry names, descriptions,
|
|
33
|
+
* and schemas a user registered. An entry is dropped (and reported once) when
|
|
34
|
+
* its name is malformed or reserved, when it is an `mcp__` name this caller
|
|
35
|
+
* cannot see, or when its tool definition is unusable. Each kept entry is bound
|
|
36
|
+
* to the caller it was resolved for and its `run` is wrapped so every call,
|
|
37
|
+
* from any dispatcher, rechecks that caller, enforces the entry's `access`
|
|
38
|
+
* policy, and validates the arguments against its schema without coercion.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveAppAdditionalActions(config: AppAdditionalActionsConfig, details: {
|
|
41
|
+
surface: AgentChatAdditionalActionsSurface;
|
|
42
|
+
event?: any;
|
|
43
|
+
ownerEmail: string | null | undefined;
|
|
44
|
+
orgId: string | null | undefined;
|
|
45
|
+
}, registered: Record<string, ActionEntry>): Promise<Record<string, ActionEntry>>;
|