replicas-cli 0.3.450 → 0.3.454

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.
Files changed (2) hide show
  1. package/dist/index.cjs +274 -193
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -21482,8 +21482,201 @@ var init_linear2 = __esm({
21482
21482
  }
21483
21483
  });
21484
21484
 
21485
+ // ../shared/src/design-tokens.ts
21486
+ function customPalette(custom2) {
21487
+ const { background, foreground } = custom2;
21488
+ const selected = mix(background, foreground, 0.105);
21489
+ return {
21490
+ background,
21491
+ subtle: mix(background, foreground, 0.035),
21492
+ muted: mix(background, foreground, 0.06),
21493
+ selected,
21494
+ elevated: customMode(custom2) === "dark" ? selected : background,
21495
+ foreground,
21496
+ mutedForeground: mix(background, foreground, 0.65),
21497
+ faintForeground: mix(background, foreground, 0.43),
21498
+ border: mix(background, foreground, 0.115),
21499
+ borderStrong: mix(background, foreground, 0.32)
21500
+ };
21501
+ }
21502
+ function readableText(color, { background, selected }) {
21503
+ const score = (text4) => Math.min(contrast(text4, background), contrast(text4, selected));
21504
+ let best = color;
21505
+ for (let step = 0; step <= 20 && score(best) < 4.5; step++) {
21506
+ best = ["#ffffff", "#000000"].map((toward) => mix(color, toward, step / 20)).reduce((a, b) => score(b) > score(a) ? b : a);
21507
+ }
21508
+ return best;
21509
+ }
21510
+ function customAccent(accent, paletteColors) {
21511
+ return {
21512
+ primary: accent,
21513
+ primaryText: readableText(accent, paletteColors),
21514
+ primaryForeground: contrast("#000000", accent) >= contrast("#ffffff", accent) ? "#000000" : "#ffffff",
21515
+ primarySoft: `${accent}1a`
21516
+ };
21517
+ }
21518
+ function designColors({ mode, palette, accent, custom: custom2 }) {
21519
+ const resolved = resolvePalette(mode, palette, custom2);
21520
+ const presets = PALETTE_COLORS[mode];
21521
+ const paletteColors = presets[resolved] ?? customPalette(custom2);
21522
+ const colors = { ...DESIGN_COLORS[mode], ...paletteColors, ...accent === "custom" ? customAccent(custom2.accent, paletteColors) : ACCENT_COLORS[accent][mode] };
21523
+ return resolved === "custom" ? { ...colors, ...Object.fromEntries(READABLE_TEXT_KEYS.map((key) => [key, readableText(colors[key], paletteColors)])) } : colors;
21524
+ }
21525
+ var plain, THEME_PREFERENCES, PALETTE_PRESETS, PALETTES, PALETTE_COLORS, ACCENT_PRESETS, ACCENTS, ACCENT_COLORS, dark, DESIGN_COLORS, SERIES, BRAND_COLORS, channels, mix, linearChannels, luminance, contrast, customMode, themeCode, DEFAULT_THEME, resolvePalette, READABLE_TEXT_KEYS;
21526
+ var init_design_tokens = __esm({
21527
+ "../shared/src/design-tokens.ts"() {
21528
+ "use strict";
21529
+ init_result();
21530
+ init_type_guards();
21531
+ plain = {
21532
+ black: "#000000",
21533
+ white: "#ffffff",
21534
+ purple: "#a855f7",
21535
+ blue: "#0ea5e9",
21536
+ pink: "#ec4899",
21537
+ orange: "#f97316",
21538
+ teal: "#14b8a6",
21539
+ lime: "#84cc16"
21540
+ };
21541
+ THEME_PREFERENCES = ["system", "light", "dark"];
21542
+ PALETTE_PRESETS = {
21543
+ dark: ["default", "slate", "stone", "black", "high-contrast"],
21544
+ light: ["default", "slate", "stone", "neutral", "high-contrast"]
21545
+ };
21546
+ PALETTES = [.../* @__PURE__ */ new Set([...PALETTE_PRESETS.dark, ...PALETTE_PRESETS.light]), "custom"];
21547
+ PALETTE_COLORS = {
21548
+ dark: {
21549
+ default: { background: "#111111", subtle: "#181818", muted: "#1f1f1f", selected: "#2a2a2a", elevated: "#2a2a2a", foreground: "#ededed", mutedForeground: "#a3a3a3", faintForeground: "#737373", border: "#2a2a2a", borderStrong: "#5c5c5c" },
21550
+ slate: { background: "#0d1117", subtle: "#131821", muted: "#19202a", selected: "#232b37", elevated: "#232b37", foreground: "#e6ecf4", mutedForeground: "#97a5ba", faintForeground: "#687487", border: "#242c38", borderStrong: "#515c6d" },
21551
+ stone: { background: "#1a1713", subtle: "#201c18", muted: "#27231f", selected: "#312d28", elevated: "#312d28", foreground: "#f2eae2", mutedForeground: "#b0a497", faintForeground: "#80756b", border: "#342f29", borderStrong: "#675e54" },
21552
+ black: { background: "#000000", subtle: "#0a0a0a", muted: "#141414", selected: "#222222", elevated: "#222222", foreground: "#ededed", mutedForeground: "#a1a1a1", faintForeground: "#6c6c6c", border: "#262626", borderStrong: "#525252" },
21553
+ "high-contrast": { background: "#0b0b0b", subtle: "#141414", muted: "#1c1c1c", selected: "#2e2e2e", elevated: "#2e2e2e", foreground: "#fafafa", mutedForeground: "#bababa", faintForeground: "#858585", border: "#353535", borderStrong: "#5e5e5e" }
21554
+ },
21555
+ light: {
21556
+ default: { background: "#ffffff", subtle: "#f7f8f6", muted: "#f2f3f1", selected: "#e8ece7", elevated: "#ffffff", foreground: "#162118", mutedForeground: "#67706a", faintForeground: "#a1a7a3", border: "#e2e6e0", borderStrong: "#b9c1b8" },
21557
+ slate: { background: "#ffffff", subtle: "#f5f8fc", muted: "#eff3f9", selected: "#e4eaf3", elevated: "#ffffff", foreground: "#171f2b", mutedForeground: "#56667c", faintForeground: "#8592a6", border: "#d9e1ec", borderStrong: "#acb7c7" },
21558
+ stone: { background: "#fdf9f5", subtle: "#f8f3ed", muted: "#f4eee7", selected: "#ede5dc", elevated: "#ffffff", foreground: "#241c15", mutedForeground: "#6c6053", faintForeground: "#978c80", border: "#e3dbd2", borderStrong: "#bcb0a3" },
21559
+ neutral: { background: "#ffffff", subtle: "#f9f9f9", muted: "#f3f3f3", selected: "#eaeaea", elevated: "#ffffff", foreground: "#111111", mutedForeground: "#606060", faintForeground: "#898989", border: "#dedede", borderStrong: "#b4b4b4" },
21560
+ "high-contrast": { background: "#ffffff", subtle: "#f5f5f5", muted: "#ededed", selected: "#e0e0e0", elevated: "#ffffff", foreground: "#0a0a0a", mutedForeground: "#4f4f4f", faintForeground: "#6b6b6b", border: "#cccccc", borderStrong: "#949494" }
21561
+ }
21562
+ };
21563
+ ACCENT_PRESETS = ["green", "blue", "purple", "pink"];
21564
+ ACCENTS = [...ACCENT_PRESETS, "custom"];
21565
+ ACCENT_COLORS = {
21566
+ green: {
21567
+ dark: { primary: "#3eeba3", primaryText: "#3eeba3", primarySoft: "#3eeba31a" },
21568
+ light: { primary: "#2f9d57", primaryText: "#007136", primarySoft: "#2f9d571a" }
21569
+ },
21570
+ blue: {
21571
+ dark: { primary: "#60a5fa", primaryText: "#60a5fa", primarySoft: "#60a5fa1a" },
21572
+ light: { primary: "#2563eb", primaryText: "#1d4ed8", primarySoft: "#2563eb1a" }
21573
+ },
21574
+ purple: {
21575
+ dark: { primary: "#c084fc", primaryText: "#c084fc", primarySoft: "#c084fc1a" },
21576
+ light: { primary: "#9333ea", primaryText: "#7e22ce", primarySoft: "#9333ea1a" }
21577
+ },
21578
+ pink: {
21579
+ dark: { primary: "#f472b6", primaryText: "#f472b6", primarySoft: "#f472b61a" },
21580
+ light: { primary: "#db2777", primaryText: "#be185d", primarySoft: "#db27771a" }
21581
+ }
21582
+ };
21583
+ dark = {
21584
+ ...PALETTE_COLORS.dark.default,
21585
+ ...ACCENT_COLORS.green.dark,
21586
+ primaryForeground: "#111111",
21587
+ success: "#3eeba3",
21588
+ successText: "#3eeba3",
21589
+ successForeground: "#111111",
21590
+ successSoft: "#3eeba31a",
21591
+ destructive: "#ef4444",
21592
+ destructiveText: "#ff6f63",
21593
+ destructiveForeground: "#ffffff",
21594
+ destructiveSoft: "#dc262636",
21595
+ warning: "#f59e0b",
21596
+ warningText: "#f59e0b",
21597
+ warningSoft: "#f59e0b1a",
21598
+ warningForeground: "#111111",
21599
+ highlight: "#f59e0b4d",
21600
+ ...plain
21601
+ };
21602
+ DESIGN_COLORS = {
21603
+ dark,
21604
+ light: {
21605
+ ...PALETTE_COLORS.light.default,
21606
+ ...ACCENT_COLORS.green.light,
21607
+ primaryForeground: "#ffffff",
21608
+ success: "#2f9d57",
21609
+ successText: "#007136",
21610
+ successForeground: "#ffffff",
21611
+ successSoft: "#2f9d571a",
21612
+ destructive: "#dc2626",
21613
+ destructiveText: "#b2000f",
21614
+ destructiveForeground: "#ffffff",
21615
+ destructiveSoft: "#dc262614",
21616
+ warning: "#92400e",
21617
+ warningText: "#92400e",
21618
+ warningSoft: "#92400e1f",
21619
+ warningForeground: "#ffffff",
21620
+ highlight: "#facc1580",
21621
+ ...plain
21622
+ }
21623
+ };
21624
+ SERIES = ["success", "blue", "purple", "orange", "pink", "lime", "teal", "warning"];
21625
+ BRAND_COLORS = {
21626
+ replicas: { light: "#2f9d57", dark: "#3eeba3" },
21627
+ claude: "#d97757",
21628
+ codex: ["#b1a7ff", "#7a9dff", "#3941ff"],
21629
+ muse: "#0668e1",
21630
+ opencode: ["#4b4646", "#f1ecec"],
21631
+ slack: ["#e01e5a", "#36c5f0", "#2eb67d", "#ecb22e"],
21632
+ linear: "#8d8ff8",
21633
+ gitlab: "#fc6d26",
21634
+ badge: { label: "#121212", linear: "#5e6ad2", slack: "#4a154b" },
21635
+ // Emails assume a white page.
21636
+ email: { text: "#222", muted: "#888", link: "#0066cc" }
21637
+ };
21638
+ channels = (hex3) => [1, 3, 5].map((index) => parseInt(hex3.slice(index, index + 2), 16));
21639
+ mix = (from, to, amount) => {
21640
+ const target = channels(to);
21641
+ return `#${channels(from).map((channel, index) => Math.round(channel + (target[index] - channel) * amount).toString(16).padStart(2, "0")).join("")}`;
21642
+ };
21643
+ linearChannels = (hex3) => channels(hex3).map((channel) => channel / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
21644
+ luminance = (hex3) => {
21645
+ const [r, g, b] = linearChannels(hex3);
21646
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
21647
+ };
21648
+ contrast = (a, b) => {
21649
+ const [lighter, darker] = [luminance(a), luminance(b)].sort((x, y) => y - x);
21650
+ return (lighter + 0.05) / (darker + 0.05);
21651
+ };
21652
+ customMode = ({ background, foreground }) => luminance(background) < luminance(foreground) ? "dark" : "light";
21653
+ themeCode = ({ background, foreground, accent }) => [background, foreground, accent].join(",");
21654
+ DEFAULT_THEME = {
21655
+ palette: "default",
21656
+ accent: "green",
21657
+ custom: { background: PALETTE_COLORS.dark.default.background, foreground: PALETTE_COLORS.dark.default.foreground, accent: "#888888" }
21658
+ };
21659
+ resolvePalette = (mode, palette, custom2) => (palette === "custom" ? customMode(custom2) === mode : PALETTE_PRESETS[mode].some((name) => name === palette)) ? palette : "default";
21660
+ READABLE_TEXT_KEYS = ["primaryText", "successText", "destructiveText", "warningText"];
21661
+ }
21662
+ });
21663
+
21664
+ // ../shared/src/pixel-crew.ts
21665
+ var PIXEL_CREW_ROLE_NAMES, THEME_PRIMARIES, THEME_INKS, themeAvatarTile, THEME_TILES;
21666
+ var init_pixel_crew = __esm({
21667
+ "../shared/src/pixel-crew.ts"() {
21668
+ "use strict";
21669
+ init_design_tokens();
21670
+ PIXEL_CREW_ROLE_NAMES = ["detective", "builder", "scientist", "accountant", "pilot", "artist", "medic", "guard", "courier", "captain", "chef", "astronaut", "wizard", "hacker", "operator", "explorer"];
21671
+ THEME_PRIMARIES = Object.values(ACCENT_COLORS).map((accent) => accent.dark.primary);
21672
+ THEME_INKS = [...Object.values(PALETTE_COLORS.dark).map((palette) => palette.background), ...Object.values(PALETTE_COLORS.light).map((palette) => palette.foreground)];
21673
+ themeAvatarTile = (ink, primary) => mix(ink, primary, 0.15);
21674
+ THEME_TILES = THEME_INKS.flatMap((ink) => THEME_PRIMARIES.map((primary) => themeAvatarTile(ink, primary)));
21675
+ }
21676
+ });
21677
+
21485
21678
  // ../shared/src/routes/mothership.ts
21486
- var setUpMothershipTextingRequestSchema, linearRuleFields, withLabelIds, mothershipLinearRuleSchema, SUBAGENT_SERVICE_TIERS, mothershipSubagentSettingsSchema, QUEUE_SECTIONS, MOTHERSHIP_QUEUE_GROUPS, MOTHERSHIP_SHIPPING_LOOKBACK_MS;
21679
+ var avatarColorSchema, MOTHERSHIP_AVATAR_BACKGROUNDS, MOTHERSHIP_AVATAR_PRIMARIES, mothershipPresetAvatarSchema, mothershipEmojiAvatarSchema, mothershipChosenAvatarSchema, setUpMothershipTextingRequestSchema, linearRuleFields, withLabelIds, mothershipLinearRuleSchema, SUBAGENT_SERVICE_TIERS, mothershipSubagentSettingsSchema, QUEUE_SECTIONS, MOTHERSHIP_QUEUE_GROUPS, MOTHERSHIP_SHIPPING_LOOKBACK_MS;
21487
21680
  var init_mothership = __esm({
21488
21681
  "../shared/src/routes/mothership.ts"() {
21489
21682
  "use strict";
@@ -21492,7 +21685,48 @@ var init_mothership = __esm({
21492
21685
  init_pull_requests();
21493
21686
  init_linear2();
21494
21687
  init_type_guards();
21688
+ init_design_tokens();
21689
+ init_pixel_crew();
21495
21690
  init_urls();
21691
+ avatarColorSchema = external_exports.union([external_exports.literal("theme"), external_exports.string().regex(/^#[0-9a-f]{6}$/i)]);
21692
+ MOTHERSHIP_AVATAR_BACKGROUNDS = [
21693
+ ["Forest", PALETTE_COLORS.light.default.foreground],
21694
+ ["Black", PALETTE_COLORS.dark.default.background],
21695
+ ["Graphite", PALETTE_COLORS.dark.default.selected],
21696
+ ["Deep green", ACCENT_COLORS.green.light.primaryText],
21697
+ ["Deep blue", ACCENT_COLORS.blue.light.primaryText],
21698
+ ["Deep purple", ACCENT_COLORS.purple.light.primaryText],
21699
+ ["Deep pink", ACCENT_COLORS.pink.light.primaryText],
21700
+ ["Brown", DESIGN_COLORS.light.warningText],
21701
+ ["Sage", PALETTE_COLORS.light.default.muted],
21702
+ ["White", DESIGN_COLORS.light.white]
21703
+ ];
21704
+ MOTHERSHIP_AVATAR_PRIMARIES = [
21705
+ ["Green", ACCENT_COLORS.green.dark.primary],
21706
+ ["Blue", ACCENT_COLORS.blue.dark.primary],
21707
+ ["Purple", ACCENT_COLORS.purple.dark.primary],
21708
+ ["Pink", ACCENT_COLORS.pink.dark.primary],
21709
+ ["Coral", DESIGN_COLORS.dark.destructiveText],
21710
+ ["Amber", DESIGN_COLORS.dark.warning],
21711
+ ["White", PALETTE_COLORS.dark.default.foreground],
21712
+ ["Deep green", ACCENT_COLORS.green.light.primaryText],
21713
+ ["Deep blue", ACCENT_COLORS.blue.light.primaryText],
21714
+ ["Deep purple", ACCENT_COLORS.purple.light.primaryText],
21715
+ ["Deep pink", ACCENT_COLORS.pink.light.primaryText],
21716
+ ["Ink", PALETTE_COLORS.light.default.foreground]
21717
+ ];
21718
+ mothershipPresetAvatarSchema = external_exports.object({
21719
+ kind: external_exports.literal("preset"),
21720
+ role: external_exports.enum(PIXEL_CREW_ROLE_NAMES),
21721
+ primary: avatarColorSchema,
21722
+ background: avatarColorSchema
21723
+ });
21724
+ mothershipEmojiAvatarSchema = external_exports.object({
21725
+ kind: external_exports.literal("emoji"),
21726
+ emoji: external_exports.string().trim().min(1).max(32),
21727
+ background: avatarColorSchema
21728
+ });
21729
+ mothershipChosenAvatarSchema = external_exports.discriminatedUnion("kind", [mothershipPresetAvatarSchema, mothershipEmojiAvatarSchema]);
21496
21730
  setUpMothershipTextingRequestSchema = external_exports.object({ line: external_exports.string().optional() });
21497
21731
  linearRuleFields = linearIssueFiltersSchema.extend({ team_id: external_exports.string().min(1) }).strict();
21498
21732
  withLabelIds = (value) => {
@@ -22586,184 +22820,6 @@ var init_v1 = __esm({
22586
22820
  }
22587
22821
  });
22588
22822
 
22589
- // ../shared/src/design-tokens.ts
22590
- function customPalette(custom2) {
22591
- const { background, foreground } = custom2;
22592
- const selected = mix(background, foreground, 0.105);
22593
- return {
22594
- background,
22595
- subtle: mix(background, foreground, 0.035),
22596
- muted: mix(background, foreground, 0.06),
22597
- selected,
22598
- elevated: customMode(custom2) === "dark" ? selected : background,
22599
- foreground,
22600
- mutedForeground: mix(background, foreground, 0.65),
22601
- faintForeground: mix(background, foreground, 0.43),
22602
- border: mix(background, foreground, 0.115),
22603
- borderStrong: mix(background, foreground, 0.32)
22604
- };
22605
- }
22606
- function readableText(color, { background, selected }) {
22607
- const score = (text4) => Math.min(contrast(text4, background), contrast(text4, selected));
22608
- let best = color;
22609
- for (let step = 0; step <= 20 && score(best) < 4.5; step++) {
22610
- best = ["#ffffff", "#000000"].map((toward) => mix(color, toward, step / 20)).reduce((a, b) => score(b) > score(a) ? b : a);
22611
- }
22612
- return best;
22613
- }
22614
- function customAccent(accent, paletteColors) {
22615
- return {
22616
- primary: accent,
22617
- primaryText: readableText(accent, paletteColors),
22618
- primaryForeground: contrast("#000000", accent) >= contrast("#ffffff", accent) ? "#000000" : "#ffffff",
22619
- primarySoft: `${accent}1a`
22620
- };
22621
- }
22622
- function designColors({ mode, palette, accent, custom: custom2 }) {
22623
- const resolved = resolvePalette(mode, palette, custom2);
22624
- const presets = PALETTE_COLORS[mode];
22625
- const paletteColors = presets[resolved] ?? customPalette(custom2);
22626
- const colors = { ...DESIGN_COLORS[mode], ...paletteColors, ...accent === "custom" ? customAccent(custom2.accent, paletteColors) : ACCENT_COLORS[accent][mode] };
22627
- return resolved === "custom" ? { ...colors, ...Object.fromEntries(READABLE_TEXT_KEYS.map((key) => [key, readableText(colors[key], paletteColors)])) } : colors;
22628
- }
22629
- var plain, THEME_PREFERENCES, PALETTE_PRESETS, PALETTES, PALETTE_COLORS, ACCENT_PRESETS, ACCENTS, ACCENT_COLORS, dark, DESIGN_COLORS, SERIES, BRAND_COLORS, channels, mix, luminance, contrast, customMode, themeCode, DEFAULT_THEME, resolvePalette, READABLE_TEXT_KEYS;
22630
- var init_design_tokens = __esm({
22631
- "../shared/src/design-tokens.ts"() {
22632
- "use strict";
22633
- init_result();
22634
- init_type_guards();
22635
- plain = {
22636
- black: "#000000",
22637
- white: "#ffffff",
22638
- purple: "#a855f7",
22639
- blue: "#0ea5e9",
22640
- pink: "#ec4899",
22641
- orange: "#f97316",
22642
- teal: "#14b8a6",
22643
- lime: "#84cc16"
22644
- };
22645
- THEME_PREFERENCES = ["system", "light", "dark"];
22646
- PALETTE_PRESETS = {
22647
- dark: ["default", "slate", "stone", "black", "high-contrast"],
22648
- light: ["default", "slate", "stone", "neutral", "high-contrast"]
22649
- };
22650
- PALETTES = [.../* @__PURE__ */ new Set([...PALETTE_PRESETS.dark, ...PALETTE_PRESETS.light]), "custom"];
22651
- PALETTE_COLORS = {
22652
- dark: {
22653
- default: { background: "#111111", subtle: "#181818", muted: "#1f1f1f", selected: "#2a2a2a", elevated: "#2a2a2a", foreground: "#ededed", mutedForeground: "#a3a3a3", faintForeground: "#737373", border: "#2a2a2a", borderStrong: "#5c5c5c" },
22654
- slate: { background: "#0d1117", subtle: "#131821", muted: "#19202a", selected: "#232b37", elevated: "#232b37", foreground: "#e6ecf4", mutedForeground: "#97a5ba", faintForeground: "#687487", border: "#242c38", borderStrong: "#515c6d" },
22655
- stone: { background: "#1a1713", subtle: "#201c18", muted: "#27231f", selected: "#312d28", elevated: "#312d28", foreground: "#f2eae2", mutedForeground: "#b0a497", faintForeground: "#80756b", border: "#342f29", borderStrong: "#675e54" },
22656
- black: { background: "#000000", subtle: "#0a0a0a", muted: "#141414", selected: "#222222", elevated: "#222222", foreground: "#ededed", mutedForeground: "#a1a1a1", faintForeground: "#6c6c6c", border: "#262626", borderStrong: "#525252" },
22657
- "high-contrast": { background: "#0b0b0b", subtle: "#141414", muted: "#1c1c1c", selected: "#2e2e2e", elevated: "#2e2e2e", foreground: "#fafafa", mutedForeground: "#bababa", faintForeground: "#858585", border: "#353535", borderStrong: "#5e5e5e" }
22658
- },
22659
- light: {
22660
- default: { background: "#ffffff", subtle: "#f7f8f6", muted: "#f2f3f1", selected: "#e8ece7", elevated: "#ffffff", foreground: "#162118", mutedForeground: "#67706a", faintForeground: "#a1a7a3", border: "#e2e6e0", borderStrong: "#b9c1b8" },
22661
- slate: { background: "#ffffff", subtle: "#f5f8fc", muted: "#eff3f9", selected: "#e4eaf3", elevated: "#ffffff", foreground: "#171f2b", mutedForeground: "#56667c", faintForeground: "#8592a6", border: "#d9e1ec", borderStrong: "#acb7c7" },
22662
- stone: { background: "#fdf9f5", subtle: "#f8f3ed", muted: "#f4eee7", selected: "#ede5dc", elevated: "#ffffff", foreground: "#241c15", mutedForeground: "#6c6053", faintForeground: "#978c80", border: "#e3dbd2", borderStrong: "#bcb0a3" },
22663
- neutral: { background: "#ffffff", subtle: "#f9f9f9", muted: "#f3f3f3", selected: "#eaeaea", elevated: "#ffffff", foreground: "#111111", mutedForeground: "#606060", faintForeground: "#898989", border: "#dedede", borderStrong: "#b4b4b4" },
22664
- "high-contrast": { background: "#ffffff", subtle: "#f5f5f5", muted: "#ededed", selected: "#e0e0e0", elevated: "#ffffff", foreground: "#0a0a0a", mutedForeground: "#4f4f4f", faintForeground: "#6b6b6b", border: "#cccccc", borderStrong: "#949494" }
22665
- }
22666
- };
22667
- ACCENT_PRESETS = ["green", "blue", "purple", "pink"];
22668
- ACCENTS = [...ACCENT_PRESETS, "custom"];
22669
- ACCENT_COLORS = {
22670
- green: {
22671
- dark: { primary: "#3eeba3", primaryText: "#3eeba3", primarySoft: "#3eeba31a" },
22672
- light: { primary: "#2f9d57", primaryText: "#007136", primarySoft: "#2f9d571a" }
22673
- },
22674
- blue: {
22675
- dark: { primary: "#60a5fa", primaryText: "#60a5fa", primarySoft: "#60a5fa1a" },
22676
- light: { primary: "#2563eb", primaryText: "#1d4ed8", primarySoft: "#2563eb1a" }
22677
- },
22678
- purple: {
22679
- dark: { primary: "#c084fc", primaryText: "#c084fc", primarySoft: "#c084fc1a" },
22680
- light: { primary: "#9333ea", primaryText: "#7e22ce", primarySoft: "#9333ea1a" }
22681
- },
22682
- pink: {
22683
- dark: { primary: "#f472b6", primaryText: "#f472b6", primarySoft: "#f472b61a" },
22684
- light: { primary: "#db2777", primaryText: "#be185d", primarySoft: "#db27771a" }
22685
- }
22686
- };
22687
- dark = {
22688
- ...PALETTE_COLORS.dark.default,
22689
- ...ACCENT_COLORS.green.dark,
22690
- primaryForeground: "#111111",
22691
- success: "#3eeba3",
22692
- successText: "#3eeba3",
22693
- successForeground: "#111111",
22694
- successSoft: "#3eeba31a",
22695
- destructive: "#ef4444",
22696
- destructiveText: "#ff6f63",
22697
- destructiveForeground: "#ffffff",
22698
- destructiveSoft: "#dc262636",
22699
- warning: "#f59e0b",
22700
- warningText: "#f59e0b",
22701
- warningSoft: "#f59e0b1a",
22702
- warningForeground: "#111111",
22703
- highlight: "#f59e0b4d",
22704
- ...plain
22705
- };
22706
- DESIGN_COLORS = {
22707
- dark,
22708
- light: {
22709
- ...PALETTE_COLORS.light.default,
22710
- ...ACCENT_COLORS.green.light,
22711
- primaryForeground: "#ffffff",
22712
- success: "#2f9d57",
22713
- successText: "#007136",
22714
- successForeground: "#ffffff",
22715
- successSoft: "#2f9d571a",
22716
- destructive: "#dc2626",
22717
- destructiveText: "#b2000f",
22718
- destructiveForeground: "#ffffff",
22719
- destructiveSoft: "#dc262614",
22720
- warning: "#92400e",
22721
- warningText: "#92400e",
22722
- warningSoft: "#92400e1f",
22723
- warningForeground: "#ffffff",
22724
- highlight: "#facc1580",
22725
- ...plain
22726
- }
22727
- };
22728
- SERIES = ["success", "blue", "purple", "orange", "pink", "lime", "teal", "warning"];
22729
- BRAND_COLORS = {
22730
- replicas: { light: "#2f9d57", dark: "#3eeba3" },
22731
- claude: "#d97757",
22732
- codex: ["#b1a7ff", "#7a9dff", "#3941ff"],
22733
- muse: "#0668e1",
22734
- opencode: ["#4b4646", "#f1ecec"],
22735
- slack: ["#e01e5a", "#36c5f0", "#2eb67d", "#ecb22e"],
22736
- linear: "#8d8ff8",
22737
- gitlab: "#fc6d26",
22738
- badge: { label: "#121212", linear: "#5e6ad2", slack: "#4a154b" },
22739
- // Emails assume a white page.
22740
- email: { text: "#222", muted: "#888", link: "#0066cc" }
22741
- };
22742
- channels = (hex3) => [1, 3, 5].map((index) => parseInt(hex3.slice(index, index + 2), 16));
22743
- mix = (from, to, amount) => {
22744
- const target = channels(to);
22745
- return `#${channels(from).map((channel, index) => Math.round(channel + (target[index] - channel) * amount).toString(16).padStart(2, "0")).join("")}`;
22746
- };
22747
- luminance = (hex3) => {
22748
- const [r, g, b] = channels(hex3).map((channel) => channel / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
22749
- return 0.2126 * r + 0.7152 * g + 0.0722 * b;
22750
- };
22751
- contrast = (a, b) => {
22752
- const [lighter, darker] = [luminance(a), luminance(b)].sort((x, y) => y - x);
22753
- return (lighter + 0.05) / (darker + 0.05);
22754
- };
22755
- customMode = ({ background, foreground }) => luminance(background) < luminance(foreground) ? "dark" : "light";
22756
- themeCode = ({ background, foreground, accent }) => [background, foreground, accent].join(",");
22757
- DEFAULT_THEME = {
22758
- palette: "default",
22759
- accent: "green",
22760
- custom: { background: PALETTE_COLORS.dark.default.background, foreground: PALETTE_COLORS.dark.default.foreground, accent: "#888888" }
22761
- };
22762
- resolvePalette = (mode, palette, custom2) => (palette === "custom" ? customMode(custom2) === mode : PALETTE_PRESETS[mode].some((name) => name === palette)) ? palette : "default";
22763
- READABLE_TEXT_KEYS = ["primaryText", "successText", "destructiveText", "warningText"];
22764
- }
22765
- });
22766
-
22767
22823
  // ../shared/src/provider-icons.ts
22768
22824
  var PROVIDER_ICON_DEFINITIONS, SLACK_ICON_DEFINITION, LINEAR_ICON_DEFINITION;
22769
22825
  var init_provider_icons = __esm({
@@ -23658,7 +23714,7 @@ A person's own defaults (agent, model, environment) and the organization's gener
23658
23714
  You can't add yourself to or remove yourself from a channel: people type \`/invite @Replicas\` or \`/remove @Replicas\` there, and an admin can pick channels under Integrations, Slack, Configure. To keep you in a channel but out of the way, lower it to Mentions only or put it in silent mode. A channel becomes a Mothership's own channel from that Mothership, not here; any channel's instructions can still send its messages to a Mothership.
23659
23715
 
23660
23716
  ## Tools
23661
- Read presets, channel instructions, and levels with \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Change them with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\`, \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`, \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`, or \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`. Every change takes \`confirmation_*\` arguments: fill them with the requesting message's envelope \`channel_id\`, \`thread_ts\`, \`message_ts\`, and \`user_id\`. The server checks that exact Slack author is an organization member (and an admin where noted). If it refuses, say why briefly and change nothing.
23717
+ Read presets, channel instructions, and levels with \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Change them with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\`, \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`, \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`, or \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`. Every change takes \`confirmation_*\` arguments naming who asked. For a Slack message, fill them with its envelope \`channel_id\`, \`thread_ts\`, \`message_ts\`, and \`user_id\`. A message from a person in the Replicas dashboard has no \`[Slack]\` envelope and carries a \`confirmation_dashboard_token\`: pass only that, never one from another message, and answer in the chat. The server checks that the person who asked is an organization member (and an admin where noted). If it refuses, say why briefly and change nothing.
23662
23718
 
23663
23719
  ## Changing settings
23664
23720
  - Settings also change outside your chat, often on purpose: read the current settings first, never trust earlier messages, and never re-apply an earlier request the current message doesn't ask for. Save only what the current message asks.
@@ -26641,7 +26697,8 @@ var init_preferences = __esm({
26641
26697
  push_when_active: "wait",
26642
26698
  chat_text_size: "default",
26643
26699
  app_font: "inter",
26644
- code_font: "geist-mono"
26700
+ code_font: "geist-mono",
26701
+ wallpaper: null
26645
26702
  };
26646
26703
  DEFAULT_DEFAULT_SKILLS = {
26647
26704
  replicas_agent: {
@@ -37158,6 +37215,9 @@ function parseReplicasEvents(events) {
37158
37215
  }));
37159
37216
  return;
37160
37217
  }
37218
+ case `${HARNESS_EVENT_TYPE_PREFIX}compaction`:
37219
+ messages.push({ id: `replicas-compaction-${String(payload.seq)}`, type: "reasoning", content: COMPACTION_CONTENT, status: "completed", timestamp, completedAt: timestamp });
37220
+ return;
37161
37221
  case `${HARNESS_EVENT_TYPE_PREFIX}error`:
37162
37222
  messages.push({ id: `replicas-error-${String(payload.seq)}`, type: "error", message: stringifyDisplayValue(payload.message) ?? "The agent stopped with an error", timestamp });
37163
37223
  return;
@@ -37179,6 +37239,7 @@ var init_replicas_parser = __esm({
37179
37239
  init_event();
37180
37240
  init_agent_event_utils();
37181
37241
  init_type_guards();
37242
+ init_constants();
37182
37243
  init_task_accumulator();
37183
37244
  init_inference_error();
37184
37245
  init_utils();
@@ -38933,7 +38994,18 @@ var init_types8 = __esm({
38933
38994
  external_exports.object({ type: external_exports.literal("assistant_message"), payload: external_exports.looseObject({ message: assistantMessageSchema }) }),
38934
38995
  external_exports.object({ type: external_exports.literal("tool_result"), payload: external_exports.looseObject({ message: toolResultMessageSchema }) }),
38935
38996
  external_exports.object({ type: external_exports.literal("status"), payload: external_exports.looseObject({ status: external_exports.enum(HARNESS_THREAD_STATUSES) }) }),
38936
- external_exports.object({ type: external_exports.literal("error"), payload: external_exports.looseObject({ message: external_exports.string() }) })
38997
+ external_exports.object({ type: external_exports.literal("error"), payload: external_exports.looseObject({ message: external_exports.string() }) }),
38998
+ /** The model's context is this summary followed by the events from `firstKeptSeq` on; nothing before it is deleted. */
38999
+ external_exports.object({
39000
+ type: external_exports.literal("compaction"),
39001
+ payload: external_exports.looseObject({
39002
+ summary: external_exports.string(),
39003
+ firstKeptSeq: external_exports.number(),
39004
+ tokensBefore: external_exports.number(),
39005
+ readFiles: external_exports.array(external_exports.string()),
39006
+ modifiedFiles: external_exports.array(external_exports.string())
39007
+ })
39008
+ })
38937
39009
  ]);
38938
39010
  harnessLiveMessageSchema = external_exports.union([
38939
39011
  external_exports.object({ type: external_exports.literal("delta"), streamId: external_exports.string(), text: external_exports.string() }),
@@ -39035,7 +39107,7 @@ var CLI_VERSION;
39035
39107
  var init_cli_version = __esm({
39036
39108
  "../shared/src/cli-version.ts"() {
39037
39109
  "use strict";
39038
- CLI_VERSION = "0.3.450";
39110
+ CLI_VERSION = "0.3.454";
39039
39111
  }
39040
39112
  });
39041
39113
 
@@ -39109,14 +39181,17 @@ var init_exec_protocol = __esm({
39109
39181
  /** Run through bash; `login` (default true) sources the login profile like Codex's `bash -lc`. */
39110
39182
  command: external_exports.string().min(1).optional(),
39111
39183
  argv: external_exports.array(external_exports.string()).min(1).optional(),
39184
+ /** A workspace MCP server by name. The daemon resolves its command or URL and credentials, so callers never see them. */
39185
+ mcpServer: external_exports.string().min(1).optional(),
39112
39186
  login: external_exports.boolean().optional(),
39113
39187
  cwd: external_exports.string().min(1).optional(),
39114
39188
  env: external_exports.record(external_exports.string(), external_exports.string()).optional(),
39115
39189
  /** Kill after this long, whoever is attached. */
39116
39190
  timeoutMs: external_exports.number().int().positive().optional(),
39117
39191
  /** Kill after this long with nobody attached. */
39118
- idleTtlMs: external_exports.number().int().positive().max(EXEC_MAX_IDLE_TTL_MS).optional()
39119
- }).refine((body) => body.command === void 0 !== (body.argv === void 0), { message: "Pass exactly one of command or argv" });
39192
+ idleTtlMs: external_exports.number().int().positive().max(EXEC_MAX_IDLE_TTL_MS).optional(),
39193
+ stdin: external_exports.boolean().optional()
39194
+ }).refine((body) => [body.command, body.argv, body.mcpServer].filter((value) => value !== void 0).length === 1, { message: "Pass exactly one of command, argv or mcpServer" });
39120
39195
  execStartedSchema = external_exports.object({ processId: external_exports.string(), pid: external_exports.number() });
39121
39196
  execExitSchema = external_exports.object({ exitCode: external_exports.number(), signal: external_exports.string().nullable(), reason: external_exports.enum(["exit", "timeout", "killed", "idle"]) });
39122
39197
  execReplySchemas = {
@@ -39136,6 +39211,8 @@ var init_exec_protocol = __esm({
39136
39211
  exit: execExitSchema,
39137
39212
  kill: external_exports.object({}).strip(),
39138
39213
  killThread: external_exports.object({ killed: external_exports.number() }),
39214
+ input: external_exports.object({}).strip(),
39215
+ mcpServers: external_exports.object({ servers: external_exports.array(external_exports.object({ name: external_exports.string(), timeoutMs: external_exports.number().optional() })) }),
39139
39216
  list: external_exports.object({
39140
39217
  processes: external_exports.array(execStartedSchema.extend({
39141
39218
  threadId: external_exports.string(),
@@ -39375,7 +39452,7 @@ var init_slack2 = __esm({
39375
39452
  });
39376
39453
 
39377
39454
  // ../shared/src/routes/scout.ts
39378
- var SCOUT_LINEAR_ACTIONS, scoutLinearSessionIntentRequestSchema, scoutLinearStartRequestSchema, scoutRouteLinearTicketRequestSchema, slackChannelIdSchema, slackThreadTsSchema, scoutSlackMessageReferenceSchema, scoutSlackSpawnRequestSchema, scoutSlackSpawnInNewThreadRequestSchema, scoutSlackRelayRequestSchema, scoutSlackSetThreadMutedRequestSchema, scoutSlackStopWorkspaceRequestSchema, scoutListWorkspacesRequestSchema, scoutSlackConfirmationSchema, scoutAutomationToolInputSchema, scoutSaveChannelPresetToolInputSchema, scoutUpdateChannelSettingsToolInputSchema, mothershipSlackChannelLevelToolInputSchema, scoutSetSlackConnectMutedToolInputSchema, scoutSetSlackConnectDefaultsToolInputSchema, scoutSetOrganizationProactivityToolInputSchema, scoutDeleteChannelPresetToolInputSchema, RESET_TO_DEFAULT, resettable, scoutSetSlackAgentDefaultsToolInputSchema, scoutClaimSettingsOfferToolInputSchema;
39455
+ var SCOUT_LINEAR_ACTIONS, scoutLinearSessionIntentRequestSchema, scoutLinearStartRequestSchema, scoutRouteLinearTicketRequestSchema, slackChannelIdSchema, slackThreadTsSchema, scoutSlackMessageReferenceSchema, scoutSlackSpawnRequestSchema, scoutSlackSpawnInNewThreadRequestSchema, scoutSlackRelayRequestSchema, scoutSlackSetThreadMutedRequestSchema, scoutSlackStopWorkspaceRequestSchema, scoutListWorkspacesRequestSchema, scoutSlackConfirmationSchema, scoutAutomationToolInputSchema, scoutSettingsConfirmationSchema, scoutSaveChannelPresetToolInputSchema, scoutUpdateChannelSettingsToolInputSchema, mothershipSlackChannelLevelToolInputSchema, scoutSetSlackConnectMutedToolInputSchema, scoutSetSlackConnectDefaultsToolInputSchema, scoutSetOrganizationProactivityToolInputSchema, scoutDeleteChannelPresetToolInputSchema, RESET_TO_DEFAULT, resettable, scoutSetSlackAgentDefaultsToolInputSchema, scoutClaimSettingsOfferToolInputSchema;
39379
39456
  var init_scout2 = __esm({
39380
39457
  "../shared/src/routes/scout.ts"() {
39381
39458
  "use strict";
@@ -39452,14 +39529,17 @@ var init_scout2 = __esm({
39452
39529
  confirmation_user_id: external_exports.string().describe("`user_id` from that message's envelope.")
39453
39530
  });
39454
39531
  scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
39455
- scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
39532
+ scoutSettingsConfirmationSchema = scoutSlackConfirmationSchema.partial().extend({
39533
+ confirmation_dashboard_token: external_exports.string().optional().describe("For a request from a person in the Replicas dashboard: the `confirmation_dashboard_token` given in that message. Pass it instead of the Slack `confirmation_*` fields; the server authorizes the person who sent it, while it is still the latest message in its chat.")
39534
+ });
39535
+ scoutSaveChannelPresetToolInputSchema = scoutSettingsConfirmationSchema.extend({
39456
39536
  preset_id: external_exports.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
39457
39537
  name: external_exports.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
39458
39538
  description: external_exports.string().optional().describe("One-line summary of what the preset is for."),
39459
39539
  icon: external_exports.enum(SCOUT_PRESET_ICONS).optional(),
39460
39540
  instructions: external_exports.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
39461
39541
  });
39462
- scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
39542
+ scoutUpdateChannelSettingsToolInputSchema = scoutSettingsConfirmationSchema.extend({
39463
39543
  source: external_exports.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
39464
39544
  external_id: external_exports.string().describe("Slack channel id or Linear team id."),
39465
39545
  monitored: external_exports.boolean().optional().describe("Linear: `true` starts monitoring the team (organization admins only), `false` stops. Slack: kept for older callers; prefer `proactivity`. `false` means `tagged`, and `true` lifts a `tagged` channel back to the organization's level. Omit to keep it."),
@@ -39472,25 +39552,25 @@ var init_scout2 = __esm({
39472
39552
  mothershipSlackChannelLevelToolInputSchema = scoutSlackConfirmationSchema.extend({
39473
39553
  proactivity: scoutUpdateChannelSettingsToolInputSchema.shape.proactivity.unwrap().describe("This channel's own level. `organization` makes it follow the organization's level again, which a Mothership's channel raises to at least `balanced`.")
39474
39554
  });
39475
- scoutSetSlackConnectMutedToolInputSchema = scoutSlackConfirmationSchema.extend({
39555
+ scoutSetSlackConnectMutedToolInputSchema = scoutSettingsConfirmationSchema.extend({
39476
39556
  muted: external_exports.boolean().describe("`true` puts every Slack Connect channel without its own setting in silent mode; `false` lets them follow their levels again.")
39477
39557
  });
39478
- scoutSetSlackConnectDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
39558
+ scoutSetSlackConnectDefaultsToolInputSchema = scoutSettingsConfirmationSchema.extend({
39479
39559
  silent: external_exports.boolean().optional().describe("`true` puts every Slack Connect channel without its own setting in silent mode; `false` lets them follow their levels again. Omit to keep it."),
39480
39560
  muted: external_exports.boolean().optional().describe("Kept for older callers; prefer `silent`."),
39481
39561
  preset_id: external_exports.string().optional().describe("Preset for every Slack Connect channel without its own preset or instructions; an empty string removes it. Omit to keep it."),
39482
39562
  instructions: external_exports.string().optional().describe("Complete default instructions, applied after that preset; replaces the existing text. An empty string clears them. Omit to keep them."),
39483
39563
  proactivity: external_exports.enum([...SCOUT_PROACTIVITY_LEVELS, "default"]).optional().describe("Level for every Slack Connect channel without its own level. `default` returns them to `tagged`. Omit to keep it.")
39484
39564
  });
39485
- scoutSetOrganizationProactivityToolInputSchema = scoutSlackConfirmationSchema.extend({
39565
+ scoutSetOrganizationProactivityToolInputSchema = scoutSettingsConfirmationSchema.extend({
39486
39566
  proactivity: external_exports.enum(SCOUT_PROACTIVITY_LEVELS).describe(`The level every Slack channel and group DM follows unless it has its own. Slack Connect channels without their own level follow the shared-channel default from \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\` instead.`)
39487
39567
  });
39488
- scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
39568
+ scoutDeleteChannelPresetToolInputSchema = scoutSettingsConfirmationSchema.extend({
39489
39569
  preset_id: external_exports.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
39490
39570
  });
39491
39571
  RESET_TO_DEFAULT = "default";
39492
39572
  resettable = (schema, description) => external_exports.union([schema, external_exports.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
39493
- scoutSetSlackAgentDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
39573
+ scoutSetSlackAgentDefaultsToolInputSchema = scoutSettingsConfirmationSchema.extend({
39494
39574
  agent_provider: resettable(external_exports.enum(ENGINE_AGENT_PROVIDERS), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
39495
39575
  model: resettable(external_exports.string(), "Model id for that agent; the default is the agent's own."),
39496
39576
  thinking_level: resettable(external_exports.enum(VALID_THINKING_LEVELS), "Thinking level."),
@@ -50459,6 +50539,7 @@ var init_src = __esm({
50459
50539
  init_client_state();
50460
50540
  init_workspaces();
50461
50541
  init_mothership();
50542
+ init_pixel_crew();
50462
50543
  init_workspace_events();
50463
50544
  init_presence();
50464
50545
  init_presence_timers();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.450",
3
+ "version": "0.3.454",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {