stacks-ai 0.2.5 → 0.2.8

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  AI-powered infinite canvas workspace for notes, images, and creative organization.
4
4
 
5
+ Free to use for personal use, one-time license of $49 for unrestricted usage - bit.ly/4aNe23d
6
+
7
+ Please consider a license
8
+
5
9
  ## Features
6
10
 
7
11
  - Infinite canvas with zoom and pan
package/bin/stacks.cjs CHANGED
@@ -258,6 +258,40 @@ function stopRunningInstance() {
258
258
  return false
259
259
  }
260
260
 
261
+ // Proxy process management
262
+ let proxyProcess = null
263
+
264
+ function startProxy() {
265
+ try {
266
+ const proxyPath = path.join(APP_DIR, 'dist', 'mcp', 'proxy.js')
267
+ if (!fs.existsSync(proxyPath)) {
268
+ console.error('⚠️ MCP proxy not found. Run `npm run build` first.')
269
+ return
270
+ }
271
+
272
+ const nodeCmd = getNodeCommand()
273
+ proxyProcess = spawn(nodeCmd, [proxyPath], {
274
+ stdio: 'ignore',
275
+ detached: false
276
+ })
277
+
278
+ proxyProcess.on('error', (err) => {
279
+ console.error('MCP proxy error:', err.message)
280
+ })
281
+ } catch (err) {
282
+ console.error('Failed to start proxy:', err.message)
283
+ }
284
+ }
285
+
286
+ function stopProxy() {
287
+ if (proxyProcess) {
288
+ try {
289
+ proxyProcess.kill('SIGTERM')
290
+ proxyProcess = null
291
+ } catch {}
292
+ }
293
+ }
294
+
261
295
  async function launch() {
262
296
  try {
263
297
  console.log(`\n🚀 Starting Stacks...\n`)
@@ -1 +1 @@
1
- import{s as n}from"./index-CHhe65ps.js";import{c as s,o as g,a as y}from"./index-D0ZoqtYh.js";const a={},I=r=>{const e={anthropic:"anthropic-api-key",openai:"openai-api-key",google:"gemini-api-key"}[r],t=localStorage.getItem(e);return t||{anthropic:a==null?void 0:a.VITE_ANTHROPIC_API_KEY,openai:a==null?void 0:a.VITE_OPENAI_API_KEY,google:a==null?void 0:a.VITE_GEMINI_API_KEY}[r]||""},p=r=>{const o=r.apiKey||I(r.provider);if(!o)throw new Error(`${r.provider} API key not configured. Please add your API key in Settings → Providers.`);const e=localStorage.getItem("text-model");switch(r.provider){case"anthropic":return y(r.model||e||"claude-sonnet-4-5-20250929",{apiKey:o});case"openai":return g(r.model||e||"gpt-4o",{apiKey:o});case"google":return s({apiKey:o})(r.model||e||"gemini-2.0-flash-exp");default:throw new Error(`Unknown provider: ${r.provider}`)}},P=async(r,o,e)=>{const t=(e==null?void 0:e.provider)||"google",c=p({provider:t,model:e==null?void 0:e.model}),d=await n({model:c,system:e==null?void 0:e.systemPrompt,prompt:r});for await(const l of d.textStream)o(l)};export{P as generateTextStream,p as getLanguageModel};
1
+ import{s as n}from"./index-Bu15JuLn.js";import{c as s,o as g,a as y}from"./index-DuyFZj1M.js";const a={},I=r=>{const e={anthropic:"anthropic-api-key",openai:"openai-api-key",google:"gemini-api-key"}[r],t=localStorage.getItem(e);return t||{anthropic:a==null?void 0:a.VITE_ANTHROPIC_API_KEY,openai:a==null?void 0:a.VITE_OPENAI_API_KEY,google:a==null?void 0:a.VITE_GEMINI_API_KEY}[r]||""},p=r=>{const o=r.apiKey||I(r.provider);if(!o)throw new Error(`${r.provider} API key not configured. Please add your API key in Settings → Providers.`);const e=localStorage.getItem("text-model");switch(r.provider){case"anthropic":return y(r.model||e||"claude-sonnet-4-5-20250929",{apiKey:o});case"openai":return g(r.model||e||"gpt-4o",{apiKey:o});case"google":return s({apiKey:o})(r.model||e||"gemini-2.0-flash-exp");default:throw new Error(`Unknown provider: ${r.provider}`)}},P=async(r,o,e)=>{const t=(e==null?void 0:e.provider)||"google",c=p({provider:t,model:e==null?void 0:e.model}),d=await n({model:c,system:e==null?void 0:e.systemPrompt,prompt:r});for await(const l of d.textStream)o(l)};export{P as generateTextStream,p as getLanguageModel};