@butlerbot/sdk 0.0.3 → 0.0.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.
@@ -10,15 +10,21 @@ export type AIChatResultSuccess = {
10
10
  usage: any;
11
11
  };
12
12
  export type AIChatResult = AIChatResultFail | AIChatResultSuccess;
13
+ type AIChatProfileDisplayEntity = {
14
+ name?: string;
15
+ avatarUrl?: string;
16
+ };
13
17
  export type BaseAIResponseMetadata = {
14
18
  /** The model that generated this message */
15
19
  model: string;
16
20
  /** The actual model ID that generated this message */
17
21
  modelId: string;
18
- /** Epoch time for when this happened */
22
+ /** The time when this action started (represents time of first action, meaning in streamed messages it'll hold the time the first chunk was sent) */
23
+ firstTimestamp: number;
24
+ /** Epoch time for when this happened (represents time of last action, meaning in streamed messages it'll hold the time the last chunk was sent) */
19
25
  timestamp: number;
20
26
  };
21
- export type AIMessageResponse = {
27
+ type AIMessageResponse = {
22
28
  /** Specifies type to be a message */
23
29
  type: "message";
24
30
  payload: {
@@ -29,7 +35,39 @@ export type AIMessageResponse = {
29
35
  /** Whether this message was completed */
30
36
  completed: boolean;
31
37
  };
32
- metadata: BaseAIResponseMetadata & {};
38
+ metadata: BaseAIResponseMetadata & {
39
+ /** Display data for this message response, such as the author's name and profile picture */
40
+ display?: AIChatProfileDisplayEntity;
41
+ };
42
+ };
43
+ export type AIReasoningResponse = {
44
+ /** Specifies type to be a reasoning update */
45
+ type: "reasoning";
46
+ payload: {
47
+ /** The reasoning text */
48
+ reasoning: string;
49
+ /** The associated reasoning id */
50
+ reasoningId: string;
51
+ /** Whether this reasoning step is completed */
52
+ completed: boolean;
53
+ };
54
+ metadata: BaseAIResponseMetadata;
55
+ };
56
+ export type AIFileResponse = {
57
+ /** Specifies type to be a message */
58
+ type: "file";
59
+ payload: {
60
+ /** URL location of the file */
61
+ url?: string;
62
+ /** Base64 representation of the file */
63
+ base64?: string;
64
+ /** The media type of the file */
65
+ mediaType: string;
66
+ };
67
+ metadata: BaseAIResponseMetadata & {
68
+ /** Display data for this message response, such as the author's name and profile picture */
69
+ display?: AIChatProfileDisplayEntity;
70
+ };
33
71
  };
34
72
  export type AIResponseStatusResponse = {
35
73
  /** Specifies type to be a status update for the response */
@@ -59,4 +97,5 @@ export type AIToolResponse = {
59
97
  };
60
98
  metadata: BaseAIResponseMetadata & {};
61
99
  };
62
- export type AIResponse = AIMessageResponse | AIToolResponse | AIConvoStatusResponse | AIResponseStatusResponse;
100
+ export type AIResponse = AIMessageResponse | AIToolResponse | AIConvoStatusResponse | AIResponseStatusResponse | AIFileResponse | AIReasoningResponse;
101
+ export {};
package/package.json CHANGED
@@ -1,44 +1,44 @@
1
1
  {
2
- "name": "@butlerbot/sdk",
3
- "version": "0.0.3",
4
- "description": "The official ButlerBot SDK",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist/**/*"
9
- ],
10
- "scripts": {
11
- "build": "tsc",
12
- "pack": "npm run build && npm pack --pack-destination=\"G:\\tarballs\"",
13
- "update": "npm run build && npm publish --access public",
14
- "test": "jest"
15
- },
16
- "keywords": [
17
- "butlerbot",
18
- "alfred",
19
- "sdk",
20
- "chatbot",
21
- "ai",
22
- "butler"
23
- ],
24
- "author": "Fragly",
25
- "license": "MIT",
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/isdevco/alfred5_sdk.git"
29
- },
30
- "bugs": {
31
- "url": "https://github.com/isdevco/alfred5_sdk/issues"
32
- },
33
- "homepage": "https://butlerbot.net",
34
- "engines": {
35
- "node": ">=14.0.0"
36
- },
37
- "devDependencies": {
38
- "@types/node": "^22.13.10",
39
- "typescript": "^5.8.2"
40
- },
41
- "dependencies": {
42
- "eventsource": "^3.0.5"
43
- }
44
- }
2
+ "name": "@butlerbot/sdk",
3
+ "version": "0.0.5",
4
+ "description": "The official ButlerBot SDK",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist/**/*"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "pack": "npm run build && npm pack --pack-destination=\"G:\\tarballs\"",
13
+ "update": "npm run build && npm publish --access public",
14
+ "test": "jest"
15
+ },
16
+ "keywords": [
17
+ "butlerbot",
18
+ "alfred",
19
+ "sdk",
20
+ "chatbot",
21
+ "ai",
22
+ "butler"
23
+ ],
24
+ "author": "Fragly",
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/isdevco/alfred5_sdk.git"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/isdevco/alfred5_sdk/issues"
32
+ },
33
+ "homepage": "https://butlerbot.net",
34
+ "engines": {
35
+ "node": ">=14.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^22.13.10",
39
+ "typescript": "^5.8.2"
40
+ },
41
+ "dependencies": {
42
+ "eventsource": "^3.0.5"
43
+ }
44
+ }
package/readme.md CHANGED
@@ -10,6 +10,8 @@ Grab an API key at [ButlerBot](https://butlerbot.net/) and install the package:
10
10
  npm i @butlerbot/sdk
11
11
  ```
12
12
 
13
+ > NOTE: API key is currently not available on the ButlerBot UI
14
+
13
15
  ## Prerequisites
14
16
 
15
17
  - ButlerBot API key