@agen-ai/agent-protocol 0.2.4 → 0.3.0
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/README.md +57 -13
- package/dist/accountQuota/index.d.ts +3 -0
- package/dist/accountQuota/index.js +2 -0
- package/dist/accountQuota/parsers.d.ts +7 -0
- package/dist/accountQuota/parsers.js +20 -0
- package/dist/accountQuota/types.d.ts +89 -0
- package/dist/accountQuota/types.js +12 -0
- package/dist/capabilities/contentReferenceText.d.ts +13 -0
- package/dist/capabilities/contentReferenceText.js +25 -0
- package/dist/capabilities/index.d.ts +1 -0
- package/dist/capabilities/index.js +1 -0
- package/dist/capabilities/types.d.ts +19 -1
- package/dist/capabilities/types.js +6 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/parsers.d.ts +7 -0
- package/dist/commands/parsers.js +23 -0
- package/dist/commands/types.d.ts +26 -0
- package/dist/commands/types.js +10 -0
- package/dist/effectiveContent/index.d.ts +3 -0
- package/dist/effectiveContent/index.js +2 -0
- package/dist/effectiveContent/parsers.d.ts +7 -0
- package/dist/effectiveContent/parsers.js +23 -0
- package/dist/effectiveContent/types.d.ts +35 -0
- package/dist/effectiveContent/types.js +19 -0
- package/dist/environment/facts.d.ts +28 -0
- package/dist/environment/facts.js +39 -0
- package/dist/environment/index.d.ts +4 -0
- package/dist/environment/index.js +3 -0
- package/dist/environment/parsers.d.ts +17 -0
- package/dist/environment/parsers.js +68 -0
- package/dist/environment/types.d.ts +61 -0
- package/dist/environment/types.js +26 -0
- package/dist/events/types.d.ts +1 -1
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.js +2 -0
- package/dist/extensions/parsers.d.ts +7 -0
- package/dist/extensions/parsers.js +23 -0
- package/dist/extensions/types.d.ts +73 -0
- package/dist/extensions/types.js +30 -0
- package/dist/foundation/parsers.d.ts +9 -1
- package/dist/foundation/parsers.js +24 -0
- package/dist/foundation/types.d.ts +5 -1
- package/dist/foundation/types.js +1 -1
- package/dist/integrations/types.d.ts +22 -4
- package/dist/integrations/types.js +6 -2
- package/dist/jsonSchema/generated.d.ts +9893 -5474
- package/dist/jsonSchema/generated.js +3097 -154
- package/dist/public/accountQuota.d.ts +2 -0
- package/dist/public/accountQuota.js +1 -0
- package/dist/public/commands.d.ts +2 -0
- package/dist/public/commands.js +1 -0
- package/dist/public/effectiveContent.d.ts +2 -0
- package/dist/public/effectiveContent.js +1 -0
- package/dist/public/environment.d.ts +2 -0
- package/dist/public/environment.js +1 -0
- package/dist/public/extensions.d.ts +2 -0
- package/dist/public/extensions.js +1 -0
- package/dist/public/index.d.ts +5 -0
- package/dist/public/index.js +5 -0
- package/dist/turns/parsers.d.ts +3 -1
- package/dist/turns/parsers.js +9 -0
- package/dist/turns/types.d.ts +13 -2
- package/dist/turns/types.js +4 -0
- package/dist/zod/accountQuota.d.ts +265 -0
- package/dist/zod/accountQuota.js +155 -0
- package/dist/zod/capabilities.d.ts +79 -1
- package/dist/zod/capabilities.js +21 -5
- package/dist/zod/commands.d.ts +35 -0
- package/dist/zod/commands.js +114 -0
- package/dist/zod/effectiveContent.d.ts +72 -0
- package/dist/zod/effectiveContent.js +157 -0
- package/dist/zod/environment.d.ts +531 -0
- package/dist/zod/environment.js +336 -0
- package/dist/zod/environmentFacts.d.ts +10 -0
- package/dist/zod/environmentFacts.js +40 -0
- package/dist/zod/events.d.ts +23 -23
- package/dist/zod/extensions.d.ts +161 -0
- package/dist/zod/extensions.js +194 -0
- package/dist/zod/foundation.d.ts +6 -1
- package/dist/zod/foundation.js +12 -3
- package/dist/zod/index.d.ts +10 -4
- package/dist/zod/index.js +22 -2
- package/dist/zod/integrations.d.ts +54 -9
- package/dist/zod/integrations.js +49 -6
- package/dist/zod/resources.d.ts +2 -2
- package/dist/zod/turns.d.ts +33 -0
- package/dist/zod/turns.js +34 -1
- package/dist/zod/typeEquality.generated.d.ts +40 -4
- package/package.json +23 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgentProtocolParseResult } from '../foundation/index.js';
|
|
2
|
+
import type { AgentEnvironmentCapability, AgentEnvironmentContentResult, AgentEnvironmentCommandsResult, AgentEnvironmentExtensionsResult, AgentEnvironmentIntegrationsResult, AgentEnvironmentInvalidation, AgentEnvironmentSnapshot } from './types.js';
|
|
3
|
+
export declare function parseAgentEnvironmentCapability(input: unknown): AgentEnvironmentCapability;
|
|
4
|
+
export declare function safeParseAgentEnvironmentCapability(input: unknown): AgentProtocolParseResult<AgentEnvironmentCapability>;
|
|
5
|
+
export declare function parseAgentEnvironmentContentResult(input: unknown): AgentEnvironmentContentResult;
|
|
6
|
+
export declare function safeParseAgentEnvironmentContentResult(input: unknown): AgentProtocolParseResult<AgentEnvironmentContentResult>;
|
|
7
|
+
export declare function parseAgentEnvironmentCommandsResult(input: unknown): AgentEnvironmentCommandsResult;
|
|
8
|
+
export declare function safeParseAgentEnvironmentCommandsResult(input: unknown): AgentProtocolParseResult<AgentEnvironmentCommandsResult>;
|
|
9
|
+
export declare function parseAgentEnvironmentExtensionsResult(input: unknown): AgentEnvironmentExtensionsResult;
|
|
10
|
+
export declare function safeParseAgentEnvironmentExtensionsResult(input: unknown): AgentProtocolParseResult<AgentEnvironmentExtensionsResult>;
|
|
11
|
+
export declare function parseAgentEnvironmentIntegrationsResult(input: unknown): AgentEnvironmentIntegrationsResult;
|
|
12
|
+
export declare function safeParseAgentEnvironmentIntegrationsResult(input: unknown): AgentProtocolParseResult<AgentEnvironmentIntegrationsResult>;
|
|
13
|
+
export declare function parseAgentEnvironmentInvalidation(input: unknown): AgentEnvironmentInvalidation;
|
|
14
|
+
export declare function safeParseAgentEnvironmentInvalidation(input: unknown): AgentProtocolParseResult<AgentEnvironmentInvalidation>;
|
|
15
|
+
export declare function parseAgentEnvironmentSnapshot(input: unknown): AgentEnvironmentSnapshot;
|
|
16
|
+
export declare function safeParseAgentEnvironmentSnapshot(input: unknown): AgentProtocolParseResult<AgentEnvironmentSnapshot>;
|
|
17
|
+
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { parseWithSchema, safeParseWithSchema } from "../internal/parsers.js";
|
|
2
|
+
import {
|
|
3
|
+
AgentEnvironmentCapabilitySchema,
|
|
4
|
+
AgentEnvironmentContentResultSchema,
|
|
5
|
+
AgentEnvironmentCommandsResultSchema,
|
|
6
|
+
AgentEnvironmentExtensionsResultSchema,
|
|
7
|
+
AgentEnvironmentIntegrationsResultSchema,
|
|
8
|
+
AgentEnvironmentInvalidationSchema,
|
|
9
|
+
AgentEnvironmentSnapshotSchema
|
|
10
|
+
} from "../zod/environment.js";
|
|
11
|
+
function parseAgentEnvironmentCapability(input) {
|
|
12
|
+
return parseWithSchema(AgentEnvironmentCapabilitySchema, input);
|
|
13
|
+
}
|
|
14
|
+
function safeParseAgentEnvironmentCapability(input) {
|
|
15
|
+
return safeParseWithSchema(AgentEnvironmentCapabilitySchema, input);
|
|
16
|
+
}
|
|
17
|
+
function parseAgentEnvironmentContentResult(input) {
|
|
18
|
+
return parseWithSchema(AgentEnvironmentContentResultSchema, input);
|
|
19
|
+
}
|
|
20
|
+
function safeParseAgentEnvironmentContentResult(input) {
|
|
21
|
+
return safeParseWithSchema(AgentEnvironmentContentResultSchema, input);
|
|
22
|
+
}
|
|
23
|
+
function parseAgentEnvironmentCommandsResult(input) {
|
|
24
|
+
return parseWithSchema(AgentEnvironmentCommandsResultSchema, input);
|
|
25
|
+
}
|
|
26
|
+
function safeParseAgentEnvironmentCommandsResult(input) {
|
|
27
|
+
return safeParseWithSchema(AgentEnvironmentCommandsResultSchema, input);
|
|
28
|
+
}
|
|
29
|
+
function parseAgentEnvironmentExtensionsResult(input) {
|
|
30
|
+
return parseWithSchema(AgentEnvironmentExtensionsResultSchema, input);
|
|
31
|
+
}
|
|
32
|
+
function safeParseAgentEnvironmentExtensionsResult(input) {
|
|
33
|
+
return safeParseWithSchema(AgentEnvironmentExtensionsResultSchema, input);
|
|
34
|
+
}
|
|
35
|
+
function parseAgentEnvironmentIntegrationsResult(input) {
|
|
36
|
+
return parseWithSchema(AgentEnvironmentIntegrationsResultSchema, input);
|
|
37
|
+
}
|
|
38
|
+
function safeParseAgentEnvironmentIntegrationsResult(input) {
|
|
39
|
+
return safeParseWithSchema(AgentEnvironmentIntegrationsResultSchema, input);
|
|
40
|
+
}
|
|
41
|
+
function parseAgentEnvironmentInvalidation(input) {
|
|
42
|
+
return parseWithSchema(AgentEnvironmentInvalidationSchema, input);
|
|
43
|
+
}
|
|
44
|
+
function safeParseAgentEnvironmentInvalidation(input) {
|
|
45
|
+
return safeParseWithSchema(AgentEnvironmentInvalidationSchema, input);
|
|
46
|
+
}
|
|
47
|
+
function parseAgentEnvironmentSnapshot(input) {
|
|
48
|
+
return parseWithSchema(AgentEnvironmentSnapshotSchema, input);
|
|
49
|
+
}
|
|
50
|
+
function safeParseAgentEnvironmentSnapshot(input) {
|
|
51
|
+
return safeParseWithSchema(AgentEnvironmentSnapshotSchema, input);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
parseAgentEnvironmentCapability,
|
|
55
|
+
parseAgentEnvironmentCommandsResult,
|
|
56
|
+
parseAgentEnvironmentContentResult,
|
|
57
|
+
parseAgentEnvironmentExtensionsResult,
|
|
58
|
+
parseAgentEnvironmentIntegrationsResult,
|
|
59
|
+
parseAgentEnvironmentInvalidation,
|
|
60
|
+
parseAgentEnvironmentSnapshot,
|
|
61
|
+
safeParseAgentEnvironmentCapability,
|
|
62
|
+
safeParseAgentEnvironmentCommandsResult,
|
|
63
|
+
safeParseAgentEnvironmentContentResult,
|
|
64
|
+
safeParseAgentEnvironmentExtensionsResult,
|
|
65
|
+
safeParseAgentEnvironmentIntegrationsResult,
|
|
66
|
+
safeParseAgentEnvironmentInvalidation,
|
|
67
|
+
safeParseAgentEnvironmentSnapshot
|
|
68
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { AgentCommandCatalog } from '../commands/index.js';
|
|
2
|
+
import type { AgentEffectiveContentCatalog } from '../effectiveContent/index.js';
|
|
3
|
+
import type { AgentExtensionCatalog } from '../extensions/index.js';
|
|
4
|
+
import type { AgentIntegrationCatalog } from '../integrations/index.js';
|
|
5
|
+
import type { AgentEnvironmentId } from '../foundation/index.js';
|
|
6
|
+
import type { AgentEnvironmentReason } from './facts.js';
|
|
7
|
+
export declare const AGENT_ENVIRONMENT_SCHEMA_VERSION: 1;
|
|
8
|
+
export declare const AGENT_ENVIRONMENT_DOMAINS: readonly ["content", "commands", "extensions", "integrations"];
|
|
9
|
+
export declare const AGENT_ENVIRONMENT_EVIDENCE_EXTENTS: readonly ["workspace_discovery", "session"];
|
|
10
|
+
export declare const AGENT_ENVIRONMENT_COMPLETENESSES: readonly ["complete", "partial"];
|
|
11
|
+
export declare const AGENT_ENVIRONMENT_DOMAIN_CATALOG_BYTES_LIMIT: number;
|
|
12
|
+
export declare const AGENT_ENVIRONMENT_SNAPSHOT_BYTES_LIMIT: number;
|
|
13
|
+
export declare const AGENT_ENVIRONMENT_EFFECTIVE_ENTRIES_MAX_LENGTH = 1024;
|
|
14
|
+
export declare const AGENT_ENVIRONMENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH = 4096;
|
|
15
|
+
export type AgentEnvironmentDomain = (typeof AGENT_ENVIRONMENT_DOMAINS)[number];
|
|
16
|
+
export type AgentEnvironmentEvidenceExtent = (typeof AGENT_ENVIRONMENT_EVIDENCE_EXTENTS)[number];
|
|
17
|
+
export type AgentEnvironmentCompleteness = (typeof AGENT_ENVIRONMENT_COMPLETENESSES)[number];
|
|
18
|
+
export type AgentEnvironmentAvailableDomainResult<Catalog> = Readonly<{
|
|
19
|
+
readonly kind: 'available';
|
|
20
|
+
readonly catalog: Catalog;
|
|
21
|
+
readonly extent: AgentEnvironmentEvidenceExtent;
|
|
22
|
+
readonly completeness: AgentEnvironmentCompleteness;
|
|
23
|
+
readonly reasons: readonly AgentEnvironmentReason[];
|
|
24
|
+
}>;
|
|
25
|
+
export type AgentEnvironmentUnavailableDomainResult = Readonly<{
|
|
26
|
+
readonly kind: 'unsupported' | 'not_initialized' | 'unavailable';
|
|
27
|
+
readonly reasons: readonly AgentEnvironmentReason[];
|
|
28
|
+
}>;
|
|
29
|
+
export type AgentEnvironmentDomainResult<Catalog> = AgentEnvironmentAvailableDomainResult<Catalog> | AgentEnvironmentUnavailableDomainResult;
|
|
30
|
+
export type AgentEnvironmentContentResult = AgentEnvironmentDomainResult<AgentEffectiveContentCatalog>;
|
|
31
|
+
export type AgentEnvironmentCommandsResult = AgentEnvironmentDomainResult<AgentCommandCatalog>;
|
|
32
|
+
export type AgentEnvironmentExtensionsResult = AgentEnvironmentDomainResult<AgentExtensionCatalog>;
|
|
33
|
+
export type AgentEnvironmentIntegrationsResult = AgentEnvironmentDomainResult<AgentIntegrationCatalog>;
|
|
34
|
+
export interface AgentEnvironmentSnapshot {
|
|
35
|
+
readonly schemaVersion: typeof AGENT_ENVIRONMENT_SCHEMA_VERSION;
|
|
36
|
+
readonly environmentId: AgentEnvironmentId;
|
|
37
|
+
readonly revision: number;
|
|
38
|
+
readonly content: AgentEnvironmentContentResult;
|
|
39
|
+
readonly commands: AgentEnvironmentCommandsResult;
|
|
40
|
+
readonly extensions: AgentEnvironmentExtensionsResult;
|
|
41
|
+
readonly integrations: AgentEnvironmentIntegrationsResult;
|
|
42
|
+
}
|
|
43
|
+
export interface AgentEnvironmentInvalidation {
|
|
44
|
+
readonly environmentId: AgentEnvironmentId;
|
|
45
|
+
readonly domains: readonly AgentEnvironmentDomain[];
|
|
46
|
+
}
|
|
47
|
+
/** The serializable capability advertised by a provider instance or session. */
|
|
48
|
+
export type AgentEnvironmentReadCapability = Readonly<{
|
|
49
|
+
readonly kind: 'unsupported';
|
|
50
|
+
}> | Readonly<{
|
|
51
|
+
readonly kind: 'read';
|
|
52
|
+
readonly domains: readonly AgentEnvironmentDomain[];
|
|
53
|
+
}> | Readonly<{
|
|
54
|
+
readonly kind: 'read_and_watch';
|
|
55
|
+
readonly domains: readonly AgentEnvironmentDomain[];
|
|
56
|
+
}>;
|
|
57
|
+
export interface AgentEnvironmentCapability {
|
|
58
|
+
readonly instance: AgentEnvironmentReadCapability;
|
|
59
|
+
readonly session: AgentEnvironmentReadCapability;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const AGENT_ENVIRONMENT_SCHEMA_VERSION = 1;
|
|
2
|
+
const AGENT_ENVIRONMENT_DOMAINS = [
|
|
3
|
+
"content",
|
|
4
|
+
"commands",
|
|
5
|
+
"extensions",
|
|
6
|
+
"integrations"
|
|
7
|
+
];
|
|
8
|
+
const AGENT_ENVIRONMENT_EVIDENCE_EXTENTS = [
|
|
9
|
+
"workspace_discovery",
|
|
10
|
+
"session"
|
|
11
|
+
];
|
|
12
|
+
const AGENT_ENVIRONMENT_COMPLETENESSES = ["complete", "partial"];
|
|
13
|
+
const AGENT_ENVIRONMENT_DOMAIN_CATALOG_BYTES_LIMIT = 512 * 1024;
|
|
14
|
+
const AGENT_ENVIRONMENT_SNAPSHOT_BYTES_LIMIT = 2 * 1024 * 1024;
|
|
15
|
+
const AGENT_ENVIRONMENT_EFFECTIVE_ENTRIES_MAX_LENGTH = 1024;
|
|
16
|
+
const AGENT_ENVIRONMENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH = 4096;
|
|
17
|
+
export {
|
|
18
|
+
AGENT_ENVIRONMENT_COMPLETENESSES,
|
|
19
|
+
AGENT_ENVIRONMENT_DOMAINS,
|
|
20
|
+
AGENT_ENVIRONMENT_DOMAIN_CATALOG_BYTES_LIMIT,
|
|
21
|
+
AGENT_ENVIRONMENT_EFFECTIVE_ENTRIES_MAX_LENGTH,
|
|
22
|
+
AGENT_ENVIRONMENT_EVIDENCE_EXTENTS,
|
|
23
|
+
AGENT_ENVIRONMENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH,
|
|
24
|
+
AGENT_ENVIRONMENT_SCHEMA_VERSION,
|
|
25
|
+
AGENT_ENVIRONMENT_SNAPSHOT_BYTES_LIMIT
|
|
26
|
+
};
|
package/dist/events/types.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { AgentContentStreamKind, AgentContextUsage, AgentDiffSummary, Agent
|
|
|
8
8
|
export declare const AGENT_EVENT_TYPES: readonly ["turn.started", "turn.state_changed", "turn.completed", "item.started", "item.updated", "item.completed", "content.delta", "turn.plan.updated", "turn.plan.proposed", "turn.diff.updated", "request.opened", "progress.updated", "context.usage.updated", "artifact.referenced", "operation.updated", "collaboration.updated", "resource.updated", "runtime.warning", "runtime.error", "provider.diagnostic"];
|
|
9
9
|
export type AgentEventType = (typeof AGENT_EVENT_TYPES)[number];
|
|
10
10
|
interface AgentEventBase<Type extends AgentEventType, Payload> {
|
|
11
|
-
readonly protocolVersion:
|
|
11
|
+
readonly protocolVersion: 9;
|
|
12
12
|
readonly type: Type;
|
|
13
13
|
readonly sessionId: AgentSessionId;
|
|
14
14
|
readonly providerRefs?: AgentProviderRefs;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentProtocolParseResult } from '../foundation/index.js';
|
|
2
|
+
import type { AgentExtensionCatalog, AgentExtensionDescriptor } from './types.js';
|
|
3
|
+
export declare function parseAgentExtensionDescriptor(input: unknown): AgentExtensionDescriptor;
|
|
4
|
+
export declare function safeParseAgentExtensionDescriptor(input: unknown): AgentProtocolParseResult<AgentExtensionDescriptor>;
|
|
5
|
+
export declare function parseAgentExtensionCatalog(input: unknown): AgentExtensionCatalog;
|
|
6
|
+
export declare function safeParseAgentExtensionCatalog(input: unknown): AgentProtocolParseResult<AgentExtensionCatalog>;
|
|
7
|
+
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { parseWithSchema, safeParseWithSchema } from "../internal/parsers.js";
|
|
2
|
+
import {
|
|
3
|
+
AgentExtensionCatalogSchema,
|
|
4
|
+
AgentExtensionDescriptorSchema
|
|
5
|
+
} from "../zod/extensions.js";
|
|
6
|
+
function parseAgentExtensionDescriptor(input) {
|
|
7
|
+
return parseWithSchema(AgentExtensionDescriptorSchema, input);
|
|
8
|
+
}
|
|
9
|
+
function safeParseAgentExtensionDescriptor(input) {
|
|
10
|
+
return safeParseWithSchema(AgentExtensionDescriptorSchema, input);
|
|
11
|
+
}
|
|
12
|
+
function parseAgentExtensionCatalog(input) {
|
|
13
|
+
return parseWithSchema(AgentExtensionCatalogSchema, input);
|
|
14
|
+
}
|
|
15
|
+
function safeParseAgentExtensionCatalog(input) {
|
|
16
|
+
return safeParseWithSchema(AgentExtensionCatalogSchema, input);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
parseAgentExtensionCatalog,
|
|
20
|
+
parseAgentExtensionDescriptor,
|
|
21
|
+
safeParseAgentExtensionCatalog,
|
|
22
|
+
safeParseAgentExtensionDescriptor
|
|
23
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { AgentCommandId, AgentEffectiveContentId, AgentExtensionId, AgentIntegrationId } from '../foundation/index.js';
|
|
2
|
+
import type { AgentAvailabilityFact, AgentEnvironmentSource } from '../environment/facts.js';
|
|
3
|
+
import type { AgentIsoDateTime } from '../foundation/index.js';
|
|
4
|
+
export declare const AGENT_EXTENSION_COMPONENT_KINDS: readonly ["skill", "rule", "prompt", "agent_definition", "command", "mcp_server", "connector", "hook", "lsp_server", "scheduled_task", "other"];
|
|
5
|
+
export declare const AGENT_EXTENSION_CATALOG_MAX_LENGTH = 256;
|
|
6
|
+
export declare const AGENT_EXTENSION_COMPONENTS_MAX_LENGTH = 4096;
|
|
7
|
+
export declare const AGENT_EXTENSION_CATALOG_BYTES_LIMIT: number;
|
|
8
|
+
export declare const AGENT_EXTENSION_NAME_MAX_LENGTH = 200;
|
|
9
|
+
export declare const AGENT_EXTENSION_SUMMARY_MAX_LENGTH = 2000;
|
|
10
|
+
export declare const AGENT_EXTENSION_VERSION_MAX_LENGTH = 200;
|
|
11
|
+
export declare const AGENT_EXTENSION_COMPONENT_NAME_MAX_LENGTH = 200;
|
|
12
|
+
export type AgentExtensionComponentKind = (typeof AGENT_EXTENSION_COMPONENT_KINDS)[number];
|
|
13
|
+
export type AgentExtensionContentComponentKind = 'skill' | 'rule' | 'prompt' | 'agent_definition';
|
|
14
|
+
export type AgentExtensionContentComponentTarget = Readonly<{
|
|
15
|
+
readonly domain: 'content';
|
|
16
|
+
readonly id: AgentEffectiveContentId;
|
|
17
|
+
readonly revision: number;
|
|
18
|
+
readonly catalogRevision: number;
|
|
19
|
+
}>;
|
|
20
|
+
export type AgentExtensionCommandComponentTarget = Readonly<{
|
|
21
|
+
readonly domain: 'commands';
|
|
22
|
+
readonly id: AgentCommandId;
|
|
23
|
+
readonly revision: number;
|
|
24
|
+
readonly catalogRevision: number;
|
|
25
|
+
}>;
|
|
26
|
+
export type AgentExtensionIntegrationComponentTarget = Readonly<{
|
|
27
|
+
readonly domain: 'integrations';
|
|
28
|
+
readonly id: AgentIntegrationId;
|
|
29
|
+
readonly revision: number;
|
|
30
|
+
readonly catalogRevision: number;
|
|
31
|
+
}>;
|
|
32
|
+
export type AgentExtensionComponentTarget = AgentExtensionContentComponentTarget | AgentExtensionCommandComponentTarget | AgentExtensionIntegrationComponentTarget;
|
|
33
|
+
export type AgentExtensionContentComponent = Readonly<{
|
|
34
|
+
readonly kind: AgentExtensionContentComponentKind;
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly target?: AgentExtensionContentComponentTarget;
|
|
37
|
+
}>;
|
|
38
|
+
export type AgentExtensionCommandComponent = Readonly<{
|
|
39
|
+
readonly kind: 'command';
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly target?: AgentExtensionCommandComponentTarget;
|
|
42
|
+
}>;
|
|
43
|
+
export type AgentExtensionIntegrationComponent = Readonly<{
|
|
44
|
+
readonly kind: 'mcp_server' | 'connector';
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly target?: AgentExtensionIntegrationComponentTarget;
|
|
47
|
+
}>;
|
|
48
|
+
export type AgentExtensionDescriptiveComponent = Readonly<{
|
|
49
|
+
readonly kind: 'hook' | 'lsp_server' | 'scheduled_task' | 'other';
|
|
50
|
+
readonly name: string;
|
|
51
|
+
}>;
|
|
52
|
+
export type AgentExtensionComponent = AgentExtensionContentComponent | AgentExtensionCommandComponent | AgentExtensionIntegrationComponent | AgentExtensionDescriptiveComponent;
|
|
53
|
+
export interface AgentExtensionDescriptor {
|
|
54
|
+
readonly extensionId: AgentExtensionId;
|
|
55
|
+
readonly revision: number;
|
|
56
|
+
readonly name: string;
|
|
57
|
+
readonly summary?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Version text reported by the native harness. It is descriptive metadata;
|
|
60
|
+
* it is not an integrity or trust assertion.
|
|
61
|
+
*/
|
|
62
|
+
readonly version?: string;
|
|
63
|
+
readonly installation: AgentAvailabilityFact;
|
|
64
|
+
readonly enablement: AgentAvailabilityFact;
|
|
65
|
+
readonly source: AgentEnvironmentSource;
|
|
66
|
+
readonly components: readonly AgentExtensionComponent[];
|
|
67
|
+
}
|
|
68
|
+
export interface AgentExtensionCatalog {
|
|
69
|
+
readonly revision: number;
|
|
70
|
+
readonly observedAt: AgentIsoDateTime;
|
|
71
|
+
readonly extensions: readonly AgentExtensionDescriptor[];
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const AGENT_EXTENSION_COMPONENT_KINDS = [
|
|
2
|
+
"skill",
|
|
3
|
+
"rule",
|
|
4
|
+
"prompt",
|
|
5
|
+
"agent_definition",
|
|
6
|
+
"command",
|
|
7
|
+
"mcp_server",
|
|
8
|
+
"connector",
|
|
9
|
+
"hook",
|
|
10
|
+
"lsp_server",
|
|
11
|
+
"scheduled_task",
|
|
12
|
+
"other"
|
|
13
|
+
];
|
|
14
|
+
const AGENT_EXTENSION_CATALOG_MAX_LENGTH = 256;
|
|
15
|
+
const AGENT_EXTENSION_COMPONENTS_MAX_LENGTH = 4096;
|
|
16
|
+
const AGENT_EXTENSION_CATALOG_BYTES_LIMIT = 512 * 1024;
|
|
17
|
+
const AGENT_EXTENSION_NAME_MAX_LENGTH = 200;
|
|
18
|
+
const AGENT_EXTENSION_SUMMARY_MAX_LENGTH = 2e3;
|
|
19
|
+
const AGENT_EXTENSION_VERSION_MAX_LENGTH = 200;
|
|
20
|
+
const AGENT_EXTENSION_COMPONENT_NAME_MAX_LENGTH = 200;
|
|
21
|
+
export {
|
|
22
|
+
AGENT_EXTENSION_CATALOG_BYTES_LIMIT,
|
|
23
|
+
AGENT_EXTENSION_CATALOG_MAX_LENGTH,
|
|
24
|
+
AGENT_EXTENSION_COMPONENTS_MAX_LENGTH,
|
|
25
|
+
AGENT_EXTENSION_COMPONENT_KINDS,
|
|
26
|
+
AGENT_EXTENSION_COMPONENT_NAME_MAX_LENGTH,
|
|
27
|
+
AGENT_EXTENSION_NAME_MAX_LENGTH,
|
|
28
|
+
AGENT_EXTENSION_SUMMARY_MAX_LENGTH,
|
|
29
|
+
AGENT_EXTENSION_VERSION_MAX_LENGTH
|
|
30
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentArtifactId, AgentApprovalOptionId, AgentCollaborationId, AgentConfigurationRevisionId, AgentError, AgentGeneratedResourceId, AgentInstanceId, AgentIntegrationId, AgentIntegrationResourceId, AgentIntegrationServerId, AgentIntegrationToolId, AgentIsoDateTime, AgentItemId, AgentJsonValue, AgentManagedContentId, AgentOperationId, AgentOperationInvocationId, AgentProviderConversationId, AgentProviderHistoryAnchor, AgentProviderItemRef, AgentProviderKey, AgentProviderRefs, AgentProviderRequestRef, AgentProviderTurnRef, AgentRequestFieldId, AgentRequestId, AgentSessionId, AgentTurnId } from './types.js';
|
|
1
|
+
import type { AgentArtifactId, AgentApprovalOptionId, AgentCollaborationId, AgentConfigurationRevisionId, AgentError, AgentGeneratedResourceId, AgentInstanceId, AgentIntegrationId, AgentIntegrationResourceId, AgentIntegrationServerId, AgentIntegrationToolId, AgentIsoDateTime, AgentItemId, AgentJsonValue, AgentManagedContentId, AgentEnvironmentId, AgentEffectiveContentId, AgentCommandId, AgentExtensionId, AgentOperationId, AgentOperationInvocationId, AgentProviderConversationId, AgentProviderHistoryAnchor, AgentProviderItemRef, AgentProviderKey, AgentProviderRefs, AgentProviderRequestRef, AgentProviderTurnRef, AgentRequestFieldId, AgentRequestId, AgentSessionId, AgentTurnId } from './types.js';
|
|
2
2
|
import type { AgentProtocolParseResult } from './validation.js';
|
|
3
3
|
export declare const parseAgentInstanceId: (input: unknown) => AgentInstanceId;
|
|
4
4
|
export declare const safeParseAgentInstanceId: (input: unknown) => AgentProtocolParseResult<AgentInstanceId>;
|
|
@@ -56,4 +56,12 @@ export declare function parseAgentProviderRefs(input: unknown): AgentProviderRef
|
|
|
56
56
|
export declare function safeParseAgentProviderRefs(input: unknown): AgentProtocolParseResult<AgentProviderRefs>;
|
|
57
57
|
export declare function parseAgentError(input: unknown): AgentError;
|
|
58
58
|
export declare function safeParseAgentError(input: unknown): AgentProtocolParseResult<AgentError>;
|
|
59
|
+
export declare const parseAgentEnvironmentId: (input: unknown) => AgentEnvironmentId;
|
|
60
|
+
export declare const safeParseAgentEnvironmentId: (input: unknown) => AgentProtocolParseResult<AgentEnvironmentId>;
|
|
61
|
+
export declare const parseAgentEffectiveContentId: (input: unknown) => AgentEffectiveContentId;
|
|
62
|
+
export declare const safeParseAgentEffectiveContentId: (input: unknown) => AgentProtocolParseResult<AgentEffectiveContentId>;
|
|
63
|
+
export declare const parseAgentCommandId: (input: unknown) => AgentCommandId;
|
|
64
|
+
export declare const safeParseAgentCommandId: (input: unknown) => AgentProtocolParseResult<AgentCommandId>;
|
|
65
|
+
export declare const parseAgentExtensionId: (input: unknown) => AgentExtensionId;
|
|
66
|
+
export declare const safeParseAgentExtensionId: (input: unknown) => AgentProtocolParseResult<AgentExtensionId>;
|
|
59
67
|
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -15,6 +15,10 @@ import {
|
|
|
15
15
|
AgentItemIdSchema,
|
|
16
16
|
AgentJsonValueSchema,
|
|
17
17
|
AgentManagedContentIdSchema,
|
|
18
|
+
AgentEnvironmentIdSchema,
|
|
19
|
+
AgentEffectiveContentIdSchema,
|
|
20
|
+
AgentCommandIdSchema,
|
|
21
|
+
AgentExtensionIdSchema,
|
|
18
22
|
AgentOperationIdSchema,
|
|
19
23
|
AgentOperationInvocationIdSchema,
|
|
20
24
|
AgentProviderConversationIdSchema,
|
|
@@ -166,12 +170,28 @@ function parseAgentError(input) {
|
|
|
166
170
|
function safeParseAgentError(input) {
|
|
167
171
|
return safeParseWithSchema(AgentErrorSchema, input);
|
|
168
172
|
}
|
|
173
|
+
const environmentIdParser = idParser(AgentEnvironmentIdSchema);
|
|
174
|
+
const parseAgentEnvironmentId = environmentIdParser.parse;
|
|
175
|
+
const safeParseAgentEnvironmentId = environmentIdParser.safeParse;
|
|
176
|
+
const effectiveContentIdParser = idParser(AgentEffectiveContentIdSchema);
|
|
177
|
+
const parseAgentEffectiveContentId = effectiveContentIdParser.parse;
|
|
178
|
+
const safeParseAgentEffectiveContentId = effectiveContentIdParser.safeParse;
|
|
179
|
+
const commandIdParser = idParser(AgentCommandIdSchema);
|
|
180
|
+
const parseAgentCommandId = commandIdParser.parse;
|
|
181
|
+
const safeParseAgentCommandId = commandIdParser.safeParse;
|
|
182
|
+
const extensionIdParser = idParser(AgentExtensionIdSchema);
|
|
183
|
+
const parseAgentExtensionId = extensionIdParser.parse;
|
|
184
|
+
const safeParseAgentExtensionId = extensionIdParser.safeParse;
|
|
169
185
|
export {
|
|
170
186
|
parseAgentApprovalOptionId,
|
|
171
187
|
parseAgentArtifactId,
|
|
172
188
|
parseAgentCollaborationId,
|
|
189
|
+
parseAgentCommandId,
|
|
173
190
|
parseAgentConfigurationRevisionId,
|
|
191
|
+
parseAgentEffectiveContentId,
|
|
192
|
+
parseAgentEnvironmentId,
|
|
174
193
|
parseAgentError,
|
|
194
|
+
parseAgentExtensionId,
|
|
175
195
|
parseAgentGeneratedResourceId,
|
|
176
196
|
parseAgentInstanceId,
|
|
177
197
|
parseAgentIntegrationId,
|
|
@@ -198,8 +218,12 @@ export {
|
|
|
198
218
|
safeParseAgentApprovalOptionId,
|
|
199
219
|
safeParseAgentArtifactId,
|
|
200
220
|
safeParseAgentCollaborationId,
|
|
221
|
+
safeParseAgentCommandId,
|
|
201
222
|
safeParseAgentConfigurationRevisionId,
|
|
223
|
+
safeParseAgentEffectiveContentId,
|
|
224
|
+
safeParseAgentEnvironmentId,
|
|
202
225
|
safeParseAgentError,
|
|
226
|
+
safeParseAgentExtensionId,
|
|
203
227
|
safeParseAgentGeneratedResourceId,
|
|
204
228
|
safeParseAgentInstanceId,
|
|
205
229
|
safeParseAgentIntegrationId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { AgentProtocolParseFailure, AgentProtocolParseResult, AgentProtocolParseSuccess, ValidationIssue, ValidationPathSegment, } from './validation.js';
|
|
2
2
|
export { AgentProtocolValidationError } from './validation.js';
|
|
3
|
-
export declare const AGENT_PROTOCOL_VERSION:
|
|
3
|
+
export declare const AGENT_PROTOCOL_VERSION: 9;
|
|
4
4
|
export declare const AGENT_PROTOCOL_ID_MAX_LENGTH = 256;
|
|
5
5
|
export declare const AGENT_PROTOCOL_PROVIDER_REFERENCE_MAX_LENGTH = 512;
|
|
6
6
|
export declare const AGENT_PROTOCOL_PROVIDER_KEY_MAX_LENGTH = 100;
|
|
@@ -28,6 +28,10 @@ export type AgentArtifactId = AgentProtocolId<'AgentArtifactId'>;
|
|
|
28
28
|
export type AgentOperationId = AgentProtocolId<'AgentOperationId'>;
|
|
29
29
|
export type AgentOperationInvocationId = AgentProtocolId<'AgentOperationInvocationId'>;
|
|
30
30
|
export type AgentManagedContentId = AgentProtocolId<'AgentManagedContentId'>;
|
|
31
|
+
export type AgentEnvironmentId = AgentProtocolId<'AgentEnvironmentId'>;
|
|
32
|
+
export type AgentEffectiveContentId = AgentProtocolId<'AgentEffectiveContentId'>;
|
|
33
|
+
export type AgentCommandId = AgentProtocolId<'AgentCommandId'>;
|
|
34
|
+
export type AgentExtensionId = AgentProtocolId<'AgentExtensionId'>;
|
|
31
35
|
export type AgentIntegrationId = AgentProtocolId<'AgentIntegrationId'>;
|
|
32
36
|
export type AgentIntegrationServerId = AgentProtocolId<'AgentIntegrationServerId'>;
|
|
33
37
|
export type AgentIntegrationToolId = AgentProtocolId<'AgentIntegrationToolId'>;
|
package/dist/foundation/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentProtocolValidationError } from "./validation.js";
|
|
2
|
-
const AGENT_PROTOCOL_VERSION =
|
|
2
|
+
const AGENT_PROTOCOL_VERSION = 9;
|
|
3
3
|
const AGENT_PROTOCOL_ID_MAX_LENGTH = 256;
|
|
4
4
|
const AGENT_PROTOCOL_PROVIDER_REFERENCE_MAX_LENGTH = 512;
|
|
5
5
|
const AGENT_PROTOCOL_PROVIDER_KEY_MAX_LENGTH = 100;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { AgentAvailabilityFact, AgentEnvironmentSource } from '../environment/facts.js';
|
|
1
2
|
import type { AgentIntegrationId, AgentIntegrationResourceId, AgentIntegrationServerId, AgentIntegrationToolId, AgentIsoDateTime } from '../foundation/index.js';
|
|
2
3
|
export declare const AGENT_INTEGRATION_STATUSES: readonly ["starting", "ready", "degraded", "unavailable"];
|
|
3
|
-
export declare const AGENT_INTEGRATION_KINDS: readonly ["mcp"];
|
|
4
|
+
export declare const AGENT_INTEGRATION_KINDS: readonly ["mcp", "connector"];
|
|
4
5
|
export declare const AGENT_INTEGRATION_NAME_MAX_LENGTH = 200;
|
|
5
6
|
export declare const AGENT_INTEGRATION_DESCRIPTION_MAX_LENGTH = 2000;
|
|
6
|
-
export declare const AGENT_INTEGRATION_CATALOG_MAX_LENGTH =
|
|
7
|
+
export declare const AGENT_INTEGRATION_CATALOG_MAX_LENGTH = 128;
|
|
7
8
|
export declare const AGENT_INTEGRATION_SERVERS_MAX_LENGTH = 32;
|
|
8
9
|
export declare const AGENT_INTEGRATION_TOOLS_MAX_LENGTH = 100;
|
|
9
10
|
export declare const AGENT_INTEGRATION_RESOURCES_MAX_LENGTH = 100;
|
|
11
|
+
export declare const AGENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH = 4096;
|
|
12
|
+
export declare const AGENT_INTEGRATION_CATALOG_BYTES_LIMIT = 524288;
|
|
10
13
|
export type AgentIntegrationStatus = (typeof AGENT_INTEGRATION_STATUSES)[number];
|
|
11
14
|
export type AgentIntegrationKind = (typeof AGENT_INTEGRATION_KINDS)[number];
|
|
12
15
|
export interface AgentIntegrationToolDescriptor {
|
|
@@ -27,14 +30,29 @@ export interface AgentIntegrationServerDescriptor {
|
|
|
27
30
|
readonly tools: readonly AgentIntegrationToolDescriptor[];
|
|
28
31
|
readonly resources: readonly AgentIntegrationResourceDescriptor[];
|
|
29
32
|
}
|
|
30
|
-
export interface
|
|
33
|
+
export interface AgentMcpIntegrationDescriptor {
|
|
31
34
|
readonly integrationId: AgentIntegrationId;
|
|
32
35
|
readonly revision: number;
|
|
33
|
-
readonly kind:
|
|
36
|
+
readonly kind: 'mcp';
|
|
34
37
|
readonly name: string;
|
|
35
38
|
readonly status: AgentIntegrationStatus;
|
|
36
39
|
readonly servers: readonly AgentIntegrationServerDescriptor[];
|
|
37
40
|
}
|
|
41
|
+
export interface AgentConnectorIntegrationDescriptor {
|
|
42
|
+
readonly integrationId: AgentIntegrationId;
|
|
43
|
+
readonly revision: number;
|
|
44
|
+
readonly kind: 'connector';
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly description?: string;
|
|
47
|
+
readonly source: AgentEnvironmentSource;
|
|
48
|
+
readonly installation: AgentAvailabilityFact;
|
|
49
|
+
readonly enablement: AgentAvailabilityFact;
|
|
50
|
+
readonly authentication: AgentAvailabilityFact;
|
|
51
|
+
readonly health: AgentIntegrationStatus;
|
|
52
|
+
readonly callability: AgentAvailabilityFact;
|
|
53
|
+
readonly tools?: readonly AgentIntegrationToolDescriptor[];
|
|
54
|
+
}
|
|
55
|
+
export type AgentIntegrationDescriptor = AgentMcpIntegrationDescriptor | AgentConnectorIntegrationDescriptor;
|
|
38
56
|
export interface AgentIntegrationCatalog {
|
|
39
57
|
readonly revision: number;
|
|
40
58
|
readonly observedAt: AgentIsoDateTime;
|
|
@@ -4,15 +4,19 @@ const AGENT_INTEGRATION_STATUSES = [
|
|
|
4
4
|
"degraded",
|
|
5
5
|
"unavailable"
|
|
6
6
|
];
|
|
7
|
-
const AGENT_INTEGRATION_KINDS = ["mcp"];
|
|
7
|
+
const AGENT_INTEGRATION_KINDS = ["mcp", "connector"];
|
|
8
8
|
const AGENT_INTEGRATION_NAME_MAX_LENGTH = 200;
|
|
9
9
|
const AGENT_INTEGRATION_DESCRIPTION_MAX_LENGTH = 2e3;
|
|
10
|
-
const AGENT_INTEGRATION_CATALOG_MAX_LENGTH =
|
|
10
|
+
const AGENT_INTEGRATION_CATALOG_MAX_LENGTH = 128;
|
|
11
11
|
const AGENT_INTEGRATION_SERVERS_MAX_LENGTH = 32;
|
|
12
12
|
const AGENT_INTEGRATION_TOOLS_MAX_LENGTH = 100;
|
|
13
13
|
const AGENT_INTEGRATION_RESOURCES_MAX_LENGTH = 100;
|
|
14
|
+
const AGENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH = 4096;
|
|
15
|
+
const AGENT_INTEGRATION_CATALOG_BYTES_LIMIT = 524288;
|
|
14
16
|
export {
|
|
17
|
+
AGENT_INTEGRATION_CATALOG_BYTES_LIMIT,
|
|
15
18
|
AGENT_INTEGRATION_CATALOG_MAX_LENGTH,
|
|
19
|
+
AGENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH,
|
|
16
20
|
AGENT_INTEGRATION_DESCRIPTION_MAX_LENGTH,
|
|
17
21
|
AGENT_INTEGRATION_KINDS,
|
|
18
22
|
AGENT_INTEGRATION_NAME_MAX_LENGTH,
|