@openspecui/server 3.0.1 → 3.1.1
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/dist/index.mjs +7 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServer as createServer$1 } from "node:net";
|
|
2
2
|
import { serve } from "@hono/node-server";
|
|
3
|
-
import { CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DashboardConfigSchema, GitConfigSchema, OpenSpecAdapter, OpenSpecWatcher, OpsxConfigSchema, OpsxKernel, PtyClientMessageSchema, ReactiveContext, TerminalConfigSchema, TerminalRendererEngineSchema, getAllTools, getAvailableTools, getConfiguredTools, getDefaultCliCommandString, getDetectedProjectTools, getToolInitStates, getWatcherRuntimeStatus, initWatcherPool, isWatcherPoolInitialized, sniffGlobalCli, subscribeWatcherRuntimeStatus } from "@openspecui/core";
|
|
3
|
+
import { CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DashboardConfigSchema, GitConfigSchema, HOSTED_SHELL_PROTOCOL_VERSION, OpenSpecAdapter, OpenSpecWatcher, OpsxConfigSchema, OpsxKernel, PtyClientMessageSchema, ReactiveContext, TerminalConfigSchema, TerminalRendererEngineSchema, getAllTools, getAvailableTools, getConfiguredTools, getDefaultCliCommandString, getDetectedProjectTools, getToolInitStates, getWatcherRuntimeStatus, initWatcherPool, isWatcherPoolInitialized, sniffGlobalCli, subscribeWatcherRuntimeStatus } from "@openspecui/core";
|
|
4
4
|
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
|
|
5
5
|
import { applyWSSHandler } from "@trpc/server/adapters/ws";
|
|
6
6
|
import { Hono } from "hono";
|
|
@@ -3503,6 +3503,9 @@ function getServerPackageVersion() {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
}
|
|
3505
3505
|
const SERVER_PACKAGE_VERSION = getServerPackageVersion();
|
|
3506
|
+
function buildEmbeddedUiUrlForPort(port) {
|
|
3507
|
+
return `http://localhost:${port}`;
|
|
3508
|
+
}
|
|
3506
3509
|
/**
|
|
3507
3510
|
* Create an OpenSpecUI HTTP server with optional WebSocket support
|
|
3508
3511
|
*/
|
|
@@ -3534,7 +3537,9 @@ function createServer(config) {
|
|
|
3534
3537
|
projectDir: config.projectDir,
|
|
3535
3538
|
projectName: basename(config.projectDir) || config.projectDir,
|
|
3536
3539
|
watcherEnabled: !!watcher,
|
|
3537
|
-
openspecuiVersion: SERVER_PACKAGE_VERSION
|
|
3540
|
+
openspecuiVersion: SERVER_PACKAGE_VERSION,
|
|
3541
|
+
hostedShellProtocolVersion: HOSTED_SHELL_PROTOCOL_VERSION,
|
|
3542
|
+
embeddedUiUrl: buildEmbeddedUiUrlForPort(config.port ?? 3100)
|
|
3538
3543
|
});
|
|
3539
3544
|
});
|
|
3540
3545
|
app.use("/trpc/*", async (c) => {
|