Files
VolcanicAgenticCore/extensions/Volcanic.AgenticCore.Extensions.A2A/A2AClientSettings.cs
EugeneTes a92623b89b fix(a2a-client): save every file the remote agent returns, per task, with size and type
File parts were only taken from artifacts as inline bytes up to 10 MB; parts in the
status message or the history were dropped silently, URL parts were never downloaded,
and a plain message reply lost its files. Files now go to inbox/a2a/<taskId>/ from
artifacts, status message and recent agent messages (deduplicated), URLs are streamed
to disk (agent key only on the agent's origin, else https without it), the cap is the
new MaxReceivedFileBytes (200 MB), and results list path, bytes and media type or why
a file was not saved. Re-saving a task overwrites, so action=status refetches files.
2026-10-12 16:16:14 +00:00

27 lines
1.3 KiB
C#

namespace Volcanic.AgenticCore.Extensions.A2A;
/// <summary>Section <c>A2AClient</c> (env <c>A2AClient__…</c>). Named so it doesn't clash with the SDK's <c>A2AClientOptions</c>.</summary>
public sealed class A2AClientSettings
{
public const string SectionName = "A2AClient";
/// <summary>Off by default: no <c>a2a</c> tool, no watches. Independent of the server's <c>A2A:Enabled</c>.</summary>
public bool Enabled { get; set; }
/// <summary>How long <c>send</c> waits for a result before a watch takes over. 0 hands over at once.</summary>
public int WaitSeconds { get; set; } = 60;
public TimeSpan WatchTimeout { get; set; } = TimeSpan.FromDays(1);
public int CardTimeoutSeconds { get; set; } = 10;
public long MaxFileBytes { get; set; } = 10 * 1024 * 1024;
/// <summary>Cap per file the remote agent sends back (inline bytes or a downloaded link).</summary>
public long MaxReceivedFileBytes { get; set; } = 200 * 1024 * 1024;
/// <summary>
/// Our public base URL for push webhooks (<c>{PushBaseUrl}/a2a/push/{watchId}</c>). Set by the host from the server's
/// <c>A2A:PublicUrl</c> only while the server (and so the push receiver) is on; null = subscribe or poll.
/// </summary>
public string? PushBaseUrl { get; set; }
}