dewee-webchat 0.1.0 → 0.2.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 +69 -3
- package/astro/DeweeChat.astro +21 -21
- package/dist/chunk-JX6AH37X.js +111 -0
- package/dist/{chunk-RGAYYTL7.js → chunk-YV6PXYJZ.js} +607 -22
- package/dist/dewee-webchat.js +92 -15
- package/dist/index.d.ts +97 -5
- package/dist/index.js +2 -2
- package/dist/{protocol-CS8_4zC0.d.ts → protocol-B72Ry-fY.d.ts} +22 -1
- package/dist/react.d.ts +6 -3
- package/dist/react.js +10 -5
- package/dist/server.d.ts +27 -3
- package/dist/server.js +28 -5
- package/dist/vue.d.ts +50 -4
- package/dist/vue.js +12 -5
- package/package.json +99 -99
- package/dist/chunk-MKTHKYLY.js +0 -10
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineDeweeChat
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YV6PXYJZ.js";
|
|
4
|
+
import "./chunk-JX6AH37X.js";
|
|
5
5
|
|
|
6
6
|
// src/react.ts
|
|
7
7
|
import { createElement, forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
@@ -11,12 +11,13 @@ var EVENTS = {
|
|
|
11
11
|
onReply: "dewee:reply",
|
|
12
12
|
onError: "dewee:error",
|
|
13
13
|
onOpen: "dewee:open",
|
|
14
|
-
onClose: "dewee:close"
|
|
14
|
+
onClose: "dewee:close",
|
|
15
|
+
onAction: "dewee:action"
|
|
15
16
|
};
|
|
16
17
|
var DeweeChat = forwardRef(function DeweeChat2(props, ref) {
|
|
17
18
|
const el = useRef(null);
|
|
18
|
-
const { className, style, onReady, onSend, onReply, onError, onOpen, onClose, ...config } = props;
|
|
19
|
-
const handlers = { onReady, onSend, onReply, onError, onOpen, onClose };
|
|
19
|
+
const { className, style, onReady, onSend, onReply, onError, onOpen, onClose, onAction, actions, confirm, getPageContext, ...config } = props;
|
|
20
|
+
const handlers = { onReady, onSend, onReply, onError, onOpen, onClose, onAction };
|
|
20
21
|
const handlersRef = useRef(handlers);
|
|
21
22
|
handlersRef.current = handlers;
|
|
22
23
|
useImperativeHandle(ref, () => el.current, []);
|
|
@@ -25,6 +26,10 @@ var DeweeChat = forwardRef(function DeweeChat2(props, ref) {
|
|
|
25
26
|
defineDeweeChat();
|
|
26
27
|
el.current?.configure(JSON.parse(configKey));
|
|
27
28
|
}, [configKey]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
defineDeweeChat();
|
|
31
|
+
el.current?.configure({ actions, confirm, getPageContext });
|
|
32
|
+
});
|
|
28
33
|
useEffect(() => {
|
|
29
34
|
const node = el.current;
|
|
30
35
|
if (!node) return;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentInfo, H as HistoryMessage, C as ChatStreamEvent } from './protocol-
|
|
2
|
-
export { P as PublicConfig, S as SessionResponse } from './protocol-
|
|
1
|
+
import { A as AgentInfo, H as HistoryMessage, C as ChatStreamEvent, a as ActionManifestEntry } from './protocol-B72Ry-fY.js';
|
|
2
|
+
export { b as ActionSensitivity, c as ChatRequestBody, P as PublicConfig, S as SessionResponse } from './protocol-B72Ry-fY.js';
|
|
3
3
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
4
4
|
|
|
5
5
|
interface VisitorClaims {
|
|
@@ -122,4 +122,28 @@ declare function foldHistory(raw: any[]): HistoryMessage[];
|
|
|
122
122
|
/** Lists agents via the gateway REST API. */
|
|
123
123
|
declare function listAgents(creds: GatewayCredentials): Promise<AgentInfo[]>;
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
declare const ACTION_LIMITS: {
|
|
126
|
+
readonly maxActions: 32;
|
|
127
|
+
readonly maxDescription: 1000;
|
|
128
|
+
readonly maxParametersBytes: 4096;
|
|
129
|
+
readonly maxManifestBytes: 16384;
|
|
130
|
+
readonly maxPageContextBytes: 4096;
|
|
131
|
+
};
|
|
132
|
+
/** Validates and normalizes `body.actions` (fixed key order, so the hash is stable). Throws ActionInputError. */
|
|
133
|
+
declare function normalizeManifest(input: unknown): ActionManifestEntry[];
|
|
134
|
+
/** Short, opaque manifest fingerprint: first 16 hex chars of SHA-256 over the normalized JSON. */
|
|
135
|
+
declare function hashManifest(manifest: ActionManifestEntry[]): Promise<string>;
|
|
136
|
+
interface PageBlockInput {
|
|
137
|
+
manifest?: ActionManifestEntry[];
|
|
138
|
+
hash?: string;
|
|
139
|
+
/** False when the agent already received this exact manifest in the conversation. */
|
|
140
|
+
includeManifest?: boolean;
|
|
141
|
+
/** Pre-serialized page context JSON. */
|
|
142
|
+
pageContext?: string;
|
|
143
|
+
}
|
|
144
|
+
/** Builds the block prepended to the visitor message, or "" when there is nothing to add. */
|
|
145
|
+
declare function buildPageBlock(p: PageBlockInput): string;
|
|
146
|
+
/** Removes a leading page block from a stored user message (history display). */
|
|
147
|
+
declare function stripPageBlock(content: string): string;
|
|
148
|
+
|
|
149
|
+
export { ACTION_LIMITS, ActionManifestEntry, AgentInfo, ChatStreamEvent, type DeweeHandlerOptions, GatewayConnection, type GatewayCredentials, GatewayError, HistoryMessage, type RateLimiter, type StreamChatOptions, buildPageBlock, buildSessionKey, createDeweeHandler, fetchHistory, foldHistory, hashManifest, listAgents, memoryRateLimiter, normalizeManifest, optionsFromEnv, signVisitorToken, streamChat, stripPageBlock, toNodeHandler, verifyVisitorToken };
|
package/dist/server.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ACTION_LIMITS,
|
|
3
|
+
ActionInputError,
|
|
2
4
|
HEADER_GATEWAY_TOKEN,
|
|
3
5
|
HEADER_GATEWAY_URL,
|
|
4
|
-
VERSION
|
|
5
|
-
|
|
6
|
+
VERSION,
|
|
7
|
+
buildPageBlock,
|
|
8
|
+
hashManifest,
|
|
9
|
+
normalizeManifest,
|
|
10
|
+
serializePageContext,
|
|
11
|
+
stripPageBlock
|
|
12
|
+
} from "./chunk-JX6AH37X.js";
|
|
6
13
|
|
|
7
14
|
// src/server/gateway-client.ts
|
|
8
15
|
var GatewayError = class extends Error {
|
|
@@ -220,7 +227,7 @@ function foldHistory(raw) {
|
|
|
220
227
|
for (const m of raw) {
|
|
221
228
|
if (m.role === "user") {
|
|
222
229
|
current = null;
|
|
223
|
-
out.push({ role: "user", content: String(m.content ?? ""), createdAt: m.created_at });
|
|
230
|
+
out.push({ role: "user", content: stripPageBlock(String(m.content ?? "")), createdAt: m.created_at });
|
|
224
231
|
} else if (m.role === "assistant") {
|
|
225
232
|
if (!current) {
|
|
226
233
|
current = { role: "assistant", content: "", createdAt: m.created_at };
|
|
@@ -468,6 +475,17 @@ function createDeweeHandler(options) {
|
|
|
468
475
|
const conversationId = typeof body?.conversationId === "string" && ID_RE.test(body.conversationId) ? body.conversationId : randomId(9);
|
|
469
476
|
const agent = await pickAgent(body?.agent, creds, isByo);
|
|
470
477
|
if (!agent) return fail(req, 403, "Agent not allowed", "agent_not_allowed");
|
|
478
|
+
let pageBlock = "";
|
|
479
|
+
let actionsHash;
|
|
480
|
+
try {
|
|
481
|
+
const manifest = body?.actions != null ? normalizeManifest(body.actions) : void 0;
|
|
482
|
+
const pageContext = serializePageContext(body?.pageContext);
|
|
483
|
+
if (manifest?.length) actionsHash = await hashManifest(manifest);
|
|
484
|
+
pageBlock = buildPageBlock({ manifest, hash: actionsHash, includeManifest: body?.actionsHash !== actionsHash, pageContext });
|
|
485
|
+
} catch (e) {
|
|
486
|
+
if (e instanceof ActionInputError) return fail(req, e.status, e.message, e.code);
|
|
487
|
+
throw e;
|
|
488
|
+
}
|
|
471
489
|
const sessionKey = buildSessionKey(agent, `webchat-${visitorId}-${conversationId}`);
|
|
472
490
|
const abort = new AbortController();
|
|
473
491
|
req.signal?.addEventListener("abort", () => abort.abort(), { once: true });
|
|
@@ -482,8 +500,8 @@ function createDeweeHandler(options) {
|
|
|
482
500
|
let reply = "";
|
|
483
501
|
let errMsg;
|
|
484
502
|
try {
|
|
485
|
-
await send({ type: "start", conversationId, agent });
|
|
486
|
-
for await (const ev of streamChat({ creds, userId: o.userIdPrefix + visitorId, agent, sessionKey, message, signal: abort.signal, timeoutMs: o.timeoutMs })) {
|
|
503
|
+
await send(actionsHash ? { type: "start", conversationId, agent, actionsHash } : { type: "start", conversationId, agent });
|
|
504
|
+
for await (const ev of streamChat({ creds, userId: o.userIdPrefix + visitorId, agent, sessionKey, message: pageBlock + message, signal: abort.signal, timeoutMs: o.timeoutMs })) {
|
|
487
505
|
if (ev.type === "start") continue;
|
|
488
506
|
if (ev.type === "done") reply = ev.content;
|
|
489
507
|
if (ev.type === "error") errMsg = ev.message;
|
|
@@ -616,17 +634,22 @@ function toNodeHandler(handler) {
|
|
|
616
634
|
};
|
|
617
635
|
}
|
|
618
636
|
export {
|
|
637
|
+
ACTION_LIMITS,
|
|
619
638
|
GatewayConnection,
|
|
620
639
|
GatewayError,
|
|
640
|
+
buildPageBlock,
|
|
621
641
|
buildSessionKey,
|
|
622
642
|
createDeweeHandler,
|
|
623
643
|
fetchHistory,
|
|
624
644
|
foldHistory,
|
|
645
|
+
hashManifest,
|
|
625
646
|
listAgents,
|
|
626
647
|
memoryRateLimiter,
|
|
648
|
+
normalizeManifest,
|
|
627
649
|
optionsFromEnv,
|
|
628
650
|
signVisitorToken,
|
|
629
651
|
streamChat,
|
|
652
|
+
stripPageBlock,
|
|
630
653
|
toNodeHandler,
|
|
631
654
|
verifyVisitorToken
|
|
632
655
|
};
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
-
export { DeweeChatConfig, DeweeChatElement } from './index.js';
|
|
4
|
-
import './protocol-
|
|
3
|
+
export { ActionConfirmHook, ActionEventDetail, DeweeChatConfig, DeweeChatElement, PageAction, PageActionContext } from './index.js';
|
|
4
|
+
import './protocol-B72Ry-fY.js';
|
|
5
5
|
|
|
6
6
|
declare const DeweeChat: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
7
7
|
endpoint: {
|
|
@@ -108,9 +108,29 @@ declare const DeweeChat: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
108
108
|
type: PropType<any>;
|
|
109
109
|
default: undefined;
|
|
110
110
|
};
|
|
111
|
+
actions: {
|
|
112
|
+
type: PropType<any>;
|
|
113
|
+
default: undefined;
|
|
114
|
+
};
|
|
115
|
+
confirm: {
|
|
116
|
+
type: PropType<any>;
|
|
117
|
+
default: undefined;
|
|
118
|
+
};
|
|
119
|
+
getPageContext: {
|
|
120
|
+
type: PropType<any>;
|
|
121
|
+
default: undefined;
|
|
122
|
+
};
|
|
123
|
+
maxActionRounds: {
|
|
124
|
+
type: PropType<any>;
|
|
125
|
+
default: undefined;
|
|
126
|
+
};
|
|
127
|
+
actionTimeoutMs: {
|
|
128
|
+
type: PropType<any>;
|
|
129
|
+
default: undefined;
|
|
130
|
+
};
|
|
111
131
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
112
132
|
[key: string]: any;
|
|
113
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("open" | "
|
|
133
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("open" | "ready" | "send" | "reply" | "error" | "close" | "action")[], "open" | "ready" | "send" | "reply" | "error" | "close" | "action", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
114
134
|
endpoint: {
|
|
115
135
|
type: PropType<any>;
|
|
116
136
|
default: undefined;
|
|
@@ -215,13 +235,34 @@ declare const DeweeChat: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
215
235
|
type: PropType<any>;
|
|
216
236
|
default: undefined;
|
|
217
237
|
};
|
|
238
|
+
actions: {
|
|
239
|
+
type: PropType<any>;
|
|
240
|
+
default: undefined;
|
|
241
|
+
};
|
|
242
|
+
confirm: {
|
|
243
|
+
type: PropType<any>;
|
|
244
|
+
default: undefined;
|
|
245
|
+
};
|
|
246
|
+
getPageContext: {
|
|
247
|
+
type: PropType<any>;
|
|
248
|
+
default: undefined;
|
|
249
|
+
};
|
|
250
|
+
maxActionRounds: {
|
|
251
|
+
type: PropType<any>;
|
|
252
|
+
default: undefined;
|
|
253
|
+
};
|
|
254
|
+
actionTimeoutMs: {
|
|
255
|
+
type: PropType<any>;
|
|
256
|
+
default: undefined;
|
|
257
|
+
};
|
|
218
258
|
}>> & Readonly<{
|
|
259
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
219
260
|
onReady?: ((...args: any[]) => any) | undefined;
|
|
220
261
|
onSend?: ((...args: any[]) => any) | undefined;
|
|
221
262
|
onReply?: ((...args: any[]) => any) | undefined;
|
|
222
263
|
onError?: ((...args: any[]) => any) | undefined;
|
|
223
|
-
onOpen?: ((...args: any[]) => any) | undefined;
|
|
224
264
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
265
|
+
onAction?: ((...args: any[]) => any) | undefined;
|
|
225
266
|
}>, {
|
|
226
267
|
endpoint: any;
|
|
227
268
|
agent: any;
|
|
@@ -249,6 +290,11 @@ declare const DeweeChat: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
249
290
|
width: any;
|
|
250
291
|
height: any;
|
|
251
292
|
zIndex: any;
|
|
293
|
+
actions: any;
|
|
294
|
+
confirm: any;
|
|
295
|
+
getPageContext: any;
|
|
296
|
+
maxActionRounds: any;
|
|
297
|
+
actionTimeoutMs: any;
|
|
252
298
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
253
299
|
|
|
254
300
|
export { DeweeChat, DeweeChat as default };
|
package/dist/vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineDeweeChat
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YV6PXYJZ.js";
|
|
4
|
+
import "./chunk-JX6AH37X.js";
|
|
5
5
|
|
|
6
6
|
// src/vue.ts
|
|
7
7
|
import { defineComponent, h, onMounted, ref, watch } from "vue";
|
|
@@ -31,10 +31,15 @@ var keys = [
|
|
|
31
31
|
"gatewayToken",
|
|
32
32
|
"width",
|
|
33
33
|
"height",
|
|
34
|
-
"zIndex"
|
|
34
|
+
"zIndex",
|
|
35
|
+
"actions",
|
|
36
|
+
"confirm",
|
|
37
|
+
"getPageContext",
|
|
38
|
+
"maxActionRounds",
|
|
39
|
+
"actionTimeoutMs"
|
|
35
40
|
];
|
|
36
41
|
var props = Object.fromEntries(keys.map((k) => [k, { type: null, default: void 0 }]));
|
|
37
|
-
var EVENTS = ["ready", "send", "reply", "error", "open", "close"];
|
|
42
|
+
var EVENTS = ["ready", "send", "reply", "error", "open", "close", "action"];
|
|
38
43
|
var DeweeChat = defineComponent({
|
|
39
44
|
name: "DeweeChat",
|
|
40
45
|
props,
|
|
@@ -54,7 +59,9 @@ var DeweeChat = defineComponent({
|
|
|
54
59
|
open: () => el.value?.open(),
|
|
55
60
|
close: () => el.value?.close(),
|
|
56
61
|
send: (text) => el.value?.send(text),
|
|
57
|
-
newConversation: () => el.value?.newConversation()
|
|
62
|
+
newConversation: () => el.value?.newConversation(),
|
|
63
|
+
registerActions: (actions) => el.value?.registerActions(actions),
|
|
64
|
+
unregisterAction: (name) => el.value?.unregisterAction(name)
|
|
58
65
|
});
|
|
59
66
|
return () => h("dewee-chat", { ref: el, endpoint: p.endpoint, mode: p.mode });
|
|
60
67
|
}
|
package/package.json
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dewee-webchat",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Embeddable chat widget for Dewee AI agents — web component, React/Vue/Astro wrappers and a secure backend handler (Workers, Next.js, Node, Bun, Deno).",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"author": "NextLevelBuilder <hi@nextlevelbuilder.io>",
|
|
8
|
-
"homepage": "https://webchat.dewee.sh",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/nextlevelbuilder/dewee-webchat.git",
|
|
12
|
-
"directory": "packages/dewee-webchat"
|
|
13
|
-
},
|
|
14
|
-
"bugs": "https://github.com/nextlevelbuilder/dewee-webchat/issues",
|
|
15
|
-
"keywords": [
|
|
16
|
-
"dewee",
|
|
17
|
-
"goclaw",
|
|
18
|
-
"ai",
|
|
19
|
-
"agent",
|
|
20
|
-
"chatbot",
|
|
21
|
-
"chat-widget",
|
|
22
|
-
"web-component",
|
|
23
|
-
"react",
|
|
24
|
-
"vue",
|
|
25
|
-
"astro",
|
|
26
|
-
"nextjs",
|
|
27
|
-
"cloudflare-workers"
|
|
28
|
-
],
|
|
29
|
-
"sideEffects": [
|
|
30
|
-
"./dist/index.js",
|
|
31
|
-
"./dist/dewee-webchat.js",
|
|
32
|
-
"./dist/chunk-*.js"
|
|
33
|
-
],
|
|
34
|
-
"main": "./dist/index.js",
|
|
35
|
-
"module": "./dist/index.js",
|
|
36
|
-
"types": "./dist/index.d.ts",
|
|
37
|
-
"unpkg": "./dist/dewee-webchat.js",
|
|
38
|
-
"jsdelivr": "./dist/dewee-webchat.js",
|
|
39
|
-
"exports": {
|
|
40
|
-
".": {
|
|
41
|
-
"types": "./dist/index.d.ts",
|
|
42
|
-
"import": "./dist/index.js"
|
|
43
|
-
},
|
|
44
|
-
"./server": {
|
|
45
|
-
"types": "./dist/server.d.ts",
|
|
46
|
-
"import": "./dist/server.js"
|
|
47
|
-
},
|
|
48
|
-
"./react": {
|
|
49
|
-
"types": "./dist/react.d.ts",
|
|
50
|
-
"import": "./dist/react.js"
|
|
51
|
-
},
|
|
52
|
-
"./vue": {
|
|
53
|
-
"types": "./dist/vue.d.ts",
|
|
54
|
-
"import": "./dist/vue.js"
|
|
55
|
-
},
|
|
56
|
-
"./astro": "./astro/DeweeChat.astro",
|
|
57
|
-
"./cdn": "./dist/dewee-webchat.js",
|
|
58
|
-
"./package.json": "./package.json"
|
|
59
|
-
},
|
|
60
|
-
"files": [
|
|
61
|
-
"dist",
|
|
62
|
-
"astro",
|
|
63
|
-
"README.md",
|
|
64
|
-
"LICENSE"
|
|
65
|
-
],
|
|
66
|
-
"scripts": {
|
|
67
|
-
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsup",
|
|
68
|
-
"dev": "tsup --watch",
|
|
69
|
-
"test": "vitest run",
|
|
70
|
-
"typecheck": "tsc --noEmit"
|
|
71
|
-
},
|
|
72
|
-
"peerDependencies": {
|
|
73
|
-
"react": ">=18",
|
|
74
|
-
"vue": ">=3.3"
|
|
75
|
-
},
|
|
76
|
-
"peerDependenciesMeta": {
|
|
77
|
-
"react": {
|
|
78
|
-
"optional": true
|
|
79
|
-
},
|
|
80
|
-
"vue": {
|
|
81
|
-
"optional": true
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"devDependencies": {
|
|
85
|
-
"@types/node": "^22.15.0",
|
|
86
|
-
"@types/react": "^19.1.0",
|
|
87
|
-
"@types/ws": "^8.18.2",
|
|
88
|
-
"happy-dom": "^18.0.1",
|
|
89
|
-
"react": "^19.1.0",
|
|
90
|
-
"tsup": "^8.5.0",
|
|
91
|
-
"typescript": "^5.9.2",
|
|
92
|
-
"vitest": "^3.2.4",
|
|
93
|
-
"vue": "^3.5.18",
|
|
94
|
-
"ws": "^8.22.0"
|
|
95
|
-
},
|
|
96
|
-
"engines": {
|
|
97
|
-
"node": ">=20"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dewee-webchat",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Embeddable chat widget for Dewee AI agents — web component, React/Vue/Astro wrappers and a secure backend handler (Workers, Next.js, Node, Bun, Deno).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"author": "NextLevelBuilder <hi@nextlevelbuilder.io>",
|
|
8
|
+
"homepage": "https://webchat.dewee.sh",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/nextlevelbuilder/dewee-webchat.git",
|
|
12
|
+
"directory": "packages/dewee-webchat"
|
|
13
|
+
},
|
|
14
|
+
"bugs": "https://github.com/nextlevelbuilder/dewee-webchat/issues",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"dewee",
|
|
17
|
+
"goclaw",
|
|
18
|
+
"ai",
|
|
19
|
+
"agent",
|
|
20
|
+
"chatbot",
|
|
21
|
+
"chat-widget",
|
|
22
|
+
"web-component",
|
|
23
|
+
"react",
|
|
24
|
+
"vue",
|
|
25
|
+
"astro",
|
|
26
|
+
"nextjs",
|
|
27
|
+
"cloudflare-workers"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": [
|
|
30
|
+
"./dist/index.js",
|
|
31
|
+
"./dist/dewee-webchat.js",
|
|
32
|
+
"./dist/chunk-*.js"
|
|
33
|
+
],
|
|
34
|
+
"main": "./dist/index.js",
|
|
35
|
+
"module": "./dist/index.js",
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"unpkg": "./dist/dewee-webchat.js",
|
|
38
|
+
"jsdelivr": "./dist/dewee-webchat.js",
|
|
39
|
+
"exports": {
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"import": "./dist/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./server": {
|
|
45
|
+
"types": "./dist/server.d.ts",
|
|
46
|
+
"import": "./dist/server.js"
|
|
47
|
+
},
|
|
48
|
+
"./react": {
|
|
49
|
+
"types": "./dist/react.d.ts",
|
|
50
|
+
"import": "./dist/react.js"
|
|
51
|
+
},
|
|
52
|
+
"./vue": {
|
|
53
|
+
"types": "./dist/vue.d.ts",
|
|
54
|
+
"import": "./dist/vue.js"
|
|
55
|
+
},
|
|
56
|
+
"./astro": "./astro/DeweeChat.astro",
|
|
57
|
+
"./cdn": "./dist/dewee-webchat.js",
|
|
58
|
+
"./package.json": "./package.json"
|
|
59
|
+
},
|
|
60
|
+
"files": [
|
|
61
|
+
"dist",
|
|
62
|
+
"astro",
|
|
63
|
+
"README.md",
|
|
64
|
+
"LICENSE"
|
|
65
|
+
],
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsup",
|
|
68
|
+
"dev": "tsup --watch",
|
|
69
|
+
"test": "vitest run",
|
|
70
|
+
"typecheck": "tsc --noEmit"
|
|
71
|
+
},
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"react": ">=18",
|
|
74
|
+
"vue": ">=3.3"
|
|
75
|
+
},
|
|
76
|
+
"peerDependenciesMeta": {
|
|
77
|
+
"react": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"vue": {
|
|
81
|
+
"optional": true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@types/node": "^22.15.0",
|
|
86
|
+
"@types/react": "^19.1.0",
|
|
87
|
+
"@types/ws": "^8.18.2",
|
|
88
|
+
"happy-dom": "^18.0.1",
|
|
89
|
+
"react": "^19.1.0",
|
|
90
|
+
"tsup": "^8.5.0",
|
|
91
|
+
"typescript": "^5.9.2",
|
|
92
|
+
"vitest": "^3.2.4",
|
|
93
|
+
"vue": "^3.5.18",
|
|
94
|
+
"ws": "^8.22.0"
|
|
95
|
+
},
|
|
96
|
+
"engines": {
|
|
97
|
+
"node": ">=20"
|
|
98
|
+
}
|
|
99
|
+
}
|
package/dist/chunk-MKTHKYLY.js
DELETED