agenticstackjs commited on
Commit
22a6f79
·
1 Parent(s): b2cc311

build setup

Browse files
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ node_modules/
2
+ /development/node_modules/
3
+ node_modules
dist/assests/js/agenticstack.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import("./asjs_chatbot.js");class e extends HTMLElement{constructor(){super()}handleEvent(e){this[`on${e.type}`](e)}connectedCallback(){this.render()}render(){this.innerHTML="\n <section>\n <h3>Welcome to Agentic Stack JS</h3>\n </section>\n "}}window.customElements.define("agentic-stack-js",e);export{e as AgenticStackJS};
dist/assests/js/asjs_chatbot.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{AgenticStackJS as t}from"./agenticstack.js";import*as e from"../../../../../../../../@mediapipe/tasks-genai/genai_bundle.mjs";window.customElements.define("asjs-chatbot",class extends t{constructor(){super(),this.popover_id="popover-asjs-chatbot",this.genai_fileset=null,this.llm_config={},this.llmInference=null,this.chatblock=null,this.chat_form_prompt_id="chat-form-prompt",this.chatformprompt=null,this.chatprompt=null,this.chatformconfig=null,this.chat_form_config_id="chat-form-config",this.chat_threads=new Set,this.displayPartialResults=this.displayPartialResults.bind(this)}get modelAssetPath(){return this.getAttribute("model-asset-path")}set modelAssetPath(t){return this.setAttribute("model-asset-path",t),this.modelAssetPath}get deviceDelegate(){return this.hasAttribute("device-delegate")?this.getAttribute("device-delegate"):"CPU"}set deviceDelegate(t){return this.setAttribute("device-delegate",t),this.deviceDelegate}get maxTokens(){return this.hasAttribute("max-tokens")?Number(this.getAttribute("max-tokens")):8192}set maxTokens(t){return this.setAttribute("max-tokens",t),this.maxTokens}get randomSeed(){return this.hasAttribute("random-seed")?Number(this.getAttribute("random-seed")):1}set randomSeed(t){return this.setAttribute("random-seed",t),this.randomSeed}get topK(){return this.hasAttribute("top-k")?Number(this.getAttribute("top-k")):1}set topK(t){return this.setAttribute("top-k",t),this.topK}get temperature(){if(this.hasAttribute("temperature")){return parseFloat(this.getAttribute("temperature"))}return 1}set temperature(t){return this.setAttribute("temperature",t),this.temperature}get asjs_title(){return this.getAttribute("asjs-title")}lastThread(){return[...this.chat_threads].at(-1)}threadID(){let t=new Date,e=Math.random().toString(36).substring(2,15),s=`thread-${t.getTime()}-${e}`;return this.chat_threads.add(s),s}async reloadModel(t){let s=document.querySelector('script[src^="/@mediapipe/tasks-genai"]');return s&&s.remove(),e.LlmInference.createFromOptions(this.genai_fileset,this.llm_config)}async loadModel(t){return this.genai_fileset=await e.FilesetResolver.forGenAiTasks("/@mediapipe/tasks-genai/wasm"),this.llm_config={baseOptions:{modelAssetPath:`${this.modelAssetPath??""}`,delegate:this.deviceDelegate},maxTokens:this.maxTokens,randomSeed:this.randomSeed,topK:this.topK,temperature:this.temperature},t&&(config.baseOptions={modelAssetBuffer:t}),e.LlmInference.createFromOptions(this.genai_fileset,this.llm_config)}scrollBottom(){const t=document.getElementById("message-list");t.scrollTo({behavior:"smooth",top:t.scrollHeight})}displayPartialResults(t,e){let s=this.querySelector(`#${this.lastThread()}`);s.textContent+=t,e&&(s.textContent||(s.textContent="Result is empty"),this.chatprompt.disabled=!1),this.scrollBottom()}async bindElems(){this.chatblock=this.querySelector("#chat-block"),this.chatformprompt=this.chatblock.querySelector(`form[id="${this.chat_form_prompt_id}"]`),this.chatprompt=this.chatformprompt.querySelector('input[id="chat-prompt"]'),this.msglist=this.chatblock.querySelector("#message-list"),this.chatformconfig=this.chatblock.querySelector(`form[id="${this.chat_form_config_id}"]`)}async addHandlers(){this.chatformprompt.addEventListener("submit",(t=>this.eventSubmitPrompt(t))),this.chatformconfig.addEventListener("submit",(t=>this.eventSubmitConfig(t)))}async removeHandlers(){this.chatformprompt.removeEventListener("submit",this.eventSubmitPrompt),this.chatformconfig.removeEventListener("submit",this.eventSubmitConfig)}eventSubmitConfig(t){t.preventDefault(t);let e=t.target.querySelectorAll("fieldset");this.chatprompt.disabled=!0;let s=new FormData(t.target);const i=Object.fromEntries(s.entries());this.maxTokens=i.maxTokens,this.randomSeed=i.randomSeed,this.topK=i.topK,this.temperature=i.temperature,e.forEach((t=>t.setAttribute("disabled",""))),this.reloadModel().then((async t=>{this.llmInference=t,alert("LLM options updated"),this.chatprompt.disabled=!1,e.forEach((t=>t.removeAttribute("disabled")))})).catch((async t=>{this.renderErrorModelPath()}))}async eventSubmitPrompt(t){t.preventDefault(),this.chatprompt.disabled=!0;let e=this.chatprompt.value,s=this.threadID();await this.renderMsg("user",s,e);let i=this.threadID();await this.renderMsg("bot",i,"");try{this.llmInference.generateResponse(e,this.displayPartialResults)}catch(t){alert(`${t}`),this.chatprompt.disabled=!1}}static observedAttributes=["max-tokens"];attributeChangedCallback(t,e,s){if(null!==e)switch(t){case"max-tokens":this.llm_config.maxTokens=Number(s);break;case"random-seed":this.llm_config.randomSeed=Number(s);break;case"top-k":this.llm_config.topK=Number(s);break;case"temperature":this.llm_config.temperature=s}}async connectedCallback(){await this.render(),await this.bindElems(),await this.addHandlers(),this.modelAssetPath?this.renderChatbot():this.renderErrorModelPath()}dissconnectedCallback(){this.removeHandlers()}renderMsg(t,e,s){let i=document.createElement("li");"bot"===t?i.classList.add("message-bot"):i.classList.add("message-user"),i.innerHTML=`\n <article> \n <p id="${e}">${s}</p>\n </arcticle>`,this.msglist.append(i)}renderErrorModelPath(){alert("please provide a path to the model"),this.querySelector(".message-loader").innerHTML='<div class="fade-in" style="position:relative; top:40%;">The model is NOT ready for a chat!</div>'}renderChatbot(){this.loadModel().then((async t=>{this.llmInference=t,this.querySelector(".message-loader").innerHTML='<div class="fade-in" style="position:relative; top:40%;">The model is ready for a chat!</div>',this.chatprompt.disabled=!1})).catch((async t=>{this.renderErrorModelPath()}))}render(){this.innerHTML=`\n <section id="chat-block">\n <nav><h3>${this.asjs_title}</h3></nav>\n <hr/>\n \x3c!---\n *** chat thread ***\n --\x3e\n <div id="chat-thread">\n <section>\n <ul id="message-list">\n <li class="message-loader">\n <div class="loader"></div>\n <p>Please standy by has we load the model</p>\n </li>\n </ul>\n </section>\n </div>\n\n \x3c!---\n *** Prompt Form ***\n --\x3e\n <div id="chat-prompt">\n <form id="${this.chat_form_prompt_id}">\n <fieldset>\n <label>Prompt</label>\n <input type="text"\n id="chat-prompt"\n name="chat-prompt"\n value="" \n disabled\n style="width:-webkit-fill-available;"></input>\n </fieldset>\n </form>\n </div>\n\n \x3c!--\n *** Configuration Form ***\n --\x3e\n <hr/>\n <div id="chat-config">\n <form id="${this.chat_form_config_id}">\n <fieldset>\n <label>Configuration options</label>\n </fieldset>\n <fieldset>\n <label>Max Token <span class="chat-config-help-text">(0 to 8192)</span></label>\n <input type="number"\n id="maxTokens"\n name="maxTokens"\n value="${this.maxTokens}" \n min="1" max="8192"\n style="width:-webkit-fill-available;">\n </input>\n </fieldset>\n \x3c!--randomSeed--!>\n <fieldset>\n <label>Random Seed <span class="chat-config-help-text"> (The random seed used during text generation)</span></label>\n <input type="number"\n id="randomSeed"\n name="randomSeed"\n value="${this.randomSeed}" \n min="1" max="1000"\n style="width:-webkit-fill-available;">\n </input>\n </fieldset>\n \x3c!--topK--\x3e\n <fieldset>\n <label>topK <span class="chat-config-help-text"> (level of control in text generation)</span></label>\n <input type="number"\n id="topK"\n name="topK"\n value="${this.topK}" \n min="0" max="100"\n style="width:-webkit-fill-available;">\n </input>\n </fieldset>\n \x3c!--temperature--\x3e\n <fieldset>\n <label>temperature <span class="chat-config-help-text"> (The amount of randomness introduced during generation)</span></label>\n <input type="text"\n id="temperature"\n name="temperature"\n value="${this.temperature}"\n style="width:-webkit-fill-available;">\n </input>\n </fieldset>\n <fieldset>\n <button \n form="${this.chat_form_config_id}"\n type="submit">\n Update\n </button>\n </fieldset>\n </form>\n </div>\n </section>\n `}});
package-lock.json ADDED
@@ -0,0 +1,500 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "agentic-stack-js-huggingface",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "agentic-stack-js-huggingface",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "agentic-stack-js-web-components": "^1.0.6"
13
+ },
14
+ "devDependencies": {
15
+ "copyfiles": "^2.4.1"
16
+ }
17
+ },
18
+ "node_modules/@mediapipe/tasks-genai": {
19
+ "version": "0.10.23",
20
+ "resolved": "https://registry.npmjs.org/@mediapipe/tasks-genai/-/tasks-genai-0.10.23.tgz",
21
+ "integrity": "sha512-3ApFdNBlsTa8rxok5+kyEmQscTEqdm/9THwCSmb6xz5uvf7v5zK5hHuIEzHdWDv00pTytg1KDWIWAvLyijr9uw==",
22
+ "license": "Apache-2.0"
23
+ },
24
+ "node_modules/agentic-stack-js-web-components": {
25
+ "version": "1.0.6",
26
+ "resolved": "https://registry.npmjs.org/agentic-stack-js-web-components/-/agentic-stack-js-web-components-1.0.6.tgz",
27
+ "integrity": "sha512-G3DyKI5LJWseyXmz+0awxSAv7+pSb6PagUYqvhM0TP8NCWh83vm4s2jp7KEjNxzVrvpdbhCl8Ctj8Utnr4bkzA==",
28
+ "license": "ISC",
29
+ "dependencies": {
30
+ "@mediapipe/tasks-genai": "^0.10.19"
31
+ }
32
+ },
33
+ "node_modules/ansi-regex": {
34
+ "version": "5.0.1",
35
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
36
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
37
+ "dev": true,
38
+ "license": "MIT",
39
+ "engines": {
40
+ "node": ">=8"
41
+ }
42
+ },
43
+ "node_modules/ansi-styles": {
44
+ "version": "4.3.0",
45
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
46
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
47
+ "dev": true,
48
+ "license": "MIT",
49
+ "dependencies": {
50
+ "color-convert": "^2.0.1"
51
+ },
52
+ "engines": {
53
+ "node": ">=8"
54
+ },
55
+ "funding": {
56
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
57
+ }
58
+ },
59
+ "node_modules/balanced-match": {
60
+ "version": "1.0.2",
61
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
62
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
63
+ "dev": true,
64
+ "license": "MIT"
65
+ },
66
+ "node_modules/brace-expansion": {
67
+ "version": "1.1.12",
68
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
69
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
70
+ "dev": true,
71
+ "license": "MIT",
72
+ "dependencies": {
73
+ "balanced-match": "^1.0.0",
74
+ "concat-map": "0.0.1"
75
+ }
76
+ },
77
+ "node_modules/cliui": {
78
+ "version": "7.0.4",
79
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
80
+ "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
81
+ "dev": true,
82
+ "license": "ISC",
83
+ "dependencies": {
84
+ "string-width": "^4.2.0",
85
+ "strip-ansi": "^6.0.0",
86
+ "wrap-ansi": "^7.0.0"
87
+ }
88
+ },
89
+ "node_modules/color-convert": {
90
+ "version": "2.0.1",
91
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
92
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
93
+ "dev": true,
94
+ "license": "MIT",
95
+ "dependencies": {
96
+ "color-name": "~1.1.4"
97
+ },
98
+ "engines": {
99
+ "node": ">=7.0.0"
100
+ }
101
+ },
102
+ "node_modules/color-name": {
103
+ "version": "1.1.4",
104
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
105
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
106
+ "dev": true,
107
+ "license": "MIT"
108
+ },
109
+ "node_modules/concat-map": {
110
+ "version": "0.0.1",
111
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
112
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
113
+ "dev": true,
114
+ "license": "MIT"
115
+ },
116
+ "node_modules/copyfiles": {
117
+ "version": "2.4.1",
118
+ "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz",
119
+ "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==",
120
+ "dev": true,
121
+ "license": "MIT",
122
+ "dependencies": {
123
+ "glob": "^7.0.5",
124
+ "minimatch": "^3.0.3",
125
+ "mkdirp": "^1.0.4",
126
+ "noms": "0.0.0",
127
+ "through2": "^2.0.1",
128
+ "untildify": "^4.0.0",
129
+ "yargs": "^16.1.0"
130
+ },
131
+ "bin": {
132
+ "copyfiles": "copyfiles",
133
+ "copyup": "copyfiles"
134
+ }
135
+ },
136
+ "node_modules/core-util-is": {
137
+ "version": "1.0.3",
138
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
139
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
140
+ "dev": true,
141
+ "license": "MIT"
142
+ },
143
+ "node_modules/emoji-regex": {
144
+ "version": "8.0.0",
145
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
146
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
147
+ "dev": true,
148
+ "license": "MIT"
149
+ },
150
+ "node_modules/escalade": {
151
+ "version": "3.2.0",
152
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
153
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
154
+ "dev": true,
155
+ "license": "MIT",
156
+ "engines": {
157
+ "node": ">=6"
158
+ }
159
+ },
160
+ "node_modules/fs.realpath": {
161
+ "version": "1.0.0",
162
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
163
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
164
+ "dev": true,
165
+ "license": "ISC"
166
+ },
167
+ "node_modules/get-caller-file": {
168
+ "version": "2.0.5",
169
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
170
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
171
+ "dev": true,
172
+ "license": "ISC",
173
+ "engines": {
174
+ "node": "6.* || 8.* || >= 10.*"
175
+ }
176
+ },
177
+ "node_modules/glob": {
178
+ "version": "7.2.3",
179
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
180
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
181
+ "deprecated": "Glob versions prior to v9 are no longer supported",
182
+ "dev": true,
183
+ "license": "ISC",
184
+ "dependencies": {
185
+ "fs.realpath": "^1.0.0",
186
+ "inflight": "^1.0.4",
187
+ "inherits": "2",
188
+ "minimatch": "^3.1.1",
189
+ "once": "^1.3.0",
190
+ "path-is-absolute": "^1.0.0"
191
+ },
192
+ "engines": {
193
+ "node": "*"
194
+ },
195
+ "funding": {
196
+ "url": "https://github.com/sponsors/isaacs"
197
+ }
198
+ },
199
+ "node_modules/inflight": {
200
+ "version": "1.0.6",
201
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
202
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
203
+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
204
+ "dev": true,
205
+ "license": "ISC",
206
+ "dependencies": {
207
+ "once": "^1.3.0",
208
+ "wrappy": "1"
209
+ }
210
+ },
211
+ "node_modules/inherits": {
212
+ "version": "2.0.4",
213
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
214
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
215
+ "dev": true,
216
+ "license": "ISC"
217
+ },
218
+ "node_modules/is-fullwidth-code-point": {
219
+ "version": "3.0.0",
220
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
221
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
222
+ "dev": true,
223
+ "license": "MIT",
224
+ "engines": {
225
+ "node": ">=8"
226
+ }
227
+ },
228
+ "node_modules/isarray": {
229
+ "version": "0.0.1",
230
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
231
+ "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
232
+ "dev": true,
233
+ "license": "MIT"
234
+ },
235
+ "node_modules/minimatch": {
236
+ "version": "3.1.2",
237
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
238
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
239
+ "dev": true,
240
+ "license": "ISC",
241
+ "dependencies": {
242
+ "brace-expansion": "^1.1.7"
243
+ },
244
+ "engines": {
245
+ "node": "*"
246
+ }
247
+ },
248
+ "node_modules/mkdirp": {
249
+ "version": "1.0.4",
250
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
251
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
252
+ "dev": true,
253
+ "license": "MIT",
254
+ "bin": {
255
+ "mkdirp": "bin/cmd.js"
256
+ },
257
+ "engines": {
258
+ "node": ">=10"
259
+ }
260
+ },
261
+ "node_modules/noms": {
262
+ "version": "0.0.0",
263
+ "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz",
264
+ "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==",
265
+ "dev": true,
266
+ "license": "ISC",
267
+ "dependencies": {
268
+ "inherits": "^2.0.1",
269
+ "readable-stream": "~1.0.31"
270
+ }
271
+ },
272
+ "node_modules/once": {
273
+ "version": "1.4.0",
274
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
275
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
276
+ "dev": true,
277
+ "license": "ISC",
278
+ "dependencies": {
279
+ "wrappy": "1"
280
+ }
281
+ },
282
+ "node_modules/path-is-absolute": {
283
+ "version": "1.0.1",
284
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
285
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
286
+ "dev": true,
287
+ "license": "MIT",
288
+ "engines": {
289
+ "node": ">=0.10.0"
290
+ }
291
+ },
292
+ "node_modules/process-nextick-args": {
293
+ "version": "2.0.1",
294
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
295
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
296
+ "dev": true,
297
+ "license": "MIT"
298
+ },
299
+ "node_modules/readable-stream": {
300
+ "version": "1.0.34",
301
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
302
+ "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
303
+ "dev": true,
304
+ "license": "MIT",
305
+ "dependencies": {
306
+ "core-util-is": "~1.0.0",
307
+ "inherits": "~2.0.1",
308
+ "isarray": "0.0.1",
309
+ "string_decoder": "~0.10.x"
310
+ }
311
+ },
312
+ "node_modules/require-directory": {
313
+ "version": "2.1.1",
314
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
315
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
316
+ "dev": true,
317
+ "license": "MIT",
318
+ "engines": {
319
+ "node": ">=0.10.0"
320
+ }
321
+ },
322
+ "node_modules/safe-buffer": {
323
+ "version": "5.1.2",
324
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
325
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
326
+ "dev": true,
327
+ "license": "MIT"
328
+ },
329
+ "node_modules/string_decoder": {
330
+ "version": "0.10.31",
331
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
332
+ "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
333
+ "dev": true,
334
+ "license": "MIT"
335
+ },
336
+ "node_modules/string-width": {
337
+ "version": "4.2.3",
338
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
339
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
340
+ "dev": true,
341
+ "license": "MIT",
342
+ "dependencies": {
343
+ "emoji-regex": "^8.0.0",
344
+ "is-fullwidth-code-point": "^3.0.0",
345
+ "strip-ansi": "^6.0.1"
346
+ },
347
+ "engines": {
348
+ "node": ">=8"
349
+ }
350
+ },
351
+ "node_modules/strip-ansi": {
352
+ "version": "6.0.1",
353
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
354
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
355
+ "dev": true,
356
+ "license": "MIT",
357
+ "dependencies": {
358
+ "ansi-regex": "^5.0.1"
359
+ },
360
+ "engines": {
361
+ "node": ">=8"
362
+ }
363
+ },
364
+ "node_modules/through2": {
365
+ "version": "2.0.5",
366
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
367
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
368
+ "dev": true,
369
+ "license": "MIT",
370
+ "dependencies": {
371
+ "readable-stream": "~2.3.6",
372
+ "xtend": "~4.0.1"
373
+ }
374
+ },
375
+ "node_modules/through2/node_modules/isarray": {
376
+ "version": "1.0.0",
377
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
378
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
379
+ "dev": true,
380
+ "license": "MIT"
381
+ },
382
+ "node_modules/through2/node_modules/readable-stream": {
383
+ "version": "2.3.8",
384
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
385
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
386
+ "dev": true,
387
+ "license": "MIT",
388
+ "dependencies": {
389
+ "core-util-is": "~1.0.0",
390
+ "inherits": "~2.0.3",
391
+ "isarray": "~1.0.0",
392
+ "process-nextick-args": "~2.0.0",
393
+ "safe-buffer": "~5.1.1",
394
+ "string_decoder": "~1.1.1",
395
+ "util-deprecate": "~1.0.1"
396
+ }
397
+ },
398
+ "node_modules/through2/node_modules/string_decoder": {
399
+ "version": "1.1.1",
400
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
401
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
402
+ "dev": true,
403
+ "license": "MIT",
404
+ "dependencies": {
405
+ "safe-buffer": "~5.1.0"
406
+ }
407
+ },
408
+ "node_modules/untildify": {
409
+ "version": "4.0.0",
410
+ "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
411
+ "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
412
+ "dev": true,
413
+ "license": "MIT",
414
+ "engines": {
415
+ "node": ">=8"
416
+ }
417
+ },
418
+ "node_modules/util-deprecate": {
419
+ "version": "1.0.2",
420
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
421
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
422
+ "dev": true,
423
+ "license": "MIT"
424
+ },
425
+ "node_modules/wrap-ansi": {
426
+ "version": "7.0.0",
427
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
428
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
429
+ "dev": true,
430
+ "license": "MIT",
431
+ "dependencies": {
432
+ "ansi-styles": "^4.0.0",
433
+ "string-width": "^4.1.0",
434
+ "strip-ansi": "^6.0.0"
435
+ },
436
+ "engines": {
437
+ "node": ">=10"
438
+ },
439
+ "funding": {
440
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
441
+ }
442
+ },
443
+ "node_modules/wrappy": {
444
+ "version": "1.0.2",
445
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
446
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
447
+ "dev": true,
448
+ "license": "ISC"
449
+ },
450
+ "node_modules/xtend": {
451
+ "version": "4.0.2",
452
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
453
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
454
+ "dev": true,
455
+ "license": "MIT",
456
+ "engines": {
457
+ "node": ">=0.4"
458
+ }
459
+ },
460
+ "node_modules/y18n": {
461
+ "version": "5.0.8",
462
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
463
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
464
+ "dev": true,
465
+ "license": "ISC",
466
+ "engines": {
467
+ "node": ">=10"
468
+ }
469
+ },
470
+ "node_modules/yargs": {
471
+ "version": "16.2.0",
472
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
473
+ "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
474
+ "dev": true,
475
+ "license": "MIT",
476
+ "dependencies": {
477
+ "cliui": "^7.0.2",
478
+ "escalade": "^3.1.1",
479
+ "get-caller-file": "^2.0.5",
480
+ "require-directory": "^2.1.1",
481
+ "string-width": "^4.2.0",
482
+ "y18n": "^5.0.5",
483
+ "yargs-parser": "^20.2.2"
484
+ },
485
+ "engines": {
486
+ "node": ">=10"
487
+ }
488
+ },
489
+ "node_modules/yargs-parser": {
490
+ "version": "20.2.9",
491
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
492
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
493
+ "dev": true,
494
+ "license": "ISC",
495
+ "engines": {
496
+ "node": ">=10"
497
+ }
498
+ }
499
+ }
500
+ }
package.json CHANGED
@@ -5,11 +5,15 @@
5
  "description": "static html page for Agentic Stack JS demo",
6
  "main": "index.js",
7
  "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1"
 
9
  },
10
  "author": "",
11
  "license": "ISC",
12
  "dependencies": {
13
  "agentic-stack-js-web-components": "^1.0.6"
 
 
 
14
  }
15
  }
 
5
  "description": "static html page for Agentic Stack JS demo",
6
  "main": "index.js",
7
  "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "build": "copyfiles -f ./node_modules/agentic-stack-js-web-components/dist/*.js ./dist/assests/js/"
10
  },
11
  "author": "",
12
  "license": "ISC",
13
  "dependencies": {
14
  "agentic-stack-js-web-components": "^1.0.6"
15
+ },
16
+ "devDependencies": {
17
+ "copyfiles": "^2.4.1"
18
  }
19
  }
src/index.html ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width" />
6
+ <title>My static Space</title>
7
+ <link rel="stylesheet" href="style.css" />
8
+
9
+ <script type="module" src="/js/agenticstack.js"></script>
10
+
11
+ </head>
12
+ <body>
13
+ <div class="card">
14
+ <h1>Welcome Agentic Stack JS</h1>
15
+ <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
16
+ <p>
17
+ Also don't forget to check the
18
+ <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
19
+ </p>
20
+ </div>
21
+ </body>
22
+ </html>