kontexted 0.1.6 → 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.
|
@@ -33,8 +33,8 @@ async function runInit(interactive) {
|
|
|
33
33
|
const defaultUrl = dialect === 'sqlite' ? `${DATA_DIR}/kontexted.db` : 'postgresql://localhost:5432/kontexted';
|
|
34
34
|
const urlAnswer = await promptQuestion(rl, `Database URL [${defaultUrl}]: `);
|
|
35
35
|
const databaseUrl = urlAnswer.trim() || defaultUrl;
|
|
36
|
-
const portAnswer = await promptQuestion(rl, 'Server port [
|
|
37
|
-
const port = parseInt(portAnswer.trim(), 10) ||
|
|
36
|
+
const portAnswer = await promptQuestion(rl, 'Server port [4729]: ');
|
|
37
|
+
const port = parseInt(portAnswer.trim(), 10) || 4729;
|
|
38
38
|
const hostAnswer = await promptQuestion(rl, 'Server host [127.0.0.1]: ');
|
|
39
39
|
const host = hostAnswer.trim() || '127.0.0.1';
|
|
40
40
|
const levelAnswer = await promptQuestion(rl, 'Log level (debug/info/warn/error) [info]: ');
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { isPlatformSupported, getPlatform, getBinaryPath, configExists, getServerStatus, startServer, } from '../../lib/server/index.js';
|
|
1
|
+
import { isPlatformSupported, getPlatform, getBinaryPath, configExists, getServerStatus, startServer, loadConfig, } from '../../lib/server/index.js';
|
|
2
2
|
const DOCKER_URL = 'https://hub.docker.com/r/rabbyte-tech/kontexted';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a clickable terminal hyperlink using OSC 8 escape sequence
|
|
5
|
+
* Falls back to plain URL for terminals that don't support it
|
|
6
|
+
*/
|
|
7
|
+
function formatClickableUrl(url, text) {
|
|
8
|
+
const linkText = text || url;
|
|
9
|
+
// OSC 8 escape sequence: \x1b]8;;url\x1b\\text\x1b]8;;\x1b\\
|
|
10
|
+
return `\x1b]8;;${url}\x1b\\${linkText}\x1b]8;;\x1b\\`;
|
|
11
|
+
}
|
|
3
12
|
function checkPrerequisites() {
|
|
4
13
|
if (!isPlatformSupported()) {
|
|
5
14
|
return { valid: false, error: `Platform not supported: ${getPlatform()}. Consider using Docker: ${DOCKER_URL}` };
|
|
@@ -35,7 +44,13 @@ export const handler = async (argv) => {
|
|
|
35
44
|
}
|
|
36
45
|
try {
|
|
37
46
|
const pid = await startServer({ foreground: argv.foreground });
|
|
38
|
-
|
|
47
|
+
// Load config to get host and port
|
|
48
|
+
const config = loadConfig();
|
|
49
|
+
const host = config?.server.host || '127.0.0.1';
|
|
50
|
+
const port = config?.server.port || 4729;
|
|
51
|
+
const url = `http://${host}:${port}`;
|
|
52
|
+
console.log(`Server started (PID: ${pid})`);
|
|
53
|
+
console.log(` → ${formatClickableUrl(url)}`);
|
|
39
54
|
}
|
|
40
55
|
catch (error) {
|
|
41
56
|
console.error('Error:', error instanceof Error ? error.message : 'Unknown error');
|
|
@@ -39,7 +39,7 @@ export function getDefaultConfig() {
|
|
|
39
39
|
url: `${DATA_DIR}/kontexted.db`,
|
|
40
40
|
},
|
|
41
41
|
server: {
|
|
42
|
-
port:
|
|
42
|
+
port: 4729,
|
|
43
43
|
host: '127.0.0.1',
|
|
44
44
|
},
|
|
45
45
|
logging: {
|
|
@@ -93,7 +93,7 @@ export function loadConfig() {
|
|
|
93
93
|
url: parsed.database.url,
|
|
94
94
|
},
|
|
95
95
|
server: {
|
|
96
|
-
port: parsed.server.port ||
|
|
96
|
+
port: parsed.server.port || 4729,
|
|
97
97
|
host: parsed.server.host || '127.0.0.1',
|
|
98
98
|
},
|
|
99
99
|
logging: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kontexted",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "CLI tool for Kontexted - MCP proxy, workspaces management, and local server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"typescript": "^5.6.0"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"@kontexted/darwin-arm64": "0.1.
|
|
47
|
-
"@kontexted/linux-x64": "0.1.
|
|
48
|
-
"@kontexted/windows-x64": "0.1.
|
|
46
|
+
"@kontexted/darwin-arm64": "0.1.7",
|
|
47
|
+
"@kontexted/linux-x64": "0.1.7",
|
|
48
|
+
"@kontexted/windows-x64": "0.1.7"
|
|
49
49
|
}
|
|
50
50
|
}
|