@agent-native/core 0.106.1 → 0.106.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 +12 -0
- package/corpus/core/docs/content/external-agents.mdx +8 -0
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +7 -0
- package/corpus/core/docs/content/locales/ar-SA/mcp-protocol.mdx +7 -0
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/de-DE/mcp-protocol.mdx +9 -0
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/es-ES/mcp-protocol.mdx +9 -0
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/fr-FR/mcp-protocol.mdx +9 -0
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +8 -0
- package/corpus/core/docs/content/locales/hi-IN/mcp-protocol.mdx +8 -0
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +8 -0
- package/corpus/core/docs/content/locales/ja-JP/mcp-protocol.mdx +8 -0
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +8 -0
- package/corpus/core/docs/content/locales/ko-KR/mcp-protocol.mdx +8 -0
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/pt-BR/mcp-protocol.mdx +9 -0
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/mcp-protocol.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.mdx +6 -0
- package/corpus/core/docs/content/mcp-protocol.mdx +8 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/artifact-response.ts +84 -0
- package/corpus/core/src/agent/thread-data-builder.ts +1 -1
- package/corpus/core/src/integrations/webhook-handler.ts +41 -5
- package/corpus/core/src/mcp/builtin-tools.ts +115 -10
- package/corpus/core/src/server/agent-chat-plugin.ts +7 -2
- package/corpus/templates/clips/app/components/capture-install-options.tsx +60 -5
- package/corpus/templates/clips/app/components/library/library-layout.tsx +9 -1
- package/corpus/templates/clips/app/hooks/use-desktop-promo.ts +4 -4
- package/corpus/templates/clips/app/i18n/ar-SA.ts +1 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +1 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +1 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +1 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +1 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +1 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +1 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +1 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/clips/app/lib/capture-install-options.ts +89 -4
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +10 -1
- package/corpus/templates/clips/app/routes/record.tsx +1 -0
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +7 -0
- package/corpus/templates/clips/changelog/2026-07-16-the-desktop-app-button-now-shows-open-desktop-app-and-launch.md +6 -0
- package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +5 -0
- package/corpus/templates/clips/desktop/src-tauri/capabilities/default.json +1 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +41 -6
- package/corpus/templates/clips/desktop/src-tauri/tauri.conf.json +5 -0
- package/corpus/templates/content/.agents/skills/content/SKILL.md +31 -0
- package/corpus/templates/content/changelog/2026-07-16-slack-corrections-now-preserve-newer-content-values-unless-y.md +6 -0
- package/dist/a2a/artifact-response.d.ts +9 -0
- package/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +68 -0
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/agent/thread-data-builder.js +1 -1
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +24 -5
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/mcp/builtin-tools.d.ts.map +1 -1
- package/dist/mcp/builtin-tools.js +87 -6
- package/dist/mcp/builtin-tools.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +3 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/docs/content/external-agents.mdx +8 -0
- package/docs/content/locales/ar-SA/external-agents.mdx +7 -0
- package/docs/content/locales/ar-SA/mcp-protocol.mdx +7 -0
- package/docs/content/locales/de-DE/external-agents.mdx +9 -0
- package/docs/content/locales/de-DE/mcp-protocol.mdx +9 -0
- package/docs/content/locales/es-ES/external-agents.mdx +9 -0
- package/docs/content/locales/es-ES/mcp-protocol.mdx +9 -0
- package/docs/content/locales/fr-FR/external-agents.mdx +9 -0
- package/docs/content/locales/fr-FR/mcp-protocol.mdx +9 -0
- package/docs/content/locales/hi-IN/external-agents.mdx +8 -0
- package/docs/content/locales/hi-IN/mcp-protocol.mdx +8 -0
- package/docs/content/locales/ja-JP/external-agents.mdx +8 -0
- package/docs/content/locales/ja-JP/mcp-protocol.mdx +8 -0
- package/docs/content/locales/ko-KR/external-agents.mdx +8 -0
- package/docs/content/locales/ko-KR/mcp-protocol.mdx +8 -0
- package/docs/content/locales/pt-BR/external-agents.mdx +9 -0
- package/docs/content/locales/pt-BR/mcp-protocol.mdx +9 -0
- package/docs/content/locales/zh-CN/external-agents.mdx +6 -0
- package/docs/content/locales/zh-CN/mcp-protocol.mdx +6 -0
- package/docs/content/locales/zh-TW/external-agents.mdx +6 -0
- package/docs/content/locales/zh-TW/mcp-protocol.mdx +6 -0
- package/docs/content/mcp-protocol.mdx +8 -0
- package/package.json +1 -1
|
@@ -48,6 +48,15 @@ use util::{
|
|
|
48
48
|
// should replace with their real icon.
|
|
49
49
|
pub(crate) const TRAY_PNG: &[u8] = include_bytes!("../icons/tray.png");
|
|
50
50
|
|
|
51
|
+
fn present_popover(app: &tauri::AppHandle) {
|
|
52
|
+
if let Some(window) = app.get_webview_window("popover") {
|
|
53
|
+
set_capture_included(&window);
|
|
54
|
+
configure_overlay_behavior(&window);
|
|
55
|
+
position_popover(app, &window);
|
|
56
|
+
present_interactive_window(&window);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
51
60
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
52
61
|
pub fn run() {
|
|
53
62
|
sentry_report::init();
|
|
@@ -57,12 +66,7 @@ pub fn run() {
|
|
|
57
66
|
// Second launch just focuses the popover of the already-running
|
|
58
67
|
// instance. Prevents the "two tray icons" UX where clicks fight
|
|
59
68
|
// over focus and neither popover shows.
|
|
60
|
-
|
|
61
|
-
set_capture_included(&window);
|
|
62
|
-
configure_overlay_behavior(&window);
|
|
63
|
-
position_popover(app, &window);
|
|
64
|
-
present_interactive_window(&window);
|
|
65
|
-
}
|
|
69
|
+
present_popover(app);
|
|
66
70
|
}))
|
|
67
71
|
.invoke_handler(tauri::generate_handler![
|
|
68
72
|
// clips commands
|
|
@@ -189,6 +193,7 @@ pub fn run() {
|
|
|
189
193
|
logfile::open_logs,
|
|
190
194
|
])
|
|
191
195
|
.plugin(tauri_plugin_shell::init())
|
|
196
|
+
.plugin(tauri_plugin_deep_link::init())
|
|
192
197
|
.plugin(tauri_plugin_process::init())
|
|
193
198
|
.plugin(tauri_plugin_fs::init())
|
|
194
199
|
.plugin(
|
|
@@ -236,6 +241,36 @@ pub fn run() {
|
|
|
236
241
|
err
|
|
237
242
|
})?;
|
|
238
243
|
|
|
244
|
+
// clips:// deep-link handler — a web "Open desktop app" click
|
|
245
|
+
// launches or focuses the running tray popover (same as a second
|
|
246
|
+
// launch). macOS registers the scheme via Info.plist at build time;
|
|
247
|
+
// Windows/Linux register it at runtime below.
|
|
248
|
+
{
|
|
249
|
+
use tauri_plugin_deep_link::DeepLinkExt;
|
|
250
|
+
let dl_handle = app.handle().clone();
|
|
251
|
+
app.deep_link().on_open_url(move |event| {
|
|
252
|
+
let urls: Vec<String> =
|
|
253
|
+
event.urls().iter().map(|u| u.to_string()).collect();
|
|
254
|
+
dlog!("[clips-tray] deep link opened: {:?}", urls);
|
|
255
|
+
present_popover(&dl_handle);
|
|
256
|
+
let _ = dl_handle.emit("clips:deep-link", urls);
|
|
257
|
+
});
|
|
258
|
+
#[cfg(any(windows, target_os = "linux"))]
|
|
259
|
+
if let Err(err) = app.deep_link().register_all() {
|
|
260
|
+
eprintln!("[clips-tray] deep link register_all failed: {err}");
|
|
261
|
+
}
|
|
262
|
+
// On Linux/Windows a cold launch from clips:// arrives as startup
|
|
263
|
+
// arguments rather than an on_open_url event. Consume it here so
|
|
264
|
+
// the popover appears and the browser does not hit its fallback.
|
|
265
|
+
if let Ok(Some(urls)) = app.deep_link().get_current() {
|
|
266
|
+
let url_strings: Vec<String> =
|
|
267
|
+
urls.iter().map(|u| u.to_string()).collect();
|
|
268
|
+
dlog!("[clips-tray] deep link cold start: {:?}", url_strings);
|
|
269
|
+
present_popover(app.handle());
|
|
270
|
+
let _ = app.handle().emit("clips:deep-link", url_strings);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
239
274
|
if let Err(err) = notifications::show_meeting_notification_window(app.handle()) {
|
|
240
275
|
println!("[clips-tray] show meeting notification failed: {err}");
|
|
241
276
|
}
|
|
@@ -39,6 +39,11 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"plugins": {
|
|
42
|
+
"deep-link": {
|
|
43
|
+
"desktop": {
|
|
44
|
+
"schemes": ["clips"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
42
47
|
"shell": {
|
|
43
48
|
"open": "(((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+|(zoommtg://([A-Za-z0-9-]+\\.)*zoom\\.us/join\\?.+)|(ms-settings:[A-Za-z0-9._?=&-]+))"
|
|
44
49
|
},
|
|
@@ -137,6 +137,37 @@ intent:
|
|
|
137
137
|
explicitly asks for a new artifact. Do not blindly submit another row merely
|
|
138
138
|
because a new Slack message arrived.
|
|
139
139
|
|
|
140
|
+
For a correction to an existing artifact, treat Slack history as identity and
|
|
141
|
+
intent context, not as the current record state. A title captured when the row
|
|
142
|
+
was created is a historical title: it may help locate the stable document ID,
|
|
143
|
+
but it is not authoritative after the row has been renamed in Content. Once the
|
|
144
|
+
stable ID is known, an external Slack or A2A correction must call
|
|
145
|
+
`pull-document` first to flush any open collaborative editor state; fail closed
|
|
146
|
+
if that flush/read cannot complete. Then read the canonical database row from
|
|
147
|
+
Content immediately before building the update. Treat those freshly read
|
|
148
|
+
values as authoritative for every field the correction does not explicitly
|
|
149
|
+
change.
|
|
150
|
+
|
|
151
|
+
Build corrections as sparse patches:
|
|
152
|
+
|
|
153
|
+
- Include only fields the user explicitly asks to change. "Keep," "preserve,"
|
|
154
|
+
"leave as is," and "unchanged" are constraints, not new values; omit those
|
|
155
|
+
fields from the mutation so a newer Content-side value cannot be overwritten
|
|
156
|
+
by stale Slack context.
|
|
157
|
+
- Omission and clearing are different operations. An omitted field keeps its
|
|
158
|
+
live Content value. Clear a field only when the user explicitly asks to
|
|
159
|
+
remove, unset, or clear it, and use the empty representation accepted by the
|
|
160
|
+
current database schema.
|
|
161
|
+
- Never reconstruct a full-row update from the original Slack request. Derive
|
|
162
|
+
the patch from the correction message and the freshly read canonical row,
|
|
163
|
+
while preserving the stable document ID.
|
|
164
|
+
- After the mutation, read the row again and verify that the requested fields
|
|
165
|
+
changed and the mutation did not include omitted fields. Post-write
|
|
166
|
+
verification is not compare-and-swap: it can reveal an unexpected result but
|
|
167
|
+
cannot prevent a concurrent edit between the read and a blind metadata or
|
|
168
|
+
property write. Report an action-provided conflict when one exists; otherwise
|
|
169
|
+
keep the patch minimal and do not claim the write was conflict-safe.
|
|
170
|
+
|
|
140
171
|
Apply people fields from verified identity and intent, not from convenient
|
|
141
172
|
guesswork:
|
|
142
173
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface A2AToolResultSummary {
|
|
2
2
|
tool: string;
|
|
3
3
|
result: string;
|
|
4
|
+
isError?: boolean;
|
|
5
|
+
completedSideEffect?: boolean;
|
|
4
6
|
}
|
|
5
7
|
export interface A2AArtifactResponseOptions {
|
|
6
8
|
baseUrl?: string;
|
|
@@ -23,4 +25,11 @@ export declare function stripA2APersistedArtifactMarkers(text: string): string;
|
|
|
23
25
|
export declare function extractA2AArtifactIdentities(results: A2AToolResultSummary[]): A2AArtifactIdentity[];
|
|
24
26
|
export declare function appendA2AArtifactLinks(responseText: string, toolResults: A2AToolResultSummary[], options?: A2AArtifactResponseOptions): string;
|
|
25
27
|
export declare function buildA2ARecoverableArtifactMessage(toolResults: A2AToolResultSummary[], options?: A2AArtifactResponseOptions): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Build a bounded participant-facing receipt from authenticated artifact writes.
|
|
30
|
+
* Unlike generic artifact recovery, this only trusts identities extracted from
|
|
31
|
+
* successful write actions (or a signed downstream write ledger), so a read or
|
|
32
|
+
* an unverified URL cannot be rounded up to a successful mutation.
|
|
33
|
+
*/
|
|
34
|
+
export declare function buildA2AVerifiedMutationReceipt(toolResults: A2AToolResultSummary[], options?: A2AArtifactResponseOptions): string | null;
|
|
26
35
|
//# sourceMappingURL=artifact-response.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-response.d.ts","sourceRoot":"","sources":["../../src/a2a/artifact-response.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"artifact-response.d.ts","sourceRoot":"","sources":["../../src/a2a/artifact-response.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EACR,UAAU,GACV,MAAM,GACN,WAAW,GACX,UAAU,GACV,OAAO,GACP,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAiGD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErE;AA4uBD;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,oBAAoB,EAAE,GAC9B,mBAAmB,EAAE,CAqGvB;AA2YD,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,oBAAoB,EAAE,EACnC,OAAO,GAAE,0BAA+B,GACvC,MAAM,CA8IR;AAED,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,oBAAoB,EAAE,EACnC,OAAO,GAAE,0BAA+B,GACvC,MAAM,GAAG,IAAI,CA8Bf;AAmCD;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,oBAAoB,EAAE,EACnC,OAAO,GAAE,0BAA+B,GACvC,MAAM,GAAG,IAAI,CAqBf"}
|
|
@@ -6,6 +6,7 @@ const ARTIFACT_IDENTITY_WRITE_TOOLS = new Set([
|
|
|
6
6
|
"add-database-item",
|
|
7
7
|
"create-document",
|
|
8
8
|
"update-document",
|
|
9
|
+
"set-document-property",
|
|
9
10
|
"create-deck",
|
|
10
11
|
"duplicate-deck",
|
|
11
12
|
"add-slide",
|
|
@@ -367,6 +368,8 @@ function collectArtifacts(results) {
|
|
|
367
368
|
const monitors = new Map();
|
|
368
369
|
const forms = new Map();
|
|
369
370
|
for (const toolResult of results) {
|
|
371
|
+
if (toolResult.isError === true || toolResult.completedSideEffect === false)
|
|
372
|
+
continue;
|
|
370
373
|
if (toolResult.tool === "call-agent") {
|
|
371
374
|
for (const artifact of parseDownstreamArtifactBlock(toolResult.result)) {
|
|
372
375
|
if (artifact.kind === "deck") {
|
|
@@ -452,6 +455,8 @@ function collectArtifacts(results) {
|
|
|
452
455
|
}
|
|
453
456
|
if (toolResult.tool === "create-document" ||
|
|
454
457
|
toolResult.tool === "update-document") {
|
|
458
|
+
if (parsed.conflict === true)
|
|
459
|
+
continue;
|
|
455
460
|
const id = stringValue(parsed.id);
|
|
456
461
|
if (id) {
|
|
457
462
|
documents.set(id, {
|
|
@@ -462,6 +467,16 @@ function collectArtifacts(results) {
|
|
|
462
467
|
}
|
|
463
468
|
continue;
|
|
464
469
|
}
|
|
470
|
+
if (toolResult.tool === "set-document-property") {
|
|
471
|
+
const id = stringValue(parsed.documentId);
|
|
472
|
+
if (id) {
|
|
473
|
+
documents.set(id, {
|
|
474
|
+
id,
|
|
475
|
+
url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
continue;
|
|
479
|
+
}
|
|
465
480
|
if (toolResult.tool === "get-document" ||
|
|
466
481
|
toolResult.tool === "get-content-document") {
|
|
467
482
|
const document = asRecord(parsed.document);
|
|
@@ -658,6 +673,8 @@ export function extractA2AArtifactIdentities(results) {
|
|
|
658
673
|
identities.set(`${identity.resourceType}:${identity.id}`, identity);
|
|
659
674
|
};
|
|
660
675
|
for (const result of results) {
|
|
676
|
+
if (result.isError === true || result.completedSideEffect === false)
|
|
677
|
+
continue;
|
|
661
678
|
if (result.tool === "call-agent") {
|
|
662
679
|
for (const identity of persistedArtifactIdentitiesFromMarker(result.result)) {
|
|
663
680
|
remember({ ...identity, sourceAction: "call-agent" });
|
|
@@ -1153,4 +1170,55 @@ export function buildA2ARecoverableArtifactMessage(toolResults, options = {}) {
|
|
|
1153
1170
|
...lines,
|
|
1154
1171
|
].join("\n");
|
|
1155
1172
|
}
|
|
1173
|
+
function mutationReceiptUrl(identity, baseUrl) {
|
|
1174
|
+
if (identity.sourceAction === "call-agent" &&
|
|
1175
|
+
(!identity.url || identity.url.startsWith("/"))) {
|
|
1176
|
+
return undefined;
|
|
1177
|
+
}
|
|
1178
|
+
if (identity.url) {
|
|
1179
|
+
return identity.url.startsWith("/")
|
|
1180
|
+
? artifactUrl(baseUrl, identity.url)
|
|
1181
|
+
: identity.url;
|
|
1182
|
+
}
|
|
1183
|
+
const path = identity.resourceType === "document"
|
|
1184
|
+
? `/page/${identity.id}`
|
|
1185
|
+
: identity.resourceType === "deck"
|
|
1186
|
+
? `/deck/${identity.id}`
|
|
1187
|
+
: identity.resourceType === "dashboard"
|
|
1188
|
+
? `/adhoc/${identity.id}`
|
|
1189
|
+
: identity.resourceType === "analysis"
|
|
1190
|
+
? `/analyses/${identity.id}`
|
|
1191
|
+
: identity.resourceType === "image"
|
|
1192
|
+
? `/image/${identity.id}`
|
|
1193
|
+
: identity.resourceType === "design"
|
|
1194
|
+
? `/design/${identity.id}`
|
|
1195
|
+
: undefined;
|
|
1196
|
+
return path ? artifactUrl(baseUrl, path) : undefined;
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Build a bounded participant-facing receipt from authenticated artifact writes.
|
|
1200
|
+
* Unlike generic artifact recovery, this only trusts identities extracted from
|
|
1201
|
+
* successful write actions (or a signed downstream write ledger), so a read or
|
|
1202
|
+
* an unverified URL cannot be rounded up to a successful mutation.
|
|
1203
|
+
*/
|
|
1204
|
+
export function buildA2AVerifiedMutationReceipt(toolResults, options = {}) {
|
|
1205
|
+
const baseUrl = normalizeBaseUrl(options.baseUrl);
|
|
1206
|
+
const identities = extractA2AArtifactIdentities(toolResults);
|
|
1207
|
+
if (identities.length === 0)
|
|
1208
|
+
return null;
|
|
1209
|
+
const lines = identities.map((identity) => {
|
|
1210
|
+
const label = identity.resourceType.charAt(0).toUpperCase() +
|
|
1211
|
+
identity.resourceType.slice(1);
|
|
1212
|
+
const url = mutationReceiptUrl(identity, baseUrl);
|
|
1213
|
+
return url
|
|
1214
|
+
? `- ${label}: ${url} (ID: ${identity.id})`
|
|
1215
|
+
: `- ${label} ID: ${identity.id}`;
|
|
1216
|
+
});
|
|
1217
|
+
return [
|
|
1218
|
+
"A verified change was saved, but I couldn't generate the detailed summary.",
|
|
1219
|
+
"",
|
|
1220
|
+
"Saved artifacts:",
|
|
1221
|
+
...lines,
|
|
1222
|
+
].join("\n");
|
|
1223
|
+
}
|
|
1156
1224
|
//# sourceMappingURL=artifact-response.js.map
|