empirical-sdd 0.20.3 → 0.20.4

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.
@@ -0,0 +1,15 @@
1
+ export declare const BRAND_RED: "#F43737";
2
+ export declare const BRAND_YELLOW: "#FFCD15";
3
+ export declare const BRAND_BLUE: "#4A5CFF";
4
+ export interface BrandBannerOptions {
5
+ version: string;
6
+ columns?: number;
7
+ color?: boolean;
8
+ }
9
+ export interface BrandBannerOutput {
10
+ isTTY?: boolean;
11
+ columns?: number;
12
+ }
13
+ export type BrandBannerEnvironment = Readonly<Record<string, string | undefined>>;
14
+ export declare function renderBrandBanner(options: BrandBannerOptions): string;
15
+ export declare function renderBrandBannerForOutput(version: string, output?: BrandBannerOutput, environment?: BrandBannerEnvironment): string;
package/dist/cli.js CHANGED
@@ -6616,6 +6616,71 @@ import { createInterface } from "node:readline";
6616
6616
  import { homedir as homedir3 } from "node:os";
6617
6617
  import { join as join11 } from "node:path";
6618
6618
 
6619
+ // src/branding.ts
6620
+ var ANSI_RESET = "\x1B[0m";
6621
+ var WIDE_COLUMNS = 40;
6622
+ var COMPACT_COLUMNS = 20;
6623
+ var RED_ANSI = "\x1B[38;2;244;55;55m";
6624
+ var YELLOW_ANSI = "\x1B[38;2;255;205;21m";
6625
+ var BLUE_ANSI = "\x1B[38;2;74;92;255m";
6626
+ function renderBrandBanner(options) {
6627
+ const columns = normalizeColumns(options.columns);
6628
+ const color = options.color ?? false;
6629
+ const version = `v${options.version.replace(/^v/, "")}`;
6630
+ if (columns < COMPACT_COLUMNS)
6631
+ return renderMicroMark(color).concat("empirical", version).join(`
6632
+ `);
6633
+ const mark = renderFullMark(color);
6634
+ if (columns < WIDE_COLUMNS)
6635
+ return mark.concat("", `empirical ${version}`).join(`
6636
+ `);
6637
+ mark[2] = `${mark[2]} empirical`;
6638
+ mark[3] = `${mark[3]} ${version}`;
6639
+ return mark.join(`
6640
+ `);
6641
+ }
6642
+ function renderBrandBannerForOutput(version, output = process.stdout, environment = process.env) {
6643
+ const interactive = output.isTTY === true;
6644
+ return renderBrandBanner({
6645
+ version,
6646
+ columns: interactive ? output.columns ?? 80 : 24,
6647
+ color: interactive && environment.TERM?.toLowerCase() !== "dumb" && !Object.hasOwn(environment, "NO_COLOR")
6648
+ });
6649
+ }
6650
+ function renderFullMark(color) {
6651
+ return [
6652
+ blue(" ╭────╮", color),
6653
+ blue(" │ │", color),
6654
+ `${yellow(" ╭───", color)}${blue("╯ ╰", color)}${red("───╮", color)}`,
6655
+ `${yellow(" │", color)} ${red("│", color)}`,
6656
+ `${yellow(" ╰───╮", color)} ${red("╭───╯", color)}`,
6657
+ ` ${yellow("╰──", color)}${red("──╯", color)}`
6658
+ ];
6659
+ }
6660
+ function renderMicroMark(color) {
6661
+ return [
6662
+ ` ${blue("○", color)}`,
6663
+ `${yellow("○", color)} ${red("○", color)}`
6664
+ ];
6665
+ }
6666
+ function red(value, color) {
6667
+ return colorize(value, RED_ANSI, color);
6668
+ }
6669
+ function yellow(value, color) {
6670
+ return colorize(value, YELLOW_ANSI, color);
6671
+ }
6672
+ function blue(value, color) {
6673
+ return colorize(value, BLUE_ANSI, color);
6674
+ }
6675
+ function colorize(value, ansiColor, color) {
6676
+ return color ? `${ansiColor}${value}${ANSI_RESET}` : value;
6677
+ }
6678
+ function normalizeColumns(columns) {
6679
+ if (columns === undefined || !Number.isFinite(columns) || columns <= 0)
6680
+ return 80;
6681
+ return Math.floor(columns);
6682
+ }
6683
+
6619
6684
  // src/core.ts
6620
6685
  import { mkdir as mkdir4, readFile as readFile7 } from "node:fs/promises";
6621
6686
  import { createHash as createHash5 } from "node:crypto";
@@ -7150,7 +7215,7 @@ function isFeatureId(value) {
7150
7215
 
7151
7216
  // src/types.ts
7152
7217
  var SCHEMA_VERSION = 4;
7153
- var PRODUCT_VERSION = "0.20.3";
7218
+ var PRODUCT_VERSION = "0.20.4";
7154
7219
  var POLICY_SCHEMA_VERSION = 1;
7155
7220
 
7156
7221
  // src/storage.ts
@@ -35611,7 +35676,7 @@ async function readStdin() {
35611
35676
  return Buffer.concat(chunks).toString("utf8");
35612
35677
  }
35613
35678
  function printHelp() {
35614
- console.log(`Empirical v${PRODUCT_VERSION}
35679
+ console.log(`${renderBrandBannerForOutput(PRODUCT_VERSION)}
35615
35680
 
35616
35681
  Install once: npm install -g empirical-sdd
35617
35682
 
package/dist/index.js CHANGED
@@ -577,7 +577,7 @@ function isFeatureId(value) {
577
577
 
578
578
  // src/types.ts
579
579
  var SCHEMA_VERSION = 4;
580
- var PRODUCT_VERSION = "0.20.3";
580
+ var PRODUCT_VERSION = "0.20.4";
581
581
  var POLICY_SCHEMA_VERSION = 1;
582
582
 
583
583
  // src/storage.ts
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export declare const SCHEMA_VERSION: 4;
2
- export declare const PRODUCT_VERSION = "0.20.3";
2
+ export declare const PRODUCT_VERSION = "0.20.4";
3
3
  export declare const POLICY_SCHEMA_VERSION: 1;
4
4
  export type Workflow = "fast" | "complex";
5
5
  export type Profile = Workflow | "quick";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "empirical-sdd",
3
- "version": "0.20.3",
3
+ "version": "0.20.4",
4
4
  "description": "Agent-neutral, resumable spec-driven development for every terminal-capable coding agent",
5
5
  "type": "module",
6
6
  "bin": {