neoctl-web 0.1.5 → 0.1.7
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 +10 -10
- package/bin/neow.mjs +28 -28
- package/dist/assets/{index-DgkJlzEz.js → index-BihhJN9D.js} +57 -57
- package/dist/assets/{index-MgmD3vMN.css → index-CIm8rv9k.css} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -2
- package/platform-paths.mjs +40 -40
- package/server.mjs +9 -9
package/dist/index.html
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
})()
|
|
20
20
|
</script>
|
|
21
21
|
<title>neo runtime</title>
|
|
22
|
-
<script type="module" crossorigin src="/assets/index-
|
|
23
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
22
|
+
<script type="module" crossorigin src="/assets/index-BihhJN9D.js"></script>
|
|
23
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CIm8rv9k.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neoctl-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Neo browser workspace with an embedded agent runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@tanstack/vue-virtual": "^3.13.36",
|
|
31
31
|
"highlight.js": "^11.11.1",
|
|
32
32
|
"marked": "^18.0.3",
|
|
33
|
-
"neoctl": "^0.2.
|
|
33
|
+
"neoctl": "^0.2.35",
|
|
34
34
|
"streaming-markdown": "^0.2.15",
|
|
35
35
|
"vue": "^3.5.13"
|
|
36
36
|
},
|
package/platform-paths.mjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import os from 'node:os';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
|
|
4
|
-
export function defaultWebDataRoot(options = {}) {
|
|
5
|
-
const platform = options.platform || process.platform;
|
|
6
|
-
const env = options.env || process.env;
|
|
7
|
-
const homeDir = options.homeDir || os.homedir();
|
|
8
|
-
const pathApi = platform === 'win32' ? path.win32 : path.posix;
|
|
9
|
-
|
|
10
|
-
if (platform === 'win32') {
|
|
11
|
-
const localAppData = absoluteEnvPath(env.LOCALAPPDATA, pathApi);
|
|
12
|
-
return pathApi.join(localAppData || pathApi.join(homeDir, 'AppData', 'Local'), 'neoctl-web');
|
|
13
|
-
}
|
|
14
|
-
if (platform === 'darwin') {
|
|
15
|
-
return pathApi.join(homeDir, 'Library', 'Application Support', 'neoctl-web');
|
|
16
|
-
}
|
|
17
|
-
const xdgDataHome = absoluteEnvPath(env.XDG_DATA_HOME, pathApi);
|
|
18
|
-
return pathApi.join(xdgDataHome || pathApi.join(homeDir, '.local', 'share'), 'neoctl-web');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function resolveWebStorage(options = {}) {
|
|
22
|
-
const platform = options.platform || process.platform;
|
|
23
|
-
const env = options.env || process.env;
|
|
24
|
-
const pathApi = platform === 'win32' ? path.win32 : path.posix;
|
|
25
|
-
const cwd = options.cwd || process.cwd();
|
|
26
|
-
const dataRoot = pathApi.resolve(
|
|
27
|
-
cwd,
|
|
28
|
-
String(env.NEO_WEB_DATA_DIR || '').trim() || defaultWebDataRoot({ ...options, platform, env }),
|
|
29
|
-
);
|
|
30
|
-
const workspaceRoot = pathApi.resolve(
|
|
31
|
-
cwd,
|
|
32
|
-
String(env.NEO_WORKSPACE_ROOT || '').trim() || pathApi.join(dataRoot, 'workspaces'),
|
|
33
|
-
);
|
|
34
|
-
return { dataRoot, workspaceRoot };
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function absoluteEnvPath(value, pathApi) {
|
|
38
|
-
const candidate = String(value || '').trim();
|
|
39
|
-
return candidate && pathApi.isAbsolute(candidate) ? candidate : '';
|
|
40
|
-
}
|
|
1
|
+
import os from 'node:os';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
export function defaultWebDataRoot(options = {}) {
|
|
5
|
+
const platform = options.platform || process.platform;
|
|
6
|
+
const env = options.env || process.env;
|
|
7
|
+
const homeDir = options.homeDir || os.homedir();
|
|
8
|
+
const pathApi = platform === 'win32' ? path.win32 : path.posix;
|
|
9
|
+
|
|
10
|
+
if (platform === 'win32') {
|
|
11
|
+
const localAppData = absoluteEnvPath(env.LOCALAPPDATA, pathApi);
|
|
12
|
+
return pathApi.join(localAppData || pathApi.join(homeDir, 'AppData', 'Local'), 'neoctl-web');
|
|
13
|
+
}
|
|
14
|
+
if (platform === 'darwin') {
|
|
15
|
+
return pathApi.join(homeDir, 'Library', 'Application Support', 'neoctl-web');
|
|
16
|
+
}
|
|
17
|
+
const xdgDataHome = absoluteEnvPath(env.XDG_DATA_HOME, pathApi);
|
|
18
|
+
return pathApi.join(xdgDataHome || pathApi.join(homeDir, '.local', 'share'), 'neoctl-web');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function resolveWebStorage(options = {}) {
|
|
22
|
+
const platform = options.platform || process.platform;
|
|
23
|
+
const env = options.env || process.env;
|
|
24
|
+
const pathApi = platform === 'win32' ? path.win32 : path.posix;
|
|
25
|
+
const cwd = options.cwd || process.cwd();
|
|
26
|
+
const dataRoot = pathApi.resolve(
|
|
27
|
+
cwd,
|
|
28
|
+
String(env.NEO_WEB_DATA_DIR || '').trim() || defaultWebDataRoot({ ...options, platform, env }),
|
|
29
|
+
);
|
|
30
|
+
const workspaceRoot = pathApi.resolve(
|
|
31
|
+
cwd,
|
|
32
|
+
String(env.NEO_WORKSPACE_ROOT || '').trim() || pathApi.join(dataRoot, 'workspaces'),
|
|
33
|
+
);
|
|
34
|
+
return { dataRoot, workspaceRoot };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function absoluteEnvPath(value, pathApi) {
|
|
38
|
+
const candidate = String(value || '').trim();
|
|
39
|
+
return candidate && pathApi.isAbsolute(candidate) ? candidate : '';
|
|
40
|
+
}
|
package/server.mjs
CHANGED
|
@@ -10,8 +10,8 @@ import { createWebToolSettings } from './tool-settings.mjs';
|
|
|
10
10
|
import { createWorkspaceRuntimeManager } from './runtime-workspaces.mjs';
|
|
11
11
|
import { installRuntimeRouterIdleCleanup } from './runtime-router-cleanup.mjs';
|
|
12
12
|
import { createCpaQuotaMonitor } from './cpa-quota.mjs';
|
|
13
|
-
import { createMemoryMonitor } from './memory-monitor.mjs';
|
|
14
|
-
import { resolveWebStorage } from './platform-paths.mjs';
|
|
13
|
+
import { createMemoryMonitor } from './memory-monitor.mjs';
|
|
14
|
+
import { resolveWebStorage } from './platform-paths.mjs';
|
|
15
15
|
|
|
16
16
|
installRuntimeRouterIdleCleanup();
|
|
17
17
|
console.log(`neo core: ${coreRuntimeInfo.source} ${coreRuntimeInfo.version} (${coreRuntimeInfo.location})`);
|
|
@@ -21,9 +21,9 @@ process.env.NEO_CLIENT_REVISION ||= `${coreRuntimeInfo.version}-${Date.now().toS
|
|
|
21
21
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
22
22
|
const root = path.resolve(process.env.DIST_DIR || path.join(__dirname, 'dist'));
|
|
23
23
|
const host = process.env.APP_HOST || '0.0.0.0';
|
|
24
|
-
const port = Number(process.env.APP_PORT || process.env.PORT || 5173);
|
|
25
|
-
const runtimeTarget = new URL(process.env.NEO_RUNTIME_TARGET || 'http://127.0.0.1:3101');
|
|
26
|
-
const { dataRoot, workspaceRoot } = resolveWebStorage();
|
|
24
|
+
const port = Number(process.env.APP_PORT || process.env.PORT || 5173);
|
|
25
|
+
const runtimeTarget = new URL(process.env.NEO_RUNTIME_TARGET || 'http://127.0.0.1:3101');
|
|
26
|
+
const { dataRoot, workspaceRoot } = resolveWebStorage();
|
|
27
27
|
const promptLibraryFile = path.resolve(process.env.NEO_PROMPT_LIBRARY_FILE || path.join(dataRoot, 'prompt-library.json'));
|
|
28
28
|
const uploadsDir = path.resolve(process.env.NEO_UPLOADS_DIR || path.join(dataRoot, 'uploads'));
|
|
29
29
|
const pluginDir = path.resolve(process.env.NEO_WEB_PLUGIN_DIR || path.join(__dirname, 'plugins'));
|
|
@@ -53,10 +53,10 @@ const memoryMonitor = createMemoryMonitor({
|
|
|
53
53
|
maxPersistedSamples: process.env.NEO_MEMORY_MAX_PERSISTED_SAMPLES,
|
|
54
54
|
maxPersistedBytes: process.env.NEO_MEMORY_MAX_PERSISTED_BYTES,
|
|
55
55
|
});
|
|
56
|
-
const workspaceRuntime = createWorkspaceRuntimeManager({
|
|
57
|
-
projectRoot: process.cwd(),
|
|
58
|
-
workspaceRoot,
|
|
59
|
-
registryFile: path.join(dataRoot, 'session-workspaces.json'),
|
|
56
|
+
const workspaceRuntime = createWorkspaceRuntimeManager({
|
|
57
|
+
projectRoot: process.cwd(),
|
|
58
|
+
workspaceRoot,
|
|
59
|
+
registryFile: path.join(dataRoot, 'session-workspaces.json'),
|
|
60
60
|
createRuntime: (runtimeOptions) => createWebRuntime({
|
|
61
61
|
...runtimeOptions,
|
|
62
62
|
...pluginHost.runtimePlugins(runtimeOptions.sessionId),
|