@agentropy/runtime 0.0.0-stage → 0.1.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.
Files changed (85) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +39 -2
  3. package/dist/a2a-client.d.ts +111 -0
  4. package/dist/a2a-client.js +386 -0
  5. package/dist/a2a-history.d.ts +27 -0
  6. package/dist/a2a-history.js +67 -0
  7. package/dist/a2a-http.d.ts +46 -0
  8. package/dist/a2a-http.js +183 -0
  9. package/dist/a2a-protocol.d.ts +77 -0
  10. package/dist/a2a-protocol.js +148 -0
  11. package/dist/a2a-push-receiver.d.ts +24 -0
  12. package/dist/a2a-push-receiver.js +161 -0
  13. package/dist/a2a-push.d.ts +85 -0
  14. package/dist/a2a-push.js +385 -0
  15. package/dist/a2a-server.d.ts +82 -0
  16. package/dist/a2a-server.js +523 -0
  17. package/dist/a2a-sse.d.ts +5 -0
  18. package/dist/a2a-sse.js +36 -0
  19. package/dist/a2a.d.ts +41 -0
  20. package/dist/a2a.js +40 -0
  21. package/dist/app.d.ts +256 -0
  22. package/dist/app.js +541 -0
  23. package/dist/audit.d.ts +229 -0
  24. package/dist/audit.js +718 -0
  25. package/dist/bounded-body.d.ts +32 -0
  26. package/dist/bounded-body.js +124 -0
  27. package/dist/communication.d.ts +62 -0
  28. package/dist/communication.js +142 -0
  29. package/dist/compaction.d.ts +24 -0
  30. package/dist/compaction.js +202 -0
  31. package/dist/federation.d.ts +108 -0
  32. package/dist/federation.js +241 -0
  33. package/dist/http-path.d.ts +7 -0
  34. package/dist/http-path.js +14 -0
  35. package/dist/human-actions.d.ts +62 -0
  36. package/dist/human-actions.js +359 -0
  37. package/dist/implementation.d.ts +47 -0
  38. package/dist/implementation.js +138 -0
  39. package/dist/inbox.d.ts +101 -0
  40. package/dist/inbox.js +389 -0
  41. package/dist/index.d.ts +32 -0
  42. package/dist/index.js +32 -0
  43. package/dist/ingress.d.ts +35 -0
  44. package/dist/ingress.js +86 -0
  45. package/dist/lifecycle.d.ts +45 -0
  46. package/dist/lifecycle.js +57 -0
  47. package/dist/limits.d.ts +43 -0
  48. package/dist/limits.js +71 -0
  49. package/dist/mcp.d.ts +111 -0
  50. package/dist/mcp.js +308 -0
  51. package/dist/memory.d.ts +25 -0
  52. package/dist/memory.js +134 -0
  53. package/dist/model-routing.d.ts +66 -0
  54. package/dist/model-routing.js +80 -0
  55. package/dist/otel.d.ts +60 -0
  56. package/dist/otel.js +72 -0
  57. package/dist/outbox.d.ts +116 -0
  58. package/dist/outbox.js +327 -0
  59. package/dist/policy-cache.d.ts +69 -0
  60. package/dist/policy-cache.js +178 -0
  61. package/dist/priority.d.ts +27 -0
  62. package/dist/priority.js +28 -0
  63. package/dist/quotas.d.ts +19 -0
  64. package/dist/quotas.js +47 -0
  65. package/dist/reasoning.d.ts +54 -0
  66. package/dist/reasoning.js +307 -0
  67. package/dist/registry.d.ts +101 -0
  68. package/dist/registry.js +369 -0
  69. package/dist/remote.d.ts +130 -0
  70. package/dist/remote.js +473 -0
  71. package/dist/runtime.d.ts +167 -0
  72. package/dist/runtime.js +1035 -0
  73. package/dist/skills.d.ts +86 -0
  74. package/dist/skills.js +376 -0
  75. package/dist/task-service.d.ts +239 -0
  76. package/dist/task-service.js +790 -0
  77. package/dist/tools.d.ts +140 -0
  78. package/dist/tools.js +476 -0
  79. package/dist/wake-index.d.ts +9 -0
  80. package/dist/wake-index.js +11 -0
  81. package/dist/wakeups.d.ts +142 -0
  82. package/dist/wakeups.js +501 -0
  83. package/dist/workflow.d.ts +36 -0
  84. package/dist/workflow.js +101 -0
  85. package/package.json +48 -3
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Registry federation and discovery (FEAT-028.9, M3-09, R-18) through A2A 1.0 agent cards — the discovery
3
+ * standard Agentropy already speaks — instead of a registry protocol of its own.
4
+ *
5
+ * Publishing: `agentCardForDefinition` turns a local definition into an AgentCard for the A2A server endpoint
6
+ * that exposes it (one card per endpoint, as in A2A). The definition ID travels as the card's first skill ID.
7
+ *
8
+ * Importing: `AgentDirectoryFederation` fetches the cards of **configured peers only** (no URL ever comes from a
9
+ * caller or a card, so discovery cannot be turned into a request forgery), validates them strictly, keeps only
10
+ * the fields it needs, and answers `discover` from that cache. Cards are untrusted data: size-capped, string
11
+ * lengths capped, interface URLs must be https and same-origin with the card unless the peer allows the origin,
12
+ * and text is never interpreted. Each peer is visible only to the tenants it is configured for, and every
13
+ * result passes the same `definition:discover` policy check as local discovery (resource type `remote-agent`),
14
+ * failing closed when the policy point is down. A result carries the delegation target
15
+ * `{ remote: { endpoint, definitionId } }` for `delegate`.
16
+ */
17
+ import { type AgentDefinition, type PolicyDecisionPoint, type TrustedPrincipal } from '@agentropy/core';
18
+ import type { DiscoveryQuery } from './registry.js';
19
+ /** A2A AgentCard for one local definition served at `url` (the A2A JSON-RPC endpoint). */
20
+ export declare function agentCardForDefinition(def: AgentDefinition, url: string, extra?: {
21
+ securitySchemes?: Record<string, unknown>;
22
+ security?: Record<string, string[]>[];
23
+ /** Advertise SSE streaming; set when the endpoint serves `A2AServer.stream` (e.g. `createA2AHttpHandler`). */
24
+ streaming?: boolean;
25
+ pushNotifications?: boolean;
26
+ }): Record<string, unknown>;
27
+ export interface FederationPeer {
28
+ /** Stable local name of the peer, e.g. `finance-eu`. */
29
+ id: string;
30
+ /** Where its card lives, e.g. `https://finance.example/.well-known/agent-card.json`. */
31
+ cardUrl: string;
32
+ /** Tenants that may discover and use this peer. */
33
+ tenants: string[];
34
+ /** Origins (besides the card's own) that the card may name as its endpoint. */
35
+ allowedOrigins?: string[];
36
+ }
37
+ export interface RemoteAgentEntry {
38
+ peerId: string;
39
+ definitionId: string;
40
+ name: string;
41
+ description: string;
42
+ version: string;
43
+ endpoint: string;
44
+ protocolVersion: string;
45
+ tags: string[];
46
+ fetchedAt: string;
47
+ /** True when the last refresh of this peer failed and the entry is older than the refresh interval. */
48
+ stale: boolean;
49
+ /** Ready to pass as `DelegationRequest.target`. */
50
+ target: {
51
+ remote: {
52
+ endpoint: string;
53
+ definitionId: string;
54
+ version: string;
55
+ };
56
+ };
57
+ }
58
+ export interface FederationFetch {
59
+ (url: string, init: {
60
+ method: 'GET';
61
+ headers: Record<string, string>;
62
+ /** Fires at `timeoutMs`: the deadline covers the body as well as the headers. */
63
+ signal?: AbortSignal;
64
+ }): Promise<{
65
+ status: number;
66
+ text(): Promise<string>;
67
+ headers?: {
68
+ get(name: string): string | null;
69
+ };
70
+ body?: unknown;
71
+ }>;
72
+ }
73
+ export interface FederationOptions {
74
+ peers: FederationPeer[];
75
+ fetch: FederationFetch;
76
+ pdp: PolicyDecisionPoint;
77
+ now?: () => string;
78
+ /** A refresh younger than this is not repeated (default 5 min). */
79
+ refreshMs?: number;
80
+ /** Entries whose peer has not answered for this long are dropped (default 24 h). */
81
+ maxStaleMs?: number;
82
+ /** Largest card accepted (default 64 KiB). */
83
+ maxCardBytes?: number;
84
+ /** Deadline for fetching one card, headers and body (default 10 s). */
85
+ timeoutMs?: number;
86
+ }
87
+ export declare class AgentDirectoryFederation {
88
+ private readonly o;
89
+ private readonly cache;
90
+ constructor(o: FederationOptions);
91
+ private nowMs;
92
+ /** Fetch every peer's card whose cache is older than `refreshMs`. Failures keep the last good card. */
93
+ refresh(options?: {
94
+ force?: boolean;
95
+ }): Promise<{
96
+ peerId: string;
97
+ ok: boolean;
98
+ error?: string;
99
+ }[]>;
100
+ private load;
101
+ private validate;
102
+ /**
103
+ * Remote agents the caller may see, from the cache (call `refresh` on a schedule). Deterministic order: peer id,
104
+ * then definition id. Same filters as local discovery: `id`, `capability` (tag `capability:<id>`), `profile`
105
+ * (tag `profile:<id>`), `text` (name and description).
106
+ */
107
+ discover(query: DiscoveryQuery, caller: TrustedPrincipal): Promise<RemoteAgentEntry[]>;
108
+ }
@@ -0,0 +1,241 @@
1
+ /**
2
+ * Registry federation and discovery (FEAT-028.9, M3-09, R-18) through A2A 1.0 agent cards — the discovery
3
+ * standard Agentropy already speaks — instead of a registry protocol of its own.
4
+ *
5
+ * Publishing: `agentCardForDefinition` turns a local definition into an AgentCard for the A2A server endpoint
6
+ * that exposes it (one card per endpoint, as in A2A). The definition ID travels as the card's first skill ID.
7
+ *
8
+ * Importing: `AgentDirectoryFederation` fetches the cards of **configured peers only** (no URL ever comes from a
9
+ * caller or a card, so discovery cannot be turned into a request forgery), validates them strictly, keeps only
10
+ * the fields it needs, and answers `discover` from that cache. Cards are untrusted data: size-capped, string
11
+ * lengths capped, interface URLs must be https and same-origin with the card unless the peer allows the origin,
12
+ * and text is never interpreted. Each peer is visible only to the tenants it is configured for, and every
13
+ * result passes the same `definition:discover` policy check as local discovery (resource type `remote-agent`),
14
+ * failing closed when the policy point is down. A result carries the delegation target
15
+ * `{ remote: { endpoint, definitionId } }` for `delegate`.
16
+ */
17
+ import { AgentropyError, enforcePolicy, isAgentropyError, } from '@agentropy/core';
18
+ import { A2A_PROTOCOL_VERSION, a2aAgentCard } from './a2a.js';
19
+ import { ReplyTooLarge, readBoundedText } from './bounded-body.js';
20
+ /** A2A AgentCard for one local definition served at `url` (the A2A JSON-RPC endpoint). */
21
+ export function agentCardForDefinition(def, url, extra = {}) {
22
+ return a2aAgentCard({
23
+ name: def.displayName,
24
+ description: def.description ?? def.displayName,
25
+ version: def.version,
26
+ url,
27
+ ...extra,
28
+ skills: [
29
+ {
30
+ id: def.id,
31
+ name: def.displayName,
32
+ description: def.description ?? def.displayName,
33
+ tags: [
34
+ `profile:${def.profile.id}`,
35
+ ...(def.capabilities ?? []).map((c) => `capability:${c.id}`),
36
+ ],
37
+ },
38
+ ],
39
+ });
40
+ }
41
+ const MAX_TEXT = 1_000;
42
+ const MAX_TAGS = 32;
43
+ export class AgentDirectoryFederation {
44
+ o;
45
+ cache = new Map();
46
+ constructor(o) {
47
+ this.o = o;
48
+ const ids = new Set();
49
+ for (const p of o.peers) {
50
+ if (!p.id || ids.has(p.id))
51
+ throw new AgentropyError('InvalidConfiguration', `Duplicate or empty peer id ${p.id}`);
52
+ ids.add(p.id);
53
+ if (!/^https:\/\//.test(p.cardUrl))
54
+ throw new AgentropyError('InvalidConfiguration', `Peer ${p.id}: cardUrl must be https`);
55
+ if (!p.tenants?.length)
56
+ throw new AgentropyError('InvalidConfiguration', `Peer ${p.id}: at least one tenant required`);
57
+ }
58
+ }
59
+ nowMs() {
60
+ return Date.parse(this.o.now?.() ?? new Date().toISOString());
61
+ }
62
+ /** Fetch every peer's card whose cache is older than `refreshMs`. Failures keep the last good card. */
63
+ async refresh(options = {}) {
64
+ const out = [];
65
+ const now = this.nowMs();
66
+ for (const peer of this.o.peers) {
67
+ const cur = this.cache.get(peer.id);
68
+ if (!options.force &&
69
+ cur &&
70
+ now - cur.okAt < (this.o.refreshMs ?? 300_000))
71
+ continue;
72
+ try {
73
+ const entry = await this.load(peer, now);
74
+ this.cache.set(peer.id, { entry, okAt: now });
75
+ out.push({ peerId: peer.id, ok: true });
76
+ }
77
+ catch (err) {
78
+ if (cur)
79
+ cur.failedAt = now;
80
+ out.push({
81
+ peerId: peer.id,
82
+ ok: false,
83
+ error: isAgentropyError(err) ? err.code : 'Internal',
84
+ });
85
+ }
86
+ }
87
+ return out;
88
+ }
89
+ async load(peer, now) {
90
+ // One deadline for the whole card, headers and body: a peer that stalls cannot hold the refresh.
91
+ const signal = AbortSignal.timeout(this.o.timeoutMs ?? 10_000);
92
+ let res;
93
+ try {
94
+ res = await this.o.fetch(peer.cardUrl, {
95
+ method: 'GET',
96
+ headers: { accept: 'application/json' },
97
+ signal,
98
+ });
99
+ }
100
+ catch {
101
+ throw new AgentropyError('RemoteUnavailable', 'Peer unreachable');
102
+ }
103
+ if (res.status !== 200) {
104
+ void Promise.resolve(res.body?.cancel?.()).catch(() => undefined);
105
+ throw new AgentropyError('RemoteUnavailable', 'Peer card unavailable', {
106
+ details: { status: res.status },
107
+ });
108
+ }
109
+ let text;
110
+ try {
111
+ text = await readBoundedText(res, this.o.maxCardBytes ?? 64 * 1024, signal);
112
+ }
113
+ catch (err) {
114
+ throw err instanceof ReplyTooLarge
115
+ ? new AgentropyError('SchemaViolation', 'Agent card too large')
116
+ : new AgentropyError('RemoteUnavailable', 'Peer card could not be read');
117
+ }
118
+ let card;
119
+ try {
120
+ card = JSON.parse(text);
121
+ }
122
+ catch {
123
+ throw new AgentropyError('SchemaViolation', 'Agent card is not JSON');
124
+ }
125
+ return this.validate(peer, card, new Date(now).toISOString());
126
+ }
127
+ validate(peer, raw, fetchedAt) {
128
+ const bad = (why) => new AgentropyError('SchemaViolation', `Agent card: ${why}`);
129
+ const c = raw;
130
+ const str = (v, what) => {
131
+ if (typeof v !== 'string' || !v || v.length > MAX_TEXT)
132
+ throw bad(`${what} must be a non-empty string up to ${MAX_TEXT} chars`);
133
+ return v;
134
+ };
135
+ if (!c || typeof c !== 'object')
136
+ throw bad('not an object');
137
+ const name = str(c.name, 'name');
138
+ const description = str(c.description, 'description');
139
+ const version = str(c.version, 'version');
140
+ const ifaces = Array.isArray(c.supportedInterfaces)
141
+ ? c.supportedInterfaces
142
+ : [];
143
+ const iface = ifaces.find((i) => i?.protocolBinding === 'JSONRPC' &&
144
+ i?.protocolVersion === A2A_PROTOCOL_VERSION);
145
+ if (!iface)
146
+ throw bad(`no JSONRPC interface at protocol ${A2A_PROTOCOL_VERSION}`);
147
+ const endpoint = str(iface.url, 'interface url');
148
+ let origin;
149
+ try {
150
+ const u = new URL(endpoint);
151
+ if (u.protocol !== 'https:')
152
+ throw new Error();
153
+ origin = u.origin;
154
+ }
155
+ catch {
156
+ throw bad('interface url must be https');
157
+ }
158
+ const allowed = [
159
+ new URL(peer.cardUrl).origin,
160
+ ...(peer.allowedOrigins ?? []),
161
+ ];
162
+ if (!allowed.includes(origin))
163
+ throw bad('interface url is not on an allowed origin');
164
+ const skills = Array.isArray(c.skills)
165
+ ? c.skills
166
+ : [];
167
+ const definitionId = typeof skills[0]?.id === 'string' && skills[0].id.length <= 200
168
+ ? skills[0].id
169
+ : name;
170
+ const tags = skills
171
+ .flatMap((s) => (Array.isArray(s?.tags) ? s.tags : []))
172
+ .filter((t) => typeof t === 'string' && t.length <= 100)
173
+ .slice(0, MAX_TAGS);
174
+ return {
175
+ peerId: peer.id,
176
+ definitionId,
177
+ name,
178
+ description,
179
+ version,
180
+ endpoint,
181
+ protocolVersion: A2A_PROTOCOL_VERSION,
182
+ tags,
183
+ fetchedAt,
184
+ target: { remote: { endpoint, definitionId, version } },
185
+ };
186
+ }
187
+ /**
188
+ * Remote agents the caller may see, from the cache (call `refresh` on a schedule). Deterministic order: peer id,
189
+ * then definition id. Same filters as local discovery: `id`, `capability` (tag `capability:<id>`), `profile`
190
+ * (tag `profile:<id>`), `text` (name and description).
191
+ */
192
+ async discover(query, caller) {
193
+ if (!caller?.id || !caller.tenantId)
194
+ throw new AgentropyError('Unauthenticated', 'No trusted principal');
195
+ const now = this.nowMs();
196
+ const refreshMs = this.o.refreshMs ?? 300_000;
197
+ const maxStale = this.o.maxStaleMs ?? 86_400_000;
198
+ const text = query.text?.toLowerCase();
199
+ const out = [];
200
+ for (const peer of [...this.o.peers].sort((a, b) => a.id.localeCompare(b.id))) {
201
+ if (!peer.tenants.includes(caller.tenantId))
202
+ continue;
203
+ const cached = this.cache.get(peer.id);
204
+ if (!cached || now - cached.okAt > maxStale)
205
+ continue;
206
+ const e = cached.entry;
207
+ if (query.id && e.definitionId !== query.id)
208
+ continue;
209
+ if (query.capability &&
210
+ !e.tags.includes(`capability:${query.capability}`))
211
+ continue;
212
+ if (query.profile && !e.tags.includes(`profile:${query.profile}`))
213
+ continue;
214
+ if (text && !`${e.name} ${e.description}`.toLowerCase().includes(text))
215
+ continue;
216
+ try {
217
+ await enforcePolicy(this.o.pdp, {
218
+ principal: caller,
219
+ action: 'definition:discover',
220
+ resource: {
221
+ type: 'remote-agent',
222
+ id: `${e.peerId}/${e.definitionId}`,
223
+ tenantId: caller.tenantId,
224
+ },
225
+ });
226
+ }
227
+ catch (err) {
228
+ if (isAgentropyError(err, 'PermissionDenied'))
229
+ continue;
230
+ throw err;
231
+ }
232
+ out.push({
233
+ ...e,
234
+ stale: cached.failedAt !== undefined &&
235
+ cached.failedAt > cached.okAt &&
236
+ now - cached.okAt > refreshMs,
237
+ });
238
+ }
239
+ return out;
240
+ }
241
+ }
@@ -0,0 +1,7 @@
1
+ /** Request-target parsing shared by the HTTP handlers (FIX-049). Internal: not part of the package's API. */
2
+ /**
3
+ * The path of a request target, or `undefined` when the target is not a valid URL (`//`, `//[`, …). It never
4
+ * throws: a handler answers `400` for such a request instead of rejecting, which a host would see as an
5
+ * unhandled rejection from an unauthenticated caller.
6
+ */
7
+ export declare function requestPath(url: string | undefined): string | undefined;
@@ -0,0 +1,14 @@
1
+ /** Request-target parsing shared by the HTTP handlers (FIX-049). Internal: not part of the package's API. */
2
+ /**
3
+ * The path of a request target, or `undefined` when the target is not a valid URL (`//`, `//[`, …). It never
4
+ * throws: a handler answers `400` for such a request instead of rejecting, which a host would see as an
5
+ * unhandled rejection from an unauthenticated caller.
6
+ */
7
+ export function requestPath(url) {
8
+ try {
9
+ return new URL(url ?? '/', 'http://localhost').pathname;
10
+ }
11
+ catch {
12
+ return undefined;
13
+ }
14
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Human actions (docs/human-actions.md, Agent v1 human-action operations, R-24, AC-08, SEC-07).
3
+ *
4
+ * The runtime is the only authority: `human-input.requestAction` creates the request and its
5
+ * `humanActionRequested` event in one journaled transaction; claim, release and decide are commands that
6
+ * re-check identity, tenant, assignment, delegated authority, policy, revision, deadline and input schema
7
+ * atomically. A decision commits a `humanActionResolved` event; the inbox projects it only after commit and
8
+ * the waiting task resumes through its `human-action` wake-up. Expiry uses the request's `dueAt` only.
9
+ */
10
+ import { type CapabilityInvocationContext, type HumanActionRequest, type HumanDecision, type TrustedPrincipal } from '@agentropy/core';
11
+ import { type TaskService } from './task-service.js';
12
+ /** Stored form; `revision` is the store document revision (the value the user must echo back). */
13
+ export interface StoredHumanAction extends Omit<HumanActionRequest, 'revision'> {
14
+ decisionInput?: unknown;
15
+ decidedBy?: string;
16
+ decidedAt?: string;
17
+ /** Fingerprint of the accepted decision (decider + input), for duplicate detection. */
18
+ decisionFingerprint?: string;
19
+ /** Approvals so far when `requiredApprovals` > 1: one entry per distinct principal. */
20
+ approvals?: {
21
+ by: string;
22
+ inputDigest: string;
23
+ at: string;
24
+ }[];
25
+ }
26
+ export interface HumanActionOptions {
27
+ /** Claim timeout (default 15 minutes). */
28
+ claimMs?: number;
29
+ /** Largest request prompt (default `DEFAULT_LIMITS.maxPromptBytes`); larger is `SchemaViolation`. */
30
+ maxPromptBytes?: number;
31
+ }
32
+ export declare class HumanActionService {
33
+ private readonly tasks;
34
+ private readonly options;
35
+ constructor(tasks: TaskService, options?: HumanActionOptions);
36
+ private get store();
37
+ private now;
38
+ /** Built-in `human-input.requestAction` (external effect with a step key; replay returns the original request). */
39
+ request(input: unknown, ctx: CapabilityInvocationContext): Promise<{
40
+ requestId: string;
41
+ dueAt?: string;
42
+ }>;
43
+ get(requestId: string, caller: TrustedPrincipal): Promise<HumanActionRequest>;
44
+ claim(requestId: string, caller: TrustedPrincipal): Promise<HumanActionRequest>;
45
+ release(requestId: string, caller: TrustedPrincipal): Promise<HumanActionRequest>;
46
+ /** `AgentService.provideHumanInput`: the single command boundary for chat, UI and API decisions. */
47
+ decide(decision: HumanDecision, caller: TrustedPrincipal): Promise<void>;
48
+ /** Expire requests past `dueAt` and return lapsed claims to `pending`. Safe to call repeatedly. */
49
+ sweep(): Promise<number>;
50
+ /** Authentication, delegated authority and policy before any state is read (SEC-07). */
51
+ private authorize;
52
+ /** Visible = same tenant and the caller is an assignee (by ID, or by a role the policy grants). */
53
+ private visible;
54
+ private eligible;
55
+ /** Visible and still open; terminal states map to their typed refusals. */
56
+ private actionable;
57
+ private unclaim;
58
+ /** Moves a past-due open request to `expired` with its event; the wake-up applies `onExpiry`. */
59
+ private expireIfDue;
60
+ }
61
+ /** Built-in handler for `human-input.requestAction`. */
62
+ export declare function humanActionOperationHandlers(human: HumanActionService): Record<string, (input: unknown, ctx: CapabilityInvocationContext) => Promise<unknown>>;