@kombai/cli 0.1.4 → 0.1.5-beta.2
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 +2 -1
- package/dist/kombai.mjs +73 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,8 @@ 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 (the Kombai plugin pins the version
|
|
19
|
+
it runs):
|
|
19
20
|
|
|
20
21
|
```sh
|
|
21
22
|
npx -y @kombai/cli@latest skill # the agent's instructions
|
package/dist/kombai.mjs
CHANGED
|
@@ -1557,9 +1557,9 @@ var init_env = __esm({
|
|
|
1557
1557
|
preprod: { api: "https://api.assistant.preprod.kombai.com", web: "https://agent.preprod.kombai.com" },
|
|
1558
1558
|
prod: { api: "https://api.assistant.app.kombai.com", web: "https://agent.kombai.com" }
|
|
1559
1559
|
});
|
|
1560
|
-
DEFAULT_ENV = Object.hasOwn(ENVIRONMENTS, "
|
|
1560
|
+
DEFAULT_ENV = Object.hasOwn(ENVIRONMENTS, "preprod") ? (
|
|
1561
1561
|
/** @type {EnvName} */
|
|
1562
|
-
"
|
|
1562
|
+
"preprod"
|
|
1563
1563
|
) : "prod";
|
|
1564
1564
|
}
|
|
1565
1565
|
});
|
|
@@ -1790,10 +1790,31 @@ function packageParts(spec) {
|
|
|
1790
1790
|
const at = spec.indexOf("@", 1);
|
|
1791
1791
|
return at === -1 ? { name: spec, tag: "latest" } : { name: spec.slice(0, at), tag: spec.slice(at + 1) };
|
|
1792
1792
|
}
|
|
1793
|
+
function kombaiCliChannel(spec) {
|
|
1794
|
+
const { tag } = packageParts(spec);
|
|
1795
|
+
if (!/^\d/.test(tag)) return tag;
|
|
1796
|
+
if (/-beta\.\d+$/.test(tag)) return "beta";
|
|
1797
|
+
return tag.includes("-") ? "alpha" : "latest";
|
|
1798
|
+
}
|
|
1799
|
+
function versionKey(tag) {
|
|
1800
|
+
const match = /^(\d+)\.(\d+)\.(\d+)(?:-[a-z]+\.(\d+))?$/.exec(tag);
|
|
1801
|
+
if (!match) return null;
|
|
1802
|
+
const [, major2, minor, patch, pre] = match;
|
|
1803
|
+
return [Number(major2), Number(minor), Number(patch), pre === void 0 ? 1 : 0, Number(pre ?? 0)];
|
|
1804
|
+
}
|
|
1805
|
+
function isAfter(a, b) {
|
|
1806
|
+
const i = a.findIndex((part, at) => part !== b[at]);
|
|
1807
|
+
return i !== -1 && a[i] > b[i];
|
|
1808
|
+
}
|
|
1793
1809
|
function kombaiCliSwitchable(entryPackage, cliPackage) {
|
|
1794
1810
|
const entry = packageParts(entryPackage);
|
|
1795
1811
|
const cli = packageParts(cliPackage);
|
|
1796
|
-
|
|
1812
|
+
if (entry.name !== cli.name || entry.tag === cli.tag) return false;
|
|
1813
|
+
if (kombaiCliChannel(entryPackage) !== kombaiCliChannel(cliPackage)) return true;
|
|
1814
|
+
const entryVersion = versionKey(entry.tag);
|
|
1815
|
+
const cliVersion = versionKey(cli.tag);
|
|
1816
|
+
if (entryVersion === null || cliVersion === null) return true;
|
|
1817
|
+
return isAfter(cliVersion, entryVersion);
|
|
1797
1818
|
}
|
|
1798
1819
|
function tomlString(value) {
|
|
1799
1820
|
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
@@ -2066,18 +2087,19 @@ var init_codexKombaiEntry = __esm({
|
|
|
2066
2087
|
});
|
|
2067
2088
|
|
|
2068
2089
|
// src/lib/version.js
|
|
2069
|
-
var CLI_VERSION, CLI_RUN, CLI_PACKAGE;
|
|
2090
|
+
var CLI_VERSION, CLI_RUN, CLI_PACKAGE, CLI_OUTDATED_NEXT;
|
|
2070
2091
|
var init_version = __esm({
|
|
2071
2092
|
"src/lib/version.js"() {
|
|
2072
2093
|
"use strict";
|
|
2073
2094
|
init_define_KOMBAI_TELEMETRY();
|
|
2074
2095
|
init_codexKombaiEntry();
|
|
2075
|
-
CLI_VERSION = true ? "0.1.
|
|
2096
|
+
CLI_VERSION = true ? "0.1.5-beta.2" : (
|
|
2076
2097
|
/** @type {{ version: string }} */
|
|
2077
2098
|
JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8")).version
|
|
2078
2099
|
);
|
|
2079
|
-
CLI_RUN = true ? "npx -y @kombai/cli@
|
|
2080
|
-
CLI_PACKAGE = true ? "@kombai/cli@
|
|
2100
|
+
CLI_RUN = true ? "npx -y @kombai/cli@0.1.5-beta.2" : `npx -y ${KOMBAI_CLI_PACKAGE}`;
|
|
2101
|
+
CLI_PACKAGE = true ? "@kombai/cli@0.1.5-beta.2" : KOMBAI_CLI_PACKAGE;
|
|
2102
|
+
CLI_OUTDATED_NEXT = "A newer Kombai CLI is out; update the Kombai plugin.";
|
|
2081
2103
|
}
|
|
2082
2104
|
});
|
|
2083
2105
|
|
|
@@ -2360,7 +2382,7 @@ var init_api = __esm({
|
|
|
2360
2382
|
this.ctx.warnings.add({
|
|
2361
2383
|
code: "CLI_OUTDATED",
|
|
2362
2384
|
message: `The backend speaks design contract ${sent}; this CLI was built for ${DESIGN_API_CONTRACT_VERSION}.`,
|
|
2363
|
-
next:
|
|
2385
|
+
next: CLI_OUTDATED_NEXT
|
|
2364
2386
|
});
|
|
2365
2387
|
}
|
|
2366
2388
|
}
|
|
@@ -10094,11 +10116,12 @@ async function installCodexEntry(codexHome, platform2, cliPackage = KOMBAI_CLI_P
|
|
|
10094
10116
|
codexConfigOf(codexHome),
|
|
10095
10117
|
"Codex"
|
|
10096
10118
|
);
|
|
10097
|
-
const done = (outcome, text, at) => ({
|
|
10119
|
+
const done = (outcome, text, at, replacedPackage = null) => ({
|
|
10098
10120
|
outcome,
|
|
10099
10121
|
disabled: codexKombaiEntryDisabled(text),
|
|
10100
10122
|
block: codexKombaiBlockText(text),
|
|
10101
|
-
configChangedAt: at
|
|
10123
|
+
configChangedAt: at,
|
|
10124
|
+
replacedPackage
|
|
10102
10125
|
});
|
|
10103
10126
|
const kind = codexKombaiEntryKind(content);
|
|
10104
10127
|
if (kind === "foreign" /* Foreign */) throw foreignEntry(file2);
|
|
@@ -10109,7 +10132,7 @@ async function installCodexEntry(codexHome, platform2, cliPackage = KOMBAI_CLI_P
|
|
|
10109
10132
|
}
|
|
10110
10133
|
const next2 = withCodexKombaiCommand(content, platform2, cliPackage);
|
|
10111
10134
|
await writeFileAtomic(target, next2, { mode });
|
|
10112
|
-
return done(InstallOutcome.Replaced, next2, Date.now());
|
|
10135
|
+
return done(InstallOutcome.Replaced, next2, Date.now(), current);
|
|
10113
10136
|
}
|
|
10114
10137
|
if (codexMcpServersInline(content)) throw inlineMcpServers(file2);
|
|
10115
10138
|
const next = withCodexKombaiBlock(content, platform2, cliPackage);
|
|
@@ -10172,7 +10195,7 @@ var init_install = __esm({
|
|
|
10172
10195
|
Already: "already",
|
|
10173
10196
|
/**
|
|
10174
10197
|
* 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`).
|
|
10198
|
+
* channel or version (a release's where a beta runs, say), which now runs this build (`kombaiCliSwitchable`).
|
|
10176
10199
|
*/
|
|
10177
10200
|
Replaced: "replaced"
|
|
10178
10201
|
});
|
|
@@ -10343,9 +10366,16 @@ async function writeEntry(file2, target, content, mode, changedAt, platform2, cl
|
|
|
10343
10366
|
const current = servers?.[KOMBAI_MCP_KEY];
|
|
10344
10367
|
const kind = jsonKombaiEntryKind(current);
|
|
10345
10368
|
if (kind === "foreign" /* Foreign */) throw foreignEntry(file2, ENTRY_NAME);
|
|
10346
|
-
const done = (outcome2, entry2, at) => ({
|
|
10369
|
+
const done = (outcome2, entry2, at, replacedPackage2 = null) => ({
|
|
10370
|
+
outcome: outcome2,
|
|
10371
|
+
block: JSON.stringify(entry2),
|
|
10372
|
+
configChangedAt: at,
|
|
10373
|
+
disabled,
|
|
10374
|
+
replacedPackage: replacedPackage2
|
|
10375
|
+
});
|
|
10347
10376
|
let entry;
|
|
10348
10377
|
let outcome;
|
|
10378
|
+
let replacedPackage = null;
|
|
10349
10379
|
if (kind === "cli" /* Cli */ && isRecord4(current)) {
|
|
10350
10380
|
const running = jsonKombaiEntryPackage(current);
|
|
10351
10381
|
if (running === null || !kombaiCliSwitchable(running, cliPackage)) {
|
|
@@ -10353,13 +10383,14 @@ async function writeEntry(file2, target, content, mode, changedAt, platform2, cl
|
|
|
10353
10383
|
}
|
|
10354
10384
|
entry = withJsonKombaiCommand(current, platform2, cliPackage);
|
|
10355
10385
|
outcome = InstallOutcome.Replaced;
|
|
10386
|
+
replacedPackage = running;
|
|
10356
10387
|
} else {
|
|
10357
10388
|
entry = claudeCodeKombaiEntry(platform2, cliPackage);
|
|
10358
10389
|
outcome = kind === "legacy" /* Legacy */ ? InstallOutcome.Replaced : InstallOutcome.Added;
|
|
10359
10390
|
}
|
|
10360
10391
|
const next = { ...config2, [MCP_SERVERS]: { ...servers, [KOMBAI_MCP_KEY]: entry } };
|
|
10361
10392
|
await writeFileAtomic(target, text(next), { mode });
|
|
10362
|
-
return done(outcome, entry, Date.now());
|
|
10393
|
+
return done(outcome, entry, Date.now(), replacedPackage);
|
|
10363
10394
|
}
|
|
10364
10395
|
async function claudeCodeEntryPackage(configFile) {
|
|
10365
10396
|
try {
|
|
@@ -32460,7 +32491,7 @@ function designBriefsOf(envelope) {
|
|
|
32460
32491
|
function explainTasteError(error2, web) {
|
|
32461
32492
|
if (!(error2 instanceof CliError)) return error2;
|
|
32462
32493
|
if (error2.code === "TASTE_NO_CREDITS") error2.next = `${web}/account/plan`;
|
|
32463
|
-
if (error2.code === "TASTE_CLI_OUTDATED") error2.next =
|
|
32494
|
+
if (error2.code === "TASTE_CLI_OUTDATED") error2.next = CLI_OUTDATED_NEXT;
|
|
32464
32495
|
return error2;
|
|
32465
32496
|
}
|
|
32466
32497
|
function noAnswer(next) {
|
|
@@ -35259,7 +35290,7 @@ var init_drawings = __esm({
|
|
|
35259
35290
|
var faq_default;
|
|
35260
35291
|
var init_faq = __esm({
|
|
35261
35292
|
"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
|
|
35293
|
+
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. The skill the Kombai desktop app installs starts from the newest release. A global\n 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
35294
|
}
|
|
35264
35295
|
});
|
|
35265
35296
|
|
|
@@ -35319,16 +35350,24 @@ function topicText(topic, app) {
|
|
|
35319
35350
|
async function viewChannelNote() {
|
|
35320
35351
|
const running = await codexEntryPackage(codexHomeOf(process.env, os3.homedir()));
|
|
35321
35352
|
if (running === null || !kombaiCliSwitchable(running, CLI_PACKAGE)) return "";
|
|
35322
|
-
|
|
35353
|
+
const install = `before anything else, run \`${CLI_RUN} mcp install codex\` and follow its next.
|
|
35323
35354
|
|
|
35324
35355
|
`;
|
|
35356
|
+
if (kombaiCliChannel(running) === kombaiCliChannel(CLI_PACKAGE)) {
|
|
35357
|
+
return `Kombai's view in this Codex runs \`${running}\`, another version of this CLI (\`${CLI_PACKAGE}\`): ${install}`;
|
|
35358
|
+
}
|
|
35359
|
+
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
35360
|
}
|
|
35326
35361
|
async function serverChannelNote() {
|
|
35327
35362
|
const running = await claudeCodeEntryPackage(await claudeCodeConfigOf(process.env, os3.homedir()));
|
|
35328
35363
|
if (running === null || !kombaiCliSwitchable(running, CLI_PACKAGE)) return "";
|
|
35329
|
-
|
|
35364
|
+
const install = `before anything else, run \`${CLI_RUN} mcp install claude-code\` and follow its next.
|
|
35330
35365
|
|
|
35331
35366
|
`;
|
|
35367
|
+
if (kombaiCliChannel(running) === kombaiCliChannel(CLI_PACKAGE)) {
|
|
35368
|
+
return `Kombai's MCP server in Claude Code runs \`${running}\`, another version of this CLI (\`${CLI_PACKAGE}\`): ${install}`;
|
|
35369
|
+
}
|
|
35370
|
+
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
35371
|
}
|
|
35333
35372
|
var TOPICS, RUN, APP_NOTES, CHANNEL_NOTES, skill, PLAIN_TEXT;
|
|
35334
35373
|
var init_skill = __esm({
|
|
@@ -35420,6 +35459,12 @@ async function installClaudeCode(ctx) {
|
|
|
35420
35459
|
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
35460
|
};
|
|
35422
35461
|
}
|
|
35462
|
+
if (install.outcome === InstallOutcome.Replaced && sameBackend(install.replacedPackage)) {
|
|
35463
|
+
return {
|
|
35464
|
+
...answer2,
|
|
35465
|
+
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}`
|
|
35466
|
+
};
|
|
35467
|
+
}
|
|
35423
35468
|
if (install.outcome === InstallOutcome.Replaced) {
|
|
35424
35469
|
return {
|
|
35425
35470
|
...answer2,
|
|
@@ -35445,7 +35490,7 @@ async function installClaudeCode(ctx) {
|
|
|
35445
35490
|
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
35491
|
};
|
|
35447
35492
|
}
|
|
35448
|
-
var CLIENT_ARG, HANDOFF, serverCommand, CLAUDE_CARRY_ON, mcpInstall, mcpUninstall, mcp;
|
|
35493
|
+
var CLIENT_ARG, HANDOFF, serverCommand, sameBackend, CLAUDE_CARRY_ON, mcpInstall, mcpUninstall, mcp;
|
|
35449
35494
|
var init_mcp = __esm({
|
|
35450
35495
|
"src/commands/mcp.js"() {
|
|
35451
35496
|
"use strict";
|
|
@@ -35465,6 +35510,7 @@ var init_mcp = __esm({
|
|
|
35465
35510
|
const { command, args } = kombaiCliMcpEntry(platform2, CLI_PACKAGE);
|
|
35466
35511
|
return [command, ...args].join(" ");
|
|
35467
35512
|
};
|
|
35513
|
+
sameBackend = (replacedPackage) => replacedPackage !== null && kombaiCliChannel(replacedPackage) === kombaiCliChannel(CLI_PACKAGE);
|
|
35468
35514
|
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
35515
|
mcpInstall = {
|
|
35470
35516
|
name: "mcp install",
|
|
@@ -35496,6 +35542,14 @@ var init_mcp = __esm({
|
|
|
35496
35542
|
};
|
|
35497
35543
|
}
|
|
35498
35544
|
const changedAt = await entryChangedAt(ctx.home, McpClient.Codex, config2, install);
|
|
35545
|
+
if (outcome === InstallOutcome.Replaced && sameBackend(install.replacedPackage)) {
|
|
35546
|
+
return {
|
|
35547
|
+
client: McpClient.Codex,
|
|
35548
|
+
outcome,
|
|
35549
|
+
config: config2,
|
|
35550
|
+
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}`
|
|
35551
|
+
};
|
|
35552
|
+
}
|
|
35499
35553
|
if (outcome !== InstallOutcome.Already) {
|
|
35500
35554
|
return {
|
|
35501
35555
|
client: McpClient.Codex,
|
package/package.json
CHANGED