@escro/plugin-eliza 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.
@@ -0,0 +1,478 @@
1
+ import { Escro, EscrowAccount, PredicateCheck, Delivery, PredicateContext, Acceptance, CreateEscrowParams, WorkerCandidate, ServedWalletReputation } from '@escro/sdk';
2
+ export { ServedWalletReputation, WorkerCandidate } from '@escro/sdk';
3
+ import { Keypair } from '@solana/web3.js';
4
+ import { z } from 'zod';
5
+
6
+ /**
7
+ * Minimal vendored type surface for `@elizaos/core`.
8
+ *
9
+ * `@elizaos/core` (v1.7.x) is provided by the host elizaOS runtime at load time;
10
+ * this plugin imports ZERO runtime values from it. It is intentionally NOT declared
11
+ * as a dependency or peerDependency here: this monorepo runs pnpm with
12
+ * auto-install-peers enabled (a root-level setting this package cannot scope), so a
13
+ * declared peer is materialized into the workspace - dragging core's heavy runtime
14
+ * tree (langchain, pdfjs-dist, handlebars, and a zod v4 that clashes with this
15
+ * repo's zod v3) in for types that are erased at build time. Instead we vendor the
16
+ * narrow subset of core's public interfaces that `commission_task` implements
17
+ * against. Ideal end state (owner: root workspace, not this lane): re-add the
18
+ * peerDependency once `pnpm.peerDependencyRules.ignoreMissing` lists it.
19
+ *
20
+ * Every interface below is a faithful, structurally-typed SUBSET copied from the
21
+ * published declarations of:
22
+ *
23
+ * @elizaos/core@1.7.2 dist/types/{primitives,components,plugin,runtime}.d.ts
24
+ * (fetched from the npm registry 2026-08-10)
25
+ *
26
+ * These are CONSUME-only views (the plugin receives an `IAgentRuntime`/`Memory`
27
+ * from the host; it never constructs or fully implements them). A view of a value the
28
+ * host passes in carries an index signature only where core's declaration does
29
+ * (`Content`, `State`): a core interface without one does not assign to a view that
30
+ * has one. The only intentional narrowing is
31
+ * `Handler`'s return type (`Promise<ActionResult>` - this plugin always returns a
32
+ * result), which stays assignable to core's wider `Promise<ActionResult | void |
33
+ * undefined>`. If a future `@elizaos/core` major changes these shapes, re-verify
34
+ * against the published `.d.ts` and update this file.
35
+ */
36
+ /** @elizaos/core dist/types/primitives.d.ts - `UUID`. */
37
+ type UUID = `${string}-${string}-${string}-${string}-${string}`;
38
+ /** @elizaos/core dist/types/primitives.d.ts - `Content` (subset). */
39
+ interface Content {
40
+ /** The agent's internal thought process. */
41
+ thought?: string;
42
+ /** The main text content visible to users. */
43
+ text?: string;
44
+ /** Actions to be performed. */
45
+ actions?: string[];
46
+ /** Source/origin of the content. */
47
+ source?: string;
48
+ /** Additional dynamic properties (core's own extension point). */
49
+ [key: string]: unknown;
50
+ }
51
+ /**
52
+ * @elizaos/core dist/types/memory.d.ts - `Memory` (subset). The plugin reads `id` and `content`;
53
+ * `entityId` is typed for an operator's `authorizeChatInput` and read by the plugin nowhere.
54
+ */
55
+ interface Memory {
56
+ id?: UUID;
57
+ entityId?: UUID;
58
+ content: Content;
59
+ }
60
+ /** @elizaos/core dist/types/state.d.ts - `State` (subset). */
61
+ interface State {
62
+ values: Record<string, unknown>;
63
+ data: Record<string, unknown>;
64
+ text: string;
65
+ [key: string]: unknown;
66
+ }
67
+ /** @elizaos/core dist/types/components.d.ts - `ActionResult` (subset). */
68
+ interface ActionResult {
69
+ /** Whether the action succeeded. */
70
+ success: boolean;
71
+ /** Human-readable description of the result. */
72
+ text?: string;
73
+ /** Values to merge into the runtime state. */
74
+ values?: Record<string, unknown>;
75
+ /** Action-specific result payload. */
76
+ data?: Record<string, unknown>;
77
+ /** Error information if the action failed. */
78
+ error?: string | Error;
79
+ }
80
+ /** @elizaos/core dist/types/components.d.ts - `ActionExample`. */
81
+ interface ActionExample {
82
+ /** Name of the participant (user or agent). */
83
+ name: string;
84
+ /** Message content. */
85
+ content: Content;
86
+ }
87
+ /** @elizaos/core dist/types/components.d.ts - `HandlerCallback`. */
88
+ type HandlerCallback = (response: Content) => Promise<Memory[]>;
89
+ /**
90
+ * @elizaos/core dist/types/components.d.ts - `HandlerOptions` (subset).
91
+ * The plugin does not read multi-step plan context, so this is left opaque.
92
+ */
93
+ type HandlerOptions = Record<string, unknown>;
94
+ /**
95
+ * Minimal logger surface exposed by `IAgentRuntime.logger`
96
+ * (@elizaos/core dist/logger - Logger). The plugin uses only these levels.
97
+ * Method signatures, not function-typed properties: core's `LogFn` takes a narrower first
98
+ * parameter, and only a method is compared bivariantly under `strictFunctionTypes`, so a
99
+ * plugin typed against this view still assigns to core's `Plugin`.
100
+ */
101
+ interface ElizaLogger {
102
+ info(...args: unknown[]): void;
103
+ warn(...args: unknown[]): void;
104
+ error(...args: unknown[]): void;
105
+ debug(...args: unknown[]): void;
106
+ }
107
+ /**
108
+ * @elizaos/core dist/types/runtime.d.ts - `IAgentRuntime` (consume-only subset).
109
+ * The real interface extends `IDatabaseAdapter` and is large; this plugin reads
110
+ * ONLY `getSetting` (and optionally `logger`). No index signature: core declares
111
+ * none, so a real runtime is assignable to this view only without one.
112
+ */
113
+ interface IAgentRuntime {
114
+ /** Wider than the core declaration: a runtime may answer `undefined` for an unset key. */
115
+ getSetting(key: string): string | boolean | number | null | undefined;
116
+ logger?: ElizaLogger;
117
+ agentId?: UUID;
118
+ }
119
+ /** @elizaos/core dist/types/components.d.ts - `Validator`. */
120
+ type Validator = (runtime: IAgentRuntime, message: Memory, state?: State) => Promise<boolean>;
121
+ /**
122
+ * @elizaos/core dist/types/components.d.ts - `Handler`.
123
+ * Return narrowed to `Promise<ActionResult>` (this plugin always returns a
124
+ * result); assignable to core's `Promise<ActionResult | void | undefined>`.
125
+ */
126
+ type Handler = (runtime: IAgentRuntime, message: Memory, state?: State, options?: HandlerOptions, callback?: HandlerCallback, responses?: Memory[]) => Promise<ActionResult>;
127
+ /** @elizaos/core dist/types/components.d.ts - `Action` (subset). */
128
+ interface Action {
129
+ name: string;
130
+ description: string;
131
+ similes?: string[];
132
+ examples?: ActionExample[][];
133
+ validate: Validator;
134
+ handler: Handler;
135
+ [key: string]: unknown;
136
+ }
137
+ /** @elizaos/core dist/types/plugin.d.ts - `Plugin` (subset). */
138
+ interface Plugin {
139
+ name: string;
140
+ description: string;
141
+ actions?: Action[];
142
+ [key: string]: unknown;
143
+ }
144
+
145
+ type SolanaCluster = "devnet" | "mainnet";
146
+
147
+ /**
148
+ * The SDK methods the plugin uses, all as the buyer: it commissions, funds a 402 on the escrow
149
+ * rail, reads the directory, EscroRep and an escrow, and settles only through the operator's own
150
+ * predicate. It never judges a deliverable.
151
+ */
152
+ type EscroClient = Pick<Escro, "createEscrow" | "pay" | "getEscrow" | "releaseWithPredicate" | "raiseDispute" | "findWorkers" | "listReputations">;
153
+ /** Resolved connection settings for the Escro SDK client. */
154
+ interface EscroClientConfig {
155
+ cluster: SolanaCluster;
156
+ rpcUrl: string;
157
+ apiUrl: string;
158
+ }
159
+ declare function resolveClientConfig(runtime: IAgentRuntime): EscroClientConfig;
160
+ declare function loadWalletFromRuntime(runtime: IAgentRuntime): Keypair;
161
+ declare function createEscroClientFromRuntime(runtime: IAgentRuntime): EscroClient;
162
+
163
+ /** Action name exposed to the elizaOS runtime. */
164
+ declare const REVIEW_DELIVERY = "REVIEW_DELIVERY";
165
+ /**
166
+ * The operator's decision input for one delivery: the expectation and the bytes are its own. The
167
+ * record's job is the action's to bind (the reviewed escrow on the runtime's cluster), never the hook's.
168
+ */
169
+ interface PredicateReview {
170
+ check: Omit<PredicateCheck, "job">;
171
+ delivery: Delivery;
172
+ context?: PredicateContext;
173
+ onFail?: "hold" | "dispute";
174
+ }
175
+ /** Answers null to make no decision: nothing is released and the escrow stays held. */
176
+ type ReviewHook = (escrow: EscrowAccount) => Promise<PredicateReview | null>;
177
+ interface ReviewDeliveryDeps {
178
+ createClient: (runtime: IAgentRuntime) => EscroClient;
179
+ review?: ReviewHook;
180
+ }
181
+ /**
182
+ * Build the `REVIEW_DELIVERY` action. The buyer is the judge: the check and the delivered bytes come
183
+ * only from the operator's hook, and a chat message can name nothing but the escrow, which is why a
184
+ * fenced block needs no consent here.
185
+ */
186
+ declare function makeReviewDeliveryAction(deps?: Partial<ReviewDeliveryDeps>): Action;
187
+ /** The default `REVIEW_DELIVERY` action: no hook, so it refuses every delivery. */
188
+ declare const reviewDeliveryAction: Action;
189
+
190
+ /** Decides whether a chat message may supply fund-moving input as text. */
191
+ type ChatInputAuthorizer = (message: Memory) => boolean | Promise<boolean>;
192
+ declare const CHAT_INPUT_SETTING = "ESCRO_CHAT_INPUT_CONSENT";
193
+ declare const CHAT_INPUT_RISK_ACKNOWLEDGED = "anyone who can message this agent can spend its wallet";
194
+
195
+ /** What only the operator may decide; a chat message can set none of these. */
196
+ interface EscroPluginOptions {
197
+ review?: ReviewHook;
198
+ admitAcceptance?: (acceptance: Acceptance) => boolean;
199
+ authorizeChatInput?: ChatInputAuthorizer;
200
+ }
201
+ /**
202
+ * The plugin with the operator's decisions wired in. Without a `review` hook `REVIEW_DELIVERY`
203
+ * refuses, so settlement exists only for an operator who registers this form.
204
+ */
205
+ declare function createEscroPlugin(options?: EscroPluginOptions): Plugin;
206
+ /**
207
+ * The plugin a character loads by name: it commissions and funds 402s once an operator admits chat
208
+ * input, and has no review hook, so it can never release. The agent's operator remains the judge.
209
+ */
210
+ declare const escroPlugin: Plugin;
211
+
212
+ /** Injectable dependencies for the commission action (mockable in tests). */
213
+ interface CommissionTaskDeps {
214
+ /** Build the Escro client for a given runtime. Defaults to the settings-based factory. */
215
+ createClient: (runtime: IAgentRuntime) => EscroClient;
216
+ /** Decides whether a commission read from chat text may spend; see `chatInputGate`. */
217
+ authorizeChatInput?: ChatInputAuthorizer;
218
+ }
219
+ /** Action name exposed to the elizaOS runtime. */
220
+ declare const COMMISSION_TASK = "COMMISSION_TASK";
221
+ /**
222
+ * Build the `commission_task` action, wrapping the Escro SDK's `createEscrow`.
223
+ * The client factory is injectable so tests never touch Solana.
224
+ *
225
+ * This action is a thin wrapper: it locks funds against an assigned worker and
226
+ * reports the escrow. It makes NO judgment about deliverable quality - the agent
227
+ * (Buyer) reviews and releases, and Escro defaults to refund if nothing arrives.
228
+ */
229
+ declare function makeCommissionTaskAction(deps?: Partial<CommissionTaskDeps>): Action;
230
+ /** The default `commission_task` action using the settings-based client factory. */
231
+ declare const commissionTaskAction: Action;
232
+
233
+ /** Action name exposed to the elizaOS runtime. */
234
+ declare const PAY_402 = "PAY_402";
235
+ /** Injectable dependencies for the 402 action. */
236
+ interface Pay402Deps {
237
+ /**
238
+ * The client that pays. The action cannot read an injected client's cluster, so with
239
+ * `ESCRO_CLUSTER` unset it holds an injected client to mainnet's host rule and pays only mainnet
240
+ * entries; set `ESCRO_CLUSTER=devnet` for devnet's.
241
+ */
242
+ createClient: (runtime: IAgentRuntime) => EscroClient;
243
+ /** The operator's decision on an `acceptance` a 402 carries; only ever from plugin options. */
244
+ admitAcceptance?: (acceptance: Acceptance) => boolean;
245
+ authorizeChatInput?: ChatInputAuthorizer;
246
+ now?: () => number;
247
+ }
248
+ /** Build the `PAY_402` action: funds a worker's 402 on the escrow rail through the SDK's `pay`. */
249
+ declare function makePay402Action(deps?: Partial<Pay402Deps>): Action;
250
+ /** The default `PAY_402` action: no `admitAcceptance`, so an acceptance-bearing 402 is refused. */
251
+ declare const pay402Action: Action;
252
+
253
+ /** Default relative deadline (seconds) when the caller supplies no deadline. */
254
+ declare const DEFAULT_DEADLINE_SECONDS = 3600;
255
+ /**
256
+ * Structured input for the `commission_task` action. This is the shape the
257
+ * agent/runtime supplies; it maps 1:1 onto the SDK's `CreateEscrowParams`.
258
+ *
259
+ * `amountUsdc` is micro-USDC (1 USDC = 1_000_000), matching the SDK field
260
+ * exactly - the plugin performs no unit conversion (it is a thin SDK wrapper).
261
+ */
262
+ declare const commissionInputSchema: z.ZodObject<{
263
+ /** Base-58 public key of the worker being commissioned. */
264
+ worker: z.ZodString;
265
+ /** Worker's net payment in micro-USDC. Minimum enforced from shared config. */
266
+ amountUsdc: z.ZodNumber;
267
+ /** Absolute Unix deadline (seconds). Takes precedence over `deadlineSeconds`. */
268
+ deadlineUnix: z.ZodOptional<z.ZodNumber>;
269
+ /** Relative deadline in seconds from now. Used when `deadlineUnix` is absent. */
270
+ deadlineSeconds: z.ZodOptional<z.ZodNumber>;
271
+ task: z.ZodObject<{
272
+ description: z.ZodString;
273
+ taskType: z.ZodOptional<z.ZodEnum<["code_generation", "code_review", "data_analysis", "content_writing", "translation", "summarization", "question_answering", "image_generation", "audio_transcription", "custom"]>>;
274
+ acceptanceCriteria: z.ZodArray<z.ZodObject<{
275
+ id: z.ZodString;
276
+ description: z.ZodString;
277
+ weight: z.ZodOptional<z.ZodNumber>;
278
+ required: z.ZodOptional<z.ZodBoolean>;
279
+ }, "strict", z.ZodTypeAny, {
280
+ description: string;
281
+ id: string;
282
+ weight?: number | undefined;
283
+ required?: boolean | undefined;
284
+ }, {
285
+ description: string;
286
+ id: string;
287
+ weight?: number | undefined;
288
+ required?: boolean | undefined;
289
+ }>, "many">;
290
+ deliverableFormat: z.ZodOptional<z.ZodObject<{
291
+ type: z.ZodEnum<["text", "json", "file", "url", "code"]>;
292
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
293
+ mimeType: z.ZodOptional<z.ZodString>;
294
+ maxSizeBytes: z.ZodOptional<z.ZodNumber>;
295
+ language: z.ZodOptional<z.ZodString>;
296
+ }, "strict", z.ZodTypeAny, {
297
+ type: "code" | "text" | "json" | "file" | "url";
298
+ schema?: Record<string, unknown> | undefined;
299
+ mimeType?: string | undefined;
300
+ maxSizeBytes?: number | undefined;
301
+ language?: string | undefined;
302
+ }, {
303
+ type: "code" | "text" | "json" | "file" | "url";
304
+ schema?: Record<string, unknown> | undefined;
305
+ mimeType?: string | undefined;
306
+ maxSizeBytes?: number | undefined;
307
+ language?: string | undefined;
308
+ }>>;
309
+ version: z.ZodOptional<z.ZodString>;
310
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
311
+ }, "strict", z.ZodTypeAny, {
312
+ description: string;
313
+ acceptanceCriteria: {
314
+ description: string;
315
+ id: string;
316
+ weight?: number | undefined;
317
+ required?: boolean | undefined;
318
+ }[];
319
+ taskType?: "code_generation" | "code_review" | "data_analysis" | "content_writing" | "translation" | "summarization" | "question_answering" | "image_generation" | "audio_transcription" | "custom" | undefined;
320
+ deliverableFormat?: {
321
+ type: "code" | "text" | "json" | "file" | "url";
322
+ schema?: Record<string, unknown> | undefined;
323
+ mimeType?: string | undefined;
324
+ maxSizeBytes?: number | undefined;
325
+ language?: string | undefined;
326
+ } | undefined;
327
+ version?: string | undefined;
328
+ metadata?: Record<string, unknown> | undefined;
329
+ }, {
330
+ description: string;
331
+ acceptanceCriteria: {
332
+ description: string;
333
+ id: string;
334
+ weight?: number | undefined;
335
+ required?: boolean | undefined;
336
+ }[];
337
+ taskType?: "code_generation" | "code_review" | "data_analysis" | "content_writing" | "translation" | "summarization" | "question_answering" | "image_generation" | "audio_transcription" | "custom" | undefined;
338
+ deliverableFormat?: {
339
+ type: "code" | "text" | "json" | "file" | "url";
340
+ schema?: Record<string, unknown> | undefined;
341
+ mimeType?: string | undefined;
342
+ maxSizeBytes?: number | undefined;
343
+ language?: string | undefined;
344
+ } | undefined;
345
+ version?: string | undefined;
346
+ metadata?: Record<string, unknown> | undefined;
347
+ }>;
348
+ /** `false` sends the create and returns without waiting for its confirmation. */
349
+ wait: z.ZodOptional<z.ZodBoolean>;
350
+ }, "strict", z.ZodTypeAny, {
351
+ worker: string;
352
+ amountUsdc: number;
353
+ task: {
354
+ description: string;
355
+ acceptanceCriteria: {
356
+ description: string;
357
+ id: string;
358
+ weight?: number | undefined;
359
+ required?: boolean | undefined;
360
+ }[];
361
+ taskType?: "code_generation" | "code_review" | "data_analysis" | "content_writing" | "translation" | "summarization" | "question_answering" | "image_generation" | "audio_transcription" | "custom" | undefined;
362
+ deliverableFormat?: {
363
+ type: "code" | "text" | "json" | "file" | "url";
364
+ schema?: Record<string, unknown> | undefined;
365
+ mimeType?: string | undefined;
366
+ maxSizeBytes?: number | undefined;
367
+ language?: string | undefined;
368
+ } | undefined;
369
+ version?: string | undefined;
370
+ metadata?: Record<string, unknown> | undefined;
371
+ };
372
+ deadlineUnix?: number | undefined;
373
+ deadlineSeconds?: number | undefined;
374
+ wait?: boolean | undefined;
375
+ }, {
376
+ worker: string;
377
+ amountUsdc: number;
378
+ task: {
379
+ description: string;
380
+ acceptanceCriteria: {
381
+ description: string;
382
+ id: string;
383
+ weight?: number | undefined;
384
+ required?: boolean | undefined;
385
+ }[];
386
+ taskType?: "code_generation" | "code_review" | "data_analysis" | "content_writing" | "translation" | "summarization" | "question_answering" | "image_generation" | "audio_transcription" | "custom" | undefined;
387
+ deliverableFormat?: {
388
+ type: "code" | "text" | "json" | "file" | "url";
389
+ schema?: Record<string, unknown> | undefined;
390
+ mimeType?: string | undefined;
391
+ maxSizeBytes?: number | undefined;
392
+ language?: string | undefined;
393
+ } | undefined;
394
+ version?: string | undefined;
395
+ metadata?: Record<string, unknown> | undefined;
396
+ };
397
+ deadlineUnix?: number | undefined;
398
+ deadlineSeconds?: number | undefined;
399
+ wait?: boolean | undefined;
400
+ }>;
401
+ type CommissionInput = z.infer<typeof commissionInputSchema>;
402
+ /**
403
+ * Validate and parse raw commission parameters into a {@link CommissionInput}.
404
+ * Throws {@link CommissionInputError} with a readable message on failure.
405
+ */
406
+ declare function parseCommissionInput(raw: unknown): CommissionInput;
407
+ /**
408
+ * Map a validated {@link CommissionInput} to the SDK's `CreateEscrowParams`,
409
+ * resolving the deadline against `nowUnix`. Throws {@link CommissionInputError}
410
+ * if the resolved deadline is not in the future.
411
+ */
412
+ declare function buildCreateEscrowParams(input: CommissionInput, nowUnix?: number): CreateEscrowParams;
413
+
414
+ /**
415
+ * A directory candidate joined to its EscroRep RAW components. The
416
+ * `descriptor`/`signatureValid` pair is unchanged from {@link WorkerCandidate}
417
+ * (a self-reported CLAIM plus an authorship check); `reputation` is that wallet's
418
+ * verified on-chain history, or `null` when the wallet has no Escro history yet.
419
+ * The claim and the verified history are kept as separate fields, never merged
420
+ * into one score.
421
+ */
422
+ interface WorkerWithReputation extends WorkerCandidate {
423
+ /** The wallet's raw EscroRep components, or `null` when it has no on-chain Escro history. */
424
+ reputation: ServedWalletReputation | null;
425
+ }
426
+ /**
427
+ * A CALLER-SUPPLIED weighting over a candidate's raw components. Escro ships no
428
+ * default weight (Escro-shipped code never ranks) - the
429
+ * caller's own bot owns the policy. A higher number wins.
430
+ */
431
+ type WorkerWeight = (worker: WorkerWithReputation) => number;
432
+ /**
433
+ * List directory workers and join each to its EscroRep raw components. The
434
+ * reputation join uses ONE bulk export fetch (`Escro.listReputations`) regardless
435
+ * of candidate count - the per-wallet endpoint shares a 10/min public-metrics
436
+ * budget, so a per-candidate fan-out would rate-limit itself. Registry order is
437
+ * preserved; no ranking or reordering happens here. Weighting/selection is the
438
+ * caller's ({@link selectWorker}).
439
+ */
440
+ declare function findWorkersWithReputation(client: EscroClient, params?: {
441
+ capability?: string;
442
+ }): Promise<WorkerWithReputation[]>;
443
+ /**
444
+ * Select the highest-weighted worker under the caller's `weight`. Ties preserve
445
+ * input (registry) order - the strict `>` never lets a later, equal candidate
446
+ * displace an earlier one, so Escro imposes no tie-break opinion of its own. The
447
+ * raw components are handed to `weight` untransformed (no normalization or
448
+ * pre-scoring). Returns `undefined` only for an empty candidate set.
449
+ */
450
+ declare function selectWorker(workers: WorkerWithReputation[], weight: WorkerWeight): WorkerWithReputation | undefined;
451
+
452
+ /** Base error for all @escro/plugin-eliza failures. */
453
+ declare class EscroPluginError extends Error {
454
+ constructor(message: string, options?: {
455
+ cause?: unknown;
456
+ });
457
+ }
458
+ /**
459
+ * Thrown when the commission parameters supplied by the agent/runtime are
460
+ * missing or malformed (fails validation before any transaction is built).
461
+ */
462
+ declare class CommissionInputError extends EscroPluginError {
463
+ }
464
+ /**
465
+ * Thrown when the plugin's runtime settings are missing or invalid
466
+ * (e.g. no wallet secret). Never carries secret material in its message.
467
+ */
468
+ declare class EscroConfigError extends EscroPluginError {
469
+ }
470
+ /** Thrown when an action's input is refused before it is validated against the action's schema. */
471
+ declare class ActionInputError extends EscroPluginError {
472
+ }
473
+ /** Thrown when text in a chat message supplies fund-moving input the operator has not admitted. */
474
+ declare class ChatInputRefusedError extends EscroPluginError {
475
+ }
476
+
477
+ export { ActionInputError, CHAT_INPUT_RISK_ACKNOWLEDGED, CHAT_INPUT_SETTING, COMMISSION_TASK, ChatInputRefusedError, CommissionInputError, DEFAULT_DEADLINE_SECONDS, EscroConfigError, EscroPluginError, PAY_402, REVIEW_DELIVERY, buildCreateEscrowParams, commissionInputSchema, commissionTaskAction, createEscroClientFromRuntime, createEscroPlugin, escroPlugin as default, escroPlugin, findWorkersWithReputation, loadWalletFromRuntime, makeCommissionTaskAction, makePay402Action, makeReviewDeliveryAction, parseCommissionInput, pay402Action, resolveClientConfig, reviewDeliveryAction, selectWorker };
478
+ export type { Action, ActionResult, ChatInputAuthorizer, CommissionInput, CommissionTaskDeps, Content, EscroClient, EscroClientConfig, EscroPluginOptions, HandlerCallback, IAgentRuntime, Memory, Pay402Deps, Plugin, PredicateReview, ReviewDeliveryDeps, ReviewHook, WorkerWeight, WorkerWithReputation };