blink 0.1.72 → 0.1.74
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/dist/browser/agent/client/index.cjs +21 -0
- package/dist/browser/agent/client/index.d.cts +4 -0
- package/dist/browser/agent/client/index.d.ts +4 -0
- package/dist/browser/agent/client/index.js +21 -0
- package/dist/browser/agent/index.browser.cjs +1 -0
- package/dist/browser/agent/index.browser.d.cts +3 -0
- package/dist/browser/agent/index.browser.d.ts +3 -0
- package/dist/browser/agent/index.browser.js +1 -0
- package/dist/browser/chat-B5eFQu26.d.cts +129 -0
- package/dist/browser/chat-BN7SYTWY.d.ts +129 -0
- package/dist/browser/control/index.cjs +1 -0
- package/dist/browser/control/index.d.cts +187 -0
- package/dist/browser/control/index.d.ts +187 -0
- package/dist/browser/control/index.js +1 -0
- package/dist/browser/index-B5faDAC2.d.ts +53 -0
- package/dist/browser/index-C-GJWB97.d.cts +53 -0
- package/dist/browser/index.browser-09e-NXpn.cjs +1 -0
- package/dist/browser/index.browser-0KfCzcI7.js +1 -0
- package/dist/browser/index.browser-BUMCZUeQ.d.ts +180 -0
- package/dist/browser/index.browser-CnGab8Yp.d.cts +180 -0
- package/dist/browser/index.node-DJv-HF6j.js +3 -0
- package/dist/browser/index.node-mda_IL6K.cjs +3 -0
- package/dist/browser/react/index.cjs +1 -1
- package/dist/browser/react/index.d.cts +6 -5
- package/dist/browser/react/index.d.ts +6 -5
- package/dist/browser/react/index.js +1 -1
- package/dist/browser/validator-CvSEfFnI.cjs +1 -0
- package/dist/browser/validator-DOrmtI_l.js +1 -0
- package/dist/cli/{auth-Dw-wJ1IM.js → auth-BUNIOupD.js} +1 -1
- package/dist/cli/{chat-CvTLq5E0.js → chat-L0VBV1Zr.js} +1 -1
- package/dist/cli/{dev-Cr9A596F.js → dev-CMwHkKBI.js} +133 -137
- package/dist/cli/index.js +4 -4
- package/dist/cli/{init-LfebhEg-.js → init-B6vWokUI.js} +24 -22
- package/dist/cli/login-DKW_KVCA.js +1 -0
- package/dist/node/agent/index.node.cjs +10 -0
- package/dist/node/agent/index.node.d.cts +2 -0
- package/dist/node/agent/index.node.d.ts +2 -0
- package/dist/node/agent/index.node.js +10 -0
- package/dist/node/index.node-BBpGHHxe.d.ts +460 -0
- package/dist/node/index.node-iaeCqAo6.d.cts +460 -0
- package/dist/node/test.d.cts +20 -50
- package/dist/node/test.d.ts +20 -50
- package/package.json +21 -19
- package/dist/browser/api/index.browser.cjs +0 -1
- package/dist/browser/api/index.browser.d.cts +0 -2
- package/dist/browser/api/index.browser.d.ts +0 -2
- package/dist/browser/api/index.browser.js +0 -1
- package/dist/browser/client-3mJjOKuh.d.ts +0 -94
- package/dist/browser/client-B7xl9jGk.d.cts +0 -94
- package/dist/browser/client-BbZudkEc.js +0 -21
- package/dist/browser/client-DFaZjb1-.cjs +0 -21
- package/dist/browser/http/index.cjs +0 -1
- package/dist/browser/http/index.d.cts +0 -207
- package/dist/browser/http/index.d.ts +0 -207
- package/dist/browser/http/index.js +0 -1
- package/dist/browser/index.browser-BwGhLjB7.cjs +0 -1
- package/dist/browser/index.browser-Dj8kjB6X.js +0 -1
- package/dist/browser/index.browser-c6tjyX5u.d.cts +0 -316
- package/dist/browser/index.browser-ekIUKJkA.d.ts +0 -316
- package/dist/cli/login-KHDcJ0iZ.js +0 -1
- package/dist/node/api/index.node.cjs +0 -30
- package/dist/node/api/index.node.d.cts +0 -82
- package/dist/node/api/index.node.d.ts +0 -82
- package/dist/node/api/index.node.js +0 -30
- package/dist/node/index.browser-Bo1v3lXu.d.cts +0 -316
- package/dist/node/index.browser-Dhyi8IHz.d.ts +0 -316
- /package/dist/cli/{dist-CN69Y-yA.js → dist-NqrnQGst.js} +0 -0
- /package/dist/cli/{open-Cr8lEmcs.js → open-CSMQaj0E.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blink",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.74",
|
|
4
4
|
"description": "Blink is a JavaScript runtime for building and deploying AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"browser": {
|
|
12
|
-
"types": "./dist/browser/
|
|
13
|
-
"import": "./dist/browser/
|
|
14
|
-
"require": "./dist/browser/
|
|
12
|
+
"types": "./dist/browser/agent/index.browser.d.ts",
|
|
13
|
+
"import": "./dist/browser/agent/index.browser.js",
|
|
14
|
+
"require": "./dist/browser/agent/index.browser.cjs"
|
|
15
15
|
},
|
|
16
16
|
"node": {
|
|
17
|
-
"types": "./dist/node/
|
|
18
|
-
"import": "./dist/node/
|
|
19
|
-
"require": "./dist/node/
|
|
17
|
+
"types": "./dist/node/agent/index.node.d.ts",
|
|
18
|
+
"import": "./dist/node/agent/index.node.js",
|
|
19
|
+
"require": "./dist/node/agent/index.node.cjs"
|
|
20
20
|
},
|
|
21
21
|
"default": {
|
|
22
|
-
"types": "./dist/node/
|
|
23
|
-
"import": "./dist/node/
|
|
24
|
-
"require": "./dist/node/
|
|
22
|
+
"types": "./dist/node/agent/index.node.d.ts",
|
|
23
|
+
"import": "./dist/node/agent/index.node.js",
|
|
24
|
+
"require": "./dist/node/agent/index.node.cjs"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"./test": {
|
|
@@ -34,16 +34,17 @@
|
|
|
34
34
|
"import": "./dist/node/build/index.js",
|
|
35
35
|
"require": "./dist/node/build/index.cjs"
|
|
36
36
|
},
|
|
37
|
-
"./
|
|
38
|
-
"types": "./dist/browser/
|
|
39
|
-
"import": "./dist/browser/
|
|
40
|
-
"require": "./dist/browser/
|
|
41
|
-
"browser": "./dist/browser/
|
|
37
|
+
"./client": {
|
|
38
|
+
"types": "./dist/browser/agent/client/index.d.ts",
|
|
39
|
+
"import": "./dist/browser/agent/client/index.js",
|
|
40
|
+
"require": "./dist/browser/agent/client/index.cjs",
|
|
41
|
+
"browser": "./dist/browser/agent/client/index.js"
|
|
42
42
|
},
|
|
43
|
-
"./
|
|
44
|
-
"types": "./dist/browser/
|
|
45
|
-
"import": "./dist/browser/
|
|
46
|
-
"require": "./dist/browser/
|
|
43
|
+
"./control": {
|
|
44
|
+
"types": "./dist/browser/control/index.d.ts",
|
|
45
|
+
"import": "./dist/browser/control/index.js",
|
|
46
|
+
"require": "./dist/browser/control/index.cjs",
|
|
47
|
+
"browser": "./dist/browser/control/index.js"
|
|
47
48
|
},
|
|
48
49
|
"./react": {
|
|
49
50
|
"types": "./dist/browser/react/index.d.ts",
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
"@types/marked-terminal": "^6.1.1",
|
|
74
75
|
"@whatwg-node/server": "^0.10.12",
|
|
75
76
|
"commander": "^14.0.0",
|
|
77
|
+
"emittery": "^1.2.0",
|
|
76
78
|
"eventsource-parser": "^3.0.6",
|
|
77
79
|
"filenamify": "^7.0.0",
|
|
78
80
|
"hono": "^4.9.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../client-DFaZjb1-.cjs`);const e=require(`../index.browser-BwGhLjB7.cjs`);exports.chat=e.chat,exports.isToolApprovalOutput=e.isToolApprovalOutput,exports.lastUIOptions=e.lastUIOptions,exports.storage=e.storage,exports.toolWithApproval=e.toolWithApproval,exports.tools=e.tools,exports.withResponseFormat=e.withResponseFormat;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { AgentOptions, Chat, ChatBehavior, ContextFromTools, ExperimentalCompletion, ExperimentalProvideCompletionsOptions, ExperimentalProvideCompletionsResponse, ExtractUIOptions, Message, MessageOptions, OptionSelect, OptionSelectValue, Options, OptionsSchema, ProvideOptionsRequest, SendMessagesOptions, SendMessagesResponse, StreamResponseFormat, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, WithUIOptions, chat, isToolApprovalOutput, lastUIOptions, storage, toolWithApproval, tools, withResponseFormat } from "../index.browser-c6tjyX5u.cjs";
|
|
2
|
-
export { AgentOptions, Chat, ChatBehavior, ContextFromTools, ExperimentalCompletion, ExperimentalProvideCompletionsOptions, ExperimentalProvideCompletionsResponse, ExtractUIOptions, Message, MessageOptions, OptionSelect, OptionSelectValue, Options, OptionsSchema, ProvideOptionsRequest, SendMessagesOptions, SendMessagesResponse, StreamResponseFormat, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, WithUIOptions, chat, isToolApprovalOutput, lastUIOptions, storage, toolWithApproval, tools, withResponseFormat };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { AgentOptions, Chat, ChatBehavior, ContextFromTools, ExperimentalCompletion, ExperimentalProvideCompletionsOptions, ExperimentalProvideCompletionsResponse, ExtractUIOptions, Message, MessageOptions, OptionSelect, OptionSelectValue, Options, OptionsSchema, ProvideOptionsRequest, SendMessagesOptions, SendMessagesResponse, StreamResponseFormat, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, WithUIOptions, chat, isToolApprovalOutput, lastUIOptions, storage, toolWithApproval, tools, withResponseFormat } from "../index.browser-ekIUKJkA.js";
|
|
2
|
-
export { AgentOptions, Chat, ChatBehavior, ContextFromTools, ExperimentalCompletion, ExperimentalProvideCompletionsOptions, ExperimentalProvideCompletionsResponse, ExtractUIOptions, Message, MessageOptions, OptionSelect, OptionSelectValue, Options, OptionsSchema, ProvideOptionsRequest, SendMessagesOptions, SendMessagesResponse, StreamResponseFormat, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, WithUIOptions, chat, isToolApprovalOutput, lastUIOptions, storage, toolWithApproval, tools, withResponseFormat };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../client-BbZudkEc.js";import{chat as e,isToolApprovalOutput as t,lastUIOptions as n,storage as r,toolWithApproval as i,tools as a,withResponseFormat as o}from"../index.browser-Dj8kjB6X.js";export{e as chat,t as isToolApprovalOutput,n as lastUIOptions,r as storage,i as toolWithApproval,a as tools,o as withResponseFormat};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Chat, ExperimentalCompletion, OptionsSchema, ProvideOptionsRequest, WithUIOptions } from "./index.browser-ekIUKJkA.js";
|
|
2
|
-
import { UIMessage, UIMessageChunk } from "ai";
|
|
3
|
-
|
|
4
|
-
//#region src/api/internal/client.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* APIServerURLEnvironmentVariable is the environment variable that
|
|
8
|
-
* the Blink agent uses for executions to the `blink.*` API.
|
|
9
|
-
* (e.g. blink.chat.upsert).
|
|
10
|
-
*/
|
|
11
|
-
declare const APIServerURLEnvironmentVariable = "BLINK_API_SERVER_URL";
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/http/client.d.ts
|
|
14
|
-
/**
|
|
15
|
-
* StreamResponseFormatHeader indicates to a client the stream response
|
|
16
|
-
* format that the agent is using.
|
|
17
|
-
*/
|
|
18
|
-
declare const StreamResponseFormatHeader = "x-blink-stream-response-format";
|
|
19
|
-
/**
|
|
20
|
-
* SendMessagesRequest is the request format of the `/_agent/send-messages` endpoint.
|
|
21
|
-
*
|
|
22
|
-
* It executes the `sendMessages` function.
|
|
23
|
-
*/
|
|
24
|
-
interface SendMessagesRequest {
|
|
25
|
-
readonly messages: UIMessage[];
|
|
26
|
-
readonly chat: Chat;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* ExperimentalProvideCompletionsRequest is the request format of the `/_agent/completions` endpoint.
|
|
30
|
-
*
|
|
31
|
-
* It executes the `experimental_provideCompletions` function.
|
|
32
|
-
*/
|
|
33
|
-
interface ExperimentalProvideCompletionsRequest {
|
|
34
|
-
readonly messages: UIMessage[];
|
|
35
|
-
readonly chat?: Chat;
|
|
36
|
-
readonly input: string;
|
|
37
|
-
readonly caret: number;
|
|
38
|
-
readonly selection?: [number, number];
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* CapabilitiesResponse is the response format of the `/_agent/capabilities` endpoint.
|
|
42
|
-
*
|
|
43
|
-
* It indicates whether the agent supports requests and completions.
|
|
44
|
-
*/
|
|
45
|
-
interface CapabilitiesResponse {
|
|
46
|
-
readonly requests: boolean;
|
|
47
|
-
readonly completions: boolean;
|
|
48
|
-
readonly options: boolean;
|
|
49
|
-
}
|
|
50
|
-
interface ClientOptions {
|
|
51
|
-
readonly baseUrl: string;
|
|
52
|
-
readonly headers?: Record<string, string>;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Client is a client for the Blink agent HTTP API.
|
|
56
|
-
*/
|
|
57
|
-
declare class Client {
|
|
58
|
-
private readonly options;
|
|
59
|
-
constructor(options: ClientOptions);
|
|
60
|
-
get baseUrl(): string;
|
|
61
|
-
/**
|
|
62
|
-
* sendMessages sends messages to the agent.
|
|
63
|
-
*
|
|
64
|
-
* The response format is automatically converted to a UI message stream.
|
|
65
|
-
*/
|
|
66
|
-
sendMessages(request: SendMessagesRequest, options?: {
|
|
67
|
-
signal?: AbortSignal;
|
|
68
|
-
}): Promise<ReadableStream<UIMessageChunk>>;
|
|
69
|
-
/**
|
|
70
|
-
* experimental_provideCompletions provides completions to the user.
|
|
71
|
-
* This is used to provide completions to the user.
|
|
72
|
-
*/
|
|
73
|
-
experimental_provideCompletions(request: ExperimentalProvideCompletionsRequest): Promise<ReadableStream<ExperimentalCompletion>>;
|
|
74
|
-
/**
|
|
75
|
-
* capabilities returns the capabilities of the agent.
|
|
76
|
-
* This is used to check if the agent supports requests and completions.
|
|
77
|
-
*/
|
|
78
|
-
capabilities(): Promise<CapabilitiesResponse>;
|
|
79
|
-
/**
|
|
80
|
-
* provideUIOptions provides selectable options to the user.
|
|
81
|
-
*/
|
|
82
|
-
provideUIOptions(request: ProvideOptionsRequest<WithUIOptions<Record<string, any>>>, options?: {
|
|
83
|
-
signal?: AbortSignal;
|
|
84
|
-
}): Promise<OptionsSchema<any>>;
|
|
85
|
-
/**
|
|
86
|
-
* health simply returns a 200 response.
|
|
87
|
-
* This is used to check if the agent is running.
|
|
88
|
-
*/
|
|
89
|
-
health(): Promise<void>;
|
|
90
|
-
private handleError;
|
|
91
|
-
}
|
|
92
|
-
declare const streamSSE: <T>(resp: Response) => ReadableStream<T>;
|
|
93
|
-
//#endregion
|
|
94
|
-
export { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, ExperimentalProvideCompletionsRequest, SendMessagesRequest, StreamResponseFormatHeader, streamSSE };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Chat, ExperimentalCompletion, OptionsSchema, ProvideOptionsRequest, WithUIOptions } from "./index.browser-c6tjyX5u.cjs";
|
|
2
|
-
import { UIMessage, UIMessageChunk } from "ai";
|
|
3
|
-
|
|
4
|
-
//#region src/api/internal/client.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* APIServerURLEnvironmentVariable is the environment variable that
|
|
8
|
-
* the Blink agent uses for executions to the `blink.*` API.
|
|
9
|
-
* (e.g. blink.chat.upsert).
|
|
10
|
-
*/
|
|
11
|
-
declare const APIServerURLEnvironmentVariable = "BLINK_API_SERVER_URL";
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/http/client.d.ts
|
|
14
|
-
/**
|
|
15
|
-
* StreamResponseFormatHeader indicates to a client the stream response
|
|
16
|
-
* format that the agent is using.
|
|
17
|
-
*/
|
|
18
|
-
declare const StreamResponseFormatHeader = "x-blink-stream-response-format";
|
|
19
|
-
/**
|
|
20
|
-
* SendMessagesRequest is the request format of the `/_agent/send-messages` endpoint.
|
|
21
|
-
*
|
|
22
|
-
* It executes the `sendMessages` function.
|
|
23
|
-
*/
|
|
24
|
-
interface SendMessagesRequest {
|
|
25
|
-
readonly messages: UIMessage[];
|
|
26
|
-
readonly chat: Chat;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* ExperimentalProvideCompletionsRequest is the request format of the `/_agent/completions` endpoint.
|
|
30
|
-
*
|
|
31
|
-
* It executes the `experimental_provideCompletions` function.
|
|
32
|
-
*/
|
|
33
|
-
interface ExperimentalProvideCompletionsRequest {
|
|
34
|
-
readonly messages: UIMessage[];
|
|
35
|
-
readonly chat?: Chat;
|
|
36
|
-
readonly input: string;
|
|
37
|
-
readonly caret: number;
|
|
38
|
-
readonly selection?: [number, number];
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* CapabilitiesResponse is the response format of the `/_agent/capabilities` endpoint.
|
|
42
|
-
*
|
|
43
|
-
* It indicates whether the agent supports requests and completions.
|
|
44
|
-
*/
|
|
45
|
-
interface CapabilitiesResponse {
|
|
46
|
-
readonly requests: boolean;
|
|
47
|
-
readonly completions: boolean;
|
|
48
|
-
readonly options: boolean;
|
|
49
|
-
}
|
|
50
|
-
interface ClientOptions {
|
|
51
|
-
readonly baseUrl: string;
|
|
52
|
-
readonly headers?: Record<string, string>;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Client is a client for the Blink agent HTTP API.
|
|
56
|
-
*/
|
|
57
|
-
declare class Client {
|
|
58
|
-
private readonly options;
|
|
59
|
-
constructor(options: ClientOptions);
|
|
60
|
-
get baseUrl(): string;
|
|
61
|
-
/**
|
|
62
|
-
* sendMessages sends messages to the agent.
|
|
63
|
-
*
|
|
64
|
-
* The response format is automatically converted to a UI message stream.
|
|
65
|
-
*/
|
|
66
|
-
sendMessages(request: SendMessagesRequest, options?: {
|
|
67
|
-
signal?: AbortSignal;
|
|
68
|
-
}): Promise<ReadableStream<UIMessageChunk>>;
|
|
69
|
-
/**
|
|
70
|
-
* experimental_provideCompletions provides completions to the user.
|
|
71
|
-
* This is used to provide completions to the user.
|
|
72
|
-
*/
|
|
73
|
-
experimental_provideCompletions(request: ExperimentalProvideCompletionsRequest): Promise<ReadableStream<ExperimentalCompletion>>;
|
|
74
|
-
/**
|
|
75
|
-
* capabilities returns the capabilities of the agent.
|
|
76
|
-
* This is used to check if the agent supports requests and completions.
|
|
77
|
-
*/
|
|
78
|
-
capabilities(): Promise<CapabilitiesResponse>;
|
|
79
|
-
/**
|
|
80
|
-
* provideUIOptions provides selectable options to the user.
|
|
81
|
-
*/
|
|
82
|
-
provideUIOptions(request: ProvideOptionsRequest<WithUIOptions<Record<string, any>>>, options?: {
|
|
83
|
-
signal?: AbortSignal;
|
|
84
|
-
}): Promise<OptionsSchema<any>>;
|
|
85
|
-
/**
|
|
86
|
-
* health simply returns a 200 response.
|
|
87
|
-
* This is used to check if the agent is running.
|
|
88
|
-
*/
|
|
89
|
-
health(): Promise<void>;
|
|
90
|
-
private handleError;
|
|
91
|
-
}
|
|
92
|
-
declare const streamSSE: <T>(resp: Response) => ReadableStream<T>;
|
|
93
|
-
//#endregion
|
|
94
|
-
export { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, ExperimentalProvideCompletionsRequest, SendMessagesRequest, StreamResponseFormatHeader, streamSSE };
|