@worktango/ai-assistant 0.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # Changelog
2
+
3
+ 0.0.x versions - pre-release. Expect breaking changes.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # AI Assistant
2
+
3
+ A React component for embedding the WorkTango AI Assistant in your web application.
4
+
5
+ In scope:
6
+ - Single-stream back-and-forth UI between an LLM and a user, similar to popular LLM AI assistant UIs
7
+ - Standardized API for unified backend integration
8
+ - Standardized API for tool calls, with multiple layers of fulfillment (e.g., client fulfilled; sourceServerFulfilled; proxyServerFulfilled)
9
+ - Consistent styling across WorkTango apps
10
+ - Embeddable in any React application
11
+ - Consistent with our other React components
12
+
13
+ Out of scope (for now):
14
+ - Previous chat management UI
15
+ - User authentication (we provide a server-to-server proxy middleware for that; this should only work for logged-in users)
16
+ - Anything else not explicitly mentioned in the scope section, above
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install @worktango/ai-assistant
22
+ # or
23
+ yarn add @worktango/ai-assistant
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ### React Applications
29
+
30
+ ```jsx
31
+ import { AiAssistant } from "@worktango/ai-assistant/react";
32
+
33
+ function App() {
34
+ return (
35
+ <div>
36
+ <AiAssistant />
37
+ </div>
38
+ );
39
+ }
40
+ ```
41
+
42
+ ## Features
43
+
44
+ 😄 none, yet!
package/express.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { setupAiAssistantRoutes } from "./src/backend/express";
package/express.js ADDED
@@ -0,0 +1 @@
1
+ require("./dist/express.js");
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@worktango/ai-assistant",
3
+ "version": "0.0.1",
4
+ "main": "dist/ai-assistant.umd.js",
5
+ "module": "dist/ai-assistant.es.js",
6
+ "types": "react.d.ts",
7
+ "files": [
8
+ "dist/*",
9
+ "react.js",
10
+ "react.d.ts",
11
+ "express.js",
12
+ "express.d.ts"
13
+ ],
14
+ "scripts": {
15
+ "checkIfPublishable": "git status --porcelain | grep . && echo 'Dirty tree. Aborting.' && exit 1 || exit 0",
16
+ "dev": "vite --config vite.config.ts src/dev",
17
+ "dev:backend": "nodemon express.js",
18
+ "build:backend": "esbuild src/backend/express.ts --bundle --platform=node --outfile=dist/express.js \"--external:*\"",
19
+ "build:frontend": "vite build",
20
+ "build": "yarn build:backend && yarn build:frontend && yarn ts-node -T scripts/injectCss.ts",
21
+ "prepareForPublish": "yarn ts-node -T scripts/prepareForPublish.ts",
22
+ "prepublishOnly": "yarn checkIfPublishable && rm -rf dist && yarn build",
23
+ "publish": "yarn prepareForPublish && yarn npm publish --access public --tolerate-republish; git reset --hard HEAD"
24
+ },
25
+ "dependencies": {
26
+ "express": "4.21.2",
27
+ "react": "18"
28
+ },
29
+ "devDependencies": {
30
+ "@types/react": "^18",
31
+ "@vitejs/plugin-react": "^4.2.1",
32
+ "esbuild": "^0.17.11",
33
+ "ts-node": "^10.9.1",
34
+ "typescript": "~5.6",
35
+ "vite": "~6.2.4",
36
+ "vite-plugin-css-modules": "0.0.1"
37
+ }
38
+ }
package/react.js ADDED
@@ -0,0 +1 @@
1
+ export { AiAssistant } from "./dist/react.es.js";