kowlun 0.0.0-stage → 0.3.0

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 CHANGED
@@ -1,3 +1,58 @@
1
- # Temporary Holding Version
1
+ # kowlun
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ CLI and MCP server for **Kowlun** ([kowlun.com](https://kowlun.com)) — a home for personal apps you build with AI. Your agent deploys an app folder with one command, and it opens on your phone with a ready backend: user, database, files and AI through the SDK.
4
+
5
+ ## Quick start
6
+
7
+ ```
8
+ npx kowlun login # confirm the code in your browser
9
+ npx kowlun deploy ./my-app # → https://my-app.kowlun.app
10
+ ```
11
+
12
+ Or install globally: `npm i -g kowlun` — then use `kowlun …`.
13
+
14
+ ## Commands
15
+
16
+ ```
17
+ kowlun login sign in (device code, confirmed in the browser)
18
+ kowlun whoami who is signed in
19
+ kowlun deploy [dir] deploy a folder with app.json (new version)
20
+ kowlun list my apps
21
+ kowlun info <name> versions of an app
22
+ kowlun rollback <name> [v] roll back to a previous version
23
+ kowlun mcp MCP server for agents (stdio)
24
+ kowlun logout
25
+ ```
26
+
27
+ ## For agents (MCP)
28
+
29
+ Claude Code:
30
+
31
+ ```
32
+ claude mcp add kowlun -- npx -y kowlun mcp
33
+ ```
34
+
35
+ On native Windows: `claude mcp add kowlun -- cmd /c npx -y kowlun mcp`.
36
+
37
+ Cursor, `.cursor/mcp.json`:
38
+
39
+ ```json
40
+ { "mcpServers": { "kowlun": { "command": "npx", "args": ["-y", "kowlun", "mcp"] } } }
41
+ ```
42
+
43
+ Tools: `kowlun_deploy`, `kowlun_list`, `kowlun_info`, `kowlun_rollback`, `kowlun_whoami`. Sign in once with `npx kowlun login` before using them.
44
+
45
+ ## App format
46
+
47
+ ```
48
+ my-app/
49
+ app.json {"name": "my-app", "title": "My app", "icon": "🏃"}
50
+ web/index.html entry point; everything in web/ is served as static files
51
+ ```
52
+
53
+ ## Environment
54
+
55
+ - `KOWLUN_API` — platform address (default `https://kowlun.com`). For local development: `kowlun login --api http://localhost:8787`.
56
+ - `KOWLUN_TOKEN` — session token instead of `login` (CI).
57
+
58
+ Sign-in is stored in `~/.kowlun/config.json`.
package/dist/config.js ADDED
@@ -0,0 +1,31 @@
1
+ // Хранение входа CLI: ~/.kowlun/config.json (только для текущего пользователя ОС).
2
+ import { mkdir, readFile, rm, writeFile, chmod } from "node:fs/promises";
3
+ import { homedir } from "node:os";
4
+ import { join } from "node:path";
5
+ const DIR = join(homedir(), ".kowlun");
6
+ const FILE = join(DIR, "config.json");
7
+ /** Прод. Для локальной разработки: `kowlun login --api http://localhost:8787` или KOWLUN_API. */
8
+ const DEFAULT_API = "https://kowlun.com";
9
+ export async function loadConfig() {
10
+ let saved = {};
11
+ try {
12
+ saved = JSON.parse(await readFile(FILE, "utf8"));
13
+ }
14
+ catch {
15
+ /* ещё не входили */
16
+ }
17
+ return {
18
+ api: (process.env.KOWLUN_API ?? saved.api ?? DEFAULT_API).replace(/\/$/, ""),
19
+ token: process.env.KOWLUN_TOKEN ?? saved.token,
20
+ email: saved.email,
21
+ };
22
+ }
23
+ export async function saveConfig(config) {
24
+ await mkdir(DIR, { recursive: true });
25
+ await writeFile(FILE, JSON.stringify(config, null, 2), { mode: 0o600 });
26
+ await chmod(FILE, 0o600).catch(() => { }); // на Windows права не применяются — не страшно
27
+ }
28
+ export async function clearConfig() {
29
+ await rm(FILE, { force: true });
30
+ }
31
+ export const configPath = FILE;
package/dist/core.js ADDED
@@ -0,0 +1,107 @@
1
+ // Действия с платформой, общие для CLI и MCP-сервера. Ничего не печатают и не завершают процесс:
2
+ // возвращают данные или бросают CliError с понятным сообщением.
3
+ import { readFile, readdir, stat } from "node:fs/promises";
4
+ import { join, relative, resolve, sep } from "node:path";
5
+ import { loadConfig } from "./config.js";
6
+ import { lang, say } from "./i18n.js";
7
+ export class CliError extends Error {
8
+ }
9
+ const IGNORE = new Set(["node_modules", ".git", ".DS_Store", "Thumbs.db"]);
10
+ export const kb = (n) => n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} ${say("KB", "КБ")}` : `${(n / 1024 / 1024).toFixed(1)} ${say("MB", "МБ")}`;
11
+ export async function http(config, path, init = {}, auth = true) {
12
+ let res;
13
+ try {
14
+ res = await fetch(config.api + path, {
15
+ ...init,
16
+ headers: {
17
+ "accept-language": lang,
18
+ ...(auth && config.token ? { authorization: `Bearer ${config.token}` } : {}),
19
+ ...(init.headers ?? {}),
20
+ },
21
+ });
22
+ }
23
+ catch {
24
+ throw new CliError(say(`Couldn't connect to ${config.api}. Check your internet connection (locally: is pnpm run dev:api running?).`, `Не удалось подключиться к ${config.api}. Проверьте интернет (локально — запущен ли pnpm run dev:api).`));
25
+ }
26
+ return { status: res.status, body: await res.json().catch(() => ({})) };
27
+ }
28
+ /** Запрос к API от имени вошедшего пользователя. */
29
+ export async function api(path, init = {}) {
30
+ const config = await loadConfig();
31
+ if (!config.token)
32
+ throw new CliError(say("Sign in first: npx kowlun login", "Сначала войдите: npx kowlun login"));
33
+ const { status, body } = await http(config, path, init);
34
+ if (status === 401)
35
+ throw new CliError(say("Your sign-in has expired. Sign in again: npx kowlun login", "Вход истёк. Войдите снова: npx kowlun login"));
36
+ if (status >= 400)
37
+ throw new CliError(body.message ?? body.error ?? say(`API responded ${status}`, `API ответил ${status}`));
38
+ return body;
39
+ }
40
+ async function walk(root, dir, out) {
41
+ let entries;
42
+ try {
43
+ entries = await readdir(dir, { withFileTypes: true });
44
+ }
45
+ catch {
46
+ return; // папки нет — нормально для server/
47
+ }
48
+ for (const e of entries) {
49
+ if (IGNORE.has(e.name) || e.name.startsWith("."))
50
+ continue;
51
+ const full = join(dir, e.name);
52
+ if (e.isDirectory())
53
+ await walk(root, full, out);
54
+ else if (e.isFile())
55
+ out.push(relative(root, full).split(sep).join("/"));
56
+ }
57
+ }
58
+ export async function deploy(dirArg) {
59
+ const dir = resolve(dirArg);
60
+ let manifestRaw;
61
+ try {
62
+ manifestRaw = await readFile(join(dir, "app.json"), "utf8");
63
+ }
64
+ catch {
65
+ throw new CliError(say(`There is no app.json in ${dir}.`, `В ${dir} нет app.json.`));
66
+ }
67
+ let manifest;
68
+ try {
69
+ manifest = JSON.parse(manifestRaw);
70
+ }
71
+ catch {
72
+ throw new CliError(say("app.json is not valid JSON.", "app.json — не валидный JSON."));
73
+ }
74
+ if (!manifest.name)
75
+ throw new CliError(say("app.json has no name field.", "В app.json нет поля name."));
76
+ const paths = [];
77
+ await walk(dir, join(dir, "web"), paths);
78
+ await walk(dir, join(dir, "server"), paths);
79
+ if (!paths.includes("web/index.html"))
80
+ throw new CliError(say(`Missing ${join(dir, "web", "index.html")}.`, `Нет ${join(dir, "web", "index.html")}.`));
81
+ const form = new FormData();
82
+ form.set("manifest", manifestRaw);
83
+ let bytes = 0;
84
+ for (const p of paths) {
85
+ const data = await readFile(join(dir, p));
86
+ bytes += (await stat(join(dir, p))).size;
87
+ form.append(`f:${p}`, new Blob([data]), p.split("/").pop());
88
+ }
89
+ const r = await api(`/v1/apps/${encodeURIComponent(manifest.name)}/versions`, { method: "POST", body: form });
90
+ return { app: r.app, version: r.version, files: r.files, bytes: r.bytes, url: r.url, warnings: r.warnings ?? [] };
91
+ }
92
+ export async function listApps() {
93
+ return (await api("/v1/apps")).apps;
94
+ }
95
+ export async function appInfo(name) {
96
+ return api(`/v1/apps/${encodeURIComponent(name)}`);
97
+ }
98
+ export async function rollback(name, version) {
99
+ return api(`/v1/apps/${encodeURIComponent(name)}/rollback`, {
100
+ method: "POST",
101
+ headers: { "content-type": "application/json" },
102
+ body: JSON.stringify({ version }),
103
+ });
104
+ }
105
+ export async function whoami() {
106
+ return (await api("/v1/me")).user;
107
+ }
package/dist/i18n.js ADDED
@@ -0,0 +1,37 @@
1
+ // Язык CLI: английский или русский. KOWLUN_LANG → LC_ALL / LC_MESSAGES / LANG → язык системы → английский.
2
+ // Тот же язык уходит в API заголовком Accept-Language: ошибки платформы приходят на нём же.
3
+ const parse = (v) => {
4
+ const s = (v ?? "").trim().toLowerCase();
5
+ return s.startsWith("ru") ? "ru" : s.startsWith("en") ? "en" : null;
6
+ };
7
+ function detect() {
8
+ const env = process.env;
9
+ for (const v of [env.KOWLUN_LANG, env.LC_ALL, env.LC_MESSAGES, env.LANG]) {
10
+ const l = parse(v);
11
+ if (l)
12
+ return l;
13
+ }
14
+ try {
15
+ return parse(Intl.DateTimeFormat().resolvedOptions().locale) ?? "en";
16
+ }
17
+ catch {
18
+ return "en";
19
+ }
20
+ }
21
+ export const lang = detect();
22
+ /** Текст на языке CLI. */
23
+ export const say = (en, ru) => (lang === "ru" ? ru : en);
24
+ /** Русское склонение по числу: 1 файл, 2 файла, 5 файлов. */
25
+ export function plural(n, one, few, many) {
26
+ const a = Math.abs(n) % 100;
27
+ const b = a % 10;
28
+ if (a > 10 && a < 20)
29
+ return many;
30
+ if (b === 1)
31
+ return one;
32
+ if (b >= 2 && b <= 4)
33
+ return few;
34
+ return many;
35
+ }
36
+ /** «N files» / «N файлов» на языке CLI. */
37
+ export const filesCount = (n) => say(`${n} ${n === 1 ? "file" : "files"}`, `${n} ${plural(n, "файл", "файла", "файлов")}`);
package/dist/index.js ADDED
@@ -0,0 +1,176 @@
1
+ #!/usr/bin/env node
2
+ // Kowlun CLI.
3
+ //
4
+ // kowlun login войти (подтверждение в браузере)
5
+ // kowlun logout выйти
6
+ // kowlun whoami кто вошёл
7
+ // kowlun deploy [dir] залить апку
8
+ // kowlun list мои апки
9
+ // kowlun info <name> версии апки
10
+ // kowlun rollback <name> откатить на прошлую версию
11
+ // kowlun mcp MCP-сервер для агентов (stdio)
12
+ //
13
+ // Переменные окружения: KOWLUN_API (адрес платформы), KOWLUN_TOKEN (токен вместо входа, для CI).
14
+ import { Command } from "commander";
15
+ import { spawn } from "node:child_process";
16
+ import { clearConfig, configPath, loadConfig, saveConfig } from "./config.js";
17
+ import { appInfo, CliError, deploy, http, kb, listApps, rollback, whoami } from "./core.js";
18
+ import { filesCount, say } from "./i18n.js";
19
+ const VERSION = "0.3.0";
20
+ const CLIENT_ID = "kowlun-cli";
21
+ function fail(message) {
22
+ console.error(`✖ ${message}`);
23
+ process.exit(1);
24
+ }
25
+ /** Выполнить команду: ошибки платформы — понятным текстом, без стектрейса. */
26
+ const run = (fn) => async (...args) => {
27
+ try {
28
+ await fn(...args);
29
+ }
30
+ catch (e) {
31
+ if (e instanceof CliError)
32
+ fail(e.message);
33
+ throw e;
34
+ }
35
+ };
36
+ const EXPIRED = () => say("The code has expired. Run npx kowlun login again.", "Код истёк. Запустите npx kowlun login ещё раз.");
37
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
38
+ function openBrowser(url) {
39
+ const [cmd, args] = process.platform === "win32"
40
+ ? ["rundll32", ["url.dll,FileProtocolHandler", url]]
41
+ : process.platform === "darwin"
42
+ ? ["open", [url]]
43
+ : ["xdg-open", [url]];
44
+ try {
45
+ spawn(cmd, args, { stdio: "ignore", detached: true }).on("error", () => { }).unref();
46
+ }
47
+ catch {
48
+ /* не открылся — ссылка всё равно напечатана */
49
+ }
50
+ }
51
+ const program = new Command().name("kowlun").description(say("Deploy personal apps to Kowlun", "Деплой персональных апок в Kowlun")).version(VERSION);
52
+ // --- Вход ------------------------------------------------------------------------------
53
+ program
54
+ .command("login")
55
+ .description(say("Sign in: confirm the code in your browser", "Войти: подтвердите код в браузере"))
56
+ .option("--api <url>", say("platform address", "адрес платформы"))
57
+ .option("--no-open", say("don't open the browser automatically", "не открывать браузер автоматически"))
58
+ .action(run(async (opts) => {
59
+ const config = await loadConfig();
60
+ if (opts.api)
61
+ config.api = opts.api.replace(/\/$/, "");
62
+ const start = await http(config, "/api/auth/device/code", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ client_id: CLIENT_ID }) }, false);
63
+ if (start.status >= 400)
64
+ fail(start.body.message ?? start.body.error_description ?? say("Couldn't start sign-in.", "Не удалось начать вход."));
65
+ const { device_code, user_code, verification_uri_complete, verification_uri, interval = 5, expires_in = 900 } = start.body;
66
+ const link = new URL(verification_uri_complete ?? verification_uri, config.api).toString();
67
+ console.log(`\n${say("Code", "Код")}: ${user_code}`);
68
+ console.log(`${say("Confirm sign-in in your browser", "Подтвердите вход в браузере")}: ${link}\n`);
69
+ if (opts.open)
70
+ openBrowser(link);
71
+ let wait = Number(interval) * 1000;
72
+ const deadline = Date.now() + Number(expires_in) * 1000;
73
+ process.stdout.write(say("Waiting for confirmation", "Ждём подтверждения"));
74
+ while (Date.now() < deadline) {
75
+ await sleep(wait);
76
+ process.stdout.write(".");
77
+ const poll = await http(config, "/api/auth/device/token", {
78
+ method: "POST",
79
+ headers: { "content-type": "application/json" },
80
+ body: JSON.stringify({ grant_type: "urn:ietf:params:oauth:grant-type:device_code", device_code, client_id: CLIENT_ID }),
81
+ }, false);
82
+ if (poll.body.access_token) {
83
+ config.token = poll.body.access_token;
84
+ const me = await http(config, "/v1/me");
85
+ config.email = me.body.user?.email;
86
+ await saveConfig(config);
87
+ console.log(`\n✔ ${say("Signed in as", "Вы вошли как")} ${config.email ?? say("user", "пользователь")}`);
88
+ return;
89
+ }
90
+ const error = poll.body.error;
91
+ if (error === "authorization_pending")
92
+ continue;
93
+ if (error === "slow_down") {
94
+ wait += 5000;
95
+ continue;
96
+ }
97
+ if (error === "access_denied")
98
+ fail(`\n${say("Sign-in declined.", "Вход отклонён.")}`);
99
+ if (error === "expired_token")
100
+ fail(`\n${EXPIRED()}`);
101
+ fail(`\n${poll.body.error_description ?? error ?? say("Couldn't sign in.", "Не удалось войти.")}`);
102
+ }
103
+ fail(`\n${EXPIRED()}`);
104
+ }));
105
+ program
106
+ .command("logout")
107
+ .description(say("Sign out", "Выйти"))
108
+ .action(run(async () => {
109
+ const config = await loadConfig();
110
+ if (config.token) {
111
+ await http(config, "/api/auth/sign-out", { method: "POST", headers: { "content-type": "application/json" }, body: "{}" }).catch(() => { });
112
+ }
113
+ await clearConfig();
114
+ console.log(`✔ ${say("Signed out", "Вы вышли")}`);
115
+ }));
116
+ program
117
+ .command("whoami")
118
+ .description(say("Who is signed in", "Кто вошёл"))
119
+ .action(run(async () => {
120
+ const user = await whoami();
121
+ const config = await loadConfig();
122
+ console.log(`${user.name || user.email} <${user.email}> · ${config.api}`);
123
+ console.log(`${say("Sign-in is saved in", "Вход сохранён в")} ${configPath}`);
124
+ }));
125
+ // --- Апки ------------------------------------------------------------------------------
126
+ program
127
+ .command("deploy")
128
+ .description(say("Deploy a folder with app.json", "Залить папку с app.json"))
129
+ .argument("[dir]", say("app folder", "папка апки"), ".")
130
+ .action(run(async (dir) => {
131
+ const r = await deploy(dir);
132
+ console.log(say(`✔ ${r.app}: version ${r.version} published`, `✔ ${r.app}: версия ${r.version} опубликована`) + ` (${filesCount(r.files)}, ${kb(r.bytes)})`);
133
+ for (const w of r.warnings)
134
+ console.log(`! ${w}`);
135
+ console.log(`→ ${r.url}`);
136
+ }));
137
+ program
138
+ .command("list")
139
+ .description(say("My apps", "Мои апки"))
140
+ .action(run(async () => {
141
+ const apps = await listApps();
142
+ if (!apps.length)
143
+ return console.log(say("No apps yet. Deploy your first one: npx kowlun deploy <folder>", "Апок пока нет. Залейте первую: npx kowlun deploy <папка>"));
144
+ for (const a of apps)
145
+ console.log(`${a.icon ?? "•"} ${a.name.padEnd(24)} ${a.title.padEnd(28)} ${a.url}`);
146
+ }));
147
+ program
148
+ .command("info")
149
+ .description(say("App versions", "Версии апки"))
150
+ .argument("<name>")
151
+ .action(run(async (name) => {
152
+ const { app, versions } = await appInfo(name);
153
+ console.log(`${app.icon ?? "•"} ${app.title} → ${app.url}`);
154
+ for (const v of versions) {
155
+ const mark = v.id === app.current_version ? "●" : "○";
156
+ console.log(`${mark} ${v.id} ${new Date(v.created_at).toLocaleString()} ${filesCount(v.file_count)}, ${kb(v.total_bytes)}`);
157
+ }
158
+ }));
159
+ program
160
+ .command("rollback")
161
+ .description(say("Roll back to the previous version (or a given one)", "Откатить на прошлую версию (или на указанную)"))
162
+ .argument("<name>")
163
+ .argument("[version]")
164
+ .action(run(async (name, version) => {
165
+ const r = await rollback(name, version);
166
+ console.log(say(`✔ ${name} is now on version ${r.version}`, `✔ ${name} теперь на версии ${r.version}`));
167
+ }));
168
+ // --- MCP ---------------------------------------------------------------------------------
169
+ program
170
+ .command("mcp")
171
+ .description(say("MCP server for AI agents (Claude Code, Cursor): deploy and roll back apps", "MCP-сервер для ИИ-агентов (Claude Code, Cursor): деплой и откат апок"))
172
+ .action(async () => {
173
+ const { startMcp } = await import("./mcp.js");
174
+ await startMcp(VERSION);
175
+ });
176
+ await program.parseAsync();
package/dist/mcp.js ADDED
@@ -0,0 +1,75 @@
1
+ // MCP-сервер Kowlun поверх stdio: агент (Claude Code, Cursor) заливает и откатывает апки сам.
2
+ // Вход — тот же, что у CLI (~/.kowlun/config.json). Запуск: kowlun mcp.
3
+ // Важно: в stdout пишет только протокол MCP, никаких console.log.
4
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
6
+ import { z } from "zod";
7
+ import { appInfo, CliError, deploy, kb, listApps, rollback, whoami } from "./core.js";
8
+ const ok = (text) => ({ content: [{ type: "text", text }] });
9
+ async function run(fn) {
10
+ try {
11
+ return ok(await fn());
12
+ }
13
+ catch (e) {
14
+ const message = e instanceof CliError ? e.message : `Unexpected error: ${e instanceof Error ? e.message : String(e)}`;
15
+ return { content: [{ type: "text", text: message }], isError: true };
16
+ }
17
+ }
18
+ export async function startMcp(version) {
19
+ const server = new McpServer({ name: "kowlun", version });
20
+ server.registerTool("kowlun_deploy", {
21
+ title: "Deploy app to Kowlun",
22
+ description: "Publish a Kowlun mini-app folder as a new version. The folder must contain app.json (name, title, icon) and web/index.html. " +
23
+ "Returns the app URL. Every deploy is a new version; use kowlun_rollback to go back.",
24
+ inputSchema: { path: z.string().describe("Absolute path to the app folder (the one with app.json)") },
25
+ }, ({ path }) => run(async () => {
26
+ const r = await deploy(path);
27
+ const lines = [`Deployed ${r.app}, version ${r.version} (${r.files} files, ${kb(r.bytes)}).`, `URL: ${r.url}`];
28
+ for (const w of r.warnings)
29
+ lines.push(`Warning: ${w}`);
30
+ lines.push("Open the URL to check it. The user may be asked to sign in and allow the app on first open.");
31
+ return lines.join("\n");
32
+ }));
33
+ server.registerTool("kowlun_list", {
34
+ title: "List my Kowlun apps",
35
+ description: "List the signed-in user's Kowlun apps with their URLs.",
36
+ inputSchema: {},
37
+ }, () => run(async () => {
38
+ const apps = await listApps();
39
+ if (!apps.length)
40
+ return "No apps yet.";
41
+ return apps.map((a) => `${a.icon ?? "•"} ${a.name} — ${a.title} — ${a.url}`).join("\n");
42
+ }));
43
+ server.registerTool("kowlun_info", {
44
+ title: "Kowlun app versions",
45
+ description: "Show an app's URL and its recent versions; the current one is marked.",
46
+ inputSchema: { name: z.string().describe("App name from app.json") },
47
+ }, ({ name }) => run(async () => {
48
+ const { app, versions } = await appInfo(name);
49
+ const lines = [`${app.icon ?? "•"} ${app.title} — ${app.url}`];
50
+ for (const v of versions) {
51
+ lines.push(`${v.id === app.current_version ? "● current" : "○"} ${v.id} — ${new Date(v.created_at).toISOString()} — ${v.file_count} files`);
52
+ }
53
+ return lines.join("\n");
54
+ }));
55
+ server.registerTool("kowlun_rollback", {
56
+ title: "Roll back a Kowlun app",
57
+ description: "Make an earlier version current again. Without version, goes back to the previous one.",
58
+ inputSchema: {
59
+ name: z.string().describe("App name"),
60
+ version: z.string().optional().describe("Version id from kowlun_info; omit for the previous version"),
61
+ },
62
+ }, ({ name, version }) => run(async () => {
63
+ const r = await rollback(name, version);
64
+ return `${r.app} is now on version ${r.version}. URL: ${r.url}`;
65
+ }));
66
+ server.registerTool("kowlun_whoami", {
67
+ title: "Kowlun account",
68
+ description: "Check which Kowlun account is signed in. If not signed in, ask the user to run `npx -y kowlun login` in a terminal.",
69
+ inputSchema: {},
70
+ }, () => run(async () => {
71
+ const u = await whoami();
72
+ return `Signed in as ${u.name} <${u.email}>.`;
73
+ }));
74
+ await server.connect(new StdioServerTransport());
75
+ }
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "kowlun",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.3.0",
4
+ "description": "Deploy personal AI-made apps to Kowlun (kowlun.com): CLI and MCP server for coding agents",
5
+ "type": "module",
6
+ "bin": {
7
+ "kowlun": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "README.md"
12
+ ],
13
+ "engines": {
14
+ "node": ">=20"
15
+ },
16
+ "license": "UNLICENSED",
17
+ "keywords": [
18
+ "kowlun",
19
+ "mcp",
20
+ "claude-code",
21
+ "cursor",
22
+ "deploy"
23
+ ],
24
+ "homepage": "https://kowlun.com",
25
+ "scripts": {
26
+ "build": "tsc -p .",
27
+ "typecheck": "tsc -p . --noEmit",
28
+ "prepublishOnly": "tsc -p ."
29
+ },
30
+ "dependencies": {
31
+ "@modelcontextprotocol/sdk": "^1.32.0",
32
+ "commander": "^14.0.0",
33
+ "zod": "^4.0.0"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^22.0.0"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }