unfairly 0.5.1 → 0.6.1
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/CHANGELOG.md +15 -0
- package/README.md +16 -7
- package/dist/cmd/init.d.ts +2 -3
- package/dist/cmd/init.d.ts.map +1 -1
- package/dist/cmd/init.js +60 -44
- package/dist/cmd/init.js.map +1 -1
- package/dist/cmd/pull.d.ts.map +1 -1
- package/dist/cmd/pull.js +16 -2
- package/dist/cmd/pull.js.map +1 -1
- package/dist/cmd/setup.d.ts +19 -19
- package/dist/cmd/setup.d.ts.map +1 -1
- package/dist/cmd/setup.js +267 -87
- package/dist/cmd/setup.js.map +1 -1
- package/dist/cmd/status-card.d.ts +2 -0
- package/dist/cmd/status-card.d.ts.map +1 -0
- package/dist/cmd/status-card.js +156 -0
- package/dist/cmd/status-card.js.map +1 -0
- package/dist/cmd/status.d.ts.map +1 -1
- package/dist/cmd/status.js +3 -0
- package/dist/cmd/status.js.map +1 -1
- package/dist/hosts/claude-code.d.ts +48 -10
- package/dist/hosts/claude-code.d.ts.map +1 -1
- package/dist/hosts/claude-code.js +102 -29
- package/dist/hosts/claude-code.js.map +1 -1
- package/dist/hosts/claude-desktop.d.ts +47 -0
- package/dist/hosts/claude-desktop.d.ts.map +1 -0
- package/dist/hosts/claude-desktop.js +88 -0
- package/dist/hosts/claude-desktop.js.map +1 -0
- package/dist/index.js +58 -27
- package/dist/index.js.map +1 -1
- package/dist/sync/repo-root.d.ts +7 -0
- package/dist/sync/repo-root.d.ts.map +1 -0
- package/dist/sync/repo-root.js +24 -0
- package/dist/sync/repo-root.js.map +1 -0
- package/dist/sync/stitch-claude-md.d.ts +9 -0
- package/dist/sync/stitch-claude-md.d.ts.map +1 -0
- package/dist/sync/stitch-claude-md.js +48 -0
- package/dist/sync/stitch-claude-md.js.map +1 -0
- package/dist/ui/colors.d.ts +17 -0
- package/dist/ui/colors.d.ts.map +1 -0
- package/dist/ui/colors.js +28 -0
- package/dist/ui/colors.js.map +1 -0
- package/dist/ui/screens.d.ts +44 -0
- package/dist/ui/screens.d.ts.map +1 -0
- package/dist/ui/screens.js +135 -0
- package/dist/ui/screens.js.map +1 -0
- package/package.json +32 -7
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { promises as fs } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
export const AUTOLOADER_LINE = "@.unfairly/CLAUDE.md";
|
|
4
|
+
export const SENTINEL = "<!-- unfairly: autoloader -->";
|
|
5
|
+
const LINE_RE = /^@\.unfairly\/CLAUDE\.md\s*$/m;
|
|
6
|
+
export async function stitchClaudeMd(repoRoot) {
|
|
7
|
+
const gitDir = path.join(repoRoot, ".git");
|
|
8
|
+
try {
|
|
9
|
+
await fs.stat(gitDir);
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return { action: "not-a-repo", path: path.join(repoRoot, "CLAUDE.md") };
|
|
13
|
+
}
|
|
14
|
+
const claudeMdPath = path.join(repoRoot, "CLAUDE.md");
|
|
15
|
+
let existing;
|
|
16
|
+
try {
|
|
17
|
+
existing = await fs.readFile(claudeMdPath, "utf8");
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
const e = err;
|
|
21
|
+
if (e.code !== "ENOENT")
|
|
22
|
+
return { action: "error", path: claudeMdPath, message: e.message };
|
|
23
|
+
existing = null;
|
|
24
|
+
}
|
|
25
|
+
if (existing === null) {
|
|
26
|
+
const content = `${SENTINEL}\n${AUTOLOADER_LINE}\n`;
|
|
27
|
+
try {
|
|
28
|
+
await fs.writeFile(claudeMdPath, content, "utf8");
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
return { action: "error", path: claudeMdPath, message: err.message };
|
|
32
|
+
}
|
|
33
|
+
return { action: "created", path: claudeMdPath };
|
|
34
|
+
}
|
|
35
|
+
if (LINE_RE.test(existing)) {
|
|
36
|
+
return { action: "noop", path: claudeMdPath };
|
|
37
|
+
}
|
|
38
|
+
const sep = existing.endsWith("\n") ? "" : "\n";
|
|
39
|
+
const next = `${existing}${sep}\n${SENTINEL}\n${AUTOLOADER_LINE}\n`;
|
|
40
|
+
try {
|
|
41
|
+
await fs.writeFile(claudeMdPath, next, "utf8");
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
return { action: "error", path: claudeMdPath, message: err.message };
|
|
45
|
+
}
|
|
46
|
+
return { action: "appended", path: claudeMdPath };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=stitch-claude-md.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stitch-claude-md.js","sourceRoot":"","sources":["../../src/sync/stitch-claude-md.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,eAAe,GAAG,sBAAsB,CAAC;AACtD,MAAM,CAAC,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AAQxD,MAAM,OAAO,GAAG,+BAA+B,CAAC;AAEhD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAgB;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAAC;IAC1E,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACtD,IAAI,QAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,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AAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAG,GAAa,CAAC,OAAO,EAAE,CAAC;IAClF,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ColorEnv = {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare function isColorEnabled(isTTY: boolean): boolean;
|
|
5
|
+
export type Brand = {
|
|
6
|
+
coral: (s: string) => string;
|
|
7
|
+
gold: (s: string) => string;
|
|
8
|
+
silver: (s: string) => string;
|
|
9
|
+
bronze: (s: string) => string;
|
|
10
|
+
dim: (s: string) => string;
|
|
11
|
+
ok: (s: string) => string;
|
|
12
|
+
warn: (s: string) => string;
|
|
13
|
+
err: (s: string) => string;
|
|
14
|
+
bold: (s: string) => string;
|
|
15
|
+
};
|
|
16
|
+
export declare function brand(env?: ColorEnv): Brand;
|
|
17
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/ui/colors.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7B,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5B,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9B,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9B,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3B,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1B,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5B,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAgB,KAAK,CACnB,GAAG,GAAE,QAAqE,GACzE,KAAK,CAoBP"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createColors } from "picocolors";
|
|
2
|
+
export function isColorEnabled(isTTY) {
|
|
3
|
+
if (process.env.NO_COLOR && process.env.NO_COLOR !== "")
|
|
4
|
+
return false;
|
|
5
|
+
return isTTY;
|
|
6
|
+
}
|
|
7
|
+
export function brand(env = { enabled: isColorEnabled(Boolean(process.stdout.isTTY)) }) {
|
|
8
|
+
if (!env.enabled) {
|
|
9
|
+
const identity = (s) => s;
|
|
10
|
+
return {
|
|
11
|
+
coral: identity, gold: identity, silver: identity, bronze: identity,
|
|
12
|
+
dim: identity, ok: identity, warn: identity, err: identity, bold: identity,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const pc = createColors(true);
|
|
16
|
+
return {
|
|
17
|
+
coral: (s) => pc.red(s),
|
|
18
|
+
gold: (s) => pc.yellow(s),
|
|
19
|
+
silver: (s) => pc.white(s),
|
|
20
|
+
bronze: (s) => pc.yellow(pc.dim(s)),
|
|
21
|
+
dim: (s) => pc.dim(s),
|
|
22
|
+
ok: (s) => pc.green(s),
|
|
23
|
+
warn: (s) => pc.yellow(s),
|
|
24
|
+
err: (s) => pc.red(s),
|
|
25
|
+
bold: (s) => pc.bold(s),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","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AAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACrB,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QACtB,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;QACzB,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACrB,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;KACxB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type ScreenOpts = {
|
|
2
|
+
color: boolean;
|
|
3
|
+
width: number;
|
|
4
|
+
};
|
|
5
|
+
export declare function defaultOpts(): ScreenOpts;
|
|
6
|
+
export declare function banner(opts: ScreenOpts): string;
|
|
7
|
+
export declare function stepHeader(n: number, total: number, label: string, opts: ScreenOpts): string;
|
|
8
|
+
export type ResultKind = "ok" | "err" | "warn" | "skip" | "progress";
|
|
9
|
+
export declare function result(kind: ResultKind, text: string, opts: ScreenOpts): string;
|
|
10
|
+
export declare function divider(opts: ScreenOpts): string;
|
|
11
|
+
export type HandoffState = {
|
|
12
|
+
vaultCount: number;
|
|
13
|
+
docCount: number;
|
|
14
|
+
recentMove: {
|
|
15
|
+
who: string;
|
|
16
|
+
room: string;
|
|
17
|
+
title: string;
|
|
18
|
+
ago: string;
|
|
19
|
+
} | null;
|
|
20
|
+
hint: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function handoffCard(state: HandoffState, opts: ScreenOpts): string;
|
|
23
|
+
export type StatusState = {
|
|
24
|
+
hosts: {
|
|
25
|
+
claudeDesktop: "wired" | "missing" | "rotted";
|
|
26
|
+
claudeCode: "wired" | "missing" | "rotted";
|
|
27
|
+
codex: "wired" | "missing" | "rotted";
|
|
28
|
+
};
|
|
29
|
+
workspace: {
|
|
30
|
+
cwd: string;
|
|
31
|
+
vaultCount: number;
|
|
32
|
+
docCount: number;
|
|
33
|
+
lastPulledAt: string | null;
|
|
34
|
+
} | null;
|
|
35
|
+
recent: Array<{
|
|
36
|
+
who: string;
|
|
37
|
+
room: string;
|
|
38
|
+
ago: string;
|
|
39
|
+
title: string;
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
export declare function statusCard(state: StatusState, opts: ScreenOpts): string;
|
|
43
|
+
export declare function renderTo(write: (s: string) => unknown, lines: string[]): void;
|
|
44
|
+
//# sourceMappingURL=screens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../src/ui/screens.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,WAAW,IAAI,UAAU,CAMxC;AAMD,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAK/C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAG5F;AAED,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAErE,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAS/E;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAMhD;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE;QAAE,GAAG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) && !process.env.NO_COLOR,
|
|
6
|
+
width: cols > 0 ? cols : 80,
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function colorsFor(opts) {
|
|
10
|
+
return brand({ enabled: opts.color });
|
|
11
|
+
}
|
|
12
|
+
export function banner(opts) {
|
|
13
|
+
const c = colorsFor(opts);
|
|
14
|
+
const line1 = " ✦ U N F A I R L Y ✦";
|
|
15
|
+
const line2 = " the multiplayer brain for ai";
|
|
16
|
+
return `${c.coral(line1)}\n${c.dim(line2)}`;
|
|
17
|
+
}
|
|
18
|
+
export function stepHeader(n, total, label, opts) {
|
|
19
|
+
const c = colorsFor(opts);
|
|
20
|
+
return `${c.dim(`[${n}/${total}]`)} ${c.dim(label)}`;
|
|
21
|
+
}
|
|
22
|
+
export function result(kind, text, opts) {
|
|
23
|
+
const c = colorsFor(opts);
|
|
24
|
+
const glyph = kind === "ok" ? c.ok("✓") :
|
|
25
|
+
kind === "err" ? c.err("✗") :
|
|
26
|
+
kind === "warn" ? c.warn("⚠") :
|
|
27
|
+
kind === "skip" ? c.dim("·") :
|
|
28
|
+
c.dim("◆");
|
|
29
|
+
return ` ${glyph} ${text}`;
|
|
30
|
+
}
|
|
31
|
+
export function divider(opts) {
|
|
32
|
+
const c = colorsFor(opts);
|
|
33
|
+
const len = Math.max(20, Math.min(45, opts.width - 4));
|
|
34
|
+
// Box-drawing dash for TTY; plain ASCII for piped/CI consumers.
|
|
35
|
+
const ch = opts.color ? "─" : "-";
|
|
36
|
+
return c.dim(ch.repeat(len));
|
|
37
|
+
}
|
|
38
|
+
export function handoffCard(state, opts) {
|
|
39
|
+
const c = colorsFor(opts);
|
|
40
|
+
// Inner width 50 fits the longest dynamic line ("You joined Unfairly · N vaults · M docs"
|
|
41
|
+
// for realistic N, M) plus 3-space inner padding on each side, with a couple cols slack.
|
|
42
|
+
const inner = 50;
|
|
43
|
+
const pad = (s) => s + " ".repeat(Math.max(0, inner - visibleLen(s)));
|
|
44
|
+
const lines = [];
|
|
45
|
+
// Box-drawing chars in TTY mode; ASCII in plain mode so piped/CI consumers
|
|
46
|
+
// don't end up with mangled unicode.
|
|
47
|
+
const tl = opts.color ? "╔" : "+";
|
|
48
|
+
const tr = opts.color ? "╗" : "+";
|
|
49
|
+
const bl = opts.color ? "╚" : "+";
|
|
50
|
+
const br = opts.color ? "╝" : "+";
|
|
51
|
+
const h = opts.color ? "═" : "-";
|
|
52
|
+
const v = opts.color ? "║" : "|";
|
|
53
|
+
const border = h.repeat(inner);
|
|
54
|
+
lines.push(` ${c.coral(`${tl}${border}${tr}`)}`);
|
|
55
|
+
lines.push(` ${c.coral(v)}${pad("")}${c.coral(v)}`);
|
|
56
|
+
lines.push(` ${c.coral(v)}${pad(centered(opts.color ? "✦ PLAYER 2 READY ✦" : "* PLAYER 2 READY *", inner, c.bold))}${c.coral(v)}`);
|
|
57
|
+
lines.push(` ${c.coral(v)}${pad("")}${c.coral(v)}`);
|
|
58
|
+
lines.push(` ${c.coral(v)}${pad(` You joined ${c.bold("Unfairly")} · ${c.dim(`${state.vaultCount} vaults · ${state.docCount} docs`)} `)}${c.coral(v)}`);
|
|
59
|
+
if (state.recentMove) {
|
|
60
|
+
const m = state.recentMove;
|
|
61
|
+
lines.push(` ${c.coral(v)}${pad(` ${c.silver(`${m.who} shipped "${truncate(m.title, 22)}" ${m.ago}`)} `)}${c.coral(v)}`);
|
|
62
|
+
}
|
|
63
|
+
lines.push(` ${c.coral(v)}${pad("")}${c.coral(v)}`);
|
|
64
|
+
const arrow = opts.color ? "▶" : ">";
|
|
65
|
+
lines.push(` ${c.coral(v)}${pad(` ${c.coral(arrow)} ${state.hint} `)}${c.coral(v)}`);
|
|
66
|
+
lines.push(` ${c.coral(v)}${pad(` ${c.dim("or run ")}${c.bold("claude")}${c.dim(" / ")}${c.bold("codex")}${c.dim(" here in this repo")} `)}${c.coral(v)}`);
|
|
67
|
+
lines.push(` ${c.coral(v)}${pad("")}${c.coral(v)}`);
|
|
68
|
+
lines.push(` ${c.coral(v)}${pad(` ${c.dim("the brain follows you across surfaces.")} `)}${c.coral(v)}`);
|
|
69
|
+
lines.push(` ${c.coral(v)}${pad("")}${c.coral(v)}`);
|
|
70
|
+
lines.push(` ${c.coral(`${bl}${border}${br}`)}`);
|
|
71
|
+
return lines.join("\n");
|
|
72
|
+
}
|
|
73
|
+
export function statusCard(state, opts) {
|
|
74
|
+
const c = colorsFor(opts);
|
|
75
|
+
const lines = [];
|
|
76
|
+
lines.push(` ${c.coral("✦ UNFAIRLY ✦")} ${c.dim("player 2 — daily check-in")}`);
|
|
77
|
+
lines.push("");
|
|
78
|
+
lines.push(` ${c.dim("HOSTS WIRED")}`);
|
|
79
|
+
lines.push(` ${hostGlyph(state.hosts.claudeDesktop, c)} Claude Desktop ${hostGlyph(state.hosts.claudeCode, c)} Claude Code ${hostGlyph(state.hosts.codex, c)} Codex`);
|
|
80
|
+
lines.push("");
|
|
81
|
+
if (state.workspace) {
|
|
82
|
+
lines.push(` ${c.dim("WORKSPACE")}`);
|
|
83
|
+
const ws = state.workspace;
|
|
84
|
+
const pulled = ws.lastPulledAt ? `last pulled ${timeAgo(ws.lastPulledAt)}` : c.warn("not pulled yet");
|
|
85
|
+
lines.push(` ${ws.cwd} ${c.dim("·")} ${ws.vaultCount} vaults · ${ws.docCount} docs ${c.dim("·")} ${c.dim(pulled)}`);
|
|
86
|
+
lines.push("");
|
|
87
|
+
}
|
|
88
|
+
if (state.recent.length > 0) {
|
|
89
|
+
lines.push(` ${c.dim("TEAM MOVES (last 24h)")}`);
|
|
90
|
+
for (const m of state.recent.slice(0, 5)) {
|
|
91
|
+
lines.push(` ${c.coral("●")} ${c.bold(m.who)} · ${m.room} · ${c.dim(m.ago)} · "${m.title}"`);
|
|
92
|
+
}
|
|
93
|
+
lines.push("");
|
|
94
|
+
}
|
|
95
|
+
lines.push(` ${c.coral("▶")} ${c.dim("run")} ${c.bold("unfairly pull")} ${c.dim("to refresh · or just open Claude Desktop.")}`);
|
|
96
|
+
return lines.join("\n");
|
|
97
|
+
}
|
|
98
|
+
function hostGlyph(s, c) {
|
|
99
|
+
if (s === "wired")
|
|
100
|
+
return c.ok("✓");
|
|
101
|
+
if (s === "rotted")
|
|
102
|
+
return c.warn("⚠");
|
|
103
|
+
return c.dim("·");
|
|
104
|
+
}
|
|
105
|
+
export function renderTo(write, lines) {
|
|
106
|
+
for (const l of lines)
|
|
107
|
+
write(`${l}\n`);
|
|
108
|
+
}
|
|
109
|
+
// --- helpers ---
|
|
110
|
+
function visibleLen(s) {
|
|
111
|
+
// eslint-disable-next-line no-control-regex
|
|
112
|
+
return s.replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
113
|
+
}
|
|
114
|
+
function centered(s, width, decorator) {
|
|
115
|
+
const v = visibleLen(s);
|
|
116
|
+
const pad = Math.max(0, Math.floor((width - v) / 2));
|
|
117
|
+
const decorated = decorator ? decorator(s) : s;
|
|
118
|
+
return " ".repeat(pad) + decorated;
|
|
119
|
+
}
|
|
120
|
+
function truncate(s, max) {
|
|
121
|
+
return s.length <= max ? s : s.slice(0, max - 1) + "…";
|
|
122
|
+
}
|
|
123
|
+
function timeAgo(iso) {
|
|
124
|
+
const diff = Date.now() - new Date(iso).getTime();
|
|
125
|
+
const mins = Math.floor(diff / 60000);
|
|
126
|
+
if (mins < 1)
|
|
127
|
+
return "just now";
|
|
128
|
+
if (mins < 60)
|
|
129
|
+
return `${mins}m ago`;
|
|
130
|
+
const hrs = Math.floor(mins / 60);
|
|
131
|
+
if (hrs < 24)
|
|
132
|
+
return `${hrs}h ago`;
|
|
133
|
+
return `${Math.floor(hrs / 24)}d ago`;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=screens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../../src/ui/screens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA6B,MAAM,aAAa,CAAC;AAO/D,MAAM,UAAU,WAAW;IACzB,MA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I,GAAG,CAAC;QAAE,OAAO,UAAU,CAAC;IAChC,IAAI,IAAI,GAAG,EAAE;QAAE,OAAO,GAAG,IAAI,OAAO,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IAClC,IAAI,GAAG,GAAG,EAAE;QAAE,OAAO,GAAG,GAAG,OAAO,CAAC;IACnC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC;AACxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unfairly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "CLI + stdio MCP + library SDK for the Unfairly multiplayer context layer — sync vaults, run agents, emit events",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"unfairly",
|
|
7
|
+
"mcp",
|
|
8
|
+
"ai",
|
|
9
|
+
"context",
|
|
10
|
+
"agents",
|
|
11
|
+
"knowledge-base",
|
|
12
|
+
"claude",
|
|
13
|
+
"codex",
|
|
14
|
+
"sdk"
|
|
15
|
+
],
|
|
6
16
|
"homepage": "https://unfairly.ai",
|
|
7
|
-
"repository": {
|
|
8
|
-
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/Unfairly-AI/unfairly-app.git",
|
|
20
|
+
"directory": "cli"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Unfairly-AI/unfairly-app/issues"
|
|
24
|
+
},
|
|
9
25
|
"license": "MIT",
|
|
10
26
|
"author": "Unfairly <bob@hq.unfairly.ai>",
|
|
11
27
|
"type": "module",
|
|
12
28
|
"main": "./dist/lib/index.js",
|
|
13
29
|
"types": "./dist/lib/index.d.ts",
|
|
14
|
-
"bin": {
|
|
30
|
+
"bin": {
|
|
31
|
+
"unfairly": "./dist/index.js"
|
|
32
|
+
},
|
|
15
33
|
"exports": {
|
|
16
34
|
".": {
|
|
17
35
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -42,6 +60,7 @@
|
|
|
42
60
|
"chokidar": "^4.0.1",
|
|
43
61
|
"gray-matter": "^4.0.3",
|
|
44
62
|
"keytar": "^7.9.0",
|
|
63
|
+
"picocolors": "^1.1.1",
|
|
45
64
|
"yargs": "^17.7.2",
|
|
46
65
|
"zod": "^3.23.8"
|
|
47
66
|
},
|
|
@@ -52,6 +71,12 @@
|
|
|
52
71
|
"typescript": "^5.6.0",
|
|
53
72
|
"vitest": "^2.1.0"
|
|
54
73
|
},
|
|
55
|
-
"engines": {
|
|
56
|
-
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">=20"
|
|
76
|
+
},
|
|
77
|
+
"files": [
|
|
78
|
+
"dist",
|
|
79
|
+
"README.md",
|
|
80
|
+
"CHANGELOG.md"
|
|
81
|
+
]
|
|
57
82
|
}
|