@naisys/erp 3.0.0-beta.34 → 3.0.0-beta.36

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.
@@ -45,7 +45,8 @@ object({
45
45
  imageModel: string().optional().describe("Model used for image generation"),
46
46
  mailEnabled: boolean().optional().describe("Show mail commands to the agent. Mail encourages verbose communication which can be distracting"),
47
47
  chatEnabled: boolean().optional().describe("Show chat commands to the agent. Chat encourages more concise communication"),
48
- webEnabled: boolean().optional().describe("Allow agent to browse the web with Lynx, a text based browser"),
48
+ webEnabled: boolean().optional().describe("Allow agent to browse the web with a context-optimized text browser built on Lynx. Javascript not supported. Requires `lynx` on the host (e.g. `apt install lynx`)"),
49
+ browserEnabled: boolean().optional().describe("Allow agent to browse the web with a real headless Chromium browser via Playwright. Vision-capable models see screenshots; others fall back to a text/selector mode. Requires `npx playwright install chromium` on the host"),
49
50
  completeSessionEnabled: boolean().optional().describe("Allow the agent to end its session. Once ended, it can only be restarted explicitly or via mail if wakeOnMessage is enabled. Disable on root agents to prevent the system from going unresponsive"),
50
51
  debugPauseSeconds: number().int("Must be a whole number").min(0, "Must be non-negative").optional().describe("Seconds to wait at the debug prompt before auto-continuing, only applies when the agent's console is in focus. Set to 0 to continue immediately. Unset waits indefinitely for manual input"),
51
52
  wakeOnMessage: boolean().optional().describe("When mail or chat is received, start the agent automatically, or wake it from its wait state"),
@@ -58,7 +59,7 @@ object({
58
59
  initialCommands: array(string()).optional().describe("Shell commands to run at session start before the first LLM prompt, providing additional context to the agent"),
59
60
  multipleCommandsEnabled: boolean().optional().describe("Allow the LLM to run multiple commands per turn. Faster but the LLM may get ahead of itself and produce errors"),
60
61
  workspacesEnabled: boolean().optional().describe("Experimental: Allows the LLM to pin files to the end of the context. Each turn the agent sees the latest version without old versions taking up context space"),
61
- controlDesktop: boolean().optional().describe(`Allow the agent to operate the desktop GUI. Requires a model with supportsComputerUse. Ideal screen resolution <= 1.1MP to avoid downscaling`)
62
+ controlDesktop: boolean().optional().describe(`Allow the agent to operate the desktop GUI. Requires a vision-capable model; computer-use models are ideal. Screens over 1.1MP will be downscaled.`)
62
63
  });
63
64
  //#endregion
64
65
  //#region ../../../packages/common/dist/modelTypes.js
@@ -82,7 +83,7 @@ var LlmModelSchema = object({
82
83
  outputCost: number().default(0),
83
84
  cacheWriteCost: number().optional(),
84
85
  cacheReadCost: number().optional(),
85
- cacheTtlSeconds: number().int().positive().optional(),
86
+ cacheTtlSeconds: number().int().min(300).optional(),
86
87
  supportsVision: boolean().optional(),
87
88
  supportsHearing: boolean().optional(),
88
89
  supportsComputerUse: boolean().optional()
@@ -126,7 +127,7 @@ object({
126
127
  outputCost: number().default(0),
127
128
  cacheWriteCost: number().optional(),
128
129
  cacheReadCost: number().optional(),
129
- cacheTtlSeconds: number().int().positive().optional(),
130
+ cacheTtlSeconds: number().int().min(300).optional(),
130
131
  supportsVision: boolean().optional(),
131
132
  supportsHearing: boolean().optional(),
132
133
  supportsComputerUse: boolean().optional()
Binary file
Binary file
Binary file
@@ -4,6 +4,18 @@
4
4
  <meta charset="UTF-8" />
5
5
 
6
6
  <link rel="icon" type="image/x-icon" href="/erp/favicon.ico" />
7
+ <link
8
+ rel="icon"
9
+ type="image/png"
10
+ sizes="32x32"
11
+ href="/erp/favicon-32x32.png"
12
+ />
13
+ <link
14
+ rel="icon"
15
+ type="image/png"
16
+ sizes="16x16"
17
+ href="/erp/favicon-16x16.png"
18
+ />
7
19
  <link
8
20
  rel="apple-touch-icon"
9
21
  sizes="180x180"
@@ -33,7 +45,7 @@
33
45
  <meta name="format-detection" content="telephone=no" />
34
46
 
35
47
  <title>NAISYS ERP</title>
36
- <script type="module" crossorigin src="/erp/assets/index-CXmH80Ig.js"></script>
48
+ <script type="module" crossorigin src="/erp/assets/index-jH5OYerq.js"></script>
37
49
  <link rel="modulepreload" crossorigin href="/erp/assets/rolldown-runtime-CvHMtSRF.js">
38
50
  <link rel="modulepreload" crossorigin href="/erp/assets/vendor-DFaFIeiT.js">
39
51
  <link rel="stylesheet" crossorigin href="/erp/assets/vendor-CLUPjUnv.css">
package/dist/erpServer.js CHANGED
@@ -178,6 +178,7 @@ async function startServer(wizardRan) {
178
178
  console.error("[ERP] Failed to start:", err);
179
179
  process.exit(1);
180
180
  }
181
+ return fastify;
181
182
  }
182
183
  // Start server if this file is run directly
183
184
  if (process.argv[1] === fileURLToPath(import.meta.url)) {
@@ -207,6 +208,24 @@ if (process.argv[1] === fileURLToPath(import.meta.url)) {
207
208
  expandNaisysFolder();
208
209
  }
209
210
  wizardRan = (await ensureDotEnv(erpExampleUrl, erpWizardConfig)) || wizardRan;
210
- void startServer(wizardRan);
211
+ const fastify = await startServer(wizardRan);
212
+ let shuttingDown = false;
213
+ const handleShutdown = async (signal) => {
214
+ if (shuttingDown) {
215
+ console.log("[ERP] Force exit");
216
+ process.exit(1);
217
+ }
218
+ shuttingDown = true;
219
+ console.log(`[ERP] Shutting down (${signal})...`);
220
+ try {
221
+ await fastify.close();
222
+ }
223
+ catch (err) {
224
+ console.error("[ERP] Error during fastify.close():", err);
225
+ }
226
+ process.exit(0);
227
+ };
228
+ process.on("SIGTERM", () => void handleShutdown("SIGTERM"));
229
+ process.on("SIGINT", () => void handleShutdown("SIGINT"));
211
230
  }
212
231
  //# sourceMappingURL=erpServer.js.map
@@ -14,7 +14,7 @@ export default function authRoutes(fastify) {
14
14
  app.post("/login", {
15
15
  config: {
16
16
  rateLimit: {
17
- max: 5,
17
+ max: Number(process.env.AUTH_LOGIN_RATE_LIMIT) || 5,
18
18
  timeWindow: "1 minute",
19
19
  },
20
20
  },
@@ -45,7 +45,7 @@ export async function ensureLocalSuperAdmin(password) {
45
45
  if (agentCount > 0) {
46
46
  console.warn(`[ERP] Warning: ${agentCount} agent user(s) found but supervisor auth is disabled. ` +
47
47
  `Agent API key lookups and authentication will not work. ` +
48
- `Start with --supervisor-auth to enable.`);
48
+ `Set SUPERVISOR_AUTH=true to enable.`);
49
49
  }
50
50
  }
51
51
  /**
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@naisys/erp",
3
- "version": "3.0.0-beta.34",
3
+ "version": "3.0.0-beta.36",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@naisys/erp",
9
- "version": "3.0.0-beta.34",
9
+ "version": "3.0.0-beta.36",
10
10
  "dependencies": {
11
11
  "@fastify/cookie": "^11.0.2",
12
12
  "@fastify/cors": "^11.2.0",
@@ -14,11 +14,11 @@
14
14
  "@fastify/rate-limit": "^10.3.0",
15
15
  "@fastify/static": "^9.0.0",
16
16
  "@fastify/swagger": "^9.7.0",
17
- "@naisys/common": "3.0.0-beta.34",
18
- "@naisys/common-node": "3.0.0-beta.34",
19
- "@naisys/erp-shared": "3.0.0-beta.34",
20
- "@naisys/hub-database": "3.0.0-beta.34",
21
- "@naisys/supervisor-database": "3.0.0-beta.34",
17
+ "@naisys/common": "3.0.0-beta.36",
18
+ "@naisys/common-node": "3.0.0-beta.36",
19
+ "@naisys/erp-shared": "3.0.0-beta.36",
20
+ "@naisys/hub-database": "3.0.0-beta.36",
21
+ "@naisys/supervisor-database": "3.0.0-beta.36",
22
22
  "@prisma/adapter-better-sqlite3": "^7.5.0",
23
23
  "@prisma/client": "^7.5.0",
24
24
  "@scalar/fastify-api-reference": "^1.48.7",
@@ -394,41 +394,41 @@
394
394
  }
395
395
  },
396
396
  "node_modules/@naisys/common": {
397
- "version": "3.0.0-beta.34",
398
- "resolved": "https://registry.npmjs.org/@naisys/common/-/common-3.0.0-beta.34.tgz",
399
- "integrity": "sha512-SApus3IxGYQo2q6QSjH/KiodEsSNIfoSvzJBNa8pctjb8X7YuIGPD3lLVxXqgiC7lsb4r9KyeO09PnFwJzqTRg==",
397
+ "version": "3.0.0-beta.36",
398
+ "resolved": "https://registry.npmjs.org/@naisys/common/-/common-3.0.0-beta.36.tgz",
399
+ "integrity": "sha512-a5EYqKvnL1Uy1pdslLZVMQERbo3ZtnMvhKa5B4GQJ/ziwM5zgMfbUFUEDniJRnta4dtIU5GxgzxBxmin+gMbhw==",
400
400
  "dependencies": {
401
401
  "semver": "^7.7.4",
402
402
  "zod": "^4.3.6"
403
403
  }
404
404
  },
405
405
  "node_modules/@naisys/common-node": {
406
- "version": "3.0.0-beta.34",
407
- "resolved": "https://registry.npmjs.org/@naisys/common-node/-/common-node-3.0.0-beta.34.tgz",
408
- "integrity": "sha512-X63K1BRT0qz+WJOsBQfdQVo7M+I9jQSCMqD0WiLY/aqAFSLIAI0urqQKfqRyaVXlWg3kQhbVdOcp4e1YKFEroA==",
406
+ "version": "3.0.0-beta.36",
407
+ "resolved": "https://registry.npmjs.org/@naisys/common-node/-/common-node-3.0.0-beta.36.tgz",
408
+ "integrity": "sha512-pgzHJuh6OH6wiNU4PRV8sSNaBqWCYateD7+tWHnwvDwVOzwce8ttLNtsK+NQzwQqp+vjPAMpfJ9yMqoOttXgbA==",
409
409
  "dependencies": {
410
- "@naisys/common": "3.0.0-beta.34",
410
+ "@naisys/common": "3.0.0-beta.36",
411
411
  "better-sqlite3": "^12.6.2",
412
412
  "js-yaml": "^4.1.1",
413
413
  "pino": "^10.3.1"
414
414
  }
415
415
  },
416
416
  "node_modules/@naisys/erp-shared": {
417
- "version": "3.0.0-beta.34",
418
- "resolved": "https://registry.npmjs.org/@naisys/erp-shared/-/erp-shared-3.0.0-beta.34.tgz",
419
- "integrity": "sha512-78i7jMtFMfXxBGur9sTkt4Lfe/hlqujSOPKSRIyo+PWFraBvUVkCfDtkzniV37/yIyZl7BdD1kVQTtfrdnNd2Q==",
417
+ "version": "3.0.0-beta.36",
418
+ "resolved": "https://registry.npmjs.org/@naisys/erp-shared/-/erp-shared-3.0.0-beta.36.tgz",
419
+ "integrity": "sha512-DWi2dnH4+BNst5MwNvhH4WOn/aesko9huhxKrrVQh5B7el/n5NEEcErNfkqreffkXoDx/nmQY4qboWKLP7LVIw==",
420
420
  "dependencies": {
421
- "@naisys/common": "3.0.0-beta.34",
421
+ "@naisys/common": "3.0.0-beta.36",
422
422
  "zod": "^4.3.6"
423
423
  }
424
424
  },
425
425
  "node_modules/@naisys/hub-database": {
426
- "version": "3.0.0-beta.34",
427
- "resolved": "https://registry.npmjs.org/@naisys/hub-database/-/hub-database-3.0.0-beta.34.tgz",
428
- "integrity": "sha512-uN6PwffpdtclnawkdcD9xAZbMjymNkRK1x1Lw8+uSZ7r9fnh3KPwCKR8jxKr3+03EIUaqRTzmN7edDEny7seHg==",
426
+ "version": "3.0.0-beta.36",
427
+ "resolved": "https://registry.npmjs.org/@naisys/hub-database/-/hub-database-3.0.0-beta.36.tgz",
428
+ "integrity": "sha512-FiJJCaOARun5jbTwX2VwXgEy5xDqlMi7X1ZSpxSn0jMv3dzniupCYYAYyO4muwXdFLNO2vMnhUdmhK/m2k7ouw==",
429
429
  "dependencies": {
430
- "@naisys/common": "3.0.0-beta.34",
431
- "@naisys/common-node": "3.0.0-beta.34",
430
+ "@naisys/common": "3.0.0-beta.36",
431
+ "@naisys/common-node": "3.0.0-beta.36",
432
432
  "@prisma/adapter-better-sqlite3": "^7.5.0",
433
433
  "@prisma/client": "^7.5.0",
434
434
  "better-sqlite3": "^12.6.2",
@@ -436,12 +436,12 @@
436
436
  }
437
437
  },
438
438
  "node_modules/@naisys/supervisor-database": {
439
- "version": "3.0.0-beta.34",
440
- "resolved": "https://registry.npmjs.org/@naisys/supervisor-database/-/supervisor-database-3.0.0-beta.34.tgz",
441
- "integrity": "sha512-OFDnwFn63h3XUXXqK6fxRP0MPGCZWoSnJ26U2oC3uejbiw0FIIFUsSdLaY4QSMtGv04L+GcZNM8TuKN9oLNrXA==",
439
+ "version": "3.0.0-beta.36",
440
+ "resolved": "https://registry.npmjs.org/@naisys/supervisor-database/-/supervisor-database-3.0.0-beta.36.tgz",
441
+ "integrity": "sha512-VmMtvj9ady7AOP72q1f+HfloTKGSMMnseWm8Hy9xAXW0ZiNTVo7NqeN5RMDm0D/B1ePjvo0Rz8MVM2Xm7BLvmw==",
442
442
  "dependencies": {
443
- "@naisys/common": "3.0.0-beta.34",
444
- "@naisys/common-node": "3.0.0-beta.34",
443
+ "@naisys/common": "3.0.0-beta.36",
444
+ "@naisys/common-node": "3.0.0-beta.36",
445
445
  "@prisma/adapter-better-sqlite3": "^7.5.0",
446
446
  "@prisma/client": "^7.5.0",
447
447
  "bcryptjs": "^3.0.2",
@@ -940,9 +940,9 @@
940
940
  "license": "MIT"
941
941
  },
942
942
  "node_modules/ajv": {
943
- "version": "8.18.0",
944
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
945
- "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
943
+ "version": "8.20.0",
944
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
945
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
946
946
  "license": "MIT",
947
947
  "dependencies": {
948
948
  "fast-deep-equal": "^3.1.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naisys/erp",
3
- "version": "3.0.0-beta.34",
3
+ "version": "3.0.0-beta.36",
4
4
  "description": "NAISYS ERP - Web UI for AI-driven order and work management",
5
5
  "type": "module",
6
6
  "main": "dist/erpServer.js",
@@ -46,11 +46,11 @@
46
46
  "@fastify/rate-limit": "^10.3.0",
47
47
  "@fastify/static": "^9.0.0",
48
48
  "@fastify/swagger": "^9.7.0",
49
- "@naisys/erp-shared": "3.0.0-beta.34",
50
- "@naisys/common": "3.0.0-beta.34",
51
- "@naisys/common-node": "3.0.0-beta.34",
52
- "@naisys/hub-database": "3.0.0-beta.34",
53
- "@naisys/supervisor-database": "3.0.0-beta.34",
49
+ "@naisys/common": "3.0.0-beta.36",
50
+ "@naisys/common-node": "3.0.0-beta.36",
51
+ "@naisys/erp-shared": "3.0.0-beta.36",
52
+ "@naisys/hub-database": "3.0.0-beta.36",
53
+ "@naisys/supervisor-database": "3.0.0-beta.36",
54
54
  "@prisma/adapter-better-sqlite3": "^7.5.0",
55
55
  "@prisma/client": "^7.5.0",
56
56
  "@scalar/fastify-api-reference": "^1.48.7",
@@ -65,6 +65,7 @@
65
65
  "@playwright/test": "^1.58.2",
66
66
  "@types/better-sqlite3": "^7.6.13",
67
67
  "@types/node": "^25.5.0",
68
+ "@vitest/coverage-v8": "^4.1.5",
68
69
  "prisma": "^7.5.0",
69
70
  "tsx": "^4.21.0",
70
71
  "typescript": "^5.9.3",