@kodax-ai/kodax 0.7.69 → 0.7.71
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/CHANGELOG.md +187 -1
- package/LICENSE +158 -191
- package/README.md +100 -17
- package/README_CN.md +77 -11
- package/config-templates/integrations/a2a.example.jsonc +62 -18
- package/dist/chunks/{agent-DQRXT6M7.js → agent-X2EWQADL.js} +1 -1
- package/dist/chunks/argument-completer-BLNXDO2F.js +2 -0
- package/dist/chunks/chunk-23X6REO4.js +46 -0
- package/dist/chunks/{chunk-Y4WOTWUC.js → chunk-44QXPEEE.js} +1 -1
- package/dist/chunks/chunk-4DY756KL.js +70 -0
- package/dist/chunks/{chunk-AWMTNUDS.js → chunk-52JSZ77P.js} +1 -1
- package/dist/chunks/{chunk-I4TPQEJN.js → chunk-64NQBOSN.js} +1 -1
- package/dist/chunks/{chunk-URC6ZI6P.js → chunk-A2TFSV5M.js} +1 -1
- package/dist/chunks/{chunk-ZG4DMYBS.js → chunk-A574DBTV.js} +2 -2
- package/dist/chunks/{chunk-VAZ25MDX.js → chunk-F7KGYHJ3.js} +2 -2
- package/dist/chunks/{chunk-M7TCFYTO.js → chunk-GVTM4Z6O.js} +66 -22
- package/dist/chunks/{chunk-PA76WUBL.js → chunk-PHH4TRGF.js} +2 -2
- package/dist/chunks/chunk-PVUXONQB.js +366 -0
- package/dist/chunks/{chunk-WW2O2DEP.js → chunk-SX2WFHIS.js} +1 -1
- package/dist/chunks/{chunk-4WIODYOH.js → chunk-T7LYK53M.js} +2 -2
- package/dist/chunks/{chunk-F7C7J6IM.js → chunk-VRSVNU2Y.js} +3 -3
- package/dist/chunks/chunk-Y5XKAN7C.js +755 -0
- package/dist/chunks/{chunk-NGJURAY5.js → chunk-Z535BARK.js} +4 -4
- package/dist/chunks/chunk-ZJIMT5I3.js +78 -0
- package/dist/chunks/compaction-config-5KKKXYFT.js +2 -0
- package/dist/chunks/{construction-bootstrap-GH6RW6ST.js → construction-bootstrap-OXDDDW6O.js} +1 -1
- package/dist/chunks/{dist-DRBKYVHF.js → dist-GOUP4YVE.js} +1 -1
- package/dist/chunks/{dist-RWL2RBO4.js → dist-IXJRJ27U.js} +1 -1
- package/dist/chunks/host-VRKDAN26.js +2 -0
- package/dist/chunks/run-manager-Z3W6MDO7.js +2 -0
- package/dist/chunks/{utils-QYE5Y73D.js → utils-CFOXDCB5.js} +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1365 -1296
- package/dist/provider-capabilities.json +101 -57
- package/dist/runtime-worker.js +1224 -1156
- package/dist/sdk-a2a.d.ts +187 -22
- package/dist/sdk-a2a.js +8 -7
- package/dist/sdk-agent.d.ts +49 -20
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +33 -25
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +1 -1
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +7 -7
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +2 -2
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +17 -17
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-runtime.d.ts +96 -17
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +7 -7
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +10 -10
- package/dist/types-chunks/{base.d-CYjtB68X.d.ts → base.d-Cz_rwpOi.d.ts} +2 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-BkIA8Wto.d.ts → bash-prefix-extractor.d-YoiZl5yt.d.ts} +15 -5
- package/dist/types-chunks/{capability-learning.d-WtsyRv3O.d.ts → capability-learning.d-_lR0J4iR.d.ts} +1 -1
- package/dist/types-chunks/{capability.d-3C62G8Eq.d.ts → capability.d-K664nHOS.d.ts} +21 -6
- package/dist/types-chunks/{capsule.d-xJvfh4YR.d.ts → capsule.d-CK5Pfz1k.d.ts} +3 -3
- package/dist/types-chunks/{commands.d-DkPfcQWG.d.ts → commands.d-D6g2jq8V.d.ts} +4 -4
- package/dist/types-chunks/{guardrail.d-R7AiGfrI.d.ts → guardrail.d-DdeDWnVu.d.ts} +3 -3
- package/dist/types-chunks/{guardrail.d-6ZDbNbHO.d.ts → guardrail.d-DilYC1dh.d.ts} +1 -1
- package/dist/types-chunks/{manager.d-CoEuPRAo.d.ts → manager.d-B67TmPO1.d.ts} +27 -3
- package/dist/types-chunks/{public-api.d-7G4--RZE.d.ts → public-api.d-BvCp5VkW.d.ts} +3 -3
- package/dist/types-chunks/{resolver.d-CIVoGc97.d.ts → resolver.d-ssgNSlrh.d.ts} +2 -2
- package/dist/types-chunks/{run-manager.d-BaXtkryp.d.ts → run-manager.d-DxU3SSGR.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-BQccrODn.d.ts → sdk-session-wGpa7X_U.d.ts} +4 -4
- package/dist/types-chunks/{types.d-CJR7t6iW.d.ts → types.d-CEZZSY9s.d.ts} +2 -2
- package/dist/types-chunks/{types.d-BtC4yLYO.d.ts → types.d-CRCaLt_s.d.ts} +55 -7
- package/dist/types-chunks/{types.d-TTvpAGWf.d.ts → types.d-Cqaw71Ax.d.ts} +4 -2
- package/dist/types-chunks/{types.d-C9YHEAmA.d.ts → types.d-CzsLFqmf.d.ts} +5 -5
- package/dist/types-chunks/{utils.d-BbB5jzi1.d.ts → utils.d-Cb6vdvFM.d.ts} +5 -5
- package/docs/SDK_EMBEDDER_GUIDE.md +357 -55
- package/package.json +5 -2
- package/dist/chunks/argument-completer-RSK6CCGP.js +0 -2
- package/dist/chunks/chunk-NGHQIGVW.js +0 -46
- package/dist/chunks/chunk-PQ3XUSY2.js +0 -357
- package/dist/chunks/chunk-UJEMSPM5.js +0 -78
- package/dist/chunks/chunk-VYKFM3TB.js +0 -751
- package/dist/chunks/chunk-Z4PPLJF2.js +0 -60
- package/dist/chunks/compaction-config-ABLL6UH3.js +0 -2
- package/dist/chunks/host-7SAB4WEC.js +0 -2
- package/dist/chunks/run-manager-XMDKTONJ.js +0 -2
package/dist/sdk-a2a.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ax as ExternalAgentRegistration, u as AgentEffectDeclaration, x as AgentExecutorFactory, g as AgentArtifactPolicy } from './types-chunks/types.d-CRCaLt_s.js';
|
|
2
2
|
import { RuntimeKodaXOptions, RuntimeWorkspaceBinding, RuntimeExecutionToolPolicy, RuntimeUserMarkdownAgentRef, KodaXRuntime, RuntimeExternalAgentsOptions } from './sdk-runtime.js';
|
|
3
3
|
import { c as IntegrationConfigSnapshot, e as IntegrationConfigStatus } from './types-chunks/integration-config.d-ojG4swOP.js';
|
|
4
|
-
import './types-chunks/types.d-
|
|
5
|
-
import './types-chunks/bash-prefix-extractor.d-
|
|
4
|
+
import './types-chunks/types.d-Cqaw71Ax.js';
|
|
5
|
+
import './types-chunks/bash-prefix-extractor.d-YoiZl5yt.js';
|
|
6
6
|
import './types-chunks/types.d-vJExiRje.js';
|
|
7
7
|
import 'vscode-languageserver-protocol';
|
|
8
8
|
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
|
9
|
-
import './types-chunks/capability.d-
|
|
10
|
-
import './types-chunks/base.d-
|
|
9
|
+
import './types-chunks/capability.d-K664nHOS.js';
|
|
10
|
+
import './types-chunks/base.d-Cz_rwpOi.js';
|
|
11
11
|
import './types-chunks/config.d-CJy1WENT.js';
|
|
12
|
-
import './types-chunks/manager.d-
|
|
13
|
-
import './types-chunks/run-manager.d-
|
|
14
|
-
import './types-chunks/types.d-
|
|
15
|
-
import './types-chunks/utils.d-
|
|
16
|
-
import './types-chunks/guardrail.d-
|
|
17
|
-
import './types-chunks/guardrail.d-
|
|
12
|
+
import './types-chunks/manager.d-B67TmPO1.js';
|
|
13
|
+
import './types-chunks/run-manager.d-DxU3SSGR.js';
|
|
14
|
+
import './types-chunks/types.d-CzsLFqmf.js';
|
|
15
|
+
import './types-chunks/utils.d-Cb6vdvFM.js';
|
|
16
|
+
import './types-chunks/guardrail.d-DdeDWnVu.js';
|
|
17
|
+
import './types-chunks/guardrail.d-DilYC1dh.js';
|
|
18
18
|
import 'readline';
|
|
19
|
-
import './types-chunks/public-api.d-
|
|
19
|
+
import './types-chunks/public-api.d-BvCp5VkW.js';
|
|
20
20
|
import 'child_process';
|
|
21
21
|
|
|
22
22
|
declare const A2A_PROTOCOL_VERSION = "1.0";
|
|
@@ -76,6 +76,13 @@ interface A2AAgentSkill {
|
|
|
76
76
|
readonly examples?: readonly string[];
|
|
77
77
|
readonly inputModes?: readonly string[];
|
|
78
78
|
readonly outputModes?: readonly string[];
|
|
79
|
+
readonly securityRequirements?: readonly Readonly<Record<string, unknown>>[];
|
|
80
|
+
}
|
|
81
|
+
interface A2AAgentExtension {
|
|
82
|
+
readonly uri: string;
|
|
83
|
+
readonly description?: string;
|
|
84
|
+
readonly required?: boolean;
|
|
85
|
+
readonly params?: Readonly<Record<string, unknown>>;
|
|
79
86
|
}
|
|
80
87
|
interface A2AAgentCard {
|
|
81
88
|
readonly name: string;
|
|
@@ -86,7 +93,7 @@ interface A2AAgentCard {
|
|
|
86
93
|
readonly streaming?: boolean;
|
|
87
94
|
readonly pushNotifications?: boolean;
|
|
88
95
|
readonly extendedAgentCard?: boolean;
|
|
89
|
-
readonly extensions?: readonly
|
|
96
|
+
readonly extensions?: readonly A2AAgentExtension[];
|
|
90
97
|
};
|
|
91
98
|
readonly securitySchemes?: Readonly<Record<string, unknown>>;
|
|
92
99
|
readonly securityRequirements?: readonly Readonly<Record<string, unknown>>[];
|
|
@@ -120,15 +127,34 @@ interface A2ANetworkPolicy {
|
|
|
120
127
|
}
|
|
121
128
|
interface A2AClientOptions {
|
|
122
129
|
readonly networkPolicy: A2ANetworkPolicy;
|
|
130
|
+
/** RPC/SSE task payload ceiling; Card/OAuth discovery keeps the stricter network limit. */
|
|
131
|
+
readonly maxTaskResponseBytes?: number;
|
|
123
132
|
readonly pollIntervalMs: number;
|
|
124
133
|
readonly authorization?: string;
|
|
125
134
|
/** Trusted transport override. Supplying one opts out of the default DNS-pinned connector. */
|
|
126
135
|
readonly fetch?: typeof globalThis.fetch;
|
|
127
136
|
}
|
|
137
|
+
type A2AClientAuthenticationInput = {
|
|
138
|
+
readonly type: 'http-bearer';
|
|
139
|
+
readonly scheme: string;
|
|
140
|
+
readonly credentialRef: string;
|
|
141
|
+
} | {
|
|
142
|
+
readonly type: 'oauth2-client-credentials';
|
|
143
|
+
readonly scheme: string;
|
|
144
|
+
readonly issuer: string;
|
|
145
|
+
readonly tokenUrl: string;
|
|
146
|
+
readonly clientId: string;
|
|
147
|
+
readonly clientSecretRef: string;
|
|
148
|
+
readonly scopes: readonly string[];
|
|
149
|
+
readonly resource?: string;
|
|
150
|
+
readonly clientAuthentication: 'client-secret-basic' | 'client-secret-post';
|
|
151
|
+
};
|
|
128
152
|
interface A2ARegistrationInput {
|
|
129
153
|
readonly agentId: string;
|
|
130
154
|
readonly agentCardUrl: string;
|
|
155
|
+
/** Legacy shorthand for HTTP Bearer; prefer authentication. */
|
|
131
156
|
readonly credentialRef?: string;
|
|
157
|
+
readonly authentication?: A2AClientAuthenticationInput;
|
|
132
158
|
readonly effects: Pick<AgentEffectDeclaration, 'remote'>;
|
|
133
159
|
}
|
|
134
160
|
interface A2ADiscoveredRegistration {
|
|
@@ -141,6 +167,11 @@ interface A2APrincipal {
|
|
|
141
167
|
readonly scopes: readonly string[];
|
|
142
168
|
}
|
|
143
169
|
interface A2AAuthentication {
|
|
170
|
+
/**
|
|
171
|
+
* Non-secret authority identifier used to namespace durable task ownership.
|
|
172
|
+
* Keep it stable across credential rotation; change it when the identity authority changes.
|
|
173
|
+
*/
|
|
174
|
+
readonly securityRealm: string;
|
|
144
175
|
readonly securitySchemes: Readonly<Record<string, unknown>>;
|
|
145
176
|
readonly securityRequirements: readonly Readonly<Record<string, unknown>>[];
|
|
146
177
|
authenticate(request: Request): Promise<A2APrincipal | null>;
|
|
@@ -242,11 +273,14 @@ declare class A2AError extends Error {
|
|
|
242
273
|
readonly code: number;
|
|
243
274
|
readonly httpStatus: number;
|
|
244
275
|
readonly data?: unknown | undefined;
|
|
245
|
-
|
|
276
|
+
readonly headers?: Readonly<Record<string, string>> | undefined;
|
|
277
|
+
constructor(code: number, message: string, httpStatus?: number, data?: unknown | undefined, headers?: Readonly<Record<string, string>> | undefined);
|
|
246
278
|
}
|
|
247
279
|
declare function errorMessage(error: unknown): string;
|
|
248
280
|
|
|
249
281
|
declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
282
|
+
declare function isJsonMediaType(value: string | null): boolean;
|
|
283
|
+
declare function isEventStreamMediaType(value: string | null): boolean;
|
|
250
284
|
declare function parseA2AAgentCard(value: unknown): A2AAgentCard;
|
|
251
285
|
declare function parseA2APart(value: unknown): A2APart;
|
|
252
286
|
declare function parseA2AMessage(value: unknown): A2AMessage;
|
|
@@ -266,16 +300,107 @@ declare function discoverA2ARegistration(input: A2ARegistrationInput, options: A
|
|
|
266
300
|
type A2AClientOptionsResolver = (registration: ExternalAgentRegistration) => A2AClientOptions;
|
|
267
301
|
declare function createA2AAgentExecutorFactory(options: A2AClientOptions | A2AClientOptionsResolver): AgentExecutorFactory;
|
|
268
302
|
|
|
303
|
+
interface OAuth2ClientCredentialsTokenManagerOptions {
|
|
304
|
+
readonly issuer: string;
|
|
305
|
+
readonly tokenUrl: string;
|
|
306
|
+
readonly clientId: string;
|
|
307
|
+
readonly scopes?: readonly string[];
|
|
308
|
+
readonly resource?: string;
|
|
309
|
+
readonly clientAuthenticationMethod: 'basic' | 'post';
|
|
310
|
+
readonly networkPolicy: A2ANetworkPolicy;
|
|
311
|
+
/** Trusted transport override. Safe URL validation is still applied before it is invoked. */
|
|
312
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
313
|
+
/** Clock injection for deterministic expiry tests. */
|
|
314
|
+
readonly now?: () => number;
|
|
315
|
+
}
|
|
316
|
+
interface OAuth2ClientCredentialsTokenManager {
|
|
317
|
+
getAuthorization(clientSecret: string): Promise<string>;
|
|
318
|
+
/** Pass a rejected value for compare-and-clear; omit it only for an explicit full reset. */
|
|
319
|
+
invalidate(rejectedAuthorization?: string): void;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Creates a process-local client-credentials token manager.
|
|
323
|
+
*
|
|
324
|
+
* The secret is supplied only when a refresh is needed so callers can resolve a
|
|
325
|
+
* rotated credential immediately before use. Tokens and secrets are never persisted.
|
|
326
|
+
*/
|
|
327
|
+
declare function createOAuth2ClientCredentialsTokenManager(options: OAuth2ClientCredentialsTokenManagerOptions): OAuth2ClientCredentialsTokenManager;
|
|
328
|
+
|
|
329
|
+
type SupportedSecurityKind = 'http-bearer' | 'oauth2-client-credentials';
|
|
330
|
+
interface A2AHttpBearerSecurityScheme {
|
|
331
|
+
readonly name: string;
|
|
332
|
+
readonly kind: 'http-bearer';
|
|
333
|
+
readonly bearerFormat?: string;
|
|
334
|
+
}
|
|
335
|
+
interface A2AOAuth2ClientCredentialsSecurityScheme {
|
|
336
|
+
readonly name: string;
|
|
337
|
+
readonly kind: 'oauth2-client-credentials';
|
|
338
|
+
readonly tokenUrl: string;
|
|
339
|
+
readonly scopes: readonly string[];
|
|
340
|
+
}
|
|
341
|
+
interface A2AUnsupportedSecurityScheme {
|
|
342
|
+
readonly name: string;
|
|
343
|
+
readonly kind: 'unsupported';
|
|
344
|
+
readonly protocol: string;
|
|
345
|
+
readonly oauthScopes?: readonly string[];
|
|
346
|
+
readonly acceptsOAuthScopes?: boolean;
|
|
347
|
+
}
|
|
348
|
+
type A2ASecurityScheme = A2AHttpBearerSecurityScheme | A2AOAuth2ClientCredentialsSecurityScheme | A2AUnsupportedSecurityScheme;
|
|
349
|
+
interface A2ARequiredSecurityScheme {
|
|
350
|
+
readonly scheme: A2ASecurityScheme;
|
|
351
|
+
readonly scopes: readonly string[];
|
|
352
|
+
}
|
|
353
|
+
interface A2ASecurityRequirement {
|
|
354
|
+
readonly schemes: readonly A2ARequiredSecurityScheme[];
|
|
355
|
+
}
|
|
356
|
+
interface A2ASecurityDeclaration {
|
|
357
|
+
readonly schemes: Readonly<Record<string, A2ASecurityScheme>>;
|
|
358
|
+
readonly requirements: readonly A2ASecurityRequirement[];
|
|
359
|
+
}
|
|
360
|
+
interface A2AClientSecurityCapability {
|
|
361
|
+
readonly schemeName: string;
|
|
362
|
+
readonly kind: SupportedSecurityKind;
|
|
363
|
+
readonly scopes?: readonly string[];
|
|
364
|
+
}
|
|
365
|
+
declare function assertOAuthScopeToken(value: string, label: string): void;
|
|
366
|
+
declare function parseOAuthScopeValue(value: string, label: string): readonly string[];
|
|
367
|
+
declare function parseOAuthScopeList(value: unknown, label: string): readonly string[];
|
|
368
|
+
declare function requireNonEmptyString(value: unknown, label: string): string;
|
|
369
|
+
declare function isExactOAuthLoopbackHostname(hostname: string): boolean;
|
|
370
|
+
declare function parseOAuthIssuerIdentifier(value: unknown, label: string): string;
|
|
371
|
+
declare function parseOAuthEndpointUrl(value: unknown, label: string): URL;
|
|
372
|
+
declare function parseOAuthResourceIdentifier(value: unknown, label: string): string;
|
|
373
|
+
declare function parseA2ASecurity(rawSchemes: unknown, rawRequirements: unknown): A2ASecurityDeclaration;
|
|
374
|
+
declare function selectA2ASecurityRequirement(security: A2ASecurityDeclaration, capabilities: readonly A2AClientSecurityCapability[]): A2ASecurityRequirement | null;
|
|
375
|
+
declare function satisfiableA2ASecurityRequirements(security: A2ASecurityDeclaration, capabilities: readonly A2AClientSecurityCapability[]): readonly A2ASecurityRequirement[];
|
|
376
|
+
|
|
269
377
|
declare function createKodaXA2AServer(options: A2AServerOptions): KodaXA2AServer;
|
|
270
378
|
/** Prepare an immutable Runtime execution binding before exposing an A2A handler. */
|
|
271
379
|
declare function prepareKodaXA2AServer(options: A2AServerOptions): Promise<KodaXA2AServer>;
|
|
272
380
|
|
|
273
381
|
type A2AOutboundEffect = 'none' | 'read' | 'write' | 'unknown';
|
|
382
|
+
interface A2AOAuth2ClientCredentialsConfig {
|
|
383
|
+
readonly type: 'oauth2-client-credentials';
|
|
384
|
+
readonly scheme: string;
|
|
385
|
+
readonly issuer: string;
|
|
386
|
+
readonly tokenUrl: string;
|
|
387
|
+
readonly clientId: string;
|
|
388
|
+
readonly clientSecretEnv: string;
|
|
389
|
+
readonly scopes: readonly string[];
|
|
390
|
+
readonly resource?: string;
|
|
391
|
+
readonly clientAuthentication: 'client-secret-basic' | 'client-secret-post';
|
|
392
|
+
}
|
|
274
393
|
interface A2AOutboundAgentConfig {
|
|
275
394
|
readonly cardUrl: string;
|
|
395
|
+
readonly enabled: boolean;
|
|
276
396
|
readonly credentialEnv?: string;
|
|
397
|
+
readonly authentication?: A2AOAuth2ClientCredentialsConfig;
|
|
277
398
|
readonly effect: A2AOutboundEffect;
|
|
278
399
|
}
|
|
400
|
+
/** Backward-compatible public mutation input; omitted `enabled` means active. */
|
|
401
|
+
type A2AOutboundAgentInput = Omit<A2AOutboundAgentConfig, 'enabled'> & {
|
|
402
|
+
readonly enabled?: boolean;
|
|
403
|
+
};
|
|
279
404
|
type A2AWorkspaceConfig = {
|
|
280
405
|
readonly mode: 'managed';
|
|
281
406
|
} | {
|
|
@@ -330,6 +455,17 @@ interface A2ABearerAuthenticationConfig {
|
|
|
330
455
|
readonly tokenEnv: string;
|
|
331
456
|
readonly principalId: string;
|
|
332
457
|
}
|
|
458
|
+
interface A2AOAuth2JwtAuthenticationConfig {
|
|
459
|
+
readonly type: 'oauth2-jwt';
|
|
460
|
+
readonly scheme: string;
|
|
461
|
+
readonly issuer: string;
|
|
462
|
+
readonly audience: string;
|
|
463
|
+
readonly jwksUrl: string;
|
|
464
|
+
readonly tokenUrl: string;
|
|
465
|
+
readonly metadataUrl?: string;
|
|
466
|
+
readonly requiredScopes: readonly string[];
|
|
467
|
+
}
|
|
468
|
+
type A2AServerAuthenticationConfig = A2ABearerAuthenticationConfig | A2AOAuth2JwtAuthenticationConfig;
|
|
333
469
|
interface A2AServerLimitsConfig {
|
|
334
470
|
readonly maxRequestBytes: number;
|
|
335
471
|
readonly maxPartBytes: number;
|
|
@@ -345,27 +481,54 @@ interface A2AServerConfig {
|
|
|
345
481
|
readonly execution: A2AServerExecutionConfig;
|
|
346
482
|
readonly published: A2APublishedAgentConfig;
|
|
347
483
|
readonly publicBaseUrl?: string;
|
|
348
|
-
readonly authentication:
|
|
484
|
+
readonly authentication: A2AServerAuthenticationConfig;
|
|
349
485
|
readonly limits: A2AServerLimitsConfig;
|
|
350
486
|
readonly dataDir: string;
|
|
351
487
|
}
|
|
352
488
|
interface A2AIntegrationDocument {
|
|
353
|
-
readonly version:
|
|
489
|
+
readonly version: 2;
|
|
354
490
|
readonly agents: Readonly<Record<string, A2AOutboundAgentConfig>>;
|
|
355
491
|
readonly server?: A2AServerConfig;
|
|
356
492
|
}
|
|
493
|
+
interface A2AIntegrationMigrationResult {
|
|
494
|
+
readonly migrated: boolean;
|
|
495
|
+
readonly snapshot: IntegrationConfigSnapshot<A2AIntegrationDocument>;
|
|
496
|
+
}
|
|
497
|
+
interface A2AIntegrationInspection {
|
|
498
|
+
readonly sourceVersion: 1 | 2;
|
|
499
|
+
readonly snapshot: IntegrationConfigSnapshot<A2AIntegrationDocument>;
|
|
500
|
+
}
|
|
357
501
|
interface A2AServerConfigChange {
|
|
358
502
|
readonly kind: 'none' | 'hot' | 'restart-required';
|
|
359
503
|
readonly fields: readonly string[];
|
|
360
504
|
}
|
|
361
505
|
declare function parseA2AIntegrationDocument(value: unknown): A2AIntegrationDocument;
|
|
362
506
|
declare function readA2AIntegration(configHome: string): IntegrationConfigSnapshot<A2AIntegrationDocument>;
|
|
363
|
-
declare function
|
|
364
|
-
declare function removeA2AOutboundAgent(configHome: string, name: string, expectedRevision?: string): boolean;
|
|
365
|
-
declare function setA2AServerConfig(configHome: string, server: A2AServerConfig | undefined, expectedRevision?: string): IntegrationConfigSnapshot<A2AIntegrationDocument>;
|
|
507
|
+
declare function inspectA2AIntegration(configHome: string): A2AIntegrationInspection;
|
|
366
508
|
declare function classifyA2AServerChange(current: A2AServerConfig | undefined, next: A2AServerConfig | undefined): A2AServerConfigChange;
|
|
367
509
|
|
|
368
|
-
declare function
|
|
510
|
+
declare function createOAuth2JwtA2AAuthentication(config: A2AOAuth2JwtAuthenticationConfig, fetchImpl?: typeof globalThis.fetch): A2AAuthentication;
|
|
511
|
+
|
|
512
|
+
interface A2ALegacyTaskOwnerMapping {
|
|
513
|
+
readonly subject: string;
|
|
514
|
+
readonly tenant?: string;
|
|
515
|
+
readonly securityRealm: string;
|
|
516
|
+
}
|
|
517
|
+
interface A2ALegacyTaskOwnerMigrationOptions {
|
|
518
|
+
readonly dataDir: string;
|
|
519
|
+
readonly mappings: readonly A2ALegacyTaskOwnerMapping[];
|
|
520
|
+
readonly apply: boolean;
|
|
521
|
+
}
|
|
522
|
+
interface A2ALegacyTaskOwnerMigrationResult {
|
|
523
|
+
readonly dataDir: string;
|
|
524
|
+
readonly applied: boolean;
|
|
525
|
+
readonly matchedLegacyTaskCount: number;
|
|
526
|
+
readonly matchedCurrentTaskCount: number;
|
|
527
|
+
readonly unmatchedUnversionedTaskCount: number;
|
|
528
|
+
}
|
|
529
|
+
declare function migrateA2ALegacyTaskOwners(options: A2ALegacyTaskOwnerMigrationOptions): A2ALegacyTaskOwnerMigrationResult;
|
|
530
|
+
|
|
531
|
+
declare function createBearerEnvA2AAuthentication(config: A2ABearerAuthenticationConfig, env?: NodeJS.ProcessEnv): A2AAuthentication;
|
|
369
532
|
declare function createA2AServerOptionsFromConfig(input: {
|
|
370
533
|
readonly runtime: KodaXRuntime;
|
|
371
534
|
readonly config: A2AServerConfig;
|
|
@@ -387,11 +550,13 @@ interface ConfiguredA2ARuntimeIntegration {
|
|
|
387
550
|
readonly runtimeOptions: RuntimeExternalAgentsOptions;
|
|
388
551
|
start(runtime: KodaXRuntime): Promise<ConfiguredA2ARuntimeHandle>;
|
|
389
552
|
}
|
|
553
|
+
declare const CONFIGURED_A2A_TASK_RESPONSE_BYTES: number;
|
|
554
|
+
declare const configuredA2AArtifactPolicy: AgentArtifactPolicy;
|
|
390
555
|
declare function createConfiguredA2ARuntimeIntegration(input: {
|
|
391
556
|
readonly configHome: string;
|
|
392
557
|
readonly fetch?: typeof globalThis.fetch;
|
|
393
558
|
readonly onEvent?: (message: string) => void;
|
|
394
559
|
}): ConfiguredA2ARuntimeIntegration;
|
|
395
560
|
|
|
396
|
-
export { A2AError, A2A_EXECUTOR_ID, A2A_PROTOCOL_VERSION, assertSafeA2AUrl, classifyA2AServerChange, createA2AAgentExecutorFactory, createA2AServerHotOptions, createA2AServerOptionsFromConfig, createBearerEnvA2AAuthentication, createConfiguredA2ARuntimeIntegration, createKodaXA2AServer, decodeUtf8, discoverA2ARegistration, errorMessage, isRecord, parseA2AAgentCard, parseA2AIntegrationDocument, parseA2AMessage, parseA2APart, parseA2ATask, parseJsonRpcRequest, prepareKodaXA2AServer, readA2AIntegration,
|
|
397
|
-
export type { A2AAgentCard, A2AAgentInterface, A2AAgentSkill, A2AArtifact, A2AAuthentication, A2AAuthorizationInput, A2ABearerAuthenticationConfig, A2AClientOptions, A2AClientOptionsResolver, A2ADiscoveredRegistration, A2AIntegrationDocument, A2AJsonRpcError, A2AJsonRpcRequest, A2AJsonRpcResponse, A2AMessage, A2ANetworkPolicy, A2AOperation, A2AOutboundAgentConfig, A2AOutboundEffect, A2APart, A2APrincipal, A2APublishedAgent, A2APublishedAgentConfig, A2APublishedSkill, A2APublishedSkillConfig, A2ARegistrationInput, A2AServerConfig, A2AServerConfigChange, A2AServerEvent, A2AServerExecution, A2AServerExecutionConfig, A2AServerHotOptions, A2AServerLimits, A2AServerLimitsConfig, A2AServerOptions, A2ATask, A2ATaskState, A2ATaskStatus, A2AToolPolicyConfig, A2AUserMarkdownAgentConfigRef, A2AWorkspaceConfig, ConfiguredA2ARuntimeHandle, ConfiguredA2ARuntimeIntegration, CreateA2AAgentExecutorFactory, KodaXA2AServer, SafeFetchResult };
|
|
561
|
+
export { A2AError, A2A_EXECUTOR_ID, A2A_PROTOCOL_VERSION, CONFIGURED_A2A_TASK_RESPONSE_BYTES, assertOAuthScopeToken, assertSafeA2AUrl, classifyA2AServerChange, configuredA2AArtifactPolicy, createA2AAgentExecutorFactory, createA2AServerHotOptions, createA2AServerOptionsFromConfig, createBearerEnvA2AAuthentication, createConfiguredA2ARuntimeIntegration, createKodaXA2AServer, createOAuth2ClientCredentialsTokenManager, createOAuth2JwtA2AAuthentication, decodeUtf8, discoverA2ARegistration, errorMessage, inspectA2AIntegration, isEventStreamMediaType, isExactOAuthLoopbackHostname, isJsonMediaType, isRecord, migrateA2ALegacyTaskOwners, parseA2AAgentCard, parseA2AIntegrationDocument, parseA2AMessage, parseA2APart, parseA2ASecurity, parseA2ATask, parseJsonRpcRequest, parseOAuthEndpointUrl, parseOAuthIssuerIdentifier, parseOAuthResourceIdentifier, parseOAuthScopeList, parseOAuthScopeValue, prepareKodaXA2AServer, readA2AIntegration, requireNonEmptyString, safeA2AFetch, satisfiableA2ASecurityRequirements, selectA2ASecurityRequirement };
|
|
562
|
+
export type { A2AAgentCard, A2AAgentExtension, A2AAgentInterface, A2AAgentSkill, A2AArtifact, A2AAuthentication, A2AAuthorizationInput, A2ABearerAuthenticationConfig, A2AClientAuthenticationInput, A2AClientOptions, A2AClientOptionsResolver, A2AClientSecurityCapability, A2ADiscoveredRegistration, A2AHttpBearerSecurityScheme, A2AIntegrationDocument, A2AIntegrationInspection, A2AIntegrationMigrationResult, A2AJsonRpcError, A2AJsonRpcRequest, A2AJsonRpcResponse, A2ALegacyTaskOwnerMapping, A2ALegacyTaskOwnerMigrationOptions, A2ALegacyTaskOwnerMigrationResult, A2AMessage, A2ANetworkPolicy, A2AOAuth2ClientCredentialsConfig, A2AOAuth2ClientCredentialsSecurityScheme, A2AOAuth2JwtAuthenticationConfig, A2AOperation, A2AOutboundAgentConfig, A2AOutboundAgentInput, A2AOutboundEffect, A2APart, A2APrincipal, A2APublishedAgent, A2APublishedAgentConfig, A2APublishedSkill, A2APublishedSkillConfig, A2ARegistrationInput, A2ARequiredSecurityScheme, A2ASecurityDeclaration, A2ASecurityRequirement, A2ASecurityScheme, A2AServerAuthenticationConfig, A2AServerConfig, A2AServerConfigChange, A2AServerEvent, A2AServerExecution, A2AServerExecutionConfig, A2AServerHotOptions, A2AServerLimits, A2AServerLimitsConfig, A2AServerOptions, A2ATask, A2ATaskState, A2ATaskStatus, A2AToolPolicyConfig, A2AUnsupportedSecurityScheme, A2AUserMarkdownAgentConfigRef, A2AWorkspaceConfig, ConfiguredA2ARuntimeHandle, ConfiguredA2ARuntimeIntegration, CreateA2AAgentExecutorFactory, KodaXA2AServer, OAuth2ClientCredentialsTokenManager, OAuth2ClientCredentialsTokenManagerOptions, SafeFetchResult };
|