kowlun 0.1.0 → 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,6 +1,6 @@
1
1
  # kowlun
2
2
 
3
- CLI and MCP server for **SuperApp** ([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.
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
4
 
5
5
  ## Quick start
6
6
 
@@ -9,7 +9,7 @@ npx kowlun login # confirm the code in your browser
9
9
  npx kowlun deploy ./my-app # → https://my-app.kowlun.app
10
10
  ```
11
11
 
12
- Or install globally: `npm i -g kowlun` — then use `kowlun …` (alias `superapp …`).
12
+ Or install globally: `npm i -g kowlun` — then use `kowlun …`.
13
13
 
14
14
  ## Commands
15
15
 
@@ -29,18 +29,18 @@ kowlun logout
29
29
  Claude Code:
30
30
 
31
31
  ```
32
- claude mcp add superapp -- npx -y kowlun mcp
32
+ claude mcp add kowlun -- npx -y kowlun mcp
33
33
  ```
34
34
 
35
- On native Windows: `claude mcp add superapp -- cmd /c npx -y kowlun mcp`.
35
+ On native Windows: `claude mcp add kowlun -- cmd /c npx -y kowlun mcp`.
36
36
 
37
37
  Cursor, `.cursor/mcp.json`:
38
38
 
39
39
  ```json
40
- { "mcpServers": { "superapp": { "command": "npx", "args": ["-y", "kowlun", "mcp"] } } }
40
+ { "mcpServers": { "kowlun": { "command": "npx", "args": ["-y", "kowlun", "mcp"] } } }
41
41
  ```
42
42
 
43
- Tools: `superapp_deploy`, `superapp_list`, `superapp_info`, `superapp_rollback`, `superapp_whoami`. Sign in once with `npx kowlun login` before using them.
43
+ Tools: `kowlun_deploy`, `kowlun_list`, `kowlun_info`, `kowlun_rollback`, `kowlun_whoami`. Sign in once with `npx kowlun login` before using them.
44
44
 
45
45
  ## App format
46
46
 
@@ -52,7 +52,7 @@ my-app/
52
52
 
53
53
  ## Environment
54
54
 
55
- - `SUPERAPP_API` — platform address (default `https://kowlun.com`). For local development: `kowlun login --api http://localhost:8787`.
56
- - `SUPERAPP_TOKEN` — session token instead of `login` (CI).
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
57
 
58
- Sign-in is stored in `~/.superapp/config.json`.
58
+ Sign-in is stored in `~/.kowlun/config.json`.
package/dist/config.js CHANGED
@@ -1,10 +1,10 @@
1
- // Хранение входа CLI: ~/.superapp/config.json (только для текущего пользователя ОС).
1
+ // Хранение входа CLI: ~/.kowlun/config.json (только для текущего пользователя ОС).
2
2
  import { mkdir, readFile, rm, writeFile, chmod } from "node:fs/promises";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
5
- const DIR = join(homedir(), ".superapp");
5
+ const DIR = join(homedir(), ".kowlun");
6
6
  const FILE = join(DIR, "config.json");
7
- /** Прод. Для локальной разработки: `superapp login --api http://localhost:8787` или SUPERAPP_API. */
7
+ /** Прод. Для локальной разработки: `kowlun login --api http://localhost:8787` или KOWLUN_API. */
8
8
  const DEFAULT_API = "https://kowlun.com";
9
9
  export async function loadConfig() {
10
10
  let saved = {};
@@ -15,8 +15,8 @@ export async function loadConfig() {
15
15
  /* ещё не входили */
16
16
  }
17
17
  return {
18
- api: (process.env.SUPERAPP_API ?? saved.api ?? DEFAULT_API).replace(/\/$/, ""),
19
- token: process.env.SUPERAPP_TOKEN ?? saved.token,
18
+ api: (process.env.KOWLUN_API ?? saved.api ?? DEFAULT_API).replace(/\/$/, ""),
19
+ token: process.env.KOWLUN_TOKEN ?? saved.token,
20
20
  email: saved.email,
21
21
  };
22
22
  }
package/dist/core.js CHANGED
@@ -3,20 +3,25 @@
3
3
  import { readFile, readdir, stat } from "node:fs/promises";
4
4
  import { join, relative, resolve, sep } from "node:path";
5
5
  import { loadConfig } from "./config.js";
6
+ import { lang, say } from "./i18n.js";
6
7
  export class CliError extends Error {
7
8
  }
8
9
  const IGNORE = new Set(["node_modules", ".git", ".DS_Store", "Thumbs.db"]);
9
- export const kb = (n) => (n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} КБ` : `${(n / 1024 / 1024).toFixed(1)} МБ`);
10
+ export const kb = (n) => n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} ${say("KB", "КБ")}` : `${(n / 1024 / 1024).toFixed(1)} ${say("MB", "МБ")}`;
10
11
  export async function http(config, path, init = {}, auth = true) {
11
12
  let res;
12
13
  try {
13
14
  res = await fetch(config.api + path, {
14
15
  ...init,
15
- headers: { ...(auth && config.token ? { authorization: `Bearer ${config.token}` } : {}), ...(init.headers ?? {}) },
16
+ headers: {
17
+ "accept-language": lang,
18
+ ...(auth && config.token ? { authorization: `Bearer ${config.token}` } : {}),
19
+ ...(init.headers ?? {}),
20
+ },
16
21
  });
17
22
  }
18
23
  catch {
19
- throw new CliError(`Не удалось подключиться к ${config.api}. Проверьте интернет (локально — запущен ли pnpm run dev:api).`);
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).`));
20
25
  }
21
26
  return { status: res.status, body: await res.json().catch(() => ({})) };
22
27
  }
@@ -24,12 +29,12 @@ export async function http(config, path, init = {}, auth = true) {
24
29
  export async function api(path, init = {}) {
25
30
  const config = await loadConfig();
26
31
  if (!config.token)
27
- throw new CliError("Сначала войдите: npx kowlun login");
32
+ throw new CliError(say("Sign in first: npx kowlun login", "Сначала войдите: npx kowlun login"));
28
33
  const { status, body } = await http(config, path, init);
29
34
  if (status === 401)
30
- throw new CliError("Вход истёк. Войдите снова: npx kowlun login");
35
+ throw new CliError(say("Your sign-in has expired. Sign in again: npx kowlun login", "Вход истёк. Войдите снова: npx kowlun login"));
31
36
  if (status >= 400)
32
- throw new CliError(body.message ?? body.error ?? `API ответил ${status}`);
37
+ throw new CliError(body.message ?? body.error ?? say(`API responded ${status}`, `API ответил ${status}`));
33
38
  return body;
34
39
  }
35
40
  async function walk(root, dir, out) {
@@ -57,22 +62,22 @@ export async function deploy(dirArg) {
57
62
  manifestRaw = await readFile(join(dir, "app.json"), "utf8");
58
63
  }
59
64
  catch {
60
- throw new CliError(`В ${dir} нет app.json.`);
65
+ throw new CliError(say(`There is no app.json in ${dir}.`, `В ${dir} нет app.json.`));
61
66
  }
62
67
  let manifest;
63
68
  try {
64
69
  manifest = JSON.parse(manifestRaw);
65
70
  }
66
71
  catch {
67
- throw new CliError("app.json — не валидный JSON.");
72
+ throw new CliError(say("app.json is not valid JSON.", "app.json — не валидный JSON."));
68
73
  }
69
74
  if (!manifest.name)
70
- throw new CliError("В app.json нет поля name.");
75
+ throw new CliError(say("app.json has no name field.", "В app.json нет поля name."));
71
76
  const paths = [];
72
77
  await walk(dir, join(dir, "web"), paths);
73
78
  await walk(dir, join(dir, "server"), paths);
74
79
  if (!paths.includes("web/index.html"))
75
- throw new CliError(`Нет ${join(dir, "web", "index.html")}.`);
80
+ throw new CliError(say(`Missing ${join(dir, "web", "index.html")}.`, `Нет ${join(dir, "web", "index.html")}.`));
76
81
  const form = new FormData();
77
82
  form.set("manifest", manifestRaw);
78
83
  let bytes = 0;
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 CHANGED
@@ -1,22 +1,23 @@
1
1
  #!/usr/bin/env node
2
- // SuperApp CLI.
2
+ // Kowlun CLI.
3
3
  //
4
- // superapp login войти (подтверждение в браузере)
5
- // superapp logout выйти
6
- // superapp whoami кто вошёл
7
- // superapp deploy [dir] залить апку
8
- // superapp list мои апки
9
- // superapp info <name> версии апки
10
- // superapp rollback <name> откатить на прошлую версию
11
- // superapp mcp MCP-сервер для агентов (stdio)
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
12
  //
13
- // Переменные окружения: SUPERAPP_API (адрес платформы), SUPERAPP_TOKEN (токен вместо входа, для CI).
13
+ // Переменные окружения: KOWLUN_API (адрес платформы), KOWLUN_TOKEN (токен вместо входа, для CI).
14
14
  import { Command } from "commander";
15
15
  import { spawn } from "node:child_process";
16
16
  import { clearConfig, configPath, loadConfig, saveConfig } from "./config.js";
17
17
  import { appInfo, CliError, deploy, http, kb, listApps, rollback, whoami } from "./core.js";
18
- const VERSION = "0.1.0";
19
- const CLIENT_ID = "superapp-cli";
18
+ import { filesCount, say } from "./i18n.js";
19
+ const VERSION = "0.3.0";
20
+ const CLIENT_ID = "kowlun-cli";
20
21
  function fail(message) {
21
22
  console.error(`✖ ${message}`);
22
23
  process.exit(1);
@@ -32,6 +33,7 @@ const run = (fn) => async (...args) => {
32
33
  throw e;
33
34
  }
34
35
  };
36
+ const EXPIRED = () => say("The code has expired. Run npx kowlun login again.", "Код истёк. Запустите npx kowlun login ещё раз.");
35
37
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
36
38
  function openBrowser(url) {
37
39
  const [cmd, args] = process.platform === "win32"
@@ -46,29 +48,29 @@ function openBrowser(url) {
46
48
  /* не открылся — ссылка всё равно напечатана */
47
49
  }
48
50
  }
49
- const program = new Command().name("kowlun").description("Деплой персональных апок в SuperApp").version(VERSION);
51
+ const program = new Command().name("kowlun").description(say("Deploy personal apps to Kowlun", "Деплой персональных апок в Kowlun")).version(VERSION);
50
52
  // --- Вход ------------------------------------------------------------------------------
51
53
  program
52
54
  .command("login")
53
- .description("Войти: подтвердите код в браузере")
54
- .option("--api <url>", "адрес платформы")
55
- .option("--no-open", "не открывать браузер автоматически")
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", "не открывать браузер автоматически"))
56
58
  .action(run(async (opts) => {
57
59
  const config = await loadConfig();
58
60
  if (opts.api)
59
61
  config.api = opts.api.replace(/\/$/, "");
60
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);
61
63
  if (start.status >= 400)
62
- fail(start.body.message ?? start.body.error_description ?? "Не удалось начать вход.");
64
+ fail(start.body.message ?? start.body.error_description ?? say("Couldn't start sign-in.", "Не удалось начать вход."));
63
65
  const { device_code, user_code, verification_uri_complete, verification_uri, interval = 5, expires_in = 900 } = start.body;
64
66
  const link = new URL(verification_uri_complete ?? verification_uri, config.api).toString();
65
- console.log(`\nКод: ${user_code}`);
66
- console.log(`Подтвердите вход в браузере: ${link}\n`);
67
+ console.log(`\n${say("Code", "Код")}: ${user_code}`);
68
+ console.log(`${say("Confirm sign-in in your browser", "Подтвердите вход в браузере")}: ${link}\n`);
67
69
  if (opts.open)
68
70
  openBrowser(link);
69
71
  let wait = Number(interval) * 1000;
70
72
  const deadline = Date.now() + Number(expires_in) * 1000;
71
- process.stdout.write("Ждём подтверждения");
73
+ process.stdout.write(say("Waiting for confirmation", "Ждём подтверждения"));
72
74
  while (Date.now() < deadline) {
73
75
  await sleep(wait);
74
76
  process.stdout.write(".");
@@ -82,7 +84,7 @@ program
82
84
  const me = await http(config, "/v1/me");
83
85
  config.email = me.body.user?.email;
84
86
  await saveConfig(config);
85
- console.log(`\n✔ Вы вошли как ${config.email ?? "пользователь"}`);
87
+ console.log(`\n✔ ${say("Signed in as", "Вы вошли как")} ${config.email ?? say("user", "пользователь")}`);
86
88
  return;
87
89
  }
88
90
  const error = poll.body.error;
@@ -93,80 +95,80 @@ program
93
95
  continue;
94
96
  }
95
97
  if (error === "access_denied")
96
- fail("\nВход отклонён.");
98
+ fail(`\n${say("Sign-in declined.", "Вход отклонён.")}`);
97
99
  if (error === "expired_token")
98
- fail("\nКод истёк. Запустите npx kowlun login ещё раз.");
99
- fail(`\n${poll.body.error_description ?? error ?? "Не удалось войти."}`);
100
+ fail(`\n${EXPIRED()}`);
101
+ fail(`\n${poll.body.error_description ?? error ?? say("Couldn't sign in.", "Не удалось войти.")}`);
100
102
  }
101
- fail("\nКод истёк. Запустите npx kowlun login ещё раз.");
103
+ fail(`\n${EXPIRED()}`);
102
104
  }));
103
105
  program
104
106
  .command("logout")
105
- .description("Выйти")
107
+ .description(say("Sign out", "Выйти"))
106
108
  .action(run(async () => {
107
109
  const config = await loadConfig();
108
110
  if (config.token) {
109
111
  await http(config, "/api/auth/sign-out", { method: "POST", headers: { "content-type": "application/json" }, body: "{}" }).catch(() => { });
110
112
  }
111
113
  await clearConfig();
112
- console.log("✔ Вы вышли");
114
+ console.log(`✔ ${say("Signed out", "Вы вышли")}`);
113
115
  }));
114
116
  program
115
117
  .command("whoami")
116
- .description("Кто вошёл")
118
+ .description(say("Who is signed in", "Кто вошёл"))
117
119
  .action(run(async () => {
118
120
  const user = await whoami();
119
121
  const config = await loadConfig();
120
122
  console.log(`${user.name || user.email} <${user.email}> · ${config.api}`);
121
- console.log(`Вход сохранён в ${configPath}`);
123
+ console.log(`${say("Sign-in is saved in", "Вход сохранён в")} ${configPath}`);
122
124
  }));
123
125
  // --- Апки ------------------------------------------------------------------------------
124
126
  program
125
127
  .command("deploy")
126
- .description("Залить папку с app.json")
127
- .argument("[dir]", "папка апки", ".")
128
+ .description(say("Deploy a folder with app.json", "Залить папку с app.json"))
129
+ .argument("[dir]", say("app folder", "папка апки"), ".")
128
130
  .action(run(async (dir) => {
129
131
  const r = await deploy(dir);
130
- console.log(`✔ ${r.app}: версия ${r.version} опубликована (${r.files} файлов, ${kb(r.bytes)})`);
132
+ console.log(say(`✔ ${r.app}: version ${r.version} published`, `✔ ${r.app}: версия ${r.version} опубликована`) + ` (${filesCount(r.files)}, ${kb(r.bytes)})`);
131
133
  for (const w of r.warnings)
132
134
  console.log(`! ${w}`);
133
135
  console.log(`→ ${r.url}`);
134
136
  }));
135
137
  program
136
138
  .command("list")
137
- .description("Мои апки")
139
+ .description(say("My apps", "Мои апки"))
138
140
  .action(run(async () => {
139
141
  const apps = await listApps();
140
142
  if (!apps.length)
141
- return console.log("Апок пока нет. Залейте первую: npx kowlun deploy <папка>");
143
+ return console.log(say("No apps yet. Deploy your first one: npx kowlun deploy <folder>", "Апок пока нет. Залейте первую: npx kowlun deploy <папка>"));
142
144
  for (const a of apps)
143
145
  console.log(`${a.icon ?? "•"} ${a.name.padEnd(24)} ${a.title.padEnd(28)} ${a.url}`);
144
146
  }));
145
147
  program
146
148
  .command("info")
147
- .description("Версии апки")
149
+ .description(say("App versions", "Версии апки"))
148
150
  .argument("<name>")
149
151
  .action(run(async (name) => {
150
152
  const { app, versions } = await appInfo(name);
151
153
  console.log(`${app.icon ?? "•"} ${app.title} → ${app.url}`);
152
154
  for (const v of versions) {
153
155
  const mark = v.id === app.current_version ? "●" : "○";
154
- console.log(`${mark} ${v.id} ${new Date(v.created_at).toLocaleString()} ${v.file_count} файлов, ${kb(v.total_bytes)}`);
156
+ console.log(`${mark} ${v.id} ${new Date(v.created_at).toLocaleString()} ${filesCount(v.file_count)}, ${kb(v.total_bytes)}`);
155
157
  }
156
158
  }));
157
159
  program
158
160
  .command("rollback")
159
- .description("Откатить на прошлую версию (или на указанную)")
161
+ .description(say("Roll back to the previous version (or a given one)", "Откатить на прошлую версию (или на указанную)"))
160
162
  .argument("<name>")
161
163
  .argument("[version]")
162
164
  .action(run(async (name, version) => {
163
165
  const r = await rollback(name, version);
164
- console.log(`✔ ${name} теперь на версии ${r.version}`);
166
+ console.log(say(`✔ ${name} is now on version ${r.version}`, `✔ ${name} теперь на версии ${r.version}`));
165
167
  }));
166
168
  // --- MCP ---------------------------------------------------------------------------------
167
169
  program
168
170
  .command("mcp")
169
- .description("MCP-сервер для ИИ-агентов (Claude Code, Cursor): деплой и откат апок")
171
+ .description(say("MCP server for AI agents (Claude Code, Cursor): deploy and roll back apps", "MCP-сервер для ИИ-агентов (Claude Code, Cursor): деплой и откат апок"))
170
172
  .action(async () => {
171
173
  const { startMcp } = await import("./mcp.js");
172
174
  await startMcp(VERSION);
package/dist/mcp.js CHANGED
@@ -1,5 +1,5 @@
1
- // MCP-сервер SuperApp поверх stdio: агент (Claude Code, Cursor) заливает и откатывает апки сам.
2
- // Вход — тот же, что у CLI (~/.superapp/config.json). Запуск: superapp mcp.
1
+ // MCP-сервер Kowlun поверх stdio: агент (Claude Code, Cursor) заливает и откатывает апки сам.
2
+ // Вход — тот же, что у CLI (~/.kowlun/config.json). Запуск: kowlun mcp.
3
3
  // Важно: в stdout пишет только протокол MCP, никаких console.log.
4
4
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
5
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -16,11 +16,11 @@ async function run(fn) {
16
16
  }
17
17
  }
18
18
  export async function startMcp(version) {
19
- const server = new McpServer({ name: "superapp", version });
20
- server.registerTool("superapp_deploy", {
21
- title: "Deploy app to SuperApp",
22
- description: "Publish a SuperApp 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 superapp_rollback to go back.",
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
24
  inputSchema: { path: z.string().describe("Absolute path to the app folder (the one with app.json)") },
25
25
  }, ({ path }) => run(async () => {
26
26
  const r = await deploy(path);
@@ -30,9 +30,9 @@ export async function startMcp(version) {
30
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
31
  return lines.join("\n");
32
32
  }));
33
- server.registerTool("superapp_list", {
34
- title: "List my SuperApp apps",
35
- description: "List the signed-in user's SuperApp apps with their URLs.",
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
36
  inputSchema: {},
37
37
  }, () => run(async () => {
38
38
  const apps = await listApps();
@@ -40,8 +40,8 @@ export async function startMcp(version) {
40
40
  return "No apps yet.";
41
41
  return apps.map((a) => `${a.icon ?? "•"} ${a.name} — ${a.title} — ${a.url}`).join("\n");
42
42
  }));
43
- server.registerTool("superapp_info", {
44
- title: "SuperApp app versions",
43
+ server.registerTool("kowlun_info", {
44
+ title: "Kowlun app versions",
45
45
  description: "Show an app's URL and its recent versions; the current one is marked.",
46
46
  inputSchema: { name: z.string().describe("App name from app.json") },
47
47
  }, ({ name }) => run(async () => {
@@ -52,20 +52,20 @@ export async function startMcp(version) {
52
52
  }
53
53
  return lines.join("\n");
54
54
  }));
55
- server.registerTool("superapp_rollback", {
56
- title: "Roll back a SuperApp app",
55
+ server.registerTool("kowlun_rollback", {
56
+ title: "Roll back a Kowlun app",
57
57
  description: "Make an earlier version current again. Without version, goes back to the previous one.",
58
58
  inputSchema: {
59
59
  name: z.string().describe("App name"),
60
- version: z.string().optional().describe("Version id from superapp_info; omit for the previous version"),
60
+ version: z.string().optional().describe("Version id from kowlun_info; omit for the previous version"),
61
61
  },
62
62
  }, ({ name, version }) => run(async () => {
63
63
  const r = await rollback(name, version);
64
64
  return `${r.app} is now on version ${r.version}. URL: ${r.url}`;
65
65
  }));
66
- server.registerTool("superapp_whoami", {
67
- title: "SuperApp account",
68
- description: "Check which SuperApp account is signed in. If not signed in, ask the user to run `npx -y kowlun login` in a terminal.",
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
69
  inputSchema: {},
70
70
  }, () => run(async () => {
71
71
  const u = await whoami();
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "kowlun",
3
- "version": "0.1.0",
4
- "description": "Deploy personal AI-made apps to SuperApp (kowlun.com): CLI and MCP server for coding agents",
3
+ "version": "0.3.0",
4
+ "description": "Deploy personal AI-made apps to Kowlun (kowlun.com): CLI and MCP server for coding agents",
5
5
  "type": "module",
6
6
  "bin": {
7
- "kowlun": "dist/index.js",
8
- "superapp": "dist/index.js"
7
+ "kowlun": "dist/index.js"
9
8
  },
10
9
  "files": [
11
10
  "dist",
@@ -16,7 +15,6 @@
16
15
  },
17
16
  "license": "UNLICENSED",
18
17
  "keywords": [
19
- "superapp",
20
18
  "kowlun",
21
19
  "mcp",
22
20
  "claude-code",