@agent-surface/core 0.7.0 → 0.8.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/dist/chunk-77YRWAXY.js +915 -0
- package/dist/chunk-77YRWAXY.js.map +1 -0
- package/dist/explain.d.ts +103 -0
- package/dist/explain.js +123 -0
- package/dist/explain.js.map +1 -0
- package/dist/index.d.ts +3 -758
- package/dist/index.js +55 -859
- package/dist/index.js.map +1 -1
- package/dist/registry-DmWUlnta.d.ts +759 -0
- package/package.json +9 -1
|
@@ -0,0 +1,759 @@
|
|
|
1
|
+
/** JSON value constraint: every agent-crossing payload MUST be a JsonValue. */
|
|
2
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
/** A JSON Schema document restricted to the supported subset (docs/03 D19). */
|
|
6
|
+
type JsonSchema = Record<string, unknown>;
|
|
7
|
+
type AgentEnvironment = "development" | "production" | "test";
|
|
8
|
+
type AgentEffect = "read" | "local-state" | "navigation" | "server-query" | "server-mutation" | "external-side-effect" | "destructive";
|
|
9
|
+
type AgentProcedureEffect = "server-query" | "server-mutation" | "external-side-effect" | "destructive";
|
|
10
|
+
interface AgentConsumer {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: "embedded" | "webmcp" | "mcp-bridge" | "test" | "other";
|
|
13
|
+
/** Free-form grant strings interpreted by host policies. */
|
|
14
|
+
grants?: string[];
|
|
15
|
+
}
|
|
16
|
+
interface AgentRouteInfo {
|
|
17
|
+
path: string;
|
|
18
|
+
params?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Concurrency group for an action or procedure reference (D25). Not
|
|
22
|
+
* model-visible: it is runtime behavior, not planning information.
|
|
23
|
+
*
|
|
24
|
+
* - `instance` (default) — every action on the registration shares one FIFO
|
|
25
|
+
* queue. Safest: two actions on the same component can never interleave.
|
|
26
|
+
* - `capability` — one queue per capability, so a slow export does not block
|
|
27
|
+
* closing a drawer.
|
|
28
|
+
* - `key` — one queue per author-chosen key, for actions that contend over
|
|
29
|
+
* the same resource across capabilities.
|
|
30
|
+
* - `parallel` — bounded parallelism; `max` is required and must be ≥ 1.
|
|
31
|
+
*
|
|
32
|
+
* `queueDepth` overrides `limits.actionQueueDepth` for this group only.
|
|
33
|
+
*/
|
|
34
|
+
type AgentConcurrency = {
|
|
35
|
+
mode: "instance";
|
|
36
|
+
queueDepth?: number;
|
|
37
|
+
} | {
|
|
38
|
+
mode: "capability";
|
|
39
|
+
queueDepth?: number;
|
|
40
|
+
} | {
|
|
41
|
+
mode: "key";
|
|
42
|
+
key: string;
|
|
43
|
+
queueDepth?: number;
|
|
44
|
+
} | {
|
|
45
|
+
mode: "parallel";
|
|
46
|
+
max: number;
|
|
47
|
+
queueDepth?: number;
|
|
48
|
+
};
|
|
49
|
+
interface AgentSurfaceLimits {
|
|
50
|
+
maxComponentDescription: number;
|
|
51
|
+
maxCapabilityDescription: number;
|
|
52
|
+
maxMetaBytes: number;
|
|
53
|
+
maxOutputBytes: number;
|
|
54
|
+
maxSchemaBytes: number;
|
|
55
|
+
maxSchemaDepth: number;
|
|
56
|
+
observationTimeoutMs: number;
|
|
57
|
+
actionTimeoutMs: number;
|
|
58
|
+
procedureTimeoutMs: number;
|
|
59
|
+
actionQueueDepth: number;
|
|
60
|
+
maxConcurrentObservationsPerConsumer: number;
|
|
61
|
+
maxConcurrentObservationsTotal: number;
|
|
62
|
+
maxQueuedObservationsPerConsumer: number;
|
|
63
|
+
dedupeCacheSize: number;
|
|
64
|
+
dedupeCacheTtlMs: number;
|
|
65
|
+
tombstoneSize: number;
|
|
66
|
+
tombstoneTtlMs: number;
|
|
67
|
+
confirmationTtlMs: number;
|
|
68
|
+
maxPendingConfirmations: number;
|
|
69
|
+
}
|
|
70
|
+
declare const DEFAULT_LIMITS: AgentSurfaceLimits;
|
|
71
|
+
type Unsubscribe = () => void;
|
|
72
|
+
|
|
73
|
+
interface AgentSchemaIssue {
|
|
74
|
+
path: string;
|
|
75
|
+
message: string;
|
|
76
|
+
}
|
|
77
|
+
/** Thrown by AgentSchema.parse on invalid input; carries safe, structured issues. */
|
|
78
|
+
declare class AgentSchemaError extends Error {
|
|
79
|
+
readonly issues: AgentSchemaIssue[];
|
|
80
|
+
constructor(issues: AgentSchemaIssue[]);
|
|
81
|
+
}
|
|
82
|
+
interface AgentSchema<T> {
|
|
83
|
+
/** Agent-visible JSON Schema (draft 2020-12, restricted subset). */
|
|
84
|
+
readonly jsonSchema: JsonSchema;
|
|
85
|
+
/**
|
|
86
|
+
* Validates and returns a typed value. MUST throw `AgentSchemaError`
|
|
87
|
+
* (with a safe, structured message) on invalid input.
|
|
88
|
+
*/
|
|
89
|
+
parse(value: unknown): T;
|
|
90
|
+
}
|
|
91
|
+
/** Minimal Standard Schema mirror (https://standardschema.dev). */
|
|
92
|
+
interface StandardSchemaV1<I = unknown, O = I> {
|
|
93
|
+
readonly "~standard": {
|
|
94
|
+
readonly version: 1;
|
|
95
|
+
readonly vendor: string;
|
|
96
|
+
validate(value: unknown): {
|
|
97
|
+
value: O;
|
|
98
|
+
issues?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
issues: ReadonlyArray<{
|
|
101
|
+
message: string;
|
|
102
|
+
path?: ReadonlyArray<PropertyKey | {
|
|
103
|
+
key: PropertyKey;
|
|
104
|
+
}>;
|
|
105
|
+
}>;
|
|
106
|
+
} | Promise<unknown>;
|
|
107
|
+
readonly types?: {
|
|
108
|
+
readonly input: I;
|
|
109
|
+
readonly output: O;
|
|
110
|
+
} | undefined;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Wraps any Standard Schema (Zod ≥3.24, Valibot, ArkType) as an AgentSchema.
|
|
115
|
+
* The JSON Schema MUST be supplied explicitly — core does not depend on a
|
|
116
|
+
* converter (docs/03, D20).
|
|
117
|
+
*/
|
|
118
|
+
declare function fromStandardSchema<T>(schema: StandardSchemaV1<unknown, T>, options: {
|
|
119
|
+
jsonSchema: JsonSchema;
|
|
120
|
+
}): AgentSchema<T>;
|
|
121
|
+
/**
|
|
122
|
+
* Builds an AgentSchema from a raw JSON Schema, validated by the built-in
|
|
123
|
+
* minimal structural validator covering exactly the supported subset.
|
|
124
|
+
*/
|
|
125
|
+
declare function fromJsonSchema<T = JsonValue>(schema: JsonSchema): AgentSchema<T>;
|
|
126
|
+
/** Convenience for actions with no input / observations of constant shape. */
|
|
127
|
+
declare const emptyObjectSchema: AgentSchema<Record<string, never>>;
|
|
128
|
+
interface SchemaSubsetResult {
|
|
129
|
+
ok: boolean;
|
|
130
|
+
reason?: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Validates that a JSON Schema document stays inside the D19 subset.
|
|
134
|
+
* Anything outside MUST be rejected at registration with INVALID_DEFINITION /
|
|
135
|
+
* UNSUPPORTED_SCHEMA (docs/03, docs/07).
|
|
136
|
+
*/
|
|
137
|
+
declare function validateJsonSchemaDocument(schema: JsonSchema, limits: {
|
|
138
|
+
maxSchemaBytes: number;
|
|
139
|
+
maxSchemaDepth: number;
|
|
140
|
+
}): SchemaSubsetResult;
|
|
141
|
+
/**
|
|
142
|
+
* Validates a value against a subset schema. Returns issues (empty = valid).
|
|
143
|
+
* JSON Schema semantics: `default` is annotation-only and never applied.
|
|
144
|
+
*/
|
|
145
|
+
declare function validateValueAgainstSchema(value: unknown, schema: unknown, root: JsonSchema, path: string): AgentSchemaIssue[];
|
|
146
|
+
|
|
147
|
+
/** The closed agent-facing error enum — one runtime source, cross-validated
|
|
148
|
+
* against spec/error-matrix.json (docs/07 §principles, AS-ERR-001). */
|
|
149
|
+
declare const AGENT_CAPABILITY_ERROR_CODES: readonly ["CAPABILITY_NOT_FOUND", "CAPABILITY_NOT_AVAILABLE", "AMBIGUOUS_INSTANCE", "COMPONENT_UNMOUNTED", "STALE_CAPABILITY", "INVOCATION_CONFLICT", "INVALID_INPUT", "NOT_AUTHENTICATED", "NOT_AUTHORIZED", "PRECONDITION_FAILED", "CONFIRMATION_REQUIRED", "CONFIRMATION_INVALID", "RATE_LIMITED", "TIMEOUT", "CANCELLED", "EXECUTION_FAILED"];
|
|
150
|
+
type AgentCapabilityErrorCode = (typeof AGENT_CAPABILITY_ERROR_CODES)[number];
|
|
151
|
+
type AgentErrorRetry = "no" | "yes" | "after-refresh" | "after-delay" | "with-confirmation" | "with-changes";
|
|
152
|
+
interface AgentCapabilityErrorPayload {
|
|
153
|
+
code: AgentCapabilityErrorCode;
|
|
154
|
+
/** Agent-safe, imperative, ≤ 300 chars. */
|
|
155
|
+
message: string;
|
|
156
|
+
retry: AgentErrorRetry;
|
|
157
|
+
/** Code-specific, agent-safe, JsonValue only. */
|
|
158
|
+
details?: Record<string, JsonValue>;
|
|
159
|
+
}
|
|
160
|
+
/** Thrown form used inside policies/handlers; serialized at the boundary. */
|
|
161
|
+
declare class AgentSurfaceError extends Error {
|
|
162
|
+
readonly payload: AgentCapabilityErrorPayload;
|
|
163
|
+
constructor(payload: AgentCapabilityErrorPayload, opts?: {
|
|
164
|
+
cause?: unknown;
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
declare function isAgentSurfaceError(e: unknown): e is AgentSurfaceError;
|
|
168
|
+
type AgentSurfaceDefinitionErrorCode = "INVALID_ID" | "INVALID_DEFINITION" | "UNSUPPORTED_SCHEMA" | "PLANE_VIOLATION" | "DUPLICATE_CAPABILITY" | "LIMIT_EXCEEDED";
|
|
169
|
+
/** Structural defects at registration time. Always thrown, never agent-facing. */
|
|
170
|
+
declare class AgentSurfaceDefinitionError extends Error {
|
|
171
|
+
readonly code: AgentSurfaceDefinitionErrorCode;
|
|
172
|
+
constructor(code: AgentSurfaceDefinitionErrorCode, message: string);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
interface AgentInvocation {
|
|
176
|
+
/** Idempotency key. Adapters SHOULD pass their tool-call id. Generated if absent. */
|
|
177
|
+
invocationId?: string;
|
|
178
|
+
capabilityId: string;
|
|
179
|
+
/** Required when >1 live instance of the target component exists. */
|
|
180
|
+
instanceId?: string;
|
|
181
|
+
/** Staleness token from discovery. Adapters SHOULD always send it. */
|
|
182
|
+
registrationId?: string;
|
|
183
|
+
/** Version hint; enforced only for destructive/external effects. */
|
|
184
|
+
surfaceVersion?: string;
|
|
185
|
+
input?: JsonValue;
|
|
186
|
+
/** Evidence from a resolved confirmation (docs/06). */
|
|
187
|
+
confirmationId?: string;
|
|
188
|
+
}
|
|
189
|
+
interface InvokeOptions {
|
|
190
|
+
consumer?: AgentConsumer;
|
|
191
|
+
signal?: AbortSignal;
|
|
192
|
+
timeoutMs?: number;
|
|
193
|
+
}
|
|
194
|
+
type AgentInvocationResult = {
|
|
195
|
+
status: "ok";
|
|
196
|
+
invocationId: string;
|
|
197
|
+
capabilityId: string;
|
|
198
|
+
output?: JsonValue;
|
|
199
|
+
surfaceVersion: string;
|
|
200
|
+
/** Set when the surface changed during execution. */
|
|
201
|
+
surfaceChanged?: boolean;
|
|
202
|
+
} | {
|
|
203
|
+
status: "error";
|
|
204
|
+
invocationId: string;
|
|
205
|
+
capabilityId: string;
|
|
206
|
+
error: AgentCapabilityErrorPayload;
|
|
207
|
+
surfaceVersion: string;
|
|
208
|
+
surfaceChanged?: boolean;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
interface AuditEvent {
|
|
212
|
+
at: string;
|
|
213
|
+
type: "registration" | "unregistration" | "registration-rejected" | "invocation-started" | "invocation-settled" | "confirmation-requested" | "confirmation-approved" | "confirmation-denied" | "confirmation-expired" | "confirmation-consumed" | "late-settlement" | "collision-suspected";
|
|
214
|
+
capabilityId?: string;
|
|
215
|
+
registrationId?: string;
|
|
216
|
+
invocationId?: string;
|
|
217
|
+
consumerId?: string;
|
|
218
|
+
status?: "ok" | "error";
|
|
219
|
+
code?: AgentCapabilityErrorCode;
|
|
220
|
+
durationMs?: number;
|
|
221
|
+
/** Time spent waiting for a concurrency slot (docs/06 §audit; distinct
|
|
222
|
+
* from execution — §7.1 observability). Settled invocations only. */
|
|
223
|
+
queueWaitMs?: number;
|
|
224
|
+
/** Time spent inside the handler/executor guards, excluding queue wait. */
|
|
225
|
+
executionMs?: number;
|
|
226
|
+
/** Present only for capabilities with audit: "full"; size-capped. */
|
|
227
|
+
payload?: {
|
|
228
|
+
input?: JsonValue;
|
|
229
|
+
output?: JsonValue;
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
interface AuditSink {
|
|
233
|
+
/** MUST NOT throw; MUST be non-blocking. */
|
|
234
|
+
record(event: AuditEvent): void;
|
|
235
|
+
}
|
|
236
|
+
declare function memoryAuditSink(opts?: {
|
|
237
|
+
capacity?: number;
|
|
238
|
+
}): AuditSink & {
|
|
239
|
+
events(): AuditEvent[];
|
|
240
|
+
};
|
|
241
|
+
declare function consoleAuditSink(): AuditSink;
|
|
242
|
+
|
|
243
|
+
type DiscoveryDecision = {
|
|
244
|
+
decision: "expose";
|
|
245
|
+
} | {
|
|
246
|
+
decision: "disable";
|
|
247
|
+
reason: string;
|
|
248
|
+
} | {
|
|
249
|
+
decision: "hide";
|
|
250
|
+
};
|
|
251
|
+
interface AgentPolicyContext {
|
|
252
|
+
capabilityId: string;
|
|
253
|
+
plane: "view" | "domain";
|
|
254
|
+
kind: "observation" | "action" | "procedure";
|
|
255
|
+
effect: AgentEffect;
|
|
256
|
+
registrationId: string;
|
|
257
|
+
consumer: AgentConsumer;
|
|
258
|
+
host: Readonly<Record<string, unknown>>;
|
|
259
|
+
meta: {
|
|
260
|
+
component?: Record<string, JsonValue>;
|
|
261
|
+
capability?: Record<string, JsonValue>;
|
|
262
|
+
};
|
|
263
|
+
internal: Readonly<Record<string, unknown>>;
|
|
264
|
+
/** Registry environment (additive convenience for built-ins). */
|
|
265
|
+
environment: AgentEnvironment;
|
|
266
|
+
/** Registry's injectable clock — built-ins MUST use this, never Date.now(). */
|
|
267
|
+
now(): number;
|
|
268
|
+
}
|
|
269
|
+
/** Phase-4 context: no agent input is available here, by construction (D21). */
|
|
270
|
+
type AgentAuthorizationContext = AgentPolicyContext;
|
|
271
|
+
/** Phase-6 context: only the validated effective input is visible (D21). */
|
|
272
|
+
interface AgentInvocationPolicyContext extends AgentAuthorizationContext {
|
|
273
|
+
invocationId: string;
|
|
274
|
+
effectiveInput: JsonValue;
|
|
275
|
+
}
|
|
276
|
+
interface AgentPolicy {
|
|
277
|
+
name: string;
|
|
278
|
+
/**
|
|
279
|
+
* Discovery-time filter. MUST be synchronous, cheap, side-effect free.
|
|
280
|
+
* Advisory: hides/disables in catalogs. Default when absent: expose.
|
|
281
|
+
*/
|
|
282
|
+
onDiscovery?(ctx: AgentPolicyContext): DiscoveryDecision;
|
|
283
|
+
/**
|
|
284
|
+
* Pre-input authority gate (pipeline phase 4): authn/authz/tenant/
|
|
285
|
+
* environment/input-independent rate. MAY be async. Onion order; call
|
|
286
|
+
* next() to proceed. Throw AgentSurfaceError to deny.
|
|
287
|
+
*/
|
|
288
|
+
onAuthorize?(ctx: AgentAuthorizationContext, next: () => Promise<AgentInvocationResult>): Promise<AgentInvocationResult>;
|
|
289
|
+
/**
|
|
290
|
+
* Post-input invocation gate (pipeline phase 6). Receives ONLY the
|
|
291
|
+
* validated effective input — never raw agent input (D21).
|
|
292
|
+
*/
|
|
293
|
+
onInvoke?(ctx: AgentInvocationPolicyContext, next: () => Promise<AgentInvocationResult>): Promise<AgentInvocationResult>;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Marker read by the invocation pipeline: policies carrying it escalate the
|
|
297
|
+
* capability's confirmation requirement (docs/06 requireConfirmation).
|
|
298
|
+
*/
|
|
299
|
+
declare const CONFIRMATION_ESCALATION: unique symbol;
|
|
300
|
+
interface ConfirmationEscalation {
|
|
301
|
+
/** Evaluated at phase 6 over the validated effective input (D21). */
|
|
302
|
+
if?: (ctx: AgentPolicyContext & {
|
|
303
|
+
effectiveInput: JsonValue;
|
|
304
|
+
}) => boolean;
|
|
305
|
+
summary?: (effectiveInput: JsonValue) => string;
|
|
306
|
+
}
|
|
307
|
+
/** Most-restrictive-wins composition of discovery decisions (docs/06). */
|
|
308
|
+
declare function evaluateDiscovery(policies: ReadonlyArray<AgentPolicy>, ctx: AgentPolicyContext): DiscoveryDecision;
|
|
309
|
+
/** Onion composition of onInvoke handlers (registry outermost, phase 6). */
|
|
310
|
+
declare function composeInvokeChain(policies: ReadonlyArray<AgentPolicy>, ctx: AgentInvocationPolicyContext, core: () => Promise<AgentInvocationResult>): Promise<AgentInvocationResult>;
|
|
311
|
+
/** Requires ctx.host[key] (default "user"). Fails NOT_AUTHENTICATED; hides. */
|
|
312
|
+
declare function authenticated(opts?: {
|
|
313
|
+
key?: string;
|
|
314
|
+
}): AgentPolicy;
|
|
315
|
+
/** Delegates to a host authorizer. Fails NOT_AUTHORIZED; hides at discovery. */
|
|
316
|
+
declare function hasPermission(permission: string, check: (host: Record<string, unknown>, permission: string) => boolean): AgentPolicy;
|
|
317
|
+
/** Tenant boundary: hides unless current(host) === expected(ctx). */
|
|
318
|
+
declare function tenantBoundary(opts: {
|
|
319
|
+
current: (host: Record<string, unknown>) => string | undefined;
|
|
320
|
+
expected: (ctx: AgentPolicyContext) => string | undefined;
|
|
321
|
+
}): AgentPolicy;
|
|
322
|
+
/** Restricts to environments. Others: hidden. */
|
|
323
|
+
declare function environment(allowed: AgentEnvironment[]): AgentPolicy;
|
|
324
|
+
/**
|
|
325
|
+
* Token bucket per (consumer, capability). Advisory, input-independent —
|
|
326
|
+
* runs pre-input (phase 4). Author input-aware rate policies as onInvoke.
|
|
327
|
+
* Fails RATE_LIMITED. Uses the injectable clock (AS-POLICY-001).
|
|
328
|
+
*/
|
|
329
|
+
declare function rateLimit(opts: {
|
|
330
|
+
limit: number;
|
|
331
|
+
windowMs: number;
|
|
332
|
+
}): AgentPolicy;
|
|
333
|
+
/** Escalates confirmation to "required" (optionally conditionally).
|
|
334
|
+
* Predicates run at phase 6 over the validated effective input (D21). */
|
|
335
|
+
declare function requireConfirmation(opts?: {
|
|
336
|
+
if?: (ctx: AgentPolicyContext & {
|
|
337
|
+
effectiveInput: JsonValue;
|
|
338
|
+
}) => boolean;
|
|
339
|
+
summary?: (effectiveInput: JsonValue) => string;
|
|
340
|
+
}): AgentPolicy;
|
|
341
|
+
/** Forwards invocation events to a sink at the given detail level.
|
|
342
|
+
* Runs at phase 6 (onInvoke): its enrichment sees the effective input. */
|
|
343
|
+
declare function audit(sink?: AuditSink, level?: "metadata" | "full"): AgentPolicy;
|
|
344
|
+
|
|
345
|
+
interface AgentReadContext {
|
|
346
|
+
capabilityId: string;
|
|
347
|
+
registrationId: string;
|
|
348
|
+
consumer: AgentConsumer;
|
|
349
|
+
/** Host context (user, tenant, env…) from RegistryOptions.context(). */
|
|
350
|
+
host: Readonly<Record<string, unknown>>;
|
|
351
|
+
}
|
|
352
|
+
interface AgentActionContext extends AgentReadContext {
|
|
353
|
+
invocationId: string;
|
|
354
|
+
/** Aborted on timeout, external cancellation, or unmount. Cooperative. */
|
|
355
|
+
signal: AbortSignal;
|
|
356
|
+
/** Present iff this invocation carries approved confirmation evidence. */
|
|
357
|
+
confirmation?: {
|
|
358
|
+
id: string;
|
|
359
|
+
approvedAt: string;
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
interface PreconditionFailure {
|
|
363
|
+
message: string;
|
|
364
|
+
details?: Record<string, JsonValue>;
|
|
365
|
+
}
|
|
366
|
+
interface AgentObservationDefinition<TOut extends JsonValue> {
|
|
367
|
+
/** Agent-visible description, ≤ 300 chars. */
|
|
368
|
+
description: string;
|
|
369
|
+
output: AgentSchema<TOut>;
|
|
370
|
+
/**
|
|
371
|
+
* Reads current semantic state. MUST be side-effect free. SHOULD be
|
|
372
|
+
* synchronous; MAY return a promise (subject to observation timeout).
|
|
373
|
+
*/
|
|
374
|
+
read(ctx: AgentReadContext): TOut | Promise<TOut>;
|
|
375
|
+
/** Availability predicate, re-evaluated at snapshot and at invocation. */
|
|
376
|
+
when?: () => boolean;
|
|
377
|
+
unavailableReason?: string | (() => string);
|
|
378
|
+
policies?: AgentPolicy[];
|
|
379
|
+
meta?: Record<string, JsonValue>;
|
|
380
|
+
timeoutMs?: number;
|
|
381
|
+
}
|
|
382
|
+
interface AgentActionDefinition<TIn extends JsonValue, TOut extends JsonValue | void = void> {
|
|
383
|
+
description: string;
|
|
384
|
+
input: AgentSchema<TIn>;
|
|
385
|
+
output?: AgentSchema<Exclude<TOut, void>>;
|
|
386
|
+
/** View actions MUST be "local-state" | "navigation" (plane rule, docs/01). */
|
|
387
|
+
effect: "local-state" | "navigation";
|
|
388
|
+
idempotent?: boolean;
|
|
389
|
+
reversible?: boolean;
|
|
390
|
+
confirmation?: "never" | "optional" | "required";
|
|
391
|
+
audit?: "none" | "metadata" | "full";
|
|
392
|
+
when?: () => boolean;
|
|
393
|
+
unavailableReason?: string | (() => string);
|
|
394
|
+
/**
|
|
395
|
+
* Input-aware validation beyond the schema. Return void to pass; return
|
|
396
|
+
* (or throw) a PreconditionFailure to fail with PRECONDITION_FAILED.
|
|
397
|
+
*/
|
|
398
|
+
precondition?(input: TIn, ctx: AgentReadContext): void | PreconditionFailure;
|
|
399
|
+
/**
|
|
400
|
+
* TOut is inferred from `output` only (NoInfer): the schema is the source
|
|
401
|
+
* of truth and the handler's return is checked against it.
|
|
402
|
+
*/
|
|
403
|
+
execute(input: TIn, ctx: AgentActionContext): NoInfer<TOut> | Promise<NoInfer<TOut>>;
|
|
404
|
+
policies?: AgentPolicy[];
|
|
405
|
+
meta?: Record<string, JsonValue>;
|
|
406
|
+
timeoutMs?: number;
|
|
407
|
+
/** Concurrency group (D25). Default `{mode:"instance"}` — serialize with
|
|
408
|
+
* every other action on this component instance. */
|
|
409
|
+
concurrency?: AgentConcurrency;
|
|
410
|
+
}
|
|
411
|
+
/** Identity helpers that fix generics for record-literal authoring. */
|
|
412
|
+
declare function observation<TOut extends JsonValue>(def: AgentObservationDefinition<TOut>): AgentObservationDefinition<TOut>;
|
|
413
|
+
declare function action<TIn extends JsonValue, TOut extends JsonValue | void = void>(def: AgentActionDefinition<TIn, TOut>): AgentActionDefinition<TIn, TOut>;
|
|
414
|
+
declare function defineAgentComponent(def: AgentComponentDefinition): AgentComponentDefinition;
|
|
415
|
+
interface ProcedureCallInfo {
|
|
416
|
+
invocationId: string;
|
|
417
|
+
consumer: AgentConsumer;
|
|
418
|
+
signal: AbortSignal;
|
|
419
|
+
confirmation?: {
|
|
420
|
+
id: string;
|
|
421
|
+
approvedAt: string;
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
interface AgentProcedureExecutor {
|
|
425
|
+
execute(req: {
|
|
426
|
+
path: string;
|
|
427
|
+
input: JsonValue;
|
|
428
|
+
info: ProcedureCallInfo;
|
|
429
|
+
}): Promise<JsonValue>;
|
|
430
|
+
/** Known exposed procedure paths (manifest), used for suffix-collision lint. */
|
|
431
|
+
paths?: ReadonlyArray<string>;
|
|
432
|
+
}
|
|
433
|
+
interface AgentProcedureRefDescriptor {
|
|
434
|
+
readonly id: string;
|
|
435
|
+
readonly path: string;
|
|
436
|
+
readonly description: string;
|
|
437
|
+
readonly inputSchema: JsonSchema;
|
|
438
|
+
readonly outputSchema?: JsonSchema;
|
|
439
|
+
readonly effect: AgentProcedureEffect;
|
|
440
|
+
/** Server-declared flag the client must respect (approval required). */
|
|
441
|
+
readonly requiresApproval?: boolean;
|
|
442
|
+
}
|
|
443
|
+
interface AgentProcedureBindingRuntimeConfig {
|
|
444
|
+
when?: () => boolean;
|
|
445
|
+
unavailableReason?: string | (() => string);
|
|
446
|
+
/** UI-derived inputs, evaluated at EXECUTION time (docs/05 rule 4). */
|
|
447
|
+
bind?: () => Record<string, JsonValue>;
|
|
448
|
+
overridableFields?: ReadonlyArray<string>;
|
|
449
|
+
/** Escalate (never lower) the manifest's confirmation requirement. */
|
|
450
|
+
confirmation?: "optional" | "required";
|
|
451
|
+
policies?: AgentPolicy[];
|
|
452
|
+
/** Contextual description appended to the manifest description. */
|
|
453
|
+
describe?: () => string;
|
|
454
|
+
meta?: Record<string, JsonValue>;
|
|
455
|
+
/** Concurrency group (D25). Default: one group per procedure identity per
|
|
456
|
+
* referencing registration — conservative, and it never couples a domain
|
|
457
|
+
* call to unrelated view actions. */
|
|
458
|
+
concurrency?: AgentConcurrency;
|
|
459
|
+
}
|
|
460
|
+
interface AgentProcedureBinding<TIn extends object = object, TOut = unknown> {
|
|
461
|
+
readonly kind: "procedure-binding";
|
|
462
|
+
readonly ref: AgentProcedureRefDescriptor;
|
|
463
|
+
readonly config: AgentProcedureBindingRuntimeConfig;
|
|
464
|
+
/** Keys produced by bind(), captured at binding creation. */
|
|
465
|
+
readonly boundKeys: ReadonlyArray<string>;
|
|
466
|
+
/** Bound keys the agent may NOT supply (bound minus overridable). */
|
|
467
|
+
readonly lockedKeys: ReadonlyArray<string>;
|
|
468
|
+
/** Agent-facing (reduced) input schema per D7 rule 1. */
|
|
469
|
+
readonly reducedInputSchema: JsonSchema;
|
|
470
|
+
/** Optional link to the owning view component. */
|
|
471
|
+
contextLink?: {
|
|
472
|
+
type: string;
|
|
473
|
+
instanceId: string;
|
|
474
|
+
};
|
|
475
|
+
/** Phantom fields carrying the generics (never read at runtime). */
|
|
476
|
+
readonly __types?: {
|
|
477
|
+
input: TIn;
|
|
478
|
+
output: TOut;
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
interface AgentComponentDefinition {
|
|
482
|
+
/** Component type, e.g. "devices.table". MUST match the id grammar. */
|
|
483
|
+
type: string;
|
|
484
|
+
/** Distinguishes simultaneous mounts. Defaults to "default". Data-derived. */
|
|
485
|
+
instanceId?: string;
|
|
486
|
+
/** Agent-visible description, ≤ 500 chars. Required, non-empty. */
|
|
487
|
+
description: string;
|
|
488
|
+
/** Optional containment link for hierarchy-aware consumers. */
|
|
489
|
+
parent?: {
|
|
490
|
+
type: string;
|
|
491
|
+
instanceId?: string;
|
|
492
|
+
};
|
|
493
|
+
/** Agent-visible metadata. JsonValue, ≤ 2 kB serialized. */
|
|
494
|
+
meta?: Record<string, JsonValue>;
|
|
495
|
+
/** Internal metadata for policies/audit sinks. NEVER serialized. */
|
|
496
|
+
internal?: Record<string, unknown>;
|
|
497
|
+
/** Policies applied to every capability of this component. */
|
|
498
|
+
policies?: AgentPolicy[];
|
|
499
|
+
/** Registrant trust label; default "first-party". */
|
|
500
|
+
origin?: string;
|
|
501
|
+
/** Snapshot ordering/budget priority; higher survives budgets longer. */
|
|
502
|
+
priority?: number;
|
|
503
|
+
/** Master switch; false ⇒ all capabilities visible-disabled. */
|
|
504
|
+
enabled?: boolean;
|
|
505
|
+
observations?: Record<string, AgentObservationDefinition<any>>;
|
|
506
|
+
actions?: Record<string, AgentActionDefinition<any, any>>;
|
|
507
|
+
/** Domain references; normally added via @agent-surface/orpc. */
|
|
508
|
+
procedures?: AgentProcedureBinding<any, any>[];
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Validates a component definition structurally. Throws
|
|
512
|
+
* AgentSurfaceDefinitionError in every environment — structural defects are
|
|
513
|
+
* deterministic code bugs (docs/03 §registry).
|
|
514
|
+
*/
|
|
515
|
+
declare function validateComponentDefinition(def: AgentComponentDefinition, limits: AgentSurfaceLimits, opts: {
|
|
516
|
+
hasProcedureExecutor: boolean;
|
|
517
|
+
}): void;
|
|
518
|
+
|
|
519
|
+
type AgentSurfaceEvent = {
|
|
520
|
+
type: "surface-changed";
|
|
521
|
+
surfaceVersion: string;
|
|
522
|
+
} | {
|
|
523
|
+
type: "component-registered";
|
|
524
|
+
registrationId: string;
|
|
525
|
+
componentType: string;
|
|
526
|
+
instanceId: string;
|
|
527
|
+
} | {
|
|
528
|
+
type: "component-unregistered";
|
|
529
|
+
registrationId: string;
|
|
530
|
+
componentType: string;
|
|
531
|
+
instanceId: string;
|
|
532
|
+
} | {
|
|
533
|
+
type: "component-rejected";
|
|
534
|
+
componentType: string;
|
|
535
|
+
instanceId: string;
|
|
536
|
+
reason: "duplicate" | "guard";
|
|
537
|
+
} | {
|
|
538
|
+
type: "availability-changed";
|
|
539
|
+
registrationId: string;
|
|
540
|
+
capabilityId: string;
|
|
541
|
+
available: boolean;
|
|
542
|
+
} | {
|
|
543
|
+
type: "collision-suspected";
|
|
544
|
+
viewCapabilityId: string;
|
|
545
|
+
domainProcedureId: string;
|
|
546
|
+
} | {
|
|
547
|
+
type: "invocation-started";
|
|
548
|
+
invocationId: string;
|
|
549
|
+
capabilityId: string;
|
|
550
|
+
consumerId: string;
|
|
551
|
+
} | {
|
|
552
|
+
type: "invocation-settled";
|
|
553
|
+
invocationId: string;
|
|
554
|
+
capabilityId: string;
|
|
555
|
+
status: "ok" | "error";
|
|
556
|
+
code?: AgentCapabilityErrorCode;
|
|
557
|
+
durationMs: number;
|
|
558
|
+
} | {
|
|
559
|
+
type: "confirmation-requested";
|
|
560
|
+
confirmationId: string;
|
|
561
|
+
capabilityId: string;
|
|
562
|
+
expiresAt: string;
|
|
563
|
+
} | {
|
|
564
|
+
type: "confirmation-resolved";
|
|
565
|
+
confirmationId: string;
|
|
566
|
+
outcome: "approved" | "denied" | "expired";
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
interface PendingConfirmation {
|
|
570
|
+
confirmationId: string;
|
|
571
|
+
capabilityId: string;
|
|
572
|
+
registrationId: string;
|
|
573
|
+
/** Normalized consumer identity `kind:id` (D22). */
|
|
574
|
+
consumerKey: string;
|
|
575
|
+
/** Effect of the operation being approved. */
|
|
576
|
+
effect: AgentEffect;
|
|
577
|
+
/** Human-readable summary composed from description + effective input. */
|
|
578
|
+
summary: string;
|
|
579
|
+
/** The exact effective input (bound + agent-supplied) being approved. */
|
|
580
|
+
input: JsonValue;
|
|
581
|
+
requestedAt: string;
|
|
582
|
+
expiresAt: string;
|
|
583
|
+
}
|
|
584
|
+
interface ConfirmationController {
|
|
585
|
+
/** Pending requests, for host UI rendering. */
|
|
586
|
+
pending(): PendingConfirmation[];
|
|
587
|
+
resolve(confirmationId: string, resolution: {
|
|
588
|
+
approved: boolean;
|
|
589
|
+
reason?: string;
|
|
590
|
+
}): void;
|
|
591
|
+
/** Resolves when the given confirmation settles (approved/denied/expired). */
|
|
592
|
+
waitFor(confirmationId: string, opts?: {
|
|
593
|
+
signal?: AbortSignal;
|
|
594
|
+
}): Promise<"approved" | "denied" | "expired">;
|
|
595
|
+
subscribe(listener: (pending: PendingConfirmation[]) => void): Unsubscribe;
|
|
596
|
+
/** Test hook: force-expire a record as if its TTL elapsed (docs/08). */
|
|
597
|
+
forceExpire(confirmationId: string): void;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
type ConfirmationLevel = "never" | "optional" | "required";
|
|
601
|
+
|
|
602
|
+
interface SnapshotContext {
|
|
603
|
+
consumer?: AgentConsumer;
|
|
604
|
+
/** Component-type prefixes to include, e.g. ["devices"]. Default: all. */
|
|
605
|
+
scope?: string[];
|
|
606
|
+
/** Include visible-disabled capabilities. Default true. */
|
|
607
|
+
includeUnavailable?: boolean;
|
|
608
|
+
/** [Experimental] Truncation budget. */
|
|
609
|
+
budget?: {
|
|
610
|
+
maxComponents?: number;
|
|
611
|
+
maxBytes?: number;
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
interface AgentSurfaceSnapshot {
|
|
615
|
+
surfaceId: string;
|
|
616
|
+
surfaceVersion: string;
|
|
617
|
+
capturedAt: string;
|
|
618
|
+
route?: AgentRouteInfo;
|
|
619
|
+
components: AgentComponentDescriptor[];
|
|
620
|
+
/** Domain references, top-level (planes are not nested into each other). */
|
|
621
|
+
procedures: AgentProcedureDescriptor[];
|
|
622
|
+
/** [Experimental] Present iff a budget truncated the snapshot. */
|
|
623
|
+
truncated?: {
|
|
624
|
+
droppedComponents: number;
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* [Experimental] Present iff a configured scope floor refused part of a
|
|
628
|
+
* requested scope (D27) — set by the adapter, never by `snapshot()`, which
|
|
629
|
+
* has no floor to intersect against. Empty `components` alongside this marker
|
|
630
|
+
* means the request fell outside the floor, not that the surface is empty.
|
|
631
|
+
*/
|
|
632
|
+
scopeRejected?: {
|
|
633
|
+
prefixes: string[];
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
interface AgentComponentDescriptor {
|
|
637
|
+
type: string;
|
|
638
|
+
instanceId: string;
|
|
639
|
+
registrationId: string;
|
|
640
|
+
description: string;
|
|
641
|
+
parent?: {
|
|
642
|
+
type: string;
|
|
643
|
+
instanceId: string;
|
|
644
|
+
};
|
|
645
|
+
meta?: Record<string, JsonValue>;
|
|
646
|
+
observations: AgentObservationDescriptor[];
|
|
647
|
+
actions: AgentActionDescriptor[];
|
|
648
|
+
}
|
|
649
|
+
interface AgentObservationDescriptor {
|
|
650
|
+
capabilityId: string;
|
|
651
|
+
name: string;
|
|
652
|
+
description: string;
|
|
653
|
+
outputSchema: JsonSchema;
|
|
654
|
+
available: boolean;
|
|
655
|
+
unavailableReason?: string;
|
|
656
|
+
meta?: Record<string, JsonValue>;
|
|
657
|
+
}
|
|
658
|
+
interface AgentActionDescriptor {
|
|
659
|
+
capabilityId: string;
|
|
660
|
+
name: string;
|
|
661
|
+
description: string;
|
|
662
|
+
inputSchema: JsonSchema;
|
|
663
|
+
outputSchema?: JsonSchema;
|
|
664
|
+
effect: "local-state" | "navigation";
|
|
665
|
+
idempotent: boolean;
|
|
666
|
+
reversible: boolean;
|
|
667
|
+
confirmation: "never" | "optional" | "required";
|
|
668
|
+
available: boolean;
|
|
669
|
+
unavailableReason?: string;
|
|
670
|
+
meta?: Record<string, JsonValue>;
|
|
671
|
+
}
|
|
672
|
+
interface AgentProcedureDescriptor {
|
|
673
|
+
procedureId: string;
|
|
674
|
+
/**
|
|
675
|
+
* The manifest description. Stable across snapshots — the contextual
|
|
676
|
+
* `describe()` output is `contextualNote` and is never folded in here (D28).
|
|
677
|
+
*/
|
|
678
|
+
description: string;
|
|
679
|
+
/** Volatile: this snapshot's contextual `describe()` output, if any. */
|
|
680
|
+
contextualNote?: string;
|
|
681
|
+
/** Agent-facing (reduced) input schema per binding rule 1 (docs/05). */
|
|
682
|
+
inputSchema: JsonSchema;
|
|
683
|
+
outputSchema?: JsonSchema;
|
|
684
|
+
effect: AgentProcedureEffect;
|
|
685
|
+
confirmation: ConfirmationLevel;
|
|
686
|
+
available: boolean;
|
|
687
|
+
unavailableReason?: string;
|
|
688
|
+
boundFields: Array<{
|
|
689
|
+
path: string;
|
|
690
|
+
locked: boolean;
|
|
691
|
+
source: "ui-state";
|
|
692
|
+
}>;
|
|
693
|
+
/** The registration that contributed this reference (staleness token). */
|
|
694
|
+
registrationId: string;
|
|
695
|
+
/** Optional link to the owning view component. */
|
|
696
|
+
context?: {
|
|
697
|
+
type: string;
|
|
698
|
+
instanceId: string;
|
|
699
|
+
};
|
|
700
|
+
meta?: Record<string, JsonValue>;
|
|
701
|
+
}
|
|
702
|
+
type AgentCapabilityDescriptorUnion = AgentObservationDescriptor | AgentActionDescriptor | AgentProcedureDescriptor;
|
|
703
|
+
|
|
704
|
+
interface RegistrationCandidate {
|
|
705
|
+
definition: AgentComponentDefinition;
|
|
706
|
+
stack?: string;
|
|
707
|
+
}
|
|
708
|
+
interface RegistryOptions {
|
|
709
|
+
/** "development" | "production" | "test". Default: "production". */
|
|
710
|
+
environment?: AgentEnvironment;
|
|
711
|
+
/** Host context provider. MUST be synchronous and cheap. */
|
|
712
|
+
context?: () => Record<string, unknown>;
|
|
713
|
+
/** Global policies, outermost layer of every chain. */
|
|
714
|
+
policies?: AgentPolicy[];
|
|
715
|
+
/** Audit sink; default: bounded in-memory sink (+ console in development). */
|
|
716
|
+
audit?: AuditSink;
|
|
717
|
+
/** Guard invoked before accepting a registration (trust filtering, docs/06). */
|
|
718
|
+
onRegister?: (candidate: RegistrationCandidate) => "accept" | "reject";
|
|
719
|
+
/** Collision handling for duplicate (type, instanceId). Default "reject". */
|
|
720
|
+
onDuplicateInstance?: "reject" | "replace";
|
|
721
|
+
/** Suffix-collision diagnostics vs known domain ids. Default "warn". */
|
|
722
|
+
duplicateSuffixPolicy?: "off" | "warn" | "error";
|
|
723
|
+
/** Route descriptor for snapshots (host wires its router here). */
|
|
724
|
+
route?: () => AgentRouteInfo | undefined;
|
|
725
|
+
limits?: Partial<AgentSurfaceLimits>;
|
|
726
|
+
/** Injectable clock (docs/08 determinism); default Date.now. */
|
|
727
|
+
now?: () => number;
|
|
728
|
+
}
|
|
729
|
+
interface AgentRegistrationHandle {
|
|
730
|
+
readonly registrationId: string;
|
|
731
|
+
readonly status: "active" | "rejected" | "unregistered";
|
|
732
|
+
/** Push dynamic updates; only these fields are updatable (D2). */
|
|
733
|
+
update(patch: {
|
|
734
|
+
enabled?: boolean;
|
|
735
|
+
availability?: Record<string, {
|
|
736
|
+
available: boolean;
|
|
737
|
+
reason?: string;
|
|
738
|
+
}>;
|
|
739
|
+
}): void;
|
|
740
|
+
/** Bumps the surface version without changing anything. */
|
|
741
|
+
invalidate(): void;
|
|
742
|
+
unregister(): void;
|
|
743
|
+
}
|
|
744
|
+
interface AgentSurfaceRegistry {
|
|
745
|
+
readonly surfaceId: string;
|
|
746
|
+
register(definition: AgentComponentDefinition): AgentRegistrationHandle;
|
|
747
|
+
snapshot(context?: SnapshotContext): AgentSurfaceSnapshot;
|
|
748
|
+
invoke(request: AgentInvocation, options?: InvokeOptions): Promise<AgentInvocationResult>;
|
|
749
|
+
subscribe(listener: (event: AgentSurfaceEvent) => void): Unsubscribe;
|
|
750
|
+
confirmations: ConfirmationController;
|
|
751
|
+
/** Register a domain-procedure executor (installed by @agent-surface/orpc). */
|
|
752
|
+
setProcedureExecutor(executor: AgentProcedureExecutor | undefined): void;
|
|
753
|
+
getVersion(): string;
|
|
754
|
+
/** Tears down: aborts in-flight invocations (CANCELLED), clears listeners. */
|
|
755
|
+
dispose(): void;
|
|
756
|
+
}
|
|
757
|
+
declare function createAgentSurfaceRegistry(options?: RegistryOptions): AgentSurfaceRegistry;
|
|
758
|
+
|
|
759
|
+
export { type PendingConfirmation as $, type AgentRouteInfo as A, type AgentProcedureDescriptor as B, type AgentProcedureEffect as C, type DiscoveryDecision as D, type AgentProcedureExecutor as E, type AgentProcedureRefDescriptor as F, type AgentReadContext as G, type AgentRegistrationHandle as H, type AgentSchema as I, type JsonSchema as J, AgentSchemaError as K, type AgentSchemaIssue as L, AgentSurfaceDefinitionError as M, type AgentSurfaceDefinitionErrorCode as N, AgentSurfaceError as O, type AgentSurfaceEvent as P, type AgentSurfaceLimits as Q, type AgentSurfaceSnapshot as R, type SnapshotContext as S, type AuditEvent as T, type Unsubscribe as U, type AuditSink as V, CONFIRMATION_ESCALATION as W, type ConfirmationController as X, type ConfirmationEscalation as Y, DEFAULT_LIMITS as Z, type InvokeOptions as _, type AgentConsumer as a, type PreconditionFailure as a0, type ProcedureCallInfo as a1, type RegistrationCandidate as a2, type RegistryOptions as a3, type StandardSchemaV1 as a4, action as a5, audit as a6, authenticated as a7, composeInvokeChain as a8, consoleAuditSink as a9, createAgentSurfaceRegistry as aa, defineAgentComponent as ab, emptyObjectSchema as ac, environment as ad, evaluateDiscovery as ae, fromJsonSchema as af, fromStandardSchema as ag, hasPermission as ah, isAgentSurfaceError as ai, memoryAuditSink as aj, observation as ak, rateLimit as al, requireConfirmation as am, tenantBoundary as an, validateComponentDefinition as ao, validateJsonSchemaDocument as ap, validateValueAgainstSchema as aq, type AgentSurfaceRegistry as b, type JsonValue as c, type AgentInvocationResult as d, AGENT_CAPABILITY_ERROR_CODES as e, type AgentActionContext as f, type AgentActionDefinition as g, type AgentActionDescriptor as h, type AgentAuthorizationContext as i, type AgentCapabilityDescriptorUnion as j, type AgentCapabilityErrorCode as k, type AgentCapabilityErrorPayload as l, type AgentComponentDefinition as m, type AgentComponentDescriptor as n, type AgentConcurrency as o, type AgentEffect as p, type AgentEnvironment as q, type AgentErrorRetry as r, type AgentInvocation as s, type AgentInvocationPolicyContext as t, type AgentObservationDefinition as u, type AgentObservationDescriptor as v, type AgentPolicy as w, type AgentPolicyContext as x, type AgentProcedureBinding as y, type AgentProcedureBindingRuntimeConfig as z };
|