@agent-native/core 0.131.2 → 0.131.3
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 +28 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/types.ts +6 -0
- package/corpus/core/src/action.ts +13 -0
- package/corpus/core/src/server/agent-capabilities.ts +43 -8
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +63 -1
- package/corpus/templates/analytics/AGENTS.md +5 -0
- package/corpus/templates/analytics/actions/hubspot-deals.ts +1 -0
- package/corpus/templates/analytics/actions/hubspot-records.ts +1 -0
- package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +2 -0
- package/corpus/templates/calendar/actions/get-event.ts +1 -0
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +1 -0
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +7 -3
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +14 -19
- package/corpus/templates/calendar/app/hooks/use-events.ts +7 -0
- package/corpus/templates/calendar/app/lib/event-form-utils.ts +13 -0
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +21 -14
- package/corpus/templates/calendar/changelog/2026-07-29-unnamed-events-now-use-a-title-placeholder.md +6 -0
- package/corpus/templates/calendar/server/lib/google-calendar.ts +2 -0
- package/corpus/templates/calendar/server/lib/ical-fetcher.ts +1 -0
- package/corpus/templates/calendar/shared/api.ts +2 -0
- package/corpus/templates/slides/.agents/skills/analytics-data-for-decks/SKILL.md +48 -0
- package/corpus/templates/slides/AGENTS.md +3 -0
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +72 -8
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/changelog/2026-07-29-google-slides-exports-can-connect-your-google-account-direct.md +6 -0
- package/corpus/templates/slides/server/handlers/google-docs-auth.ts +4 -2
- package/dist/a2a/types.d.ts +6 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +13 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
- package/dist/notifications/routes.d.ts +5 -5
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-capabilities.d.ts.map +1 -1
- package/dist/server/agent-capabilities.js +32 -3
- package/dist/server/agent-capabilities.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +17 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +50 -1
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +1 -1
- package/src/a2a/types.ts +6 -0
- package/src/action.ts +13 -0
- package/src/server/agent-capabilities.ts +43 -8
- package/src/server/agent-chat/action-filters-a2a.ts +63 -1
|
@@ -65,10 +65,49 @@ export function filterPublicAgentActions(
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Input fields that unambiguously carry a program the receiver executes.
|
|
70
|
+
*
|
|
71
|
+
* Deliberately excludes `query`: across the templates that field is nearly
|
|
72
|
+
* always natural-language search text (Brain's `search-everything`,
|
|
73
|
+
* `search-knowledge`), and blocking it would break exactly the ask-don't-instruct
|
|
74
|
+
* calls this rule exists to encourage.
|
|
75
|
+
*/
|
|
76
|
+
const RAW_QUERY_INPUT_FIELDS = new Set(["sql", "code", "script", "expression"]);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* True when an action takes a free-form query or program as input — raw SQL, a
|
|
80
|
+
* code body, an arbitrary expression.
|
|
81
|
+
*
|
|
82
|
+
* Such an action must not be sibling-invocable over A2A. The app that owns the
|
|
83
|
+
* data owns its schema, data dictionary, skills, and reference queries; a
|
|
84
|
+
* calling app has none of that, so letting it pass SQL means every caller
|
|
85
|
+
* reimplements the owner's schema knowledge badly and silently rots when the
|
|
86
|
+
* owner's shape changes. Callers ask the owning app a question; the owner
|
|
87
|
+
* forms the query. Set `publicAgent.allowRawQueryInput` to opt a specific
|
|
88
|
+
* action out of this rule.
|
|
89
|
+
*/
|
|
90
|
+
export function hasRawQueryInput(entry: ActionEntry): boolean {
|
|
91
|
+
const parameters = entry.tool?.parameters as
|
|
92
|
+
| { properties?: Record<string, { type?: unknown }> }
|
|
93
|
+
| undefined;
|
|
94
|
+
const properties = parameters?.properties;
|
|
95
|
+
if (!properties || typeof properties !== "object") return false;
|
|
96
|
+
return Object.entries(properties).some(([field, schema]) => {
|
|
97
|
+
const type = schema?.type;
|
|
98
|
+
const acceptsString =
|
|
99
|
+
type === "string" ||
|
|
100
|
+
type === undefined ||
|
|
101
|
+
(Array.isArray(type) && type.includes("string"));
|
|
102
|
+
return RAW_QUERY_INPUT_FIELDS.has(field.toLowerCase()) && acceptsString;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
68
106
|
/**
|
|
69
107
|
* Direct A2A action calls share the authenticated external-agent policy with
|
|
70
108
|
* MCP, but remain stricter: only explicitly exposed, authenticated read-only
|
|
71
|
-
* actions can skip the receiver's model loop
|
|
109
|
+
* actions can skip the receiver's model loop, and never one that takes a raw
|
|
110
|
+
* query the caller wrote.
|
|
72
111
|
*/
|
|
73
112
|
export function filterDirectA2AActions(
|
|
74
113
|
actions: Record<string, ActionEntry>,
|
|
@@ -86,8 +125,11 @@ export function filterDirectA2AActions(
|
|
|
86
125
|
(autoReads &&
|
|
87
126
|
isAuthenticatedReadAction(entry) &&
|
|
88
127
|
!isAutoReadExcludedActionName(name));
|
|
128
|
+
const rawQueryAllowed =
|
|
129
|
+
!hasRawQueryInput(entry) || exposure?.allowRawQueryInput === true;
|
|
89
130
|
return (
|
|
90
131
|
selected &&
|
|
132
|
+
rawQueryAllowed &&
|
|
91
133
|
!denied.has(name) &&
|
|
92
134
|
entry.agentTool !== false &&
|
|
93
135
|
entry.readOnly === true &&
|
|
@@ -108,6 +150,7 @@ export function buildPublicAgentA2ASkills(
|
|
|
108
150
|
name: string;
|
|
109
151
|
description: string;
|
|
110
152
|
publicAgent: ActionEntry["publicAgent"];
|
|
153
|
+
inputSchema?: Record<string, unknown>;
|
|
111
154
|
}> {
|
|
112
155
|
return Object.entries(filterPublicAgentActions(actions)).map(
|
|
113
156
|
([name, entry]) => ({
|
|
@@ -115,6 +158,14 @@ export function buildPublicAgentA2ASkills(
|
|
|
115
158
|
name,
|
|
116
159
|
description: entry.tool.description,
|
|
117
160
|
publicAgent: entry.publicAgent,
|
|
161
|
+
...(entry.tool.parameters
|
|
162
|
+
? {
|
|
163
|
+
inputSchema: entry.tool.parameters as unknown as Record<
|
|
164
|
+
string,
|
|
165
|
+
unknown
|
|
166
|
+
>,
|
|
167
|
+
}
|
|
168
|
+
: {}),
|
|
118
169
|
}),
|
|
119
170
|
);
|
|
120
171
|
}
|
|
@@ -135,6 +186,7 @@ export function buildAuthenticatedAgentA2ASkills(
|
|
|
135
186
|
name: string;
|
|
136
187
|
description: string;
|
|
137
188
|
publicAgent: ActionEntry["publicAgent"];
|
|
189
|
+
inputSchema?: Record<string, unknown>;
|
|
138
190
|
}> {
|
|
139
191
|
return Object.entries(filterDirectA2AActions(actions, options)).map(
|
|
140
192
|
([name, entry]) => ({
|
|
@@ -142,6 +194,16 @@ export function buildAuthenticatedAgentA2ASkills(
|
|
|
142
194
|
name,
|
|
143
195
|
description: entry.tool.description,
|
|
144
196
|
publicAgent: entry.publicAgent,
|
|
197
|
+
// Naming an action without its parameters is what makes a caller invoke
|
|
198
|
+
// it with `{}` and fail on a required field.
|
|
199
|
+
...(entry.tool.parameters
|
|
200
|
+
? {
|
|
201
|
+
inputSchema: entry.tool.parameters as unknown as Record<
|
|
202
|
+
string,
|
|
203
|
+
unknown
|
|
204
|
+
>,
|
|
205
|
+
}
|
|
206
|
+
: {}),
|
|
145
207
|
}),
|
|
146
208
|
);
|
|
147
209
|
}
|