@kombai/cli 0.1.4-beta.2 → 0.1.5-beta.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/README.md +4 -3
- package/dist/kombai.mjs +84 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,11 +15,12 @@ canvas, and check its thumbnail. You review the designs on the canvas in your br
|
|
|
15
15
|
|
|
16
16
|
## Getting started
|
|
17
17
|
|
|
18
|
-
There is nothing to install. Agents run every command through npx
|
|
18
|
+
There is nothing to install. Agents run every command through npx, naming an exact version (the
|
|
19
|
+
Kombai plugin pins the one it runs). Put the version this page shows in place of `VERSION`:
|
|
19
20
|
|
|
20
21
|
```sh
|
|
21
|
-
npx -y @kombai/cli@
|
|
22
|
-
npx -y @kombai/cli@
|
|
22
|
+
npx -y @kombai/cli@VERSION skill # the agent's instructions
|
|
23
|
+
npx -y @kombai/cli@VERSION login # sign in through your browser
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
`login` prints a match code and opens a Kombai page in your browser. Approve the sign-in there only
|
package/dist/kombai.mjs
CHANGED
|
@@ -1766,6 +1766,17 @@ var init_chatMcpRegistrationArg = __esm({
|
|
|
1766
1766
|
}
|
|
1767
1767
|
});
|
|
1768
1768
|
|
|
1769
|
+
// ../shared/src/mcp/kombaiCliVersion.ts
|
|
1770
|
+
var KOMBAI_CLI_VERSION, KOMBAI_CLI_PACKAGE;
|
|
1771
|
+
var init_kombaiCliVersion = __esm({
|
|
1772
|
+
"../shared/src/mcp/kombaiCliVersion.ts"() {
|
|
1773
|
+
"use strict";
|
|
1774
|
+
init_define_KOMBAI_TELEMETRY();
|
|
1775
|
+
KOMBAI_CLI_VERSION = "0.1.4";
|
|
1776
|
+
KOMBAI_CLI_PACKAGE = `@kombai/cli@${KOMBAI_CLI_VERSION}`;
|
|
1777
|
+
}
|
|
1778
|
+
});
|
|
1779
|
+
|
|
1769
1780
|
// ../shared/src/mcp/codexKombaiEntry.ts
|
|
1770
1781
|
function kombaiCliMcpEntry(platform2, cliPackage = KOMBAI_CLI_PACKAGE) {
|
|
1771
1782
|
const args = ["-y", cliPackage, "mcp"];
|
|
@@ -1790,10 +1801,31 @@ function packageParts(spec) {
|
|
|
1790
1801
|
const at = spec.indexOf("@", 1);
|
|
1791
1802
|
return at === -1 ? { name: spec, tag: "latest" } : { name: spec.slice(0, at), tag: spec.slice(at + 1) };
|
|
1792
1803
|
}
|
|
1804
|
+
function kombaiCliChannel(spec) {
|
|
1805
|
+
const { tag } = packageParts(spec);
|
|
1806
|
+
if (!/^\d/.test(tag)) return tag;
|
|
1807
|
+
if (/-beta\.\d+$/.test(tag)) return "beta";
|
|
1808
|
+
return tag.includes("-") ? "alpha" : "latest";
|
|
1809
|
+
}
|
|
1810
|
+
function versionKey(tag) {
|
|
1811
|
+
const match = /^(\d+)\.(\d+)\.(\d+)(?:-[a-z]+\.(\d+))?$/.exec(tag);
|
|
1812
|
+
if (!match) return null;
|
|
1813
|
+
const [, major2, minor, patch, pre] = match;
|
|
1814
|
+
return [Number(major2), Number(minor), Number(patch), pre === void 0 ? 1 : 0, Number(pre ?? 0)];
|
|
1815
|
+
}
|
|
1816
|
+
function isAfter(a, b) {
|
|
1817
|
+
const i = a.findIndex((part, at) => part !== b[at]);
|
|
1818
|
+
return i !== -1 && a[i] > b[i];
|
|
1819
|
+
}
|
|
1793
1820
|
function kombaiCliSwitchable(entryPackage, cliPackage) {
|
|
1794
1821
|
const entry = packageParts(entryPackage);
|
|
1795
1822
|
const cli = packageParts(cliPackage);
|
|
1796
|
-
|
|
1823
|
+
if (entry.name !== cli.name || entry.tag === cli.tag) return false;
|
|
1824
|
+
if (kombaiCliChannel(entryPackage) !== kombaiCliChannel(cliPackage)) return true;
|
|
1825
|
+
const entryVersion = versionKey(entry.tag);
|
|
1826
|
+
const cliVersion = versionKey(cli.tag);
|
|
1827
|
+
if (entryVersion === null || cliVersion === null) return true;
|
|
1828
|
+
return isAfter(cliVersion, entryVersion);
|
|
1797
1829
|
}
|
|
1798
1830
|
function tomlString(value) {
|
|
1799
1831
|
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
@@ -2032,15 +2064,15 @@ function withCodexKombaiCommand(content, platform2, cliPackage) {
|
|
|
2032
2064
|
}
|
|
2033
2065
|
return bom + parts.join("");
|
|
2034
2066
|
}
|
|
2035
|
-
var KOMBAI_MCP_KEY, KOMBAI_CLI_MCP_COMMAND,
|
|
2067
|
+
var KOMBAI_MCP_KEY, KOMBAI_CLI_MCP_COMMAND, WINDOWS_SHELL_WRAPPER, KOMBAI_CLI_PACKAGE_RE, LEGACY_LAUNCHER_RE, KOMBAI_TOML_TABLE, TOML_OTHER_HEADER, KOMBAI_TOML_BLOCK_RE, KOMBAI_TOML_AT_START_RE, tomlCommandLine, tomlArgsLine, BOM, withoutBom, TOML_HEADER_LINE_RE, MULTILINE_QUOTES, MCP_SERVERS_HEADER_RE, KOMBAI_KEY_LINE_RE, MCP_SERVERS_KEY_LINE_RE, KOMBAI_TABLE_HEADER_RE, COMMAND_OR_ARGS_RE;
|
|
2036
2068
|
var init_codexKombaiEntry = __esm({
|
|
2037
2069
|
"../shared/src/mcp/codexKombaiEntry.ts"() {
|
|
2038
2070
|
"use strict";
|
|
2039
2071
|
init_define_KOMBAI_TELEMETRY();
|
|
2040
2072
|
init_chatMcpRegistrationArg();
|
|
2073
|
+
init_kombaiCliVersion();
|
|
2041
2074
|
KOMBAI_MCP_KEY = "kombai";
|
|
2042
2075
|
KOMBAI_CLI_MCP_COMMAND = "npx";
|
|
2043
|
-
KOMBAI_CLI_PACKAGE = "@kombai/cli@latest";
|
|
2044
2076
|
WINDOWS_SHELL_WRAPPER = ["cmd", "/c"];
|
|
2045
2077
|
KOMBAI_CLI_PACKAGE_RE = /^@kombai(?:-io)?\/cli(?:@[A-Za-z0-9._-]+)?$/;
|
|
2046
2078
|
LEGACY_LAUNCHER_RE = /[\\/]+\.kombai[\\/]+bin[\\/]+mcp-gateway(?:\.cmd)?(?=$|")/;
|
|
@@ -2066,18 +2098,19 @@ var init_codexKombaiEntry = __esm({
|
|
|
2066
2098
|
});
|
|
2067
2099
|
|
|
2068
2100
|
// src/lib/version.js
|
|
2069
|
-
var CLI_VERSION, CLI_RUN, CLI_PACKAGE;
|
|
2101
|
+
var CLI_VERSION, CLI_RUN, CLI_PACKAGE, CLI_OUTDATED_NEXT;
|
|
2070
2102
|
var init_version = __esm({
|
|
2071
2103
|
"src/lib/version.js"() {
|
|
2072
2104
|
"use strict";
|
|
2073
2105
|
init_define_KOMBAI_TELEMETRY();
|
|
2074
2106
|
init_codexKombaiEntry();
|
|
2075
|
-
CLI_VERSION = true ? "0.1.
|
|
2107
|
+
CLI_VERSION = true ? "0.1.5-beta.1" : (
|
|
2076
2108
|
/** @type {{ version: string }} */
|
|
2077
2109
|
JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8")).version
|
|
2078
2110
|
);
|
|
2079
|
-
CLI_RUN = true ? "npx -y @kombai/cli@beta" : `npx -y ${KOMBAI_CLI_PACKAGE}`;
|
|
2080
|
-
CLI_PACKAGE = true ? "@kombai/cli@beta" : KOMBAI_CLI_PACKAGE;
|
|
2111
|
+
CLI_RUN = true ? "npx -y @kombai/cli@0.1.5-beta.1" : `npx -y ${KOMBAI_CLI_PACKAGE}`;
|
|
2112
|
+
CLI_PACKAGE = true ? "@kombai/cli@0.1.5-beta.1" : KOMBAI_CLI_PACKAGE;
|
|
2113
|
+
CLI_OUTDATED_NEXT = "A newer Kombai CLI is out; update the Kombai plugin.";
|
|
2081
2114
|
}
|
|
2082
2115
|
});
|
|
2083
2116
|
|
|
@@ -2360,7 +2393,7 @@ var init_api = __esm({
|
|
|
2360
2393
|
this.ctx.warnings.add({
|
|
2361
2394
|
code: "CLI_OUTDATED",
|
|
2362
2395
|
message: `The backend speaks design contract ${sent}; this CLI was built for ${DESIGN_API_CONTRACT_VERSION}.`,
|
|
2363
|
-
next:
|
|
2396
|
+
next: CLI_OUTDATED_NEXT
|
|
2364
2397
|
});
|
|
2365
2398
|
}
|
|
2366
2399
|
}
|
|
@@ -10094,11 +10127,12 @@ async function installCodexEntry(codexHome, platform2, cliPackage = KOMBAI_CLI_P
|
|
|
10094
10127
|
codexConfigOf(codexHome),
|
|
10095
10128
|
"Codex"
|
|
10096
10129
|
);
|
|
10097
|
-
const done = (outcome, text, at) => ({
|
|
10130
|
+
const done = (outcome, text, at, replacedPackage = null) => ({
|
|
10098
10131
|
outcome,
|
|
10099
10132
|
disabled: codexKombaiEntryDisabled(text),
|
|
10100
10133
|
block: codexKombaiBlockText(text),
|
|
10101
|
-
configChangedAt: at
|
|
10134
|
+
configChangedAt: at,
|
|
10135
|
+
replacedPackage
|
|
10102
10136
|
});
|
|
10103
10137
|
const kind = codexKombaiEntryKind(content);
|
|
10104
10138
|
if (kind === "foreign" /* Foreign */) throw foreignEntry(file2);
|
|
@@ -10109,7 +10143,7 @@ async function installCodexEntry(codexHome, platform2, cliPackage = KOMBAI_CLI_P
|
|
|
10109
10143
|
}
|
|
10110
10144
|
const next2 = withCodexKombaiCommand(content, platform2, cliPackage);
|
|
10111
10145
|
await writeFileAtomic(target, next2, { mode });
|
|
10112
|
-
return done(InstallOutcome.Replaced, next2, Date.now());
|
|
10146
|
+
return done(InstallOutcome.Replaced, next2, Date.now(), current);
|
|
10113
10147
|
}
|
|
10114
10148
|
if (codexMcpServersInline(content)) throw inlineMcpServers(file2);
|
|
10115
10149
|
const next = withCodexKombaiBlock(content, platform2, cliPackage);
|
|
@@ -10172,7 +10206,7 @@ var init_install = __esm({
|
|
|
10172
10206
|
Already: "already",
|
|
10173
10207
|
/**
|
|
10174
10208
|
* An older Kombai build's entry was there, and the CLI's block took its place; or the CLI's entry on another
|
|
10175
|
-
* channel (a release's where a beta runs, say), which now runs this build (`kombaiCliSwitchable`).
|
|
10209
|
+
* channel or version (a release's where a beta runs, say), which now runs this build (`kombaiCliSwitchable`).
|
|
10176
10210
|
*/
|
|
10177
10211
|
Replaced: "replaced"
|
|
10178
10212
|
});
|
|
@@ -10343,9 +10377,16 @@ async function writeEntry(file2, target, content, mode, changedAt, platform2, cl
|
|
|
10343
10377
|
const current = servers?.[KOMBAI_MCP_KEY];
|
|
10344
10378
|
const kind = jsonKombaiEntryKind(current);
|
|
10345
10379
|
if (kind === "foreign" /* Foreign */) throw foreignEntry(file2, ENTRY_NAME);
|
|
10346
|
-
const done = (outcome2, entry2, at) => ({
|
|
10380
|
+
const done = (outcome2, entry2, at, replacedPackage2 = null) => ({
|
|
10381
|
+
outcome: outcome2,
|
|
10382
|
+
block: JSON.stringify(entry2),
|
|
10383
|
+
configChangedAt: at,
|
|
10384
|
+
disabled,
|
|
10385
|
+
replacedPackage: replacedPackage2
|
|
10386
|
+
});
|
|
10347
10387
|
let entry;
|
|
10348
10388
|
let outcome;
|
|
10389
|
+
let replacedPackage = null;
|
|
10349
10390
|
if (kind === "cli" /* Cli */ && isRecord4(current)) {
|
|
10350
10391
|
const running = jsonKombaiEntryPackage(current);
|
|
10351
10392
|
if (running === null || !kombaiCliSwitchable(running, cliPackage)) {
|
|
@@ -10353,13 +10394,14 @@ async function writeEntry(file2, target, content, mode, changedAt, platform2, cl
|
|
|
10353
10394
|
}
|
|
10354
10395
|
entry = withJsonKombaiCommand(current, platform2, cliPackage);
|
|
10355
10396
|
outcome = InstallOutcome.Replaced;
|
|
10397
|
+
replacedPackage = running;
|
|
10356
10398
|
} else {
|
|
10357
10399
|
entry = claudeCodeKombaiEntry(platform2, cliPackage);
|
|
10358
10400
|
outcome = kind === "legacy" /* Legacy */ ? InstallOutcome.Replaced : InstallOutcome.Added;
|
|
10359
10401
|
}
|
|
10360
10402
|
const next = { ...config2, [MCP_SERVERS]: { ...servers, [KOMBAI_MCP_KEY]: entry } };
|
|
10361
10403
|
await writeFileAtomic(target, text(next), { mode });
|
|
10362
|
-
return done(outcome, entry, Date.now());
|
|
10404
|
+
return done(outcome, entry, Date.now(), replacedPackage);
|
|
10363
10405
|
}
|
|
10364
10406
|
async function claudeCodeEntryPackage(configFile) {
|
|
10365
10407
|
try {
|
|
@@ -32460,7 +32502,7 @@ function designBriefsOf(envelope) {
|
|
|
32460
32502
|
function explainTasteError(error2, web) {
|
|
32461
32503
|
if (!(error2 instanceof CliError)) return error2;
|
|
32462
32504
|
if (error2.code === "TASTE_NO_CREDITS") error2.next = `${web}/account/plan`;
|
|
32463
|
-
if (error2.code === "TASTE_CLI_OUTDATED") error2.next =
|
|
32505
|
+
if (error2.code === "TASTE_CLI_OUTDATED") error2.next = CLI_OUTDATED_NEXT;
|
|
32464
32506
|
return error2;
|
|
32465
32507
|
}
|
|
32466
32508
|
function noAnswer(next) {
|
|
@@ -35259,7 +35301,7 @@ var init_drawings = __esm({
|
|
|
35259
35301
|
var faq_default;
|
|
35260
35302
|
var init_faq = __esm({
|
|
35261
35303
|
"src/skill/faq.md"() {
|
|
35262
|
-
faq_default = "# Questions about Kombai\n\nAnswer the user's question from this text, briefly and in your own words. To answer, run only commands that\nchange nothing (`kombai whoami`, `kombai credits`, `kombai canvas list`). If the answer is not here, say so and\npoint them to support@kombai.com; don't guess. For design work, run `kombai skill` and follow it.\n\n## What Kombai is\n\n- **What it does.** Kombai is an AI design engineer. The coding agent runs the Kombai CLI: Kombai's taste agent\n writes design directions grounded in the user's brief and repo, and the agent builds each design as HTML on a\n hosted Kombai canvas, where the user compares, edits and refines the designs in the browser.\n- **Which agents.** Claude Code, Codex, Cursor, VS Code (GitHub Copilot's agent plugins) and Antigravity have\n Kombai plugins, and Gemini CLI has a Kombai extension; any agent with a terminal can run the CLI. The Codex app\n shows the canvas beside the chat and Kombai's cards (a taste run's brief, sign-in); the Claude desktop app's Code\n tab shows the taste card only. Elsewhere the canvas opens in the agent's own browser panel or the browser.\n- **The Kombai desktop app** is not needed: the CLI designs on a hosted canvas whether or not it is installed.\n- **Requirements.** Node.js 20 or later, and a Kombai account or guest mode. Thumbnails need a Chromium browser\n (Chrome, Edge, Brave, Arc or Chromium); without one, `kombai browser install` downloads a headless Chromium of\n about 100 MB, after asking.\n\n## Account and credits\n\n- **Without an account.** `kombai guest` gives one canvas, with no taste runs, repo images, design systems or\n sharing. The guest canvas ends on the date `kombai whoami` shows; signing in keeps it.\n- **Signing in.** `kombai login` shows a match code and opens a Kombai page in the browser, or in the agent's own\n browser panel: approve there only if the codes match. `kombai whoami` shows who is signed in. `kombai logout`\n signs this machine out; `kombai logout --everywhere` also signs out every other key, the Kombai app and the website.\n- **Credits.** Taste runs spend Kombai credits; `kombai credits` shows what is left, the plan and when it refills.\n On a team plan they are the team's shared pool. With none left, its next is the plans page. The designs\n themselves are written by the user's own coding agent, on that agent's usage.\n- **Organizations.** With several, `kombai config org <id>` sets which one owns new canvases and design systems.\n\n## Designs and data\n\n- **Where designs live.** On hosted canvases in the user's Kombai account. `kombai canvas list` lists every\n one (`--project <id>` one project's; this repo's carry its `checkoutProjectId`), and\n `kombai skill opening` says how to show one to the user.\n- **Editing.** The user can edit text, styles and layout on the canvas, or ask for a change from it: the canvas\n gives them a request to paste into this chat.\n- **Into code.** Ask the agent to build a design in this project: it writes it in the repo's own framework,\n components and styles, with the design as the reference.\n- **Design systems** are .ds files in the Kombai account and need no canvas; `kombai ds list` lists them.\n- **Sharing.** A new canvas is private. `kombai canvas share --canvas <id> --on` lets anyone with the link view it\n and teammates edit it; `--off` turns that off. Only the canvas's owner can.\n- **What Kombai receives.** The brief the agent writes for a taste run, each design's HTML, the repo images a\n design uses, files the agent uploads, design systems it pushes, and the thumbnails rendered on this machine.\n The rest of the repo is not uploaded.\n- **What stays here.** The sign-in key and the working copies of canvases, under ~/.kombai/cli.\n- **Usage data.** The CLI sends Kombai an event for each command (which ran, how it ended, how long it took) and\n reports unexpected errors. `DO_NOT_TRACK=1` turns both off.\n- **Deleting.** `kombai canvas delete --canvas <id>` and `kombai ds delete <slug>` delete for everyone. Deleting\n ~/.kombai removes what is stored on this machine. To close the account, email support@kombai.com.\n\n## Setup and problems\n\n- **Permissions.** Kombai needs network access and writes ~/.kombai, so an agent with a sandbox asks to run it\n outside.\n- **The desktop app's skills.** The first Kombai command on a machine removes the skills the Kombai desktop app\n wrote into the agents' skills folders (`design-with-kombai`, `kombai-faq`, `kombai-status` and the rest), which\n drive the app instead of the CLI. Only the app's own copies go; other skills, the user's own included, stay. An\n agent session that was already open lists them until it restarts.\n- **Updates.** The
|
|
35304
|
+
faq_default = "# Questions about Kombai\n\nAnswer the user's question from this text, briefly and in your own words. To answer, run only commands that\nchange nothing (`kombai whoami`, `kombai credits`, `kombai canvas list`). If the answer is not here, say so and\npoint them to support@kombai.com; don't guess. For design work, run `kombai skill` and follow it.\n\n## What Kombai is\n\n- **What it does.** Kombai is an AI design engineer. The coding agent runs the Kombai CLI: Kombai's taste agent\n writes design directions grounded in the user's brief and repo, and the agent builds each design as HTML on a\n hosted Kombai canvas, where the user compares, edits and refines the designs in the browser.\n- **Which agents.** Claude Code, Codex, Cursor, VS Code (GitHub Copilot's agent plugins) and Antigravity have\n Kombai plugins, and Gemini CLI has a Kombai extension; any agent with a terminal can run the CLI. The Codex app\n shows the canvas beside the chat and Kombai's cards (a taste run's brief, sign-in); the Claude desktop app's Code\n tab shows the taste card only. Elsewhere the canvas opens in the agent's own browser panel or the browser.\n- **The Kombai desktop app** is not needed: the CLI designs on a hosted canvas whether or not it is installed.\n- **Requirements.** Node.js 20 or later, and a Kombai account or guest mode. Thumbnails need a Chromium browser\n (Chrome, Edge, Brave, Arc or Chromium); without one, `kombai browser install` downloads a headless Chromium of\n about 100 MB, after asking.\n\n## Account and credits\n\n- **Without an account.** `kombai guest` gives one canvas, with no taste runs, repo images, design systems or\n sharing. The guest canvas ends on the date `kombai whoami` shows; signing in keeps it.\n- **Signing in.** `kombai login` shows a match code and opens a Kombai page in the browser, or in the agent's own\n browser panel: approve there only if the codes match. `kombai whoami` shows who is signed in. `kombai logout`\n signs this machine out; `kombai logout --everywhere` also signs out every other key, the Kombai app and the website.\n- **Credits.** Taste runs spend Kombai credits; `kombai credits` shows what is left, the plan and when it refills.\n On a team plan they are the team's shared pool. With none left, its next is the plans page. The designs\n themselves are written by the user's own coding agent, on that agent's usage.\n- **Organizations.** With several, `kombai config org <id>` sets which one owns new canvases and design systems.\n\n## Designs and data\n\n- **Where designs live.** On hosted canvases in the user's Kombai account. `kombai canvas list` lists every\n one (`--project <id>` one project's; this repo's carry its `checkoutProjectId`), and\n `kombai skill opening` says how to show one to the user.\n- **Editing.** The user can edit text, styles and layout on the canvas, or ask for a change from it: the canvas\n gives them a request to paste into this chat.\n- **Into code.** Ask the agent to build a design in this project: it writes it in the repo's own framework,\n components and styles, with the design as the reference.\n- **Design systems** are .ds files in the Kombai account and need no canvas; `kombai ds list` lists them.\n- **Sharing.** A new canvas is private. `kombai canvas share --canvas <id> --on` lets anyone with the link view it\n and teammates edit it; `--off` turns that off. Only the canvas's owner can.\n- **What Kombai receives.** The brief the agent writes for a taste run, each design's HTML, the repo images a\n design uses, files the agent uploads, design systems it pushes, and the thumbnails rendered on this machine.\n The rest of the repo is not uploaded.\n- **What stays here.** The sign-in key and the working copies of canvases, under ~/.kombai/cli.\n- **Usage data.** The CLI sends Kombai an event for each command (which ran, how it ended, how long it took) and\n reports unexpected errors. `DO_NOT_TRACK=1` turns both off.\n- **Deleting.** `kombai canvas delete --canvas <id>` and `kombai ds delete <slug>` delete for everyone. Deleting\n ~/.kombai removes what is stored on this machine. To close the account, email support@kombai.com.\n\n## Setup and problems\n\n- **Permissions.** Kombai needs network access and writes ~/.kombai, so an agent with a sandbox asks to run it\n outside.\n- **The desktop app's skills.** The first Kombai command on a machine removes the skills the Kombai desktop app\n wrote into the agents' skills folders (`design-with-kombai`, `kombai-faq`, `kombai-status` and the rest), which\n drive the app instead of the CLI. Only the app's own copies go; other skills, the user's own included, stay. An\n agent session that was already open lists them until it restarts.\n- **Updates.** The Kombai plugin pins the CLI version, so the CLI updates when the plugin updates, through the\n agent's own plugin manager. A global install updates with npm.\n- **Reporting a problem.** Email support@kombai.com with the command, the JSON line it printed and the version\n `kombai --version` prints.\n";
|
|
35263
35305
|
}
|
|
35264
35306
|
});
|
|
35265
35307
|
|
|
@@ -35319,16 +35361,24 @@ function topicText(topic, app) {
|
|
|
35319
35361
|
async function viewChannelNote() {
|
|
35320
35362
|
const running = await codexEntryPackage(codexHomeOf(process.env, os3.homedir()));
|
|
35321
35363
|
if (running === null || !kombaiCliSwitchable(running, CLI_PACKAGE)) return "";
|
|
35322
|
-
|
|
35364
|
+
const install = `before anything else, run \`${CLI_RUN} mcp install codex\` and follow its next.
|
|
35323
35365
|
|
|
35324
35366
|
`;
|
|
35367
|
+
if (kombaiCliChannel(running) === kombaiCliChannel(CLI_PACKAGE)) {
|
|
35368
|
+
return `Kombai's view in this Codex runs \`${running}\`, another version of this CLI (\`${CLI_PACKAGE}\`): ${install}`;
|
|
35369
|
+
}
|
|
35370
|
+
return `Kombai's view in this Codex runs \`${running}\`, another build than this CLI (\`${CLI_PACKAGE}\`), so a canvas this CLI makes may not open in it: ${install}`;
|
|
35325
35371
|
}
|
|
35326
35372
|
async function serverChannelNote() {
|
|
35327
35373
|
const running = await claudeCodeEntryPackage(await claudeCodeConfigOf(process.env, os3.homedir()));
|
|
35328
35374
|
if (running === null || !kombaiCliSwitchable(running, CLI_PACKAGE)) return "";
|
|
35329
|
-
|
|
35375
|
+
const install = `before anything else, run \`${CLI_RUN} mcp install claude-code\` and follow its next.
|
|
35330
35376
|
|
|
35331
35377
|
`;
|
|
35378
|
+
if (kombaiCliChannel(running) === kombaiCliChannel(CLI_PACKAGE)) {
|
|
35379
|
+
return `Kombai's MCP server in Claude Code runs \`${running}\`, another version of this CLI (\`${CLI_PACKAGE}\`): ${install}`;
|
|
35380
|
+
}
|
|
35381
|
+
return `Kombai's MCP server in Claude Code runs \`${running}\`, another build than this CLI (\`${CLI_PACKAGE}\`), so its taste card may not find a run this CLI starts: ${install}`;
|
|
35332
35382
|
}
|
|
35333
35383
|
var TOPICS, RUN, APP_NOTES, CHANNEL_NOTES, skill, PLAIN_TEXT;
|
|
35334
35384
|
var init_skill = __esm({
|
|
@@ -35420,6 +35470,12 @@ async function installClaudeCode(ctx) {
|
|
|
35420
35470
|
next: `Kombai's MCP server is set up in ${config2} but turned off in this project (/mcp disable), so no session here gets Kombai's taste card: tell the user in one line that \`/mcp enable kombai\` turns it back on, and carry on here; don't run this again in this session.`
|
|
35421
35471
|
};
|
|
35422
35472
|
}
|
|
35473
|
+
if (install.outcome === InstallOutcome.Replaced && sameBackend(install.replacedPackage)) {
|
|
35474
|
+
return {
|
|
35475
|
+
...answer2,
|
|
35476
|
+
next: `Kombai's MCP server in ${config2} now runs \`${CLI_PACKAGE}\` for new Claude Code sessions. It ran another version on the same backend, so where taste_card is among your tools, use it as the skill says, and don't run this again in this session. Otherwise: ${CLAUDE_CARRY_ON}`
|
|
35477
|
+
};
|
|
35478
|
+
}
|
|
35423
35479
|
if (install.outcome === InstallOutcome.Replaced) {
|
|
35424
35480
|
return {
|
|
35425
35481
|
...answer2,
|
|
@@ -35445,7 +35501,7 @@ async function installClaudeCode(ctx) {
|
|
|
35445
35501
|
next: `Kombai's MCP server is set up in ${config2}, but ` + (startedAt === null ? "this session seems to predate it" : "this session started before Kombai's entry last changed") + `, and Claude Code gives a session only the MCP servers it had when it started. ${CLAUDE_CARRY_ON}`
|
|
35446
35502
|
};
|
|
35447
35503
|
}
|
|
35448
|
-
var CLIENT_ARG, HANDOFF, serverCommand, CLAUDE_CARRY_ON, mcpInstall, mcpUninstall, mcp;
|
|
35504
|
+
var CLIENT_ARG, HANDOFF, serverCommand, sameBackend, CLAUDE_CARRY_ON, mcpInstall, mcpUninstall, mcp;
|
|
35449
35505
|
var init_mcp = __esm({
|
|
35450
35506
|
"src/commands/mcp.js"() {
|
|
35451
35507
|
"use strict";
|
|
@@ -35465,6 +35521,7 @@ var init_mcp = __esm({
|
|
|
35465
35521
|
const { command, args } = kombaiCliMcpEntry(platform2, CLI_PACKAGE);
|
|
35466
35522
|
return [command, ...args].join(" ");
|
|
35467
35523
|
};
|
|
35524
|
+
sameBackend = (replacedPackage) => replacedPackage !== null && kombaiCliChannel(replacedPackage) === kombaiCliChannel(CLI_PACKAGE);
|
|
35468
35525
|
CLAUDE_CARRY_ON = "Tell the user in one line that new sessions show Kombai's taste card, and carry on here as the skill says (the canvas still opens in your Browser pane); don't run this again in this session.";
|
|
35469
35526
|
mcpInstall = {
|
|
35470
35527
|
name: "mcp install",
|
|
@@ -35496,6 +35553,14 @@ var init_mcp = __esm({
|
|
|
35496
35553
|
};
|
|
35497
35554
|
}
|
|
35498
35555
|
const changedAt = await entryChangedAt(ctx.home, McpClient.Codex, config2, install);
|
|
35556
|
+
if (outcome === InstallOutcome.Replaced && sameBackend(install.replacedPackage)) {
|
|
35557
|
+
return {
|
|
35558
|
+
client: McpClient.Codex,
|
|
35559
|
+
outcome,
|
|
35560
|
+
config: config2,
|
|
35561
|
+
next: `Kombai's view runs \`${CLI_PACKAGE}\` in new Codex tasks; it ran another version on the same backend, whose view still opens this CLI's canvases. If canvas_app is among your tools, carry on here as the skill says, and start no new task for it. Otherwise this task never picks up a new or changed MCP server: ${HANDOFF}`
|
|
35562
|
+
};
|
|
35563
|
+
}
|
|
35499
35564
|
if (outcome !== InstallOutcome.Already) {
|
|
35500
35565
|
return {
|
|
35501
35566
|
client: McpClient.Codex,
|
package/package.json
CHANGED