@novalabai/adk 2.15.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -33
- package/dist/client.d.ts +19 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +27 -8
- package/dist/client.js.map +1 -1
- package/dist/core/errors.d.ts +57 -2
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +76 -2
- package/dist/core/errors.js.map +1 -1
- package/dist/core/http.d.ts +20 -0
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +105 -42
- package/dist/core/http.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -6
- package/dist/index.js.map +1 -1
- package/dist/resources/billing.d.ts +16 -0
- package/dist/resources/billing.d.ts.map +1 -1
- package/dist/resources/billing.js +30 -0
- package/dist/resources/billing.js.map +1 -1
- package/dist/resources/chat.d.ts +7 -0
- package/dist/resources/chat.d.ts.map +1 -1
- package/dist/resources/chat.js +10 -1
- package/dist/resources/chat.js.map +1 -1
- package/dist/resources/creative.d.ts +2 -3
- package/dist/resources/creative.d.ts.map +1 -1
- package/dist/resources/creative.js.map +1 -1
- package/dist/resources/files.d.ts +12 -1
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +12 -1
- package/dist/resources/files.js.map +1 -1
- package/dist/resources/messages.d.ts +34 -0
- package/dist/resources/messages.d.ts.map +1 -0
- package/dist/resources/messages.js +54 -0
- package/dist/resources/messages.js.map +1 -0
- package/dist/resources/models-list.d.ts +9 -0
- package/dist/resources/models-list.d.ts.map +1 -0
- package/dist/resources/models-list.js +15 -0
- package/dist/resources/models-list.js.map +1 -0
- package/dist/resources/subscription.d.ts +0 -2
- package/dist/resources/subscription.d.ts.map +1 -1
- package/dist/resources/subscription.js +0 -4
- package/dist/resources/subscription.js.map +1 -1
- package/dist/types/account.d.ts +137 -0
- package/dist/types/account.d.ts.map +1 -0
- package/dist/types/account.js +4 -0
- package/dist/types/account.js.map +1 -0
- package/dist/types/files.d.ts +10 -0
- package/dist/types/files.d.ts.map +1 -1
- package/dist/types/messages.d.ts +159 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/messages.js +68 -0
- package/dist/types/messages.js.map +1 -0
- package/package.json +1 -1
- package/dist/resources/terminal.d.ts +0 -84
- package/dist/resources/terminal.d.ts.map +0 -1
- package/dist/resources/terminal.js +0 -81
- package/dist/resources/terminal.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat.ts"],"names":[],"mappings":";;;AASA,4DAAyD;AACzD,qDAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat.ts"],"names":[],"mappings":";;;AASA,4DAAyD;AACzD,qDAAgF;AAChF,iDAAqD;AAGrD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,YAAY;IACN,IAAI,CAAa;IAElC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CAAC,MAAyB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAe,OAAO,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,gBAAgB,CACpB,MAAyB,EACzB,cAAyB;QAEzB,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC;QACvC,MAAM,KAAK,GAAG,cAAc,IAAI,CAAC,GAAG,oCAAsB,CAAC,CAAC;QAE5D,OAAO,IAAA,+BAAiB,EACtB,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAe,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,EACtE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CAAC,aAAa,IAAI,2CAA2C;iBAC5E,CAAC,CAAC;YACL,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA7GD,oCA6GC"}
|
|
@@ -13,9 +13,8 @@ export interface CreativeImageParams {
|
|
|
13
13
|
prompt: string;
|
|
14
14
|
style?: CreativeImageStyle;
|
|
15
15
|
size?: string;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* if the operator enabled it server-side (NOVA_ALLOW_US_IMAGE). */
|
|
16
|
+
/** Kept for compatibility. The server has no US image model; images are
|
|
17
|
+
* always made in the EU, and a request with allowUs gets a notice. */
|
|
19
18
|
allowUs?: boolean;
|
|
20
19
|
}
|
|
21
20
|
export interface CreativeVideoParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creative.d.ts","sourceRoot":"","sources":["../../src/resources/creative.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,iCAAiC;AACjC,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5F,kBAAkB;AAClB,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,gBAAgB,GAAG,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC;AAExG,6BAA6B;AAC7B,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1H,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,mBAAmB,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;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O,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC,yCAAyC;IACnC,QAAQ,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC;IAIvE,2BAA2B;IACrB,KAAK,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAS1E,gCAAgC;IAC1B,KAAK,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAQ1E,iCAAiC;IAC3B,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC;CAM1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creative.js","sourceRoot":"","sources":["../../src/resources/creative.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"creative.js","sourceRoot":"","sources":["../../src/resources/creative.ts"],"names":[],"mappings":";;;AA0CA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,gBAAgB;IACP;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,yCAAyC;IACzC,KAAK,CAAC,QAAQ,CAAC,MAA8B;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAED,2BAA2B;IAC3B,KAAK,CAAC,KAAK,CAAC,MAA2B;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACvC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM;YAC7B,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW;YAChC,QAAQ,EAAE,MAAM,CAAC,OAAO,IAAI,KAAK;SAClC,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC;IAChC,KAAK,CAAC,KAAK,CAAC,MAA2B;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACvC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE;YAC/B,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;SACrB,CAAC,CAAC;IACL,CAAC;IAED,iCAAiC;IACjC,KAAK,CAAC,SAAS,CAAC,MAA+B;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE;YAC3C,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,MAAM;SAC5C,CAAC,CAAC;IACL,CAAC;CACF;AAlCD,4CAkCC"}
|
|
@@ -15,6 +15,17 @@ export interface FileUploadParams {
|
|
|
15
15
|
sessionId?: string;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
+
* Files: upload once, then use the file in messages (2.17, answers cite pages)
|
|
19
|
+
* or as a chat attachment.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const f = await nova.files.upload({ content: await readFile('contract.pdf'), filename: 'contract.pdf' });
|
|
24
|
+
* const msg = await nova.messages.create({ messages: [{ role: 'user', content: [
|
|
25
|
+
* documentBlock(f.file_id), { type: 'text', text: 'What is the notice period?' } ] }] });
|
|
26
|
+
* console.log(messageText(msg), msg.citations?.map((c) => c.page));
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
18
29
|
* Upload + manage chat attachments (.pptx, .pdf, .docx, images).
|
|
19
30
|
*
|
|
20
31
|
* Once uploaded, every chat / planner step in the same session sees the
|
|
@@ -53,7 +64,7 @@ export declare class FilesResource {
|
|
|
53
64
|
* .csv, .html, .htm, .png, .jpg, .jpeg, .webp, .gif. Cap is 25MB.
|
|
54
65
|
*/
|
|
55
66
|
upload(params: FileUploadParams): Promise<FileUploadResponse>;
|
|
56
|
-
/**
|
|
67
|
+
/** Delete the file: its id stops working in messages, and the stored file is removed. */
|
|
57
68
|
delete(fileId: string): Promise<void>;
|
|
58
69
|
}
|
|
59
70
|
//# sourceMappingURL=files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,OAAO,EAAE,IAAI,GAAG,UAAU,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,OAAO,EAAE,IAAI,GAAG,UAAU,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAI5B;;;;;OAKG;IACG,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAUnE,yFAAyF;IACnF,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5C"}
|
package/dist/resources/files.js
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FilesResource = void 0;
|
|
4
4
|
/**
|
|
5
|
+
* Files: upload once, then use the file in messages (2.17, answers cite pages)
|
|
6
|
+
* or as a chat attachment.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const f = await nova.files.upload({ content: await readFile('contract.pdf'), filename: 'contract.pdf' });
|
|
11
|
+
* const msg = await nova.messages.create({ messages: [{ role: 'user', content: [
|
|
12
|
+
* documentBlock(f.file_id), { type: 'text', text: 'What is the notice period?' } ] }] });
|
|
13
|
+
* console.log(messageText(msg), msg.citations?.map((c) => c.page));
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
5
16
|
* Upload + manage chat attachments (.pptx, .pdf, .docx, images).
|
|
6
17
|
*
|
|
7
18
|
* Once uploaded, every chat / planner step in the same session sees the
|
|
@@ -50,7 +61,7 @@ class FilesResource {
|
|
|
50
61
|
form.append('session_id', params.sessionId ?? '');
|
|
51
62
|
return this.http.postMultipart('/files/upload', form);
|
|
52
63
|
}
|
|
53
|
-
/**
|
|
64
|
+
/** Delete the file: its id stops working in messages, and the stored file is removed. */
|
|
54
65
|
async delete(fileId) {
|
|
55
66
|
await this.http.delete(`/files/${fileId}`);
|
|
56
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/files.ts"],"names":[],"mappings":";;;AAkBA
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/files.ts"],"names":[],"mappings":";;;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,aAAa;IACP,IAAI,CAAa;IAElC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,MAAwB;QACnC,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,YAAY,IAAI;YACzC,CAAC,CAAC,MAAM,CAAC,OAAO;YAChB,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,OAAqB,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,WAAW,IAAI,0BAA0B,EAAE,CAAC,CAAC;QACzG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAqB,eAAe,EAAE,IAAI,CAAC,CAAC;IAC5E,CAAC;IAED,yFAAyF;IACzF,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;IAC7C,CAAC;CACF;AA3BD,sCA2BC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HttpClient } from '../core/http.js';
|
|
2
|
+
import type { Message, MessageCreateParams, MessageStreamEvent } from '../types/messages.js';
|
|
3
|
+
/**
|
|
4
|
+
* POST /v1/messages: content blocks, your own tools, images, streaming.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const nova = new NovaClient(); // NOVA_API_KEY from the environment
|
|
9
|
+
* const msg = await nova.messages.create({
|
|
10
|
+
* model: 'nova-flagship',
|
|
11
|
+
* max_tokens: 512,
|
|
12
|
+
* messages: [{ role: 'user', content: 'One sentence about the fjords.' }],
|
|
13
|
+
* });
|
|
14
|
+
* console.log(messageText(msg));
|
|
15
|
+
*
|
|
16
|
+
* for await (const ev of nova.messages.stream({ model: 'nova-fast', messages: [{ role: 'user', content: 'Count to five.' }] })) {
|
|
17
|
+
* process.stdout.write(eventText(ev));
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare class MessagesResource {
|
|
22
|
+
private readonly http;
|
|
23
|
+
constructor(http: HttpClient);
|
|
24
|
+
private body;
|
|
25
|
+
/** Send messages and get the answer. With `tools`, check `toolUses(msg)`, run the tool and send `toolResultBlock(...)` back. */
|
|
26
|
+
create(params: MessageCreateParams): Promise<Message>;
|
|
27
|
+
/**
|
|
28
|
+
* Stream the answer as server-sent events (`eventText(ev)` has the new
|
|
29
|
+
* text). Throws the same typed errors as `create` before the first event
|
|
30
|
+
* (for example `CreditsExhausted`).
|
|
31
|
+
*/
|
|
32
|
+
stream(params: MessageCreateParams): AsyncIterableIterator<MessageStreamEvent>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE7F;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAI5B,OAAO,CAAC,IAAI;IAOZ,gIAAgI;IAC1H,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAM3D;;;;OAIG;IACI,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,CAAC,kBAAkB,CAAC;CAKtF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessagesResource = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* POST /v1/messages: content blocks, your own tools, images, streaming.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const nova = new NovaClient(); // NOVA_API_KEY from the environment
|
|
10
|
+
* const msg = await nova.messages.create({
|
|
11
|
+
* model: 'nova-flagship',
|
|
12
|
+
* max_tokens: 512,
|
|
13
|
+
* messages: [{ role: 'user', content: 'One sentence about the fjords.' }],
|
|
14
|
+
* });
|
|
15
|
+
* console.log(messageText(msg));
|
|
16
|
+
*
|
|
17
|
+
* for await (const ev of nova.messages.stream({ model: 'nova-fast', messages: [{ role: 'user', content: 'Count to five.' }] })) {
|
|
18
|
+
* process.stdout.write(eventText(ev));
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
class MessagesResource {
|
|
23
|
+
http;
|
|
24
|
+
constructor(http) {
|
|
25
|
+
this.http = http;
|
|
26
|
+
}
|
|
27
|
+
body(params) {
|
|
28
|
+
const { model = 'nova-flagship', max_tokens = 1024, ...rest } = params;
|
|
29
|
+
const out = { model, max_tokens };
|
|
30
|
+
for (const [k, v] of Object.entries(rest))
|
|
31
|
+
if (v !== undefined)
|
|
32
|
+
out[k] = v;
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
/** Send messages and get the answer. With `tools`, check `toolUses(msg)`, run the tool and send `toolResultBlock(...)` back. */
|
|
36
|
+
async create(params) {
|
|
37
|
+
const body = this.body(params);
|
|
38
|
+
delete body.stream;
|
|
39
|
+
return this.http.post('/messages', body);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Stream the answer as server-sent events (`eventText(ev)` has the new
|
|
43
|
+
* text). Throws the same typed errors as `create` before the first event
|
|
44
|
+
* (for example `CreditsExhausted`).
|
|
45
|
+
*/
|
|
46
|
+
async *stream(params) {
|
|
47
|
+
for await (const raw of this.http.postStream('/messages', { ...this.body(params), stream: true })) {
|
|
48
|
+
if (raw && typeof raw.type === 'string')
|
|
49
|
+
yield raw;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.MessagesResource = MessagesResource;
|
|
54
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,gBAAgB;IACV,IAAI,CAAa;IAElC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEO,IAAI,CAAC,MAA2B;QACtC,MAAM,EAAE,KAAK,GAAG,eAAe,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvE,MAAM,GAAG,GAA4B,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;QAC3D,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,KAAK,SAAS;gBAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAC3E,OAAO,GAAG,CAAC;IACb,CAAC;IAED,gIAAgI;IAChI,KAAK,CAAC,MAAM,CAAC,MAA2B;QACtC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAU,WAAW,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,CAAC,MAAM,CAAC,MAA2B;QACvC,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YAClG,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ;gBAAE,MAAM,GAAyB,CAAC;QAC3E,CAAC;IACH,CAAC;CACF;AA/BD,4CA+BC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HttpClient } from '../core/http.js';
|
|
2
|
+
import type { ModelList } from '../types/account.js';
|
|
3
|
+
/** GET /v1/models: `auto` and the Nova models (no API key needed). */
|
|
4
|
+
export declare class ModelsResource {
|
|
5
|
+
private readonly http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
list(): Promise<ModelList>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=models-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-list.d.ts","sourceRoot":"","sources":["../../src/resources/models-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,sEAAsE;AACtE,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAItB,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC;CAGjC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelsResource = void 0;
|
|
4
|
+
/** GET /v1/models: `auto` and the Nova models (no API key needed). */
|
|
5
|
+
class ModelsResource {
|
|
6
|
+
http;
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
async list() {
|
|
11
|
+
return this.http.get('/models');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ModelsResource = ModelsResource;
|
|
15
|
+
//# sourceMappingURL=models-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-list.js","sourceRoot":"","sources":["../../src/resources/models-list.ts"],"names":[],"mappings":";;;AAGA,sEAAsE;AACtE,MAAa,cAAc;IACR,IAAI,CAAa;IAElC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAY,SAAS,CAAC,CAAC;IAC7C,CAAC;CACF;AAVD,wCAUC"}
|
|
@@ -6,7 +6,5 @@ export declare class SubscriptionResource {
|
|
|
6
6
|
get(): Promise<Record<string, unknown>>;
|
|
7
7
|
/** Get current usage statistics (requests, tokens, cost). */
|
|
8
8
|
usage(): Promise<Record<string, unknown>>;
|
|
9
|
-
/** Upgrade to a new plan ('pro' or 'enterprise'). */
|
|
10
|
-
upgrade(plan: string): Promise<Record<string, unknown>>;
|
|
11
9
|
}
|
|
12
10
|
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/resources/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAI5B,iEAAiE;IAC3D,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAI7C,6DAA6D;IACvD,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/resources/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAI5B,iEAAiE;IAC3D,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAI7C,6DAA6D;IACvD,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAGhD"}
|
|
@@ -14,10 +14,6 @@ class SubscriptionResource {
|
|
|
14
14
|
async usage() {
|
|
15
15
|
return this.http.get('/subscription/usage');
|
|
16
16
|
}
|
|
17
|
-
/** Upgrade to a new plan ('pro' or 'enterprise'). */
|
|
18
|
-
async upgrade(plan) {
|
|
19
|
-
return this.http.post('/subscription/upgrade', { plan });
|
|
20
|
-
}
|
|
21
17
|
}
|
|
22
18
|
exports.SubscriptionResource = SubscriptionResource;
|
|
23
19
|
//# sourceMappingURL=subscription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/resources/subscription.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;IACd,IAAI,CAAa;IAElC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,iEAAiE;IACjE,KAAK,CAAC,GAAG;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;IAED,6DAA6D;IAC7D,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAC9C,CAAC;
|
|
1
|
+
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/resources/subscription.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;IACd,IAAI,CAAa;IAElC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,iEAAiE;IACjE,KAAK,CAAC,GAAG;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;IAED,6DAA6D;IAC7D,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAC9C,CAAC;CACF;AAhBD,oDAgBC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/** Types for your plan, credits and the billing calls of the public API. */
|
|
2
|
+
export interface FeatureStatus {
|
|
3
|
+
/** You can use it now. */
|
|
4
|
+
allowed: boolean;
|
|
5
|
+
/** Your plan includes it. */
|
|
6
|
+
in_plan: boolean;
|
|
7
|
+
enforced?: boolean;
|
|
8
|
+
/** The first plan that has it. */
|
|
9
|
+
required_plan?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
/** GET /v1/plan/features */
|
|
13
|
+
export interface PlanFeaturesInfo {
|
|
14
|
+
plan: string;
|
|
15
|
+
known_plan?: boolean;
|
|
16
|
+
legacy?: boolean;
|
|
17
|
+
free?: boolean;
|
|
18
|
+
enforced?: boolean;
|
|
19
|
+
features: Record<string, FeatureStatus>;
|
|
20
|
+
/** Number limits (null: no fixed limit): monthly_credits, api_rate_limit_rpm, scheduled_tasks, ... */
|
|
21
|
+
limits: Record<string, number | null>;
|
|
22
|
+
modes?: string[];
|
|
23
|
+
quality_tier?: string;
|
|
24
|
+
priority?: string;
|
|
25
|
+
upgrade_url: string;
|
|
26
|
+
not_built?: string[];
|
|
27
|
+
[extra: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
/** GET /v1/billing/credits */
|
|
30
|
+
export interface CreditBalance {
|
|
31
|
+
plan: string;
|
|
32
|
+
plan_credits?: number;
|
|
33
|
+
seats?: number | null;
|
|
34
|
+
/** Credits you can spend now (monthly plus credit packs). */
|
|
35
|
+
balance: number;
|
|
36
|
+
monthly_balance?: number;
|
|
37
|
+
topup_balance?: number;
|
|
38
|
+
granted?: number;
|
|
39
|
+
used: number;
|
|
40
|
+
used_pct?: number;
|
|
41
|
+
warning_80pct?: boolean;
|
|
42
|
+
warning_100pct?: boolean;
|
|
43
|
+
/** `block`: at 0 a new request is refused with 402 (CreditsExhausted). */
|
|
44
|
+
at_zero: string;
|
|
45
|
+
billing_state?: 'ok' | 'grace' | 'downgraded' | (string & {});
|
|
46
|
+
topup_url: string;
|
|
47
|
+
upgrade_url: string;
|
|
48
|
+
[extra: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface DailyUsage {
|
|
51
|
+
days: Array<{
|
|
52
|
+
date: string;
|
|
53
|
+
day: string;
|
|
54
|
+
calls: number;
|
|
55
|
+
}>;
|
|
56
|
+
total?: number;
|
|
57
|
+
max?: number;
|
|
58
|
+
}
|
|
59
|
+
export interface OperationCost {
|
|
60
|
+
workspace_credits: number;
|
|
61
|
+
input_per_1k_credits?: number;
|
|
62
|
+
output_per_1k_credits?: number;
|
|
63
|
+
[extra: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
export interface PlanCatalog {
|
|
66
|
+
currency?: string;
|
|
67
|
+
on_sale?: boolean;
|
|
68
|
+
plans: Array<Record<string, unknown>>;
|
|
69
|
+
current?: Record<string, unknown>;
|
|
70
|
+
[extra: string]: unknown;
|
|
71
|
+
}
|
|
72
|
+
export interface TopupPack {
|
|
73
|
+
credits: number;
|
|
74
|
+
price_cents: number;
|
|
75
|
+
currency: string;
|
|
76
|
+
lookup_key?: string;
|
|
77
|
+
[extra: string]: unknown;
|
|
78
|
+
}
|
|
79
|
+
export interface CheckoutLink {
|
|
80
|
+
checkout_url: string;
|
|
81
|
+
session_id?: string;
|
|
82
|
+
credits?: number;
|
|
83
|
+
[extra: string]: unknown;
|
|
84
|
+
}
|
|
85
|
+
export interface NovaModelEntry {
|
|
86
|
+
id: string;
|
|
87
|
+
object?: string;
|
|
88
|
+
label?: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
status?: string;
|
|
91
|
+
}
|
|
92
|
+
/** GET /v1/models */
|
|
93
|
+
export interface ModelList {
|
|
94
|
+
object: 'list';
|
|
95
|
+
data: NovaModelEntry[];
|
|
96
|
+
residency?: string;
|
|
97
|
+
[extra: string]: unknown;
|
|
98
|
+
}
|
|
99
|
+
export interface ChatCompletionParams {
|
|
100
|
+
model?: string;
|
|
101
|
+
messages: Array<{
|
|
102
|
+
role: string;
|
|
103
|
+
content?: unknown;
|
|
104
|
+
[k: string]: unknown;
|
|
105
|
+
}>;
|
|
106
|
+
max_tokens?: number;
|
|
107
|
+
temperature?: number;
|
|
108
|
+
tools?: unknown[];
|
|
109
|
+
tool_choice?: unknown;
|
|
110
|
+
response_format?: {
|
|
111
|
+
type: 'text' | 'json_object' | 'json_schema';
|
|
112
|
+
[k: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
[extra: string]: unknown;
|
|
115
|
+
}
|
|
116
|
+
export interface ChatCompletion {
|
|
117
|
+
id: string;
|
|
118
|
+
object: 'chat.completion';
|
|
119
|
+
created?: number;
|
|
120
|
+
model: string;
|
|
121
|
+
choices: Array<{
|
|
122
|
+
index: number;
|
|
123
|
+
finish_reason: string;
|
|
124
|
+
message: {
|
|
125
|
+
role: string;
|
|
126
|
+
content: string | null;
|
|
127
|
+
tool_calls?: unknown[];
|
|
128
|
+
};
|
|
129
|
+
}>;
|
|
130
|
+
usage?: {
|
|
131
|
+
prompt_tokens: number;
|
|
132
|
+
completion_tokens: number;
|
|
133
|
+
total_tokens: number;
|
|
134
|
+
};
|
|
135
|
+
[extra: string]: unknown;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/types/account.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,MAAM,WAAW,aAAa;IAC5B,0BAA0B;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,4BAA4B;AAC5B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACxC,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,8BAA8B;AAC9B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAA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M,GAAG,OAAO,CAAA;KAAE,CAAC;IACzF,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,UAAU,CAAC,EAAE,OAAO,EAAE,CAAA;SAAE,CAAC;KAC3E,CAAC,CAAC;IACH,KAAK,CAAC,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACnF,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/types/account.ts"],"names":[],"mappings":";AAAA,4EAA4E"}
|
package/dist/types/files.d.ts
CHANGED
|
@@ -7,6 +7,16 @@ export interface FileUploadResponse {
|
|
|
7
7
|
content_type: string;
|
|
8
8
|
/** Bytes */
|
|
9
9
|
size: number;
|
|
10
|
+
/** 2.17: pages (PDF) or slides (PowerPoint); 0 for files without pages. */
|
|
11
|
+
pages?: number;
|
|
12
|
+
/** 2.17: 'page', 'slide' or null. */
|
|
13
|
+
page_unit?: 'page' | 'slide' | null;
|
|
14
|
+
/** 2.17: the file id works this many days in messages (or until deleted). */
|
|
15
|
+
expires_in_days?: number;
|
|
16
|
+
extracted_chars?: number;
|
|
17
|
+
/** Kinds of secrets found in the file and removed. */
|
|
18
|
+
credential_kinds_redacted?: string[];
|
|
19
|
+
preview_url?: string | null;
|
|
10
20
|
/** Backend storage key (null when running on local /tmp fallback) */
|
|
11
21
|
s3_key?: string | null;
|
|
12
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/types/files.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/types/files.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACpC,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for POST /v1/messages (content blocks, tools, images, streaming;
|
|
3
|
+
* 2.17: JSON answers, documents with page citations, thinking).
|
|
4
|
+
*/
|
|
5
|
+
/** The Nova models POST /v1/messages accepts. The model you name is the model that runs. */
|
|
6
|
+
export declare const MESSAGE_MODELS: readonly ["nova-max", "nova-flagship", "nova-reasoning", "nova-fast"];
|
|
7
|
+
export type MessageModel = (typeof MESSAGE_MODELS)[number];
|
|
8
|
+
export interface TextBlock {
|
|
9
|
+
type: 'text';
|
|
10
|
+
text: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ImageBlock {
|
|
13
|
+
type: 'image';
|
|
14
|
+
source: {
|
|
15
|
+
type: 'base64';
|
|
16
|
+
media_type: 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp';
|
|
17
|
+
data: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface ToolUseBlock {
|
|
21
|
+
type: 'tool_use';
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
input: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
export interface ToolResultBlock {
|
|
27
|
+
type: 'tool_result';
|
|
28
|
+
tool_use_id: string;
|
|
29
|
+
content?: string | TextBlock[];
|
|
30
|
+
is_error?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** A file you uploaded (`nova.files.upload`), in a user message. The answer cites its pages. */
|
|
33
|
+
export interface DocumentBlock {
|
|
34
|
+
type: 'document';
|
|
35
|
+
source: {
|
|
36
|
+
type: 'file';
|
|
37
|
+
file_id: string;
|
|
38
|
+
};
|
|
39
|
+
title?: string;
|
|
40
|
+
}
|
|
41
|
+
/** With `thinking` on: how the model worked it out (before the answer). Send it back unchanged in a tool loop. */
|
|
42
|
+
export interface ThinkingBlock {
|
|
43
|
+
type: 'thinking';
|
|
44
|
+
thinking: string;
|
|
45
|
+
signature?: string;
|
|
46
|
+
}
|
|
47
|
+
/** A page an answer cites (`document` blocks). */
|
|
48
|
+
export interface Citation {
|
|
49
|
+
file_id: string;
|
|
50
|
+
filename: string;
|
|
51
|
+
page: number;
|
|
52
|
+
unit: 'page' | 'slide';
|
|
53
|
+
quote: string;
|
|
54
|
+
}
|
|
55
|
+
/** JSON answers: the answer text is JSON that validates against `json_schema.schema` (checked by Nova). */
|
|
56
|
+
export interface ResponseFormat {
|
|
57
|
+
type: 'json_schema' | 'json_object' | 'text';
|
|
58
|
+
json_schema?: {
|
|
59
|
+
name?: string;
|
|
60
|
+
schema: Record<string, unknown>;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** Think longer: `{ effort: 'low' | 'medium' | 'high' }` or `{ type: 'enabled', budget_tokens }` (Pro plan and higher). */
|
|
64
|
+
export type ThinkingConfig = {
|
|
65
|
+
effort: 'low' | 'medium' | 'high';
|
|
66
|
+
} | {
|
|
67
|
+
type: 'enabled';
|
|
68
|
+
budget_tokens: number;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'disabled';
|
|
71
|
+
};
|
|
72
|
+
export type ContentBlock = TextBlock | ImageBlock | ToolUseBlock | ToolResultBlock | DocumentBlock | ThinkingBlock;
|
|
73
|
+
export interface MessageParam {
|
|
74
|
+
role: 'user' | 'assistant';
|
|
75
|
+
content: string | ContentBlock[];
|
|
76
|
+
}
|
|
77
|
+
export interface Tool {
|
|
78
|
+
name: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
/** JSON Schema of the tool's input. */
|
|
81
|
+
input_schema: Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
export interface MessageCreateParams {
|
|
84
|
+
/** `nova-max`, `nova-flagship`, `nova-reasoning` or `nova-fast` (default `nova-flagship`). */
|
|
85
|
+
model?: MessageModel | (string & {});
|
|
86
|
+
/** Most tokens to write (default 1024). */
|
|
87
|
+
max_tokens?: number;
|
|
88
|
+
messages: MessageParam[];
|
|
89
|
+
system?: string | TextBlock[];
|
|
90
|
+
tools?: Tool[];
|
|
91
|
+
tool_choice?: {
|
|
92
|
+
type: 'auto' | 'any' | 'tool';
|
|
93
|
+
name?: string;
|
|
94
|
+
};
|
|
95
|
+
temperature?: number;
|
|
96
|
+
top_p?: number;
|
|
97
|
+
top_k?: number;
|
|
98
|
+
stop_sequences?: string[];
|
|
99
|
+
/** JSON answers (not with `stream` or `tools`). See `jsonSchemaFormat`. */
|
|
100
|
+
response_format?: ResponseFormat;
|
|
101
|
+
/** Think longer (Pro plan and higher, else `FeatureNotInPlan`). */
|
|
102
|
+
thinking?: ThinkingConfig;
|
|
103
|
+
[extra: string]: unknown;
|
|
104
|
+
}
|
|
105
|
+
export interface Message {
|
|
106
|
+
id: string;
|
|
107
|
+
type: 'message';
|
|
108
|
+
role: 'assistant';
|
|
109
|
+
/** The model you asked for. */
|
|
110
|
+
model: string;
|
|
111
|
+
content: Array<TextBlock | ToolUseBlock | ThinkingBlock | {
|
|
112
|
+
type: string;
|
|
113
|
+
[k: string]: unknown;
|
|
114
|
+
}>;
|
|
115
|
+
stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | (string & {}) | null;
|
|
116
|
+
stop_sequence: string | null;
|
|
117
|
+
usage: {
|
|
118
|
+
input_tokens: number;
|
|
119
|
+
output_tokens: number;
|
|
120
|
+
};
|
|
121
|
+
/** With `document` blocks: the pages the answer cites, in order. */
|
|
122
|
+
citations?: Citation[];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* One server-sent event of a streamed answer: `message_start`,
|
|
126
|
+
* `content_block_start`, `content_block_delta`, `content_block_stop`,
|
|
127
|
+
* `message_delta`, `message_stop` or `error`.
|
|
128
|
+
*/
|
|
129
|
+
export interface MessageStreamEvent {
|
|
130
|
+
type: string;
|
|
131
|
+
index?: number;
|
|
132
|
+
delta?: {
|
|
133
|
+
type?: string;
|
|
134
|
+
text?: string;
|
|
135
|
+
partial_json?: string;
|
|
136
|
+
stop_reason?: string;
|
|
137
|
+
[k: string]: unknown;
|
|
138
|
+
};
|
|
139
|
+
[k: string]: unknown;
|
|
140
|
+
}
|
|
141
|
+
/** All text blocks of an answer, joined. */
|
|
142
|
+
export declare function messageText(message: Pick<Message, 'content'>): string;
|
|
143
|
+
/** The answer as JSON (with `response_format` it already matches your schema). Throws when the text is not JSON. */
|
|
144
|
+
export declare function messageJson<T = unknown>(message: Pick<Message, 'content'>): T;
|
|
145
|
+
/** The thinking text (with `thinking` on), else ''. */
|
|
146
|
+
export declare function messageThinking(message: Pick<Message, 'content'>): string;
|
|
147
|
+
/** A file you uploaded, in a user message (`nova.files.upload(...)` gives the id). */
|
|
148
|
+
export declare function documentBlock(fileId: string, title?: string): DocumentBlock;
|
|
149
|
+
/** `response_format` for a JSON answer that matches `schema`. */
|
|
150
|
+
export declare function jsonSchemaFormat(schema: Record<string, unknown>, name?: string): ResponseFormat;
|
|
151
|
+
/** The tool calls the model asked for (stop_reason `tool_use`). */
|
|
152
|
+
export declare function toolUses(message: Pick<Message, 'content'>): ToolUseBlock[];
|
|
153
|
+
/** The new text of a `content_block_delta` event ('' for other events). */
|
|
154
|
+
export declare function eventText(event: MessageStreamEvent): string;
|
|
155
|
+
/** An image content block from bytes (sent base64). */
|
|
156
|
+
export declare function imageBlock(data: Uint8Array | ArrayBuffer, mediaType?: ImageBlock['source']['media_type']): ImageBlock;
|
|
157
|
+
/** The block that sends your tool's result back to the model. */
|
|
158
|
+
export declare function toolResultBlock(toolUseId: string, content: string | TextBlock[], isError?: boolean): ToolResultBlock;
|
|
159
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/types/messages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4FAA4F;AAC5F,eAAO,MAAM,cAAc,uEAAwE,CAAC;AACpG,MAAM,MAAM,YAAY,G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