replicas-cli 0.3.398 → 0.3.400
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/index.cjs +126 -25
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22515,10 +22515,49 @@ var init_v1 = __esm({
|
|
|
22515
22515
|
});
|
|
22516
22516
|
|
|
22517
22517
|
// ../shared/src/design-tokens.ts
|
|
22518
|
-
|
|
22518
|
+
function customPalette({ background, foreground }) {
|
|
22519
|
+
const selected = mix(background, foreground, 0.105);
|
|
22520
|
+
return {
|
|
22521
|
+
background,
|
|
22522
|
+
subtle: mix(background, foreground, 0.035),
|
|
22523
|
+
muted: mix(background, foreground, 0.06),
|
|
22524
|
+
selected,
|
|
22525
|
+
elevated: luminance(background) < luminance(foreground) ? selected : background,
|
|
22526
|
+
foreground,
|
|
22527
|
+
mutedForeground: mix(background, foreground, 0.65),
|
|
22528
|
+
faintForeground: mix(background, foreground, 0.43),
|
|
22529
|
+
border: mix(background, foreground, 0.115),
|
|
22530
|
+
borderStrong: mix(background, foreground, 0.32)
|
|
22531
|
+
};
|
|
22532
|
+
}
|
|
22533
|
+
function readableText(color, { background, selected }) {
|
|
22534
|
+
const score = (text4) => Math.min(contrast(text4, background), contrast(text4, selected));
|
|
22535
|
+
let best = color;
|
|
22536
|
+
for (let step = 0; step <= 20 && score(best) < 4.5; step++) {
|
|
22537
|
+
best = ["#ffffff", "#000000"].map((toward) => mix(color, toward, step / 20)).reduce((a, b) => score(b) > score(a) ? b : a);
|
|
22538
|
+
}
|
|
22539
|
+
return best;
|
|
22540
|
+
}
|
|
22541
|
+
function customAccent(accent, paletteColors) {
|
|
22542
|
+
return {
|
|
22543
|
+
primary: accent,
|
|
22544
|
+
primaryText: readableText(accent, paletteColors),
|
|
22545
|
+
primaryForeground: contrast("#000000", accent) >= contrast("#ffffff", accent) ? "#000000" : "#ffffff",
|
|
22546
|
+
primarySoft: `${accent}1a`
|
|
22547
|
+
};
|
|
22548
|
+
}
|
|
22549
|
+
function designColors({ mode, palette, accent, custom: custom2 }) {
|
|
22550
|
+
const presets = PALETTE_COLORS[mode];
|
|
22551
|
+
const paletteColors = presets[resolvePalette(mode, palette)] ?? customPalette(custom2[mode]);
|
|
22552
|
+
const colors = { ...DESIGN_COLORS[mode], ...paletteColors, ...accent === "custom" ? customAccent(custom2.accent, paletteColors) : ACCENT_COLORS[accent][mode] };
|
|
22553
|
+
return palette === "custom" ? { ...colors, ...Object.fromEntries(READABLE_TEXT_KEYS.map((key) => [key, readableText(colors[key], paletteColors)])) } : colors;
|
|
22554
|
+
}
|
|
22555
|
+
var plain, PALETTE_PRESETS, PALETTES, PALETTE_NAMES, resolvePalette, PALETTE_COLORS, ACCENT_PRESETS, ACCENTS, ACCENT_COLORS, dark, DESIGN_COLORS, SERIES, BRAND_COLORS, channels, mix, luminance, contrast, DEFAULT_APPEARANCE, READABLE_TEXT_KEYS;
|
|
22519
22556
|
var init_design_tokens = __esm({
|
|
22520
22557
|
"../shared/src/design-tokens.ts"() {
|
|
22521
22558
|
"use strict";
|
|
22559
|
+
init_result();
|
|
22560
|
+
init_type_guards();
|
|
22522
22561
|
plain = {
|
|
22523
22562
|
black: "#000000",
|
|
22524
22563
|
white: "#ffffff",
|
|
@@ -22529,17 +22568,56 @@ var init_design_tokens = __esm({
|
|
|
22529
22568
|
teal: "#14b8a6",
|
|
22530
22569
|
lime: "#84cc16"
|
|
22531
22570
|
};
|
|
22571
|
+
PALETTE_PRESETS = {
|
|
22572
|
+
dark: ["default", "slate", "stone", "black", "high-contrast"],
|
|
22573
|
+
light: ["default", "slate", "stone", "neutral", "high-contrast"]
|
|
22574
|
+
};
|
|
22575
|
+
PALETTES = {
|
|
22576
|
+
dark: [...PALETTE_PRESETS.dark, "custom"],
|
|
22577
|
+
light: [...PALETTE_PRESETS.light, "custom"]
|
|
22578
|
+
};
|
|
22579
|
+
PALETTE_NAMES = [.../* @__PURE__ */ new Set([...PALETTES.dark, ...PALETTES.light])];
|
|
22580
|
+
resolvePalette = (mode, palette) => PALETTES[mode].some((name) => name === palette) ? palette : "default";
|
|
22581
|
+
PALETTE_COLORS = {
|
|
22582
|
+
dark: {
|
|
22583
|
+
default: { background: "#111111", subtle: "#181818", muted: "#1f1f1f", selected: "#2a2a2a", elevated: "#2a2a2a", foreground: "#ededed", mutedForeground: "#a3a3a3", faintForeground: "#737373", border: "#2a2a2a", borderStrong: "#5c5c5c" },
|
|
22584
|
+
slate: { background: "#0d1117", subtle: "#131821", muted: "#19202a", selected: "#232b37", elevated: "#232b37", foreground: "#e6ecf4", mutedForeground: "#97a5ba", faintForeground: "#687487", border: "#242c38", borderStrong: "#515c6d" },
|
|
22585
|
+
stone: { background: "#1a1713", subtle: "#201c18", muted: "#27231f", selected: "#312d28", elevated: "#312d28", foreground: "#f2eae2", mutedForeground: "#b0a497", faintForeground: "#80756b", border: "#342f29", borderStrong: "#675e54" },
|
|
22586
|
+
black: { background: "#000000", subtle: "#0a0a0a", muted: "#141414", selected: "#222222", elevated: "#222222", foreground: "#ededed", mutedForeground: "#a1a1a1", faintForeground: "#6c6c6c", border: "#262626", borderStrong: "#525252" },
|
|
22587
|
+
"high-contrast": { background: "#0b0b0b", subtle: "#141414", muted: "#1c1c1c", selected: "#2e2e2e", elevated: "#2e2e2e", foreground: "#fafafa", mutedForeground: "#bababa", faintForeground: "#858585", border: "#353535", borderStrong: "#5e5e5e" }
|
|
22588
|
+
},
|
|
22589
|
+
light: {
|
|
22590
|
+
default: { background: "#ffffff", subtle: "#f7f8f6", muted: "#f2f3f1", selected: "#e8ece7", elevated: "#ffffff", foreground: "#162118", mutedForeground: "#67706a", faintForeground: "#a1a7a3", border: "#e2e6e0", borderStrong: "#b9c1b8" },
|
|
22591
|
+
slate: { background: "#ffffff", subtle: "#f5f8fc", muted: "#eff3f9", selected: "#e4eaf3", elevated: "#ffffff", foreground: "#171f2b", mutedForeground: "#56667c", faintForeground: "#8592a6", border: "#d9e1ec", borderStrong: "#acb7c7" },
|
|
22592
|
+
stone: { background: "#fdf9f5", subtle: "#f8f3ed", muted: "#f4eee7", selected: "#ede5dc", elevated: "#ffffff", foreground: "#241c15", mutedForeground: "#6c6053", faintForeground: "#978c80", border: "#e3dbd2", borderStrong: "#bcb0a3" },
|
|
22593
|
+
neutral: { background: "#ffffff", subtle: "#f9f9f9", muted: "#f3f3f3", selected: "#eaeaea", elevated: "#ffffff", foreground: "#111111", mutedForeground: "#606060", faintForeground: "#898989", border: "#dedede", borderStrong: "#b4b4b4" },
|
|
22594
|
+
"high-contrast": { background: "#ffffff", subtle: "#f5f5f5", muted: "#ededed", selected: "#e0e0e0", elevated: "#ffffff", foreground: "#0a0a0a", mutedForeground: "#4f4f4f", faintForeground: "#6b6b6b", border: "#cccccc", borderStrong: "#949494" }
|
|
22595
|
+
}
|
|
22596
|
+
};
|
|
22597
|
+
ACCENT_PRESETS = ["green", "blue", "purple", "pink"];
|
|
22598
|
+
ACCENTS = [...ACCENT_PRESETS, "custom"];
|
|
22599
|
+
ACCENT_COLORS = {
|
|
22600
|
+
green: {
|
|
22601
|
+
dark: { primary: "#3eeba3", primaryText: "#3eeba3", primarySoft: "#3eeba31a" },
|
|
22602
|
+
light: { primary: "#2f9d57", primaryText: "#007136", primarySoft: "#2f9d571a" }
|
|
22603
|
+
},
|
|
22604
|
+
blue: {
|
|
22605
|
+
dark: { primary: "#60a5fa", primaryText: "#60a5fa", primarySoft: "#60a5fa1a" },
|
|
22606
|
+
light: { primary: "#2563eb", primaryText: "#1d4ed8", primarySoft: "#2563eb1a" }
|
|
22607
|
+
},
|
|
22608
|
+
purple: {
|
|
22609
|
+
dark: { primary: "#c084fc", primaryText: "#c084fc", primarySoft: "#c084fc1a" },
|
|
22610
|
+
light: { primary: "#9333ea", primaryText: "#7e22ce", primarySoft: "#9333ea1a" }
|
|
22611
|
+
},
|
|
22612
|
+
pink: {
|
|
22613
|
+
dark: { primary: "#f472b6", primaryText: "#f472b6", primarySoft: "#f472b61a" },
|
|
22614
|
+
light: { primary: "#db2777", primaryText: "#be185d", primarySoft: "#db27771a" }
|
|
22615
|
+
}
|
|
22616
|
+
};
|
|
22532
22617
|
dark = {
|
|
22533
|
-
|
|
22534
|
-
|
|
22535
|
-
selected: "#2a2a2a",
|
|
22536
|
-
foreground: "#ededed",
|
|
22537
|
-
mutedForeground: "#a3a3a3",
|
|
22538
|
-
border: "#2a2a2a",
|
|
22539
|
-
primary: "#3eeba3",
|
|
22540
|
-
primaryText: "#3eeba3",
|
|
22618
|
+
...PALETTE_COLORS.dark.default,
|
|
22619
|
+
...ACCENT_COLORS.green.dark,
|
|
22541
22620
|
primaryForeground: "#111111",
|
|
22542
|
-
primarySoft: "#3eeba31a",
|
|
22543
22621
|
success: "#3eeba3",
|
|
22544
22622
|
successText: "#3eeba3",
|
|
22545
22623
|
successForeground: "#111111",
|
|
@@ -22551,21 +22629,16 @@ var init_design_tokens = __esm({
|
|
|
22551
22629
|
warning: "#f59e0b",
|
|
22552
22630
|
warningText: "#f59e0b",
|
|
22553
22631
|
warningSoft: "#f59e0b1a",
|
|
22632
|
+
warningForeground: "#111111",
|
|
22633
|
+
highlight: "#f59e0b4d",
|
|
22554
22634
|
...plain
|
|
22555
22635
|
};
|
|
22556
22636
|
DESIGN_COLORS = {
|
|
22557
22637
|
dark,
|
|
22558
22638
|
light: {
|
|
22559
|
-
|
|
22560
|
-
|
|
22561
|
-
selected: "#e8ece7",
|
|
22562
|
-
foreground: "#162118",
|
|
22563
|
-
mutedForeground: "#67706a",
|
|
22564
|
-
border: "#e2e6e0",
|
|
22565
|
-
primary: "#2f9d57",
|
|
22566
|
-
primaryText: "#007136",
|
|
22639
|
+
...PALETTE_COLORS.light.default,
|
|
22640
|
+
...ACCENT_COLORS.green.light,
|
|
22567
22641
|
primaryForeground: "#ffffff",
|
|
22568
|
-
primarySoft: "#2f9d571a",
|
|
22569
22642
|
success: "#2f9d57",
|
|
22570
22643
|
successText: "#007136",
|
|
22571
22644
|
successForeground: "#ffffff",
|
|
@@ -22577,10 +22650,12 @@ var init_design_tokens = __esm({
|
|
|
22577
22650
|
warning: "#92400e",
|
|
22578
22651
|
warningText: "#92400e",
|
|
22579
22652
|
warningSoft: "#92400e1f",
|
|
22653
|
+
warningForeground: "#ffffff",
|
|
22654
|
+
highlight: "#facc1580",
|
|
22580
22655
|
...plain
|
|
22581
22656
|
}
|
|
22582
22657
|
};
|
|
22583
|
-
SERIES = ["
|
|
22658
|
+
SERIES = ["success", "blue", "purple", "orange", "pink", "lime", "teal", "warning"];
|
|
22584
22659
|
BRAND_COLORS = {
|
|
22585
22660
|
replicas: { light: "#2f9d57", dark: "#3eeba3" },
|
|
22586
22661
|
claude: "#d97757",
|
|
@@ -22594,6 +22669,29 @@ var init_design_tokens = __esm({
|
|
|
22594
22669
|
// Emails assume a white page.
|
|
22595
22670
|
email: { text: "#222", muted: "#888", link: "#0066cc" }
|
|
22596
22671
|
};
|
|
22672
|
+
channels = (hex3) => [1, 3, 5].map((index) => parseInt(hex3.slice(index, index + 2), 16));
|
|
22673
|
+
mix = (from, to, amount) => {
|
|
22674
|
+
const target = channels(to);
|
|
22675
|
+
return `#${channels(from).map((channel, index) => Math.round(channel + (target[index] - channel) * amount).toString(16).padStart(2, "0")).join("")}`;
|
|
22676
|
+
};
|
|
22677
|
+
luminance = (hex3) => {
|
|
22678
|
+
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);
|
|
22679
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
22680
|
+
};
|
|
22681
|
+
contrast = (a, b) => {
|
|
22682
|
+
const [lighter, darker] = [luminance(a), luminance(b)].sort((x, y) => y - x);
|
|
22683
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
22684
|
+
};
|
|
22685
|
+
DEFAULT_APPEARANCE = {
|
|
22686
|
+
palette: "default",
|
|
22687
|
+
accent: "green",
|
|
22688
|
+
custom: {
|
|
22689
|
+
dark: { background: PALETTE_COLORS.dark.default.background, foreground: PALETTE_COLORS.dark.default.foreground },
|
|
22690
|
+
light: { background: PALETTE_COLORS.light.default.background, foreground: PALETTE_COLORS.light.default.foreground },
|
|
22691
|
+
accent: "#888888"
|
|
22692
|
+
}
|
|
22693
|
+
};
|
|
22694
|
+
READABLE_TEXT_KEYS = ["primaryText", "successText", "destructiveText", "warningText"];
|
|
22597
22695
|
}
|
|
22598
22696
|
});
|
|
22599
22697
|
|
|
@@ -24474,7 +24572,7 @@ var init_linear3 = __esm({
|
|
|
24474
24572
|
"../shared/src/default-skills/replicas-agent/abilities/linear.ts"() {
|
|
24475
24573
|
"use strict";
|
|
24476
24574
|
SECTION7 = `### Linear
|
|
24477
|
-
Create tickets, fetch issues, update state, add comments, and search through \`replicas.linear.graphql\` in \`@replicas/sdk\`. This works without a Linear MCP server and refreshes authentication automatically.
|
|
24575
|
+
Create tickets, fetch issues, update state, add comments, and search through \`replicas.linear.graphql\` in \`@replicas/sdk\`. This works without a Linear MCP server and refreshes authentication automatically. Create tickets through it even when a Linear MCP server is configured: it credits the ticket to the person who asked, while an MCP server files it as whoever signed it in.
|
|
24478
24576
|
|
|
24479
24577
|
**Reference:** \`references/LINEAR.md\`
|
|
24480
24578
|
|
|
@@ -24533,6 +24631,8 @@ const created = await replicas.linear.graphql({
|
|
|
24533
24631
|
});
|
|
24534
24632
|
\`\`\`
|
|
24535
24633
|
|
|
24634
|
+
When this workspace's user has linked their Linear account, the gateway fills in \`createAsUser\` and \`displayIconUrl\` so the ticket shows them as its creator. Don't set those yourself.
|
|
24635
|
+
|
|
24536
24636
|
Responses retain Linear's GraphQL \`data\` and \`errors\` fields. Check \`errors\` and \`data.issueCreate.success\` before reporting creation, then return the issue URL. After an ambiguous timeout, search for the issue before retrying creation to avoid duplicates.
|
|
24537
24637
|
|
|
24538
24638
|
## Fetch an issue
|
|
@@ -25973,10 +26073,10 @@ curl -sS --fail-with-body -X POST "\${REPLICAS_MONOLITH_URL:-$MONOLITH_URL}/v1/e
|
|
|
25973
26073
|
});
|
|
25974
26074
|
|
|
25975
26075
|
// ../shared/src/visuals.ts
|
|
25976
|
-
function visualTheme(
|
|
25977
|
-
const colors =
|
|
26076
|
+
function visualTheme(mode, fontUrl, appearance = DEFAULT_APPEARANCE) {
|
|
26077
|
+
const colors = designColors({ ...appearance, mode });
|
|
25978
26078
|
return {
|
|
25979
|
-
appearance,
|
|
26079
|
+
appearance: mode,
|
|
25980
26080
|
variables: {
|
|
25981
26081
|
"--background": colors.background,
|
|
25982
26082
|
"--foreground": colors.foreground,
|
|
@@ -37757,7 +37857,7 @@ var CLI_VERSION;
|
|
|
37757
37857
|
var init_cli_version = __esm({
|
|
37758
37858
|
"../shared/src/cli-version.ts"() {
|
|
37759
37859
|
"use strict";
|
|
37760
|
-
CLI_VERSION = "0.3.
|
|
37860
|
+
CLI_VERSION = "0.3.400";
|
|
37761
37861
|
}
|
|
37762
37862
|
});
|
|
37763
37863
|
|
|
@@ -48631,6 +48731,7 @@ var init_mobile_testing = __esm({
|
|
|
48631
48731
|
var init_desktop = __esm({
|
|
48632
48732
|
"../shared/src/desktop.ts"() {
|
|
48633
48733
|
"use strict";
|
|
48734
|
+
init_design_tokens();
|
|
48634
48735
|
}
|
|
48635
48736
|
});
|
|
48636
48737
|
|