@naisys/erp 3.0.0-beta.38 → 3.0.0-beta.40
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.
|
@@ -47,7 +47,7 @@ object({
|
|
|
47
47
|
chatEnabled: boolean().optional().describe("Show chat commands to the agent. Chat encourages more concise communication"),
|
|
48
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
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"),
|
|
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
|
+
completeSessionEnabled: boolean().optional().describe("Allow the agent to end its session. Once ended, it can only be restarted explicitly or via chat/mail if wakeOnMessage is enabled. Disable on root agents to prevent the system from going unresponsive"),
|
|
51
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"),
|
|
52
52
|
wakeOnMessage: boolean().optional().describe("When mail or chat is received, start the agent automatically, or wake it from its wait state"),
|
|
53
53
|
commandProtection: _enum([
|
|
@@ -66,11 +66,19 @@ object({
|
|
|
66
66
|
var LlmApiType;
|
|
67
67
|
(function(LlmApiType) {
|
|
68
68
|
LlmApiType["OpenAI"] = "openai";
|
|
69
|
+
LlmApiType["OpenAIOAuth"] = "openai-oauth";
|
|
69
70
|
LlmApiType["Google"] = "google";
|
|
70
71
|
LlmApiType["Anthropic"] = "anthropic";
|
|
71
72
|
LlmApiType["Mock"] = "mock";
|
|
72
73
|
LlmApiType["None"] = "none";
|
|
73
74
|
})(LlmApiType || (LlmApiType = {}));
|
|
75
|
+
var LlmReasoningLevelSchema = _enum([
|
|
76
|
+
"max",
|
|
77
|
+
"high",
|
|
78
|
+
"medium",
|
|
79
|
+
"low",
|
|
80
|
+
"none"
|
|
81
|
+
]);
|
|
74
82
|
var LlmModelSchema = object({
|
|
75
83
|
key: string().min(1),
|
|
76
84
|
label: string().min(1),
|
|
@@ -86,15 +94,17 @@ var LlmModelSchema = object({
|
|
|
86
94
|
cacheTtlSeconds: number().int().min(300).optional(),
|
|
87
95
|
supportsVision: boolean().optional(),
|
|
88
96
|
supportsHearing: boolean().optional(),
|
|
89
|
-
supportsComputerUse: boolean().optional()
|
|
97
|
+
supportsComputerUse: boolean().optional(),
|
|
98
|
+
reasoningLevel: LlmReasoningLevelSchema.optional()
|
|
90
99
|
}).superRefine((data, ctx) => {
|
|
91
100
|
if (data.baseUrl && ![
|
|
92
101
|
LlmApiType.OpenAI,
|
|
102
|
+
LlmApiType.OpenAIOAuth,
|
|
93
103
|
LlmApiType.Anthropic,
|
|
94
104
|
LlmApiType.Google
|
|
95
105
|
].includes(data.apiType)) ctx.addIssue({
|
|
96
106
|
code: ZodIssueCode.custom,
|
|
97
|
-
message: `baseUrl is only supported for OpenAI, Anthropic, and Google API types (got "${data.apiType}")`,
|
|
107
|
+
message: `baseUrl is only supported for OpenAI, OpenAI OAuth, Anthropic, and Google API types (got "${data.apiType}")`,
|
|
98
108
|
path: ["baseUrl"]
|
|
99
109
|
});
|
|
100
110
|
});
|
|
@@ -130,7 +140,8 @@ object({
|
|
|
130
140
|
cacheTtlSeconds: number().int().min(300).optional(),
|
|
131
141
|
supportsVision: boolean().optional(),
|
|
132
142
|
supportsHearing: boolean().optional(),
|
|
133
|
-
supportsComputerUse: boolean().optional()
|
|
143
|
+
supportsComputerUse: boolean().optional(),
|
|
144
|
+
reasoningLevel: LlmReasoningLevelSchema.optional()
|
|
134
145
|
});
|
|
135
146
|
object({
|
|
136
147
|
size: string().min(1),
|
|
@@ -145,7 +156,51 @@ object({
|
|
|
145
156
|
"low"
|
|
146
157
|
]).optional()
|
|
147
158
|
});
|
|
148
|
-
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region ../../../packages/common/dist/openAiOAuth.js
|
|
161
|
+
var OPENAI_CODEX_RESPONSES_BASE_URL = "https://chatgpt.com/backend-api/codex";
|
|
162
|
+
var OPENAI_CODEX_ACCESS_TOKEN_VAR = "OPENAI_CODEX_ACCESS_TOKEN";
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region ../../../packages/common/dist/builtInModels.js
|
|
165
|
+
function openAiCodexOAuthModel(params) {
|
|
166
|
+
return {
|
|
167
|
+
key: params.key,
|
|
168
|
+
label: params.label,
|
|
169
|
+
versionName: params.versionName,
|
|
170
|
+
baseUrl: OPENAI_CODEX_RESPONSES_BASE_URL,
|
|
171
|
+
apiType: LlmApiType.OpenAIOAuth,
|
|
172
|
+
apiKeyVar: OPENAI_CODEX_ACCESS_TOKEN_VAR,
|
|
173
|
+
maxTokens: 4e5,
|
|
174
|
+
inputCost: 0,
|
|
175
|
+
outputCost: 0,
|
|
176
|
+
cacheWriteCost: 0,
|
|
177
|
+
cacheReadCost: 0,
|
|
178
|
+
cacheTtlSeconds: 300,
|
|
179
|
+
supportsVision: true,
|
|
180
|
+
reasoningLevel: params.reasoningLevel
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
LlmApiType.None, LlmApiType.None, LlmApiType.None, LlmApiType.Mock, LlmApiType.Mock, LlmApiType.Mock, LlmApiType.OpenAI, LlmApiType.OpenAI, LlmApiType.OpenAI, LlmApiType.OpenAI, LlmApiType.OpenAI, LlmApiType.OpenAI, openAiCodexOAuthModel({
|
|
184
|
+
key: "gpt55oauth",
|
|
185
|
+
label: "GPT 5.5 Codex OAuth",
|
|
186
|
+
versionName: "gpt-5.5",
|
|
187
|
+
reasoningLevel: "medium"
|
|
188
|
+
}), openAiCodexOAuthModel({
|
|
189
|
+
key: "gpt5oauth",
|
|
190
|
+
label: "GPT 5.4 Codex OAuth",
|
|
191
|
+
versionName: "gpt-5.4",
|
|
192
|
+
reasoningLevel: "medium"
|
|
193
|
+
}), openAiCodexOAuthModel({
|
|
194
|
+
key: "gpt54minioauth",
|
|
195
|
+
label: "GPT 5.4 Mini Codex OAuth",
|
|
196
|
+
versionName: "gpt-5.4-mini",
|
|
197
|
+
reasoningLevel: "medium"
|
|
198
|
+
}), openAiCodexOAuthModel({
|
|
199
|
+
key: "gpt52oauth",
|
|
200
|
+
label: "GPT 5.2 Codex OAuth",
|
|
201
|
+
versionName: "gpt-5.2",
|
|
202
|
+
reasoningLevel: "medium"
|
|
203
|
+
}), LlmApiType.Google, LlmApiType.Google, LlmApiType.Google, LlmApiType.Anthropic, LlmApiType.Anthropic, LlmApiType.Anthropic;
|
|
149
204
|
//#endregion
|
|
150
205
|
//#region ../../../packages/common/dist/formatFileSize.js
|
|
151
206
|
/** Format a byte count into a human-readable size string (e.g. "1.2 KB") */
|
package/client-dist/index.html
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<meta name="format-detection" content="telephone=no" />
|
|
46
46
|
|
|
47
47
|
<title>NAISYS ERP</title>
|
|
48
|
-
<script type="module" crossorigin src="/erp/assets/index-
|
|
48
|
+
<script type="module" crossorigin src="/erp/assets/index-B_OXLEeY.js"></script>
|
|
49
49
|
<link rel="modulepreload" crossorigin href="/erp/assets/rolldown-runtime-CvHMtSRF.js">
|
|
50
50
|
<link rel="modulepreload" crossorigin href="/erp/assets/vendor-DFaFIeiT.js">
|
|
51
51
|
<link rel="stylesheet" crossorigin href="/erp/assets/vendor-CLUPjUnv.css">
|
package/dist/erpServer.js
CHANGED
|
@@ -17,6 +17,7 @@ import Fastify from "fastify";
|
|
|
17
17
|
import { jsonSchemaTransform, jsonSchemaTransformObject, serializerCompiler, validatorCompiler, } from "fastify-type-provider-zod";
|
|
18
18
|
import path from "path";
|
|
19
19
|
import { fileURLToPath } from "url";
|
|
20
|
+
import { takeCoverage } from "v8";
|
|
20
21
|
import { registerApiReference } from "./api-reference.js";
|
|
21
22
|
import { registerAuthMiddleware } from "./auth-middleware.js";
|
|
22
23
|
import { ERP_DB_VERSION, erpDbPath } from "./dbConfig.js";
|
|
@@ -162,6 +163,12 @@ async function startServer(wizardRan) {
|
|
|
162
163
|
fastify.get("/", { schema: { hide: true } }, async (_request, reply) => {
|
|
163
164
|
return reply.redirect("/erp/");
|
|
164
165
|
});
|
|
166
|
+
if (process.env.NODE_V8_COVERAGE) {
|
|
167
|
+
fastify.post("/erp/api/__coverage/flush", { schema: { hide: true } }, () => {
|
|
168
|
+
takeCoverage();
|
|
169
|
+
return { ok: true };
|
|
170
|
+
});
|
|
171
|
+
}
|
|
165
172
|
const superAdminPassword = wizardRan && !isSupervisorAuth()
|
|
166
173
|
? await promptSuperAdminPassword("ERP Setup")
|
|
167
174
|
: undefined;
|
|
@@ -199,7 +206,6 @@ if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
|
199
206
|
},
|
|
200
207
|
{ key: "SERVER_PORT", label: "Server Port" },
|
|
201
208
|
{ key: "SUPERVISOR_AUTH", label: "Use Supervisor for Auth" },
|
|
202
|
-
{ key: "PUBLIC_READ", label: "Public Read Access" },
|
|
203
209
|
],
|
|
204
210
|
},
|
|
205
211
|
],
|
|
@@ -210,7 +216,10 @@ if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
|
210
216
|
wizardRan = await runSetupWizard(path.resolve(".env"), erpExampleUrl, erpWizardConfig);
|
|
211
217
|
expandNaisysFolder();
|
|
212
218
|
}
|
|
213
|
-
|
|
219
|
+
if (process.env.NAISYS_SKIP_DOTENV_CHECK !== "1") {
|
|
220
|
+
wizardRan =
|
|
221
|
+
(await ensureDotEnv(erpExampleUrl, erpWizardConfig)) || wizardRan;
|
|
222
|
+
}
|
|
214
223
|
const fastify = await startServer(wizardRan);
|
|
215
224
|
let shuttingDown = false;
|
|
216
225
|
const handleShutdown = async (signal) => {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naisys/erp",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.40",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@naisys/erp",
|
|
9
|
-
"version": "3.0.0-beta.
|
|
9
|
+
"version": "3.0.0-beta.40",
|
|
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.
|
|
18
|
-
"@naisys/common-node": "3.0.0-beta.
|
|
19
|
-
"@naisys/erp-shared": "3.0.0-beta.
|
|
20
|
-
"@naisys/hub-database": "3.0.0-beta.
|
|
21
|
-
"@naisys/supervisor-database": "3.0.0-beta.
|
|
17
|
+
"@naisys/common": "3.0.0-beta.40",
|
|
18
|
+
"@naisys/common-node": "3.0.0-beta.40",
|
|
19
|
+
"@naisys/erp-shared": "3.0.0-beta.40",
|
|
20
|
+
"@naisys/hub-database": "3.0.0-beta.40",
|
|
21
|
+
"@naisys/supervisor-database": "3.0.0-beta.40",
|
|
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.
|
|
398
|
-
"resolved": "https://registry.npmjs.org/@naisys/common/-/common-3.0.0-beta.
|
|
399
|
-
"integrity": "sha512-
|
|
397
|
+
"version": "3.0.0-beta.40",
|
|
398
|
+
"resolved": "https://registry.npmjs.org/@naisys/common/-/common-3.0.0-beta.40.tgz",
|
|
399
|
+
"integrity": "sha512-qHXg14eU+DBz97iFoWdkx1Bn6Y6eminvB0Gbsu7u0iIFEDVXXUqnq4o0qBobHoS8g7OBTqTHtyiRkuECQIwhEQ==",
|
|
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.
|
|
407
|
-
"resolved": "https://registry.npmjs.org/@naisys/common-node/-/common-node-3.0.0-beta.
|
|
408
|
-
"integrity": "sha512
|
|
406
|
+
"version": "3.0.0-beta.40",
|
|
407
|
+
"resolved": "https://registry.npmjs.org/@naisys/common-node/-/common-node-3.0.0-beta.40.tgz",
|
|
408
|
+
"integrity": "sha512-+ACXA1oBPv/2YFaw1zyKMMZPUPtpSRntMwR0PBxz1DhXxTV5IgWjRHusxqr0Eh+fd17HqrpRvBw1Mp86kwAXyQ==",
|
|
409
409
|
"dependencies": {
|
|
410
|
-
"@naisys/common": "3.0.0-beta.
|
|
410
|
+
"@naisys/common": "3.0.0-beta.40",
|
|
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.
|
|
418
|
-
"resolved": "https://registry.npmjs.org/@naisys/erp-shared/-/erp-shared-3.0.0-beta.
|
|
419
|
-
"integrity": "sha512-
|
|
417
|
+
"version": "3.0.0-beta.40",
|
|
418
|
+
"resolved": "https://registry.npmjs.org/@naisys/erp-shared/-/erp-shared-3.0.0-beta.40.tgz",
|
|
419
|
+
"integrity": "sha512-JSz5avbg9/CdGSCkOg3s4ZVwga35o+6CYZqX3HjMsqcQP0mvf5f5ipO3MGQTVlH5FFUBPU0Lz6NB87OI7lC67A==",
|
|
420
420
|
"dependencies": {
|
|
421
|
-
"@naisys/common": "3.0.0-beta.
|
|
421
|
+
"@naisys/common": "3.0.0-beta.40",
|
|
422
422
|
"zod": "^4.3.6"
|
|
423
423
|
}
|
|
424
424
|
},
|
|
425
425
|
"node_modules/@naisys/hub-database": {
|
|
426
|
-
"version": "3.0.0-beta.
|
|
427
|
-
"resolved": "https://registry.npmjs.org/@naisys/hub-database/-/hub-database-3.0.0-beta.
|
|
428
|
-
"integrity": "sha512-
|
|
426
|
+
"version": "3.0.0-beta.40",
|
|
427
|
+
"resolved": "https://registry.npmjs.org/@naisys/hub-database/-/hub-database-3.0.0-beta.40.tgz",
|
|
428
|
+
"integrity": "sha512-Esavfu3plu4n1UymgyVkXpeLYNGC4UXtoS+QNnkvjVjZM7IGuFG5iDz37P6GFOAZA9Ir6sImES1iz0uK8D0Kxg==",
|
|
429
429
|
"dependencies": {
|
|
430
|
-
"@naisys/common": "3.0.0-beta.
|
|
431
|
-
"@naisys/common-node": "3.0.0-beta.
|
|
430
|
+
"@naisys/common": "3.0.0-beta.40",
|
|
431
|
+
"@naisys/common-node": "3.0.0-beta.40",
|
|
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.
|
|
440
|
-
"resolved": "https://registry.npmjs.org/@naisys/supervisor-database/-/supervisor-database-3.0.0-beta.
|
|
441
|
-
"integrity": "sha512-
|
|
439
|
+
"version": "3.0.0-beta.40",
|
|
440
|
+
"resolved": "https://registry.npmjs.org/@naisys/supervisor-database/-/supervisor-database-3.0.0-beta.40.tgz",
|
|
441
|
+
"integrity": "sha512-x07a52r74MhBxqOPHhNX52AND73w4Zxwcp78aRO/TLuP468by5jjLZQaRPmWoZmt8XWVBjt6zKnJoLCy8EJ5mQ==",
|
|
442
442
|
"dependencies": {
|
|
443
|
-
"@naisys/common": "3.0.0-beta.
|
|
444
|
-
"@naisys/common-node": "3.0.0-beta.
|
|
443
|
+
"@naisys/common": "3.0.0-beta.40",
|
|
444
|
+
"@naisys/common-node": "3.0.0-beta.40",
|
|
445
445
|
"@prisma/adapter-better-sqlite3": "^7.5.0",
|
|
446
446
|
"@prisma/client": "^7.5.0",
|
|
447
447
|
"bcryptjs": "^3.0.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naisys/erp",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.40",
|
|
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/common": "3.0.0-beta.
|
|
50
|
-
"@naisys/common-node": "3.0.0-beta.
|
|
51
|
-
"@naisys/erp-shared": "3.0.0-beta.
|
|
52
|
-
"@naisys/hub-database": "3.0.0-beta.
|
|
53
|
-
"@naisys/supervisor-database": "3.0.0-beta.
|
|
49
|
+
"@naisys/common": "3.0.0-beta.40",
|
|
50
|
+
"@naisys/common-node": "3.0.0-beta.40",
|
|
51
|
+
"@naisys/erp-shared": "3.0.0-beta.40",
|
|
52
|
+
"@naisys/hub-database": "3.0.0-beta.40",
|
|
53
|
+
"@naisys/supervisor-database": "3.0.0-beta.40",
|
|
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",
|