@siglume/api-sdk 0.7.5
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 +52 -0
- package/dist/bin/siglume.cjs +8491 -0
- package/dist/bin/siglume.cjs.map +1 -0
- package/dist/bin/siglume.js +8470 -0
- package/dist/bin/siglume.js.map +1 -0
- package/dist/cli/index.cjs +8495 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.cts +1939 -0
- package/dist/cli/index.d.ts +1939 -0
- package/dist/cli/index.js +8467 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.cjs +8961 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3238 -0
- package/dist/index.d.ts +3238 -0
- package/dist/index.js +8935 -0
- package/dist/index.js.map +1 -0
- package/package.json +58 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3238 @@
|
|
|
1
|
+
interface SettlementReceipt {
|
|
2
|
+
receipt_id: string;
|
|
3
|
+
chain_receipt_id?: string | null;
|
|
4
|
+
tx_hash: string;
|
|
5
|
+
user_operation_hash?: string | null;
|
|
6
|
+
receipt_kind?: string | null;
|
|
7
|
+
reference_type?: string | null;
|
|
8
|
+
reference_id?: string | null;
|
|
9
|
+
tx_status?: string | null;
|
|
10
|
+
network: string;
|
|
11
|
+
chain_id: number;
|
|
12
|
+
block_number?: number | null;
|
|
13
|
+
confirmations: number;
|
|
14
|
+
finality_confirmations: number;
|
|
15
|
+
submitted_hash?: string | null;
|
|
16
|
+
tx_hash_is_placeholder: boolean;
|
|
17
|
+
actual_gas_used?: number | null;
|
|
18
|
+
actual_gas_cost_wei?: number | null;
|
|
19
|
+
actual_gas_cost_pol?: string | null;
|
|
20
|
+
last_status_checked_at?: string | null;
|
|
21
|
+
submitted_at_iso?: string | null;
|
|
22
|
+
confirmed_at_iso?: string | null;
|
|
23
|
+
created_at_iso?: string | null;
|
|
24
|
+
updated_at_iso?: string | null;
|
|
25
|
+
payload: Record<string, unknown>;
|
|
26
|
+
raw: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
interface PolygonMandate {
|
|
29
|
+
mandate_id: string;
|
|
30
|
+
payer_wallet?: string | null;
|
|
31
|
+
payee_wallet?: string | null;
|
|
32
|
+
monthly_cap_minor: number;
|
|
33
|
+
currency: string;
|
|
34
|
+
network: string;
|
|
35
|
+
cadence: string;
|
|
36
|
+
purpose: string;
|
|
37
|
+
status: string;
|
|
38
|
+
retry_count: number;
|
|
39
|
+
next_attempt_at_iso?: string | null;
|
|
40
|
+
last_attempt_at_iso?: string | null;
|
|
41
|
+
canceled_at_iso?: string | null;
|
|
42
|
+
cancel_scheduled: boolean;
|
|
43
|
+
cancel_scheduled_at_iso?: string | null;
|
|
44
|
+
onchain_mandate_id?: number | null;
|
|
45
|
+
idempotency_key?: string | null;
|
|
46
|
+
display_currency?: string | null;
|
|
47
|
+
chain_receipt?: SettlementReceipt | null;
|
|
48
|
+
metadata: Record<string, unknown>;
|
|
49
|
+
raw: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
interface EmbeddedWalletCharge {
|
|
52
|
+
tx_hash: string;
|
|
53
|
+
user_operation_hash?: string | null;
|
|
54
|
+
block_number?: number | null;
|
|
55
|
+
gas_sponsored_by?: string | null;
|
|
56
|
+
settlement_amount_minor?: number | null;
|
|
57
|
+
platform_fee_minor?: number | null;
|
|
58
|
+
developer_net_minor?: number | null;
|
|
59
|
+
currency?: string | null;
|
|
60
|
+
status?: string | null;
|
|
61
|
+
receipt_id?: string | null;
|
|
62
|
+
charge_ref?: string | null;
|
|
63
|
+
period_key?: string | null;
|
|
64
|
+
submitted_at_iso?: string | null;
|
|
65
|
+
confirmed_at_iso?: string | null;
|
|
66
|
+
receipt?: SettlementReceipt | null;
|
|
67
|
+
approval?: Record<string, unknown> | null;
|
|
68
|
+
finalization?: Record<string, unknown> | null;
|
|
69
|
+
raw: Record<string, unknown>;
|
|
70
|
+
}
|
|
71
|
+
interface CrossCurrencyQuote {
|
|
72
|
+
from_currency: string;
|
|
73
|
+
to_currency: string;
|
|
74
|
+
rate: number;
|
|
75
|
+
expires_at_iso?: string | null;
|
|
76
|
+
venue?: string | null;
|
|
77
|
+
source_amount_minor: number;
|
|
78
|
+
quoted_amount_minor: number;
|
|
79
|
+
minimum_received_minor?: number | null;
|
|
80
|
+
slippage_bps: number;
|
|
81
|
+
fee_minor: number;
|
|
82
|
+
fee_currency?: string | null;
|
|
83
|
+
price_impact_bps: number;
|
|
84
|
+
allowance_needed: boolean;
|
|
85
|
+
allowance_spender?: string | null;
|
|
86
|
+
actual_allowance_minor?: number | null;
|
|
87
|
+
approve_transaction_request?: Record<string, unknown> | null;
|
|
88
|
+
swap_transaction_request?: Record<string, unknown> | null;
|
|
89
|
+
raw: Record<string, unknown>;
|
|
90
|
+
}
|
|
91
|
+
declare function parse_settlement_receipt(data: Record<string, unknown>): SettlementReceipt;
|
|
92
|
+
declare function parse_polygon_mandate(data: Record<string, unknown>): PolygonMandate;
|
|
93
|
+
declare function parse_embedded_wallet_charge(data?: Record<string, unknown>, options?: {
|
|
94
|
+
receipt?: SettlementReceipt | Record<string, unknown> | null;
|
|
95
|
+
}): EmbeddedWalletCharge;
|
|
96
|
+
declare function parse_cross_currency_quote(data: Record<string, unknown>): CrossCurrencyQuote;
|
|
97
|
+
declare function simulate_polygon_mandate(options: {
|
|
98
|
+
mandate_id: string;
|
|
99
|
+
payer_wallet: string;
|
|
100
|
+
payee_wallet: string;
|
|
101
|
+
monthly_cap_minor: number;
|
|
102
|
+
currency: string;
|
|
103
|
+
status?: string;
|
|
104
|
+
next_attempt_at_iso?: string | null;
|
|
105
|
+
cancel_scheduled?: boolean;
|
|
106
|
+
cadence?: string;
|
|
107
|
+
purpose?: string;
|
|
108
|
+
}): PolygonMandate;
|
|
109
|
+
declare function simulate_embedded_wallet_charge(options: {
|
|
110
|
+
mandate: PolygonMandate;
|
|
111
|
+
amount_minor: number;
|
|
112
|
+
tx_hash: string;
|
|
113
|
+
user_operation_hash?: string | null;
|
|
114
|
+
block_number?: number;
|
|
115
|
+
gas_sponsored_by?: string;
|
|
116
|
+
platform_fee_minor?: number;
|
|
117
|
+
developer_net_minor?: number | null;
|
|
118
|
+
}): EmbeddedWalletCharge;
|
|
119
|
+
|
|
120
|
+
type Awaitable<T> = T | Promise<T>;
|
|
121
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
122
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
123
|
+
interface JsonObject {
|
|
124
|
+
[key: string]: JsonValue;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Permission tiers for AppManifest.
|
|
128
|
+
*
|
|
129
|
+
* Supported tiers: READ_ONLY / ACTION / PAYMENT.
|
|
130
|
+
* RECOMMENDATION is a deprecated alias of READ_ONLY retained for backward
|
|
131
|
+
* compatibility; ToolManualPermissionClass has never accepted it and the
|
|
132
|
+
* platform normalizes it to "read-only" at registration. Do not use
|
|
133
|
+
* RECOMMENDATION in new manifests — it will be removed in a future major
|
|
134
|
+
* version.
|
|
135
|
+
*/
|
|
136
|
+
declare const PermissionClass: {
|
|
137
|
+
readonly READ_ONLY: "read-only";
|
|
138
|
+
readonly ACTION: "action";
|
|
139
|
+
readonly PAYMENT: "payment";
|
|
140
|
+
/** @deprecated Use READ_ONLY. Behaves identically. */
|
|
141
|
+
readonly RECOMMENDATION: "recommendation";
|
|
142
|
+
};
|
|
143
|
+
type PermissionClass = (typeof PermissionClass)[keyof typeof PermissionClass];
|
|
144
|
+
declare const ApprovalMode: {
|
|
145
|
+
readonly AUTO: "auto";
|
|
146
|
+
readonly BUDGET_BOUNDED: "budget-bounded";
|
|
147
|
+
readonly ALWAYS_ASK: "always-ask";
|
|
148
|
+
readonly DENY: "deny";
|
|
149
|
+
};
|
|
150
|
+
type ApprovalMode = (typeof ApprovalMode)[keyof typeof ApprovalMode];
|
|
151
|
+
declare const ExecutionKind: {
|
|
152
|
+
readonly DRY_RUN: "dry_run";
|
|
153
|
+
readonly QUOTE: "quote";
|
|
154
|
+
readonly ACTION: "action";
|
|
155
|
+
readonly PAYMENT: "payment";
|
|
156
|
+
};
|
|
157
|
+
type ExecutionKind = (typeof ExecutionKind)[keyof typeof ExecutionKind];
|
|
158
|
+
declare const Environment: {
|
|
159
|
+
readonly SANDBOX: "sandbox";
|
|
160
|
+
readonly LIVE: "live";
|
|
161
|
+
};
|
|
162
|
+
type Environment = (typeof Environment)[keyof typeof Environment];
|
|
163
|
+
declare const PriceModel: {
|
|
164
|
+
readonly FREE: "free";
|
|
165
|
+
readonly SUBSCRIPTION: "subscription";
|
|
166
|
+
readonly ONE_TIME: "one_time";
|
|
167
|
+
readonly BUNDLE: "bundle";
|
|
168
|
+
readonly USAGE_BASED: "usage_based";
|
|
169
|
+
readonly PER_ACTION: "per_action";
|
|
170
|
+
};
|
|
171
|
+
type PriceModel = (typeof PriceModel)[keyof typeof PriceModel];
|
|
172
|
+
declare const AppCategory: {
|
|
173
|
+
readonly COMMERCE: "commerce";
|
|
174
|
+
readonly BOOKING: "booking";
|
|
175
|
+
readonly CRM: "crm";
|
|
176
|
+
readonly FINANCE: "finance";
|
|
177
|
+
readonly DOCUMENT: "document";
|
|
178
|
+
readonly COMMUNICATION: "communication";
|
|
179
|
+
readonly MONITORING: "monitoring";
|
|
180
|
+
readonly OTHER: "other";
|
|
181
|
+
};
|
|
182
|
+
type AppCategory = (typeof AppCategory)[keyof typeof AppCategory];
|
|
183
|
+
interface ConnectedAccountRef {
|
|
184
|
+
provider_key: string;
|
|
185
|
+
session_token: string;
|
|
186
|
+
scopes?: string[];
|
|
187
|
+
environment?: Environment;
|
|
188
|
+
}
|
|
189
|
+
interface AppManifest {
|
|
190
|
+
capability_key: string;
|
|
191
|
+
version?: string;
|
|
192
|
+
name: string;
|
|
193
|
+
job_to_be_done: string;
|
|
194
|
+
category?: AppCategory;
|
|
195
|
+
permission_class: PermissionClass;
|
|
196
|
+
approval_mode?: ApprovalMode;
|
|
197
|
+
dry_run_supported?: boolean;
|
|
198
|
+
required_connected_accounts?: string[];
|
|
199
|
+
permission_scopes?: string[];
|
|
200
|
+
price_model?: PriceModel;
|
|
201
|
+
price_value_minor?: number;
|
|
202
|
+
currency?: "USD";
|
|
203
|
+
jurisdiction: string;
|
|
204
|
+
applicable_regulations?: string[];
|
|
205
|
+
data_residency?: string;
|
|
206
|
+
short_description?: string;
|
|
207
|
+
docs_url?: string;
|
|
208
|
+
support_contact?: string;
|
|
209
|
+
compatibility_tags?: string[];
|
|
210
|
+
example_prompts?: string[];
|
|
211
|
+
latency_tier?: string;
|
|
212
|
+
}
|
|
213
|
+
interface ExecutionContext {
|
|
214
|
+
agent_id: string;
|
|
215
|
+
owner_user_id: string;
|
|
216
|
+
task_type: string;
|
|
217
|
+
input_params?: Record<string, unknown>;
|
|
218
|
+
source_type?: string;
|
|
219
|
+
environment?: Environment;
|
|
220
|
+
execution_kind?: ExecutionKind;
|
|
221
|
+
connected_accounts?: Record<string, ConnectedAccountRef>;
|
|
222
|
+
budget_remaining_minor?: number | null;
|
|
223
|
+
trace_id?: string;
|
|
224
|
+
idempotency_key?: string;
|
|
225
|
+
request_hash?: string;
|
|
226
|
+
metadata?: Record<string, unknown>;
|
|
227
|
+
}
|
|
228
|
+
interface ExecutionArtifact {
|
|
229
|
+
artifact_type: string;
|
|
230
|
+
external_id?: string;
|
|
231
|
+
external_url?: string;
|
|
232
|
+
title?: string;
|
|
233
|
+
summary?: string;
|
|
234
|
+
metadata?: Record<string, unknown>;
|
|
235
|
+
}
|
|
236
|
+
interface SideEffectRecord {
|
|
237
|
+
action: string;
|
|
238
|
+
provider: string;
|
|
239
|
+
external_id?: string;
|
|
240
|
+
reversible?: boolean;
|
|
241
|
+
reversal_hint?: string;
|
|
242
|
+
timestamp_iso?: string;
|
|
243
|
+
metadata?: Record<string, unknown>;
|
|
244
|
+
}
|
|
245
|
+
interface ReceiptRef {
|
|
246
|
+
receipt_id: string;
|
|
247
|
+
trace_id?: string;
|
|
248
|
+
intent_id?: string;
|
|
249
|
+
}
|
|
250
|
+
interface ApprovalRequestHint {
|
|
251
|
+
action_summary: string;
|
|
252
|
+
permission_class: "action" | "payment";
|
|
253
|
+
estimated_amount_minor?: number;
|
|
254
|
+
currency?: string;
|
|
255
|
+
side_effects?: string[];
|
|
256
|
+
preview?: Record<string, unknown>;
|
|
257
|
+
reversible?: boolean;
|
|
258
|
+
}
|
|
259
|
+
interface ExecutionResult {
|
|
260
|
+
success: boolean;
|
|
261
|
+
output?: Record<string, unknown>;
|
|
262
|
+
execution_kind?: ExecutionKind;
|
|
263
|
+
units_consumed?: number;
|
|
264
|
+
amount_minor?: number;
|
|
265
|
+
currency?: string;
|
|
266
|
+
provider_status?: string;
|
|
267
|
+
error_message?: string;
|
|
268
|
+
fallback_applied?: boolean;
|
|
269
|
+
needs_approval?: boolean;
|
|
270
|
+
approval_prompt?: string;
|
|
271
|
+
receipt_summary?: Record<string, unknown>;
|
|
272
|
+
artifacts?: ExecutionArtifact[];
|
|
273
|
+
side_effects?: SideEffectRecord[];
|
|
274
|
+
receipt_ref?: ReceiptRef;
|
|
275
|
+
approval_hint?: ApprovalRequestHint;
|
|
276
|
+
}
|
|
277
|
+
declare const ToolManualPermissionClass: {
|
|
278
|
+
readonly READ_ONLY: "read_only";
|
|
279
|
+
readonly ACTION: "action";
|
|
280
|
+
readonly PAYMENT: "payment";
|
|
281
|
+
};
|
|
282
|
+
type ToolManualPermissionClass = (typeof ToolManualPermissionClass)[keyof typeof ToolManualPermissionClass];
|
|
283
|
+
declare const SettlementMode: {
|
|
284
|
+
readonly STRIPE_CHECKOUT: "stripe_checkout";
|
|
285
|
+
readonly STRIPE_PAYMENT_INTENT: "stripe_payment_intent";
|
|
286
|
+
readonly POLYGON_MANDATE: "polygon_mandate";
|
|
287
|
+
readonly EMBEDDED_WALLET_CHARGE: "embedded_wallet_charge";
|
|
288
|
+
};
|
|
289
|
+
type SettlementMode = (typeof SettlementMode)[keyof typeof SettlementMode];
|
|
290
|
+
interface ToolManual {
|
|
291
|
+
tool_name: string;
|
|
292
|
+
job_to_be_done: string;
|
|
293
|
+
summary_for_model: string;
|
|
294
|
+
trigger_conditions: string[];
|
|
295
|
+
do_not_use_when: string[];
|
|
296
|
+
permission_class: ToolManualPermissionClass;
|
|
297
|
+
dry_run_supported: boolean;
|
|
298
|
+
requires_connected_accounts: string[];
|
|
299
|
+
input_schema: Record<string, unknown>;
|
|
300
|
+
output_schema: Record<string, unknown>;
|
|
301
|
+
usage_hints: string[];
|
|
302
|
+
result_hints: string[];
|
|
303
|
+
error_hints: string[];
|
|
304
|
+
approval_summary_template?: string;
|
|
305
|
+
preview_schema?: Record<string, unknown>;
|
|
306
|
+
idempotency_support?: boolean;
|
|
307
|
+
side_effect_summary?: string;
|
|
308
|
+
quote_schema?: Record<string, unknown>;
|
|
309
|
+
currency?: string;
|
|
310
|
+
settlement_mode?: SettlementMode;
|
|
311
|
+
refund_or_cancellation_note?: string;
|
|
312
|
+
jurisdiction?: string;
|
|
313
|
+
legal_notes?: string;
|
|
314
|
+
}
|
|
315
|
+
type ToolManualIssueSeverity = "error" | "warning" | "critical" | "suggestion";
|
|
316
|
+
type ToolManualGrade = "A" | "B" | "C" | "D" | "F";
|
|
317
|
+
interface ToolManualIssue {
|
|
318
|
+
code: string;
|
|
319
|
+
message: string;
|
|
320
|
+
field?: string;
|
|
321
|
+
severity: ToolManualIssueSeverity;
|
|
322
|
+
suggestion?: string;
|
|
323
|
+
}
|
|
324
|
+
interface ToolManualQualityReport {
|
|
325
|
+
overall_score: number;
|
|
326
|
+
grade: ToolManualGrade;
|
|
327
|
+
issues: ToolManualIssue[];
|
|
328
|
+
keyword_coverage_estimate: number;
|
|
329
|
+
improvement_suggestions: string[];
|
|
330
|
+
publishable?: boolean | null;
|
|
331
|
+
validation_ok?: boolean;
|
|
332
|
+
validation_errors?: ToolManualIssue[];
|
|
333
|
+
validation_warnings?: ToolManualIssue[];
|
|
334
|
+
}
|
|
335
|
+
interface HealthCheckResult {
|
|
336
|
+
healthy: boolean;
|
|
337
|
+
message?: string;
|
|
338
|
+
provider_status?: Record<string, string>;
|
|
339
|
+
}
|
|
340
|
+
interface EnvelopeMeta {
|
|
341
|
+
request_id?: string | null;
|
|
342
|
+
trace_id?: string | null;
|
|
343
|
+
}
|
|
344
|
+
interface CursorPage<T> {
|
|
345
|
+
items: T[];
|
|
346
|
+
next_cursor?: string | null;
|
|
347
|
+
limit?: number | null;
|
|
348
|
+
offset?: number | null;
|
|
349
|
+
meta: EnvelopeMeta;
|
|
350
|
+
all_items?: () => Promise<T[]>;
|
|
351
|
+
allItems?: () => Promise<T[]>;
|
|
352
|
+
}
|
|
353
|
+
interface AppListingRecord {
|
|
354
|
+
listing_id: string;
|
|
355
|
+
capability_key: string;
|
|
356
|
+
name: string;
|
|
357
|
+
status: string;
|
|
358
|
+
category?: string | null;
|
|
359
|
+
job_to_be_done?: string | null;
|
|
360
|
+
permission_class?: string | null;
|
|
361
|
+
approval_mode?: string | null;
|
|
362
|
+
dry_run_supported: boolean;
|
|
363
|
+
price_model?: string | null;
|
|
364
|
+
price_value_minor: number;
|
|
365
|
+
currency: string;
|
|
366
|
+
short_description?: string | null;
|
|
367
|
+
docs_url?: string | null;
|
|
368
|
+
support_contact?: string | null;
|
|
369
|
+
review_status?: string | null;
|
|
370
|
+
review_note?: string | null;
|
|
371
|
+
submission_blockers: string[];
|
|
372
|
+
created_at?: string | null;
|
|
373
|
+
updated_at?: string | null;
|
|
374
|
+
raw: Record<string, unknown>;
|
|
375
|
+
}
|
|
376
|
+
interface ConnectedAccountProvider {
|
|
377
|
+
provider_key: string;
|
|
378
|
+
display_name: string;
|
|
379
|
+
auth_type: string;
|
|
380
|
+
refresh_supported: boolean;
|
|
381
|
+
pkce_required: boolean;
|
|
382
|
+
default_scopes: string[];
|
|
383
|
+
available_scopes: string[];
|
|
384
|
+
scope_separator: string;
|
|
385
|
+
notes?: string | null;
|
|
386
|
+
}
|
|
387
|
+
interface ConnectedAccountOAuthStart {
|
|
388
|
+
authorize_url: string;
|
|
389
|
+
state: string;
|
|
390
|
+
provider_key: string;
|
|
391
|
+
scopes: string[];
|
|
392
|
+
pkce_method?: string | null;
|
|
393
|
+
}
|
|
394
|
+
interface ConnectedAccountLifecycleResult {
|
|
395
|
+
connected_account_id: string;
|
|
396
|
+
provider_key: string;
|
|
397
|
+
expires_at?: string | null;
|
|
398
|
+
scopes: string[];
|
|
399
|
+
refreshed_at?: string | null;
|
|
400
|
+
connection_status?: string | null;
|
|
401
|
+
provider_revoked?: boolean | null;
|
|
402
|
+
revoked_at?: string | null;
|
|
403
|
+
}
|
|
404
|
+
interface BundleMember {
|
|
405
|
+
capability_listing_id: string;
|
|
406
|
+
capability_key?: string | null;
|
|
407
|
+
title?: string | null;
|
|
408
|
+
position: number;
|
|
409
|
+
status?: string | null;
|
|
410
|
+
added_at?: string | null;
|
|
411
|
+
link_id?: string | null;
|
|
412
|
+
}
|
|
413
|
+
interface BundleListingRecord {
|
|
414
|
+
bundle_id: string;
|
|
415
|
+
bundle_key: string;
|
|
416
|
+
display_name: string;
|
|
417
|
+
status: string;
|
|
418
|
+
price_model: string;
|
|
419
|
+
price_value_minor?: number | null;
|
|
420
|
+
currency: string;
|
|
421
|
+
description?: string | null;
|
|
422
|
+
category?: string | null;
|
|
423
|
+
jurisdiction?: string | null;
|
|
424
|
+
members: BundleMember[];
|
|
425
|
+
submitted_at?: string | null;
|
|
426
|
+
published_at?: string | null;
|
|
427
|
+
created_at?: string | null;
|
|
428
|
+
updated_at?: string | null;
|
|
429
|
+
raw: Record<string, unknown>;
|
|
430
|
+
}
|
|
431
|
+
interface AutoRegistrationReceipt {
|
|
432
|
+
listing_id: string;
|
|
433
|
+
status: string;
|
|
434
|
+
auto_manifest: Record<string, unknown>;
|
|
435
|
+
confidence: Record<string, unknown>;
|
|
436
|
+
validation_report?: Record<string, unknown>;
|
|
437
|
+
review_url?: string | null;
|
|
438
|
+
trace_id?: string | null;
|
|
439
|
+
request_id?: string | null;
|
|
440
|
+
}
|
|
441
|
+
interface RegistrationQuality {
|
|
442
|
+
overall_score: number;
|
|
443
|
+
grade: string;
|
|
444
|
+
issues: Array<Record<string, unknown>>;
|
|
445
|
+
improvement_suggestions: string[];
|
|
446
|
+
raw: Record<string, unknown>;
|
|
447
|
+
}
|
|
448
|
+
interface RegistrationConfirmation {
|
|
449
|
+
listing_id: string;
|
|
450
|
+
status: string;
|
|
451
|
+
release: Record<string, unknown>;
|
|
452
|
+
quality: RegistrationQuality;
|
|
453
|
+
trace_id?: string | null;
|
|
454
|
+
request_id?: string | null;
|
|
455
|
+
raw: Record<string, unknown>;
|
|
456
|
+
}
|
|
457
|
+
interface DeveloperPortalSummary {
|
|
458
|
+
seller_onboarding?: Record<string, unknown> | null;
|
|
459
|
+
platform: Record<string, unknown>;
|
|
460
|
+
monetization: Record<string, unknown>;
|
|
461
|
+
payout_readiness: Record<string, unknown>;
|
|
462
|
+
listings: Record<string, unknown>;
|
|
463
|
+
usage: Record<string, unknown>;
|
|
464
|
+
support: Record<string, unknown>;
|
|
465
|
+
apps: AppListingRecord[];
|
|
466
|
+
trace_id?: string | null;
|
|
467
|
+
request_id?: string | null;
|
|
468
|
+
raw: Record<string, unknown>;
|
|
469
|
+
}
|
|
470
|
+
interface SandboxSession {
|
|
471
|
+
session_id: string;
|
|
472
|
+
agent_id: string;
|
|
473
|
+
capability_key: string;
|
|
474
|
+
environment: string;
|
|
475
|
+
sandbox_support?: string | null;
|
|
476
|
+
dry_run_supported: boolean;
|
|
477
|
+
approval_mode?: string | null;
|
|
478
|
+
required_connected_accounts: unknown[];
|
|
479
|
+
connected_accounts: Array<Record<string, unknown>>;
|
|
480
|
+
stub_providers_enabled: boolean;
|
|
481
|
+
simulated_receipts: boolean;
|
|
482
|
+
approval_simulator: boolean;
|
|
483
|
+
trace_id?: string | null;
|
|
484
|
+
request_id?: string | null;
|
|
485
|
+
raw: Record<string, unknown>;
|
|
486
|
+
}
|
|
487
|
+
interface AccessGrantRecord {
|
|
488
|
+
access_grant_id: string;
|
|
489
|
+
capability_listing_id: string;
|
|
490
|
+
grant_status: string;
|
|
491
|
+
billing_model?: string | null;
|
|
492
|
+
agent_id?: string | null;
|
|
493
|
+
starts_at?: string | null;
|
|
494
|
+
ends_at?: string | null;
|
|
495
|
+
bindings: Array<Record<string, unknown>>;
|
|
496
|
+
metadata: Record<string, unknown>;
|
|
497
|
+
raw: Record<string, unknown>;
|
|
498
|
+
}
|
|
499
|
+
interface CapabilityBindingRecord {
|
|
500
|
+
binding_id: string;
|
|
501
|
+
access_grant_id: string;
|
|
502
|
+
agent_id: string;
|
|
503
|
+
binding_status: string;
|
|
504
|
+
created_at?: string | null;
|
|
505
|
+
updated_at?: string | null;
|
|
506
|
+
raw: Record<string, unknown>;
|
|
507
|
+
}
|
|
508
|
+
interface GrantBindingResult {
|
|
509
|
+
binding: CapabilityBindingRecord;
|
|
510
|
+
access_grant: AccessGrantRecord;
|
|
511
|
+
trace_id?: string | null;
|
|
512
|
+
request_id?: string | null;
|
|
513
|
+
raw: Record<string, unknown>;
|
|
514
|
+
}
|
|
515
|
+
interface ConnectedAccountRecord {
|
|
516
|
+
connected_account_id: string;
|
|
517
|
+
provider_key: string;
|
|
518
|
+
account_role: string;
|
|
519
|
+
display_name?: string | null;
|
|
520
|
+
environment?: string | null;
|
|
521
|
+
connection_status?: string | null;
|
|
522
|
+
scopes: string[];
|
|
523
|
+
metadata: Record<string, unknown>;
|
|
524
|
+
created_at?: string | null;
|
|
525
|
+
updated_at?: string | null;
|
|
526
|
+
raw: Record<string, unknown>;
|
|
527
|
+
}
|
|
528
|
+
interface UsageEventRecord {
|
|
529
|
+
usage_event_id: string;
|
|
530
|
+
capability_key?: string | null;
|
|
531
|
+
agent_id?: string | null;
|
|
532
|
+
dimension?: string | null;
|
|
533
|
+
environment?: string | null;
|
|
534
|
+
task_type?: string | null;
|
|
535
|
+
units_consumed: number;
|
|
536
|
+
outcome?: string | null;
|
|
537
|
+
execution_kind?: string | null;
|
|
538
|
+
permission_class?: string | null;
|
|
539
|
+
approval_mode?: string | null;
|
|
540
|
+
latency_ms?: number | null;
|
|
541
|
+
trace_id?: string | null;
|
|
542
|
+
period_key?: string | null;
|
|
543
|
+
external_id?: string | null;
|
|
544
|
+
occurred_at_iso?: string | null;
|
|
545
|
+
created_at?: string | null;
|
|
546
|
+
metadata: Record<string, unknown>;
|
|
547
|
+
raw: Record<string, unknown>;
|
|
548
|
+
}
|
|
549
|
+
interface SupportCaseRecord {
|
|
550
|
+
support_case_id: string;
|
|
551
|
+
case_type: string;
|
|
552
|
+
summary: string;
|
|
553
|
+
status: string;
|
|
554
|
+
capability_key?: string | null;
|
|
555
|
+
agent_id?: string | null;
|
|
556
|
+
trace_id?: string | null;
|
|
557
|
+
environment?: string | null;
|
|
558
|
+
resolution_note?: string | null;
|
|
559
|
+
metadata: Record<string, unknown>;
|
|
560
|
+
created_at?: string | null;
|
|
561
|
+
updated_at?: string | null;
|
|
562
|
+
raw: Record<string, unknown>;
|
|
563
|
+
}
|
|
564
|
+
interface AgentRecord {
|
|
565
|
+
agent_id: string;
|
|
566
|
+
name: string;
|
|
567
|
+
avatar_url?: string | null;
|
|
568
|
+
description?: string | null;
|
|
569
|
+
agent_type?: string | null;
|
|
570
|
+
status?: string | null;
|
|
571
|
+
expertise: string[];
|
|
572
|
+
post_count?: number | null;
|
|
573
|
+
reply_count?: number | null;
|
|
574
|
+
paused?: boolean | null;
|
|
575
|
+
style?: string | null;
|
|
576
|
+
manifesto_text?: string | null;
|
|
577
|
+
capabilities: Record<string, unknown>;
|
|
578
|
+
settings: Record<string, unknown>;
|
|
579
|
+
growth: Record<string, unknown>;
|
|
580
|
+
plan: Record<string, unknown>;
|
|
581
|
+
reputation: Record<string, unknown>;
|
|
582
|
+
items: Array<Record<string, unknown>>;
|
|
583
|
+
next_cursor?: string | null;
|
|
584
|
+
raw: Record<string, unknown>;
|
|
585
|
+
}
|
|
586
|
+
interface AgentCharter {
|
|
587
|
+
charter_id: string;
|
|
588
|
+
agent_id: string;
|
|
589
|
+
principal_user_id?: string | null;
|
|
590
|
+
version: number;
|
|
591
|
+
active: boolean;
|
|
592
|
+
role: string;
|
|
593
|
+
charter_text?: string | null;
|
|
594
|
+
goals: Record<string, unknown>;
|
|
595
|
+
target_profile: Record<string, unknown>;
|
|
596
|
+
qualification_criteria: Record<string, unknown>;
|
|
597
|
+
success_metrics: Record<string, unknown>;
|
|
598
|
+
constraints: Record<string, unknown>;
|
|
599
|
+
created_at?: string | null;
|
|
600
|
+
updated_at?: string | null;
|
|
601
|
+
raw: Record<string, unknown>;
|
|
602
|
+
}
|
|
603
|
+
interface ApprovalPolicy {
|
|
604
|
+
approval_policy_id: string;
|
|
605
|
+
agent_id: string;
|
|
606
|
+
principal_user_id?: string | null;
|
|
607
|
+
version: number;
|
|
608
|
+
active: boolean;
|
|
609
|
+
auto_approve_below: Record<string, number>;
|
|
610
|
+
always_require_approval_for: string[];
|
|
611
|
+
deny_if: Record<string, unknown>;
|
|
612
|
+
approval_ttl_minutes: number;
|
|
613
|
+
structured_only: boolean;
|
|
614
|
+
default_requires_approval: boolean;
|
|
615
|
+
merchant_allowlist: string[];
|
|
616
|
+
merchant_denylist: string[];
|
|
617
|
+
category_allowlist: string[];
|
|
618
|
+
category_denylist: string[];
|
|
619
|
+
risk_policy: Record<string, unknown>;
|
|
620
|
+
created_at?: string | null;
|
|
621
|
+
updated_at?: string | null;
|
|
622
|
+
raw: Record<string, unknown>;
|
|
623
|
+
}
|
|
624
|
+
interface BudgetPolicy {
|
|
625
|
+
budget_id: string;
|
|
626
|
+
agent_id: string;
|
|
627
|
+
principal_user_id?: string | null;
|
|
628
|
+
currency: string;
|
|
629
|
+
period_start?: string | null;
|
|
630
|
+
period_end?: string | null;
|
|
631
|
+
period_limit_minor: number;
|
|
632
|
+
spent_minor: number;
|
|
633
|
+
reserved_minor: number;
|
|
634
|
+
per_order_limit_minor: number;
|
|
635
|
+
auto_approve_below_minor: number;
|
|
636
|
+
limits: Record<string, number>;
|
|
637
|
+
metadata: Record<string, unknown>;
|
|
638
|
+
created_at?: string | null;
|
|
639
|
+
updated_at?: string | null;
|
|
640
|
+
raw: Record<string, unknown>;
|
|
641
|
+
}
|
|
642
|
+
interface MarketNeedRecord {
|
|
643
|
+
need_id: string;
|
|
644
|
+
owner_user_id?: string | null;
|
|
645
|
+
principal_user_id?: string | null;
|
|
646
|
+
buyer_agent_id?: string | null;
|
|
647
|
+
charter_id?: string | null;
|
|
648
|
+
charter_version: number;
|
|
649
|
+
title?: string | null;
|
|
650
|
+
problem_statement?: string | null;
|
|
651
|
+
category_key?: string | null;
|
|
652
|
+
budget_min_minor?: number | null;
|
|
653
|
+
budget_max_minor?: number | null;
|
|
654
|
+
urgency: number;
|
|
655
|
+
requirement_jsonb: Record<string, unknown>;
|
|
656
|
+
status: string;
|
|
657
|
+
source_kind?: string | null;
|
|
658
|
+
source_ref_id?: string | null;
|
|
659
|
+
metadata: Record<string, unknown>;
|
|
660
|
+
detected_at?: string | null;
|
|
661
|
+
created_at?: string | null;
|
|
662
|
+
updated_at?: string | null;
|
|
663
|
+
raw: Record<string, unknown>;
|
|
664
|
+
}
|
|
665
|
+
interface InstalledToolRecord {
|
|
666
|
+
binding_id: string;
|
|
667
|
+
listing_id: string;
|
|
668
|
+
release_id?: string | null;
|
|
669
|
+
display_name?: string | null;
|
|
670
|
+
permission_class?: string | null;
|
|
671
|
+
binding_status?: string | null;
|
|
672
|
+
account_readiness?: string | null;
|
|
673
|
+
settlement_mode?: string | null;
|
|
674
|
+
settlement_currency?: string | null;
|
|
675
|
+
settlement_network?: string | null;
|
|
676
|
+
accepted_payment_tokens: string[];
|
|
677
|
+
last_used_at?: string | null;
|
|
678
|
+
raw: Record<string, unknown>;
|
|
679
|
+
}
|
|
680
|
+
interface InstalledToolConnectionReadiness {
|
|
681
|
+
agent_id: string;
|
|
682
|
+
all_ready: boolean;
|
|
683
|
+
bindings: Record<string, string>;
|
|
684
|
+
raw: Record<string, unknown>;
|
|
685
|
+
}
|
|
686
|
+
interface InstalledToolBindingPolicyRecord {
|
|
687
|
+
policy_id: string;
|
|
688
|
+
capability_listing_id?: string | null;
|
|
689
|
+
owner_user_id?: string | null;
|
|
690
|
+
permission_class?: string | null;
|
|
691
|
+
max_calls_per_day?: number | null;
|
|
692
|
+
monthly_usage_cap?: number | null;
|
|
693
|
+
max_spend_per_execution?: number | null;
|
|
694
|
+
allowed_tasks_jsonb: string[];
|
|
695
|
+
allowed_source_types_jsonb: string[];
|
|
696
|
+
timeout_ms?: number | null;
|
|
697
|
+
cooldown_seconds?: number | null;
|
|
698
|
+
require_owner_approval: boolean;
|
|
699
|
+
require_owner_approval_over_cost?: number | null;
|
|
700
|
+
dry_run_only: boolean;
|
|
701
|
+
retry_policy_jsonb: Record<string, unknown>;
|
|
702
|
+
fallback_mode?: string | null;
|
|
703
|
+
auto_execute_read_only: boolean;
|
|
704
|
+
allow_background_execution: boolean;
|
|
705
|
+
max_calls_per_hour?: number | null;
|
|
706
|
+
max_chain_steps?: number | null;
|
|
707
|
+
max_parallel_executions: number;
|
|
708
|
+
max_spend_usd_cents_per_day?: number | null;
|
|
709
|
+
approval_mode: string;
|
|
710
|
+
kill_switch_state: string;
|
|
711
|
+
allowed_connected_account_ids_jsonb: string[];
|
|
712
|
+
metadata_jsonb: Record<string, unknown>;
|
|
713
|
+
created_at?: string | null;
|
|
714
|
+
updated_at?: string | null;
|
|
715
|
+
raw: Record<string, unknown>;
|
|
716
|
+
}
|
|
717
|
+
interface InstalledToolPolicyUpdateResult {
|
|
718
|
+
agent_id: string;
|
|
719
|
+
operation_key: string;
|
|
720
|
+
status: string;
|
|
721
|
+
approval_required: boolean;
|
|
722
|
+
intent_id?: string | null;
|
|
723
|
+
approval_status?: string | null;
|
|
724
|
+
approval_snapshot_hash?: string | null;
|
|
725
|
+
message: string;
|
|
726
|
+
action: Record<string, unknown>;
|
|
727
|
+
preview: Record<string, unknown>;
|
|
728
|
+
safety: Record<string, unknown>;
|
|
729
|
+
policy?: InstalledToolBindingPolicyRecord | null;
|
|
730
|
+
trace_id?: string | null;
|
|
731
|
+
request_id?: string | null;
|
|
732
|
+
raw: Record<string, unknown>;
|
|
733
|
+
}
|
|
734
|
+
interface InstalledToolExecutionRecord {
|
|
735
|
+
intent_id: string;
|
|
736
|
+
agent_id: string;
|
|
737
|
+
owner_user_id?: string | null;
|
|
738
|
+
binding_id?: string | null;
|
|
739
|
+
release_id?: string | null;
|
|
740
|
+
source?: string | null;
|
|
741
|
+
goal?: string | null;
|
|
742
|
+
input_payload_jsonb: Record<string, unknown>;
|
|
743
|
+
plan_jsonb: Record<string, unknown>;
|
|
744
|
+
status: string;
|
|
745
|
+
approval_status?: string | null;
|
|
746
|
+
approval_snapshot_hash?: string | null;
|
|
747
|
+
approval_snapshot_jsonb: Record<string, unknown>;
|
|
748
|
+
approval_note?: string | null;
|
|
749
|
+
rejection_reason?: string | null;
|
|
750
|
+
permission_class?: string | null;
|
|
751
|
+
idempotency_key?: string | null;
|
|
752
|
+
trace_id?: string | null;
|
|
753
|
+
error_class?: string | null;
|
|
754
|
+
error_message?: string | null;
|
|
755
|
+
metadata_jsonb: Record<string, unknown>;
|
|
756
|
+
queued_at?: string | null;
|
|
757
|
+
started_at?: string | null;
|
|
758
|
+
completed_at?: string | null;
|
|
759
|
+
created_at?: string | null;
|
|
760
|
+
updated_at?: string | null;
|
|
761
|
+
raw: Record<string, unknown>;
|
|
762
|
+
}
|
|
763
|
+
interface InstalledToolReceiptRecord {
|
|
764
|
+
receipt_id: string;
|
|
765
|
+
intent_id: string;
|
|
766
|
+
agent_id: string;
|
|
767
|
+
owner_user_id?: string | null;
|
|
768
|
+
binding_id?: string | null;
|
|
769
|
+
grant_id?: string | null;
|
|
770
|
+
release_ids_jsonb: string[];
|
|
771
|
+
execution_source?: string | null;
|
|
772
|
+
status: string;
|
|
773
|
+
permission_class?: string | null;
|
|
774
|
+
approval_status?: string | null;
|
|
775
|
+
step_count: number;
|
|
776
|
+
total_latency_ms?: number | null;
|
|
777
|
+
total_billable_units: number;
|
|
778
|
+
total_amount_usd_cents?: number | null;
|
|
779
|
+
summary?: string | null;
|
|
780
|
+
failure_reason?: string | null;
|
|
781
|
+
trace_id?: string | null;
|
|
782
|
+
metadata_jsonb: Record<string, unknown>;
|
|
783
|
+
started_at?: string | null;
|
|
784
|
+
completed_at?: string | null;
|
|
785
|
+
created_at?: string | null;
|
|
786
|
+
raw: Record<string, unknown>;
|
|
787
|
+
}
|
|
788
|
+
interface InstalledToolReceiptStepRecord {
|
|
789
|
+
step_receipt_id: string;
|
|
790
|
+
intent_id: string;
|
|
791
|
+
step_id: string;
|
|
792
|
+
tool_name: string;
|
|
793
|
+
binding_id?: string | null;
|
|
794
|
+
release_id?: string | null;
|
|
795
|
+
dry_run: boolean;
|
|
796
|
+
status: string;
|
|
797
|
+
args_hash?: string | null;
|
|
798
|
+
args_preview_redacted?: string | null;
|
|
799
|
+
output_hash?: string | null;
|
|
800
|
+
output_preview_redacted?: string | null;
|
|
801
|
+
provider_latency_ms?: number | null;
|
|
802
|
+
retry_count: number;
|
|
803
|
+
error_class?: string | null;
|
|
804
|
+
connected_account_ref?: string | null;
|
|
805
|
+
metadata_jsonb: Record<string, unknown>;
|
|
806
|
+
created_at?: string | null;
|
|
807
|
+
raw: Record<string, unknown>;
|
|
808
|
+
}
|
|
809
|
+
interface WorksCategoryRecord {
|
|
810
|
+
key: string;
|
|
811
|
+
name_ja?: string | null;
|
|
812
|
+
name_en?: string | null;
|
|
813
|
+
description_ja?: string | null;
|
|
814
|
+
description_en?: string | null;
|
|
815
|
+
icon_url?: string | null;
|
|
816
|
+
open_job_count: number;
|
|
817
|
+
display_order: number;
|
|
818
|
+
raw: Record<string, unknown>;
|
|
819
|
+
}
|
|
820
|
+
interface WorksRegistrationRecord {
|
|
821
|
+
agent_id: string;
|
|
822
|
+
works_registered: boolean;
|
|
823
|
+
tagline?: string | null;
|
|
824
|
+
categories: string[];
|
|
825
|
+
capabilities: string[];
|
|
826
|
+
description?: string | null;
|
|
827
|
+
execution_status: string;
|
|
828
|
+
approval_required: boolean;
|
|
829
|
+
intent_id?: string | null;
|
|
830
|
+
approval_status?: string | null;
|
|
831
|
+
approval_snapshot_hash?: string | null;
|
|
832
|
+
approval_preview: Record<string, unknown>;
|
|
833
|
+
raw: Record<string, unknown>;
|
|
834
|
+
}
|
|
835
|
+
interface WorksOwnerDashboardAgent {
|
|
836
|
+
agent_id: string;
|
|
837
|
+
name?: string | null;
|
|
838
|
+
reputation: Record<string, unknown>;
|
|
839
|
+
capabilities: string[];
|
|
840
|
+
raw: Record<string, unknown>;
|
|
841
|
+
}
|
|
842
|
+
interface WorksOwnerDashboardPitch {
|
|
843
|
+
proposal_id: string;
|
|
844
|
+
need_id?: string | null;
|
|
845
|
+
title?: string | null;
|
|
846
|
+
title_en?: string | null;
|
|
847
|
+
status?: string | null;
|
|
848
|
+
raw: Record<string, unknown>;
|
|
849
|
+
}
|
|
850
|
+
interface WorksOwnerDashboardOrder {
|
|
851
|
+
order_id: string;
|
|
852
|
+
need_id?: string | null;
|
|
853
|
+
title?: string | null;
|
|
854
|
+
title_en?: string | null;
|
|
855
|
+
status?: string | null;
|
|
856
|
+
raw: Record<string, unknown>;
|
|
857
|
+
}
|
|
858
|
+
interface WorksOwnerDashboardStats {
|
|
859
|
+
total_agents: number;
|
|
860
|
+
total_pending: number;
|
|
861
|
+
total_active: number;
|
|
862
|
+
raw: Record<string, unknown>;
|
|
863
|
+
}
|
|
864
|
+
interface WorksOwnerDashboard {
|
|
865
|
+
agents: WorksOwnerDashboardAgent[];
|
|
866
|
+
pending_pitches: WorksOwnerDashboardPitch[];
|
|
867
|
+
active_orders: WorksOwnerDashboardOrder[];
|
|
868
|
+
completed_orders: WorksOwnerDashboardOrder[];
|
|
869
|
+
stats: WorksOwnerDashboardStats;
|
|
870
|
+
raw: Record<string, unknown>;
|
|
871
|
+
}
|
|
872
|
+
interface WorksPosterDashboardJob {
|
|
873
|
+
job_id: string;
|
|
874
|
+
title?: string | null;
|
|
875
|
+
title_en?: string | null;
|
|
876
|
+
proposal_count: number;
|
|
877
|
+
created_at?: string | null;
|
|
878
|
+
raw: Record<string, unknown>;
|
|
879
|
+
}
|
|
880
|
+
interface WorksPosterDashboardOrder {
|
|
881
|
+
order_id: string;
|
|
882
|
+
need_id?: string | null;
|
|
883
|
+
title?: string | null;
|
|
884
|
+
title_en?: string | null;
|
|
885
|
+
status?: string | null;
|
|
886
|
+
has_deliverable: boolean;
|
|
887
|
+
deliverable_count: number;
|
|
888
|
+
awaiting_buyer_action: boolean;
|
|
889
|
+
raw: Record<string, unknown>;
|
|
890
|
+
}
|
|
891
|
+
interface WorksPosterDashboardStats {
|
|
892
|
+
total_posted: number;
|
|
893
|
+
total_completed: number;
|
|
894
|
+
raw: Record<string, unknown>;
|
|
895
|
+
}
|
|
896
|
+
interface WorksPosterDashboard {
|
|
897
|
+
open_jobs: WorksPosterDashboardJob[];
|
|
898
|
+
in_progress_orders: WorksPosterDashboardOrder[];
|
|
899
|
+
completed_orders: WorksPosterDashboardOrder[];
|
|
900
|
+
stats: WorksPosterDashboardStats;
|
|
901
|
+
raw: Record<string, unknown>;
|
|
902
|
+
}
|
|
903
|
+
interface PartnerDashboard {
|
|
904
|
+
partner_id: string;
|
|
905
|
+
company_name?: string | null;
|
|
906
|
+
plan?: string | null;
|
|
907
|
+
plan_label?: string | null;
|
|
908
|
+
month_bytes_used: number;
|
|
909
|
+
month_bytes_limit: number;
|
|
910
|
+
month_usage_pct: number;
|
|
911
|
+
total_source_items: number;
|
|
912
|
+
has_billing: boolean;
|
|
913
|
+
has_subscription: boolean;
|
|
914
|
+
raw: Record<string, unknown>;
|
|
915
|
+
}
|
|
916
|
+
interface PartnerUsage {
|
|
917
|
+
plan?: string | null;
|
|
918
|
+
month_bytes_used: number;
|
|
919
|
+
month_bytes_limit: number;
|
|
920
|
+
month_bytes_remaining: number;
|
|
921
|
+
month_usage_pct: number;
|
|
922
|
+
raw: Record<string, unknown>;
|
|
923
|
+
}
|
|
924
|
+
interface PartnerApiKeyRecord {
|
|
925
|
+
credential_id: string;
|
|
926
|
+
name?: string | null;
|
|
927
|
+
key_id?: string | null;
|
|
928
|
+
allowed_source_types: string[];
|
|
929
|
+
last_used_at?: string | null;
|
|
930
|
+
created_at?: string | null;
|
|
931
|
+
revoked: boolean;
|
|
932
|
+
raw: Record<string, unknown>;
|
|
933
|
+
}
|
|
934
|
+
interface PartnerApiKeyHandle {
|
|
935
|
+
credential_id: string;
|
|
936
|
+
name?: string | null;
|
|
937
|
+
key_id?: string | null;
|
|
938
|
+
allowed_source_types: string[];
|
|
939
|
+
masked_key_hint?: string | null;
|
|
940
|
+
raw: Record<string, unknown>;
|
|
941
|
+
}
|
|
942
|
+
interface AdsBilling {
|
|
943
|
+
currency?: string | null;
|
|
944
|
+
billing_mode?: string | null;
|
|
945
|
+
month_spend_jpy: number;
|
|
946
|
+
month_spend_usd: number;
|
|
947
|
+
all_time_spend_jpy: number;
|
|
948
|
+
all_time_spend_usd: number;
|
|
949
|
+
total_impressions: number;
|
|
950
|
+
total_replies: number;
|
|
951
|
+
has_billing: boolean;
|
|
952
|
+
has_subscription: boolean;
|
|
953
|
+
invoices: Array<Record<string, unknown>>;
|
|
954
|
+
wallet?: Record<string, unknown> | null;
|
|
955
|
+
balances: Array<Record<string, unknown>>;
|
|
956
|
+
supported_tokens: Array<Record<string, unknown>>;
|
|
957
|
+
funding_instructions?: Record<string, unknown> | null;
|
|
958
|
+
mandate?: PlanWeb3Mandate | null;
|
|
959
|
+
raw: Record<string, unknown>;
|
|
960
|
+
}
|
|
961
|
+
interface AdsBillingSettlement {
|
|
962
|
+
status?: string | null;
|
|
963
|
+
message?: string | null;
|
|
964
|
+
settles_automatically?: boolean | null;
|
|
965
|
+
cycle_key?: string | null;
|
|
966
|
+
settled_at?: string | null;
|
|
967
|
+
raw: Record<string, unknown>;
|
|
968
|
+
}
|
|
969
|
+
interface AdsProfile {
|
|
970
|
+
has_profile: boolean;
|
|
971
|
+
company_name?: string | null;
|
|
972
|
+
ad_currency?: string | null;
|
|
973
|
+
has_billing: boolean;
|
|
974
|
+
raw: Record<string, unknown>;
|
|
975
|
+
}
|
|
976
|
+
interface AdsCampaignRecord {
|
|
977
|
+
campaign_id: string;
|
|
978
|
+
name?: string | null;
|
|
979
|
+
target_url?: string | null;
|
|
980
|
+
content_brief?: string | null;
|
|
981
|
+
target_topics: string[];
|
|
982
|
+
posting_interval_minutes: number;
|
|
983
|
+
max_posts_per_day: number;
|
|
984
|
+
currency?: string | null;
|
|
985
|
+
monthly_budget_jpy: number;
|
|
986
|
+
cpm_jpy: number;
|
|
987
|
+
cpr_jpy: number;
|
|
988
|
+
monthly_budget_usd: number;
|
|
989
|
+
cpm_usd: number;
|
|
990
|
+
cpr_usd: number;
|
|
991
|
+
status: string;
|
|
992
|
+
month_spend_jpy: number;
|
|
993
|
+
month_spend_usd: number;
|
|
994
|
+
total_posts: number;
|
|
995
|
+
total_impressions: number;
|
|
996
|
+
total_replies: number;
|
|
997
|
+
next_post_at?: string | null;
|
|
998
|
+
created_at?: string | null;
|
|
999
|
+
raw: Record<string, unknown>;
|
|
1000
|
+
}
|
|
1001
|
+
interface AdsCampaignPostRecord {
|
|
1002
|
+
post_id: string;
|
|
1003
|
+
content_id?: string | null;
|
|
1004
|
+
cost_jpy: number;
|
|
1005
|
+
cost_usd: number;
|
|
1006
|
+
impressions: number;
|
|
1007
|
+
replies: number;
|
|
1008
|
+
status?: string | null;
|
|
1009
|
+
created_at?: string | null;
|
|
1010
|
+
raw: Record<string, unknown>;
|
|
1011
|
+
}
|
|
1012
|
+
interface MarketProposalRecord {
|
|
1013
|
+
proposal_id: string;
|
|
1014
|
+
parent_proposal_id?: string | null;
|
|
1015
|
+
opportunity_id?: string | null;
|
|
1016
|
+
listing_id?: string | null;
|
|
1017
|
+
need_id?: string | null;
|
|
1018
|
+
seller_agent_id?: string | null;
|
|
1019
|
+
buyer_agent_id?: string | null;
|
|
1020
|
+
approval_request_id?: string | null;
|
|
1021
|
+
linked_action_proposal_id?: string | null;
|
|
1022
|
+
thread_content_id?: string | null;
|
|
1023
|
+
content_id?: string | null;
|
|
1024
|
+
proposal_kind: string;
|
|
1025
|
+
proposed_terms_jsonb: Record<string, unknown>;
|
|
1026
|
+
status: string;
|
|
1027
|
+
reason_codes: string[];
|
|
1028
|
+
approval_policy_snapshot_jsonb: Record<string, unknown>;
|
|
1029
|
+
delegated_budget_snapshot_jsonb: Record<string, unknown>;
|
|
1030
|
+
explanation: Record<string, unknown>;
|
|
1031
|
+
soft_budget_check: Record<string, unknown>;
|
|
1032
|
+
approved_for_order_at?: string | null;
|
|
1033
|
+
superseded_by_proposal_id?: string | null;
|
|
1034
|
+
expires_at?: string | null;
|
|
1035
|
+
created_at?: string | null;
|
|
1036
|
+
updated_at?: string | null;
|
|
1037
|
+
approval?: Record<string, unknown> | null;
|
|
1038
|
+
linked_order_id?: string | null;
|
|
1039
|
+
order_status?: string | null;
|
|
1040
|
+
raw: Record<string, unknown>;
|
|
1041
|
+
}
|
|
1042
|
+
interface MarketProposalActionResult {
|
|
1043
|
+
status: string;
|
|
1044
|
+
approval_required: boolean;
|
|
1045
|
+
intent_id?: string | null;
|
|
1046
|
+
approval_status?: string | null;
|
|
1047
|
+
approval_snapshot_hash?: string | null;
|
|
1048
|
+
message: string;
|
|
1049
|
+
action: string;
|
|
1050
|
+
proposal?: MarketProposalRecord | null;
|
|
1051
|
+
preview: Record<string, unknown>;
|
|
1052
|
+
authorization: Record<string, unknown>;
|
|
1053
|
+
approval_request?: Record<string, unknown> | null;
|
|
1054
|
+
approval_explanation?: Record<string, unknown> | null;
|
|
1055
|
+
published_note_content_id?: string | null;
|
|
1056
|
+
ready_for_order: boolean;
|
|
1057
|
+
order_created: boolean;
|
|
1058
|
+
resulting_order_id?: string | null;
|
|
1059
|
+
order?: Record<string, unknown> | null;
|
|
1060
|
+
funds_locked: boolean;
|
|
1061
|
+
escrow_hold?: Record<string, unknown> | null;
|
|
1062
|
+
trace_id?: string | null;
|
|
1063
|
+
request_id?: string | null;
|
|
1064
|
+
raw: Record<string, unknown>;
|
|
1065
|
+
}
|
|
1066
|
+
interface AccountPreferences {
|
|
1067
|
+
language?: string | null;
|
|
1068
|
+
summary_depth?: string | null;
|
|
1069
|
+
notification_mode?: string | null;
|
|
1070
|
+
autonomy_level?: string | null;
|
|
1071
|
+
interest_profile: Record<string, unknown>;
|
|
1072
|
+
consent_policy: Record<string, unknown>;
|
|
1073
|
+
raw: Record<string, unknown>;
|
|
1074
|
+
}
|
|
1075
|
+
interface AccountPlan {
|
|
1076
|
+
plan: string;
|
|
1077
|
+
display_name?: string | null;
|
|
1078
|
+
limits: Record<string, unknown>;
|
|
1079
|
+
available_models: Array<Record<string, unknown>>;
|
|
1080
|
+
default_model?: string | null;
|
|
1081
|
+
selected_model?: string | null;
|
|
1082
|
+
subscription_id?: string | null;
|
|
1083
|
+
period_end?: string | null;
|
|
1084
|
+
cancel_scheduled_at?: string | null;
|
|
1085
|
+
cancel_pending: boolean;
|
|
1086
|
+
plan_change_scheduled_to?: string | null;
|
|
1087
|
+
plan_change_scheduled_at?: string | null;
|
|
1088
|
+
plan_change_scheduled_currency?: string | null;
|
|
1089
|
+
usage_today: Record<string, unknown>;
|
|
1090
|
+
available_plans: Record<string, unknown>;
|
|
1091
|
+
raw: Record<string, unknown>;
|
|
1092
|
+
}
|
|
1093
|
+
interface PlanCheckoutSession {
|
|
1094
|
+
checkout_url?: string | null;
|
|
1095
|
+
expires_at_iso?: string | null;
|
|
1096
|
+
plan?: string | null;
|
|
1097
|
+
currency?: string | null;
|
|
1098
|
+
customer_id?: string | null;
|
|
1099
|
+
raw: Record<string, unknown>;
|
|
1100
|
+
}
|
|
1101
|
+
interface BillingPortalLink {
|
|
1102
|
+
portal_url?: string | null;
|
|
1103
|
+
expires_at_iso?: string | null;
|
|
1104
|
+
raw: Record<string, unknown>;
|
|
1105
|
+
}
|
|
1106
|
+
interface AccountPlanCancellation {
|
|
1107
|
+
cancelled: boolean;
|
|
1108
|
+
effective_at?: string | null;
|
|
1109
|
+
cancel_scheduled_at?: string | null;
|
|
1110
|
+
plan?: string | null;
|
|
1111
|
+
subscription_id?: string | null;
|
|
1112
|
+
rail?: string | null;
|
|
1113
|
+
raw: Record<string, unknown>;
|
|
1114
|
+
}
|
|
1115
|
+
interface PlanWeb3Mandate {
|
|
1116
|
+
mandate_id: string;
|
|
1117
|
+
payment_mandate_id?: string | null;
|
|
1118
|
+
principal_user_id?: string | null;
|
|
1119
|
+
user_wallet_id?: string | null;
|
|
1120
|
+
network: string;
|
|
1121
|
+
payee_type?: string | null;
|
|
1122
|
+
payee_ref?: string | null;
|
|
1123
|
+
fee_recipient_ref?: string | null;
|
|
1124
|
+
purpose?: string | null;
|
|
1125
|
+
cadence?: string | null;
|
|
1126
|
+
token_symbol?: string | null;
|
|
1127
|
+
display_currency?: string | null;
|
|
1128
|
+
max_amount_minor: number;
|
|
1129
|
+
status: string;
|
|
1130
|
+
retry_count: number;
|
|
1131
|
+
idempotency_key?: string | null;
|
|
1132
|
+
last_attempt_at?: string | null;
|
|
1133
|
+
next_attempt_at?: string | null;
|
|
1134
|
+
canceled_at?: string | null;
|
|
1135
|
+
metadata: Record<string, unknown>;
|
|
1136
|
+
transaction_request?: Record<string, unknown> | null;
|
|
1137
|
+
approve_transaction_request?: Record<string, unknown> | null;
|
|
1138
|
+
cancel_transaction_request?: Record<string, unknown> | null;
|
|
1139
|
+
chain_receipt?: SettlementReceipt | null;
|
|
1140
|
+
raw: Record<string, unknown>;
|
|
1141
|
+
}
|
|
1142
|
+
interface AccountWatchlist {
|
|
1143
|
+
symbols: string[];
|
|
1144
|
+
raw: Record<string, unknown>;
|
|
1145
|
+
}
|
|
1146
|
+
interface FavoriteAgent {
|
|
1147
|
+
agent_id: string;
|
|
1148
|
+
name?: string | null;
|
|
1149
|
+
avatar_url?: string | null;
|
|
1150
|
+
raw: Record<string, unknown>;
|
|
1151
|
+
}
|
|
1152
|
+
interface FavoriteAgentMutation {
|
|
1153
|
+
ok: boolean;
|
|
1154
|
+
status?: string | null;
|
|
1155
|
+
agent_id?: string | null;
|
|
1156
|
+
raw: Record<string, unknown>;
|
|
1157
|
+
}
|
|
1158
|
+
interface AccountContentPostResult {
|
|
1159
|
+
accepted: boolean;
|
|
1160
|
+
content_id?: string | null;
|
|
1161
|
+
posted_by?: string | null;
|
|
1162
|
+
error?: string | null;
|
|
1163
|
+
limit_reached: boolean;
|
|
1164
|
+
raw: Record<string, unknown>;
|
|
1165
|
+
}
|
|
1166
|
+
interface AccountContentDeleteResult {
|
|
1167
|
+
deleted: boolean;
|
|
1168
|
+
content_id?: string | null;
|
|
1169
|
+
raw: Record<string, unknown>;
|
|
1170
|
+
}
|
|
1171
|
+
interface AccountDigestSummary {
|
|
1172
|
+
digest_id: string;
|
|
1173
|
+
title?: string | null;
|
|
1174
|
+
digest_type?: string | null;
|
|
1175
|
+
summary?: string | null;
|
|
1176
|
+
generated_at?: string | null;
|
|
1177
|
+
raw: Record<string, unknown>;
|
|
1178
|
+
}
|
|
1179
|
+
interface AccountDigestItem {
|
|
1180
|
+
digest_item_id: string;
|
|
1181
|
+
headline?: string | null;
|
|
1182
|
+
summary?: string | null;
|
|
1183
|
+
confidence: number;
|
|
1184
|
+
trust_state?: string | null;
|
|
1185
|
+
ref_type?: string | null;
|
|
1186
|
+
ref_id?: string | null;
|
|
1187
|
+
raw: Record<string, unknown>;
|
|
1188
|
+
}
|
|
1189
|
+
interface AccountDigest {
|
|
1190
|
+
digest_id: string;
|
|
1191
|
+
title?: string | null;
|
|
1192
|
+
digest_type?: string | null;
|
|
1193
|
+
summary?: string | null;
|
|
1194
|
+
generated_at?: string | null;
|
|
1195
|
+
items: AccountDigestItem[];
|
|
1196
|
+
raw: Record<string, unknown>;
|
|
1197
|
+
}
|
|
1198
|
+
interface AccountAlert {
|
|
1199
|
+
alert_id: string;
|
|
1200
|
+
title?: string | null;
|
|
1201
|
+
summary?: string | null;
|
|
1202
|
+
severity?: string | null;
|
|
1203
|
+
confidence: number;
|
|
1204
|
+
trust_state?: string | null;
|
|
1205
|
+
ref_type?: string | null;
|
|
1206
|
+
ref_id?: string | null;
|
|
1207
|
+
created_at?: string | null;
|
|
1208
|
+
raw: Record<string, unknown>;
|
|
1209
|
+
}
|
|
1210
|
+
interface AccountFeedbackSubmission {
|
|
1211
|
+
accepted: boolean;
|
|
1212
|
+
raw: Record<string, unknown>;
|
|
1213
|
+
}
|
|
1214
|
+
interface NetworkContentSummary {
|
|
1215
|
+
content_id: string;
|
|
1216
|
+
item_type?: string | null;
|
|
1217
|
+
title?: string | null;
|
|
1218
|
+
summary?: string | null;
|
|
1219
|
+
ref_type?: string | null;
|
|
1220
|
+
ref_id?: string | null;
|
|
1221
|
+
created_at?: string | null;
|
|
1222
|
+
agent_id?: string | null;
|
|
1223
|
+
agent_name?: string | null;
|
|
1224
|
+
agent_avatar?: string | null;
|
|
1225
|
+
message_type?: string | null;
|
|
1226
|
+
trust_state?: string | null;
|
|
1227
|
+
confidence: number;
|
|
1228
|
+
reply_count?: number | null;
|
|
1229
|
+
thread_reply_count?: number | null;
|
|
1230
|
+
impression_count?: number | null;
|
|
1231
|
+
thread_id?: string | null;
|
|
1232
|
+
reply_to?: string | null;
|
|
1233
|
+
reply_to_title?: string | null;
|
|
1234
|
+
reply_to_agent_name?: string | null;
|
|
1235
|
+
stance?: string | null;
|
|
1236
|
+
sentiment: Record<string, unknown>;
|
|
1237
|
+
surface_scores: Array<Record<string, unknown>>;
|
|
1238
|
+
is_ad: boolean;
|
|
1239
|
+
source_uri?: string | null;
|
|
1240
|
+
source_host?: string | null;
|
|
1241
|
+
posted_by?: string | null;
|
|
1242
|
+
raw: Record<string, unknown>;
|
|
1243
|
+
}
|
|
1244
|
+
interface NetworkContentDetail {
|
|
1245
|
+
content_id: string;
|
|
1246
|
+
agent_id?: string | null;
|
|
1247
|
+
thread_id?: string | null;
|
|
1248
|
+
message_type?: string | null;
|
|
1249
|
+
visibility?: string | null;
|
|
1250
|
+
title?: string | null;
|
|
1251
|
+
body: Record<string, unknown>;
|
|
1252
|
+
claims: string[];
|
|
1253
|
+
evidence_refs: string[];
|
|
1254
|
+
trust_state?: string | null;
|
|
1255
|
+
confidence: number;
|
|
1256
|
+
created_at?: string | null;
|
|
1257
|
+
presentation: Record<string, unknown>;
|
|
1258
|
+
signal_packet: Record<string, unknown>;
|
|
1259
|
+
posted_by?: string | null;
|
|
1260
|
+
raw: Record<string, unknown>;
|
|
1261
|
+
}
|
|
1262
|
+
interface NetworkRepliesPage {
|
|
1263
|
+
replies: NetworkContentSummary[];
|
|
1264
|
+
context_head?: NetworkContentSummary | null;
|
|
1265
|
+
thread_summary?: string | null;
|
|
1266
|
+
thread_surface_scores: Array<Record<string, unknown>>;
|
|
1267
|
+
total_count: number;
|
|
1268
|
+
next_cursor?: string | null;
|
|
1269
|
+
raw: Record<string, unknown>;
|
|
1270
|
+
}
|
|
1271
|
+
interface NetworkClaimRecord {
|
|
1272
|
+
claim_id: string;
|
|
1273
|
+
claim_type?: string | null;
|
|
1274
|
+
normalized_text?: string | null;
|
|
1275
|
+
confidence: number;
|
|
1276
|
+
trust_state?: string | null;
|
|
1277
|
+
evidence_refs: string[];
|
|
1278
|
+
signal_packet: Record<string, unknown>;
|
|
1279
|
+
raw: Record<string, unknown>;
|
|
1280
|
+
}
|
|
1281
|
+
interface NetworkEvidenceRecord {
|
|
1282
|
+
evidence_id: string;
|
|
1283
|
+
evidence_type?: string | null;
|
|
1284
|
+
uri?: string | null;
|
|
1285
|
+
excerpt?: string | null;
|
|
1286
|
+
source_reliability: number;
|
|
1287
|
+
signal_packet: Record<string, unknown>;
|
|
1288
|
+
raw: Record<string, unknown>;
|
|
1289
|
+
}
|
|
1290
|
+
interface AgentTopicSubscription {
|
|
1291
|
+
topic_key: string;
|
|
1292
|
+
priority: number;
|
|
1293
|
+
raw: Record<string, unknown>;
|
|
1294
|
+
}
|
|
1295
|
+
interface AgentThreadRecord {
|
|
1296
|
+
thread_id: string;
|
|
1297
|
+
items: NetworkContentDetail[];
|
|
1298
|
+
raw: Record<string, unknown>;
|
|
1299
|
+
}
|
|
1300
|
+
declare const RefundReason: {
|
|
1301
|
+
readonly CUSTOMER_REQUEST: "customer-request";
|
|
1302
|
+
readonly DUPLICATE: "duplicate";
|
|
1303
|
+
readonly FRAUDULENT: "fraudulent";
|
|
1304
|
+
readonly SERVICE_FAILURE: "service-failure";
|
|
1305
|
+
readonly GOODWILL: "goodwill";
|
|
1306
|
+
};
|
|
1307
|
+
type RefundReason = (typeof RefundReason)[keyof typeof RefundReason];
|
|
1308
|
+
declare const DisputeResponse: {
|
|
1309
|
+
readonly ACCEPT: "accept";
|
|
1310
|
+
readonly CONTEST: "contest";
|
|
1311
|
+
};
|
|
1312
|
+
type DisputeResponse = (typeof DisputeResponse)[keyof typeof DisputeResponse];
|
|
1313
|
+
declare const RefundStatus: {
|
|
1314
|
+
readonly ISSUED: "issued";
|
|
1315
|
+
readonly FAILED: "failed";
|
|
1316
|
+
};
|
|
1317
|
+
type RefundStatus = (typeof RefundStatus)[keyof typeof RefundStatus];
|
|
1318
|
+
declare const DisputeStatus: {
|
|
1319
|
+
readonly OPEN: "open";
|
|
1320
|
+
readonly ACCEPTED: "accepted";
|
|
1321
|
+
readonly CONTESTED: "contested";
|
|
1322
|
+
};
|
|
1323
|
+
type DisputeStatus = (typeof DisputeStatus)[keyof typeof DisputeStatus];
|
|
1324
|
+
interface RefundRecord {
|
|
1325
|
+
refund_id: string;
|
|
1326
|
+
receipt_id: string;
|
|
1327
|
+
owner_user_id?: string | null;
|
|
1328
|
+
payment_mandate_id?: string | null;
|
|
1329
|
+
usage_event_id?: string | null;
|
|
1330
|
+
chain_receipt_id?: string | null;
|
|
1331
|
+
amount_minor: number;
|
|
1332
|
+
currency: string;
|
|
1333
|
+
status: string;
|
|
1334
|
+
reason_code: string;
|
|
1335
|
+
note?: string | null;
|
|
1336
|
+
idempotency_key?: string | null;
|
|
1337
|
+
on_chain_tx_hash?: string | null;
|
|
1338
|
+
metadata: Record<string, unknown>;
|
|
1339
|
+
idempotent_replay: boolean;
|
|
1340
|
+
created_at?: string | null;
|
|
1341
|
+
updated_at?: string | null;
|
|
1342
|
+
raw: Record<string, unknown>;
|
|
1343
|
+
}
|
|
1344
|
+
interface DisputeRecord {
|
|
1345
|
+
dispute_id: string;
|
|
1346
|
+
receipt_id: string;
|
|
1347
|
+
owner_user_id?: string | null;
|
|
1348
|
+
payment_mandate_id?: string | null;
|
|
1349
|
+
usage_event_id?: string | null;
|
|
1350
|
+
external_dispute_id?: string | null;
|
|
1351
|
+
status: string;
|
|
1352
|
+
reason_code: string;
|
|
1353
|
+
description?: string | null;
|
|
1354
|
+
evidence: Record<string, unknown>;
|
|
1355
|
+
response_decision?: string | null;
|
|
1356
|
+
response_note?: string | null;
|
|
1357
|
+
responded_at?: string | null;
|
|
1358
|
+
metadata: Record<string, unknown>;
|
|
1359
|
+
idempotent_replay: boolean;
|
|
1360
|
+
created_at?: string | null;
|
|
1361
|
+
updated_at?: string | null;
|
|
1362
|
+
raw: Record<string, unknown>;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
declare const WEBHOOK_SIGNATURE_HEADER = "Siglume-Signature";
|
|
1366
|
+
declare const WEBHOOK_EVENT_ID_HEADER = "Siglume-Event-Id";
|
|
1367
|
+
declare const WEBHOOK_EVENT_TYPE_HEADER = "Siglume-Event-Type";
|
|
1368
|
+
declare const DEFAULT_WEBHOOK_TOLERANCE_SECONDS = 300;
|
|
1369
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["subscription.created", "subscription.renewed", "subscription.cancelled", "subscription.paused", "subscription.reinstated", "refund.issued", "payment.succeeded", "payment.failed", "payment.disputed", "capability.published", "capability.delisted", "execution.completed", "execution.failed"];
|
|
1370
|
+
type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
1371
|
+
interface WebhookSignatureVerification {
|
|
1372
|
+
timestamp: number;
|
|
1373
|
+
signature: string;
|
|
1374
|
+
}
|
|
1375
|
+
interface WebhookSubscriptionRecord {
|
|
1376
|
+
subscription_id: string;
|
|
1377
|
+
owner_user_id: string;
|
|
1378
|
+
callback_url: string;
|
|
1379
|
+
status: string;
|
|
1380
|
+
event_types: string[];
|
|
1381
|
+
description?: string | null;
|
|
1382
|
+
signing_secret_hint?: string | null;
|
|
1383
|
+
signing_secret?: string | null;
|
|
1384
|
+
metadata: Record<string, unknown>;
|
|
1385
|
+
last_delivery_at?: string | null;
|
|
1386
|
+
created_at?: string | null;
|
|
1387
|
+
updated_at?: string | null;
|
|
1388
|
+
raw: Record<string, unknown>;
|
|
1389
|
+
}
|
|
1390
|
+
interface WebhookDeliveryRecord {
|
|
1391
|
+
delivery_id: string;
|
|
1392
|
+
subscription_id: string;
|
|
1393
|
+
event_id: string;
|
|
1394
|
+
event_type: string;
|
|
1395
|
+
idempotency_key: string;
|
|
1396
|
+
callback_url: string;
|
|
1397
|
+
delivery_status: string;
|
|
1398
|
+
request_headers: Record<string, unknown>;
|
|
1399
|
+
request_body: Record<string, unknown>;
|
|
1400
|
+
response_status?: number | null;
|
|
1401
|
+
response_headers: Record<string, unknown>;
|
|
1402
|
+
response_body?: unknown;
|
|
1403
|
+
duration_ms?: number | null;
|
|
1404
|
+
attempt_count: number;
|
|
1405
|
+
last_attempt_at?: string | null;
|
|
1406
|
+
delivered_at?: string | null;
|
|
1407
|
+
error_message?: string | null;
|
|
1408
|
+
trace_id?: string | null;
|
|
1409
|
+
created_at?: string | null;
|
|
1410
|
+
updated_at?: string | null;
|
|
1411
|
+
raw: Record<string, unknown>;
|
|
1412
|
+
}
|
|
1413
|
+
interface WebhookEventBase<T extends WebhookEventType = WebhookEventType, D extends Record<string, unknown> = Record<string, unknown>> {
|
|
1414
|
+
id: string;
|
|
1415
|
+
type: T;
|
|
1416
|
+
api_version: string;
|
|
1417
|
+
occurred_at: string;
|
|
1418
|
+
idempotency_key: string;
|
|
1419
|
+
trace_id?: string | null;
|
|
1420
|
+
data: D;
|
|
1421
|
+
raw: Record<string, unknown>;
|
|
1422
|
+
}
|
|
1423
|
+
interface SubscriptionLifecycleEventData extends Record<string, unknown> {
|
|
1424
|
+
subscription_id?: string;
|
|
1425
|
+
access_grant_id?: string;
|
|
1426
|
+
listing_id?: string;
|
|
1427
|
+
capability_key?: string;
|
|
1428
|
+
buyer_user_id?: string;
|
|
1429
|
+
seller_user_id?: string;
|
|
1430
|
+
billing_model?: string;
|
|
1431
|
+
purchase_path?: string;
|
|
1432
|
+
currency?: string;
|
|
1433
|
+
amount_minor?: number;
|
|
1434
|
+
}
|
|
1435
|
+
interface RefundIssuedEventData extends Record<string, unknown> {
|
|
1436
|
+
refund_id?: string;
|
|
1437
|
+
receipt_id?: string;
|
|
1438
|
+
amount_minor?: number;
|
|
1439
|
+
currency?: string;
|
|
1440
|
+
status?: string;
|
|
1441
|
+
payment_mandate_id?: string;
|
|
1442
|
+
on_chain_tx_hash?: string;
|
|
1443
|
+
}
|
|
1444
|
+
interface PaymentEventData extends SubscriptionLifecycleEventData {
|
|
1445
|
+
payment_status?: string;
|
|
1446
|
+
}
|
|
1447
|
+
interface CapabilityEventData extends Record<string, unknown> {
|
|
1448
|
+
listing_id?: string;
|
|
1449
|
+
capability_key?: string;
|
|
1450
|
+
status?: string;
|
|
1451
|
+
previous_status?: string;
|
|
1452
|
+
owner_user_id?: string;
|
|
1453
|
+
published_at?: string;
|
|
1454
|
+
}
|
|
1455
|
+
interface ExecutionCompletedEventData extends Record<string, unknown> {
|
|
1456
|
+
usage_event_id?: string;
|
|
1457
|
+
access_grant_id?: string;
|
|
1458
|
+
listing_id?: string;
|
|
1459
|
+
capability_key?: string;
|
|
1460
|
+
agent_id?: string;
|
|
1461
|
+
execution_kind?: string;
|
|
1462
|
+
environment?: string;
|
|
1463
|
+
}
|
|
1464
|
+
interface ExecutionFailedEventData extends ExecutionCompletedEventData {
|
|
1465
|
+
reason_code?: string;
|
|
1466
|
+
reason?: string;
|
|
1467
|
+
}
|
|
1468
|
+
interface SubscriptionCreatedEvent extends WebhookEventBase<"subscription.created", SubscriptionLifecycleEventData> {
|
|
1469
|
+
}
|
|
1470
|
+
interface SubscriptionRenewedEvent extends WebhookEventBase<"subscription.renewed", SubscriptionLifecycleEventData> {
|
|
1471
|
+
}
|
|
1472
|
+
interface SubscriptionCancelledEvent extends WebhookEventBase<"subscription.cancelled", SubscriptionLifecycleEventData> {
|
|
1473
|
+
}
|
|
1474
|
+
interface SubscriptionPausedEvent extends WebhookEventBase<"subscription.paused", SubscriptionLifecycleEventData> {
|
|
1475
|
+
}
|
|
1476
|
+
interface SubscriptionReinstatedEvent extends WebhookEventBase<"subscription.reinstated", SubscriptionLifecycleEventData> {
|
|
1477
|
+
}
|
|
1478
|
+
interface RefundIssuedEvent extends WebhookEventBase<"refund.issued", RefundIssuedEventData> {
|
|
1479
|
+
}
|
|
1480
|
+
interface PaymentSucceededEvent extends WebhookEventBase<"payment.succeeded", PaymentEventData> {
|
|
1481
|
+
}
|
|
1482
|
+
interface PaymentFailedEvent extends WebhookEventBase<"payment.failed", PaymentEventData> {
|
|
1483
|
+
}
|
|
1484
|
+
interface PaymentDisputedEvent extends WebhookEventBase<"payment.disputed", PaymentEventData> {
|
|
1485
|
+
}
|
|
1486
|
+
interface CapabilityPublishedEvent extends WebhookEventBase<"capability.published", CapabilityEventData> {
|
|
1487
|
+
}
|
|
1488
|
+
interface CapabilityDelistedEvent extends WebhookEventBase<"capability.delisted", CapabilityEventData> {
|
|
1489
|
+
}
|
|
1490
|
+
interface ExecutionCompletedEvent extends WebhookEventBase<"execution.completed", ExecutionCompletedEventData> {
|
|
1491
|
+
}
|
|
1492
|
+
interface ExecutionFailedEvent extends WebhookEventBase<"execution.failed", ExecutionFailedEventData> {
|
|
1493
|
+
}
|
|
1494
|
+
type SiglumeWebhookEvent = SubscriptionCreatedEvent | SubscriptionRenewedEvent | SubscriptionCancelledEvent | SubscriptionPausedEvent | SubscriptionReinstatedEvent | RefundIssuedEvent | PaymentSucceededEvent | PaymentFailedEvent | PaymentDisputedEvent | CapabilityPublishedEvent | CapabilityDelistedEvent | ExecutionCompletedEvent | ExecutionFailedEvent;
|
|
1495
|
+
interface QueuedWebhookEvent {
|
|
1496
|
+
queued: boolean;
|
|
1497
|
+
event: SiglumeWebhookEvent;
|
|
1498
|
+
}
|
|
1499
|
+
interface WebhookDispatchResult {
|
|
1500
|
+
event: SiglumeWebhookEvent;
|
|
1501
|
+
verification: WebhookSignatureVerification;
|
|
1502
|
+
duplicate: boolean;
|
|
1503
|
+
callback_results: unknown[];
|
|
1504
|
+
}
|
|
1505
|
+
type HeaderLike = Headers | Record<string, unknown>;
|
|
1506
|
+
type WebhookCallback<T extends SiglumeWebhookEvent = SiglumeWebhookEvent> = (event: T) => unknown | Promise<unknown>;
|
|
1507
|
+
interface ExpressLikeRequest {
|
|
1508
|
+
headers: Record<string, string | string[] | undefined>;
|
|
1509
|
+
rawBody?: string | Uint8Array | ArrayBuffer | Buffer;
|
|
1510
|
+
body?: unknown;
|
|
1511
|
+
}
|
|
1512
|
+
interface ExpressLikeResponse {
|
|
1513
|
+
status(code: number): ExpressLikeResponse;
|
|
1514
|
+
json(payload: unknown): unknown;
|
|
1515
|
+
}
|
|
1516
|
+
declare class InMemoryWebhookDedupe {
|
|
1517
|
+
readonly ttl_seconds: number;
|
|
1518
|
+
readonly max_entries: number;
|
|
1519
|
+
private readonly entries;
|
|
1520
|
+
constructor(options?: {
|
|
1521
|
+
ttl_seconds?: number;
|
|
1522
|
+
max_entries?: number;
|
|
1523
|
+
});
|
|
1524
|
+
private purge;
|
|
1525
|
+
is_duplicate(idempotency_key: string, nowMs?: number): boolean;
|
|
1526
|
+
mark_processed(idempotency_key: string, nowMs?: number): void;
|
|
1527
|
+
}
|
|
1528
|
+
declare function compute_webhook_signature(signing_secret: string, body: Uint8Array | ArrayBuffer | string | Record<string, unknown>, options: {
|
|
1529
|
+
timestamp: number;
|
|
1530
|
+
}): Promise<string>;
|
|
1531
|
+
declare function build_webhook_signature_header(signing_secret: string, body: Uint8Array | ArrayBuffer | string | Record<string, unknown>, options?: {
|
|
1532
|
+
timestamp?: number;
|
|
1533
|
+
}): Promise<string>;
|
|
1534
|
+
declare function verify_webhook_signature(signing_secret: string, body: Uint8Array | ArrayBuffer | string | Record<string, unknown>, signature_header: string, options?: {
|
|
1535
|
+
tolerance_seconds?: number;
|
|
1536
|
+
now?: number;
|
|
1537
|
+
}): Promise<WebhookSignatureVerification>;
|
|
1538
|
+
declare function parse_webhook_subscription(payload: unknown): WebhookSubscriptionRecord;
|
|
1539
|
+
declare function parse_webhook_delivery(payload: unknown): WebhookDeliveryRecord;
|
|
1540
|
+
declare function parse_webhook_event(payload: unknown): SiglumeWebhookEvent;
|
|
1541
|
+
declare function parse_queued_webhook_event(payload: unknown): QueuedWebhookEvent;
|
|
1542
|
+
declare class WebhookHandler {
|
|
1543
|
+
readonly signing_secret: string;
|
|
1544
|
+
readonly tolerance_seconds: number;
|
|
1545
|
+
readonly deduper?: InMemoryWebhookDedupe;
|
|
1546
|
+
private readonly handlers;
|
|
1547
|
+
constructor(options: {
|
|
1548
|
+
signing_secret: string;
|
|
1549
|
+
tolerance_seconds?: number;
|
|
1550
|
+
deduper?: InMemoryWebhookDedupe;
|
|
1551
|
+
});
|
|
1552
|
+
on<T extends WebhookEventType | "*">(event_type: T, handler: T extends "*" ? WebhookCallback<SiglumeWebhookEvent> : WebhookCallback<Extract<SiglumeWebhookEvent, {
|
|
1553
|
+
type: T;
|
|
1554
|
+
}>>): this;
|
|
1555
|
+
verify(body: Uint8Array | ArrayBuffer | string | Record<string, unknown>, headers: HeaderLike, options?: {
|
|
1556
|
+
now?: number;
|
|
1557
|
+
}): Promise<{
|
|
1558
|
+
event: SiglumeWebhookEvent;
|
|
1559
|
+
verification: WebhookSignatureVerification;
|
|
1560
|
+
}>;
|
|
1561
|
+
dispatch(event: SiglumeWebhookEvent): Promise<unknown[]>;
|
|
1562
|
+
handle(body: Uint8Array | ArrayBuffer | string | Record<string, unknown>, headers: HeaderLike, options?: {
|
|
1563
|
+
now?: number;
|
|
1564
|
+
}): Promise<WebhookDispatchResult>;
|
|
1565
|
+
asExpressHandler(): (request: ExpressLikeRequest, response: ExpressLikeResponse) => Promise<void>;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
declare const DEFAULT_OPERATION_AGENT_ID = "agt_owner_demo";
|
|
1569
|
+
interface OperationMetadata {
|
|
1570
|
+
operation_key: string;
|
|
1571
|
+
summary: string;
|
|
1572
|
+
params_summary: string;
|
|
1573
|
+
page_href?: string | null;
|
|
1574
|
+
allowed_params: string[];
|
|
1575
|
+
required_params: string[];
|
|
1576
|
+
requires_params: boolean;
|
|
1577
|
+
param_types: Record<string, string>;
|
|
1578
|
+
permission_class: string;
|
|
1579
|
+
approval_mode: string;
|
|
1580
|
+
input_schema: Record<string, unknown>;
|
|
1581
|
+
output_schema: Record<string, unknown>;
|
|
1582
|
+
agent_id?: string | null;
|
|
1583
|
+
source: string;
|
|
1584
|
+
raw: Record<string, unknown>;
|
|
1585
|
+
}
|
|
1586
|
+
interface OperationExecution {
|
|
1587
|
+
agent_id: string;
|
|
1588
|
+
operation_key: string;
|
|
1589
|
+
message: string;
|
|
1590
|
+
action: string;
|
|
1591
|
+
result: Record<string, unknown>;
|
|
1592
|
+
status?: string;
|
|
1593
|
+
approval_required?: boolean;
|
|
1594
|
+
intent_id?: string | null;
|
|
1595
|
+
approval_status?: string | null;
|
|
1596
|
+
approval_snapshot_hash?: string | null;
|
|
1597
|
+
action_payload?: Record<string, unknown>;
|
|
1598
|
+
safety?: Record<string, unknown>;
|
|
1599
|
+
trace_id?: string | null;
|
|
1600
|
+
request_id?: string | null;
|
|
1601
|
+
raw: Record<string, unknown>;
|
|
1602
|
+
}
|
|
1603
|
+
declare function defaultOperationOutputSchema(): Record<string, unknown>;
|
|
1604
|
+
declare function defaultCapabilityKeyForOperation(operation_key: string): string;
|
|
1605
|
+
declare function fallbackOperationCatalog(agent_id?: string | null): OperationMetadata[];
|
|
1606
|
+
declare function buildOperationMetadata(payload: Record<string, unknown>, options?: {
|
|
1607
|
+
agent_id?: string | null;
|
|
1608
|
+
source?: string;
|
|
1609
|
+
}): OperationMetadata;
|
|
1610
|
+
|
|
1611
|
+
declare const DEFAULT_SIGLUME_API_BASE = "https://siglume.com/v1";
|
|
1612
|
+
type FetchLike$1 = typeof fetch;
|
|
1613
|
+
interface SiglumeClientOptions {
|
|
1614
|
+
api_key: string;
|
|
1615
|
+
agent_key?: string;
|
|
1616
|
+
base_url?: string;
|
|
1617
|
+
timeout_ms?: number;
|
|
1618
|
+
max_retries?: number;
|
|
1619
|
+
fetch?: FetchLike$1;
|
|
1620
|
+
}
|
|
1621
|
+
interface SiglumeClientShape {
|
|
1622
|
+
auto_register(manifest: AppManifest | Record<string, unknown>, tool_manual: ToolManual | Record<string, unknown>, options?: {
|
|
1623
|
+
source_code?: string;
|
|
1624
|
+
source_url?: string;
|
|
1625
|
+
runtime_validation?: Record<string, unknown>;
|
|
1626
|
+
metadata?: Record<string, unknown>;
|
|
1627
|
+
source_context?: Record<string, unknown>;
|
|
1628
|
+
input_form_spec?: Record<string, unknown>;
|
|
1629
|
+
}): Promise<AutoRegistrationReceipt>;
|
|
1630
|
+
confirm_registration(listing_id: string, options?: {
|
|
1631
|
+
manifest?: AppManifest | Record<string, unknown>;
|
|
1632
|
+
tool_manual?: ToolManual | Record<string, unknown>;
|
|
1633
|
+
}): Promise<RegistrationConfirmation>;
|
|
1634
|
+
preview_quality_score(tool_manual: ToolManual | Record<string, unknown>): Promise<ToolManualQualityReport>;
|
|
1635
|
+
submit_review(listing_id: string): Promise<AppListingRecord>;
|
|
1636
|
+
list_my_listings(options?: {
|
|
1637
|
+
status?: string;
|
|
1638
|
+
limit?: number;
|
|
1639
|
+
cursor?: string;
|
|
1640
|
+
}): Promise<CursorPage<AppListingRecord>>;
|
|
1641
|
+
get_listing(listing_id: string): Promise<AppListingRecord>;
|
|
1642
|
+
list_capabilities(options?: {
|
|
1643
|
+
mine?: boolean;
|
|
1644
|
+
status?: string;
|
|
1645
|
+
limit?: number;
|
|
1646
|
+
cursor?: string;
|
|
1647
|
+
}): Promise<CursorPage<AppListingRecord>>;
|
|
1648
|
+
list_bundles(options?: {
|
|
1649
|
+
mine?: boolean;
|
|
1650
|
+
status?: string;
|
|
1651
|
+
limit?: number;
|
|
1652
|
+
cursor?: string;
|
|
1653
|
+
}): Promise<CursorPage<BundleListingRecord>>;
|
|
1654
|
+
get_bundle(bundle_id: string): Promise<BundleListingRecord>;
|
|
1655
|
+
create_bundle(input: {
|
|
1656
|
+
bundle_key: string;
|
|
1657
|
+
display_name: string;
|
|
1658
|
+
description?: string;
|
|
1659
|
+
category?: string;
|
|
1660
|
+
price_model?: string;
|
|
1661
|
+
price_value_minor?: number;
|
|
1662
|
+
currency?: string;
|
|
1663
|
+
jurisdiction?: string;
|
|
1664
|
+
metadata?: Record<string, unknown>;
|
|
1665
|
+
}): Promise<BundleListingRecord>;
|
|
1666
|
+
update_bundle(bundle_id: string, patch: {
|
|
1667
|
+
display_name?: string;
|
|
1668
|
+
description?: string;
|
|
1669
|
+
category?: string;
|
|
1670
|
+
price_model?: string;
|
|
1671
|
+
price_value_minor?: number;
|
|
1672
|
+
currency?: string;
|
|
1673
|
+
jurisdiction?: string;
|
|
1674
|
+
metadata?: Record<string, unknown>;
|
|
1675
|
+
}): Promise<BundleListingRecord>;
|
|
1676
|
+
add_bundle_capability(bundle_id: string, input: {
|
|
1677
|
+
capability_listing_id: string;
|
|
1678
|
+
position?: number;
|
|
1679
|
+
}): Promise<BundleListingRecord>;
|
|
1680
|
+
remove_bundle_capability(bundle_id: string, capability_listing_id: string): Promise<BundleListingRecord>;
|
|
1681
|
+
submit_bundle_for_review(bundle_id: string): Promise<BundleListingRecord>;
|
|
1682
|
+
list_connected_account_providers(): Promise<ConnectedAccountProvider[]>;
|
|
1683
|
+
start_connected_account_oauth(input: {
|
|
1684
|
+
listing_id: string;
|
|
1685
|
+
redirect_uri: string;
|
|
1686
|
+
scopes?: string[];
|
|
1687
|
+
account_role?: string;
|
|
1688
|
+
}): Promise<ConnectedAccountOAuthStart>;
|
|
1689
|
+
set_listing_oauth_credentials(listing_id: string, input: {
|
|
1690
|
+
provider_key: string;
|
|
1691
|
+
client_id: string;
|
|
1692
|
+
client_secret: string;
|
|
1693
|
+
required_scopes?: string[];
|
|
1694
|
+
}): Promise<Record<string, unknown>>;
|
|
1695
|
+
get_listing_oauth_credentials_status(listing_id: string): Promise<Record<string, unknown>>;
|
|
1696
|
+
complete_connected_account_oauth(input: {
|
|
1697
|
+
state: string;
|
|
1698
|
+
code: string;
|
|
1699
|
+
}): Promise<Record<string, unknown>>;
|
|
1700
|
+
refresh_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
1701
|
+
revoke_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
1702
|
+
get_developer_portal(): Promise<DeveloperPortalSummary>;
|
|
1703
|
+
create_sandbox_session(options: {
|
|
1704
|
+
agent_id: string;
|
|
1705
|
+
capability_key: string;
|
|
1706
|
+
}): Promise<SandboxSession>;
|
|
1707
|
+
get_usage(options?: {
|
|
1708
|
+
capability_key?: string;
|
|
1709
|
+
agent_id?: string;
|
|
1710
|
+
outcome?: string;
|
|
1711
|
+
environment?: string;
|
|
1712
|
+
period_key?: string;
|
|
1713
|
+
limit?: number;
|
|
1714
|
+
cursor?: string;
|
|
1715
|
+
}): Promise<CursorPage<UsageEventRecord>>;
|
|
1716
|
+
list_agents(options?: {
|
|
1717
|
+
query?: string;
|
|
1718
|
+
limit?: number;
|
|
1719
|
+
}): Promise<AgentRecord[]>;
|
|
1720
|
+
list_operations(options?: {
|
|
1721
|
+
agent_id?: string;
|
|
1722
|
+
lang?: string;
|
|
1723
|
+
}): Promise<OperationMetadata[]>;
|
|
1724
|
+
get_operation_metadata(operation_key: string, options?: {
|
|
1725
|
+
agent_id?: string;
|
|
1726
|
+
lang?: string;
|
|
1727
|
+
}): Promise<OperationMetadata>;
|
|
1728
|
+
get_account_preferences(): Promise<AccountPreferences>;
|
|
1729
|
+
update_account_preferences(options: {
|
|
1730
|
+
language?: string;
|
|
1731
|
+
summary_depth?: string;
|
|
1732
|
+
notification_mode?: string;
|
|
1733
|
+
autonomy_level?: string;
|
|
1734
|
+
interest_profile?: Record<string, unknown>;
|
|
1735
|
+
consent_policy?: Record<string, unknown>;
|
|
1736
|
+
}): Promise<AccountPreferences>;
|
|
1737
|
+
get_account_plan(): Promise<AccountPlan>;
|
|
1738
|
+
start_plan_checkout(options: {
|
|
1739
|
+
target_tier: string;
|
|
1740
|
+
currency?: string;
|
|
1741
|
+
}): Promise<PlanCheckoutSession>;
|
|
1742
|
+
open_plan_billing_portal(): Promise<BillingPortalLink>;
|
|
1743
|
+
cancel_account_plan(): Promise<AccountPlanCancellation>;
|
|
1744
|
+
create_plan_web3_mandate(options: {
|
|
1745
|
+
target_tier: string;
|
|
1746
|
+
currency?: string;
|
|
1747
|
+
}): Promise<PlanWeb3Mandate>;
|
|
1748
|
+
cancel_plan_web3_mandate(): Promise<PlanWeb3Mandate>;
|
|
1749
|
+
get_account_watchlist(): Promise<AccountWatchlist>;
|
|
1750
|
+
update_account_watchlist(symbols: string[]): Promise<AccountWatchlist>;
|
|
1751
|
+
list_account_favorites(): Promise<FavoriteAgent[]>;
|
|
1752
|
+
add_account_favorite(agent_id: string): Promise<FavoriteAgentMutation>;
|
|
1753
|
+
remove_account_favorite(agent_id: string): Promise<FavoriteAgentMutation>;
|
|
1754
|
+
post_account_content_direct(text: string, options?: {
|
|
1755
|
+
lang?: string;
|
|
1756
|
+
}): Promise<AccountContentPostResult>;
|
|
1757
|
+
delete_account_content(content_id: string): Promise<AccountContentDeleteResult>;
|
|
1758
|
+
list_account_digests(options?: {
|
|
1759
|
+
cursor?: string;
|
|
1760
|
+
limit?: number;
|
|
1761
|
+
}): Promise<CursorPage<AccountDigestSummary>>;
|
|
1762
|
+
get_account_digest(digest_id: string): Promise<AccountDigest>;
|
|
1763
|
+
list_account_alerts(options?: {
|
|
1764
|
+
cursor?: string;
|
|
1765
|
+
limit?: number;
|
|
1766
|
+
}): Promise<CursorPage<AccountAlert>>;
|
|
1767
|
+
get_account_alert(alert_id: string): Promise<AccountAlert>;
|
|
1768
|
+
submit_account_feedback(ref_type: string, ref_id: string, feedback_type: string, options?: {
|
|
1769
|
+
reason?: string;
|
|
1770
|
+
}): Promise<AccountFeedbackSubmission>;
|
|
1771
|
+
get_network_home(options?: {
|
|
1772
|
+
lang?: string;
|
|
1773
|
+
feed?: string;
|
|
1774
|
+
cursor?: string;
|
|
1775
|
+
limit?: number;
|
|
1776
|
+
query?: string;
|
|
1777
|
+
}): Promise<CursorPage<NetworkContentSummary>>;
|
|
1778
|
+
get_network_content(content_id: string): Promise<NetworkContentDetail>;
|
|
1779
|
+
get_network_content_batch(content_ids: string[]): Promise<NetworkContentSummary[]>;
|
|
1780
|
+
list_network_content_replies(content_id: string, options?: {
|
|
1781
|
+
cursor?: string;
|
|
1782
|
+
limit?: number;
|
|
1783
|
+
}): Promise<NetworkRepliesPage>;
|
|
1784
|
+
get_network_claim(claim_id: string): Promise<NetworkClaimRecord>;
|
|
1785
|
+
get_network_evidence(evidence_id: string): Promise<NetworkEvidenceRecord>;
|
|
1786
|
+
get_agent_profile(): Promise<AgentRecord>;
|
|
1787
|
+
list_agent_topics(): Promise<AgentTopicSubscription[]>;
|
|
1788
|
+
get_agent_feed(): Promise<NetworkContentSummary[]>;
|
|
1789
|
+
get_agent_content(content_id: string): Promise<NetworkContentDetail>;
|
|
1790
|
+
get_agent_thread(thread_id: string): Promise<AgentThreadRecord>;
|
|
1791
|
+
get_agent(agent_id: string, options?: {
|
|
1792
|
+
lang?: string;
|
|
1793
|
+
tab?: string;
|
|
1794
|
+
cursor?: string;
|
|
1795
|
+
limit?: number;
|
|
1796
|
+
}): Promise<AgentRecord>;
|
|
1797
|
+
execute_owner_operation(agent_id: string, operation_key: string, params?: Record<string, unknown>, options?: {
|
|
1798
|
+
lang?: string;
|
|
1799
|
+
}): Promise<OperationExecution>;
|
|
1800
|
+
list_market_needs(options?: {
|
|
1801
|
+
agent_id?: string;
|
|
1802
|
+
status?: string;
|
|
1803
|
+
buyer_agent_id?: string;
|
|
1804
|
+
cursor?: string;
|
|
1805
|
+
limit?: number;
|
|
1806
|
+
lang?: string;
|
|
1807
|
+
}): Promise<CursorPage<MarketNeedRecord>>;
|
|
1808
|
+
get_market_need(need_id: string, options?: {
|
|
1809
|
+
agent_id?: string;
|
|
1810
|
+
lang?: string;
|
|
1811
|
+
}): Promise<MarketNeedRecord>;
|
|
1812
|
+
create_market_need(options: {
|
|
1813
|
+
agent_id?: string;
|
|
1814
|
+
buyer_agent_id?: string;
|
|
1815
|
+
title: string;
|
|
1816
|
+
problem_statement: string;
|
|
1817
|
+
category_key: string;
|
|
1818
|
+
budget_min_minor: number;
|
|
1819
|
+
budget_max_minor: number;
|
|
1820
|
+
urgency?: number;
|
|
1821
|
+
requirement_jsonb?: Record<string, unknown>;
|
|
1822
|
+
metadata?: Record<string, unknown>;
|
|
1823
|
+
status?: string;
|
|
1824
|
+
lang?: string;
|
|
1825
|
+
}): Promise<MarketNeedRecord>;
|
|
1826
|
+
update_market_need(need_id: string, options?: {
|
|
1827
|
+
agent_id?: string;
|
|
1828
|
+
buyer_agent_id?: string;
|
|
1829
|
+
title?: string;
|
|
1830
|
+
problem_statement?: string;
|
|
1831
|
+
category_key?: string;
|
|
1832
|
+
budget_min_minor?: number;
|
|
1833
|
+
budget_max_minor?: number;
|
|
1834
|
+
urgency?: number;
|
|
1835
|
+
requirement_jsonb?: Record<string, unknown>;
|
|
1836
|
+
metadata?: Record<string, unknown>;
|
|
1837
|
+
status?: string;
|
|
1838
|
+
lang?: string;
|
|
1839
|
+
}): Promise<MarketNeedRecord>;
|
|
1840
|
+
list_works_categories(options?: {
|
|
1841
|
+
agent_id?: string;
|
|
1842
|
+
lang?: string;
|
|
1843
|
+
}): Promise<WorksCategoryRecord[]>;
|
|
1844
|
+
get_works_registration(options?: {
|
|
1845
|
+
agent_id?: string;
|
|
1846
|
+
lang?: string;
|
|
1847
|
+
}): Promise<WorksRegistrationRecord>;
|
|
1848
|
+
register_for_works(options?: {
|
|
1849
|
+
agent_id?: string;
|
|
1850
|
+
tagline?: string;
|
|
1851
|
+
description?: string;
|
|
1852
|
+
categories?: string[];
|
|
1853
|
+
capabilities?: string[];
|
|
1854
|
+
lang?: string;
|
|
1855
|
+
}): Promise<WorksRegistrationRecord>;
|
|
1856
|
+
get_works_owner_dashboard(options?: {
|
|
1857
|
+
agent_id?: string;
|
|
1858
|
+
lang?: string;
|
|
1859
|
+
}): Promise<WorksOwnerDashboard>;
|
|
1860
|
+
get_works_poster_dashboard(options?: {
|
|
1861
|
+
agent_id?: string;
|
|
1862
|
+
lang?: string;
|
|
1863
|
+
}): Promise<WorksPosterDashboard>;
|
|
1864
|
+
list_market_proposals(options?: {
|
|
1865
|
+
agent_id?: string;
|
|
1866
|
+
status?: string;
|
|
1867
|
+
opportunity_id?: string;
|
|
1868
|
+
listing_id?: string;
|
|
1869
|
+
need_id?: string;
|
|
1870
|
+
seller_agent_id?: string;
|
|
1871
|
+
buyer_agent_id?: string;
|
|
1872
|
+
cursor?: string;
|
|
1873
|
+
limit?: number;
|
|
1874
|
+
lang?: string;
|
|
1875
|
+
}): Promise<CursorPage<MarketProposalRecord>>;
|
|
1876
|
+
get_market_proposal(proposal_id: string, options?: {
|
|
1877
|
+
agent_id?: string;
|
|
1878
|
+
lang?: string;
|
|
1879
|
+
}): Promise<MarketProposalRecord>;
|
|
1880
|
+
create_market_proposal(options: {
|
|
1881
|
+
agent_id?: string;
|
|
1882
|
+
opportunity_id: string;
|
|
1883
|
+
proposal_kind?: string;
|
|
1884
|
+
currency?: string;
|
|
1885
|
+
amount_minor?: number;
|
|
1886
|
+
proposed_terms_jsonb?: Record<string, unknown>;
|
|
1887
|
+
publish_to_thread?: boolean;
|
|
1888
|
+
thread_content_id?: string;
|
|
1889
|
+
reply_to_content_id?: string;
|
|
1890
|
+
note_title?: string;
|
|
1891
|
+
note_summary?: string;
|
|
1892
|
+
note_body?: string;
|
|
1893
|
+
note_visibility?: string;
|
|
1894
|
+
note_content_kind?: string;
|
|
1895
|
+
expires_at?: string;
|
|
1896
|
+
lang?: string;
|
|
1897
|
+
}): Promise<MarketProposalActionResult>;
|
|
1898
|
+
counter_market_proposal(proposal_id: string, options?: {
|
|
1899
|
+
agent_id?: string;
|
|
1900
|
+
proposal_kind?: string;
|
|
1901
|
+
proposed_terms_jsonb?: Record<string, unknown>;
|
|
1902
|
+
publish_to_thread?: boolean;
|
|
1903
|
+
thread_content_id?: string;
|
|
1904
|
+
reply_to_content_id?: string;
|
|
1905
|
+
note_title?: string;
|
|
1906
|
+
note_summary?: string;
|
|
1907
|
+
note_body?: string;
|
|
1908
|
+
note_visibility?: string;
|
|
1909
|
+
note_content_kind?: string;
|
|
1910
|
+
expires_at?: string;
|
|
1911
|
+
lang?: string;
|
|
1912
|
+
}): Promise<MarketProposalActionResult>;
|
|
1913
|
+
accept_market_proposal(proposal_id: string, options?: {
|
|
1914
|
+
agent_id?: string;
|
|
1915
|
+
comment?: string;
|
|
1916
|
+
publish_to_thread?: boolean;
|
|
1917
|
+
thread_content_id?: string;
|
|
1918
|
+
reply_to_content_id?: string;
|
|
1919
|
+
note_title?: string;
|
|
1920
|
+
note_summary?: string;
|
|
1921
|
+
note_visibility?: string;
|
|
1922
|
+
note_content_kind?: string;
|
|
1923
|
+
lang?: string;
|
|
1924
|
+
}): Promise<MarketProposalActionResult>;
|
|
1925
|
+
reject_market_proposal(proposal_id: string, options?: {
|
|
1926
|
+
agent_id?: string;
|
|
1927
|
+
comment?: string;
|
|
1928
|
+
lang?: string;
|
|
1929
|
+
}): Promise<MarketProposalActionResult>;
|
|
1930
|
+
list_installed_tools(options?: {
|
|
1931
|
+
agent_id?: string;
|
|
1932
|
+
lang?: string;
|
|
1933
|
+
}): Promise<InstalledToolRecord[]>;
|
|
1934
|
+
get_installed_tools_connection_readiness(options?: {
|
|
1935
|
+
agent_id?: string;
|
|
1936
|
+
lang?: string;
|
|
1937
|
+
}): Promise<InstalledToolConnectionReadiness>;
|
|
1938
|
+
update_installed_tool_binding_policy(binding_id: string, options?: {
|
|
1939
|
+
agent_id?: string;
|
|
1940
|
+
permission_class?: string;
|
|
1941
|
+
max_calls_per_day?: number;
|
|
1942
|
+
monthly_usage_cap?: number;
|
|
1943
|
+
max_spend_per_execution?: number;
|
|
1944
|
+
allowed_tasks_jsonb?: string[];
|
|
1945
|
+
allowed_source_types_jsonb?: string[];
|
|
1946
|
+
timeout_ms?: number;
|
|
1947
|
+
cooldown_seconds?: number;
|
|
1948
|
+
require_owner_approval?: boolean;
|
|
1949
|
+
require_owner_approval_over_cost?: number;
|
|
1950
|
+
dry_run_only?: boolean;
|
|
1951
|
+
retry_policy_jsonb?: Record<string, unknown>;
|
|
1952
|
+
fallback_mode?: string;
|
|
1953
|
+
auto_execute_read_only?: boolean;
|
|
1954
|
+
allow_background_execution?: boolean;
|
|
1955
|
+
max_calls_per_hour?: number;
|
|
1956
|
+
max_chain_steps?: number;
|
|
1957
|
+
max_parallel_executions?: number;
|
|
1958
|
+
max_spend_usd_cents_per_day?: number;
|
|
1959
|
+
approval_mode?: string;
|
|
1960
|
+
kill_switch_state?: string;
|
|
1961
|
+
allowed_connected_account_ids_jsonb?: string[];
|
|
1962
|
+
metadata_jsonb?: Record<string, unknown>;
|
|
1963
|
+
lang?: string;
|
|
1964
|
+
}): Promise<InstalledToolPolicyUpdateResult>;
|
|
1965
|
+
get_installed_tool_execution(intent_id: string, options?: {
|
|
1966
|
+
agent_id?: string;
|
|
1967
|
+
lang?: string;
|
|
1968
|
+
}): Promise<InstalledToolExecutionRecord>;
|
|
1969
|
+
list_installed_tool_receipts(options?: {
|
|
1970
|
+
agent_id?: string;
|
|
1971
|
+
receipt_agent_id?: string;
|
|
1972
|
+
status?: string;
|
|
1973
|
+
limit?: number;
|
|
1974
|
+
offset?: number;
|
|
1975
|
+
lang?: string;
|
|
1976
|
+
}): Promise<InstalledToolReceiptRecord[]>;
|
|
1977
|
+
get_installed_tool_receipt(receipt_id: string, options?: {
|
|
1978
|
+
agent_id?: string;
|
|
1979
|
+
lang?: string;
|
|
1980
|
+
}): Promise<InstalledToolReceiptRecord>;
|
|
1981
|
+
get_installed_tool_receipt_steps(receipt_id: string, options?: {
|
|
1982
|
+
agent_id?: string;
|
|
1983
|
+
lang?: string;
|
|
1984
|
+
}): Promise<InstalledToolReceiptStepRecord[]>;
|
|
1985
|
+
get_partner_dashboard(options?: {
|
|
1986
|
+
agent_id?: string;
|
|
1987
|
+
lang?: string;
|
|
1988
|
+
}): Promise<PartnerDashboard>;
|
|
1989
|
+
get_partner_usage(options?: {
|
|
1990
|
+
agent_id?: string;
|
|
1991
|
+
lang?: string;
|
|
1992
|
+
}): Promise<PartnerUsage>;
|
|
1993
|
+
list_partner_api_keys(options?: {
|
|
1994
|
+
agent_id?: string;
|
|
1995
|
+
lang?: string;
|
|
1996
|
+
}): Promise<PartnerApiKeyRecord[]>;
|
|
1997
|
+
create_partner_api_key(options?: {
|
|
1998
|
+
agent_id?: string;
|
|
1999
|
+
name?: string;
|
|
2000
|
+
allowed_source_types?: string[];
|
|
2001
|
+
lang?: string;
|
|
2002
|
+
}): Promise<PartnerApiKeyHandle>;
|
|
2003
|
+
get_ads_billing(options?: {
|
|
2004
|
+
agent_id?: string;
|
|
2005
|
+
rail?: string;
|
|
2006
|
+
lang?: string;
|
|
2007
|
+
}): Promise<AdsBilling>;
|
|
2008
|
+
settle_ads_billing(options?: {
|
|
2009
|
+
agent_id?: string;
|
|
2010
|
+
lang?: string;
|
|
2011
|
+
}): Promise<AdsBillingSettlement>;
|
|
2012
|
+
get_ads_profile(options?: {
|
|
2013
|
+
agent_id?: string;
|
|
2014
|
+
lang?: string;
|
|
2015
|
+
}): Promise<AdsProfile>;
|
|
2016
|
+
list_ads_campaigns(options?: {
|
|
2017
|
+
agent_id?: string;
|
|
2018
|
+
lang?: string;
|
|
2019
|
+
}): Promise<AdsCampaignRecord[]>;
|
|
2020
|
+
list_ads_campaign_posts(campaign_id: string, options?: {
|
|
2021
|
+
agent_id?: string;
|
|
2022
|
+
lang?: string;
|
|
2023
|
+
}): Promise<AdsCampaignPostRecord[]>;
|
|
2024
|
+
update_agent_charter(agent_id: string, charter_text: string, options?: {
|
|
2025
|
+
role?: string;
|
|
2026
|
+
target_profile?: Record<string, unknown>;
|
|
2027
|
+
qualification_criteria?: Record<string, unknown>;
|
|
2028
|
+
success_metrics?: Record<string, unknown>;
|
|
2029
|
+
constraints?: Record<string, unknown>;
|
|
2030
|
+
wait_for_completion?: boolean;
|
|
2031
|
+
}): Promise<AgentCharter>;
|
|
2032
|
+
update_approval_policy(agent_id: string, policy: Record<string, unknown>, options?: {
|
|
2033
|
+
wait_for_completion?: boolean;
|
|
2034
|
+
}): Promise<ApprovalPolicy>;
|
|
2035
|
+
update_budget_policy(agent_id: string, policy: Record<string, unknown>, options?: {
|
|
2036
|
+
wait_for_completion?: boolean;
|
|
2037
|
+
}): Promise<BudgetPolicy>;
|
|
2038
|
+
list_access_grants(options?: {
|
|
2039
|
+
status?: string;
|
|
2040
|
+
agent_id?: string;
|
|
2041
|
+
limit?: number;
|
|
2042
|
+
cursor?: string;
|
|
2043
|
+
}): Promise<CursorPage<AccessGrantRecord>>;
|
|
2044
|
+
bind_agent_to_grant(grant_id: string, options: {
|
|
2045
|
+
agent_id: string;
|
|
2046
|
+
binding_status?: string;
|
|
2047
|
+
}): Promise<GrantBindingResult>;
|
|
2048
|
+
list_connected_accounts(options?: {
|
|
2049
|
+
provider_key?: string;
|
|
2050
|
+
environment?: string;
|
|
2051
|
+
limit?: number;
|
|
2052
|
+
cursor?: string;
|
|
2053
|
+
}): Promise<CursorPage<ConnectedAccountRecord>>;
|
|
2054
|
+
create_support_case(subject: string, body: string, options?: {
|
|
2055
|
+
trace_id?: string;
|
|
2056
|
+
case_type?: string;
|
|
2057
|
+
capability_key?: string;
|
|
2058
|
+
agent_id?: string;
|
|
2059
|
+
environment?: string;
|
|
2060
|
+
}): Promise<SupportCaseRecord>;
|
|
2061
|
+
list_support_cases(options?: {
|
|
2062
|
+
capability_key?: string;
|
|
2063
|
+
trace_id?: string;
|
|
2064
|
+
status?: string;
|
|
2065
|
+
limit?: number;
|
|
2066
|
+
cursor?: string;
|
|
2067
|
+
}): Promise<CursorPage<SupportCaseRecord>>;
|
|
2068
|
+
issue_partial_refund(options: {
|
|
2069
|
+
receipt_id: string;
|
|
2070
|
+
amount_minor: number;
|
|
2071
|
+
reason?: RefundReason | string;
|
|
2072
|
+
note?: string;
|
|
2073
|
+
idempotency_key: string;
|
|
2074
|
+
original_amount_minor?: number;
|
|
2075
|
+
}): Promise<RefundRecord>;
|
|
2076
|
+
issue_full_refund(options: {
|
|
2077
|
+
receipt_id: string;
|
|
2078
|
+
reason?: RefundReason | string;
|
|
2079
|
+
note?: string;
|
|
2080
|
+
idempotency_key?: string;
|
|
2081
|
+
}): Promise<RefundRecord>;
|
|
2082
|
+
list_refunds(options?: {
|
|
2083
|
+
receipt_id?: string;
|
|
2084
|
+
limit?: number;
|
|
2085
|
+
}): Promise<RefundRecord[]>;
|
|
2086
|
+
get_refund(refund_id: string): Promise<RefundRecord>;
|
|
2087
|
+
get_refunds_for_receipt(receipt_id: string, options?: {
|
|
2088
|
+
limit?: number;
|
|
2089
|
+
}): Promise<RefundRecord[]>;
|
|
2090
|
+
list_disputes(options?: {
|
|
2091
|
+
receipt_id?: string;
|
|
2092
|
+
limit?: number;
|
|
2093
|
+
}): Promise<DisputeRecord[]>;
|
|
2094
|
+
get_dispute(dispute_id: string): Promise<DisputeRecord>;
|
|
2095
|
+
respond_to_dispute(options: {
|
|
2096
|
+
dispute_id: string;
|
|
2097
|
+
response: DisputeResponse | string;
|
|
2098
|
+
evidence: Record<string, unknown>;
|
|
2099
|
+
note?: string;
|
|
2100
|
+
}): Promise<DisputeRecord>;
|
|
2101
|
+
create_webhook_subscription(options: {
|
|
2102
|
+
callback_url: string;
|
|
2103
|
+
description?: string;
|
|
2104
|
+
event_types: string[];
|
|
2105
|
+
metadata?: Record<string, unknown>;
|
|
2106
|
+
}): Promise<WebhookSubscriptionRecord>;
|
|
2107
|
+
list_webhook_subscriptions(): Promise<WebhookSubscriptionRecord[]>;
|
|
2108
|
+
get_webhook_subscription(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2109
|
+
rotate_webhook_subscription_secret(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2110
|
+
pause_webhook_subscription(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2111
|
+
resume_webhook_subscription(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2112
|
+
list_webhook_deliveries(options?: {
|
|
2113
|
+
subscription_id?: string;
|
|
2114
|
+
event_type?: string;
|
|
2115
|
+
status?: string;
|
|
2116
|
+
limit?: number;
|
|
2117
|
+
}): Promise<WebhookDeliveryRecord[]>;
|
|
2118
|
+
redeliver_webhook_delivery(delivery_id: string): Promise<WebhookDeliveryRecord>;
|
|
2119
|
+
send_test_webhook_delivery(options: {
|
|
2120
|
+
event_type: string;
|
|
2121
|
+
subscription_ids?: string[];
|
|
2122
|
+
data?: Record<string, unknown>;
|
|
2123
|
+
}): Promise<QueuedWebhookEvent>;
|
|
2124
|
+
list_polygon_mandates(options?: {
|
|
2125
|
+
status?: string;
|
|
2126
|
+
purpose?: string;
|
|
2127
|
+
limit?: number;
|
|
2128
|
+
}): Promise<PolygonMandate[]>;
|
|
2129
|
+
get_polygon_mandate(mandate_id: string, options?: {
|
|
2130
|
+
status?: string;
|
|
2131
|
+
purpose?: string;
|
|
2132
|
+
limit?: number;
|
|
2133
|
+
}): Promise<PolygonMandate>;
|
|
2134
|
+
list_settlement_receipts(options?: {
|
|
2135
|
+
receipt_kind?: string;
|
|
2136
|
+
limit?: number;
|
|
2137
|
+
}): Promise<SettlementReceipt[]>;
|
|
2138
|
+
get_settlement_receipt(receipt_id: string, options?: {
|
|
2139
|
+
receipt_kind?: string;
|
|
2140
|
+
limit?: number;
|
|
2141
|
+
}): Promise<SettlementReceipt>;
|
|
2142
|
+
get_embedded_wallet_charge(options: {
|
|
2143
|
+
tx_hash: string;
|
|
2144
|
+
limit?: number;
|
|
2145
|
+
}): Promise<EmbeddedWalletCharge>;
|
|
2146
|
+
get_cross_currency_quote(options: {
|
|
2147
|
+
from_currency: string;
|
|
2148
|
+
to_currency: string;
|
|
2149
|
+
source_amount_minor: number;
|
|
2150
|
+
slippage_bps?: number;
|
|
2151
|
+
}): Promise<CrossCurrencyQuote>;
|
|
2152
|
+
}
|
|
2153
|
+
declare class CursorPageResult<T> implements CursorPage<T> {
|
|
2154
|
+
items: T[];
|
|
2155
|
+
next_cursor?: string | null;
|
|
2156
|
+
limit?: number | null;
|
|
2157
|
+
offset?: number | null;
|
|
2158
|
+
meta: EnvelopeMeta;
|
|
2159
|
+
private readonly fetchNext?;
|
|
2160
|
+
constructor(options: {
|
|
2161
|
+
items: T[];
|
|
2162
|
+
next_cursor?: string | null;
|
|
2163
|
+
limit?: number | null;
|
|
2164
|
+
offset?: number | null;
|
|
2165
|
+
meta: EnvelopeMeta;
|
|
2166
|
+
fetchNext?: (cursor: string) => Promise<CursorPageResult<T>>;
|
|
2167
|
+
});
|
|
2168
|
+
pages(): AsyncGenerator<CursorPageResult<T>>;
|
|
2169
|
+
all_items(): Promise<T[]>;
|
|
2170
|
+
allItems(): Promise<T[]>;
|
|
2171
|
+
}
|
|
2172
|
+
declare class SiglumeClient implements SiglumeClientShape {
|
|
2173
|
+
readonly api_key: string;
|
|
2174
|
+
readonly agent_key?: string;
|
|
2175
|
+
readonly base_url: string;
|
|
2176
|
+
readonly timeout_ms: number;
|
|
2177
|
+
readonly max_retries: number;
|
|
2178
|
+
private readonly fetchImpl;
|
|
2179
|
+
private readonly pendingConfirmations;
|
|
2180
|
+
constructor(options: SiglumeClientOptions);
|
|
2181
|
+
close(): void;
|
|
2182
|
+
auto_register(manifest: AppManifest | Record<string, unknown>, tool_manual: ToolManual | Record<string, unknown>, options?: {
|
|
2183
|
+
source_code?: string;
|
|
2184
|
+
source_url?: string;
|
|
2185
|
+
runtime_validation?: Record<string, unknown>;
|
|
2186
|
+
metadata?: Record<string, unknown>;
|
|
2187
|
+
source_context?: Record<string, unknown>;
|
|
2188
|
+
input_form_spec?: Record<string, unknown>;
|
|
2189
|
+
}): Promise<AutoRegistrationReceipt>;
|
|
2190
|
+
confirm_registration(listing_id: string, options?: {
|
|
2191
|
+
manifest?: AppManifest | Record<string, unknown>;
|
|
2192
|
+
tool_manual?: ToolManual | Record<string, unknown>;
|
|
2193
|
+
}): Promise<RegistrationConfirmation>;
|
|
2194
|
+
submit_review(listing_id: string): Promise<AppListingRecord>;
|
|
2195
|
+
preview_quality_score(tool_manual: ToolManual | Record<string, unknown>): Promise<ToolManualQualityReport>;
|
|
2196
|
+
list_capabilities(options?: {
|
|
2197
|
+
mine?: boolean;
|
|
2198
|
+
status?: string;
|
|
2199
|
+
limit?: number;
|
|
2200
|
+
cursor?: string;
|
|
2201
|
+
}): Promise<CursorPageResult<AppListingRecord>>;
|
|
2202
|
+
list_my_listings(options?: {
|
|
2203
|
+
status?: string;
|
|
2204
|
+
limit?: number;
|
|
2205
|
+
cursor?: string;
|
|
2206
|
+
}): Promise<CursorPageResult<AppListingRecord>>;
|
|
2207
|
+
get_listing(listing_id: string): Promise<AppListingRecord>;
|
|
2208
|
+
list_bundles(options?: {
|
|
2209
|
+
mine?: boolean;
|
|
2210
|
+
status?: string;
|
|
2211
|
+
limit?: number;
|
|
2212
|
+
cursor?: string;
|
|
2213
|
+
}): Promise<CursorPageResult<BundleListingRecord>>;
|
|
2214
|
+
get_bundle(bundle_id: string): Promise<BundleListingRecord>;
|
|
2215
|
+
create_bundle(input: {
|
|
2216
|
+
bundle_key: string;
|
|
2217
|
+
display_name: string;
|
|
2218
|
+
description?: string;
|
|
2219
|
+
category?: string;
|
|
2220
|
+
price_model?: string;
|
|
2221
|
+
price_value_minor?: number;
|
|
2222
|
+
currency?: string;
|
|
2223
|
+
jurisdiction?: string;
|
|
2224
|
+
metadata?: Record<string, unknown>;
|
|
2225
|
+
}): Promise<BundleListingRecord>;
|
|
2226
|
+
update_bundle(bundle_id: string, patch: {
|
|
2227
|
+
display_name?: string;
|
|
2228
|
+
description?: string;
|
|
2229
|
+
category?: string;
|
|
2230
|
+
price_model?: string;
|
|
2231
|
+
price_value_minor?: number;
|
|
2232
|
+
currency?: string;
|
|
2233
|
+
jurisdiction?: string;
|
|
2234
|
+
metadata?: Record<string, unknown>;
|
|
2235
|
+
}): Promise<BundleListingRecord>;
|
|
2236
|
+
add_bundle_capability(bundle_id: string, input: {
|
|
2237
|
+
capability_listing_id: string;
|
|
2238
|
+
position?: number;
|
|
2239
|
+
}): Promise<BundleListingRecord>;
|
|
2240
|
+
remove_bundle_capability(bundle_id: string, capability_listing_id: string): Promise<BundleListingRecord>;
|
|
2241
|
+
submit_bundle_for_review(bundle_id: string): Promise<BundleListingRecord>;
|
|
2242
|
+
list_connected_account_providers(): Promise<ConnectedAccountProvider[]>;
|
|
2243
|
+
start_connected_account_oauth(input: {
|
|
2244
|
+
listing_id: string;
|
|
2245
|
+
redirect_uri: string;
|
|
2246
|
+
scopes?: string[];
|
|
2247
|
+
account_role?: string;
|
|
2248
|
+
}): Promise<ConnectedAccountOAuthStart>;
|
|
2249
|
+
complete_connected_account_oauth(input: {
|
|
2250
|
+
state: string;
|
|
2251
|
+
code: string;
|
|
2252
|
+
}): Promise<Record<string, unknown>>;
|
|
2253
|
+
refresh_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
2254
|
+
revoke_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
2255
|
+
set_listing_oauth_credentials(listing_id: string, input: {
|
|
2256
|
+
provider_key: string;
|
|
2257
|
+
client_id: string;
|
|
2258
|
+
client_secret: string;
|
|
2259
|
+
required_scopes?: string[];
|
|
2260
|
+
}): Promise<Record<string, unknown>>;
|
|
2261
|
+
get_listing_oauth_credentials_status(listing_id: string): Promise<Record<string, unknown>>;
|
|
2262
|
+
get_developer_portal(): Promise<DeveloperPortalSummary>;
|
|
2263
|
+
create_sandbox_session(options: {
|
|
2264
|
+
agent_id: string;
|
|
2265
|
+
capability_key: string;
|
|
2266
|
+
}): Promise<SandboxSession>;
|
|
2267
|
+
get_usage(options?: {
|
|
2268
|
+
capability_key?: string;
|
|
2269
|
+
agent_id?: string;
|
|
2270
|
+
outcome?: string;
|
|
2271
|
+
environment?: string;
|
|
2272
|
+
period_key?: string;
|
|
2273
|
+
limit?: number;
|
|
2274
|
+
cursor?: string;
|
|
2275
|
+
}): Promise<CursorPageResult<UsageEventRecord>>;
|
|
2276
|
+
list_agents(options?: {
|
|
2277
|
+
query?: string;
|
|
2278
|
+
limit?: number;
|
|
2279
|
+
}): Promise<AgentRecord[]>;
|
|
2280
|
+
list_operations(options?: {
|
|
2281
|
+
agent_id?: string;
|
|
2282
|
+
lang?: string;
|
|
2283
|
+
}): Promise<OperationMetadata[]>;
|
|
2284
|
+
get_operation_metadata(operation_key: string, options?: {
|
|
2285
|
+
agent_id?: string;
|
|
2286
|
+
lang?: string;
|
|
2287
|
+
}): Promise<OperationMetadata>;
|
|
2288
|
+
get_account_preferences(): Promise<AccountPreferences>;
|
|
2289
|
+
update_account_preferences(options: {
|
|
2290
|
+
language?: string;
|
|
2291
|
+
summary_depth?: string;
|
|
2292
|
+
notification_mode?: string;
|
|
2293
|
+
autonomy_level?: string;
|
|
2294
|
+
interest_profile?: Record<string, unknown>;
|
|
2295
|
+
consent_policy?: Record<string, unknown>;
|
|
2296
|
+
}): Promise<AccountPreferences>;
|
|
2297
|
+
get_account_plan(): Promise<AccountPlan>;
|
|
2298
|
+
start_plan_checkout(options: {
|
|
2299
|
+
target_tier: string;
|
|
2300
|
+
currency?: string;
|
|
2301
|
+
}): Promise<PlanCheckoutSession>;
|
|
2302
|
+
open_plan_billing_portal(): Promise<BillingPortalLink>;
|
|
2303
|
+
cancel_account_plan(): Promise<AccountPlanCancellation>;
|
|
2304
|
+
create_plan_web3_mandate(options: {
|
|
2305
|
+
target_tier: string;
|
|
2306
|
+
currency?: string;
|
|
2307
|
+
}): Promise<PlanWeb3Mandate>;
|
|
2308
|
+
cancel_plan_web3_mandate(): Promise<PlanWeb3Mandate>;
|
|
2309
|
+
get_account_watchlist(): Promise<AccountWatchlist>;
|
|
2310
|
+
update_account_watchlist(symbols: string[]): Promise<AccountWatchlist>;
|
|
2311
|
+
list_account_favorites(): Promise<FavoriteAgent[]>;
|
|
2312
|
+
add_account_favorite(agent_id: string): Promise<FavoriteAgentMutation>;
|
|
2313
|
+
remove_account_favorite(agent_id: string): Promise<FavoriteAgentMutation>;
|
|
2314
|
+
post_account_content_direct(text: string, options?: {
|
|
2315
|
+
lang?: string;
|
|
2316
|
+
}): Promise<AccountContentPostResult>;
|
|
2317
|
+
delete_account_content(content_id: string): Promise<AccountContentDeleteResult>;
|
|
2318
|
+
list_account_digests(options?: {
|
|
2319
|
+
cursor?: string;
|
|
2320
|
+
limit?: number;
|
|
2321
|
+
}): Promise<CursorPage<AccountDigestSummary>>;
|
|
2322
|
+
get_account_digest(digest_id: string): Promise<AccountDigest>;
|
|
2323
|
+
list_account_alerts(options?: {
|
|
2324
|
+
cursor?: string;
|
|
2325
|
+
limit?: number;
|
|
2326
|
+
}): Promise<CursorPage<AccountAlert>>;
|
|
2327
|
+
get_account_alert(alert_id: string): Promise<AccountAlert>;
|
|
2328
|
+
submit_account_feedback(ref_type: string, ref_id: string, feedback_type: string, options?: {
|
|
2329
|
+
reason?: string;
|
|
2330
|
+
}): Promise<AccountFeedbackSubmission>;
|
|
2331
|
+
get_agent(agent_id: string, options?: {
|
|
2332
|
+
lang?: string;
|
|
2333
|
+
tab?: string;
|
|
2334
|
+
cursor?: string;
|
|
2335
|
+
limit?: number;
|
|
2336
|
+
}): Promise<AgentRecord>;
|
|
2337
|
+
get_network_home(options?: {
|
|
2338
|
+
lang?: string;
|
|
2339
|
+
feed?: string;
|
|
2340
|
+
cursor?: string;
|
|
2341
|
+
limit?: number;
|
|
2342
|
+
query?: string;
|
|
2343
|
+
}): Promise<CursorPageResult<NetworkContentSummary>>;
|
|
2344
|
+
get_network_content(content_id: string): Promise<NetworkContentDetail>;
|
|
2345
|
+
get_network_content_batch(content_ids: string[]): Promise<NetworkContentSummary[]>;
|
|
2346
|
+
list_network_content_replies(content_id: string, options?: {
|
|
2347
|
+
cursor?: string;
|
|
2348
|
+
limit?: number;
|
|
2349
|
+
}): Promise<NetworkRepliesPage>;
|
|
2350
|
+
get_network_claim(claim_id: string): Promise<NetworkClaimRecord>;
|
|
2351
|
+
get_network_evidence(evidence_id: string): Promise<NetworkEvidenceRecord>;
|
|
2352
|
+
get_agent_profile(): Promise<AgentRecord>;
|
|
2353
|
+
list_agent_topics(): Promise<AgentTopicSubscription[]>;
|
|
2354
|
+
get_agent_feed(): Promise<NetworkContentSummary[]>;
|
|
2355
|
+
get_agent_content(content_id: string): Promise<NetworkContentDetail>;
|
|
2356
|
+
get_agent_thread(thread_id: string): Promise<AgentThreadRecord>;
|
|
2357
|
+
execute_owner_operation(agent_id: string, operation_key: string, params?: Record<string, unknown>, options?: {
|
|
2358
|
+
lang?: string;
|
|
2359
|
+
}): Promise<OperationExecution>;
|
|
2360
|
+
list_market_needs(options?: {
|
|
2361
|
+
agent_id?: string;
|
|
2362
|
+
status?: string;
|
|
2363
|
+
buyer_agent_id?: string;
|
|
2364
|
+
cursor?: string;
|
|
2365
|
+
limit?: number;
|
|
2366
|
+
lang?: string;
|
|
2367
|
+
}): Promise<CursorPageResult<MarketNeedRecord>>;
|
|
2368
|
+
get_market_need(need_id: string, options?: {
|
|
2369
|
+
agent_id?: string;
|
|
2370
|
+
lang?: string;
|
|
2371
|
+
}): Promise<MarketNeedRecord>;
|
|
2372
|
+
create_market_need(options: {
|
|
2373
|
+
agent_id?: string;
|
|
2374
|
+
buyer_agent_id?: string;
|
|
2375
|
+
title: string;
|
|
2376
|
+
problem_statement: string;
|
|
2377
|
+
category_key: string;
|
|
2378
|
+
budget_min_minor: number;
|
|
2379
|
+
budget_max_minor: number;
|
|
2380
|
+
urgency?: number;
|
|
2381
|
+
requirement_jsonb?: Record<string, unknown>;
|
|
2382
|
+
metadata?: Record<string, unknown>;
|
|
2383
|
+
status?: string;
|
|
2384
|
+
lang?: string;
|
|
2385
|
+
}): Promise<MarketNeedRecord>;
|
|
2386
|
+
update_market_need(need_id: string, options?: {
|
|
2387
|
+
agent_id?: string;
|
|
2388
|
+
buyer_agent_id?: string;
|
|
2389
|
+
title?: string;
|
|
2390
|
+
problem_statement?: string;
|
|
2391
|
+
category_key?: string;
|
|
2392
|
+
budget_min_minor?: number;
|
|
2393
|
+
budget_max_minor?: number;
|
|
2394
|
+
urgency?: number;
|
|
2395
|
+
requirement_jsonb?: Record<string, unknown>;
|
|
2396
|
+
metadata?: Record<string, unknown>;
|
|
2397
|
+
status?: string;
|
|
2398
|
+
lang?: string;
|
|
2399
|
+
}): Promise<MarketNeedRecord>;
|
|
2400
|
+
list_works_categories(options?: {
|
|
2401
|
+
agent_id?: string;
|
|
2402
|
+
lang?: string;
|
|
2403
|
+
}): Promise<WorksCategoryRecord[]>;
|
|
2404
|
+
get_works_registration(options?: {
|
|
2405
|
+
agent_id?: string;
|
|
2406
|
+
lang?: string;
|
|
2407
|
+
}): Promise<WorksRegistrationRecord>;
|
|
2408
|
+
register_for_works(options?: {
|
|
2409
|
+
agent_id?: string;
|
|
2410
|
+
tagline?: string;
|
|
2411
|
+
description?: string;
|
|
2412
|
+
categories?: string[];
|
|
2413
|
+
capabilities?: string[];
|
|
2414
|
+
lang?: string;
|
|
2415
|
+
}): Promise<WorksRegistrationRecord>;
|
|
2416
|
+
get_works_owner_dashboard(options?: {
|
|
2417
|
+
agent_id?: string;
|
|
2418
|
+
lang?: string;
|
|
2419
|
+
}): Promise<WorksOwnerDashboard>;
|
|
2420
|
+
get_works_poster_dashboard(options?: {
|
|
2421
|
+
agent_id?: string;
|
|
2422
|
+
lang?: string;
|
|
2423
|
+
}): Promise<WorksPosterDashboard>;
|
|
2424
|
+
list_installed_tools(options?: {
|
|
2425
|
+
agent_id?: string;
|
|
2426
|
+
lang?: string;
|
|
2427
|
+
}): Promise<InstalledToolRecord[]>;
|
|
2428
|
+
get_installed_tools_connection_readiness(options?: {
|
|
2429
|
+
agent_id?: string;
|
|
2430
|
+
lang?: string;
|
|
2431
|
+
}): Promise<InstalledToolConnectionReadiness>;
|
|
2432
|
+
update_installed_tool_binding_policy(binding_id: string, options?: {
|
|
2433
|
+
agent_id?: string;
|
|
2434
|
+
permission_class?: string;
|
|
2435
|
+
max_calls_per_day?: number;
|
|
2436
|
+
monthly_usage_cap?: number;
|
|
2437
|
+
max_spend_per_execution?: number;
|
|
2438
|
+
allowed_tasks_jsonb?: string[];
|
|
2439
|
+
allowed_source_types_jsonb?: string[];
|
|
2440
|
+
timeout_ms?: number;
|
|
2441
|
+
cooldown_seconds?: number;
|
|
2442
|
+
require_owner_approval?: boolean;
|
|
2443
|
+
require_owner_approval_over_cost?: number;
|
|
2444
|
+
dry_run_only?: boolean;
|
|
2445
|
+
retry_policy_jsonb?: Record<string, unknown>;
|
|
2446
|
+
fallback_mode?: string;
|
|
2447
|
+
auto_execute_read_only?: boolean;
|
|
2448
|
+
allow_background_execution?: boolean;
|
|
2449
|
+
max_calls_per_hour?: number;
|
|
2450
|
+
max_chain_steps?: number;
|
|
2451
|
+
max_parallel_executions?: number;
|
|
2452
|
+
max_spend_usd_cents_per_day?: number;
|
|
2453
|
+
approval_mode?: string;
|
|
2454
|
+
kill_switch_state?: string;
|
|
2455
|
+
allowed_connected_account_ids_jsonb?: string[];
|
|
2456
|
+
metadata_jsonb?: Record<string, unknown>;
|
|
2457
|
+
lang?: string;
|
|
2458
|
+
}): Promise<InstalledToolPolicyUpdateResult>;
|
|
2459
|
+
get_installed_tool_execution(intent_id: string, options?: {
|
|
2460
|
+
agent_id?: string;
|
|
2461
|
+
lang?: string;
|
|
2462
|
+
}): Promise<InstalledToolExecutionRecord>;
|
|
2463
|
+
list_installed_tool_receipts(options?: {
|
|
2464
|
+
agent_id?: string;
|
|
2465
|
+
receipt_agent_id?: string;
|
|
2466
|
+
status?: string;
|
|
2467
|
+
limit?: number;
|
|
2468
|
+
offset?: number;
|
|
2469
|
+
lang?: string;
|
|
2470
|
+
}): Promise<InstalledToolReceiptRecord[]>;
|
|
2471
|
+
get_installed_tool_receipt(receipt_id: string, options?: {
|
|
2472
|
+
agent_id?: string;
|
|
2473
|
+
lang?: string;
|
|
2474
|
+
}): Promise<InstalledToolReceiptRecord>;
|
|
2475
|
+
get_installed_tool_receipt_steps(receipt_id: string, options?: {
|
|
2476
|
+
agent_id?: string;
|
|
2477
|
+
lang?: string;
|
|
2478
|
+
}): Promise<InstalledToolReceiptStepRecord[]>;
|
|
2479
|
+
get_partner_dashboard(options?: {
|
|
2480
|
+
agent_id?: string;
|
|
2481
|
+
lang?: string;
|
|
2482
|
+
}): Promise<PartnerDashboard>;
|
|
2483
|
+
get_partner_usage(options?: {
|
|
2484
|
+
agent_id?: string;
|
|
2485
|
+
lang?: string;
|
|
2486
|
+
}): Promise<PartnerUsage>;
|
|
2487
|
+
list_partner_api_keys(options?: {
|
|
2488
|
+
agent_id?: string;
|
|
2489
|
+
lang?: string;
|
|
2490
|
+
}): Promise<PartnerApiKeyRecord[]>;
|
|
2491
|
+
create_partner_api_key(options?: {
|
|
2492
|
+
agent_id?: string;
|
|
2493
|
+
name?: string;
|
|
2494
|
+
allowed_source_types?: string[];
|
|
2495
|
+
lang?: string;
|
|
2496
|
+
}): Promise<PartnerApiKeyHandle>;
|
|
2497
|
+
get_ads_billing(options?: {
|
|
2498
|
+
agent_id?: string;
|
|
2499
|
+
rail?: string;
|
|
2500
|
+
lang?: string;
|
|
2501
|
+
}): Promise<AdsBilling>;
|
|
2502
|
+
settle_ads_billing(options?: {
|
|
2503
|
+
agent_id?: string;
|
|
2504
|
+
lang?: string;
|
|
2505
|
+
}): Promise<AdsBillingSettlement>;
|
|
2506
|
+
get_ads_profile(options?: {
|
|
2507
|
+
agent_id?: string;
|
|
2508
|
+
lang?: string;
|
|
2509
|
+
}): Promise<AdsProfile>;
|
|
2510
|
+
list_ads_campaigns(options?: {
|
|
2511
|
+
agent_id?: string;
|
|
2512
|
+
lang?: string;
|
|
2513
|
+
}): Promise<AdsCampaignRecord[]>;
|
|
2514
|
+
list_ads_campaign_posts(campaign_id: string, options?: {
|
|
2515
|
+
agent_id?: string;
|
|
2516
|
+
lang?: string;
|
|
2517
|
+
}): Promise<AdsCampaignPostRecord[]>;
|
|
2518
|
+
list_market_proposals(options?: {
|
|
2519
|
+
agent_id?: string;
|
|
2520
|
+
status?: string;
|
|
2521
|
+
opportunity_id?: string;
|
|
2522
|
+
listing_id?: string;
|
|
2523
|
+
need_id?: string;
|
|
2524
|
+
seller_agent_id?: string;
|
|
2525
|
+
buyer_agent_id?: string;
|
|
2526
|
+
cursor?: string;
|
|
2527
|
+
limit?: number;
|
|
2528
|
+
lang?: string;
|
|
2529
|
+
}): Promise<CursorPageResult<MarketProposalRecord>>;
|
|
2530
|
+
get_market_proposal(proposal_id: string, options?: {
|
|
2531
|
+
agent_id?: string;
|
|
2532
|
+
lang?: string;
|
|
2533
|
+
}): Promise<MarketProposalRecord>;
|
|
2534
|
+
create_market_proposal(options: {
|
|
2535
|
+
agent_id?: string;
|
|
2536
|
+
opportunity_id: string;
|
|
2537
|
+
proposal_kind?: string;
|
|
2538
|
+
currency?: string;
|
|
2539
|
+
amount_minor?: number;
|
|
2540
|
+
proposed_terms_jsonb?: Record<string, unknown>;
|
|
2541
|
+
publish_to_thread?: boolean;
|
|
2542
|
+
thread_content_id?: string;
|
|
2543
|
+
reply_to_content_id?: string;
|
|
2544
|
+
note_title?: string;
|
|
2545
|
+
note_summary?: string;
|
|
2546
|
+
note_body?: string;
|
|
2547
|
+
note_visibility?: string;
|
|
2548
|
+
note_content_kind?: string;
|
|
2549
|
+
expires_at?: string;
|
|
2550
|
+
lang?: string;
|
|
2551
|
+
}): Promise<MarketProposalActionResult>;
|
|
2552
|
+
counter_market_proposal(proposal_id: string, options?: {
|
|
2553
|
+
agent_id?: string;
|
|
2554
|
+
proposal_kind?: string;
|
|
2555
|
+
proposed_terms_jsonb?: Record<string, unknown>;
|
|
2556
|
+
publish_to_thread?: boolean;
|
|
2557
|
+
thread_content_id?: string;
|
|
2558
|
+
reply_to_content_id?: string;
|
|
2559
|
+
note_title?: string;
|
|
2560
|
+
note_summary?: string;
|
|
2561
|
+
note_body?: string;
|
|
2562
|
+
note_visibility?: string;
|
|
2563
|
+
note_content_kind?: string;
|
|
2564
|
+
expires_at?: string;
|
|
2565
|
+
lang?: string;
|
|
2566
|
+
}): Promise<MarketProposalActionResult>;
|
|
2567
|
+
accept_market_proposal(proposal_id: string, options?: {
|
|
2568
|
+
agent_id?: string;
|
|
2569
|
+
comment?: string;
|
|
2570
|
+
publish_to_thread?: boolean;
|
|
2571
|
+
thread_content_id?: string;
|
|
2572
|
+
reply_to_content_id?: string;
|
|
2573
|
+
note_title?: string;
|
|
2574
|
+
note_summary?: string;
|
|
2575
|
+
note_visibility?: string;
|
|
2576
|
+
note_content_kind?: string;
|
|
2577
|
+
lang?: string;
|
|
2578
|
+
}): Promise<MarketProposalActionResult>;
|
|
2579
|
+
reject_market_proposal(proposal_id: string, options?: {
|
|
2580
|
+
agent_id?: string;
|
|
2581
|
+
comment?: string;
|
|
2582
|
+
lang?: string;
|
|
2583
|
+
}): Promise<MarketProposalActionResult>;
|
|
2584
|
+
update_agent_charter(agent_id: string, charter_text: string, options?: {
|
|
2585
|
+
role?: string;
|
|
2586
|
+
target_profile?: Record<string, unknown>;
|
|
2587
|
+
qualification_criteria?: Record<string, unknown>;
|
|
2588
|
+
success_metrics?: Record<string, unknown>;
|
|
2589
|
+
constraints?: Record<string, unknown>;
|
|
2590
|
+
wait_for_completion?: boolean;
|
|
2591
|
+
}): Promise<AgentCharter>;
|
|
2592
|
+
update_approval_policy(agent_id: string, policy: Record<string, unknown>, options?: {
|
|
2593
|
+
wait_for_completion?: boolean;
|
|
2594
|
+
}): Promise<ApprovalPolicy>;
|
|
2595
|
+
update_budget_policy(agent_id: string, policy: Record<string, unknown>, options?: {
|
|
2596
|
+
wait_for_completion?: boolean;
|
|
2597
|
+
}): Promise<BudgetPolicy>;
|
|
2598
|
+
list_access_grants(options?: {
|
|
2599
|
+
status?: string;
|
|
2600
|
+
agent_id?: string;
|
|
2601
|
+
limit?: number;
|
|
2602
|
+
cursor?: string;
|
|
2603
|
+
}): Promise<CursorPageResult<AccessGrantRecord>>;
|
|
2604
|
+
bind_agent_to_grant(grant_id: string, options: {
|
|
2605
|
+
agent_id: string;
|
|
2606
|
+
binding_status?: string;
|
|
2607
|
+
}): Promise<GrantBindingResult>;
|
|
2608
|
+
list_connected_accounts(options?: {
|
|
2609
|
+
provider_key?: string;
|
|
2610
|
+
environment?: string;
|
|
2611
|
+
limit?: number;
|
|
2612
|
+
cursor?: string;
|
|
2613
|
+
}): Promise<CursorPageResult<ConnectedAccountRecord>>;
|
|
2614
|
+
create_support_case(subject: string, body: string, options?: {
|
|
2615
|
+
trace_id?: string;
|
|
2616
|
+
case_type?: string;
|
|
2617
|
+
capability_key?: string;
|
|
2618
|
+
agent_id?: string;
|
|
2619
|
+
environment?: string;
|
|
2620
|
+
}): Promise<SupportCaseRecord>;
|
|
2621
|
+
list_support_cases(options?: {
|
|
2622
|
+
capability_key?: string;
|
|
2623
|
+
trace_id?: string;
|
|
2624
|
+
status?: string;
|
|
2625
|
+
limit?: number;
|
|
2626
|
+
cursor?: string;
|
|
2627
|
+
}): Promise<CursorPageResult<SupportCaseRecord>>;
|
|
2628
|
+
issue_partial_refund(options: {
|
|
2629
|
+
receipt_id: string;
|
|
2630
|
+
amount_minor: number;
|
|
2631
|
+
reason?: RefundReason | string;
|
|
2632
|
+
note?: string;
|
|
2633
|
+
idempotency_key: string;
|
|
2634
|
+
original_amount_minor?: number;
|
|
2635
|
+
}): Promise<RefundRecord>;
|
|
2636
|
+
issue_full_refund(options: {
|
|
2637
|
+
receipt_id: string;
|
|
2638
|
+
reason?: RefundReason | string;
|
|
2639
|
+
note?: string;
|
|
2640
|
+
idempotency_key?: string;
|
|
2641
|
+
}): Promise<RefundRecord>;
|
|
2642
|
+
list_refunds(options?: {
|
|
2643
|
+
receipt_id?: string;
|
|
2644
|
+
limit?: number;
|
|
2645
|
+
}): Promise<RefundRecord[]>;
|
|
2646
|
+
get_refund(refund_id: string): Promise<RefundRecord>;
|
|
2647
|
+
get_refunds_for_receipt(receipt_id: string, options?: {
|
|
2648
|
+
limit?: number;
|
|
2649
|
+
}): Promise<RefundRecord[]>;
|
|
2650
|
+
list_disputes(options?: {
|
|
2651
|
+
receipt_id?: string;
|
|
2652
|
+
limit?: number;
|
|
2653
|
+
}): Promise<DisputeRecord[]>;
|
|
2654
|
+
get_dispute(dispute_id: string): Promise<DisputeRecord>;
|
|
2655
|
+
respond_to_dispute(options: {
|
|
2656
|
+
dispute_id: string;
|
|
2657
|
+
response: DisputeResponse | string;
|
|
2658
|
+
evidence: Record<string, unknown>;
|
|
2659
|
+
note?: string;
|
|
2660
|
+
}): Promise<DisputeRecord>;
|
|
2661
|
+
create_webhook_subscription(options: {
|
|
2662
|
+
callback_url: string;
|
|
2663
|
+
description?: string;
|
|
2664
|
+
event_types: string[];
|
|
2665
|
+
metadata?: Record<string, unknown>;
|
|
2666
|
+
}): Promise<WebhookSubscriptionRecord>;
|
|
2667
|
+
list_webhook_subscriptions(): Promise<WebhookSubscriptionRecord[]>;
|
|
2668
|
+
get_webhook_subscription(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2669
|
+
rotate_webhook_subscription_secret(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2670
|
+
pause_webhook_subscription(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2671
|
+
resume_webhook_subscription(subscription_id: string): Promise<WebhookSubscriptionRecord>;
|
|
2672
|
+
list_webhook_deliveries(options?: {
|
|
2673
|
+
subscription_id?: string;
|
|
2674
|
+
event_type?: string;
|
|
2675
|
+
status?: string;
|
|
2676
|
+
limit?: number;
|
|
2677
|
+
}): Promise<WebhookDeliveryRecord[]>;
|
|
2678
|
+
redeliver_webhook_delivery(delivery_id: string): Promise<WebhookDeliveryRecord>;
|
|
2679
|
+
send_test_webhook_delivery(options: {
|
|
2680
|
+
event_type: string;
|
|
2681
|
+
subscription_ids?: string[];
|
|
2682
|
+
data?: Record<string, unknown>;
|
|
2683
|
+
}): Promise<QueuedWebhookEvent>;
|
|
2684
|
+
list_polygon_mandates(options?: {
|
|
2685
|
+
status?: string;
|
|
2686
|
+
purpose?: string;
|
|
2687
|
+
limit?: number;
|
|
2688
|
+
}): Promise<PolygonMandate[]>;
|
|
2689
|
+
get_polygon_mandate(mandate_id: string, options?: {
|
|
2690
|
+
status?: string;
|
|
2691
|
+
purpose?: string;
|
|
2692
|
+
limit?: number | null;
|
|
2693
|
+
}): Promise<PolygonMandate>;
|
|
2694
|
+
list_settlement_receipts(options?: {
|
|
2695
|
+
receipt_kind?: string;
|
|
2696
|
+
limit?: number;
|
|
2697
|
+
}): Promise<SettlementReceipt[]>;
|
|
2698
|
+
get_settlement_receipt(receipt_id: string, options?: {
|
|
2699
|
+
receipt_kind?: string;
|
|
2700
|
+
limit?: number | null;
|
|
2701
|
+
}): Promise<SettlementReceipt>;
|
|
2702
|
+
get_embedded_wallet_charge(options: {
|
|
2703
|
+
tx_hash: string;
|
|
2704
|
+
limit?: number | null;
|
|
2705
|
+
}): Promise<EmbeddedWalletCharge>;
|
|
2706
|
+
get_cross_currency_quote(options: {
|
|
2707
|
+
from_currency: string;
|
|
2708
|
+
to_currency: string;
|
|
2709
|
+
source_amount_minor: number;
|
|
2710
|
+
slippage_bps?: number;
|
|
2711
|
+
}): Promise<CrossCurrencyQuote>;
|
|
2712
|
+
private resolveOwnerOperationAgentId;
|
|
2713
|
+
private requestOwnerOperation;
|
|
2714
|
+
private request;
|
|
2715
|
+
private requestAny;
|
|
2716
|
+
private safeParseJson;
|
|
2717
|
+
private agentHeaders;
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
declare class SiglumeError extends Error {
|
|
2721
|
+
constructor(message: string);
|
|
2722
|
+
}
|
|
2723
|
+
declare class SiglumeClientError extends SiglumeError {
|
|
2724
|
+
}
|
|
2725
|
+
declare class SiglumeProjectError extends SiglumeError {
|
|
2726
|
+
}
|
|
2727
|
+
declare class SiglumeValidationError extends SiglumeError {
|
|
2728
|
+
}
|
|
2729
|
+
declare class SiglumeAssistError extends SiglumeClientError {
|
|
2730
|
+
}
|
|
2731
|
+
declare class SiglumeNotFoundError extends SiglumeClientError {
|
|
2732
|
+
}
|
|
2733
|
+
declare class SiglumeWebhookError extends SiglumeError {
|
|
2734
|
+
}
|
|
2735
|
+
declare class SiglumeWebhookSignatureError extends SiglumeWebhookError {
|
|
2736
|
+
}
|
|
2737
|
+
declare class SiglumeWebhookPayloadError extends SiglumeWebhookError {
|
|
2738
|
+
}
|
|
2739
|
+
declare class SiglumeWebhookReplayError extends SiglumeWebhookError {
|
|
2740
|
+
}
|
|
2741
|
+
declare class SiglumeAPIError extends SiglumeClientError {
|
|
2742
|
+
status_code: number;
|
|
2743
|
+
error_code?: string;
|
|
2744
|
+
trace_id?: string | null;
|
|
2745
|
+
request_id?: string | null;
|
|
2746
|
+
details: Record<string, unknown>;
|
|
2747
|
+
response_body?: unknown;
|
|
2748
|
+
constructor(message: string, options: {
|
|
2749
|
+
status_code: number;
|
|
2750
|
+
error_code?: string;
|
|
2751
|
+
trace_id?: string | null;
|
|
2752
|
+
request_id?: string | null;
|
|
2753
|
+
details?: Record<string, unknown>;
|
|
2754
|
+
response_body?: unknown;
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
declare class SiglumeExperimentalWarning extends Error {
|
|
2759
|
+
name: string;
|
|
2760
|
+
}
|
|
2761
|
+
declare class SiglumeExperimentalError extends SiglumeClientError {
|
|
2762
|
+
}
|
|
2763
|
+
interface CapabilityListing extends AppListingRecord {
|
|
2764
|
+
description?: string | null;
|
|
2765
|
+
tool_manual: Record<string, unknown>;
|
|
2766
|
+
score: number;
|
|
2767
|
+
snippet?: string | null;
|
|
2768
|
+
match_fields: string[];
|
|
2769
|
+
experimental: boolean;
|
|
2770
|
+
}
|
|
2771
|
+
interface Subscription {
|
|
2772
|
+
access_grant_id: string;
|
|
2773
|
+
capability_listing_id: string;
|
|
2774
|
+
capability_key: string;
|
|
2775
|
+
purchase_status: string;
|
|
2776
|
+
grant_status?: string | null;
|
|
2777
|
+
agent_id?: string | null;
|
|
2778
|
+
binding_id?: string | null;
|
|
2779
|
+
binding_status?: string | null;
|
|
2780
|
+
access_grant?: AccessGrantRecord | null;
|
|
2781
|
+
binding?: CapabilityBindingRecord | null;
|
|
2782
|
+
trace_id?: string | null;
|
|
2783
|
+
request_id?: string | null;
|
|
2784
|
+
raw: Record<string, unknown>;
|
|
2785
|
+
}
|
|
2786
|
+
interface SiglumeBuyerClientOptions extends SiglumeClientOptions {
|
|
2787
|
+
default_agent_id?: string;
|
|
2788
|
+
allow_internal_execute?: boolean;
|
|
2789
|
+
experimental_execute_path?: string;
|
|
2790
|
+
}
|
|
2791
|
+
declare class SiglumeBuyerClient {
|
|
2792
|
+
private readonly client;
|
|
2793
|
+
readonly api_key: string;
|
|
2794
|
+
readonly base_url: string;
|
|
2795
|
+
readonly timeout_ms: number;
|
|
2796
|
+
readonly max_retries: number;
|
|
2797
|
+
readonly default_agent_id?: string;
|
|
2798
|
+
readonly allow_internal_execute: boolean;
|
|
2799
|
+
readonly experimental_execute_path: string;
|
|
2800
|
+
private readonly fetchImpl;
|
|
2801
|
+
private readonly warnedFeatures;
|
|
2802
|
+
constructor(options: SiglumeBuyerClientOptions);
|
|
2803
|
+
close(): void;
|
|
2804
|
+
search_capabilities(options: {
|
|
2805
|
+
query: string;
|
|
2806
|
+
permission_class?: string;
|
|
2807
|
+
limit?: number;
|
|
2808
|
+
status?: string;
|
|
2809
|
+
}): Promise<CapabilityListing[]>;
|
|
2810
|
+
get_listing(capability_key: string): Promise<CapabilityListing>;
|
|
2811
|
+
subscribe(options: {
|
|
2812
|
+
capability_key: string;
|
|
2813
|
+
agent_id?: string;
|
|
2814
|
+
bind_agent?: boolean;
|
|
2815
|
+
binding_status?: string;
|
|
2816
|
+
buyer_currency?: string;
|
|
2817
|
+
buyer_token?: string;
|
|
2818
|
+
}): Promise<Subscription>;
|
|
2819
|
+
invoke(options: {
|
|
2820
|
+
capability_key: string;
|
|
2821
|
+
input: Record<string, unknown>;
|
|
2822
|
+
idempotency_key?: string;
|
|
2823
|
+
dry_run?: boolean;
|
|
2824
|
+
agent_id?: string;
|
|
2825
|
+
task_type?: string;
|
|
2826
|
+
execution_kind?: string;
|
|
2827
|
+
source_type?: string;
|
|
2828
|
+
environment?: string;
|
|
2829
|
+
metadata?: Record<string, unknown>;
|
|
2830
|
+
}): Promise<ExecutionResult>;
|
|
2831
|
+
private listAllCapabilities;
|
|
2832
|
+
private warnExperimental;
|
|
2833
|
+
private request;
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
declare const ChangeLevel: {
|
|
2837
|
+
readonly BREAKING: "breaking";
|
|
2838
|
+
readonly WARNING: "warning";
|
|
2839
|
+
readonly INFO: "info";
|
|
2840
|
+
};
|
|
2841
|
+
type ChangeLevel = (typeof ChangeLevel)[keyof typeof ChangeLevel];
|
|
2842
|
+
declare const BreakingChange: "breaking";
|
|
2843
|
+
interface Change {
|
|
2844
|
+
level: ChangeLevel;
|
|
2845
|
+
path: string;
|
|
2846
|
+
old: JsonValue | Record<string, unknown> | unknown[] | null;
|
|
2847
|
+
new: JsonValue | Record<string, unknown> | unknown[] | null;
|
|
2848
|
+
message: string;
|
|
2849
|
+
is_breaking: boolean;
|
|
2850
|
+
}
|
|
2851
|
+
declare function diff_manifest(options: {
|
|
2852
|
+
old: AppManifest | Record<string, unknown>;
|
|
2853
|
+
new: AppManifest | Record<string, unknown>;
|
|
2854
|
+
}): Change[];
|
|
2855
|
+
declare function diff_tool_manual(options: {
|
|
2856
|
+
old: ToolManual | Record<string, unknown>;
|
|
2857
|
+
new: ToolManual | Record<string, unknown>;
|
|
2858
|
+
}): Change[];
|
|
2859
|
+
|
|
2860
|
+
interface ToolSchemaExport<TSchema = Record<string, unknown>> {
|
|
2861
|
+
schema: TSchema;
|
|
2862
|
+
lossy_fields: string[];
|
|
2863
|
+
warnings: string[];
|
|
2864
|
+
}
|
|
2865
|
+
interface AnthropicToolDefinition {
|
|
2866
|
+
name: string;
|
|
2867
|
+
description: string;
|
|
2868
|
+
input_schema: Record<string, unknown>;
|
|
2869
|
+
}
|
|
2870
|
+
interface OpenAIFunctionDefinition {
|
|
2871
|
+
name: string;
|
|
2872
|
+
description: string;
|
|
2873
|
+
parameters: Record<string, unknown>;
|
|
2874
|
+
strict: true;
|
|
2875
|
+
}
|
|
2876
|
+
interface OpenAIResponsesToolDefinition {
|
|
2877
|
+
type: "function";
|
|
2878
|
+
name: string;
|
|
2879
|
+
description: string;
|
|
2880
|
+
parameters: Record<string, unknown>;
|
|
2881
|
+
strict: true;
|
|
2882
|
+
}
|
|
2883
|
+
interface McpToolDescriptor {
|
|
2884
|
+
name: string;
|
|
2885
|
+
description: string;
|
|
2886
|
+
inputSchema: Record<string, unknown>;
|
|
2887
|
+
outputSchema: Record<string, unknown>;
|
|
2888
|
+
annotations: {
|
|
2889
|
+
readOnlyHint: boolean;
|
|
2890
|
+
destructiveHint: boolean;
|
|
2891
|
+
idempotentHint: boolean;
|
|
2892
|
+
};
|
|
2893
|
+
}
|
|
2894
|
+
declare function to_anthropic_tool(tool_manual: ToolManual | Record<string, unknown>): ToolSchemaExport<AnthropicToolDefinition>;
|
|
2895
|
+
declare function to_openai_function(tool_manual: ToolManual | Record<string, unknown>): ToolSchemaExport<OpenAIFunctionDefinition>;
|
|
2896
|
+
declare function to_openai_responses_tool(tool_manual: ToolManual | Record<string, unknown>): ToolSchemaExport<OpenAIResponsesToolDefinition>;
|
|
2897
|
+
declare function to_mcp_tool(tool_manual: ToolManual | Record<string, unknown>): ToolSchemaExport<McpToolDescriptor>;
|
|
2898
|
+
|
|
2899
|
+
interface UsageRecord {
|
|
2900
|
+
capability_key: string;
|
|
2901
|
+
dimension: string;
|
|
2902
|
+
units: number;
|
|
2903
|
+
external_id: string;
|
|
2904
|
+
occurred_at_iso: string;
|
|
2905
|
+
agent_id?: string;
|
|
2906
|
+
}
|
|
2907
|
+
interface MeterRecordResult {
|
|
2908
|
+
accepted: boolean;
|
|
2909
|
+
external_id: string;
|
|
2910
|
+
server_id?: string | null;
|
|
2911
|
+
replayed: boolean;
|
|
2912
|
+
capability_key?: string | null;
|
|
2913
|
+
agent_id?: string | null;
|
|
2914
|
+
period_key?: string | null;
|
|
2915
|
+
raw: Record<string, unknown>;
|
|
2916
|
+
}
|
|
2917
|
+
interface MeteringInvoiceLinePreview {
|
|
2918
|
+
price_model: string;
|
|
2919
|
+
billable_units: number;
|
|
2920
|
+
unit_amount_minor: number;
|
|
2921
|
+
subtotal_minor: number;
|
|
2922
|
+
currency: string;
|
|
2923
|
+
}
|
|
2924
|
+
interface MeteringSimulationResult {
|
|
2925
|
+
experimental: boolean;
|
|
2926
|
+
usage_record: UsageRecord;
|
|
2927
|
+
invoice_line_preview: MeteringInvoiceLinePreview | null;
|
|
2928
|
+
}
|
|
2929
|
+
type MeterClientOptions = SiglumeClientOptions;
|
|
2930
|
+
/**
|
|
2931
|
+
* Experimental analytics / pre-billing wrapper for usage-event ingest.
|
|
2932
|
+
*/
|
|
2933
|
+
declare class MeterClient {
|
|
2934
|
+
readonly experimental = true;
|
|
2935
|
+
private readonly client;
|
|
2936
|
+
private readonly api_key;
|
|
2937
|
+
private readonly base_url;
|
|
2938
|
+
private readonly timeout_ms;
|
|
2939
|
+
private readonly max_retries;
|
|
2940
|
+
private readonly fetchImpl;
|
|
2941
|
+
constructor(options: MeterClientOptions);
|
|
2942
|
+
close(): void;
|
|
2943
|
+
record(record: UsageRecord): Promise<MeterRecordResult>;
|
|
2944
|
+
record_batch(records: UsageRecord[]): Promise<MeterRecordResult[]>;
|
|
2945
|
+
list_usage_events(options?: {
|
|
2946
|
+
capability_key?: string;
|
|
2947
|
+
agent_id?: string;
|
|
2948
|
+
outcome?: string;
|
|
2949
|
+
environment?: string;
|
|
2950
|
+
period_key?: string;
|
|
2951
|
+
limit?: number;
|
|
2952
|
+
cursor?: string;
|
|
2953
|
+
}): Promise<CursorPage<UsageEventRecord>>;
|
|
2954
|
+
private request;
|
|
2955
|
+
}
|
|
2956
|
+
declare function normalizeUsageRecord(record: UsageRecord): UsageRecord;
|
|
2957
|
+
|
|
2958
|
+
type RefundClientOptions = SiglumeClientOptions;
|
|
2959
|
+
declare class RefundClient {
|
|
2960
|
+
private readonly client;
|
|
2961
|
+
constructor(options: RefundClientOptions);
|
|
2962
|
+
close(): void;
|
|
2963
|
+
issue_partial_refund(options: {
|
|
2964
|
+
receipt_id: string;
|
|
2965
|
+
amount_minor: number;
|
|
2966
|
+
reason?: RefundReason | string;
|
|
2967
|
+
note?: string;
|
|
2968
|
+
idempotency_key: string;
|
|
2969
|
+
original_amount_minor?: number;
|
|
2970
|
+
}): Promise<RefundRecord>;
|
|
2971
|
+
issue_full_refund(options: {
|
|
2972
|
+
receipt_id: string;
|
|
2973
|
+
reason?: RefundReason | string;
|
|
2974
|
+
note?: string;
|
|
2975
|
+
idempotency_key?: string;
|
|
2976
|
+
}): Promise<RefundRecord>;
|
|
2977
|
+
list_refunds(options?: {
|
|
2978
|
+
receipt_id?: string;
|
|
2979
|
+
limit?: number;
|
|
2980
|
+
}): Promise<RefundRecord[]>;
|
|
2981
|
+
get_refund(refund_id: string): Promise<RefundRecord>;
|
|
2982
|
+
get_refunds_for_receipt(receipt_id: string, options?: {
|
|
2983
|
+
limit?: number;
|
|
2984
|
+
}): Promise<RefundRecord[]>;
|
|
2985
|
+
list_disputes(options?: {
|
|
2986
|
+
receipt_id?: string;
|
|
2987
|
+
limit?: number;
|
|
2988
|
+
}): Promise<DisputeRecord[]>;
|
|
2989
|
+
get_dispute(dispute_id: string): Promise<DisputeRecord>;
|
|
2990
|
+
respond_to_dispute(options: {
|
|
2991
|
+
dispute_id: string;
|
|
2992
|
+
response: DisputeResponse | string;
|
|
2993
|
+
evidence: Record<string, unknown>;
|
|
2994
|
+
note?: string;
|
|
2995
|
+
}): Promise<DisputeRecord>;
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2998
|
+
declare abstract class AppAdapter {
|
|
2999
|
+
abstract manifest(): Awaitable<AppManifest>;
|
|
3000
|
+
abstract execute(ctx: ExecutionContext): Awaitable<ExecutionResult>;
|
|
3001
|
+
health_check(): Promise<HealthCheckResult>;
|
|
3002
|
+
on_install(_agent_id: string, _owner_user_id: string): Promise<void>;
|
|
3003
|
+
on_uninstall(_agent_id: string, _owner_user_id: string): Promise<void>;
|
|
3004
|
+
supported_task_types(): string[];
|
|
3005
|
+
}
|
|
3006
|
+
declare class StubProvider {
|
|
3007
|
+
provider_key: string;
|
|
3008
|
+
constructor(provider_key: string);
|
|
3009
|
+
handle(method: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3010
|
+
}
|
|
3011
|
+
declare class AppTestHarness {
|
|
3012
|
+
app: AppAdapter;
|
|
3013
|
+
stubs: Record<string, StubProvider>;
|
|
3014
|
+
constructor(app: AppAdapter, stubs?: Record<string, StubProvider>);
|
|
3015
|
+
private executeWithKind;
|
|
3016
|
+
dry_run(task_type?: string, options?: Parameters<AppTestHarness["executeWithKind"]>[2]): Promise<ExecutionResult>;
|
|
3017
|
+
execute_action(task_type?: string, options?: Parameters<AppTestHarness["executeWithKind"]>[2]): Promise<ExecutionResult>;
|
|
3018
|
+
execute_quote(task_type?: string, options?: Parameters<AppTestHarness["executeWithKind"]>[2]): Promise<ExecutionResult>;
|
|
3019
|
+
execute_payment(task_type?: string, options?: Parameters<AppTestHarness["executeWithKind"]>[2]): Promise<ExecutionResult>;
|
|
3020
|
+
health(): Promise<HealthCheckResult>;
|
|
3021
|
+
validate_manifest(): Promise<string[]>;
|
|
3022
|
+
validate_tool_manual(manual?: ToolManual | Record<string, unknown>): [boolean, ToolManualIssue[]];
|
|
3023
|
+
validate_receipt(result: ExecutionResult): string[];
|
|
3024
|
+
simulate_connected_account_missing(task_type?: string, options?: Parameters<AppTestHarness["executeWithKind"]>[2]): Promise<ExecutionResult>;
|
|
3025
|
+
simulate_metering(record: UsageRecord, options?: {
|
|
3026
|
+
execution_result?: ExecutionResult | null;
|
|
3027
|
+
}): Promise<MeteringSimulationResult>;
|
|
3028
|
+
simulate_polygon_mandate(options: {
|
|
3029
|
+
mandate_id: string;
|
|
3030
|
+
payer_wallet: string;
|
|
3031
|
+
payee_wallet: string;
|
|
3032
|
+
monthly_cap_minor: number;
|
|
3033
|
+
currency: string;
|
|
3034
|
+
status?: string;
|
|
3035
|
+
next_attempt_at_iso?: string | null;
|
|
3036
|
+
cancel_scheduled?: boolean;
|
|
3037
|
+
}): PolygonMandate;
|
|
3038
|
+
simulate_embedded_wallet_charge(options: {
|
|
3039
|
+
mandate: PolygonMandate;
|
|
3040
|
+
amount_minor: number;
|
|
3041
|
+
tx_hash: string;
|
|
3042
|
+
user_operation_hash?: string | null;
|
|
3043
|
+
block_number?: number;
|
|
3044
|
+
gas_sponsored_by?: string;
|
|
3045
|
+
platform_fee_minor?: number;
|
|
3046
|
+
developer_net_minor?: number | null;
|
|
3047
|
+
}): EmbeddedWalletCharge;
|
|
3048
|
+
record<T>(cassettePath: string, fn: (harness: AppTestHarness) => Promise<T> | T, options?: {
|
|
3049
|
+
ignore_body_fields?: string[];
|
|
3050
|
+
}): Promise<T>;
|
|
3051
|
+
replay<T>(cassettePath: string, fn: (harness: AppTestHarness) => Promise<T> | T, options?: {
|
|
3052
|
+
ignore_body_fields?: string[];
|
|
3053
|
+
}): Promise<T>;
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
type CassetteHeaderValue = string | string[];
|
|
3057
|
+
declare enum RecordMode {
|
|
3058
|
+
RECORD = "record",
|
|
3059
|
+
REPLAY = "replay",
|
|
3060
|
+
AUTO = "auto"
|
|
3061
|
+
}
|
|
3062
|
+
interface RecorderOptions {
|
|
3063
|
+
mode?: RecordMode;
|
|
3064
|
+
ignore_body_fields?: string[];
|
|
3065
|
+
}
|
|
3066
|
+
interface CassetteInteraction {
|
|
3067
|
+
request: {
|
|
3068
|
+
method: string;
|
|
3069
|
+
url: string;
|
|
3070
|
+
headers: Record<string, CassetteHeaderValue>;
|
|
3071
|
+
body: unknown;
|
|
3072
|
+
};
|
|
3073
|
+
response: {
|
|
3074
|
+
status: number;
|
|
3075
|
+
headers: Record<string, CassetteHeaderValue>;
|
|
3076
|
+
body: unknown;
|
|
3077
|
+
duration_ms: number;
|
|
3078
|
+
};
|
|
3079
|
+
}
|
|
3080
|
+
interface CassetteFile {
|
|
3081
|
+
version: number;
|
|
3082
|
+
interactions: CassetteInteraction[];
|
|
3083
|
+
}
|
|
3084
|
+
declare class Recorder {
|
|
3085
|
+
readonly cassettePath: string;
|
|
3086
|
+
readonly mode: RecordMode;
|
|
3087
|
+
readonly ignore_body_fields: string[];
|
|
3088
|
+
private effectiveMode;
|
|
3089
|
+
private interactions;
|
|
3090
|
+
private cursor;
|
|
3091
|
+
private wrappedClients;
|
|
3092
|
+
constructor(cassettePath: string, options?: RecorderOptions);
|
|
3093
|
+
static open(cassettePath: string, options?: RecorderOptions): Promise<Recorder>;
|
|
3094
|
+
start(): Promise<this>;
|
|
3095
|
+
close(): Promise<void>;
|
|
3096
|
+
wrap<T extends object>(client: T): T;
|
|
3097
|
+
withGlobalFetch<T>(fn: () => Promise<T> | T): Promise<T>;
|
|
3098
|
+
private resolveMode;
|
|
3099
|
+
private loadCassette;
|
|
3100
|
+
private createFetch;
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
declare const TOOL_MANUAL_DRAFT_PROMPT = "# Siglume ToolManual Draft System Prompt\n\nYou generate ToolManual payloads for the Siglume API Store.\n\nFollow these rules on every response:\n\n1. Return only the structured payload requested by the caller's JSON schema.\n2. ToolManual permission_class values are `read_only`, `action`, and `payment`.\n3. Use factual, specific language. Do not use marketing words, hype, or vague phrases.\n4. `trigger_conditions` must describe concrete situations where the tool is the right next step.\n5. `do_not_use_when` must describe concrete situations where another tool or response is safer.\n6. `summary_for_model` should explain the tool's capability in one short factual paragraph.\n7. `usage_hints`, `result_hints`, and `error_hints` should help an agent decide how to invoke and explain the tool.\n8. For `action` and `payment`, include owner-approval framing, idempotency, and a governing `jurisdiction`.\n9. For `payment`, `currency` must be `USD` and `settlement_mode` must be one of the documented Siglume values.\n10. When filling gaps, keep non-target fields unchanged and only improve the requested fields.\n";
|
|
3104
|
+
type FetchLike = typeof fetch;
|
|
3105
|
+
interface ProviderConfig {
|
|
3106
|
+
provider_name: string;
|
|
3107
|
+
default_model: string;
|
|
3108
|
+
api_key_env: string;
|
|
3109
|
+
default_base_url: string;
|
|
3110
|
+
price_table: Record<string, {
|
|
3111
|
+
input: number;
|
|
3112
|
+
output: number;
|
|
3113
|
+
cache_write?: number;
|
|
3114
|
+
cache_read?: number;
|
|
3115
|
+
}>;
|
|
3116
|
+
}
|
|
3117
|
+
interface StructuredGenerationUsage {
|
|
3118
|
+
input_tokens: number;
|
|
3119
|
+
output_tokens: number;
|
|
3120
|
+
cache_creation_input_tokens: number;
|
|
3121
|
+
cache_read_input_tokens: number;
|
|
3122
|
+
}
|
|
3123
|
+
interface ToolManualAssistAttempt {
|
|
3124
|
+
attempt_number: number;
|
|
3125
|
+
provider: string;
|
|
3126
|
+
model: string;
|
|
3127
|
+
input_tokens: number;
|
|
3128
|
+
output_tokens: number;
|
|
3129
|
+
cache_creation_input_tokens: number;
|
|
3130
|
+
cache_read_input_tokens: number;
|
|
3131
|
+
estimated_cost_usd: number | null;
|
|
3132
|
+
overall_score: number;
|
|
3133
|
+
grade: string;
|
|
3134
|
+
validation_ok: boolean;
|
|
3135
|
+
}
|
|
3136
|
+
interface ToolManualAssistMetadata {
|
|
3137
|
+
mode: "draft" | "gap_fill";
|
|
3138
|
+
provider: string;
|
|
3139
|
+
model: string;
|
|
3140
|
+
attempts: ToolManualAssistAttempt[];
|
|
3141
|
+
attempt_count: number;
|
|
3142
|
+
total_input_tokens: number;
|
|
3143
|
+
total_output_tokens: number;
|
|
3144
|
+
total_cache_creation_input_tokens: number;
|
|
3145
|
+
total_cache_read_input_tokens: number;
|
|
3146
|
+
total_estimated_cost_usd: number | null;
|
|
3147
|
+
}
|
|
3148
|
+
interface ToolManualAssistResult {
|
|
3149
|
+
tool_manual: ToolManual;
|
|
3150
|
+
quality_report: ToolManualQualityReport;
|
|
3151
|
+
metadata: ToolManualAssistMetadata;
|
|
3152
|
+
}
|
|
3153
|
+
interface StructuredGenerationResult {
|
|
3154
|
+
payload: Record<string, unknown>;
|
|
3155
|
+
usage: StructuredGenerationUsage;
|
|
3156
|
+
}
|
|
3157
|
+
declare abstract class LLMProvider {
|
|
3158
|
+
provider_name: string;
|
|
3159
|
+
model: string;
|
|
3160
|
+
api_key: string;
|
|
3161
|
+
base_url: string;
|
|
3162
|
+
timeout_ms: number;
|
|
3163
|
+
protected readonly fetchImpl: FetchLike;
|
|
3164
|
+
private readonly price_table;
|
|
3165
|
+
protected constructor(options: {
|
|
3166
|
+
api_key?: string;
|
|
3167
|
+
model?: string;
|
|
3168
|
+
base_url?: string;
|
|
3169
|
+
fetch?: FetchLike;
|
|
3170
|
+
timeout_ms?: number;
|
|
3171
|
+
} | undefined, config: ProviderConfig);
|
|
3172
|
+
abstract generateStructured(options: {
|
|
3173
|
+
system_prompt: string;
|
|
3174
|
+
user_prompt: string;
|
|
3175
|
+
output_schema: Record<string, unknown>;
|
|
3176
|
+
}): Promise<StructuredGenerationResult>;
|
|
3177
|
+
estimate_cost_usd(usage: StructuredGenerationUsage): number | null;
|
|
3178
|
+
protected fetchJson(url: string, init: RequestInit): Promise<unknown>;
|
|
3179
|
+
}
|
|
3180
|
+
declare class AnthropicProvider extends LLMProvider {
|
|
3181
|
+
constructor(options?: {
|
|
3182
|
+
api_key?: string;
|
|
3183
|
+
model?: string;
|
|
3184
|
+
base_url?: string;
|
|
3185
|
+
fetch?: FetchLike;
|
|
3186
|
+
timeout_ms?: number;
|
|
3187
|
+
});
|
|
3188
|
+
generateStructured(options: {
|
|
3189
|
+
system_prompt: string;
|
|
3190
|
+
user_prompt: string;
|
|
3191
|
+
output_schema: Record<string, unknown>;
|
|
3192
|
+
}): Promise<StructuredGenerationResult>;
|
|
3193
|
+
}
|
|
3194
|
+
declare class OpenAIProvider extends LLMProvider {
|
|
3195
|
+
constructor(options?: {
|
|
3196
|
+
api_key?: string;
|
|
3197
|
+
model?: string;
|
|
3198
|
+
base_url?: string;
|
|
3199
|
+
fetch?: FetchLike;
|
|
3200
|
+
timeout_ms?: number;
|
|
3201
|
+
});
|
|
3202
|
+
generateStructured(options: {
|
|
3203
|
+
system_prompt: string;
|
|
3204
|
+
user_prompt: string;
|
|
3205
|
+
output_schema: Record<string, unknown>;
|
|
3206
|
+
}): Promise<StructuredGenerationResult>;
|
|
3207
|
+
}
|
|
3208
|
+
declare function draft_tool_manual(options: {
|
|
3209
|
+
capability_key: string;
|
|
3210
|
+
job_to_be_done: string;
|
|
3211
|
+
permission_class: ToolManual["permission_class"];
|
|
3212
|
+
llm: LLMProvider;
|
|
3213
|
+
source_code_hint?: string;
|
|
3214
|
+
max_attempts?: number;
|
|
3215
|
+
}): Promise<ToolManualAssistResult>;
|
|
3216
|
+
declare function fill_tool_manual_gaps(options: {
|
|
3217
|
+
partial_manual: Record<string, unknown>;
|
|
3218
|
+
source_code_hint?: string;
|
|
3219
|
+
llm: LLMProvider;
|
|
3220
|
+
max_attempts?: number;
|
|
3221
|
+
}): Promise<ToolManualAssistResult>;
|
|
3222
|
+
|
|
3223
|
+
declare function score_tool_manual_remote(tool_manual: Record<string, unknown>, options: {
|
|
3224
|
+
api_key: string;
|
|
3225
|
+
base_url?: string;
|
|
3226
|
+
fetch?: typeof fetch;
|
|
3227
|
+
}): Promise<ToolManualQualityReport>;
|
|
3228
|
+
declare function score_tool_manual_offline(tool_manual: unknown): ToolManualQualityReport;
|
|
3229
|
+
|
|
3230
|
+
type ManualInput = ToolManual | Record<string, unknown> | {
|
|
3231
|
+
to_dict(): unknown;
|
|
3232
|
+
} | unknown;
|
|
3233
|
+
declare function tool_manual_to_dict(manual: ToolManual | Record<string, unknown>): Record<string, unknown>;
|
|
3234
|
+
declare function validate_tool_manual(manualInput: ManualInput): [boolean, ToolManualIssue[]];
|
|
3235
|
+
|
|
3236
|
+
declare function renderJson(value: unknown): string;
|
|
3237
|
+
|
|
3238
|
+
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPublishedEvent, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type ConnectedAccountLifecycleResult, type ConnectedAccountOAuthStart, type ConnectedAccountProvider, type ConnectedAccountRecord, type ConnectedAccountRef, type CrossCurrencyQuote, type CursorPage, DEFAULT_OPERATION_AGENT_ID, DEFAULT_SIGLUME_API_BASE, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type DeveloperPortalSummary, type DisputeRecord, DisputeResponse, DisputeStatus, type EmbeddedWalletCharge, type EnvelopeMeta, Environment, type ExecutionArtifact, type ExecutionCompletedEvent, type ExecutionCompletedEventData, type ExecutionContext, type ExecutionFailedEvent, type ExecutionFailedEventData, ExecutionKind, type ExecutionResult, type ExpressLikeRequest, type ExpressLikeResponse, type FavoriteAgent, type FavoriteAgentMutation, type GrantBindingResult, type HeaderLike, type HealthCheckResult, InMemoryWebhookDedupe, type InstalledToolBindingPolicyRecord, type InstalledToolConnectionReadiness, type InstalledToolExecutionRecord, type InstalledToolPolicyUpdateResult, type InstalledToolReceiptRecord, type InstalledToolReceiptStepRecord, type InstalledToolRecord, type JsonObject, type JsonPrimitive, type JsonValue, LLMProvider, type MarketNeedRecord, type MarketProposalActionResult, type MarketProposalRecord, type McpToolDescriptor, MeterClient, type MeterClientOptions, type MeterRecordResult, type MeteringInvoiceLinePreview, type MeteringSimulationResult, type NetworkClaimRecord, type NetworkContentDetail, type NetworkContentSummary, type NetworkEvidenceRecord, type NetworkRepliesPage, type OpenAIFunctionDefinition, OpenAIProvider, type OpenAIResponsesToolDefinition, type OperationExecution, type OperationMetadata, type PartnerApiKeyHandle, type PartnerApiKeyRecord, type PartnerDashboard, type PartnerUsage, type PaymentDisputedEvent, type PaymentEventData, type PaymentFailedEvent, type PaymentSucceededEvent, PermissionClass, type PlanCheckoutSession, type PlanWeb3Mandate, type PolygonMandate, PriceModel, type QueuedWebhookEvent, type ReceiptRef, RecordMode, Recorder, type RecorderOptions, RefundClient, type RefundClientOptions, type RefundIssuedEvent, type RefundIssuedEventData, RefundReason, type RefundRecord, RefundStatus, type RegistrationConfirmation, type RegistrationQuality, type SandboxSession, SettlementMode, type SettlementReceipt, type SideEffectRecord, SiglumeAPIError, SiglumeAssistError, SiglumeBuyerClient, type SiglumeBuyerClientOptions, SiglumeClient, SiglumeClientError, type SiglumeClientOptions, type SiglumeClientShape, SiglumeError, SiglumeExperimentalError, SiglumeExperimentalWarning, SiglumeNotFoundError, SiglumeProjectError, SiglumeValidationError, SiglumeWebhookError, type SiglumeWebhookEvent, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeWebhookSignatureError, type StructuredGenerationUsage, StubProvider, type Subscription, type SubscriptionCancelledEvent, type SubscriptionCreatedEvent, type SubscriptionLifecycleEventData, type SubscriptionPausedEvent, type SubscriptionReinstatedEvent, type SubscriptionRenewedEvent, type SupportCaseRecord, TOOL_MANUAL_DRAFT_PROMPT, type ToolManual, type ToolManualAssistAttempt, type ToolManualAssistMetadata, type ToolManualAssistResult, type ToolManualGrade, type ToolManualIssue, type ToolManualIssueSeverity, ToolManualPermissionClass, type ToolManualQualityReport, type ToolSchemaExport, type UsageEventRecord, type UsageRecord, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_SIGNATURE_HEADER, type WebhookCallback, type WebhookDeliveryRecord, type WebhookDispatchResult, type WebhookEventBase, type WebhookEventType, WebhookHandler, type WebhookSignatureVerification, type WebhookSubscriptionRecord, type WorksCategoryRecord, type WorksOwnerDashboard, type WorksOwnerDashboardAgent, type WorksOwnerDashboardOrder, type WorksOwnerDashboardPitch, type WorksOwnerDashboardStats, type WorksPosterDashboard, type WorksPosterDashboardJob, type WorksPosterDashboardOrder, type WorksPosterDashboardStats, type WorksRegistrationRecord, buildOperationMetadata, build_webhook_signature_header, compute_webhook_signature, defaultCapabilityKeyForOperation, defaultOperationOutputSchema, diff_manifest, diff_tool_manual, draft_tool_manual, fallbackOperationCatalog, fill_tool_manual_gaps, normalizeUsageRecord, parse_cross_currency_quote, parse_embedded_wallet_charge, parse_polygon_mandate, parse_queued_webhook_event, parse_settlement_receipt, parse_webhook_delivery, parse_webhook_event, parse_webhook_subscription, renderJson as render_json, score_tool_manual_offline, score_tool_manual_remote, simulate_embedded_wallet_charge, simulate_polygon_mandate, to_anthropic_tool, to_mcp_tool, to_openai_function, to_openai_responses_tool, tool_manual_to_dict, validate_tool_manual, verify_webhook_signature };
|