neoagent 2.1.18-beta.0 → 2.1.18-beta.10

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.
Files changed (59) hide show
  1. package/.env.example +121 -12
  2. package/docs/configuration.md +34 -5
  3. package/lib/manager.js +152 -19
  4. package/package.json +2 -1
  5. package/server/db/database.js +196 -2
  6. package/server/guest_agent.js +233 -0
  7. package/server/http/routes.js +20 -1
  8. package/server/index.js +18 -1
  9. package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
  10. package/server/public/flutter_bootstrap.js +1 -1
  11. package/server/public/main.dart.js +68207 -67266
  12. package/server/routes/android.js +4 -0
  13. package/server/routes/artifacts.js +47 -0
  14. package/server/routes/auth.js +24 -6
  15. package/server/routes/browser.js +9 -2
  16. package/server/routes/integrations.js +43 -5
  17. package/server/routes/mcp.js +22 -11
  18. package/server/routes/memory.js +57 -0
  19. package/server/routes/settings.js +81 -6
  20. package/server/services/ai/capabilityHealth.js +99 -23
  21. package/server/services/ai/engine.js +15 -30
  22. package/server/services/ai/models.js +14 -24
  23. package/server/services/ai/settings.js +0 -4
  24. package/server/services/ai/systemPrompt.js +5 -0
  25. package/server/services/ai/toolRunner.js +15 -3
  26. package/server/services/ai/tools.js +69 -26
  27. package/server/services/android/controller.js +46 -6
  28. package/server/services/artifacts/store.js +147 -0
  29. package/server/services/browser/controller.js +33 -5
  30. package/server/services/integrations/env.js +44 -10
  31. package/server/services/integrations/figma/provider.js +117 -0
  32. package/server/services/integrations/google/calendar.js +10 -2
  33. package/server/services/integrations/google/docs.js +45 -21
  34. package/server/services/integrations/google/drive.js +62 -14
  35. package/server/services/integrations/google/gmail.js +17 -5
  36. package/server/services/integrations/google/provider.js +329 -65
  37. package/server/services/integrations/google/sheets.js +71 -63
  38. package/server/services/integrations/manager.js +228 -71
  39. package/server/services/integrations/microsoft/provider.js +139 -0
  40. package/server/services/integrations/notion/provider.js +105 -0
  41. package/server/services/integrations/oauth_provider.js +315 -0
  42. package/server/services/integrations/registry.js +11 -1
  43. package/server/services/integrations/secrets.js +57 -0
  44. package/server/services/integrations/slack/provider.js +110 -0
  45. package/server/services/manager.js +78 -11
  46. package/server/services/mcp/client.js +5 -3
  47. package/server/services/memory/manager.js +32 -5
  48. package/server/services/memory/policy.js +67 -0
  49. package/server/services/runtime/backends/host.js +37 -0
  50. package/server/services/runtime/backends/local-vm.js +359 -0
  51. package/server/services/runtime/backends/remote.js +53 -0
  52. package/server/services/runtime/manager.js +98 -0
  53. package/server/services/runtime/mcp.js +18 -0
  54. package/server/services/runtime/qemu.js +391 -0
  55. package/server/services/runtime/settings.js +213 -0
  56. package/server/services/runtime/validation.js +63 -0
  57. package/server/services/websocket.js +6 -1
  58. package/server/utils/deployment.js +97 -0
  59. package/server/utils/version.js +8 -0
package/.env.example CHANGED
@@ -1,17 +1,55 @@
1
+ ########################################
2
+ # Core runtime
3
+ ########################################
4
+
1
5
  PORT=3333
2
- NODE_ENV=development
6
+ NODE_ENV=production
3
7
  SESSION_SECRET=change-this-to-a-random-secret-in-production
4
8
 
5
- # Comma-separated list of allowed CORS origins (leave empty to block all cross-origin requests)
6
- # Example: ALLOWED_ORIGINS=http://localhost:3333,https://yourdomain.com
9
+ # Public base URL used for OAuth callbacks and external links.
10
+ # Example: https://agent.example.com
11
+ PUBLIC_URL=
12
+
13
+ # Set true when running behind HTTPS or a TLS-terminating proxy.
14
+ SECURE_COOKIES=false
15
+
16
+ # Use `managed` for SaaS-style deployments to hide self-update controls in the UI.
17
+ NEOAGENT_DEPLOYMENT_MODE=self_hosted
18
+
19
+ # Deployment profile:
20
+ # private -> single-user / trusted host runtime
21
+ # prod -> multi-user / isolated per-user VM runtime
22
+ NEOAGENT_PROFILE=private
23
+
24
+ # VM runtime settings used by `prod`.
25
+ # Set these before switching NEOAGENT_PROFILE=prod.
26
+ # The app can cache a shared base image automatically from a URL, then create
27
+ # lightweight per-user qcow2 overlays on top of it.
28
+ # For Apple Silicon / arm64 hosts, switch this to:
29
+ # https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img
30
+ NEOAGENT_VM_BASE_IMAGE_URL=https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img
31
+
32
+ # Optional local override. If set, this takes precedence over the download URL.
33
+ NEOAGENT_VM_BASE_IMAGE=
34
+
35
+ # The guest image must boot a Linux guest that runs `npm run start:guest-agent`
36
+ # and exposes the guest agent on port 8421.
37
+ # Replace this placeholder before using NEOAGENT_PROFILE=prod.
38
+ # Example: openssl rand -hex 32
39
+ NEOAGENT_VM_GUEST_TOKEN=change-this-guest-token-before-prod
40
+ NEOAGENT_VM_MEMORY_MB=4096
41
+ NEOAGENT_VM_CPUS=2
42
+
43
+ # Self-hosted release track used by `neoagent update`.
44
+ NEOAGENT_RELEASE_CHANNEL=stable
45
+
46
+ # Comma-separated list of allowed CORS origins.
47
+ # Example: http://localhost:3333,https://yourdomain.com
7
48
  ALLOWED_ORIGINS=
8
49
 
9
- # xAI API key — used for:
10
- # Main AI reasoning (grok-4-1-fast-reasoning — all agent tasks and conversations)
11
- # • Image generation (grok-imagine-image — generate_image tool)
12
- # • Image vision / analysis (grok-4-1-fast-reasoning has native image input — analyze_image tool, incoming WhatsApp photos)
13
- # Get your key at: https://console.x.ai
14
- XAI_API_KEY=your-xai-api-key-here
50
+ ########################################
51
+ # Hosted AI providers
52
+ ########################################
15
53
 
16
54
  # OpenAI API key — used for:
17
55
  # • Semantic memory embeddings (text-embedding-3-small, 1536 dims)
@@ -22,16 +60,74 @@ XAI_API_KEY=your-xai-api-key-here
22
60
  # Get your key at: https://platform.openai.com/api-keys
23
61
  OPENAI_API_KEY=your-openai-api-key-here
24
62
 
63
+ # Anthropic API key — used for:
64
+ # • Claude models for long-context drafting and analysis
65
+ ANTHROPIC_API_KEY=your-anthropic-api-key-here
66
+
67
+ # xAI API key — used for:
68
+ # • Main AI reasoning (grok-4-1-fast-reasoning — all agent tasks and conversations)
69
+ # • Image generation (grok-imagine-image — generate_image tool)
70
+ # • Image vision / analysis (grok-4-1-fast-reasoning has native image input — analyze_image tool, incoming WhatsApp photos)
71
+ # Get your key at: https://console.x.ai
72
+ XAI_API_KEY=your-xai-api-key-here
73
+
25
74
  # Google AI Studio API key — used for:
26
75
  # • Gemini models (e.g. gemini-3.1-flash-lite-preview)
27
76
  # Get your key at: https://aistudio.google.com/app/apikey
28
77
  GOOGLE_AI_KEY=your-google-ai-key-here
29
78
 
30
- # Google Workspace official integration OAuth client
31
- # Redirect URI should match ${PUBLIC_URL:-http://localhost:3333}/api/integrations/oauth/callback
79
+ # MiniMax Coding Plan API key — used for:
80
+ # MiniMax-M2.7 via the Anthropic-compatible MiniMax endpoint
81
+ MINIMAX_API_KEY=your-minimax-api-key-here
82
+
83
+ ########################################
84
+ # Provider endpoint overrides
85
+ ########################################
86
+
87
+ # OPENAI_BASE_URL=https://your-openai-compatible-endpoint/v1
88
+ # ANTHROPIC_BASE_URL=https://your-anthropic-compatible-endpoint
89
+ # XAI_BASE_URL=https://api.x.ai/v1
90
+
91
+ ########################################
92
+ # Official integrations
93
+ ########################################
94
+
95
+ # Google Workspace official integration OAuth client.
96
+ # Redirect URI should match <PUBLIC_URL>/api/integrations/oauth/callback.
97
+ # Set PUBLIC_URL to your app's public base URL. Local default is http://localhost:3333.
32
98
  GOOGLE_OAUTH_CLIENT_ID=your-google-oauth-client-id
33
99
  GOOGLE_OAUTH_CLIENT_SECRET=your-google-oauth-client-secret
34
- # GOOGLE_OAUTH_REDIRECT_URI=http://localhost:3333/api/integrations/oauth/callback
100
+ GOOGLE_OAUTH_REDIRECT_URI=
101
+
102
+ # Notion official integration OAuth client.
103
+ # Redirect URI should match <PUBLIC_URL>/api/integrations/oauth/callback.
104
+ NOTION_OAUTH_CLIENT_ID=your-notion-oauth-client-id
105
+ NOTION_OAUTH_CLIENT_SECRET=your-notion-oauth-client-secret
106
+ NOTION_OAUTH_REDIRECT_URI=
107
+
108
+ # Microsoft 365 official integration OAuth client.
109
+ # Redirect URI should match <PUBLIC_URL>/api/integrations/oauth/callback.
110
+ # Leave tenant ID as `common` for a multi-tenant app, or set a specific Entra tenant ID.
111
+ MICROSOFT_OAUTH_CLIENT_ID=your-microsoft-oauth-client-id
112
+ MICROSOFT_OAUTH_CLIENT_SECRET=your-microsoft-oauth-client-secret
113
+ MICROSOFT_OAUTH_REDIRECT_URI=
114
+ MICROSOFT_OAUTH_TENANT_ID=common
115
+
116
+ # Slack official integration OAuth client.
117
+ # Redirect URI should match <PUBLIC_URL>/api/integrations/oauth/callback.
118
+ SLACK_OAUTH_CLIENT_ID=your-slack-oauth-client-id
119
+ SLACK_OAUTH_CLIENT_SECRET=your-slack-oauth-client-secret
120
+ SLACK_OAUTH_REDIRECT_URI=
121
+
122
+ # Figma official integration OAuth client.
123
+ # Redirect URI should match <PUBLIC_URL>/api/integrations/oauth/callback.
124
+ FIGMA_OAUTH_CLIENT_ID=your-figma-oauth-client-id
125
+ FIGMA_OAUTH_CLIENT_SECRET=your-figma-oauth-client-secret
126
+ FIGMA_OAUTH_REDIRECT_URI=
127
+
128
+ ########################################
129
+ # Tools and media services
130
+ ########################################
35
131
 
36
132
  # Brave Search API key — used for:
37
133
  # • Native web_search tool (search the web without driving the browser)
@@ -43,5 +139,18 @@ BRAVE_SEARCH_API_KEY=your-brave-search-api-key-here
43
139
  # Without this key: recordings can still be captured and stored, but transcription will fail until retried with a valid key.
44
140
  # Get your key at: https://console.deepgram.com/
45
141
  DEEPGRAM_API_KEY=your-deepgram-api-key-here
142
+ DEEPGRAM_BASE_URL=https://api.deepgram.com
46
143
  DEEPGRAM_MODEL=nova-3
47
144
  DEEPGRAM_LANGUAGE=multi
145
+
146
+ ########################################
147
+ # Local model runtime
148
+ ########################################
149
+
150
+ OLLAMA_URL=http://localhost:11434
151
+
152
+ ########################################
153
+ # Messaging and voice integrations
154
+ ########################################
155
+
156
+ TELNYX_WEBHOOK_TOKEN=
@@ -1,6 +1,6 @@
1
1
  # Configuration
2
2
 
3
- All settings live in `~/.neoagent/.env` by default. Run `neoagent setup` to regenerate interactively. If a self-edit or local install issue leaves NeoAgent broken, `neoagent fix` will back up `~/.neoagent`, repair the installation, and restart the service.
3
+ All settings live in `~/.neoagent/.env` by default. Run `neoagent setup` to regenerate interactively. AI provider credentials are configured through the server environment or `neoagent setup`, not through the web UI. If a self-edit or local install issue leaves NeoAgent broken, rerun setup or restore the env file and restart the service.
4
4
  You can override the runtime root with `NEOAGENT_HOME`.
5
5
 
6
6
  ## Variables
@@ -10,31 +10,60 @@ You can override the runtime root with `NEOAGENT_HOME`.
10
10
  | Variable | Default | Description |
11
11
  |---|---|---|
12
12
  | `PORT` | `3333` | HTTP port |
13
+ | `PUBLIC_URL` | *(optional)* | Public base URL used for callbacks and external links |
13
14
  | `SESSION_SECRET` | *(required)* | Random string for session signing — generate with `openssl rand -hex 32` |
14
15
  | `NODE_ENV` | `production` | Set to `development` to enable verbose logs |
15
16
  | `SECURE_COOKIES` | `false` | Set `true` when behind a TLS-terminating proxy |
16
17
  | `ALLOWED_ORIGINS` | *(none)* | Comma-separated CORS origins, e.g. `https://example.com` |
18
+ | `NEOAGENT_DEPLOYMENT_MODE` | `self_hosted` | `self_hosted` enables in-app update controls; `managed` hides operator-only controls for SaaS deployments |
19
+ | `NEOAGENT_RELEASE_CHANNEL` | `stable` | Release track used by the self-hosted updater |
17
20
 
18
21
  ### AI Providers
19
22
 
20
- At least one API key is required. The active provider and model are configured in the Flutter app.
23
+ At least one hosted-provider API key is required unless you only use local Ollama. The active provider and model routing are configured in the Flutter app; credentials stay in server-side config.
21
24
 
22
25
  | Variable | Provider |
23
26
  |---|---|
24
27
  | `ANTHROPIC_API_KEY` | Claude (Anthropic) |
25
28
  | `OPENAI_API_KEY` | GPT-4o / Whisper (OpenAI) |
26
29
  | `XAI_API_KEY` | Grok (xAI) |
30
+ | `XAI_BASE_URL` | Optional xAI-compatible base URL override |
27
31
  | `GOOGLE_AI_KEY` | Gemini (Google) |
28
- | `GOOGLE_OAUTH_CLIENT_ID` | Google Workspace official integrations OAuth client ID |
29
- | `GOOGLE_OAUTH_CLIENT_SECRET` | Google Workspace official integrations OAuth client secret |
30
- | `GOOGLE_OAUTH_REDIRECT_URI` | Optional override for the Google Workspace OAuth callback URL |
31
32
  | `MINIMAX_API_KEY` | MiniMax Code (Coding Plan / Token Plan for `MiniMax-M2.7`) |
32
33
  | `BRAVE_SEARCH_API_KEY` | Brave Search API for the native `web_search` tool |
34
+ | `OPENAI_BASE_URL` | Optional OpenAI-compatible base URL override |
35
+ | `ANTHROPIC_BASE_URL` | Optional Anthropic-compatible base URL override |
33
36
  | `DEEPGRAM_API_KEY` | Recordings transcription with Deepgram Nova-3 multilingual |
37
+ | `DEEPGRAM_BASE_URL` | Optional Deepgram API base URL override |
34
38
  | `DEEPGRAM_MODEL` | Deepgram speech model override (defaults to `nova-3`) |
35
39
  | `DEEPGRAM_LANGUAGE` | Deepgram language override (defaults to `multi`) |
36
40
  | `OLLAMA_URL` | Local Ollama (`http://localhost:11434`) |
37
41
 
42
+ ### Official Integrations
43
+
44
+ All official integration OAuth callbacks default to `PUBLIC_URL + /api/integrations/oauth/callback` unless you override the provider-specific redirect URI.
45
+
46
+ | Variable | Description |
47
+ |---|---|
48
+ | `GOOGLE_OAUTH_CLIENT_ID` | Google Workspace official integrations OAuth client ID |
49
+ | `GOOGLE_OAUTH_CLIENT_SECRET` | Google Workspace official integrations OAuth client secret |
50
+ | `GOOGLE_OAUTH_REDIRECT_URI` | Optional override for the Google Workspace OAuth callback URL |
51
+ | `NOTION_OAUTH_CLIENT_ID` | Notion official integrations OAuth client ID |
52
+ | `NOTION_OAUTH_CLIENT_SECRET` | Notion official integrations OAuth client secret |
53
+ | `NOTION_OAUTH_REDIRECT_URI` | Optional override for the Notion OAuth callback URL |
54
+ | `MICROSOFT_OAUTH_CLIENT_ID` | Microsoft 365 official integrations OAuth client ID |
55
+ | `MICROSOFT_OAUTH_CLIENT_SECRET` | Microsoft 365 official integrations OAuth client secret |
56
+ | `MICROSOFT_OAUTH_REDIRECT_URI` | Optional override for the Microsoft 365 OAuth callback URL |
57
+ | `MICROSOFT_OAUTH_TENANT_ID` | Optional Entra tenant selector (`common` by default) |
58
+ | `SLACK_OAUTH_CLIENT_ID` | Slack official integrations OAuth client ID |
59
+ | `SLACK_OAUTH_CLIENT_SECRET` | Slack official integrations OAuth client secret |
60
+ | `SLACK_OAUTH_REDIRECT_URI` | Optional override for the Slack OAuth callback URL |
61
+ | `FIGMA_OAUTH_CLIENT_ID` | Figma official integrations OAuth client ID |
62
+ | `FIGMA_OAUTH_CLIENT_SECRET` | Figma official integrations OAuth client secret |
63
+ | `FIGMA_OAUTH_REDIRECT_URI` | Optional override for the Figma OAuth callback URL |
64
+
65
+ OAuth client secrets such as `GOOGLE_OAUTH_CLIENT_SECRET`, `NOTION_OAUTH_CLIENT_SECRET`, `MICROSOFT_OAUTH_CLIENT_SECRET`, `SLACK_OAUTH_CLIENT_SECRET`, and `FIGMA_OAUTH_CLIENT_SECRET` are sensitive, just like `SESSION_SECRET`. Do not commit them to version control, print them to logs, or expose them in client-side code. Store them in server-side environment variables or a secrets manager, restrict access to operators who need them, and rotate them immediately if you suspect they were exposed.
66
+
38
67
  ### Messaging
39
68
 
40
69
  | Variable | Description |
package/lib/manager.js CHANGED
@@ -31,6 +31,7 @@ const {
31
31
  choosePreferredBranchForChannel,
32
32
  choosePreferredNpmTagForChannel,
33
33
  } = require('../runtime/release_channel');
34
+ const { parseDeploymentMode } = require('../server/utils/deployment');
34
35
 
35
36
  const APP_NAME = 'NeoAgent';
36
37
  const SERVICE_LABEL = 'com.neoagent';
@@ -417,43 +418,175 @@ async function ask(question, fallback = '') {
417
418
  });
418
419
  }
419
420
 
421
+ async function askSecret(question, currentValue = '') {
422
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
423
+ return new Promise((resolve) => {
424
+ const suffix = currentValue ? ' [configured]' : '';
425
+ rl.question(` ? ${question}${suffix}: `, (answer) => {
426
+ rl.close();
427
+ const trimmed = answer.trim();
428
+ resolve(trimmed || currentValue);
429
+ });
430
+ });
431
+ }
432
+
420
433
  async function cmdSetup() {
421
434
  heading('Environment Setup');
422
435
  ensureRuntimeDirs();
423
436
 
424
- const current = {};
425
- if (fs.existsSync(ENV_FILE)) {
426
- const lines = fs.readFileSync(ENV_FILE, 'utf8').split('\n');
427
- for (const line of lines) {
428
- if (!line || line.startsWith('#') || !line.includes('=')) continue;
429
- const idx = line.indexOf('=');
430
- const key = line.slice(0, idx).trim();
431
- const value = line.slice(idx + 1).trim();
432
- current[key] = value;
433
- }
434
- }
437
+ const current = Object.fromEntries(parseEnv(readEnvFileRaw()).entries());
438
+
439
+ logInfo('Press Enter to keep the current value shown in brackets.');
435
440
 
441
+ heading('Core');
436
442
  const port = await ask('Server port', current.PORT || '3333');
437
- const sessionSecret = await ask('Session secret', current.SESSION_SECRET || randomSecret());
438
- const anthropic = await ask('Anthropic API key', current.ANTHROPIC_API_KEY || '');
439
- const openai = await ask('OpenAI API key', current.OPENAI_API_KEY || '');
440
- const xai = await ask('xAI API key', current.XAI_API_KEY || '');
441
- const google = await ask('Google API key', current.GOOGLE_AI_KEY || '');
442
- const minimax = await ask('MiniMax Code key', current.MINIMAX_API_KEY || '');
443
- const brave = await ask('Brave Search API key', current.BRAVE_SEARCH_API_KEY || '');
444
- const ollama = await ask('Ollama URL', current.OLLAMA_URL || 'http://localhost:11434');
443
+ const publicUrl = await ask('Public base URL', current.PUBLIC_URL || '');
444
+ const secureCookiesDefault = current.SECURE_COOKIES ||
445
+ (String(publicUrl || '').trim().startsWith('https://') ? 'true' : 'false');
446
+ const secureCookies = await ask('Secure cookies (true/false)', secureCookiesDefault);
447
+ const sessionSecret = await askSecret('Session secret', current.SESSION_SECRET || randomSecret());
448
+ const deploymentMode = await ask(
449
+ 'Deployment mode (self_hosted/managed)',
450
+ current.NEOAGENT_DEPLOYMENT_MODE || 'self_hosted'
451
+ );
452
+ const releaseChannel = await ask(
453
+ 'Release channel (stable/beta)',
454
+ current.NEOAGENT_RELEASE_CHANNEL || 'stable'
455
+ );
445
456
  const origins = await ask('Allowed CORS origins', current.ALLOWED_ORIGINS || '');
446
457
 
458
+ heading('AI Providers');
459
+ const anthropic = await askSecret('Anthropic API key', current.ANTHROPIC_API_KEY || '');
460
+ const anthropicBaseUrl = await ask('Anthropic base URL', current.ANTHROPIC_BASE_URL || '');
461
+ const openai = await askSecret('OpenAI API key', current.OPENAI_API_KEY || '');
462
+ const openaiBaseUrl = await ask('OpenAI base URL', current.OPENAI_BASE_URL || '');
463
+ const xai = await askSecret('xAI API key', current.XAI_API_KEY || '');
464
+ const xaiBaseUrl = await ask('xAI base URL', current.XAI_BASE_URL || 'https://api.x.ai/v1');
465
+ const google = await askSecret('Google API key', current.GOOGLE_AI_KEY || '');
466
+ const minimax = await askSecret('MiniMax Code key', current.MINIMAX_API_KEY || '');
467
+ const brave = await askSecret('Brave Search API key', current.BRAVE_SEARCH_API_KEY || '');
468
+ const ollama = await ask('Ollama URL', current.OLLAMA_URL || 'http://localhost:11434');
469
+
470
+ heading('Official Integrations');
471
+ const googleOauthClientId = await askSecret(
472
+ 'Google OAuth client ID',
473
+ current.GOOGLE_OAUTH_CLIENT_ID || ''
474
+ );
475
+ const googleOauthClientSecret = await askSecret(
476
+ 'Google OAuth client secret',
477
+ current.GOOGLE_OAUTH_CLIENT_SECRET || ''
478
+ );
479
+ const googleOauthRedirectUri = await ask(
480
+ 'Google OAuth redirect URI',
481
+ current.GOOGLE_OAUTH_REDIRECT_URI || ''
482
+ );
483
+ const notionOauthClientId = await askSecret(
484
+ 'Notion OAuth client ID',
485
+ current.NOTION_OAUTH_CLIENT_ID || ''
486
+ );
487
+ const notionOauthClientSecret = await askSecret(
488
+ 'Notion OAuth client secret',
489
+ current.NOTION_OAUTH_CLIENT_SECRET || ''
490
+ );
491
+ const notionOauthRedirectUri = await ask(
492
+ 'Notion OAuth redirect URI',
493
+ current.NOTION_OAUTH_REDIRECT_URI || ''
494
+ );
495
+ const microsoftOauthClientId = await askSecret(
496
+ 'Microsoft 365 OAuth client ID',
497
+ current.MICROSOFT_OAUTH_CLIENT_ID || ''
498
+ );
499
+ const microsoftOauthClientSecret = await askSecret(
500
+ 'Microsoft 365 OAuth client secret',
501
+ current.MICROSOFT_OAUTH_CLIENT_SECRET || ''
502
+ );
503
+ const microsoftOauthRedirectUri = await ask(
504
+ 'Microsoft 365 OAuth redirect URI',
505
+ current.MICROSOFT_OAUTH_REDIRECT_URI || ''
506
+ );
507
+ const microsoftOauthTenantId = await ask(
508
+ 'Microsoft 365 OAuth tenant ID',
509
+ current.MICROSOFT_OAUTH_TENANT_ID || 'common'
510
+ );
511
+ const slackOauthClientId = await askSecret(
512
+ 'Slack OAuth client ID',
513
+ current.SLACK_OAUTH_CLIENT_ID || ''
514
+ );
515
+ const slackOauthClientSecret = await askSecret(
516
+ 'Slack OAuth client secret',
517
+ current.SLACK_OAUTH_CLIENT_SECRET || ''
518
+ );
519
+ const slackOauthRedirectUri = await ask(
520
+ 'Slack OAuth redirect URI',
521
+ current.SLACK_OAUTH_REDIRECT_URI || ''
522
+ );
523
+ const figmaOauthClientId = await askSecret(
524
+ 'Figma OAuth client ID',
525
+ current.FIGMA_OAUTH_CLIENT_ID || ''
526
+ );
527
+ const figmaOauthClientSecret = await askSecret(
528
+ 'Figma OAuth client secret',
529
+ current.FIGMA_OAUTH_CLIENT_SECRET || ''
530
+ );
531
+ const figmaOauthRedirectUri = await ask(
532
+ 'Figma OAuth redirect URI',
533
+ current.FIGMA_OAUTH_REDIRECT_URI || ''
534
+ );
535
+
536
+ heading('Voice And Recording');
537
+ const deepgramApiKey = await askSecret('Deepgram API key', current.DEEPGRAM_API_KEY || '');
538
+ const deepgramBaseUrl = await ask(
539
+ 'Deepgram base URL',
540
+ current.DEEPGRAM_BASE_URL || 'https://api.deepgram.com'
541
+ );
542
+ const deepgramModel = await ask('Deepgram model', current.DEEPGRAM_MODEL || 'nova-3');
543
+ const deepgramLanguage = await ask('Deepgram language', current.DEEPGRAM_LANGUAGE || 'multi');
544
+ const telnyxWebhookToken = await askSecret(
545
+ 'Telnyx webhook token',
546
+ current.TELNYX_WEBHOOK_TOKEN || ''
547
+ );
548
+ const normalizedSecureCookies = String(secureCookies || '').trim().toLowerCase() === 'true' ? 'true' : 'false';
549
+ const normalizedDeploymentMode = parseDeploymentMode(deploymentMode);
550
+ const normalizedReleaseChannel = parseReleaseChannel(releaseChannel) || 'stable';
551
+
447
552
  const lines = [
448
553
  `NODE_ENV=production`,
449
554
  `PORT=${port}`,
555
+ publicUrl ? `PUBLIC_URL=${publicUrl}` : '',
556
+ `SECURE_COOKIES=${normalizedSecureCookies}`,
450
557
  `SESSION_SECRET=${sessionSecret}`,
558
+ `NEOAGENT_DEPLOYMENT_MODE=${normalizedDeploymentMode}`,
559
+ `NEOAGENT_RELEASE_CHANNEL=${normalizedReleaseChannel}`,
451
560
  anthropic ? `ANTHROPIC_API_KEY=${anthropic}` : '',
561
+ anthropicBaseUrl ? `ANTHROPIC_BASE_URL=${anthropicBaseUrl}` : '',
452
562
  openai ? `OPENAI_API_KEY=${openai}` : '',
563
+ openaiBaseUrl ? `OPENAI_BASE_URL=${openaiBaseUrl}` : '',
453
564
  xai ? `XAI_API_KEY=${xai}` : '',
565
+ xaiBaseUrl ? `XAI_BASE_URL=${xaiBaseUrl}` : '',
454
566
  google ? `GOOGLE_AI_KEY=${google}` : '',
455
567
  minimax ? `MINIMAX_API_KEY=${minimax}` : '',
456
568
  brave ? `BRAVE_SEARCH_API_KEY=${brave}` : '',
569
+ googleOauthClientId ? `GOOGLE_OAUTH_CLIENT_ID=${googleOauthClientId}` : '',
570
+ googleOauthClientSecret ? `GOOGLE_OAUTH_CLIENT_SECRET=${googleOauthClientSecret}` : '',
571
+ googleOauthRedirectUri ? `GOOGLE_OAUTH_REDIRECT_URI=${googleOauthRedirectUri}` : '',
572
+ notionOauthClientId ? `NOTION_OAUTH_CLIENT_ID=${notionOauthClientId}` : '',
573
+ notionOauthClientSecret ? `NOTION_OAUTH_CLIENT_SECRET=${notionOauthClientSecret}` : '',
574
+ notionOauthRedirectUri ? `NOTION_OAUTH_REDIRECT_URI=${notionOauthRedirectUri}` : '',
575
+ microsoftOauthClientId ? `MICROSOFT_OAUTH_CLIENT_ID=${microsoftOauthClientId}` : '',
576
+ microsoftOauthClientSecret ? `MICROSOFT_OAUTH_CLIENT_SECRET=${microsoftOauthClientSecret}` : '',
577
+ microsoftOauthRedirectUri ? `MICROSOFT_OAUTH_REDIRECT_URI=${microsoftOauthRedirectUri}` : '',
578
+ microsoftOauthTenantId ? `MICROSOFT_OAUTH_TENANT_ID=${microsoftOauthTenantId}` : '',
579
+ slackOauthClientId ? `SLACK_OAUTH_CLIENT_ID=${slackOauthClientId}` : '',
580
+ slackOauthClientSecret ? `SLACK_OAUTH_CLIENT_SECRET=${slackOauthClientSecret}` : '',
581
+ slackOauthRedirectUri ? `SLACK_OAUTH_REDIRECT_URI=${slackOauthRedirectUri}` : '',
582
+ figmaOauthClientId ? `FIGMA_OAUTH_CLIENT_ID=${figmaOauthClientId}` : '',
583
+ figmaOauthClientSecret ? `FIGMA_OAUTH_CLIENT_SECRET=${figmaOauthClientSecret}` : '',
584
+ figmaOauthRedirectUri ? `FIGMA_OAUTH_REDIRECT_URI=${figmaOauthRedirectUri}` : '',
585
+ deepgramApiKey ? `DEEPGRAM_API_KEY=${deepgramApiKey}` : '',
586
+ deepgramBaseUrl ? `DEEPGRAM_BASE_URL=${deepgramBaseUrl}` : '',
587
+ deepgramModel ? `DEEPGRAM_MODEL=${deepgramModel}` : '',
588
+ deepgramLanguage ? `DEEPGRAM_LANGUAGE=${deepgramLanguage}` : '',
589
+ telnyxWebhookToken ? `TELNYX_WEBHOOK_TOKEN=${telnyxWebhookToken}` : '',
457
590
  ollama ? `OLLAMA_URL=${ollama}` : '',
458
591
  origins ? `ALLOWED_ORIGINS=${origins}` : ''
459
592
  ].filter(Boolean);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.1.18-beta.0",
3
+ "version": "2.1.18-beta.10",
4
4
  "description": "Proactive personal AI agent with no limits",
5
5
  "license": "MIT",
6
6
  "main": "server/index.js",
@@ -20,6 +20,7 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "start": "node server/index.js",
23
+ "start:guest-agent": "node server/guest_agent.js",
23
24
  "dev": "node --watch server/index.js",
24
25
  "dev:backend": "./dev/backend.sh",
25
26
  "dev:web": "./dev/web.sh",