@compose-market/sdk 0.6.96 → 0.6.98-clean
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/.speakeasy/a2a.arazzo.yaml +1 -1
- package/.speakeasy/inference.arazzo.yaml +214 -0
- package/.speakeasy/memory.arazzo.yaml +1 -1
- package/.speakeasy/tests.arazzo.yaml +1 -1
- package/CHANGELOG.md +15 -1
- package/dist/errors.d.ts +2 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/events.d.ts +42 -3
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +2 -0
- package/dist/events.js.map +1 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +13 -4
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/agent.js +233 -7
- package/dist/resources/agent.js.map +1 -1
- package/dist/resources/inference.d.ts +6 -6
- package/dist/resources/inference.d.ts.map +1 -1
- package/dist/resources/inference.js +60 -13
- package/dist/resources/inference.js.map +1 -1
- package/dist/resources/instrumentation.d.ts +2 -2
- package/dist/resources/instrumentation.d.ts.map +1 -1
- package/dist/resources/receipts.d.ts +23 -0
- package/dist/resources/receipts.d.ts.map +1 -0
- package/dist/resources/receipts.js +48 -0
- package/dist/resources/receipts.js.map +1 -0
- package/dist/resources/session-events.d.ts +11 -6
- package/dist/resources/session-events.d.ts.map +1 -1
- package/dist/resources/session-events.js +275 -70
- package/dist/resources/session-events.js.map +1 -1
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/resources/workflow.js +12 -3
- package/dist/resources/workflow.js.map +1 -1
- package/dist/resources/x402.d.ts +2 -2
- package/dist/resources/x402.d.ts.map +1 -1
- package/dist/resources/x402.js.map +1 -1
- package/dist/streaming/receipt.d.ts +6 -6
- package/dist/streaming/receipt.d.ts.map +1 -1
- package/dist/streaming/receipt.js +68 -36
- package/dist/streaming/receipt.js.map +1 -1
- package/dist/types/index.d.ts +182 -26
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/generated/inference/esm/lib/config.d.ts +3 -3
- package/generated/inference/esm/lib/config.js +3 -3
- package/generated/inference/esm/lib/config.js.map +1 -1
- package/generated/inference/esm/models/audio-transcription-response.d.ts +2 -2
- package/generated/inference/esm/models/audio-transcription-response.d.ts.map +1 -1
- package/generated/inference/esm/models/audio-transcription-response.js +3 -3
- package/generated/inference/esm/models/audio-transcription-response.js.map +1 -1
- package/generated/inference/esm/models/chat-completion.d.ts +2 -2
- package/generated/inference/esm/models/chat-completion.d.ts.map +1 -1
- package/generated/inference/esm/models/chat-completion.js +3 -3
- package/generated/inference/esm/models/chat-completion.js.map +1 -1
- package/generated/inference/esm/models/compose-receipt-body.d.ts +5 -5
- package/generated/inference/esm/models/compose-receipt-body.d.ts.map +1 -1
- package/generated/inference/esm/models/compose-receipt-body.js +5 -5
- package/generated/inference/esm/models/compose-receipt-body.js.map +1 -1
- package/generated/inference/esm/models/compose-receipt-line-item.d.ts +3 -3
- package/generated/inference/esm/models/compose-receipt-line-item.d.ts.map +1 -1
- package/generated/inference/esm/models/compose-receipt-line-item.js +3 -3
- package/generated/inference/esm/models/compose-receipt-line-item.js.map +1 -1
- package/generated/inference/esm/models/embeddings-response.d.ts +2 -2
- package/generated/inference/esm/models/embeddings-response.d.ts.map +1 -1
- package/generated/inference/esm/models/embeddings-response.js +3 -3
- package/generated/inference/esm/models/embeddings-response.js.map +1 -1
- package/generated/inference/esm/models/images-response.d.ts +2 -2
- package/generated/inference/esm/models/images-response.d.ts.map +1 -1
- package/generated/inference/esm/models/images-response.js +3 -3
- package/generated/inference/esm/models/images-response.js.map +1 -1
- package/generated/inference/esm/models/response-object.d.ts +2 -2
- package/generated/inference/esm/models/response-object.d.ts.map +1 -1
- package/generated/inference/esm/models/response-object.js +3 -3
- package/generated/inference/esm/models/response-object.js.map +1 -1
- package/generated/inference/esm/models/video-generate-response.d.ts +2 -2
- package/generated/inference/esm/models/video-generate-response.d.ts.map +1 -1
- package/generated/inference/esm/models/video-generate-response.js +3 -3
- package/generated/inference/esm/models/video-generate-response.js.map +1 -1
- package/generated/inference/package.json +1 -1
- package/generated/inference/src/lib/config.ts +3 -3
- package/generated/inference/src/models/audio-transcription-response.ts +5 -5
- package/generated/inference/src/models/chat-completion.ts +5 -5
- package/generated/inference/src/models/compose-receipt-body.ts +11 -11
- package/generated/inference/src/models/compose-receipt-line-item.ts +7 -7
- package/generated/inference/src/models/embeddings-response.ts +5 -5
- package/generated/inference/src/models/images-response.ts +5 -5
- package/generated/inference/src/models/response-object.ts +5 -5
- package/generated/inference/src/models/video-generate-response.ts +5 -5
- package/generated/manowar/esm/lib/config.d.ts +3 -3
- package/generated/manowar/esm/lib/config.js +3 -3
- package/generated/manowar/esm/lib/config.js.map +1 -1
- package/generated/manowar/package.json +1 -1
- package/generated/manowar/src/lib/config.ts +3 -3
- package/generated/memory/esm/lib/config.d.ts +3 -3
- package/generated/memory/esm/lib/config.js +3 -3
- package/generated/memory/esm/lib/config.js.map +1 -1
- package/generated/memory/package.json +1 -1
- package/generated/memory/src/lib/config.ts +3 -3
- package/generated/x402/esm/lib/config.d.ts +3 -3
- package/generated/x402/esm/lib/config.js +3 -3
- package/generated/x402/esm/lib/config.js.map +1 -1
- package/generated/x402/package.json +1 -1
- package/generated/x402/src/lib/config.ts +3 -3
- package/package.json +7 -5
- package/specs/inference.openapi.yaml +33 -42
- package/specs/manowar.openapi.yaml +1 -1
- package/specs/memory.openapi.yaml +1 -1
- package/specs/x402.openapi.yaml +1 -3
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `X-Compose-Receipt` is a url-safe base64 blob carrying an authoritative
|
|
5
5
|
* settlement breakdown. The same shape is also emitted in streams as an SSE
|
|
6
|
-
* `event: compose.receipt` frame and echoed as `
|
|
6
|
+
* `event: compose.receipt` frame and echoed as `receipt` in JSON
|
|
7
7
|
* response bodies.
|
|
8
8
|
*/
|
|
9
|
-
import type {
|
|
9
|
+
import type { Receipt } from "../types/index.js";
|
|
10
10
|
export declare const RECEIPT_HEADER_NAMES: readonly ["x-compose-receipt", "X-Compose-Receipt"];
|
|
11
|
-
export declare function decodeReceiptHeader(value: string):
|
|
11
|
+
export declare function decodeReceiptHeader(value: string): Receipt;
|
|
12
12
|
/**
|
|
13
13
|
* Extract a receipt from a Fetch `Response`. Preference order:
|
|
14
14
|
* 1. `X-Compose-Receipt` header (binary truth)
|
|
15
|
-
* 2. `
|
|
15
|
+
* 2. `receipt` field on the JSON body (fallback mirror)
|
|
16
16
|
*/
|
|
17
17
|
export declare function extractReceiptFromResponse(response: {
|
|
18
18
|
headers: Headers;
|
|
19
|
-
}, body?: Record<string, unknown> | null):
|
|
19
|
+
}, body?: Record<string, unknown> | null): Receipt | null;
|
|
20
20
|
/**
|
|
21
21
|
* Parse the payload of an SSE `event: compose.receipt` frame. Throws on
|
|
22
22
|
* malformed JSON so callers can abort the stream consumer.
|
|
23
23
|
*/
|
|
24
|
-
export declare function parseReceiptEvent(data: string):
|
|
24
|
+
export declare function parseReceiptEvent(data: string): Receipt;
|
|
25
25
|
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../src/streaming/receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../src/streaming/receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,mBAAmB,CAAC;AAE9D,eAAO,MAAM,oBAAoB,qDAAsD,CAAC;AAmBxF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACtC,QAAQ,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,EAC9B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GACtC,OAAO,GAAG,IAAI,CAehB;AAoED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQvD"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `X-Compose-Receipt` is a url-safe base64 blob carrying an authoritative
|
|
5
5
|
* settlement breakdown. The same shape is also emitted in streams as an SSE
|
|
6
|
-
* `event: compose.receipt` frame and echoed as `
|
|
6
|
+
* `event: compose.receipt` frame and echoed as `receipt` in JSON
|
|
7
7
|
* response bodies.
|
|
8
8
|
*/
|
|
9
9
|
export const RECEIPT_HEADER_NAMES = ["x-compose-receipt", "X-Compose-Receipt"];
|
|
@@ -27,7 +27,7 @@ export function decodeReceiptHeader(value) {
|
|
|
27
27
|
/**
|
|
28
28
|
* Extract a receipt from a Fetch `Response`. Preference order:
|
|
29
29
|
* 1. `X-Compose-Receipt` header (binary truth)
|
|
30
|
-
* 2. `
|
|
30
|
+
* 2. `receipt` field on the JSON body (fallback mirror)
|
|
31
31
|
*/
|
|
32
32
|
export function extractReceiptFromResponse(response, body) {
|
|
33
33
|
const headerValue = response.headers.get("x-compose-receipt") ?? response.headers.get("X-Compose-Receipt");
|
|
@@ -39,29 +39,73 @@ export function extractReceiptFromResponse(response, body) {
|
|
|
39
39
|
// fall through to body inspection
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
if (body && typeof body === "object" && body.
|
|
43
|
-
return normalizeBodyReceipt(body.
|
|
42
|
+
if (body && typeof body === "object" && body.receipt && typeof body.receipt === "object") {
|
|
43
|
+
return normalizeBodyReceipt(body.receipt);
|
|
44
44
|
}
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
|
+
function text(value) {
|
|
48
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
49
|
+
}
|
|
50
|
+
function numberMap(value) {
|
|
51
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
52
|
+
return {};
|
|
53
|
+
const out = {};
|
|
54
|
+
for (const [key, raw] of Object.entries(value)) {
|
|
55
|
+
const num = Number(raw);
|
|
56
|
+
if (Number.isFinite(num))
|
|
57
|
+
out[key] = num;
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
function stringMap(value) {
|
|
62
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
63
|
+
return {};
|
|
64
|
+
const out = {};
|
|
65
|
+
for (const [key, raw] of Object.entries(value)) {
|
|
66
|
+
if (typeof raw === "string")
|
|
67
|
+
out[key] = raw;
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
function fees(value) {
|
|
72
|
+
const raw = value && typeof value === "object" && !Array.isArray(value)
|
|
73
|
+
? value
|
|
74
|
+
: {};
|
|
75
|
+
const total = raw.total && typeof raw.total === "object" && !Array.isArray(raw.total)
|
|
76
|
+
? raw.total
|
|
77
|
+
: {};
|
|
78
|
+
return {
|
|
79
|
+
total: {
|
|
80
|
+
percent: String(total.percent ?? "0%"),
|
|
81
|
+
amount: String(total.amount ?? "0.000000 USDC"),
|
|
82
|
+
},
|
|
83
|
+
distribution: stringMap(raw.distribution),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function bills(value) {
|
|
87
|
+
return Array.isArray(value)
|
|
88
|
+
? value.map((bill) => ({
|
|
89
|
+
agent: String(bill.agent ?? ""),
|
|
90
|
+
agentWallet: text(bill.agentWallet ?? bill.agent_wallet),
|
|
91
|
+
depth: Number(bill.depth ?? 0),
|
|
92
|
+
model: text(bill.model),
|
|
93
|
+
tokens: numberMap(bill.tokens),
|
|
94
|
+
tools: Array.isArray(bill.tools) ? bill.tools.map(String) : [],
|
|
95
|
+
total: String(bill.total ?? "0.000000 USDC"),
|
|
96
|
+
duration: String(bill.duration ?? "0s"),
|
|
97
|
+
txId: text(bill.txId ?? bill.tx_id),
|
|
98
|
+
fees: fees(bill.fees),
|
|
99
|
+
children: bills(bill.children),
|
|
100
|
+
}))
|
|
101
|
+
: undefined;
|
|
102
|
+
}
|
|
47
103
|
function normalizeBodyReceipt(raw) {
|
|
48
104
|
return {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
unit: String(item.unit ?? ""),
|
|
54
|
-
quantity: Number(item.quantity ?? 0),
|
|
55
|
-
unitPriceUsd: Number(item.unit_price_usd ?? 0),
|
|
56
|
-
amountWei: String(item.amount_wei ?? "0"),
|
|
57
|
-
}))
|
|
58
|
-
: undefined,
|
|
59
|
-
providerAmountWei: raw.provider_amount_wei ? String(raw.provider_amount_wei) : undefined,
|
|
60
|
-
platformFeeWei: raw.platform_fee_wei ? String(raw.platform_fee_wei) : undefined,
|
|
61
|
-
finalAmountWei: String(raw.final_amount_wei ?? "0"),
|
|
62
|
-
txHash: raw.tx_hash ? String(raw.tx_hash) : undefined,
|
|
63
|
-
network: raw.network ?? "eip155:0",
|
|
64
|
-
settledAt: Number(raw.settled_at ?? 0),
|
|
105
|
+
user: text(raw.user ?? raw.userAddress ?? raw.user_address),
|
|
106
|
+
runId: text(raw.runId ?? raw.run_id),
|
|
107
|
+
duration: text(raw.duration),
|
|
108
|
+
bills: bills(raw.bills),
|
|
65
109
|
};
|
|
66
110
|
}
|
|
67
111
|
/**
|
|
@@ -71,22 +115,10 @@ function normalizeBodyReceipt(raw) {
|
|
|
71
115
|
export function parseReceiptEvent(data) {
|
|
72
116
|
const raw = JSON.parse(data);
|
|
73
117
|
return {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
unit: String(item.unit ?? ""),
|
|
79
|
-
quantity: Number(item.quantity ?? 0),
|
|
80
|
-
unitPriceUsd: Number(item.unitPriceUsd ?? 0),
|
|
81
|
-
amountWei: String(item.amountWei ?? "0"),
|
|
82
|
-
}))
|
|
83
|
-
: undefined,
|
|
84
|
-
providerAmountWei: raw.providerAmountWei ? String(raw.providerAmountWei) : undefined,
|
|
85
|
-
platformFeeWei: raw.platformFeeWei ? String(raw.platformFeeWei) : undefined,
|
|
86
|
-
finalAmountWei: String(raw.finalAmountWei ?? "0"),
|
|
87
|
-
txHash: raw.txHash ? String(raw.txHash) : undefined,
|
|
88
|
-
network: raw.network ?? "eip155:0",
|
|
89
|
-
settledAt: Number(raw.settledAt ?? 0),
|
|
118
|
+
user: text(raw.user ?? raw.userAddress ?? raw.user_address),
|
|
119
|
+
runId: text(raw.runId ?? raw.run_id),
|
|
120
|
+
duration: text(raw.duration),
|
|
121
|
+
bills: bills(raw.bills),
|
|
90
122
|
};
|
|
91
123
|
}
|
|
92
124
|
//# sourceMappingURL=receipt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipt.js","sourceRoot":"","sources":["../../src/streaming/receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,mBAAmB,EAAE,mBAAmB,CAAU,CAAC;AAExF,SAAS,eAAe,CAAC,KAAa;IAClC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IAE3F,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QACx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B,CAAC;AACN,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -169,7 +169,6 @@ export interface PaymentAbortResponse {
|
|
|
169
169
|
}
|
|
170
170
|
export interface ModelMeterInput {
|
|
171
171
|
modelId: string;
|
|
172
|
-
provider?: ModelProvider | string;
|
|
173
172
|
modality: CanonicalModality | string;
|
|
174
173
|
usage?: Record<string, unknown>;
|
|
175
174
|
media?: Record<string, unknown>;
|
|
@@ -340,23 +339,80 @@ export interface SessionExpiredEvent {
|
|
|
340
339
|
expiresAt?: number;
|
|
341
340
|
timestamp?: number;
|
|
342
341
|
}
|
|
343
|
-
export
|
|
344
|
-
|
|
342
|
+
export interface SessionLeaseEvent {
|
|
343
|
+
type: "session-lease";
|
|
344
|
+
userAddress: string;
|
|
345
|
+
chainId: number;
|
|
346
|
+
reason?: "lease-expired" | (string & {
|
|
347
|
+
readonly __brand?: "SessionLeaseReason";
|
|
348
|
+
});
|
|
349
|
+
message?: string;
|
|
350
|
+
leaseMs?: number;
|
|
351
|
+
retryAfterMs?: number;
|
|
352
|
+
timestamp?: number;
|
|
353
|
+
}
|
|
354
|
+
export type SessionEvent = SessionActiveEvent | SessionExpiredEvent | SessionLeaseEvent;
|
|
355
|
+
export interface ComposeAlert {
|
|
356
|
+
type: "compose.alert";
|
|
357
|
+
code: string;
|
|
358
|
+
severity: "info" | "warning" | "error";
|
|
359
|
+
source: string;
|
|
360
|
+
scope: "session" | "agent" | "model" | "workflow" | "api" | (string & {
|
|
361
|
+
readonly __brand?: "ComposeAlertScope";
|
|
362
|
+
});
|
|
363
|
+
title?: string;
|
|
364
|
+
message: string;
|
|
365
|
+
userAddress?: string | null;
|
|
366
|
+
chainId?: number | null;
|
|
367
|
+
timestamp?: number;
|
|
368
|
+
metadata?: Record<string, unknown>;
|
|
369
|
+
leaseMs?: number;
|
|
370
|
+
retryAfterMs?: number;
|
|
371
|
+
}
|
|
372
|
+
export interface ReceiptLineItem {
|
|
345
373
|
key: string;
|
|
346
374
|
unit: string;
|
|
347
375
|
quantity: number;
|
|
348
376
|
unitPriceUsd: number;
|
|
349
377
|
amountWei: string;
|
|
350
378
|
}
|
|
351
|
-
export interface
|
|
352
|
-
|
|
353
|
-
|
|
379
|
+
export interface ReceiptFees {
|
|
380
|
+
total: {
|
|
381
|
+
percent: string;
|
|
382
|
+
amount: string;
|
|
383
|
+
};
|
|
384
|
+
distribution: Record<string, string>;
|
|
385
|
+
}
|
|
386
|
+
export interface ReceiptBill {
|
|
387
|
+
agent: string;
|
|
388
|
+
agentWallet?: string;
|
|
389
|
+
depth: number;
|
|
390
|
+
model?: string;
|
|
391
|
+
tokens: Record<string, number>;
|
|
392
|
+
tools: string[];
|
|
393
|
+
total: string;
|
|
394
|
+
duration: string;
|
|
395
|
+
txId?: string;
|
|
396
|
+
fees: ReceiptFees;
|
|
397
|
+
children?: ReceiptBill[];
|
|
398
|
+
}
|
|
399
|
+
export interface ReceiptCumulative {
|
|
400
|
+
totalAmountWei: string;
|
|
354
401
|
providerAmountWei?: string;
|
|
355
402
|
platformFeeWei?: string;
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
403
|
+
receiptCount: number;
|
|
404
|
+
}
|
|
405
|
+
export interface Receipt {
|
|
406
|
+
user?: string;
|
|
407
|
+
runId?: string;
|
|
408
|
+
duration?: string;
|
|
409
|
+
bills?: ReceiptBill[];
|
|
410
|
+
}
|
|
411
|
+
export interface ReceiptListResponse {
|
|
412
|
+
userAddress: string;
|
|
413
|
+
chainId: number;
|
|
414
|
+
cumulative: ReceiptCumulative;
|
|
415
|
+
receipts: Receipt[];
|
|
360
416
|
}
|
|
361
417
|
export type ModelProvider = "gemini" | "openai" | "fireworks" | "asicloud" | "alibaba" | "hugging face" | "azure" | "aiml" | "vertex" | "cloudflare" | "deepgram" | "elevenlabs" | "cartesia" | "roboflow";
|
|
362
418
|
export type CanonicalModality = "text" | "image" | "audio" | "video" | "embedding";
|
|
@@ -418,6 +474,7 @@ export interface Model {
|
|
|
418
474
|
modelType?: unknown;
|
|
419
475
|
sourceMetadata?: unknown;
|
|
420
476
|
params?: unknown;
|
|
477
|
+
operations?: ModelOperationCapability[];
|
|
421
478
|
ownedBy?: string;
|
|
422
479
|
createdAt?: string | number;
|
|
423
480
|
available?: boolean;
|
|
@@ -637,7 +694,6 @@ export interface ChatCompletionsCreateParams extends OpenAIPassthroughParams {
|
|
|
637
694
|
max_completion_tokens?: number;
|
|
638
695
|
tools?: ChatToolDefinition[];
|
|
639
696
|
tool_choice?: ChatToolChoice;
|
|
640
|
-
provider?: ModelProvider;
|
|
641
697
|
[key: string]: unknown;
|
|
642
698
|
}
|
|
643
699
|
export interface ChatUsage {
|
|
@@ -670,7 +726,7 @@ export interface ChatCompletion {
|
|
|
670
726
|
finish_reason: string;
|
|
671
727
|
}>;
|
|
672
728
|
usage: ChatUsage;
|
|
673
|
-
|
|
729
|
+
receipt?: Record<string, unknown>;
|
|
674
730
|
}
|
|
675
731
|
export interface ChatCompletionChunk {
|
|
676
732
|
id: string;
|
|
@@ -720,7 +776,6 @@ export interface ResponsesCreateParams extends OpenAIPassthroughParams {
|
|
|
720
776
|
duration?: number;
|
|
721
777
|
aspect_ratio?: string;
|
|
722
778
|
resolution?: string;
|
|
723
|
-
provider?: ModelProvider;
|
|
724
779
|
[key: string]: unknown;
|
|
725
780
|
}
|
|
726
781
|
export interface ResponseObject {
|
|
@@ -742,9 +797,26 @@ export interface ResponseObject {
|
|
|
742
797
|
};
|
|
743
798
|
previous_response_id?: string;
|
|
744
799
|
job_id?: string;
|
|
745
|
-
|
|
800
|
+
receipt?: Record<string, unknown>;
|
|
801
|
+
}
|
|
802
|
+
export interface ResponseOutputItem {
|
|
803
|
+
type: string;
|
|
804
|
+
role?: "assistant";
|
|
805
|
+
text?: string;
|
|
806
|
+
image_url?: string;
|
|
807
|
+
audio_url?: string;
|
|
808
|
+
video_url?: string;
|
|
809
|
+
embedding?: number[];
|
|
810
|
+
job_id?: string;
|
|
811
|
+
status?: string;
|
|
812
|
+
progress?: number;
|
|
813
|
+
mime_type?: string;
|
|
814
|
+
[key: string]: unknown;
|
|
746
815
|
}
|
|
747
816
|
export type ResponseStreamEvent = {
|
|
817
|
+
type: "response.created";
|
|
818
|
+
response: ResponseObject;
|
|
819
|
+
} | {
|
|
748
820
|
type: "response.output_text.delta";
|
|
749
821
|
response_id: string;
|
|
750
822
|
model: string;
|
|
@@ -791,6 +863,21 @@ export type ResponseStreamEvent = {
|
|
|
791
863
|
output_tokens: number;
|
|
792
864
|
total_tokens: number;
|
|
793
865
|
};
|
|
866
|
+
} | {
|
|
867
|
+
type: "response.output_item.completed";
|
|
868
|
+
response_id: string;
|
|
869
|
+
model: string;
|
|
870
|
+
output_index: number;
|
|
871
|
+
item: ResponseOutputItem;
|
|
872
|
+
} | {
|
|
873
|
+
type: "response.output_video.status";
|
|
874
|
+
response_id: string;
|
|
875
|
+
model: string;
|
|
876
|
+
job_id: string;
|
|
877
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
878
|
+
progress?: number;
|
|
879
|
+
url?: string;
|
|
880
|
+
error?: string;
|
|
794
881
|
} | {
|
|
795
882
|
type: "response.completed";
|
|
796
883
|
response_id: string;
|
|
@@ -810,7 +897,6 @@ export interface EmbeddingsCreateParams {
|
|
|
810
897
|
dimensions?: number;
|
|
811
898
|
encoding_format?: "float" | "base64" | string;
|
|
812
899
|
user?: string;
|
|
813
|
-
provider?: ModelProvider;
|
|
814
900
|
[key: string]: unknown;
|
|
815
901
|
}
|
|
816
902
|
export interface EmbeddingsResponse {
|
|
@@ -825,7 +911,7 @@ export interface EmbeddingsResponse {
|
|
|
825
911
|
prompt_tokens: number;
|
|
826
912
|
total_tokens: number;
|
|
827
913
|
};
|
|
828
|
-
|
|
914
|
+
receipt?: Record<string, unknown>;
|
|
829
915
|
}
|
|
830
916
|
export interface ImagesGenerateParams {
|
|
831
917
|
model: string;
|
|
@@ -838,7 +924,6 @@ export interface ImagesGenerateParams {
|
|
|
838
924
|
response_format?: "url" | "b64_json" | string;
|
|
839
925
|
style?: "vivid" | "natural" | string;
|
|
840
926
|
user?: string;
|
|
841
|
-
provider?: ModelProvider;
|
|
842
927
|
[key: string]: unknown;
|
|
843
928
|
}
|
|
844
929
|
export interface ImagesEditParams extends ImagesGenerateParams {
|
|
@@ -852,7 +937,7 @@ export interface ImagesResponse {
|
|
|
852
937
|
b64_json?: string;
|
|
853
938
|
revised_prompt?: string;
|
|
854
939
|
}>;
|
|
855
|
-
|
|
940
|
+
receipt?: Record<string, unknown>;
|
|
856
941
|
}
|
|
857
942
|
export interface AudioSpeechCreateParams {
|
|
858
943
|
model: string;
|
|
@@ -863,7 +948,6 @@ export interface AudioSpeechCreateParams {
|
|
|
863
948
|
response_format?: string;
|
|
864
949
|
speed?: number;
|
|
865
950
|
user?: string;
|
|
866
|
-
provider?: ModelProvider;
|
|
867
951
|
[key: string]: unknown;
|
|
868
952
|
}
|
|
869
953
|
export interface AudioTranscriptionCreateParams {
|
|
@@ -877,7 +961,6 @@ export interface AudioTranscriptionCreateParams {
|
|
|
877
961
|
prompt?: string;
|
|
878
962
|
temperature?: number;
|
|
879
963
|
timestamp_granularities?: Array<"word" | "segment" | string>;
|
|
880
|
-
provider?: ModelProvider;
|
|
881
964
|
[key: string]: unknown;
|
|
882
965
|
}
|
|
883
966
|
export interface AudioTranscriptionResponse {
|
|
@@ -891,7 +974,7 @@ export interface AudioTranscriptionResponse {
|
|
|
891
974
|
end: number;
|
|
892
975
|
}>;
|
|
893
976
|
segments?: Array<Record<string, unknown>>;
|
|
894
|
-
|
|
977
|
+
receipt?: Record<string, unknown>;
|
|
895
978
|
}
|
|
896
979
|
export interface VideoGenerateParams {
|
|
897
980
|
model: string;
|
|
@@ -906,7 +989,6 @@ export interface VideoGenerateParams {
|
|
|
906
989
|
image?: string;
|
|
907
990
|
image_url?: string;
|
|
908
991
|
user?: string;
|
|
909
|
-
provider?: ModelProvider;
|
|
910
992
|
[key: string]: unknown;
|
|
911
993
|
}
|
|
912
994
|
export interface VideoGenerateResponse {
|
|
@@ -923,7 +1005,7 @@ export interface VideoGenerateResponse {
|
|
|
923
1005
|
duration?: number;
|
|
924
1006
|
[key: string]: unknown;
|
|
925
1007
|
}>;
|
|
926
|
-
|
|
1008
|
+
receipt?: Record<string, unknown>;
|
|
927
1009
|
[key: string]: unknown;
|
|
928
1010
|
}
|
|
929
1011
|
export interface VideoJobStatus {
|
|
@@ -953,6 +1035,67 @@ export type VideoStatusStreamEvent = {
|
|
|
953
1035
|
* Events emitted by the Compose agent runtime on /agent/:wallet/stream.
|
|
954
1036
|
* Mirrors the runtime's native SSE vocabulary — no translation, no renaming.
|
|
955
1037
|
*/
|
|
1038
|
+
export type AgentDisplayKind = "tool" | "model" | "connector" | "agent" | "search" | "harness" | "conclave" | "route";
|
|
1039
|
+
export interface AgentEventDisplay {
|
|
1040
|
+
kind: AgentDisplayKind;
|
|
1041
|
+
id?: string;
|
|
1042
|
+
name?: string;
|
|
1043
|
+
target?: string;
|
|
1044
|
+
summary?: string;
|
|
1045
|
+
details?: Record<string, unknown>;
|
|
1046
|
+
}
|
|
1047
|
+
export interface AgentTraceRuntimeEvent {
|
|
1048
|
+
type: "trace";
|
|
1049
|
+
source: "capability" | "model" | "tool" | "agent" | "harness" | "route";
|
|
1050
|
+
stage?: string;
|
|
1051
|
+
action?: string;
|
|
1052
|
+
message?: string;
|
|
1053
|
+
display?: AgentEventDisplay;
|
|
1054
|
+
ts?: number;
|
|
1055
|
+
details?: Record<string, unknown>;
|
|
1056
|
+
}
|
|
1057
|
+
export interface AgentChildRuntimeEvent {
|
|
1058
|
+
type: "child";
|
|
1059
|
+
event: "start" | "delta" | "tool-start" | "tool-end" | "done" | "error";
|
|
1060
|
+
rootComposeRunId?: string;
|
|
1061
|
+
parentRunId?: string;
|
|
1062
|
+
subId?: string;
|
|
1063
|
+
depth?: number;
|
|
1064
|
+
agentWallet?: string;
|
|
1065
|
+
userAddress?: string;
|
|
1066
|
+
runKey?: string;
|
|
1067
|
+
runKeyChain?: string[];
|
|
1068
|
+
delta?: string;
|
|
1069
|
+
toolName?: string;
|
|
1070
|
+
input?: unknown;
|
|
1071
|
+
output?: unknown;
|
|
1072
|
+
failed?: boolean;
|
|
1073
|
+
error?: string;
|
|
1074
|
+
usage?: Record<string, unknown>;
|
|
1075
|
+
toolBatches?: number;
|
|
1076
|
+
stopReason?: string;
|
|
1077
|
+
wallMs?: number;
|
|
1078
|
+
display?: AgentEventDisplay;
|
|
1079
|
+
ts?: number;
|
|
1080
|
+
}
|
|
1081
|
+
export interface AgentConclaveRuntimeEvent {
|
|
1082
|
+
type: "conclave";
|
|
1083
|
+
action: "write" | "read" | "list" | "delete";
|
|
1084
|
+
key?: string;
|
|
1085
|
+
success: boolean;
|
|
1086
|
+
display?: AgentEventDisplay;
|
|
1087
|
+
details?: Record<string, unknown>;
|
|
1088
|
+
}
|
|
1089
|
+
export interface AgentRouteRuntimeEvent {
|
|
1090
|
+
type: "route";
|
|
1091
|
+
mode: string;
|
|
1092
|
+
confidence?: number;
|
|
1093
|
+
ambiguous?: boolean;
|
|
1094
|
+
candidates?: unknown[];
|
|
1095
|
+
hints?: Record<string, unknown>;
|
|
1096
|
+
reason?: string;
|
|
1097
|
+
display?: AgentEventDisplay;
|
|
1098
|
+
}
|
|
956
1099
|
export type AgentRuntimeEvent = {
|
|
957
1100
|
type: "text-delta";
|
|
958
1101
|
delta: string;
|
|
@@ -972,15 +1115,23 @@ export type AgentRuntimeEvent = {
|
|
|
972
1115
|
} | {
|
|
973
1116
|
type: "tool-start";
|
|
974
1117
|
toolName: string;
|
|
1118
|
+
displayName?: string;
|
|
975
1119
|
summary?: string;
|
|
976
1120
|
content?: string;
|
|
1121
|
+
targetKind?: AgentDisplayKind;
|
|
1122
|
+
target?: string;
|
|
1123
|
+
display?: AgentEventDisplay;
|
|
977
1124
|
} | {
|
|
978
1125
|
type: "tool-end";
|
|
979
1126
|
toolName: string;
|
|
1127
|
+
displayName?: string;
|
|
980
1128
|
summary?: string;
|
|
981
1129
|
failed: boolean;
|
|
982
1130
|
error?: string;
|
|
983
|
-
|
|
1131
|
+
targetKind?: AgentDisplayKind;
|
|
1132
|
+
target?: string;
|
|
1133
|
+
display?: AgentEventDisplay;
|
|
1134
|
+
} | AgentTraceRuntimeEvent | AgentChildRuntimeEvent | AgentConclaveRuntimeEvent | AgentRouteRuntimeEvent | {
|
|
984
1135
|
type: "stopped";
|
|
985
1136
|
reason: string;
|
|
986
1137
|
} | {
|
|
@@ -1005,12 +1156,16 @@ export interface AgentStreamFinalResult {
|
|
|
1005
1156
|
text: string;
|
|
1006
1157
|
toolCalls: Array<{
|
|
1007
1158
|
toolName: string;
|
|
1159
|
+
displayName?: string;
|
|
1008
1160
|
summary?: string;
|
|
1009
1161
|
failed: boolean;
|
|
1010
1162
|
error?: string;
|
|
1163
|
+
targetKind?: AgentDisplayKind;
|
|
1164
|
+
target?: string;
|
|
1165
|
+
display?: AgentEventDisplay;
|
|
1011
1166
|
}>;
|
|
1012
1167
|
requestId: string | null;
|
|
1013
|
-
receipt:
|
|
1168
|
+
receipt: Receipt | null;
|
|
1014
1169
|
budget: SessionBudgetSnapshot | null;
|
|
1015
1170
|
sessionInvalidReason: SessionInvalidReason | null;
|
|
1016
1171
|
}
|
|
@@ -1080,7 +1235,7 @@ export interface WorkflowStreamFinalResult {
|
|
|
1080
1235
|
error?: string;
|
|
1081
1236
|
}>;
|
|
1082
1237
|
requestId: string | null;
|
|
1083
|
-
receipt:
|
|
1238
|
+
receipt: Receipt | null;
|
|
1084
1239
|
budget: SessionBudgetSnapshot | null;
|
|
1085
1240
|
sessionInvalidReason: SessionInvalidReason | null;
|
|
1086
1241
|
}
|
|
@@ -1437,6 +1592,7 @@ export interface DirectoryAgent {
|
|
|
1437
1592
|
model: string;
|
|
1438
1593
|
framework?: "manowar" | string;
|
|
1439
1594
|
licensePrice: string;
|
|
1595
|
+
creatorFee?: number;
|
|
1440
1596
|
licenses: number;
|
|
1441
1597
|
licensesAvailable?: number;
|
|
1442
1598
|
cloneable: boolean;
|