@kombai/cli 0.2.0-beta.4 → 0.2.0-beta.5

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/dist/kombai.mjs CHANGED
@@ -1040,13 +1040,13 @@ var init_version = __esm({
1040
1040
  init_define_KOMBAI_TELEMETRY();
1041
1041
  init_codexKombaiEntry();
1042
1042
  init_place();
1043
- CLI_VERSION = true ? "0.2.0-beta.4" : (
1043
+ CLI_VERSION = true ? "0.2.0-beta.5" : (
1044
1044
  /** @type {{ version: string }} */
1045
1045
  JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8")).version
1046
1046
  );
1047
- CLI_NPX_RUN = true ? "npx -y @kombai/cli@0.2.0-beta.4" : `npx -y ${KOMBAI_CLI_PACKAGE}`;
1047
+ CLI_NPX_RUN = true ? "npx -y @kombai/cli@0.2.0-beta.5" : `npx -y ${KOMBAI_CLI_PACKAGE}`;
1048
1048
  CLI_RUN = runLineOf(fileURLToPath(import.meta.url), CLI_VERSION, CLI_NPX_RUN);
1049
- CLI_PACKAGE = true ? "@kombai/cli@0.2.0-beta.4" : KOMBAI_CLI_PACKAGE;
1049
+ CLI_PACKAGE = true ? "@kombai/cli@0.2.0-beta.5" : KOMBAI_CLI_PACKAGE;
1050
1050
  CLI_OUTDATED_NEXT = "A newer Kombai CLI is out; update the Kombai plugin.";
1051
1051
  }
1052
1052
  });
@@ -33683,7 +33683,8 @@ async function writeDirections(runDir, envelope) {
33683
33683
  const images = [];
33684
33684
  for (const item of envelope.content ?? []) {
33685
33685
  if (item.type === "text" && item.text) {
33686
- const text = item.text.replace(WORKER_WRAPPER, "");
33686
+ const text = item.text.replace(WORKER_WRAPPER, "").replace(DEFERRED_VIDEO_INSTRUCTION, `$1${DEFERRED_VIDEO_FOR_CLI}
33687
+ `);
33687
33688
  if (text.trim()) parts.push(text);
33688
33689
  } else if (item.type === "image" && item.data) {
33689
33690
  const extension = IMAGE_EXTENSIONS[item.mimeType ?? ""] ?? "png";
@@ -33728,7 +33729,7 @@ function stillRunning(run2, next) {
33728
33729
  next
33729
33730
  };
33730
33731
  }
33731
- var BRIEF_MAX_CHARS, START_TRIES, DEFAULT_TIMEOUT_S, POLL_MS3, WORKER_WRAPPER, IMAGE_EXTENSIONS, RUN_ID, TASTE_CARD_TOOL, tasteStart, tasteWait, tasteLink;
33732
+ var BRIEF_MAX_CHARS, START_TRIES, DEFAULT_TIMEOUT_S, POLL_MS3, WORKER_WRAPPER, DEFERRED_VIDEO_INSTRUCTION, DEFERRED_VIDEO_FOR_CLI, IMAGE_EXTENSIONS, RUN_ID, TASTE_CARD_TOOL, tasteStart, tasteWait, tasteLink;
33732
33733
  var init_taste = __esm({
33733
33734
  "src/commands/taste.js"() {
33734
33735
  "use strict";
@@ -33747,12 +33748,14 @@ var init_taste = __esm({
33747
33748
  DEFAULT_TIMEOUT_S = 90;
33748
33749
  POLL_MS3 = 2e3;
33749
33750
  WORKER_WRAPPER = /^[ \t]*<\/?tool-results-attachment\b[^>]*>[ \t]*$|^NOTE: the data:\/\/.*$/gm;
33751
+ DEFERRED_VIDEO_INSTRUCTION = /(<deferred-video-generation>\n)[^{]*?\n(?=\{)/g;
33752
+ DEFERRED_VIDEO_FOR_CLI = "Kombai did not generate these videos, and this CLI cannot. Where the design wants one of them, use a stock video link this file gives for that section, or else a still image or SVG; never invent a video link. The prompts are here for the user, who may make the videos elsewhere.";
33750
33753
  IMAGE_EXTENSIONS = { "image/png": "png", "image/jpeg": "jpg", "image/webp": "webp", "image/gif": "gif" };
33751
33754
  RUN_ID = /^tr_[0-9a-f]{32}$/;
33752
33755
  TASTE_CARD_TOOL = "taste_card";
33753
33756
  tasteStart = {
33754
33757
  name: "taste start",
33755
- summary: "Start a taste run: Kombai's design directions for a brief you wrote after reading the repo. Uses credits. --cards says this client has a taste_card tool, so `taste wait` answers with card (and then no page link `url`); add it only where that tool is among your tools (the Codex app lists it only in ALL_TOOLS).",
33758
+ summary: "Start a taste run: Kombai's design directions for a brief you wrote after reading the repo. Uses credits. --cards says this client has a taste_card tool, so `taste wait` answers with card (and then no page link `url`); add it only where that tool is among your tools (the Codex app lists it only in ALL_TOOLS). Kombai makes AI images where a design needs art rather than a photo, each using credits; --no-generate keeps the run to stock photos and videos, for a user who asked for no AI-generated images.",
33756
33759
  flags: {
33757
33760
  brief: { type: "string", required: true, placeholder: "<file>" },
33758
33761
  variants: {
@@ -33763,7 +33766,9 @@ var init_taste = __esm({
33763
33766
  },
33764
33767
  // Only where the client has the taste_card tool: it decides whether `taste wait` answers with card (start.json).
33765
33768
  // Every run asks for the briefs and pays for their model call either way.
33766
- cards: { type: "boolean" }
33769
+ cards: { type: "boolean" },
33770
+ // Generation is on by default; this keeps a run to stock assets, for a user who does not want AI images.
33771
+ "no-generate": { type: "boolean" }
33767
33772
  },
33768
33773
  example: "kombai taste start --brief brief.md --variants 3",
33769
33774
  async run(ctx, { flags }) {
@@ -33801,9 +33806,10 @@ var init_taste = __esm({
33801
33806
  };
33802
33807
  const pendingFile = path23.join(tasteDir, "pending.json");
33803
33808
  const { origin, ...asked } = fields;
33804
- const key = createHash4("sha256").update(JSON.stringify(asked)).digest("hex");
33809
+ const noGenerate = flags["no-generate"] === true;
33810
+ const key = createHash4("sha256").update(JSON.stringify(noGenerate ? { ...asked, noGenerate } : asked)).digest("hex");
33805
33811
  const pending = (
33806
- /** @type {{ key?: string, createId?: string, version?: unknown, origin?: unknown } | undefined} */
33812
+ /** @type {{ key?: string, createId?: string, version?: unknown, origin?: unknown, generate?: unknown } | undefined} */
33807
33813
  await readJson(pendingFile)
33808
33814
  );
33809
33815
  const reused = pending?.key === key && typeof pending.createId === "string" && pending.createId !== "";
@@ -33816,15 +33822,23 @@ var init_taste = __esm({
33816
33822
  /** @type {typeof origin} */
33817
33823
  pending.origin
33818
33824
  ) : origin;
33825
+ const generate = reused ? pending.generate === true : !noGenerate;
33819
33826
  await writeJsonAtomic(pendingFile, {
33820
33827
  key,
33821
33828
  createId: createId2,
33822
33829
  version: version2,
33823
33830
  origin: sentOrigin,
33831
+ generate,
33824
33832
  at: new Date(ctx.now()).toISOString()
33825
33833
  });
33826
- const body = { createId: createId2, ...asked, origin: sentOrigin, client: { name: "kombai-cli", version: version2 } };
33827
- const rerun = `kombai taste start --brief ${shellArg(String(flags.brief))} --variants ${variants}${flags.cards === true ? " --cards" : ""}`;
33834
+ const body = {
33835
+ createId: createId2,
33836
+ ...asked,
33837
+ ...generate ? { options: { enableGeneration: true } } : {},
33838
+ origin: sentOrigin,
33839
+ client: { name: "kombai-cli", version: version2 }
33840
+ };
33841
+ const rerun = `kombai taste start --brief ${shellArg(String(flags.brief))} --variants ${variants}${flags.cards === true ? " --cards" : ""}${flags["no-generate"] === true ? " --no-generate" : ""}`;
33828
33842
  let created;
33829
33843
  for (let attempt = 0; ; attempt++) {
33830
33844
  try {
@@ -36850,7 +36864,7 @@ var init_actions = __esm({
36850
36864
  var brief_default;
36851
36865
  var init_brief = __esm({
36852
36866
  "src/skill/brief.md"() {
36853
- brief_default = '# Writing a taste brief\n\nTaste reads only the brief: it cannot see the repo, the chat or any file. Write everything it needs into\nthe brief, at most 8,000 characters, in a file outside the repo, then pass it to\n`kombai taste start --brief <file> --variants <1-4>`.\n\nGive ground truth, not design advice. Taste\'s job is to bring the design ideas; ideas you add make it\ncopy yours. For "a joyful, light CRM", write "A joyful light-theme CRM application", not "a light CRM\ndashboard with a soft purple gradient".\n\nA brief says:\n\n- What to design, in plain words that name the kind of UI: a pricing section, sign-in, onboarding, a\n dashboard, a data table, an AI chat, an empty state.\n- The scope: a full page, one section, a screen, a multi-screen flow, or one reusable component. For a\n component taste returns lighter options (arrangements, looks, graphic ideas) and no assets.\n- Every fact the design shows: the product and who uses it, the real copy (names, numbers, plans,\n prices, navigation), the content of each section, and the states that matter.\n- What is already decided, from the repo or the user: brand colors, fonts, logo, an existing design\n system (its tokens, copied from tailwind config, globals.css, theme or token files), and what must stay\n as it is. Copy the values; taste cannot open the files.\n- What is still open, only when the user said so: "explore the layout", "keep our colors".\n\nSkip taste when the work copies or reflows a design instead of making a new one: a clone of a page,\nscreenshot or mock the user gave, a build of the repo\'s existing screens, a version of a design for\nanother device or mode, or an edit to part of a design. Then write the HTML straight from the reference\nor the pulled node.\n\nA taste run takes a few minutes. Tell the user it has started, and create the canvas and show it\n(`kombai skill opening`) while it runs. Run `kombai taste wait <run>` in the foreground, one wait at a\ntime: it returns within 90 seconds, so while its status is running, tell the user the run is still going,\nas expected, and wait again.\n\nWhen `kombai taste wait` answers with `card`, call taste_card. When it answers with `url` instead, give the user that\nlink in your reply: it shows the taste Kombai settled on. To look at the page in your own browser panel, open the\nlink from `kombai taste link <run> --in-app` instead, and never show that one to the user.\n\nAfter `kombai taste wait`, follow directions.md: one direction per variant. In it, <stock-image> tags\ndescribe photos and <icon> tags name icons from the library its <icon-library> tag names: put icons in as\ninline SVG from that library, and photos as images, from a public https URL or saved in the repo. Its\nasset links are real; use them as given and never invent one.\n\ndirections.md is written for a page on a canvas, as Kombai\'s own Design mode writes it. What it asks for\nruns there: scroll-driven motion (parallax, reveal or count-up on scroll, pinning), smooth scrolling\n(Lenis, Locomotive), sticky or fixed elements, and the Sticky Layout Rule it may add, once the design has a\nheight of its own (`kombai skill html`, Size and position). A\n<stock-image> or <stock-video> with no link has no asset: draw it as SVG or leave it out.\n';
36867
+ brief_default = '# Writing a taste brief\n\nTaste reads only the brief: it cannot see the repo, the chat or any file. Write everything it needs into\nthe brief, at most 8,000 characters, in a file outside the repo, then pass it to\n`kombai taste start --brief <file> --variants <1-4>`.\n\nGive ground truth, not design advice. Taste\'s job is to bring the design ideas; ideas you add make it\ncopy yours. For "a joyful, light CRM", write "A joyful light-theme CRM application", not "a light CRM\ndashboard with a soft purple gradient".\n\nA brief says:\n\n- What to design, in plain words that name the kind of UI: a pricing section, sign-in, onboarding, a\n dashboard, a data table, an AI chat, an empty state.\n- The scope: a full page, one section, a screen, a multi-screen flow, or one reusable component. For a\n component taste returns lighter options (arrangements, looks, graphic ideas) and no assets.\n- Every fact the design shows: the product and who uses it, the real copy (names, numbers, plans,\n prices, navigation), the content of each section, and the states that matter.\n- What is already decided, from the repo or the user: brand colors, fonts, logo, an existing design\n system (its tokens, copied from tailwind config, globals.css, theme or token files), and what must stay\n as it is. Copy the values; taste cannot open the files.\n- What is still open, only when the user said so: "explore the layout", "keep our colors".\n\nSkip taste when the work copies or reflows a design instead of making a new one: a clone of a page,\nscreenshot or mock the user gave, a build of the repo\'s existing screens, a version of a design for\nanother device or mode, or an edit to part of a design. Then write the HTML straight from the reference\nor the pulled node.\n\nA taste run takes a few minutes. Tell the user it has started, and create the canvas and show it\n(`kombai skill opening`) while it runs. Run `kombai taste wait <run>` in the foreground, one wait at a\ntime: it returns within 90 seconds, so while its status is running, tell the user the run is still going,\nas expected, and wait again.\n\nWhen `kombai taste wait` answers with `card`, call taste_card. When it answers with `url` instead, give the user that\nlink in your reply: it shows the taste Kombai settled on. To look at the page in your own browser panel, open the\nlink from `kombai taste link <run> --in-app` instead, and never show that one to the user.\n\nAfter `kombai taste wait`, follow directions.md: one direction per variant. In it, <stock-image> tags\ndescribe photos and <icon> tags name icons from the library its <icon-library> tag names: put icons in as\ninline SVG from that library, and photos as images, from a public https URL or saved in the repo. Its\nasset links are real; use them as given and never invent one.\n\nTaste finds stock photos and videos for every run, and makes AI images where a design wants art rather than a\nphoto; each image uses credits. Add `--no-generate` to `kombai taste start` only when the user asked for no\nAI-generated images (stock photos only). Taste never makes videos: a <deferred-video-generation> block in\ndirections.md lists the prompts of the videos it did not make, for the user.\n\ndirections.md is written for a page on a canvas, as Kombai\'s own Design mode writes it. What it asks for\nruns there: scroll-driven motion (parallax, reveal or count-up on scroll, pinning), smooth scrolling\n(Lenis, Locomotive), sticky or fixed elements, and the Sticky Layout Rule it may add, once the design has a\nheight of its own (`kombai skill html`, Size and position). A\n<stock-image>, <stock-video> or <generate-video> with no link has no asset: draw it as SVG or leave it out.\n';
36854
36868
  }
36855
36869
  });
36856
36870
 
package/dist/launch.mjs CHANGED
@@ -7,7 +7,7 @@ import { dirname, join } from 'node:path';
7
7
  import { fileURLToPath, pathToFileURL } from 'node:url';
8
8
 
9
9
  // The version that wrote this file: a published one, so its npx line always works. Filled in by the build.
10
- const WRITTEN_BY = '0.2.0-beta.4';
10
+ const WRITTEN_BY = '0.2.0-beta.5';
11
11
  const root = dirname(fileURLToPath(import.meta.url));
12
12
 
13
13
  // On stderr, as the CLI's own start-up errors are: under `kombai mcp` stdout carries MCP frames only.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kombai/cli",
3
- "version": "0.2.0-beta.4",
3
+ "version": "0.2.0-beta.5",
4
4
  "description": "Design UI with Kombai from your coding agent: design directions grounded in your repo, built as designs on a Kombai canvas.",
5
5
  "keywords": [
6
6
  "kombai",