Benign repos download unavailable

a2a-client-manager.ts

imports @a2a-js/sdk/client/grpcimports undici
SHA-25650c6885e4836c79f958ac0c704cefd67ed25c4d969b00b077021eadf09b18e05

Evidence

SPDX license identifier lines 1–20
1/**
2 * @license
3 * Copyright 2025 Google LLC
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
⋯5 lines
12 TaskStatusUpdateEvent,
13 TaskArtifactUpdateEvent,
14} from '@a2a-js/sdk';
15import type { AuthenticationHandler, Client } from '@a2a-js/sdk/client';
16import {
17 ClientFactory,
18 ClientFactoryOptions,
19 DefaultAgentCardResolver,
20 JsonRpcTrans …
imports @a2a-js/sdk/client/grpc lines 23–35
23:3… from '@a2a-js/sdk/client';
24import { GrpcTransportFactory } from '@a2a-js/sdk/client/grpc';
25import * as grpc from '@grpc/grpc-js';
26import { v4 as uuidv4 } from 'uuid';
27import { Agent as UndiciAgent, ProxyAgent } from 'undici';
28import { normalizeAgentCard } from './a2aUtils.js';
29import type { Config } from '../config/config.js';
30import { debugLogger } from '../utils/debugLogger.js';
31import { classifyAgentError } from './a2a-errors.js';
32
33/**
34 * Result of sending a message, which can be a full message, a task,
35 * or an increment …
English function-word token "the" lines 43–52
43:46… eep Research).
44// Use a dedicated dispatcher so the global 5-min timeout isn't affected.
45const A2A_TIMEOUT = 1800000; // 30 minutes
46
47/**
48 * Orchestrates communication with remote A2A agents.
49 * Manages protocol negotiation, authentication, and transport selection.
50 */
51export class A2AClientManager {
52 private static instance: A2AClientMa …
English function-word token "this" lines 65–73
65:19… A2A_TIMEOUT,
66 };
67
68 if (proxyUrl) {
69 this.a2aDispatcher = new ProxyAgent({
70 uri: proxyUrl,
71 ...agentOptions,
72 });
73 …
English function-word token "for" lines 90–96
90
91 /**
92 * Resets the singleton instance. Only for testing purposes.
93 * @internal
94 */
95 static resetInstanceForTesting() {
96 // @ts-expect-e …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.