@handsforbots/assistant-ui 0.0.0-stage → 2.0.0-alpha.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.
- package/LICENSE.md +9 -0
- package/README.md +22 -2
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +121 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -3
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2024 Alex Lana and Hands for Bots contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @handsforbots/assistant-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
UI. assistant-ui runtime for Hands for Bots: use assistant-ui components as the conversation surface over any H4B transport.
|
|
4
|
+
|
|
5
|
+
Part of [Hands for Bots](https://github.com/handsforbots/handsforbots), a headless multimodal and action layer between users, GUIs and agents.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @handsforbots/assistant-ui@alpha @handsforbots/core@alpha @handsforbots/react@alpha
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Also needs: `@assistant-ui/react`, `react`.
|
|
14
|
+
|
|
15
|
+
## Documentation
|
|
16
|
+
|
|
17
|
+
- [This package](https://github.com/handsforbots/handsforbots/blob/main/docs/en-us/plugins.md#assistant-ui)
|
|
18
|
+
- [Getting started](https://github.com/handsforbots/handsforbots/blob/main/docs/en-us/getting-started.md)
|
|
19
|
+
- [Documentação em português](https://github.com/handsforbots/handsforbots/blob/main/docs/pt-br/README.md)
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
|
|
23
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AppendMessage, type ThreadMessageLike } from '@assistant-ui/react';
|
|
2
|
+
import { type Message, type Part } from '@handsforbots/core';
|
|
3
|
+
export type H4BAssistantRuntimeOptions = {
|
|
4
|
+
/** Source name of signals sent from the assistant-ui composer. Default 'assistant-ui'. */
|
|
5
|
+
source?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* assistant-ui runtime backed by H4B: assistant-ui renders the thread and the
|
|
9
|
+
* composer; H4B handles the transport (AG-UI, AI SDK, Rasa, HTTP…), actions,
|
|
10
|
+
* menu, voice and the rest.
|
|
11
|
+
*
|
|
12
|
+
* const runtime = useH4BAssistantRuntime()
|
|
13
|
+
* <AssistantRuntimeProvider runtime={runtime}><Thread /></AssistantRuntimeProvider>
|
|
14
|
+
*/
|
|
15
|
+
export declare function useH4BAssistantRuntime(options?: H4BAssistantRuntimeOptions): import("@assistant-ui/react").AssistantRuntime;
|
|
16
|
+
/** H4B history → assistant-ui messages (tool results folded into tool-call parts). */
|
|
17
|
+
export declare function toThreadMessages(messages: Message[]): ThreadMessageLike[];
|
|
18
|
+
/** assistant-ui composer message → H4B parts. */
|
|
19
|
+
export declare function fromAppendMessage(message: AppendMessage): Part[];
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACzG,OAAO,EAA0B,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAIpF,MAAM,MAAM,0BAA0B,GAAG;IACvC,0FAA0F;IAC1F,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,0BAA+B,kDAe9E;AAED,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAiDzE;AAcD,iDAAiD;AACjD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,EAAE,CAShE"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { useExternalStoreRuntime } from '@assistant-ui/react';
|
|
2
|
+
import { textOf } from '@handsforbots/core';
|
|
3
|
+
import { useBusy, useH4B, useMessages } from '@handsforbots/react';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* assistant-ui runtime backed by H4B: assistant-ui renders the thread and the
|
|
7
|
+
* composer; H4B handles the transport (AG-UI, AI SDK, Rasa, HTTP…), actions,
|
|
8
|
+
* menu, voice and the rest.
|
|
9
|
+
*
|
|
10
|
+
* const runtime = useH4BAssistantRuntime()
|
|
11
|
+
* <AssistantRuntimeProvider runtime={runtime}><Thread /></AssistantRuntimeProvider>
|
|
12
|
+
*/
|
|
13
|
+
export function useH4BAssistantRuntime(options = {}) {
|
|
14
|
+
const h4b = useH4B();
|
|
15
|
+
const messages = useMessages();
|
|
16
|
+
const busy = useBusy();
|
|
17
|
+
const thread = useMemo(() => toThreadMessages(messages), [messages]);
|
|
18
|
+
return useExternalStoreRuntime({
|
|
19
|
+
messages: thread,
|
|
20
|
+
isRunning: busy,
|
|
21
|
+
convertMessage: (message) => message,
|
|
22
|
+
onNew: async (message) => {
|
|
23
|
+
h4b.signal({ modality: hasMedia(message) ? 'image' : 'text', source: options.source ?? 'assistant-ui', parts: fromAppendMessage(message) });
|
|
24
|
+
},
|
|
25
|
+
onCancel: async () => h4b.abort(),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** H4B history → assistant-ui messages (tool results folded into tool-call parts). */
|
|
29
|
+
export function toThreadMessages(messages) {
|
|
30
|
+
const results = new Map();
|
|
31
|
+
for (const message of messages) {
|
|
32
|
+
if (message.role === 'tool')
|
|
33
|
+
results.set(message.toolCallId, { result: message.result, error: message.error });
|
|
34
|
+
}
|
|
35
|
+
const thread = [];
|
|
36
|
+
for (const message of messages) {
|
|
37
|
+
if (message.role === 'tool')
|
|
38
|
+
continue;
|
|
39
|
+
const createdAt = new Date(message.createdAt);
|
|
40
|
+
if (message.role === 'user') {
|
|
41
|
+
const content = [
|
|
42
|
+
{ type: 'text', text: textOf(message) },
|
|
43
|
+
...message.parts.flatMap((p) => {
|
|
44
|
+
const image = imageUrl(p);
|
|
45
|
+
return image ? [{ type: 'image', image }] : [];
|
|
46
|
+
}),
|
|
47
|
+
].filter((p) => p.type !== 'text' || p.text);
|
|
48
|
+
thread.push({ id: message.id, role: 'user', content: content.length ? content : [{ type: 'text', text: '' }], createdAt });
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const content = [];
|
|
52
|
+
const text = textOf(message);
|
|
53
|
+
if (text)
|
|
54
|
+
content.push({ type: 'text', text });
|
|
55
|
+
for (const call of message.toolCalls ?? []) {
|
|
56
|
+
const outcome = results.get(call.id);
|
|
57
|
+
content.push({
|
|
58
|
+
type: 'tool-call',
|
|
59
|
+
toolCallId: call.id,
|
|
60
|
+
toolName: call.name,
|
|
61
|
+
args: (call.args ?? {}),
|
|
62
|
+
...(outcome ? { result: outcome.error ? { error: outcome.error } : (outcome.result ?? null), isError: !!outcome.error } : {}),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
for (const part of message.parts) {
|
|
66
|
+
const image = imageUrl(part);
|
|
67
|
+
if (image)
|
|
68
|
+
content.push({ type: 'image', image });
|
|
69
|
+
if (part.type === 'data' && part.name === 'ui')
|
|
70
|
+
content.push({ type: 'data-h4b-ui', data: part.value });
|
|
71
|
+
}
|
|
72
|
+
if (!content.length)
|
|
73
|
+
continue;
|
|
74
|
+
thread.push({
|
|
75
|
+
id: message.id,
|
|
76
|
+
role: 'assistant',
|
|
77
|
+
content,
|
|
78
|
+
createdAt,
|
|
79
|
+
status: message.streaming ? { type: 'running' } : { type: 'complete', reason: 'stop' },
|
|
80
|
+
metadata: { custom: { route: message.route } },
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return thread;
|
|
84
|
+
}
|
|
85
|
+
function imageUrl(part) {
|
|
86
|
+
if (part.type !== 'image')
|
|
87
|
+
return undefined;
|
|
88
|
+
const media = part;
|
|
89
|
+
if (media.source.kind === 'url')
|
|
90
|
+
return /^https:\/\//i.test(media.source.url) ? media.source.url : undefined;
|
|
91
|
+
if (media.source.kind === 'base64')
|
|
92
|
+
return `data:${media.mimeType};base64,${media.source.data}`;
|
|
93
|
+
return typeof URL !== 'undefined' && URL.createObjectURL ? URL.createObjectURL(media.source.blob) : undefined;
|
|
94
|
+
}
|
|
95
|
+
function hasMedia(message) {
|
|
96
|
+
return message.content.some((p) => p.type === 'image') || (message.attachments?.length ?? 0) > 0;
|
|
97
|
+
}
|
|
98
|
+
/** assistant-ui composer message → H4B parts. */
|
|
99
|
+
export function fromAppendMessage(message) {
|
|
100
|
+
const parts = [];
|
|
101
|
+
const contents = [...message.content, ...(message.attachments ?? []).flatMap((a) => a.content ?? [])];
|
|
102
|
+
for (const part of contents) {
|
|
103
|
+
if (part.type === 'text' && part.text)
|
|
104
|
+
parts.push({ type: 'text', text: part.text });
|
|
105
|
+
else if (part.type === 'image' && typeof part.image === 'string')
|
|
106
|
+
parts.push(fromDataOrUrl(part.image, 'image', 'image/*'));
|
|
107
|
+
else if (part.type === 'file' && typeof part.data === 'string')
|
|
108
|
+
parts.push(fromDataOrUrl(part.data, 'file', part.mimeType ?? 'application/octet-stream', part.filename));
|
|
109
|
+
}
|
|
110
|
+
return parts;
|
|
111
|
+
}
|
|
112
|
+
function fromDataOrUrl(value, type, fallbackMime, name) {
|
|
113
|
+
const match = /^data:([^;]+);base64,(.*)$/.exec(value);
|
|
114
|
+
return {
|
|
115
|
+
type,
|
|
116
|
+
mimeType: match?.[1] ?? fallbackMime,
|
|
117
|
+
source: match ? { kind: 'base64', data: match[2] } : { kind: 'url', url: value },
|
|
118
|
+
...(name ? { name } : {}),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAA8C,MAAM,qBAAqB,CAAA;AACzG,OAAO,EAAE,MAAM,EAA2C,MAAM,oBAAoB,CAAA;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAO/B;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAO,GAA+B,EAAE;IAC7E,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IACpB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,IAAI,GAAG,OAAO,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,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1B,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@handsforbots/assistant-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
|
+
"description": "UI. assistant-ui runtime for Hands for Bots: use assistant-ui components as the conversation surface over any H4B transport.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"handsforbots",
|
|
7
|
+
"h4b",
|
|
8
|
+
"h4b-ui"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"homepage": "https://github.com/handsforbots/handsforbots/blob/main/docs/en-us/plugins.md#assistant-ui",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/handsforbots/handsforbots.git",
|
|
15
|
+
"directory": "packages/assistant-ui"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/handsforbots/handsforbots/issues"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@assistant-ui/react": ">=0.15",
|
|
36
|
+
"react": ">=18",
|
|
37
|
+
"@handsforbots/core": "^2.0.0-alpha.1",
|
|
38
|
+
"@handsforbots/react": "^2.0.0-alpha.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@assistant-ui/react": "^0.15.23",
|
|
42
|
+
"@testing-library/react": "^16.3.0",
|
|
43
|
+
"@types/react": "^19.1.0",
|
|
44
|
+
"jsdom": "^27.0.0",
|
|
45
|
+
"react": "^19.3.0",
|
|
46
|
+
"react-dom": "^19.3.0",
|
|
47
|
+
"@handsforbots/react": "^2.0.0-alpha.1",
|
|
48
|
+
"@handsforbots/core": "^2.0.0-alpha.1"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsc -p tsconfig.build.json",
|
|
52
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
53
|
+
}
|
|
6
54
|
}
|