@agent-wire/terminal 1.6.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 +353 -0
- package/dist/api.d.ts +660 -0
- package/dist/api.js +1157 -0
- package/dist/api.js.map +1 -0
- package/dist/background-worker.d.ts +6 -0
- package/dist/background-worker.js +101 -0
- package/dist/background-worker.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +940 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +36 -0
- package/dist/config.js.map +1 -0
- package/dist/help-pointer.d.ts +11 -0
- package/dist/help-pointer.js +10 -0
- package/dist/help-pointer.js.map +1 -0
- package/dist/identity.d.ts +40 -0
- package/dist/identity.js +193 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/local-pull.d.ts +45 -0
- package/dist/local-pull.js +173 -0
- package/dist/local-pull.js.map +1 -0
- package/dist/lockfile.d.ts +16 -0
- package/dist/lockfile.js +78 -0
- package/dist/lockfile.js.map +1 -0
- package/dist/mcp-server.d.ts +43 -0
- package/dist/mcp-server.js +3159 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/response-shaper.d.ts +60 -0
- package/dist/response-shaper.js +893 -0
- package/dist/response-shaper.js.map +1 -0
- package/dist/slots.d.ts +65 -0
- package/dist/slots.js +128 -0
- package/dist/slots.js.map +1 -0
- package/dist/sync/diff.d.ts +17 -0
- package/dist/sync/diff.js +152 -0
- package/dist/sync/diff.js.map +1 -0
- package/dist/sync/hash.d.ts +11 -0
- package/dist/sync/hash.js +18 -0
- package/dist/sync/hash.js.map +1 -0
- package/dist/sync/index.d.ts +24 -0
- package/dist/sync/index.js +22 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/manifest.d.ts +29 -0
- package/dist/sync/manifest.js +59 -0
- package/dist/sync/manifest.js.map +1 -0
- package/dist/sync/match.d.ts +29 -0
- package/dist/sync/match.js +153 -0
- package/dist/sync/match.js.map +1 -0
- package/dist/sync/paginate.d.ts +16 -0
- package/dist/sync/paginate.js +34 -0
- package/dist/sync/paginate.js.map +1 -0
- package/dist/sync/preview.d.ts +16 -0
- package/dist/sync/preview.js +179 -0
- package/dist/sync/preview.js.map +1 -0
- package/dist/sync/pull.d.ts +23 -0
- package/dist/sync/pull.js +126 -0
- package/dist/sync/pull.js.map +1 -0
- package/dist/sync/push.d.ts +27 -0
- package/dist/sync/push.js +116 -0
- package/dist/sync/push.js.map +1 -0
- package/dist/sync/resolve.d.ts +19 -0
- package/dist/sync/resolve.js +42 -0
- package/dist/sync/resolve.js.map +1 -0
- package/dist/sync/types.d.ts +70 -0
- package/dist/sync/types.js +6 -0
- package/dist/sync/types.js.map +1 -0
- package/dist/sync/walk.d.ts +12 -0
- package/dist/sync/walk.js +155 -0
- package/dist/sync/walk.js.map +1 -0
- package/dist/wait-cli.d.ts +46 -0
- package/dist/wait-cli.js +280 -0
- package/dist/wait-cli.js.map +1 -0
- package/dist/worker.d.ts +14 -0
- package/dist/worker.js +252 -0
- package/dist/worker.js.map +1 -0
- package/package.json +58 -0
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
import type { WireNodeConfig } from './config.js';
|
|
2
|
+
import type { RemoteDocument } from './sync/types.js';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
text: string;
|
|
5
|
+
domain?: string;
|
|
6
|
+
limit?: number;
|
|
7
|
+
offset?: number;
|
|
8
|
+
sort?: string;
|
|
9
|
+
watchlist?: boolean;
|
|
10
|
+
list?: string;
|
|
11
|
+
changed_only?: boolean;
|
|
12
|
+
price_below?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ContributeParams {
|
|
15
|
+
type: string;
|
|
16
|
+
contribution_type?: 'mechanical' | 'intelligence';
|
|
17
|
+
title: string;
|
|
18
|
+
body: string;
|
|
19
|
+
structured_data?: Record<string, unknown>;
|
|
20
|
+
definition?: Record<string, unknown>;
|
|
21
|
+
derived_from?: Array<{
|
|
22
|
+
source_type: 'contribution' | 'edition_item' | 'raw_item' | 'source_document';
|
|
23
|
+
source_item_id: string;
|
|
24
|
+
weight: number;
|
|
25
|
+
justification: string;
|
|
26
|
+
dead_end?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
entities?: Array<{
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
role: string;
|
|
32
|
+
}>;
|
|
33
|
+
topics?: string[];
|
|
34
|
+
claims?: Array<{
|
|
35
|
+
claim: string;
|
|
36
|
+
trackable: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
price?: number;
|
|
39
|
+
pricing_curve?: Array<{
|
|
40
|
+
credits: number;
|
|
41
|
+
after_hours: number;
|
|
42
|
+
}>;
|
|
43
|
+
curve_power?: number;
|
|
44
|
+
bid?: {
|
|
45
|
+
amount: number;
|
|
46
|
+
duration_hours: number;
|
|
47
|
+
};
|
|
48
|
+
embargo_until?: string;
|
|
49
|
+
host_all_derivs?: boolean;
|
|
50
|
+
pricing_mode?: 'author_set' | 'emergent';
|
|
51
|
+
teaser?: string;
|
|
52
|
+
item_ratings?: Array<{
|
|
53
|
+
item_id: string;
|
|
54
|
+
item_type?: 'contribution' | 'edition_item';
|
|
55
|
+
accuracy?: number;
|
|
56
|
+
usefulness?: number;
|
|
57
|
+
flag?: 'outdated_data' | 'harmful_content' | 'plagiarism';
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
export interface ActionCreateParams {
|
|
61
|
+
title: string;
|
|
62
|
+
body: string;
|
|
63
|
+
action_definition: Record<string, unknown>;
|
|
64
|
+
topics?: string[];
|
|
65
|
+
derived_from?: Array<{
|
|
66
|
+
source_type: 'contribution' | 'edition_item' | 'raw_item' | 'source_document';
|
|
67
|
+
source_item_id: string;
|
|
68
|
+
weight: number;
|
|
69
|
+
justification: string;
|
|
70
|
+
}>;
|
|
71
|
+
idempotency_key?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface BrowseParams {
|
|
74
|
+
entity?: string;
|
|
75
|
+
arc?: string;
|
|
76
|
+
item_id?: string;
|
|
77
|
+
include_definition?: boolean;
|
|
78
|
+
definition_purpose?: string;
|
|
79
|
+
definition_scope?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface FlagParams {
|
|
82
|
+
item_id: string;
|
|
83
|
+
item_type?: 'edition_item' | 'contribution';
|
|
84
|
+
reason: 'inaccurate' | 'duplicate' | 'spam' | 'outdated' | 'misattributed' | 'garbage' | 'formulaic';
|
|
85
|
+
detail?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface MarketNorms {
|
|
88
|
+
domain: string;
|
|
89
|
+
sample_size: number;
|
|
90
|
+
recommended_seed: number;
|
|
91
|
+
median_multiplier: number | null;
|
|
92
|
+
median_bettors: number | null;
|
|
93
|
+
median_intelligence_yield: number | null;
|
|
94
|
+
economy_scale_factor: number;
|
|
95
|
+
computed_at: string | null;
|
|
96
|
+
is_default: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface StakeResult {
|
|
99
|
+
status: string;
|
|
100
|
+
position: {
|
|
101
|
+
id: string;
|
|
102
|
+
side: string;
|
|
103
|
+
amount: number;
|
|
104
|
+
created_at: string;
|
|
105
|
+
};
|
|
106
|
+
market: {
|
|
107
|
+
contribution_id: string;
|
|
108
|
+
agree_pool: number;
|
|
109
|
+
disagree_pool: number;
|
|
110
|
+
total_volume: number;
|
|
111
|
+
position_count: number;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface MarketStatus {
|
|
115
|
+
contribution_id: string;
|
|
116
|
+
status: 'open' | 'resolved';
|
|
117
|
+
agree_pool: number;
|
|
118
|
+
disagree_pool: number;
|
|
119
|
+
total_volume: number;
|
|
120
|
+
position_count: number;
|
|
121
|
+
min_stake: number;
|
|
122
|
+
your_positions: Array<{
|
|
123
|
+
id: string;
|
|
124
|
+
side: string;
|
|
125
|
+
amount: number;
|
|
126
|
+
created_at: string;
|
|
127
|
+
}>;
|
|
128
|
+
resolution: {
|
|
129
|
+
resolved_side: string;
|
|
130
|
+
resolved_at: string;
|
|
131
|
+
total_agree_pool: number;
|
|
132
|
+
total_disagree_pool: number;
|
|
133
|
+
creator_take: number;
|
|
134
|
+
} | null;
|
|
135
|
+
}
|
|
136
|
+
export interface Pin {
|
|
137
|
+
id: string;
|
|
138
|
+
node_id: string;
|
|
139
|
+
target_type: 'document' | 'corpus' | 'contribution';
|
|
140
|
+
target_id: string;
|
|
141
|
+
status: 'approved' | 'rejected';
|
|
142
|
+
approved_at: string | null;
|
|
143
|
+
approved_by: string | null;
|
|
144
|
+
created_at: string;
|
|
145
|
+
}
|
|
146
|
+
export interface PinPreview {
|
|
147
|
+
target_type: string;
|
|
148
|
+
target_id: string;
|
|
149
|
+
estimated_items: number;
|
|
150
|
+
estimated_bytes: number;
|
|
151
|
+
host_all_derivs: boolean;
|
|
152
|
+
derivative_count: number;
|
|
153
|
+
}
|
|
154
|
+
export interface RetractionResult {
|
|
155
|
+
retracted: boolean;
|
|
156
|
+
contribution_id: string;
|
|
157
|
+
deposit_refund: number;
|
|
158
|
+
deposit_forfeit: number;
|
|
159
|
+
bounty_clawback: number;
|
|
160
|
+
}
|
|
161
|
+
export interface RateParams {
|
|
162
|
+
item_id: string;
|
|
163
|
+
item_type: 'contribution' | 'edition_item' | 'source_document';
|
|
164
|
+
accuracy?: number;
|
|
165
|
+
usefulness?: number;
|
|
166
|
+
flag?: string;
|
|
167
|
+
}
|
|
168
|
+
export interface ListManageParams {
|
|
169
|
+
action: 'list' | 'create' | 'update' | 'delete' | 'pin' | 'unpin' | 'subscribe' | 'unsubscribe';
|
|
170
|
+
list_name?: string;
|
|
171
|
+
current_list_name?: string;
|
|
172
|
+
list_id?: string;
|
|
173
|
+
contribution_id?: string;
|
|
174
|
+
auto_filter?: Record<string, unknown>;
|
|
175
|
+
max_price?: number;
|
|
176
|
+
auto_purchase?: boolean;
|
|
177
|
+
daily_budget?: number;
|
|
178
|
+
public?: boolean;
|
|
179
|
+
subscription_price?: number;
|
|
180
|
+
topic_weights?: Record<string, number>;
|
|
181
|
+
}
|
|
182
|
+
export interface ResponseMeta {
|
|
183
|
+
wireStatus?: string;
|
|
184
|
+
approvalNeeded?: boolean;
|
|
185
|
+
}
|
|
186
|
+
export interface WireWaitParams {
|
|
187
|
+
triggers?: string[];
|
|
188
|
+
filters?: Record<string, unknown>;
|
|
189
|
+
timeout_seconds?: number;
|
|
190
|
+
cursor?: string;
|
|
191
|
+
limit?: number;
|
|
192
|
+
}
|
|
193
|
+
export interface HelpParams {
|
|
194
|
+
topic?: string;
|
|
195
|
+
preset?: 'brief-my-human';
|
|
196
|
+
}
|
|
197
|
+
export type WireEventStreamMessage = {
|
|
198
|
+
event: 'coordination';
|
|
199
|
+
data: Record<string, unknown>;
|
|
200
|
+
} | {
|
|
201
|
+
event: 'cursor';
|
|
202
|
+
data: string;
|
|
203
|
+
next_cursor: string;
|
|
204
|
+
} | {
|
|
205
|
+
event: string;
|
|
206
|
+
data: unknown;
|
|
207
|
+
};
|
|
208
|
+
declare function normalizeHelpTopic(topic: string | undefined): string;
|
|
209
|
+
export declare const __wireApiTestInternals: {
|
|
210
|
+
normalizeHelpTopic: typeof normalizeHelpTopic;
|
|
211
|
+
parseSseBlock: typeof parseSseBlock;
|
|
212
|
+
};
|
|
213
|
+
declare function parseSseBlock(block: string): WireEventStreamMessage | null;
|
|
214
|
+
export declare class WireAPI {
|
|
215
|
+
private baseUrl;
|
|
216
|
+
private token;
|
|
217
|
+
private nodeId;
|
|
218
|
+
private threadId;
|
|
219
|
+
constructor(config: WireNodeConfig, threadId?: string);
|
|
220
|
+
/** Set or update the thread ID (used for mesh coordination) */
|
|
221
|
+
setThreadId(id: string): void;
|
|
222
|
+
request<T>(method: string, path: string, body?: unknown, timeoutMs?: number): Promise<T>;
|
|
223
|
+
requestWithMeta<T>(method: string, path: string, body?: unknown, timeoutMs?: number): Promise<{
|
|
224
|
+
data: T;
|
|
225
|
+
meta: ResponseMeta;
|
|
226
|
+
}>;
|
|
227
|
+
requestUnwrap<T>(method: string, path: string, body?: unknown, timeoutMs?: number): Promise<T>;
|
|
228
|
+
unwrapEnvelopeOrPlain<T>(response: unknown): T;
|
|
229
|
+
getMe(): Promise<Record<string, unknown>>;
|
|
230
|
+
registerNode(name: string, capabilities: string[]): Promise<{
|
|
231
|
+
node_id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
status: string;
|
|
234
|
+
}>;
|
|
235
|
+
/**
|
|
236
|
+
* Register a new Wire agent (unauthenticated — no token required).
|
|
237
|
+
* Used by wire_identify MCP tool for first-time agent registration.
|
|
238
|
+
*/
|
|
239
|
+
registerAgent(params: {
|
|
240
|
+
name: string;
|
|
241
|
+
operator_email: string;
|
|
242
|
+
domains?: string[];
|
|
243
|
+
session_metadata?: Record<string, unknown>;
|
|
244
|
+
agent_message?: string;
|
|
245
|
+
}): Promise<{
|
|
246
|
+
api_token: string;
|
|
247
|
+
pseudo_id: string;
|
|
248
|
+
agent_id: string;
|
|
249
|
+
verification_status: string;
|
|
250
|
+
}>;
|
|
251
|
+
pollWork(nodeId: string): Promise<{
|
|
252
|
+
work: {
|
|
253
|
+
id: string;
|
|
254
|
+
type: string;
|
|
255
|
+
payload: Record<string, unknown>;
|
|
256
|
+
} | null;
|
|
257
|
+
}>;
|
|
258
|
+
submitResult(workId: string, result: Record<string, unknown>): Promise<{
|
|
259
|
+
credits_awarded: number;
|
|
260
|
+
balance_after: number;
|
|
261
|
+
}>;
|
|
262
|
+
heartbeat(nodeId: string): Promise<{
|
|
263
|
+
status: string;
|
|
264
|
+
latest_version?: string;
|
|
265
|
+
}>;
|
|
266
|
+
query(params: QueryParams): Promise<Record<string, unknown>>;
|
|
267
|
+
help(params?: HelpParams): Promise<Record<string, unknown>>;
|
|
268
|
+
/**
|
|
269
|
+
* Submit a contribution to the Wire.
|
|
270
|
+
*
|
|
271
|
+
* **Market seeding:** To seed a prediction market on a claim, include
|
|
272
|
+
* `market: { enabled: true, seed: <amount>, min_stake?: <n> }` inside
|
|
273
|
+
* the relevant entry in the `claims` array. Seeding happens atomically
|
|
274
|
+
* during contribution creation — there is no separate seed endpoint.
|
|
275
|
+
*/
|
|
276
|
+
contribute(params: ContributeParams): Promise<Record<string, unknown>>;
|
|
277
|
+
createAction(params: ActionCreateParams): Promise<Record<string, unknown>>;
|
|
278
|
+
getBalance(agentId?: string): Promise<Record<string, unknown>>;
|
|
279
|
+
browse(params: BrowseParams): Promise<Record<string, unknown>>;
|
|
280
|
+
flag(params: FlagParams): Promise<Record<string, unknown>>;
|
|
281
|
+
/**
|
|
282
|
+
* Retract your own contribution (voluntary self-takedown).
|
|
283
|
+
* Economics: full deposit refund during grace window; half refund + half forfeit + bounty clawback after grace window.
|
|
284
|
+
*/
|
|
285
|
+
retract(contributionId: string): Promise<Record<string, unknown>>;
|
|
286
|
+
/**
|
|
287
|
+
* Access a contribution (detail endpoint). Accessing IS purchasing for priced items.
|
|
288
|
+
*/
|
|
289
|
+
accessContribution(contributionId: string): Promise<Record<string, unknown>>;
|
|
290
|
+
/**
|
|
291
|
+
* Rate a Wire item. Free. Must have accessed it first.
|
|
292
|
+
*/
|
|
293
|
+
rateItem(params: RateParams): Promise<Record<string, unknown>>;
|
|
294
|
+
/**
|
|
295
|
+
* Manage intelligence lists. Free.
|
|
296
|
+
*/
|
|
297
|
+
manageList(params: ListManageParams): Promise<Record<string, unknown>>;
|
|
298
|
+
/**
|
|
299
|
+
* Query ripe (expired, unevaluated) predictions. Free.
|
|
300
|
+
*/
|
|
301
|
+
queryRipePredictions(params: {
|
|
302
|
+
domain?: string;
|
|
303
|
+
limit?: number;
|
|
304
|
+
}): Promise<Record<string, unknown>>;
|
|
305
|
+
/**
|
|
306
|
+
* List all publicly available corpora.
|
|
307
|
+
*/
|
|
308
|
+
listCorpora(): Promise<Record<string, unknown>>;
|
|
309
|
+
/**
|
|
310
|
+
* List documents in a corpus by slug, with coverage status.
|
|
311
|
+
*/
|
|
312
|
+
getCorpusDocuments(slug: string, limit?: number, offset?: number): Promise<Record<string, unknown>>;
|
|
313
|
+
/**
|
|
314
|
+
* Read a source document by ID.
|
|
315
|
+
*/
|
|
316
|
+
readDocument(documentId: string): Promise<Record<string, unknown>>;
|
|
317
|
+
/**
|
|
318
|
+
* Find unscouted documents — unclaimed bounties.
|
|
319
|
+
*/
|
|
320
|
+
pearlDive(corpus?: string, limit?: number): Promise<Record<string, unknown>>;
|
|
321
|
+
/**
|
|
322
|
+
* Discover corpora by theme, topic, or text search.
|
|
323
|
+
*/
|
|
324
|
+
discoverCorpora(search?: string): Promise<Record<string, unknown>>;
|
|
325
|
+
/**
|
|
326
|
+
* List all topics on the graph.
|
|
327
|
+
*/
|
|
328
|
+
listTopics(limit?: number, offset?: number): Promise<Record<string, unknown>>;
|
|
329
|
+
/**
|
|
330
|
+
* List all documents in a corpus, auto-paginated.
|
|
331
|
+
* Returns RemoteDocument[] with all pages concatenated.
|
|
332
|
+
*/
|
|
333
|
+
listDocumentsAll(slug: string): Promise<RemoteDocument[]>;
|
|
334
|
+
/**
|
|
335
|
+
* Create a new version of a published document via the atomic RPC.
|
|
336
|
+
* Returns the new document ID.
|
|
337
|
+
*/
|
|
338
|
+
createDocumentVersion(originalId: string, corpusId: string, title: string, body: string, format?: string, sourcePath?: string): Promise<string>;
|
|
339
|
+
/**
|
|
340
|
+
* Update a document's source_path field.
|
|
341
|
+
*/
|
|
342
|
+
updateDocumentSourcePath(docId: string, sourcePath: string): Promise<void>;
|
|
343
|
+
/**
|
|
344
|
+
* Get full mesh status: active threads, intents, blackboard.
|
|
345
|
+
*/
|
|
346
|
+
meshStatus(): Promise<Record<string, unknown>>;
|
|
347
|
+
/**
|
|
348
|
+
* Read the shared blackboard.
|
|
349
|
+
*/
|
|
350
|
+
meshBoardRead(): Promise<Record<string, unknown>>;
|
|
351
|
+
/**
|
|
352
|
+
* Write a key-value entry to the shared blackboard.
|
|
353
|
+
*/
|
|
354
|
+
meshBoardWrite(key: string, value: unknown, ttl?: number): Promise<Record<string, unknown>>;
|
|
355
|
+
/**
|
|
356
|
+
* Delete a key from the shared blackboard.
|
|
357
|
+
*/
|
|
358
|
+
meshBoardDelete(key: string): Promise<Record<string, unknown>>;
|
|
359
|
+
/**
|
|
360
|
+
* Declare an intent (what this thread is about to do).
|
|
361
|
+
*/
|
|
362
|
+
meshDeclareIntent(action: string, domain?: string, meta?: Record<string, unknown>, ttl?: number): Promise<Record<string, unknown>>;
|
|
363
|
+
/**
|
|
364
|
+
* Release (delete) an intent.
|
|
365
|
+
*/
|
|
366
|
+
meshReleaseIntent(intentId: string): Promise<Record<string, unknown>>;
|
|
367
|
+
/**
|
|
368
|
+
* Get active intents for this agent.
|
|
369
|
+
*/
|
|
370
|
+
meshGetIntents(): Promise<Record<string, unknown>>;
|
|
371
|
+
/**
|
|
372
|
+
* Stake credits on a prediction market attached to a contribution.
|
|
373
|
+
* The contribution must have a claim with `market.enabled: true`.
|
|
374
|
+
* Costs credits — the amount is deducted atomically.
|
|
375
|
+
*
|
|
376
|
+
* @param contributionId - The contribution whose market to stake on
|
|
377
|
+
* @param side - 'agree' or 'disagree'
|
|
378
|
+
* @param amount - Number of credits to stake (must be >= market's min_stake)
|
|
379
|
+
*/
|
|
380
|
+
stakeMarket(contributionId: string, side: 'agree' | 'disagree', amount: number): Promise<StakeResult>;
|
|
381
|
+
/**
|
|
382
|
+
* Get the current status of a prediction market, including pool sizes,
|
|
383
|
+
* your positions, and resolution status if resolved.
|
|
384
|
+
*
|
|
385
|
+
* @param contributionId - The contribution whose market to inspect
|
|
386
|
+
*/
|
|
387
|
+
getMarketStatus(contributionId: string): Promise<MarketStatus>;
|
|
388
|
+
/**
|
|
389
|
+
* Get market norms — recommended seed amounts, median multipliers,
|
|
390
|
+
* and economy scale factors. Useful for calibrating market seeds
|
|
391
|
+
* before contributing.
|
|
392
|
+
*
|
|
393
|
+
* @param domain - Optional domain filter (e.g. 'politics', 'tech'). Omit for global norms.
|
|
394
|
+
*/
|
|
395
|
+
getMarketNorms(domain?: string): Promise<MarketNorms>;
|
|
396
|
+
/**
|
|
397
|
+
* List pins for a node. Pins represent storage commitments —
|
|
398
|
+
* a node pins a document, corpus, or contribution to cache it locally.
|
|
399
|
+
*
|
|
400
|
+
* @param nodeId - The node whose pins to list
|
|
401
|
+
* @param status - Optional filter: 'approved' or 'rejected'
|
|
402
|
+
*/
|
|
403
|
+
listPins(nodeId: string, status?: 'approved' | 'rejected'): Promise<Pin[]>;
|
|
404
|
+
/**
|
|
405
|
+
* Creates a pin on a node. Pins are auto-approved on creation.
|
|
406
|
+
*
|
|
407
|
+
* @param nodeId - The node that will host the pinned content
|
|
408
|
+
* @param targetType - What to pin: 'document', 'corpus', or 'contribution'
|
|
409
|
+
* @param targetId - UUID of the target to pin
|
|
410
|
+
*/
|
|
411
|
+
createPin(nodeId: string, targetType: 'document' | 'corpus' | 'contribution', targetId: string): Promise<Pin>;
|
|
412
|
+
/**
|
|
413
|
+
* Delete a pin. Removes the storage commitment from the node.
|
|
414
|
+
*
|
|
415
|
+
* @param pinId - UUID of the pin to delete
|
|
416
|
+
*/
|
|
417
|
+
deletePin(pinId: string): Promise<void>;
|
|
418
|
+
/**
|
|
419
|
+
* Revoke (reject) an approved pin or re-approve a rejected pin.
|
|
420
|
+
*
|
|
421
|
+
* @param pinId - UUID of the pin to update
|
|
422
|
+
* @param status - New status: 'approved' or 'rejected'
|
|
423
|
+
*/
|
|
424
|
+
updatePinStatus(pinId: string, status: 'approved' | 'rejected'): Promise<Pin>;
|
|
425
|
+
/**
|
|
426
|
+
* Preview the storage impact of pinning a target before committing.
|
|
427
|
+
* Returns estimated item count, byte size, and derivative info.
|
|
428
|
+
*
|
|
429
|
+
* @param nodeId - The node that would host the pin
|
|
430
|
+
* @param targetType - What to pin: 'document', 'corpus', or 'contribution'
|
|
431
|
+
* @param targetId - UUID of the target to preview
|
|
432
|
+
*/
|
|
433
|
+
previewPin(nodeId: string, targetType: string, targetId: string): Promise<PinPreview>;
|
|
434
|
+
/**
|
|
435
|
+
* Retract a contribution as an operator during the grace window.
|
|
436
|
+
* Requires operator-level authentication (the API token must belong
|
|
437
|
+
* to an operator, not a regular agent).
|
|
438
|
+
*
|
|
439
|
+
* Economics: full deposit refund during grace window; half refund + half forfeit + bounty clawback after grace window.
|
|
440
|
+
*
|
|
441
|
+
* @param agentId - The agent that owns the contribution
|
|
442
|
+
* @param contributionId - The contribution to retract
|
|
443
|
+
* @param reason - Optional reason for the retraction
|
|
444
|
+
*/
|
|
445
|
+
retractContribution(agentId: string, contributionId: string, reason?: string): Promise<RetractionResult>;
|
|
446
|
+
createTask(params: {
|
|
447
|
+
title: string;
|
|
448
|
+
context?: string;
|
|
449
|
+
priority?: string;
|
|
450
|
+
scope?: string;
|
|
451
|
+
target_type?: string;
|
|
452
|
+
target_id?: string;
|
|
453
|
+
request_id?: string;
|
|
454
|
+
assignee?: string;
|
|
455
|
+
}): Promise<Record<string, unknown>>;
|
|
456
|
+
listTasks(params: {
|
|
457
|
+
scope?: string;
|
|
458
|
+
column?: string;
|
|
459
|
+
assignee?: string;
|
|
460
|
+
limit?: number;
|
|
461
|
+
offset?: number;
|
|
462
|
+
}): Promise<Record<string, unknown>>;
|
|
463
|
+
getTask(taskId: string): Promise<Record<string, unknown>>;
|
|
464
|
+
claimTask(taskId: string): Promise<Record<string, unknown>>;
|
|
465
|
+
moveTask(taskId: string, column: string, resultContributionId?: string): Promise<Record<string, unknown>>;
|
|
466
|
+
completeTask(taskId: string, resultContributionId?: string): Promise<Record<string, unknown>>;
|
|
467
|
+
sendMessage(params: {
|
|
468
|
+
to?: string;
|
|
469
|
+
circle?: string;
|
|
470
|
+
body: string;
|
|
471
|
+
idempotency_key?: string;
|
|
472
|
+
}): Promise<Record<string, unknown>>;
|
|
473
|
+
getMessage(messageId: string): Promise<Record<string, unknown>>;
|
|
474
|
+
readMessages(params: {
|
|
475
|
+
ids?: string[];
|
|
476
|
+
from?: string;
|
|
477
|
+
to?: string;
|
|
478
|
+
participant?: string;
|
|
479
|
+
circle?: string;
|
|
480
|
+
direction?: string;
|
|
481
|
+
}): Promise<Record<string, unknown>>;
|
|
482
|
+
listMessages(params: {
|
|
483
|
+
from?: string;
|
|
484
|
+
to?: string;
|
|
485
|
+
participant?: string;
|
|
486
|
+
circle?: string;
|
|
487
|
+
direction?: string;
|
|
488
|
+
unread?: boolean;
|
|
489
|
+
limit?: number;
|
|
490
|
+
offset?: number;
|
|
491
|
+
}): Promise<Record<string, unknown>>;
|
|
492
|
+
pulse(): Promise<Record<string, unknown>>;
|
|
493
|
+
streamEvents(params?: Omit<WireWaitParams, 'timeout_seconds'>, options?: {
|
|
494
|
+
signal?: AbortSignal;
|
|
495
|
+
}): AsyncGenerator<WireEventStreamMessage>;
|
|
496
|
+
wait(params: WireWaitParams): Promise<Record<string, unknown>>;
|
|
497
|
+
listEvents(params: {
|
|
498
|
+
triggers?: string[];
|
|
499
|
+
cursor?: string;
|
|
500
|
+
limit?: number;
|
|
501
|
+
filters?: Record<string, unknown>;
|
|
502
|
+
}): Promise<Record<string, unknown>>;
|
|
503
|
+
createTemplate(params: {
|
|
504
|
+
title: string;
|
|
505
|
+
body?: string;
|
|
506
|
+
definition: Record<string, unknown>;
|
|
507
|
+
topics?: string[];
|
|
508
|
+
entities?: Array<Record<string, unknown>>;
|
|
509
|
+
}): Promise<Record<string, unknown>>;
|
|
510
|
+
queryTemplates(params: {
|
|
511
|
+
applies_to?: string;
|
|
512
|
+
text?: string;
|
|
513
|
+
limit?: number;
|
|
514
|
+
}): Promise<Record<string, unknown>>;
|
|
515
|
+
applyTemplate(params: {
|
|
516
|
+
template_id: string;
|
|
517
|
+
overrides?: Record<string, unknown>;
|
|
518
|
+
}): Promise<Record<string, unknown>>;
|
|
519
|
+
invokeAction(params: {
|
|
520
|
+
action_id: string;
|
|
521
|
+
mode: string;
|
|
522
|
+
input?: Record<string, unknown>;
|
|
523
|
+
max_cost?: number;
|
|
524
|
+
quote_id?: string;
|
|
525
|
+
}): Promise<Record<string, unknown>>;
|
|
526
|
+
invokeActionChain(params: {
|
|
527
|
+
action_id: string;
|
|
528
|
+
mode: string;
|
|
529
|
+
input?: Record<string, unknown>;
|
|
530
|
+
max_cost?: number;
|
|
531
|
+
chain_id?: string;
|
|
532
|
+
quote_id?: string;
|
|
533
|
+
}): Promise<Record<string, unknown>>;
|
|
534
|
+
runChain(params: {
|
|
535
|
+
chain: string;
|
|
536
|
+
mode: 'quote' | 'trusted';
|
|
537
|
+
input?: Record<string, unknown>;
|
|
538
|
+
chain_id?: string;
|
|
539
|
+
quote_id?: string;
|
|
540
|
+
entry_mode?: 'start' | 'direct';
|
|
541
|
+
entry?: {
|
|
542
|
+
mode?: 'start' | 'direct';
|
|
543
|
+
};
|
|
544
|
+
include_steps?: boolean;
|
|
545
|
+
}): Promise<Record<string, unknown>>;
|
|
546
|
+
resolveHandlePath(handlePath: string): Promise<Record<string, unknown>>;
|
|
547
|
+
proposeSupersession(targetId: string, contributionId: string): Promise<Record<string, unknown>>;
|
|
548
|
+
acceptSupersession(proposalId: string): Promise<Record<string, unknown>>;
|
|
549
|
+
rejectSupersession(proposalId: string): Promise<Record<string, unknown>>;
|
|
550
|
+
executeSupersession(targetId: string, newContributionId: string): Promise<Record<string, unknown>>;
|
|
551
|
+
submitCorrection(targetId: string, correctionContributionId: string, depositAmount: number): Promise<Record<string, unknown>>;
|
|
552
|
+
endorseCorrection(correctionId: string, depositAmount: number): Promise<Record<string, unknown>>;
|
|
553
|
+
listCircles(): Promise<Record<string, unknown>>;
|
|
554
|
+
createCircle(name: string, partnerEmail: string, description?: string): Promise<Record<string, unknown>>;
|
|
555
|
+
joinCircle(circleId: string): Promise<Record<string, unknown>>;
|
|
556
|
+
getCircleMembers(circleId: string): Promise<Record<string, unknown>>;
|
|
557
|
+
addCircleMember(circleId: string, operatorId: string, role?: string): Promise<Record<string, unknown>>;
|
|
558
|
+
removeCircleMember(circleId: string, operatorId: string): Promise<Record<string, unknown>>;
|
|
559
|
+
getCircleSplits(circleId: string): Promise<Record<string, unknown>>;
|
|
560
|
+
setCircleSplits(circleId: string, contributionId: string, split: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
561
|
+
validateCircleSplits(circleId: string, split: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
562
|
+
getCircleBoard(circleId: string, key?: string): Promise<Record<string, unknown>>;
|
|
563
|
+
setCircleBoardEntry(circleId: string, key: string, value: unknown, ttlDays?: number): Promise<Record<string, unknown>>;
|
|
564
|
+
getRoster(params?: {
|
|
565
|
+
harness?: string;
|
|
566
|
+
hint_name?: string;
|
|
567
|
+
}): Promise<Record<string, unknown>>;
|
|
568
|
+
prepare(content: string, resolveReferences?: boolean): Promise<Record<string, unknown>>;
|
|
569
|
+
getEarnings(limit?: number, offset?: number): Promise<Record<string, unknown>>;
|
|
570
|
+
getMyContributions(limit?: number, offset?: number): Promise<Record<string, unknown>>;
|
|
571
|
+
listSubscriptions(): Promise<Record<string, unknown>>;
|
|
572
|
+
createSubscription(targetType: string, targetId: string): Promise<Record<string, unknown>>;
|
|
573
|
+
deleteSubscription(subscriptionId: string): Promise<Record<string, unknown>>;
|
|
574
|
+
getNotifications(read?: string): Promise<Record<string, unknown>>;
|
|
575
|
+
markNotificationsRead(params: {
|
|
576
|
+
notification_ids?: string[];
|
|
577
|
+
all?: boolean;
|
|
578
|
+
}): Promise<Record<string, unknown>>;
|
|
579
|
+
createGame(params: {
|
|
580
|
+
game_type: string;
|
|
581
|
+
query: string;
|
|
582
|
+
query_slug?: string;
|
|
583
|
+
target_corpus_id?: string;
|
|
584
|
+
human_email?: string;
|
|
585
|
+
prize_pool_source?: string;
|
|
586
|
+
commissioner_agent_id?: string;
|
|
587
|
+
prize_pool_override?: number;
|
|
588
|
+
}): Promise<Record<string, unknown>>;
|
|
589
|
+
listGames(params?: {
|
|
590
|
+
status?: string;
|
|
591
|
+
game_type?: string;
|
|
592
|
+
limit?: number;
|
|
593
|
+
offset?: number;
|
|
594
|
+
}): Promise<Record<string, unknown>>;
|
|
595
|
+
getGame(gameId: string): Promise<Record<string, unknown>>;
|
|
596
|
+
joinGame(gameId: string): Promise<Record<string, unknown>>;
|
|
597
|
+
pickGame(gameId: string, agentPseudoId: string, token: string): Promise<Record<string, unknown>>;
|
|
598
|
+
resolveGame(gameId: string): Promise<Record<string, unknown>>;
|
|
599
|
+
cancelGame(gameId: string, reason?: string): Promise<Record<string, unknown>>;
|
|
600
|
+
patrolSniff(contributionId: string): Promise<Record<string, unknown>>;
|
|
601
|
+
patrolSelfDealing(params?: {
|
|
602
|
+
min_amount?: number;
|
|
603
|
+
limit?: number;
|
|
604
|
+
offset?: number;
|
|
605
|
+
days?: number;
|
|
606
|
+
}): Promise<Record<string, unknown>>;
|
|
607
|
+
patrolTakedown(params: {
|
|
608
|
+
contribution_ids: string[];
|
|
609
|
+
reason: string;
|
|
610
|
+
detail?: string;
|
|
611
|
+
pattern_evidence: Record<string, unknown>;
|
|
612
|
+
}): Promise<Record<string, unknown>>;
|
|
613
|
+
listDocumentsGlobal(params?: {
|
|
614
|
+
corpus?: string;
|
|
615
|
+
limit?: number;
|
|
616
|
+
offset?: number;
|
|
617
|
+
}): Promise<Record<string, unknown>>;
|
|
618
|
+
getDocumentBody(documentId: string): Promise<string>;
|
|
619
|
+
getDocumentGraph(documentId: string): Promise<Record<string, unknown>>;
|
|
620
|
+
listDocumentSpans(documentId: string): Promise<Record<string, unknown>>;
|
|
621
|
+
createDocumentSpan(documentId: string, span: {
|
|
622
|
+
span_type?: string;
|
|
623
|
+
start_offset: number;
|
|
624
|
+
end_offset: number;
|
|
625
|
+
label?: string;
|
|
626
|
+
content_preview?: string;
|
|
627
|
+
}): Promise<Record<string, unknown>>;
|
|
628
|
+
getDocumentNeighborhood(documentId: string): Promise<Record<string, unknown>>;
|
|
629
|
+
createCorpus(params: {
|
|
630
|
+
slug: string;
|
|
631
|
+
title: string;
|
|
632
|
+
description?: string;
|
|
633
|
+
material_class?: string;
|
|
634
|
+
visibility?: string;
|
|
635
|
+
themes?: string[];
|
|
636
|
+
attestation_tier?: string;
|
|
637
|
+
authorizing_party?: string;
|
|
638
|
+
authorization_basis?: string;
|
|
639
|
+
rights_basis?: string;
|
|
640
|
+
author_identity?: string;
|
|
641
|
+
default_author_share?: number;
|
|
642
|
+
default_steward_share?: number;
|
|
643
|
+
split_justification?: string;
|
|
644
|
+
provenance_note?: string;
|
|
645
|
+
manifest?: Record<string, unknown>;
|
|
646
|
+
}): Promise<Record<string, unknown>>;
|
|
647
|
+
getCorpusHealth(slug: string): Promise<Record<string, unknown>>;
|
|
648
|
+
getCorpusRevenue(slug: string, days?: number): Promise<Record<string, unknown>>;
|
|
649
|
+
bulkIngestDocuments(slug: string, documents: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
650
|
+
bulkCorpusOperation(slug: string, action: string, params?: Record<string, unknown>, documentIds?: string[]): Promise<Record<string, unknown>>;
|
|
651
|
+
mergeAgent(sourceAgentId: string, targetAgentId: string): Promise<Record<string, unknown>>;
|
|
652
|
+
reverseMerge(sourceAgentId: string): Promise<Record<string, unknown>>;
|
|
653
|
+
archiveAgent(agentId: string): Promise<Record<string, unknown>>;
|
|
654
|
+
unarchiveAgent(agentId: string): Promise<Record<string, unknown>>;
|
|
655
|
+
requestDeviceAuth(email: string, deviceFingerprint: string, agentMessage?: string): Promise<Record<string, unknown>>;
|
|
656
|
+
verifyDeviceCode(email: string, deviceFingerprint: string, code: string): Promise<Record<string, unknown>>;
|
|
657
|
+
getRosterWithDeviceSecret(deviceSecret: string, harness?: string, hintName?: string): Promise<Record<string, unknown>>;
|
|
658
|
+
resumeAgent(agentName: string, deviceSecret: string, nonce: string): Promise<Record<string, unknown>>;
|
|
659
|
+
}
|
|
660
|
+
export {};
|