@ray-js/t-agent 0.0.5-beta-1

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.
@@ -0,0 +1,12 @@
1
+ import ChatAgent from './ChatAgent';
2
+ import StreamResponse from './StreamResponse';
3
+ import ChatTile from './ChatTile';
4
+ import ChatBubbleTile from './ChatBubbleTile';
5
+ import ChatMessage from './ChatMessage';
6
+ import { generateId, safeParseJSON, sleep, generateInt, isAbortError, debounce, shuffleWithSeed } from './utils';
7
+ import Logger, { getLogger } from './Logger';
8
+ import { Emitter, EmitterEvent } from './Emitter';
9
+ export { createHooks, Hookable } from 'hookable';
10
+ export { ChatAgent, StreamResponse, ChatTile, ChatBubbleTile, ChatMessage, generateId, generateInt, safeParseJSON, getLogger, Logger, Emitter, EmitterEvent, isAbortError, sleep, debounce, shuffleWithSeed, };
11
+ export * from './createChatAgent';
12
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ import ChatAgent from './ChatAgent';
2
+ import StreamResponse from './StreamResponse';
3
+ import ChatTile from './ChatTile';
4
+ import ChatBubbleTile from './ChatBubbleTile';
5
+ import ChatMessage from './ChatMessage';
6
+ import { generateId, safeParseJSON, sleep, generateInt, isAbortError, debounce, shuffleWithSeed } from './utils';
7
+ import Logger, { getLogger } from './Logger';
8
+ import { Emitter, EmitterEvent } from './Emitter';
9
+ export { createHooks, Hookable } from 'hookable';
10
+ export { ChatAgent, StreamResponse, ChatTile, ChatBubbleTile, ChatMessage, generateId, generateInt, safeParseJSON, getLogger, Logger, Emitter, EmitterEvent, isAbortError, sleep, debounce, shuffleWithSeed };
11
+ export * from './createChatAgent';
12
+ export * from './types';
@@ -0,0 +1,177 @@
1
+ import type ChatTile from './ChatTile';
2
+ import type ChatMessage from './ChatMessage';
3
+ import type ChatAgent from './ChatAgent';
4
+ import type { Hookable } from 'hookable';
5
+ import type { EventCallback, EventOptions } from './Emitter';
6
+ export interface BubbleTileData {
7
+ status: BubbleTileStatus;
8
+ info?: string;
9
+ }
10
+ export interface TextTileData {
11
+ text: string;
12
+ markdown: boolean;
13
+ }
14
+ export interface ImageTileData {
15
+ src: string;
16
+ }
17
+ export interface VideoTileData {
18
+ src: string;
19
+ thumbUrl: string;
20
+ bizType?: string;
21
+ }
22
+ export interface TipTileData {
23
+ text: string;
24
+ }
25
+ export interface ButtonsTileData {
26
+ buttons: Array<{
27
+ text: string;
28
+ type?: string;
29
+ clickPayload: any;
30
+ }>;
31
+ }
32
+ export interface TimeTileData {
33
+ timestamp: number;
34
+ }
35
+ export interface RecommendationsTileData {
36
+ sort?: 'random' | 'order';
37
+ size?: number;
38
+ recommendations: Array<{
39
+ text: string;
40
+ clickPayload: any;
41
+ }>;
42
+ }
43
+ export interface DocumentsTileData {
44
+ documents: Array<{
45
+ title: string;
46
+ url: string;
47
+ }>;
48
+ }
49
+ export interface CardTileData {
50
+ card: ChatCardObject;
51
+ }
52
+ export declare enum ChatCardType {
53
+ CUSTOM = "custom",
54
+ BUILD_IN = "buildIn",
55
+ LOW_CODE = "lowCode"
56
+ }
57
+ export interface ChatCardObject<T = any> {
58
+ cardCode: string;
59
+ cardType: ChatCardType;
60
+ cardData: T;
61
+ }
62
+ export interface ChatTileObject<T = any> {
63
+ id: string;
64
+ type: string;
65
+ locked: boolean;
66
+ children: ChatTileObject[];
67
+ fallback?: TipTileData;
68
+ data: T;
69
+ }
70
+ export declare enum ChatMessageStatus {
71
+ START = 0,
72
+ UPDATING = 1,
73
+ FINISH = 2
74
+ }
75
+ /**
76
+ * 用于渲染的消息
77
+ */
78
+ export interface ChatMessageObject {
79
+ id: string;
80
+ role: 'user' | 'assistant' | string;
81
+ tiles: ChatTileObject[];
82
+ status: ChatMessageStatus;
83
+ meta: ChatMessageObjectMeta;
84
+ }
85
+ export interface ChatMessageObjectMeta {
86
+ requestId?: string;
87
+ primaryIds?: Record<string, number>;
88
+ raw?: any;
89
+ [key: string]: any;
90
+ }
91
+ export interface InputBlock {
92
+ type: string;
93
+ [key: string]: any;
94
+ }
95
+ export declare enum BubbleTileStatus {
96
+ NORMAL = "normal",
97
+ WARNING = "warning",
98
+ ERROR = "error"
99
+ }
100
+ export interface AbortSignalObject {
101
+ aborted: boolean;
102
+ onabort: EventCallback;
103
+ reason: any;
104
+ throwIfAborted(): void;
105
+ addEventListener(type: string, callback: EventCallback, options?: EventOptions): void;
106
+ removeEventListener(type: string, callback: EventCallback): void;
107
+ }
108
+ export interface ChatAgentHooks {
109
+ onAgentStart: () => void;
110
+ onAgentDispose: () => void;
111
+ onChatStart: (result: {
112
+ messages: ChatMessage[];
113
+ }) => void;
114
+ onChatResume: (result: {
115
+ messages: ChatMessage[];
116
+ }) => void;
117
+ onMessageListInit: (result: {
118
+ messages: ChatMessage[];
119
+ }) => void;
120
+ onInputBlocksPush: (blocks: InputBlock[], signal?: AbortSignalObject) => void;
121
+ onMessageChange: (type: 'show' | 'update' | 'remove', message: ChatMessage) => void;
122
+ onMessagePersist: (payload: any, message: ChatMessage) => void;
123
+ onTileEvent: (tile: ChatTile, payload: any) => void;
124
+ onUserAbort: (reason: any) => void;
125
+ onError: (error: any) => void;
126
+ }
127
+ export type ChatAgentHooksWithOrder<K extends keyof ChatAgentHooks = keyof ChatAgentHooks> = {
128
+ [T in K]: ChatAgentHooks[K];
129
+ } & {
130
+ [T in `${keyof ChatAgentHooks}:before`]: ChatAgentHooks[K];
131
+ } & {
132
+ [T in `${keyof ChatAgentHooks}:after`]: ChatAgentHooks[K];
133
+ };
134
+ export interface ChatSessionHooks {
135
+ onChange: (key: string, value: any, oldValue: any) => void;
136
+ }
137
+ export type ChatAgentPluginHandler = {
138
+ [key: string]: unknown;
139
+ hooks?: Hookable;
140
+ };
141
+ export type ChatAgentPlugin<T extends ChatAgentPluginHandler = Record<string, any>> = (agent: ChatAgent) => T;
142
+ export type AddHookCallback<H, T extends keyof H> = (fn: H[T], type?: 'before' | 'after' | undefined) => () => void;
143
+ export interface ErrorPart {
144
+ type: 'error';
145
+ level: 'error' | 'warn';
146
+ error: Error;
147
+ meta: Record<string, any>;
148
+ }
149
+ export interface TextPart {
150
+ type: 'text';
151
+ delta: string;
152
+ text: string;
153
+ meta: Record<string, any>;
154
+ }
155
+ export interface AttachmentPart {
156
+ id: string;
157
+ type: 'attachment';
158
+ attachmentType: string;
159
+ attachment: any;
160
+ meta: Record<string, any>;
161
+ }
162
+ export type MessagePart = TextPart | AttachmentPart | ErrorPart;
163
+ export declare enum FinishReason {
164
+ STOP = "stop",
165
+ ABORT = "abort",
166
+ ERROR = "error"
167
+ }
168
+ export type StreamResponseInstance = {
169
+ parts: () => AsyncIterable<MessagePart>;
170
+ cancel: (reason: any) => Promise<void>;
171
+ };
172
+ export type GetChatPluginHandler<T extends (...args: any[]) => (agent: ChatAgent) => unknown> = Omit<ReturnType<ReturnType<T>>, 'hooks'>;
173
+ export interface ComposeHandler {
174
+ textCompose?: (message: ChatMessage, text: string, status: ChatMessageStatus) => Promise<string>;
175
+ attachmentCompose?: (message: ChatMessage, attachment: AttachmentPart) => Promise<ChatMessage[]>;
176
+ errorCompose?: (message: ChatMessage, text: string, error: any) => Promise<string>;
177
+ }
@@ -0,0 +1,29 @@
1
+ export let ChatCardType = /*#__PURE__*/function (ChatCardType) {
2
+ ChatCardType["CUSTOM"] = "custom";
3
+ ChatCardType["BUILD_IN"] = "buildIn";
4
+ ChatCardType["LOW_CODE"] = "lowCode";
5
+ return ChatCardType;
6
+ }({});
7
+ export let ChatMessageStatus = /*#__PURE__*/function (ChatMessageStatus) {
8
+ ChatMessageStatus[ChatMessageStatus["START"] = 0] = "START";
9
+ ChatMessageStatus[ChatMessageStatus["UPDATING"] = 1] = "UPDATING";
10
+ ChatMessageStatus[ChatMessageStatus["FINISH"] = 2] = "FINISH";
11
+ return ChatMessageStatus;
12
+ }({});
13
+
14
+ /**
15
+ * 用于渲染的消息
16
+ */
17
+
18
+ export let BubbleTileStatus = /*#__PURE__*/function (BubbleTileStatus) {
19
+ BubbleTileStatus["NORMAL"] = "normal";
20
+ BubbleTileStatus["WARNING"] = "warning";
21
+ BubbleTileStatus["ERROR"] = "error";
22
+ return BubbleTileStatus;
23
+ }({});
24
+ export let FinishReason = /*#__PURE__*/function (FinishReason) {
25
+ FinishReason["STOP"] = "stop";
26
+ FinishReason["ABORT"] = "abort";
27
+ FinishReason["ERROR"] = "error";
28
+ return FinishReason;
29
+ }({});
@@ -0,0 +1,32 @@
1
+ export declare function generateId(length?: number): string;
2
+ export declare function generateInt(min: number, max: number): number;
3
+ export declare function deepCloneToPlainObject(obj: any): any;
4
+ export declare function safeParseJSON<T = any>(str: any): T | undefined;
5
+ export declare function deepMerge(target: any, source: any): any;
6
+ export declare const sleep: (ms: number) => Promise<unknown>;
7
+ export declare function isAbortError(reason: any): any;
8
+ type AnyFunction = (...arguments_: readonly any[]) => unknown;
9
+ /**
10
+ * Creates a debounced function that delays execution until `wait` milliseconds have passed since its last invocation.
11
+ *
12
+ * Set the `immediate` option to `true` to execute the function immediately at the start of the `wait` interval, preventing issues such as double-clicks on a button.
13
+ *
14
+ * The returned function has the following methods:
15
+ *
16
+ * - `.isPending` indicates whether the debounce delay is currently active.
17
+ * - `.clear()` cancels any scheduled executions.
18
+ * - `.flush()` if an execution is scheduled then it will be immediately executed and the timer will be cleared.
19
+ * - `.trigger()` executes the function immediately and clears the timer if it was previously set.
20
+ */
21
+ export declare function debounce<F extends AnyFunction>(function_: F, wait?: number, options?: {
22
+ immediate?: boolean;
23
+ }): DebouncedFunction<F>;
24
+ interface DebouncedFunction<F extends AnyFunction> {
25
+ (...arguments_: Parameters<F>): ReturnType<F> | undefined;
26
+ readonly isPending: boolean;
27
+ clear(): void;
28
+ flush(): void;
29
+ trigger(): void;
30
+ }
31
+ export declare function shuffleWithSeed<T>(array: T[], seed: string): T[];
32
+ export {};
@@ -0,0 +1,207 @@
1
+ import "core-js/modules/esnext.iterator.constructor.js";
2
+ import "core-js/modules/esnext.iterator.filter.js";
3
+ import "core-js/modules/esnext.iterator.map.js";
4
+ import "core-js/modules/web.dom-collections.iterator.js";
5
+ /* eslint no-bitwise: 0 */
6
+
7
+ export function generateId() {
8
+ let length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
9
+ const characters = '0123456789abcdefghijklmnopqrstuvwxyz';
10
+ let result = '';
11
+ for (let i = 0; i < length; i++) {
12
+ const randomIndex = Math.floor(Math.random() * characters.length);
13
+ result += characters[randomIndex];
14
+ }
15
+ return result;
16
+ }
17
+ export function generateInt(min, max) {
18
+ return Math.floor(Math.random() * (max - min + 1) + min);
19
+ }
20
+ export function deepCloneToPlainObject(obj) {
21
+ // 判断是否是对象或数组
22
+ if (obj === null || typeof obj !== 'object') {
23
+ return undefined;
24
+ }
25
+
26
+ // 如果是 Date 或其他不可直接 JSON 化的类型
27
+ if (obj instanceof Date) {
28
+ return obj.toISOString();
29
+ }
30
+ if (obj instanceof Array) {
31
+ return obj.map(item => deepCloneToPlainObject(item)).filter(item => item !== undefined); // 移除 undefined 项
32
+ }
33
+ if (obj instanceof Object) {
34
+ const plainObject = {};
35
+ for (const key in obj) {
36
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
37
+ const value = deepCloneToPlainObject(obj[key]);
38
+ if (value !== undefined) {
39
+ // 只添加可以转换的值
40
+ plainObject[key] = value;
41
+ }
42
+ }
43
+ }
44
+ return plainObject;
45
+ }
46
+
47
+ // 如果遇到其他类型,直接忽略返回 undefined
48
+ return undefined;
49
+ }
50
+ export function safeParseJSON(str) {
51
+ if (str && typeof str === 'string') {
52
+ try {
53
+ return JSON.parse(str);
54
+ } catch (e) {
55
+ console.warn('safeParseJSON error:', e);
56
+ }
57
+ }
58
+ if (str && typeof str === 'object') {
59
+ return str;
60
+ }
61
+ return undefined;
62
+ }
63
+ export function deepMerge(target, source) {
64
+ if (typeof target !== 'object' || target === null) {
65
+ return source; // 如果目标不是对象,直接返回来源
66
+ }
67
+ if (typeof source !== 'object' || source === null) {
68
+ return target; // 如果来源不是对象,返回目标
69
+ }
70
+ for (const key in source) {
71
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
72
+ const sourceValue = source[key];
73
+ const targetValue = target[key];
74
+
75
+ // 如果是对象,递归合并
76
+ if (typeof sourceValue === 'object' && sourceValue !== null) {
77
+ target[key] = deepMerge(Array.isArray(targetValue) ? [] : targetValue || {}, sourceValue);
78
+ } else {
79
+ // 否则直接赋值
80
+ target[key] = sourceValue;
81
+ }
82
+ }
83
+ }
84
+ return target;
85
+ }
86
+ export const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
87
+ export function isAbortError(reason) {
88
+ return reason && typeof Error !== 'undefined' && reason instanceof Error && reason.name === 'AbortError';
89
+ }
90
+ /**
91
+ * Creates a debounced function that delays execution until `wait` milliseconds have passed since its last invocation.
92
+ *
93
+ * Set the `immediate` option to `true` to execute the function immediately at the start of the `wait` interval, preventing issues such as double-clicks on a button.
94
+ *
95
+ * The returned function has the following methods:
96
+ *
97
+ * - `.isPending` indicates whether the debounce delay is currently active.
98
+ * - `.clear()` cancels any scheduled executions.
99
+ * - `.flush()` if an execution is scheduled then it will be immediately executed and the timer will be cleared.
100
+ * - `.trigger()` executes the function immediately and clears the timer if it was previously set.
101
+ */
102
+ export function debounce(function_) {
103
+ let wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
104
+ let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
105
+ if (typeof function_ !== 'function') {
106
+ throw new TypeError("Expected the first parameter to be a function, got `".concat(typeof function_, "`."));
107
+ }
108
+ if (wait < 0) {
109
+ throw new RangeError('`wait` must not be negative.');
110
+ }
111
+ const {
112
+ immediate = false
113
+ } = options;
114
+ let storedContext;
115
+ let storedArguments;
116
+ let timeoutId;
117
+ let timestamp;
118
+ let result;
119
+ function run() {
120
+ const callContext = storedContext;
121
+ const callArguments = storedArguments;
122
+ storedContext = undefined;
123
+ storedArguments = undefined;
124
+ result = function_.apply(callContext, callArguments);
125
+ return result;
126
+ }
127
+ function later() {
128
+ const last = Date.now() - timestamp;
129
+ if (last < wait && last >= 0) {
130
+ timeoutId = setTimeout(later, wait - last);
131
+ } else {
132
+ timeoutId = undefined;
133
+ if (!immediate) {
134
+ result = run();
135
+ }
136
+ }
137
+ }
138
+ const debounced = function () {
139
+ if (storedContext && this !== storedContext && Object.getPrototypeOf(this) === Object.getPrototypeOf(storedContext)) {
140
+ throw new Error('Debounced method called with different contexts of the same prototype.');
141
+ }
142
+ storedContext = this;
143
+ for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
144
+ arguments_[_key] = arguments[_key];
145
+ }
146
+ storedArguments = arguments_;
147
+ timestamp = Date.now();
148
+ const callNow = immediate && !timeoutId;
149
+ if (!timeoutId) {
150
+ timeoutId = setTimeout(later, wait);
151
+ }
152
+ if (callNow) {
153
+ result = run();
154
+ }
155
+ return result;
156
+ };
157
+ Object.defineProperty(debounced, 'isPending', {
158
+ get() {
159
+ return timeoutId !== undefined;
160
+ }
161
+ });
162
+ debounced.clear = () => {
163
+ if (!timeoutId) {
164
+ return;
165
+ }
166
+ clearTimeout(timeoutId);
167
+ timeoutId = undefined;
168
+ };
169
+ debounced.flush = () => {
170
+ if (!timeoutId) {
171
+ return;
172
+ }
173
+ debounced.trigger();
174
+ };
175
+ debounced.trigger = () => {
176
+ result = run();
177
+ debounced.clear();
178
+ };
179
+ return debounced;
180
+ }
181
+ function seedRandom(seed) {
182
+ let h = 0;
183
+ // 将字符串种子转化为哈希值
184
+ for (let i = 0; i < seed.length; i++) {
185
+ h = Math.imul(31, h) + seed.charCodeAt(i) | 0;
186
+ }
187
+
188
+ // 返回基于哈希值的随机数生成函数
189
+ return function () {
190
+ h ^= h >>> 13;
191
+ h ^= h << 17;
192
+ h ^= h >>> 5;
193
+ return (h >>> 0) / 4294967296;
194
+ };
195
+ }
196
+
197
+ // 根据种子随机打乱数组
198
+ export function shuffleWithSeed(array, seed) {
199
+ const random = seedRandom(seed);
200
+ const result = array.slice(); // 复制数组,避免修改原数组
201
+
202
+ for (let i = result.length - 1; i > 0; i--) {
203
+ const j = Math.floor(random() * (i + 1)); // 生成 0 到 i 的随机索引
204
+ [result[i], result[j]] = [result[j], result[i]]; // 交换元素
205
+ }
206
+ return result;
207
+ }
@@ -0,0 +1,3 @@
1
+ export * from './chat';
2
+ export * from './plugins/ui';
3
+ export * from './plugins/debug';
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './chat';
2
+ export * from './plugins/ui';
3
+ export * from './plugins/debug';
@@ -0,0 +1,10 @@
1
+ import { ChatAgent } from '../chat';
2
+ export declare function withDebug(options?: {
3
+ autoStart?: boolean;
4
+ filter?: string | ((event: string) => boolean);
5
+ }): (agent: ChatAgent) => {
6
+ debug: {
7
+ start: () => void;
8
+ stop: () => void;
9
+ };
10
+ };
@@ -0,0 +1,33 @@
1
+ import Logger from '../chat/Logger';
2
+ export function withDebug(options) {
3
+ return agent => {
4
+ if (agent.plugins.debug) {
5
+ throw new Error('Debug plugin already exists');
6
+ }
7
+ const start = () => {
8
+ // debugs.push(
9
+ // createDebugger(agent.hooks, { tag: 'ChatAgent', filter: options?.filter }),
10
+ // createDebugger(agent.session.hooks, { tag: 'ChatSession', filter: options?.filter }),
11
+ // )
12
+ // for (const hook of agent.pluginHooks) {
13
+ // debugs.push(createDebugger(hook, { tag: 'ChatPlugin', filter: options?.filter }))
14
+ // }
15
+ Logger.setLogLevel('debug');
16
+ };
17
+ if ((options === null || options === void 0 ? void 0 : options.autoStart) !== false) {
18
+ Promise.resolve().then(start);
19
+ }
20
+ return {
21
+ debug: {
22
+ start,
23
+ stop: () => {
24
+ Logger.setLogLevel('log');
25
+ // while (debugs.length) {
26
+ // const debug = debugs.pop()
27
+ // debug.close()
28
+ // }
29
+ }
30
+ }
31
+ };
32
+ };
33
+ }
@@ -0,0 +1,28 @@
1
+ import { InputBlock, ChatMessageObject, ChatAgent, GetChatPluginHandler, Emitter } from '../chat';
2
+ export type UIPlugin = GetChatPluginHandler<typeof withUI>;
3
+ export interface UIEventMap {
4
+ messageListInit: {
5
+ messages: ChatMessageObject[];
6
+ };
7
+ messageChange: {
8
+ type: 'show' | 'update' | 'remove';
9
+ message: ChatMessageObject;
10
+ };
11
+ scrollToBottom: {
12
+ animation: boolean;
13
+ };
14
+ sendMessage: {
15
+ blocks: InputBlock[];
16
+ };
17
+ setInputBlocks: {
18
+ blocks: InputBlock[];
19
+ };
20
+ [key: string]: any;
21
+ }
22
+ export declare function withUI(): (agent: ChatAgent) => {
23
+ ui: {
24
+ emitter: Emitter;
25
+ emitEvent: <T extends keyof UIEventMap>(eventName: T, detail: UIEventMap[T]) => void;
26
+ onEvent: <T_1 extends keyof UIEventMap>(eventName: T_1, handler: (detail: UIEventMap[T_1]) => void) => () => void;
27
+ };
28
+ };
@@ -0,0 +1,44 @@
1
+ import "core-js/modules/esnext.iterator.map.js";
2
+ import { Emitter, EmitterEvent } from '../chat';
3
+ export function withUI() {
4
+ return agent => {
5
+ if (agent.plugins.ui) {
6
+ throw new Error('UI plugin already exists');
7
+ }
8
+ const emitter = new Emitter();
9
+ const emitEvent = (eventName, detail) => {
10
+ emitter.dispatchEvent(new EmitterEvent(eventName, {
11
+ detail
12
+ }));
13
+ };
14
+ agent.onMessageListInit(_ref => {
15
+ let {
16
+ messages
17
+ } = _ref;
18
+ const detail = {
19
+ messages: messages.map(m => m.toObject())
20
+ };
21
+ emitEvent('messageListInit', detail);
22
+ }, 'after');
23
+ agent.onMessageChange((type, message) => {
24
+ const detail = {
25
+ type,
26
+ message: message.toObject()
27
+ };
28
+ emitEvent('messageChange', detail);
29
+ }, 'after');
30
+ return {
31
+ ui: {
32
+ emitter,
33
+ emitEvent,
34
+ onEvent: (eventName, handler) => {
35
+ const cb = event => handler(event.detail);
36
+ emitter.addEventListener(eventName, cb);
37
+ return () => {
38
+ emitter.removeEventListener(eventName, cb);
39
+ };
40
+ }
41
+ }
42
+ };
43
+ };
44
+ }
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@ray-js/t-agent",
3
+ "version": "0.0.5-beta-1",
4
+ "author": "Tuya.inc",
5
+ "license": "MIT",
6
+ "private": false,
7
+ "main": "dist/index.js",
8
+ "typings": "dist/index.d.ts",
9
+ "maintainers": [
10
+ "tuya_npm",
11
+ "tuyafe"
12
+ ],
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md",
19
+ "README-zh_CN.md"
20
+ ],
21
+ "dependencies": {
22
+ "hookable": "^5.5.3"
23
+ },
24
+ "scripts": {
25
+ "dev": "ray start --type=component --output dist --emit-declaration-dev",
26
+ "build": "ray build --type=component --output dist",
27
+ "clean": "rimraf ./dist"
28
+ },
29
+ "gitHead": "c2f10c94fb4031e1c375864e70a69adb3bbadd2d"
30
+ }